Files
2026-10-05 09:03:01 -07:00

607 lines
383 KiB
JavaScript

/*
THIS IS A GENERATED/BUNDLED FILE BY ESBUILD
if you want to view the source, please visit the github repository of this plugin
*/
var or=Object.defineProperty,ku=Object.defineProperties,wu=Object.getOwnPropertyDescriptor,Tu=Object.getOwnPropertyDescriptors,Eu=Object.getOwnPropertyNames,wa=Object.getOwnPropertySymbols;var Ea=Object.prototype.hasOwnProperty,Pu=Object.prototype.propertyIsEnumerable;var ki=(e,t)=>(t=Symbol[e])?t:Symbol.for("Symbol."+e);var Ta=(e,t,n)=>t in e?or(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,A=(e,t)=>{for(var n in t||(t={}))Ea.call(t,n)&&Ta(e,n,t[n]);if(wa)for(var n of wa(t))Pu.call(t,n)&&Ta(e,n,t[n]);return e},j=(e,t)=>ku(e,Tu(t));var Pa=(e,t)=>{for(var n in t)or(e,n,{get:t[n],enumerable:!0})},Cu=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of Eu(t))!Ea.call(e,i)&&i!==n&&or(e,i,{get:()=>t[i],enumerable:!(r=wu(t,i))||r.enumerable});return e};var qu=e=>Cu(or({},"__esModule",{value:!0}),e);var y=(e,t,n)=>new Promise((r,i)=>{var o=l=>{try{a(n.next(l))}catch(c){i(c)}},s=l=>{try{a(n.throw(l))}catch(c){i(c)}},a=l=>l.done?r(l.value):Promise.resolve(l.value).then(o,s);a((n=n.apply(e,t)).next())}),Ru=function(e,t){this[0]=e,this[1]=t};var sr=e=>{var t=e[ki("asyncIterator")],n=!1,r,i={};return t==null?(t=e[ki("iterator")](),r=o=>i[o]=s=>t[o](s)):(t=t.call(e),r=o=>i[o]=s=>{if(n){if(n=!1,o==="throw")throw s;return s}return n=!0,{done:!1,value:new Ru(new Promise(a=>{var l=t[o](s);if(!(l instanceof Object))throw TypeError("Object expected");a(l)}),1)}}),i[ki("iterator")]=()=>i,r("next"),"throw"in t?r("throw"):i.throw=o=>{throw o},"return"in t&&r("return"),i};var ig={};Pa(ig,{default:()=>vi});module.exports=qu(ig);var Jn=require("@codemirror/state"),he=require("obsidian");var de=require("obsidian");var ar=class e{constructor({mode:t,automatic:n,regex:r,onWordBoundary:i,visual:o,undoKey:s}){this.mode=t,this.automatic=n,this.regex=r,this.onWordBoundary=i,this.visual=o,this.undoKey=s}static fromSource(t,n){let r=Lt.fromSource(t,n),i=!1,o=!1,s=!1,a=!1,l=!0;for(let c of t)switch(c){case"A":i=!0;break;case"r":o=!0;break;case"w":s=!0;break;case"v":a=!0;break;case"U":l=!1;break}return new e({mode:r,automatic:i,regex:o,onWordBoundary:s,visual:a,undoKey:l})}snippetShouldRunInMode(t,n=!1){return t.snippetlessEnv&&!n?!1:!!((this.mode.inlineMath&&t.inlineMath||this.mode.blockMath&&t.blockMath||(this.mode.inlineMath||this.mode.blockMath)&&t.codeMath)&&t.textEnv===this.mode.textEnv||this.mode.text&&t.text||this.mode.codeBlock===t.codeBlock&&t.codeBlock!==!1||this.mode.codeBlock===!0&&t.codeBlock!==!1||this.mode.code&&t.code)}copy(){return new e(j(A({},this),{mode:this.mode.copy()}))}},Lt=class e{constructor({text:t,inlineMath:n,blockMath:r,codeMath:i,codeBlock:o,code:s,textEnv:a,snippetlessEnv:l}){this.text=t,this.inlineMath=n,this.blockMath=r,this.codeMath=i,this.codeBlock=o,this.code=s,this.textEnv=a,this.snippetlessEnv=l}inEquation(){return this.inlineMath||this.blockMath}inMath(){return this.inlineMath||this.blockMath||this.codeMath}inDisplayMath(){return this.blockMath||this.codeMath}strictlyInMath(){return this.inMath()&&!this.textEnv}invert(){this.text=!this.text,this.blockMath=!this.blockMath,this.inlineMath=!this.inlineMath,this.codeMath=!this.codeMath,this.codeBlock=this.codeBlock===!1,this.code=!this.code,this.textEnv=!this.textEnv,this.snippetlessEnv=!this.snippetlessEnv}static fromSource(t,n){let r=!1,i=!1,o=!1,s=!1,a=!1,l=!1,c=!1,p=!1;for(let O of t)switch(O){case"m":r=!0,i=!0;break;case"n":i=!0;break;case"M":r=!0;break;case"t":o=!0;break;case"T":c=!0;break;case"c":a=!0;break;case"C":l=!0;break}n!==void 0&&(a=n),c&&!(r||i)&&(r=!0,i=!0);let u=new e({text:o,inlineMath:i,blockMath:r,codeMath:s,codeBlock:a,code:l,textEnv:c,snippetlessEnv:p});return u.text||u.inlineMath||u.blockMath||u.codeMath||u.codeBlock!==!1||u.textEnv||u.code||u.invert(),u}copy(){return new e(A({},this))}};var Fe={captures:{match:[],groups:{}}},ve=class{constructor(t,n=[]){this.insert=t;this.tabstops=n}applyInsert(t=Fe){if(typeof this.insert=="string")return{insert:this.insert,tabstops:this.tabstops};let n=this.insert(t);if(typeof n=="string")return{insert:n,tabstops:this.tabstops};let r=0,i=n.map(a=>a.applyInsert(t)).map(({insert:a,tabstops:l})=>{let c=r;return r+=a.length,{insert:a,tabstops:[...l.map(p=>j(A({},p),{from:p.from+c,to:p.to+c})),...this.tabstops.map(p=>j(A({},p),{from:p.from+c,to:p.to+c}))]}}),o=i.map(a=>a.insert).join(""),s=i.flatMap(a=>a.tabstops);return{insert:o,tabstops:s}}},le=class extends ve{constructor(t){super(t)}},qe=class extends ve{constructor(t,n=""){super(n,[{index:[t],from:0,to:n.length}])}},lr=class extends ve{constructor(t,n=""){typeof t=="number"?super(({captures:r})=>{var i;return(i=r.match[t])!=null?i:n}):typeof t=="string"&&super(({captures:r})=>{var i;return(i=r.groups[t])!=null?i:n})}};function wi(e,t){t.sort((i,o)=>i.start-o.start);let n=0,r=[];for(let{start:i,end:o,replacement:s}of t)r.push(e.slice(n,i),s),n=o;return r.join("")+e.slice(n)}var je=class extends ve{constructor(n){super(r=>this.parseSnippet(r.captures));this.snippet=n}parseSnippet(n){let r=this.expandCaptures(n);return this.expandTabstops(r)}expandCaptures(n){var s;let r=/\[\[(\d+)\]\]/g,i=this.snippet.matchAll(r),o=[];for(let a of i){let l=parseInt(a[1],10);if(l>=n.match.length)continue;let c=a.index,p=c+a[0].length,u=(s=n.match[l])!=null?s:"";o.push({start:c,end:p,replacement:u})}return wi(this.snippet,o)}expandTabstops(n){let r=/\$(\d)|\$\{(\d+):([^}]*)\}/g,i=n.matchAll(r),o=[];for(let l of i){let c=parseInt(l[1]||l[2],10),p=l.index,u=p+l[0].length,O=l[3]||"";o.push({start:p,end:u,replacement:O,index:c})}let s=[],a=0;for(let{start:l,end:c,replacement:p,index:u}of o)s.push(new le(n.slice(a,l))),s.push(new qe(u,p)),a=c;return s.push(new le(n.slice(a))),s}},cr=class extends ve{constructor(n){super(r=>new je(this.expandVisual(r.captures)).parseSnippet({match:[],groups:{}}));this.snippet=n}expandVisual(n){let r=dn;if(!n.groups[r])throw new Error(`VisualSnippetNode requires the presence of a capture group named ${r} to indicate the position of the visual selection`);return this.snippet.replaceAll(r,n.groups[r])}},Dt=class extends ve{constructor(t){super(()=>new je(t).parseSnippet({match:[],groups:{}}))}},U=class{constructor(t){this.children=t}applyInsert(t=Fe){return new ve(()=>this.children).applyInsert(t)}};var Ze,Xu={lang:void 0,message:void 0,abortEarly:void 0,abortPipeEarly:void 0};function Ci(e){var t,n,r;return!e&&!Ze?Xu:{lang:(t=e==null?void 0:e.lang)!=null?t:Ze==null?void 0:Ze.lang,message:e==null?void 0:e.message,abortEarly:(n=e==null?void 0:e.abortEarly)!=null?n:Ze==null?void 0:Ze.abortEarly,abortPipeEarly:(r=e==null?void 0:e.abortPipeEarly)!=null?r:Ze==null?void 0:Ze.abortPipeEarly}}var Ti;function _u(e){return Ti==null?void 0:Ti.get(e)}var Ei;function Au(e){return Ei==null?void 0:Ei.get(e)}var Pi;function Wu(e,t){var n;return(n=Pi==null?void 0:Pi.get(e))==null?void 0:n.get(t)}function Ra(e){var n,r,i;let t=typeof e;return t==="string"?`"${e}"`:t==="number"||t==="bigint"||t==="boolean"?`${e}`:t==="object"||t==="function"?(i=e&&((r=(n=Object.getPrototypeOf(e))==null?void 0:n.constructor)==null?void 0:r.name))!=null?i:"null":t}function xe(e,t,n,r,i){var u,O,d,f,m,g,b,v;let o=i&&"input"in i?i.input:n.value,s=(O=(u=i==null?void 0:i.expected)!=null?u:e.expects)!=null?O:null,a=(d=i==null?void 0:i.received)!=null?d:Ra(o),l={kind:e.kind,type:e.type,input:o,expected:s,received:a,message:`Invalid ${t}: ${s?`Expected ${s} but r`:"R"}eceived ${a}`,requirement:e.requirement,path:i==null?void 0:i.path,issues:i==null?void 0:i.issues,lang:r.lang,abortEarly:r.abortEarly,abortPipeEarly:r.abortPipeEarly},c=e.kind==="schema",p=(v=(b=(g=(m=(f=i==null?void 0:i.message)!=null?f:e.message)!=null?m:Wu(e.reference,l.lang))!=null?g:c?Au(l.lang):null)!=null?b:r.message)!=null?v:_u(l.lang);p!==void 0&&(l.message=typeof p=="function"?p(l):p),c&&(n.typed=!1),n.issues?n.issues.push(l):n.issues=[l]}var Ca=new WeakMap;function Se(e){let t=Ca.get(e);return t||(t={version:1,vendor:"valibot",validate(n){return e["~run"]({value:n},Ci())}},Ca.set(e,t)),t}function Mu(e,t){return Object.prototype.hasOwnProperty.call(e,t)&&t!=="__proto__"&&t!=="prototype"&&t!=="constructor"}function ju(e,t){var r;let n=[...new Set(e)];return n.length>1?`(${n.join(` ${t} `)})`:(r=n[0])!=null?r:"never"}var Zu=class extends Error{constructor(e){super(e[0].message),this.name="ValiError",this.issues=e}};var ug=new RegExp("^(?:[\\u{1F1E6}-\\u{1F1FF}]{2}|\\u{1F3F4}[\\u{E0061}-\\u{E007A}]{2}[\\u{E0030}-\\u{E0039}\\u{E0061}-\\u{E007A}]{1,3}\\u{E007F}|(?:\\p{Emoji}\\uFE0F\\u20E3?|\\p{Emoji_Modifier_Base}\\p{Emoji_Modifier}?|(?![\\p{Emoji_Modifier_Base}\\u{1F1E6}-\\u{1F1FF}])\\p{Emoji_Presentation})(?:\\u200D(?:\\p{Emoji}\\uFE0F\\u20E3?|\\p{Emoji_Modifier_Base}\\p{Emoji_Modifier}?|(?![\\p{Emoji_Modifier_Base}\\u{1F1E6}-\\u{1F1FF}])\\p{Emoji_Presentation}))*)+$","u");function mn(e){return{kind:"transformation",type:"map_items",reference:mn,async:!1,operation:e,"~run"(t){return t.value=t.value.map(this.operation),t}}}function qi(e,t){return{kind:"transformation",type:"parse_json",reference:qi,config:e,message:t,async:!1,"~run"(n,r){var i;try{n.value=JSON.parse(n.value,(i=this.config)==null?void 0:i.reviver)}catch(o){if(o instanceof Error)xe(this,"JSON",n,r,{received:`"${o.message}"`}),n.typed=!1;else throw o}return n}}}function Ri(e){return{kind:"transformation",type:"transform",reference:Ri,async:!1,operation:e,"~run"(t){return t.value=this.operation(t.value),t}}}function Lu(e,t,n){return typeof e.fallback=="function"?e.fallback(t,n):e.fallback}function Xa(e,t,n){return typeof e.default=="function"?e.default(t,n):e.default}function Xi(){return{kind:"schema",type:"any",reference:Xi,expects:"any",async:!1,get"~standard"(){return Se(this)},"~run"(e){return e.typed=!0,e}}}function Re(e,t){return{kind:"schema",type:"array",reference:Re,expects:"Array",async:!1,item:e,message:t,get"~standard"(){return Se(this)},"~run"(n,r){var o;let i=n.value;if(Array.isArray(i)){n.typed=!0,n.value=[];for(let s=0;s<i.length;s++){let a=i[s],l=this.item["~run"]({value:a},r);if(l.issues){let c={type:"array",origin:"value",input:i,key:s,value:a};for(let p of l.issues)p.path?p.path.unshift(c):p.path=[c],(o=n.issues)==null||o.push(p);if(n.issues||(n.issues=l.issues),r.abortEarly){n.typed=!1;break}}l.typed||(n.typed=!1),n.value.push(l.value)}}else xe(this,"type",n,r);return n}}}function _i(e,t){return{kind:"schema",type:"custom",reference:_i,expects:"unknown",async:!1,check:e,message:t,get"~standard"(){return Se(this)},"~run"(n,r){return this.check(n.value)?n.typed=!0:xe(this,"type",n,r),n}}}function bt(e,t){return{kind:"schema",type:"instance",reference:bt,expects:e.name,async:!1,class:e,message:t,get"~standard"(){return Se(this)},"~run"(n,r){return n.value instanceof this.class?n.typed=!0:xe(this,"type",n,r),n}}}function Ai(e,t){return{kind:"schema",type:"literal",reference:Ai,expects:Ra(e),async:!1,literal:e,message:t,get"~standard"(){return Se(this)},"~run"(n,r){return n.value===this.literal?n.typed=!0:xe(this,"type",n,r),n}}}function Wi(e,t){return{kind:"schema",type:"loose_tuple",reference:Wi,expects:"Array",async:!1,items:e,message:t,get"~standard"(){return Se(this)},"~run"(n,r){var o;let i=n.value;if(Array.isArray(i)){n.typed=!0,n.value=[];for(let s=0;s<this.items.length;s++){let a=i[s],l=this.items[s]["~run"]({value:a},r);if(l.issues){let c={type:"array",origin:"value",input:i,key:s,value:a};for(let p of l.issues)p.path?p.path.unshift(c):p.path=[c],(o=n.issues)==null||o.push(p);if(n.issues||(n.issues=l.issues),r.abortEarly){n.typed=!1;break}}l.typed||(n.typed=!1),n.value.push(l.value)}if(!n.issues||!r.abortEarly)for(let s=this.items.length;s<i.length;s++)n.value.push(i[s])}else xe(this,"type",n,r);return n}}}function fn(e){return{kind:"schema",type:"number",reference:fn,expects:"number",async:!1,message:e,get"~standard"(){return Se(this)},"~run"(t,n){return typeof t.value=="number"&&!isNaN(t.value)?t.typed=!0:xe(this,"type",t,n),t}}}function hn(e,t){return{kind:"schema",type:"object",reference:hn,expects:"Object",async:!1,entries:e,message:t,get"~standard"(){return Se(this)},"~run"(n,r){var o;let i=n.value;if(i&&typeof i=="object"){n.typed=!0,n.value={};for(let s in this.entries){let a=this.entries[s];if(s in i||(a.type==="exact_optional"||a.type==="optional"||a.type==="nullish")&&a.default!==void 0){let l=s in i?i[s]:Xa(a),c=a["~run"]({value:l},r);if(c.issues){let p={type:"object",origin:"value",input:i,key:s,value:l};for(let u of c.issues)u.path?u.path.unshift(p):u.path=[p],(o=n.issues)==null||o.push(u);if(n.issues||(n.issues=c.issues),r.abortEarly){n.typed=!1;break}}c.typed||(n.typed=!1),n.value[s]=c.value}else if(a.fallback!==void 0)n.value[s]=Lu(a);else if(a.type!=="exact_optional"&&a.type!=="optional"&&a.type!=="nullish"&&(xe(this,"key",n,r,{input:void 0,expected:`"${s}"`,path:[{type:"object",origin:"key",input:i,key:s,value:i[s]}]}),r.abortEarly))break}}else xe(this,"type",n,r);return n}}}function Qe(e,t){return{kind:"schema",type:"optional",reference:Qe,expects:`(${e.expects} | undefined)`,async:!1,wrapped:e,default:t,get"~standard"(){return Se(this)},"~run"(n,r){return n.value===void 0&&(this.default!==void 0&&(n.value=Xa(this,n,r)),n.value===void 0)?(n.typed=!0,n):this.wrapped["~run"](n,r)}}}function Mi(e,t,n){return{kind:"schema",type:"record",reference:Mi,expects:"Object",async:!1,key:e,value:t,message:n,get"~standard"(){return Se(this)},"~run"(r,i){var s,a;let o=r.value;if(o&&typeof o=="object"){r.typed=!0,r.value={};for(let l in o)if(Mu(o,l)){let c=o[l],p=this.key["~run"]({value:l},i);if(p.issues){let O={type:"object",origin:"key",input:o,key:l,value:c};for(let d of p.issues)d.path=[O],(s=r.issues)==null||s.push(d);if(r.issues||(r.issues=p.issues),i.abortEarly){r.typed=!1;break}}let u=this.value["~run"]({value:c},i);if(u.issues){let O={type:"object",origin:"value",input:o,key:l,value:c};for(let d of u.issues)d.path?d.path.unshift(O):d.path=[O],(a=r.issues)==null||a.push(d);if(r.issues||(r.issues=u.issues),i.abortEarly){r.typed=!1;break}}(!p.typed||!u.typed)&&(r.typed=!1),p.typed&&(r.value[p.value]=u.value)}}else xe(this,"type",r,i);return r}}}function H(e){return{kind:"schema",type:"string",reference:H,expects:"string",async:!1,message:e,get"~standard"(){return Se(this)},"~run"(t,n){return typeof t.value=="string"?t.typed=!0:xe(this,"type",t,n),t}}}function qa(e){let t;if(e)for(let n of e)if(t)for(let r of n.issues)t.push(r);else t=n.issues;return t}function Ye(e,t){return{kind:"schema",type:"union",reference:Ye,expects:ju(e.map(n=>n.expects),"|"),async:!1,options:e,message:t,get"~standard"(){return Se(this)},"~run"(n,r){let i,o,s;for(let a of this.options){let l=a["~run"]({value:n.value},r);if(l.typed)if(l.issues)o?o.push(l):o=[l];else{i=l;break}else s?s.push(l):s=[l]}if(i)return i;if(o){if(o.length===1)return o[0];xe(this,"type",n,r,{issues:qa(o)}),n.typed=!0}else{if((s==null?void 0:s.length)===1)return s[0];xe(this,"type",n,r,{issues:qa(s)})}return n}}}function rt(e,t,n){let r=e["~run"]({value:t},Ci(n));if(r.issues)throw new Zu(r.issues);return r.value}function Vt(...e){return j(A({},e[0]),{pipe:e,get"~standard"(){return Se(this)},"~run"(t,n){for(let r of e)if(r.kind!=="metadata"){if(t.issues&&(r.kind==="schema"||r.kind==="transformation")){t.typed=!1;break}(!t.issues||!n.abortEarly&&!n.abortPipeEarly)&&(t=r["~run"](t,n))}return t}})}function _a(e,t,n){let r=e["~run"]({value:t},Ci(n));return{typed:r.typed,success:!r.issues,output:r.value,issues:r.issues}}var Ty=require("@codemirror/state"),rc=require("@codemirror/view");var Aa=require("obsidian"),Wa=require("@codemirror/view"),mg=require("@lezer/common"),gg=require("@codemirror/state");function yn(e,t,n,r){e.dispatch({changes:{from:t,to:n,insert:r}})}function Ma(e,t){return(e instanceof Wa.EditorView?e.state:e).doc.sliceString(t,t+1)}function Le(e,t){e.dispatch({selection:{anchor:t,head:t}}),It(e)}function ja(e,t,n){e.dispatch({selection:{anchor:t,head:n}}),It(e)}function It(e){if(Aa.Platform.isMobile)return;let t=e.dom.getElementsByClassName("cm-cursorLayer")[0];if(t){let n=t.style.animationName;t.style.animationName=n==="cm-blink"?"cm-blink2":"cm-blink"}}function ji(e){return e.split("").reverse().join("")}function Gt(e,t,n,r,i,o){if(i){let l=Gt(ji(e),e.length-(t+r.length),ji(r),ji(n),!1);return l===null?null:e.length-(l+n.length)}let s=0,a=o||e.length;for(let l=t;l<a;l++)if(e.startsWith(n,l))s++;else if(e.startsWith(r,l)&&(s--,s===0))return l;return null}function Za(e){return{")":"(","]":"[","}":"{"}[e]}function La(e){return{"(":")","[":"]","{":"}"}[e]}function Zi(e,t){return e.composing||t.keyCode===229}function Da(e){let t=e.scrollDOM.parentElement;if(!t)return;let n=e.scrollDOM.nextSibling,r=window.getSelection(),i=r&&{anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset};e.scrollDOM.remove(),t.insertBefore(e.scrollDOM,n);try{i&&r&&(r.setPosition(i.anchorNode,i.anchorOffset),i.focusNode&&r.extend(i.focusNode,i.focusOffset))}catch(o){console.error(o)}e.focus(),e.contentDOM.dispatchEvent(new CustomEvent("compositionend"))}function vt(e,t){let n=e.state.doc,r=n.lineAt(t.outer_start),i=n.lineAt(t.outer_end);return r.number!==i.number}function*Va(e,t,n){let r=e.cursor();r.moveTo(t,n);let i=r.node;for(;i;)yield i,i=i.parent}function Ia(e){let t=[],n=0;for(let r of e)n+=r,t.push(n);return t}var Ua=require("@codemirror/view"),za=require("@codemirror/state");var Ga=`export default [
// Math mode
// \${}$0{}$ or \${} $0 {}$ is recommended over $$0$ as this avoids the flickering when typing spaces
// and also avoids a lag issues when on an empty line and everything below is suddenly display math for a short second.
{trigger: "mk", replacement: "\${}$0{}$", options: "tA"},
{trigger: "mk", replacement: "\\\\($0\\\\)", options: "TA"},
// display math behaves like codeblocks, as in no text is allowed on the same line of the opening $$ thus a newline is added.
{trigger: "dm", replacement: "\\n$$\\n$0\\n$$", options: "tAw", description: "Display Math on empty line"},
// the other dm snippets are more advanced thus they are sectioned below in Misc
{trigger: /([^\\\\\\w])beg/, replacement: "[[0]]\\\\begin{$0}\\n$1\\n\\\\end{$0}", options: "MA"},
{trigger: /([^\\\\\\w])beg/, replacement: "[[0]]\\\\begin{$0} $1 \\\\end{$0}", options: "nA"},
// Dashes
// {trigger: "--", replacement: "\u2013", options: "tA"},
// {trigger: "\u2013-", replacement: "\u2014", options: "tA"},
// {trigger: "\u2014-", replacement: "---", options: "tA"},
// Greek letters
{trigger: "@a", replacement: "\\\\alpha", options: "mA"},
{trigger: "@b", replacement: "\\\\beta", options: "mA"},
{trigger: "@g", replacement: "\\\\gamma", options: "mA"},
{trigger: "@G", replacement: "\\\\Gamma", options: "mA"},
{trigger: "@d", replacement: "\\\\delta", options: "mA"},
{trigger: "@D", replacement: "\\\\Delta", options: "mA"},
{trigger: "@e", replacement: "\\\\epsilon", options: "mA"},
{trigger: ":e", replacement: "\\\\varepsilon", options: "mA"},
{trigger: "@z", replacement: "\\\\zeta", options: "mA"},
{trigger: "@t", replacement: "\\\\theta", options: "mA"},
{trigger: "@T", replacement: "\\\\Theta", options: "mA"},
{trigger: ":t", replacement: "\\\\vartheta", options: "mA"},
{trigger: "@i", replacement: "\\\\iota", options: "mA"},
{trigger: "@k", replacement: "\\\\kappa", options: "mA"},
{trigger: "@l", replacement: "\\\\lambda", options: "mA"},
{trigger: "@L", replacement: "\\\\Lambda", options: "mA"},
{trigger: "@s", replacement: "\\\\sigma", options: "mA"},
{trigger: "@S", replacement: "\\\\Sigma", options: "mA"},
{trigger: "@u", replacement: "\\\\upsilon", options: "mA"},
{trigger: "@U", replacement: "\\\\Upsilon", options: "mA"},
{trigger: "@o", replacement: "\\\\omega", options: "mA"},
{trigger: "@O", replacement: "\\\\Omega", options: "mA"},
{trigger: "ome", replacement: "\\\\omega", options: "mA"},
{trigger: "Ome", replacement: "\\\\Omega", options: "mA"},
// Text environment
{trigger: /\\n\\s*\\"/, replacement: "\\n\\\\text{$0 } $1", options: "mrA"}, // Text at the beginning of a line
{trigger: "text", replacement: "\\\\text{$0}$1", options: "mA", priority: -1},
{trigger: "\\"", replacement: "\\\\text{$0}$1", options: "mA", priority: -1},
// Basic operations
{trigger: "sr", replacement: "^{2}", options: "mA"},
{trigger: "cb", replacement: "^{3}", options: "mA"},
{trigger: "rd", replacement: "^{$0}$1", options: "mA", description: "Raise to (D)the power of"}, // the \`th\` in the phrase is spoken like a d so rd for short.
{trigger: "_", replacement: "_{$0}$1", options: "mA"},
{trigger: "sts", replacement: "_\\\\text{$0}", options: "mA"},
{trigger: "sq", replacement: "\\\\sqrt{ $0 }$1", options: "mA"},
{trigger: /(\\d)rt/, replacement: "\\\\sqrt[[[0]]]{ $0 }$1", options: "mA", description: "Nth RooT"},
{trigger: "//", replacement: "\\\\frac{$0}{$1}$2", options: "mA"},
{trigger: /\\bee/, replacement: "e^{ $0 }$1", options: "mA"},
{trigger: "invs", replacement: "^{-1}", options: "mA"},
{trigger: /([^\\\\])(exp|log|ln)/, replacement: "[[0]]\\\\[[1]]", options: "rmA"},
{trigger: "conj", replacement: "^{*}", options: "mA"},
{trigger: "Re", replacement: "\\\\mathrm{Re}", options: "mA"},
{trigger: "Im", replacement: "\\\\mathrm{Im}", options: "mA"},
{trigger: "bf", replacement: "\\\\mathbf{$0}", options: "mA"},
{trigger: "rm", replacement: "\\\\mathrm{$0}$1", options: "mA"},
// Linear algebra
{trigger: /([^\\\\])(det)/, replacement: "[[0]]\\\\[[1]]", options: "rmA"},
{trigger: "trace", replacement: "\\\\mathrm{Tr}", options: "mA"},
// More operations
{trigger: "([a-zA-Z])hat", replacement: "\\\\hat{[[0]]}", options: "rmA"},
{trigger: "([a-zA-Z])bar", replacement: "\\\\bar{[[0]]}", options: "rmA"},
{trigger: "([a-zA-Z])dot", replacement: "\\\\dot{[[0]]}", options: "rmA", priority: -1},
{trigger: "([a-zA-Z])ddot", replacement: "\\\\ddot{[[0]]}", options: "rmA", priority: 1},
{trigger: "([a-zA-Z])tilde", replacement: "\\\\tilde{[[0]]}", options: "rmA"},
{trigger: "([a-zA-Z])und", replacement: "\\\\underline{[[0]]}", options: "rmA"},
{trigger: "([a-zA-Z])vec", replacement: "\\\\vec{[[0]]}", options: "rmA"},
// \\\\overrightarrow might look better than \\\\vec
// {trigger: "([a-zA-Z])vec", replacement: "\\\\overrightarrow{[[0]]}", options: "rmA"},
{trigger: "([a-zA-Z]),\\\\.", replacement: "\\\\mathbf{[[0]]}", options: "rmA"},
{trigger: "([a-zA-Z])\\\\.,", replacement: "\\\\mathbf{[[0]]}", options: "rmA"},
{trigger: "\\\\\\\\(\${GREEK}),\\\\.", replacement: "\\\\boldsymbol{\\\\[[0]]}", options: "rmA"},
{trigger: "\\\\\\\\(\${GREEK})\\\\.,", replacement: "\\\\boldsymbol{\\\\[[0]]}", options: "rmA"},
{trigger: "hat", replacement: "\\\\hat{$0}$1", options: "mA"},
{trigger: "bar", replacement: "\\\\bar{$0}$1", options: "mA"},
{trigger: "dot", replacement: "\\\\dot{$0}$1", options: "mA", priority: -1},
{trigger: "ddot", replacement: "\\\\ddot{$0}$1", options: "mA"},
{trigger: "cdot", replacement: "\\\\cdot", options: "mA"},
{trigger: "tilde", replacement: "\\\\tilde{$0}$1", options: "mA"},
{trigger: "und", replacement: "\\\\underline{$0}$1", options: "mA"},
{trigger: "vec", replacement: "\\\\vec{$0}$1", options: "mA"},
// {trigger: "vec", replacement: "\\\\overrightarrow{$0}$1", options: "mA"},
{
trigger: "pmod",
replacement: "\\\\pmod{\${0:n}}$1",
options: "mA",
description: "Parenthesized modulo (\\\\pmod{n})",
},
// Auto letter subscript and add space after other macros
//
// - x3 -> x_{3}
// - \\alpha3 -> \\alpha_{3}
// - \\leq -> \\leq 1
{
trigger: /(\\\\?)([A-Za-z]+)(\\d)/,
replacement: (match) => {
const isMacro = match[1] === "\\\\";
const digit = match[3];
if (!isMacro) {
const variable = match[2];
return \`\${variable}_{\${digit}}\`;
}
const greek = require("latex-suite").snippetVariables["\${GREEK}"];
const greek_pattern = new RegExp("^(?:" + greek + ")$");
const macro_name = match[2];
if (greek_pattern.test(macro_name)) {
return \`\\\\\${macro_name}_{\${digit}}\`;
} else {
return \`\\\\\${macro_name} \${digit}\`;
}
},
options: "rmA",
priority: -1,
excludedMacros: ["pu", "ce"],
description: "Auto letter subscript for variables and greek letters, add space after other macros",
},
// x_{3}4 -> x_{34}, \\alpha_{3}4 -> \\alpha_{34}
{
trigger: "(\\\\\\\\\${GREEK}|[A-Za-z])_{(\\\\d+)}(\\\\d)",
replacement: "[[0]]_{[[1]][[2]]}",
options: "rmA",
priority: -1,
description: "Combine subscripts for variables and greek letters",
},
// \\dot{x}3 -> \\dot{x}_{3}, \\dot{\\alpha}3 -> \\dot{\\alpha}_{3}
// \\dot{x}_{3}4 -> \\dot{x}_{34}
{
trigger: "\\\\\\\\(\${ACCENT})\\\\{(\\\\\\\\\${GREEK}|[A-Za-z])\\\\}(?:_\\\\{(\\\\d+)\\\\})?(\\\\d)",
replacement: "\\\\[[0]]{[[1]]}_{[[2]][[3]]}",
options: "rmA",
priority: -1,
},
// \\dot{\\vec{a}}3 -> \\dot{\\vec{a}}_{3}
// \\dot{\\vec{a}}_{3}4 -> \\dot{\\vec{a}}_{34}
{
trigger: "\\\\\\\\(\${ACCENT})\\\\{\\\\\\\\(\${ACCENT})\\\\{(\\\\\\\\\${GREEK}|[A-Za-z])\\\\}\\\\}(?:_\\\\{(\\\\d+)\\\\})?(\\\\d)",
replacement: "\\\\[[0]]{\\\\[[1]]{[[2]]}}_{[[3]][[4]]}",
options: "rmA",
priority: -1,
},
{trigger: "xnn", replacement: "x_{n}", options: "mA"},
{trigger: "\\\\xii", replacement: "x_{i}", options: "mA", priority: 1},
{trigger: "xjj", replacement: "x_{j}", options: "mA"},
{trigger: "xp1", replacement: "x_{n+1}", options: "mA"},
{trigger: "ynn", replacement: "y_{n}", options: "mA"},
{trigger: "yii", replacement: "y_{i}", options: "mA"},
{trigger: "yjj", replacement: "y_{j}", options: "mA"},
// Symbols
{trigger: "ooo", replacement: "\\\\infty", options: "mA"},
{trigger: "sum", replacement: "\\\\sum", options: "mA"},
{trigger: "prod", replacement: "\\\\prod", options: "mA"},
{trigger: "\\\\sum", replacement: "\\\\sum_{\${0:i}=\${1:1}}^{\${2:N}} $3", options: "m"},
{trigger: "\\\\prod", replacement: "\\\\prod_{\${0:i}=\${1:1}}^{\${2:N}} $3", options: "m"},
{trigger: "lim", replacement: "\\\\lim_{ \${0:n} \\\\to \${1:\\\\infty} } $2", options: "mA"},
{trigger: "+-", replacement: "\\\\pm", options: "mA"},
{trigger: "-+", replacement: "\\\\mp", options: "mA"},
{trigger: "...", replacement: "\\\\dots", options: "mA"},
{trigger: "nabl", replacement: "\\\\nabla", options: "mA"},
// The operator nabla is also called del, but using "del" as a trigger conflicts with the greek letter delta.
// {trigger: "del", replacement: "\\\\nabla", options: "mA"},
{trigger: "xx", replacement: "\\\\times", options: "mA"},
{trigger: "**", replacement: "\\\\cdot", options: "mA"},
{trigger: "para", replacement: "\\\\parallel", options: "mA"},
{trigger: "deg", replacement: "\\\\degree", options: "mA"},
{trigger: "===", replacement: "\\\\equiv", options: "mA"},
{trigger: "!=", replacement: "\\\\neq", options: "mA"},
{trigger: ">=", replacement: "\\\\geq", options: "mA"},
{trigger: "<=", replacement: "\\\\leq", options: "mA"},
{trigger: ">>", replacement: "\\\\gg", options: "mA"},
{trigger: "<<", replacement: "\\\\ll", options: "mA"},
{trigger: "simm", replacement: "\\\\sim", options: "mA"},
{trigger: "sim=", replacement: "\\\\simeq", options: "mA"},
{trigger: "prop", replacement: "\\\\propto", options: "mA"},
{trigger: "<->", replacement: "\\\\leftrightarrow ", options: "mA"},
{trigger: "->", replacement: "\\\\to", options: "mA", excludedMacros: ["ce"]},
{trigger: "!>", replacement: "\\\\mapsto", options: "mA"},
{trigger: "=>", replacement: "\\\\implies", options: "mA"},
{trigger: "=<", replacement: "\\\\impliedby", options: "mA"},
{trigger: "and", replacement: "\\\\cap", options: "wmA"},
{trigger: "orr", replacement: "\\\\cup", options: "mA"},
{trigger: "inn", replacement: "\\\\in", options: "mA"},
{trigger: "notin", replacement: "\\\\not\\\\in", options: "mA"},
{trigger: "\\\\\\\\\\\\", replacement: "\\\\setminus", options: "mA"},
{trigger: "sub=", replacement: "\\\\subseteq", options: "mA"},
{trigger: "sup=", replacement: "\\\\supseteq", options: "mA"},
{trigger: "eset", replacement: "\\\\emptyset", options: "mA"},
{trigger: "set", replacement: "\\\\{ $0 \\\\}$1", options: "wmA"},
{trigger: /(n?)e\\\\xi sts/, replacement: "\\\\[[0]]exists", options: "mA", priority: 1},
{trigger: "LL", replacement: "\\\\mathcal{L}", options: "mA"},
{trigger: "HH", replacement: "\\\\mathcal{H}", options: "mA"},
{trigger: "CC", replacement: "\\\\mathbb{C}", options: "mA"},
{trigger: "RR", replacement: "\\\\mathbb{R}", options: "mA"},
{trigger: "ZZ", replacement: "\\\\mathbb{Z}", options: "mA"},
{trigger: "NN", replacement: "\\\\mathbb{N}", options: "mA"},
{trigger: "QQ", replacement: "\\\\mathbb{Q}", options: "mA"},
// Handle spaces and backslashes
// Snippet variables can be used as shortcuts when writing snippets.
// For example, \${GREEK} below is shorthand for "alpha|beta|gamma|Gamma|delta|..."
// You can edit snippet variables under the Advanced snippet section.
{trigger: "([^\\\\\\\\])(\${GREEK})", replacement: "[[0]]\\\\[[1]]", options: "rmA", description: "Add backslash before Greek letters"},
{trigger: "([^\\\\\\\\])(\${SYMBOL})", replacement: "[[0]]\\\\[[1]]", options: "rmA", description: "Add backslash before symbols"},
{trigger: "\\\\\\\\(\${GREEK}|\${SYMBOL}) sr", replacement: "\\\\[[0]]^{2}", options: "rmA"},
{trigger: "\\\\\\\\(\${GREEK}|\${SYMBOL}) cb", replacement: "\\\\[[0]]^{3}", options: "rmA"},
{trigger: "\\\\\\\\(\${GREEK}|\${SYMBOL}) rd", replacement: "\\\\[[0]]^{$0}$1", options: "rmA"},
{trigger: "\\\\\\\\(\${GREEK}) hat", replacement: "\\\\hat{\\\\[[0]]}", options: "rmA"},
{trigger: "\\\\\\\\(\${GREEK}) dot", replacement: "\\\\dot{\\\\[[0]]}", options: "rmA"},
{trigger: "\\\\\\\\(\${GREEK}) bar", replacement: "\\\\bar{\\\\[[0]]}", options: "rmA"},
{trigger: "\\\\\\\\(\${GREEK}) vec", replacement: "\\\\vec{\\\\[[0]]}", options: "rmA"},
// \\\\overrightarrow might look better than \\\\vec
// {trigger: "\\\\\\\\(\${GREEK}) vec", replacement: "\\\\overrightarrow{\\\\[[0]]}", options: "rmA"},
{trigger: "\\\\\\\\(\${GREEK}) tilde", replacement: "\\\\tilde{\\\\[[0]]}", options: "rmA"},
{trigger: "\\\\\\\\(\${GREEK}) und", replacement: "\\\\underline{\\\\[[0]]}", options: "rmA"},
// Derivatives and integrals
{trigger: "par", replacement: "\\\\frac{ \\\\partial \${0:y} }{ \\\\partial \${1:x} } $2", options: "m"},
{trigger: /par([0-9])/, replacement: "\\\\frac{ \\\\partial^{[[0]]} \${0:y} }{ \\\\partial \${1:x}^{[[0]]} } $2", options: "mA"},
{trigger: /parn/, replacement: "\\\\frac{ \\\\partial^{\${0:n}} \${1:y} }{ \\\\partial \${2:x}^{\${0:n}} } $2", options: "mA"},
{trigger: /pa([A-Za-z])([A-Za-z])/, replacement: "\\\\frac{ \\\\partial [[0]] }{ \\\\partial [[1]] } ", options: "rm"},
{trigger: "ddt", replacement: "\\\\frac{d}{dt} ", options: "mA"},
{trigger: /([^\\\\])int/, replacement: "[[0]]\\\\int", options: "mA", priority: -1},
{trigger: "\\\\int", replacement: "\\\\int $0 \\\\, d\${1:x} $2", options: "m"},
{trigger: "dint", replacement: "\\\\int_{\${0:0}}^{\${1:1}} $2 \\\\, d\${3:x} $4", options: "mA", description: "Definite integral"},
{trigger: "oint", replacement: "\\\\oint", options: "mA"},
{trigger: "iint", replacement: "\\\\iint", options: "mA"},
{trigger: "iiint", replacement: "\\\\iiint", options: "mA"},
{trigger: "oinf", replacement: "\\\\int_{0}^{\\\\infty} $0 \\\\, d\${1:x} $2", options: "mA"},
{trigger: "infi", replacement: "\\\\int_{-\\\\infty}^{\\\\infty} $0 \\\\, d\${1:x} $2", options: "mA"},
// Trigonometry
{trigger: /([^\\\\])(arcsin|sin|arccos|cos|arctan|tan|csc|sec|cot)/, replacement: "[[0]]\\\\[[1]]", options: "rmA", description: "Add backslash before trig funcs"},
{
trigger: /(arccsc|arcsec|arccot)/,
replacement: "\\\\operatorname{[[0]]}$0",
options: "mA",
description: "Inverse trig functions, Are not built-in MathJax functions",
priority: 1,
},
// Visual operations
{trigger: "U", replacement: "\\\\underbrace{ \${VISUAL} }_{ $0 }", options: "mv"},
{trigger: "O", replacement: "\\\\overbrace{ \${VISUAL} }^{ $0 }", options: "mv"},
{trigger: "B", replacement: "\\\\underset{ $0 }{ \${VISUAL} }", options: "mv"},
{trigger: "C", replacement: "\\\\cancel{ \${VISUAL} }", options: "mv"},
{trigger: "K", replacement: "\\\\cancelto{ $0 }{ \${VISUAL} }", options: "mv"},
{trigger: "S", replacement: "\\\\sqrt{ \${VISUAL} }", options: "mv"},
// Physics
{trigger: "kbt", replacement: "k_{B}T", options: "mA"},
{trigger: "msun", replacement: "M_{\\\\odot}", options: "mA"},
// Quantum mechanics
{trigger: "dag", replacement: "^{\\\\dagger}", options: "mA"},
{trigger: "o+", replacement: "\\\\oplus ", options: "mA"},
{trigger: "ox", replacement: "\\\\otimes ", options: "wmA"},
{trigger: "bra", replacement: "\\\\bra{$0} $1", options: "mA"},
{trigger: "ket", replacement: "\\\\ket{$0} $1", options: "mA"},
{trigger: "brk", replacement: "\\\\braket{ $0 | $1 } $2", options: "mA"},
{trigger: "outer", replacement: "\\\\ket{\${0:\\\\psi}} \\\\bra{\${0:\\\\psi}} $1", options: "mA"},
// Chemistry
{trigger: "pu", replacement: "\\\\pu{ $0 }", options: "mA"},
{trigger: "cee", replacement: "\\\\ce{ $0 }", options: "mA"},
{trigger: "he4", replacement: "{}^{4}_{2}He ", options: "mA"},
{trigger: "he3", replacement: "{}^{3}_{2}He ", options: "mA"},
{trigger: "iso", replacement: "{}^{\${0:4}}_{\${1:2}}\${2:He}", options: "mA"},
// Environments
// Here the regex syntax [pbBvV]mat is used to match pmat, bmat, Bmat, vmat, Vmat
{
trigger: /([pbBvV]mat)/,
replacement: "\\\\begin{[[0]]rix}\\n$0\\n\\\\end{[[0]]rix}",
options: "rMA",
description: "Matrix environments with new lines",
},
{
trigger: /(matrix|cases|align|array)/,
replacement: "\\\\begin{[[0]]}\\n$0\\n\\\\end{[[0]]}",
options: "rMA",
description: "Miscellaneous environments with new lines",
},
{
trigger: /([pbBvV]mat)/,
replacement: "\\\\begin{[[0]]rix}$0\\\\end{[[0]]rix}",
options: "rnA",
},
{
trigger: /(matrix|cases|align|array)/,
replacement: "\\\\begin{[[0]]}$0\\\\end{[[0]]}",
options: "rnA",
},
// Brackets
{trigger: "avg", replacement: "\\\\langle $0 \\\\rangle $1", options: "mA"},
{trigger: "norm", replacement: "\\\\lvert $0 \\\\rvert $1", options: "mA", priority: 1},
{trigger: "Norm", replacement: "\\\\lVert $0 \\\\rVert $1", options: "mA", priority: 1},
{trigger: "ceil", replacement: "\\\\lceil $0 \\\\rceil $1", options: "mA"},
{trigger: "floor", replacement: "\\\\lfloor $0 \\\\rfloor $1", options: "mA"},
// For the modulo operator, see the section "More operations" above
{trigger: "mod", replacement: "|$0|$1", options: "mA"},
{trigger: "(", replacement: "(\${VISUAL})", options: "mv"},
{trigger: "[", replacement: "[\${VISUAL}]", options: "mv"},
{trigger: "{", replacement: "{\${VISUAL}}", options: "mv"},
{trigger: "(", replacement: "($0)$1", options: "mA"},
{trigger: "{", replacement: "{$0}$1", options: "mA"},
{trigger: "[", replacement: "[$0]$1", options: "mA"},
{trigger: "lr(", replacement: "\\\\left( $0 \\\\right) $1", options: "mA"},
{trigger: "lr{", replacement: "\\\\left\\\\{ $0 \\\\right\\\\} $1", options: "mA"},
{trigger: "lr[", replacement: "\\\\left[ $0 \\\\right] $1", options: "mA"},
{trigger: "lr|", replacement: "\\\\left| $0 \\\\right| $1", options: "mA"},
{trigger: "lra", replacement: "\\\\left< $0 \\\\right> $1", options: "mA"},
// Misc
// Automatically convert standalone letters in text to math (except a, A, I).
// (Un-comment to enable)
// {trigger: /([^'])\\b([B-HJ-Zb-z])\\b([\\n\\s.,?!:'])/, replacement: "[[0]]$[[1]]$[[2]]", options: "tA"},
// Automatically convert Greek letters in text to math.
// {trigger: "(\${GREEK})([\\\\n\\\\s.,?!:'])", replacement: "$\\\\[[0]]$[[1]]", options: "rtAw"},
// Automatically convert text of the form "x=2" and "x=n+1" to math.
// {trigger: /([A-Za-z]=\\d+)([\\n\\s.,?!:'])/, replacement: "$[[0]]$[[1]]", options: "rtAw"},
// {trigger: /([A-Za-z]=[A-Za-z][+-]\\d+)([\\n\\s.,?!:'])/, replacement: "$[[0]]$[[1]]", options: "tAw"},
// Disable automatic snippets while typing macros
// This is a catch all rule that may disable other snippets in some cases.
// Increase the priority of the snippets that shouldn't be disabled.
// {trigger: /(\\\\[A-Za-z]+)/, replacement: "[[0]]$0", options: "mAU", priority: 100, description: "Disable snippets while typing macros"},
// Disable snippets while typing macros, doesn't insert an undo stop because of the option "U", thus its treated normal typing.
// like \\top -> \\top but \\tox -> \\to x as \\tox is not a macro but \\top is.
// In order to add your custom macros to the list, you can do require("latex-suite").ALL_MACROS.push("\\\\my_macro") at the top or bottom of this file.
// outside this function and array.
{
trigger: /\\\\[A-Za-z]{2,}/,
replacement: function (match) {
/** @type {string} */
const string = match[0];
const trigger = string.slice(1);
const names = require("latex-suite").ALL_MACROS;
if (names.some(name => name.startsWith(string))) {
return string;
}
return false;
},
options: "mAU",
priority: 3,
description: "Disable snippets while typing macros",
},
// Add space after macros if not part of another macro
{
trigger: /\\\\[A-Za-z]{2,}/,
replacement: function (match) {
/** @type {string} */
const string = match[0];
const trigger = string.slice(1);
const names = require("latex-suite").ALL_MACROS;
if (!names.some(name => name.startsWith(string))) {
const macro = trigger.slice(0, -1);
const letter = trigger.slice(-1);
return "\\\\" + macro + " " + letter;
}
return false;
},
options: "mA",
priority: 3,
description: "Insert space after macros if not part of another macro",
},
// Snippet replacements can have placeholders.
{trigger: "tayl", replacement: "\${0:f}(\${1:x} + \${2:h}) = \${0:f}(\${1:x}) + \${0:f}'(\${1:x})\${2:h} + \${0:f}''(\${1:x}) \\\\frac{\${2:h}^{2}}{2!} + \\\\dots$3", options: "mA", description: "Taylor expansion"},
// Snippet replacements can also be JavaScript functions.
// See the documentation for more information.
{trigger: /iden(\\d)/, replacement: (match) => {
const n = match[1];
let arr = [];
for (let j = 0; j < n; j++) {
arr[j] = [];
for (let i = 0; i < n; i++) {
arr[j][i] = (i === j) ? 1 : 0;
}
}
let output = arr.map(el => el.join(" & ")).join(" \\\\\\\\\\n");
output = \`\\\\begin{pmatrix}\\n\${output}\\n\\\\end{pmatrix}\`;
return output;
}, options: "mA", description: "N x N identity matrix"},
// start with the correct indentation of 3 spaces when typing at the start of a list.
{
trigger: /(?<positive_lookbehind>(?:\\n|^)[ \\t]*>*)(?<marker>\\d+[.)]|[-*+])(?<whitespace>[ \\t]+)(?<text>.*)dm/,
replacement: (m) => {
const { positive_lookbehind, whitespace, text, marker } = m.groups;
const firstLine = marker + whitespace + text;
const indent = " ".repeat(marker.length) + whitespace;
return \`\${positive_lookbehind}\${firstLine}\\n\${indent}$$\\n\${indent}$0\\n\${indent}$$\`;
},
options: "rtA",
priority: 2,
description: "Display math when in a list"
},
{
// positive lookbehind is not available on ios <16.4 and inline flags like (?m:$) are not since ios <26, using this as a workaround.
// otherwise the regex would be /(?<=\\n|^)([ \\t]*(?:> ?)*[ \\t])*dm/
// or /(?m:^)([ \\t]*(?:> ?)*[ \\t])*dm/
trigger: new (class extends RegExp {
exec(source) {
const result = super.exec(source);
if (result === null) return result;
result
return /([ \\t]*(?:> ?)*[ \\t]*)dm$/.exec(source);
}
})(/(\\n|^)[ \\t]*(?:> ?)*[ \\t]*dm/.source),
replacement: "[[0]]$$\\n$0\\n$$",
options: "tAw",
description: "Display Math on empty line",
priority: 2,
},
]
`;var bn=Ga;var Ha=`export default {
"\${GREEK}": "(?:alpha|beta|gamma|Gamma|delta|Delta|epsilon|varepsilon|zeta|eta|theta|vartheta|Theta|iota|kappa|lambda|Lambda|mu|nu|xi|omicron|pi|rho|varrho|sigma|Sigma|tau|upsilon|Upsilon|phi|varphi|Phi|chi|psi|omega|Omega)",
"\${SYMBOL}": "(?:parallel|perp|partial|nabla|hbar|ell|infty|oplus|ominus|otimes|oslash|square|star|dagger|vee|wedge|subseteq|subset|supseteq|supset|emptyset|exists|nexists|forall|implies|impliedby|iff|setminus|neg|lor|land|bigcup|bigcap|cdot|times|simeq|approx)",
"\${MORE_SYMBOLS}": "(?:leq|geq|neq|gg|ll|equiv|sim|propto|rightarrow|leftarrow|Rightarrow|Leftarrow|leftrightarrow|to|top|mapsto|cap|cup|in|sum|prod|exp|ln|log|det|dots|vdots|ddots|pm|mp|int|iint|iiint|oint)",
"\${ACCENT}": "(?:dot|ddot|hat|bar|tilde|vec|underline|overline|mathbf|mathcal|mathrm|mathbb)",
}
`;var Ba=Ha;var q={snippets:bn,snippetVariables:Ba,snippetsEnabled:!0,snippetsTrigger:"Tab",snippetNextTabstopTrigger:"Tab",snippetPreviousTabstopTrigger:"Shift-Tab",suppressSnippetTriggerOnIME:!0,suppressIMEWarning:!1,removeSnippetWhitespace:!0,autoDelete$:!0,loadSnippetsFromFile:!1,loadSnippetVariablesFromFile:!1,snippetsFileLocation:"",snippetVariablesFileLocation:"",concealEnabled:!1,concealRevealTimeout:0,colorPairedBracketsEnabled:!0,highlightCursorBracketsEnabled:!0,mathPreviewEnabled:!0,mathPreviewPositionIsAbove:!0,mathPreviewCursor:"\u25B6",mathPreviewBracketHighlighting:!1,mathPreviewLivePreviewDisplay:!1,autofractionEnabled:!0,autofractionSymbol:"\\frac",autofractionBreakingChars:"+-= ",matrixShortcutsEnabled:!0,taboutEnabled:!0,taboutExitEquationOnlyOnEOL:!0,taboutTrigger:"Tab",autoEnlargeBrackets:!0,autoEnlargeBracketsSpace:!0,wordDelimiters:"., +-\\n :;!?\\/{}[]()=~$'\"|`<>*^%#@&",autofractionExcludedEnvs:`[
["^{", "}"],
["\\\\pu{", "}"]
]`,matrixShortcutsEnvNames:"pmatrix, cases, align, gather, bmatrix, Bmatrix, vmatrix, Vmatrix, array, matrix",matrixShortcutsMacroNames:"eqalign",taboutClosingSymbols:"), ], \\rbrack, \\}, \\rbrace, \\rangle, \\rvert, \\rVert, \\rfloor, \\rceil, \\urcorner, }",autoEnlargeBracketsTriggers:"sum, int, frac, prod, bigcup, bigcap",forceMathLanguages:"math",snippetDebug:"off",vimEnabled:!1,vimSelectMode:"<C-g>",vimVisualMode:"<C-g>",vimMatrixEnter:"o",snippetRecursion:0,snippetIMEVersion:!1,highlightDollarEnabled:!0,excalidrawSupportEnabled:!0,logLevel:"off",autofractionTrigger:"/",matrixShortcutsCellTrigger:"Tab",matrixShortcutsNewlineTrigger:"Enter",matrixShortcutsExitTrigger:"Shift-Enter"},Li=Vt(H(),qi(),Re(Wi([H(),H()],"Every item needs to be an array with 2 items"),"Needs to be an array [item1,item2]"),mn(([e,t])=>({openSymbol:e,closeSymbol:t})));function vn(e,t){function n(o){return o.replace(/\s/g,"").split(",")}function r(o){let s=[];try{s=rt(Li,o)}catch(a){console.error(a)}return s}let i={automatic:e.filter(o=>o.options.automatic),all:e};return j(A({},t),{snippets:i,autofractionExcludedEnvs:r(t.autofractionExcludedEnvs),matrixShortcutsEnvNames:n(t.matrixShortcutsEnvNames),matrixShortcutsMacroNames:n(t.matrixShortcutsMacroNames),taboutClosingSymbols:new Set(n(t.taboutClosingSymbols)),autoEnlargeBracketsTriggers:n(t.autoEnlargeBracketsTriggers).map(o=>/[A-Za-z]+/.test(o)?`\\${o}`:o),forceMathLanguages:n(t.forceMathLanguages)})}function De(e,t){if(e==="off")return!1;let n=Na(e);return Na(t)<=n}function Na(e){switch(e){case"off":return 0;case"info":return 1;case"verbose":return 2;case"vverbose":return 3}}var Fa=za.Facet.define({combine:e=>{var n;return(n=e[0])!=null?n:vn([],q)}});function W(e){return(e instanceof Ua.EditorView?e.state:e).facet(Fa)}function Ya(e){return Fa.of(e)}var xs=require("@codemirror/language");var Iu=hn({name:H(),arguments:Qe(Re(fn()))}),Di=Vt(Qe(Re(Ye([H(),Iu])),[]),mn(e=>typeof e=="string"?{name:e,arguments:[0]}:e)),Gu=[{name:"text",arguments:[0]},{name:"textrm",arguments:[0]},{name:"textup",arguments:[0]},{name:"textit",arguments:[0]},{name:"textbf",arguments:[0]},{name:"textsf",arguments:[0]},{name:"texttt",arguments:[0]},{name:"textnormal",arguments:[0]},{name:"clap",arguments:[0]},{name:"textllap",arguments:[0]},{name:"textrlap",arguments:[0]},{name:"textclap",arguments:[0]},{name:"hbox",arguments:[0]},{name:"mbox",arguments:[0]},{name:"fbox",arguments:[0]},{name:"framebox",arguments:[0]},{name:"colorbox",arguments:[1]},{name:"fcolorbox",arguments:[2]}],Vi=[{name:"tag",arguments:[0]},{name:"begin",arguments:[0]},{name:"end",arguments:[0]},{name:"mmlToken",arguments:[0,1]},{name:"unicode",arguments:[0]},{name:"textcolor",arguments:[0]},{name:"color",arguments:[0]},{name:"colorbox",arguments:[0]},{name:"fcolorbox",arguments:[0,1]},{name:"operatorname",arguments:[0]},{name:"style",arguments:[0]}],Ka=[...Gu,...Vi],Hu=["label","ref","eqref","operatorname","operatorname*","DeclareMathOperator","DeclareMathOperator*","mathrm","mathup","mathnormal","mathbf","mathbfup","mathit","mathbfit","mathbb","Bbb","mathfrak","mathbffrak","mathscr","mathbfscr","mathsf","mathsfup","mathbfsf","mathbfsfup","mathsfit","mathbfsfit","mathtt","mathcal","mathbfcal","symrm","symup","symnormal","symbf","symbfup","symit","symbfit","symbb","symfrak","symbffrak","symscr","symbfscr","symsf","symsfup","symbfsf","symbfsfup","symsfit","symbfsfit","symtt","symcal","symbfcal","Bbb"],Ag=`[${Hu.map(e=>`
["${e}", "}"]`).join("")}
]`;var tc=require("@codemirror/view");var vy=require("@codemirror/state");var Nt=require("@codemirror/language"),xr=require("@codemirror/state"),Sr=require("@codemirror/view"),ay=require("@lezer/common");var Os=require("@lezer/common");var hl=require("@lezer/lr");var xt=require("@lezer/lr");var pr={aleph:"\u2135",amalg:"\u2A3F",And:"&",angle:"\u2220",approx:"\u2248",approxeq:"\u224A",ast:"\u2217",asymp:"\u224D",backepsilon:"\u220D",backprime:"\u2035",backsim:"\u223D",backsimeq:"\u22CD",backslash:"\u2216",barwedge:"\u22BC",Bbbk:"k",because:"\u2235",beth:"\u2136",between:"\u226C",bigcap:"\u22C2",bigcirc:"\u25EF",bigcup:"\u22C3",bigodot:"\u2A00",bigoplus:"\u2A01",bigotimes:"\u2A02",bigsqcup:"\u2A06",bigstar:"\u2605",bigtriangledown:"\u25BD",bigtriangleup:"\u25B3",biguplus:"\u2A04",bigvee:"\u22C1",bigwedge:"\u22C0",blacklozenge:"\u29EB",blacksquare:"\u25FC",blacktriangle:"\u25B4",blacktriangledown:"\u25BE",blacktriangleleft:"\u25C2",blacktriangleright:"\u25B8",bot:"\u22A5",bowtie:"\u22C8",Box:"\u25FB",boxdot:"\u22A1",boxminus:"\u229F",boxplus:"\u229E",boxtimes:"\u22A0",bullet:"\u2219",bumpeq:"\u224F",Bumpeq:"\u224E",Cap:"\u22D2",cap:"\u2229",cdot:"\u22C5",cdotp:"\u22C5",cdots:"\u22EF",celsius:"\u2103",centerdot:"\u22C5",checkmark:"\u2713",circ:"\u2218",circeq:"\u2257",circlearrowleft:"\u21BA",circlearrowright:"\u21BB",circledast:"\u229B",circledcirc:"\u229A",circleddash:"\u229D",circledR:"\xAE",circledS:"\u24C8",clubsuit:"\u2663",complement:"\u2201",cong:"\u2245",coprod:"\u2210",copyright:"\xA9",cp:"\xD7",cross:"\xD7",crossproduct:"\xD7",Cup:"\u22D3",cup:"\u222A",curlyeqprec:"\u22DE",curlyeqsucc:"\u22DF",curlyvee:"\u22CE",curlywedge:"\u22CF",curvearrowleft:"\u21B6",curvearrowright:"\u21B7",dagger:"\u2020",daleth:"\u2138",dashleftarrow:"\u21E0",dashrightarrow:"\u21E2",dashv:"\u22A3",ddagger:"\u2021",ddots:"\u22F1",degree:"\xB0",diagdown:"\u2572",diagup:"\u2571",Diamond:"\u25CA",diamond:"\u22C4",diamondsuit:"\u2662",digamma:"\u03DD",div:"\xF7",divideontimes:"\u22C7",divsymbol:"\xF7",Doteq:"\u2251",doteq:"\u2250",doteqdot:"\u2251",dotplus:"\u2214",dotproduct:"\u22C5",dots:"\u2026",dotsb:"\u22EF",dotsc:"\u2026",dotsi:"\u22EF",dotsm:"\u22EF",dotso:"\u2026",doublebarwedge:"\u2A5E",doublecap:"\u22D2",doublecup:"\u22D3",downarrow:"\u2193",Downarrow:"\u21D3",downdownarrows:"\u21CA",downharpoonleft:"\u21C3",downharpoonright:"\u21C2",ell:"\u2113",emptyset:"\u2205",eqcirc:"\u2256",eqsim:"\u2242",eqslantgtr:"\u2A96",eqslantless:"\u2A95",equiv:"\u2261",eth:"\xF0",exists:"\u2203",fallingdotseq:"\u2252",Finv:"\u2132",flat:"\u266D",forall:"\u2200",frown:"\u2322",Game:"\u2141",ge:"\u2265",geq:"\u2265",geqq:"\u2267",geqslant:"\u2A7E",gets:"\u2190",gg:"\u226B",ggg:"\u22D9",gggtr:"\u22D9",gimel:"\u2137",gnapprox:"\u2A8A",gneq:"\u2A88",gneqq:"\u2269",gnsim:"\u22E7",gradientnabla:"\u2207",gt:">",gtrapprox:"\u2A86",gtrdot:"\u22D7",gtreqless:"\u22DB",gtreqqless:"\u2A8C",gtrless:"\u2277",gtrsim:"\u2273",gvertneqq:"\u2269",hbar:"\u210F",heartsuit:"\u2661",hookleftarrow:"\u21A9",hookrightarrow:"\u21AA",hslash:"\u210F",iff:"\u21D4",iiiint:"\u2A0C",iiint:"\u222D",iint:"\u222C",Im:"\u2111",imaginary:"\u2111",imath:"\u0131",in:"\u2208",infty:"\u221E",injlim:"inj lim",int:"\u222B",intercal:"\u22BA",intop:"\u222B",jmath:"\u0237",Join:"\u22C8",land:"\u2227",ldotp:".",ldots:"\u2026",le:"\u2264",leadsto:"\u21DD",left:"",Leftarrow:"\u21D0",leftarrow:"\u2190",leftarrowtail:"\u21A2",leftharpoondown:"\u21BD",leftharpoonup:"\u21BC",leftleftarrows:"\u21C7",Leftrightarrow:"\u21D4",leftrightarrow:"\u2194",leftrightarrows:"\u21C6",leftrightharpoons:"\u21CB",leftrightsquigarrow:"\u21AD",leftthreetimes:"\u22CB",leq:"\u2264",leqq:"\u2266",leqslant:"\u2A7D",lessapprox:"\u2A85",lessdot:"\u22D6",lesseqgtr:"\u22DA",lesseqqgtr:"\u2A8B",lessgtr:"\u2276",lesssim:"\u2272",lhd:"\u22B2",ll:"\u226A",Lleftarrow:"\u21DA",lll:"\u22D8",llless:"\u22D8",lnapprox:"\u2A89",lneq:"\u2A87",lneqq:"\u2268",lnot:"\xAC",lnsim:"\u22E6",longleftarrow:"\u27F5",Longleftarrow:"\u27F8",Longleftrightarrow:"\u27FA",longleftrightarrow:"\u27F7",longmapsto:"\u27FC",longrightarrow:"\u27F6",Longrightarrow:"\u27F9",looparrowleft:"\u21AB",looparrowright:"\u21AC",lor:"\u2228",lozenge:"\u25CA",Lsh:"\u21B0",lt:"<",ltimes:"\u22C9",lvertneqq:"\u2268",maltese:"\u2720",mapsto:"\u21A6",measuredangle:"\u2221",mho:"\u2127",micro:"\xB5",mid:"\u2223",middle:"",models:"\u22A8",mp:"\u2213",multimap:"\u22B8",nabla:"\u2207",natural:"\u266E",ncong:"\u2247",ne:"\u2260",nearrow:"\u2197",neg:"\xAC",neq:"\u2260",neqslant:"\u2260",nexists:"\u2204",ngeq:"\u2271",ngeqq:"\u2271",ngeqslant:"\u2A88",ngtr:"\u226F",ni:"\u220B",nleftarrow:"\u219A",nLeftarrow:"\u21CD",nleftrightarrow:"\u21AE",nLeftrightarrow:"\u21CE",nleq:"\u2270",nleqq:"\u2270",nleqslant:"\u2A87",nless:"\u226E",nmid:"\u2224",notChar:"\u29F8",notin:"\u2209",nparallel:"\u2226",nprec:"\u2280",npreceq:"\u22E0",nrightarrow:"\u219B",nRightarrow:"\u21CF",nshortmid:"\u2224",nshortparallel:"\u2226",nsim:"\u2241",nsubseteq:"\u2288",nsubseteqq:"\u2288",nsucc:"\u2281",nsucceq:"\u22E1",nsupseteq:"\u2289",nsupseteqq:"\u2289",ntriangleleft:"\u22EA",ntrianglelefteq:"\u22EC",ntriangleright:"\u22EB",ntrianglerighteq:"\u22ED",nvdash:"\u22AC",nvDash:"\u22AD",nVdash:"\u22AE",nVDash:"\u22AF",nwarrow:"\u2196",odot:"\u2299",ohm:"\u2126",oint:"\u222E",ominus:"\u2296",oplus:"\u2295",oslash:"\u2298",otimes:"\u2297",owns:"\u220B",P:"\xB6",parallel:"\u2225",partial:"\u2202",perp:"\u22A5",perthousand:"\u2030",pitchfork:"\u22D4",pm:"\xB1",prec:"\u227A",precapprox:"\u2AB7",preccurlyeq:"\u227C",preceq:"\u2AAF",precnapprox:"\u2AB9",precneqq:"\u2AB5",precnsim:"\u22E8",precsim:"\u227E",prime:"\u2032",prod:"\u220F",projlim:"proj lim",propto:"\u221D",qquad:"\u2001",quad:"\u2000",Re:"\u211C",real:"\u211C",restriction:"\u21BE",rhd:"\u22B3",right:"",Rightarrow:"\u21D2",rightarrow:"\u2192",rightarrowtail:"\u21A3",rightharpoondown:"\u21C1",rightharpoonup:"\u21C0",rightleftarrows:"\u21C4",rightleftharpoons:"\u21CC",rightrightarrows:"\u21C9",rightsquigarrow:"\u21DD",rightthreetimes:"\u22CC",risingdotseq:"\u2253",Rrightarrow:"\u21DB",Rsh:"\u21B1",rtimes:"\u22CA",S:"\xA7",searrow:"\u2198",setminus:"\u2216",sharp:"\u266F",shortmid:"\u2223",shortparallel:"\u2225",sim:"\u223C",simeq:"\u2243",smallfrown:"\u2322",smallint:"\u222B",smallsetminus:"\u2216",smallsmile:"\u2323",smile:"\u2323",spadesuit:"\u2660",sphericalangle:"\u2222",sqcap:"\u2293",sqcup:"\u2294",sqsubset:"\u228F",sqsubseteq:"\u2291",sqsupset:"\u2290",sqsupseteq:"\u2292",square:"\u25FB",star:"\u22C6",Subset:"\u22D0",subset:"\u2282",subseteq:"\u2286",subseteqq:"\u2AC5",subsetneq:"\u228A",subsetneqq:"\u2ACB",succ:"\u227B",succapprox:"\u2AB8",succcurlyeq:"\u227D",succeq:"\u2AB0",succnapprox:"\u2ABA",succneqq:"\u2AB6",succnsim:"\u22E9",succsim:"\u227F",sum:"\u2211",Supset:"\u22D1",supset:"\u2283",supseteq:"\u2287",supseteqq:"\u2AC6",supsetneq:"\u228B",supsetneqq:"\u2ACC",surd:"\u221A",swarrow:"\u2199",therefore:"\u2234",thickapprox:"\u2248",thicksim:"\u223C",times:"\xD7",to:"\u2192",top:"\u22A4",triangle:"\u25B3",triangledown:"\u25BD",triangleleft:"\u25C3",trianglelefteq:"\u22B4",triangleq:"\u225C",triangleright:"\u25B9",trianglerighteq:"\u22B5",twoheadleftarrow:"\u219E",twoheadrightarrow:"\u21A0",unlhd:"\u22B4",unrhd:"\u22B5",uparrow:"\u2191",Uparrow:"\u21D1",updownarrow:"\u2195",Updownarrow:"\u21D5",upharpoonleft:"\u21BF",upharpoonright:"\u21BE",uplus:"\u228E",upuparrows:"\u21C8",varpropto:"\u221D",varsubsetneq:"\u228A",varsubsetneqq:"\u2ACB",varsupsetneq:"\u228B",varsupsetneqq:"\u2ACC",vartriangle:"\u25B3",vartriangleleft:"\u22B2",vartriangleright:"\u22B3",vDash:"\u22A8",Vdash:"\u22A9",vdash:"\u22A2",vdot:"\u22C5",vdots:"\u22EE",vee:"\u2228",veebar:"\u22BB",Vvdash:"\u22AA",wedge:"\u2227",wp:"\u2118",wr:"\u2240",yen:"\xA5",implies:"\u21D2",impliedby:"\u21D0",choose:"C",sqrt:"\u221A",coloneqq:"\u2254",colon:":",Colonapprox:"::\u2248",Coloneq:"::-",Coloneqq:"\u2A74",Colonsim:"::\u223C",Eqcolon:"-::",Eqqcolon:"=::",colonapprox:":\u2248",coloneq:":-",colonsim:":\u223C",dblcolon:"\u2237",eqcolon:"\u2239",eqqcolon:"\u2255",displaystyle:" ",",":" ",":":" ",";":" ",">":" ",enspace:" ",thinspace:" ",negthinspace:"","!":"",textacutedbl:"\u02DD",textasciiacute:"\xB4",textasciibreve:"\u02D8",textasciicaron:"\u02C7",textasciicircum:"^",textasciidieresis:"\xA8",textasciimacron:"\xAF",textasciitilde:"~",textasteriskcentered:"*",textbackslash:"\\",textbaht:"\u0E3F",textbar:"|",textbardbl:"\u2016",textbigcircle:"\u25EF",textblank:"\u2422",textborn:"*",textbraceleft:"{",textbraceright:"}",textbrokenbar:"\xA6",textbullet:"\u2022",textcelsius:"\u2103",textcent:"\xA2",textcentoldstyle:"\xA2",textcircledP:"\u2117",textcolonmonetary:"\u20A1",textcompwordmark:"\u200C",textcopyleft:"\u{1F12F}",textcopyright:"\xA9",textcurrency:"\xA4",textdagger:"\u2020",textdaggerdbl:"\u2021",textdegree:"\xB0",textdied:"\u2020",textdiscount:"\u2052",textdiv:"\xF7",textdivorced:"\u26AE",textdollar:"$",textdollaroldstyle:"$",textdong:"\u20AB",textdownarrow:"\u2193",texteightoldstyle:"8",textellipsis:"\u2026",textemdash:"\u2014",textendash:"\u2013",textestimated:"\u212E",texteuro:"\u20AC",textexclamdown:"\xA1",textfiveoldstyle:"5",textflorin:"\u0192",textfouroldstyle:"4",textfractionsolidus:"\u2044",textgravedbl:"\u02F5",textgreater:">",textguarani:"\u20B2",textinterrobang:"\u203D",textinterrobangdown:"\u2E18",textlangle:"\u2329",textlbrackdbl:"\u27E6",textleftarrow:"\u2190",textless:"<",textlira:"\u20A4",textlnot:"\xAC",textlquill:"\u2045",textmarried:"\u26AD",textmho:"\u2127",textminus:"\u2212",textmu:"\xB5",textmusicalnote:"\u266A",textnaira:"\u20A6",textnineoldstyle:"9",textnumero:"\u2116",textohm:"\u2126",textonehalf:"\xBD",textoneoldstyle:"1",textonequarter:"\xBC",textonesuperior:"\xB9",textopenbullet:"\u25E6",textordfeminine:"\xAA",textordmasculine:"\xBA",textparagraph:"\xB6",textperiodcentered:"\xB7",textpertenthousand:"\u2031",textperthousand:"\u2030",textpeso:"\u20B1",textpm:"\xB1",textquestiondown:"\xBF",textquotedblleft:"\u201C",textquotedblright:"\u201D",textquoteleft:"\u2018",textquoteright:"\u2019",textrangle:"\u232A",textrbrackdbl:"\u27E7",textrecipe:"\u211E",textreferencemark:"\u203B",textregistered:"\xAE",textrightarrow:"\u2192",textrquill:"\u2046",textsection:"\xA7",textservicemark:"\u2120",textsevenoldstyle:"7",textsixoldstyle:"6",textsterling:"\xA3",textsurd:"\u221A",textthreeoldstyle:"3",textthreequarters:"\xBE",textthreesuperior:"\xB3",texttildelow:"\u02F7",texttimes:"\xD7",texttrademark:"\u2122",texttwooldstyle:"2",texttwosuperior:"\xB2",textunderscore:"_",textuparrow:"\u2191",textvisiblespace:"\u2423",textwon:"\u20A9",textyen:"\xA5",textzerooldstyle:"0"},Ja={leftarrow:"\u219A",to:"\u219B",leftrightarrow:"\u21AE",Leftarrow:"\u21CD",Rightarrow:"\u21CF",Leftrightarrow:"\u21CE",in:"\u2209",owns:"\u220C",shortmid:"\u2224",shortparallel:"\u2226",thicksim:"\u2241",simeq:"\u2244",cong:"\u2247",thickapprox:"\u2249",asymp:"\u226D",equiv:"\u2262",lt:"\u226E",gt:"\u226F",leq:"\u2270",geq:"\u2271",lesssim:"\u2274",gtrsim:"\u2275",lessgtr:"\u2278",gtrless:"\u2279",prec:"\u2280",succ:"\u2281",subset:"\u2284",supset:"\u2285",subseteq:"\u2288",supseteq:"\u2289",vdash:"\u22AC",vDash:"\u22AD",Vdash:"\u22AE",preccurlyeq:"\u22E0",succcurlyeq:"\u22E1",sqsubseteq:"\u22E2",sqsupseteq:"\u22E3",vartriangleleft:"\u22EA",vartriangleright:"\u22EB",unlhd:"\u22EC",unrhd:"\u22ED",exists:"\u2204"},el=["arcsin","arccos","arctan","sinh","cosh","tanh","coth","sin","cos","tan","sec","csc","cot","exp","ker","limsup","lim","sup","deg","gcd","log","lg","ln","Pr","det","hom","arg","dim","liminf","min","max","inf","mod"],Ii={"{1}{2}":"\xBD","{1}{3}":"\u2153","{2}{3}":"\u2154","{1}{4}":"\xBC","{1}{5}":"\u2155","{2}{5}":"\u2156","{3}{5}":"\u2157","{4}{5}":"\u2158","{1}{6}":"\u2159","{5}{6}":"\u215A","{1}{8}":"\u215B","{3}{8}":"\u215C","{5}{8}":"\u215D","{7}{8}":"\u215E"},Ht={alpha:"\u03B1",beta:"\u03B2",gamma:"\u03B3",varGamma:"\u0393",delta:"\u03B4",varDelta:"\u0394",epsilon:"\u03F5",varepsilon:"\u03B5",zeta:"\u03B6",eta:"\u03B7",theta:"\u03B8",vartheta:"\u03D1",iota:"\u03B9",kappa:"\u03BA",varkappa:"\u03F0",lambda:"\u03BB",mu:"\u03BC",nu:"\u03BD",xi:"\u03BE",omicron:"\u03BF",pi:"\u03C0",varpi:"\u03D6",varPi:"\u03A0",rho:"\u03C1",varrho:"\u03F1",sigma:"\u03C3",varsigma:"\u03C2",varSigma:"\u03A3",tau:"\u03C4",upsilon:"\u03C5",phi:"\u03D5",varphi:"\u03C6",varPhi:"\u03A6",chi:"\u03C7",psi:"\u03C8",varPsi:"\u03A8",omega:"\u03C9",Gamma:"\u0393",Delta:"\u0394",Theta:"\u0398",varTheta:"\u0398",Lambda:"\u039B",varLambda:"\u039B",Xi:"\u039E",varXi:"\u039E",Pi:"\u03A0",Sigma:"\u03A3",Upsilon:"\u03A5",varUpsilon:"\u03A5",Phi:"\u03A6",Chi:"\u03A7",Psi:"\u03A8",Omega:"\u03A9",varOmega:"\u03A9",varnothing:"\u2205",upalpha:"\u03B1",upbeta:"\u03B2",upgamma:"\u03B3",updelta:"\u03B4",upepsilon:"\u03F5",upzeta:"\u03B6",upeta:"\u03B7",uptheta:"\u03B8",upiota:"\u03B9",upkappa:"\u03BA",uplambda:"\u03BB",upmu:"\u03BC",upnu:"\u03BD",upxi:"\u03BE",upomicron:"\u03BF",uppi:"\u03C0",uprho:"\u03C1",upsigma:"\u03C3",uptau:"\u03C4",upupsilon:"\u03C5",upphi:"\u03D5",upchi:"\u03C7",uppsi:"\u03C8",upomega:"\u03C9",upvarepsilon:"\u03B5",upvartheta:"\u03D1",upvarpi:"\u03D6",upvarrho:"\u03F1",upvarsigma:"\u03C2",upvarphi:"\u03C6",Upgamma:"\u0393",Updelta:"\u0394",Uptheta:"\u0398",Uplambda:"\u039B",Upxi:"\u039E",Uppi:"\u03A0",Upsigma:"\u03A3",Upupsilon:"\u03A5",Upphi:"\u03A6",Uppsi:"\u03A8",Upomega:"\u03A9"};var tl={"<":"\u27E8",">":"\u27E9",".":"","/":"/","\\gt":"\u27E9","\\lt":"\u27E8"},ur={langle:"\u27E8",rangle:"\u27E9",lvert:"|",rvert:"|",lVert:"\u2016",rVert:"\u2016",vert:"|",Arrowvert:"\u2016",Vert:"\u2016",arrowvert:"\u23D0",bracevert:"\u23AA",lbrace:"{",lbrack:"[",lceil:"\u2308",lfloor:"\u230A",lgroup:"\u27EE",llcorner:"\u231E",lmoustache:"\u23B0",lparen:"(",lrcorner:"\u231F",rbrace:"}",rbrack:"]",rceil:"\u2309",rfloor:"\u230B",rgroup:"\u27EF",rmoustache:"\u23B1",rparen:")",ulcorner:"\u231C",urcorner:"\u231D"},nl={" ":" ",0:"\u{1D7D8}",1:"\u{1D7D9}",2:"\u{1D7DA}",3:"\u{1D7DB}",4:"\u{1D7DC}",5:"\u{1D7DD}",6:"\u{1D7DE}",7:"\u{1D7DF}",8:"\u{1D7E0}",9:"\u{1D7E1}",A:"\u{1D538}",B:"\u{1D539}",C:"\u2102",D:"\u{1D53B}",E:"\u{1D53C}",F:"\u{1D53D}",G:"\u{1D53E}",H:"\u210D",I:"\u{1D540}",J:"\u{1D541}",K:"\u{1D542}",L:"\u{1D543}",M:"\u{1D544}",N:"\u2115",O:"\u{1D546}",P:"\u2119",Q:"\u211A",R:"\u211D",S:"\u{1D54A}",T:"\u{1D54B}",U:"\u{1D54C}",V:"\u{1D54D}",W:"\u{1D54E}",X:"\u{1D54F}",Y:"\u{1D550}",Z:"\u2124",a:"\u{1D552}",b:"\u{1D553}",c:"\u{1D554}",d:"\u{1D555}",e:"\u{1D556}",f:"\u{1D557}",g:"\u{1D558}",h:"\u{1D559}",i:"\u{1D55A}",j:"\u{1D55B}",k:"\u{1D55C}",l:"\u{1D55D}",m:"\u{1D55E}",n:"\u{1D55F}",o:"\u{1D560}",p:"\u{1D561}",q:"\u{1D562}",r:"\u{1D563}",s:"\u{1D564}",t:"\u{1D565}",u:"\u{1D566}",v:"\u{1D567}",w:"\u{1D568}",x:"\u{1D569}",y:"\u{1D56A}",z:"\u{1D56B}"},rl={A:"\u{1D4D0}",B:"\u{1D4D1}",C:"\u{1D4D2}",D:"\u{1D4D3}",E:"\u{1D4D4}",F:"\u{1D4D5}",G:"\u{1D4D6}",H:"\u{1D4D7}",I:"\u{1D4D8}",J:"\u{1D4D9}",K:"\u{1D4DA}",L:"\u{1D4DB}",M:"\u{1D4DC}",N:"\u{1D4DD}",O:"\u{1D4DE}",P:"\u{1D4DF}",Q:"\u{1D4E0}",R:"\u{1D4E1}",S:"\u{1D4E2}",T:"\u{1D4E3}",U:"\u{1D4E4}",V:"\u{1D4E5}",W:"\u{1D4E6}",X:"\u{1D4E7}",Y:"\u{1D4E8}",Z:"\u{1D4E9}"};var _={};Pa(_,{Ampersand:()=>EO,Begin:()=>xn,BlankLine:()=>OO,BottomRuleCtrlSeq:()=>go,CloseBrace:()=>rO,CloseBracket:()=>lO,CloseBracketCtrlSym:()=>Vo,CloseParenCtrlSym:()=>Lo,CloseParenMath:()=>AO,ColorBoxCtrlSeq:()=>Ao,Command:()=>eO,Comment:()=>Bu,Csname:()=>Bi,CtrlSeq:()=>QO,CtrlSym:()=>hO,DefCtrlSeq:()=>io,DefinitionArgument:()=>bO,DefinitionFragment:()=>xO,DefinitionFragmentArgument:()=>$O,DefinitionFragmentCommand:()=>SO,Dollar:()=>wO,DollarInlineMath:()=>qO,EmphasisCtrlSeq:()=>yo,End:()=>Yi,EnvName:()=>uO,Environment:()=>pO,EquationArrayEnvName:()=>jo,EquationArrayEnvironment:()=>cO,EquationEnvName:()=>Mo,EquationEnvironment:()=>iO,FColorBoxCtrlSeq:()=>Wo,FboxCtrlSeq:()=>Xo,FrameBoxCtrlSeq:()=>_o,HLineCtrlSeq:()=>mo,HboxCtrlSeq:()=>qo,HrefCtrlSeq:()=>no,InlineMath:()=>RO,KnownCtrlSym:()=>kO,KnownEnvironment:()=>Go,LaTeX:()=>Nu,LabelArgument:()=>mO,LabelCtrlSeq:()=>eo,LeftCtrlSeq:()=>so,LetCtrlSeq:()=>oo,LineBreakCtrlSym:()=>Io,LiteralArgContent:()=>Hi,LongArg:()=>nO,MacroParameter:()=>gO,Math:()=>Uu,MathArgument:()=>WO,MathChar:()=>IO,MathClosing:()=>DO,MathCommand:()=>zu,MathDelimitedGroup:()=>jO,MathDelimiter:()=>LO,MathOpening:()=>ZO,MathSpecialChar:()=>VO,MathTextCtrlSeq:()=>to,MboxCtrlSeq:()=>Ro,MidRuleCtrlSeq:()=>ho,NewCommandCtrlSeq:()=>lo,NewEnvironmentCtrlSeq:()=>po,NewLine:()=>vO,Normal:()=>TO,Number:()=>MO,OpenBrace:()=>Ku,OpenBracket:()=>sO,OpenBracketCtrlSym:()=>Do,OpenParenCtrlSym:()=>Zo,OpenParenMath:()=>_O,OptionalArgument:()=>oO,OptionalMacroParameter:()=>yO,ParenMath:()=>XO,RefArgument:()=>fO,RefCtrlSeq:()=>Ki,RefStarrableCtrlSeq:()=>Ji,RenewCommandCtrlSeq:()=>co,RenewEnvironmentCtrlSeq:()=>uo,RightCtrlSeq:()=>ao,ShortArg:()=>Ju,ShortOptionalArg:()=>aO,ShortTextArgument:()=>Yu,SymbolCtrlSeq:()=>vo,TextArgument:()=>tO,TextBoldCtrlSeq:()=>ko,TextClapCtrlSeq:()=>Or,TextColorCtrlSeq:()=>Oo,TextCtrlSeq:()=>xo,TextItalicCtrlSeq:()=>$o,TextLLapCtrlSeq:()=>Po,TextNormalCtrlSeq:()=>Eo,TextRLapCtrlSeq:()=>Co,TextRomanCtrlSeq:()=>So,TextSansSerifCtrlSeq:()=>wo,TextTeletypeCtrlSeq:()=>To,TextUprightCtrlSeq:()=>Qo,Tilde:()=>PO,TopRuleCtrlSeq:()=>fo,UnderlineCtrlSeq:()=>bo,UnknownCommand:()=>CO,UrlArgument:()=>dO,VerbContent:()=>Gi,VerbCtrlSeq:()=>ro,Whitespace:()=>Fu,endOfArguments:()=>Ui,endOfArgumentsAndOptionals:()=>Fi,hasMoreArguments:()=>Ni,hasMoreArgumentsOrOptionals:()=>zi});var Gi=1,Hi=2,Bi=3,Ni=188,Ui=189,zi=190,Fi=191,xn=4,Yi=5,Ki=6,Ji=7,eo=8,to=9,no=10,ro=11,io=12,oo=13,so=14,ao=15,lo=16,co=17,po=18,uo=19,Oo=20,mo=21,fo=22,ho=23,go=24,yo=25,bo=26,vo=27,xo=28,So=29,Qo=30,$o=31,ko=32,wo=33,To=34,Eo=35,Or=36,Po=37,Co=38,qo=39,Ro=40,Xo=41,_o=42,Ao=43,Wo=44,Mo=45,jo=46,Zo=47,Lo=48,Do=49,Vo=50,Io=51,Bu=52,Nu=53,Uu=54,zu=55,Fu=58,Yu=59,Ku=60,Ju=61,eO=62,tO=65,nO=66,rO=68,Go=69,iO=70,oO=73,sO=74,aO=75,lO=77,cO=80,pO=84,uO=87,OO=90,dO=93,mO=96,fO=98,hO=100,gO=101,yO=102,bO=103,vO=104,xO=105,SO=106,QO=108,$O=109,kO=110,wO=113,TO=114,EO=115,PO=116,CO=143,qO=144,RO=145,XO=146,_O=147,AO=148,WO=150,MO=151,jO=170,ZO=171,LO=172,DO=173,VO=174,IO=175;var GO=100;function HO(e){return e>=65&&e<=90||e>=97&&e<=122||e>=48&&e<=57||e===42||e===43||e===64}function BO(e){return e>=65&&e<=90||e>=97&&e<=122}var il=null,ol=null,sl=0;function al(e,t){let n=e.pos+t;if(ol===e&&sl===n)return il;if(e.peek(t)!==123)return null;t++;let r="";for(;;){let i=e.peek(t);if(!HO(i))break;r+=String.fromCharCode(i),t++}return ol=e,sl=n,il=r||null}var dr=class{constructor(t,n){this.name=t,this.parent=n,this.hash=n?n.hash:0;for(let r=0;r<t.length;r++)this.hash+=(this.hash<<4)+t.charCodeAt(r)+(t.charCodeAt(r)<<8)}},ll=new xt.ContextTracker({start:null,shift(e,t,n,r){return t===4?new dr(al(r,6)||"",e):e},reduce(e,t){return t===69&&e?e.parent:e},reuse(e,t,n,r){return t.type.id===4?new dr(al(r,0)||"",e):e},hash(e){return e?e.hash:0},strict:!1}),cl=new xt.ExternalTokenizer((e,t)=>{e.next===42&&e.advance();let n=e.next;if(n!==-1&&!/\s|\*/.test(String.fromCharCode(n))){for(e.advance();;){let r=e.next;if(r===-1||r===KO)return;if(e.advance(),r===n)break}return e.acceptToken(1)}},{contextual:!1}),pl=new xt.ExternalTokenizer(e=>{for(let t=0;;t++){let n=e.peek(t);if(n===-1||n===zO)return e.acceptToken(2,t)}},{contextual:!1});function it(e){return e.charCodeAt(0)}var NO=it("\\"),ul=it("{"),UO=it("["),zO=it("}"),FO=it(" "),YO=it(" "),KO=it(`
`),Ol=e=>new xt.ExternalTokenizer(t=>{for(let n=0;n<GO;++n){let r=t.peek(n);if(r===YO||r===FO)continue;let i=e(r);if(i){t.acceptToken(i);return}}},{contextual:!1,fallback:!0}),dl=Ol(e=>e===ul?188:189),ml=Ol(e=>e===ul||e===UO?190:191),JO=it("@"),fl=new xt.ExternalTokenizer((e,t)=>{let n=0,r=-1,i=e.peek(n);if(i!==-1&&i===NO){for(n++;;){let o=e.peek(n);if(o===-1||!(BO(o)||o===JO)){r=n-1;break}r=n,n++}if(r!==-1)return e.acceptToken(3,r+1)}}),ed=new Set(["\\eqref"]),td=new Set(["\\ref"]),nd=new Set(["\\label"]),rd=new Set(["\\text","\\tag","\\textrm"]),id={"\\href":10,"\\verb":11,"\\def":12,"\\let":13,"\\left":14,"\\right":15,"\\newcommand":16,"\\renewcommand":17,"\\newenvironment":18,"\\renewenvironment":19,"\\textcolor":20,"\\hline":21,"\\toprule":22,"\\midrule":23,"\\bottomrule":24,"\\emph":25,"\\underline":26},od={"\\text":28,"\\textrm":29,"\\textup":30,"\\textit":31,"\\textbf":32,"\\textsf":33,"\\texttt":34,"\\textnormal":35,"\\clap":36,"\\textllap":37,"\\textrlap":38,"\\textclap":36,"\\hbox":39,"\\mbox":40,"\\fbox":41,"\\framebox":42,"\\colorbox":43,"\\fcolorbox":44},Ho=(e,t)=>{if(e==="\\begin")return 4;if(e==="\\end")return 5;if(ed.has(e))return 6;if(td.has(e))return 7;if(nd.has(e))return 8;if(rd.has(e))return 9;let n=od[e];if(n!==void 0)return n;let r=id[e];if(r!==void 0)return r;let i=e.slice(1);return(pr[i]||Ht[i])!==void 0?27:-1},sd=new Set(["equation","equation*","displaymath","math","multline","multline*","matrix"]),ad=new Set(["array","eqnarray","eqnarray*","align","align*","alignat","alignat*","flalign","flalign*","gather","gather*","pmatrix","pmatrix*","bmatrix","bmatrix*","Bmatrix","Bmatrix*","vmatrix","vmatrix*","Vmatrix","Vmatrix*","smallmatrix","smallmatrix*","split","gathered","aligned","alignedat","cases","cases*","dcases","dcases*","rcases","rcases*"]),Bo=(e,t)=>sd.has(e)?45:ad.has(e)?46:-1,ld={"\\(":47,"\\)":48,"\\[":49,"\\]":50,"\\\\":51},No=(e,t)=>ld[e]||-1;var St=hl.LRParser.deserialize({version:14,states:"!?pOVQWOOO$kQWO'#DuO$pQWO'#DtO$pQWO'#EOOOQO'#Ds'#DsOVQWO'#ESO(cQ#|O'#EoOOQ#t'#En'#EnO(yQWO'#FOO(yQWO'#FPO(yQWO'#FQO(yQWO'#FRO)OQWO'#FSO(yQWO'#FTO(yQWO'#FUO(yQWO'#FVO(yQWO'#FWO(yQWO'#FXO(yQWO'#FYO(yQWO'#FZO(yQWO'#F[O(yQWO'#F]O(yQWO'#F^O(yQWO'#F_OOQ#t'#Gw'#GwO)WQWO'#DgO)`QWO'#FjO)hQWO'#FkO)pQXO'#FlO)uQWO'#FmO)}QWO'#FnO*YQ`O'#FnO*hQ[O'#FoO*sQ[O'#FpO*xQ[O'#FqO+TQ[O'#FrO+`QWO'#FsO+hQ[O'#FtO+sQ`O'#FuO,OQWO'#FvO/vQWO'#FwO/vQWO'#FxOOQO'#Fy'#FyOOQO'#Df'#DfO2rQ#|O'#GxOOQO'#Gx'#GxOOQO'#Fz'#FzOOQO'#De'#DeO2zQWO'#F{O5eQpO'#F}O5lQWO'#F|OOQO'#GS'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eq EmphasisCtrlSeq UnderlineCtrlSeq SymbolCtrlSeq TextCtrlSeq TextRomanCtrlSeq TextUprightCtrlSeq TextItalicCtrlSeq TextBoldCtrlSeq TextSansSerifCtrlSeq TextTeletypeCtrlSeq TextNormalCtrlSeq TextClapCtrlSeq TextLLapCtrlSeq TextRLapCtrlSeq HboxCtrlSeq MboxCtrlSeq FboxCtrlSeq FrameBoxCtrlSeq ColorBoxCtrlSeq FColorBoxCtrlSeq EquationEnvName EquationArrayEnvName OpenParenCtrlSym CloseParenCtrlSym OpenBracketCtrlSym CloseBracketCtrlSym LineBreakCtrlSym Comment LaTeX Math MathCommand KnownCommand TextColorCommand Whitespace ShortTextArgument OpenBrace ShortArg Command KnownCommand TextColorCommand TextArgument LongArg NonEmptyGroup CloseBrace KnownEnvironment EquationEnvironment BeginEnv EnvNameGroup OptionalArgument OpenBracket ShortOptionalArg NonEmptyGroup CloseBracket Content EndEnv EquationArrayEnvironment BeginEnv EnvNameGroup EndEnv Environment BeginEnv EnvNameGroup EnvName Content EndEnv BlankLine ColorBoxCommand HrefCommand UrlArgument VerbCommand Label LabelArgument Ref RefArgument Def CtrlSym MacroParameter OptionalMacroParameter DefinitionArgument NewLine DefinitionFragment DefinitionFragmentCommand DefinitionFragmentUnknownCommand CtrlSeq DefinitionFragmentArgument KnownCtrlSym LineBreak Group Dollar Normal Ampersand Tilde Let NewCommand RenewCommand NewEnvironment RenewEnvironment MathTextCommand HorizontalLine EmphasisCommand UnderlineCommand TextBoldCommand TextItalicCommand TextTeletypeCommand TextSansSerifCommand Hbox Text TextRoman TextUpright TextNormal TextClap TextLLap TextRLap Mbox Fbox FrameBox FColorBox SymbolCommand UnknownCommand DollarInlineMath InlineMath ParenMath OpenParenMath CloseParenMath NonEmptyGroup MathArgument Number ColorBoxCommand HrefCommand VerbCommand Label Ref Def Let NewCommand RenewCommand NewEnvironment RenewEnvironment MathTextCommand HorizontalLine EmphasisCommand UnderlineCommand SymbolCommand MathUnknownCommand Group MathDelimitedGroup MathOpening MathDelimiter MathClosing MathSpecialChar MathChar",maxTerm:249,context:ll,nodeProps:[["closedBy",60,"CloseBrace",74,"CloseBracket",147,"CloseParenMath"],["openedBy",68,"OpenBrace",77,"OpenBracket",148,"OpenParenMath"],["group",-3,70,80,84,"$Environment",-2,144,146,"$MathContainer"]],skippedNodes:[0,52],repeatNodeCount:11,tokenData:"!Mf~R!ROX$[XY'mYZ'xZp$[pq'mqs$[st(Ytu)Yuv)_vw*Owx$[xy*Tyz.]z{/}{|+u|}$[}!O+u!O!P1o!P!Q3T!Q!R4u!R!S6i!S!T7h!T!U8g!U!V9f!V!W:e!W!X;d!X!Y<c!Y!Z=b!Z![>a![!^$[!^!_?`!_!`AQ!`!aBr!a!c$[!c!}Dd!}#OFu#O#PF|#P#Q!Iv#Q#R!I}#R#S!Jw#S#T$[#T#oDd#o#p!Kq#p#q!Kv#q#r!M[#r#s!Ma#s;'S$[;'S;=`'g<%lO$[X$cc$uP#fWOX$[Zp$[pq%nqs$[st&cwx$[x|%n|}$[}!O%n!O!P$[!P![%n![!^$[!^!a%n!a!}$[#S#o$[#p#q$[#s;'S$[;'S;=`'g<%lO$[W%sW#fWOX%nZs%nw!}%n#S#o%n#p#q%n#s;'S%n;'S;=`&]<%lO%nW&`P;=`<%l%nP&h]$uPOX&cZp&cqt&cwx&c|}&c!O!P&c![!^&c!a!}&c#S#o&c#p#q&c#s;'S&c;'S;=`'a<%lO&cP'dP;=`<%l&cX'jP;=`<%l$[~'rQ![~XY'mpq'm~'}P#[~YZ(Q~(VP!|~YZ(QZ(a]%ZY$uPOX&cZp&cqt&cwx&c|}&c!O!P&c![!^&c!a!}&c#S#o&c#p#q&c#s;'S&c;'S;=`'a<%lO&c~)_O#e~~)dT!U~OY)_YZ)sZ;'S)_;'S;=`)x<%lO)_~)xO!U~~){P;=`<%l)_~*TO#g~]*^g%oS$tP#fWOX%nZs%nwx%nxy+uyz+uz{+u{|+u|}%n}!O+u!O!P%n!P!Q+u!Q!^%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102});var L=require("@lezer/common"),X=require("@lezer/highlight"),hr=class e{static create(t,n,r,i,o){let s=i+(i<<8)+t+(n<<4)|0;return new e(t,n,r,s,o,[],[])}constructor(t,n,r,i,o,s,a){this.type=t,this.value=n,this.from=r,this.hash=i,this.end=o,this.children=s,this.positions=a,this.hashProp=[[L.NodeProp.contextHash,i]]}addChild(t,n){t.prop(L.NodeProp.contextHash)!=this.hash&&(t=new L.Tree(t.type,t.children,t.positions,t.length,this.hashProp)),this.children.push(t),this.positions.push(n)}toTree(t,n=this.end){let r=this.children.length-1;return r>=0&&(n=Math.max(n,this.positions[r]+this.children[r].length+this.from)),new L.Tree(t.types[this.type],this.children,this.positions,n-this.from).balance({makeTree:(i,o,s)=>new L.Tree(L.NodeType.none,i,o,s,this.hashProp)})}},x;(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"})(x||(x={}));var Fo=class{constructor(t,n){this.start=t,this.content=n,this.marks=[],this.parsers=[]}},Yo=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 t=this.skipSpace(this.basePos);this.indent=this.countIndent(t,this.pos,this.indent),this.pos=t,this.next=t==this.text.length?-1:this.text.charCodeAt(t)}skipSpace(t){return Qn(this.text,t)}reset(t){for(this.text=t,this.baseIndent=this.basePos=this.pos=this.indent=0,this.forwardInner(),this.depth=1;this.markers.length;)this.markers.pop()}moveBase(t){this.basePos=t,this.baseIndent=this.countIndent(t,this.pos,this.indent)}moveBaseColumn(t){this.baseIndent=t,this.basePos=this.findColumn(t)}addMarker(t){this.markers.push(t)}countIndent(t,n=0,r=0){for(let i=n;i<t;i++)r+=this.text.charCodeAt(i)==9?4-r%4:1;return r}findColumn(t){let n=0;for(let r=0;n<this.text.length&&r<t;n++)r+=this.text.charCodeAt(n)==9?4-r%4:1;return n}scrub(){if(!this.baseIndent)return this.text;let t="";for(let n=0;n<this.basePos;n++)t+=" ";return t+this.text.slice(this.basePos)}};function gl(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==x.OrderedList?ps:cs)(n,t,!1);return r>0&&(e.type!=x.BulletList||ls(n,t,!1)<0)&&n.text.charCodeAt(n.pos+r-1)==e.value}var El={[x.Blockquote](e,t,n){return n.next!=62?!1:(n.markers.push(M(x.QuoteMark,t.lineStart+n.pos,t.lineStart+n.pos+1)),n.moveBase(n.pos+(Te(n.text.charCodeAt(n.pos+1))?2:1)),e.end=t.lineStart+n.text.length,!0)},[x.ListItem](e,t,n){return n.indent<n.baseIndent+e.value&&n.next>-1?!1:(n.moveBaseColumn(n.baseIndent+e.value),!0)},[x.OrderedList]:gl,[x.BulletList]:gl,[x.Document](){return!0}};function Te(e){return e==32||e==9||e==10||e==13}function Qn(e,t=0){for(;t<e.length&&Te(e.charCodeAt(t));)t++;return t}function yl(e,t,n){for(;t>n&&Te(e.charCodeAt(t-1));)t--;return t}function Pl(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 Cl(e){return e.next!=62?-1:e.text.charCodeAt(e.pos+1)==32?2:1}function ls(e,t,n){if(e.next!=42&&e.next!=45&&e.next!=95)return-1;let r=1;for(let i=e.pos+1;i<e.text.length;i++){let o=e.text.charCodeAt(i);if(o==e.next)r++;else if(!Te(o))return-1}return n&&e.next==45&&Xl(e)>-1&&e.depth==t.stack.length&&t.parser.leafBlockParsers.indexOf(Ml.SetextHeading)>-1||r<3?-1:1}function ql(e,t){for(let n=e.stack.length-1;n>=0;n--)if(e.stack[n].type==t)return!0;return!1}function cs(e,t,n){return(e.next==45||e.next==43||e.next==42)&&(e.pos==e.text.length-1||Te(e.text.charCodeAt(e.pos+1)))&&(!n||ql(t,x.BulletList)||e.skipSpace(e.pos+2)<e.text.length)?1:-1}function ps(e,t,n){let r=e.pos,i=e.next;for(;i>=48&&i<=57;){r++;if(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&&!Te(e.text.charCodeAt(r+1))||n&&!ql(t,x.OrderedList)&&(e.skipSpace(r+1)==e.text.length||r>e.pos+1||e.next!=49)?-1:r+1-e.pos}function Rl(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 Xl(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&&Te(e.text.charCodeAt(t));)t++;return t==e.text.length?n:-1}var Ko=/^[ \t]*$/,_l=/-->/,Al=/\?>/,Jo=[[/^<(?:script|pre|style)(?:\s|>|$)/i,/<\/(?:script|pre|style)>/i],[/^\s*<!--/,_l],[/^\s*<\?/,Al],[/^\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,Ko],[/^\s*(?:<\/[a-z][\w-]*\s*>|<[a-z][\w-]*(\s+[a-z:_][\w-.]*(?:\s*=\s*(?:[^\s"'=<>`]+|'[^']*'|"[^"]*"))?)*\s*>)\s*$/i,Ko]];function Wl(e,t,n){if(e.next!=60)return-1;let r=e.text.slice(e.pos);for(let i=0,o=Jo.length-(n?1:0);i<o;i++)if(Jo[i][0].test(r))return i;return-1}function bl(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 ot(e,t,n){let r=e.length-1;r>=0&&e[r].to==t&&e[r].type==x.CodeText?e[r].to=n:e.push(M(x.CodeText,t,n))}var mr={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,o=e.lineStart+t.text.length,s=[],a=[];for(ot(s,i,o);e.nextLine()&&t.depth>=e.stack.length;)if(t.pos==t.text.length){ot(a,e.lineStart-1,e.lineStart);for(let l of t.markers)a.push(l)}else{if(t.indent<n)break;{if(a.length){for(let c of a)c.type==x.CodeText?ot(s,c.from,c.to):s.push(c);a=[]}ot(s,e.lineStart-1,e.lineStart);for(let c of t.markers)s.push(c);o=e.lineStart+t.text.length;let l=e.lineStart+t.findColumn(t.baseIndent+4);l<o&&ot(s,l,o)}}return a.length&&(a=a.filter(l=>l.type!=x.CodeText),a.length&&(t.markers=a.concat(t.markers))),e.addNode(e.buffer.writeElements(s,-i).finish(x.CodeBlock,o-i),i),!0},FencedCode(e,t){let n=Pl(t);if(n<0)return!1;let r=e.lineStart+t.pos,i=t.next,o=n-t.pos,s=t.skipSpace(n),a=yl(t.text,t.text.length,s),l=[M(x.CodeMark,r,r+o)];s<a&&l.push(M(x.CodeInfo,e.lineStart+s,e.lineStart+a));for(let c=!0,p=!0,u=!1;e.nextLine()&&t.depth>=e.stack.length;c=!1){let O=t.pos;if(t.indent-t.baseIndent<4)for(;O<t.text.length&&t.text.charCodeAt(O)==i;)O++;if(O-t.pos>=o&&t.skipSpace(O)==t.text.length){for(let d of t.markers)l.push(d);p&&u&&ot(l,e.lineStart-1,e.lineStart),l.push(M(x.CodeMark,e.lineStart+t.pos,e.lineStart+O)),e.nextLine();break}else{u=!0,c||(ot(l,e.lineStart-1,e.lineStart),p=!1);for(let m of t.markers)l.push(m);let d=e.lineStart+t.basePos,f=e.lineStart+t.text.length;d<f&&(ot(l,d,f),p=!1)}}return e.addNode(e.buffer.writeElements(l,-r).finish(x.FencedCode,e.prevLineEnd()-r),r),!0},Blockquote(e,t){let n=Cl(t);return n<0?!1:(e.startContext(x.Blockquote,t.pos),e.addNode(x.QuoteMark,e.lineStart+t.pos,e.lineStart+t.pos+1),t.moveBase(t.pos+n),null)},HorizontalRule(e,t){if(ls(t,e,!1)<0)return!1;let n=e.lineStart+t.pos;return e.nextLine(),e.addNode(x.HorizontalRule,n),!0},BulletList(e,t){let n=cs(t,e,!1);if(n<0)return!1;e.block.type!=x.BulletList&&e.startContext(x.BulletList,t.basePos,t.next);let r=bl(t,t.pos+1);return e.startContext(x.ListItem,t.basePos,r-t.baseIndent),e.addNode(x.ListMark,e.lineStart+t.pos,e.lineStart+t.pos+n),t.moveBaseColumn(r),null},OrderedList(e,t){let n=ps(t,e,!1);if(n<0)return!1;e.block.type!=x.OrderedList&&e.startContext(x.OrderedList,t.basePos,t.text.charCodeAt(t.pos+n-1));let r=bl(t,t.pos+n);return e.startContext(x.ListItem,t.basePos,r-t.baseIndent),e.addNode(x.ListMark,e.lineStart+t.pos,e.lineStart+t.pos+n),t.moveBaseColumn(r),null},ATXHeading(e,t){let n=Rl(t);if(n<0)return!1;let r=t.pos,i=e.lineStart+r,o=yl(t.text,t.text.length,r),s=o;for(;s>r&&t.text.charCodeAt(s-1)==t.next;)s--;(s==o||s==r||!Te(t.text.charCodeAt(s-1)))&&(s=t.text.length);let a=e.buffer.write(x.HeaderMark,0,n).writeElements(e.parser.parseInline(t.text.slice(r+n+1,s),i+n+1),-i);s<t.text.length&&a.write(x.HeaderMark,s-r,o-r);let l=a.finish(x.ATXHeading1-1+n,t.text.length-r);return e.nextLine(),e.addNode(l,i),!0},HTMLBlock(e,t){let n=Wl(t,e,!1);if(n<0)return!1;let r=e.lineStart+t.pos,i=Jo[n][1],o=[],s=i!=Ko;for(;!i.test(t.text)&&e.nextLine();){if(t.depth<e.stack.length){s=!1;break}for(let c of t.markers)o.push(c)}s&&e.nextLine();let a=i==_l?x.CommentBlock:i==Al?x.ProcessingInstructionBlock:x.HTMLBlock,l=e.prevLineEnd();return e.addNode(e.buffer.writeElements(o,-r).finish(a,l-r),r),!0},SetextHeading:void 0},es=class{constructor(t){this.stage=0,this.elts=[],this.pos=0,this.start=t.start,this.advance(t.content)}nextLine(t,n,r){if(this.stage==-1)return!1;let i=r.content+`
`+n.scrub(),o=this.advance(i);return o>-1&&o<i.length?this.complete(t,r,o):!1}finish(t,n){return(this.stage==2||this.stage==3)&&Qn(n.content,this.pos)==n.content.length?this.complete(t,n,n.content.length):!1}complete(t,n,r){return t.addLeafElement(n,M(x.LinkReference,this.start,this.start+r,this.elts)),!0}nextStage(t){return t?(this.pos=t.to-this.start,this.elts.push(t),this.stage++,!0):(t===!1&&(this.stage=-1),!1)}advance(t){for(;;){if(this.stage==-1)return-1;if(this.stage==0){if(!this.nextStage(Gl(t,this.pos,this.start,!0)))return-1;if(t.charCodeAt(this.pos)!=58)return this.stage=-1;this.elts.push(M(x.LinkMark,this.pos+this.start,this.pos+this.start+1)),this.pos++}else if(this.stage==1){if(!this.nextStage(Vl(t,Qn(t,this.pos),this.start)))return-1}else if(this.stage==2){let n=Qn(t,this.pos),r=0;if(n>this.pos){let i=Il(t,n,this.start);if(i){let o=Uo(t,i.to-this.start);o>0&&(this.nextStage(i),r=o)}}return r||(r=Uo(t,this.pos)),r>0&&r<t.length?r:-1}else return Uo(t,this.pos)}}};function Uo(e,t){for(;t<e.length;t++){let n=e.charCodeAt(t);if(n==10)break;if(!Te(n))return-1}return t}var ts=class{nextLine(t,n,r){let i=n.depth<t.stack.length?-1:Xl(n),o=n.next;if(i<0)return!1;let s=M(x.HeaderMark,t.lineStart+n.pos,t.lineStart+i);return t.nextLine(),t.addLeafElement(r,M(o==61?x.SetextHeading1:x.SetextHeading2,r.start,t.prevLineEnd(),[...t.parser.parseInline(r.content,r.start),s])),!0}finish(){return!1}},Ml={LinkReference(e,t){return t.content.charCodeAt(0)==91?new es(t):null},SetextHeading(){return new ts}},cd=[(e,t)=>Rl(t)>=0,(e,t)=>Pl(t)>=0,(e,t)=>Cl(t)>=0,(e,t)=>cs(t,e,!0)>=0,(e,t)=>ps(t,e,!0)>=0,(e,t)=>ls(t,e,!0)>=0,(e,t)=>Wl(t,e,!0)>=0],pd={text:"",end:0},ns=class{constructor(t,n,r,i){this.parser=t,this.input=n,this.ranges=i,this.line=new Yo,this.atEnd=!1,this.reusePlaceholders=new Map,this.stoppedAt=null,this.rangeI=0,this.to=i[i.length-1].to,this.lineStart=this.absoluteLineStart=this.absoluteLineEnd=i[0].from,this.block=hr.create(x.Document,0,this.lineStart,0,0),this.stack=[this.block],this.fragments=r.length?new ss(r,n):null,this.readLine()}get parsedPos(){return this.absoluteLineStart}advance(){if(this.stoppedAt!=null&&this.absoluteLineStart>this.stoppedAt)return this.finish();let{line:t}=this;for(;;){for(let r=0;;){let i=t.depth<this.stack.length?this.stack[this.stack.length-1]:null;for(;r<t.markers.length&&(!i||t.markers[r].from<i.end);){let o=t.markers[r++];this.addNode(o.type,o.from,o.to)}if(!i)break;this.finishContext()}if(t.pos<t.text.length)break;if(!this.nextLine())return this.finish()}if(this.fragments&&this.reuseFragment(t.basePos))return null;e:for(;;){for(let r of this.parser.blockParsers)if(r){let i=r(this,t);if(i!=!1){if(i==!0)return null;t.forward();continue e}}break}if(t.pos==t.text.length)return this.nextLine()?null:this.finish();let n=new Fo(this.lineStart+t.pos,t.text.slice(t.pos));for(let r of this.parser.leafBlockParsers)if(r){let i=r(this,n);i&&n.parsers.push(i)}e:for(;this.nextLine()&&t.pos!=t.text.length;){if(t.indent<t.baseIndent+4){for(let r of this.parser.endLeafBlock)if(r(this,t,n))break e}for(let r of n.parsers)if(r.nextLine(this,t,n))return null;n.content+=`
`+t.scrub();for(let r of t.markers)n.marks.push(r)}return this.finishLeaf(n),null}stopAt(t){if(this.stoppedAt!=null&&this.stoppedAt<t)throw new RangeError("Can't move stoppedAt forward");this.stoppedAt=t}reuseFragment(t){if(!this.fragments.moveTo(this.absoluteLineStart+t,this.absoluteLineStart)||!this.fragments.matches(this.block.hash))return!1;let n=this.fragments.takeNodes(this);return n?(this.absoluteLineStart+=n,this.lineStart=Hl(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(t=this.depth-1){return this.parser.nodeSet.types[this.stack[t].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(t){let n=pd;if(n.end=t,t>=this.to)n.text="";else if(n.text=this.lineChunkAt(t),n.end+=n.text.length,this.ranges.length>1){let r=this.absoluteLineStart,i=this.rangeI;for(;this.ranges[i].to<n.end;){i++;let o=this.ranges[i].from,s=this.lineChunkAt(o);n.end=o+s.length,n.text=n.text.slice(0,this.ranges[i-1].to-r)+s,r=n.end-n.text.length}}return n}readLine(){let{line:t}=this,{text:n,end:r}=this.scanLine(this.absoluteLineStart);for(this.absoluteLineEnd=r,t.reset(n);t.depth<this.stack.length;t.depth++){let i=this.stack[t.depth],o=this.parser.skipContextMarkup[i.type];if(!o)throw new Error("Unhandled block context "+x[i.type]);let s=this.line.markers.length;if(!o(i,this,t)){this.line.markers.length>s&&(i.end=this.line.markers[this.line.markers.length-1].to),t.forward();break}t.forward()}}lineChunkAt(t){let n=this.input.chunk(t),r;if(this.input.lineChunks)r=n==`
`?"":n;else{let i=n.indexOf(`
`);r=i<0?n:n.slice(0,i)}return t+r.length>this.to?r.slice(0,this.to-t):r}prevLineEnd(){return this.atEnd?this.lineStart:this.lineStart-1}startContext(t,n,r=0){this.block=hr.create(t,r,this.lineStart+n,this.block.hash,this.lineStart+this.line.text.length),this.stack.push(this.block)}startComposite(t,n,r=0){this.startContext(this.parser.getNodeType(t),n,r)}addNode(t,n,r){typeof t=="number"&&(t=new L.Tree(this.parser.nodeSet.types[t],Bt,Bt,(r!=null?r:this.prevLineEnd())-n)),this.block.addChild(t,n-this.block.from)}addElement(t){this.block.addChild(t.toTree(this.parser.nodeSet),t.from-this.block.from)}addLeafElement(t,n){this.addNode(this.buffer.writeElements(os(n.children,t.marks),-n.from).finish(n.type,n.to-n.from),n.from)}finishContext(){let t=this.stack.pop(),n=this.stack[this.stack.length-1];n.addChild(t.toTree(this.parser.nodeSet),t.from-n.from),this.block=n}finish(){for(;this.stack.length>1;)this.finishContext();return this.addGaps(this.block.toTree(this.parser.nodeSet,this.lineStart))}addGaps(t){return this.ranges.length>1?jl(this.ranges,0,t.topNode,this.ranges[0].from,this.reusePlaceholders):t}finishLeaf(t){for(let r of t.parsers)if(r.finish(this,t))return;let n=os(this.parser.parseInline(t.content,t.start),t.marks);this.addNode(this.buffer.writeElements(n,-t.start).finish(x.Paragraph,t.content.length),t.start)}elt(t,n,r,i){return typeof t=="string"?M(this.parser.getNodeType(t),n,r,i):new yr(t,n)}get buffer(){return new gr(this.parser.nodeSet)}};function jl(e,t,n,r,i){let o=e[t].to,s=[],a=[],l=n.from+r;function c(p,u){for(;u?p>=o:p>o;){let O=e[t+1].from-o;r+=O,p+=O,t++,o=e[t].to}}for(let p=n.firstChild;p;p=p.nextSibling){c(p.from+r,!0);let u=p.from+r,O,d=i.get(p.tree);d?O=d:p.to+r>o?(O=jl(e,t,p,r,i),c(p.to+r,!1)):O=p.toTree(),s.push(O),a.push(u-l)}return c(n.to+r,!1),new L.Tree(n.type,s,a,n.to+r-l,n.tree?n.tree.propValues:void 0)}var rs=class e extends L.Parser{constructor(t,n,r,i,o,s,a,l,c){super(),this.nodeSet=t,this.blockParsers=n,this.leafBlockParsers=r,this.blockNames=i,this.endLeafBlock=o,this.skipContextMarkup=s,this.inlineParsers=a,this.inlineNames=l,this.wrappers=c,this.nodeTypes=Object.create(null);for(let p of t.types)this.nodeTypes[p.name]=p.id}createParse(t,n,r){let i=new ns(this,t,n,r);for(let o of this.wrappers)i=o(i,t,n,r);return i}configure(t){let n=is(t);if(!n)return this;let{nodeSet:r,skipContextMarkup:i}=this,o=this.blockParsers.slice(),s=this.leafBlockParsers.slice(),a=this.blockNames.slice(),l=this.inlineParsers.slice(),c=this.inlineNames.slice(),p=this.endLeafBlock.slice(),u=this.wrappers;if(Sn(n.defineNodes)){i=Object.assign({},i);let O=r.types.slice(),d;for(let f of n.defineNodes){let{name:m,block:g,composite:b,style:v}=typeof f=="string"?{name:f}:f;if(O.some(E=>E.name==m))continue;b&&(i[O.length]=(E,T,P)=>b(T,P,E.value));let $=O.length,S=b?["Block","BlockContext"]:g?$>=x.ATXHeading1&&$<=x.SetextHeading2?["Block","LeafBlock","Heading"]:["Block","LeafBlock"]:void 0;O.push(L.NodeType.define({id:$,name:m,props:S&&[[L.NodeProp.group,S]]})),v&&(d||(d={}),Array.isArray(v)||v instanceof X.Tag?d[m]=v:Object.assign(d,v))}r=new L.NodeSet(O),d&&(r=r.extend((0,X.styleTags)(d)))}if(Sn(n.props)&&(r=r.extend(...n.props)),Sn(n.remove))for(let O of n.remove){let d=this.blockNames.indexOf(O),f=this.inlineNames.indexOf(O);d>-1&&(o[d]=s[d]=void 0),f>-1&&(l[f]=void 0)}if(Sn(n.parseBlock))for(let O of n.parseBlock){let d=a.indexOf(O.name);if(d>-1)o[d]=O.parse,s[d]=O.leaf;else{let f=O.before?fr(a,O.before):O.after?fr(a,O.after)+1:a.length-1;o.splice(f,0,O.parse),s.splice(f,0,O.leaf),a.splice(f,0,O.name)}O.endLeaf&&p.push(O.endLeaf)}if(Sn(n.parseInline))for(let O of n.parseInline){let d=c.indexOf(O.name);if(d>-1)l[d]=O.parse;else{let f=O.before?fr(c,O.before):O.after?fr(c,O.after)+1:c.length-1;l.splice(f,0,O.parse),c.splice(f,0,O.name)}}return n.wrap&&(u=u.concat(n.wrap)),new e(r,o,s,a,p,i,l,c,u)}getNodeType(t){let n=this.nodeTypes[t];if(n==null)throw new RangeError(`Unknown node type '${t}'`);return n}parseInline(t,n){let r=new wn(this,t,n);e:for(let i=n;i<r.end;){let o=r.char(i);for(let s of this.inlineParsers)if(s){let a=s(r,o,i);if(a>=0){i=a;continue e}}i++}return r.resolveMarkers(0)}};function Sn(e){return e!=null&&e.length>0}function is(e){if(!Array.isArray(e))return e;if(e.length==0)return null;let t=is(e[0]);if(e.length==1)return t;let n=is(e.slice(1));if(!n||!t)return t||n;let r=(s,a)=>(s||Bt).concat(a||Bt),i=t.wrap,o=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?o?(s,a,l,c)=>i(o(s,a,l,c),a,l,c):i:o}}function fr(e,t){let n=e.indexOf(t);if(n<0)throw new RangeError(`Position specified relative to unknown parser ${t}`);return n}var Zl=[L.NodeType.none];for(let e=1,t;t=x[e];e++)Zl[e]=L.NodeType.define({id:e,name:t,props:e>=x.Escape?[]:[[L.NodeProp.group,e in El?["Block","BlockContext"]:["Block","LeafBlock"]]],top:t=="Document"});var Bt=[],gr=class{constructor(t){this.nodeSet=t,this.content=[],this.nodes=[]}write(t,n,r,i=0){return this.content.push(t,n,r,4+i*4),this}writeElements(t,n=0){for(let r of t)r.writeTo(this,n);return this}finish(t,n){return L.Tree.build({buffer:this.content,nodeSet:this.nodeSet,reused:this.nodes,topID:t,length:n})}},Ve=class{constructor(t,n,r,i=Bt){this.type=t,this.from=n,this.to=r,this.children=i}writeTo(t,n){let r=t.content.length;t.writeElements(this.children,n),t.content.push(this.type,this.from+n,this.to+n,t.content.length+4-r)}toTree(t){return new gr(t).writeElements(this.children,-this.from).finish(this.type,this.to-this.from)}},yr=class{constructor(t,n){this.tree=t,this.from=n}get to(){return this.from+this.tree.length}get type(){return this.tree.type.id}get children(){return Bt}writeTo(t,n){t.nodes.push(this.tree),t.content.push(t.nodes.length-1,this.from+n,this.to+n,-1)}toTree(){return this.tree}};function M(e,t,n,r){return new Ve(e,t,n,r)}var Ll={resolve:"Emphasis",mark:"EmphasisMark"},Dl={resolve:"Emphasis",mark:"EmphasisMark"},Qt={},br={},ue=class{constructor(t,n,r,i){this.type=t,this.from=n,this.to=r,this.side=i}},vl="!\"#$%&'()*+,-./:;<=>?@[\\]^_`{|}~",kn=/[!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~\xA1\u2010-\u2027]/;try{kn=new RegExp("[\\p{S}|\\p{P}]","u")}catch(e){}var zo={Escape(e,t,n){if(t!=92||n==e.end-1)return-1;let r=e.char(n+1);for(let i=0;i<vl.length;i++)if(vl.charCodeAt(i)==r)return e.append(M(x.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(M(x.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,o=0;for(;r<e.end;r++)if(e.char(r)==96){if(o++,o==i&&e.char(r+1)!=96)return e.append(M(x.InlineCode,n,r+1,[M(x.CodeMark,n,n+i),M(x.CodeMark,r+1-i,r+1)]))}else o=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(M(x.Autolink,n,n+1+i[0].length,[M(x.LinkMark,n,n+1),M(x.URL,n+1,n+i[0].length),M(x.LinkMark,n+i[0].length,n+1+i[0].length)]));let o=/^!--[^>](?:-[^-]|[^-])*?-->/i.exec(r);if(o)return e.append(M(x.Comment,n,n+1+o[0].length));let s=/^\?[^]*?\?>/.exec(r);if(s)return e.append(M(x.ProcessingInstruction,n,n+1+s[0].length));let a=/^(?:![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 a?e.append(M(x.HTMLTag,n,n+1+a[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),o=e.slice(r,r+1),s=kn.test(i),a=kn.test(o),l=/\s|^$/.test(i),c=/\s|^$/.test(o),p=!c&&(!a||l||s),u=!l&&(!s||c||a),O=p&&(t==42||!u||s),d=u&&(t==42||!p||a);return e.append(new ue(t==95?Ll:Dl,n,r,(O?1:0)|(d?2:0)))},HardBreak(e,t,n){if(t==92&&e.char(n+1)==10)return e.append(M(x.HardBreak,n,n+2));if(t==32){let r=n+1;for(;e.char(r)==32;)r++;if(e.char(r)==10&&r>=n+2)return e.append(M(x.HardBreak,n,r+1))}return-1},Link(e,t,n){return t==91?e.append(new ue(Qt,n,n+1,1)):-1},Image(e,t,n){return t==33&&e.char(n+1)==91?e.append(new ue(br,n,n+2,1)):-1},LinkEnd(e,t,n){if(t!=93)return-1;for(let r=e.parts.length-1;r>=0;r--){let i=e.parts[r];if(i instanceof ue&&(i.type==Qt||i.type==br)){if(!i.side||e.skipSpace(i.to)==n&&!/[(\[]/.test(e.slice(n+1,n+2)))return e.parts[r]=null,-1;let o=e.takeContent(r),s=e.parts[r]=ud(e,o,i.type==Qt?x.Link:x.Image,i.from,n+1);if(i.type==Qt)for(let a=0;a<r;a++){let l=e.parts[a];l instanceof ue&&l.type==Qt&&(l.side=0)}return s.to}}return-1}};function ud(e,t,n,r,i){let{text:o}=e,s=e.char(i),a=i;if(t.unshift(M(x.LinkMark,r,r+(n==x.Image?2:1))),t.push(M(x.LinkMark,i-1,i)),s==40){let l=e.skipSpace(i+1),c=Vl(o,l-e.offset,e.offset),p;c&&(l=e.skipSpace(c.to),l!=c.to&&(p=Il(o,l-e.offset,e.offset),p&&(l=e.skipSpace(p.to)))),e.char(l)==41&&(t.push(M(x.LinkMark,i,i+1)),a=l+1,c&&t.push(c),p&&t.push(p),t.push(M(x.LinkMark,l,a)))}else if(s==91){let l=Gl(o,i-e.offset,e.offset,!1);l&&(t.push(l),a=l.to)}return M(n,r,a,t)}function Vl(e,t,n){if(e.charCodeAt(t)==60){for(let i=t+1;i<e.length;i++){let o=e.charCodeAt(i);if(o==62)return M(x.URL,t+n,i+1+n);if(o==60||o==10)return!1}return null}else{let i=0,o=t;for(let s=!1;o<e.length;o++){let a=e.charCodeAt(o);if(Te(a))break;if(s)s=!1;else if(a==40)i++;else if(a==41){if(!i)break;i--}else a==92&&(s=!0)}return o>t?M(x.URL,t+n,o+n):o==e.length?null:!1}}function Il(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 o=t+1,s=!1;o<e.length;o++){let a=e.charCodeAt(o);if(s)s=!1;else{if(a==i)return M(x.LinkTitle,t+n,o+1+n);a==92&&(s=!0)}}return null}function Gl(e,t,n,r){for(let i=!1,o=t+1,s=Math.min(e.length,o+999);o<s;o++){let a=e.charCodeAt(o);if(i)i=!1;else{if(a==93)return r?!1:M(x.LinkLabel,t+n,o+1+n);if(r&&!Te(a)&&(r=!1),a==91)return!1;a==92&&(i=!0)}}return null}var wn=class{constructor(t,n,r){this.parser=t,this.text=n,this.offset=r,this.parts=[]}char(t){return t>=this.end?-1:this.text.charCodeAt(t-this.offset)}get end(){return this.offset+this.text.length}slice(t,n){return this.text.slice(t-this.offset,n-this.offset)}append(t){return this.parts.push(t),t.to}addDelimiter(t,n,r,i,o){return this.append(new ue(t,n,r,(i?1:0)|(o?2:0)))}get hasOpenLink(){for(let t=this.parts.length-1;t>=0;t--){let n=this.parts[t];if(n instanceof ue&&(n.type==Qt||n.type==br))return!0}return!1}addElement(t){return this.append(t)}resolveMarkers(t){for(let r=t;r<this.parts.length;r++){let i=this.parts[r];if(!(i instanceof ue&&i.type.resolve&&i.side&2))continue;let o=i.type==Ll||i.type==Dl,s=i.to-i.from,a,l=r-1;for(;l>=t;l--){let m=this.parts[l];if(m instanceof ue&&m.side&1&&m.type==i.type&&!(o&&(i.side&1||m.side&2)&&(m.to-m.from+s)%3==0&&((m.to-m.from)%3||s%3))){a=m;break}}if(!a)continue;let c=i.type.resolve,p=[],u=a.from,O=i.to;if(o){let m=Math.min(2,a.to-a.from,s);u=a.to-m,O=i.from+m,c=m==1?"Emphasis":"StrongEmphasis"}a.type.mark&&p.push(this.elt(a.type.mark,u,a.to));for(let m=l+1;m<r;m++)this.parts[m]instanceof Ve&&p.push(this.parts[m]),this.parts[m]=null;i.type.mark&&p.push(this.elt(i.type.mark,i.from,O));let d=this.elt(c,u,O,p);this.parts[l]=o&&a.from!=u?new ue(a.type,a.from,u,a.side):null,(this.parts[r]=o&&i.to!=O?new ue(i.type,O,i.to,i.side):null)?this.parts.splice(r,0,d):this.parts[r]=d}let n=[];for(let r=t;r<this.parts.length;r++){let i=this.parts[r];i instanceof Ve&&n.push(i)}return n}findOpeningDelimiter(t){for(let n=this.parts.length-1;n>=0;n--){let r=this.parts[n];if(r instanceof ue&&r.type==t&&r.side&1)return n}return null}takeContent(t){let n=this.resolveMarkers(t);return this.parts.length=t,n}getDelimiterAt(t){let n=this.parts[t];return n instanceof ue?n:null}skipSpace(t){return Qn(this.text,t-this.offset)+this.offset}elt(t,n,r,i){return typeof t=="string"?M(this.parser.getNodeType(t),n,r,i):new yr(t,n)}};wn.linkStart=Qt;wn.imageStart=br;function os(e,t){if(!t.length)return e;if(!e.length)return t;let n=e.slice(),r=0;for(let i of t){for(;r<n.length&&n[r].to<i.to;)r++;if(r<n.length&&n[r].from<i.from){let o=n[r];o instanceof Ve&&(n[r]=new Ve(o.type,o.from,o.to,os(o.children,[i])))}else n.splice(r++,0,i)}return n}var Od=[x.CodeBlock,x.ListItem,x.OrderedList,x.BulletList],ss=class{constructor(t,n){this.fragments=t,this.input=n,this.i=0,this.fragment=null,this.fragmentEnd=-1,this.cursor=null,t.length&&(this.fragment=t[this.i++])}nextFragment(){this.fragment=this.i<this.fragments.length?this.fragments[this.i++]:null,this.cursor=null,this.fragmentEnd=-1}moveTo(t,n){for(;this.fragment&&this.fragment.to<=t;)this.nextFragment();if(!this.fragment||this.fragment.from>(t?t-1:0))return!1;if(this.fragmentEnd<0){let o=this.fragment.to;for(;o>0&&this.input.read(o-1,o)!=`
`;)o--;this.fragmentEnd=o?o-1:0}let r=this.cursor;r||(r=this.cursor=this.fragment.tree.cursor(),r.firstChild());let i=t+this.fragment.offset;for(;r.to<=i;)if(!r.parent())return!1;for(;;){if(r.from>=i)return this.fragment.from<=n;if(!r.childAfter(i))return!1}}matches(t){let n=this.cursor.tree;return n&&n.prop(L.NodeProp.contextHash)==t}takeNodes(t){let n=this.cursor,r=this.fragment.offset,i=this.fragmentEnd-(this.fragment.openEnd?1:0),o=t.absoluteLineStart,s=o,a=t.block.children.length,l=s,c=a;for(;;){if(n.to-r>i){if(n.type.isAnonymous&&n.firstChild())continue;break}let p=Hl(n.from-r,t.ranges);if(n.to-r<=t.ranges[t.rangeI].to)t.addNode(n.tree,p);else{let u=new L.Tree(t.parser.nodeSet.types[x.Paragraph],[],[],0,t.block.hashProp);t.reusePlaceholders.set(u,n.tree),t.addNode(u,p)}if(n.type.is("Block")&&(Od.indexOf(n.type.id)<0?(s=n.to-r,a=t.block.children.length):(s=l,a=c),l=n.to-r,c=t.block.children.length),!n.nextSibling())break}for(;t.block.children.length>a;)t.block.children.pop(),t.block.positions.pop();return s-o}};function Hl(e,t){let n=e;for(let r=1;r<t.length;r++){let i=t[r-1].to,o=t[r].from;i<e&&(n-=o-i)}return n}var dd=(0,X.styleTags)({"Blockquote/...":X.tags.quote,HorizontalRule:X.tags.contentSeparator,"ATXHeading1/... SetextHeading1/...":X.tags.heading1,"ATXHeading2/... SetextHeading2/...":X.tags.heading2,"ATXHeading3/...":X.tags.heading3,"ATXHeading4/...":X.tags.heading4,"ATXHeading5/...":X.tags.heading5,"ATXHeading6/...":X.tags.heading6,"Comment CommentBlock":X.tags.comment,Escape:X.tags.escape,Entity:X.tags.character,"Emphasis/...":X.tags.emphasis,"StrongEmphasis/...":X.tags.strong,"Link/... Image/...":X.tags.link,"OrderedList/... BulletList/...":X.tags.list,"BlockQuote/...":X.tags.quote,"InlineCode CodeText":X.tags.monospace,"URL Autolink":X.tags.url,"HeaderMark HardBreak QuoteMark ListMark LinkMark EmphasisMark CodeMark":X.tags.processingInstruction,"CodeInfo LinkLabel":X.tags.labelName,LinkTitle:X.tags.string,Paragraph:X.tags.content}),us=new rs(new L.NodeSet(Zl).extend(dd),Object.keys(mr).map(e=>mr[e]),Object.keys(mr).map(e=>Ml[e]),Object.keys(mr),cd,El,Object.keys(zo).map(e=>zo[e]),Object.keys(zo),[]);function md(e,t,n){let r=[];for(let i=e.firstChild,o=t;;i=i.nextSibling){let s=i?i.from:n;if(s>o&&r.push({from:o,to:s}),!i)break;o=i.to}return r}function Bl(e){let{codeParser:t,htmlParser:n}=e;return{wrap:(0,L.parseMixed)((i,o)=>{let s=i.type.id;if(t&&(s==x.CodeBlock||s==x.FencedCode)){let a="";if(s==x.FencedCode){let c=i.node.getChild(x.CodeInfo);c&&(a=o.read(c.from,c.to))}let l=t(a);if(l)return{parser:l,overlay:c=>c.type.id==x.CodeText,bracketed:s==x.FencedCode}}else if(n&&(s==x.HTMLBlock||s==x.HTMLTag||s==x.CommentBlock))return{parser:n,overlay:md(i.node,i.from,i.to)};return null})}}var fd={resolve:"Strikethrough",mark:"StrikethroughMark"},hd={defineNodes:[{name:"Strikethrough",style:{"Strikethrough/...":X.tags.strikethrough}},{name:"StrikethroughMark",style:X.tags.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),o=/\s|^$/.test(r),s=/\s|^$/.test(i),a=kn.test(r),l=kn.test(i);return e.addDelimiter(fd,n,n+2,!s&&(!l||o||a),!o&&(!a||s||l))},after:"Emphasis"}]};function $n(e,t,n=0,r,i=0){let o=0,s=!0,a=-1,l=-1,c=!1,p=()=>{r.push(e.elt("TableCell",i+a,i+l,e.parser.parseInline(t.slice(a,l),i+a)))};for(let u=n;u<t.length;u++){let O=t.charCodeAt(u);O==124&&!c?((!s||a>-1)&&o++,s=!1,r&&(a>-1&&p(),r.push(e.elt("TableDelimiter",u+i,u+i+1))),a=l=-1):(c||O!=32&&O!=9)&&(a<0&&(a=u),l=u+1),c=!c&&O==92}return a>-1&&(o++,r&&p()),o}function xl(e,t){for(let n=t;n<e.length;n++){let r=e.charCodeAt(n);if(r==124)return!0;r==92&&n++}return!1}var Nl=/^[>\s]*\|?(\s*:?-+:?\s*\|)+(\s*:?-+:?\s*)?$/,vr=class{constructor(){this.rows=null}nextLine(t,n,r){if(this.rows==null){this.rows=!1;let i;if((n.next==45||n.next==58||n.next==124)&&Nl.test(i=n.text.slice(n.pos))){let o=[];$n(t,r.content,0,o,r.start)==$n(t,i,0)&&(this.rows=[t.elt("TableHeader",r.start,r.start+r.content.length,o),t.elt("TableDelimiter",t.lineStart+n.pos,t.lineStart+n.text.length)])}}else if(this.rows){let i=[];$n(t,n.text,n.pos,i,t.lineStart),this.rows.push(t.elt("TableRow",t.lineStart+n.pos,t.lineStart+n.text.length,i))}return!1}finish(t,n){return this.rows?(t.addLeafElement(n,t.elt("Table",n.start,n.start+n.content.length,this.rows)),!0):!1}},gd={defineNodes:[{name:"Table",block:!0},{name:"TableHeader",style:{"TableHeader/...":X.tags.heading}},"TableRow",{name:"TableCell",style:X.tags.content},{name:"TableDelimiter",style:X.tags.processingInstruction}],parseBlock:[{name:"Table",leaf(e,t){return xl(t.content,0)?new vr:null},endLeaf(e,t,n){if(n.parsers.some(i=>i instanceof vr)||!xl(t.text,t.basePos))return!1;let r=e.peekLine();return Nl.test(r)&&$n(e,t.text,t.basePos)==$n(e,r,t.basePos)},before:"SetextHeading"}]},as=class{nextLine(){return!1}finish(t,n){return t.addLeafElement(n,t.elt("Task",n.start,n.start+n.content.length,[t.elt("TaskMarker",n.start,n.start+3),...t.parser.parseInline(n.content.slice(3),n.start+3)])),!0}},yd={defineNodes:[{name:"Task",block:!0,style:X.tags.list},{name:"TaskMarker",style:X.tags.atom}],parseBlock:[{name:"TaskList",leaf(e,t){return/^\[[ xX]\][ \t]/.test(t.content)&&e.parentType().name=="ListItem"?new as:null},after:"SetextHeading"}]},Sl=/(www\.)|(https?:\/\/)|([\w.+-]{1,100}@)|(mailto:|xmpp:)/gy,Ql=/[\w-]+(\.[\w-]+)+(:\d+)?(\/[^\s<]*)?/gy,bd=/[\w-]+\.[\w-]+($|[/:])/,$l=/[\w.+-]+@[\w-]+(\.[\w.-]+)+/gy,kl=/\/[a-zA-Z\d@.]+/gy;function wl(e,t,n,r){let i=0;for(let o=t;o<n;o++)e[o]==r&&i++;return i}function vd(e,t){Ql.lastIndex=t;let n=Ql.exec(e);if(!n||bd.exec(n[0])[0].indexOf("_")>-1)return-1;let r=t+n[0].length;for(;;){let i=e[r-1],o;if(/[?!.,:*_~]/.test(i)||i==")"&&wl(e,t,r,")")>wl(e,t,r,"("))r--;else if(i==";"&&(o=/&(?:#\d+|#x[a-f\d]+|\w+);$/.exec(e.slice(t,r))))r=t+o.index;else break}return r}function Tl(e,t){$l.lastIndex=t;let n=$l.exec(e);if(!n)return-1;let r=n[0][n[0].length-1];return r=="_"||r=="-"?-1:t+n[0].length-(r=="."?1:0)}var xd={parseInline:[{name:"Autolink",parse(e,t,n){let r=n-e.offset;if(r&&/\w/.test(e.text[r-1]))return-1;Sl.lastIndex=r;let i=Sl.exec(e.text),o=-1;if(!i)return-1;if(i[1]||i[2]){if(o=vd(e.text,r+i[0].length),o>-1&&e.hasOpenLink){let s=/([^\[\]]|\[[^\]]*\])*/.exec(e.text.slice(r,o));o=r+s[0].length}}else i[3]?o=Tl(e.text,r):(o=Tl(e.text,r+i[0].length),o>-1&&i[0]=="xmpp:"&&(kl.lastIndex=o,i=kl.exec(e.text),i&&(o=i.index+i[0].length)));return o<0?-1:(e.addElement(e.elt("URL",n,o+e.offset)),o+e.offset)}}]},Ul=[gd,yd,hd,xd];function zl(e,t,n){return(r,i,o)=>{if(i!=e||r.char(o+1)==e)return-1;let s=[r.elt(n,o,o+1)];for(let a=o+1;a<r.end;a++){let l=r.char(a);if(l==e)return r.addElement(r.elt(t,o,a+1,s.concat(r.elt(n,a,a+1))));if(l==92&&s.push(r.elt("Escape",a,a+++2)),Te(l))break}return-1}}var Bg={defineNodes:[{name:"Superscript",style:X.tags.special(X.tags.content)},{name:"SuperscriptMark",style:X.tags.processingInstruction}],parseInline:[{name:"Superscript",parse:zl(94,"Superscript","SuperscriptMark")}]},Ng={defineNodes:[{name:"Subscript",style:X.tags.special(X.tags.content)},{name:"SubscriptMark",style:X.tags.processingInstruction}],parseInline:[{name:"Subscript",parse:zl(126,"Subscript","SubscriptMark")}]},Ug={defineNodes:[{name:"Emoji",style:X.tags.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))}}]};var w=class{};w.InlineMath="InlineMath",w.DisplayMath="DisplayMath",w.Dollar="Dollar",w.DollarInlineMath="DollarInlineMath",w.DollarDisplayMath="DollarDisplayMath",w.DollarDisplayBlockMath="DollarDisplayBlockMath",w.Highlight="Highlight",w.HighlightEqual="HighlightEqual",w.Wikilink="Wikilink",w.ObsidianComment="ObsidianComment",w.ObsidianCommentPercentage="ObsidianCommentPercentage";function Sd(e){return e==32||e==9||e==10||e==13}var Qd={name:"InlineMath",parse(e,t,n){if(t!==36)return-1;let r=e.char(n+1)===36;if(!r&&Sd(e.char(n+1)))return-1;let i=r?2:1,o=r?w.DollarDisplayMath:w.DollarInlineMath,s=r?w.DisplayMath:w.InlineMath,a=n,l=n+i;for(let c=l;c<e.end;c++){let p=e.char(c);if(p===92){c++;continue}else{if(p===10)break;if(p!==36)continue}let u=e.char(c+1);if(r){if(u!==36)continue}else if(e.skipSpace(c-1)!==c-1||u>=48&&u<=57)continue;let O=c+i,d=c;return!r&&O-a>=6&&e.char(n+1)===123&&e.char(n+2)===125&&e.char(c-2)===123&&e.char(c-1)===125&&(l+=2,d-=2),e.addElement(e.elt(o,a,O,[e.elt(w.Dollar,a,l),e.elt(s,l,d),e.elt(w.Dollar,d,O)]))}return r?e.addElement(e.elt(w.DollarInlineMath,a,a+2,[e.elt(w.Dollar,a,a+1),e.elt(w.InlineMath,a+1,a+1),e.elt(w.Dollar,a+1,a+2)])):-1}};function Fl(e){if(e.next!==36||e.indent-e.baseIndent>3)return-1;let t=e.pos+1;for(;t<e.text.length&&e.text.charCodeAt(t)==e.next;)t++;if(t<e.pos+2)return-1;for(let n=t;n<e.text.length;n++)if(e.text.charCodeAt(n)===36)return-1;return t}function $d(e,t){let n=e.pos;for(;n<e.text.length&&e.text.charCodeAt(n)!==36;)n++;let r=n;for(;r<e.text.length&&e.text.charCodeAt(r)===36;)r++;return r-n>=t&&e.skipSpace(r)===e.text.length?[n,r]:null}function Tn(e,t,n){let r=e.at(-1);r&&r.to===t&&!(r instanceof Ve)?r.to=n:e.push({from:t,to:n,kind:w.DisplayMath})}var kd={name:"DisplayMath",parse(e,t){let n=Fl(t);if(n<0)return!1;let r=t.pos,i=n-r,o=e.lineStart+r,s=t.skipSpace(n),a=t.text.length+e.lineStart,l=[e.elt(w.Dollar,o,e.lineStart+n)],c=!0;if(s<t.text.length){let d=e.lineStart+s,f=e.lineStart+t.text.length;Tn(l,d,f),c=!1}let p=e.depth;for(;e.nextLine()&&(t.text!==""&&p>=2||p<2);c=!1){a=t.text.length+e.lineStart;let d=$d(t,i);if(d!==null){for(let v of t.markers)l.push(v);let g=e.lineStart+d[0],b=e.lineStart+d[1];e.lineStart+t.basePos<g&&(Tn(l,e.lineStart-1,e.lineStart),Tn(l,e.lineStart+t.basePos,g)),l.push(e.elt(w.Dollar,g,b)),e.nextLine();break}c||Tn(l,e.lineStart-1,e.lineStart);for(let g of t.markers)l.push(g);let f=e.lineStart+t.basePos,m=e.lineStart+t.text.length;f<m&&Tn(l,f,m)}let u=l.map(d=>d instanceof Ve?d:e.elt(w.DisplayMath,d.from,d.to)),O=e.elt(w.DollarDisplayBlockMath,o,a,u);return e.addElement(O),!0},endLeaf(e,t){return Fl(t)>=0},after:"FencedCode"},wd={defineNodes:[{name:w.InlineMath},{name:w.DisplayMath},{name:w.Dollar},{name:w.DollarInlineMath},{name:w.DollarDisplayMath},{name:w.DollarDisplayBlockMath,block:!0}],parseInline:[Qd],parseBlock:[kd],wrap:(0,Os.parseMixed)(e=>e.name===w.DollarDisplayBlockMath?{parser:St,overlay:t=>t.name===w.DisplayMath,bracketed:!0}:e.name===w.InlineMath||e.name===w.DisplayMath&&e.node.parent.name===w.DollarDisplayMath?{parser:St,bracketed:!0}:null)},Td={mark:w.HighlightEqual,resolve:w.Highlight},Ed={defineNodes:[{name:w.Highlight},{name:w.HighlightEqual}],parseInline:[{name:w.Highlight,parse(e,t,n){return t!==61||e.char(n+1)!==61?-1:e.addDelimiter(Td,n,n+2,!0,!0)}}]},Pd={defineNodes:[{name:w.Wikilink}],parseInline:[{name:w.Wikilink,parse(e,t,n){let r=t===91&&e.char(n+1)===91,i=!r&&t===33&&e.char(n+1)===91&&e.char(n+2)===91;if(!r&&!i)return-1;let o=n;i&&(n+=1);for(let s=n+2;s<e.end;s++)if(e.char(s)===93&&e.char(s+1)===93)return e.addElement(e.elt(w.Wikilink,o,s+2));return-1},before:"Link"}]};function Cd(e){let t=e.pos;for(;t<e.text.length;){if(e.text.charCodeAt(t)===37&&e.text.charCodeAt(t+1)===37)return t;t++}return-1}function Yl(e){if(!(e.next===37&&e.text.charCodeAt(e.pos+1)===37))return!1;for(let t=e.pos+2;t<e.text.length-1;t++)if(e.text.charCodeAt(t)===37&&e.text.charCodeAt(t+1)===37)return!1;return!0}var qd={defineNodes:[{name:w.ObsidianComment}],parseInline:[{name:w.ObsidianComment,parse(e,t,n){if(!(t===37&&e.char(n+1)===37))return-1;let r=n;for(let i=n+2;i<e.end-1;i++)if(e.char(i)===37&&e.char(i+1)===37)return e.addElement(e.elt(w.ObsidianComment,r,i+2));return-1}}],parseBlock:[{name:w.ObsidianComment,parse(e,t){if(!Yl(t))return!1;let n=e.lineStart+t.pos;for(;e.nextLine();){let r=Cd(t);if(r===-1)continue;let i=e.lineStart+r+2;return e.addElement(e.elt(w.ObsidianComment,n,i)),e.parser.parseInline(t.text.slice(r+2),i).map(o=>e.addElement(o)),e.nextLine(),!0}return!1},endLeaf(e,t){return Yl(t)}}]},Kl=e=>us.configure(Ul).configure(Ed).configure(Pd).configure(qd).configure(wd).configure(Bl({codeParser:t=>e.includes(t)?St:null})),ey=us.configure({wrap:(0,Os.parseMixed)(e=>e.name==="FencedCode"?{parser:St,overlay:t=>t.name==="CodeText",bracketed:!0}:null)});var I=class{constructor(){}};I.Apply=20,I.MinSlice=25,I.Slice=100,I.MinPause=100,I.MaxPause=500,I.ChunkBudget=3e3,I.ChunkTime=3e4,I.ChangeBonus=50,I.MaxParseAhead=1e5,I.InitViewport=3e3;var ds=Nt.ParseContext,fs=class e{constructor(t){let n=t;this.tree=n.tree,this.context=n}apply(t){var i,o;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(i=n.work)!=null&&i.call(n,I.Apply,r)||(o=n==null?void 0:n.takeTree)==null||o.call(n),new e(n)}static init(t){return n=>{var s,a,l;let r=Math.min(I.InitViewport,n.doc.length),i=(s=ds.create)==null?void 0:s.call(ds,t,n,{from:0,to:r});if(!i)throw new Error("Failed to create parse state");let o=(a=i.work)==null?void 0:a.call(i,I.Apply,r);if(o===void 0)throw new Error("Failed to work on parse state");return o&&((l=i.takeTree)==null||l.call(i)),new e(i)}}},Jl,ms=typeof navigator!="undefined"&&((Jl=navigator==null?void 0:navigator.scheduling)!=null&&Jl.isInputPending)?()=>{var e,t;return!!((t=(e=navigator==null?void 0:navigator.scheduling)==null?void 0:e.isInputPending)!=null&&t.call(e))}:null,hs=xr.StateEffect.define(),Rd=e=>{let t=window.setTimeout(()=>e(),I.MaxPause);return()=>window.clearTimeout(t)},gs=Sr.ViewPlugin.fromClass(class{constructor(t){this.view=t;this.working=null;this.workScheduled=0;this.chunkEnd=-1;this.chunkBudget=-1;this.workCallback=n=>this.work(n),this.scheduleWork()}update(t){var r,i;let n=this.view.state.field(st).context;((r=n.updateViewport)!=null&&r.call(n,t.view.viewport)||this.view.viewport.to>((i=n==null?void 0:n.treeLen)!=null?i:n.tree.length))&&this.scheduleWork(),(t.docChanged||t.selectionSet)&&(this.view.hasFocus&&(this.chunkBudget+=I.ChangeBonus),this.scheduleWork()),this.checkAsyncSchedule(n)}scheduleWork(){var r,i;if(this.working)return;let{state:t}=this.view,n=t.field(st);(n.tree!=n.context.tree||!((i=(r=n.context).isDone)!=null&&i.call(r,t.doc.length)))&&(this.working=Rd(this.workCallback))}work(t){var c,p,u,O,d,f,m;this.working=null;let n=Date.now();if(this.chunkEnd<n&&(this.chunkEnd<0||this.view.hasFocus)&&(this.chunkEnd=n+I.ChunkTime,this.chunkBudget=I.ChunkBudget),this.chunkBudget<=0)return;let{state:r,viewport:{to:i}}=this.view,o=r.field(st);if(o.tree==o.context.tree&&((p=(c=o.context).isDone)!=null&&p.call(c,i+I.MaxParseAhead)))return;let s=Date.now()+Math.min(this.chunkBudget,I.Slice,t&&!ms?Math.max(I.MinSlice,t.timeRemaining()-5):1e9),a=((u=o.context.treeLen)!=null?u:o.context.tree.length)<i&&r.doc.length>i+1e3,l=(d=(O=o.context).work)==null?void 0:d.call(O,()=>ms&&ms()||Date.now()>s,i+(a?0:I.MaxParseAhead));if(this.chunkBudget-=Date.now()-n,l||this.chunkBudget<=0){(m=(f=o.context).takeTree)==null||m.call(f);let g=this.view.state.field(st);g.context=o.context,g.tree=o.tree}this.chunkBudget>0&&!(l&&!a)&&this.scheduleWork(),this.checkAsyncSchedule(o.context)}checkAsyncSchedule(t){t.scheduleOn&&(this.workScheduled++,t.scheduleOn.then(()=>this.scheduleWork()).catch(n=>(0,Sr.logException)(this.view.state,n)).then(()=>this.workScheduled--),t.scheduleOn=null)}destroy(){this.working&&this.working()}isWorking(){return!!(this.working||this.workScheduled>0)}},{eventHandlers:{focus(){this.scheduleWork()}}}),Xd="formatting_formatting-math_formatting-math-begin_keyword_math_math-block",_d="formatting_formatting-math_formatting-math-end_keyword_math_math-";function Ad(e){let t=W(e),n=e.facet(Nt.language);function r(){let o=(0,Nt.syntaxTree)(e).topNode,s=o.firstChild,a=s==null?void 0:s.nextSibling,l=o.lastChild,c=[s,(s==null?void 0:s.name)===Xd,(s==null?void 0:s.from)===(s==null?void 0:s.to),(s==null?void 0:s.from)===0,l,(l==null?void 0:l.name)===_d,(l==null?void 0:l.from)===(l==null?void 0:l.to),a,(a==null?void 0:a.name)==="math"];return De(t.logLevel,"info")&&(console.debug("[Obsidian LaTeX Suite] isNotExcalidraw: checkSyntaxTree() conditions:",c.map(p=>!!p)),De(t.logLevel,"verbose")&&console.debug("[Obsidian LaTeX Suite] isNotExcalidraw: checkSyntaxTree() details:",c)),!c.every(p=>!!p)}return De(t.logLevel,"info")&&console.debug(`[Obsidian LaTeX Suite] isNotExcalidraw: languageFacet?.name=${n==null?void 0:n.name}, checkSyntaxTree()=${r()}, settings.excalidrawSupportEnabled=${t.excalidrawSupportEnabled}`),(n==null?void 0:n.name)==="hypermd"||(n==null?void 0:n.name)==="templater"||r()||!t.excalidrawSupportEnabled}var st=xr.StateField.define({create:e=>{let t=Ad(e)?Kl(W(e).forceMathLanguages):St;return fs.init(t)(e)},update:function(t,n){for(let r of n.effects)if(r.is(hs))return r.value;return t.apply(n)}});function at(e){return e.field(st).tree}var ec=[st,gs];var ys=class{constructor(t){this._mathBounds=[];this.equationsOverlays=null;this.shouldUpdate=!1;this.updateMathBounds(t)}get mathBounds(){return this._mathBounds}reset(){this._mathBounds=[],this.equationsOverlays=null,this.shouldUpdate=!1}getTree(t){return at(t)}init(t){return this.shouldUpdate&&(this.equationsOverlays=null,this.updateMathBounds(t),this.shouldUpdate=!1),this}update(t){(t.docChanged||t.viewportChanged)&&(this.shouldUpdate=!0)}getDollarBounds(t){let n=t.firstChild,r=t.lastChild.name==="Dollar"&&n.nextSibling?t.lastChild:{from:t.to,to:t.to};return{open:n,close:r}}updateMathBounds(t){let n=at(t.state),r=[],i=W(t.state);for(let{from:o,to:s}of t.visibleRanges)n.iterate({from:o,to:s,enter:a=>{if(a.name===w.DollarDisplayBlockMath){let{open:l,close:c}=this.getDollarBounds(a.node),p=a.node.getChildren("DisplayMath");if(p.length===0){r.push({inner_start:l.to,inner_end:c.from,outer_start:l.from,outer_end:c.to,mode:1,tree:null,overlay:[]});return}let u=a.node.enter(p[p.length-1].to,-1);if(!u)return;r.push({inner_start:l.to,inner_end:c.from,outer_start:l.from,outer_end:c.to,mode:1,tree:u,overlay:p})}else if(a.name===w.DollarInlineMath||a.name===w.DollarDisplayMath){let{open:l,close:c}=this.getDollarBounds(a.node),p=a.node.getChild("LaTeX");if(!p)return;let u=a.name===w.DollarInlineMath?0:1;r.push({inner_start:l.to,inner_end:c.from,outer_start:l.from,outer_end:c.to,mode:u,tree:p,overlay:[p]})}else if(a.name==="FencedCode"){let l=a.node.getChild("CodeInfo");if(!l)return;let c=t.state.sliceDoc(l.from,l.to);if(!i.forceMathLanguages.includes(c))return;let p=a.node.getChildren("CodeText"),u=p.last();if(!u)return;let O=a.node.enter(u.to,-1);if(O===null||!O.type.is(_.LaTeX))return;r.push({inner_start:p[0].from,inner_end:u.to,outer_start:a.node.from,outer_end:a.node.to,mode:2,tree:O,overlay:p})}else a.type.is(_.LaTeX)&&a.node.parent===null&&r.push({inner_start:a.node.from,inner_end:a.node.to,outer_start:a.node.from,outer_end:a.node.to,mode:1,tree:a.node,overlay:[{from:a.from,to:a.to}]})}});this._mathBounds=r}inMathBound(t,n){let r=this._mathBounds,i=r[0];if(!i||n<i.outer_start||n>r[r.length-1].outer_end)return null;let o=0,s=r.length-1;for(;o<=s;){let a=o+s>>1,l=r[a];if(n<l.outer_start)s=a-1;else if(n>=l.outer_end&&l.outer_end!==l.inner_end)o=a+1;else{if(n<l.inner_start&&l.mode==1&&l.inner_start-l.outer_start==2)return{outer_start:l.outer_start,inner_start:l.outer_start+1,inner_end:l.outer_start+1,outer_end:l.outer_start+2,mode:0,tree:null,overlay:[]};if(n<l.inner_start||n>l.inner_end)break;return l}}return null}getEquationOverlays(t){return this.equationsOverlays?this.equationsOverlays:(this.equationsOverlays=this._mathBounds.map(n=>n.overlay.length===0||n.tree===null?null:{bound:n,overlay:{from:n.overlay[0].from,to:n.overlay[n.overlay.length-1].to},text:t.sliceDoc(n.overlay[0].from,n.overlay[n.overlay.length-1].to)}).filter(n=>n!==null),this.equationsOverlays)}},Qr=tc.ViewPlugin.fromClass(ys),oe=(e,t=!0)=>{let n=e.plugin(Qr);if(!n)throw new Error("MathBoundsPlugin not found, something went wrong with the plugin initialization");return t?n.init(e):n};var nc="HyperMD-codeblock_HyperMD-codeblock-begin_HyperMD-codeblock-begin-bg_HyperMD-codeblock-bg",bs="HyperMD-codeblock_HyperMD-codeblock-bg_HyperMD-codeblock-end_HyperMD-codeblock-end-bg",Md="inline-code",vs=class{constructor(t){this.codeblockLanguage=null;this.shouldUpdate=!1;this.updateFromView(t)}disableMath(){this.shouldUpdate=!1,this.boundsCache.clear(),this.innerBoundsCache.clear(),this.mode=new Lt({text:!1,inlineMath:!1,blockMath:!1,codeMath:!1,codeBlock:!1,code:!1,textEnv:!1,snippetlessEnv:!1}),oe(this.view,!1).reset()}init(t){return this.shouldUpdate&&(this.updateFromView(t),this.shouldUpdate=!1),this}update(t){(t.docChanged||t.selectionSet||t.viewportChanged)&&(this.shouldUpdate=!0)}updateFromView(t){var O;let n=t.state,r=n.selection;this.view=t,this.state=n,this.pos=r.main.to,this.ranges=Array.from(r.ranges).reverse(),this.mode=new Lt({text:!1,inlineMath:!1,blockMath:!1,codeMath:!1,codeBlock:!1,code:!1,textEnv:!1,snippetlessEnv:!1}),this.boundsCache=new Map,this.innerBoundsCache=new Map,this.codeblockLanguage=null;let i=Ld(n),o=(O=i==null?void 0:i.codeblockLanguage)!=null?O:null,s=o!==null,a=s?!1:Vd(n);this.mode.code=a;let l=W(n),c=s&&l.forceMathLanguages.contains(o);this.mode.codeMath=c,this.mode.codeBlock=s&&!c?o:!1,s&&this.mode.codeBlock!==!1&&(this.codeblockLanguage=o,this.boundsCache.set(this.pos,i));let u=oe(t).inMathBound(n,this.pos);if(u!==null&&(this.mode.blockMath=u.mode===1,this.mode.inlineMath=u.mode===0,this.boundsCache.set(this.pos,u)),u){let d=this.inTextEnvironment();d==="text"?this.mode.textEnv=!0:d==="none"&&(this.mode.snippetlessEnv=!0)}this.mode.text=!s&&!u}*getEnvNames(t=this.pos){let r=oe(this.view).inMathBound(this.state,t);if(!r)return;let i=r.tree;if(i)for(let o of Va(i,t,-1)){if(o.to<=t)continue;o.name;let s=this.getEnvNameFromNode(o,this.state.doc);s&&(yield s)}}isWithinMacros(t,n){for(let r of this.getEnvNames(t)){if(r.kind==="environment")continue;if(r.kind==="math")return null;let i=kr(r,n);if(i)return i}return null}getEnvNameFromNode(t,n){var o,s;let r=t.name;function i(a){let l=a==null?void 0:a.getChild("BeginEnv"),c=l==null?void 0:l.getChild("EnvNameGroup"),p=a==null?void 0:a.getChild("Content");return!c||!p||!a?null:{kind:"environment",name:n.sliceString(c.from+1,c.to-1),inner_start:p.from,inner_end:p.to,outer_start:a.from,outer_end:a.to,node:t}}if(r==="Environment")return i(t);if(r==="KnownEnvironment")return i(t.firstChild);if(r.endsWith("Argument")||r==="EnvNameGroup"){let a=t.parent,l=a==null?void 0:a.firstChild,c=t==null?void 0:t.firstChild,p=t==null?void 0:t.lastChild;return!l||!c||!p?null:{kind:"command",name:n.sliceString(l.from+1,l.to),inner_start:c.to,inner_end:p.from,outer_start:t.from,outer_end:p.to,node:t}}else if(r==="ParenMath"||r==="DollarInlineMath"){let a=null,l=null;if(r==="ParenMath")a=t.getChild("OpenParenMath"),l=t.getChild("CloseParenMath");else if(r==="DollarInlineMath"){let c=t.getChildren("Dollar");a=(o=c[0])!=null?o:null,l=(s=c[1])!=null?s:null}return!a||!l?null:{kind:"math",inner_end:l.from,inner_start:a.to,outer_start:t.from,outer_end:t.to,node:t}}return null}isWithinEnvironment(t,n){if(!this.mode.inMath())return null;let r=this.getInnerBounds();if(!r)return null;let{inner_start:i,inner_end:o}=r,s=this.state.sliceDoc(i,o);t-=i,Array.isArray(n)||(n=[n]);e:for(let a of n){let l=a.openSymbol.slice(-1),c=La(l),p,u;["{","[","("].contains(l)&&a.closeSymbol===c?(p=a.openSymbol.length-1,u=l):(p=0,u=a.openSymbol);let O=s.lastIndexOf(a.openSymbol,t-1);for(;O!=-1;){let d=Gt(s,O+p,u,a.closeSymbol,!1);if(d===null)continue e;if(d>=t&&t>=O+a.openSymbol.length)return j(A({},a),{inner_start:O+a.openSymbol.length+i,inner_end:d+i,outer_start:O+i,outer_end:d+a.closeSymbol.length+i});if(O<=0)continue e;O=s.lastIndexOf(a.openSymbol,O-1)}}return null}inTextEnvironment(){let t=this.isWithinMacros(this.pos,Ka);if(!t)return null;let n=t.name;return Vi.some(r=>r.name===n)?"none":"text"}getBounds(t=this.pos){let n=this.boundsCache.get(t);if(n!==void 0)return n;let r;return this.mode.codeMath?r=Zd(this.state,t):r=oe(this.view).inMathBound(this.state,t),this.boundsCache.set(t,r),r}getInnerBounds(t=this.pos){let n,r=this.innerBoundsCache.get(t);return r!==void 0?r:(this.mode.codeMath?n=this.getBounds(t):n=jd(this.view),this.innerBoundsCache.set(t,n),n)}},$r=rc.ViewPlugin.fromClass(vs),G=(e,t=!0)=>{let n=e.plugin($r);if(!n)throw new Error("Context plugin not found, something went wrong with the plugin initialization");return t?n.init(e):n};function kr(e,t){let n=t.find(o=>o.name===e.name);if(!n)return null;if(!n.arguments)return e;let r=0,i=e.node;for(;(i=i.prevSibling)!==null;)i.name.endsWith("Argument")&&r++;return n.arguments.includes(r)?e:null}var jd=(e,t)=>{t||(t=e.state.selection.main.to);let n=oe(e).inMathBound(e.state,t);if(!n)return null;let r=e.state.sliceDoc(n.inner_start,n.inner_end);r=r.replaceAll("\\$","\\R");let i=r.lastIndexOf("$",t-1),o=r.indexOf("$",t);return i===-1||o===-1?n:{inner_start:i+1,inner_end:o,outer_start:i,outer_end:o+1}},Zd=(e,t=e.selection.main.from)=>{let n=ic(e,t);if(!n)return null;let{begin:r,end:i}=n;return{inner_start:r.to,inner_end:i.from,outer_start:r.from,outer_end:i.to}},ic=(e,t=e.selection.main.from)=>{let r=(0,xs.syntaxTree)(e).cursor();if(r.childBefore(t),!r.name.contains("codeblock")||r.name===nc&&t<=r.to||r.name===bs)return null;do if(r.name===nc)break;while(r.prev());let i=r.node;if(!i)return null;r.childAfter(t);do if(r.name===bs)break;while(r.next());let o=r.node;return!o||o.name!==bs?null:{begin:i,end:o}},Ld=e=>{let t=e.selection.main.from,n=ic(e,t);if(!n)return null;let{begin:r,end:i}=n,o=Dd(e,r);return{inner_start:r.to,inner_end:i.from,outer_start:r.from,outer_end:i.to,codeblockLanguage:o}};function Dd(e,t){return e.sliceDoc(t.from,t.to).replace(/`+|~+/g,"").split(" ")[0]}var Vd=e=>{let t=e.selection.main.head;return(0,xs.syntaxTree)(e).resolveInner(t,-1).name.contains(Md)};var Gy=require("@codemirror/view"),dn="${VISUAL}",Id="${VISUAL_ORIGINAL}",Gd=Ye([Ai(!1),H(),Re(bt(ve))]);function Ss(e){let t=_a(Gd,e);if(!t.success)return console.error("Invalid replacement output:",t.issues),null;if(t.output===!1)return null;if(typeof t.output=="string"){let n=new Dt(t.output);return new U([n])}else if(Array.isArray(t.output))return new U(t.output);return t.output}var En=class{constructor(t,n,r,i,o=0,s="no description provided",a=[],l=[],c=[],p=""){this.excludedMacros=[];this.includedMacros=[];this.type=t,this.data={trigger:n,replacement:r},this.options=i,this.priority=o,this.description=s,this.excludedEnvironments=a,this.excludedMacros=l,this.includedMacros=c,this.triggerKey=p}get trigger(){return this.data.trigger}get replacement(){return this.data.replacement}isWithinExcludedScope(t){if(this.excludedEnvironments.length===0&&this.excludedMacros.length===0)return!1;for(let n of t)if(n.kind==="environment"){if(this.excludedEnvironments.includes(n.name))return!0;continue}else{if(n.kind==="math")return!1;if(kr(n,this.excludedMacros))return!0}return!1}isWithinIncludedScope(t){if(this.includedMacros.length===0)return 0;let n=t.find(r=>r.kind!=="environment");return n===void 0||n.kind==="math"?2:kr(n,this.includedMacros)?1:2}toString(){return wr({type:this.type,trigger:this.trigger,replacement:this.replacement,options:this.options,priority:this.priority,description:this.description,excludedEnvironments:this.excludedEnvironments,excludedMacros:this.excludedMacros})}},Pn=class extends En{constructor({trigger:t,replacement:n,options:r,priority:i,description:o,excludedEnvironments:s,excludedMacros:a,includedMacros:l,triggerKey:c}){super("visual",t,n,r,i,o,s,a,l,c)}process({effectiveLine:t,range:n,sel:r,view:i}){if(!!!r.original||!t.endsWith(this.trigger))return null;let s=n.original.from,a,c={captures:{match:[],groups:{[dn]:r.parsed,[Id]:r.original}}};if(this.replacement instanceof U)a=this.replacement.applyInsert(c);else{let p={view:i,options:c},u=Ss(this.replacement(r.parsed,p));if(u===null)return null;a=u.applyInsert(c)}if(a.tabstops.length===0){let p=n.parsed.from-n.original.from;a.insert=r.original.slice(0,p)+a.insert,a.tabstops=[{from:0,to:a.insert.length,index:[0]}]}return{triggerPos:s,replacement:a}}},Cn=class extends En{constructor({trigger:t,replacement:n,options:r,priority:i,description:o,excludedEnvironments:s,excludedMacros:a,includedMacros:l,triggerKey:c,triggerAfter:p}){super("regex",t,n,r,i,o,s,a,l,c),this.data.triggerAfter=p}process({effectiveLine:t,sel:n,effectiveLineAfter:r,view:i}){var O,d;if(!!n.original)return null;let s=this.trigger.exec(t);if(s===null)return null;let a=(O=this.data.triggerAfter)==null?void 0:O.exec(r());if(this.data.triggerAfter&&a===null)return null;let l=s.index,c=a?t.length+a[0].length:void 0,p,u={captures:{match:s.slice(1),groups:(d=s.groups)!=null?d:{}}};if(this.replacement instanceof U)p=this.replacement.applyInsert(u);else{let f={view:i,options:u},m=Ss(this.replacement(s,f));if(m===null)return null;p=m.applyInsert(u)}return{triggerPos:l,replacement:p,triggerEndPos:c}}},qn=class extends En{constructor({trigger:t,replacement:n,options:r,priority:i,description:o,excludedEnvironments:s,excludedMacros:a,includedMacros:l,triggerKey:c,triggerAfter:p}){super("string",t,n,r,i,o,s,a,l,c),this.data.triggerAfter=p}process({effectiveLine:t,sel:n,effectiveLineAfter:r,view:i}){if(!!n.original||!t.endsWith(this.trigger)||this.data.triggerAfter&&!r().startsWith(this.data.triggerAfter))return null;let s=t.length-this.trigger.length,a=this.data.triggerAfter!==void 0?t.length+this.data.triggerAfter.length:void 0,l={captures:{match:[this.trigger],groups:{}}},c;if(this.replacement instanceof U)c=this.replacement.applyInsert(l);else{let p={view:i,options:l},u=Ss(this.replacement(this.trigger,p));if(u===null)return null;c=u.applyInsert(l)}return{triggerPos:s,replacement:c,triggerEndPos:a}}};function Hd(e,t){return typeof t=="function"?"[[Function]]":t instanceof RegExp?`[[RegExp]]: ${t.toString()}`:t}function wr(e){return JSON.stringify(e,Hd,2)}function Tr(e){return e.map((t,n)=>[zd(t),Fd(t),n]).sort(Bd).map(([t,n,r])=>e[r])}function Bd(e,t){return Ud(e[0],t[0])||Nd(e[1],t[1])}function Nd(e,t){return e<t?1:e>t?-1:0}function Ud(e,t){return e<t?1:e>t?-1:0}function zd(e){return e.priority}function Fd(e){return typeof e.trigger=="string"?e.trigger.length:e.trigger.source.length}var oc={"([A-Za-z])(\\d)":[{name:"ce"},{name:"pu"}],"->":[{name:"ce"}]};var Yd=require("obsidian");var Qs=["\\above","\\abovewithdelims","\\Aboxed","\\abs","\\absolutevalue","\\acomm","\\acos","\\acosecant","\\acosine","\\acot","\\acotangent","\\acsc","\\acute","\\adjustlimits","\\admat","\\aleph","\\alpha","\\alwaysDashedLine","\\alwaysNoLine","\\alwaysRootAtBottom","\\alwaysRootAtTop","\\alwaysSingleLine","\\alwaysSolidLine","\\amalg","\\And","\\angle","\\anticommutator","\\antidiagonalmatrix","\\approx","\\approxeq","\\arccos","\\arccosecant","\\arccosine","\\arccot","\\arccotangent","\\arccsc","\\arcsec","\\arcsecant","\\arcsin","\\arcsine","\\arctan","\\arctangent","\\arg","\\array","\\ArrowBetweenLines","\\arrowvert","\\Arrowvert","\\asec","\\asecant","\\asin","\\asine","\\ast","\\asymp","\\atan","\\atangent","\\atop","\\atopwithdelims","\\AXC","\\Axiom","\\AxiomC","\\backepsilon","\\backprime","\\backsim","\\backsimeq","\\backslash","\\bar","\\barwedge","\\Bbb","\\Bbbk","\\bbFont","\\bbox","\\bcancel","\\because","\\begin","\\beta","\\beth","\\between","\\bf","\\BIC","\\big","\\Big","\\bigcap","\\bigcirc","\\bigcup","\\bigg","\\Bigg","\\biggl","\\Biggl","\\biggm","\\Biggm","\\biggr","\\Biggr","\\bigl","\\Bigl","\\bigm","\\Bigm","\\bigodot","\\bigoplus","\\bigotimes","\\bigr","\\Bigr","\\bigsqcup","\\bigstar","\\bigtimes","\\bigtriangledown","\\bigtriangleup","\\biguplus","\\bigvee","\\bigwedge","\\BinaryInf","\\BinaryInfC","\\binom","\\blacklozenge","\\blacksquare","\\blacktriangle","\\blacktriangledown","\\blacktriangleleft","\\blacktriangleright","\\bmod","\\bmqty","\\boldsymbol","\\bot","\\bowtie","\\Box","\\boxdot","\\boxed","\\boxminus","\\boxplus","\\boxtimes","\\bqty","\\Bqty","\\bra","\\Bra","\\brace","\\bracevert","\\brack","\\braket","\\Braket","\\breve","\\buildrel","\\bullet","\\bumpeq","\\Bumpeq","\\cal","\\cancel","\\cancelto","\\cap","\\Cap","\\cases","\\cdot","\\cdotp","\\cdots","\\ce","\\cellcolor","\\celsius","\\centercolon","\\centerdot","\\centernot","\\centerOver","\\cfrac","\\check","\\checkmark","\\chi","\\choose","\\circ","\\circeq","\\circlearrowleft","\\circlearrowright","\\circledast","\\circledcirc","\\circleddash","\\circledR","\\circledS","\\clap","\\class","\\clubsuit","\\colon","\\colonapprox","\\Colonapprox","\\coloneq","\\Coloneq","\\coloneqq","\\Coloneqq","\\colonsim","\\Colonsim","\\color","\\colorbox","\\columncolor","\\comm","\\commutator","\\complement","\\cong","\\coprod","\\cos","\\cosecant","\\cosh","\\cosine","\\cot","\\cotangent","\\coth","\\cp","\\cr","\\cramped","\\crampedclap","\\crampedllap","\\crampedrlap","\\crampedsubstack","\\cross","\\crossproduct","\\csc","\\csch","\\cssId","\\cup","\\Cup","\\curl","\\curlyeqprec","\\curlyeqsucc","\\curlyvee","\\curlywedge","\\curvearrowleft","\\curvearrowright","\\dagger","\\daleth","\\dashedLine","\\dashleftarrow","\\dashrightarrow","\\dashv","\\dbinom","\\dblcolon","\\dd","\\ddagger","\\ddddot","\\dddot","\\ddot","\\ddots","\\DeclareMathOperator","\\DeclarePairedDelimiters","\\DeclarePairedDelimitersX","\\DeclarePairedDelimitersXPP","\\def","\\definecolor","\\deg","\\degree","\\delta","\\Delta","\\derivative","\\det","\\determinant","\\dfrac","\\diagdown","\\diagonalmatrix","\\diagup","\\diamond","\\Diamond","\\diamondsuit","\\diffd","\\differential","\\digamma","\\dim","\\displaylines","\\displaystyle","\\div","\\divergence","\\divideontimes","\\divsymbol","\\dmat","\\dot","\\doteq","\\Doteq","\\doteqdot","\\dotplus","\\dotproduct","\\dots","\\dotsb","\\dotsc","\\dotsi","\\dotsm","\\dotso","\\doublebarwedge","\\doublecap","\\doublecup","\\downarrow","\\Downarrow","\\downdownarrows","\\downharpoonleft","\\downharpoonright","\\dv","\\dyad","\\ell","\\empheqbigl","\\empheqbiglangle","\\empheqbiglbrace","\\empheqbiglbrack","\\empheqbiglceil","\\empheqbiglfloor","\\empheqbiglparen","\\empheqbiglvert","\\empheqbiglVert","\\empheqbigr","\\empheqbigrangle","\\empheqbigrbrace","\\empheqbigrbrack","\\empheqbigrceil","\\empheqbigrfloor","\\empheqbigrparen","\\empheqbigrvert","\\empheqbigrVert","\\empheql","\\empheqlangle","\\empheqlbrace","\\empheqlbrack","\\empheqlceil","\\empheqlfloor","\\empheqlparen","\\empheqlvert","\\empheqlVert","\\empheqr","\\empheqrangle","\\empheqrbrace","\\empheqrbrack","\\empheqrceil","\\empheqrfloor","\\empheqrparen","\\empheqrvert","\\empheqrVert","\\emptyset","\\enclose","\\end","\\enspace","\\epsilon","\\eqalign","\\eqalignno","\\eqcirc","\\eqcolon","\\Eqcolon","\\eqqcolon","\\Eqqcolon","\\eqref","\\eqsim","\\eqslantgtr","\\eqslantless","\\equiv","\\erf","\\eta","\\eth","\\ev","\\eval","\\evaluated","\\exists","\\exp","\\expectationvalue","\\exponential","\\expval","\\fallingdotseq","\\fbox","\\fCenter","\\fcolorbox","\\fderivative","\\fdv","\\Finv","\\flat","\\flatfrac","\\forall","\\frac","\\frak","\\framebox","\\frown","\\functionalderivative","\\Game","\\gamma","\\Gamma","\\gcd","\\ge","\\genfrac","\\geq","\\geqq","\\geqslant","\\gets","\\gg","\\ggg","\\gggtr","\\gimel","\\gnapprox","\\gneq","\\gneqq","\\gnsim","\\grad","\\gradient","\\gradientnabla","\\grave","\\gt","\\gtrapprox","\\gtrdot","\\gtreqless","\\gtreqqless","\\gtrless","\\gtrsim","\\gvertneqq","\\hat","\\hbar","\\hbox","\\hdashline","\\heartsuit","\\hfil","\\hfill","\\hfilll","\\hline","\\hom","\\hookleftarrow","\\hookrightarrow","\\hphantom","\\href","\\hskip","\\hslash","\\hspace","\\huge","\\Huge","\\hypcosecant","\\hypcosine","\\hypcotangent","\\hypsecant","\\hypsine","\\hyptangent","\\identitymatrix","\\idotsint","\\iff","\\iiiint","\\iiint","\\iint","\\Im","\\imaginary","\\imat","\\imath","\\impliedby","\\implies","\\in","\\inf","\\infty","\\injlim","\\innerproduct","\\int","\\intercal","\\intop","\\iota","\\ip","\\it","\\jmath","\\Join","\\kappa","\\ker","\\kern","\\ket","\\Ket","\\ketbra","\\Ketbra","\\label","\\lambda","\\Lambda","\\land","\\langle","\\laplacian","\\large","\\Large","\\LARGE","\\LaTeX","\\lbrace","\\lbrack","\\lceil","\\ldotp","\\ldots","\\le","\\leadsto","\\left","\\Leftarrow","\\leftarrow","\\leftarrowtail","\\leftharpoondown","\\leftharpoonup","\\LeftLabel","\\leftleftarrows","\\Leftrightarrow","\\leftrightarrow","\\leftrightarrows","\\leftrightharpoons","\\leftrightsquigarrow","\\leftroot","\\leftthreetimes","\\leq","\\leqalignno","\\leqq","\\leqslant","\\lessapprox","\\lessdot","\\lesseqgtr","\\lesseqqgtr","\\lessgtr","\\lesssim","\\let","\\lfloor","\\lg","\\lgroup","\\lhd","\\lim","\\liminf","\\limits","\\limsup","\\ll","\\LL","\\llap","\\llcorner","\\Lleftarrow","\\lll","\\llless","\\lmoustache","\\ln","\\lnapprox","\\lneq","\\lneqq","\\lnot","\\lnsim","\\log","\\logarithm","\\longleftarrow","\\Longleftarrow","\\Longleftrightarrow","\\longleftrightarrow","\\longleftrightarrows","\\longLeftrightharpoons","\\longmapsto","\\longrightarrow","\\Longrightarrow","\\longrightleftharpoons","\\longRightleftharpoons","\\looparrowleft","\\looparrowright","\\lor","\\lower","\\lozenge","\\lparen","\\lrcorner","\\Lsh","\\lt","\\ltimes","\\lvert","\\lVert","\\lvertneqq","\\maltese","\\mapsto","\\mathbb","\\mathbf","\\mathbfcal","\\mathbffrak","\\mathbfit","\\mathbfscr","\\mathbfsf","\\mathbfsfit","\\mathbfsfup","\\mathbfup","\\mathbin","\\mathcal","\\mathchoice","\\mathclap","\\mathclose","\\mathfrak","\\mathinner","\\mathit","\\mathllap","\\mathmakebox","\\mathmbox","\\mathnormal","\\mathop","\\mathopen","\\mathord","\\mathpunct","\\mathrel","\\mathring","\\mathrlap","\\mathrm","\\mathscr","\\mathsf","\\mathsfit","\\mathsfup","\\mathstrut","\\mathtip","\\mathtoolsset","\\mathtt","\\mathup","\\matrix","\\matrixdeterminant","\\matrixel","\\matrixelement","\\matrixquantity","\\max","\\mbox","\\mdet","\\measuredangle","\\mel","\\mho","\\micro","\\mid","\\middle","\\min","\\minCDarrowheight","\\minCDarrowwidth","\\mit","\\mkern","\\mmlToken","\\mod","\\models","\\MoveEqLeft","\\moveleft","\\moveright","\\mp","\\mqty","\\mskip","\\mspace","\\MTFlushSpaceAbove","\\MTFlushSpaceBelow","\\MTThinColon","\\mu","\\multimap","\\nabla","\\natural","\\naturallogarithm","\\ncong","\\ndownarrow","\\ne","\\nearrow","\\neg","\\negmedspace","\\negthickspace","\\negthinspace","\\neq","\\newcommand","\\newenvironment","\\Newextarrow","\\newline","\\newtagform","\\nexists","\\ngeq","\\ngeqq","\\ngeqslant","\\ngtr","\\ni","\\nleftarrow","\\nLeftarrow","\\nleftrightarrow","\\nLeftrightarrow","\\nleq","\\nleqq","\\nleqslant","\\nless","\\nmid","\\nobreakspace","\\nolimits","\\noLine","\\nonscript","\\nonumber","\\norm","\\normalsize","\\not","\\notag","\\notChar","\\notin","\\nparallel","\\nprec","\\npreceq","\\nrightarrow","\\nRightarrow","\\nshortmid","\\nshortparallel","\\nsim","\\nsubseteq","\\nsubseteqq","\\nsucc","\\nsucceq","\\nsupseteq","\\nsupseteqq","\\ntriangleleft","\\ntrianglelefteq","\\ntriangleright","\\ntrianglerighteq","\\nu","\\nuparrow","\\nvdash","\\nvDash","\\nVdash","\\nVDash","\\nwarrow","\\odot","\\ohm","\\oint","\\oldstyle","\\omega","\\Omega","\\omicron","\\ominus","\\op","\\operatorname","\\oplus","\\order","\\ordinarycolon","\\oslash","\\otimes","\\outerproduct","\\over","\\overbrace","\\overbracket","\\overleftarrow","\\overleftrightarrow","\\overline","\\overparen","\\overrightarrow","\\overset","\\overunderset","\\overwithdelims","\\owns","\\parallel","\\partial","\\partialderivative","\\paulimatrix","\\pb","\\pderivative","\\pdv","\\perp","\\perthousand","\\phantom","\\phi","\\Phi","\\pi","\\Pi","\\pitchfork","\\pm","\\pmat","\\pmatrix","\\pmb","\\pmod","\\pmqty","\\Pmqty","\\pod","\\poissonbracket","\\pqty","\\Pr","\\prec","\\precapprox","\\preccurlyeq","\\preceq","\\precnapprox","\\precneqq","\\precnsim","\\precsim","\\prescript","\\prime","\\principalvalue","\\Probability","\\prod","\\projlim","\\propto","\\psi","\\Psi","\\pu","\\pv","\\PV","\\qall","\\qand","\\qas","\\qassume","\\qc","\\qcc","\\qcomma","\\qelse","\\qeven","\\qfor","\\qgiven","\\qif","\\qin","\\qinteger","\\qlet","\\qodd","\\qor","\\qotherwise","\\qq","\\qqtext","\\qquad","\\qsince","\\qthen","\\qty","\\quad","\\quantity","\\QuaternaryInf","\\QuaternaryInfC","\\QuinaryInf","\\QuinaryInfC","\\qunless","\\qusing","\\raise","\\rangle","\\rank","\\rbrace","\\rbrack","\\rceil","\\Re","\\real","\\ref","\\refeq","\\renewcommand","\\renewenvironment","\\renewtagform","\\Res","\\Residue","\\restriction","\\rfloor","\\rgroup","\\rhd","\\rho","\\right","\\Rightarrow","\\rightarrow","\\rightarrowtail","\\rightharpoondown","\\rightharpoonup","\\RightLabel","\\rightleftarrows","\\rightleftharpoons","\\rightrightarrows","\\rightsquigarrow","\\rightthreetimes","\\risingdotseq","\\RL","\\rlap","\\rm","\\rmoustache","\\root","\\rootAtBottom","\\rootAtTop","\\rowcolor","\\rparen","\\Rrightarrow","\\Rsh","\\rtimes","\\rule","\\Rule","\\rvert","\\rVert","\\S","\\sbmqty","\\scr","\\scriptscriptstyle","\\scriptsize","\\scriptstyle","\\searrow","\\sec","\\secant","\\sech","\\set","\\Set","\\setminus","\\sf","\\sharp","\\shortmid","\\shortparallel","\\shortvdotswithin","\\shoveleft","\\shoveright","\\sideset","\\sigma","\\Sigma","\\sim","\\simeq","\\sin","\\sine","\\singleLine","\\sinh","\\skew","\\SkipLimits","\\small","\\smallfrown","\\smallint","\\smallmatrixquantity","\\smallsetminus","\\smallsmile","\\smash","\\smdet","\\smile","\\smqty","\\solidLine","\\Space","\\space","\\spadesuit","\\sphericalangle","\\splitdfrac","\\splitfrac","\\spmqty","\\sPmqty","\\sqcap","\\sqcup","\\sqrt","\\sqsubset","\\sqsubseteq","\\sqsupset","\\sqsupseteq","\\square","\\stackbin","\\stackrel","\\star","\\strut","\\style","\\subset","\\Subset","\\subseteq","\\subseteqq","\\subsetneq","\\subsetneqq","\\substack","\\succ","\\succapprox","\\succcurlyeq","\\succeq","\\succnapprox","\\succneqq","\\succnsim","\\succsim","\\sum","\\sup","\\supset","\\Supset","\\supseteq","\\supseteqq","\\supsetneq","\\supsetneqq","\\surd","\\svmqty","\\swarrow","\\symbb","\\symbf","\\symbfcal","\\symbffrak","\\symbfit","\\symbfscr","\\symbfsf","\\symbfsfit","\\symbfsfup","\\symbfup","\\symcal","\\symfrak","\\symit","\\symnormal","\\symrm","\\symscr","\\symsf","\\symsfit","\\symsfup","\\symtt","\\symup","\\tag","\\tan","\\tangent","\\tanh","\\tau","\\tbinom","\\TeX","\\text","\\textacutedbl","\\textasciiacute","\\textasciibreve","\\textasciicaron","\\textasciicircum","\\textasciidieresis","\\textasciimacron","\\textasciitilde","\\textasteriskcentered","\\textbackslash","\\textbaht","\\textbar","\\textbardbl","\\textbf","\\textbigcircle","\\textblank","\\textborn","\\textbraceleft","\\textbraceright","\\textbrokenbar","\\textbullet","\\textcelsius","\\textcent","\\textcentoldstyle","\\textcircledP","\\textclap","\\textcolonmonetary","\\textcolor","\\textcompwordmark","\\textcopyleft","\\textcopyright","\\textcurrency","\\textdagger","\\textdaggerdbl","\\textdegree","\\textdied","\\textdiscount","\\textdiv","\\textdivorced","\\textdollar","\\textdollaroldstyle","\\textdong","\\textdownarrow","\\texteightoldstyle","\\textellipsis","\\textemdash","\\textendash","\\textestimated","\\texteuro","\\textexclamdown","\\textfiveoldstyle","\\textflorin","\\textfouroldstyle","\\textfractionsolidus","\\textgravedbl","\\textgreater","\\textguarani","\\textinterrobang","\\textinterrobangdown","\\textit","\\textlangle","\\textlbrackdbl","\\textleftarrow","\\textless","\\textlira","\\textllap","\\textlnot","\\textlquill","\\textmarried","\\textmho","\\textminus","\\textmu","\\textmusicalnote","\\textnaira","\\textnineoldstyle","\\textnormal","\\textnumero","\\textohm","\\textonehalf","\\textoneoldstyle","\\textonequarter","\\textonesuperior","\\textopenbullet","\\textordfeminine","\\textordmasculine","\\textparagraph","\\textperiodcentered","\\textpertenthousand","\\textperthousand","\\textpeso","\\textpm","\\textquestiondown","\\textquotedblleft","\\textquotedblright","\\textquoteleft","\\textquoteright","\\textrangle","\\textrbrackdbl","\\textrecipe","\\textreferencemark","\\textregistered","\\textrightarrow","\\textrlap","\\textrm","\\textrquill","\\textsection","\\textservicemark","\\textsevenoldstyle","\\textsf","\\textsixoldstyle","\\textsterling","\\textstyle","\\textsurd","\\textthreeoldstyle","\\textthreequarters","\\textthreesuperior","\\texttildelow","\\texttimes","\\texttip","\\texttrademark","\\texttt","\\texttwooldstyle","\\texttwosuperior","\\textunderscore","\\textup","\\textuparrow","\\textvisiblespace","\\textwon","\\textyen","\\textzerooldstyle","\\tfrac","\\therefore","\\theta","\\Theta","\\thickapprox","\\thicksim","\\thinspace","\\TIC","\\tilde","\\times","\\tiny","\\Tiny","\\to","\\toggle","\\top","\\tr","\\Tr","\\trace","\\Trace","\\triangle","\\triangledown","\\triangleleft","\\trianglelefteq","\\triangleq","\\triangleright","\\trianglerighteq","\\TrinaryInf","\\TrinaryInfC","\\tripledash","\\tt","\\twoheadleftarrow","\\twoheadrightarrow","\\UIC","\\ulcorner","\\UnaryInf","\\UnaryInfC","\\underbrace","\\underbracket","\\underleftarrow","\\underleftrightarrow","\\underline","\\underparen","\\underrightarrow","\\underset","\\unicode","\\unlhd","\\unrhd","\\upalpha","\\uparrow","\\Uparrow","\\upbeta","\\upchi","\\updelta","\\Updelta","\\updownarrow","\\Updownarrow","\\upepsilon","\\upeta","\\upgamma","\\Upgamma","\\upharpoonleft","\\upharpoonright","\\upiota","\\upkappa","\\uplambda","\\Uplambda","\\uplus","\\upmu","\\upnu","\\upomega","\\Upomega","\\upomicron","\\upphi","\\Upphi","\\uppi","\\Uppi","\\uppsi","\\Uppsi","\\uprho","\\uproot","\\upsigma","\\Upsigma","\\upsilon","\\Upsilon","\\uptau","\\uptheta","\\Uptheta","\\upuparrows","\\upupsilon","\\Upupsilon","\\upvarepsilon","\\upvarphi","\\upvarpi","\\upvarrho","\\upvarsigma","\\upvartheta","\\upxi","\\Upxi","\\upzeta","\\urcorner","\\usetagform","\\va","\\var","\\varDelta","\\varepsilon","\\varGamma","\\variation","\\varinjlim","\\varkappa","\\varLambda","\\varliminf","\\varlimsup","\\varnothing","\\varOmega","\\varphi","\\varPhi","\\varpi","\\varPi","\\varprojlim","\\varpropto","\\varPsi","\\varrho","\\varsigma","\\varSigma","\\varsubsetneq","\\varsubsetneqq","\\varsupsetneq","\\varsupsetneqq","\\vartheta","\\varTheta","\\vartriangle","\\vartriangleleft","\\vartriangleright","\\varUpsilon","\\varXi","\\vb","\\vcenter","\\vdash","\\vDash","\\Vdash","\\vdot","\\vdots","\\vdotswithin","\\vec","\\vectorarrow","\\vectorbold","\\vectorunit","\\vee","\\veebar","\\verb","\\Vert","\\vert","\\vmqty","\\vnabla","\\vphantom","\\vqty","\\vu","\\Vvdash","\\wedge","\\widehat","\\widetilde","\\wp","\\wr","\\xcancel","\\xhookleftarrow","\\xhookrightarrow","\\xi","\\Xi","\\xleftarrow","\\xLeftarrow","\\xleftharpoondown","\\xleftharpoonup","\\xleftrightarrow","\\xLeftrightarrow","\\xleftrightharpoons","\\xLeftrightharpoons","\\xlongequal","\\xmapsto","\\xmat","\\xmathstrut","\\xmatrix","\\xrightarrow","\\xRightarrow","\\xrightharpoondown","\\xrightharpoonup","\\xrightleftharpoons","\\xRightleftharpoons","\\xtofrom","\\xtwoheadleftarrow","\\xtwoheadrightarrow","\\yen","\\zeromatrix","\\zeta","\\zmat"];function sc(e,t=""){return new qe(e,t)}function ac(e){return new le(e)}function lc(e,t=""){return new lr(e,t)}function Kd(e){return new je(e)}function Jd(e){return new U(e)}var cc=e=>({snippetVariables:e,tabstop_node:sc,text_node:ac,capture_node:lc,ALL_MACROS:Qs}),pc={tabstop_node:sc,text_node:ac,capture_node:lc,snippet_node:Kd,array_node:Jd,ALL_MACROS:Qs};var uc=require("@codemirror/state"),Er=require("obsidian");function $t(e){return createEl(e)}function em(){let e=null;return(n,r)=>{e==null||e.hide(),e=new Er.Notice(n,r)}}var Pr=uc.StateField.define({create:()=>em(),update:e=>e});function Oc(e,t,n,r){let i=new DocumentFragment,o=[[`Description: ${t.description}`],["Parsed trigger: ",i.createEl("code",{text:t.trigger.toString()})],t.triggerKey?["Trigger key: ",i.createEl("code",{text:t.triggerKey})]:[],["Replacement",i.createEl("code",{text:n})],[`Auto-enlarge brackets: ${r}`]],s=i.createDiv({},a=>{a.appendText("Latex Suite: "),a.createEl("br");let l=a.createEl("ul");for(let c of o){if(c.length===0)continue;let p=l.createEl("li");for(let u of c)typeof u=="string"?p.appendText(u):p.appendChild(u)}});e.field(Pr)(i,5e3),console.debug(s.textContent)}function dc(){return Er.Platform.isMacOS}var se=".theme-dark & ",$e=".theme-light & ";function mc(e,t){let n=`${e}
//# sourceURL=latex-suite:${t}`,r=new Blob([n],{type:"text/javascript"}),i=URL.createObjectURL(r),o=import(i);return URL.revokeObjectURL(i),o}function gc(e,t,n=!1){return y(this,null,function*(){let r;try{r=yield mc(e,t)}catch(i){if(console.error(i),!n)throw new Error("Invalid format. Make sure its a valid javascript file and has a default export. See https://github.com/artisticat1/obsidian-latex-suite/blob/main/DOCS.md#snippet-files");r={}}if("default"in r)return r.default;console.warn("No default export found. Please add `export default` to your snippet file. See https://github.com/artisticat1/obsidian-latex-suite/blob/main/DOCS.md#snippet-files.");try{r=yield mc("export default "+e,t)}catch(i){throw console.error(i),new Error("Invalid format (with `export default` added). Make sure its a valid javascript file and has a default export. See https://github.com/artisticat1/obsidian-latex-suite/blob/main/DOCS.md#snippet-files")}if("default"in r)return r.default;throw new Error("No default export found (with `export default` added to the source). Make sure its a valid javascript file and has a default export. See https://github.com/artisticat1/obsidian-latex-suite/blob/main/DOCS.md#snippet-files")})}function Ie(e,t){return y(this,null,function*(){let n=yield gc(e,t,!0);if(Array.isArray(n))throw new Error("Cannot parse an array as a variables object");let r={};for(let[i,o]of Object.entries(n))if(i.startsWith("${")){if(!i.endsWith("}"))throw new Error(`Invalid snippet variable name '${i}': Starts with '\${' but does not end with '}'. You need to have both or neither.`);r[i]=o}else{if(i.endsWith("}"))throw new Error(`Invalid snippet variable name '${i}': Ends with '}' but does not start with '\${'. You need to have both or neither.`);r["${"+i+"}"]=o}return r})}var tm=String.raw`
var __latex_suite_require = window.__latex_suite_require;
function require(module) {
if (!__latex_suite_require) {
__latex_suite_require = window.__latex_suite_require;
}
return __latex_suite_require(module);
}
`;function nm(e){let t=cc(e),n=require;return function(i){return i==="latex-suite"?t:n(i)}}function lt(e,t,n){return y(this,null,function*(){window.__latex_suite_require=nm(t);let r=yield gc(e+tm,n),i;try{i=im(r).flatMap(s=>{try{return om(s,t)}catch(a){let l=a;throw new Error(`${l}
Erroring snippet:
${wr(s)}`)}})}catch(o){let s=o;throw new Error(`Invalid snippet format: ${s}`)}return i=Tr(i),i})}var rm=hn({trigger:Qe(Ye([H(),bt(RegExp)])),triggerAfter:Qe(Ye([H(),bt(RegExp)])),replacement:Ye([H(),Vt(Re(bt(ve)),Ri(e=>new U(e))),_i(e=>typeof e=="function")]),options:H(),flags:Qe(H(),""),priority:Qe(fn(),0),description:Qe(H(),"no description provided"),triggerKey:Qe(H(),""),language:Qe(H()),excludedMacros:Di,excludedEnvironments:Qe(Re(H()),[]),includedMacros:Di});function im(e){if(!Array.isArray(e))throw new Error("Expected snippets to be an array");return e.flat().map(t=>{try{return rt(rm,t)}catch(n){throw new Error(`Value does not resemble snippet.
Erroring snippet:
${wr(t)}`)}})}function om(e,t){var p;let{replacement:n,priority:r,description:i,excludedEnvironments:o,excludedMacros:s,includedMacros:a}=e,l=ar.fromSource(e.options,e.language),c=sm(e.triggerKey);if(e.trigger===void 0&&e.triggerKey.length===0)throw new Error("Either trigger has to be defined or triggerKey must be non-zero length");if((p=e.trigger)!=null||(e.trigger=""),l.regex||e.trigger instanceof RegExp){let u=typeof e.replacement=="string"?new U([new je(e.replacement)]):e.replacement,O,d,f=e.flags,m=f;e.trigger instanceof RegExp?(O=e.trigger.source,f=`${e.trigger.flags}${f}`):O=e.trigger,e.triggerAfter instanceof RegExp?(d=e.triggerAfter.source,m=`${e.triggerAfter.flags}${m}`):d=e.triggerAfter,f=fc(f),m=fc(m),O=Cr(O,t),d=d&&Cr(d,t);let g=[...hc(O),...s];O=`(?:${O})$`;let b=typeof e.trigger=="string"?RegExp:e.trigger.constructor,v=typeof e.triggerAfter=="string"||e.triggerAfter===void 0?RegExp:e.triggerAfter.constructor,$=new b(O,f);d=d?`^(?:${d})`:void 0;let S=d?new v(d,m):void 0;l.regex=!0;let E={trigger:$,replacement:u,options:l,priority:r,description:i,excludedMacros:g,triggerKey:c,triggerAfter:S,excludedEnvironments:o,includedMacros:a},T=[new Cn(E)];if(c&&l.automatic){let P=l.copy();P.automatic=!1;let Z=j(A({},E),{trigger:new RegExp(""),options:P});T.push(new Cn(Z))}return T}else{let u=Cr(e.trigger,t),O=e.triggerAfter;if(O!==void 0&&typeof O=="string")O=Cr(O,t);else if(O instanceof RegExp)throw new Error("triggerAfter cannot be a RegExp for non-regex snippets");let d=[...hc(u),...s];if(typeof n=="string"&&n.includes(dn)&&u.length<=1&&(l.visual=!0),l.visual){if(u.length>1)throw new Error("trigger should be a single character for visual snippets");if(u.length===1&&c.length>0)throw new Error("trigger and triggerKey can't both be defined for visual snippets");if(u.length===0&&c.length===0)throw new Error("Either trigger or triggerKey have to be defined for visual snippets");let f=typeof e.replacement=="string"?new U([new cr(e.replacement)]):e.replacement;l.automatic=!1;let m={trigger:u,replacement:f,options:l,priority:r,description:i,excludedEnvironments:o,excludedMacros:d,includedMacros:a,triggerKey:c,triggerAfter:O},g=[];return u?g.push(new Pn(j(A({},m),{triggerKey:u,trigger:""}))):g.push(new Pn(m)),g}else{let f=typeof e.replacement=="string"?new U([new Dt(e.replacement)]):e.replacement,m={trigger:u,replacement:f,options:l,priority:r,description:i,excludedEnvironments:o,excludedMacros:d,includedMacros:a,triggerKey:c,triggerAfter:O},g=[new qn(m)];if(c&&l.automatic){let b=l.copy();b.automatic=!1;let v=j(A({},m),{trigger:"",options:b});g.push(new qn(v))}return g}}}function fc(e){let t=["i","m","s","u","v"];return Array.from(new Set(e.split(""))).filter(n=>t.includes(n)).join("")}function Cr(e,t){for(let[n,r]of Object.entries(t))e=e.replaceAll(n,r);return e}function hc(e){let t=[],n=oc[e];return n&&t.push(...n),t}function sm(e){return e.split(/ (?!$)/).map(t=>am(t)).join(" ")}function am(e){let t=e.split(/-(?!$)/),n=t[t.length-1];n==="Space"&&(n=" ");let r,i,o,s;for(let a=0;a<t.length-1;++a){let l=t[a];if(/^(cmd|meta|m)$/i.test(l))s=!0;else if(/^a(lt)?$/i.test(l))r=!0;else if(/^(c|ctrl|control)$/i.test(l))i=!0;else if(/^s(hift)?$/i.test(l))o=!0;else if(/^mod$/i.test(l))dc()?s=!0:i=!0;else throw new Error("Unrecognized modifier name: "+l)}return r&&(n="Alt-"+n),i&&(n="Ctrl-"+n),s&&(n="Meta-"+n),o&&(n="Shift-"+n),n}var lm=(e,t)=>{let n=e.keys(),r=t.keys(),i=[];for(let o of n)t.has(o)||i.push(o);for(let o of r)e.has(o)||i.push(o);return new Set(i)},cm=(e,t)=>{let n=e.keys(),r=[];for(let i of n)t.has(i)&&r.push(i);return new Set(r)},yc,bc;if(Set.prototype.difference){let e=Set.prototype.difference;yc=(t,n)=>e.call(t,n)}if(Set.prototype.intersection){let e=Set.prototype.intersection;bc=(t,n)=>e.call(t,n)}var $s=yc||lm,qr=bc||cm;function pm(e,t){let n=e.parent,r=0;for(;n&&!n.isRoot()&&r<100;){if(n.path===t.path)return!0;n=n.parent,r++}return!1}function vc(e,t,n){let r=e.app.vault.getAbstractFileByPath(t);return r instanceof de.TFolder&&pm(n,r)}var ws=(0,de.debounce)(e=>y(void 0,null,function*(){(e.settings.loadSnippetVariablesFromFile||e.settings.loadSnippetsFromFile)&&(yield e.processSettings(!1,!0))}),3e3,!0);function Sc(e){return y(this,null,function*(){let t=e.settings.snippetsFileLocation,n=e.settings.snippetVariablesFileLocation;if(e.settings.loadSnippetVariablesFromFile&&e.settings.loadSnippetsFromFile){if(t===n)return kt(e,t);let o=l=>l.startsWith("/")||l.startsWith("\\");if(t.startsWith(n)&&o(n.slice(t.length)))return kt(e,t);if(n.startsWith(t)&&o(t.slice(n.length)))return kt(e,n);let s=yield kt(e,t),a=yield kt(e,n);return()=>{s(),a()}}let r=e.settings.loadSnippetVariablesFromFile?yield kt(e,e.settings.snippetVariablesFileLocation):null,i=e.settings.loadSnippetsFromFile?yield kt(e,e.settings.snippetsFileLocation):null;return()=>{r==null||r(),i==null||i()}})}function Qc(e){return y(this,null,function*(){if(!de.Platform.isDesktop)return null;let t=require("fs"),n=require("path");if(e.slice(0,2)==="~/"){let i=require("os").homedir();e=n.join(i,e.slice(2))}return n.isAbsolute(e)?{fs:t,node_path:n,path:e}:null})}function kt(e,t){return y(this,null,function*(){var s,a,l;let n=e.app.vault;if(n.getAbstractFileByPath(t)){let c=[n.on("modify",p=>ks(e,p)),n.on("create",p=>ks(e,p)),n.on("delete",p=>ks(e,p))];return()=>c.forEach(p=>n.offref(p))}let i=yield Qc(t);if(i!==null){let c=i.fs;t=i.path;let p=c.watch(t,{recursive:!0},(u,O)=>{u!=="rename"&&ws(e)});return()=>p.close()}if(yield n.adapter.stat(t)){let c=n.adapter,p=(s=c.getFullPath)==null?void 0:s.call(c,t);if(!p)return()=>{};let u=(l=(a=c.fs)==null?void 0:a.watch)==null?void 0:l.call(a,p,{recursive:!0},(O,d)=>{O!=="rename"&&ws(e)});return()=>u==null?void 0:u.close()}return()=>{}})}var ks=(e,t)=>y(void 0,null,function*(){t instanceof de.TFile&&(e.settings.loadSnippetVariablesFromFile&&t.path===e.settings.snippetVariablesFileLocation||e.settings.loadSnippetsFromFile&&t.path===e.settings.snippetsFileLocation||vc(e,e.settings.snippetVariablesFileLocation,t)||vc(e,e.settings.snippetsFileLocation,t))&&ws(e)});function*$c(e){if(e instanceof de.TFile)yield e;else if(e instanceof de.TFolder)for(let t of e.children)yield*sr($c(t))}function Es(e,t){return y(this,null,function*(){let n=yield t.stat(e);if((n==null?void 0:n.type)==="file")return[{name:e.split("/").pop()||e,path:e,read:()=>t.read(e)}];if((n==null?void 0:n.type)==="folder"){let i=(yield t.list(e)).files.map(o=>y(this,null,function*(){return yield Es(o,t)}));return(yield Promise.all(i)).flat()}return[]})}function um(e,t){return y(this,null,function*(){return(yield e.adapter.exists(t))===null?null:yield Es(t,e.adapter)})}function Om(e){return y(this,null,function*(){if(!de.Platform.isDesktop)return null;let t=yield Qc(e);if(t===null)return null;let n=t.fs.promises,r=t.node_path;if(e=t.path,(yield n.stat(e).catch(()=>null))===null)return null;function o(c){return y(this,null,function*(){let p=yield n.stat(c).catch(()=>null);return p===null?null:p.isFile()?{type:"file"}:p.isDirectory()?{type:"folder"}:null})}return yield Es(e,{stat:o,list:c=>y(this,null,function*(){return{files:(yield n.readdir(c)).map(u=>r.join(c,u))}}),read:c=>n.readFile(c,"utf-8")})})}function xc(e,t){return y(this,null,function*(){let n=e.getAbstractFileByPath(t);if(n){let o=$c(n);return Array.from(o).map(s=>({path:s.path,name:s.name,read:()=>e.cachedRead(s)}))}let r=yield Om(t);if(r)return r;let i=yield um(e,t);return i||[]})}function kc(e){return y(this,null,function*(){let t=e.settings.loadSnippetVariablesFromFile?yield xc(e.app.vault,e.settings.snippetVariablesFileLocation):[],n=e.settings.loadSnippetsFromFile?yield xc(e.app.vault,e.settings.snippetsFileLocation):[],r=new Set(t.map(u=>u.path)),i=new Set(n.map(u=>u.path)),o=$s(r,i),s=new Set(t.filter(u=>o.has(u.path))),a=$s(i,r),l=new Set(n.filter(u=>a.has(u.path))),c=qr(r,i),p=new Set(t.filter(u=>c.has(u.path)));return{definitelyVariableFiles:s,definitelySnippetFiles:l,snippetOrVariableFiles:p}})}var Ts=class{constructor(){this.notices=[]}addNotice(t){if(this.notices.push(t),this.notices.length>4){let n=this.notices.shift();n==null||n.hide()}}},wc=new Ts;function Tc(e){return y(this,null,function*(){let t={};for(let n of e.definitelyVariableFiles){let r=yield n.read();try{Object.assign(t,yield Ie(r,n.path))}catch(i){let o=i,s=new de.Notice(`Failed to parse variable file ${n.name}: ${o}`);wc.addNotice(s),console.error(`Failed to parse variable file ${n.name}: ${o}`),e.definitelyVariableFiles.delete(n)}}return t})}function Ec(e){return y(this,null,function*(){let t={};for(let n of e.snippetOrVariableFiles){let r=yield n.read();try{Object.assign(t,yield Ie(r,n.path)),e.definitelyVariableFiles.add(n)}catch(i){e.definitelySnippetFiles.add(n)}e.snippetOrVariableFiles.delete(n)}return t})}function Pc(e,t){return y(this,null,function*(){let n=[];for(let r of e.definitelySnippetFiles){let i=yield r.read();try{n.push(...yield lt(i,t,r.path))}catch(o){let s=o,a=new de.Notice(`Failed to parse snippet file ${r.name}: ${s}`);wc.addNotice(a),console.error(`Failed to parse snippet file ${r.name}: ${s}`),e.definitelySnippetFiles.delete(r)}}return Tr(n)})}var Oi=require("@codemirror/state"),ia=require("@codemirror/view"),Q=require("obsidian");var Kt=require("obsidian");var B="top",J="bottom",K="right",z="left",Rr="auto",ct=[B,J,K,z],Ke="start",wt="end",Cc="clippingParents",Xr="viewport",Ut="popper",qc="reference",Ps=ct.reduce(function(e,t){return e.concat([t+"-"+Ke,t+"-"+wt])},[]),_r=[].concat(ct,[Rr]).reduce(function(e,t){return e.concat([t,t+"-"+Ke,t+"-"+wt])},[]),dm="beforeRead",mm="read",fm="afterRead",hm="beforeMain",gm="main",ym="afterMain",bm="beforeWrite",vm="write",xm="afterWrite",Rc=[dm,mm,fm,hm,gm,ym,bm,vm,xm];function ne(e){return e?(e.nodeName||"").toLowerCase():null}function F(e){if(e==null)return window;if(e.toString()!=="[object Window]"){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function Ge(e){var t=F(e).Element;return e instanceof t||e instanceof Element}function ee(e){var t=F(e).HTMLElement;return e instanceof t||e instanceof HTMLElement}function zt(e){if(typeof ShadowRoot=="undefined")return!1;var t=F(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function Sm(e){var t=e.state;Object.keys(t.elements).forEach(function(n){var r=t.styles[n]||{},i=t.attributes[n]||{},o=t.elements[n];!ee(o)||!ne(o)||(Object.assign(o.style,r),Object.keys(i).forEach(function(s){var a=i[s];a===!1?o.removeAttribute(s):o.setAttribute(s,a===!0?"":a)}))})}function Qm(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow),function(){Object.keys(t.elements).forEach(function(r){var i=t.elements[r],o=t.attributes[r]||{},s=Object.keys(t.styles.hasOwnProperty(r)?t.styles[r]:n[r]),a=s.reduce(function(l,c){return l[c]="",l},{});!ee(i)||!ne(i)||(Object.assign(i.style,a),Object.keys(o).forEach(function(l){i.removeAttribute(l)}))})}}var Xc={name:"applyStyles",enabled:!0,phase:"write",fn:Sm,effect:Qm,requires:["computeStyles"]};function re(e){return e.split("-")[0]}var Xe=Math.max,Tt=Math.min,Je=Math.round;function Ee(e,t){t===void 0&&(t=!1);var n=e.getBoundingClientRect(),r=1,i=1;if(ee(e)&&t){var o=e.offsetHeight,s=e.offsetWidth;s>0&&(r=Je(n.width)/s||1),o>0&&(i=Je(n.height)/o||1)}return{width:n.width/r,height:n.height/i,top:n.top/i,right:n.right/r,bottom:n.bottom/i,left:n.left/r,x:n.left/r,y:n.top/i}}function Et(e){var t=Ee(e),n=e.offsetWidth,r=e.offsetHeight;return Math.abs(t.width-n)<=1&&(n=t.width),Math.abs(t.height-r)<=1&&(r=t.height),{x:e.offsetLeft,y:e.offsetTop,width:n,height:r}}function Rn(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&zt(n)){var r=t;do{if(r&&e.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function Oe(e){return F(e).getComputedStyle(e)}function Cs(e){return["table","td","th"].indexOf(ne(e))>=0}function ae(e){return((Ge(e)?e.ownerDocument:e.document)||window.document).documentElement}function et(e){return ne(e)==="html"?e:e.assignedSlot||e.parentNode||(zt(e)?e.host:null)||ae(e)}function _c(e){return!ee(e)||Oe(e).position==="fixed"?null:e.offsetParent}function $m(e){var t=navigator.userAgent.toLowerCase().indexOf("firefox")!==-1,n=navigator.userAgent.indexOf("Trident")!==-1;if(n&&ee(e)){var r=Oe(e);if(r.position==="fixed")return null}var i=et(e);for(zt(i)&&(i=i.host);ee(i)&&["html","body"].indexOf(ne(i))<0;){var o=Oe(i);if(o.transform!=="none"||o.perspective!=="none"||o.contain==="paint"||["transform","perspective"].indexOf(o.willChange)!==-1||t&&o.willChange==="filter"||t&&o.filter&&o.filter!=="none")return i;i=i.parentNode}return null}function _e(e){for(var t=F(e),n=_c(e);n&&Cs(n)&&Oe(n).position==="static";)n=_c(n);return n&&(ne(n)==="html"||ne(n)==="body"&&Oe(n).position==="static")?t:n||$m(e)||t}function Pt(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function Ct(e,t,n){return Xe(e,Tt(t,n))}function Ac(e,t,n){var r=Ct(e,t,n);return r>n?n:r}function Xn(){return{top:0,right:0,bottom:0,left:0}}function _n(e){return Object.assign({},Xn(),e)}function An(e,t){return t.reduce(function(n,r){return n[r]=e,n},{})}var km=function(t,n){return t=typeof t=="function"?t(Object.assign({},n.rects,{placement:n.placement})):t,_n(typeof t!="number"?t:An(t,ct))};function wm(e){var t,n=e.state,r=e.name,i=e.options,o=n.elements.arrow,s=n.modifiersData.popperOffsets,a=re(n.placement),l=Pt(a),c=[z,K].indexOf(a)>=0,p=c?"height":"width";if(!(!o||!s)){var u=km(i.padding,n),O=Et(o),d=l==="y"?B:z,f=l==="y"?J:K,m=n.rects.reference[p]+n.rects.reference[l]-s[l]-n.rects.popper[p],g=s[l]-n.rects.reference[l],b=_e(o),v=b?l==="y"?b.clientHeight||0:b.clientWidth||0:0,$=m/2-g/2,S=u[d],E=v-O[p]-u[f],T=v/2-O[p]/2+$,P=Ct(S,T,E),Z=l;n.modifiersData[r]=(t={},t[Z]=P,t.centerOffset=P-T,t)}}function Tm(e){var t=e.state,n=e.options,r=n.element,i=r===void 0?"[data-popper-arrow]":r;i!=null&&(typeof i=="string"&&(i=t.elements.popper.querySelector(i),!i)||Rn(t.elements.popper,i)&&(t.elements.arrow=i))}var Wc={name:"arrow",enabled:!0,phase:"main",fn:wm,effect:Tm,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function Pe(e){return e.split("-")[1]}var Em={top:"auto",right:"auto",bottom:"auto",left:"auto"};function Pm(e){var t=e.x,n=e.y,r=window,i=r.devicePixelRatio||1;return{x:Je(t*i)/i||0,y:Je(n*i)/i||0}}function Mc(e){var t,n=e.popper,r=e.popperRect,i=e.placement,o=e.variation,s=e.offsets,a=e.position,l=e.gpuAcceleration,c=e.adaptive,p=e.roundOffsets,u=e.isFixed,O=s.x,d=O===void 0?0:O,f=s.y,m=f===void 0?0:f,g=typeof p=="function"?p({x:d,y:m}):{x:d,y:m};d=g.x,m=g.y;var b=s.hasOwnProperty("x"),v=s.hasOwnProperty("y"),$=z,S=B,E=window;if(c){var T=_e(n),P="clientHeight",Z="clientWidth";if(T===F(n)&&(T=ae(n),Oe(T).position!=="static"&&a==="absolute"&&(P="scrollHeight",Z="scrollWidth")),T=T,i===B||(i===z||i===K)&&o===wt){S=J;var V=u&&T===E&&E.visualViewport?E.visualViewport.height:T[P];m-=V-r.height,m*=l?1:-1}if(i===z||(i===B||i===J)&&o===wt){$=K;var ie=u&&T===E&&E.visualViewport?E.visualViewport.width:T[Z];d-=ie-r.width,d*=l?1:-1}}var D=Object.assign({position:a},c&&Em),ge=p===!0?Pm({x:d,y:m}):{x:d,y:m};if(d=ge.x,m=ge.y,l){var ye;return Object.assign({},D,(ye={},ye[S]=v?"0":"",ye[$]=b?"0":"",ye.transform=(E.devicePixelRatio||1)<=1?"translate("+d+"px, "+m+"px)":"translate3d("+d+"px, "+m+"px, 0)",ye))}return Object.assign({},D,(t={},t[S]=v?m+"px":"",t[$]=b?d+"px":"",t.transform="",t))}function Cm(e){var t=e.state,n=e.options,r=n.gpuAcceleration,i=r===void 0?!0:r,o=n.adaptive,s=o===void 0?!0:o,a=n.roundOffsets,l=a===void 0?!0:a;if(0)var c;var p={placement:re(t.placement),variation:Pe(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:i,isFixed:t.options.strategy==="fixed"};t.modifiersData.popperOffsets!=null&&(t.styles.popper=Object.assign({},t.styles.popper,Mc(Object.assign({},p,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:s,roundOffsets:l})))),t.modifiersData.arrow!=null&&(t.styles.arrow=Object.assign({},t.styles.arrow,Mc(Object.assign({},p,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})}var jc={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:Cm,data:{}};var Ar={passive:!0};function qm(e){var t=e.state,n=e.instance,r=e.options,i=r.scroll,o=i===void 0?!0:i,s=r.resize,a=s===void 0?!0:s,l=F(t.elements.popper),c=[].concat(t.scrollParents.reference,t.scrollParents.popper);return o&&c.forEach(function(p){p.addEventListener("scroll",n.update,Ar)}),a&&l.addEventListener("resize",n.update,Ar),function(){o&&c.forEach(function(p){p.removeEventListener("scroll",n.update,Ar)}),a&&l.removeEventListener("resize",n.update,Ar)}}var Zc={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:qm,data:{}};var Rm={left:"right",right:"left",bottom:"top",top:"bottom"};function Ft(e){return e.replace(/left|right|bottom|top/g,function(t){return Rm[t]})}var Xm={start:"end",end:"start"};function Wr(e){return e.replace(/start|end/g,function(t){return Xm[t]})}function qt(e){var t=F(e),n=t.pageXOffset,r=t.pageYOffset;return{scrollLeft:n,scrollTop:r}}function Rt(e){return Ee(ae(e)).left+qt(e).scrollLeft}function qs(e){var t=F(e),n=ae(e),r=t.visualViewport,i=n.clientWidth,o=n.clientHeight,s=0,a=0;return r&&(i=r.width,o=r.height,/^((?!chrome|android).)*safari/i.test(navigator.userAgent)||(s=r.offsetLeft,a=r.offsetTop)),{width:i,height:o,x:s+Rt(e),y:a}}function Rs(e){var t,n=ae(e),r=qt(e),i=(t=e.ownerDocument)==null?void 0:t.body,o=Xe(n.scrollWidth,n.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),s=Xe(n.scrollHeight,n.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0),a=-r.scrollLeft+Rt(e),l=-r.scrollTop;return Oe(i||n).direction==="rtl"&&(a+=Xe(n.clientWidth,i?i.clientWidth:0)-o),{width:o,height:s,x:a,y:l}}function Xt(e){var t=Oe(e),n=t.overflow,r=t.overflowX,i=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+i+r)}function Mr(e){return["html","body","#document"].indexOf(ne(e))>=0?e.ownerDocument.body:ee(e)&&Xt(e)?e:Mr(et(e))}function pt(e,t){var n;t===void 0&&(t=[]);var r=Mr(e),i=r===((n=e.ownerDocument)==null?void 0:n.body),o=F(r),s=i?[o].concat(o.visualViewport||[],Xt(r)?r:[]):r,a=t.concat(s);return i?a:a.concat(pt(et(s)))}function Yt(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function _m(e){var t=Ee(e);return t.top=t.top+e.clientTop,t.left=t.left+e.clientLeft,t.bottom=t.top+e.clientHeight,t.right=t.left+e.clientWidth,t.width=e.clientWidth,t.height=e.clientHeight,t.x=t.left,t.y=t.top,t}function Lc(e,t){return t===Xr?Yt(qs(e)):Ge(t)?_m(t):Yt(Rs(ae(e)))}function Am(e){var t=pt(et(e)),n=["absolute","fixed"].indexOf(Oe(e).position)>=0,r=n&&ee(e)?_e(e):e;return Ge(r)?t.filter(function(i){return Ge(i)&&Rn(i,r)&&ne(i)!=="body"}):[]}function Xs(e,t,n){var r=t==="clippingParents"?Am(e):[].concat(t),i=[].concat(r,[n]),o=i[0],s=i.reduce(function(a,l){var c=Lc(e,l);return a.top=Xe(c.top,a.top),a.right=Tt(c.right,a.right),a.bottom=Tt(c.bottom,a.bottom),a.left=Xe(c.left,a.left),a},Lc(e,o));return s.width=s.right-s.left,s.height=s.bottom-s.top,s.x=s.left,s.y=s.top,s}function Wn(e){var t=e.reference,n=e.element,r=e.placement,i=r?re(r):null,o=r?Pe(r):null,s=t.x+t.width/2-n.width/2,a=t.y+t.height/2-n.height/2,l;switch(i){case B:l={x:s,y:t.y-n.height};break;case J:l={x:s,y:t.y+t.height};break;case K:l={x:t.x+t.width,y:a};break;case z:l={x:t.x-n.width,y:a};break;default:l={x:t.x,y:t.y}}var c=i?Pt(i):null;if(c!=null){var p=c==="y"?"height":"width";switch(o){case Ke:l[c]=l[c]-(t[p]/2-n[p]/2);break;case wt:l[c]=l[c]+(t[p]/2-n[p]/2);break;default:}}return l}function Ae(e,t){t===void 0&&(t={});var n=t,r=n.placement,i=r===void 0?e.placement:r,o=n.boundary,s=o===void 0?Cc:o,a=n.rootBoundary,l=a===void 0?Xr:a,c=n.elementContext,p=c===void 0?Ut:c,u=n.altBoundary,O=u===void 0?!1:u,d=n.padding,f=d===void 0?0:d,m=_n(typeof f!="number"?f:An(f,ct)),g=p===Ut?qc:Ut,b=e.rects.popper,v=e.elements[O?g:p],$=Xs(Ge(v)?v:v.contextElement||ae(e.elements.popper),s,l),S=Ee(e.elements.reference),E=Wn({reference:S,element:b,strategy:"absolute",placement:i}),T=Yt(Object.assign({},b,E)),P=p===Ut?T:S,Z={top:$.top-P.top+m.top,bottom:P.bottom-$.bottom+m.bottom,left:$.left-P.left+m.left,right:P.right-$.right+m.right},V=e.modifiersData.offset;if(p===Ut&&V){var ie=V[i];Object.keys(Z).forEach(function(D){var ge=[K,J].indexOf(D)>=0?1:-1,ye=[B,J].indexOf(D)>=0?"y":"x";Z[D]+=ie[ye]*ge})}return Z}function _s(e,t){t===void 0&&(t={});var n=t,r=n.placement,i=n.boundary,o=n.rootBoundary,s=n.padding,a=n.flipVariations,l=n.allowedAutoPlacements,c=l===void 0?_r:l,p=Pe(r),u=p?a?Ps:Ps.filter(function(f){return Pe(f)===p}):ct,O=u.filter(function(f){return c.indexOf(f)>=0});O.length===0&&(O=u);var d=O.reduce(function(f,m){return f[m]=Ae(e,{placement:m,boundary:i,rootBoundary:o,padding:s})[re(m)],f},{});return Object.keys(d).sort(function(f,m){return d[f]-d[m]})}function Wm(e){if(re(e)===Rr)return[];var t=Ft(e);return[Wr(e),t,Wr(t)]}function Mm(e){var t=e.state,n=e.options,r=e.name;if(!t.modifiersData[r]._skip){for(var i=n.mainAxis,o=i===void 0?!0:i,s=n.altAxis,a=s===void 0?!0:s,l=n.fallbackPlacements,c=n.padding,p=n.boundary,u=n.rootBoundary,O=n.altBoundary,d=n.flipVariations,f=d===void 0?!0:d,m=n.allowedAutoPlacements,g=t.options.placement,b=re(g),v=b===g,$=l||(v||!f?[Ft(g)]:Wm(g)),S=[g].concat($).reduce(function(Zt,nt){return Zt.concat(re(nt)===Rr?_s(t,{placement:nt,boundary:p,rootBoundary:u,padding:c,flipVariations:f,allowedAutoPlacements:m}):nt)},[]),E=t.rects.reference,T=t.rects.popper,P=new Map,Z=!0,V=S[0],ie=0;ie<S.length;ie++){var D=S[ie],ge=re(D),ye=Pe(D)===Ke,cn=[B,J].indexOf(ge)>=0,pn=cn?"width":"height",be=Ae(t,{placement:D,boundary:p,rootBoundary:u,altBoundary:O,padding:c}),Ce=cn?ye?K:z:ye?J:B;E[pn]>T[pn]&&(Ce=Ft(Ce));var er=Ft(Ce),ht=[];if(o&&ht.push(be[ge]<=0),a&&ht.push(be[Ce]<=0,be[er]<=0),ht.every(function(Zt){return Zt})){V=D,Z=!1;break}P.set(D,ht)}if(Z)for(var tr=f?3:1,xi=function(nt){var On=S.find(function(rr){var gt=P.get(rr);if(gt)return gt.slice(0,nt).every(function(Si){return Si})});if(On)return V=On,"break"},un=tr;un>0;un--){var nr=xi(un);if(nr==="break")break}t.placement!==V&&(t.modifiersData[r]._skip=!0,t.placement=V,t.reset=!0)}}var Dc={name:"flip",enabled:!0,phase:"main",fn:Mm,requiresIfExists:["offset"],data:{_skip:!1}};function Vc(e,t,n){return n===void 0&&(n={x:0,y:0}),{top:e.top-t.height-n.y,right:e.right-t.width+n.x,bottom:e.bottom-t.height+n.y,left:e.left-t.width-n.x}}function Ic(e){return[B,K,J,z].some(function(t){return e[t]>=0})}function jm(e){var t=e.state,n=e.name,r=t.rects.reference,i=t.rects.popper,o=t.modifiersData.preventOverflow,s=Ae(t,{elementContext:"reference"}),a=Ae(t,{altBoundary:!0}),l=Vc(s,r),c=Vc(a,i,o),p=Ic(l),u=Ic(c);t.modifiersData[n]={referenceClippingOffsets:l,popperEscapeOffsets:c,isReferenceHidden:p,hasPopperEscaped:u},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":p,"data-popper-escaped":u})}var Gc={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:jm};function Zm(e,t,n){var r=re(e),i=[z,B].indexOf(r)>=0?-1:1,o=typeof n=="function"?n(Object.assign({},t,{placement:e})):n,s=o[0],a=o[1];return s=s||0,a=(a||0)*i,[z,K].indexOf(r)>=0?{x:a,y:s}:{x:s,y:a}}function Lm(e){var t=e.state,n=e.options,r=e.name,i=n.offset,o=i===void 0?[0,0]:i,s=_r.reduce(function(p,u){return p[u]=Zm(u,t.rects,o),p},{}),a=s[t.placement],l=a.x,c=a.y;t.modifiersData.popperOffsets!=null&&(t.modifiersData.popperOffsets.x+=l,t.modifiersData.popperOffsets.y+=c),t.modifiersData[r]=s}var Hc={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:Lm};function Dm(e){var t=e.state,n=e.name;t.modifiersData[n]=Wn({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})}var Bc={name:"popperOffsets",enabled:!0,phase:"read",fn:Dm,data:{}};function As(e){return e==="x"?"y":"x"}function Vm(e){var t=e.state,n=e.options,r=e.name,i=n.mainAxis,o=i===void 0?!0:i,s=n.altAxis,a=s===void 0?!1:s,l=n.boundary,c=n.rootBoundary,p=n.altBoundary,u=n.padding,O=n.tether,d=O===void 0?!0:O,f=n.tetherOffset,m=f===void 0?0:f,g=Ae(t,{boundary:l,rootBoundary:c,padding:u,altBoundary:p}),b=re(t.placement),v=Pe(t.placement),$=!v,S=Pt(b),E=As(S),T=t.modifiersData.popperOffsets,P=t.rects.reference,Z=t.rects.popper,V=typeof m=="function"?m(Object.assign({},t.rects,{placement:t.placement})):m,ie=typeof V=="number"?{mainAxis:V,altAxis:V}:Object.assign({mainAxis:0,altAxis:0},V),D=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,ge={x:0,y:0};if(T){if(o){var ye,cn=S==="y"?B:z,pn=S==="y"?J:K,be=S==="y"?"height":"width",Ce=T[S],er=Ce+g[cn],ht=Ce-g[pn],tr=d?-Z[be]/2:0,xi=v===Ke?P[be]:Z[be],un=v===Ke?-Z[be]:-P[be],nr=t.elements.arrow,Zt=d&&nr?Et(nr):{width:0,height:0},nt=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:Xn(),On=nt[cn],rr=nt[pn],gt=Ct(0,P[be],Zt[be]),Si=$?P[be]/2-tr-gt-On-ie.mainAxis:xi-gt-On-ie.mainAxis,bu=$?-P[be]/2+tr+gt+rr+ie.mainAxis:un+gt+rr+ie.mainAxis,Qi=t.elements.arrow&&_e(t.elements.arrow),vu=Qi?S==="y"?Qi.clientTop||0:Qi.clientLeft||0:0,ga=(ye=D==null?void 0:D[S])!=null?ye:0,xu=Ce+Si-ga-vu,Su=Ce+bu-ga,ya=Ct(d?Tt(er,xu):er,Ce,d?Xe(ht,Su):ht);T[S]=ya,ge[S]=ya-Ce}if(a){var ba,Qu=S==="x"?B:z,$u=S==="x"?J:K,yt=T[E],ir=E==="y"?"height":"width",va=yt+g[Qu],xa=yt-g[$u],$i=[B,z].indexOf(b)!==-1,Sa=(ba=D==null?void 0:D[E])!=null?ba:0,Qa=$i?va:yt-P[ir]-Z[ir]-Sa+ie.altAxis,$a=$i?yt+P[ir]+Z[ir]-Sa-ie.altAxis:xa,ka=d&&$i?Ac(Qa,yt,$a):Ct(d?Qa:va,yt,d?$a:xa);T[E]=ka,ge[E]=ka-yt}t.modifiersData[r]=ge}}var Nc={name:"preventOverflow",enabled:!0,phase:"main",fn:Vm,requiresIfExists:["offset"]};function Ws(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function Ms(e){return e===F(e)||!ee(e)?qt(e):Ws(e)}function Im(e){var t=e.getBoundingClientRect(),n=Je(t.width)/e.offsetWidth||1,r=Je(t.height)/e.offsetHeight||1;return n!==1||r!==1}function js(e,t,n){n===void 0&&(n=!1);var r=ee(t),i=ee(t)&&Im(t),o=ae(t),s=Ee(e,i),a={scrollLeft:0,scrollTop:0},l={x:0,y:0};return(r||!r&&!n)&&((ne(t)!=="body"||Xt(o))&&(a=Ms(t)),ee(t)?(l=Ee(t,!0),l.x+=t.clientLeft,l.y+=t.clientTop):o&&(l.x=Rt(o))),{x:s.left+a.scrollLeft-l.x,y:s.top+a.scrollTop-l.y,width:s.width,height:s.height}}function Gm(e){var t=new Map,n=new Set,r=[];e.forEach(function(o){t.set(o.name,o)});function i(o){n.add(o.name);var s=[].concat(o.requires||[],o.requiresIfExists||[]);s.forEach(function(a){if(!n.has(a)){var l=t.get(a);l&&i(l)}}),r.push(o)}return e.forEach(function(o){n.has(o.name)||i(o)}),r}function Zs(e){var t=Gm(e);return Rc.reduce(function(n,r){return n.concat(t.filter(function(i){return i.phase===r}))},[])}function Ls(e){var t;return function(){return t||(t=new Promise(function(n){Promise.resolve().then(function(){t=void 0,n(e())})})),t}}function Ds(e){var t=e.reduce(function(n,r){var i=n[r.name];return n[r.name]=i?Object.assign({},i,r,{options:Object.assign({},i.options,r.options),data:Object.assign({},i.data,r.data)}):r,n},{});return Object.keys(t).map(function(n){return t[n]})}var Uc={placement:"bottom",modifiers:[],strategy:"absolute"};function zc(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return!t.some(function(r){return!(r&&typeof r.getBoundingClientRect=="function")})}function Fc(e){e===void 0&&(e={});var t=e,n=t.defaultModifiers,r=n===void 0?[]:n,i=t.defaultOptions,o=i===void 0?Uc:i;return function(a,l,c){c===void 0&&(c=o);var p={placement:"bottom",orderedModifiers:[],options:Object.assign({},Uc,o),modifiersData:{},elements:{reference:a,popper:l},attributes:{},styles:{}},u=[],O=!1,d={state:p,setOptions:function(b){var v=typeof b=="function"?b(p.options):b;m(),p.options=Object.assign({},o,p.options,v),p.scrollParents={reference:Ge(a)?pt(a):a.contextElement?pt(a.contextElement):[],popper:pt(l)};var $=Zs(Ds([].concat(r,p.options.modifiers)));if(p.orderedModifiers=$.filter(function(D){return D.enabled}),0){var S;if(getBasePlacement(p.options.placement)===auto)var E;var T,P,Z,V,ie}return f(),d.update()},forceUpdate:function(){if(!O){var b=p.elements,v=b.reference,$=b.popper;if(zc(v,$)){p.rects={reference:js(v,_e($),p.options.strategy==="fixed"),popper:Et($)},p.reset=!1,p.placement=p.options.placement,p.orderedModifiers.forEach(function(D){return p.modifiersData[D.name]=Object.assign({},D.data)});for(var S=0,E=0;E<p.orderedModifiers.length;E++){if(p.reset===!0){p.reset=!1,E=-1;continue}var T=p.orderedModifiers[E],P=T.fn,Z=T.options,V=Z===void 0?{}:Z,ie=T.name;typeof P=="function"&&(p=P({state:p,options:V,name:ie,instance:d})||p)}}}},update:Ls(function(){return new Promise(function(g){d.forceUpdate(),g(p)})}),destroy:function(){m(),O=!0}};if(!zc(a,l))return d;d.setOptions(c).then(function(g){!O&&c.onFirstUpdate&&c.onFirstUpdate(g)});function f(){p.orderedModifiers.forEach(function(g){var b=g.name,v=g.options,$=v===void 0?{}:v,S=g.effect;if(typeof S=="function"){var E=S({state:p,name:b,instance:d,options:$}),T=function(){};u.push(E||T)}})}function m(){u.forEach(function(g){return g()}),u=[]}return d}}var Hm=[Zc,Bc,jc,Xc,Hc,Dc,Nc,Wc,Gc],Vs=Fc({defaultModifiers:Hm});var Yc=require("obsidian"),Bm=(e,t)=>(e%t+t)%t,Is=class{constructor(t,n,r){this.owner=t,this.containerEl=n,n.on("click",".suggestion-item",(i,o)=>this.onSuggestionClick(i,o)),n.on("mousemove",".suggestion-item",(i,o)=>this.onSuggestionMouseover(i,o)),r.register([],"ArrowUp",i=>{if(!i.isComposing)return this.setSelectedItem(this.selectedItem-1,!0),!1}),r.register([],"ArrowDown",i=>{if(!i.isComposing)return this.setSelectedItem(this.selectedItem+1,!0),!1}),r.register([],"Enter",i=>{if(!i.isComposing)return this.useSelectedItem(i),!1})}onSuggestionClick(t,n){t.preventDefault();let r=this.suggestions.indexOf(n);this.setSelectedItem(r,!1),this.useSelectedItem(t)}onSuggestionMouseover(t,n){let r=this.suggestions.indexOf(n);this.setSelectedItem(r,!1)}setSuggestions(t){this.containerEl.empty();let n=[];t.forEach(r=>{let i=this.containerEl.createDiv("suggestion-item");this.owner.renderSuggestion(r,i),n.push(i)}),this.values=t,this.suggestions=n,this.setSelectedItem(0,!1)}useSelectedItem(t){let n=this.values[this.selectedItem];n&&this.owner.selectSuggestion(n,t)}setSelectedItem(t,n){let r=Bm(t,this.suggestions.length),i=this.suggestions[this.selectedItem],o=this.suggestions[r];i==null||i.removeClass("is-selected"),o==null||o.addClass("is-selected"),this.selectedItem=r,n&&(o==null||o.scrollIntoView(!1))}},jr=class{constructor(t,n){this.app=t,this.inputEl=n,this.scope=new Yc.Scope,this.suggestEl=createDiv("suggestion-container");let r=this.suggestEl.createDiv("suggestion");this.suggest=new Is(this,r,this.scope),this.scope.register([],"Escape",()=>this.close()),this.inputEl.addEventListener("input",()=>this.onInputChanged()),this.inputEl.addEventListener("focus",()=>this.onInputChanged()),this.inputEl.addEventListener("blur",()=>this.close()),this.suggestEl.on("mousedown",".suggestion-container",i=>{i.preventDefault()})}onInputChanged(){let t=this.inputEl.value,n=this.getSuggestions(t);n.length>0&&(this.suggest.setSuggestions(n),this.open(this.app.dom.appContainerEl,this.inputEl))}open(t,n){this.app.keymap.pushScope(this.scope),t.appendChild(this.suggestEl),this.popper=Vs(n,this.suggestEl,{placement:"bottom-start",modifiers:[{name:"sameWidth",enabled:!0,fn:({state:r,instance:i})=>{let o=`${r.rects.reference.width}px`;r.styles.popper.width!==o&&(r.styles.popper.width=o,i.update())},phase:"beforeWrite",requires:["computeStyles"]}]})}close(){this.app.keymap.popScope(this.scope),this.suggest.setSuggestions([]),this.popper.destroy(),this.suggestEl.detach()}};function Nm(){function e(n,r){let i=[],o=r.toLowerCase();return Kt.Vault.recurseChildren(n.vault.getRoot(),s=>{s.path.toLowerCase().contains(o)&&i.push(s)}),i}function t(n,r){r.setText(n.path)}return(0,Kt.requireApiVersion)("1.4.10")?class extends Kt.AbstractInputSuggest{getSuggestions(r){return e(this.app,r)}renderSuggestion(r,i){return t(r,i)}}:class extends jr{getSuggestions(r){return e(this.app,r)}renderSuggestion(r,i){return t(r,i)}selectSuggestion(r){this.inputEl.value=r.path,this.inputEl.trigger("input"),this.close()}}}var Mn=Nm();var me=require("@codemirror/view"),mp=require("@codemirror/state");var He=require("@lezer/lr"),k=require("@lezer/highlight"),Um=1,Kc=281,Jc=2,zm=3,Zr=282,Fm=4,Ym=283,ep=284,Km=286,Jm=287,ef=5,tf=6,nf=1,rf=[9,10,11,12,13,32,133,160,5760,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8232,8233,8239,8287,12288],np=125,of=123,sf=59,tp=47,af=42,lf=43,cf=45,pf=36,uf=96,Of=92,df=new He.ContextTracker({start:!1,shift(e,t){return t==ef||t==tf||t==Km?e:t==Jm},strict:!1}),mf=new He.ExternalTokenizer((e,t)=>{let{next:n}=e;(n==np||n==-1||t.context)&&t.canShift(ep)&&e.acceptToken(ep)},{contextual:!0,fallback:!0}),ff=new He.ExternalTokenizer((e,t)=>{let{next:n}=e,r;rf.indexOf(n)>-1||n==tp&&((r=e.peek(1))==tp||r==af)||n!=np&&n!=sf&&n!=-1&&!t.context&&t.canShift(Kc)&&e.acceptToken(Kc)},{contextual:!0}),hf=new He.ExternalTokenizer((e,t)=>{let{next:n}=e;if((n==lf||n==cf)&&(e.advance(),n==e.next)){e.advance();let r=!t.context&&t.canShift(Jc);e.acceptToken(r?Jc:zm)}},{contextual:!0}),gf=new He.ExternalTokenizer(e=>{for(let t=!1,n=0;;n++){let{next:r}=e;if(r<0){n&&e.acceptToken(Zr);break}else if(r==uf){n?e.acceptToken(Zr):e.acceptToken(Ym,1);break}else if(r==of&&t){n==1?e.acceptToken(Fm,1):e.acceptToken(Zr,-1);break}else if(r==10&&n){e.advance(),e.acceptToken(Zr);break}else r==Of&&e.advance();t=r==pf,e.advance()}}),yf=new He.ExternalTokenizer((e,t)=>{if(!(e.next!=101||!t.dialectEnabled(nf))){e.advance();for(let n=0;n<6;n++){if(e.next!="xtends".charCodeAt(n))return;e.advance()}e.next>=57&&e.next<=65||e.next>=48&&e.next<=90||e.next==95||e.next>=97&&e.next<=122||e.next>160||e.acceptToken(Um)}}),bf=(0,k.styleTags)({"get set async static":k.tags.modifier,"for while do if else switch try catch finally return throw break continue default case":k.tags.controlKeyword,"in of await yield void typeof delete instanceof":k.tags.operatorKeyword,"let var const function class extends":k.tags.definitionKeyword,"import export from":k.tags.moduleKeyword,"with debugger as new":k.tags.keyword,TemplateString:k.tags.special(k.tags.string),super:k.tags.atom,BooleanLiteral:k.tags.bool,this:k.tags.self,null:k.tags.null,Star:k.tags.modifier,VariableName:k.tags.variableName,"CallExpression/VariableName TaggedTemplateExpression/VariableName":k.tags.function(k.tags.variableName),VariableDefinition:k.tags.definition(k.tags.variableName),Label:k.tags.labelName,PropertyName:k.tags.propertyName,PrivatePropertyName:k.tags.special(k.tags.propertyName),"CallExpression/MemberExpression/PropertyName":k.tags.function(k.tags.propertyName),"FunctionDeclaration/VariableDefinition":k.tags.function(k.tags.definition(k.tags.variableName)),"ClassDeclaration/VariableDefinition":k.tags.definition(k.tags.className),PropertyDefinition:k.tags.definition(k.tags.propertyName),PrivatePropertyDefinition:k.tags.definition(k.tags.special(k.tags.propertyName)),UpdateOp:k.tags.updateOperator,LineComment:k.tags.lineComment,BlockComment:k.tags.blockComment,Number:k.tags.number,String:k.tags.string,ArithOp:k.tags.arithmeticOperator,LogicOp:k.tags.logicOperator,BitOp:k.tags.bitwiseOperator,CompareOp:k.tags.compareOperator,RegExp:k.tags.regexp,Equals:k.tags.definitionOperator,Arrow:k.tags.function(k.tags.punctuation),": Spread":k.tags.punctuation,"( )":k.tags.paren,"[ ]":k.tags.squareBracket,"{ }":k.tags.brace,"InterpolationStart InterpolationEnd":k.tags.special(k.tags.brace),".":k.tags.derefOperator,", ;":k.tags.separator,TypeName:k.tags.typeName,TypeDefinition:k.tags.definition(k.tags.typeName),"type enum interface implements namespace module declare":k.tags.definitionKeyword,"abstract global Privacy readonly override":k.tags.modifier,"is keyof unique infer":k.tags.operatorKeyword,JSXAttributeValue:k.tags.attributeValue,JSXText:k.tags.content,"JSXStartTag JSXStartCloseTag JSXSelfCloseEndTag JSXEndTag":k.tags.angleBracket,"JSXIdentifier JSXNameSpacedName":k.tags.tagName,"JSXAttribute/JSXIdentifier JSXAttribute/JSXNameSpacedName":k.tags.attributeName}),vf={__proto__:null,export:18,as:23,from:29,default:32,async:37,function:38,this:48,true:56,false:56,void:66,typeof:70,null:86,super:88,new:122,await:139,yield:141,delete:142,class:152,extends:154,public:197,private:197,protected:197,readonly:199,instanceof:220,in:222,const:224,import:256,keyof:307,unique:311,infer:317,is:351,abstract:371,implements:373,type:375,let:378,var:380,interface:387,enum:391,namespace:397,module:399,declare:403,global:407,for:428,of:437,while:440,with:444,do:448,if:452,else:454,switch:458,case:464,try:470,catch:474,finally:478,return:482,throw:486,break:490,continue:494,debugger:498},xf={__proto__:null,async:109,get:111,set:113,public:161,private:161,protected:161,static:163,abstract:165,override:167,readonly:173,new:355},Sf={__proto__:null,"<":129},rp=He.LRParser.deserialize({version:14,states:"$8SO`QdOOO'QQ(C|O'#ChO'XOWO'#DVO)dQdO'#D]O)tQdO'#DhO){QdO'#DrO-xQdO'#DxOOQO'#E]'#E]O.]Q`O'#E[O.bQ`O'#E[OOQ(C['#Ef'#EfO0aQ(C|O'#ItO2wQ(C|O'#IuO3eQ`O'#EzO3jQ!bO'#FaOOQ(C['#FS'#FSO3rO#tO'#FSO4QQ&jO'#FhO5bQ`O'#FgOOQ(C['#Iu'#IuOOQ(CW'#It'#ItOOQS'#J^'#J^O5gQ`O'#HpO5lQ(ChO'#HqOOQS'#Ih'#IhOOQS'#Hr'#HrQ`QdOOO){QdO'#DjO5tQ`O'#G[O5yQ&jO'#CmO6XQ`O'#EZO6dQ`O'#EgO6iQ,UO'#FRO7TQ`O'#G[O7YQ`O'#G`O7eQ`O'#G`O7sQ`O'#GcO7sQ`O'#GdO7sQ`O'#GfO5tQ`O'#GiO8dQ`O'#GlO9rQ`O'#CdO:SQ`O'#GyO:[Q`O'#HPO:[Q`O'#HRO`QdO'#HTO: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0k,S,UR4X0l`!dR!]!`$u%x&`)x+hh!qUrs!r!u$Z&t&w)z,S,U0lQ/d*mQ/w+YQ3p/oT:s&W)yT!gR$uS!fR$uS%y!]&`S&O!`)xS+S%x+hT+_&W)yT&]!b$vQ#i^R'{#nT'q#i'rR1Z,lT(a#v(cR(i#yQ-})]Q2U.RQ2|.{Q4{2TQ5l3QQ6t4}Q7U5kQ7y6zQ8S7WR8i8TlhOSj}!n$]%c%f%g%i*o*t/g/jQ%]yR*d%YV$yrs*mR.u*TR*c%WQ$qpR)u$rR)k$lT%az%dT%bz%dT/i*t/j",nodeNames:"\u26A0 extends ArithOp ArithOp InterpolationStart LineComment BlockComment Script ExportDeclaration export Star as VariableName String from ; default FunctionDeclaration async function VariableDefinition TypeParamList TypeDefinition ThisType this LiteralType ArithOp Number BooleanLiteral TemplateType InterpolationEnd Interpolation VoidType void TypeofType typeof MemberExpression . ?. PropertyName [ TemplateString Interpolation null super RegExp ] ArrayExpression Spread , } { ObjectExpression Property async get set PropertyDefinition Block : NewExpression new TypeArgList CompareOp < ) ( ArgList UnaryExpression await yield delete LogicOp BitOp ParenthesizedExpression ClassExpression class extends ClassBody MethodDeclaration Privacy static abstract override PrivatePropertyDefinition PropertyDeclaration readonly Optional TypeAnnotation Equals StaticBlock FunctionExpression ArrowFunction ParamList ParamList ArrayPattern ObjectPattern PatternProperty Privacy readonly Arrow MemberExpression PrivatePropertyName BinaryExpression ArithOp ArithOp ArithOp ArithOp BitOp CompareOp instanceof in const CompareOp BitOp BitOp BitOp LogicOp LogicOp ConditionalExpression LogicOp LogicOp AssignmentExpression UpdateOp PostfixExpression CallExpression TaggedTemplateExpression DynamicImport import ImportMeta JSXElement JSXSelfCloseEndTag JSXStartTag JSXSelfClosingTag JSXIdentifier JSXNamespacedName JSXMemberExpression JSXSpreadAttribute JSXAttribute JSXAttributeValue JSXEscape JSXEndTag JSXOpenTag JSXFragmentTag JSXText JSXEscape JSXStartCloseTag JSXCloseTag PrefixCast ArrowFunction TypeParamList SequenceExpression KeyofType keyof UniqueType unique ImportType InferredType infer TypeName ParenthesizedType FunctionSignature ParamList NewSignature IndexedType TupleType Label ArrayType ReadonlyType ObjectType MethodType PropertyType IndexSignature CallSignature TypePredicate is NewSignature new UnionType LogicOp IntersectionType LogicOp ConditionalType ParameterizedType ClassDeclaration abstract implements type VariableDeclaration let var TypeAliasDeclaration InterfaceDeclaration interface EnumDeclaration enum EnumBody NamespaceDeclaration namespace module AmbientDeclaration declare GlobalDeclaration global ClassDeclaration ClassBody MethodDeclaration AmbientFunctionDeclaration ExportGroup VariableName VariableName ImportDeclaration ImportGroup ForStatement for ForSpec ForInSpec ForOfSpec of WhileStatement while WithStatement with DoStatement do IfStatement if else SwitchStatement switch SwitchBody CaseLabel case DefaultLabel TryStatement try CatchClause catch FinallyClause finally ReturnStatement return ThrowStatement throw BreakStatement break ContinueStatement continue DebuggerStatement debugger LabeledStatement ExpressionStatement",maxTerm:332,context:df,nodeProps:[["closedBy",4,"InterpolationEnd",40,"]",51,"}",66,")",132,"JSXSelfCloseEndTag JSXEndTag",146,"JSXEndTag"],["group",-26,8,15,17,58,184,188,191,192,194,197,200,211,213,219,221,223,225,228,234,240,242,244,246,248,250,251,"Statement",-30,12,13,24,27,28,41,43,44,45,47,52,60,68,74,75,91,92,101,103,119,122,124,125,126,127,129,130,148,149,151,"Expression",-22,23,25,29,32,34,152,154,156,157,159,160,161,163,164,165,167,168,169,178,180,182,183,"Type",-3,79,85,90,"ClassItem"],["openedBy",30,"InterpolationStart",46,"[",50,"{",65,"(",131,"JSXStartTag",141,"JSXStartTag JSXStartCloseTag"]],propSources:[bf],skippedNodes:[0,5,6],repeatNodeCount:28,tokenData:"!C}~R!`OX%TXY%cYZ'RZ[%c[]%T]^'R^p%Tpq%cqr'crs(kst0htu2`uv4pvw5ewx6cxy<yyz=Zz{=k{|>k|}?O}!O>k!O!P?`!P!QCl!Q!R!0[!R![!1q![!]!7s!]!^!8V!^!_!8g!_!`!9d!`!a!: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~%T*a!<YV'p#{$UWO!O%T!O!P!<o!P!^%T!_!a%T!a!b!=P!b#o%T#p~%T*[!<vRv*S$UWO!^%T!_#o%T#p~%T$O!=WS$UW#j#vO!^%T!_!`5T!`#o%T#p~%T7V!=kRx6}$UWO!^%T!_#o%T#p~%Tk!={R!Oc$UWO!^%T!_#o%T#p~%T$O!>]S#g#v$UWO!^%T!_!`5T!`#o%T#p~%T$a!>pR$UW'f$XO!^%T!_#o%T#p~%T~!?OO!T~5b!?VT'w5Y$UWO!^%T!_!`5T!`#o%T#p#q!=P#q~%T6X!?oR!S5}nQ$UWO!^%T!_#o%T#p~%TX!@PR!kP$UWO!^%T!_#o%T#p~%T7Z!@gr$UW'Y7R#zS']$y'g3SOX%TXY%cYZ%TZ[%c[p%Tpq%cqt%Ttu2`u}%T}!O3j!O!Q%T!Q![2`![!^%T!_!c%T!c!}2`!}#R%T#R#S2`#S#T%T#T#o2`#p$f%T$f$g%c$g#BY2`#BY#BZ!@Y#BZ$IS2`$IS$I_!@Y$I_$JT2`$JT$JU!@Y$JU$KV2`$KV$KW!@Y$KW&FU2`&FU&FV!@Y&FV?HT2`?HT?HU!@Y?HU~2`7Z!CO_$UW'Z7R#zS']$y'g3SOt%Ttu2`u}%T}!O3j!O!Q%T!Q![2`![!^%T!_!c%T!c!}2`!}#R%T#R#S2`#S#T%T#T#o2`#p$g%T$g~2`",tokenizers:[yf,ff,hf,gf,0,1,2,3,4,5,6,7,8,9,mf],topRules:{Script:[0,7]},dialects:{jsx:12107,ts:12109},dynamicPrecedences:{149:1,176:1},specialized:[{term:289,get:e=>vf[e]||-1},{term:299,get:e=>xf[e]||-1},{term:63,get:e=>Sf[e]||-1}],tokenPrec:12130});var Y=require("@codemirror/language"),Lr=require("@codemirror/state"),ap=require("@codemirror/view"),ce=require("@codemirror/autocomplete"),Dr=require("@lezer/common"),Qf=[(0,ce.snippetCompletion)("function ${name}(${params}) {\n ${}\n}",{label:"function",detail:"definition",type:"keyword"}),(0,ce.snippetCompletion)("for (let ${index} = 0; ${index} < ${bound}; ${index}++) {\n ${}\n}",{label:"for",detail:"loop",type:"keyword"}),(0,ce.snippetCompletion)("for (let ${name} of ${collection}) {\n ${}\n}",{label:"for",detail:"of loop",type:"keyword"}),(0,ce.snippetCompletion)("do {\n ${}\n} while (${})",{label:"do",detail:"loop",type:"keyword"}),(0,ce.snippetCompletion)("while (${}) {\n ${}\n}",{label:"while",detail:"loop",type:"keyword"}),(0,ce.snippetCompletion)(`try {
\${}
} catch (\${error}) {
\${}
}`,{label:"try",detail:"/ catch block",type:"keyword"}),(0,ce.snippetCompletion)("if (${}) {\n ${}\n}",{label:"if",detail:"block",type:"keyword"}),(0,ce.snippetCompletion)(`if (\${}) {
\${}
} else {
\${}
}`,{label:"if",detail:"/ else block",type:"keyword"}),(0,ce.snippetCompletion)(`class \${name} {
constructor(\${params}) {
\${}
}
}`,{label:"class",detail:"definition",type:"keyword"}),(0,ce.snippetCompletion)('import {${names}} from "${module}"\n${}',{label:"import",detail:"named",type:"keyword"}),(0,ce.snippetCompletion)('import ${name} from "${module}"\n${}',{label:"import",detail:"default",type:"keyword"})],ip=new Dr.NodeWeakMap,lp=new Set(["Script","Block","FunctionExpression","FunctionDeclaration","ArrowFunction","MethodDeclaration","ForStatement"]);function jn(e){return(t,n)=>{let r=t.node.getChild("VariableDefinition");return r&&n(r,e),!0}}var $f=["FunctionDeclaration"],kf={FunctionDeclaration:jn("function"),ClassDeclaration:jn("class"),ClassExpression:()=>!0,EnumDeclaration:jn("constant"),TypeAliasDeclaration:jn("type"),NamespaceDeclaration:jn("namespace"),VariableDefinition(e,t){e.matchContext($f)||t(e,"variable")},TypeDefinition(e,t){t(e,"type")},__proto__:null};function cp(e,t){let n=ip.get(t);if(n)return n;let r=[],i=!0;function o(s,a){let l=e.sliceString(s.from,s.to);r.push({label:l,type:a})}return t.cursor(Dr.IterMode.IncludeAnonymous).iterate(s=>{if(i)i=!1;else if(s.name){let a=kf[s.name];if(a&&a(s,o)||lp.has(s.name))return!1}else if(s.to-s.from>8192){for(let a of cp(e,s.node))r.push(a);return!1}}),ip.set(t,r),r}var op=/^[\w$\xa1-\uffff][\w$\d\xa1-\uffff]*$/,pp=["TemplateString","String","RegExp","LineComment","BlockComment","VariableDefinition","TypeDefinition","Label","PropertyDefinition","PropertyName","PrivatePropertyDefinition","PrivatePropertyName"];function wf(e){let t=(0,Y.syntaxTree)(e.state).resolveInner(e.pos,-1);if(pp.indexOf(t.name)>-1)return null;let n=t.to-t.from<20&&op.test(e.state.sliceDoc(t.from,t.to));if(!n&&!e.explicit)return null;let r=[];for(let i=t;i;i=i.parent)lp.has(i.name)&&(r=r.concat(cp(e.state.doc,i)));return{options:r,from:n?t.from:e.pos,validFor:op}}var _t=Y.LRLanguage.define({parser:rp.configure({props:[Y.indentNodeProp.add({IfStatement:(0,Y.continuedIndent)({except:/^\s*({|else\b)/}),TryStatement:(0,Y.continuedIndent)({except:/^\s*({|catch\b|finally\b)/}),LabeledStatement:Y.flatIndent,SwitchBody:e=>{let t=e.textAfter,n=/^\s*\}/.test(t),r=/^\s*(case|default)\b/.test(t);return e.baseIndent+(n?0:r?1:2)*e.unit},Block:(0,Y.delimitedIndent)({closing:"}"}),ArrowFunction:e=>e.baseIndent+e.unit,"TemplateString BlockComment":()=>null,"Statement Property":(0,Y.continuedIndent)({except:/^{/}),JSXElement(e){let t=/^\s*<\//.test(e.textAfter);return e.lineIndent(e.node.from)+(t?0:e.unit)},JSXEscape(e){let t=/\s*\}/.test(e.textAfter);return e.lineIndent(e.node.from)+(t?0:e.unit)},"JSXOpenTag JSXSelfClosingTag"(e){return e.column(e.node.from)+e.unit}}),Y.foldNodeProp.add({"Block ClassBody SwitchBody EnumBody ObjectExpression ArrayExpression":Y.foldInside,BlockComment(e){return{from:e.from+2,to:e.to-2}}})]}),languageData:{closeBrackets:{brackets:["(","[","{","'",'"',"`"]},commentTokens:{line:"//",block:{open:"/*",close:"*/"}},indentOnInput:/^\s*(?:case |default:|\{|\}|<\/)$/,wordChars:"$"}}),Tf=_t.configure({dialect:"ts"}),Ef=_t.configure({dialect:"jsx"}),Pf=_t.configure({dialect:"jsx ts"}),Cf="break case const continue default delete export extends false finally in instanceof let new return static super switch this throw true typeof var yield".split(" ").map(e=>({label:e,type:"keyword"}));function up(e={}){let t=e.jsx?e.typescript?Pf:Ef:e.typescript?Tf:_t;return new Y.LanguageSupport(t,[_t.data.of({autocomplete:(0,ce.ifNotIn)(pp,(0,ce.completeFromList)(Qf.concat(Cf)))}),_t.data.of({autocomplete:wf}),e.jsx?Rf:[]])}function sp(e,t,n=e.length){if(!t)return"";let r=t.getChild("JSXIdentifier");return r?e.sliceString(r.from,Math.min(r.to,n)):""}var qf=typeof navigator=="object"&&/Android\b/.test(navigator.userAgent),Rf=ap.EditorView.inputHandler.of((e,t,n,r)=>{if((qf?e.composing:e.compositionStarted)||e.state.readOnly||t!=n||r!=">"&&r!="/"||!_t.isActiveAt(e.state,t,-1))return!1;let{state:i}=e,o=i.changeByRange(s=>{var a,l,c;let{head:p}=s,u=(0,Y.syntaxTree)(i).resolveInner(p,-1),O;if(u.name=="JSXStartTag"&&(u=u.parent),r==">"&&u.name=="JSXFragmentTag")return{range:Lr.EditorSelection.cursor(p+1),changes:{from:p,insert:"><>"}};if(r==">"&&u.name=="JSXIdentifier"){if(((l=(a=u.parent)===null||a===void 0?void 0:a.lastChild)===null||l===void 0?void 0:l.name)!="JSXEndTag"&&(O=sp(i.doc,u.parent,p)))return{range:Lr.EditorSelection.cursor(p+1),changes:{from:p,insert:`></${O}>`}}}else if(r=="/"&&u.name=="JSXFragmentTag"){let d=u.parent,f=d==null?void 0:d.parent;if(d.from==p-1&&((c=f.lastChild)===null||c===void 0?void 0:c.name)!="JSXEndTag"&&(O=sp(i.doc,f==null?void 0:f.firstChild,p))){let m=`/${O}>`;return{range:Lr.EditorSelection.cursor(p+m.length),changes:{from:p,insert:m}}}}return{range:s}});return o.changes.empty?!1:(e.dispatch(o,{userEvent:"input.type",scrollIntoView:!0}),!0)});var Be=require("@codemirror/language"),ut=require("@codemirror/commands"),Ir=require("@codemirror/autocomplete"),Gr=require("@codemirror/search"),fp=require("@codemirror/lint");var Op=require("@codemirror/view"),Vr=require("@codemirror/language"),C=require("@lezer/highlight"),R={name:"obsidian",dark:!1,background:"var(--background-primary)",foreground:"var(--text-normal)",selection:"var(--text-selection)",cursor:"var(--text-normal)",dropdownBackground:"var(--background-primary)",dropdownBorder:"var(--background-modifier-border)",activeLine:"var(--background-primary)",matchingBracket:"var(--background-modifier-accent)",keyword:"#d73a49",storage:"#d73a49",variable:"var(--text-normal)",parameter:"var(--text-accent-hover)",function:"var(--text-accent-hover)",string:"var(--text-accent)",constant:"var(--text-accent-hover)",type:"var(--text-accent-hover)",class:"#6f42c1",number:"var(--text-accent-hover)",comment:"var(--text-faint)",heading:"var(--text-accent-hover)",invalid:"var(--text-error)",regexp:"var(--text-accent)"},Xf=Op.EditorView.theme({"&":{color:R.foreground,backgroundColor:R.background},".cm-content":{caretColor:R.cursor},"&.cm-focused .cm-cursor":{borderLeftColor:R.cursor},"&.cm-focused .cm-selectionBackground, .cm-selectionBackground, & ::selection":{backgroundColor:R.selection},".cm-panels":{backgroundColor:R.dropdownBackground,color:R.foreground},".cm-panels.cm-panels-top":{borderBottom:"2px solid black"},".cm-panels.cm-panels-bottom":{borderTop:"2px solid black"},".cm-searchMatch":{backgroundColor:R.dropdownBackground,outline:`1px solid ${R.dropdownBorder}`},".cm-searchMatch.cm-searchMatch-selected":{backgroundColor:R.selection},".cm-activeLine":{backgroundColor:R.activeLine},".cm-activeLineGutter":{backgroundColor:R.background},".cm-selectionMatch":{backgroundColor:R.selection},".cm-matchingBracket, .cm-nonmatchingBracket":{backgroundColor:R.matchingBracket,outline:"none"},".cm-gutters":{backgroundColor:R.background,color:R.comment,borderRight:"1px solid var(--background-modifier-border)"},".cm-lineNumbers, .cm-gutterElement":{color:"inherit"},".cm-foldPlaceholder":{backgroundColor:"transparent",border:"none",color:R.foreground},".cm-tooltip":{border:`1px solid ${R.dropdownBorder}`,backgroundColor:R.dropdownBackground,color:R.foreground},".cm-tooltip.cm-tooltip-autocomplete":{"& > ul > li[aria-selected]":{background:R.selection,color:R.foreground}},".cm-textfield":{backgroundColor:R.background,color:R.foreground},".cm-button":{backgroundColor:R.background,color:R.foreground,backgroundImage:"none"}},{dark:R.dark}),_f=Vr.HighlightStyle.define([{tag:C.tags.keyword,color:R.keyword},{tag:[C.tags.name,C.tags.deleted,C.tags.character,C.tags.macroName],color:R.variable},{tag:[C.tags.propertyName],color:R.function},{tag:[C.tags.processingInstruction,C.tags.string,C.tags.inserted,C.tags.special(C.tags.string)],color:R.string},{tag:[C.tags.function(C.tags.variableName),C.tags.labelName],color:R.function},{tag:[C.tags.color,C.tags.constant(C.tags.name),C.tags.standard(C.tags.name)],color:R.constant},{tag:[C.tags.definition(C.tags.name),C.tags.separator],color:R.variable},{tag:[C.tags.className],color:R.class},{tag:[C.tags.number,C.tags.changed,C.tags.annotation,C.tags.modifier,C.tags.self,C.tags.namespace],color:R.number},{tag:[C.tags.typeName],color:R.type,fontStyle:R.type},{tag:[C.tags.operator,C.tags.operatorKeyword],color:R.keyword},{tag:[C.tags.url,C.tags.escape,C.tags.regexp,C.tags.link],color:R.regexp},{tag:[C.tags.meta,C.tags.comment],color:R.comment},{tag:C.tags.strong,fontWeight:"bold"},{tag:C.tags.emphasis,fontStyle:"italic"},{tag:C.tags.link,textDecoration:"underline"},{tag:C.tags.heading,fontWeight:"bold",color:R.heading},{tag:[C.tags.atom,C.tags.bool,C.tags.special(C.tags.variableName)],color:R.variable},{tag:C.tags.invalid,color:R.invalid},{tag:C.tags.strikethrough,textDecoration:"line-through"}]),dp=[Xf,(0,Vr.syntaxHighlighting)(_f)];var Hr=[(0,me.lineNumbers)(),(0,me.highlightSpecialChars)(),(0,ut.history)(),up(),(0,me.drawSelection)(),(0,me.dropCursor)(),mp.EditorState.allowMultipleSelections.of(!0),(0,Be.indentOnInput)(),Be.indentUnit.of(" "),(0,Be.syntaxHighlighting)(Be.defaultHighlightStyle,{fallback:!0}),me.EditorView.lineWrapping,(0,Be.bracketMatching)(),(0,Ir.closeBrackets)(),(0,me.rectangularSelection)(),(0,Gr.highlightSelectionMatches)(),dp,me.keymap.of([...Ir.closeBracketsKeymap,...ut.defaultKeymap,...Gr.searchKeymap,...ut.historyKeymap,ut.indentWithTab,...fp.lintKeymap])].filter(e=>e);var G$=require("obsidian"),Cp=require("@codemirror/view");var _$=require("@codemirror/view");var hp=require("@codemirror/view");var RQ=require("@codemirror/state"),Br=class e{constructor(t,n,r,i,o){this.from=t;this.to=n;this.insert=r;this.keyPressed=i;this.after=o}getTabstops(){return this.insert.tabstops.map(t=>({index:t.index,from:this.from+t.from,to:this.from+t.to}))}applyChange(t){let n=t.mapPos(this.from,1),r=t.mapPos(this.to,-1);return new e(n,r,this.insert,this.keyPressed,this.after)}toChangeSpec(){return{from:this.from,to:this.to,insert:this.insert.insert}}};var Nr=require("@codemirror/language"),gp=require("@codemirror/state");var Zn=hp.ViewPlugin.fromClass(class{constructor(){this.snippetQueue=[]}clearSnippetQueue(){this.snippetQueue=[]}executeSnippetQueue(){let e=this.snippetQueue;return this.snippetQueue=[],e}QueueSnippets(e){this.snippetQueue=this.snippetQueue.concat(e)}});function Ur(e){let t=e.plugin(Zn);if(!t)throw new Error("SnippetQueue plugin not found, something went wrong with the plugin initialization");return t}function We(e,t,n,r,i,o){r=Af(e.state,t,n,r);let s=new Br(t,n,r,i,o);Ur(e).QueueSnippets([s])}var Af=(e,t,n,r)=>{let s=e.doc.lineAt(n).text.match(/^(>*)(\s*)/);if(!s)return r;let a=s[1],l=s[2],c=(0,gp.countColumn)(l,e.tabSize),p=(0,Nr.getIndentUnit)(e),u=c%p,O=r.insert.matchAll(/\n(\t*)/g);if(!O)return r;let d=r.tabstops,f=[],m=0;for(let g of O){let b=g[1],v=b.length*p+c-(b.length&&u),$=(0,Nr.indentString)(e,v),S=`
`+a+$,E=S.length-g[0].length;for(let T of d)T.from-m>g.index&&(T.from+=E),T.to-m>g.index&&(T.to+=E);m+=E,f.push({start:g.index,end:g.index+g[0].length,replacement:S})}return{insert:wi(r.insert,f),tabstops:d}};function Gs(e){Ur(e).clearSnippetQueue()}var l$=require("@codemirror/view"),Gn=require("@codemirror/state");var n$=require("@codemirror/view"),In=require("@codemirror/state"),$p=require("@codemirror/commands");var Dn=require("@codemirror/view"),Vn=require("@codemirror/state");var Ln=require("@codemirror/state"),Ot=require("@codemirror/view");var yp="latex-suite-snippet-placeholder";function Wf(e,t,n){let r=`${yp} ${yp}-${n}`;if(e===t){let i=Ot.Decoration.mark({inclusive:!0,color:n,class:r});return Ot.Decoration.prototype.range.call(i,e,t)}else return Ot.Decoration.mark({inclusive:!0,color:n,class:r}).range(e,t)}var Hs=class e{constructor(t,n){let r=t.map(i=>Wf(i.from,i.to,n));this.decos=Ot.Decoration.set(r,!0),this.color=n,this.hidden=!1}select(t,n,r){let i=this.toEditorSelection(),o=n?bp(i):i;t.dispatch({selection:o,effects:r?dt.of(null):void 0}),It(t),this.hideFromEditor()}toSelectionRanges(){let t=[],n=this.decos.iter();for(;n.value!=null;)t.push(Ln.EditorSelection.range(n.from,n.to)),n.next();return t}toEditorSelection(t=!1){let n=Ln.EditorSelection.create(this.toSelectionRanges());return t&&(n=bp(n)),n}containsSelection(t){function n(o,s){for(let a of s)if(a.from<=o.from&&a.to>=o.to)return!0;return!1}let r=this.toSelectionRanges(),i=!0;for(let o of t.ranges)if(!n(o,r)){i=!1;break}return i}hideFromEditor(){this.hidden=!0}map(t){this.decos=this.decos.map(t)}getRanges(){let t=[],n=this.decos.iter();for(;n.value!=null;)n.from!=n.to?t.push(n.value.range(n.from,n.to)):t.push(jf(n.from,n.to)),n.next();return t}copy(){let t=new e([],this.color);return t.decos=this.decos,t.hidden=this.hidden,t}};function vp(e,t){let n=[],r=0,i=e.slice().sort((s,a)=>{for(let l=0;l<Math.min(s.index.length,a.index.length);l++)if(s.index[l]!=a.index[l])return s.index[l]-a.index[l];return s.index.length-a.index.length}).map((s,a,l)=>{if(a===0)return j(A({},s),{index:r});let c=s.index.length===l[a-1].index.length&&s.index.every((p,u)=>p===l[a-1].index[u]);return r+=c?0:1,j(A({},s),{index:r})});for(let s of i){let a=s.index;n[a]?n[a].push(s):n[a]=[s]}let o=[];for(let s of n){let a=new Hs(s,t);o.push(a)}return o}function bp(e){let t=e.ranges.map(n=>Ln.EditorSelection.range(n.to,n.to));return Ln.EditorSelection.create(t)}var Mf=Ot.Decoration.widget({widget:new class extends Ot.WidgetType{toDOM(){let e=$t("span");return e.className=Bs,e}ignoreEvent(){return!1}}});function jf(e,t){return Mf.range(e,t)}var Fr=Vn.StateEffect.define(),Yr=Vn.StateEffect.define(),mt=Vn.StateField.define({create(){return{index:0,tabstopGroups:[],color:0}},update(e,t){let n=e.tabstopGroups,r=e.color;n.forEach(o=>o.map(t.changes));for(let o of t.effects)o.is(Fr)?n.splice(e.index,1,...o.value):o.is(Yr)&&(n=[],r=0);let i=e.index;return t.selection&&(i=Zf(n,t.selection),n.length<=1||i>=n.length-1?(n=[],i=0,r=0):n[0].hideFromEditor()),{index:i,tabstopGroups:n,color:r}},provide:e=>Dn.EditorView.outerDecorations.of(t=>{let n=t.state.field(e).tabstopGroups,r=[];for(let i of n)i.hidden||r.push(...i.getRanges());return Dn.Decoration.set(r,!0)})});function Zf(e,t){for(let[n,r]of e.entries())if(r.containsSelection(t))return n;return e.length}function Kr(e){return{effects:[Fr.of(e)]}}function xp(e){e.dispatch({effects:[Yr.of(null)]})}var Lf=3;function Sp(e){return e.state.field(mt).color++%Lf}var Bs="cm-snippetFieldPosition",ke="latex-suite-snippet-placeholder",zr="--placeholder-bg",At="--placeholder-outline",Qp=Dn.EditorView.baseTheme({[`.${Bs}`]:{verticalAlign:"text-top",width:"0",height:"1.15em",display:"inline-block",margin:"0 -0.7px -.7em",borderLeft:"1.4px dotted #888"},[`.${ke}`]:{borderRadius:"2px",backgroundColor:`var(${zr})`,outline:`var(${At}) solid 1px`},[`.${ke}-0, span.${ke}-0 span`]:{[zr]:"#87cefa2e",[At]:"#87cefa6e"},[`${se} .${ke}-0, span.${ke}-0 span`]:{[At]:"#87cefa43"},[`.${ke}-1, span.${ke}-1 span`]:{[zr]:"#ffa50033",[At]:"#ffa5006b"},[`${se} .${ke}-1, span.${ke}-1 span`]:{[At]:"#ffa5004d"},[`.${ke}-2, span.${ke}-2 span`]:{[zr]:"#0f02",[At]:"#00ff0060"},[`${se} .${ke}-2, span.${ke}-2 span`]:{[At]:"#00ff003d"}});var Wt=In.StateEffect.define(),dt=In.StateEffect.define(),Jr=In.StateEffect.define(),ei=In.StateEffect.define(),ti=$p.invertedEffects.of(e=>{let t=[];for(let n of e.effects)n.is(Wt)?t.push(Jr.of(n.value)):n.is(Jr)?t.push(Wt.of(n.value)):n.is(dt)?t.push(ei.of(null)):n.is(ei)&&t.push(dt.of(null));return t}),kp=e=>{let t=e.transactions.find(r=>r.isUserEvent("undo")),n=e.transactions.find(r=>r.isUserEvent("redo"));for(let r of e.transactions)for(let i of r.effects)i.is(Wt)&&n&&e.view.dispatch({effects:Kr(i.value.map(o=>o.copy())).effects});return t&&xp(e.view),!!(t||n)};var Ns=require("@codemirror/commands");function Us(e,t){let n;return typeof t.insert=="string"?n=new je(t.insert).applyInsert():Array.isArray(t.insert)?n=new U(t.insert).applyInsert():n=t.insert,We(e,t.from,t.to,n,t.keyPressed,t.after),tt(e)}function tt(e){let t=Ur(e).executeSnippetQueue();if(t.length===0)return!1;let n=Df(e,t),r=t.map(c=>c.toChangeSpec()),i=t.map(c=>c.applyChange(n)),o=n.compose(Gn.ChangeSet.of(r,n.newLength)),s=i.flatMap(c=>c.getTabstops()),a=e.state.selection.map(o,1),l={changes:o,selection:a};return s.length===0?(e.dispatch(l),!0):(Vf(e,s,l),!0)}var Ne=Gn.Annotation.define();function Df(e,t){var s;let n=e.state.doc,r=n.length,i=[];for(let a of t)if(a.keyPressed&&a.keyPressed.length===1){let l=(s=a.after)!=null?s:a.to,c=e.state.doc.sliceString(l-1,l),p=l===0?0:l-1;i.push({from:p,to:l,insert:c+a.keyPressed})}return i.length>0&&e.dispatch({changes:i,annotations:[Ns.isolateHistory.of("full"),Ne.of(!0)]}),Gn.ChangeSet.of(i,r).invert(n)}function Vf(e,t,n){let r=Sp(e),i=vp(t,r),o=i.map(p=>p.copy()),s=Kr(i).effects,c={selection:i[0].toEditorSelection(),effects:dt.of(null),sequential:!0};e.dispatch({effects:[...s,Wt.of(o)],changes:n.changes,selection:n.selection,annotations:Ns.isolateHistory.of("before")},c)}function zs(e,t){let n=e.state.field(mt).tabstopGroups,r=e.state.field(mt).index;function i(s,a){let l=n[s];if(!l)return!1;let c=e.state.selection,p=l.toEditorSelection();return l.containsSelection(c)&&(p=l.toEditorSelection(!0)),c.eq(p)?i(s+a,a):(e.dispatch({selection:p}),It(e),!0)}let o=t?-1:1;return i(r+o,o)}var k$=require("@codemirror/view");var x$=require("@codemirror/state");var Fs=e=>{let t=[];for(let n=0;n<e.length;){let r=e[n];if(/\s/.test(r)){n++;continue}let{token:i,nextIndex:o}=If(e,n);t.push(i),n=o}return t},If=(e,t)=>{switch(e[t]){case"%":return Gf(e,t);case"\\":return Hf(e,t);default:return Bf(e,t)}},Gf=(e,t)=>{let n=e.length,r=t+1;for(;r<n&&e[r]!==`
`;)r++;return{token:{start:t,end:r,text:e.slice(t,r)},nextIndex:r}},Hf=(e,t)=>{let n=e.length,r=t+1,i=e[r];if(/[A-Za-z]/.test(i))do r++;while(r<n&&/[A-Za-z]/.test(e[r]));else r++;return{token:{start:t,end:r,text:e.slice(t,r)},nextIndex:r}},Bf=(e,t)=>{let n=t+1;return{token:{start:t,end:n,text:e.slice(t,n)},nextIndex:n}};function wp(e,t){for(let n=e.length-1;n>=0;n--)if(t(e[n],n,e))return n;return null}function*Jt(e,t=0){for(let n of e){yield{region:n,depth:t};let r=n.kind==="bracket"?t+1:t;yield*sr(Jt(n.children,r))}}function Nf(e,t){return e.from===t.from&&e.to===t.to&&e.name===t.name}function*en(e,t){let n=e.cursor();if(n.moveTo(t.from,1),!(n.node.from<t.from)){for(;n.node.parent&&n.node.parent.from>=t.from&&n.parent()&&!Nf(e,n.node););do t.skipCursorMove=!1,!(n.to>t.to)&&(yield n);while((t.skipCursorMove||n.next())&&n.from<=t.to&&n.node!==e)}}var fe=class e{constructor(t,n,r,i=n){this.eqn=t;this.from=n;this.to=r;this.offset=i;this.skipCursorMove=!1}slice(t,n){return this.eqn.slice(t-this.offset,n-this.offset)}static fromNode(t,n){return new e(n.sliceString(t.from,t.to),t.from,t.to)}};var Uf=new Set(["\\left","\\bigl","\\Bigl","\\biggl","\\Biggl"]),zf=new Set(["\\right","\\bigr","\\Bigr","\\biggr","\\Biggr"]),Ff=new Set(["(",")","[","]","\\lbrack","\\rbrack","\\{","\\}","\\lbrace","\\rbrace","<",">","\\langle","\\rangle","\\lt","\\gt","|","\\vert","\\lvert","\\rvert","\\|","\\Vert","\\lVert","\\rVert","\\lfloor","\\rfloor","\\lceil","\\rceil","\\ulcorner","\\urcorner","/","\\\\","\\backslash","\\uparrow","\\downarrow","\\Uparrow","\\Downarrow","."]),Ys={"(":")","[":"]","{":"}","\\lbrack":"\\rbrack","\\lbrace":"\\rbrace","\\langle":"\\rangle","\\lvert":"\\rvert","\\lVert":"\\rVert","\\lfloor":"\\rfloor","\\lceil":"\\rceil","\\ulcorner":"\\urcorner","<":">"},Yf=e=>Uf.has(e.text),Tp=e=>zf.has(e.text),Ks=e=>Ff.has(e.text),Kf=(e,t)=>t.has(e.text),Jf=(e,t,n,r)=>{if(t>0){let i=e[t-1];if(Tp(i)&&Ks(r))return!0;if(Yf(i)&&Ks(r))return!1}return Kf(r,n)},eh=(e,t,n)=>{if(!Tp(n))return!1;if(t+1>=e.length)return!0;let r=e[t+1];return!Ks(r)},Js=(e,t)=>{var v;if(!t.mode.inMath())return!1;let n=t.getBounds();if(!n)return!1;let{inner_start:r,inner_end:i,outer_end:o,outer_start:s}=n;if(o<=t.pos)return!1;let a=e.state.doc,l=e.state.selection.main.to,c=l-r,p=a.sliceString(r,i),u=Fs(p),O=W(e),d=O.taboutClosingSymbols,f=u.findIndex($=>$.end>c),m=f===-1?u.length:f;for(let $=m;$<u.length;$++){let S=u[$];if(Jf(u,$,d,S))return Le(e,r+S.end),!0;if(eh(u,$,S))return console.warn("[tabout] Found right command without following delimiter:",S.text,"at index",r+S.start),Le(e,r+S.end),!0}if(!(a.sliceString(l,i).trim().length===0)&&O.taboutExitEquationOnlyOnEOL)return!1;if(!vt(e,n))Le(e,o);else{let $=a.lineAt(o),S=[],E=((v=a.lineAt(s).text.match(/^\s*/))==null?void 0:v[0])||"";if($.number===a.lines)S.push({changes:{from:$.to,to:$.to,insert:`
`+E},selection:{anchor:$.to+1+E.length}});else{let P=a.lineAt($.to+1);P.text.trim()===""?S.push({changes:{from:P.from,to:P.to,insert:E},selection:{anchor:$.to+1+E.length}}):S.push({selection:{anchor:$.to+1}})}let T=a.lineAt(l);T.text.trimEnd()!==T.text&&S.push({changes:{from:T.from,to:T.to,insert:T.text.trimEnd()}}),e.dispatch(...S)}return!0},Ep=(e,t)=>{let n=Fs(t),r=W(e).taboutClosingSymbols,i=[],o=qr(new Set(Object.values(Ys)),r),s=new Set(Object.keys(Ys).filter(a=>o.has(Ys[a])));for(let a of n)if(o.has(a.text)){if(i.length===0)return a.end;i.pop()}else s.has(a.text)&&i.push(a.text);return null},Pp=(e,t)=>{let n=e.state.selection.main;if(!n.empty)return!1;let r=n.from,i=Ma(e,r);return i===t&&[")","]","}"].includes(i)};var th=(e,t)=>{var s;let n=G(e),i=e.state.doc.lineAt(n.pos).text.match(/(\\begin{[^]]*}|\\\\|^)((?:\s|&)+)/),o=(s=i==null?void 0:i[2].trimStart())!=null?s:"";if(vt(e,t)){let a=new U([new le(` \\\\
`+o),new qe(0,"")]);We(e,n.pos,n.pos,a.applyInsert(Fe)),tt(e)}else e.dispatch(e.state.replaceSelection(` \\\\ ${o}`));return!0},nh=(e,t)=>{let n=G(e);if(vt(e,t)){let r=e.state.doc,i=r.lineAt(n.pos).number+1,o=r.line(i),s=o.text,a=/\\end{([^}]*)}/.exec(s),l=o.to;if(a&&a[1]&&a.index!==void 0){let c=a[1];W(e).matrixShortcutsEnvNames.includes(c)&&(l=o.from+a.index+a[0].length)}Le(e,l)}else Le(e,t.outer_end);return!0},rh=e=>e.state.selection.main.empty?(e.dispatch(e.state.replaceSelection(" & ")),!0):!1,ni=e=>t=>{let n=G(t);if(!n.mode.strictlyInMath()||!n.getBounds())return!1;let i=n.getEnvNames(n.pos).next().value;if(!i)return!1;let{matrixShortcutsEnvNames:o,matrixShortcutsMacroNames:s}=W(t);return i.kind==="environment"&&!o.includes(i.name)||i.kind==="command"&&!s.includes(i.name)||i.kind==="math"?!1:e(t,i)},ih=e=>{let t=G(e),n=e.state.doc.lineAt(t.pos),r=n.text.slice(t.pos-n.from),i=Ep(e,r);return i!==null?(Le(e,t.pos+i),!0):!1},tn=ni(th),ri=ni(nh),ii=ni(rh),oi=ni(ih);var qp=require("@codemirror/commands"),Y$=require("@codemirror/state");function oh(e){let n=G(e).getBounds();if(!n)return!1;let{inner_start:r,inner_end:i}=n,o="\\boxed{"+e.state.sliceDoc(r,i)+"}",s=e.state.sliceDoc(r-2,r)==="$$"&&e.state.sliceDoc(i,i+2)==="$$";s&&(o=`
`+o+`
`);let a=e.state.selection.main.to;yn(e,r,i,o),Le(e,a+7+(s?1:0))}function sh(){return{id:"latex-suite-box-equation",name:"Box current equation",editorCheckCallback:(e,t)=>{let n=t.cm,i=G(n).mode.inMath();if(e)return i;i&&oh(n)}}}function ah(){return{id:"latex-suite-select-equation",name:"Select current equation",editorCheckCallback:(e,t)=>{let n=t.cm,r=G(n),i=r.mode.inMath();if(e)return i;if(!i)return;let o=r.getBounds();if(!o)return!1;let{inner_start:s,inner_end:a}=o,l=n.state.doc.toString();l.charAt(s)===`
`&&s++,l.charAt(a-1)===`
`&&a--,ja(n,s,a)}}}function lh(e){return{id:"latex-suite-enable-all-features",name:"Enable all features",callback:()=>y(this,null,function*(){e.settings.snippetsEnabled=!0,e.settings.autofractionEnabled=!0,e.settings.matrixShortcutsEnabled=!0,e.settings.taboutEnabled=!0,e.settings.autoEnlargeBrackets=!0,yield e.saveSettings()})}}function ch(e){return{id:"latex-suite-disable-all-features",name:"Disable all features",callback:()=>y(this,null,function*(){e.settings.snippetsEnabled=!1,e.settings.autofractionEnabled=!1,e.settings.matrixShortcutsEnabled=!1,e.settings.taboutEnabled=!1,e.settings.autoEnlargeBrackets=!1,yield e.saveSettings()})}}function ph(e){return{id:"latex-suite-toggle-all-features",name:"Toggle all features",callback:()=>y(this,null,function*(){let t=e.settings.snippetsEnabled||e.settings.autofractionEnabled||e.settings.matrixShortcutsEnabled||e.settings.taboutEnabled||e.settings.autoEnlargeBrackets;e.settings.snippetsEnabled=!t,e.settings.autofractionEnabled=!t,e.settings.matrixShortcutsEnabled=!t,e.settings.taboutEnabled=!t,e.settings.autoEnlargeBrackets=!t,yield e.saveSettings()})}}function uh(e){return{id:"latex-suite-toggle-conceal",name:"Toggle conceal",callback:()=>y(this,null,function*(){e.settings.concealEnabled=!e.settings.concealEnabled,yield e.saveSettings()})}}var Rp=e=>[sh(),ah(),lh(e),ch(e),uh(e),ph(e)];function ea(e){return{id:"latex-suite-vim-select-mode",defineType:"defineAction",type:"action",action:t=>{var i;let n=(i=window==null?void 0:window.CodeMirrorAdapter)==null?void 0:i.Vim;if(!n)return;let r=t.listSelections();n.enterInsertMode(t),t.setSelections(r)},key:e.vimSelectMode,context:"visual"}}function ta(e){return{id:"latex-suite-vim-visual-mode",defineType:"defineAction",type:"action",action:t=>{var i;if(!t.somethingSelected())return;let n=t.listSelections(),r=(i=window==null?void 0:window.CodeMirrorAdapter)==null?void 0:i.Vim;r&&(r.exitInsertMode(t),t.setSelections(n))},key:e.vimVisualMode,context:"insert"}}function Hn(e){return{id:"latex-suite-vim-special-enter",defineType:"defineAction",type:"action",action:t=>{var a;let n=(a=window==null?void 0:window.CodeMirrorAdapter)==null?void 0:a.Vim;if(!n)return;let r=t.getCursor().line,i=t.getLine(r);t.setCursor({line:r,ch:i.length+1});let o=Cp.EditorView.findFromDOM(t.getWrapperElement());if(!o)return;if(tn(o)){n.enterInsertMode(t);return}(0,qp.insertNewlineAndIndent)({state:t.cm6.state,dispatch:l=>{let c=t.cm6;if(c.state.readOnly)return;let p="input.type.compose";if(t.curOp&&!t.curOp.lastChange&&(p="input.type.compose.start"),Array.isArray(l.annotations))try{l.annotations.forEach(u=>{u.value==="input"&&(u.value=p)})}catch(u){console.error(u)}else l.userEvent=p;c.dispatch(l)}})||console.error("Failed to insert newline and indent latex-suite-insert-newline-and-indent"),n.enterInsertMode(t)},key:e.vimMatrixEnter,context:"normal"}}function si(e){return[ea(e),ta(e),Hn(e)]}var te=require("obsidian");var Xp=window.i18next,na=Xp.createInstance();na.init({lng:Xp.language,fallbackLng:"en"});var _p=na,h=na.getFixedT(null,"settings");var li=require("@codemirror/state"),ra=require("@codemirror/view");var ci=class extends te.SettingTab{constructor(n,r){super();this.app=n;this.plugin=r;this.snippetsEditor=null;this.snippetVariablesEditor=null}getSettingDefinitions(){return[...this.getSnippetDefinitions(),...this.getConcealDefinitions(),...this.getColorHighlightBracketsDefinitions(),...this.getPopupPreviewDefinitions(),...this.getAutofractionDefinitions(),...this.getMatrixShortcutsDefinitions(),...this.getTaboutDefinitions(),...this.getAutoEnlargeBracketsDefinitions(),...this.getVimSettingDefinitions(),...this.getKeyMapDefinitions(),...this.getExperimentalDefinitions()]}getSnippetDefinitions(){let n=[];n.push({name:h("snippets.enabled.name"),desc:this.renderHtml(h("snippets.enabled.desc")),control:N("snippetsEnabled")},{name:h("snippets.snippets.name"),desc:this.renderHtml(h("snippets.snippets.desc")),render:i=>{var o;(o=this.snippetsEditor)==null||o.destroy(),this.snippetsEditor=Ap(i,this.plugin,{type:"snippets",validate:s=>y(this,null,function*(){let a=yield Ie(this.plugin.settings.snippetVariables,"snippet-variables.js");yield lt(s,a,"snippets.js")}),deleted:`export default [
]`})},visible:()=>!this.plugin.settings.loadSnippetsFromFile},{name:h("snippets.load-from-file.name"),desc:this.renderHtml(h("snippets.load-from-file.desc")),control:N("loadSnippetsFromFile")},{name:h("snippets.file-path.name"),desc:this.renderHtml(h("snippets.file-path.desc")),render:i=>{this.fileSearch(i,"snippetsFileLocation")},visible:()=>this.plugin.settings.loadSnippetsFromFile});let r=[{name:h("advanced-snippets.variables.name"),desc:this.renderHtml(h("advanced-snippets.variables.desc")),render:i=>{var o;(o=this.snippetVariablesEditor)==null||o.destroy(),this.snippetVariablesEditor=Ap(i,this.plugin,{type:"snippetVariables",validate:s=>y(this,null,function*(){yield Ie(s,"snippet-variables.js")}),deleted:`export default {
}`})},visible:()=>!this.plugin.settings.loadSnippetVariablesFromFile},{name:h("advanced-snippets.load-variables-from-file.name"),desc:this.renderHtml(h("advanced-snippets.load-variables-from-file.desc")),control:N("loadSnippetVariablesFromFile")},{name:h("advanced-snippets.variables-file-path.name"),desc:this.renderHtml(h("advanced-snippets.variables-file-path.desc")),render:i=>{this.fileSearch(i,"snippetVariablesFileLocation")},visible:()=>this.plugin.settings.loadSnippetVariablesFromFile},{name:h("advanced-snippets.word-delimiters.name"),desc:this.renderHtml(h("advanced-snippets.word-delimiters.desc")),control:{type:"text",key:"wordDelimiters",defaultValue:q.wordDelimiters}},{name:h("advanced-snippets.trailing-whitespace.name"),desc:this.renderHtml(h("advanced-snippets.trailing-whitespace.desc")),control:N("removeSnippetWhitespace")},{name:h("advanced-snippets.auto-delete$.name"),desc:this.renderHtml(h("advanced-snippets.auto-delete$.desc")),control:N("autoDelete$")},{name:h("advanced-snippets.suppress-IME-warning.name"),desc:this.renderHtml(h("advanced-snippets.suppress-IME-warning.desc")),control:N("suppressIMEWarning"),visible:()=>dh()&&this.plugin.settings.suppressSnippetTriggerOnIME},{name:h("advanced-snippets.suppress-IME.name"),desc:this.renderHtml(h("advanced-snippets.suppress-IME.desc")),control:N("suppressSnippetTriggerOnIME")},{name:h("advanced-snippets.code-languages.name"),desc:this.renderHtml(h("advanced-snippets.code-languages.desc")),control:ai("forceMathLanguages")},{name:h("advanced-snippets.snippet-debug-mode.name"),desc:this.renderHtml(h("advanced-snippets.snippet-debug-mode.desc")),control:{type:"dropdown",key:"snippetDebug",options:{off:h("advanced-snippets.snippet-debug-mode.options.off"),info:h("advanced-snippets.snippet-debug-mode.options.info"),verbose:h("advanced-snippets.snippet-debug-mode.options.verbose")},defaultValue:q.snippetDebug}}];return[{type:"page",name:h("snippets.heading"),items:[...n,{type:"group",heading:h("advanced-snippets.heading"),items:r}]}]}getConcealDefinitions(){let n=[{name:h("conceal.enabled.name"),desc:this.renderHtml(h("conceal.enabled.desc")),control:N("concealEnabled")},{name:h("conceal.reveal-delay.name"),desc:this.renderHtml(h("conceal.reveal-delay.desc")),control:{type:"number",key:"concealRevealTimeout",defaultValue:q.concealRevealTimeout,min:0}}];return[{type:"page",name:h("conceal.heading"),items:n}]}getColorHighlightBracketsDefinitions(){let n=[{name:h("highlight-brackets.color-brackets.name"),desc:this.renderHtml(h("highlight-brackets.color-brackets.desc")),control:N("colorPairedBracketsEnabled")},{name:h("highlight-brackets.highlight-brackets.name"),desc:this.renderHtml(h("highlight-brackets.highlight-brackets.desc")),control:N("highlightCursorBracketsEnabled")},{name:h("highlight-brackets.color-math.name"),desc:this.renderHtml(h("highlight-brackets.color-math.desc")),control:N("highlightDollarEnabled")}];return[{type:"page",name:h("highlight-brackets.heading"),items:n}]}getPopupPreviewDefinitions(){let n=[{name:h("math-preview.enabled.name"),desc:this.renderHtml(h("math-preview.enabled.desc")),control:N("mathPreviewEnabled")},{name:h("math-preview.position.name"),desc:this.renderHtml(h("math-preview.position.desc")),render:r=>{r.addDropdown(i=>i.addOption("above",h("math-preview.position.options.above")).addOption("below",h("math-preview.position.options.below")).setValue(this.plugin.settings.mathPreviewPositionIsAbove?"above":"below").onChange(o=>y(this,null,function*(){this.plugin.settings.mathPreviewPositionIsAbove=o==="above",yield this.plugin.saveSettings()})))}},{name:h("math-preview.cursor-symbol.name"),desc:this.renderHtml(h("math-preview.cursor-symbol.desc")),render:r=>{r.addText(i=>{i.setPlaceholder(q.mathPreviewCursor).setValue(this.plugin.settings.mathPreviewCursor).onChange(s=>y(this,null,function*(){this.plugin.settings.mathPreviewCursor=s,yield this.plugin.saveSettings()}));let o=r.controlEl.createEl("datalist",{attr:{id:"math-preview-cursor-list"}});return["\u25B6","\u2503","|","\\_","{\\mid}","{\\triangle}"].forEach(s=>o.createEl("option",{value:s})),i.inputEl.setAttribute("list","math-preview-cursor-list"),i})}},{name:h("math-preview.highlight-brackets.name"),desc:this.renderHtml(h("math-preview.highlight-brackets.desc")),control:N("mathPreviewBracketHighlighting")},{name:h("math-preview.display-live-preview.name"),desc:this.renderHtml(h("math-preview.display-live-preview.desc")),control:N("mathPreviewLivePreviewDisplay")}];return[{type:"page",name:h("math-preview.heading"),items:n}]}getAutofractionDefinitions(){let n=[{name:h("auto-fraction.enabled.name"),desc:this.renderHtml(h("auto-fraction.enabled.desc")),control:N("autofractionEnabled")},{name:h("auto-fraction.fraction-symbol.name"),desc:this.renderHtml(h("auto-fraction.fraction-symbol.desc")),render:r=>{r.addText(i=>{i.setPlaceholder(q.autofractionSymbol).setValue(this.plugin.settings.autofractionSymbol).onChange(s=>y(this,null,function*(){this.plugin.settings.autofractionSymbol=s,yield this.plugin.saveSettings()}));let o=r.controlEl.createEl("datalist",{attr:{id:"autofraction-symbol-list"}});["\\frac","\\dfrac","\\tfrac"].forEach(s=>o.createEl("option",{value:s})),i.inputEl.setAttribute("list","autofraction-symbol-list")})}},{name:h("auto-fraction.excluded-environments.name"),desc:this.renderHtml(h("auto-fraction.excluded-environments.desc")),control:{key:"autofractionExcludedEnvs",type:"textarea",defaultValue:q.autofractionExcludedEnvs,validate:r=>{try{rt(Li,r)}catch(i){return console.error(i),"Invalid environment format. Error: "+i.message}}}},{name:h("auto-fraction.breaking-characters.name"),desc:this.renderHtml(h("auto-fraction.breaking-characters.desc")),control:{key:"autofractionBreakingChars",type:"text",defaultValue:q.autofractionBreakingChars}}];return[{type:"page",name:h("auto-fraction.heading"),items:n}]}getMatrixShortcutsDefinitions(){let n=[{name:h("matrix-shortcuts.enabled.name"),desc:this.renderHtml(h("matrix-shortcuts.enabled.desc")),control:N("matrixShortcutsEnabled")},{name:h("matrix-shortcuts.environments.name"),desc:this.renderHtml(h("matrix-shortcuts.environments.desc")),control:{key:"matrixShortcutsEnvNames",type:"text",defaultValue:q.matrixShortcutsEnvNames}},{name:h("matrix-shortcuts.macros.name"),desc:this.renderHtml(h("matrix-shortcuts.macros.desc")),control:{key:"matrixShortcutsMacroNames",type:"text",defaultValue:q.matrixShortcutsMacroNames}}];return[{type:"page",name:h("matrix-shortcuts.heading"),items:n}]}getTaboutDefinitions(){let n=[{name:h("tabout.enabled.name"),desc:this.renderHtml(h("tabout.enabled.desc")),control:N("taboutEnabled")},{name:h("tabout.closing-brackets.name"),desc:this.renderHtml(h("tabout.closing-brackets.desc")),control:{type:"text",key:"taboutClosingSymbols",defaultValue:q.taboutClosingSymbols}},{name:h("tabout.exit-EOL.name"),desc:this.renderHtml(h("tabout.exit-EOL.desc")),control:N("taboutExitEquationOnlyOnEOL")}];return[{type:"page",name:h("tabout.heading"),items:n}]}getAutoEnlargeBracketsDefinitions(){let n=[{name:h("auto-enlarge.enabled.name"),desc:this.renderHtml(h("auto-enlarge.enabled.desc")),control:N("autoEnlargeBrackets")},{name:h("auto-enlarge.triggers.name"),desc:this.renderHtml(h("auto-enlarge.triggers.desc")),control:{type:"text",key:"autoEnlargeBracketsTriggers",defaultValue:q.autoEnlargeBracketsTriggers}},{name:h("auto-enlarge.space.name"),desc:this.renderHtml(h("auto-enlarge.space.desc")),control:N("autoEnlargeBracketsSpace")}];return[{type:"page",name:h("auto-enlarge.heading"),items:n}]}getVimSettingDefinitions(){return[{type:"page",name:"Vim",items:[{name:h("vim.enabled.name"),desc:this.renderHtml(h("vim.enabled.desc")),control:N("vimEnabled")},{name:h("vim.select-mode.name"),desc:this.renderHtml(h("vim.select-mode.desc")),control:ai("vimSelectMode")},{name:h("vim.visual-mode.name"),desc:this.renderHtml(h("vim.visual-mode.desc")),control:ai("vimVisualMode")},{name:h("vim.matrix-enter.name"),desc:this.renderHtml(h("vim.matrix-enter.desc")),control:ai("vimMatrixEnter")}]}]}getKeyMapDefinitions(){let n=[["snippet","snippetsTrigger"],["next-tabstop","snippetNextTabstopTrigger"],["prev-tabstop","snippetPreviousTabstopTrigger"],["auto-fraction","autofractionTrigger"],["matrix-newline","matrixShortcutsNewlineTrigger"],["matrix-cell","matrixShortcutsCellTrigger"],["matrix-exit","matrixShortcutsExitTrigger"],["tabout","taboutTrigger"]].map(r=>({name:h(`keymap.${r[0]}`),control:{type:"text",key:r[1],defaultValue:q[r[1]]}}));return[{type:"page",name:h("keymap.heading.name"),desc:this.renderHtml(h("keymap.heading.desc")),items:[{name:" ",desc:this.renderHtml(h("keymap.desc"))},{type:"list",items:n}]}]}getExperimentalDefinitions(){let n=[{name:h("experimental.snippet-recursion.name"),desc:this.renderHtml(h("experimental.snippet-recursion.desc")),control:{type:"number",key:"snippetRecursion",defaultValue:q.snippetRecursion,min:0}},{name:h("experimental.excalidraw-enabled.name"),desc:this.renderHtml(h("experimental.excalidraw-enabled.desc")),control:N("excalidrawSupportEnabled")},{name:h("experimental.log-level.name"),desc:this.renderHtml(h("experimental.log-level.desc")),control:{type:"dropdown",key:"logLevel",defaultValue:q.logLevel,options:{off:h("experimental.log-level.options.off"),info:h("experimental.log-level.options.info"),verbose:h("experimental.log-level.options.verbose"),vverbose:h("experimental.log-level.options.vverbose")}}}];return[{type:"page",name:h("experimental.heading.name"),desc:this.renderHtml(h("experimental.heading.desc")),items:n}]}fileSearch(n,r){n.addSearch(i=>{i.setPlaceholder(q[r]).setValue(this.plugin.settings[r]).onChange((0,te.debounce)(s=>y(this,null,function*(){s!==""&&(this.plugin.settings[r]=s,yield this.plugin.saveSettings(!0))}),7e3,!0));let o=i.inputEl;o.addClass("latex-suite-location-input-el"),new Mn(this.app,o)})}renderHtml(n){return n.includes("</")?(0,te.sanitizeHTMLToDom)(n):n}};function Ap(e,t,n){e.setClass("snippets-text-area");let r=e.controlEl.createDiv("snippets-editor-wrapper"),i=e.controlEl.createDiv("snippets-footer"),o=i.createDiv("snippets-editor-validity"),s=new te.ExtraButtonComponent(o);s.setIcon("checkmark").extraSettingsEl.addClass("snippets-editor-validity-indicator");let a=o.createDiv("snippets-editor-validity-text");a.addClass("setting-item-description");function l(g){s.setIcon(g?"checkmark":"cross"),s.extraSettingsEl.removeClass(g?"invalid":"valid"),s.extraSettingsEl.addClass(g?"valid":"invalid"),a.setText(g?"Saved":"Invalid syntax. Changes not saved")}let c=[...Hr],p=(0,te.debounce)(g=>y(this,null,function*(){let b=g.doc.toString(),v=!0;try{yield n.validate(b)}catch($){v=!1}l(v),v&&(t.settings[n.type]=b,yield t.saveSettings(!1,!0))}),500,!0),u=ra.EditorView.updateListener.of(g=>void y(this,null,function*(){g.docChanged&&p(g.state)}));c.push(u);let O=Oh(t.settings[n.type],c,r),d=i.createDiv("snippets-editor-buttons");return new te.ButtonComponent(d).setIcon("switch").setTooltip("Reset to default snippets").onClick(()=>y(this,null,function*(){new pi(t.app,"Are you sure? This will delete any custom snippets you have written.",g=>void Bn(g).setButtonText("Reset to default snippets"),()=>y(this,null,function*(){O.setState(li.EditorState.create({doc:q[n.type],extensions:c})),l(!0),t.settings[n.type]=q[n.type],yield t.saveSettings()})).open()})),new te.ButtonComponent(d).setIcon("trash").setTooltip("Remove all snippets").onClick(()=>y(this,null,function*(){new pi(t.app,"Are you sure? This will delete any custom snippets you have written.",g=>void Bn(g).setButtonText("Remove all snippets"),()=>y(this,null,function*(){let g=n.deleted;O.setState(li.EditorState.create({doc:g,extensions:c})),l(!0),t.settings[n.type]=g,yield t.saveSettings(!1,!0)})).open()})),O}var pi=class extends te.Modal{constructor(t,n,r,i){super(t),this.contentEl.addClass("latex-suite-confirmation-modal"),this.contentEl.createEl("p",{text:n}),new te.Setting(this.contentEl).addButton(o=>{r(o),o.onClick(()=>y(this,null,function*(){yield i(),this.close()}))}).addButton(o=>o.setButtonText("Cancel").onClick(()=>this.close()))}};function Oh(e,t,n){return new ra.EditorView({state:li.EditorState.create({doc:e,extensions:t}),parent:n,root:activeDocument})}function dh(){return te.Platform.isMobileApp}function ui(e){return e.includes("</")?(0,te.sanitizeHTMLToDom)(e):e}function N(e){return{type:"toggle",key:e,defaultValue:q[e]}}function ai(e){return{type:"text",key:e,defaultValue:q[e]}}var di=class extends Q.PluginSettingTab{constructor(n,r){super(n,r);this.snippetsEditor=null;this.snippetsFileLocEl=void 0;this.snippetVariablesFileLocEl=void 0;this.component=new Q.Component;this.plugin=r}hide(){var n;(n=this.snippetsEditor)==null||n.destroy()}setControlValue(n,r){return y(this,null,function*(){let i=this.plugin.settings;i[n]=r,yield this.plugin.saveSettings()})}getSettingDefinitions(){return new ci(this.app,this.plugin).getSettingDefinitions()}addHeading(n,r,i="math"){let o=new Q.Setting(n).setName(r).setHeading(),s=o.settingEl;s.addClass("latex-suite-settings-heading");let a=s.createDiv();return(0,Q.setIcon)(a,i),a.addClass("latex-suite-settings-icon"),s.prepend(a),o}display(){let{containerEl:n}=this;n.empty(),this.component.unload(),this.displaySnippetSettings(),this.displayConcealSettings(),this.displayColorHighlightBracketsSettings(),this.displayPopupPreviewSettings(),this.displayAutofractionSettings(),this.displayMatrixShortcutsSettings(),this.displayTaboutSettings(),this.displayAutoEnlargeBracketsSettings(),this.displayAdvancedSnippetSettings(),this.displayKeymapSettings(),this.displayExperimentalSettings(),this.component.load()}displaySnippetSettings(){let n=this.containerEl;this.addHeading(n,"Snippets","ballpen"),new Q.Setting(n).setName("Enabled").setDesc("Whether snippets are enabled.").addToggle(l=>l.setValue(this.plugin.settings.snippetsEnabled).onChange(c=>y(this,null,function*(){this.plugin.settings.snippetsEnabled=c,yield this.plugin.saveSettings()})));let r=new Q.Setting(n).setName("Snippets").setDesc('Enter snippets here. Remember to add a comma after each snippet, and escape all backslashes with an extra \\. Lines starting with "//" will be treated as comments and ignored.').setClass("snippets-text-area");this.createSnippetsEditor(r),new Q.Setting(n).setName("Load snippets from file or folder").setDesc("Whether to load snippets from a specified file, or from all files within a folder (instead of from the plugin settings).").addToggle(l=>l.setValue(this.plugin.settings.loadSnippetsFromFile).onChange(c=>y(this,null,function*(){this.plugin.settings.loadSnippetsFromFile=c,r.settingEl.toggleClass("hidden",c),this.snippetsFileLocEl!=null&&this.snippetsFileLocEl.toggleClass("hidden",!c),yield this.plugin.saveSettings()})));let i=new DocumentFragment;i.createDiv({},l=>{l.appendText("The file or folder to load snippets from. On desktop you can use ~/ or an absolute path. Files outside your vault or in hidden folders may not be watched for changes depending on your os.")});let o=new Q.Setting(n).setName("Snippets file or folder location").setDesc(i),s;o.addSearch(l=>{l.setPlaceholder(q.snippetsFileLocation).setValue(this.plugin.settings.snippetsFileLocation).onChange((0,Q.debounce)(c=>y(this,null,function*(){this.plugin.settings.snippetsFileLocation=c,yield this.plugin.saveSettings(!0)}),500,!0)),s=l.inputEl,s.addClass("latex-suite-location-input-el"),new Mn(this.app,s)}),this.snippetsFileLocEl=o.settingEl;let a=this.plugin.settings.loadSnippetsFromFile;r.settingEl.toggleClass("hidden",a),this.snippetsFileLocEl.toggleClass("hidden",!a)}displayConcealSettings(){let n=this.containerEl;this.addHeading(n,"Conceal","math-integral-x");let r=ui(h("conceal.enabled.desc"));new Q.Setting(n).setName("Enabled").setDesc(r).addToggle(o=>o.setValue(this.plugin.settings.concealEnabled).onChange(s=>y(this,null,function*(){this.plugin.settings.concealEnabled=s,yield this.plugin.saveSettings()})));let i=ui(h("conceal.reveal-delay.desc"));new Q.Setting(n).setName("Reveal delay (ms)").setDesc(i).addText(o=>o.setPlaceholder(String(q.concealRevealTimeout)).setValue(String(this.plugin.settings.concealRevealTimeout)).onChange(s=>{/^\d+$/.test(s)&&(this.plugin.settings.concealRevealTimeout=Number(s),this.plugin.saveSettings())}))}displayColorHighlightBracketsSettings(){let n=this.containerEl;this.addHeading(n,"Highlight and color brackets","parentheses"),new Q.Setting(n).setName("Color paired brackets").setDesc("Whether to colorize matching brackets.").addToggle(r=>r.setValue(this.plugin.settings.colorPairedBracketsEnabled).onChange(i=>y(this,null,function*(){this.plugin.settings.colorPairedBracketsEnabled=i,yield this.plugin.saveSettings()}))),new Q.Setting(n).setName("Highlight matching bracket beneath cursor").setDesc("When the cursor is adjacent to a bracket, highlight the matching bracket.").addToggle(r=>r.setValue(this.plugin.settings.highlightCursorBracketsEnabled).onChange(i=>y(this,null,function*(){this.plugin.settings.highlightCursorBracketsEnabled=i,yield this.plugin.saveSettings()}))),new Q.Setting(n).setName("Highlight math delimiters").setDesc("Whether to highlight matched and mismatched math delimiters in the editor according to latex suite parser. This parser behaves closer to the reading view parser than the editor/syntax highlighting parser.").addToggle(r=>r.setValue(this.plugin.settings.highlightDollarEnabled).onChange(i=>y(this,null,function*(){this.plugin.settings.highlightDollarEnabled=i,yield this.plugin.saveSettings()})))}displayPopupPreviewSettings(){let n=this.containerEl;this.addHeading(n,"Math popup preview","superscript");let r=new DocumentFragment,i=r.createDiv();i.setText("When inside an equation, show a popup preview window of the rendered math.");let o=r.createEl("br"),s=r.createDiv();s.setText("The popup preview will be shown for all inline math equations, as well as for block math equations in Source mode."),r.append(i,o,s);let a=new Q.Setting(n).setName("Enabled").setDesc(r),l=new Q.Setting(n).setName("Position").setDesc("Where to display the popup preview relative to the equation source.").addDropdown(d=>d.addOption("Above","Above").addOption("Below","Below").setValue(this.plugin.settings.mathPreviewPositionIsAbove?"Above":"Below").onChange(f=>y(this,null,function*(){this.plugin.settings.mathPreviewPositionIsAbove=f==="Above",yield this.plugin.saveSettings()}))),c=new Q.Setting(n).setName("Cursor symbol").setDesc(`The symbol to use as the cursor in the popup preview such as ${q.mathPreviewCursor}. Leave it blank to turn it off.`).addText(d=>{d.setPlaceholder(q.mathPreviewCursor).setValue(this.plugin.settings.mathPreviewCursor).onChange(m=>y(this,null,function*(){this.plugin.settings.mathPreviewCursor=m,yield this.plugin.saveSettings()}));let f=n.createEl("datalist",{attr:{id:"math-preview-cursor-list"}});return["\u25B6","\u2503","|","\\_","{\\mid}","{\\triangle}"].forEach(m=>f.createEl("option",{value:m})),d.inputEl.setAttribute("list","math-preview-cursor-list"),d}),p=new Q.Setting(n).setName("Highlight brackets in preview").setDesc("Whether to highlight the area within the nearest pair of brackets around the cursor in the popup preview.").addToggle(d=>d.setValue(this.plugin.settings.mathPreviewBracketHighlighting).onChange(f=>y(this,null,function*(){this.plugin.settings.mathPreviewBracketHighlighting=f,yield this.plugin.saveSettings()}))),u=new Q.Setting(n).setName("Display live preview").setDesc("Whether to display the tooltip in live preview mode. The cursor and bracket highlighting will only be shown in this preview and not in obsidian's preview. ").addToggle(d=>d.setValue(this.plugin.settings.mathPreviewLivePreviewDisplay).onChange(f=>y(this,null,function*(){this.plugin.settings.mathPreviewLivePreviewDisplay=f,yield this.plugin.saveSettings()}))),O=[l,c,p,u];O.forEach(d=>d.settingEl.toggleClass("hidden",!this.plugin.settings.mathPreviewEnabled)),a.addToggle(d=>d.setValue(this.plugin.settings.mathPreviewEnabled).onChange(f=>y(this,null,function*(){this.plugin.settings.mathPreviewEnabled=f,O.forEach(m=>m.settingEl.toggleClass("hidden",!f)),yield this.plugin.saveSettings()})))}displayAutofractionSettings(){let n=this.containerEl;this.addHeading(n,"Auto-fraction","math-x-divide-y-2"),new Q.Setting(n).setName("Enabled").setDesc("Whether auto-fraction is enabled.").addToggle(r=>r.setValue(this.plugin.settings.autofractionEnabled).onChange(i=>y(this,null,function*(){this.plugin.settings.autofractionEnabled=i,yield this.plugin.saveSettings()}))),new Q.Setting(n).setName("Fraction symbol").setDesc("The fraction symbol to use in the replacement. e.g. \\frac, \\dfrac, \\tfrac").addText(r=>{r.setPlaceholder(q.autofractionSymbol).setValue(this.plugin.settings.autofractionSymbol).onChange(o=>y(this,null,function*(){this.plugin.settings.autofractionSymbol=o,yield this.plugin.saveSettings()}));let i=n.createEl("datalist",{attr:{id:"autofraction-symbol-list"}});["\\frac","\\dfrac","\\tfrac"].forEach(o=>i.createEl("option",{value:o})),r.inputEl.setAttribute("list","autofraction-symbol-list")}),new Q.Setting(n).setName("Excluded environments").setDesc('A list of environments to exclude auto-fraction from running in. For example, to exclude auto-fraction from running while inside an exponent, such as e^{...}, use ["^{", "}"]').addTextArea(r=>r.setPlaceholder('[ ["^{", "}] ]').setValue(this.plugin.settings.autofractionExcludedEnvs).onChange(i=>y(this,null,function*(){this.plugin.settings.autofractionExcludedEnvs=i,yield this.plugin.saveSettings()}))),new Q.Setting(n).setName("Breaking characters").setDesc('A list of characters that denote the start/end of a fraction. e.g. if + is included in the list, "a+b/c" will expand to "a+\\frac{b}{c}". If + is not in the list, it will expand to "\\frac{a+b}{c}".').addText(r=>r.setPlaceholder(q.autofractionBreakingChars).setValue(this.plugin.settings.autofractionBreakingChars).onChange(i=>y(this,null,function*(){this.plugin.settings.autofractionBreakingChars=i,yield this.plugin.saveSettings()})))}displayMatrixShortcutsSettings(){let n=this.containerEl;this.addHeading(n,"Matrix shortcuts","brackets-contain"),new Q.Setting(n).setName("Enabled").setDesc("Whether matrix shortcuts are enabled.").addToggle(r=>r.setValue(this.plugin.settings.matrixShortcutsEnabled).onChange(i=>y(this,null,function*(){this.plugin.settings.matrixShortcutsEnabled=i,yield this.plugin.saveSettings()}))),new Q.Setting(n).setName("Environments").setDesc("A list of environment names to run the matrix shortcuts in, separated by commas.").addText(r=>r.setPlaceholder(q.matrixShortcutsEnvNames).setValue(this.plugin.settings.matrixShortcutsEnvNames).onChange(i=>y(this,null,function*(){this.plugin.settings.matrixShortcutsEnvNames=i,yield this.plugin.saveSettings()}))),new Q.Setting(n).setName("Macros").setDesc("A list of macro names to run the matrix shortcuts in, separated by commas.").addText(r=>r.setPlaceholder(q.matrixShortcutsMacroNames).setValue(this.plugin.settings.matrixShortcutsMacroNames).onChange(i=>y(this,null,function*(){this.plugin.settings.matrixShortcutsMacroNames=i,yield this.plugin.saveSettings()})))}displayTaboutSettings(){let n=this.containerEl;this.addHeading(n,"Tabout","tabout"),new Q.Setting(n).setName("Enabled").setDesc("Whether tabout is enabled.").addToggle(o=>o.setValue(this.plugin.settings.taboutEnabled).onChange(s=>y(this,null,function*(){this.plugin.settings.taboutEnabled=s,r.settingEl.toggleClass("hidden",!s),i.settingEl.toggleClass("hidden",!s),yield this.plugin.saveSettings()})));let r=new Q.Setting(n).setName("Closing brackets").setDesc("A list of closing brackets for tabout, separated by commas.").addText(o=>o.setPlaceholder(q.taboutClosingSymbols).setValue(this.plugin.settings.taboutClosingSymbols).onChange(s=>y(this,null,function*(){this.plugin.settings.taboutClosingSymbols=s,yield this.plugin.saveSettings()}))),i=new Q.Setting(n).setName("Exit equation only on EOL").setDesc("Whether to exit the equation only when the cursor is at the end of the line.").addToggle(o=>o.setValue(this.plugin.settings.taboutExitEquationOnlyOnEOL).onChange(s=>y(this,null,function*(){this.plugin.settings.taboutExitEquationOnlyOnEOL=s,yield this.plugin.saveSettings()})));r.settingEl.toggleClass("hidden",!this.plugin.settings.taboutEnabled),i.settingEl.toggleClass("hidden",!this.plugin.settings.taboutEnabled)}displayAutoEnlargeBracketsSettings(){let n=this.containerEl;this.addHeading(n,"Auto-enlarge brackets","parentheses"),new Q.Setting(n).setName("Enabled").setDesc("Whether to automatically enlarge brackets containing e.g. sum, int, frac.").addToggle(r=>r.setValue(this.plugin.settings.autoEnlargeBrackets).onChange(i=>y(this,null,function*(){this.plugin.settings.autoEnlargeBrackets=i,yield this.plugin.saveSettings()}))),new Q.Setting(n).setName("Triggers").setDesc("A list of symbols that should trigger auto-enlarge brackets, separated by commas.").addText(r=>r.setPlaceholder(q.autoEnlargeBracketsTriggers).setValue(this.plugin.settings.autoEnlargeBracketsTriggers).onChange(i=>y(this,null,function*(){this.plugin.settings.autoEnlargeBracketsTriggers=i,yield this.plugin.saveSettings()}))),new Q.Setting(n).setName("Space").setDesc("Whether to add a space after \\left( and before \\right) or not").addToggle(r=>r.setValue(this.plugin.settings.autoEnlargeBracketsSpace).onChange(i=>y(this,null,function*(){this.plugin.settings.autoEnlargeBracketsSpace=i,yield this.plugin.saveSettings()})))}displayAdvancedSnippetSettings(){let n=this.containerEl;this.addHeading(n,"Advanced snippet settings");let r=new Q.Setting(n).setName("Snippet variables").setDesc("Assign snippet variables that can be used as shortcuts when writing snippets.").addTextArea(f=>f.setValue(this.plugin.settings.snippetVariables).onChange(m=>y(this,null,function*(){this.plugin.settings.snippetVariables=m,yield this.plugin.saveSettings(!1,!0)})).setPlaceholder(q.snippetVariables)).setClass("latex-suite-snippet-variables-setting");new Q.Setting(n).setName("Load snippet variables from file or folder").setDesc("Whether to load snippet variables from a specified file, or from all files within a folder (instead of from the plugin settings).").addToggle(f=>f.setValue(this.plugin.settings.loadSnippetVariablesFromFile).onChange(m=>y(this,null,function*(){this.plugin.settings.loadSnippetVariablesFromFile=m,r.settingEl.toggleClass("hidden",m),this.snippetVariablesFileLocEl!=null&&this.snippetVariablesFileLocEl.toggleClass("hidden",!m),yield this.plugin.saveSettings()})));let i=new DocumentFragment;i.createDiv({},f=>{f.appendText("The file or folder to load snippets from. On desktop you can use ~/ or an absolute path. Files outside your vault or in hidden folders may not be watched for changes depending on your os.")});let o=new Q.Setting(n).setName("Snippet variables file or folder location").setDesc(i);o.addSearch(f=>{f.setPlaceholder(q.snippetVariablesFileLocation).setValue(this.plugin.settings.snippetVariablesFileLocation).onChange((0,Q.debounce)(g=>y(this,null,function*(){this.plugin.settings.snippetVariablesFileLocation=g,yield this.plugin.saveSettings(!0)}),500,!0));let m=f.inputEl;m.addClass("latex-suite-location-input-el"),new Mn(this.app,m)}),this.snippetVariablesFileLocEl=o.settingEl;let s=this.plugin.settings.loadSnippetVariablesFromFile;r.settingEl.toggleClass("hidden",s),this.snippetVariablesFileLocEl.toggleClass("hidden",!s),new Q.Setting(n).setName("Word delimiters").setDesc('Symbols that will be treated as word delimiters, for use with the "w" snippet option.').addText(f=>f.setPlaceholder(q.wordDelimiters).setValue(this.plugin.settings.wordDelimiters).onChange(m=>y(this,null,function*(){this.plugin.settings.wordDelimiters=m,yield this.plugin.saveSettings()}))),new Q.Setting(n).setName("Remove trailing whitespaces in snippets in inline math").setDesc("Whether to remove trailing whitespaces when expanding snippets at the end of inline math blocks.").addToggle(f=>f.setValue(this.plugin.settings.removeSnippetWhitespace).onChange(m=>y(this,null,function*(){this.plugin.settings.removeSnippetWhitespace=m,yield this.plugin.saveSettings()}))),new Q.Setting(n).setName("Remove closing $ when backspacing inside blank inline math").setDesc("Whether to also remove the closing $ when you delete the opening $ symbol inside blank inline math.").addToggle(f=>f.setValue(this.plugin.settings.autoDelete$).onChange(m=>y(this,null,function*(){this.plugin.settings.autoDelete$=m,yield this.plugin.saveSettings()})));let a=new Q.Setting(n).setName("Don't trigger snippets when IME is active").setDesc("Whether to suppress snippets triggering when an IME is active."),l=new Q.Setting(n).setName("Suppress IME warning").setDesc("Whether a warning is shown on startup if `Don't trigger snippets when IME is active` is enabled. Disable that setting if you are aware of the IME limitations. Currently only ios and android touch/swipe keyboards like gboard have support for IME. See https://github.com/artisticat1/obsidian-latex-suite/blob/main/DOCS.md#IME-keyboards for more info.").addToggle(f=>f.setValue(this.plugin.settings.suppressIMEWarning).onChange(m=>y(this,null,function*(){this.plugin.settings.suppressIMEWarning=m,yield this.plugin.saveSettings()})));l.settingEl.toggleClass("hidden",!(this.plugin.settings.suppressSnippetTriggerOnIME&&fi())),a.addToggle(f=>f.setValue(this.plugin.settings.suppressSnippetTriggerOnIME).onChange(m=>y(this,null,function*(){this.plugin.settings.suppressSnippetTriggerOnIME=m,l.settingEl.toggleClass("hidden",!(m&&fi())),yield this.plugin.saveSettings()}))),new Q.Setting(n).setName("Code languages to interpret as math mode").setDesc("Codeblock languages where the whole code block should be treated like a math block, separated by commas.").addText(f=>f.setPlaceholder(q.forceMathLanguages).setValue(this.plugin.settings.forceMathLanguages).onChange(m=>y(this,null,function*(){this.plugin.settings.forceMathLanguages=m,yield this.plugin.saveSettings()}))),new Q.Setting(n).setName("Snippet debug mode").setDesc('Set the level of debug information to log about snippet expansion. Set to "info" or "verbose" to help identify issues with snippet syntax or why a snippet is not expanding. Verbose mode will log most information to the developer console on debug level.').addDropdown(f=>f.addOption("off","Off").addOption("info","Info").addOption("verbose","Verbose").setValue(this.plugin.settings.snippetDebug).onChange(m=>y(this,null,function*(){this.plugin.settings.snippetDebug=m,yield this.plugin.saveSettings()})));let c=new Q.Setting(n).setName("Vim key bindings").setDesc("turn on/off vim keybindings. Note vim needs to be enabled in obsidian itself."),p=[],u=new Q.Setting(n).setName("Vim: Switch from visual mode to select mode").setDesc(`maps the key to switch from visual mode to select mode.
Keymap must be a vim keymap and can't contain any spaces. Use empty string to disable this feature.
(select mode=insert keybindings)`).addText(f=>f.setPlaceholder(q.vimSelectMode).setValue(this.plugin.settings.vimSelectMode).onChange(m=>y(this,null,function*(){var $;let g=this.plugin.settings.vimSelectMode;this.plugin.settings.vimSelectMode=m,yield this.plugin.saveSettings();let b=($=window==null?void 0:window.CodeMirrorAdapter)==null?void 0:$.Vim;if(!b)return;let v=ea(this.plugin.settings);b[v.defineType](v.id,v.action),b.mapCommand(v.key,v.type,v.id,{},{context:v.context}),b.unmap(g,v.context)})));p.push(u);let O=new Q.Setting(n).setName("Vim: Switch from select mode to visual mode").setDesc(`maps the key to switch from select mode to visual mode.
must be a vim keymap and can't contain any spaces. Example <C-g><C-A-i> = Ctrl-g + Ctrl-Alt-i.
Please check the vim keybinding first on another command like w before reporting it. Some keybindings like shift don't work due to the original vim plugin. Use empty string to disable this feature.
(select mode=insert keybindings)`).addText(f=>{f.setPlaceholder(q.vimVisualMode).setValue(this.plugin.settings.vimVisualMode).onChange(m=>y(this,null,function*(){var $;let g=this.plugin.settings.vimVisualMode;this.plugin.settings.vimVisualMode=m,yield this.plugin.saveSettings();let b=ta(this.plugin.settings),v=($=window==null?void 0:window.CodeMirrorAdapter)==null?void 0:$.Vim;v&&(v[b.defineType](b.id,b.action),v.mapCommand(b.key,b.type,b.id,{},{context:b.context}),v.unmap(g,b.context))}))});p.push(O);let d=new Q.Setting(n).setName("Vim: run matrix enter").setDesc(`maps the key to the action of inserting a new line below while appending \\\\ to the current line in a matrix environment.
Use empty string to disable this feature.`).addText(f=>{f.setPlaceholder(q.vimMatrixEnter).setValue(this.plugin.settings.vimMatrixEnter).onChange(m=>y(this,null,function*(){var $;let g=this.plugin.settings.vimMatrixEnter;this.plugin.settings.vimMatrixEnter=m,yield this.plugin.saveSettings();let b=($=window==null?void 0:window.CodeMirrorAdapter)==null?void 0:$.Vim;if(!b)return;b.unmap(g,"normal");let v=Hn(this.plugin.settings);b[v.defineType](v.id,v.action),b.mapCommand(v.key,v.type,v.id,{},{context:v.context}),b.unmap(g,v.context)}))});p.push(d),c.addToggle(f=>{var g,b,v,$;let m=this.plugin.settings.vimEnabled&&!!((b=(g=this.app).isVimEnabled)!=null&&b.call(g));p.forEach(S=>S.settingEl.toggleClass("hidden",!m)),f.setValue(this.plugin.settings.vimEnabled&&!!(($=(v=this.app).isVimEnabled)!=null&&$.call(v))).onChange(S=>y(this,null,function*(){var T;this.plugin.settings.vimEnabled=S,yield this.plugin.saveSettings(),p.forEach(P=>P.settingEl.toggleClass("hidden",!S));let E=(T=window==null?void 0:window.CodeMirrorAdapter)==null?void 0:T.Vim;if(E)for(let P of si(this.plugin.settings))E.unmap(P.key,P.context)}))})}displayKeymapSettings(){let n=this.containerEl;this.addHeading(n,"Keymap","keyboard");let r=[["snippet","snippetsTrigger"],["next-tabstop","snippetNextTabstopTrigger"],["prev-tabstop","snippetPreviousTabstopTrigger"],["auto-fraction","autofractionTrigger"],["matrix-newline","matrixShortcutsNewlineTrigger"],["matrix-cell","matrixShortcutsCellTrigger"],["matrix-exit","matrixShortcutsExitTrigger"],["tabout","taboutTrigger"]],i=new Q.Setting(n).setDesc(this.renderMarkdown(h("keymap.desc")));i.setClass("latex-suite-keymap-list"),i.settingEl.createEl("ul",{},o=>{for(let[s,a]of r)o.createEl("li",{cls:"latex-suite-keymap-item"},l=>{new Q.Setting(l).setName(h(`keymap.${s}`)).addText(c=>c.setPlaceholder(q[a]).setValue(this.plugin.settings[a]).onChange(p=>y(this,null,function*(){this.plugin.settings[a]=p,yield this.plugin.saveSettings()})))})})}displayExperimentalSettings(){let n=this.containerEl;this.addHeading(n,"Experimental features","experiment").setDesc("Features that are still in testing and may need user feedback. Backwards compatibility may break for these features/ these settings can be overriden.");let r=new DocumentFragment;r.createDiv({text:"How many times to run snippets in a row. Set to 0 disable recursion. "}).createEl("a",{href:"https://github.com/artisticat1/obsidian-latex-suite/pull/536",text:"Related pr/feedback."}),new Q.Setting(n).setName("Snippet recursion").setDesc(r).addText(o=>o.setPlaceholder(String(q.snippetRecursion)).setValue(String(this.plugin.settings.snippetRecursion)).onChange(s=>y(this,null,function*(){try{let a=parseInt(s,10);if(a<0){new Q.Notice("Snippet recursion must be a non-negative integer.");return}this.plugin.settings.snippetRecursion=a}catch(a){return}yield this.plugin.saveSettings()}))),new Q.Setting(n).setName(h("experimental.excalidraw-enabled.name")).setDesc(h("experimental.excalidraw-enabled.desc")).addToggle(o=>o.setValue(this.plugin.settings.excalidrawSupportEnabled).onChange(s=>y(this,null,function*(){this.plugin.settings.excalidrawSupportEnabled=s,yield this.plugin.saveSettings()}))),new Q.Setting(n).setName(h("experimental.log-level.name")).setDesc(h("experimental.log-level.desc")).addDropdown(o=>o.setValue(this.plugin.settings.logLevel).addOption("off",h("experimental.log-level.options.off")).addOption("info",h("experimental.log-level.options.info")).addOption("verbose",h("experimental.log-level.options.verbose")).addOption("vverbose",h("experimental.log-level.options.vverbose")).onChange(s=>y(this,null,function*(){this.plugin.settings.logLevel=s,yield this.plugin.saveSettings()})))}createSnippetsEditor(n){let r=n.controlEl.createDiv("snippets-editor-wrapper"),i=n.controlEl.createDiv("snippets-footer"),o=i.createDiv("snippets-editor-validity"),s=new Q.ExtraButtonComponent(o);s.setIcon("checkmark").extraSettingsEl.addClass("snippets-editor-validity-indicator");let a=o.createDiv("snippets-editor-validity-text");a.addClass("setting-item-description");function l(m){s.setIcon(m?"checkmark":"cross"),s.extraSettingsEl.removeClass(m?"invalid":"valid"),s.extraSettingsEl.addClass(m?"valid":"invalid"),a.setText(m?"Saved":"Invalid syntax. Changes not saved")}let c=Hr,p=ia.EditorView.updateListener.of(m=>void y(this,null,function*(){if(m.docChanged){let g=m.state.doc.toString(),b=!0,v;try{v=yield Ie(this.plugin.settings.snippetVariables,"snippet-variables.js"),yield lt(g,v,"snippets.js")}catch($){b=!1}if(l(b),!b)return;this.plugin.settings.snippets=g,yield this.plugin.saveSettings(!1,!0)}}));c.push(p);let u=mh(this.plugin.settings.snippets,c,r);this.snippetsEditor=u;let O=i.createDiv("snippets-editor-buttons");new Q.ButtonComponent(O).setIcon("switch").setTooltip("Reset to default snippets").onClick(()=>y(this,null,function*(){new mi(this.plugin.app,"Are you sure? This will delete any custom snippets you have written.",m=>void Bn(m).setButtonText("Reset to default snippets"),()=>y(this,null,function*(){u.setState(Oi.EditorState.create({doc:bn,extensions:c})),l(!0),this.plugin.settings.snippets=bn,yield this.plugin.saveSettings()})).open()})),new Q.ButtonComponent(O).setIcon("trash").setTooltip("Remove all snippets").onClick(()=>y(this,null,function*(){new mi(this.plugin.app,"Are you sure? This will delete any custom snippets you have written.",m=>void Bn(m).setButtonText("Remove all snippets"),()=>y(this,null,function*(){let m=`[
]`;u.setState(Oi.EditorState.create({doc:m,extensions:c})),l(!0),this.plugin.settings.snippets=m,yield this.plugin.saveSettings()})).open()}))}renderMarkdown(n){return ui(n)}},mi=class extends Q.Modal{constructor(t,n,r,i){super(t),this.contentEl.addClass("latex-suite-confirmation-modal"),this.contentEl.createEl("p",{text:n}),new Q.Setting(this.contentEl).addButton(o=>{r(o),o.onClick(()=>y(this,null,function*(){yield i(),this.close()}))}).addButton(o=>o.setButtonText("Cancel").onClick(()=>this.close()))}};function mh(e,t,n){return new ia.EditorView({state:Oi.EditorState.create({doc:e,extensions:t}),parent:n})}function fi(){return Q.Platform.isMobileApp}function Bn(e){return(0,Q.requireApiVersion)("1.13.0")?e.setDestructive().setCta():e.setWarning(),e}var Wp={math:`<svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-math" width="100" height="100" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round">
<path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
<path d="M19 5h-7l-4 14l-3 -6h-2"></path>
<path d="M14 13l6 6"></path>
<path d="M14 19l6 -6"></path>
</svg>`,"math-x-divide-y-2":`<svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-math-x-divide-y-2" width="100" height="100" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round">
<path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
<path d="M3 21l18 -18"></path>
<path d="M15 14l3 4.5"></path>
<path d="M21 14l-4.5 7"></path>
<path d="M3 4l6 6"></path>
<path d="M3 10l6 -6"></path>
</svg>`,parentheses:`<svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-parentheses" width="100" height="100" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round">
<path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
<path d="M7 4a12.25 12.25 0 0 0 0 16"></path>
<path d="M17 4a12.25 12.25 0 0 1 0 16"></path>
</svg>`,"math-function":`<svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-math-function" width="100" height="100" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round">
<path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
<path d="M3 19a2 2 0 0 0 2 2c2 0 2 -4 3 -9s1 -9 3 -9a2 2 0 0 1 2 2"></path>
<path d="M5 12h6"></path>
<path d="M15 12l6 6"></path>
<path d="M15 18l6 -6"></path>
</svg>`,"math-integral-x":`<svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-math-integral-x" width="100" height="100" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round">
<path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
<path d="M3 19a2 2 0 0 0 2 2c2 0 2 -4 3 -9s1 -9 3 -9a2 2 0 0 1 2 2"></path>
<path d="M14 12l6 6"></path>
<path d="M14 18l6 -6"></path>
</svg>`,"brackets-contain":`<svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-brackets-contain" width="100" height="100" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round">
<path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
<path d="M7 4h-4v16h4"></path>
<path d="M17 4h4v16h-4"></path>
<path d="M8 16h.01"></path>
<path d="M12 16h.01"></path>
<path d="M16 16h.01"></path>
</svg>`,"code-dots":`<svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-code-dots" width="100" height="100" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round">
<path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
<path d="M15 12h.01"></path>
<path d="M12 12h.01"></path>
<path d="M9 12h.01"></path>
<path d="M6 19a2 2 0 0 1 -2 -2v-4l-1 -1l1 -1v-4a2 2 0 0 1 2 -2"></path>
<path d="M18 19a2 2 0 0 0 2 -2v-4l1 -1l-1 -1v-4a2 2 0 0 0 -2 -2"></path>
</svg>`,ballpen:`<svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-ballpen" width="100" height="100" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round">
<path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
<path d="M14 6l7 7l-4 4"></path>
<path d="M5.828 18.172a2.828 2.828 0 0 0 4 0l10.586 -10.586a2 2 0 0 0 0 -2.829l-1.171 -1.171a2 2 0 0 0 -2.829 0l-10.586 10.586a2.828 2.828 0 0 0 0 4z"></path>
<path d="M4 20l1.768 -1.768"></path>
</svg>`,superscript:`<svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-superscript" width="100" height="100" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round">
<path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
<path d="M5 7l8 10m-8 0l8 -10"></path>
<path d="M21 11h-4l3.5 -4a1.73 1.73 0 0 0 -3.5 -2"></path>
</svg>`,tabout:`<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100" viewBox="0 0 10.583 10.583">
<g style="fill:none;stroke:currentColor;stroke-width:3.22892904;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none">
<path d="M14.818 22.164h-.688c-1.52 0-3.983-1.82-3.983-4.066V-.612c0-2.245 2.462-4.065 3.983-4.065h.688" style="stroke-width:3.22892904;stroke-miterlimit:4;stroke-dasharray:none" transform="translate(6.566 2.931) scale(.24373)"/>
<path d="M5.605 22.16h.662c1.462 0 3.88-1.906 3.88-4.258v-1.065M5.605-4.674h.662c1.462 0 3.88 1.907 3.88 4.259V.65" style="stroke-width:3.22892904;stroke-miterlimit:4;stroke-dasharray:none" transform="translate(6.566 2.931) scale(.24373)"/>
</g>
<g style="fill:none;stroke:currentColor;stroke-width:3.22892904;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none">
<path d="M0 0h24v24H0Z" style="fill:none;stroke:none;stroke-width:3.22892904;stroke-miterlimit:4;stroke-dasharray:none" transform="translate(2.662 4.719) scale(.24373)" stroke="none"/>
<path d="M-9.136 8.694v5.17a1 1 0 0 0 1 1h23.658a1 1 0 0 0 1-1v-5.17" style="stroke-width:3.22892904;stroke-miterlimit:4;stroke-dasharray:none" transform="translate(2.662 4.719) scale(.24373)"/>
</g>
</svg>
`};var Yn=require("@codemirror/view");var sw=require("@codemirror/view"),lw=require("@codemirror/state");var Bk=require("@codemirror/view");function Mp(e,t){return e.includes(t)}var Me=require("@codemirror/view"),Dp=require("@codemirror/state");var Wk=require("@lezer/common");var fh=3,nn="latex-suite-highlighted-bracket",pe="latex-suite-color-bracket",Nn="latex-suite-mismatched-bracket";function hi(e,t,n){return Me.Decoration.mark({inclusive:!0,attributes:{},class:t}).range(e,e+n)}var oa={"{":"}","[":"}","(":")","\\{":"\\}","\\left<":"\\right>","\\langle ":"\\rangle","\\lvert":"\\rvert","\\lVert":"\\rVert","\\right\\lt":"\\right\\gt","\\lbrace":"\\rbrace","\\lbrack":"\\rbrack","\\lceil":"\\rceil","\\lfloor":"\\rfloor","\\lgroup":"\\rgroup","\\llcorner":"\\lrcorner","\\lmoustache":"\\rmoustache","\\lparen":"\\rparen"},sa=Object.fromEntries(Object.entries(oa).map(([e,t])=>[t,e]));function hh(e,t){var l;let n=e.node.getChild(_.MathOpening),r=e.node.getChild(_.MathClosing),i=e.node.getChild(_.Math),o=i?rn(i,new fe(t.eqn,i.from,i.to,t.offset)):[];if(!n||!r)return[];let s=(l=r==null?void 0:r.to)!=null?l:n.to;s&&e.moveTo(s,-1);let a;if(n&&r)return a={kind:"bracket",open:n,close:r,children:o},[a];if(n)return a={kind:"error_open",open:n,bracket:t.slice(n.from,n.to)},[a,...o];if(r){let c=t.slice(r.from,r.to);return a={kind:"error_close",close:r,bracket:c},[...o,a]}return[]}function gh(e,t){let n=e.node,r=t.slice(n.from,n.to),i=r in oa,o=r in sa,s;if(i)s={kind:"error_open",open:n,bracket:t.slice(n.from,n.to)};else if(o)s={kind:"error_close",close:n,bracket:t.slice(n.from,n.to)};else return[];return[s]}var yh={OpenBrace:"CloseBrace",OpenBracket:"CloseBracket",OpenParenMath:"CloseParenMath"};function bh(e,t){let n=e.node,r=n,i=yh[n.name],o=[];for(;e.nextSibling();){let s=e.node;if(s&&s.name===i)return[{kind:"bracket",open:r,close:s,children:o}];if(s){let a=new fe(t.eqn,s.from,s.to,t.offset);o.push(...rn(s,a))}}return[{kind:"error_open",open:r,bracket:t.slice(r.from,r.to)},...o]}function vh(e,t){let n=t.slice(e.from,e.to),r=[];for(let i=0;i<n.length;i++){let o=n[i],s={from:e.from+i,to:e.from+i+1},a=o in oa,l=o in sa;a?r.push({kind:"error_open",open:s,bracket:t.slice(s.from,s.to)}):l&&r.push({kind:"error_close",close:s,bracket:t.slice(s.from,s.to)})}return r}function rn(e,t){let n=[],r={[_.MathDelimitedGroup]:hh};for(let i of en(e,t)){let o=i.node,s=r[o.type.id];if(s){let a=s(i,t);n.push(...a)}else o.name.endsWith("CtrlSeq")||o.type.is(_.CtrlSym)?n.push(...gh(i,t)):o.type.is(_.MathSpecialChar)?n.push(...vh(i,t)):o.type.is(_.OpenBrace)||o.type.is(_.OpenBracket)||o.type.is(_.OpenParenMath)?n.push(...bh(i,t)):(o.type.is(_.CloseBrace)||o.type.is(_.CloseBracket))&&n.push({kind:"error_close",close:o,bracket:t.slice(o.from,o.to)})}return n}function Un(e){var i;let t=[],n=null,r=[];for(let o of e){let s=(i=n==null?void 0:n.children)!=null?i:t,a=j(A({},o),{parent:n,children:[]});if(a.kind==="error_open")r.push(a),s.push(a),n=a;else if(a.kind==="error_close"){let l=sa[a.bracket],c=wp(r,p=>p.bracket===l);if(c!==null){let p=r[c];n=p,r.length=c,Object.assign(p,{kind:"bracket",close:a.close}),n=p.parent}else s.push(a)}else a.kind==="bracket"&&o.kind==="bracket"&&(s.push(a),Un(o.children).forEach(c=>{c.parent=a,a.children.push(c)}))}return t}function jp(e,t){let n=oe(e).getEquationOverlays(e.state),r={},i=[];for(let s of n){let a=t[s.text];if(a){r[s.text]=a;for(let O of a)i.push(hi(O.pos+s.overlay.from,O.className,O.bracket));continue}let l=new fe(s.text,s.overlay.from,s.overlay.to),c=rn(s.bound.tree,l),p=Un(c),u=[];for(let{region:O,depth:d}of Jt(p)){if(O.kind==="error_close"||O.kind==="error_open"){let m=O.kind==="error_open"?O.open.from:O.close.from;u.push({pos:m,className:Nn,bracket:O.bracket.length});continue}let f=d%fh;u.push({pos:O.open.from,className:`${pe}-${f}`,bracket:O.open.to-O.open.from}),u.push({pos:O.close.from,className:`${pe}-${f}`,bracket:O.close.to-O.close.from})}i.push(...u.map(O=>hi(O.pos,O.className,O.bracket))),r[s.text]=u.map(O=>j(A({},O),{pos:O.pos-l.offset}))}return t=r,{decorations:Me.Decoration.set(i,!0),cached_equations:t}}function Zp(e){let t=[],r=e.state.selection.ranges;if(!G(e).mode.inMath())return Me.Decoration.none;let o=oe(e).getEquationOverlays(e.state);for(let s of r){let a=o.find(O=>O.overlay.from<=s.from&&O.bound.inner_end>=O.overlay.to);if(!a)continue;let l=new fe(a.text,a.overlay.from,a.overlay.to),c=Un(rn(a.bound.tree,l)),p=null,u={from:s.from,to:s.to,empty:s.empty};for(let{region:O,depth:d}of Jt(c))if(O.kind==="bracket"){if(!u.empty&&(O.close.to<=u.to&&O.close.to>=u.from||O.open.from>=u.to&&O.open.from<=u.from)){p={region:O,depth:d};break}if(O.open.from<=u.to&&O.close.to>=u.to){p={region:O,depth:d};continue}if(O.open.from>u.to)break}p&&t.push(hi(p.region.open.from,nn,p.region.open.to-p.region.open.from),hi(p.region.close.from,nn,p.region.close.to-p.region.close.from))}return Me.Decoration.set(t,!0)}var aa=Me.ViewPlugin.fromClass(class{constructor(e){this.cached_equations={};({decorations:this.decorations,cached_equations:this.cached_equations}=jp(e,this.cached_equations))}update(e){e.transactions.some(t=>t.annotation(Ne))||(e.docChanged||e.viewportChanged)&&({decorations:this.decorations,cached_equations:this.cached_equations}=jp(e.view,this.cached_equations))}},{decorations:e=>e.decorations}),xh=Me.EditorView.baseTheme({[`${$e} .${pe}-0, ${$e} .${pe}-0 .cm-bracket`]:{color:"#527aff"},[`${se} .${pe}-0, ${se} .${pe}-0 .cm-bracket`]:{color:"#47b8ff"},[`${$e} .${pe}-1, ${$e} .${pe}-1 .cm-bracket`]:{color:"#ff50b7"},[`${se} .${pe}-1, ${se} .${pe}-1 .cm-bracket`]:{color:"#ff55cd"},[`${$e} .${pe}-2, ${$e} .${pe}-2 .cm-bracket`]:{color:"#69ba00"},[`${se} .${pe}-2, ${se} .${pe}-2 .cm-bracket`]:{color:"#73ff63"},[`${$e} .${Nn}, ${$e} .${Nn} .cm-bracket`]:{color:"rgb(255 18 18 / 80%)"},[`${se} .${Nn}, ${se} .${Nn} .cm-bracket`]:{color:"rgb(255 18 18 / 80%)"}}),Vp=Dp.Prec.lowest([aa,xh]),la=Me.ViewPlugin.fromClass(class{constructor(e){this.decorations=Zp(e)}update(e){e.transactions.some(t=>t.annotation(Ne))||(e.docChanged||e.selectionSet)&&(this.decorations=Zp(e.view))}},{decorations:e=>e.decorations}),Lp="hsl(var(--accent-h) var(--accent-s)",Sh=Me.EditorView.baseTheme({[`${$e} .${nn}, ${$e} .${nn} [class^="${pe}-"]`]:{backgroundColor:`${Lp} 40% / 30%)`},[`${se} .${nn}, ${se} .${nn} [class^="${pe}-"]`]:{backgroundColor:`${Lp} 70% / 60%)`}}),Ip=[la,Sh];var Qh=["\\big","\\Big","\\bigg","\\Bigg","\\bigl","\\Bigl","\\biggl","\\Biggl","\\bigr","\\Bigr","\\biggr","\\Biggr","\\left","\\right"];function $h(e,t,n){let r=e.resolveInner(t,-1);if(!r.type.is(_.CtrlSeq))return!1;let i=n.slice(r.from,r.to);return Mp(Qh,i)}var on=e=>{let t=W(e);if(!t.autoEnlargeBrackets)return!1;let n=oe(e).getEquationOverlays(e.state),r=e.state.selection.main.head,i=n.filter(c=>c.bound.inner_start<=r&&c.bound.inner_end>=r)[0];if(!i)return!1;let o="\\left",s="\\right",a=new fe(i.text,i.overlay.from,i.overlay.to),l=Un(rn(i.bound.tree,a));for(let{region:c}of Jt(l)){if(c.kind!=="bracket")continue;let p=a.slice(c.open.from,c.open.to),u=a.slice(c.close.from,c.close.to);if(p==="{"||p==="\\("||p.startsWith("\\left")||u.startsWith("\\right")||$h(i.bound.tree,c.open.from,a))continue;let O=a.slice(c.open.to,c.close.from);if(t.autoEnlargeBracketsTriggers.every(g=>!O.includes(g)))continue;let d=t.autoEnlargeBracketsSpace?" ":"",f=new le(o+p+d),m=new le(d+s+u);We(e,c.open.from,c.open.to,f.applyInsert(Fe)),We(e,c.close.from,c.close.to,m.applyInsert(Fe))}return tt(e)};var ca=(e,t,n)=>{let r=!1;for(let i=0;i<=n.recursive;i++){let o=G(e),s=!1;for(let l of o.ranges)Th(e,o,t,{from:l.from,to:l.to},n.debug).shouldAutoEnlargeBrackets&&(s=!0);let a=tt(e);if(r=r||a,s&&on(e),!a)break;t.key=void 0}return r},kh=(e,t)=>{let n=e.state.sliceDoc(0,t),r=null;return{line:n,effectiveLineAfter:()=>(r=r!=null?r:e.state.sliceDoc(t),r)}},wh=(e,t)=>{let n={from:t.from,to:t.to},r=e.state.sliceDoc(t.from,t.to),i=r,o={range:{original:t,parsed:n},sel:{original:r,parsed:i}};if(t.from===t.to)return o;n.to=n.from+i.length;let s=e.state.doc.lineAt(n.from),a=/^((?:> ?)*)(\s*)/,l=s.text.match(a);if(!l)return o;let c=l[1].split(">").length-1,p=l[2],u=!1;if(i=r.replaceAll(new RegExp("\\n((?:> ?)*)(\\s*)","g"),(f,m,g)=>u?f:m.split(">").length-1!==c||g.length<p.length?(u=!0,f):`
`),u)return o;if(s.from===n.from){let f=i.match(/^(> ?)*\s*/);f&&(n.from+=f[0].length,i=i.replace(a,""))}return{range:{original:t,parsed:n},sel:{original:r,parsed:i}}},Th=(e,t,n,r,i)=>{var f;let o=W(e),{line:s,effectiveLineAfter:a}=kh(e,r.to),l=r.to,{range:c,sel:p}=wh(e,r),u=(f=n.key)!=null?f:"";if(n.key&&n.key.length!==1)return{success:!1,shouldAutoEnlargeBrackets:!1};let O=Array.from(t.getEnvNames(l)),d=s+u;for(let[m,g]of n.snippets.entries()){let b=g.isWithinIncludedScope(O);if(!g.options.snippetShouldRunInMode(t.mode,b===1)||b===2)continue;let v=g.process({effectiveLine:d,range:c,sel:p,effectiveLineAfter:a,view:e});if(v===null||g.isWithinExcludedScope(O))continue;let $=v.triggerPos,S=v.triggerEndPos?v.triggerEndPos-u.length:l;if(g.options.onWordBoundary&&!Eh(e.state,$,l,o.wordDelimiters))continue;let E=v.replacement;t.mode.inlineMath&&o.removeSnippetWhitespace&&(E=Ph(E,t));let T=$,P=g.options.automatic&&g.type!=="visual"&&g.options.undoKey?u:void 0;We(e,T,S,E,P,l);let Z=o.autoEnlargeBracketsTriggers.some(V=>E.insert.contains(V));return(i==="info"||i==="verbose")&&Oc(e.state,g,E.insert,Z),i==="verbose"&&console.debug({snippets_unexpanded:n.snippets.slice(0,m).map(V=>({description:V.description,trigger:V.trigger,options:V.options,replacement:V.replacement})),current_mode:t.mode,updatedLine:d}),{success:!0,shouldAutoEnlargeBrackets:Z}}return{success:!1,shouldAutoEnlargeBrackets:!1}},Eh=(e,t,n,r)=>{let i=e.sliceDoc(t-1,t),o=e.sliceDoc(n,n+1);return r=r.replace("\\n",`
`),r.contains(i)&&r.contains(o)},Ph=(e,t)=>{let n=e.tabstops;e.insert=e.insert.trimEnd();for(let r of n)r.to=Math.min(r.to,e.insert.length),r.from=Math.min(r.from,e.insert.length);return e};var vw=require("@codemirror/view"),Sw=require("@codemirror/state");var gi=e=>{let t=G(e);for(let r of t.ranges)qh(e,t,r);let n=tt(e);return n&&on(e),n},Ch="alpha|beta|gamma|Gamma|delta|Delta|epsilon|varepsilon|zeta|eta|theta|Theta|iota|kappa|lambda|Lambda|mu|nu|omicron|xi|Xi|pi|Pi|rho|sigma|Sigma|tau|upsilon|Upsilon|varphi|phi|Phi|chi|psi|Psi|omega|Omega",Gp=new RegExp("("+Ch+") ([^ ])","g"),qh=(e,t,n)=>{let r=W(e),{from:i,to:o}=n;for(let d of r.autofractionExcludedEnvs)if(t.isWithinEnvironment(o,d))return!1;let s=t.getBounds();if(!s)return!1;let a=s.inner_start,l=e.state.sliceDoc(a,o),c=a;if(i!=o)c=i;else{Gp.lastIndex=0,l=l.replace(Gp,"$1#$2");for(let d=l.length-1;d>=0;d--){let f=l.charAt(d);if([")","]","}"].contains(f)){let m=f,g=Za(m),b=Gt(l,d,g,m,!0);if(b===null)return!1;d=b}if(` $([{
`.concat(r.autofractionBreakingChars).contains(f)){c=d+1+a;break}}}if(c===o)return!1;let p=e.state.sliceDoc(c,o);p.at(0)==="("&&p.at(-1)===")"&&Gt(p,0,"(",")",!1)===p.length-1&&(p=p.slice(1,-1));let u=new U([new le(r.autofractionSymbol+"{"),p===""?new qe(0):new le(p),new le("}{"),new qe(1),new le("}"),new qe(2)]),O=i!=o?void 0:"/";return We(e,c,o,u.applyInsert(Fe),O),!0};var bi=require("@codemirror/view"),sn=require("@codemirror/state"),an=require("obsidian");var Hp=require("@codemirror/language");var yi="latex-suite-math-preview-highlight",zn=sn.StateEffect.define(),Fn=sn.StateField.define({create:()=>[],update(e,t){for(let n of t.effects)if(n.is(zn))return n.value;return e},provide:e=>bi.showTooltip.computeN([e],t=>t.field(e).map(n=>n.tooltip))}),Rh=(e,t,n,r)=>{let i=(l,c,p,u,O)=>{let d=0;for(let f=c;f>=0&&f<l.length;f+=O)if(l[f]===p&&d++,l[f]===u){if(d===0)return f;d--}return-1},o=e[t]===r?t-1:t,s=i(e,o,r,n,-1),a=i(e,t,n,r,1);return{left:s,right:a}};function Bp(e){if(!(e.docChanged||e.selectionSet))return;let n=W(e.state),r=G(e.view),i=Xh(e.state,r);if(!i){e.state.field(Fn).length>0&&e.view.dispatch({effects:[zn.of([])]});return}let o=e.state.sliceDoc(i.inner_start,i.inner_end),s=r.pos,l=(0,Hp.syntaxTree)(e.state).cursor();l.moveTo(s,-1);let c;l.name==="math_tag"&&l.from<s&&l.to>=s?c=l.from:c=s;let p=c-i.inner_start,u,O=o.replaceAll(/\\[\\{}]/g,"\\R"),{left:d,right:f}=n.mathPreviewBracketHighlighting?Rh(O,p,"{","}"):{left:-1,right:-1};if(f!==-1&&d!==-1){let S=Math.max(d+1,p);u=o.slice(0,d+1)+`\\style{background-color: var(--${yi});}{`+o.slice(d+1,S)+n.mathPreviewCursor+o.slice(S,f)+"}"+o.slice(f)}else u=o.slice(0,p)+n.mathPreviewCursor+o.slice(p);let m=e.state.field(Fn);if(m.length===1&&m[0].equation===u&&m[0].bounds.inner_start===i.inner_start&&m[0].bounds.inner_end===i.inner_end)return;let g=vt(e.view,i),b=n.mathPreviewPositionIsAbove,v=()=>{var E;let S=$t("div");if(S.addClass("cm-tooltip-cursor"),S.addClass(b?"cm-tooltip-above":"cm-tooltip-below"),r.mode.blockMath){let T=(E=e.state.doc.lineAt(i.inner_start).text.match(/^ {0,3}(>+)/))==null?void 0:E[1].length;if(T){let P=new RegExp(`^ {0,3}>{${T}}`,"gm");P.test(o)&&(u=u.replaceAll(P,""))}}try{let T=(0,an.renderMath)(u,r.mode.inDisplayMath()),P=T.querySelector(`[style*="background-color: var(--${yi})"]`);P==null||P.addClass(yi),P==null||P.style.removeProperty("background-color"),S.appendChild(T),(0,an.finishRenderMath)()}catch(T){console.error("Error rendering math in tooltip:",T),S.textContent=o}return{dom:S}},$=[];if(g)$=[{pos:b?i.inner_start:i.inner_end,above:b,strictSide:!0,arrow:!0,create:v}];else if(!g&&b)$=[{pos:i.inner_start,above:!0,strictSide:!0,arrow:!0,create:v}];else if(!g&&!b){let S=sn.EditorSelection.range(i.inner_end,i.inner_end);$=[{pos:Math.max(i.inner_start,e.view.moveToLineBoundary(S,!1).anchor),above:!1,strictSide:!0,arrow:!0,create:v}]}e.view.dispatch({effects:[zn.of($.map(S=>({equation:u,bounds:i,pos:S.pos,tooltip:S})))]})}function Xh(e,t){if(!t.mode.inMath())return null;let n=W(e),r=e.field(an.editorLivePreviewField);if(t.mode.blockMath&&r&&!n.mathPreviewLivePreviewDisplay)return null;let i=t.getBounds();return!i||e.sliceDoc(i.inner_start,i.inner_end).trim()===""?null:i}var Np=bi.EditorView.baseTheme({".cm-tooltip.cm-tooltip-cursor":{backgroundColor:"var(--background-secondary)",color:"var(--text-normal)",border:"1px solid var(--background-modifier-border-hover)",padding:"4px 6px",borderRadius:"6px","& .cm-tooltip-arrow:before":{borderTopColor:"var(--background-modifier-border-hover)",borderBottomColor:"var(--background-modifier-border-hover)"},"& .cm-tooltip-arrow:after":{borderTopColor:"var(--background-secondary)",borderBottomColor:"var(--background-secondary)"},"& p":{margin:"0px"},"& mjx-container":{padding:"2px !important"},"&.cm-tooltip-above":{display:"flex"},"&.cm-tooltip-above > .MathJax":{overflowY:"auto",maxHeight:"70%",display:"inline-block",alignSelf:"flex-end"},"&.cm-tooltip-below > .MathJax":{overflowY:"auto",maxHeight:"90%"}},[`.${yi}`]:{backgroundColor:"var(--text-selection)"},[`${se} .cm-tooltip.cm-tooltip-cursor`]:{boxShadow:"0 1px 2px rgb(0 0 0 / 10%), 0 3.4px 6.7px rgb(0 0 0 / 15%), 0 0 30px rgb(0 0 0 / 27%)"},[`${$e} .cm-tooltip.cm-tooltip-cursor`]:{boxShadow:"0 1px 2px rgb(0 0 0 / 2.8%), 0 3.4px 6.7px rgb(0 0 0 / 4.2%), 0 5px 20px rgb(0 0 0 / 7%)"}});function Up(e){if(!W(e).autoDelete$)return!1;let t=oe(e),n=e.state.selection.main.head,i=t.getTree(e.state).resolveInner(n,-1);if(i.name!==w.Dollar)return!1;let o=i.prevSibling,s=i.nextSibling,a=s==null?void 0:s.nextSibling,l=i.parent;return i.from<n&&i.to>n&&i.to-i.from==2?(yn(e,i.from,i.to,""),!0):o||!a||!l||a.name!==w.Dollar||l.name!==w.DollarInlineMath||i.to!==a.from||n!==i.to?!1:(yn(e,i.from,a.to,""),!0)}var zp=e=>{let t=W(e.state);if(t.mathPreviewEnabled&&!e.transactions.some(i=>i.annotation(Ne))&&Bp(e),kp(e)||e.transactions.filter(i=>i.isUserEvent("input.type")).length===0||!t.snippetIMEVersion)return;pa("",!1,e.view.composing,e.view)&&console.debug("Handled input event as snippet trigger")},Kn=Yn.ViewPlugin.fromClass(class{constructor(){this.lastKeyboardEvent=null}onKeydown(e,t){if(e.key=="Unidentified"||e.key=="Process"||e.key=="Dead"){this.lastKeyboardEvent=e;return}else this.lastKeyboardEvent=null;(!W(t).snippetIMEVersion&&pa(e.key,e.ctrlKey||e.metaKey,Zi(t,e),t)||(0,Yn.runScopeHandlers)(t,e,"latex-suite"))&&e.preventDefault()}},{eventHandlers:{keydown(e,t){t.plugin(Kn).onKeydown(e,t)}}}),Fp=(e,t,n,r)=>{var s;if(W(e).snippetIMEVersion)return!1;let o=(s=e.plugin(Kn))==null?void 0:s.lastKeyboardEvent;if(r==="\0\0")return!0;if(r.length==1&&o){r===" "&&(r="Tab");let a=new KeyboardEvent("keydown",j(A({},o),{key:r,keyCode:void 0}));if(pa(r,o.ctrlKey||o.metaKey,Zi(e,o),e)||(0,Yn.runScopeHandlers)(e,a,"latex-suite"))return Da(e),!0}return!1},pa=(e,t,n,r)=>{if(e.length>1)return!1;let i=W(r);if(!i.snippetsEnabled||i.suppressSnippetTriggerOnIME&&n||t)return!1;let o=i.snippets.automatic;try{let s={recursive:i.snippetRecursion,debug:i.snippetDebug};if(ca(r,{snippets:o,key:e},s))return!0}catch(s){Gs(r),console.error(s)}return!1};function Yp(e){let t=[];e.autoDelete$&&t.push({key:"Backspace",run:Up});let n=new Set(e.snippets.all.map(s=>s.triggerKey).filter(s=>s!==""));n.add(e.snippetsTrigger);let r=s=>{let a=e.snippets.all.filter(l=>l.triggerKey===s||!l.triggerKey&&!l.options.automatic&&s===e.snippetsTrigger);return l=>{let c=W(l);if(c.suppressSnippetTriggerOnIME&&l.composing)return!1;try{let p={recursive:c.snippetRecursion,debug:c.snippetDebug};return ca(l,{snippets:a},p)}catch(p){return Gs(l),console.error(p),!1}}};e.snippetsEnabled&&t.push(...Array.from(n,s=>({key:s,run:r(s)}))),t.push({key:e.snippetNextTabstopTrigger,run:function(a){return zs(a,!1)}}),t.push({key:e.snippetPreviousTabstopTrigger,run:function(a){return zs(a,!0)}}),e.autofractionEnabled&&t.push({key:e.autofractionTrigger,run:function(a){return!W(a).autofractionEnabled||!G(a).mode.strictlyInMath()?!1:gi(a)}});let i=[{key:e.matrixShortcutsNewlineTrigger,run:tn},{key:e.matrixShortcutsCellTrigger,run:ii},{key:e.matrixShortcutsExitTrigger,run:ri}];e.taboutEnabled&&e.taboutTrigger===e.matrixShortcutsCellTrigger&&i.unshift({key:e.taboutTrigger,run:oi}),e.matrixShortcutsEnabled&&t.push(...i);let o=[{key:e.taboutTrigger,run:function(a){if(!a.state.selection.main.empty)return!1;let l=G(a);return Js(a,l)}},...[")","}","]"].map(s=>({key:s,run:function(l){if(!Pp(l,s))return!1;let c=G(l);return Js(l,c)}}))];return e.taboutEnabled&&t.push(...o),t.map(s=>j(A({},s),{scope:"latex-suite"}))}var jt=require("@codemirror/view");var Kp=[mt,Zn,ti,Qp];var we=require("@codemirror/view"),Ue=require("@codemirror/state");var dT=require("@codemirror/view");var hT=require("@lezer/common");var _h=A(A({},Ht),pr),eu={mathbf:"cm-concealed-bold",boldsymbol:"cm-concealed-bold",underline:"cm-concealed-underline",mathrm:"cm-concealed-mathrm",mathbb:void 0},tu={hat:"\u0302",dot:"\u0307",ddot:"\u0308",overline:"\u0304",bar:"\u0304",tilde:"\u0303",vec:"\u20D7"};function ft(e){let t=e.nextSibling;if(!t||!t.type.is(_.MathArgument))return null;let n=t.firstChild;if(!n||!n.type.is(_.OpenBrace))return null;let r=n.nextSibling;if(!r||!r.type.is(_.Math))return null;let i=r.nextSibling;return!i||!i.type.is(_.CloseBrace)?null:{mathArgumentNode:t,openBraceNode:n,mathNode:r,closeBraceNode:i}}function Ah(e){let t=e.nextSibling;if(!t||!t.type.is(_.TextArgument))return null;let n=t.firstChild;if(!n||!n.type.is(_.OpenBrace))return null;let r=n.nextSibling;if(!r||!r.type.is(_.LongArg))return null;let i=r.nextSibling;return!i||!i.type.is(_.CloseBrace)?null:{textArgumentNode:t,openBraceNode:n,textNode:r,closeBraceNode:i}}function Wh(e,t){let n=e.node,r=ft(n);if(!r)return{spec:[],kind:1};let i=ft(r.mathArgumentNode);if(!i)return{spec:[],kind:1};let o=r.openBraceNode,s=r.closeBraceNode,a=i.openBraceNode,l=i.closeBraceNode,c=t.slice(o.from,l.to);if(Ii[c])return e.moveTo(n.to,-1),{spec:[{start:n.from,end:l.to,text:Ii[c]}],kind:1};let p={start:n.from,end:n.to,text:""},u={start:o.from,end:o.to,text:"(",class:"cm-bracket"},O={start:s.from,end:s.to,text:")",class:"cm-bracket"},d={start:s.to,end:s.to,text:"/",class:"cm-bracket"},f={start:a.from,end:a.to,text:"(",class:"cm-bracket"},m={start:l.from,end:l.to,text:")",class:"cm-bracket"};return{spec:[p,u,O,d,f,m],kind:1}}function Mh(e,t,n){let r=e.node,i=tu[n],o=ft(r);if(!o)return{spec:[],kind:1};let s=o.mathNode,a=o.closeBraceNode,l=t.slice(s.from,s.to),c=/^[A-Za-z]$/.test(l)?l:l[0]==="\\"&&Ht[l.slice(1)];return c?(e.moveTo(a.to,1),t.skipCursorMove=!0,{spec:[{start:r.from,end:a.to,text:c+i,class:"latex-suite-unicode"}],kind:1}):{spec:[],kind:1}}function nu(e,t){let n=e.node.cursor();n.next();let r=n.node;return r.type.is(_.MathCommand)&&t.slice(r.from+1,r.to)==="limits"?(e.moveTo(r.to,1),t.skipCursorMove=!0,r.to):e.to}function jh(e,t,n){let r=ur[n];return{spec:[{start:e.from,end:e.to,text:r,class:"cm-bracket"}],kind:1}}function Zh(e,t,n){let r="\u3008",i="\u3009",o="|",s=e.node,a=ft(s);if(!a)return{spec:[],kind:1};let l=a.closeBraceNode,c=a.openBraceNode,p=n==="ket"?o:r,u=n==="bra"?o:i;return{spec:[{start:s.from,end:c.from,text:""},{start:c.from,end:c.to,text:p},{start:l.from,end:l.to,text:u}],kind:1}}function Lh(e,t,n){let r=e.node,i=nu(e,t);return{spec:[{start:r.from,end:i,text:n,class:"cm-concealed-mathrm cm-variable-2"}],kind:1}}function Jp(e,t){let n=e.from,r=e.node.cursor();if(!r.next())return{spec:[],kind:1};let i=t.slice(r.from,r.to),o=tl[i]||i[0]==="\\"&&ur[i.slice(1)];return o?(e.moveTo(r.to,1),t.skipCursorMove=!0,{spec:[{start:n,end:r.to,text:o,class:"cm-bracket"}],kind:1}):{spec:[],kind:0}}function Dh(e,t,n){let r=e.slice(Math.max(t.from,t.to-1),t.to);if(r!=="_"&&r!=="^")return{spec:[],kind:0};let i=t.to-1,o=r==="_"?"sub":"sup",s=["MathCommand","Group","MathDelimitedGroup","MathChar","Number"],a=n.node.cursor();if(!a.next())return{spec:[],kind:1};let l=a.node;if(!s.includes(l.name))return{spec:[],kind:0};if(l.name==="MathChar"||l.name==="Number"){let b=Math.min(l.to,l.from+1);return n.moveTo(l.to,1),e.skipCursorMove=!0,{spec:[{start:i,end:b,text:e.slice(l.from,b),class:"cm-number",elementType:o}],kind:1}}let c=new fe(e.eqn,l.from,l.to,e.offset),p=ru(l,c),u=l.name==="Group",O=l.from+Number(u),d=[],f=p.flat().sort((b,v)=>b.start-v.start),m=!1;for(let b of f)if(!(b.end<O)){if("elementType"in b||"class"in b){m=!0;break}d.push(e.slice(O,b.start),b.text),O=b.end}return m?{spec:[],kind:1}:(d.push(e.slice(O,l.to-Number(u))),n.moveTo(l.to,1),e.skipCursorMove=!0,{spec:[{start:i,end:l.to,text:d.join(""),class:"cm-number",elementType:o}],kind:1})}function Vh(e,t){let n=e.node,r=ft(n);if(!r)return{spec:[],kind:1};let i=r.mathNode,o=r.closeBraceNode,s=t.slice(i.from,i.to);return/[^A-Za-z]/.test(s)?{spec:[],kind:1}:(e.moveTo(o.to,1),t.skipCursorMove=!0,{spec:[{start:n.from,end:o.to,text:s,class:"cm-concealed-mathrm cm-variable-2"}],kind:1})}function Ih(e,t){let n=e.node,r=ft(n);if(!r)return{spec:[],kind:1};let i=r.openBraceNode,o=r.closeBraceNode;e.moveTo(i.to,1),t.skipCursorMove=!0;let s={start:n.from,end:n.to,text:""},a={start:i.from,end:i.to,text:"{",class:"cm-bracket"},l={start:o.from,end:o.to,text:"}",class:"cm-bracket"};return{spec:[s,a,l],kind:1}}function Gh(e,t){let n=e.node,r=Ah(n);if(!r)return{spec:[],kind:1};let i=r.textNode,o=r.closeBraceNode,s=t.slice(i.from,i.to);return/[^A-Za-z0-9-.!?() ]/.test(s)?{spec:[],kind:1}:(e.moveTo(o.to,1),t.skipCursorMove=!0,{spec:[{start:n.from,end:o.to,text:s,class:"cm-concealed-mathrm cm-variable-2"}],kind:1})}function Hh(e,t){let n=e.node,r=ft(n);if(!r)return{spec:[],kind:1};let i=r.mathNode,o=r.closeBraceNode,s=t.slice(i.from,i.to).split("").map(l=>rl[l]);return s.some(l=>!l)?{spec:[],kind:1}:(e.moveTo(o.to,1),t.skipCursorMove=!0,{spec:[{start:n.from,end:o.to,text:s.join("")}],kind:1})}function Bh(e,t,n){let r=e.node,i=ft(r);if(!i)return{spec:[],kind:1};let o=i.mathNode,s=i.closeBraceNode,a=t.slice(o.from,o.to);if(/[^A-Za-z0-9 ]/.test(a)){let c;if(!((n==="underline"||n==="boldsymbol")&&a[0]==="\\"&&(c=Ht[a.slice(1)])))return{spec:[],kind:1};a=c}return n==="mathbb"&&(a=a.split("").map(c=>nl[c]).join("")),e.moveTo(s.to,1),t.skipCursorMove=!0,{spec:[{start:r.from,end:s.to,text:a,class:eu[n]}],kind:1}}function Nh(e,t){let n=e.from,r=e.node.cursor();if(!r.next())return{spec:[],kind:1};let i=r.node,o=e.to,s=t.slice(i.from+1,i.to),a=Ja[s];return a?(e.moveTo(i.to,1),t.skipCursorMove=!0,{spec:[{start:n,end:o,text:a}],kind:1}):{spec:[],kind:1}}var Uh=["frac","dfrac","tfrac","gfrac"],zh=["bra","ket","braket"],Mt={not:Nh,left:Jp,right:Jp,mathcal:Hh,text:Gh,set:Ih,operatorname:Vh};for(let e of Object.keys(tu))Mt[e]=Mh;for(let e of Object.keys(ur))Mt[e]=jh;for(let e of Object.keys(eu))Mt[e]=Bh;for(let e of Uh)Mt[e]=Wh;for(let e of zh)Mt[e]=Zh;for(let e of el)Mt[e]=Lh;function ru(e,t){let n=[];for(let r of en(e,t)){let i=r.node;if(i.name.endsWith("CtrlSeq")){let o=t.slice(i.from+1,i.to),s=Mt[o];if(s){let{spec:c,kind:p}=s(r,t,o);if(p===1){n.push(c);continue}}let a=_h[o];if(!a)continue;let l=nu(r,t);n.push([{start:i.from,end:l,text:a}]);continue}else if(i.type.is(_.MathSpecialChar)){let o=Dh(t,i,r);if(o.kind===1){n.push(o.spec);continue}}}return n}function iu(e,t){let i=oe(e).getEquationOverlays(e.state).map(a=>{let l=a.text.split(`
`),c=Ia(l.map(u=>u.length+1));c.unshift(0);let p=0;return a.bound.overlay.map(u=>{let O=[];for(;p<c.length-1&&!(c[p]+a.overlay.from>=u.to);p++){let d=Math.min(c[p+1]+a.overlay.from-1,u.to),f=Math.max(c[p]+a.overlay.from,u.from);O.push({text:a.text.slice(f-a.overlay.from,d-a.overlay.from),bound:a.bound,overlay:{from:f,to:d}})}return O})}).flat(2),o={},s=[];for(let a of i){let l=t[a.text];if(l){o[a.text]=l,s.push(...l.map(u=>u.map(O=>j(A({},O),{start:O.start+a.overlay.from,end:O.end+a.overlay.from}))));continue}else if(a.text.trim()==="")continue;let c=a.bound;o[a.text]=[];let p=ru(c.tree,new fe(a.text,a.overlay.from,a.overlay.to));s.push(...p),o[a.text]=p.map(u=>u.map(O=>j(A({},O),{start:O.start-a.overlay.from,end:O.end-a.overlay.from})))}return t=o,{specs:s,cached_equations:t}}var ln=require("obsidian");var ua=class extends we.WidgetType{constructor(n,r,i){super();this.symbol=n;this.className=r||"",this.elementType=i||"span"}eq(n){return n.symbol==this.symbol&&n.className===this.className&&n.elementType===this.elementType}toDOM(){let n=$t(this.elementType);return n.className="cm-math "+this.className,n.textContent=this.symbol,n}ignoreEvent(){return!1}},Oa=class extends we.WidgetType{constructor(n){super();this.symbol=n}eq(n){return n.symbol==this.symbol}toDOM(){let n=$t("span");return n.className="cm-math",n.textContent=this.symbol,n}ignoreEvent(){return!1}};function Fh(e,t,n){if(t.length!==n.length)return!1;for(let r=0;r<t.length;++r){let i=t[r],o=n[r],s=e.changes.mapPos(i.start,1),a=e.changes.mapPos(i.end,-1);if(!(s==o.start&&a==o.end))return!1}return!0}function Yh(e,t){let n="apart";for(let r of e.ranges)for(let i of t){let o=Math.max(r.from,i.start),s=Math.min(r.to,i.end);if(o===s&&(o===i.start||o===i.end)){n="edge";continue}if(o<=s)return"within"}return n}function Kh(e,t,n,r){return n||t==="apart"?"conceal":t==="within"||!r||!e||e==="within"?"reveal":"delay"}function ou(e){let t=[];for(let n of e)if(n.enable)for(let r of n.spec)if(r.start===r.end)t.push(we.Decoration.widget({widget:new Oa(r.text),block:!1}).range(r.start,r.end));else{let i=r.text==="";t.push(we.Decoration.replace({widget:new ua(r.text,r.class,r.elementType),inclusiveStart:i,inclusiveEnd:!1,block:!1}).range(r.start,r.end))}return we.Decoration.set(t,!0)}function su(e){let t=e.filter(i=>i.enable).flatMap(i=>i.spec).sort((i,o)=>i.start-o.start),n=new class extends Ue.RangeValue{},r=new Ue.RangeSetBuilder;for(let i=0;i<t.length;i++){let o=t[i],s=t[i+1];o.text===""?s&&o.end==s.start?(r.add(o.start,s.end,n),i++):r.add(o.start,o.end+1,n):r.add(o.start,o.end,n)}return r.finish()}var Jh=(0,ln.debounce)(e=>{let t=e.state.selection.ranges.map(n=>Ue.EditorSelection.range(n.from,n.to,n.assoc));e.dispatch({selection:Ue.EditorSelection.create(t)})},50),da=class{constructor(t){this.mousedown=!1;this.delayedRevealCallback=(t,n)=>{var r;for(let i of t)i.enable=!1;this.decorations=ou(this.concealments),this.atomicRanges=su(this.concealments),n.dispatch(),(r=n==null?void 0:n.cm)==null||r.signal("vim-command-done")};var i,o;this.concealments=[],this.decorations=we.Decoration.none,this.atomicRanges=Ue.RangeSet.empty;let n=W(t).concealRevealTimeout;this.delayEnabled=n>0,this.cached_equations={},this.concealSpecs=[],this.delayedReveal=(0,ln.debounce)(this.delayedRevealCallback,n,!0);let r=[];this.update({view:t,state:t.state,docChanged:!0,transactions:r}),this.mousedown=(o=(i=t.plugin(ln.livePreviewState))==null?void 0:i.mousedown)!=null?o:!1}update(t){if(t.docChanged||t.viewportChanged||t.selectionSet){if(t.transactions.some(n=>n.annotation(Ne))){this.decorations=this.decorations.map(t.changes),this.atomicRanges=this.atomicRanges.map(t.changes);return}if(this.delayedReveal.cancel(),!t.docChanged&&!t.viewportChanged)this.updateFromConcealSpecs(this.concealSpecs,t);else{let{specs:n,cached_equations:r}=iu(t.view,this.cached_equations);this.cached_equations=r,this.concealSpecs=n,this.updateFromConcealSpecs(n,t)}}}updateFromConcealSpecs(t,n){var l,c;let r=n.state.selection,i=this.mousedown;this.mousedown=(c=(l=n.view.plugin(ln.livePreviewState))==null?void 0:l.mousedown)!=null?c:!1;let o=[],s=[],a=!1;for(let p of t){let u=Yh(r,p),O=this.concealments.find(m=>Fh(n,m.spec,p)),d=Kh(O==null?void 0:O.cursorPosType,u,this.mousedown,this.delayEnabled);a=a||d==="reveal";let f={spec:p,cursorPosType:u,enable:d!=="reveal"};d==="delay"&&s.push(f),o.push(f)}a&&i&&!this.mousedown&&n.view.state.selection.ranges.some(p=>!p.empty)&&Jh(n.view),s.length>0&&this.delayedReveal(s,n.view),this.concealments=o,this.decorations=ou(this.concealments),this.atomicRanges=su(this.concealments)}},eg=we.EditorView.baseTheme({"span.cm-math.cm-concealed-bold":{fontWeight:"bold"},"span.cm-math.cm-concealed-underline":{textDecoration:"underline"},"span.cm-math.cm-concealed-mathrm, sub.cm-math.cm-concealed-mathrm":{fontStyle:"normal"},"sup.cm-math":{lineHeight:0},"sup.cm-math, sub.cm-math":{fontStyle:"italic"}});function au(){return[we.ViewPlugin.fromClass(da,{decorations:t=>t.decorations,provide:t=>we.EditorView.atomicRanges.of(n=>{var r,i;return(i=(r=n.plugin(t))==null?void 0:r.atomicRanges)!=null?i:Ue.RangeSet.empty})}),eg]}var lu=require("@codemirror/state"),ze=require("@codemirror/view");var cu="latex-suite-error-dollar",pu="latex-suite-highlighted-dollar-inline",uu="latex-suite-highlighted-dollar-block",Ou="latex-suite-highlighted-dollar-code",ma=class{constructor(){this.decorations=ze.Decoration.none}update(t){!t.docChanged&&!t.viewportChanged||(this.decorations=this.computeDecorations(t.view))}computeDecorations(t){let n=oe(t),r=[];n.mathBounds.forEach(s=>{if(s.inner_end===s.outer_end&&s.inner_start!==s.outer_start){r.push({from:s.outer_start,to:s.inner_start,kind:"error"});return}if(r.push(j(A({},s),{kind:"pair",mode:s.mode})),!s.tree)return;let a=fe.fromNode(s.tree,t.state.doc);for(let l of en(s.tree,a)){let{type:c,node:p}=l;if(c.is(_.DollarInlineMath)||c.is(_.ParenMath)){let u=c.is(_.DollarInlineMath)?p.getChildren(_.Dollar):[p.getChild(_.OpenParenMath),p.getChild(_.CloseParenMath)].filter(d=>d!==null);if(u.length===1){let d=u[0];r.push({from:d.from,to:d.to,kind:"error"})}else if(u.length===2){let d=u[0],f=u[1];r.push({outer_start:d.from,inner_start:d.to,inner_end:f.from,outer_end:f.to,kind:"pair",mode:0})}let O=u.last();O&&l.moveTo(O.to,-1)}else(c.is(_.Dollar)||c.is(_.OpenParenMath)||c.is(_.CloseParenMath))&&r.push({from:p.from,to:p.to,kind:"error"})}});let o=[];for(let s of r)if(!(s.kind==="error"&&s.from===s.to||s.kind==="pair"&&s.outer_start===s.inner_start&&s.inner_end===s.outer_end))if(s.kind==="error")o.push(ze.Decoration.mark({class:cu}).range(s.from,s.to));else{let a;s.mode===0||s.mode===1&&s.outer_start-s.outer_end<4?a=pu:s.mode===1?a=uu:a=Ou,o.push(ze.Decoration.mark({class:a}).range(s.outer_start,s.inner_start),ze.Decoration.mark({class:a}).range(s.inner_end,s.outer_end))}return ze.Decoration.set(o,!0)}},tg=ze.EditorView.baseTheme({[`.${cu}`]:{color:"#f00"},[`.${pu}`]:{color:"#61ae08"},[`.${uu}`]:{color:"#3e7202"},[`.${Ou}`]:{color:"#54940b"}}),du=[lu.Prec.highest(ze.ViewPlugin.fromClass(ma,{decorations:e=>e.decorations})),tg];var mu={snippets:"export default []",snippetVariables:"export default {}",snippetsEnabled:!1,snippetsTrigger:"",snippetNextTabstopTrigger:"",snippetPreviousTabstopTrigger:"",suppressSnippetTriggerOnIME:!1,suppressIMEWarning:!1,removeSnippetWhitespace:!1,autoDelete$:!1,loadSnippetsFromFile:!1,loadSnippetVariablesFromFile:!1,snippetsFileLocation:"",snippetVariablesFileLocation:"",concealEnabled:!1,concealRevealTimeout:0,colorPairedBracketsEnabled:!1,highlightCursorBracketsEnabled:!1,mathPreviewEnabled:!1,mathPreviewPositionIsAbove:!1,mathPreviewCursor:"",mathPreviewBracketHighlighting:!1,mathPreviewLivePreviewDisplay:!1,autofractionEnabled:!1,autofractionSymbol:"",autofractionBreakingChars:"",matrixShortcutsEnabled:!1,taboutEnabled:!1,taboutExitEquationOnlyOnEOL:!1,taboutTrigger:"",autoEnlargeBrackets:!1,autoEnlargeBracketsSpace:!1,wordDelimiters:"",autofractionExcludedEnvs:"[]",matrixShortcutsEnvNames:"",matrixShortcutsMacroNames:"",taboutClosingSymbols:"",autoEnlargeBracketsTriggers:"",forceMathLanguages:"",snippetDebug:"off",vimEnabled:!1,vimSelectMode:"",vimVisualMode:"",vimMatrixEnter:"",snippetRecursion:0,snippetIMEVersion:!1,highlightDollarEnabled:!1,excalidrawSupportEnabled:!1,logLevel:"off",autofractionTrigger:"",matrixShortcutsCellTrigger:"",matrixShortcutsExitTrigger:"",matrixShortcutsNewlineTrigger:""};var fu={snippets:{heading:"Snippets",enabled:{name:"Enabled",desc:'Whether snippets are enabled. For more info on how to format snippets see the <a href="https://github.com/artisticat1/obsidian-latex-suite/blob/main/DOCS.md#snippets">documentation</a>.'},snippets:{name:"Snippets",desc:"Enter snippets here. Remember to add a comma after each snippet, and escape all backslashes with an extra <code>\\</code>. Lines starting with <code>//</code> will be treated as comments and ignored."},"load-from-file":{name:"Load snippets from file or folder",desc:"Whether to load snippets from specified file, or from all files within a folder (instead of from the plugin settings)."},"file-path":{name:"Snippets file or folder location",desc:"The file or folder to load snippets from. On desktop you can use ~/ or an absolute path. Files outside your vault or in hidden folders may not be watched for changes depending on your OS."}},conceal:{heading:"Conceal",enabled:{name:"Enabled",desc:"Make equations more readable by hiding LaTeX syntax and instead displaying it in a pretty format.<br>e.g.<code>\\dot{x}^{2} + \\dot{y}^{2}</code> will display as <code>\u1E8B\xB2 + \u1E8F\xB2</code> and <code>\\sqrt{ 1-\\beta^{2} }</code> will display as <code>\u221A(1-\u03B2\xB2)</code><br>LaTeX beneath the cursor will be revealed.<br><br>Disabled by default to not confuse new users. However, I recommend turning this on once you are comfortable with the plugin!."},"reveal-delay":{name:"Reveal delay (ms)",desc:"How long to delay the reveal of LaTeX for, in milliseconds, when the cursor moves over LaTeX. Defaults to 0 (LaTeX under the cursor is revealed immediately).<br><br>Can be set to a positive number, e.g. 300, to delay the reveal of LaTeX, making it much easier to navigate equations using arrow keys.<br><br>Must be an integer \u2265 0."}},"highlight-brackets":{heading:"Highlight and color brackets","color-brackets":{name:"Color paired brackets",desc:"Whether to colorize matching brackets."},"highlight-brackets":{name:"Highlight matching bracket beneath cursor",desc:"When the cursor is adjacent to a bracket, highlight the matching bracket."},"color-math":{name:"Color math delimiters",desc:"Whether to colorize matched and mismatched math delimiters in the editor according to latex suite parser. This parser behaves closer to the reading view parser than the editor/syntax highlighting parser."}},"math-preview":{heading:"Math popup preview",enabled:{name:"Enabled",desc:"When inside an equation, show a popup preview window of the rendered math.<br><br>The popup preview will be shown for all inline math equations, as well as for block math equations in Source mode."},position:{name:"Position",desc:"Where to display the popup preview relative to the equation source.",options:{above:"Above",below:"Below"}},"cursor-symbol":{name:"Cursor symbol",desc:"The symbol to use as the cursor in the popup preview such as {{cursor}}. Leave it blank to turn it off."},"highlight-brackets":{name:"Highlight brackets in preview",desc:"Whether to highlight the area within the nearest pair of brackets around the cursor in the popup preview."},"display-live-preview":{name:"Display live preview",desc:"Whether to display the tooltip in live preview mode. The cursor and bracket highlighting will only be shown in this preview and not in obsidian's preview"}},"auto-fraction":{heading:"Auto-fraction",enabled:{name:"Enabled",desc:"Whether auto-fraction is enabled."},"fraction-symbol":{name:"Fraction symbol",desc:"The fraction symbol to use in the replacement. e.g. <code>\\frac</code>, <code>\\dfrac</code>, <code>\\tfrac</code>."},"excluded-environments":{name:"Excluded environments",desc:'A list of environments to exclude auto-fraction from running in. For example, to exclude auto-fraction from running while inside an exponent, such as <code>e^{...}</code>, use <code>["^{", "}"]</code>'},"breaking-characters":{name:"Breaking characters",desc:"A list of characters that denote the start/end of a fraction. e.g. if <code>+</code> is included in the list, <code>a+b/c</code> will expand to <code>a+\\frac{b}{c}</code>. If <code>+</code> is not in the list, it will expand to <code>\\frac{a+b}{c}</code>."}},"matrix-shortcuts":{heading:"Matrix shortcuts",enabled:{name:"Enabled",desc:"Whether matrix shortcuts are enabled."},environments:{name:"Environments",desc:"A list of environment names to run the matrix shortcuts in, separated by commas."},macros:{name:"Macros",desc:"A list of macros names to run the matrix shortcuts in, separated by commas."}},tabout:{heading:"Tabout",enabled:{name:"Enabled",desc:"Whether tabout is enabled."},"closing-brackets":{name:"Closing brackets",desc:"A list of closing brackets for tabout, separated by commas."},"exit-EOL":{name:"Exit equation only on EOL",desc:"Whether to exit the equation only when the cursor is at the end of line"}},"auto-enlarge":{heading:"Auto-enlarge brackets",enabled:{name:"Enabled",desc:"Whether to automatically enlarge brackets containing e.g. sum, int, frac."},triggers:{name:"Triggers",desc:"A list of symbols that should trigger auto-enlarge brackets, separated by commas."},space:{name:"Space",desc:"Whether to add a space after <code>\\left(</code> and before <code>\\right)</code> or not"}},"advanced-snippets":{heading:"Advanced snippets",variables:{name:"Snippet variables",desc:"Assign snippet variables that can be used as shortcuts when writing snippets"},"load-variables-from-file":{name:"Load snippet variables from file or folder",desc:"Whether to load snippet variables from a specified file, or from all files within a folder (instead of from the plugin settings)."},"variables-file-path":{name:"Snippet variables file or folder location",desc:"The file or folder to load snippet variables from. On desktop you can use ~/ or an absolute path. Files outside your vault or in hidden folders may not be watched for changes depending on your os."},"word-delimiters":{name:"Word delimiters",desc:"Symbols that will be treated as word delimiters, for use with the <code>w</code> snippet option"},"trailing-whitespace":{name:"Remove trailing whitespace in snippets in inline math",desc:"Whether to remove trailing whitespaces when expanding snippets at the end of inline math blocks."},"auto-delete$":{name:"Remove closing $ when backspacing inside blank inline math",desc:"Whether to also remove closing $ when you delete the opening $ symbol inside blank inline math."},"suppress-IME":{name:"Don't trigger snippets when IME is active",desc:"Whether to suppress snippets triggering when an IME is active."},"suppress-IME-warning":{name:"Suppress IME warning",desc:'Whether a warning is shown on startup if <code>$t(settings:advanced-snippets.suppress-IME.name)</code> is enabled. Disable that setting if you are aware of the IME limitations. Currently only ios and android touch/swipe keyboards like gboard have support for IME. See <a href="https://github.com/artisticat1/obsidian-latex-suite/blob/main/DOCS.md#IME-keyboards">here</a> for more info.'},"code-languages":{name:"Code languages to interpret as math mode",desc:"Codeblock languages where the whole code block should be treated like a math block separated by commas."},"snippet-debug-mode":{name:"Snippet debug mode",desc:"Set the level of debug information to log about snippet expansion. Set to <code>info</code> or <code>verbose</code> to help identify which and what snippet is expanding. Verbose mode will log most information to the developer console on debug level.",options:{off:"Off",info:"Info",verbose:"Verbose"}}},vim:{enabled:{name:"Vim key bindings",desc:"Turn on/off vim keybindings. Note vim needs to be enabled in obsidian itself."},"select-mode":{name:"Vim: Switch from visual mode to select mode",desc:"Maps the key to switch from visual mode to select mode.Keymap must be vim keymap and can't contain any spaces. Use empty string to disable this feature. (select mode=insert keybindings)"},"visual-mode":{name:"Vim: Switch from select mode to visual mode",desc:"Maps the key to switch from select mode to visual mode. must be a vim keymap and can't contain any spaces. Example <code>&lt;C-g&gt;&lt;C-A-i&gt;</code> = <code>Ctrl-g + Ctrl-Alt-i</code>. Please check the vim keybinding first on another command like w before reporting it. Some keybindings like shift don't work due to the original vim plugin. Use empty string to disable this feature. (select mode=insert keybindings)"},"matrix-enter":{name:"Vim: run matrix enter",desc:"Maps the key to the action of inserting a new line below while appending <code>\\\\</code> to the current line in a matrix environment. Use empty string to disable this feature."}},keymap:{desc:'What key to press to trigger the action. Should follow codemirror 6 keymap syntax such as <code>Ctrl-k Ctrl-a</code> For more info see <a href="https://codemirror.net/6/docs/ref/#keymap">codemirror keymap</a><br><br>Note that some keymaps may not work due to conflicts with obsidian or other plugins.<br><br>The actions are expanded in the order that they are listed. Custom keymaps in snippets are on the same priority as <code>$t(settings:keymap.snippet)</code>.',heading:{name:"Keymap",desc:"codemirror 6 keymaps for snippets and tabout."},snippet:"Expand manual snippets","next-tabstop":"Next tabstop","prev-tabstop":"Previous tabstop",tabout:"Tabout","matrix-newline":'Matrix: insert newline and "\\\\"',"matrix-cell":'Matrix: insert " & "',"matrix-exit":"Matrix: move to the next line","auto-fraction":"Expand fraction"},experimental:{heading:{name:"Experimental features",desc:"Features that are still in testing and may need user feedback. Backwards compatibility may break for these features or these settings may be overridden."},"snippet-recursion":{name:"Snippet recursion",desc:'How many times to run snippets in a row. Set to 0 to disable recursion.<br><br><a href="https://github.com/artisticat1/obsidian-latex-suite/pull/536">Related pr/feedback</a>'},"excalidraw-enabled":{name:"Excalidraw enabled",desc:"Enable or disable Excalidraw integration."},"log-level":{name:"Log level",desc:"Set the level of debug information to log. Set to <code>$t(settings:experimental.log-level.options.vverbose)</code> for bug report purposes.",options:{off:"Off",info:"Info",verbose:"Verbose",vverbose:"VVerbose"}}}};var rg={en:{settings:fu}},hu=rg;var yu=require("@codemirror/view");var UT=require("@codemirror/state");var fa=class{constructor(){this.mountedTreeInfo=[];this.treeInfo=""}update(t){if(!t.docChanged)return;let n=W(t.view);if(De(n.logLevel,"verbose"))try{this.mountedTreeInfo=this.printMountedTrees(t.state);let r=at(t.state);console.debug("Syntax Tree:",r.toString());let i=t.state.doc.toString();this.treeInfo=gu(r.topNode,i),De(n.logLevel,"vverbose")&&(console.debug(`Full Syntax Tree:
`,this.treeInfo),console.debug(`Mounted Trees:
`,this.mountedTreeInfo.join(`
`)))}catch(r){console.error(r)}}printMountedTrees(t){let n=at(t),r=[];n.iterate({enter:o=>{if(o.name===w.DollarDisplayBlockMath){let a=o.node.getChildren(w.DisplayMath).last();if(a){let l=o.node.enter(a.to,-1);if(!l)return;r.push(l)}}else if(o.name==="FencedCode"){if(!o.node.getChild("CodeInfo"))return;let l=o.node.getChildren("CodeText").last();if(!l)return;let c=o.node.enter(l.to,-1);c&&r.push(c)}}});let i=t.doc.sliceString(0,t.doc.length);return r.map(o=>gu(o,i))}},ha=yu.ViewPlugin.fromClass(fa);function gu(e,t){let n=[];function r(o,s=0){let{name:a,from:l,to:c}=o,p=s,u=o.node;for(;u=u.parent;)p++;n.push({name:a,from:l,to:c,indent:p})}function i(o){let s=o.firstChild;for(;s;)r(s),i(s),s=s.nextSibling}return i({firstChild:e,nextSibling:null}),n.map(({name:o,from:s,to:a,indent:l})=>`${" ".repeat(l)}${o}: (${s}, ${a}): `+t.slice(s,a).replace(/\n/g,"\\n")).join(`
`)}var vi=class extends he.Plugin{constructor(){super(...arguments);this.settings=mu;this.CMSettings=vn([],this.settings);this.editorExtensions=[];this.disableMath=n=>{try{G(n,!1).disableMath()}catch(r){console.error("Error occurred while disabling math:",r)}};this.modifiedSyntaxTree=at;this.snippet=Us;this.api={effects:{snippetInvertedEffects:ti,startSnippet:Wt,endSnippet:dt,undidStartSnippet:Jr,undidEndSnippet:ei,LanguageSetStateEffect:hs,addTabstopsEffect:Fr,removeAllTabstopsEffect:Yr,updateTooltipEffect:zn},fields:{cursorTooltipField:Fn,notice:Pr,languageStateField:st,tabstopsStateField:mt},annotations:{tempKeyPress:Ne},plugin:{keyboardEventPlugin:Kn,colorPairedBracketsPlugin:aa,highlightCursorBracketsPlugin:la,parseWorker:gs,mathParserPlugin:ha,snippetQueuePlugin:Zn,contextPlugin:$r,mathBoundsPlugin:Qr},shortcuts:{autoEnlargeBrackets:on,runAutoFraction:gi,exitMatrixShortCut:ri,addCellMatrixShortcut:ii,newlineMatrixShortcut:tn,getVimRunMatrixEnterCommand:Hn,priorityTaboutMatrixShortcut:oi,snippet:Us},snippetApi:pc};this.createWatcherCloser=(0,he.debounce)(()=>y(this,null,function*(){var r;(r=this.watcherCloser)==null||r.call(this);let n=yield Sc(this);this.register(()=>{n()}),this.watcherCloser=n!=null?n:void 0}),3e3,!0)}onload(){return y(this,null,function*(){_p.addResourceBundle("en","settings",hu.en.settings),yield this.loadSettings(),this.loadIcons(),this.addSettingTab(new di(this.app,this)),yield(0,he.loadMathJax)(),this.legacyEditorWarning(),this.IMEEditorWarning(),this.registerEditorExtension(this.editorExtensions),this.watchFiles(),this.addEditorCommands()})}onunload(){}legacyEditorWarning(){var n;if((n=this.app.vault.config)!=null&&n.legacyEditor){let r="Latex Suite: This plugin does not support the legacy editor. Switch to Live Preview mode to use this plugin.";new he.Notice(r,1e5),console.error(r);return}}IMEEditorWarning(){if(fi()&&!this.settings.suppressIMEWarning&&this.settings.suppressSnippetTriggerOnIME){let n=createFragment();n.appendText("Latex Suite: this plugin supports your IME keyboard, but "),n.createEl("code",{text:"Advanced settings > Don't trigger snippets when IME is active"}),n.appendText(" is currently enabled. You may want to disable it in the plugin settings to fully enable automatic snippets. Be aware that this may cause unexpected snippet triggers while using your IME. To turn this warning off, enable "),n.createEl("code",{text:"Advanced settings > Suppress IME warning"}),n.appendText("."),new he.Notice(n,1e4),console.warn(n)}}loadSettings(){return y(this,null,function*(){var o;let n=rt(Mi(H(),Xi()),(o=yield this.loadData())!=null?o:{}),r=n?"basicSettings"in n:!1;function i(s){let a=s;return j(A(A({},a.basicSettings),a.rawSettings),{snippets:a.snippets})}r&&(n=i(n)),this.settings=A(A({},q),n),r&&(yield this.saveSettings()),this.settings.loadSnippetsFromFile||this.settings.loadSnippetVariablesFromFile?this.app.workspace.onLayoutReady(()=>{this.processSettings(!1,!0)}):yield this.processSettings(!1,!0)})}saveSettings(n=!1,r=!1){return y(this,null,function*(){yield this.saveData(this.settings),yield this.processSettings(n,r)})}getSettingsSnippetVariables(){return y(this,null,function*(){try{return yield Ie(this.settings.snippetVariables,"snippet-variables.js")}catch(n){let r=n;return new he.Notice(`Failed to load snippet variables from settings: ${r}`),console.error(`Failed to load snippet variables from settings: ${r}`),{}}})}getSettingsSnippets(n){return y(this,null,function*(){try{return yield lt(this.settings.snippets,n,"snippets.js")}catch(r){let i=r;return new he.Notice(`Failed to load snippets from settings: ${i}`),console.error(`Failed to load snippets from settings: ${i}`),[]}})}getSnippets(n,r){return y(this,null,function*(){if(!n&&!r)return this.CMSettings.snippets.all;let i=yield kc(this),o=this.settings.loadSnippetVariablesFromFile?yield Tc(i):yield this.getSettingsSnippetVariables(),s=yield Ec(i);this.settings.loadSnippetVariablesFromFile&&Object.assign(o,s);let a=this.settings.loadSnippetsFromFile?yield Pc(i,o):yield this.getSettingsSnippets(o);return this.showSnippetsLoadedNotice(a.length,Object.keys(o).length,n,r),a})}processSettings(n=!1,r=!1){return y(this,null,function*(){n&&this.watchFiles(),this.CMSettings=vn(yield this.getSnippets(n,r),this.settings),this.setEditorExtensions(),this.app.workspace.updateOptions()})}setEditorExtensions(){for(;this.editorExtensions.length;)this.editorExtensions.pop();this.editorExtensions.push([Jn.Prec.highest(Qr.extension),Jn.Prec.highest($r.extension),Ya(this.CMSettings),Jn.Prec.highest(Kn.extension),Jn.Prec.highest(jt.EditorView.inputHandler.of(Fp)),jt.EditorView.updateListener.of(zp),Kp,ec]);let n=Yp(this.CMSettings);this.editorExtensions.push(jt.keymap.of(n)),this.CMSettings.concealEnabled&&this.editorExtensions.push(au()),this.CMSettings.colorPairedBracketsEnabled&&this.editorExtensions.push(Vp),this.CMSettings.highlightCursorBracketsEnabled&&this.editorExtensions.push(Ip),this.CMSettings.mathPreviewEnabled&&this.editorExtensions.push([Fn.extension,Np,(0,jt.tooltips)({position:"absolute"})]),this.CMSettings.highlightDollarEnabled&&this.editorExtensions.push(du),De(this.CMSettings.logLevel,"verbose")&&this.editorExtensions.push(ha),De(this.CMSettings.snippetDebug,"info")&&this.editorExtensions.push(Pr)}showSnippetsLoadedNotice(n,r,i,o){if(!(i||o))return;let s=i?"Loaded ":"Successfully reloaded ",a=[];this.settings.loadSnippetsFromFile&&a.push(`${n} snippets`),this.settings.loadSnippetVariablesFromFile&&a.push(`${r} snippet variables`);let l=" from files.";new he.Notice(s+a.join(" and ")+l,5e3)}addEditorCommands(){var n,r,i;for(let o of Rp(this))this.addCommand(o);e:{if(!((r=(n=this.app).isVimEnabled)!=null&&r.call(n))||!this.settings.vimEnabled)break e;let o=(i=window==null?void 0:window.CodeMirrorAdapter)==null?void 0:i.Vim;if(!o)break e;for(let s of si(this.settings))o[s.defineType](s.id,s.action),o.mapCommand(s.key,s.type,s.id,{},{context:s.context})}}watchFiles(){this.app.workspace.onLayoutReady(this.createWatcherCloser)}loadIcons(){for(let[n,r]of Object.entries(Wp))(0,he.addIcon)(n,r)}};
/**
* @license
* Force end an IME composition.
* MIT License
* Copyright (C) 2018-2021 by Marijn Haverbeke <marijnh@gmail.com> and others
*/
/**
* @license
* implementation of background lezer parser.
* MIT License
* Copyright (C) 2018-2021 by Marijn Haverbeke <marijnh@gmail.com> and others
*/
/* nosourcemap */