Files
Polsl-Notes/.obsidian/plugins/obsidian-linter/main.js
2022-10-25 16:01:18 +02:00

2040 lines
401 KiB
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
/*
THIS IS A GENERATED/BUNDLED FILE BY ESBUILD
if you want to view the source, please visit the github repository of this plugin
*/
var ud=Object.create;var Ir=Object.defineProperty;var yu=Object.getOwnPropertyDescriptor;var cd=Object.getOwnPropertyNames;var pd=Object.getPrototypeOf,md=Object.prototype.hasOwnProperty;var so=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Va=(e,t)=>{for(var n in t)Ir(e,n,{get:t[n],enumerable:!0})},bu=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of cd(t))!md.call(e,i)&&i!==n&&Ir(e,i,{get:()=>t[i],enumerable:!(r=yu(t,i))||r.enumerable});return e};var Xn=(e,t,n)=>(n=e!=null?ud(pd(e)):{},bu(t||!e||!e.__esModule?Ir(n,"default",{value:e,enumerable:!0}):n,e)),fd=e=>bu(Ir({},"__esModule",{value:!0}),e),B=(e,t,n,r)=>{for(var i=r>1?void 0:r?yu(t,n):t,o=e.length-1,a;o>=0;o--)(a=e[o])&&(i=(r?a(t,n,i):a(i))||i);return r&&i&&Ir(t,n,i),i};var wu=(e,t,n)=>{if(!t.has(e))throw TypeError("Cannot "+n)};var pt=(e,t,n)=>(wu(e,t,"read from private field"),n?n.call(e):t.get(e)),Jn=(e,t,n)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,n)},xu=(e,t,n,r)=>(wu(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n);var cs=so((Px,yc)=>{yc.exports=function(t){return t!=null&&t.constructor!=null&&typeof t.constructor.isBuffer=="function"&&t.constructor.isBuffer(t)}});var Cc=so((Nx,Tc)=>{"use strict";var vo=Object.prototype.hasOwnProperty,Oc=Object.prototype.toString,bc=Object.defineProperty,wc=Object.getOwnPropertyDescriptor,xc=function(t){return typeof Array.isArray=="function"?Array.isArray(t):Oc.call(t)==="[object Array]"},kc=function(t){if(!t||Oc.call(t)!=="[object Object]")return!1;var n=vo.call(t,"constructor"),r=t.constructor&&t.constructor.prototype&&vo.call(t.constructor.prototype,"isPrototypeOf");if(t.constructor&&!n&&!r)return!1;var i;for(i in t);return typeof i=="undefined"||vo.call(t,i)},vc=function(t,n){bc&&n.name==="__proto__"?bc(t,n.name,{enumerable:!0,configurable:!0,value:n.newValue,writable:!0}):t[n.name]=n.newValue},Sc=function(t,n){if(n==="__proto__")if(vo.call(t,n)){if(wc)return wc(t,n).value}else return;return t[n]};Tc.exports=function e(){var t,n,r,i,o,a,s=arguments[0],l=1,u=arguments.length,c=!1;for(typeof s=="boolean"&&(c=s,s=arguments[1]||{},l=2),(s==null||typeof s!="object"&&typeof s!="function")&&(s={});l<u;++l)if(t=arguments[l],t!=null)for(n in t)r=Sc(s,n),i=Sc(t,n),s!==i&&(c&&i&&(kc(i)||(o=xc(i)))?(o?(o=!1,a=r&&xc(r)?r:[]):a=r&&kc(r)?r:{},vc(s,{name:n,newValue:e(c,a,i)})):typeof i!="undefined"&&vc(s,{name:n,newValue:i}));return s}});var If=so((P6,hr)=>{var R=function(){this.Diff_Timeout=1,this.Diff_EditCost=4,this.Match_Threshold=.5,this.Match_Distance=1e3,this.Patch_DeleteThreshold=.5,this.Patch_Margin=4,this.Match_MaxBits=32},ue=-1,pe=1,Z=0;R.Diff=function(e,t){return[e,t]};R.prototype.diff_main=function(e,t,n,r){typeof r=="undefined"&&(this.Diff_Timeout<=0?r=Number.MAX_VALUE:r=new Date().getTime()+this.Diff_Timeout*1e3);var i=r;if(e==null||t==null)throw new Error("Null input. (diff_main)");if(e==t)return e?[new R.Diff(Z,e)]:[];typeof n=="undefined"&&(n=!0);var o=n,a=this.diff_commonPrefix(e,t),s=e.substring(0,a);e=e.substring(a),t=t.substring(a),a=this.diff_commonSuffix(e,t);var l=e.substring(e.length-a);e=e.substring(0,e.length-a),t=t.substring(0,t.length-a);var u=this.diff_compute_(e,t,o,i);return s&&u.unshift(new R.Diff(Z,s)),l&&u.push(new R.Diff(Z,l)),this.diff_cleanupMerge(u),u};R.prototype.diff_compute_=function(e,t,n,r){var i;if(!e)return[new R.Diff(pe,t)];if(!t)return[new R.Diff(ue,e)];var o=e.length>t.length?e:t,a=e.length>t.length?t:e,s=o.indexOf(a);if(s!=-1)return i=[new R.Diff(pe,o.substring(0,s)),new R.Diff(Z,a),new R.Diff(pe,o.substring(s+a.length))],e.length>t.length&&(i[0][0]=i[2][0]=ue),i;if(a.length==1)return[new R.Diff(ue,e),new R.Diff(pe,t)];var l=this.diff_halfMatch_(e,t);if(l){var u=l[0],c=l[1],p=l[2],m=l[3],f=l[4],d=this.diff_main(u,p,n,r),h=this.diff_main(c,m,n,r);return d.concat([new R.Diff(Z,f)],h)}return n&&e.length>100&&t.length>100?this.diff_lineMode_(e,t,r):this.diff_bisect_(e,t,r)};R.prototype.diff_lineMode_=function(e,t,n){var r=this.diff_linesToChars_(e,t);e=r.chars1,t=r.chars2;var i=r.lineArray,o=this.diff_main(e,t,!1,n);this.diff_charsToLines_(o,i),this.diff_cleanupSemantic(o),o.push(new R.Diff(Z,""));for(var a=0,s=0,l=0,u="",c="";a<o.length;){switch(o[a][0]){case pe:l++,c+=o[a][1];break;case ue:s++,u+=o[a][1];break;case Z:if(s>=1&&l>=1){o.splice(a-s-l,s+l),a=a-s-l;for(var p=this.diff_main(u,c,!1,n),m=p.length-1;m>=0;m--)o.splice(a,0,p[m]);a=a+p.length}l=0,s=0,u="",c="";break}a++}return o.pop(),o};R.prototype.diff_bisect_=function(e,t,n){for(var r=e.length,i=t.length,o=Math.ceil((r+i)/2),a=o,s=2*o,l=new Array(s),u=new Array(s),c=0;c<s;c++)l[c]=-1,u[c]=-1;l[a+1]=0,u[a+1]=0;for(var p=r-i,m=p%2!=0,f=0,d=0,h=0,g=0,b=0;b<o&&!(new Date().getTime()>n);b++){for(var O=-b+f;O<=b-d;O+=2){var S=a+O,E;O==-b||O!=b&&l[S-1]<l[S+1]?E=l[S+1]:E=l[S-1]+1;for(var I=E-O;E<r&&I<i&&e.charAt(E)==t.charAt(I);)E++,I++;if(l[S]=E,E>r)d+=2;else if(I>i)f+=2;else if(m){var k=a+p-O;if(k>=0&&k<s&&u[k]!=-1){var _=r-u[k];if(E>=_)return this.diff_bisectSplit_(e,t,E,I,n)}}}for(var M=-b+h;M<=b-g;M+=2){var k=a+M,_;M==-b||M!=b&&u[k-1]<u[k+1]?_=u[k+1]:_=u[k-1]+1;for(var z=_-M;_<r&&z<i&&e.charAt(r-_-1)==t.charAt(i-z-1);)_++,z++;if(u[k]=_,_>r)g+=2;else if(z>i)h+=2;else if(!m){var S=a+p-M;if(S>=0&&S<s&&l[S]!=-1){var E=l[S],I=a+E-S;if(_=r-_,E>=_)return this.diff_bisectSplit_(e,t,E,I,n)}}}}return[new R.Diff(ue,e),new R.Diff(pe,t)]};R.prototype.diff_bisectSplit_=function(e,t,n,r,i){var o=e.substring(0,n),a=t.substring(0,r),s=e.substring(n),l=t.substring(r),u=this.diff_main(o,a,!1,i),c=this.diff_main(s,l,!1,i);return u.concat(c)};R.prototype.diff_linesToChars_=function(e,t){var n=[],r={};n[0]="";function i(l){for(var u="",c=0,p=-1,m=n.length;p<l.length-1;){p=l.indexOf(`
`,c),p==-1&&(p=l.length-1);var f=l.substring(c,p+1);(r.hasOwnProperty?r.hasOwnProperty(f):r[f]!==void 0)?u+=String.fromCharCode(r[f]):(m==o&&(f=l.substring(c),p=l.length),u+=String.fromCharCode(m),r[f]=m,n[m++]=f),c=p+1}return u}var o=4e4,a=i(e);o=65535;var s=i(t);return{chars1:a,chars2:s,lineArray:n}};R.prototype.diff_charsToLines_=function(e,t){for(var n=0;n<e.length;n++){for(var r=e[n][1],i=[],o=0;o<r.length;o++)i[o]=t[r.charCodeAt(o)];e[n][1]=i.join("")}};R.prototype.diff_commonPrefix=function(e,t){if(!e||!t||e.charAt(0)!=t.charAt(0))return 0;for(var n=0,r=Math.min(e.length,t.length),i=r,o=0;n<i;)e.substring(o,i)==t.substring(o,i)?(n=i,o=n):r=i,i=Math.floor((r-n)/2+n);return i};R.prototype.diff_commonSuffix=function(e,t){if(!e||!t||e.charAt(e.length-1)!=t.charAt(t.length-1))return 0;for(var n=0,r=Math.min(e.length,t.length),i=r,o=0;n<i;)e.substring(e.length-i,e.length-o)==t.substring(t.length-i,t.length-o)?(n=i,o=n):r=i,i=Math.floor((r-n)/2+n);return i};R.prototype.diff_commonOverlap_=function(e,t){var n=e.length,r=t.length;if(n==0||r==0)return 0;n>r?e=e.substring(n-r):n<r&&(t=t.substring(0,n));var i=Math.min(n,r);if(e==t)return i;for(var o=0,a=1;;){var s=e.substring(i-a),l=t.indexOf(s);if(l==-1)return o;a+=l,(l==0||e.substring(i-a)==t.substring(0,a))&&(o=a,a++)}};R.prototype.diff_halfMatch_=function(e,t){if(this.Diff_Timeout<=0)return null;var n=e.length>t.length?e:t,r=e.length>t.length?t:e;if(n.length<4||r.length*2<n.length)return null;var i=this;function o(d,h,g){for(var b=d.substring(g,g+Math.floor(d.length/4)),O=-1,S="",E,I,k,_;(O=h.indexOf(b,O+1))!=-1;){var M=i.diff_commonPrefix(d.substring(g),h.substring(O)),z=i.diff_commonSuffix(d.substring(0,g),h.substring(0,O));S.length<z+M&&(S=h.substring(O-z,O)+h.substring(O,O+M),E=d.substring(0,g-z),I=d.substring(g+M),k=h.substring(0,O-z),_=h.substring(O+M))}return S.length*2>=d.length?[E,I,k,_,S]:null}var a=o(n,r,Math.ceil(n.length/4)),s=o(n,r,Math.ceil(n.length/2)),l;if(!a&&!s)return null;s?a?l=a[4].length>s[4].length?a:s:l=s:l=a;var u,c,p,m;e.length>t.length?(u=l[0],c=l[1],p=l[2],m=l[3]):(p=l[0],m=l[1],u=l[2],c=l[3]);var f=l[4];return[u,c,p,m,f]};R.prototype.diff_cleanupSemantic=function(e){for(var t=!1,n=[],r=0,i=null,o=0,a=0,s=0,l=0,u=0;o<e.length;)e[o][0]==Z?(n[r++]=o,a=l,s=u,l=0,u=0,i=e[o][1]):(e[o][0]==pe?l+=e[o][1].length:u+=e[o][1].length,i&&i.length<=Math.max(a,s)&&i.length<=Math.max(l,u)&&(e.splice(n[r-1],0,new R.Diff(ue,i)),e[n[r-1]+1][0]=pe,r--,r--,o=r>0?n[r-1]:-1,a=0,s=0,l=0,u=0,i=null,t=!0)),o++;for(t&&this.diff_cleanupMerge(e),this.diff_cleanupSemanticLossless(e),o=1;o<e.length;){if(e[o-1][0]==ue&&e[o][0]==pe){var c=e[o-1][1],p=e[o][1],m=this.diff_commonOverlap_(c,p),f=this.diff_commonOverlap_(p,c);m>=f?(m>=c.length/2||m>=p.length/2)&&(e.splice(o,0,new R.Diff(Z,p.substring(0,m))),e[o-1][1]=c.substring(0,c.length-m),e[o+1][1]=p.substring(m),o++):(f>=c.length/2||f>=p.length/2)&&(e.splice(o,0,new R.Diff(Z,c.substring(0,f))),e[o-1][0]=pe,e[o-1][1]=p.substring(0,p.length-f),e[o+1][0]=ue,e[o+1][1]=c.substring(f),o++),o++}o++}};R.prototype.diff_cleanupSemanticLossless=function(e){function t(f,d){if(!f||!d)return 6;var h=f.charAt(f.length-1),g=d.charAt(0),b=h.match(R.nonAlphaNumericRegex_),O=g.match(R.nonAlphaNumericRegex_),S=b&&h.match(R.whitespaceRegex_),E=O&&g.match(R.whitespaceRegex_),I=S&&h.match(R.linebreakRegex_),k=E&&g.match(R.linebreakRegex_),_=I&&f.match(R.blanklineEndRegex_),M=k&&d.match(R.blanklineStartRegex_);return _||M?5:I||k?4:b&&!S&&E?3:S||E?2:b||O?1:0}for(var n=1;n<e.length-1;){if(e[n-1][0]==Z&&e[n+1][0]==Z){var r=e[n-1][1],i=e[n][1],o=e[n+1][1],a=this.diff_commonSuffix(r,i);if(a){var s=i.substring(i.length-a);r=r.substring(0,r.length-a),i=s+i.substring(0,i.length-a),o=s+o}for(var l=r,u=i,c=o,p=t(r,i)+t(i,o);i.charAt(0)===o.charAt(0);){r+=i.charAt(0),i=i.substring(1)+o.charAt(0),o=o.substring(1);var m=t(r,i)+t(i,o);m>=p&&(p=m,l=r,u=i,c=o)}e[n-1][1]!=l&&(l?e[n-1][1]=l:(e.splice(n-1,1),n--),e[n][1]=u,c?e[n+1][1]=c:(e.splice(n+1,1),n--))}n++}};R.nonAlphaNumericRegex_=/[^a-zA-Z0-9]/;R.whitespaceRegex_=/\s/;R.linebreakRegex_=/[\r\n]/;R.blanklineEndRegex_=/\n\r?\n$/;R.blanklineStartRegex_=/^\r?\n\r?\n/;R.prototype.diff_cleanupEfficiency=function(e){for(var t=!1,n=[],r=0,i=null,o=0,a=!1,s=!1,l=!1,u=!1;o<e.length;)e[o][0]==Z?(e[o][1].length<this.Diff_EditCost&&(l||u)?(n[r++]=o,a=l,s=u,i=e[o][1]):(r=0,i=null),l=u=!1):(e[o][0]==ue?u=!0:l=!0,i&&(a&&s&&l&&u||i.length<this.Diff_EditCost/2&&a+s+l+u==3)&&(e.splice(n[r-1],0,new R.Diff(ue,i)),e[n[r-1]+1][0]=pe,r--,i=null,a&&s?(l=u=!0,r=0):(r--,o=r>0?n[r-1]:-1,l=u=!1),t=!0)),o++;t&&this.diff_cleanupMerge(e)};R.prototype.diff_cleanupMerge=function(e){e.push(new R.Diff(Z,""));for(var t=0,n=0,r=0,i="",o="",a;t<e.length;)switch(e[t][0]){case pe:r++,o+=e[t][1],t++;break;case ue:n++,i+=e[t][1],t++;break;case Z:n+r>1?(n!==0&&r!==0&&(a=this.diff_commonPrefix(o,i),a!==0&&(t-n-r>0&&e[t-n-r-1][0]==Z?e[t-n-r-1][1]+=o.substring(0,a):(e.splice(0,0,new R.Diff(Z,o.substring(0,a))),t++),o=o.substring(a),i=i.substring(a)),a=this.diff_commonSuffix(o,i),a!==0&&(e[t][1]=o.substring(o.length-a)+e[t][1],o=o.substring(0,o.length-a),i=i.substring(0,i.length-a))),t-=n+r,e.splice(t,n+r),i.length&&(e.splice(t,0,new R.Diff(ue,i)),t++),o.length&&(e.splice(t,0,new R.Diff(pe,o)),t++),t++):t!==0&&e[t-1][0]==Z?(e[t-1][1]+=e[t][1],e.splice(t,1)):t++,r=0,n=0,i="",o="";break}e[e.length-1][1]===""&&e.pop();var s=!1;for(t=1;t<e.length-1;)e[t-1][0]==Z&&e[t+1][0]==Z&&(e[t][1].substring(e[t][1].length-e[t-1][1].length)==e[t-1][1]?(e[t][1]=e[t-1][1]+e[t][1].substring(0,e[t][1].length-e[t-1][1].length),e[t+1][1]=e[t-1][1]+e[t+1][1],e.splice(t-1,1),s=!0):e[t][1].substring(0,e[t+1][1].length)==e[t+1][1]&&(e[t-1][1]+=e[t+1][1],e[t][1]=e[t][1].substring(e[t+1][1].length)+e[t+1][1],e.splice(t+1,1),s=!0)),t++;s&&this.diff_cleanupMerge(e)};R.prototype.diff_xIndex=function(e,t){var n=0,r=0,i=0,o=0,a;for(a=0;a<e.length&&(e[a][0]!==pe&&(n+=e[a][1].length),e[a][0]!==ue&&(r+=e[a][1].length),!(n>t));a++)i=n,o=r;return e.length!=a&&e[a][0]===ue?o:o+(t-i)};R.prototype.diff_prettyHtml=function(e){for(var t=[],n=/&/g,r=/</g,i=/>/g,o=/\n/g,a=0;a<e.length;a++){var s=e[a][0],l=e[a][1],u=l.replace(n,"&amp;").replace(r,"&lt;").replace(i,"&gt;").replace(o,"&para;<br>");switch(s){case pe:t[a]='<ins style="background:#e6ffe6;">'+u+"</ins>";break;case ue:t[a]='<del style="background:#ffe6e6;">'+u+"</del>";break;case Z:t[a]="<span>"+u+"</span>";break}}return t.join("")};R.prototype.diff_text1=function(e){for(var t=[],n=0;n<e.length;n++)e[n][0]!==pe&&(t[n]=e[n][1]);return t.join("")};R.prototype.diff_text2=function(e){for(var t=[],n=0;n<e.length;n++)e[n][0]!==ue&&(t[n]=e[n][1]);return t.join("")};R.prototype.diff_levenshtein=function(e){for(var t=0,n=0,r=0,i=0;i<e.length;i++){var o=e[i][0],a=e[i][1];switch(o){case pe:n+=a.length;break;case ue:r+=a.length;break;case Z:t+=Math.max(n,r),n=0,r=0;break}}return t+=Math.max(n,r),t};R.prototype.diff_toDelta=function(e){for(var t=[],n=0;n<e.length;n++)switch(e[n][0]){case pe:t[n]="+"+encodeURI(e[n][1]);break;case ue:t[n]="-"+e[n][1].length;break;case Z:t[n]="="+e[n][1].length;break}return t.join(" ").replace(/%20/g," ")};R.prototype.diff_fromDelta=function(e,t){for(var n=[],r=0,i=0,o=t.split(/\t/g),a=0;a<o.length;a++){var s=o[a].substring(1);switch(o[a].charAt(0)){case"+":try{n[r++]=new R.Diff(pe,decodeURI(s))}catch(c){throw new Error("Illegal escape in diff_fromDelta: "+s)}break;case"-":case"=":var l=parseInt(s,10);if(isNaN(l)||l<0)throw new Error("Invalid number in diff_fromDelta: "+s);var u=e.substring(i,i+=l);o[a].charAt(0)=="="?n[r++]=new R.Diff(Z,u):n[r++]=new R.Diff(ue,u);break;default:if(o[a])throw new Error("Invalid diff operation in diff_fromDelta: "+o[a])}}if(i!=e.length)throw new Error("Delta length ("+i+") does not equal source text length ("+e.length+").");return n};R.prototype.match_main=function(e,t,n){if(e==null||t==null||n==null)throw new Error("Null input. (match_main)");return n=Math.max(0,Math.min(n,e.length)),e==t?0:e.length?e.substring(n,n+t.length)==t?n:this.match_bitap_(e,t,n):-1};R.prototype.match_bitap_=function(e,t,n){if(t.length>this.Match_MaxBits)throw new Error("Pattern too long for this browser.");var r=this.match_alphabet_(t),i=this;function o(E,I){var k=E/t.length,_=Math.abs(n-I);return i.Match_Distance?k+_/i.Match_Distance:_?1:k}var a=this.Match_Threshold,s=e.indexOf(t,n);s!=-1&&(a=Math.min(o(0,s),a),s=e.lastIndexOf(t,n+t.length),s!=-1&&(a=Math.min(o(0,s),a)));var l=1<<t.length-1;s=-1;for(var u,c,p=t.length+e.length,m,f=0;f<t.length;f++){for(u=0,c=p;u<c;)o(f,n+c)<=a?u=c:p=c,c=Math.floor((p-u)/2+u);p=c;var d=Math.max(1,n-c+1),h=Math.min(n+c,e.length)+t.length,g=Array(h+2);g[h+1]=(1<<f)-1;for(var b=h;b>=d;b--){var O=r[e.charAt(b-1)];if(f===0?g[b]=(g[b+1]<<1|1)&O:g[b]=(g[b+1]<<1|1)&O|((m[b+1]|m[b])<<1|1)|m[b+1],g[b]&l){var S=o(f,b-1);if(S<=a)if(a=S,s=b-1,s>n)d=Math.max(1,2*n-s);else break}}if(o(f+1,n)>a)break;m=g}return s};R.prototype.match_alphabet_=function(e){for(var t={},n=0;n<e.length;n++)t[e.charAt(n)]=0;for(var n=0;n<e.length;n++)t[e.charAt(n)]|=1<<e.length-n-1;return t};R.prototype.patch_addContext_=function(e,t){if(t.length!=0){if(e.start2===null)throw Error("patch not initialized");for(var n=t.substring(e.start2,e.start2+e.length1),r=0;t.indexOf(n)!=t.lastIndexOf(n)&&n.length<this.Match_MaxBits-this.Patch_Margin-this.Patch_Margin;)r+=this.Patch_Margin,n=t.substring(e.start2-r,e.start2+e.length1+r);r+=this.Patch_Margin;var i=t.substring(e.start2-r,e.start2);i&&e.diffs.unshift(new R.Diff(Z,i));var o=t.substring(e.start2+e.length1,e.start2+e.length1+r);o&&e.diffs.push(new R.Diff(Z,o)),e.start1-=i.length,e.start2-=i.length,e.length1+=i.length+o.length,e.length2+=i.length+o.length}};R.prototype.patch_make=function(e,t,n){var r,i;if(typeof e=="string"&&typeof t=="string"&&typeof n=="undefined")r=e,i=this.diff_main(r,t,!0),i.length>2&&(this.diff_cleanupSemantic(i),this.diff_cleanupEfficiency(i));else if(e&&typeof e=="object"&&typeof t=="undefined"&&typeof n=="undefined")i=e,r=this.diff_text1(i);else if(typeof e=="string"&&t&&typeof t=="object"&&typeof n=="undefined")r=e,i=t;else if(typeof e=="string"&&typeof t=="string"&&n&&typeof n=="object")r=e,i=n;else throw new Error("Unknown call format to patch_make.");if(i.length===0)return[];for(var o=[],a=new R.patch_obj,s=0,l=0,u=0,c=r,p=r,m=0;m<i.length;m++){var f=i[m][0],d=i[m][1];switch(!s&&f!==Z&&(a.start1=l,a.start2=u),f){case pe:a.diffs[s++]=i[m],a.length2+=d.length,p=p.substring(0,u)+d+p.substring(u);break;case ue:a.length1+=d.length,a.diffs[s++]=i[m],p=p.substring(0,u)+p.substring(u+d.length);break;case Z:d.length<=2*this.Patch_Margin&&s&&i.length!=m+1?(a.diffs[s++]=i[m],a.length1+=d.length,a.length2+=d.length):d.length>=2*this.Patch_Margin&&s&&(this.patch_addContext_(a,c),o.push(a),a=new R.patch_obj,s=0,c=p,l=u);break}f!==pe&&(l+=d.length),f!==ue&&(u+=d.length)}return s&&(this.patch_addContext_(a,c),o.push(a)),o};R.prototype.patch_deepCopy=function(e){for(var t=[],n=0;n<e.length;n++){var r=e[n],i=new R.patch_obj;i.diffs=[];for(var o=0;o<r.diffs.length;o++)i.diffs[o]=new R.Diff(r.diffs[o][0],r.diffs[o][1]);i.start1=r.start1,i.start2=r.start2,i.length1=r.length1,i.length2=r.length2,t[n]=i}return t};R.prototype.patch_apply=function(e,t){if(e.length==0)return[t,[]];e=this.patch_deepCopy(e);var n=this.patch_addPadding(e);t=n+t+n,this.patch_splitMax(e);for(var r=0,i=[],o=0;o<e.length;o++){var a=e[o].start2+r,s=this.diff_text1(e[o].diffs),l,u=-1;if(s.length>this.Match_MaxBits?(l=this.match_main(t,s.substring(0,this.Match_MaxBits),a),l!=-1&&(u=this.match_main(t,s.substring(s.length-this.Match_MaxBits),a+s.length-this.Match_MaxBits),(u==-1||l>=u)&&(l=-1))):l=this.match_main(t,s,a),l==-1)i[o]=!1,r-=e[o].length2-e[o].length1;else{i[o]=!0,r=l-a;var c;if(u==-1?c=t.substring(l,l+s.length):c=t.substring(l,u+this.Match_MaxBits),s==c)t=t.substring(0,l)+this.diff_text2(e[o].diffs)+t.substring(l+s.length);else{var p=this.diff_main(s,c,!1);if(s.length>this.Match_MaxBits&&this.diff_levenshtein(p)/s.length>this.Patch_DeleteThreshold)i[o]=!1;else{this.diff_cleanupSemanticLossless(p);for(var m=0,f,d=0;d<e[o].diffs.length;d++){var h=e[o].diffs[d];h[0]!==Z&&(f=this.diff_xIndex(p,m)),h[0]===pe?t=t.substring(0,l+f)+h[1]+t.substring(l+f):h[0]===ue&&(t=t.substring(0,l+f)+t.substring(l+this.diff_xIndex(p,m+h[1].length))),h[0]!==ue&&(m+=h[1].length)}}}}}return t=t.substring(n.length,t.length-n.length),[t,i]};R.prototype.patch_addPadding=function(e){for(var t=this.Patch_Margin,n="",r=1;r<=t;r++)n+=String.fromCharCode(r);for(var r=0;r<e.length;r++)e[r].start1+=t,e[r].start2+=t;var i=e[0],o=i.diffs;if(o.length==0||o[0][0]!=Z)o.unshift(new R.Diff(Z,n)),i.start1-=t,i.start2-=t,i.length1+=t,i.length2+=t;else if(t>o[0][1].length){var a=t-o[0][1].length;o[0][1]=n.substring(o[0][1].length)+o[0][1],i.start1-=a,i.start2-=a,i.length1+=a,i.length2+=a}if(i=e[e.length-1],o=i.diffs,o.length==0||o[o.length-1][0]!=Z)o.push(new R.Diff(Z,n)),i.length1+=t,i.length2+=t;else if(t>o[o.length-1][1].length){var a=t-o[o.length-1][1].length;o[o.length-1][1]+=n.substring(0,a),i.length1+=a,i.length2+=a}return n};R.prototype.patch_splitMax=function(e){for(var t=this.Match_MaxBits,n=0;n<e.length;n++)if(!(e[n].length1<=t)){var r=e[n];e.splice(n--,1);for(var i=r.start1,o=r.start2,a="";r.diffs.length!==0;){var s=new R.patch_obj,l=!0;for(s.start1=i-a.length,s.start2=o-a.length,a!==""&&(s.length1=s.length2=a.length,s.diffs.push(new R.Diff(Z,a)));r.diffs.length!==0&&s.length1<t-this.Patch_Margin;){var u=r.diffs[0][0],c=r.diffs[0][1];u===pe?(s.length2+=c.length,o+=c.length,s.diffs.push(r.diffs.shift()),l=!1):u===ue&&s.diffs.length==1&&s.diffs[0][0]==Z&&c.length>2*t?(s.length1+=c.length,i+=c.length,l=!1,s.diffs.push(new R.Diff(u,c)),r.diffs.shift()):(c=c.substring(0,t-s.length1-this.Patch_Margin),s.length1+=c.length,i+=c.length,u===Z?(s.length2+=c.length,o+=c.length):l=!1,s.diffs.push(new R.Diff(u,c)),c==r.diffs[0][1]?r.diffs.shift():r.diffs[0][1]=r.diffs[0][1].substring(c.length))}a=this.diff_text2(s.diffs),a=a.substring(a.length-this.Patch_Margin);var p=this.diff_text1(r.diffs).substring(0,this.Patch_Margin);p!==""&&(s.length1+=p.length,s.length2+=p.length,s.diffs.length!==0&&s.diffs[s.diffs.length-1][0]===Z?s.diffs[s.diffs.length-1][1]+=p:s.diffs.push(new R.Diff(Z,p))),l||e.splice(++n,0,s)}}};R.prototype.patch_toText=function(e){for(var t=[],n=0;n<e.length;n++)t[n]=e[n];return t.join("")};R.prototype.patch_fromText=function(e){var t=[];if(!e)return t;for(var n=e.split(`
`),r=0,i=/^@@ -(\d+),?(\d*) \+(\d+),?(\d*) @@$/;r<n.length;){var o=n[r].match(i);if(!o)throw new Error("Invalid patch string: "+n[r]);var a=new R.patch_obj;for(t.push(a),a.start1=parseInt(o[1],10),o[2]===""?(a.start1--,a.length1=1):o[2]=="0"?a.length1=0:(a.start1--,a.length1=parseInt(o[2],10)),a.start2=parseInt(o[3],10),o[4]===""?(a.start2--,a.length2=1):o[4]=="0"?a.length2=0:(a.start2--,a.length2=parseInt(o[4],10)),r++;r<n.length;){var s=n[r].charAt(0);try{var l=decodeURI(n[r].substring(1))}catch(u){throw new Error("Illegal escape in patch_fromText: "+l)}if(s=="-")a.diffs.push(new R.Diff(ue,l));else if(s=="+")a.diffs.push(new R.Diff(pe,l));else if(s==" ")a.diffs.push(new R.Diff(Z,l));else{if(s=="@")break;if(s!=="")throw new Error('Invalid patch mode "'+s+'" in: '+l)}r++}}return t};R.patch_obj=function(){this.diffs=[],this.start1=null,this.start2=null,this.length1=0,this.length2=0};R.patch_obj.prototype.toString=function(){var e,t;this.length1===0?e=this.start1+",0":this.length1==1?e=this.start1+1:e=this.start1+1+","+this.length1,this.length2===0?t=this.start2+",0":this.length2==1?t=this.start2+1:t=this.start2+1+","+this.length2;for(var n=["@@ -"+e+" +"+t+` @@
`],r,i=0;i<this.diffs.length;i++){switch(this.diffs[i][0]){case pe:r="+";break;case ue:r="-";break;case Z:r=" ";break}n[i+1]=r+encodeURI(this.diffs[i][1])+`
`}return n.join("").replace(/%20/g," ")};hr.exports=R;hr.exports.diff_match_patch=R;hr.exports.DIFF_DELETE=ue;hr.exports.DIFF_INSERT=pe;hr.exports.DIFF_EQUAL=Z});var _l=so((Mf,ga)=>{(function(e,t){"use strict";typeof define=="function"&&define.amd?define(t):typeof ga=="object"&&ga.exports?ga.exports=t():e.log=t()})(Mf,function(){"use strict";var e=function(){},t="undefined",n=typeof window!==t&&typeof window.navigator!==t&&/Trident\/|MSIE /.test(window.navigator.userAgent),r=["trace","debug","info","warn","error"];function i(d,h){var g=d[h];if(typeof g.bind=="function")return g.bind(d);try{return Function.prototype.bind.call(g,d)}catch(b){return function(){return Function.prototype.apply.apply(g,[d,arguments])}}}function o(){console.log&&(console.log.apply?console.log.apply(console,arguments):Function.prototype.apply.apply(console.log,[console,arguments])),console.trace&&console.trace()}function a(d){return d==="debug"&&(d="log"),typeof console===t?!1:d==="trace"&&n?o:console[d]!==void 0?i(console,d):console.log!==void 0?i(console,"log"):e}function s(d,h){for(var g=0;g<r.length;g++){var b=r[g];this[b]=g<d?e:this.methodFactory(b,d,h)}this.log=this.debug}function l(d,h,g){return function(){typeof console!==t&&(s.call(this,h,g),this[d].apply(this,arguments))}}function u(d,h,g){return a(d)||l.apply(this,arguments)}function c(d,h,g){var b=this,O;h=h==null?"WARN":h;var S="loglevel";typeof d=="string"?S+=":"+d:typeof d=="symbol"&&(S=void 0);function E(M){var z=(r[M]||"silent").toUpperCase();if(!(typeof window===t||!S)){try{window.localStorage[S]=z;return}catch(q){}try{window.document.cookie=encodeURIComponent(S)+"="+z+";"}catch(q){}}}function I(){var M;if(!(typeof window===t||!S)){try{M=window.localStorage[S]}catch(H){}if(typeof M===t)try{var z=window.document.cookie,q=z.indexOf(encodeURIComponent(S)+"=");q!==-1&&(M=/^([^;]+)/.exec(z.slice(q))[1])}catch(H){}return b.levels[M]===void 0&&(M=void 0),M}}function k(){if(!(typeof window===t||!S)){try{window.localStorage.removeItem(S);return}catch(M){}try{window.document.cookie=encodeURIComponent(S)+"=; expires=Thu, 01 Jan 1970 00:00:00 UTC"}catch(M){}}}b.name=d,b.levels={TRACE:0,DEBUG:1,INFO:2,WARN:3,ERROR:4,SILENT:5},b.methodFactory=g||u,b.getLevel=function(){return O},b.setLevel=function(M,z){if(typeof M=="string"&&b.levels[M.toUpperCase()]!==void 0&&(M=b.levels[M.toUpperCase()]),typeof M=="number"&&M>=0&&M<=b.levels.SILENT){if(O=M,z!==!1&&E(M),s.call(b,M,d),typeof console===t&&M<b.levels.SILENT)return"No console available for logging"}else throw"log.setLevel() called with invalid level: "+M},b.setDefaultLevel=function(M){h=M,I()||b.setLevel(M,!1)},b.resetLevel=function(){b.setLevel(h,!1),k()},b.enableAll=function(M){b.setLevel(b.levels.TRACE,M)},b.disableAll=function(M){b.setLevel(b.levels.SILENT,M)};var _=I();_==null&&(_=h),b.setLevel(_,!1)}var p=new c,m={};p.getLogger=function(h){if(typeof h!="symbol"&&typeof h!="string"||h==="")throw new TypeError("You must supply a name when creating a logger.");var g=m[h];return g||(g=m[h]=new c(h,p.getLevel(),p.methodFactory)),g};var f=typeof window!==t?window.log:void 0;return p.noConflict=function(){return typeof window!==t&&window.log===p&&(window.log=f),p},p.getLoggers=function(){return m},p.default=p,p})});var yx={};Va(yx,{default:()=>Ha});module.exports=fd(yx);var xe=require("obsidian");function Du(e){return typeof e=="undefined"||e===null}function dd(e){return typeof e=="object"&&e!==null}function hd(e){return Array.isArray(e)?e:Du(e)?[]:[e]}function gd(e,t){var n,r,i,o;if(t)for(o=Object.keys(t),n=0,r=o.length;n<r;n+=1)i=o[n],e[i]=t[i];return e}function yd(e,t){var n="",r;for(r=0;r<t;r+=1)n+=e;return n}function bd(e){return e===0&&Number.NEGATIVE_INFINITY===1/e}var wd=Du,xd=dd,kd=hd,vd=yd,Sd=bd,Od=gd,Ee={isNothing:wd,isObject:xd,toArray:kd,repeat:vd,isNegativeZero:Sd,extend:Od};function Pu(e,t){var n="",r=e.reason||"(unknown reason)";return e.mark?(e.mark.name&&(n+='in "'+e.mark.name+'" '),n+="("+(e.mark.line+1)+":"+(e.mark.column+1)+")",!t&&e.mark.snippet&&(n+=`
`+e.mark.snippet),r+" "+n):r}function Br(e,t){Error.call(this),this.name="YAMLException",this.reason=e,this.mark=t,this.message=Pu(this,!1),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack||""}Br.prototype=Object.create(Error.prototype);Br.prototype.constructor=Br;Br.prototype.toString=function(t){return this.name+": "+Pu(this,t)};var Je=Br;function Ka(e,t,n,r,i){var o="",a="",s=Math.floor(i/2)-1;return r-t>s&&(o=" ... ",t=r-s+o.length),n-r>s&&(a=" ...",n=r+s-a.length),{str:o+e.slice(t,n).replace(/\t/g,"\u2192")+a,pos:r-t+o.length}}function Wa(e,t){return Ee.repeat(" ",t-e.length)+e}function Td(e,t){if(t=Object.create(t||null),!e.buffer)return null;t.maxLength||(t.maxLength=79),typeof t.indent!="number"&&(t.indent=1),typeof t.linesBefore!="number"&&(t.linesBefore=3),typeof t.linesAfter!="number"&&(t.linesAfter=2);for(var n=/\r?\n|\r|\0/g,r=[0],i=[],o,a=-1;o=n.exec(e.buffer);)i.push(o.index),r.push(o.index+o[0].length),e.position<=o.index&&a<0&&(a=r.length-2);a<0&&(a=r.length-1);var s="",l,u,c=Math.min(e.line+t.linesAfter,i.length).toString().length,p=t.maxLength-(t.indent+c+3);for(l=1;l<=t.linesBefore&&!(a-l<0);l++)u=Ka(e.buffer,r[a-l],i[a-l],e.position-(r[a]-r[a-l]),p),s=Ee.repeat(" ",t.indent)+Wa((e.line-l+1).toString(),c)+" | "+u.str+`
`+s;for(u=Ka(e.buffer,r[a],i[a],e.position,p),s+=Ee.repeat(" ",t.indent)+Wa((e.line+1).toString(),c)+" | "+u.str+`
`,s+=Ee.repeat("-",t.indent+c+3+u.pos)+`^
`,l=1;l<=t.linesAfter&&!(a+l>=i.length);l++)u=Ka(e.buffer,r[a+l],i[a+l],e.position-(r[a]-r[a+l]),p),s+=Ee.repeat(" ",t.indent)+Wa((e.line+l+1).toString(),c)+" | "+u.str+`
`;return s.replace(/\n$/,"")}var Cd=Td,Ad=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],Ed=["scalar","sequence","mapping"];function Ld(e){var t={};return e!==null&&Object.keys(e).forEach(function(n){e[n].forEach(function(r){t[String(r)]=n})}),t}function _d(e,t){if(t=t||{},Object.keys(t).forEach(function(n){if(Ad.indexOf(n)===-1)throw new Je('Unknown option "'+n+'" is met in definition of "'+e+'" YAML type.')}),this.options=t,this.tag=e,this.kind=t.kind||null,this.resolve=t.resolve||function(){return!0},this.construct=t.construct||function(n){return n},this.instanceOf=t.instanceOf||null,this.predicate=t.predicate||null,this.represent=t.represent||null,this.representName=t.representName||null,this.defaultStyle=t.defaultStyle||null,this.multi=t.multi||!1,this.styleAliases=Ld(t.styleAliases||null),Ed.indexOf(this.kind)===-1)throw new Je('Unknown kind "'+this.kind+'" is specified for "'+e+'" YAML type.')}var He=_d;function ku(e,t){var n=[];return e[t].forEach(function(r){var i=n.length;n.forEach(function(o,a){o.tag===r.tag&&o.kind===r.kind&&o.multi===r.multi&&(i=a)}),n[i]=r}),n}function Id(){var e={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}},t,n;function r(i){i.multi?(e.multi[i.kind].push(i),e.multi.fallback.push(i)):e[i.kind][i.tag]=e.fallback[i.tag]=i}for(t=0,n=arguments.length;t<n;t+=1)arguments[t].forEach(r);return e}function Ga(e){return this.extend(e)}Ga.prototype.extend=function(t){var n=[],r=[];if(t instanceof He)r.push(t);else if(Array.isArray(t))r=r.concat(t);else if(t&&(Array.isArray(t.implicit)||Array.isArray(t.explicit)))t.implicit&&(n=n.concat(t.implicit)),t.explicit&&(r=r.concat(t.explicit));else throw new Je("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");n.forEach(function(o){if(!(o instanceof He))throw new Je("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(o.loadKind&&o.loadKind!=="scalar")throw new Je("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");if(o.multi)throw new Je("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.")}),r.forEach(function(o){if(!(o instanceof He))throw new Je("Specified list of YAML types (or a single Type object) contains a non-Type object.")});var i=Object.create(Ga.prototype);return i.implicit=(this.implicit||[]).concat(n),i.explicit=(this.explicit||[]).concat(r),i.compiledImplicit=ku(i,"implicit"),i.compiledExplicit=ku(i,"explicit"),i.compiledTypeMap=Id(i.compiledImplicit,i.compiledExplicit),i};var Md=Ga,Bd=new He("tag:yaml.org,2002:str",{kind:"scalar",construct:function(e){return e!==null?e:""}}),Fd=new He("tag:yaml.org,2002:seq",{kind:"sequence",construct:function(e){return e!==null?e:[]}}),Rd=new He("tag:yaml.org,2002:map",{kind:"mapping",construct:function(e){return e!==null?e:{}}}),Dd=new Md({explicit:[Bd,Fd,Rd]});function Pd(e){if(e===null)return!0;var t=e.length;return t===1&&e==="~"||t===4&&(e==="null"||e==="Null"||e==="NULL")}function Nd(){return null}function zd(e){return e===null}var $d=new He("tag:yaml.org,2002:null",{kind:"scalar",resolve:Pd,construct:Nd,predicate:zd,represent:{canonical:function(){return"~"},lowercase:function(){return"null"},uppercase:function(){return"NULL"},camelcase:function(){return"Null"},empty:function(){return""}},defaultStyle:"lowercase"});function Hd(e){if(e===null)return!1;var t=e.length;return t===4&&(e==="true"||e==="True"||e==="TRUE")||t===5&&(e==="false"||e==="False"||e==="FALSE")}function Yd(e){return e==="true"||e==="True"||e==="TRUE"}function jd(e){return Object.prototype.toString.call(e)==="[object Boolean]"}var qd=new He("tag:yaml.org,2002:bool",{kind:"scalar",resolve:Hd,construct:Yd,predicate:jd,represent:{lowercase:function(e){return e?"true":"false"},uppercase:function(e){return e?"TRUE":"FALSE"},camelcase:function(e){return e?"True":"False"}},defaultStyle:"lowercase"});function Vd(e){return 48<=e&&e<=57||65<=e&&e<=70||97<=e&&e<=102}function Kd(e){return 48<=e&&e<=55}function Wd(e){return 48<=e&&e<=57}function Ud(e){if(e===null)return!1;var t=e.length,n=0,r=!1,i;if(!t)return!1;if(i=e[n],(i==="-"||i==="+")&&(i=e[++n]),i==="0"){if(n+1===t)return!0;if(i=e[++n],i==="b"){for(n++;n<t;n++)if(i=e[n],i!=="_"){if(i!=="0"&&i!=="1")return!1;r=!0}return r&&i!=="_"}if(i==="x"){for(n++;n<t;n++)if(i=e[n],i!=="_"){if(!Vd(e.charCodeAt(n)))return!1;r=!0}return r&&i!=="_"}if(i==="o"){for(n++;n<t;n++)if(i=e[n],i!=="_"){if(!Kd(e.charCodeAt(n)))return!1;r=!0}return r&&i!=="_"}}if(i==="_")return!1;for(;n<t;n++)if(i=e[n],i!=="_"){if(!Wd(e.charCodeAt(n)))return!1;r=!0}return!(!r||i==="_")}function Gd(e){var t=e,n=1,r;if(t.indexOf("_")!==-1&&(t=t.replace(/_/g,"")),r=t[0],(r==="-"||r==="+")&&(r==="-"&&(n=-1),t=t.slice(1),r=t[0]),t==="0")return 0;if(r==="0"){if(t[1]==="b")return n*parseInt(t.slice(2),2);if(t[1]==="x")return n*parseInt(t.slice(2),16);if(t[1]==="o")return n*parseInt(t.slice(2),8)}return n*parseInt(t,10)}function Zd(e){return Object.prototype.toString.call(e)==="[object Number]"&&e%1===0&&!Ee.isNegativeZero(e)}var Qd=new He("tag:yaml.org,2002:int",{kind:"scalar",resolve:Ud,construct:Gd,predicate:Zd,represent:{binary:function(e){return e>=0?"0b"+e.toString(2):"-0b"+e.toString(2).slice(1)},octal:function(e){return e>=0?"0o"+e.toString(8):"-0o"+e.toString(8).slice(1)},decimal:function(e){return e.toString(10)},hexadecimal:function(e){return e>=0?"0x"+e.toString(16).toUpperCase():"-0x"+e.toString(16).toUpperCase().slice(1)}},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}}),Xd=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function Jd(e){return!(e===null||!Xd.test(e)||e[e.length-1]==="_")}function eh(e){var t,n;return t=e.replace(/_/g,"").toLowerCase(),n=t[0]==="-"?-1:1,"+-".indexOf(t[0])>=0&&(t=t.slice(1)),t===".inf"?n===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:t===".nan"?NaN:n*parseFloat(t,10)}var th=/^[-+]?[0-9]+e/;function nh(e,t){var n;if(isNaN(e))switch(t){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===e)switch(t){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===e)switch(t){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(Ee.isNegativeZero(e))return"-0.0";return n=e.toString(10),th.test(n)?n.replace("e",".e"):n}function rh(e){return Object.prototype.toString.call(e)==="[object Number]"&&(e%1!==0||Ee.isNegativeZero(e))}var ih=new He("tag:yaml.org,2002:float",{kind:"scalar",resolve:Jd,construct:eh,predicate:rh,represent:nh,defaultStyle:"lowercase"}),oh=Dd.extend({implicit:[$d,qd,Qd,ih]}),ah=oh,Nu=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),zu=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$");function sh(e){return e===null?!1:Nu.exec(e)!==null||zu.exec(e)!==null}function lh(e){var t,n,r,i,o,a,s,l=0,u=null,c,p,m;if(t=Nu.exec(e),t===null&&(t=zu.exec(e)),t===null)throw new Error("Date resolve error");if(n=+t[1],r=+t[2]-1,i=+t[3],!t[4])return new Date(Date.UTC(n,r,i));if(o=+t[4],a=+t[5],s=+t[6],t[7]){for(l=t[7].slice(0,3);l.length<3;)l+="0";l=+l}return t[9]&&(c=+t[10],p=+(t[11]||0),u=(c*60+p)*6e4,t[9]==="-"&&(u=-u)),m=new Date(Date.UTC(n,r,i,o,a,s,l)),u&&m.setTime(m.getTime()-u),m}function uh(e){return e.toISOString()}var ch=new He("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:sh,construct:lh,instanceOf:Date,represent:uh});function ph(e){return e==="<<"||e===null}var mh=new He("tag:yaml.org,2002:merge",{kind:"scalar",resolve:ph}),es=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
\r`;function fh(e){if(e===null)return!1;var t,n,r=0,i=e.length,o=es;for(n=0;n<i;n++)if(t=o.indexOf(e.charAt(n)),!(t>64)){if(t<0)return!1;r+=6}return r%8===0}function dh(e){var t,n,r=e.replace(/[\r\n=]/g,""),i=r.length,o=es,a=0,s=[];for(t=0;t<i;t++)t%4===0&&t&&(s.push(a>>16&255),s.push(a>>8&255),s.push(a&255)),a=a<<6|o.indexOf(r.charAt(t));return n=i%4*6,n===0?(s.push(a>>16&255),s.push(a>>8&255),s.push(a&255)):n===18?(s.push(a>>10&255),s.push(a>>2&255)):n===12&&s.push(a>>4&255),new Uint8Array(s)}function hh(e){var t="",n=0,r,i,o=e.length,a=es;for(r=0;r<o;r++)r%3===0&&r&&(t+=a[n>>18&63],t+=a[n>>12&63],t+=a[n>>6&63],t+=a[n&63]),n=(n<<8)+e[r];return i=o%3,i===0?(t+=a[n>>18&63],t+=a[n>>12&63],t+=a[n>>6&63],t+=a[n&63]):i===2?(t+=a[n>>10&63],t+=a[n>>4&63],t+=a[n<<2&63],t+=a[64]):i===1&&(t+=a[n>>2&63],t+=a[n<<4&63],t+=a[64],t+=a[64]),t}function gh(e){return Object.prototype.toString.call(e)==="[object Uint8Array]"}var yh=new He("tag:yaml.org,2002:binary",{kind:"scalar",resolve:fh,construct:dh,predicate:gh,represent:hh}),bh=Object.prototype.hasOwnProperty,wh=Object.prototype.toString;function xh(e){if(e===null)return!0;var t=[],n,r,i,o,a,s=e;for(n=0,r=s.length;n<r;n+=1){if(i=s[n],a=!1,wh.call(i)!=="[object Object]")return!1;for(o in i)if(bh.call(i,o))if(!a)a=!0;else return!1;if(!a)return!1;if(t.indexOf(o)===-1)t.push(o);else return!1}return!0}function kh(e){return e!==null?e:[]}var vh=new He("tag:yaml.org,2002:omap",{kind:"sequence",resolve:xh,construct:kh}),Sh=Object.prototype.toString;function Oh(e){if(e===null)return!0;var t,n,r,i,o,a=e;for(o=new Array(a.length),t=0,n=a.length;t<n;t+=1){if(r=a[t],Sh.call(r)!=="[object Object]"||(i=Object.keys(r),i.length!==1))return!1;o[t]=[i[0],r[i[0]]]}return!0}function Th(e){if(e===null)return[];var t,n,r,i,o,a=e;for(o=new Array(a.length),t=0,n=a.length;t<n;t+=1)r=a[t],i=Object.keys(r),o[t]=[i[0],r[i[0]]];return o}var Ch=new He("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:Oh,construct:Th}),Ah=Object.prototype.hasOwnProperty;function Eh(e){if(e===null)return!0;var t,n=e;for(t in n)if(Ah.call(n,t)&&n[t]!==null)return!1;return!0}function Lh(e){return e!==null?e:{}}var _h=new He("tag:yaml.org,2002:set",{kind:"mapping",resolve:Eh,construct:Lh}),$u=ah.extend({implicit:[ch,mh],explicit:[yh,vh,Ch,_h]}),tn=Object.prototype.hasOwnProperty,lo=1,Hu=2,Yu=3,uo=4,Ua=1,Ih=2,vu=3,Mh=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,Bh=/[\x85\u2028\u2029]/,Fh=/[,\[\]\{\}]/,ju=/^(?:!|!!|![a-z\-]+!)$/i,qu=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;function Su(e){return Object.prototype.toString.call(e)}function Mt(e){return e===10||e===13}function vn(e){return e===9||e===32}function st(e){return e===9||e===32||e===10||e===13}function tr(e){return e===44||e===91||e===93||e===123||e===125}function Rh(e){var t;return 48<=e&&e<=57?e-48:(t=e|32,97<=t&&t<=102?t-97+10:-1)}function Dh(e){return e===120?2:e===117?4:e===85?8:0}function Ph(e){return 48<=e&&e<=57?e-48:-1}function Ou(e){return e===48?"\0":e===97?"\x07":e===98?"\b":e===116||e===9?" ":e===110?`
`:e===118?"\v":e===102?"\f":e===114?"\r":e===101?"\x1B":e===32?" ":e===34?'"':e===47?"/":e===92?"\\":e===78?"\x85":e===95?"\xA0":e===76?"\u2028":e===80?"\u2029":""}function Nh(e){return e<=65535?String.fromCharCode(e):String.fromCharCode((e-65536>>10)+55296,(e-65536&1023)+56320)}var Vu=new Array(256),Ku=new Array(256);for(kn=0;kn<256;kn++)Vu[kn]=Ou(kn)?1:0,Ku[kn]=Ou(kn);var kn;function zh(e,t){this.input=e,this.filename=t.filename||null,this.schema=t.schema||$u,this.onWarning=t.onWarning||null,this.legacy=t.legacy||!1,this.json=t.json||!1,this.listener=t.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=e.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.firstTabInLine=-1,this.documents=[]}function Wu(e,t){var n={name:e.filename,buffer:e.input.slice(0,-1),position:e.position,line:e.line,column:e.position-e.lineStart};return n.snippet=Cd(n),new Je(t,n)}function j(e,t){throw Wu(e,t)}function co(e,t){e.onWarning&&e.onWarning.call(null,Wu(e,t))}var Tu={YAML:function(t,n,r){var i,o,a;t.version!==null&&j(t,"duplication of %YAML directive"),r.length!==1&&j(t,"YAML directive accepts exactly one argument"),i=/^([0-9]+)\.([0-9]+)$/.exec(r[0]),i===null&&j(t,"ill-formed argument of the YAML directive"),o=parseInt(i[1],10),a=parseInt(i[2],10),o!==1&&j(t,"unacceptable YAML version of the document"),t.version=r[0],t.checkLineBreaks=a<2,a!==1&&a!==2&&co(t,"unsupported YAML version of the document")},TAG:function(t,n,r){var i,o;r.length!==2&&j(t,"TAG directive accepts exactly two arguments"),i=r[0],o=r[1],ju.test(i)||j(t,"ill-formed tag handle (first argument) of the TAG directive"),tn.call(t.tagMap,i)&&j(t,'there is a previously declared suffix for "'+i+'" tag handle'),qu.test(o)||j(t,"ill-formed tag prefix (second argument) of the TAG directive");try{o=decodeURIComponent(o)}catch(a){j(t,"tag prefix is malformed: "+o)}t.tagMap[i]=o}};function en(e,t,n,r){var i,o,a,s;if(t<n){if(s=e.input.slice(t,n),r)for(i=0,o=s.length;i<o;i+=1)a=s.charCodeAt(i),a===9||32<=a&&a<=1114111||j(e,"expected valid JSON character");else Mh.test(s)&&j(e,"the stream contains non-printable characters");e.result+=s}}function Cu(e,t,n,r){var i,o,a,s;for(Ee.isObject(n)||j(e,"cannot merge mappings; the provided source object is unacceptable"),i=Object.keys(n),a=0,s=i.length;a<s;a+=1)o=i[a],tn.call(t,o)||(t[o]=n[o],r[o]=!0)}function nr(e,t,n,r,i,o,a,s,l){var u,c;if(Array.isArray(i))for(i=Array.prototype.slice.call(i),u=0,c=i.length;u<c;u+=1)Array.isArray(i[u])&&j(e,"nested arrays are not supported inside keys"),typeof i=="object"&&Su(i[u])==="[object Object]"&&(i[u]="[object Object]");if(typeof i=="object"&&Su(i)==="[object Object]"&&(i="[object Object]"),i=String(i),t===null&&(t={}),r==="tag:yaml.org,2002:merge")if(Array.isArray(o))for(u=0,c=o.length;u<c;u+=1)Cu(e,t,o[u],n);else Cu(e,t,o,n);else!e.json&&!tn.call(n,i)&&tn.call(t,i)&&(e.line=a||e.line,e.lineStart=s||e.lineStart,e.position=l||e.position,j(e,"duplicated mapping key")),i==="__proto__"?Object.defineProperty(t,i,{configurable:!0,enumerable:!0,writable:!0,value:o}):t[i]=o,delete n[i];return t}function ts(e){var t;t=e.input.charCodeAt(e.position),t===10?e.position++:t===13?(e.position++,e.input.charCodeAt(e.position)===10&&e.position++):j(e,"a line break is expected"),e.line+=1,e.lineStart=e.position,e.firstTabInLine=-1}function Ce(e,t,n){for(var r=0,i=e.input.charCodeAt(e.position);i!==0;){for(;vn(i);)i===9&&e.firstTabInLine===-1&&(e.firstTabInLine=e.position),i=e.input.charCodeAt(++e.position);if(t&&i===35)do i=e.input.charCodeAt(++e.position);while(i!==10&&i!==13&&i!==0);if(Mt(i))for(ts(e),i=e.input.charCodeAt(e.position),r++,e.lineIndent=0;i===32;)e.lineIndent++,i=e.input.charCodeAt(++e.position);else break}return n!==-1&&r!==0&&e.lineIndent<n&&co(e,"deficient indentation"),r}function fo(e){var t=e.position,n;return n=e.input.charCodeAt(t),!!((n===45||n===46)&&n===e.input.charCodeAt(t+1)&&n===e.input.charCodeAt(t+2)&&(t+=3,n=e.input.charCodeAt(t),n===0||st(n)))}function ns(e,t){t===1?e.result+=" ":t>1&&(e.result+=Ee.repeat(`
`,t-1))}function $h(e,t,n){var r,i,o,a,s,l,u,c,p=e.kind,m=e.result,f;if(f=e.input.charCodeAt(e.position),st(f)||tr(f)||f===35||f===38||f===42||f===33||f===124||f===62||f===39||f===34||f===37||f===64||f===96||(f===63||f===45)&&(i=e.input.charCodeAt(e.position+1),st(i)||n&&tr(i)))return!1;for(e.kind="scalar",e.result="",o=a=e.position,s=!1;f!==0;){if(f===58){if(i=e.input.charCodeAt(e.position+1),st(i)||n&&tr(i))break}else if(f===35){if(r=e.input.charCodeAt(e.position-1),st(r))break}else{if(e.position===e.lineStart&&fo(e)||n&&tr(f))break;if(Mt(f))if(l=e.line,u=e.lineStart,c=e.lineIndent,Ce(e,!1,-1),e.lineIndent>=t){s=!0,f=e.input.charCodeAt(e.position);continue}else{e.position=a,e.line=l,e.lineStart=u,e.lineIndent=c;break}}s&&(en(e,o,a,!1),ns(e,e.line-l),o=a=e.position,s=!1),vn(f)||(a=e.position+1),f=e.input.charCodeAt(++e.position)}return en(e,o,a,!1),e.result?!0:(e.kind=p,e.result=m,!1)}function Hh(e,t){var n,r,i;if(n=e.input.charCodeAt(e.position),n!==39)return!1;for(e.kind="scalar",e.result="",e.position++,r=i=e.position;(n=e.input.charCodeAt(e.position))!==0;)if(n===39)if(en(e,r,e.position,!0),n=e.input.charCodeAt(++e.position),n===39)r=e.position,e.position++,i=e.position;else return!0;else Mt(n)?(en(e,r,i,!0),ns(e,Ce(e,!1,t)),r=i=e.position):e.position===e.lineStart&&fo(e)?j(e,"unexpected end of the document within a single quoted scalar"):(e.position++,i=e.position);j(e,"unexpected end of the stream within a single quoted scalar")}function Yh(e,t){var n,r,i,o,a,s;if(s=e.input.charCodeAt(e.position),s!==34)return!1;for(e.kind="scalar",e.result="",e.position++,n=r=e.position;(s=e.input.charCodeAt(e.position))!==0;){if(s===34)return en(e,n,e.position,!0),e.position++,!0;if(s===92){if(en(e,n,e.position,!0),s=e.input.charCodeAt(++e.position),Mt(s))Ce(e,!1,t);else if(s<256&&Vu[s])e.result+=Ku[s],e.position++;else if((a=Dh(s))>0){for(i=a,o=0;i>0;i--)s=e.input.charCodeAt(++e.position),(a=Rh(s))>=0?o=(o<<4)+a:j(e,"expected hexadecimal character");e.result+=Nh(o),e.position++}else j(e,"unknown escape sequence");n=r=e.position}else Mt(s)?(en(e,n,r,!0),ns(e,Ce(e,!1,t)),n=r=e.position):e.position===e.lineStart&&fo(e)?j(e,"unexpected end of the document within a double quoted scalar"):(e.position++,r=e.position)}j(e,"unexpected end of the stream within a double quoted scalar")}function jh(e,t){var n=!0,r,i,o,a=e.tag,s,l=e.anchor,u,c,p,m,f,d=Object.create(null),h,g,b,O;if(O=e.input.charCodeAt(e.position),O===91)c=93,f=!1,s=[];else if(O===123)c=125,f=!0,s={};else return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=s),O=e.input.charCodeAt(++e.position);O!==0;){if(Ce(e,!0,t),O=e.input.charCodeAt(e.position),O===c)return e.position++,e.tag=a,e.anchor=l,e.kind=f?"mapping":"sequence",e.result=s,!0;n?O===44&&j(e,"expected the node content, but found ','"):j(e,"missed comma between flow collection entries"),g=h=b=null,p=m=!1,O===63&&(u=e.input.charCodeAt(e.position+1),st(u)&&(p=m=!0,e.position++,Ce(e,!0,t))),r=e.line,i=e.lineStart,o=e.position,rr(e,t,lo,!1,!0),g=e.tag,h=e.result,Ce(e,!0,t),O=e.input.charCodeAt(e.position),(m||e.line===r)&&O===58&&(p=!0,O=e.input.charCodeAt(++e.position),Ce(e,!0,t),rr(e,t,lo,!1,!0),b=e.result),f?nr(e,s,d,g,h,b,r,i,o):p?s.push(nr(e,null,d,g,h,b,r,i,o)):s.push(h),Ce(e,!0,t),O=e.input.charCodeAt(e.position),O===44?(n=!0,O=e.input.charCodeAt(++e.position)):n=!1}j(e,"unexpected end of the stream within a flow collection")}function qh(e,t){var n,r,i=Ua,o=!1,a=!1,s=t,l=0,u=!1,c,p;if(p=e.input.charCodeAt(e.position),p===124)r=!1;else if(p===62)r=!0;else return!1;for(e.kind="scalar",e.result="";p!==0;)if(p=e.input.charCodeAt(++e.position),p===43||p===45)Ua===i?i=p===43?vu:Ih:j(e,"repeat of a chomping mode identifier");else if((c=Ph(p))>=0)c===0?j(e,"bad explicit indentation width of a block scalar; it cannot be less than one"):a?j(e,"repeat of an indentation width identifier"):(s=t+c-1,a=!0);else break;if(vn(p)){do p=e.input.charCodeAt(++e.position);while(vn(p));if(p===35)do p=e.input.charCodeAt(++e.position);while(!Mt(p)&&p!==0)}for(;p!==0;){for(ts(e),e.lineIndent=0,p=e.input.charCodeAt(e.position);(!a||e.lineIndent<s)&&p===32;)e.lineIndent++,p=e.input.charCodeAt(++e.position);if(!a&&e.lineIndent>s&&(s=e.lineIndent),Mt(p)){l++;continue}if(e.lineIndent<s){i===vu?e.result+=Ee.repeat(`
`,o?1+l:l):i===Ua&&o&&(e.result+=`
`);break}for(r?vn(p)?(u=!0,e.result+=Ee.repeat(`
`,o?1+l:l)):u?(u=!1,e.result+=Ee.repeat(`
`,l+1)):l===0?o&&(e.result+=" "):e.result+=Ee.repeat(`
`,l):e.result+=Ee.repeat(`
`,o?1+l:l),o=!0,a=!0,l=0,n=e.position;!Mt(p)&&p!==0;)p=e.input.charCodeAt(++e.position);en(e,n,e.position,!1)}return!0}function Au(e,t){var n,r=e.tag,i=e.anchor,o=[],a,s=!1,l;if(e.firstTabInLine!==-1)return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=o),l=e.input.charCodeAt(e.position);l!==0&&(e.firstTabInLine!==-1&&(e.position=e.firstTabInLine,j(e,"tab characters must not be used in indentation")),!(l!==45||(a=e.input.charCodeAt(e.position+1),!st(a))));){if(s=!0,e.position++,Ce(e,!0,-1)&&e.lineIndent<=t){o.push(null),l=e.input.charCodeAt(e.position);continue}if(n=e.line,rr(e,t,Yu,!1,!0),o.push(e.result),Ce(e,!0,-1),l=e.input.charCodeAt(e.position),(e.line===n||e.lineIndent>t)&&l!==0)j(e,"bad indentation of a sequence entry");else if(e.lineIndent<t)break}return s?(e.tag=r,e.anchor=i,e.kind="sequence",e.result=o,!0):!1}function Vh(e,t,n){var r,i,o,a,s,l,u=e.tag,c=e.anchor,p={},m=Object.create(null),f=null,d=null,h=null,g=!1,b=!1,O;if(e.firstTabInLine!==-1)return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=p),O=e.input.charCodeAt(e.position);O!==0;){if(!g&&e.firstTabInLine!==-1&&(e.position=e.firstTabInLine,j(e,"tab characters must not be used in indentation")),r=e.input.charCodeAt(e.position+1),o=e.line,(O===63||O===58)&&st(r))O===63?(g&&(nr(e,p,m,f,d,null,a,s,l),f=d=h=null),b=!0,g=!0,i=!0):g?(g=!1,i=!0):j(e,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"),e.position+=1,O=r;else{if(a=e.line,s=e.lineStart,l=e.position,!rr(e,n,Hu,!1,!0))break;if(e.line===o){for(O=e.input.charCodeAt(e.position);vn(O);)O=e.input.charCodeAt(++e.position);if(O===58)O=e.input.charCodeAt(++e.position),st(O)||j(e,"a whitespace character is expected after the key-value separator within a block mapping"),g&&(nr(e,p,m,f,d,null,a,s,l),f=d=h=null),b=!0,g=!1,i=!1,f=e.tag,d=e.result;else if(b)j(e,"can not read an implicit mapping pair; a colon is missed");else return e.tag=u,e.anchor=c,!0}else if(b)j(e,"can not read a block mapping entry; a multiline key may not be an implicit key");else return e.tag=u,e.anchor=c,!0}if((e.line===o||e.lineIndent>t)&&(g&&(a=e.line,s=e.lineStart,l=e.position),rr(e,t,uo,!0,i)&&(g?d=e.result:h=e.result),g||(nr(e,p,m,f,d,h,a,s,l),f=d=h=null),Ce(e,!0,-1),O=e.input.charCodeAt(e.position)),(e.line===o||e.lineIndent>t)&&O!==0)j(e,"bad indentation of a mapping entry");else if(e.lineIndent<t)break}return g&&nr(e,p,m,f,d,null,a,s,l),b&&(e.tag=u,e.anchor=c,e.kind="mapping",e.result=p),b}function Kh(e){var t,n=!1,r=!1,i,o,a;if(a=e.input.charCodeAt(e.position),a!==33)return!1;if(e.tag!==null&&j(e,"duplication of a tag property"),a=e.input.charCodeAt(++e.position),a===60?(n=!0,a=e.input.charCodeAt(++e.position)):a===33?(r=!0,i="!!",a=e.input.charCodeAt(++e.position)):i="!",t=e.position,n){do a=e.input.charCodeAt(++e.position);while(a!==0&&a!==62);e.position<e.length?(o=e.input.slice(t,e.position),a=e.input.charCodeAt(++e.position)):j(e,"unexpected end of the stream within a verbatim tag")}else{for(;a!==0&&!st(a);)a===33&&(r?j(e,"tag suffix cannot contain exclamation marks"):(i=e.input.slice(t-1,e.position+1),ju.test(i)||j(e,"named tag handle cannot contain such characters"),r=!0,t=e.position+1)),a=e.input.charCodeAt(++e.position);o=e.input.slice(t,e.position),Fh.test(o)&&j(e,"tag suffix cannot contain flow indicator characters")}o&&!qu.test(o)&&j(e,"tag name cannot contain such characters: "+o);try{o=decodeURIComponent(o)}catch(s){j(e,"tag name is malformed: "+o)}return n?e.tag=o:tn.call(e.tagMap,i)?e.tag=e.tagMap[i]+o:i==="!"?e.tag="!"+o:i==="!!"?e.tag="tag:yaml.org,2002:"+o:j(e,'undeclared tag handle "'+i+'"'),!0}function Wh(e){var t,n;if(n=e.input.charCodeAt(e.position),n!==38)return!1;for(e.anchor!==null&&j(e,"duplication of an anchor property"),n=e.input.charCodeAt(++e.position),t=e.position;n!==0&&!st(n)&&!tr(n);)n=e.input.charCodeAt(++e.position);return e.position===t&&j(e,"name of an anchor node must contain at least one character"),e.anchor=e.input.slice(t,e.position),!0}function Uh(e){var t,n,r;if(r=e.input.charCodeAt(e.position),r!==42)return!1;for(r=e.input.charCodeAt(++e.position),t=e.position;r!==0&&!st(r)&&!tr(r);)r=e.input.charCodeAt(++e.position);return e.position===t&&j(e,"name of an alias node must contain at least one character"),n=e.input.slice(t,e.position),tn.call(e.anchorMap,n)||j(e,'unidentified alias "'+n+'"'),e.result=e.anchorMap[n],Ce(e,!0,-1),!0}function rr(e,t,n,r,i){var o,a,s,l=1,u=!1,c=!1,p,m,f,d,h,g;if(e.listener!==null&&e.listener("open",e),e.tag=null,e.anchor=null,e.kind=null,e.result=null,o=a=s=uo===n||Yu===n,r&&Ce(e,!0,-1)&&(u=!0,e.lineIndent>t?l=1:e.lineIndent===t?l=0:e.lineIndent<t&&(l=-1)),l===1)for(;Kh(e)||Wh(e);)Ce(e,!0,-1)?(u=!0,s=o,e.lineIndent>t?l=1:e.lineIndent===t?l=0:e.lineIndent<t&&(l=-1)):s=!1;if(s&&(s=u||i),(l===1||uo===n)&&(lo===n||Hu===n?h=t:h=t+1,g=e.position-e.lineStart,l===1?s&&(Au(e,g)||Vh(e,g,h))||jh(e,h)?c=!0:(a&&qh(e,h)||Hh(e,h)||Yh(e,h)?c=!0:Uh(e)?(c=!0,(e.tag!==null||e.anchor!==null)&&j(e,"alias node should not have any properties")):$h(e,h,lo===n)&&(c=!0,e.tag===null&&(e.tag="?")),e.anchor!==null&&(e.anchorMap[e.anchor]=e.result)):l===0&&(c=s&&Au(e,g))),e.tag===null)e.anchor!==null&&(e.anchorMap[e.anchor]=e.result);else if(e.tag==="?"){for(e.result!==null&&e.kind!=="scalar"&&j(e,'unacceptable node kind for !<?> tag; it should be "scalar", not "'+e.kind+'"'),p=0,m=e.implicitTypes.length;p<m;p+=1)if(d=e.implicitTypes[p],d.resolve(e.result)){e.result=d.construct(e.result),e.tag=d.tag,e.anchor!==null&&(e.anchorMap[e.anchor]=e.result);break}}else if(e.tag!=="!"){if(tn.call(e.typeMap[e.kind||"fallback"],e.tag))d=e.typeMap[e.kind||"fallback"][e.tag];else for(d=null,f=e.typeMap.multi[e.kind||"fallback"],p=0,m=f.length;p<m;p+=1)if(e.tag.slice(0,f[p].tag.length)===f[p].tag){d=f[p];break}d||j(e,"unknown tag !<"+e.tag+">"),e.result!==null&&d.kind!==e.kind&&j(e,"unacceptable node kind for !<"+e.tag+'> tag; it should be "'+d.kind+'", not "'+e.kind+'"'),d.resolve(e.result,e.tag)?(e.result=d.construct(e.result,e.tag),e.anchor!==null&&(e.anchorMap[e.anchor]=e.result)):j(e,"cannot resolve a node with !<"+e.tag+"> explicit tag")}return e.listener!==null&&e.listener("close",e),e.tag!==null||e.anchor!==null||c}function Gh(e){var t=e.position,n,r,i,o=!1,a;for(e.version=null,e.checkLineBreaks=e.legacy,e.tagMap=Object.create(null),e.anchorMap=Object.create(null);(a=e.input.charCodeAt(e.position))!==0&&(Ce(e,!0,-1),a=e.input.charCodeAt(e.position),!(e.lineIndent>0||a!==37));){for(o=!0,a=e.input.charCodeAt(++e.position),n=e.position;a!==0&&!st(a);)a=e.input.charCodeAt(++e.position);for(r=e.input.slice(n,e.position),i=[],r.length<1&&j(e,"directive name must not be less than one character in length");a!==0;){for(;vn(a);)a=e.input.charCodeAt(++e.position);if(a===35){do a=e.input.charCodeAt(++e.position);while(a!==0&&!Mt(a));break}if(Mt(a))break;for(n=e.position;a!==0&&!st(a);)a=e.input.charCodeAt(++e.position);i.push(e.input.slice(n,e.position))}a!==0&&ts(e),tn.call(Tu,r)?Tu[r](e,r,i):co(e,'unknown document directive "'+r+'"')}if(Ce(e,!0,-1),e.lineIndent===0&&e.input.charCodeAt(e.position)===45&&e.input.charCodeAt(e.position+1)===45&&e.input.charCodeAt(e.position+2)===45?(e.position+=3,Ce(e,!0,-1)):o&&j(e,"directives end mark is expected"),rr(e,e.lineIndent-1,uo,!1,!0),Ce(e,!0,-1),e.checkLineBreaks&&Bh.test(e.input.slice(t,e.position))&&co(e,"non-ASCII line breaks are interpreted as content"),e.documents.push(e.result),e.position===e.lineStart&&fo(e)){e.input.charCodeAt(e.position)===46&&(e.position+=3,Ce(e,!0,-1));return}if(e.position<e.length-1)j(e,"end of the stream or a document separator is expected");else return}function Uu(e,t){e=String(e),t=t||{},e.length!==0&&(e.charCodeAt(e.length-1)!==10&&e.charCodeAt(e.length-1)!==13&&(e+=`
`),e.charCodeAt(0)===65279&&(e=e.slice(1)));var n=new zh(e,t),r=e.indexOf("\0");for(r!==-1&&(n.position=r,j(n,"null byte is not allowed in input")),n.input+="\0";n.input.charCodeAt(n.position)===32;)n.lineIndent+=1,n.position+=1;for(;n.position<n.length-1;)Gh(n);return n.documents}function Zh(e,t,n){t!==null&&typeof t=="object"&&typeof n=="undefined"&&(n=t,t=null);var r=Uu(e,n);if(typeof t!="function")return r;for(var i=0,o=r.length;i<o;i+=1)t(r[i])}function Qh(e,t){var n=Uu(e,t);if(n.length!==0){if(n.length===1)return n[0];throw new Je("expected a single document in the stream, but found more")}}var Xh=Zh,Jh=Qh,Gu={loadAll:Xh,load:Jh},Zu=Object.prototype.toString,Qu=Object.prototype.hasOwnProperty,rs=65279,eg=9,Fr=10,tg=13,ng=32,rg=33,ig=34,Za=35,og=37,ag=38,sg=39,lg=42,Xu=44,ug=45,po=58,cg=61,pg=62,mg=63,fg=64,Ju=91,ec=93,dg=96,tc=123,hg=124,nc=125,Ye={};Ye[0]="\\0";Ye[7]="\\a";Ye[8]="\\b";Ye[9]="\\t";Ye[10]="\\n";Ye[11]="\\v";Ye[12]="\\f";Ye[13]="\\r";Ye[27]="\\e";Ye[34]='\\"';Ye[92]="\\\\";Ye[133]="\\N";Ye[160]="\\_";Ye[8232]="\\L";Ye[8233]="\\P";var gg=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"],yg=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;function bg(e,t){var n,r,i,o,a,s,l;if(t===null)return{};for(n={},r=Object.keys(t),i=0,o=r.length;i<o;i+=1)a=r[i],s=String(t[a]),a.slice(0,2)==="!!"&&(a="tag:yaml.org,2002:"+a.slice(2)),l=e.compiledTypeMap.fallback[a],l&&Qu.call(l.styleAliases,s)&&(s=l.styleAliases[s]),n[a]=s;return n}function wg(e){var t,n,r;if(t=e.toString(16).toUpperCase(),e<=255)n="x",r=2;else if(e<=65535)n="u",r=4;else if(e<=4294967295)n="U",r=8;else throw new Je("code point within a string may not be greater than 0xFFFFFFFF");return"\\"+n+Ee.repeat("0",r-t.length)+t}var xg=1,Rr=2;function kg(e){this.schema=e.schema||$u,this.indent=Math.max(1,e.indent||2),this.noArrayIndent=e.noArrayIndent||!1,this.skipInvalid=e.skipInvalid||!1,this.flowLevel=Ee.isNothing(e.flowLevel)?-1:e.flowLevel,this.styleMap=bg(this.schema,e.styles||null),this.sortKeys=e.sortKeys||!1,this.lineWidth=e.lineWidth||80,this.noRefs=e.noRefs||!1,this.noCompatMode=e.noCompatMode||!1,this.condenseFlow=e.condenseFlow||!1,this.quotingType=e.quotingType==='"'?Rr:xg,this.forceQuotes=e.forceQuotes||!1,this.replacer=typeof e.replacer=="function"?e.replacer:null,this.implicitTypes=this.schema.compiledImplicit,this.explicitTypes=this.schema.compiledExplicit,this.tag=null,this.result="",this.duplicates=[],this.usedDuplicates=null}function Eu(e,t){for(var n=Ee.repeat(" ",t),r=0,i=-1,o="",a,s=e.length;r<s;)i=e.indexOf(`
`,r),i===-1?(a=e.slice(r),r=s):(a=e.slice(r,i+1),r=i+1),a.length&&a!==`
`&&(o+=n),o+=a;return o}function Qa(e,t){return`
`+Ee.repeat(" ",e.indent*t)}function vg(e,t){var n,r,i;for(n=0,r=e.implicitTypes.length;n<r;n+=1)if(i=e.implicitTypes[n],i.resolve(t))return!0;return!1}function mo(e){return e===ng||e===eg}function Dr(e){return 32<=e&&e<=126||161<=e&&e<=55295&&e!==8232&&e!==8233||57344<=e&&e<=65533&&e!==rs||65536<=e&&e<=1114111}function Lu(e){return Dr(e)&&e!==rs&&e!==tg&&e!==Fr}function _u(e,t,n){var r=Lu(e),i=r&&!mo(e);return(n?r:r&&e!==Xu&&e!==Ju&&e!==ec&&e!==tc&&e!==nc)&&e!==Za&&!(t===po&&!i)||Lu(t)&&!mo(t)&&e===Za||t===po&&i}function Sg(e){return Dr(e)&&e!==rs&&!mo(e)&&e!==ug&&e!==mg&&e!==po&&e!==Xu&&e!==Ju&&e!==ec&&e!==tc&&e!==nc&&e!==Za&&e!==ag&&e!==lg&&e!==rg&&e!==hg&&e!==cg&&e!==pg&&e!==sg&&e!==ig&&e!==og&&e!==fg&&e!==dg}function Og(e){return!mo(e)&&e!==po}function Mr(e,t){var n=e.charCodeAt(t),r;return n>=55296&&n<=56319&&t+1<e.length&&(r=e.charCodeAt(t+1),r>=56320&&r<=57343)?(n-55296)*1024+r-56320+65536:n}function rc(e){var t=/^\n* /;return t.test(e)}var ic=1,Xa=2,oc=3,ac=4,er=5;function Tg(e,t,n,r,i,o,a,s){var l,u=0,c=null,p=!1,m=!1,f=r!==-1,d=-1,h=Sg(Mr(e,0))&&Og(Mr(e,e.length-1));if(t||a)for(l=0;l<e.length;u>=65536?l+=2:l++){if(u=Mr(e,l),!Dr(u))return er;h=h&&_u(u,c,s),c=u}else{for(l=0;l<e.length;u>=65536?l+=2:l++){if(u=Mr(e,l),u===Fr)p=!0,f&&(m=m||l-d-1>r&&e[d+1]!==" ",d=l);else if(!Dr(u))return er;h=h&&_u(u,c,s),c=u}m=m||f&&l-d-1>r&&e[d+1]!==" "}return!p&&!m?h&&!a&&!i(e)?ic:o===Rr?er:Xa:n>9&&rc(e)?er:a?o===Rr?er:Xa:m?ac:oc}function Cg(e,t,n,r,i){e.dump=function(){if(t.length===0)return e.quotingType===Rr?'""':"''";if(!e.noCompatMode&&(gg.indexOf(t)!==-1||yg.test(t)))return e.quotingType===Rr?'"'+t+'"':"'"+t+"'";var o=e.indent*Math.max(1,n),a=e.lineWidth===-1?-1:Math.max(Math.min(e.lineWidth,40),e.lineWidth-o),s=r||e.flowLevel>-1&&n>=e.flowLevel;function l(u){return vg(e,u)}switch(Tg(t,s,e.indent,a,l,e.quotingType,e.forceQuotes&&!r,i)){case ic:return t;case Xa:return"'"+t.replace(/'/g,"''")+"'";case oc:return"|"+Iu(t,e.indent)+Mu(Eu(t,o));case ac:return">"+Iu(t,e.indent)+Mu(Eu(Ag(t,a),o));case er:return'"'+Eg(t)+'"';default:throw new Je("impossible error: invalid scalar style")}}()}function Iu(e,t){var n=rc(e)?String(t):"",r=e[e.length-1]===`
`,i=r&&(e[e.length-2]===`
`||e===`
`),o=i?"+":r?"":"-";return n+o+`
`}function Mu(e){return e[e.length-1]===`
`?e.slice(0,-1):e}function Ag(e,t){for(var n=/(\n+)([^\n]*)/g,r=function(){var u=e.indexOf(`
`);return u=u!==-1?u:e.length,n.lastIndex=u,Bu(e.slice(0,u),t)}(),i=e[0]===`
`||e[0]===" ",o,a;a=n.exec(e);){var s=a[1],l=a[2];o=l[0]===" ",r+=s+(!i&&!o&&l!==""?`
`:"")+Bu(l,t),i=o}return r}function Bu(e,t){if(e===""||e[0]===" ")return e;for(var n=/ [^ ]/g,r,i=0,o,a=0,s=0,l="";r=n.exec(e);)s=r.index,s-i>t&&(o=a>i?a:s,l+=`
`+e.slice(i,o),i=o+1),a=s;return l+=`
`,e.length-i>t&&a>i?l+=e.slice(i,a)+`
`+e.slice(a+1):l+=e.slice(i),l.slice(1)}function Eg(e){for(var t="",n=0,r,i=0;i<e.length;n>=65536?i+=2:i++)n=Mr(e,i),r=Ye[n],!r&&Dr(n)?(t+=e[i],n>=65536&&(t+=e[i+1])):t+=r||wg(n);return t}function Lg(e,t,n){var r="",i=e.tag,o,a,s;for(o=0,a=n.length;o<a;o+=1)s=n[o],e.replacer&&(s=e.replacer.call(n,String(o),s)),(Yt(e,t,s,!1,!1)||typeof s=="undefined"&&Yt(e,t,null,!1,!1))&&(r!==""&&(r+=","+(e.condenseFlow?"":" ")),r+=e.dump);e.tag=i,e.dump="["+r+"]"}function Fu(e,t,n,r){var i="",o=e.tag,a,s,l;for(a=0,s=n.length;a<s;a+=1)l=n[a],e.replacer&&(l=e.replacer.call(n,String(a),l)),(Yt(e,t+1,l,!0,!0,!1,!0)||typeof l=="undefined"&&Yt(e,t+1,null,!0,!0,!1,!0))&&((!r||i!=="")&&(i+=Qa(e,t)),e.dump&&Fr===e.dump.charCodeAt(0)?i+="-":i+="- ",i+=e.dump);e.tag=o,e.dump=i||"[]"}function _g(e,t,n){var r="",i=e.tag,o=Object.keys(n),a,s,l,u,c;for(a=0,s=o.length;a<s;a+=1)c="",r!==""&&(c+=", "),e.condenseFlow&&(c+='"'),l=o[a],u=n[l],e.replacer&&(u=e.replacer.call(n,l,u)),Yt(e,t,l,!1,!1)&&(e.dump.length>1024&&(c+="? "),c+=e.dump+(e.condenseFlow?'"':"")+":"+(e.condenseFlow?"":" "),Yt(e,t,u,!1,!1)&&(c+=e.dump,r+=c));e.tag=i,e.dump="{"+r+"}"}function Ig(e,t,n,r){var i="",o=e.tag,a=Object.keys(n),s,l,u,c,p,m;if(e.sortKeys===!0)a.sort();else if(typeof e.sortKeys=="function")a.sort(e.sortKeys);else if(e.sortKeys)throw new Je("sortKeys must be a boolean or a function");for(s=0,l=a.length;s<l;s+=1)m="",(!r||i!=="")&&(m+=Qa(e,t)),u=a[s],c=n[u],e.replacer&&(c=e.replacer.call(n,u,c)),Yt(e,t+1,u,!0,!0,!0)&&(p=e.tag!==null&&e.tag!=="?"||e.dump&&e.dump.length>1024,p&&(e.dump&&Fr===e.dump.charCodeAt(0)?m+="?":m+="? "),m+=e.dump,p&&(m+=Qa(e,t)),Yt(e,t+1,c,!0,p)&&(e.dump&&Fr===e.dump.charCodeAt(0)?m+=":":m+=": ",m+=e.dump,i+=m));e.tag=o,e.dump=i||"{}"}function Ru(e,t,n){var r,i,o,a,s,l;for(i=n?e.explicitTypes:e.implicitTypes,o=0,a=i.length;o<a;o+=1)if(s=i[o],(s.instanceOf||s.predicate)&&(!s.instanceOf||typeof t=="object"&&t instanceof s.instanceOf)&&(!s.predicate||s.predicate(t))){if(n?s.multi&&s.representName?e.tag=s.representName(t):e.tag=s.tag:e.tag="?",s.represent){if(l=e.styleMap[s.tag]||s.defaultStyle,Zu.call(s.represent)==="[object Function]")r=s.represent(t,l);else if(Qu.call(s.represent,l))r=s.represent[l](t,l);else throw new Je("!<"+s.tag+'> tag resolver accepts not "'+l+'" style');e.dump=r}return!0}return!1}function Yt(e,t,n,r,i,o,a){e.tag=null,e.dump=n,Ru(e,n,!1)||Ru(e,n,!0);var s=Zu.call(e.dump),l=r,u;r&&(r=e.flowLevel<0||e.flowLevel>t);var c=s==="[object Object]"||s==="[object Array]",p,m;if(c&&(p=e.duplicates.indexOf(n),m=p!==-1),(e.tag!==null&&e.tag!=="?"||m||e.indent!==2&&t>0)&&(i=!1),m&&e.usedDuplicates[p])e.dump="*ref_"+p;else{if(c&&m&&!e.usedDuplicates[p]&&(e.usedDuplicates[p]=!0),s==="[object Object]")r&&Object.keys(e.dump).length!==0?(Ig(e,t,e.dump,i),m&&(e.dump="&ref_"+p+e.dump)):(_g(e,t,e.dump),m&&(e.dump="&ref_"+p+" "+e.dump));else if(s==="[object Array]")r&&e.dump.length!==0?(e.noArrayIndent&&!a&&t>0?Fu(e,t-1,e.dump,i):Fu(e,t,e.dump,i),m&&(e.dump="&ref_"+p+e.dump)):(Lg(e,t,e.dump),m&&(e.dump="&ref_"+p+" "+e.dump));else if(s==="[object String]")e.tag!=="?"&&Cg(e,e.dump,t,o,l);else{if(s==="[object Undefined]")return!1;if(e.skipInvalid)return!1;throw new Je("unacceptable kind of an object to dump "+s)}e.tag!==null&&e.tag!=="?"&&(u=encodeURI(e.tag[0]==="!"?e.tag.slice(1):e.tag).replace(/!/g,"%21"),e.tag[0]==="!"?u="!"+u:u.slice(0,18)==="tag:yaml.org,2002:"?u="!!"+u.slice(18):u="!<"+u+">",e.dump=u+" "+e.dump)}return!0}function Mg(e,t){var n=[],r=[],i,o;for(Ja(e,n,r),i=0,o=r.length;i<o;i+=1)t.duplicates.push(n[r[i]]);t.usedDuplicates=new Array(o)}function Ja(e,t,n){var r,i,o;if(e!==null&&typeof e=="object")if(i=t.indexOf(e),i!==-1)n.indexOf(i)===-1&&n.push(i);else if(t.push(e),Array.isArray(e))for(i=0,o=e.length;i<o;i+=1)Ja(e[i],t,n);else for(r=Object.keys(e),i=0,o=r.length;i<o;i+=1)Ja(e[r[i]],t,n)}function Bg(e,t){t=t||{};var n=new kg(t);n.noRefs||Mg(e,n);var r=e;return n.replacer&&(r=n.replacer.call({"":r},"",r)),Yt(n,0,r,!0,!0)?n.dump+`
`:""}var Fg=Bg,Rg={dump:Fg};function is(e,t){return function(){throw new Error("Function yaml."+e+" is removed in js-yaml 4. Use yaml."+t+" instead, which is now safe by default.")}}var sc=Gu.load,wx=Gu.loadAll,lc=Rg.dump,uc=Je;var xx=is("safeLoad","load"),kx=is("safeLoadAll","loadAll"),vx=is("safeDump","dump");var ir=/^(\s*)(#+)(\s+)(.*)$/,cc=`^XXX\\.*?
(?:((?:.|
)*?)
)?XXX(?=\\s|$)$`,Ie=/^---\n((?:(((?!---)(?:.|\n)*?)\n)?))---(?=\n|$)/,Dg=cc.replaceAll("X","`"),Pg=cc.replaceAll("X","~"),Ng=`^(( |( {4})).*
)+`,Ox=new RegExp(`${Dg}|${Pg}|${Ng}`,"gm"),os=/(!?)(\[{2}[^[\n\]]*\]{2})/g,ho=/^!?\[.*\](.*)$/,Pr=/(?:\s|^)#[^\s#]{1,}/g,pc=/^%%\n[^%]*\n%%/gm,as=/[,\s]+/;function je(e){return e.replace(/\$/g,"$$$$")}function mc(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function fc(e){let t=e.match(os);if(t){for(let n of t)if(n.includes("|")){let r=n.indexOf("|"),i=n.substring(0,r+1)+n.substring(r+1,n.length-2).trim()+"]]";e=e.replace(n,i)}}return e}var nn="tags",mt="aliases",Nr="linter-yaml-title-alias";function Bt(e){return e.match(Ie)===null&&(e=`---
---
`+e),e}function qe(e,t){if(!e.match(Ie))return e;let n=e.match(Ie)[0],r=t(n);return e=e.replace(n,je(r)),e}function go(e){return lc(e,{lineWidth:-1}).slice(0,-1)}function ls(e){return new RegExp(`^([\\t ]*)${e}:[ \\t]*(\\S.*|(?:(?:\\n *- \\S.*)|((?:\\n *- *))*|(\\n([ \\t]+[^\\n]*))*)*)\\n`,"m")}function Me(e,t,n){let r=`${t}:${n}
`,i=!1,o=e.replace(ls(t),(a,s)=>(i=!0,s+r));return i||(o=`${e}${r}`),o}function Be(e,t){let n=e.match(ls(t));return n==null?null:n[2]}function Sn(e,t){return e.replace(ls(t),"")}function ht(e){if(e==null)return null;let t=sc(e.replace(/\n(\t)+/g,`
`));return t==null?{}:t}function ft(e,t){switch(typeof e=="string"&&(e=[e]),t){case"single-line":return e==null||e.length===0?" []":" "+ss(e);case"multi-line":return e==null||e.length===0?`
- `:`
- `+e.join(`
- `);case"single string to single-line":return e==null||e.length===0?" ":e.length===1?" "+e[0]:" "+ss(e);case"single string to multi-line":return e==null||e.length===0?" ":e.length===1?" "+e[0]:`
- `+e.join(`
- `);case"single string space delimited":return e==null||e.length===0?" ":e.length===1?" "+e[0]:" "+e.join(" ");case"single string comma delimited":return e==null||e.length===0?" ":e.length===1?" "+e[0]:" "+e.join(", ");case"single-line space delimited":return e==null||e.length===0?" []":e.length===1?" "+e[0]:" "+ss(e).replaceAll(", "," ")}}function ss(e){return e==null||e.length===0?"[]":"["+e.join(", ")+"]"}function Ft(e){if(e==null||e.length===0)return null;if(e=e.trimEnd(),e.startsWith("[")){if(e=e.substring(1),e.endsWith("]")&&(e=e.substring(0,e.length-1)),e.length===0)return null;let t=e.split(", ");return t=t.length>1?t:t[0].split(","),t.filter(n=>n!="")}if(e.includes(`
`)){let t=e.split(/[ \t]*\n[ \t]*-[ \t]*/);return t.splice(0,1),t=t.filter(n=>n!=""),t==null||t.length===0?null:t}return e}function yo(e){return typeof e=="string"?e.includes(",")?e.split(", "):e.split(" "):e}function bo(e){return typeof e=="string"?e.split(", "):e}var dr=require("obsidian");var jt=function(e){if(e==null)return Yg;if(typeof e=="string")return Hg(e);if(typeof e=="object")return Array.isArray(e)?zg(e):$g(e);if(typeof e=="function")return wo(e);throw new Error("Expected function, string, or object as test")};function zg(e){let t=[],n=-1;for(;++n<e.length;)t[n]=jt(e[n]);return wo(r);function r(...i){let o=-1;for(;++o<t.length;)if(t[o].call(this,...i))return!0;return!1}}function $g(e){return wo(t);function t(n){let r;for(r in e)if(n[r]!==e[r])return!1;return!0}}function Hg(e){return wo(t);function t(n){return n&&n.type===e}}function wo(e){return t;function t(...n){return Boolean(e.call(this,...n))}}function Yg(){return!0}var dc=!0,hc="skip",zr=!1,xo=function(e,t,n,r){typeof t=="function"&&typeof n!="function"&&(r=n,n=t,t=null);let i=jt(t),o=r?-1:1;a(e,null,[])();function a(s,l,u){let c=typeof s=="object"&&s!==null?s:{},p;return typeof c.type=="string"&&(p=typeof c.tagName=="string"?c.tagName:typeof c.name=="string"?c.name:void 0,Object.defineProperty(m,"name",{value:"node ("+(c.type+(p?"<"+p+">":""))+")"})),m;function m(){let f=[],d,h,g;if((!t||i(s,l,u[u.length-1]||null))&&(f=jg(n(s,u)),f[0]===zr))return f;if(s.children&&f[0]!==hc)for(h=(r?s.children.length:-1)+o,g=u.concat(s);h>-1&&h<s.children.length;){if(d=a(s.children[h],h,g)(),d[0]===zr)return d;h=typeof d[1]=="number"?d[1]:h+o}return f}}};function jg(e){return Array.isArray(e)?e:typeof e=="number"?[dc,e]:[e]}var rn=function(e,t,n,r){typeof t=="function"&&typeof n!="function"&&(r=n,n=t,t=null),xo(e,t,i,r);function i(o,a){let s=a[a.length-1];return n(o,s?s.children.indexOf(o):null,s)}};function On(e,t,n){return e.substring(0,t)+n+e.substring(t)}function Ve(e,t,n,r){return e.substring(0,t)+r+e.substring(n)}function gc(e){return e.replace(/\r/g,"")}function on(e,t,n){return n?e==t:t.match(new RegExp("^"+mc(e)+"( |\\t)*$","m"))!=null}function ko(e,t,n,r=!1){var u;let i=e.substring(t,n),o="",a=!0,s=e.substring(0,t);if(s.length>0){let c=s.split(`
`);o=(u=c[c.length-1])!=null?u:"",a=o.trim()=="",a||(o=o.trimEnd());let p=0;for(;c.length-(2+p)>=0;){let m=c[c.length-(2+p)];if(!on(o,m,a)&&(!r||!on("",m,!0)))break;p++}c.splice(c.length-(1+p),p),c.length>1&&(r&&c[c.length-2].match(/^> ?.*$/m)||!r&&!on(o,c[c.length-2],a)?c.splice(c.length-1,0,o):on("",c[c.length-2],!0)||c.splice(c.length-1,0,"")),s=c.join(`
`)}let l=e.substring(n);if(l.length>0){let c=l.split(`
`),p=0;for(;p+1<c.length;){let m=c[1+p];if(!on(o,m,a)&&(!r||!on("",m,!0)))break;p++}c.splice(1,p),c.length>1&&(r&&c[1].match(/^> ?.*$/m)||!r&&!on(o,c[1],a)?c.splice(1,0,o):r&&!on("",c[1],a)&&c.splice(1,0,"")),l=c.join(`
`)}return s+i+l}function us(e){if(e)throw e}var Pc=Xn(cs(),1),bs=Xn(Cc(),1);function $r(e){if(Object.prototype.toString.call(e)!=="[object Object]")return!1;let t=Object.getPrototypeOf(e);return t===null||t===Object.prototype}function Ac(){let e=[],t={run:n,use:r};return t;function n(...i){let o=-1,a=i.pop();if(typeof a!="function")throw new TypeError("Expected function as last argument, not "+a);s(null,...i);function s(l,...u){let c=e[++o],p=-1;if(l){a(l);return}for(;++p<i.length;)(u[p]===null||u[p]===void 0)&&(u[p]=i[p]);i=u,c?qg(c,s)(...u):a(null,...u)}}function r(i){if(typeof i!="function")throw new TypeError("Expected `middelware` to be a function, not "+i);return e.push(i),t}}function qg(e,t){let n;return r;function r(...a){let s=e.length>a.length,l;s&&a.push(i);try{l=e(...a)}catch(u){let c=u;if(s&&n)throw c;return i(c)}s||(l instanceof Promise?l.then(o,i):l instanceof Error?i(l):o(l))}function i(a,...s){n||(n=!0,t(a,...s))}function o(a){i(null,a)}}var Bc=Xn(cs(),1);var or={}.hasOwnProperty;function Tn(e){return!e||typeof e!="object"?"":or.call(e,"position")||or.call(e,"type")?Ec(e.position):or.call(e,"start")||or.call(e,"end")?Ec(e):or.call(e,"line")||or.call(e,"column")?ps(e):""}function ps(e){return Lc(e&&e.line)+":"+Lc(e&&e.column)}function Ec(e){return ps(e&&e.start)+"-"+ps(e&&e.end)}function Lc(e){return e&&typeof e=="number"?e:1}var et=class extends Error{constructor(t,n,r){var i=[null,null],o={start:{line:null,column:null},end:{line:null,column:null}},a;super(),typeof n=="string"&&(r=n,n=null),typeof r=="string"&&(a=r.indexOf(":"),a===-1?i[1]=r:(i[0]=r.slice(0,a),i[1]=r.slice(a+1))),n&&("type"in n||"position"in n?n.position&&(o=n.position):"start"in n||"end"in n?o=n:("line"in n||"column"in n)&&(o.start=n)),this.name=Tn(n)||"1:1",this.message=typeof t=="object"?t.message:t,this.stack=typeof t=="object"?t.stack:"",this.reason=this.message,this.line=o.start.line,this.column=o.start.column,this.source=i[0],this.ruleId=i[1],this.position=o,this.file,this.fatal,this.url,this.note}};et.prototype.file="";et.prototype.name="";et.prototype.reason="";et.prototype.message="";et.prototype.stack="";et.prototype.fatal=null;et.prototype.column=null;et.prototype.line=null;et.prototype.source=null;et.prototype.ruleId=null;et.prototype.position=null;var Tt={basename:Vg,dirname:Kg,extname:Wg,join:Ug,sep:"/"};function Vg(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');Hr(e);let n=0,r=-1,i=e.length,o;if(t===void 0||t.length===0||t.length>e.length){for(;i--;)if(e.charCodeAt(i)===47){if(o){n=i+1;break}}else r<0&&(o=!0,r=i+1);return r<0?"":e.slice(n,r)}if(t===e)return"";let a=-1,s=t.length-1;for(;i--;)if(e.charCodeAt(i)===47){if(o){n=i+1;break}}else a<0&&(o=!0,a=i+1),s>-1&&(e.charCodeAt(i)===t.charCodeAt(s--)?s<0&&(r=i):(s=-1,r=a));return n===r?r=a:r<0&&(r=e.length),e.slice(n,r)}function Kg(e){if(Hr(e),e.length===0)return".";let t=-1,n=e.length,r;for(;--n;)if(e.charCodeAt(n)===47){if(r){t=n;break}}else r||(r=!0);return t<0?e.charCodeAt(0)===47?"/":".":t===1&&e.charCodeAt(0)===47?"//":e.slice(0,t)}function Wg(e){Hr(e);let t=e.length,n=-1,r=0,i=-1,o=0,a;for(;t--;){let s=e.charCodeAt(t);if(s===47){if(a){r=t+1;break}continue}n<0&&(a=!0,n=t+1),s===46?i<0?i=t:o!==1&&(o=1):i>-1&&(o=-1)}return i<0||n<0||o===0||o===1&&i===n-1&&i===r+1?"":e.slice(i,n)}function Ug(...e){let t=-1,n;for(;++t<e.length;)Hr(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":Gg(n)}function Gg(e){Hr(e);let t=e.charCodeAt(0)===47,n=Zg(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.charCodeAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function Zg(e,t){let n="",r=0,i=-1,o=0,a=-1,s,l;for(;++a<=e.length;){if(a<e.length)s=e.charCodeAt(a);else{if(s===47)break;s=47}if(s===47){if(!(i===a-1||o===1))if(i!==a-1&&o===2){if(n.length<2||r!==2||n.charCodeAt(n.length-1)!==46||n.charCodeAt(n.length-2)!==46){if(n.length>2){if(l=n.lastIndexOf("/"),l!==n.length-1){l<0?(n="",r=0):(n=n.slice(0,l),r=n.length-1-n.lastIndexOf("/")),i=a,o=0;continue}}else if(n.length>0){n="",r=0,i=a,o=0;continue}}t&&(n=n.length>0?n+"/..":"..",r=2)}else n.length>0?n+="/"+e.slice(i+1,a):n=e.slice(i+1,a),r=a-i-1;i=a,o=0}else s===46&&o>-1?o++:o=-1}return n}function Hr(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}var _c={cwd:Qg};function Qg(){return"/"}function Yr(e){return e!==null&&typeof e=="object"&&e.href&&e.origin}function Ic(e){if(typeof e=="string")e=new URL(e);else if(!Yr(e)){let t=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code="ERR_INVALID_ARG_TYPE",t}if(e.protocol!=="file:"){let t=new TypeError("The URL must be of scheme file");throw t.code="ERR_INVALID_URL_SCHEME",t}return Xg(e)}function Xg(e){if(e.hostname!==""){let r=new TypeError('File URL host must be "localhost" or empty on darwin');throw r.code="ERR_INVALID_FILE_URL_HOST",r}let t=e.pathname,n=-1;for(;++n<t.length;)if(t.charCodeAt(n)===37&&t.charCodeAt(n+1)===50){let r=t.charCodeAt(n+2);if(r===70||r===102){let i=new TypeError("File URL path must not include encoded / characters");throw i.code="ERR_INVALID_FILE_URL_PATH",i}}return decodeURIComponent(t)}var ms=["history","path","basename","stem","extname","dirname"],jr=class{constructor(t){let n;t?typeof t=="string"||(0,Bc.default)(t)?n={value:t}:Yr(t)?n={path:t}:n=t:n={},this.data={},this.messages=[],this.history=[],this.cwd=_c.cwd(),this.value,this.stored,this.result,this.map;let r=-1;for(;++r<ms.length;){let o=ms[r];o in n&&n[o]!==void 0&&(this[o]=o==="history"?[...n[o]]:n[o])}let i;for(i in n)ms.includes(i)||(this[i]=n[i])}get path(){return this.history[this.history.length-1]}set path(t){Yr(t)&&(t=Ic(t)),ds(t,"path"),this.path!==t&&this.history.push(t)}get dirname(){return typeof this.path=="string"?Tt.dirname(this.path):void 0}set dirname(t){Mc(this.basename,"dirname"),this.path=Tt.join(t||"",this.basename)}get basename(){return typeof this.path=="string"?Tt.basename(this.path):void 0}set basename(t){ds(t,"basename"),fs(t,"basename"),this.path=Tt.join(this.dirname||"",t)}get extname(){return typeof this.path=="string"?Tt.extname(this.path):void 0}set extname(t){if(fs(t,"extname"),Mc(this.dirname,"extname"),t){if(t.charCodeAt(0)!==46)throw new Error("`extname` must start with `.`");if(t.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=Tt.join(this.dirname,this.stem+(t||""))}get stem(){return typeof this.path=="string"?Tt.basename(this.path,this.extname):void 0}set stem(t){ds(t,"stem"),fs(t,"stem"),this.path=Tt.join(this.dirname||"",t+(this.extname||""))}toString(t){return(this.value||"").toString(t)}message(t,n,r){let i=new et(t,n,r);return this.path&&(i.name=this.path+":"+i.name,i.file=this.path),i.fatal=!1,this.messages.push(i),i}info(t,n,r){let i=this.message(t,n,r);return i.fatal=null,i}fail(t,n,r){let i=this.message(t,n,r);throw i.fatal=!0,i}};function fs(e,t){if(e&&e.includes(Tt.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+Tt.sep+"`")}function ds(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function Mc(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}var ws=zc().freeze(),Nc={}.hasOwnProperty;function zc(){let e=Ac(),t=[],n={},r,i=-1;return o.data=a,o.Parser=void 0,o.Compiler=void 0,o.freeze=s,o.attachers=t,o.use=l,o.parse=u,o.stringify=c,o.run=p,o.runSync=m,o.process=f,o.processSync=d,o;function o(){let h=zc(),g=-1;for(;++g<t.length;)h.use(...t[g]);return h.data((0,bs.default)(!0,{},n)),h}function a(h,g){return typeof h=="string"?arguments.length===2?(ys("data",r),n[h]=g,o):Nc.call(n,h)&&n[h]||null:h?(ys("data",r),n=h,o):n}function s(){if(r)return o;for(;++i<t.length;){let[h,...g]=t[i];if(g[0]===!1)continue;g[0]===!0&&(g[0]=void 0);let b=h.call(o,...g);typeof b=="function"&&e.use(b)}return r=!0,i=Number.POSITIVE_INFINITY,o}function l(h,...g){let b;if(ys("use",r),h!=null)if(typeof h=="function")I(h,...g);else if(typeof h=="object")Array.isArray(h)?E(h):S(h);else throw new TypeError("Expected usable value, not `"+h+"`");return b&&(n.settings=Object.assign(n.settings||{},b)),o;function O(k){if(typeof k=="function")I(k);else if(typeof k=="object")if(Array.isArray(k)){let[_,...M]=k;I(_,...M)}else S(k);else throw new TypeError("Expected usable value, not `"+k+"`")}function S(k){E(k.plugins),k.settings&&(b=Object.assign(b||{},k.settings))}function E(k){let _=-1;if(k!=null)if(Array.isArray(k))for(;++_<k.length;){let M=k[_];O(M)}else throw new TypeError("Expected a list of plugins, not `"+k+"`")}function I(k,_){let M=-1,z;for(;++M<t.length;)if(t[M][0]===k){z=t[M];break}z?($r(z[1])&&$r(_)&&(_=(0,bs.default)(!0,z[1],_)),z[1]=_):t.push([...arguments])}}function u(h){o.freeze();let g=qr(h),b=o.Parser;return hs("parse",b),Fc(b,"parse")?new b(String(g),g).parse():b(String(g),g)}function c(h,g){o.freeze();let b=qr(g),O=o.Compiler;return gs("stringify",O),Rc(h),Fc(O,"compile")?new O(h,b).compile():O(h,b)}function p(h,g,b){if(Rc(h),o.freeze(),!b&&typeof g=="function"&&(b=g,g=void 0),!b)return new Promise(O);O(null,b);function O(S,E){e.run(h,qr(g),I);function I(k,_,M){_=_||h,k?E(k):S?S(_):b(null,_,M)}}}function m(h,g){let b,O;return o.run(h,g,S),Dc("runSync","run",O),b;function S(E,I){us(E),b=I,O=!0}}function f(h,g){if(o.freeze(),hs("process",o.Parser),gs("process",o.Compiler),!g)return new Promise(b);b(null,g);function b(O,S){let E=qr(h);o.run(o.parse(E),E,(k,_,M)=>{if(k||!_||!M)I(k);else{let z=o.stringify(_,M);z==null||(t1(z)?M.value=z:M.result=z),I(k,M)}});function I(k,_){k||!_?S(k):O?O(_):g(null,_)}}}function d(h){let g;o.freeze(),hs("processSync",o.Parser),gs("processSync",o.Compiler);let b=qr(h);return o.process(b,O),Dc("processSync","process",g),b;function O(S){g=!0,us(S)}}}function Fc(e,t){return typeof e=="function"&&e.prototype&&(Jg(e.prototype)||t in e.prototype)}function Jg(e){let t;for(t in e)if(Nc.call(e,t))return!0;return!1}function hs(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `Parser`")}function gs(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `Compiler`")}function ys(e,t){if(t)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function Rc(e){if(!$r(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function Dc(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function qr(e){return e1(e)?e:new jr(e)}function e1(e){return Boolean(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function t1(e){return typeof e=="string"||(0,Pc.default)(e)}function ar(e,t){var{includeImageAlt:n=!0}=t||{};return Hc(e,n)}function Hc(e,t){return e&&typeof e=="object"&&(e.value||(t?e.alt:"")||"children"in e&&$c(e.children,t)||Array.isArray(e)&&$c(e,t))||""}function $c(e,t){for(var n=[],r=-1;++r<e.length;)n[r]=Hc(e[r],t);return n.join("")}function ve(e,t,n,r){let i=e.length,o=0,a;if(t<0?t=-t>i?0:i+t:t=t>i?i:t,n=n>0?n:0,r.length<1e4)a=Array.from(r),a.unshift(t,n),[].splice.apply(e,a);else for(n&&[].splice.apply(e,[t,n]);o<r.length;)a=r.slice(o,o+1e4),a.unshift(t,0),[].splice.apply(e,a),o+=1e4,t+=1e4}function tt(e,t){return e.length>0?(ve(e,e.length,0,t),e):t}var Yc={}.hasOwnProperty;function So(e){let t={},n=-1;for(;++n<e.length;)n1(t,e[n]);return t}function n1(e,t){let n;for(n in t){let i=(Yc.call(e,n)?e[n]:void 0)||(e[n]={}),o=t[n],a;for(a in o){Yc.call(i,a)||(i[a]=[]);let s=o[a];r1(i[a],Array.isArray(s)?s:s?[s]:[])}}}function r1(e,t){let n=-1,r=[];for(;++n<t.length;)(t[n].add==="after"?e:r).push(t[n]);ve(e,0,0,r)}var jc=/[!-/:-@[-`{-~\u00A1\u00A7\u00AB\u00B6\u00B7\u00BB\u00BF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061E\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u09FD\u0A76\u0AF0\u0C77\u0C84\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E4F\u2E52\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]/;var Ke=sn(/[A-Za-z]/),Cn=sn(/\d/),qc=sn(/[\dA-Fa-f]/),Se=sn(/[\dA-Za-z]/),Vc=sn(/[!-/:-@[-`{-~]/),xs=sn(/[#-'*+\--9=?A-Z^-~]/);function an(e){return e!==null&&(e<32||e===127)}function J(e){return e!==null&&(e<0||e===32)}function D(e){return e!==null&&e<-2}function Q(e){return e===-2||e===-1||e===32}var An=sn(/\s/),En=sn(jc);function sn(e){return t;function t(n){return n!==null&&e.test(String.fromCharCode(n))}}function Y(e,t,n,r){let i=r?r-1:Number.POSITIVE_INFINITY,o=0;return a;function a(l){return Q(l)?(e.enter(n),s(l)):t(l)}function s(l){return Q(l)&&o++<i?(e.consume(l),s):(e.exit(n),t(l))}}var Kc={tokenize:i1};function i1(e){let t=e.attempt(this.parser.constructs.contentInitial,r,i),n;return t;function r(s){if(s===null){e.consume(s);return}return e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),Y(e,t,"linePrefix")}function i(s){return e.enter("paragraph"),o(s)}function o(s){let l=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=l),n=l,a(s)}function a(s){if(s===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(s);return}return D(s)?(e.consume(s),e.exit("chunkText"),o):(e.consume(s),a)}}var Uc={tokenize:o1},Wc={tokenize:a1};function o1(e){let t=this,n=[],r=0,i,o,a;return s;function s(S){if(r<n.length){let E=n[r];return t.containerState=E[1],e.attempt(E[0].continuation,l,u)(S)}return u(S)}function l(S){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,i&&O();let E=t.events.length,I=E,k;for(;I--;)if(t.events[I][0]==="exit"&&t.events[I][1].type==="chunkFlow"){k=t.events[I][1].end;break}b(r);let _=E;for(;_<t.events.length;)t.events[_][1].end=Object.assign({},k),_++;return ve(t.events,I+1,0,t.events.slice(E)),t.events.length=_,u(S)}return s(S)}function u(S){if(r===n.length){if(!i)return m(S);if(i.currentConstruct&&i.currentConstruct.concrete)return d(S);t.interrupt=Boolean(i.currentConstruct)}return t.containerState={},e.check(Wc,c,p)(S)}function c(S){return i&&O(),b(r),m(S)}function p(S){return t.parser.lazy[t.now().line]=r!==n.length,a=t.now().offset,d(S)}function m(S){return t.containerState={},e.attempt(Wc,f,d)(S)}function f(S){return r++,n.push([t.currentConstruct,t.containerState]),m(S)}function d(S){if(S===null){i&&O(),b(0),e.consume(S);return}return i=i||t.parser.flow(t.now()),e.enter("chunkFlow",{contentType:"flow",previous:o,_tokenizer:i}),h(S)}function h(S){if(S===null){g(e.exit("chunkFlow"),!0),b(0),e.consume(S);return}return D(S)?(e.consume(S),g(e.exit("chunkFlow")),r=0,t.interrupt=void 0,s):(e.consume(S),h)}function g(S,E){let I=t.sliceStream(S);if(E&&I.push(null),S.previous=o,o&&(o.next=S),o=S,i.defineSkip(S.start),i.write(I),t.parser.lazy[S.start.line]){let k=i.events.length;for(;k--;)if(i.events[k][1].start.offset<a&&(!i.events[k][1].end||i.events[k][1].end.offset>a))return;let _=t.events.length,M=_,z,q;for(;M--;)if(t.events[M][0]==="exit"&&t.events[M][1].type==="chunkFlow"){if(z){q=t.events[M][1].end;break}z=!0}for(b(r),k=_;k<t.events.length;)t.events[k][1].end=Object.assign({},q),k++;ve(t.events,M+1,0,t.events.slice(_)),t.events.length=k}}function b(S){let E=n.length;for(;E-- >S;){let I=n[E];t.containerState=I[1],I[0].exit.call(t,e)}n.length=S}function O(){i.write([null]),o=void 0,i=void 0,t.containerState._closeFlow=void 0}}function a1(e,t,n){return Y(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function sr(e){if(e===null||J(e)||An(e))return 1;if(En(e))return 2}function ln(e,t,n){let r=[],i=-1;for(;++i<e.length;){let o=e[i].resolveAll;o&&!r.includes(o)&&(t=o(t,n),r.push(o))}return t}var Vr={name:"attention",tokenize:l1,resolveAll:s1};function s1(e,t){let n=-1,r,i,o,a,s,l,u,c;for(;++n<e.length;)if(e[n][0]==="enter"&&e[n][1].type==="attentionSequence"&&e[n][1]._close){for(r=n;r--;)if(e[r][0]==="exit"&&e[r][1].type==="attentionSequence"&&e[r][1]._open&&t.sliceSerialize(e[r][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[r][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[r][1].end.offset-e[r][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;l=e[r][1].end.offset-e[r][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;let p=Object.assign({},e[r][1].end),m=Object.assign({},e[n][1].start);Gc(p,-l),Gc(m,l),a={type:l>1?"strongSequence":"emphasisSequence",start:p,end:Object.assign({},e[r][1].end)},s={type:l>1?"strongSequence":"emphasisSequence",start:Object.assign({},e[n][1].start),end:m},o={type:l>1?"strongText":"emphasisText",start:Object.assign({},e[r][1].end),end:Object.assign({},e[n][1].start)},i={type:l>1?"strong":"emphasis",start:Object.assign({},a.start),end:Object.assign({},s.end)},e[r][1].end=Object.assign({},a.start),e[n][1].start=Object.assign({},s.end),u=[],e[r][1].end.offset-e[r][1].start.offset&&(u=tt(u,[["enter",e[r][1],t],["exit",e[r][1],t]])),u=tt(u,[["enter",i,t],["enter",a,t],["exit",a,t],["enter",o,t]]),u=tt(u,ln(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),u=tt(u,[["exit",o,t],["enter",s,t],["exit",s,t],["exit",i,t]]),e[n][1].end.offset-e[n][1].start.offset?(c=2,u=tt(u,[["enter",e[n][1],t],["exit",e[n][1],t]])):c=0,ve(e,r-1,n-r+3,u),n=r+u.length-c-2;break}}for(n=-1;++n<e.length;)e[n][1].type==="attentionSequence"&&(e[n][1].type="data");return e}function l1(e,t){let n=this.parser.constructs.attentionMarkers.null,r=this.previous,i=sr(r),o;return a;function a(l){return e.enter("attentionSequence"),o=l,s(l)}function s(l){if(l===o)return e.consume(l),s;let u=e.exit("attentionSequence"),c=sr(l),p=!c||c===2&&i||n.includes(l),m=!i||i===2&&c||n.includes(r);return u._open=Boolean(o===42?p:p&&(i||!m)),u._close=Boolean(o===42?m:m&&(c||!p)),t(l)}}function Gc(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}var ks={name:"autolink",tokenize:u1};function u1(e,t,n){let r=1;return i;function i(d){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(d),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),o}function o(d){return Ke(d)?(e.consume(d),a):xs(d)?u(d):n(d)}function a(d){return d===43||d===45||d===46||Se(d)?s(d):u(d)}function s(d){return d===58?(e.consume(d),l):(d===43||d===45||d===46||Se(d))&&r++<32?(e.consume(d),s):u(d)}function l(d){return d===62?(e.exit("autolinkProtocol"),f(d)):d===null||d===32||d===60||an(d)?n(d):(e.consume(d),l)}function u(d){return d===64?(e.consume(d),r=0,c):xs(d)?(e.consume(d),u):n(d)}function c(d){return Se(d)?p(d):n(d)}function p(d){return d===46?(e.consume(d),r=0,c):d===62?(e.exit("autolinkProtocol").type="autolinkEmail",f(d)):m(d)}function m(d){return(d===45||Se(d))&&r++<63?(e.consume(d),d===45?m:p):n(d)}function f(d){return e.enter("autolinkMarker"),e.consume(d),e.exit("autolinkMarker"),e.exit("autolink"),t}}var Rt={tokenize:c1,partial:!0};function c1(e,t,n){return Y(e,r,"linePrefix");function r(i){return i===null||D(i)?t(i):n(i)}}var Oo={name:"blockQuote",tokenize:p1,continuation:{tokenize:m1},exit:f1};function p1(e,t,n){let r=this;return i;function i(a){if(a===62){let s=r.containerState;return s.open||(e.enter("blockQuote",{_container:!0}),s.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(a),e.exit("blockQuoteMarker"),o}return n(a)}function o(a){return Q(a)?(e.enter("blockQuotePrefixWhitespace"),e.consume(a),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(a))}}function m1(e,t,n){return Y(e,e.attempt(Oo,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function f1(e){e.exit("blockQuote")}var To={name:"characterEscape",tokenize:d1};function d1(e,t,n){return r;function r(o){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(o),e.exit("escapeMarker"),i}function i(o){return Vc(o)?(e.enter("characterEscapeValue"),e.consume(o),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(o)}}var h1=59,Co;function lr(e){var t="&"+e+";",n;return Co=Co||document.createElement("i"),Co.innerHTML=t,n=Co.textContent,n.charCodeAt(n.length-1)===h1&&e!=="semi"||n===t?!1:n}var Ao={name:"characterReference",tokenize:g1};function g1(e,t,n){let r=this,i=0,o,a;return s;function s(p){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(p),e.exit("characterReferenceMarker"),l}function l(p){return p===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(p),e.exit("characterReferenceMarkerNumeric"),u):(e.enter("characterReferenceValue"),o=31,a=Se,c(p))}function u(p){return p===88||p===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(p),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),o=6,a=qc,c):(e.enter("characterReferenceValue"),o=7,a=Cn,c(p))}function c(p){let m;return p===59&&i?(m=e.exit("characterReferenceValue"),a===Se&&!lr(r.sliceSerialize(m))?n(p):(e.enter("characterReferenceMarker"),e.consume(p),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)):a(p)&&i++<o?(e.consume(p),c):n(p)}}var Eo={name:"codeFenced",tokenize:y1,concrete:!0};function y1(e,t,n){let r=this,i={tokenize:I,partial:!0},o={tokenize:E,partial:!0},a=this.events[this.events.length-1],s=a&&a[1].type==="linePrefix"?a[2].sliceSerialize(a[1],!0).length:0,l=0,u;return c;function c(k){return e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),u=k,p(k)}function p(k){return k===u?(e.consume(k),l++,p):(e.exit("codeFencedFenceSequence"),l<3?n(k):Y(e,m,"whitespace")(k))}function m(k){return k===null||D(k)?g(k):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),f(k))}function f(k){return k===null||J(k)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),Y(e,d,"whitespace")(k)):k===96&&k===u?n(k):(e.consume(k),f)}function d(k){return k===null||D(k)?g(k):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),h(k))}function h(k){return k===null||D(k)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),g(k)):k===96&&k===u?n(k):(e.consume(k),h)}function g(k){return e.exit("codeFencedFence"),r.interrupt?t(k):b(k)}function b(k){return k===null?S(k):D(k)?e.attempt(o,e.attempt(i,S,s?Y(e,b,"linePrefix",s+1):b),S)(k):(e.enter("codeFlowValue"),O(k))}function O(k){return k===null||D(k)?(e.exit("codeFlowValue"),b(k)):(e.consume(k),O)}function S(k){return e.exit("codeFenced"),t(k)}function E(k,_,M){let z=this;return q;function q(U){return k.enter("lineEnding"),k.consume(U),k.exit("lineEnding"),H}function H(U){return z.parser.lazy[z.now().line]?M(U):_(U)}}function I(k,_,M){let z=0;return Y(k,q,"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4);function q(P){return k.enter("codeFencedFence"),k.enter("codeFencedFenceSequence"),H(P)}function H(P){return P===u?(k.consume(P),z++,H):z<l?M(P):(k.exit("codeFencedFenceSequence"),Y(k,U,"whitespace")(P))}function U(P){return P===null||D(P)?(k.exit("codeFencedFence"),_(P)):M(P)}}}var Kr={name:"codeIndented",tokenize:w1},b1={tokenize:x1,partial:!0};function w1(e,t,n){let r=this;return i;function i(u){return e.enter("codeIndented"),Y(e,o,"linePrefix",4+1)(u)}function o(u){let c=r.events[r.events.length-1];return c&&c[1].type==="linePrefix"&&c[2].sliceSerialize(c[1],!0).length>=4?a(u):n(u)}function a(u){return u===null?l(u):D(u)?e.attempt(b1,a,l)(u):(e.enter("codeFlowValue"),s(u))}function s(u){return u===null||D(u)?(e.exit("codeFlowValue"),a(u)):(e.consume(u),s)}function l(u){return e.exit("codeIndented"),t(u)}}function x1(e,t,n){let r=this;return i;function i(a){return r.parser.lazy[r.now().line]?n(a):D(a)?(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),i):Y(e,o,"linePrefix",4+1)(a)}function o(a){let s=r.events[r.events.length-1];return s&&s[1].type==="linePrefix"&&s[2].sliceSerialize(s[1],!0).length>=4?t(a):D(a)?i(a):n(a)}}var vs={name:"codeText",tokenize:S1,resolve:k1,previous:v1};function k1(e){let t=e.length-4,n=3,r,i;if((e[n][1].type==="lineEnding"||e[n][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(r=n;++r<t;)if(e[r][1].type==="codeTextData"){e[n][1].type="codeTextPadding",e[t][1].type="codeTextPadding",n+=2,t-=2;break}}for(r=n-1,t++;++r<=t;)i===void 0?r!==t&&e[r][1].type!=="lineEnding"&&(i=r):(r===t||e[r][1].type==="lineEnding")&&(e[i][1].type="codeTextData",r!==i+2&&(e[i][1].end=e[r-1][1].end,e.splice(i+2,r-i-2),t-=r-i-2,r=i+2),i=void 0);return e}function v1(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function S1(e,t,n){let r=this,i=0,o,a;return s;function s(m){return e.enter("codeText"),e.enter("codeTextSequence"),l(m)}function l(m){return m===96?(e.consume(m),i++,l):(e.exit("codeTextSequence"),u(m))}function u(m){return m===null?n(m):m===96?(a=e.enter("codeTextSequence"),o=0,p(m)):m===32?(e.enter("space"),e.consume(m),e.exit("space"),u):D(m)?(e.enter("lineEnding"),e.consume(m),e.exit("lineEnding"),u):(e.enter("codeTextData"),c(m))}function c(m){return m===null||m===32||m===96||D(m)?(e.exit("codeTextData"),u(m)):(e.consume(m),c)}function p(m){return m===96?(e.consume(m),o++,p):o===i?(e.exit("codeTextSequence"),e.exit("codeText"),t(m)):(a.type="codeTextData",c(m))}}function Lo(e){let t={},n=-1,r,i,o,a,s,l,u;for(;++n<e.length;){for(;n in t;)n=t[n];if(r=e[n],n&&r[1].type==="chunkFlow"&&e[n-1][1].type==="listItemPrefix"&&(l=r[1]._tokenizer.events,o=0,o<l.length&&l[o][1].type==="lineEndingBlank"&&(o+=2),o<l.length&&l[o][1].type==="content"))for(;++o<l.length&&l[o][1].type!=="content";)l[o][1].type==="chunkText"&&(l[o][1]._isInFirstContentOfListItem=!0,o++);if(r[0]==="enter")r[1].contentType&&(Object.assign(t,O1(e,n)),n=t[n],u=!0);else if(r[1]._container){for(o=n,i=void 0;o--&&(a=e[o],a[1].type==="lineEnding"||a[1].type==="lineEndingBlank");)a[0]==="enter"&&(i&&(e[i][1].type="lineEndingBlank"),a[1].type="lineEnding",i=o);i&&(r[1].end=Object.assign({},e[i][1].start),s=e.slice(i,n),s.unshift(r),ve(e,i,n-i+1,s))}}return!u}function O1(e,t){let n=e[t][1],r=e[t][2],i=t-1,o=[],a=n._tokenizer||r.parser[n.contentType](n.start),s=a.events,l=[],u={},c,p,m=-1,f=n,d=0,h=0,g=[h];for(;f;){for(;e[++i][1]!==f;);o.push(i),f._tokenizer||(c=r.sliceStream(f),f.next||c.push(null),p&&a.defineSkip(f.start),f._isInFirstContentOfListItem&&(a._gfmTasklistFirstContentOfListItem=!0),a.write(c),f._isInFirstContentOfListItem&&(a._gfmTasklistFirstContentOfListItem=void 0)),p=f,f=f.next}for(f=n;++m<s.length;)s[m][0]==="exit"&&s[m-1][0]==="enter"&&s[m][1].type===s[m-1][1].type&&s[m][1].start.line!==s[m][1].end.line&&(h=m+1,g.push(h),f._tokenizer=void 0,f.previous=void 0,f=f.next);for(a.events=[],f?(f._tokenizer=void 0,f.previous=void 0):g.pop(),m=g.length;m--;){let b=s.slice(g[m],g[m+1]),O=o.pop();l.unshift([O,O+b.length-1]),ve(e,O,2,b)}for(m=-1;++m<l.length;)u[d+l[m][0]]=d+l[m][1],d+=l[m][1]-l[m][0]-1;return u}var Ss={tokenize:A1,resolve:C1},T1={tokenize:E1,partial:!0};function C1(e){return Lo(e),e}function A1(e,t){let n;return r;function r(s){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),i(s)}function i(s){return s===null?o(s):D(s)?e.check(T1,a,o)(s):(e.consume(s),i)}function o(s){return e.exit("chunkContent"),e.exit("content"),t(s)}function a(s){return e.consume(s),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,i}}function E1(e,t,n){let r=this;return i;function i(a){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),Y(e,o,"linePrefix")}function o(a){if(a===null||D(a))return n(a);let s=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&s&&s[1].type==="linePrefix"&&s[2].sliceSerialize(s[1],!0).length>=4?t(a):e.interrupt(r.parser.constructs.flow,n,t)(a)}}function _o(e,t,n,r,i,o,a,s,l){let u=l||Number.POSITIVE_INFINITY,c=0;return p;function p(b){return b===60?(e.enter(r),e.enter(i),e.enter(o),e.consume(b),e.exit(o),m):b===null||b===41||an(b)?n(b):(e.enter(r),e.enter(a),e.enter(s),e.enter("chunkString",{contentType:"string"}),h(b))}function m(b){return b===62?(e.enter(o),e.consume(b),e.exit(o),e.exit(i),e.exit(r),t):(e.enter(s),e.enter("chunkString",{contentType:"string"}),f(b))}function f(b){return b===62?(e.exit("chunkString"),e.exit(s),m(b)):b===null||b===60||D(b)?n(b):(e.consume(b),b===92?d:f)}function d(b){return b===60||b===62||b===92?(e.consume(b),f):f(b)}function h(b){return b===40?++c>u?n(b):(e.consume(b),h):b===41?c--?(e.consume(b),h):(e.exit("chunkString"),e.exit(s),e.exit(a),e.exit(r),t(b)):b===null||J(b)?c?n(b):(e.exit("chunkString"),e.exit(s),e.exit(a),e.exit(r),t(b)):an(b)?n(b):(e.consume(b),b===92?g:h)}function g(b){return b===40||b===41||b===92?(e.consume(b),h):h(b)}}function Io(e,t,n,r,i,o){let a=this,s=0,l;return u;function u(f){return e.enter(r),e.enter(i),e.consume(f),e.exit(i),e.enter(o),c}function c(f){return f===null||f===91||f===93&&!l||f===94&&!s&&"_hiddenFootnoteSupport"in a.parser.constructs||s>999?n(f):f===93?(e.exit(o),e.enter(i),e.consume(f),e.exit(i),e.exit(r),t):D(f)?(e.enter("lineEnding"),e.consume(f),e.exit("lineEnding"),c):(e.enter("chunkString",{contentType:"string"}),p(f))}function p(f){return f===null||f===91||f===93||D(f)||s++>999?(e.exit("chunkString"),c(f)):(e.consume(f),l=l||!Q(f),f===92?m:p)}function m(f){return f===91||f===92||f===93?(e.consume(f),s++,p):p(f)}}function Mo(e,t,n,r,i,o){let a;return s;function s(m){return e.enter(r),e.enter(i),e.consume(m),e.exit(i),a=m===40?41:m,l}function l(m){return m===a?(e.enter(i),e.consume(m),e.exit(i),e.exit(r),t):(e.enter(o),u(m))}function u(m){return m===a?(e.exit(o),l(a)):m===null?n(m):D(m)?(e.enter("lineEnding"),e.consume(m),e.exit("lineEnding"),Y(e,u,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),c(m))}function c(m){return m===a||m===null||D(m)?(e.exit("chunkString"),u(m)):(e.consume(m),m===92?p:c)}function p(m){return m===a||m===92?(e.consume(m),c):c(m)}}function Ln(e,t){let n;return r;function r(i){return D(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),n=!0,r):Q(i)?Y(e,r,n?"linePrefix":"lineSuffix")(i):t(i)}}function We(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}var Os={name:"definition",tokenize:_1},L1={tokenize:I1,partial:!0};function _1(e,t,n){let r=this,i;return o;function o(l){return e.enter("definition"),Io.call(r,e,a,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(l)}function a(l){return i=We(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),l===58?(e.enter("definitionMarker"),e.consume(l),e.exit("definitionMarker"),Ln(e,_o(e,e.attempt(L1,Y(e,s,"whitespace"),Y(e,s,"whitespace")),n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString"))):n(l)}function s(l){return l===null||D(l)?(e.exit("definition"),r.parser.defined.includes(i)||r.parser.defined.push(i),t(l)):n(l)}}function I1(e,t,n){return r;function r(a){return J(a)?Ln(e,i)(a):n(a)}function i(a){return a===34||a===39||a===40?Mo(e,Y(e,o,"whitespace"),n,"definitionTitle","definitionTitleMarker","definitionTitleString")(a):n(a)}function o(a){return a===null||D(a)?t(a):n(a)}}var Ts={name:"hardBreakEscape",tokenize:M1};function M1(e,t,n){return r;function r(o){return e.enter("hardBreakEscape"),e.enter("escapeMarker"),e.consume(o),i}function i(o){return D(o)?(e.exit("escapeMarker"),e.exit("hardBreakEscape"),t(o)):n(o)}}var Cs={name:"headingAtx",tokenize:F1,resolve:B1};function B1(e,t){let n=e.length-2,r=3,i,o;return e[r][1].type==="whitespace"&&(r+=2),n-2>r&&e[n][1].type==="whitespace"&&(n-=2),e[n][1].type==="atxHeadingSequence"&&(r===n-1||n-4>r&&e[n-2][1].type==="whitespace")&&(n-=r+1===n?2:4),n>r&&(i={type:"atxHeadingText",start:e[r][1].start,end:e[n][1].end},o={type:"chunkText",start:e[r][1].start,end:e[n][1].end,contentType:"text"},ve(e,r,n-r+1,[["enter",i,t],["enter",o,t],["exit",o,t],["exit",i,t]])),e}function F1(e,t,n){let r=this,i=0;return o;function o(c){return e.enter("atxHeading"),e.enter("atxHeadingSequence"),a(c)}function a(c){return c===35&&i++<6?(e.consume(c),a):c===null||J(c)?(e.exit("atxHeadingSequence"),r.interrupt?t(c):s(c)):n(c)}function s(c){return c===35?(e.enter("atxHeadingSequence"),l(c)):c===null||D(c)?(e.exit("atxHeading"),t(c)):Q(c)?Y(e,s,"whitespace")(c):(e.enter("atxHeadingText"),u(c))}function l(c){return c===35?(e.consume(c),l):(e.exit("atxHeadingSequence"),s(c))}function u(c){return c===null||c===35||J(c)?(e.exit("atxHeadingText"),s(c)):(e.consume(c),u)}}var Zc=["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"],As=["pre","script","style","textarea"];var Es={name:"htmlFlow",tokenize:P1,resolveTo:D1,concrete:!0},R1={tokenize:N1,partial:!0};function D1(e){let t=e.length;for(;t--&&!(e[t][0]==="enter"&&e[t][1].type==="htmlFlow"););return t>1&&e[t-2][1].type==="linePrefix"&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function P1(e,t,n){let r=this,i,o,a,s,l;return u;function u(x){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(x),c}function c(x){return x===33?(e.consume(x),p):x===47?(e.consume(x),d):x===63?(e.consume(x),i=3,r.interrupt?t:he):Ke(x)?(e.consume(x),a=String.fromCharCode(x),o=!0,h):n(x)}function p(x){return x===45?(e.consume(x),i=2,m):x===91?(e.consume(x),i=5,a="CDATA[",s=0,f):Ke(x)?(e.consume(x),i=4,r.interrupt?t:he):n(x)}function m(x){return x===45?(e.consume(x),r.interrupt?t:he):n(x)}function f(x){return x===a.charCodeAt(s++)?(e.consume(x),s===a.length?r.interrupt?t:H:f):n(x)}function d(x){return Ke(x)?(e.consume(x),a=String.fromCharCode(x),h):n(x)}function h(x){return x===null||x===47||x===62||J(x)?x!==47&&o&&As.includes(a.toLowerCase())?(i=1,r.interrupt?t(x):H(x)):Zc.includes(a.toLowerCase())?(i=6,x===47?(e.consume(x),g):r.interrupt?t(x):H(x)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(x):o?O(x):b(x)):x===45||Se(x)?(e.consume(x),a+=String.fromCharCode(x),h):n(x)}function g(x){return x===62?(e.consume(x),r.interrupt?t:H):n(x)}function b(x){return Q(x)?(e.consume(x),b):z(x)}function O(x){return x===47?(e.consume(x),z):x===58||x===95||Ke(x)?(e.consume(x),S):Q(x)?(e.consume(x),O):z(x)}function S(x){return x===45||x===46||x===58||x===95||Se(x)?(e.consume(x),S):E(x)}function E(x){return x===61?(e.consume(x),I):Q(x)?(e.consume(x),E):O(x)}function I(x){return x===null||x===60||x===61||x===62||x===96?n(x):x===34||x===39?(e.consume(x),l=x,k):Q(x)?(e.consume(x),I):(l=null,_(x))}function k(x){return x===null||D(x)?n(x):x===l?(e.consume(x),M):(e.consume(x),k)}function _(x){return x===null||x===34||x===39||x===60||x===61||x===62||x===96||J(x)?E(x):(e.consume(x),_)}function M(x){return x===47||x===62||Q(x)?O(x):n(x)}function z(x){return x===62?(e.consume(x),q):n(x)}function q(x){return Q(x)?(e.consume(x),q):x===null||D(x)?H(x):n(x)}function H(x){return x===45&&i===2?(e.consume(x),ne):x===60&&i===1?(e.consume(x),C):x===62&&i===4?(e.consume(x),le):x===63&&i===3?(e.consume(x),he):x===93&&i===5?(e.consume(x),te):D(x)&&(i===6||i===7)?e.check(R1,le,U)(x):x===null||D(x)?U(x):(e.consume(x),H)}function U(x){return e.exit("htmlFlowData"),P(x)}function P(x){return x===null?w(x):D(x)?e.attempt({tokenize:V,partial:!0},P,w)(x):(e.enter("htmlFlowData"),H(x))}function V(x,rt,it){return Xe;function Xe(ot){return x.enter("lineEnding"),x.consume(ot),x.exit("lineEnding"),vt}function vt(ot){return r.parser.lazy[r.now().line]?it(ot):rt(ot)}}function ne(x){return x===45?(e.consume(x),he):H(x)}function C(x){return x===47?(e.consume(x),a="",oe):H(x)}function oe(x){return x===62&&As.includes(a.toLowerCase())?(e.consume(x),le):Ke(x)&&a.length<8?(e.consume(x),a+=String.fromCharCode(x),oe):H(x)}function te(x){return x===93?(e.consume(x),he):H(x)}function he(x){return x===62?(e.consume(x),le):H(x)}function le(x){return x===null||D(x)?(e.exit("htmlFlowData"),w(x)):(e.consume(x),le)}function w(x){return e.exit("htmlFlow"),t(x)}}function N1(e,t,n){return r;function r(i){return e.exit("htmlFlowData"),e.enter("lineEndingBlank"),e.consume(i),e.exit("lineEndingBlank"),e.attempt(Rt,t,n)}}var Ls={name:"htmlText",tokenize:z1};function z1(e,t,n){let r=this,i,o,a,s;return l;function l(w){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(w),u}function u(w){return w===33?(e.consume(w),c):w===47?(e.consume(w),_):w===63?(e.consume(w),I):Ke(w)?(e.consume(w),q):n(w)}function c(w){return w===45?(e.consume(w),p):w===91?(e.consume(w),o="CDATA[",a=0,g):Ke(w)?(e.consume(w),E):n(w)}function p(w){return w===45?(e.consume(w),m):n(w)}function m(w){return w===null||w===62?n(w):w===45?(e.consume(w),f):d(w)}function f(w){return w===null||w===62?n(w):d(w)}function d(w){return w===null?n(w):w===45?(e.consume(w),h):D(w)?(s=d,te(w)):(e.consume(w),d)}function h(w){return w===45?(e.consume(w),le):d(w)}function g(w){return w===o.charCodeAt(a++)?(e.consume(w),a===o.length?b:g):n(w)}function b(w){return w===null?n(w):w===93?(e.consume(w),O):D(w)?(s=b,te(w)):(e.consume(w),b)}function O(w){return w===93?(e.consume(w),S):b(w)}function S(w){return w===62?le(w):w===93?(e.consume(w),S):b(w)}function E(w){return w===null||w===62?le(w):D(w)?(s=E,te(w)):(e.consume(w),E)}function I(w){return w===null?n(w):w===63?(e.consume(w),k):D(w)?(s=I,te(w)):(e.consume(w),I)}function k(w){return w===62?le(w):I(w)}function _(w){return Ke(w)?(e.consume(w),M):n(w)}function M(w){return w===45||Se(w)?(e.consume(w),M):z(w)}function z(w){return D(w)?(s=z,te(w)):Q(w)?(e.consume(w),z):le(w)}function q(w){return w===45||Se(w)?(e.consume(w),q):w===47||w===62||J(w)?H(w):n(w)}function H(w){return w===47?(e.consume(w),le):w===58||w===95||Ke(w)?(e.consume(w),U):D(w)?(s=H,te(w)):Q(w)?(e.consume(w),H):le(w)}function U(w){return w===45||w===46||w===58||w===95||Se(w)?(e.consume(w),U):P(w)}function P(w){return w===61?(e.consume(w),V):D(w)?(s=P,te(w)):Q(w)?(e.consume(w),P):H(w)}function V(w){return w===null||w===60||w===61||w===62||w===96?n(w):w===34||w===39?(e.consume(w),i=w,ne):D(w)?(s=V,te(w)):Q(w)?(e.consume(w),V):(e.consume(w),i=void 0,oe)}function ne(w){return w===i?(e.consume(w),C):w===null?n(w):D(w)?(s=ne,te(w)):(e.consume(w),ne)}function C(w){return w===62||w===47||J(w)?H(w):n(w)}function oe(w){return w===null||w===34||w===39||w===60||w===61||w===96?n(w):w===62||J(w)?H(w):(e.consume(w),oe)}function te(w){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(w),e.exit("lineEnding"),Y(e,he,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function he(w){return e.enter("htmlTextData"),s(w)}function le(w){return w===62?(e.consume(w),e.exit("htmlTextData"),e.exit("htmlText"),t):n(w)}}var _n={name:"labelEnd",tokenize:V1,resolveTo:q1,resolveAll:j1},$1={tokenize:K1},H1={tokenize:W1},Y1={tokenize:U1};function j1(e){let t=-1,n;for(;++t<e.length;)n=e[t][1],(n.type==="labelImage"||n.type==="labelLink"||n.type==="labelEnd")&&(e.splice(t+1,n.type==="labelImage"?4:2),n.type="data",t++);return e}function q1(e,t){let n=e.length,r=0,i,o,a,s;for(;n--;)if(i=e[n][1],o){if(i.type==="link"||i.type==="labelLink"&&i._inactive)break;e[n][0]==="enter"&&i.type==="labelLink"&&(i._inactive=!0)}else if(a){if(e[n][0]==="enter"&&(i.type==="labelImage"||i.type==="labelLink")&&!i._balanced&&(o=n,i.type!=="labelLink")){r=2;break}}else i.type==="labelEnd"&&(a=n);let l={type:e[o][1].type==="labelLink"?"link":"image",start:Object.assign({},e[o][1].start),end:Object.assign({},e[e.length-1][1].end)},u={type:"label",start:Object.assign({},e[o][1].start),end:Object.assign({},e[a][1].end)},c={type:"labelText",start:Object.assign({},e[o+r+2][1].end),end:Object.assign({},e[a-2][1].start)};return s=[["enter",l,t],["enter",u,t]],s=tt(s,e.slice(o+1,o+r+3)),s=tt(s,[["enter",c,t]]),s=tt(s,ln(t.parser.constructs.insideSpan.null,e.slice(o+r+4,a-3),t)),s=tt(s,[["exit",c,t],e[a-2],e[a-1],["exit",u,t]]),s=tt(s,e.slice(a+1)),s=tt(s,[["exit",l,t]]),ve(e,o,e.length,s),e}function V1(e,t,n){let r=this,i=r.events.length,o,a;for(;i--;)if((r.events[i][1].type==="labelImage"||r.events[i][1].type==="labelLink")&&!r.events[i][1]._balanced){o=r.events[i][1];break}return s;function s(c){return o?o._inactive?u(c):(a=r.parser.defined.includes(We(r.sliceSerialize({start:o.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(c),e.exit("labelMarker"),e.exit("labelEnd"),l):n(c)}function l(c){return c===40?e.attempt($1,t,a?t:u)(c):c===91?e.attempt(H1,t,a?e.attempt(Y1,t,u):u)(c):a?t(c):u(c)}function u(c){return o._balanced=!0,n(c)}}function K1(e,t,n){return r;function r(l){return e.enter("resource"),e.enter("resourceMarker"),e.consume(l),e.exit("resourceMarker"),Ln(e,i)}function i(l){return l===41?s(l):_o(e,o,n,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",3)(l)}function o(l){return J(l)?Ln(e,a)(l):s(l)}function a(l){return l===34||l===39||l===40?Mo(e,Ln(e,s),n,"resourceTitle","resourceTitleMarker","resourceTitleString")(l):s(l)}function s(l){return l===41?(e.enter("resourceMarker"),e.consume(l),e.exit("resourceMarker"),e.exit("resource"),t):n(l)}}function W1(e,t,n){let r=this;return i;function i(a){return Io.call(r,e,o,n,"reference","referenceMarker","referenceString")(a)}function o(a){return r.parser.defined.includes(We(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(a):n(a)}}function U1(e,t,n){return r;function r(o){return e.enter("reference"),e.enter("referenceMarker"),e.consume(o),e.exit("referenceMarker"),i}function i(o){return o===93?(e.enter("referenceMarker"),e.consume(o),e.exit("referenceMarker"),e.exit("reference"),t):n(o)}}var _s={name:"labelStartImage",tokenize:G1,resolveAll:_n.resolveAll};function G1(e,t,n){let r=this;return i;function i(s){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(s),e.exit("labelImageMarker"),o}function o(s){return s===91?(e.enter("labelMarker"),e.consume(s),e.exit("labelMarker"),e.exit("labelImage"),a):n(s)}function a(s){return s===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(s):t(s)}}var Is={name:"labelStartLink",tokenize:Z1,resolveAll:_n.resolveAll};function Z1(e,t,n){let r=this;return i;function i(a){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(a),e.exit("labelMarker"),e.exit("labelLink"),o}function o(a){return a===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(a):t(a)}}var Wr={name:"lineEnding",tokenize:Q1};function Q1(e,t){return n;function n(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),Y(e,t,"linePrefix")}}var In={name:"thematicBreak",tokenize:X1};function X1(e,t,n){let r=0,i;return o;function o(l){return e.enter("thematicBreak"),i=l,a(l)}function a(l){return l===i?(e.enter("thematicBreakSequence"),s(l)):Q(l)?Y(e,a,"whitespace")(l):r<3||l!==null&&!D(l)?n(l):(e.exit("thematicBreak"),t(l))}function s(l){return l===i?(e.consume(l),r++,s):(e.exit("thematicBreakSequence"),a(l))}}var Ue={name:"list",tokenize:t0,continuation:{tokenize:n0},exit:i0},J1={tokenize:o0,partial:!0},e0={tokenize:r0,partial:!0};function t0(e,t,n){let r=this,i=r.events[r.events.length-1],o=i&&i[1].type==="linePrefix"?i[2].sliceSerialize(i[1],!0).length:0,a=0;return s;function s(f){let d=r.containerState.type||(f===42||f===43||f===45?"listUnordered":"listOrdered");if(d==="listUnordered"?!r.containerState.marker||f===r.containerState.marker:Cn(f)){if(r.containerState.type||(r.containerState.type=d,e.enter(d,{_container:!0})),d==="listUnordered")return e.enter("listItemPrefix"),f===42||f===45?e.check(In,n,u)(f):u(f);if(!r.interrupt||f===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),l(f)}return n(f)}function l(f){return Cn(f)&&++a<10?(e.consume(f),l):(!r.interrupt||a<2)&&(r.containerState.marker?f===r.containerState.marker:f===41||f===46)?(e.exit("listItemValue"),u(f)):n(f)}function u(f){return e.enter("listItemMarker"),e.consume(f),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||f,e.check(Rt,r.interrupt?n:c,e.attempt(J1,m,p))}function c(f){return r.containerState.initialBlankLine=!0,o++,m(f)}function p(f){return Q(f)?(e.enter("listItemPrefixWhitespace"),e.consume(f),e.exit("listItemPrefixWhitespace"),m):n(f)}function m(f){return r.containerState.size=o+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(f)}}function n0(e,t,n){let r=this;return r.containerState._closeFlow=void 0,e.check(Rt,i,o);function i(s){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,Y(e,t,"listItemIndent",r.containerState.size+1)(s)}function o(s){return r.containerState.furtherBlankLines||!Q(s)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,a(s)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(e0,t,a)(s))}function a(s){return r.containerState._closeFlow=!0,r.interrupt=void 0,Y(e,e.attempt(Ue,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(s)}}function r0(e,t,n){let r=this;return Y(e,i,"listItemIndent",r.containerState.size+1);function i(o){let a=r.events[r.events.length-1];return a&&a[1].type==="listItemIndent"&&a[2].sliceSerialize(a[1],!0).length===r.containerState.size?t(o):n(o)}}function i0(e){e.exit(this.containerState.type)}function o0(e,t,n){let r=this;return Y(e,i,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4+1);function i(o){let a=r.events[r.events.length-1];return!Q(o)&&a&&a[1].type==="listItemPrefixWhitespace"?t(o):n(o)}}var Bo={name:"setextUnderline",tokenize:s0,resolveTo:a0};function a0(e,t){let n=e.length,r,i,o;for(;n--;)if(e[n][0]==="enter"){if(e[n][1].type==="content"){r=n;break}e[n][1].type==="paragraph"&&(i=n)}else e[n][1].type==="content"&&e.splice(n,1),!o&&e[n][1].type==="definition"&&(o=n);let a={type:"setextHeading",start:Object.assign({},e[i][1].start),end:Object.assign({},e[e.length-1][1].end)};return e[i][1].type="setextHeadingText",o?(e.splice(i,0,["enter",a,t]),e.splice(o+1,0,["exit",e[r][1],t]),e[r][1].end=Object.assign({},e[o][1].end)):e[r][1]=a,e.push(["exit",a,t]),e}function s0(e,t,n){let r=this,i=r.events.length,o,a;for(;i--;)if(r.events[i][1].type!=="lineEnding"&&r.events[i][1].type!=="linePrefix"&&r.events[i][1].type!=="content"){a=r.events[i][1].type==="paragraph";break}return s;function s(c){return!r.parser.lazy[r.now().line]&&(r.interrupt||a)?(e.enter("setextHeadingLine"),e.enter("setextHeadingLineSequence"),o=c,l(c)):n(c)}function l(c){return c===o?(e.consume(c),l):(e.exit("setextHeadingLineSequence"),Y(e,u,"lineSuffix")(c))}function u(c){return c===null||D(c)?(e.exit("setextHeadingLine"),t(c)):n(c)}}var Qc={tokenize:l0};function l0(e){let t=this,n=e.attempt(Rt,r,e.attempt(this.parser.constructs.flowInitial,i,Y(e,e.attempt(this.parser.constructs.flow,i,e.attempt(Ss,i)),"linePrefix")));return n;function r(o){if(o===null){e.consume(o);return}return e.enter("lineEndingBlank"),e.consume(o),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}function i(o){if(o===null){e.consume(o);return}return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),t.currentConstruct=void 0,n}}var Xc={resolveAll:np()},Jc=tp("string"),ep=tp("text");function tp(e){return{tokenize:t,resolveAll:np(e==="text"?u0:void 0)};function t(n){let r=this,i=this.parser.constructs[e],o=n.attempt(i,a,s);return a;function a(c){return u(c)?o(c):s(c)}function s(c){if(c===null){n.consume(c);return}return n.enter("data"),n.consume(c),l}function l(c){return u(c)?(n.exit("data"),o(c)):(n.consume(c),l)}function u(c){if(c===null)return!0;let p=i[c],m=-1;if(p)for(;++m<p.length;){let f=p[m];if(!f.previous||f.previous.call(r,r.previous))return!0}return!1}}}function np(e){return t;function t(n,r){let i=-1,o;for(;++i<=n.length;)o===void 0?n[i]&&n[i][1].type==="data"&&(o=i,i++):(!n[i]||n[i][1].type!=="data")&&(i!==o+2&&(n[o][1].end=n[i-1][1].end,n.splice(o+2,i-o-2),i=o+2),o=void 0);return e?e(n,r):n}}function u0(e,t){let n=-1;for(;++n<=e.length;)if((n===e.length||e[n][1].type==="lineEnding")&&e[n-1][1].type==="data"){let r=e[n-1][1],i=t.sliceStream(r),o=i.length,a=-1,s=0,l;for(;o--;){let u=i[o];if(typeof u=="string"){for(a=u.length;u.charCodeAt(a-1)===32;)s++,a--;if(a)break;a=-1}else if(u===-2)l=!0,s++;else if(u!==-1){o++;break}}if(s){let u={type:n===e.length||l||s<2?"lineSuffix":"hardBreakTrailing",start:{line:r.end.line,column:r.end.column-s,offset:r.end.offset-s,_index:r.start._index+o,_bufferIndex:o?a:r.start._bufferIndex+a},end:Object.assign({},r.end)};r.end=Object.assign({},u.start),r.start.offset===r.end.offset?Object.assign(r,u):(e.splice(n,0,["enter",u,t],["exit",u,t]),n+=2)}n++}return e}function rp(e,t,n){let r=Object.assign(n?Object.assign({},n):{line:1,column:1,offset:0},{_index:0,_bufferIndex:-1}),i={},o=[],a=[],s=[],l=!0,u={consume:E,enter:I,exit:k,attempt:z(_),check:z(M),interrupt:z(M,{interrupt:!0})},c={previous:null,code:null,containerState:{},events:[],parser:e,sliceStream:h,sliceSerialize:d,now:g,defineSkip:b,write:f},p=t.tokenize.call(c,u),m;return t.resolveAll&&o.push(t),c;function f(P){return a=tt(a,P),O(),a[a.length-1]!==null?[]:(q(t,0),c.events=ln(o,c.events,c),c.events)}function d(P,V){return p0(h(P),V)}function h(P){return c0(a,P)}function g(){return Object.assign({},r)}function b(P){i[P.line]=P.column,U()}function O(){let P;for(;r._index<a.length;){let V=a[r._index];if(typeof V=="string")for(P=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===P&&r._bufferIndex<V.length;)S(V.charCodeAt(r._bufferIndex));else S(V)}}function S(P){l=void 0,m=P,p=p(P)}function E(P){D(P)?(r.line++,r.column=1,r.offset+=P===-3?2:1,U()):P!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===a[r._index].length&&(r._bufferIndex=-1,r._index++)),c.previous=P,l=!0}function I(P,V){let ne=V||{};return ne.type=P,ne.start=g(),c.events.push(["enter",ne,c]),s.push(ne),ne}function k(P){let V=s.pop();return V.end=g(),c.events.push(["exit",V,c]),V}function _(P,V){q(P,V.from)}function M(P,V){V.restore()}function z(P,V){return ne;function ne(C,oe,te){let he,le,w,x;return Array.isArray(C)?it(C):"tokenize"in C?it([C]):rt(C);function rt(ce){return zt;function zt(St){let It=St!==null&&ce[St],Jt=St!==null&&ce.null,wn=[...Array.isArray(It)?It:It?[It]:[],...Array.isArray(Jt)?Jt:Jt?[Jt]:[]];return it(wn)(St)}}function it(ce){return he=ce,le=0,ce.length===0?te:Xe(ce[le])}function Xe(ce){return zt;function zt(St){return x=H(),w=ce,ce.partial||(c.currentConstruct=ce),ce.name&&c.parser.constructs.disable.null.includes(ce.name)?ot(St):ce.tokenize.call(V?Object.assign(Object.create(c),V):c,u,vt,ot)(St)}}function vt(ce){return l=!0,P(w,x),oe}function ot(ce){return l=!0,x.restore(),++le<he.length?Xe(he[le]):te}}}function q(P,V){P.resolveAll&&!o.includes(P)&&o.push(P),P.resolve&&ve(c.events,V,c.events.length-V,P.resolve(c.events.slice(V),c)),P.resolveTo&&(c.events=P.resolveTo(c.events,c))}function H(){let P=g(),V=c.previous,ne=c.currentConstruct,C=c.events.length,oe=Array.from(s);return{restore:te,from:C};function te(){r=P,c.previous=V,c.currentConstruct=ne,c.events.length=C,s=oe,U()}}function U(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}function c0(e,t){let n=t.start._index,r=t.start._bufferIndex,i=t.end._index,o=t.end._bufferIndex,a;return n===i?a=[e[n].slice(r,o)]:(a=e.slice(n,i),r>-1&&(a[0]=a[0].slice(r)),o>0&&a.push(e[i].slice(0,o))),a}function p0(e,t){let n=-1,r=[],i;for(;++n<e.length;){let o=e[n],a;if(typeof o=="string")a=o;else switch(o){case-5:{a="\r";break}case-4:{a=`
`;break}case-3:{a=`\r
`;break}case-2:{a=t?" ":" ";break}case-1:{if(!t&&i)continue;a=" ";break}default:a=String.fromCharCode(o)}i=o===-2,r.push(a)}return r.join("")}var Ms={};Va(Ms,{attentionMarkers:()=>w0,contentInitial:()=>f0,disable:()=>x0,document:()=>m0,flow:()=>h0,flowInitial:()=>d0,insideSpan:()=>b0,string:()=>g0,text:()=>y0});var m0={[42]:Ue,[43]:Ue,[45]:Ue,[48]:Ue,[49]:Ue,[50]:Ue,[51]:Ue,[52]:Ue,[53]:Ue,[54]:Ue,[55]:Ue,[56]:Ue,[57]:Ue,[62]:Oo},f0={[91]:Os},d0={[-2]:Kr,[-1]:Kr,[32]:Kr},h0={[35]:Cs,[42]:In,[45]:[Bo,In],[60]:Es,[61]:Bo,[95]:In,[96]:Eo,[126]:Eo},g0={[38]:Ao,[92]:To},y0={[-5]:Wr,[-4]:Wr,[-3]:Wr,[33]:_s,[38]:Ao,[42]:Vr,[60]:[ks,Ls],[91]:Is,[92]:[Ts,To],[93]:_n,[95]:Vr,[96]:vs},b0={null:[Vr,Xc]},w0={null:[42,95]},x0={null:[]};function ip(e={}){let t=So([Ms].concat(e.extensions||[])),n={defined:[],lazy:{},constructs:t,content:r(Kc),document:r(Uc),flow:r(Qc),string:r(Jc),text:r(ep)};return n;function r(i){return o;function o(a){return rp(n,i,a)}}}var op=/[\0\t\n\r]/g;function ap(){let e=1,t="",n=!0,r;return i;function i(o,a,s){let l=[],u,c,p,m,f;for(o=t+o.toString(a),p=0,t="",n&&(o.charCodeAt(0)===65279&&p++,n=void 0);p<o.length;){if(op.lastIndex=p,u=op.exec(o),m=u&&u.index!==void 0?u.index:o.length,f=o.charCodeAt(m),!u){t=o.slice(p);break}if(f===10&&p===m&&r)l.push(-3),r=void 0;else switch(r&&(l.push(-5),r=void 0),p<m&&(l.push(o.slice(p,m)),e+=m-p),f){case 0:{l.push(65533),e++;break}case 9:{for(c=Math.ceil(e/4)*4,l.push(-2);e++<c;)l.push(-1);break}case 10:{l.push(-4),e=1;break}default:r=!0,e=1}p=m+1}return s&&(r&&l.push(-5),t&&l.push(t),l.push(null)),l}}function sp(e){for(;!Lo(e););return e}function Fo(e,t){let n=Number.parseInt(e,t);return n<9||n===11||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)===65535||(n&65535)===65534||n>1114111?"\uFFFD":String.fromCharCode(n)}var k0=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function Ro(e){return e.replace(k0,v0)}function v0(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){let i=n.charCodeAt(1),o=i===120||i===88;return Fo(n.slice(o?2:1),o?16:10)}return lr(n)||e}var Bs={}.hasOwnProperty,Fs=function(e,t,n){return typeof t!="string"&&(n=t,t=void 0),S0(n)(sp(ip(n).document().write(ap()(e,t,!0))))};function S0(e={}){let t=lp({transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:l(xn),autolinkProtocol:U,autolinkEmail:U,atxHeading:l(Cr),blockQuote:l(Jt),characterEscape:U,characterReference:U,codeFenced:l(wn),codeFencedFenceInfo:u,codeFencedFenceMeta:u,codeIndented:l(wn,u),codeText:l(Ya,u),codeTextData:U,data:U,codeFlowValue:U,definition:l(ja),definitionDestinationString:u,definitionLabelString:u,definitionTitleString:u,emphasis:l(Ji),hardBreakEscape:l(eo),hardBreakTrailing:l(eo),htmlFlow:l(to,u),htmlFlowData:U,htmlText:l(to,u),htmlTextData:U,image:l($t),label:u,link:l(xn),listItem:l(no),listItemValue:h,listOrdered:l(Ar,d),listUnordered:l(Ar),paragraph:l(Er),reference:vt,referenceString:u,resourceDestinationString:u,resourceTitleString:u,setextHeading:l(Cr),strong:l(ro),thematicBreak:l(oo)},exit:{atxHeading:p(),atxHeadingSequence:M,autolink:p(),autolinkEmail:It,autolinkProtocol:St,blockQuote:p(),characterEscapeValue:P,characterReferenceMarkerHexadecimal:ce,characterReferenceMarkerNumeric:ce,characterReferenceValue:zt,codeFenced:p(S),codeFencedFence:O,codeFencedFenceInfo:g,codeFencedFenceMeta:b,codeFlowValue:P,codeIndented:p(E),codeText:p(te),codeTextData:P,data:P,definition:p(),definitionDestinationString:_,definitionLabelString:I,definitionTitleString:k,emphasis:p(),hardBreakEscape:p(ne),hardBreakTrailing:p(ne),htmlFlow:p(C),htmlFlowData:P,htmlText:p(oe),htmlTextData:P,image:p(le),label:x,labelText:w,lineEnding:V,link:p(he),listItem:p(),listOrdered:p(),listUnordered:p(),paragraph:p(),referenceString:ot,resourceDestinationString:rt,resourceTitleString:it,resource:Xe,setextHeading:p(H),setextHeadingLineSequence:q,setextHeadingText:z,strong:p(),thematicBreak:p()}},e.mdastExtensions||[]),n={};return r;function r(L){let N={type:"root",children:[]},K=[N],me=[],Ot=[],ao={stack:K,tokenStack:me,config:t,enter:c,exit:m,buffer:u,resume:f,setData:o,getData:a},fe=-1;for(;++fe<L.length;)if(L[fe][1].type==="listOrdered"||L[fe][1].type==="listUnordered")if(L[fe][0]==="enter")Ot.push(fe);else{let at=Ot.pop();fe=i(L,at,fe)}for(fe=-1;++fe<L.length;){let at=t[L[fe][0]];Bs.call(at,L[fe][1].type)&&at[L[fe][1].type].call(Object.assign({sliceSerialize:L[fe][2].sliceSerialize},ao),L[fe][1])}if(me.length>0)throw new Error("Cannot close document, a token (`"+me[me.length-1].type+"`, "+Tn({start:me[me.length-1].start,end:me[me.length-1].end})+") is still open");for(N.position={start:s(L.length>0?L[0][1].start:{line:1,column:1,offset:0}),end:s(L.length>0?L[L.length-2][1].end:{line:1,column:1,offset:0})},fe=-1;++fe<t.transforms.length;)N=t.transforms[fe](N)||N;return N}function i(L,N,K){let me=N-1,Ot=-1,ao=!1,fe,at,Lr,_r;for(;++me<=K;){let ke=L[me];if(ke[1].type==="listUnordered"||ke[1].type==="listOrdered"||ke[1].type==="blockQuote"?(ke[0]==="enter"?Ot++:Ot--,_r=void 0):ke[1].type==="lineEndingBlank"?ke[0]==="enter"&&(fe&&!_r&&!Ot&&!Lr&&(Lr=me),_r=void 0):ke[1].type==="linePrefix"||ke[1].type==="listItemValue"||ke[1].type==="listItemMarker"||ke[1].type==="listItemPrefix"||ke[1].type==="listItemPrefixWhitespace"||(_r=void 0),!Ot&&ke[0]==="enter"&&ke[1].type==="listItemPrefix"||Ot===-1&&ke[0]==="exit"&&(ke[1].type==="listUnordered"||ke[1].type==="listOrdered")){if(fe){let qa=me;for(at=void 0;qa--;){let Ht=L[qa];if(Ht[1].type==="lineEnding"||Ht[1].type==="lineEndingBlank"){if(Ht[0]==="exit")continue;at&&(L[at][1].type="lineEndingBlank",ao=!0),Ht[1].type="lineEnding",at=qa}else if(!(Ht[1].type==="linePrefix"||Ht[1].type==="blockQuotePrefix"||Ht[1].type==="blockQuotePrefixWhitespace"||Ht[1].type==="blockQuoteMarker"||Ht[1].type==="listItemIndent"))break}Lr&&(!at||Lr<at)&&(fe._spread=!0),fe.end=Object.assign({},at?L[at][1].start:ke[1].end),L.splice(at||me,0,["exit",fe,ke[2]]),me++,K++}ke[1].type==="listItemPrefix"&&(fe={type:"listItem",_spread:!1,start:Object.assign({},ke[1].start)},L.splice(me,0,["enter",fe,ke[2]]),me++,K++,Lr=void 0,_r=!0)}}return L[N][1]._spread=ao,K}function o(L,N){n[L]=N}function a(L){return n[L]}function s(L){return{line:L.line,column:L.column,offset:L.offset}}function l(L,N){return K;function K(me){c.call(this,L(me),me),N&&N.call(this,me)}}function u(){this.stack.push({type:"fragment",children:[]})}function c(L,N){return this.stack[this.stack.length-1].children.push(L),this.stack.push(L),this.tokenStack.push(N),L.position={start:s(N.start)},L}function p(L){return N;function N(K){L&&L.call(this,K),m.call(this,K)}}function m(L){let N=this.stack.pop(),K=this.tokenStack.pop();if(K){if(K.type!==L.type)throw new Error("Cannot close `"+L.type+"` ("+Tn({start:L.start,end:L.end})+"): a different token (`"+K.type+"`, "+Tn({start:K.start,end:K.end})+") is open")}else throw new Error("Cannot close `"+L.type+"` ("+Tn({start:L.start,end:L.end})+"): it\u2019s not open");return N.position.end=s(L.end),N}function f(){return ar(this.stack.pop())}function d(){o("expectingFirstListItemValue",!0)}function h(L){if(a("expectingFirstListItemValue")){let N=this.stack[this.stack.length-2];N.start=Number.parseInt(this.sliceSerialize(L),10),o("expectingFirstListItemValue")}}function g(){let L=this.resume(),N=this.stack[this.stack.length-1];N.lang=L}function b(){let L=this.resume(),N=this.stack[this.stack.length-1];N.meta=L}function O(){a("flowCodeInside")||(this.buffer(),o("flowCodeInside",!0))}function S(){let L=this.resume(),N=this.stack[this.stack.length-1];N.value=L.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),o("flowCodeInside")}function E(){let L=this.resume(),N=this.stack[this.stack.length-1];N.value=L.replace(/(\r?\n|\r)$/g,"")}function I(L){let N=this.resume(),K=this.stack[this.stack.length-1];K.label=N,K.identifier=We(this.sliceSerialize(L)).toLowerCase()}function k(){let L=this.resume(),N=this.stack[this.stack.length-1];N.title=L}function _(){let L=this.resume(),N=this.stack[this.stack.length-1];N.url=L}function M(L){let N=this.stack[this.stack.length-1];if(!N.depth){let K=this.sliceSerialize(L).length;N.depth=K}}function z(){o("setextHeadingSlurpLineEnding",!0)}function q(L){let N=this.stack[this.stack.length-1];N.depth=this.sliceSerialize(L).charCodeAt(0)===61?1:2}function H(){o("setextHeadingSlurpLineEnding")}function U(L){let N=this.stack[this.stack.length-1],K=N.children[N.children.length-1];(!K||K.type!=="text")&&(K=io(),K.position={start:s(L.start)},N.children.push(K)),this.stack.push(K)}function P(L){let N=this.stack.pop();N.value+=this.sliceSerialize(L),N.position.end=s(L.end)}function V(L){let N=this.stack[this.stack.length-1];if(a("atHardBreak")){let K=N.children[N.children.length-1];K.position.end=s(L.end),o("atHardBreak");return}!a("setextHeadingSlurpLineEnding")&&t.canContainEols.includes(N.type)&&(U.call(this,L),P.call(this,L))}function ne(){o("atHardBreak",!0)}function C(){let L=this.resume(),N=this.stack[this.stack.length-1];N.value=L}function oe(){let L=this.resume(),N=this.stack[this.stack.length-1];N.value=L}function te(){let L=this.resume(),N=this.stack[this.stack.length-1];N.value=L}function he(){let L=this.stack[this.stack.length-1];a("inReference")?(L.type+="Reference",L.referenceType=a("referenceType")||"shortcut",delete L.url,delete L.title):(delete L.identifier,delete L.label),o("referenceType")}function le(){let L=this.stack[this.stack.length-1];a("inReference")?(L.type+="Reference",L.referenceType=a("referenceType")||"shortcut",delete L.url,delete L.title):(delete L.identifier,delete L.label),o("referenceType")}function w(L){let N=this.stack[this.stack.length-2],K=this.sliceSerialize(L);N.label=Ro(K),N.identifier=We(K).toLowerCase()}function x(){let L=this.stack[this.stack.length-1],N=this.resume(),K=this.stack[this.stack.length-1];o("inReference",!0),K.type==="link"?K.children=L.children:K.alt=N}function rt(){let L=this.resume(),N=this.stack[this.stack.length-1];N.url=L}function it(){let L=this.resume(),N=this.stack[this.stack.length-1];N.title=L}function Xe(){o("inReference")}function vt(){o("referenceType","collapsed")}function ot(L){let N=this.resume(),K=this.stack[this.stack.length-1];K.label=N,K.identifier=We(this.sliceSerialize(L)).toLowerCase(),o("referenceType","full")}function ce(L){o("characterReferenceType",L.type)}function zt(L){let N=this.sliceSerialize(L),K=a("characterReferenceType"),me;K?(me=Fo(N,K==="characterReferenceMarkerNumeric"?10:16),o("characterReferenceType")):me=lr(N);let Ot=this.stack.pop();Ot.value+=me,Ot.position.end=s(L.end)}function St(L){P.call(this,L);let N=this.stack[this.stack.length-1];N.url=this.sliceSerialize(L)}function It(L){P.call(this,L);let N=this.stack[this.stack.length-1];N.url="mailto:"+this.sliceSerialize(L)}function Jt(){return{type:"blockquote",children:[]}}function wn(){return{type:"code",lang:null,meta:null,value:""}}function Ya(){return{type:"inlineCode",value:""}}function ja(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function Ji(){return{type:"emphasis",children:[]}}function Cr(){return{type:"heading",depth:void 0,children:[]}}function eo(){return{type:"break"}}function to(){return{type:"html",value:""}}function $t(){return{type:"image",title:null,url:"",alt:null}}function xn(){return{type:"link",title:null,url:"",children:[]}}function Ar(L){return{type:"list",ordered:L.type==="listOrdered",start:null,spread:L._spread,children:[]}}function no(L){return{type:"listItem",spread:L._spread,checked:null,children:[]}}function Er(){return{type:"paragraph",children:[]}}function ro(){return{type:"strong",children:[]}}function io(){return{type:"text",value:""}}function oo(){return{type:"thematicBreak"}}}function lp(e,t){let n=-1;for(;++n<t.length;){let r=t[n];Array.isArray(r)?lp(e,r):O0(e,r)}return e}function O0(e,t){let n;for(n in t)if(Bs.call(t,n)){let r=n==="canContainEols"||n==="transforms",o=(Bs.call(e,n)?e[n]:void 0)||(e[n]=r?[]:{}),a=t[n];a&&(r?e[n]=[...o,...a]:Object.assign(o,a))}}function Rs(e){Object.assign(this,{Parser:n=>{let r=this.data("settings");return Fs(n,Object.assign({},r,e,{extensions:this.data("micromarkExtensions")||[],mdastExtensions:this.data("fromMarkdownExtensions")||[]}))}})}var up=Rs;var cp={}.hasOwnProperty;function pp(e,t){var n=t||{};function r(i){var o=r.invalid,a=r.handlers;if(i&&cp.call(i,e)&&(o=cp.call(a,i[e])?a[i[e]]:r.unknown),o)return o.apply(this,arguments)}return r.handlers=n.handlers||{},r.invalid=n.invalid,r.unknown=n.unknown,r}function Ur(e,t){let n=-1,r;if(t.extensions)for(;++n<t.extensions.length;)Ur(e,t.extensions[n]);for(r in t)r==="extensions"||(r==="unsafe"||r==="join"?e[r]=[...e[r]||[],...t[r]||[]]:r==="handlers"?e[r]=Object.assign(e[r],t[r]||{}):e.options[r]=t[r]);return e}function X(e){let t=e||{},n=t.now||{},r=t.lineShift||0,i=n.line||1,o=n.column||1;return{move:l,current:a,shift:s};function a(){return{now:{line:i,column:o},lineShift:r}}function s(u){r+=u}function l(u=""){let c=u.split(/\r?\n|\r/g),p=c[c.length-1];return i+=c.length-1,o=c.length===1?o+p.length:1+p.length+r,u}}function Dt(e,t,n){let r=t.indexStack,i=e.children||[],o=X(n),a=[],s=-1;for(r.push(-1);++s<i.length;){let u=i[s];r[r.length-1]=s,a.push(o.move(t.handle(u,e,t,{before:`
`,after:`
`,...o.current()}))),u.type!=="list"&&(t.bulletLastUsed=void 0),s<i.length-1&&a.push(o.move(l(u,i[s+1])))}return r.pop(),a.join("");function l(u,c){let p=t.join.length;for(;p--;){let m=t.join[p](u,c,e,t);if(m===!0||m===1)break;if(typeof m=="number")return`
`.repeat(1+m);if(m===!1)return`
<!---->
`}return`
`}}var T0=/\r?\n|\r/g;function un(e,t){let n=[],r=0,i=0,o;for(;o=T0.exec(e);)a(e.slice(r,o.index)),n.push(o[0]),r=o.index+o[0].length,i++;return a(e.slice(r)),n.join("");function a(s){n.push(t(s,i,!s))}}function mp(e,t,n,r){let i=n.enter("blockquote"),o=X(r);o.move("> "),o.shift(2);let a=un(Dt(e,n,o.current()),C0);return i(),a}function C0(e,t,n){return">"+(n?"":" ")+e}function Do(e,t){return fp(e,t.inConstruct,!0)&&!fp(e,t.notInConstruct,!1)}function fp(e,t,n){if(!t)return n;typeof t=="string"&&(t=[t]);let r=-1;for(;++r<t.length;)if(e.includes(t[r]))return!0;return!1}function Ds(e,t,n,r){let i=-1;for(;++i<n.unsafe.length;)if(n.unsafe[i].character===`
`&&Do(n.stack,n.unsafe[i]))return/[ \t]/.test(r.before)?"":" ";return`\\
`}function Po(e,t){var n=String(e),r=n.indexOf(t),i=r,o=0,a=0;if(typeof t!="string"||t.length!==1)throw new Error("Expected character");for(;r!==-1;)r===i?++o>a&&(a=o):o=1,i=r+1,r=n.indexOf(t,i);return a}function Gr(e,t){return Boolean(!t.options.fences&&e.value&&!e.lang&&/[^ \r\n]/.test(e.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(e.value))}function dp(e){let t=e.options.fence||"`";if(t!=="`"&&t!=="~")throw new Error("Cannot serialize code with `"+t+"` for `options.fence`, expected `` ` `` or `~`");return t}function No(e){if(!e._compiled){let t=(e.atBreak?"[\\r\\n][\\t ]*":"")+(e.before?"(?:"+e.before+")":"");e._compiled=new RegExp((t?"("+t+")":"")+(/[|\\{}()[\]^$+*?.-]/.test(e.character)?"\\":"")+e.character+(e.after?"(?:"+e.after+")":""),"g")}return e._compiled}function ie(e,t,n){let r=(n.before||"")+(t||"")+(n.after||""),i=[],o=[],a={},s=-1;for(;++s<e.unsafe.length;){let c=e.unsafe[s];if(!Do(e.stack,c))continue;let p=No(c),m;for(;m=p.exec(r);){let f="before"in c||Boolean(c.atBreak),d="after"in c,h=m.index+(f?m[1].length:0);i.includes(h)?(a[h].before&&!f&&(a[h].before=!1),a[h].after&&!d&&(a[h].after=!1)):(i.push(h),a[h]={before:f,after:d})}}i.sort(A0);let l=n.before?n.before.length:0,u=r.length-(n.after?n.after.length:0);for(s=-1;++s<i.length;){let c=i[s];c<l||c>=u||c+1<u&&i[s+1]===c+1&&a[c].after&&!a[c+1].before&&!a[c+1].after||i[s-1]===c-1&&a[c].before&&!a[c-1].before&&!a[c-1].after||(l!==c&&o.push(hp(r.slice(l,c),"\\")),l=c,/[!-/:-@[-`{-~]/.test(r.charAt(c))&&(!n.encode||!n.encode.includes(r.charAt(c)))?o.push("\\"):(o.push("&#x"+r.charCodeAt(c).toString(16).toUpperCase()+";"),l++))}return o.push(hp(r.slice(l,u),n.after)),o.join("")}function A0(e,t){return e-t}function hp(e,t){let n=/\\(?=[!-/:-@[-`{-~])/g,r=[],i=[],o=e+t,a=-1,s=0,l;for(;l=n.exec(o);)r.push(l.index);for(;++a<r.length;)s!==r[a]&&i.push(e.slice(s,r[a])),i.push("\\"),s=r[a];return i.push(e.slice(s)),i.join("")}function gp(e,t,n,r){let i=dp(n),o=e.value||"",a=i==="`"?"GraveAccent":"Tilde";if(Gr(e,n)){let p=n.enter("codeIndented"),m=un(o,E0);return p(),m}let s=X(r),l=i.repeat(Math.max(Po(o,i)+1,3)),u=n.enter("codeFenced"),c=s.move(l);if(e.lang){let p=n.enter("codeFencedLang"+a);c+=s.move(ie(n,e.lang,{before:c,after:" ",encode:["`"],...s.current()})),p()}if(e.lang&&e.meta){let p=n.enter("codeFencedMeta"+a);c+=s.move(" "),c+=s.move(ie(n,e.meta,{before:c,after:`
`,encode:["`"],...s.current()})),p()}return c+=s.move(`
`),o&&(c+=s.move(o+`
`)),c+=s.move(l),u(),c}function E0(e,t,n){return(n?"":" ")+e}function qt(e){return e.label||!e.identifier?e.label||"":Ro(e.identifier)}function ur(e){let t=e.options.quote||'"';if(t!=='"'&&t!=="'")throw new Error("Cannot serialize title with `"+t+"` for `options.quote`, expected `\"`, or `'`");return t}function yp(e,t,n,r){let i=ur(n),o=i==='"'?"Quote":"Apostrophe",a=n.enter("definition"),s=n.enter("label"),l=X(r),u=l.move("[");return u+=l.move(ie(n,qt(e),{before:u,after:"]",...l.current()})),u+=l.move("]: "),s(),!e.url||/[\0- \u007F]/.test(e.url)?(s=n.enter("destinationLiteral"),u+=l.move("<"),u+=l.move(ie(n,e.url,{before:u,after:">",...l.current()})),u+=l.move(">")):(s=n.enter("destinationRaw"),u+=l.move(ie(n,e.url,{before:u,after:e.title?" ":`
`,...l.current()}))),s(),e.title&&(s=n.enter("title"+o),u+=l.move(" "+i),u+=l.move(ie(n,e.title,{before:u,after:i,...l.current()})),u+=l.move(i),s()),a(),u}function bp(e){let t=e.options.emphasis||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize emphasis with `"+t+"` for `options.emphasis`, expected `*`, or `_`");return t}function Fe(e,t,n){let r=t.indexStack,i=e.children||[],o=[],a=-1,s=n.before;r.push(-1);let l=X(n);for(;++a<i.length;){let u=i[a],c;if(r[r.length-1]=a,a+1<i.length){let p=t.handle.handlers[i[a+1].type];p&&p.peek&&(p=p.peek),c=p?p(i[a+1],e,t,{before:"",after:"",...l.current()}).charAt(0):""}else c=n.after;o.length>0&&(s==="\r"||s===`
`)&&u.type==="html"&&(o[o.length-1]=o[o.length-1].replace(/(\r?\n|\r)$/," "),s=" ",l=X(n),l.move(o.join(""))),o.push(l.move(t.handle(u,e,t,{...l.current(),before:s,after:c}))),s=o[o.length-1].slice(-1)}return r.pop(),o.join("")}Ps.peek=L0;function Ps(e,t,n,r){let i=bp(n),o=n.enter("emphasis"),a=X(r),s=a.move(i);return s+=a.move(Fe(e,n,{before:s,after:i,...a.current()})),s+=a.move(i),o(),s}function L0(e,t,n){return n.options.emphasis||"*"}function zo(e,t){let n=!1;return rn(e,r=>{if("value"in r&&/\r?\n|\r/.test(r.value)||r.type==="break")return n=!0,zr}),Boolean((!e.depth||e.depth<3)&&ar(e)&&(t.options.setext||n))}function wp(e,t,n,r){let i=Math.max(Math.min(6,e.depth||1),1),o=X(r);if(zo(e,n)){let c=n.enter("headingSetext"),p=n.enter("phrasing"),m=Fe(e,n,{...o.current(),before:`
`,after:`
`});return p(),c(),m+`
`+(i===1?"=":"-").repeat(m.length-(Math.max(m.lastIndexOf("\r"),m.lastIndexOf(`
`))+1))}let a="#".repeat(i),s=n.enter("headingAtx"),l=n.enter("phrasing");o.move(a+" ");let u=Fe(e,n,{before:"# ",after:`
`,...o.current()});return/^[\t ]/.test(u)&&(u="&#x"+u.charCodeAt(0).toString(16).toUpperCase()+";"+u.slice(1)),u=u?a+" "+u:a,n.options.closeAtx&&(u+=" "+a),l(),s(),u}Ns.peek=_0;function Ns(e){return e.value||""}function _0(){return"<"}zs.peek=I0;function zs(e,t,n,r){let i=ur(n),o=i==='"'?"Quote":"Apostrophe",a=n.enter("image"),s=n.enter("label"),l=X(r),u=l.move("![");return u+=l.move(ie(n,e.alt,{before:u,after:"]",...l.current()})),u+=l.move("]("),s(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(s=n.enter("destinationLiteral"),u+=l.move("<"),u+=l.move(ie(n,e.url,{before:u,after:">",...l.current()})),u+=l.move(">")):(s=n.enter("destinationRaw"),u+=l.move(ie(n,e.url,{before:u,after:e.title?" ":")",...l.current()}))),s(),e.title&&(s=n.enter("title"+o),u+=l.move(" "+i),u+=l.move(ie(n,e.title,{before:u,after:i,...l.current()})),u+=l.move(i),s()),u+=l.move(")"),a(),u}function I0(){return"!"}$s.peek=M0;function $s(e,t,n,r){let i=e.referenceType,o=n.enter("imageReference"),a=n.enter("label"),s=X(r),l=s.move("!["),u=ie(n,e.alt,{before:l,after:"]",...s.current()});l+=s.move(u+"]["),a();let c=n.stack;n.stack=[],a=n.enter("reference");let p=ie(n,qt(e),{before:l,after:"]",...s.current()});return a(),n.stack=c,o(),i==="full"||!u||u!==p?l+=s.move(p+"]"):i==="shortcut"?l=l.slice(0,-1):l+=s.move("]"),l}function M0(){return"!"}Zr.peek=B0;function Zr(e,t,n){let r=e.value||"",i="`",o=-1;for(;new RegExp("(^|[^`])"+i+"([^`]|$)").test(r);)i+="`";for(/[^ \r\n]/.test(r)&&(/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||/^`|`$/.test(r))&&(r=" "+r+" ");++o<n.unsafe.length;){let a=n.unsafe[o],s=No(a),l;if(!!a.atBreak)for(;l=s.exec(r);){let u=l.index;r.charCodeAt(u)===10&&r.charCodeAt(u-1)===13&&u--,r=r.slice(0,u)+" "+r.slice(l.index+1)}}return i+r+i}function B0(){return"`"}function Hs(e,t){let n=ar(e);return Boolean(!t.options.resourceLink&&e.url&&!e.title&&e.children&&e.children.length===1&&e.children[0].type==="text"&&(n===e.url||"mailto:"+n===e.url)&&/^[a-z][a-z+.-]+:/i.test(e.url)&&!/[\0- <>\u007F]/.test(e.url))}Ys.peek=F0;function Ys(e,t,n,r){let i=ur(n),o=i==='"'?"Quote":"Apostrophe",a=X(r),s,l;if(Hs(e,n)){let c=n.stack;n.stack=[],s=n.enter("autolink");let p=a.move("<");return p+=a.move(Fe(e,n,{before:p,after:">",...a.current()})),p+=a.move(">"),s(),n.stack=c,p}s=n.enter("link"),l=n.enter("label");let u=a.move("[");return u+=a.move(Fe(e,n,{before:u,after:"](",...a.current()})),u+=a.move("]("),l(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(l=n.enter("destinationLiteral"),u+=a.move("<"),u+=a.move(ie(n,e.url,{before:u,after:">",...a.current()})),u+=a.move(">")):(l=n.enter("destinationRaw"),u+=a.move(ie(n,e.url,{before:u,after:e.title?" ":")",...a.current()}))),l(),e.title&&(l=n.enter("title"+o),u+=a.move(" "+i),u+=a.move(ie(n,e.title,{before:u,after:i,...a.current()})),u+=a.move(i),l()),u+=a.move(")"),s(),u}function F0(e,t,n){return Hs(e,n)?"<":"["}js.peek=R0;function js(e,t,n,r){let i=e.referenceType,o=n.enter("linkReference"),a=n.enter("label"),s=X(r),l=s.move("["),u=Fe(e,n,{before:l,after:"]",...s.current()});l+=s.move(u+"]["),a();let c=n.stack;n.stack=[],a=n.enter("reference");let p=ie(n,qt(e),{before:l,after:"]",...s.current()});return a(),n.stack=c,o(),i==="full"||!u||u!==p?l+=s.move(p+"]"):i==="shortcut"?l=l.slice(0,-1):l+=s.move("]"),l}function R0(){return"["}function cr(e){let t=e.options.bullet||"*";if(t!=="*"&&t!=="+"&&t!=="-")throw new Error("Cannot serialize items with `"+t+"` for `options.bullet`, expected `*`, `+`, or `-`");return t}function xp(e){let t=cr(e),n=e.options.bulletOther;if(!n)return t==="*"?"-":"*";if(n!=="*"&&n!=="+"&&n!=="-")throw new Error("Cannot serialize items with `"+n+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(n===t)throw new Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+n+"`) to be different");return n}function $o(e){let t=e.options.bulletOrdered||".";if(t!=="."&&t!==")")throw new Error("Cannot serialize items with `"+t+"` for `options.bulletOrdered`, expected `.` or `)`");return t}function kp(e){let t=$o(e),n=e.options.bulletOrderedOther;if(!n)return t==="."?")":".";if(n!=="."&&n!==")")throw new Error("Cannot serialize items with `"+n+"` for `options.bulletOrderedOther`, expected `*`, `+`, or `-`");if(n===t)throw new Error("Expected `bulletOrdered` (`"+t+"`) and `bulletOrderedOther` (`"+n+"`) to be different");return n}function Ho(e){let t=e.options.rule||"*";if(t!=="*"&&t!=="-"&&t!=="_")throw new Error("Cannot serialize rules with `"+t+"` for `options.rule`, expected `*`, `-`, or `_`");return t}function vp(e,t,n,r){let i=n.enter("list"),o=n.bulletCurrent,a=e.ordered?$o(n):cr(n),s=e.ordered?kp(n):xp(n),l=n.bulletLastUsed,u=!1;if(t&&(e.ordered?n.options.bulletOrderedOther:n.options.bulletOther)&&l&&a===l&&(u=!0),!e.ordered){let p=e.children?e.children[0]:void 0;if((a==="*"||a==="-")&&p&&(!p.children||!p.children[0])&&n.stack[n.stack.length-1]==="list"&&n.stack[n.stack.length-2]==="listItem"&&n.stack[n.stack.length-3]==="list"&&n.stack[n.stack.length-4]==="listItem"&&n.indexStack[n.indexStack.length-1]===0&&n.indexStack[n.indexStack.length-2]===0&&n.indexStack[n.indexStack.length-3]===0&&(u=!0),Ho(n)===a&&p){let m=-1;for(;++m<e.children.length;){let f=e.children[m];if(f&&f.type==="listItem"&&f.children&&f.children[0]&&f.children[0].type==="thematicBreak"){u=!0;break}}}}u&&(a=s),n.bulletCurrent=a;let c=Dt(e,n,r);return n.bulletLastUsed=a,n.bulletCurrent=o,i(),c}function Sp(e){let t=e.options.listItemIndent||"tab";if(t===1||t==="1")return"one";if(t!=="tab"&&t!=="one"&&t!=="mixed")throw new Error("Cannot serialize items with `"+t+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return t}function Yo(e,t,n,r){let i=Sp(n),o=n.bulletCurrent||cr(n);t&&t.type==="list"&&t.ordered&&(o=(typeof t.start=="number"&&t.start>-1?t.start:1)+(n.options.incrementListMarker===!1?0:t.children.indexOf(e))+o);let a=o.length+1;(i==="tab"||i==="mixed"&&(t&&t.type==="list"&&t.spread||e.spread))&&(a=Math.ceil(a/4)*4);let s=X(r);s.move(o+" ".repeat(a-o.length)),s.shift(a);let l=n.enter("listItem"),u=un(Dt(e,n,s.current()),c);return l(),u;function c(p,m,f){return m?(f?"":" ".repeat(a))+p:(f?o:o+" ".repeat(a-o.length))+p}}function Op(e,t,n,r){let i=n.enter("paragraph"),o=n.enter("phrasing"),a=Fe(e,n,r);return o(),i(),a}function Tp(e,t,n,r){return Dt(e,n,r)}function Cp(e){let t=e.options.strong||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}qs.peek=D0;function qs(e,t,n,r){let i=Cp(n),o=n.enter("strong"),a=X(r),s=a.move(i+i);return s+=a.move(Fe(e,n,{before:s,after:i,...a.current()})),s+=a.move(i+i),o(),s}function D0(e,t,n){return n.options.strong||"*"}function Ap(e,t,n,r){return ie(n,e.value,r)}function Ep(e){let t=e.options.ruleRepetition||3;if(t<3)throw new Error("Cannot serialize rules with repetition `"+t+"` for `options.ruleRepetition`, expected `3` or more");return t}function Lp(e,t,n){let r=(Ho(n)+(n.options.ruleSpaces?" ":"")).repeat(Ep(n));return n.options.ruleSpaces?r.slice(0,-1):r}var _p={blockquote:mp,break:Ds,code:gp,definition:yp,emphasis:Ps,hardBreak:Ds,heading:wp,html:Ns,image:zs,imageReference:$s,inlineCode:Zr,link:Ys,linkReference:js,list:vp,listItem:Yo,paragraph:Op,root:Tp,strong:qs,text:Ap,thematicBreak:Lp};var Ip=[P0];function P0(e,t,n,r){if(t.type==="code"&&Gr(t,r)&&(e.type==="list"||e.type===t.type&&Gr(e,r))||e.type==="list"&&e.type===t.type&&Boolean(e.ordered)===Boolean(t.ordered)&&!(e.ordered?r.options.bulletOrderedOther:r.options.bulletOther))return!1;if("spread"in n&&typeof n.spread=="boolean")return e.type==="paragraph"&&(e.type===t.type||t.type==="definition"||t.type==="heading"&&zo(t,r))?void 0:n.spread?1:0}var Mn=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"],Mp=[{character:" ",after:"[\\r\\n]",inConstruct:"phrasing"},{character:" ",before:"[\\r\\n]",inConstruct:"phrasing"},{character:" ",inConstruct:["codeFencedLangGraveAccent","codeFencedLangTilde"]},{character:"\r",inConstruct:["codeFencedLangGraveAccent","codeFencedLangTilde","codeFencedMetaGraveAccent","codeFencedMetaTilde","destinationLiteral","headingAtx"]},{character:`
`,inConstruct:["codeFencedLangGraveAccent","codeFencedLangTilde","codeFencedMetaGraveAccent","codeFencedMetaTilde","destinationLiteral","headingAtx"]},{character:" ",after:"[\\r\\n]",inConstruct:"phrasing"},{character:" ",before:"[\\r\\n]",inConstruct:"phrasing"},{character:" ",inConstruct:["codeFencedLangGraveAccent","codeFencedLangTilde"]},{character:"!",after:"\\[",inConstruct:"phrasing",notInConstruct:Mn},{character:'"',inConstruct:"titleQuote"},{atBreak:!0,character:"#"},{character:"#",inConstruct:"headingAtx",after:`(?:[\r
]|$)`},{character:"&",after:"[#A-Za-z]",inConstruct:"phrasing"},{character:"'",inConstruct:"titleApostrophe"},{character:"(",inConstruct:"destinationRaw"},{before:"\\]",character:"(",inConstruct:"phrasing",notInConstruct:Mn},{atBreak:!0,before:"\\d+",character:")"},{character:")",inConstruct:"destinationRaw"},{atBreak:!0,character:"*"},{character:"*",inConstruct:"phrasing",notInConstruct:Mn},{atBreak:!0,character:"+"},{atBreak:!0,character:"-"},{atBreak:!0,before:"\\d+",character:".",after:`(?:[ \r
]|$)`},{atBreak:!0,character:"<",after:"[!/?A-Za-z]"},{character:"<",after:"[!/?A-Za-z]",inConstruct:"phrasing",notInConstruct:Mn},{character:"<",inConstruct:"destinationLiteral"},{atBreak:!0,character:"="},{atBreak:!0,character:">"},{character:">",inConstruct:"destinationLiteral"},{atBreak:!0,character:"["},{character:"[",inConstruct:"phrasing",notInConstruct:Mn},{character:"[",inConstruct:["label","reference"]},{character:"\\",after:"[\\r\\n]",inConstruct:"phrasing"},{character:"]",inConstruct:["label","reference"]},{atBreak:!0,character:"_"},{character:"_",inConstruct:"phrasing",notInConstruct:Mn},{atBreak:!0,character:"`"},{character:"`",inConstruct:["codeFencedLangGraveAccent","codeFencedMetaGraveAccent"]},{character:"`",inConstruct:"phrasing",notInConstruct:Mn},{atBreak:!0,character:"~"}];function Vs(e,t={}){let n={enter:i,stack:[],unsafe:[],join:[],handlers:{},options:{},indexStack:[]};Ur(n,{unsafe:Mp,join:Ip,handlers:_p}),Ur(n,t),n.options.tightDefinitions&&Ur(n,{join:[$0]}),n.handle=pp("type",{invalid:N0,unknown:z0,handlers:n.handlers});let r=n.handle(e,null,n,{before:`
`,after:`
`,now:{line:1,column:1},lineShift:0});return r&&r.charCodeAt(r.length-1)!==10&&r.charCodeAt(r.length-1)!==13&&(r+=`
`),r;function i(o){return n.stack.push(o),a;function a(){n.stack.pop()}}}function N0(e){throw new Error("Cannot handle value `"+e+"`, expected node")}function z0(e){throw new Error("Cannot handle unknown node `"+e.type+"`")}function $0(e,t){if(e.type==="definition"&&e.type===t.type)return 0}function Ks(e){Object.assign(this,{Compiler:n=>{let r=this.data("settings");return Vs(n,Object.assign({},r,e,{extensions:this.data("toMarkdownExtensions")||[]}))}})}var Bp=Ks;var Ws=ws().use(up).use(Bp).freeze();var H0={tokenize:V0,partial:!0},Rp={tokenize:K0,partial:!0},Dp={tokenize:W0,partial:!0},pr={tokenize:G0,partial:!0},Pp={tokenize:U0,partial:!0},Np={tokenize:j0,previous:Hp},zp={tokenize:q0,previous:Zs},Vt={tokenize:Y0,previous:Yp},Pt={},Us={text:Pt},Bn=48;for(;Bn<123;)Pt[Bn]=Vt,Bn++,Bn===58?Bn=65:Bn===91&&(Bn=97);Pt[43]=Vt;Pt[45]=Vt;Pt[46]=Vt;Pt[95]=Vt;Pt[72]=[Vt,zp];Pt[104]=[Vt,zp];Pt[87]=[Vt,Np];Pt[119]=[Vt,Np];function Y0(e,t,n){let r=this,i,o;return a;function a(f){return!Fp(f)||!Yp(r.previous)||Qs(r.events)?n(f):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),s(f))}function s(f){return Fp(f)?(e.consume(f),s):f===64?(e.consume(f),l):n(f)}function l(f){return f===46?e.check(pr,m,u)(f):f===45||f===95?e.check(pr,n,c)(f):Se(f)?(!o&&Cn(f)&&(o=!0),e.consume(f),l):m(f)}function u(f){return e.consume(f),i=!0,o=void 0,l}function c(f){return e.consume(f),p}function p(f){return f===46?e.check(pr,n,u)(f):l(f)}function m(f){return i&&!o?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(f)):n(f)}}function j0(e,t,n){let r=this;return i;function i(a){return a!==87&&a!==119||!Hp(r.previous)||Qs(r.events)?n(a):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(H0,e.attempt(Rp,e.attempt(Dp,o),n),n)(a))}function o(a){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(a)}}function q0(e,t,n){let r=this;return i;function i(d){return d!==72&&d!==104||!Zs(r.previous)||Qs(r.events)?n(d):(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),e.consume(d),o)}function o(d){return d===84||d===116?(e.consume(d),a):n(d)}function a(d){return d===84||d===116?(e.consume(d),s):n(d)}function s(d){return d===80||d===112?(e.consume(d),l):n(d)}function l(d){return d===83||d===115?(e.consume(d),u):u(d)}function u(d){return d===58?(e.consume(d),c):n(d)}function c(d){return d===47?(e.consume(d),p):n(d)}function p(d){return d===47?(e.consume(d),m):n(d)}function m(d){return d===null||an(d)||An(d)||En(d)?n(d):e.attempt(Rp,e.attempt(Dp,f),n)(d)}function f(d){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(d)}}function V0(e,t,n){return r;function r(l){return e.consume(l),i}function i(l){return l===87||l===119?(e.consume(l),o):n(l)}function o(l){return l===87||l===119?(e.consume(l),a):n(l)}function a(l){return l===46?(e.consume(l),s):n(l)}function s(l){return l===null||D(l)?n(l):t(l)}}function K0(e,t,n){let r,i;return o;function o(l){return l===38?e.check(Pp,s,a)(l):l===46||l===95?e.check(pr,s,a)(l):l===null||an(l)||An(l)||l!==45&&En(l)?s(l):(e.consume(l),o)}function a(l){return l===46?(i=r,r=void 0,e.consume(l),o):(l===95&&(r=!0),e.consume(l),o)}function s(l){return!i&&!r?t(l):n(l)}}function W0(e,t){let n=0;return r;function r(a){return a===38?e.check(Pp,t,i)(a):(a===40&&n++,a===41?e.check(pr,o,i)(a):Gs(a)?t(a):$p(a)?e.check(pr,t,i)(a):(e.consume(a),r))}function i(a){return e.consume(a),r}function o(a){return n--,n<0?t(a):i(a)}}function U0(e,t,n){return r;function r(a){return e.consume(a),i}function i(a){return Ke(a)?(e.consume(a),i):a===59?(e.consume(a),o):n(a)}function o(a){return Gs(a)?t(a):n(a)}}function G0(e,t,n){return r;function r(o){return e.consume(o),i}function i(o){return $p(o)?(e.consume(o),i):Gs(o)?t(o):n(o)}}function $p(e){return e===33||e===34||e===39||e===41||e===42||e===44||e===46||e===58||e===59||e===60||e===63||e===95||e===126}function Gs(e){return e===null||e===60||J(e)}function Fp(e){return e===43||e===45||e===46||e===95||Se(e)}function Hp(e){return e===null||e===40||e===42||e===95||e===126||J(e)}function Zs(e){return e===null||!Ke(e)}function Yp(e){return e!==47&&Zs(e)}function Qs(e){let t=e.length,n=!1;for(;t--;){let r=e[t][1];if((r.type==="labelLink"||r.type==="labelImage")&&!r._balanced){n=!0;break}if(r._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}function gt(e){let t=[],n=-1,r=0,i=0;for(;++n<e.length;){let o=e.charCodeAt(n),a="";if(o===37&&Se(e.charCodeAt(n+1))&&Se(e.charCodeAt(n+2)))i=2;else if(o<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(o))||(a=String.fromCharCode(o));else if(o>55295&&o<57344){let s=e.charCodeAt(n+1);o<56320&&s>56319&&s<57344?(a=String.fromCharCode(o,s),i=1):a="\uFFFD"}else a=String.fromCharCode(o);a&&(t.push(e.slice(r,n),encodeURIComponent(a)),r=n+i+1,a=""),i&&(n+=i,i=0)}return t.join("")+e.slice(r)}var Z0={tokenize:ry,partial:!0};function Xs(){return{document:{[91]:{tokenize:ey,continuation:{tokenize:ty},exit:ny}},text:{[91]:{tokenize:J0},[93]:{add:"after",tokenize:Q0,resolveTo:X0}}}}function Q0(e,t,n){let r=this,i=r.events.length,o=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),a;for(;i--;){let l=r.events[i][1];if(l.type==="labelImage"){a=l;break}if(l.type==="gfmFootnoteCall"||l.type==="labelLink"||l.type==="label"||l.type==="image"||l.type==="link")break}return s;function s(l){if(!a||!a._balanced)return n(l);let u=We(r.sliceSerialize({start:a.end,end:r.now()}));return u.charCodeAt(0)!==94||!o.includes(u.slice(1))?n(l):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(l),e.exit("gfmFootnoteCallLabelMarker"),t(l))}}function X0(e,t){let n=e.length,r;for(;n--;)if(e[n][1].type==="labelImage"&&e[n][0]==="enter"){r=e[n][1];break}e[n+1][1].type="data",e[n+3][1].type="gfmFootnoteCallLabelMarker";let i={type:"gfmFootnoteCall",start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},o={type:"gfmFootnoteCallMarker",start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};o.end.column++,o.end.offset++,o.end._bufferIndex++;let a={type:"gfmFootnoteCallString",start:Object.assign({},o.end),end:Object.assign({},e[e.length-1][1].start)},s={type:"chunkString",contentType:"string",start:Object.assign({},a.start),end:Object.assign({},a.end)},l=[e[n+1],e[n+2],["enter",i,t],e[n+3],e[n+4],["enter",o,t],["exit",o,t],["enter",a,t],["enter",s,t],["exit",s,t],["exit",a,t],e[e.length-2],e[e.length-1],["exit",i,t]];return e.splice(n,e.length-n+1,...l),e}function J0(e,t,n){let r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),o=0,a;return s;function s(m){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(m),e.exit("gfmFootnoteCallLabelMarker"),l}function l(m){return m!==94?n(m):(e.enter("gfmFootnoteCallMarker"),e.consume(m),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",u)}function u(m){let f;return m===null||m===91||o++>999?n(m):m===93?a?(e.exit("chunkString"),f=e.exit("gfmFootnoteCallString"),i.includes(We(r.sliceSerialize(f)))?p(m):n(m)):n(m):(e.consume(m),J(m)||(a=!0),m===92?c:u)}function c(m){return m===91||m===92||m===93?(e.consume(m),o++,u):u(m)}function p(m){return e.enter("gfmFootnoteCallLabelMarker"),e.consume(m),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t}}function ey(e,t,n){let r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),o,a=0,s;return l;function l(h){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(h),e.exit("gfmFootnoteDefinitionLabelMarker"),u}function u(h){return h===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(h),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),c):n(h)}function c(h){let g;return h===null||h===91||a>999?n(h):h===93?s?(g=e.exit("gfmFootnoteDefinitionLabelString"),o=We(r.sliceSerialize(g)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(h),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),f):n(h):D(h)?(e.enter("lineEnding"),e.consume(h),e.exit("lineEnding"),a++,c):(e.enter("chunkString").contentType="string",p(h))}function p(h){return h===null||D(h)||h===91||h===93||a>999?(e.exit("chunkString"),c(h)):(J(h)||(s=!0),a++,e.consume(h),h===92?m:p)}function m(h){return h===91||h===92||h===93?(e.consume(h),a++,p):p(h)}function f(h){return h===58?(e.enter("definitionMarker"),e.consume(h),e.exit("definitionMarker"),Y(e,d,"gfmFootnoteDefinitionWhitespace")):n(h)}function d(h){return i.includes(o)||i.push(o),t(h)}}function ty(e,t,n){return e.check(Rt,t,e.attempt(Z0,t,n))}function ny(e){e.exit("gfmFootnoteDefinition")}function ry(e,t,n){let r=this;return Y(e,i,"gfmFootnoteDefinitionIndent",4+1);function i(o){let a=r.events[r.events.length-1];return a&&a[1].type==="gfmFootnoteDefinitionIndent"&&a[2].sliceSerialize(a[1],!0).length===4?t(o):n(o)}}function Js(e={}){let t=e.singleTilde,n={tokenize:i,resolveAll:r};return t==null&&(t=!0),{text:{[126]:n},insideSpan:{null:[n]},attentionMarkers:{null:[126]}};function r(o,a){let s=-1;for(;++s<o.length;)if(o[s][0]==="enter"&&o[s][1].type==="strikethroughSequenceTemporary"&&o[s][1]._close){let l=s;for(;l--;)if(o[l][0]==="exit"&&o[l][1].type==="strikethroughSequenceTemporary"&&o[l][1]._open&&o[s][1].end.offset-o[s][1].start.offset===o[l][1].end.offset-o[l][1].start.offset){o[s][1].type="strikethroughSequence",o[l][1].type="strikethroughSequence";let u={type:"strikethrough",start:Object.assign({},o[l][1].start),end:Object.assign({},o[s][1].end)},c={type:"strikethroughText",start:Object.assign({},o[l][1].end),end:Object.assign({},o[s][1].start)},p=[["enter",u,a],["enter",o[l][1],a],["exit",o[l][1],a],["enter",c,a]];ve(p,p.length,0,ln(a.parser.constructs.insideSpan.null,o.slice(l+1,s),a)),ve(p,p.length,0,[["exit",c,a],["enter",o[s][1],a],["exit",o[s][1],a],["exit",u,a]]),ve(o,l-1,s-l+3,p),s=l+p.length-2;break}}for(s=-1;++s<o.length;)o[s][1].type==="strikethroughSequenceTemporary"&&(o[s][1].type="data");return o}function i(o,a,s){let l=this.previous,u=this.events,c=0;return p;function p(f){return l===126&&u[u.length-1][1].type!=="characterEscape"?s(f):(o.enter("strikethroughSequenceTemporary"),m(f))}function m(f){let d=sr(l);if(f===126)return c>1?s(f):(o.consume(f),c++,m);if(c<2&&!t)return s(f);let h=o.exit("strikethroughSequenceTemporary"),g=sr(f);return h._open=!g||g===2&&Boolean(d),h._close=!d||d===2&&Boolean(g),a(f)}}}var el={flow:{null:{tokenize:oy,resolve:iy}}},jp={tokenize:ay,partial:!0};function iy(e,t){let n=-1,r,i,o,a,s,l,u;for(;++n<e.length;){let c=e[n][1];if(o&&(c.type==="temporaryTableCellContent"&&(a=a||n,s=n),(c.type==="tableCellDivider"||c.type==="tableRow")&&s)){let p={type:"tableContent",start:e[a][1].start,end:e[s][1].end},m={type:"chunkText",start:p.start,end:p.end,contentType:"text"};e.splice(a,s-a+1,["enter",p,t],["enter",m,t],["exit",m,t],["exit",p,t]),n-=s-a-3,a=void 0,s=void 0}if(e[n][0]==="exit"&&l!==void 0&&l+(u?0:1)<n&&(c.type==="tableCellDivider"||c.type==="tableRow"&&(l+3<n||e[l][1].type!=="whitespace"))){let p={type:i?"tableDelimiter":r?"tableHeader":"tableData",start:e[l][1].start,end:e[n][1].end};e.splice(n+(c.type==="tableCellDivider"?1:0),0,["exit",p,t]),e.splice(l,0,["enter",p,t]),n+=2,l=n+1,u=!0}c.type==="tableRow"&&(o=e[n][0]==="enter",o&&(l=n+1,u=!1)),c.type==="tableDelimiterRow"&&(i=e[n][0]==="enter",i&&(l=n+1,u=!1)),c.type==="tableHead"&&(r=e[n][0]==="enter")}return e}function oy(e,t,n){let r=this,i=[],o=0,a,s;return l;function l(C){return e.enter("table")._align=i,e.enter("tableHead"),e.enter("tableRow"),C===124?u(C):(o++,e.enter("temporaryTableCellContent"),m(C))}function u(C){return e.enter("tableCellDivider"),e.consume(C),e.exit("tableCellDivider"),a=!0,c}function c(C){return C===null||D(C)?d(C):Q(C)?(e.enter("whitespace"),e.consume(C),p):(a&&(a=void 0,o++),C===124?u(C):(e.enter("temporaryTableCellContent"),m(C)))}function p(C){return Q(C)?(e.consume(C),p):(e.exit("whitespace"),c(C))}function m(C){return C===null||C===124||J(C)?(e.exit("temporaryTableCellContent"),c(C)):(e.consume(C),C===92?f:m)}function f(C){return C===92||C===124?(e.consume(C),m):m(C)}function d(C){if(C===null)return n(C);e.exit("tableRow"),e.exit("tableHead");let oe=r.interrupt;return r.interrupt=!0,e.attempt({tokenize:ne,partial:!0},function(te){return r.interrupt=oe,e.enter("tableDelimiterRow"),h(te)},function(te){return r.interrupt=oe,n(te)})(C)}function h(C){return C===null||D(C)?E(C):Q(C)?(e.enter("whitespace"),e.consume(C),g):C===45?(e.enter("tableDelimiterFiller"),e.consume(C),s=!0,i.push("none"),b):C===58?(e.enter("tableDelimiterAlignment"),e.consume(C),e.exit("tableDelimiterAlignment"),i.push("left"),O):C===124?(e.enter("tableCellDivider"),e.consume(C),e.exit("tableCellDivider"),h):n(C)}function g(C){return Q(C)?(e.consume(C),g):(e.exit("whitespace"),h(C))}function b(C){return C===45?(e.consume(C),b):(e.exit("tableDelimiterFiller"),C===58?(e.enter("tableDelimiterAlignment"),e.consume(C),e.exit("tableDelimiterAlignment"),i[i.length-1]=i[i.length-1]==="left"?"center":"right",S):h(C))}function O(C){return C===45?(e.enter("tableDelimiterFiller"),e.consume(C),s=!0,b):n(C)}function S(C){return C===null||D(C)?E(C):Q(C)?(e.enter("whitespace"),e.consume(C),g):C===124?(e.enter("tableCellDivider"),e.consume(C),e.exit("tableCellDivider"),h):n(C)}function E(C){return e.exit("tableDelimiterRow"),!s||o!==i.length?n(C):C===null?I(C):e.check(jp,I,e.attempt({tokenize:ne,partial:!0},Y(e,k,"linePrefix",4),I))(C)}function I(C){return e.exit("table"),t(C)}function k(C){return e.enter("tableBody"),_(C)}function _(C){return e.enter("tableRow"),C===124?M(C):(e.enter("temporaryTableCellContent"),H(C))}function M(C){return e.enter("tableCellDivider"),e.consume(C),e.exit("tableCellDivider"),z}function z(C){return C===null||D(C)?P(C):Q(C)?(e.enter("whitespace"),e.consume(C),q):C===124?M(C):(e.enter("temporaryTableCellContent"),H(C))}function q(C){return Q(C)?(e.consume(C),q):(e.exit("whitespace"),z(C))}function H(C){return C===null||C===124||J(C)?(e.exit("temporaryTableCellContent"),z(C)):(e.consume(C),C===92?U:H)}function U(C){return C===92||C===124?(e.consume(C),H):H(C)}function P(C){return e.exit("tableRow"),C===null?V(C):e.check(jp,V,e.attempt({tokenize:ne,partial:!0},Y(e,_,"linePrefix",4),V))(C)}function V(C){return e.exit("tableBody"),I(C)}function ne(C,oe,te){return he;function he(w){return C.enter("lineEnding"),C.consume(w),C.exit("lineEnding"),Y(C,le,"linePrefix")}function le(w){if(r.parser.lazy[r.now().line]||w===null||D(w))return te(w);let x=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&x&&x[1].type==="linePrefix"&&x[2].sliceSerialize(x[1],!0).length>=4?te(w):(r._gfmTableDynamicInterruptHack=!0,C.check(r.parser.constructs.flow,function(rt){return r._gfmTableDynamicInterruptHack=!1,te(rt)},function(rt){return r._gfmTableDynamicInterruptHack=!1,oe(rt)})(w))}}}function ay(e,t,n){let r=0;return i;function i(a){return e.enter("check"),e.consume(a),o}function o(a){return a===-1||a===32?(e.consume(a),r++,r===4?t:o):a===null||J(a)?t(a):n(a)}}var sy={tokenize:ly},tl={text:{[91]:sy}};function ly(e,t,n){let r=this;return i;function i(s){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(s):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(s),e.exit("taskListCheckMarker"),o)}function o(s){return J(s)?(e.enter("taskListCheckValueUnchecked"),e.consume(s),e.exit("taskListCheckValueUnchecked"),a):s===88||s===120?(e.enter("taskListCheckValueChecked"),e.consume(s),e.exit("taskListCheckValueChecked"),a):n(s)}function a(s){return s===93?(e.enter("taskListCheckMarker"),e.consume(s),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),e.check({tokenize:uy},t,n)):n(s)}}function uy(e,t,n){let r=this;return Y(e,i,"whitespace");function i(o){let a=r.events[r.events.length-1];return(a&&a[1].type==="whitespace"||D(o))&&o!==null?t(o):n(o)}}function qp(e){return So([Us,Xs(),Js(e),el,tl])}function mr(e,t){let n=String(e);if(typeof t!="string")throw new TypeError("Expected character");let r=0,i=n.indexOf(t);for(;i!==-1;)r++,i=n.indexOf(t,i+t.length);return r}function nl(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}var cy={}.hasOwnProperty,rl=function(e,t,n,r){let i,o;typeof t=="string"||t instanceof RegExp?(o=[[t,n]],i=r):(o=t,i=n),i||(i={});let a=jt(i.ignore||[]),s=py(o),l=-1;for(;++l<s.length;)xo(e,"text",u);return e;function u(p,m){let f=-1,d;for(;++f<m.length;){let h=m[f];if(a(h,d?d.children.indexOf(h):void 0,d))return;d=h}if(d)return c(p,m)}function c(p,m){let f=m[m.length-1],d=s[l][0],h=s[l][1],g=0,b=f.children.indexOf(p),O=!1,S=[],E;d.lastIndex=0;let I=d.exec(p.value);for(;I;){E=I.index;let k={index:I.index,input:I.input,stack:[...m,p]},_=h(...I,k);if(typeof _=="string"&&(_=_.length>0?{type:"text",value:_}:void 0),_!==!1&&(g!==E&&S.push({type:"text",value:p.value.slice(g,E)}),Array.isArray(_)?S.push(..._):_&&S.push(_),g=E+I[0].length,O=!0),!d.global)break;I=d.exec(p.value)}return O?(g<p.value.length&&S.push({type:"text",value:p.value.slice(g)}),f.children.splice(b,1,...S)):S=[p],b+S.length}};function py(e){let t=[];if(typeof e!="object")throw new TypeError("Expected array or object as schema");if(Array.isArray(e)){let n=-1;for(;++n<e.length;)t.push([Vp(e[n][0]),Kp(e[n][1])])}else{let n;for(n in e)cy.call(e,n)&&t.push([Vp(n),Kp(e[n])])}return t}function Vp(e){return typeof e=="string"?new RegExp(nl(e),"g"):e}function Kp(e){return typeof e=="function"?e:()=>e}var il="phrasing",ol=["autolink","link","image","label"],Wp={transforms:[yy],enter:{literalAutolink:my,literalAutolinkEmail:al,literalAutolinkHttp:al,literalAutolinkWww:al},exit:{literalAutolink:gy,literalAutolinkEmail:hy,literalAutolinkHttp:fy,literalAutolinkWww:dy}},Up={unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:il,notInConstruct:ol},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:il,notInConstruct:ol},{character:":",before:"[ps]",after:"\\/",inConstruct:il,notInConstruct:ol}]};function my(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function al(e){this.config.enter.autolinkProtocol.call(this,e)}function fy(e){this.config.exit.autolinkProtocol.call(this,e)}function dy(e){this.config.exit.data.call(this,e);let t=this.stack[this.stack.length-1];t.url="http://"+this.sliceSerialize(e)}function hy(e){this.config.exit.autolinkEmail.call(this,e)}function gy(e){this.exit(e)}function yy(e){rl(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,by],[/([-.\w+]+)@([-\w]+(?:\.[-\w]+)+)/g,wy]],{ignore:["link","linkReference"]})}function by(e,t,n,r,i){let o="";if(!Gp(i)||(/^w/i.test(t)&&(n=t+n,t="",o="http://"),!xy(n)))return!1;let a=ky(n+r);if(!a[0])return!1;let s={type:"link",title:null,url:o+t+a[0],children:[{type:"text",value:t+a[0]}]};return a[1]?[s,{type:"text",value:a[1]}]:s}function wy(e,t,n,r){return!Gp(r,!0)||/[_-\d]$/.test(n)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function xy(e){let t=e.split(".");return!(t.length<2||t[t.length-1]&&(/_/.test(t[t.length-1])||!/[a-zA-Z\d]/.test(t[t.length-1]))||t[t.length-2]&&(/_/.test(t[t.length-2])||!/[a-zA-Z\d]/.test(t[t.length-2])))}function ky(e){let t=/[!"&'),.:;<>?\]}]+$/.exec(e),n,r,i,o;if(t)for(e=e.slice(0,t.index),o=t[0],n=o.indexOf(")"),r=mr(e,"("),i=mr(e,")");n!==-1&&r>i;)e+=o.slice(0,n+1),o=o.slice(n+1),n=o.indexOf(")"),i++;return[e,o]}function Gp(e,t){let n=e.input.charCodeAt(e.index-1);return(e.index===0||An(n)||En(n))&&(!t||n!==47)}function Zp(){return{enter:{gfmFootnoteDefinition:e,gfmFootnoteDefinitionLabelString:t,gfmFootnoteCall:i,gfmFootnoteCallString:o},exit:{gfmFootnoteDefinition:r,gfmFootnoteDefinitionLabelString:n,gfmFootnoteCall:s,gfmFootnoteCallString:a}};function e(l){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},l)}function t(){this.buffer()}function n(l){let u=this.resume(),c=this.stack[this.stack.length-1];c.label=u,c.identifier=We(this.sliceSerialize(l)).toLowerCase()}function r(l){this.exit(l)}function i(l){this.enter({type:"footnoteReference",identifier:"",label:""},l)}function o(){this.buffer()}function a(l){let u=this.resume(),c=this.stack[this.stack.length-1];c.label=u,c.identifier=We(this.sliceSerialize(l)).toLowerCase()}function s(l){this.exit(l)}}function Qp(){return e.peek=t,{unsafe:[{character:"[",inConstruct:["phrasing","label","reference"]}],handlers:{footnoteDefinition:n,footnoteReference:e}};function e(r,i,o,a){let s=X(a),l=s.move("[^"),u=o.enter("footnoteReference"),c=o.enter("reference");return l+=s.move(ie(o,qt(r),{...s.current(),before:l,after:"]"})),c(),u(),l+=s.move("]"),l}function t(){return"["}function n(r,i,o,a){let s=X(a),l=s.move("[^"),u=o.enter("footnoteDefinition"),c=o.enter("label");return l+=s.move(ie(o,qt(r),{...s.current(),before:l,after:"]"})),c(),l+=s.move("]:"+(r.children&&r.children.length>0?" ":"")),s.shift(4),l+=s.move(un(Dt(r,o,s.current()),p)),u(),l;function p(m,f,d){return f?(d?"":" ")+m:m}}}var Xp={canContainEols:["delete"],enter:{strikethrough:vy},exit:{strikethrough:Sy}},Jp={unsafe:[{character:"~",inConstruct:"phrasing"}],handlers:{delete:em}};em.peek=Oy;function vy(e){this.enter({type:"delete",children:[]},e)}function Sy(e){this.exit(e)}function em(e,t,n,r){let i=X(r),o=n.enter("emphasis"),a=i.move("~~");return a+=Fe(e,n,{...i.current(),before:a,after:"~"}),a+=i.move("~~"),o(),a}function Oy(){return"~"}function nm(e,t={}){let n=(t.align||[]).concat(),r=t.stringLength||Cy,i=[],o=[],a=[],s=[],l=0,u=-1;for(;++u<e.length;){let d=[],h=[],g=-1;for(e[u].length>l&&(l=e[u].length);++g<e[u].length;){let b=Ty(e[u][g]);if(t.alignDelimiters!==!1){let O=r(b);h[g]=O,(s[g]===void 0||O>s[g])&&(s[g]=O)}d.push(b)}o[u]=d,a[u]=h}let c=-1;if(typeof n=="object"&&"length"in n)for(;++c<l;)i[c]=tm(n[c]);else{let d=tm(n);for(;++c<l;)i[c]=d}c=-1;let p=[],m=[];for(;++c<l;){let d=i[c],h="",g="";d===99?(h=":",g=":"):d===108?h=":":d===114&&(g=":");let b=t.alignDelimiters===!1?1:Math.max(1,s[c]-h.length-g.length),O=h+"-".repeat(b)+g;t.alignDelimiters!==!1&&(b=h.length+b+g.length,b>s[c]&&(s[c]=b),m[c]=b),p[c]=O}o.splice(1,0,p),a.splice(1,0,m),u=-1;let f=[];for(;++u<o.length;){let d=o[u],h=a[u];c=-1;let g=[];for(;++c<l;){let b=d[c]||"",O="",S="";if(t.alignDelimiters!==!1){let E=s[c]-(h[c]||0),I=i[c];I===114?O=" ".repeat(E):I===99?E%2?(O=" ".repeat(E/2+.5),S=" ".repeat(E/2-.5)):(O=" ".repeat(E/2),S=O):S=" ".repeat(E)}t.delimiterStart!==!1&&!c&&g.push("|"),t.padding!==!1&&!(t.alignDelimiters===!1&&b==="")&&(t.delimiterStart!==!1||c)&&g.push(" "),t.alignDelimiters!==!1&&g.push(O),g.push(b),t.alignDelimiters!==!1&&g.push(S),t.padding!==!1&&g.push(" "),(t.delimiterEnd!==!1||c!==l-1)&&g.push("|")}f.push(t.delimiterEnd===!1?g.join("").replace(/ +$/,""):g.join(""))}return f.join(`
`)}function Ty(e){return e==null?"":String(e)}function Cy(e){return e.length}function tm(e){let t=typeof e=="string"?e.codePointAt(0):0;return t===67||t===99?99:t===76||t===108?108:t===82||t===114?114:0}var ll={enter:{table:Ay,tableData:rm,tableHeader:rm,tableRow:Ly},exit:{codeText:_y,table:Ey,tableData:sl,tableHeader:sl,tableRow:sl}};function Ay(e){let t=e._align;this.enter({type:"table",align:t.map(n=>n==="none"?null:n),children:[]},e),this.setData("inTable",!0)}function Ey(e){this.exit(e),this.setData("inTable")}function Ly(e){this.enter({type:"tableRow",children:[]},e)}function sl(e){this.exit(e)}function rm(e){this.enter({type:"tableCell",children:[]},e)}function _y(e){let t=this.resume();this.getData("inTable")&&(t=t.replace(/\\([\\|])/g,Iy));let n=this.stack[this.stack.length-1];n.value=t,this.exit(e)}function Iy(e,t){return t==="|"?t:e}function ul(e){let t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,i=t.stringLength,o=n?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
`,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{table:a,tableRow:s,tableCell:l,inlineCode:m}};function a(f,d,h,g){return u(c(f,h,g),f.align)}function s(f,d,h,g){let b=p(f,h,g),O=u([b]);return O.slice(0,O.indexOf(`
`))}function l(f,d,h,g){let b=h.enter("tableCell"),O=h.enter("phrasing"),S=Fe(f,h,{...g,before:o,after:o});return O(),b(),S}function u(f,d){return nm(f,{align:d,alignDelimiters:r,padding:n,stringLength:i})}function c(f,d,h){let g=f.children,b=-1,O=[],S=d.enter("table");for(;++b<g.length;)O[b]=p(g[b],d,h);return S(),O}function p(f,d,h){let g=f.children,b=-1,O=[],S=d.enter("tableRow");for(;++b<g.length;)O[b]=l(g[b],f,d,h);return S(),O}function m(f,d,h){let g=Zr(f,d,h);return h.stack.includes("tableCell")&&(g=g.replace(/\|/g,"\\$&")),g}}var om={exit:{taskListCheckValueChecked:im,taskListCheckValueUnchecked:im,paragraph:My}},am={unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:By}};function im(e){let t=this.stack[this.stack.length-2];t.checked=e.type==="taskListCheckValueChecked"}function My(e){let t=this.stack[this.stack.length-2],n=this.stack[this.stack.length-1],r=t.children,i=n.children[0],o=-1,a;if(t&&t.type==="listItem"&&typeof t.checked=="boolean"&&i&&i.type==="text"){for(;++o<r.length;){let s=r[o];if(s.type==="paragraph"){a=s;break}}a===n&&(i.value=i.value.slice(1),i.value.length===0?n.children.shift():n.position&&i.position&&typeof i.position.start.offset=="number"&&(i.position.start.column++,i.position.start.offset++,n.position.start=Object.assign({},i.position.start)))}this.exit(e)}function By(e,t,n,r){let i=e.children[0],o=typeof e.checked=="boolean"&&i&&i.type==="paragraph",a="["+(e.checked?"x":" ")+"] ",s=X(r);o&&s.move(a);let l=Yo(e,t,n,{...r,...s.current()});return o&&(l=l.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,u)),l;function u(c){return c+a}}function cl(){return[Wp,Zp(),Xp,ll,om]}function pl(e){return{extensions:[Up,Qp(),Jp,ul(e),am]}}function jo(e={}){let t=this.data();n("micromarkExtensions",qp(e)),n("fromMarkdownExtensions",cl()),n("toMarkdownExtensions",pl(e));function n(r,i){(t[r]?t[r]:t[r]=[]).push(i)}}var sm={tokenize:Ry,concrete:!0},Fy={tokenize:Dy,partial:!0};function Ry(e,t,n){let r=this,i=r.events[r.events.length-1],o=i&&i[1].type==="linePrefix"?i[2].sliceSerialize(i[1],!0).length:0,a=0;return s;function s(g){return e.enter("mathFlow"),e.enter("mathFlowFence"),e.enter("mathFlowFenceSequence"),l(g)}function l(g){return g===36?(e.consume(g),a++,l):(e.exit("mathFlowFenceSequence"),a<2?n(g):Y(e,u,"whitespace")(g))}function u(g){return g===null||D(g)?p(g):(e.enter("mathFlowFenceMeta"),e.enter("chunkString",{contentType:"string"}),c(g))}function c(g){return g===null||D(g)?(e.exit("chunkString"),e.exit("mathFlowFenceMeta"),p(g)):g===36?n(g):(e.consume(g),c)}function p(g){return e.exit("mathFlowFence"),r.interrupt?t(g):m(g)}function m(g){return g===null?d(g):D(g)?e.attempt(Fy,e.attempt({tokenize:h,partial:!0},d,o?Y(e,m,"linePrefix",o+1):m),d)(g):(e.enter("mathFlowValue"),f(g))}function f(g){return g===null||D(g)?(e.exit("mathFlowValue"),m(g)):(e.consume(g),f)}function d(g){return e.exit("mathFlow"),t(g)}function h(g,b,O){let S=0;return Y(g,E,"linePrefix",4);function E(_){return g.enter("mathFlowFence"),g.enter("mathFlowFenceSequence"),I(_)}function I(_){return _===36?(g.consume(_),S++,I):S<a?O(_):(g.exit("mathFlowFenceSequence"),Y(g,k,"whitespace")(_))}function k(_){return _===null||D(_)?(g.exit("mathFlowFence"),b(_)):O(_)}}}function Dy(e,t,n){let r=this;return i;function i(a){return e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),o}function o(a){return r.parser.lazy[r.now().line]?n(a):t(a)}}function lm(e={}){let t=e.singleDollarTextMath;return t==null&&(t=!0),{tokenize:n,resolve:Py,previous:Ny};function n(r,i,o){let a=this,s=0,l,u;return c;function c(h){return r.enter("mathText"),r.enter("mathTextSequence"),p(h)}function p(h){return h===36?(r.consume(h),s++,p):s<2&&!t?o(h):(r.exit("mathTextSequence"),m(h))}function m(h){return h===null?o(h):h===36?(u=r.enter("mathTextSequence"),l=0,d(h)):h===32?(r.enter("space"),r.consume(h),r.exit("space"),m):D(h)?(r.enter("lineEnding"),r.consume(h),r.exit("lineEnding"),m):(r.enter("mathTextData"),f(h))}function f(h){return h===null||h===32||h===36||D(h)?(r.exit("mathTextData"),m(h)):(r.consume(h),f)}function d(h){return h===36?(r.consume(h),l++,d):l===s?(r.exit("mathTextSequence"),r.exit("mathText"),i(h)):(u.type="mathTextData",f(h))}}}function Py(e){let t=e.length-4,n=3,r,i;if((e[n][1].type==="lineEnding"||e[n][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(r=n;++r<t;)if(e[r][1].type==="mathTextData"){e[t][1].type="mathTextPadding",e[n][1].type="mathTextPadding",n+=2,t-=2;break}}for(r=n-1,t++;++r<=t;)i===void 0?r!==t&&e[r][1].type!=="lineEnding"&&(i=r):(r===t||e[r][1].type==="lineEnding")&&(e[i][1].type="mathTextData",r!==i+2&&(e[i][1].end=e[r-1][1].end,e.splice(i+2,r-i-2),t-=r-i-2,r=i+2),i=void 0);return e}function Ny(e){return e!==36||this.events[this.events.length-1][1].type==="characterEscape"}function ml(e){return{flow:{[36]:sm},text:{[36]:lm(e)}}}function um(){return{enter:{mathFlow:e,mathFlowFenceMeta:t,mathText:o},exit:{mathFlow:i,mathFlowFence:r,mathFlowFenceMeta:n,mathFlowValue:s,mathText:a,mathTextData:s}};function e(l){this.enter({type:"math",meta:null,value:"",data:{hName:"div",hProperties:{className:["math","math-display"]},hChildren:[{type:"text",value:""}]}},l)}function t(){this.buffer()}function n(){let l=this.resume(),u=this.stack[this.stack.length-1];u.meta=l}function r(){this.getData("mathFlowInside")||(this.buffer(),this.setData("mathFlowInside",!0))}function i(l){let u=this.resume().replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),c=this.exit(l);c.value=u,c.data.hChildren[0].value=u,this.setData("mathFlowInside")}function o(l){this.enter({type:"inlineMath",value:"",data:{hName:"span",hProperties:{className:["math","math-inline"]},hChildren:[{type:"text",value:""}]}},l),this.buffer()}function a(l){let u=this.resume(),c=this.exit(l);c.value=u,c.data.hChildren[0].value=u}function s(l){this.config.enter.data.call(this,l),this.config.exit.data.call(this,l)}}function cm(e={}){let t=e.singleDollarTextMath;return t==null&&(t=!0),r.peek=i,{unsafe:[{character:"\r",inConstruct:["mathFlowMeta"]},{character:"\r",inConstruct:["mathFlowMeta"]},t?{character:"$",inConstruct:["mathFlowMeta","phrasing"]}:{character:"$",after:"\\$",inConstruct:["mathFlowMeta","phrasing"]},{atBreak:!0,character:"$",after:"\\$"}],handlers:{math:n,inlineMath:r}};function n(o,a,s,l){let u=o.value||"",c="$".repeat(Math.max(Po(u,"$")+1,2)),p=s.enter("mathFlow"),m=X(l),f=m.move(c);if(o.meta){let d=s.enter("mathFlowMeta");f+=m.move(ie(s,o.meta,{...m.current(),before:f,after:" ",encode:["$"]})),d()}return f+=m.move(`
`),u&&(f+=m.move(u+`
`)),f+=m.move(c),p(),f}function r(o){let a=o.value||"",s=1,l="";for(t||s++;new RegExp("(^|[^$])"+"\\$".repeat(s)+"([^$]|$)").test(a);)s++;/[^ \r\n]/.test(a)&&(/[ \r\n$]/.test(a.charAt(0))||/[ \r\n$]/.test(a.charAt(a.length-1)))&&(l=" ");let u="$".repeat(s);return u+l+a+l+u}function i(){return"$"}}function qo(e={}){let t=this.data();n("micromarkExtensions",ml(e)),n("fromMarkdownExtensions",um()),n("toMarkdownExtensions",cm(e));function n(r,i){(t[r]?t[r]:t[r]=[]).push(i)}}var Kt=class{constructor(t,n,r){this.property=t,this.normal=n,r&&(this.space=r)}};Kt.prototype.property={};Kt.prototype.normal={};Kt.prototype.space=null;function fl(e,t){let n={},r={},i=-1;for(;++i<e.length;)Object.assign(n,e[i].property),Object.assign(r,e[i].normal);return new Kt(n,r,t)}function Qr(e){return e.toLowerCase()}var Ge=class{constructor(t,n){this.property=t,this.attribute=n}};Ge.prototype.space=null;Ge.prototype.boolean=!1;Ge.prototype.booleanish=!1;Ge.prototype.overloadedBoolean=!1;Ge.prototype.number=!1;Ge.prototype.commaSeparated=!1;Ge.prototype.spaceSeparated=!1;Ge.prototype.commaOrSpaceSeparated=!1;Ge.prototype.mustUseProperty=!1;Ge.prototype.defined=!1;var Xr={};Va(Xr,{boolean:()=>G,booleanish:()=>ye,commaOrSpaceSeparated:()=>lt,commaSeparated:()=>cn,number:()=>F,overloadedBoolean:()=>dl,spaceSeparated:()=>ae});var zy=0,G=Fn(),ye=Fn(),dl=Fn(),F=Fn(),ae=Fn(),cn=Fn(),lt=Fn();function Fn(){return 2**++zy}var hl=Object.keys(Xr),Rn=class extends Ge{constructor(t,n,r,i){let o=-1;if(super(t,n),pm(this,"space",i),typeof r=="number")for(;++o<hl.length;){let a=hl[o];pm(this,hl[o],(r&Xr[a])===Xr[a])}}};Rn.prototype.defined=!0;function pm(e,t,n){n&&(e[t]=n)}var $y={}.hasOwnProperty;function yt(e){let t={},n={},r;for(r in e.properties)if($y.call(e.properties,r)){let i=e.properties[r],o=new Rn(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(o.mustUseProperty=!0),t[r]=o,n[Qr(r)]=r,n[Qr(o.attribute)]=r}return new Kt(t,n,e.space)}var gl=yt({space:"xlink",transform(e,t){return"xlink:"+t.slice(5).toLowerCase()},properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null}});var yl=yt({space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()},properties:{xmlLang:null,xmlBase:null,xmlSpace:null}});function Vo(e,t){return t in e?e[t]:t}function Ko(e,t){return Vo(e,t.toLowerCase())}var bl=yt({space:"xmlns",attributes:{xmlnsxlink:"xmlns:xlink"},transform:Ko,properties:{xmlns:null,xmlnsXLink:null}});var wl=yt({transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()},properties:{ariaActiveDescendant:null,ariaAtomic:ye,ariaAutoComplete:null,ariaBusy:ye,ariaChecked:ye,ariaColCount:F,ariaColIndex:F,ariaColSpan:F,ariaControls:ae,ariaCurrent:null,ariaDescribedBy:ae,ariaDetails:null,ariaDisabled:ye,ariaDropEffect:ae,ariaErrorMessage:null,ariaExpanded:ye,ariaFlowTo:ae,ariaGrabbed:ye,ariaHasPopup:null,ariaHidden:ye,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:ae,ariaLevel:F,ariaLive:null,ariaModal:ye,ariaMultiLine:ye,ariaMultiSelectable:ye,ariaOrientation:null,ariaOwns:ae,ariaPlaceholder:null,ariaPosInSet:F,ariaPressed:ye,ariaReadOnly:ye,ariaRelevant:null,ariaRequired:ye,ariaRoleDescription:ae,ariaRowCount:F,ariaRowIndex:F,ariaRowSpan:F,ariaSelected:ye,ariaSetSize:F,ariaSort:null,ariaValueMax:F,ariaValueMin:F,ariaValueNow:F,ariaValueText:null,role:null}});var mm=yt({space:"html",attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},transform:Ko,mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:cn,acceptCharset:ae,accessKey:ae,action:null,allow:null,allowFullScreen:G,allowPaymentRequest:G,allowUserMedia:G,alt:null,as:null,async:G,autoCapitalize:null,autoComplete:ae,autoFocus:G,autoPlay:G,capture:G,charSet:null,checked:G,cite:null,className:ae,cols:F,colSpan:null,content:null,contentEditable:ye,controls:G,controlsList:ae,coords:F|cn,crossOrigin:null,data:null,dateTime:null,decoding:null,default:G,defer:G,dir:null,dirName:null,disabled:G,download:dl,draggable:ye,encType:null,enterKeyHint:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:G,formTarget:null,headers:ae,height:F,hidden:G,high:F,href:null,hrefLang:null,htmlFor:ae,httpEquiv:ae,id:null,imageSizes:null,imageSrcSet:null,inputMode:null,integrity:null,is:null,isMap:G,itemId:null,itemProp:ae,itemRef:ae,itemScope:G,itemType:ae,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:G,low:F,manifest:null,max:null,maxLength:F,media:null,method:null,min:null,minLength:F,multiple:G,muted:G,name:null,nonce:null,noModule:G,noValidate:G,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforePrint:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:G,optimum:F,pattern:null,ping:ae,placeholder:null,playsInline:G,poster:null,preload:null,readOnly:G,referrerPolicy:null,rel:ae,required:G,reversed:G,rows:F,rowSpan:F,sandbox:ae,scope:null,scoped:G,seamless:G,selected:G,shape:null,size:F,sizes:null,slot:null,span:F,spellCheck:ye,src:null,srcDoc:null,srcLang:null,srcSet:null,start:F,step:null,style:null,tabIndex:F,target:null,title:null,translate:null,type:null,typeMustMatch:G,useMap:null,value:ye,width:F,wrap:null,align:null,aLink:null,archive:ae,axis:null,background:null,bgColor:null,border:F,borderColor:null,bottomMargin:F,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:G,declare:G,event:null,face:null,frame:null,frameBorder:null,hSpace:F,leftMargin:F,link:null,longDesc:null,lowSrc:null,marginHeight:F,marginWidth:F,noResize:G,noHref:G,noShade:G,noWrap:G,object:null,profile:null,prompt:null,rev:null,rightMargin:F,rules:null,scheme:null,scrolling:ye,standby:null,summary:null,text:null,topMargin:F,valueType:null,version:null,vAlign:null,vLink:null,vSpace:F,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:G,disableRemotePlayback:G,prefix:null,property:null,results:F,security:null,unselectable:null}});var fm=yt({space:"svg",attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},transform:Vo,properties:{about:lt,accentHeight:F,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:F,amplitude:F,arabicForm:null,ascent:F,attributeName:null,attributeType:null,azimuth:F,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:F,by:null,calcMode:null,capHeight:F,className:ae,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:F,diffuseConstant:F,direction:null,display:null,dur:null,divisor:F,dominantBaseline:null,download:G,dx:null,dy:null,edgeMode:null,editable:null,elevation:F,enableBackground:null,end:null,event:null,exponent:F,externalResourcesRequired:null,fill:null,fillOpacity:F,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:cn,g2:cn,glyphName:cn,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:F,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:F,horizOriginX:F,horizOriginY:F,id:null,ideographic:F,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:F,k:F,k1:F,k2:F,k3:F,k4:F,kernelMatrix:lt,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:F,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:F,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:F,overlineThickness:F,paintOrder:null,panose1:null,path:null,pathLength:F,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:ae,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:F,pointsAtY:F,pointsAtZ:F,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:lt,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:lt,rev:lt,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:lt,requiredFeatures:lt,requiredFonts:lt,requiredFormats:lt,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:F,specularExponent:F,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:F,strikethroughThickness:F,string:null,stroke:null,strokeDashArray:lt,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:F,strokeOpacity:F,strokeWidth:null,style:null,surfaceScale:F,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:lt,tabIndex:F,tableValues:null,target:null,targetX:F,targetY:F,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:lt,to:null,transform:null,u1:null,u2:null,underlinePosition:F,underlineThickness:F,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:F,values:null,vAlphabetic:F,vMathematical:F,vectorEffect:null,vHanging:F,vIdeographic:F,version:null,vertAdvY:F,vertOriginX:F,vertOriginY:F,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:F,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null}});var Hy=/^data[-\w.:]+$/i,dm=/-[a-z]/g,Yy=/[A-Z]/g;function xl(e,t){let n=Qr(t),r=t,i=Ge;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&Hy.test(t)){if(t.charAt(4)==="-"){let o=t.slice(5).replace(dm,qy);r="data"+o.charAt(0).toUpperCase()+o.slice(1)}else{let o=t.slice(4);if(!dm.test(o)){let a=o.replace(Yy,jy);a.charAt(0)!=="-"&&(a="-"+a),t="data"+a}}i=Rn}return new i(r,t)}function jy(e){return"-"+e.toLowerCase()}function qy(e){return e.charAt(1).toUpperCase()}var hm=fl([yl,gl,bl,wl,mm],"html"),Wo=fl([yl,gl,bl,wl,fm],"svg");var gm=["area","base","basefont","bgsound","br","col","command","embed","frame","hr","image","img","input","isindex","keygen","link","menuitem","meta","nextid","param","source","track","wbr"];var Oe=function(e,t,n,r,i){let o=ym(t);if(n!=null&&(typeof n!="number"||n<0||n===Number.POSITIVE_INFINITY))throw new Error("Expected positive finite index for child node");if(r!=null&&(!r.type||!r.children))throw new Error("Expected parent node");if(!e||!e.type||typeof e.type!="string")return!1;if(r==null!=(n==null))throw new Error("Expected both parent and index");return o.call(i,e,n,r)},ym=function(e){if(e==null)return kl;if(typeof e=="string")return Ky(e);if(typeof e=="object")return Vy(e);if(typeof e=="function")return bm(e);throw new Error("Expected function, string, or array as test")};function Vy(e){let t=[],n=-1;for(;++n<e.length;)t[n]=ym(e[n]);return bm(r);function r(...i){let o=-1;for(;++o<t.length;)if(t[o].call(this,...i))return!0;return!1}}function Ky(e){return t;function t(n){return kl(n)&&n.tagName===e}}function bm(e){return t;function t(n,...r){return kl(n)&&Boolean(e.call(this,n,...r))}}function kl(e){return Boolean(e&&typeof e=="object"&&e.type==="element"&&typeof e.tagName=="string")}var Dn=jt("comment");function Uo(e){var t=e&&typeof e=="object"&&e.type==="text"?e.value||"":e;return typeof t=="string"&&t.replace(/[ \t\n\f\r]/g,"")===""}var be=wm(1),vl=wm(-1);function wm(e){return t;function t(n,r,i){let o=n&&n.children,a=r+e,s=o&&o[a];if(!i)for(;s&&Uo(s);)a+=e,s=o[a];return s}}var Wy=jt("text");function Go(e){return Wy(e)&&Uo(e.value.charAt(0))}var Uy={}.hasOwnProperty;function Zo(e){return t;function t(n,r,i){return Uy.call(e,n.tagName)&&e[n.tagName](n,r,i)}}var Jr=Zo({html:Gy,head:Sl,body:Zy,p:Qy,li:Xy,dt:Jy,dd:eb,rt:xm,rp:xm,optgroup:tb,option:nb,menuitem:rb,colgroup:Sl,caption:Sl,thead:ib,tbody:ob,tfoot:ab,tr:sb,td:km,th:km});function Sl(e,t,n){let r=be(n,t,!0);return!r||!Dn(r)&&!Go(r)}function Gy(e,t,n){let r=be(n,t);return!r||!Dn(r)}function Zy(e,t,n){let r=be(n,t);return!r||!Dn(r)}function Qy(e,t,n){let r=be(n,t);return r?Oe(r,["address","article","aside","blockquote","details","div","dl","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","hr","main","menu","nav","ol","p","pre","section","table","ul"]):!n||!Oe(n,["a","audio","del","ins","map","noscript","video"])}function Xy(e,t,n){let r=be(n,t);return!r||Oe(r,"li")}function Jy(e,t,n){let r=be(n,t);return r&&Oe(r,["dt","dd"])}function eb(e,t,n){let r=be(n,t);return!r||Oe(r,["dt","dd"])}function xm(e,t,n){let r=be(n,t);return!r||Oe(r,["rp","rt"])}function tb(e,t,n){let r=be(n,t);return!r||Oe(r,"optgroup")}function nb(e,t,n){let r=be(n,t);return!r||Oe(r,["option","optgroup"])}function rb(e,t,n){let r=be(n,t);return!r||Oe(r,["menuitem","hr","menu"])}function ib(e,t,n){let r=be(n,t);return r&&Oe(r,["tbody","tfoot"])}function ob(e,t,n){let r=be(n,t);return!r||Oe(r,["tbody","tfoot"])}function ab(e,t,n){return!be(n,t)}function sb(e,t,n){let r=be(n,t);return!r||Oe(r,"tr")}function km(e,t,n){let r=be(n,t);return!r||Oe(r,["td","th"])}var vm=Zo({html:lb,head:ub,body:cb,colgroup:pb,tbody:mb});function lb(e){let t=be(e,-1);return!t||!Dn(t)}function ub(e){let t=e.children,n=[],r=-1,i;for(;++r<t.length;)if(i=t[r],Oe(i,["title","base"])){if(n.includes(i.tagName))return!1;n.push(i.tagName)}return t.length>0}function cb(e){let t=be(e,-1,!0);return!t||!Dn(t)&&!Go(t)&&!Oe(t,["meta","link","script","style","template"])}function pb(e,t,n){let r=vl(n,t),i=be(e,-1,!0);return Oe(r,"colgroup")&&Jr(r,n.children.indexOf(r),n)?!1:i&&Oe(i,"col")}function mb(e,t,n){let r=vl(n,t),i=be(e,-1);return Oe(r,["thead","tbody"])&&Jr(r,n.children.indexOf(r),n)?!1:i&&Oe(i,"tr")}var Sm={opening:vm,closing:Jr};function Om(e){return e.join(" ").trim()}function Tm(e,t){var n=t||{};return e[e.length-1]===""&&(e=e.concat("")),e.join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}function Cm(e,t){if(e=e.replace(t.subset?fb(t.subset):/["&'<>`]/g,r),t.subset||t.escapeOnly)return e;return e.replace(/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,n).replace(/[\x01-\t\v\f\x0E-\x1F\x7F\x81\x8D\x8F\x90\x9D\xA0-\uFFFF]/g,r);function n(i,o,a){return t.format((i.charCodeAt(0)-55296)*1024+i.charCodeAt(1)-56320+65536,a.charCodeAt(o+2),t)}function r(i,o,a){return t.format(i.charCodeAt(0),a.charCodeAt(o+1),t)}}function fb(e){let t=[],n=-1;for(;++n<e.length;)t.push(e[n].replace(/[|\\{}()[\]^$+*?.]/g,"\\$&"));return new RegExp("(?:"+t.join("|")+")","g")}function Am(e,t,n){let r="&#x"+e.toString(16).toUpperCase();return n&&t&&!/[\dA-Fa-f]/.test(String.fromCharCode(t))?r:r+";"}function Em(e,t,n){let r="&#"+String(e);return n&&t&&!/\d/.test(String.fromCharCode(t))?r:r+";"}var Lm=["AElig","AMP","Aacute","Acirc","Agrave","Aring","Atilde","Auml","COPY","Ccedil","ETH","Eacute","Ecirc","Egrave","Euml","GT","Iacute","Icirc","Igrave","Iuml","LT","Ntilde","Oacute","Ocirc","Ograve","Oslash","Otilde","Ouml","QUOT","REG","THORN","Uacute","Ucirc","Ugrave","Uuml","Yacute","aacute","acirc","acute","aelig","agrave","amp","aring","atilde","auml","brvbar","ccedil","cedil","cent","copy","curren","deg","divide","eacute","ecirc","egrave","eth","euml","frac12","frac14","frac34","gt","iacute","icirc","iexcl","igrave","iquest","iuml","laquo","lt","macr","micro","middot","nbsp","not","ntilde","oacute","ocirc","ograve","ordf","ordm","oslash","otilde","ouml","para","plusmn","pound","quot","raquo","reg","sect","shy","sup1","sup2","sup3","szlig","thorn","times","uacute","ucirc","ugrave","uml","uuml","yacute","yen","yuml"];var Qo={nbsp:"\xA0",iexcl:"\xA1",cent:"\xA2",pound:"\xA3",curren:"\xA4",yen:"\xA5",brvbar:"\xA6",sect:"\xA7",uml:"\xA8",copy:"\xA9",ordf:"\xAA",laquo:"\xAB",not:"\xAC",shy:"\xAD",reg:"\xAE",macr:"\xAF",deg:"\xB0",plusmn:"\xB1",sup2:"\xB2",sup3:"\xB3",acute:"\xB4",micro:"\xB5",para:"\xB6",middot:"\xB7",cedil:"\xB8",sup1:"\xB9",ordm:"\xBA",raquo:"\xBB",frac14:"\xBC",frac12:"\xBD",frac34:"\xBE",iquest:"\xBF",Agrave:"\xC0",Aacute:"\xC1",Acirc:"\xC2",Atilde:"\xC3",Auml:"\xC4",Aring:"\xC5",AElig:"\xC6",Ccedil:"\xC7",Egrave:"\xC8",Eacute:"\xC9",Ecirc:"\xCA",Euml:"\xCB",Igrave:"\xCC",Iacute:"\xCD",Icirc:"\xCE",Iuml:"\xCF",ETH:"\xD0",Ntilde:"\xD1",Ograve:"\xD2",Oacute:"\xD3",Ocirc:"\xD4",Otilde:"\xD5",Ouml:"\xD6",times:"\xD7",Oslash:"\xD8",Ugrave:"\xD9",Uacute:"\xDA",Ucirc:"\xDB",Uuml:"\xDC",Yacute:"\xDD",THORN:"\xDE",szlig:"\xDF",agrave:"\xE0",aacute:"\xE1",acirc:"\xE2",atilde:"\xE3",auml:"\xE4",aring:"\xE5",aelig:"\xE6",ccedil:"\xE7",egrave:"\xE8",eacute:"\xE9",ecirc:"\xEA",euml:"\xEB",igrave:"\xEC",iacute:"\xED",icirc:"\xEE",iuml:"\xEF",eth:"\xF0",ntilde:"\xF1",ograve:"\xF2",oacute:"\xF3",ocirc:"\xF4",otilde:"\xF5",ouml:"\xF6",divide:"\xF7",oslash:"\xF8",ugrave:"\xF9",uacute:"\xFA",ucirc:"\xFB",uuml:"\xFC",yacute:"\xFD",thorn:"\xFE",yuml:"\xFF",fnof:"\u0192",Alpha:"\u0391",Beta:"\u0392",Gamma:"\u0393",Delta:"\u0394",Epsilon:"\u0395",Zeta:"\u0396",Eta:"\u0397",Theta:"\u0398",Iota:"\u0399",Kappa:"\u039A",Lambda:"\u039B",Mu:"\u039C",Nu:"\u039D",Xi:"\u039E",Omicron:"\u039F",Pi:"\u03A0",Rho:"\u03A1",Sigma:"\u03A3",Tau:"\u03A4",Upsilon:"\u03A5",Phi:"\u03A6",Chi:"\u03A7",Psi:"\u03A8",Omega:"\u03A9",alpha:"\u03B1",beta:"\u03B2",gamma:"\u03B3",delta:"\u03B4",epsilon:"\u03B5",zeta:"\u03B6",eta:"\u03B7",theta:"\u03B8",iota:"\u03B9",kappa:"\u03BA",lambda:"\u03BB",mu:"\u03BC",nu:"\u03BD",xi:"\u03BE",omicron:"\u03BF",pi:"\u03C0",rho:"\u03C1",sigmaf:"\u03C2",sigma:"\u03C3",tau:"\u03C4",upsilon:"\u03C5",phi:"\u03C6",chi:"\u03C7",psi:"\u03C8",omega:"\u03C9",thetasym:"\u03D1",upsih:"\u03D2",piv:"\u03D6",bull:"\u2022",hellip:"\u2026",prime:"\u2032",Prime:"\u2033",oline:"\u203E",frasl:"\u2044",weierp:"\u2118",image:"\u2111",real:"\u211C",trade:"\u2122",alefsym:"\u2135",larr:"\u2190",uarr:"\u2191",rarr:"\u2192",darr:"\u2193",harr:"\u2194",crarr:"\u21B5",lArr:"\u21D0",uArr:"\u21D1",rArr:"\u21D2",dArr:"\u21D3",hArr:"\u21D4",forall:"\u2200",part:"\u2202",exist:"\u2203",empty:"\u2205",nabla:"\u2207",isin:"\u2208",notin:"\u2209",ni:"\u220B",prod:"\u220F",sum:"\u2211",minus:"\u2212",lowast:"\u2217",radic:"\u221A",prop:"\u221D",infin:"\u221E",ang:"\u2220",and:"\u2227",or:"\u2228",cap:"\u2229",cup:"\u222A",int:"\u222B",there4:"\u2234",sim:"\u223C",cong:"\u2245",asymp:"\u2248",ne:"\u2260",equiv:"\u2261",le:"\u2264",ge:"\u2265",sub:"\u2282",sup:"\u2283",nsub:"\u2284",sube:"\u2286",supe:"\u2287",oplus:"\u2295",otimes:"\u2297",perp:"\u22A5",sdot:"\u22C5",lceil:"\u2308",rceil:"\u2309",lfloor:"\u230A",rfloor:"\u230B",lang:"\u2329",rang:"\u232A",loz:"\u25CA",spades:"\u2660",clubs:"\u2663",hearts:"\u2665",diams:"\u2666",quot:'"',amp:"&",lt:"<",gt:">",OElig:"\u0152",oelig:"\u0153",Scaron:"\u0160",scaron:"\u0161",Yuml:"\u0178",circ:"\u02C6",tilde:"\u02DC",ensp:"\u2002",emsp:"\u2003",thinsp:"\u2009",zwnj:"\u200C",zwj:"\u200D",lrm:"\u200E",rlm:"\u200F",ndash:"\u2013",mdash:"\u2014",lsquo:"\u2018",rsquo:"\u2019",sbquo:"\u201A",ldquo:"\u201C",rdquo:"\u201D",bdquo:"\u201E",dagger:"\u2020",Dagger:"\u2021",permil:"\u2030",lsaquo:"\u2039",rsaquo:"\u203A",euro:"\u20AC"};var _m=["cent","copy","divide","gt","lt","not","para","times"];var Im={}.hasOwnProperty,Ol={},Xo;for(Xo in Qo)Im.call(Qo,Xo)&&(Ol[Qo[Xo]]=Xo);function Mm(e,t,n,r){let i=String.fromCharCode(e);if(Im.call(Ol,i)){let o=Ol[i],a="&"+o;return n&&Lm.includes(o)&&!_m.includes(o)&&(!r||t&&t!==61&&/[^\da-z]/i.test(String.fromCharCode(t)))?a:a+";"}return""}function Bm(e,t,n){let r=Am(e,t,n.omitOptionalSemicolons),i;if((n.useNamedReferences||n.useShortestReferences)&&(i=Mm(e,t,n.omitOptionalSemicolons,n.attribute)),(n.useShortestReferences||!i)&&n.useShortestReferences){let o=Em(e,t,n.omitOptionalSemicolons);o.length<r.length&&(r=o)}return i&&(!n.useShortestReferences||i.length<r.length)?i:r}function Wt(e,t){return Cm(e,Object.assign({format:Bm},t))}var ei={name:[[`
\f\r &/=>`.split(""),`
\f\r "&'/=>\``.split("")],[`\0
\f\r "&'/<=>`.split(""),`\0
\f\r "&'/<=>\``.split("")]],unquoted:[[`
\f\r &>`.split(""),`\0
\f\r "&'<=>\``.split("")],[`\0
\f\r "&'<=>\``.split(""),`\0
\f\r "&'<=>\``.split("")]],single:[["&'".split(""),"\"&'`".split("")],["\0&'".split(""),"\0\"&'`".split("")]],double:[['"&'.split(""),"\"&'`".split("")],['\0"&'.split(""),"\0\"&'`".split("")]]};function Fm(e,t){return e.bogusComments?"<?"+Wt(t.value,Object.assign({},e.entities,{subset:[">"]}))+">":"<!--"+t.value.replace(/^>|^->|<!--|-->|--!>|<!-$/g,n)+"-->";function n(r){return Wt(r,Object.assign({},e.entities,{subset:["<",">"]}))}}function Rm(e){return"<!"+(e.upperDoctype?"DOCTYPE":"doctype")+(e.tightDoctype?"":" ")+"html>"}function Jo(e,t,n,r){return r&&r.type==="element"&&(r.tagName==="script"||r.tagName==="style")?t.value:Wt(t.value,Object.assign({},e.entities,{subset:["<","&"]}))}function Dm(e,t,n,r){return e.dangerous?t.value:Jo(e,t,n,r)}var Pm={comment:Fm,doctype:Rm,element:hb,raw:Dm,root:Nm,text:Jo},db={}.hasOwnProperty;function Tl(e,t,n,r){if(!t||!t.type)throw new Error("Expected node, not `"+t+"`");if(!db.call(Pm,t.type))throw new Error("Cannot compile unknown node `"+t.type+"`");return Pm[t.type](e,t,n,r)}function Nm(e,t){let n=[],r=t&&t.children||[],i=-1;for(;++i<r.length;)n[i]=Tl(e,r[i],i,t);return n.join("")}function hb(e,t,n,r){let i=e.schema,o=i.space==="svg"?void 0:e.omit,a=i.space==="svg"?e.closeEmpty:e.voids.includes(t.tagName.toLowerCase()),s=[],l;i.space==="html"&&t.tagName==="svg"&&(e.schema=Wo);let u=gb(e,t.properties),c=Nm(e,i.space==="html"&&t.tagName==="template"?t.content:t);return e.schema=i,c&&(a=!1),(u||!o||!o.opening(t,n,r))&&(s.push("<",t.tagName,u?" "+u:""),a&&(i.space==="svg"||e.close)&&(l=u.charAt(u.length-1),(!e.tightClose||l==="/"||l&&l!=='"'&&l!=="'")&&s.push(" "),s.push("/")),s.push(">")),s.push(c),!a&&(!o||!o.closing(t,n,r))&&s.push("</"+t.tagName+">"),s.join("")}function gb(e,t){let n=[],r=-1,i,o,a;for(i in t)t[i]!==void 0&&t[i]!==null&&(o=yb(e,i,t[i]),o&&n.push(o));for(;++r<n.length;)a=e.tight?n[r].charAt(n[r].length-1):null,r!==n.length-1&&a!=='"'&&a!=="'"&&(n[r]+=" ");return n.join("")}function yb(e,t,n){let r=xl(e.schema,t),i=e.quote,o;if(r.overloadedBoolean&&(n===r.attribute||n==="")?n=!0:(r.boolean||r.overloadedBoolean&&typeof n!="string")&&(n=Boolean(n)),n==null||n===!1||typeof n=="number"&&Number.isNaN(n))return"";let a=Wt(r.attribute,Object.assign({},e.entities,{subset:ei.name[e.schema.space==="html"?e.valid:1][e.safe]}));return n===!0||(n=typeof n=="object"&&"length"in n?(r.commaSeparated?Tm:Om)(n,{padLeft:!e.tightLists}):String(n),e.collapseEmpty&&!n)?a:(e.unquoted&&(o=Wt(n,Object.assign({},e.entities,{subset:ei.unquoted[e.valid][e.safe],attribute:!0}))),o!==n&&(e.smart&&mr(n,i)>mr(n,e.alternative)&&(i=e.alternative),o=i+Wt(n,Object.assign({},e.entities,{subset:(i==="'"?ei.single:ei.double)[e.schema.space==="html"?e.valid:1][e.safe],attribute:!0}))+i),a+(o&&"="+o))}function Cl(e,t={}){let n=t.quote||'"',r=n==='"'?"'":'"';if(n!=='"'&&n!=="'")throw new Error("Invalid quote `"+n+"`, expected `'` or `\"`");let i={valid:t.allowParseErrors?0:1,safe:t.allowDangerousCharacters?0:1,schema:t.space==="svg"?Wo:hm,omit:t.omitOptionalTags?Sm:void 0,quote:n,alternative:r,smart:t.quoteSmart,unquoted:t.preferUnquoted,tight:t.tightAttributes,upperDoctype:t.upperDoctype,tightDoctype:t.tightDoctype,bogusComments:t.bogusComments,tightLists:t.tightCommaSeparatedLists,tightClose:t.tightSelfClosing,collapseEmpty:t.collapseEmptyAttributes,dangerous:t.allowDangerousHtml,voids:t.voids||gm.concat(),entities:t.entities||{},close:t.closeSelfClosing,closeEmpty:t.closeEmptyElements};return Tl(i,Array.isArray(e)?{type:"root",children:e}:e,null,null)}function ea(e){let t=this.data("settings"),n=Object.assign({},t,e);Object.assign(this,{Compiler:r});function r(i){return Cl(i,n)}}var ee=function(e,t,n){var r={type:String(e)};return n==null&&(typeof t=="string"||Array.isArray(t))?n=t:Object.assign(r,t),Array.isArray(n)?r.children=n:n!=null&&(r.value=String(n)),r};var ta={}.hasOwnProperty;function bb(e,t){let n=t.data||{};return"value"in t&&!(ta.call(n,"hName")||ta.call(n,"hProperties")||ta.call(n,"hChildren"))?e.augment(t,ee("text",t.value)):e(t,"div",re(e,t))}function Al(e,t,n){let r=t&&t.type,i;if(!r)throw new Error("Expected node, got `"+t+"`");return ta.call(e.handlers,r)?i=e.handlers[r]:e.passThrough&&e.passThrough.includes(r)?i=wb:i=e.unknownHandler,(typeof i=="function"?i:bb)(e,t,n)}function wb(e,t){return"children"in t?{...t,children:re(e,t)}:t}function re(e,t){let n=[];if("children"in t){let r=t.children,i=-1;for(;++i<r.length;){let o=Al(e,r[i],t);if(o){if(i&&r[i-1].type==="break"&&(!Array.isArray(o)&&o.type==="text"&&(o.value=o.value.replace(/^\s+/,"")),!Array.isArray(o)&&o.type==="element")){let a=o.children[0];a&&a.type==="text"&&(a.value=a.value.replace(/^\s+/,""))}Array.isArray(o)?n.push(...o):n.push(o)}}}return n}var na=zm("start"),ra=zm("end");function zm(e){return t;function t(n){let r=n&&n.position&&n.position[e]||{};return{line:r.line||null,column:r.column||null,offset:r.offset>-1?r.offset:null}}}function $m(e){return!e||!e.position||!e.position.start||!e.position.start.line||!e.position.start.column||!e.position.end||!e.position.end.line||!e.position.end.column}var Hm={}.hasOwnProperty;function jm(e){let t=Object.create(null);if(!e||!e.type)throw new Error("mdast-util-definitions expected node");return rn(e,"definition",r=>{let i=Ym(r.identifier);i&&!Hm.call(t,i)&&(t[i]=r)}),n;function n(r){let i=Ym(r);return i&&Hm.call(t,i)?t[i]:null}}function Ym(e){return String(e||"").toUpperCase()}function ut(e,t){let n=[],r=-1;for(t&&n.push(ee("text",`
`));++r<e.length;)r&&n.push(ee("text",`
`)),n.push(e[r]);return t&&e.length>0&&n.push(ee("text",`
`)),n}function qm(e){let t=-1,n=[];for(;++t<e.footnoteOrder.length;){let r=e.footnoteById[e.footnoteOrder[t].toUpperCase()];if(!r)continue;let i=re(e,r),o=String(r.identifier),a=gt(o.toLowerCase()),s=0,l=[];for(;++s<=e.footnoteCounts[o];){let p={type:"element",tagName:"a",properties:{href:"#"+e.clobberPrefix+"fnref-"+a+(s>1?"-"+s:""),dataFootnoteBackref:!0,className:["data-footnote-backref"],ariaLabel:e.footnoteBackLabel},children:[{type:"text",value:"\u21A9"}]};s>1&&p.children.push({type:"element",tagName:"sup",children:[{type:"text",value:String(s)}]}),l.length>0&&l.push({type:"text",value:" "}),l.push(p)}let u=i[i.length-1];if(u&&u.type==="element"&&u.tagName==="p"){let p=u.children[u.children.length-1];p&&p.type==="text"?p.value+=" ":u.children.push({type:"text",value:" "}),u.children.push(...l)}else i.push(...l);let c={type:"element",tagName:"li",properties:{id:e.clobberPrefix+"fn-"+a},children:ut(i,!0)};r.position&&(c.position=r.position),n.push(c)}return n.length===0?null:{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:e.footnoteLabelTagName,properties:{...JSON.parse(JSON.stringify(e.footnoteLabelProperties)),id:"footnote-label"},children:[ee("text",e.footnoteLabel)]},{type:"text",value:`
`},{type:"element",tagName:"ol",properties:{},children:ut(n,!0)},{type:"text",value:`
`}]}}function Vm(e,t){return e(t,"blockquote",ut(re(e,t),!0))}function Km(e,t){return[e(t,"br"),ee("text",`
`)]}function Wm(e,t){let n=t.value?t.value+`
`:"",r=t.lang&&t.lang.match(/^[^ \t]+(?=[ \t]|$)/),i={};r&&(i.className=["language-"+r]);let o=e(t,"code",i,[ee("text",n)]);return t.meta&&(o.data={meta:t.meta}),e(t.position,"pre",[o])}function Um(e,t){return e(t,"del",re(e,t))}function Gm(e,t){return e(t,"em",re(e,t))}function ia(e,t){let n=String(t.identifier),r=gt(n.toLowerCase()),i=e.footnoteOrder.indexOf(n),o;i===-1?(e.footnoteOrder.push(n),e.footnoteCounts[n]=1,o=e.footnoteOrder.length):(e.footnoteCounts[n]++,o=i+1);let a=e.footnoteCounts[n];return e(t,"sup",[e(t.position,"a",{href:"#"+e.clobberPrefix+"fn-"+r,id:e.clobberPrefix+"fnref-"+r+(a>1?"-"+a:""),dataFootnoteRef:!0,ariaDescribedBy:"footnote-label"},[ee("text",String(o))])])}function Zm(e,t){let n=e.footnoteById,r=1;for(;r in n;)r++;let i=String(r);return n[i]={type:"footnoteDefinition",identifier:i,children:[{type:"paragraph",children:t.children}],position:t.position},ia(e,{type:"footnoteReference",identifier:i,position:t.position})}function Qm(e,t){return e(t,"h"+t.depth,re(e,t))}function Xm(e,t){return e.dangerous?e.augment(t,ee("raw",t.value)):null}function oa(e,t){let n=t.referenceType,r="]";if(n==="collapsed"?r+="[]":n==="full"&&(r+="["+(t.label||t.identifier)+"]"),t.type==="imageReference")return ee("text","!["+t.alt+r);let i=re(e,t),o=i[0];o&&o.type==="text"?o.value="["+o.value:i.unshift(ee("text","["));let a=i[i.length-1];return a&&a.type==="text"?a.value+=r:i.push(ee("text",r)),i}function Jm(e,t){let n=e.definition(t.identifier);if(!n)return oa(e,t);let r={src:gt(n.url||""),alt:t.alt};return n.title!==null&&n.title!==void 0&&(r.title=n.title),e(t,"img",r)}function ef(e,t){let n={src:gt(t.url),alt:t.alt};return t.title!==null&&t.title!==void 0&&(n.title=t.title),e(t,"img",n)}function tf(e,t){return e(t,"code",[ee("text",t.value.replace(/\r?\n|\r/g," "))])}function nf(e,t){let n=e.definition(t.identifier);if(!n)return oa(e,t);let r={href:gt(n.url||"")};return n.title!==null&&n.title!==void 0&&(r.title=n.title),e(t,"a",r,re(e,t))}function rf(e,t){let n={href:gt(t.url)};return t.title!==null&&t.title!==void 0&&(n.title=t.title),e(t,"a",n,re(e,t))}function of(e,t,n){let r=re(e,t),i=n?xb(n):af(t),o={},a=[];if(typeof t.checked=="boolean"){let u;r[0]&&r[0].type==="element"&&r[0].tagName==="p"?u=r[0]:(u=e(null,"p",[]),r.unshift(u)),u.children.length>0&&u.children.unshift(ee("text"," ")),u.children.unshift(e(null,"input",{type:"checkbox",checked:t.checked,disabled:!0})),o.className=["task-list-item"]}let s=-1;for(;++s<r.length;){let u=r[s];(i||s!==0||u.type!=="element"||u.tagName!=="p")&&a.push(ee("text",`
`)),u.type==="element"&&u.tagName==="p"&&!i?a.push(...u.children):a.push(u)}let l=r[r.length-1];return l&&(i||!("tagName"in l)||l.tagName!=="p")&&a.push(ee("text",`
`)),e(t,"li",o,a)}function xb(e){let t=e.spread,n=e.children,r=-1;for(;!t&&++r<n.length;)t=af(n[r]);return Boolean(t)}function af(e){let t=e.spread;return t==null?e.children.length>1:t}function sf(e,t){let n={},r=t.ordered?"ol":"ul",i=re(e,t),o=-1;for(typeof t.start=="number"&&t.start!==1&&(n.start=t.start);++o<i.length;){let a=i[o];if(a.type==="element"&&a.tagName==="li"&&a.properties&&Array.isArray(a.properties.className)&&a.properties.className.includes("task-list-item")){n.className=["contains-task-list"];break}}return e(t,r,n,ut(i,!0))}function lf(e,t){return e(t,"p",re(e,t))}function uf(e,t){return e.augment(t,ee("root",ut(re(e,t))))}function cf(e,t){return e(t,"strong",re(e,t))}function pf(e,t){let n=t.children,r=-1,i=t.align||[],o=[];for(;++r<n.length;){let a=n[r].children,s=r===0?"th":"td",l=[],u=-1,c=t.align?i.length:a.length;for(;++u<c;){let p=a[u];l.push(e(p,s,{align:i[u]},p?re(e,p):[]))}o[r]=e(n[r],"tr",ut(l,!0))}return e(t,"table",ut([e(o[0].position,"thead",ut([o[0]],!0))].concat(o[1]?e({start:na(o[1]),end:ra(o[o.length-1])},"tbody",ut(o.slice(1),!0)):[]),!0))}function ff(e){let t=String(e),n=/\r?\n|\r/g,r=n.exec(t),i=0,o=[];for(;r;)o.push(mf(t.slice(i,r.index),i>0,!0),r[0]),i=r.index+r[0].length,r=n.exec(t);return o.push(mf(t.slice(i),i>0,!1)),o.join("")}function mf(e,t,n){let r=0,i=e.length;if(t){let o=e.codePointAt(r);for(;o===9||o===32;)r++,o=e.codePointAt(r)}if(n){let o=e.codePointAt(i-1);for(;o===9||o===32;)i--,o=e.codePointAt(i-1)}return i>r?e.slice(r,i):""}function df(e,t){return e.augment(t,ee("text",ff(String(t.value))))}function hf(e,t){return e(t,"hr")}var El={blockquote:Vm,break:Km,code:Wm,delete:Um,emphasis:Gm,footnoteReference:ia,footnote:Zm,heading:Qm,html:Xm,imageReference:Jm,image:ef,inlineCode:tf,linkReference:nf,link:rf,listItem:of,list:sf,paragraph:lf,root:uf,strong:cf,table:pf,text:df,thematicBreak:hf,toml:aa,yaml:aa,definition:aa,footnoteDefinition:aa};function aa(){return null}var kb={}.hasOwnProperty;function vb(e,t){let n=t||{},r=n.allowDangerousHtml||!1,i={};return a.dangerous=r,a.clobberPrefix=n.clobberPrefix===void 0||n.clobberPrefix===null?"user-content-":n.clobberPrefix,a.footnoteLabel=n.footnoteLabel||"Footnotes",a.footnoteLabelTagName=n.footnoteLabelTagName||"h2",a.footnoteLabelProperties=n.footnoteLabelProperties||{className:["sr-only"]},a.footnoteBackLabel=n.footnoteBackLabel||"Back to content",a.definition=jm(e),a.footnoteById=i,a.footnoteOrder=[],a.footnoteCounts={},a.augment=o,a.handlers={...El,...n.handlers},a.unknownHandler=n.unknownHandler,a.passThrough=n.passThrough,rn(e,"footnoteDefinition",s=>{let l=String(s.identifier).toUpperCase();kb.call(i,l)||(i[l]=s)}),a;function o(s,l){if(s&&"data"in s&&s.data){let u=s.data;u.hName&&(l.type!=="element"&&(l={type:"element",tagName:"",properties:{},children:[]}),l.tagName=u.hName),l.type==="element"&&u.hProperties&&(l.properties={...l.properties,...u.hProperties}),"children"in l&&l.children&&u.hChildren&&(l.children=u.hChildren)}if(s){let u="type"in s?s:{position:s};$m(u)||(l.position={start:na(u),end:ra(u)})}return l}function a(s,l,u,c){return Array.isArray(u)&&(c=u,u={}),o(s,{type:"element",tagName:l,properties:u||{},children:c||[]})}}function sa(e,t){let n=vb(e,t),r=Al(n,e,null),i=qm(n);return i&&r.children.push(ee("text",`
`),i),Array.isArray(r)?{type:"root",children:r}:r}var Sb=function(e,t){return e&&"run"in e?Ob(e,t):Tb(e||t)},Ll=Sb;function Ob(e,t){return(n,r,i)=>{e.run(sa(n,t),r,o=>{i(o)})}}function Tb(e){return t=>sa(t,e)}function Cb(e){return Ws().use(jo).use(qo).parse(e)}function ct(e){let t=String(Ws().use(jo).use(qo).use(Ll).use(ea).processSync(e)).trim();return t.startsWith("<p>")&&(t=t.substring(3)),t.endsWith("</p>")&&(t=t.substring(0,t.length-4)),t}function Ze(e,t){let n=Cb(t),r=[];return rn(n,e,i=>{r.push(i.position)}),r.sort((i,o)=>o.start.offset-i.start.offset),r}function gf(e){let t=Ze("footnoteDefinition",e),n=[],r=new Set,i=new Map,o=function(a,s){let l=a.match(/\[\^.*?\]/)[0],u;do u=e.lastIndexOf(l,s),s=u;while(r.has(u)&&u!==-1);if(u===-1)throw new Error(`Footnote '${a}' has no corresponding footnote reference before the footnote contents and cannot be processed. Please make sure that all footnotes have a corresponding reference before the content of the footnote.`);return r.add(u),u};for(let a of t){let s=e.substring(a.start.offset,a.end.offset);n.push(s),a.end.offset<e.length&&e[a.end.offset]===`
`&&(e=e.substring(0,a.end.offset)+e.substring(a.end.offset+1)),a.end.offset<e.length&&e[a.end.offset]===`
`&&(e=e.substring(0,a.end.offset)+e.substring(a.end.offset+1)),e=e.substring(0,a.start.offset)+e.substring(a.end.offset),i.set(s,o(s,a.start.offset))}n=n.sort((a,s)=>i.get(a)-i.get(s)),n.length>0&&(e=e.trimEnd()+`
`);for(let a of n)e+=`
`+a;return e}function la(e,t,n){let r=Ze(n,e);if(r.length===0)return e;let i="";if(t==="underscore")i="_";else if(t==="asterisk")i="*";else{let o=r[r.length-1];i=e.substring(o.start.offset,o.start.offset+1)}n==="strong"&&(i+=i);for(let o of r){let a=i+e.substring(o.start.offset+i.length,o.end.offset-i.length)+i;e=Ve(e,o.start.offset,o.end.offset,a)}return e}function yf(e){let t=Ze("paragraph",e);if(t.length===0)return e;for(let n of t){let r=e.substring(n.start.offset,n.end.offset).split(`
`),i=r.length-1;if(!(i<1)){for(let o=0;o<i;o++){let a=r[o].trimEnd();a.endsWith("<br>")||a.endsWith("<br/>")||(r[o]=a+" ")}e=Ve(e,n.start.offset,n.end.offset,r.join(`
`))}}return e}function bf(e){let t=e.endsWith(`
`),n=Ze("paragraph",e);if(n.length===0)return e;for(let r of n){let i=r.start.offset;for(i>0&&i--;i>=0&&e.charAt(i)!=`
`;)i--;i++;let o=e.substring(i,r.end.offset).split(`
`),a=o[0].trimStart();if(a.startsWith("> ")||a.startsWith("> ")||a.startsWith("- ")||a.startsWith("- ")||a.match(/^[0-9]+\.( |\t)+/))continue;let s=o.length,l=[],u=!1;for(let d=0;d<s;d++){let h=o[d];if(u){let g=l.length-1;l[g]+=`
`+h}else l.push(h);u=h.endsWith("<br>")||h.endsWith("<br/>")||h.endsWith(" ")}for(;i>0&&e.charAt(i-1)==`
`;)i--;let c=e.length,p=r.end.offset;for(p<c&&p++;p<c&&e.charAt(p)==`
`;)p++;let m=`
`;i==0&&(m="");let f=`
`;p==c&&(f=""),e=Ve(e,i,p,m+l.join(`
`)+f)}return t&&!e.endsWith(`
`)&&(e+=`
`),e}function wf(e){let t=Ze("link",e);for(let n of t){if(n==null)continue;let r=e.substring(n.start.offset,n.end.offset);if(!r.match(ho))continue;let i=r.indexOf("]"),o=r.substring(0,1)+r.substring(1,i).trim()+r.substring(i);e=Ve(e,n.start.offset,n.end.offset,o)}return e}function xf(e,t){let n=Ze("emphasis",e);for(let r of n){let i=e.substring(r.start.offset+1,r.end.offset-1);i=t(i),e=Ve(e,r.start.offset+1,r.end.offset-1,i)}return e}function kf(e,t){let n=Ze("strong",e);for(let r of n){let i=e.substring(r.start.offset+2,r.end.offset-2);i=t(i),e=Ve(e,r.start.offset+2,r.end.offset-2,i)}return e}function vf(e,t){let n=Ze("listItem",e);for(let r of n){let i=e.substring(r.start.offset+2,r.end.offset),o=/\n(( |\t)*>?)*(\*|-|\+|- \[( | x)\]|\d+\.) /g,a=i.match(o);if(a){let s=i.split(new RegExp(o.source.replaceAll("(","(?:"))),l="",u=0;for(let c of s)u>0&&(l+=a[u-1]),l+=t(c),u++;i=l}else i=t(i);e=Ve(e,r.start.offset+2,r.end.offset,i)}return e}function Sf(e){let t=Ze("code",e);for(let n of t)!e.substring(n.start.offset,n.end.offset).startsWith("```")||(e=ko(e,n.start.offset,n.end.offset));return e}function Of(e){let t=Ze("table",e);for(let n of t)e=ko(e,n.start.offset,n.end.offset);return e}function Tf(e){let t=Ze("blockquote",e);for(let n of t)e=ko(e,n.start.offset,n.end.offset,!0);return e}function Cf(e,t,n){let r=Ze("list",e);if(!r)return e;for(let i of r){let o=i.start.offset;for(;o>0&&e.charAt(o-1)!==`
`;)o--;let a=e.substring(o,i.end.offset),s=function(c){let p=c.lastIndexOf("> ");return p!==-1&&(c=c.substring(p+2)),c=c.replaceAll(" "," "),Math.floor((c.split(" ").length-1)/2)+1},l=new Map,u=-1;a=a.replace(/^(( |\t|> )*)(\d+(\.|\)))([^\n]*)$/gm,(c,p="",m,f,d,h)=>{let g=1,b=s(p);if(l.has(b)?t==="ascending"&&(g=l.get(b)+1,l.set(b,g)):l.set(b,1),u>b){let O=u;for(;O>b;)l.delete(O--)}return u=b,`${p}${g}${n}${h}`}),e=Ve(e,o,i.end.offset,a)}return e}function Af(e,t){let n=Ze("listItem",e);if(!n)return e;let r=/^((\d+[.)])|(- \[[ x]\]))/m,i=t;if(t=="consistent"){let o=n.length-1;for(;o>=0;){let a=e.substring(n[o].start.offset,n[o].end.offset);if(o--,!a.match(r)){i=a.charAt(0);break}}if(o==-1)return e}for(let o of n){let a=e.substring(o.start.offset,o.end.offset);a.match(r)||(a=i+a.substring(1),e=Ve(e,o.start.offset,o.end.offset,a))}return e}var Pn=class{constructor(t,n,r,i){this.name=t,this.description=n,this.defaultValue=r,this.searchInfo={name:t,description:n},i&&(this.ruleName=i)}setOption(t,n){n.ruleConfigs[this.ruleName][this.name]=t}},fr=class extends Pn{display(n,r,i){let o=new dr.Setting(n).addToggle(a=>{a.setValue(r.ruleConfigs[this.ruleName][this.name]),a.onChange(s=>{this.setOption(s,r),i.settings=r,i.saveData(i.settings)})});o.nameEl.innerHTML=ct(this.name),o.descEl.innerHTML=ct(this.description),o.settingEl.style.border="none"}},ti=class extends Pn{display(n,r,i){let o=new dr.Setting(n).addText(a=>{a.setValue(r.ruleConfigs[this.ruleName][this.name]),a.onChange(s=>{this.setOption(s,r),i.settings=r,i.saveData(i.settings)})});o.nameEl.innerHTML=ct(this.name),o.descEl.innerHTML=ct(this.description),o.settingEl.style.border="none"}},ua=class extends Pn{display(n,r,i){let o=new dr.Setting(n).addTextArea(a=>{a.setValue(r.ruleConfigs[this.ruleName][this.name]),a.onChange(s=>{this.setOption(s,r),i.settings=r,i.saveData(i.settings)})});o.nameEl.innerHTML=ct(this.name),o.descEl.innerHTML=ct(this.description),o.settingEl.style.border="none"}},ca=class extends Pn{display(n,r,i){let o=new dr.Setting(n).addMomentFormat(a=>{a.setValue(r.ruleConfigs[this.ruleName][this.name]),a.setPlaceholder("dddd, MMMM Do YYYY, h:mm:ss a"),a.onChange(s=>{this.setOption(s,r),i.settings=r,i.saveData(i.settings)})});o.nameEl.innerHTML=ct(this.name),o.descEl.innerHTML=ct(this.description),o.settingEl.style.border="none"}},pa=class{constructor(t,n){this.value=t,this.description=n}},ma=class extends Pn{constructor(n,r,i,o,a){super(n,r,i,a);this.options=o,this.searchInfo.options=o}display(n,r,i){let o=new dr.Setting(n).addDropdown(a=>{for(let s of this.options)a.addOption(s.value,s.value);a.setValue(r.ruleConfigs[this.ruleName][this.name]),a.onChange(s=>{this.setOption(s,r),i.settings=r,i.saveData(i.settings)})});o.nameEl.innerHTML=ct(this.name),o.descEl.innerHTML=ct(this.description),o.settingEl.style.border="none"}};var pn=class extends Error{constructor(t,n){var r;super(t),this.cause=n!=null?n:null,this.stack=(r=n.stack)!=null?r:null,Object.setPrototypeOf(this,pn.prototype)}};var W=(o=>(o.YAML="YAML",o.HEADING="Heading",o.FOOTNOTE="Footnote",o.CONTENT="Content",o.SPACING="Spacing",o))(W||{}),fa=class{constructor(t,n,r,i,o,a=[],s=!1){this.name=t,this.description=n,this.type=r,this.apply=i,this.examples=o,a.unshift(new fr(this.description,"",!1));for(let l of a)l.ruleName=t;this.options=a,this.hasSpecialExecutionOrder=s}alias(){return this.name.replace(/ /g,"-").toLowerCase()}getDefaultOptions(){let t={};for(let n of this.options)t[n.name]=n.defaultValue;return t}getOptions(t){return t.ruleConfigs[this.name]}getURL(){return"https://github.com/platers/obsidian-linter/blob/master/docs/rules.md"+"#"+this.alias()}enabledOptionName(){return this.options[0].name}},da=class{constructor(t,n,r,i={}){this.description=t,this.options=i,this.before=n,this.after=r}},Ef=Object.values(W);function Lf(e){let t=e.match(Ie);if(!t)return[];let n=t[1],r=Be(n,"disabled rules");if(r==null)return[];let i=r.includes(`
`)?`disabled rules:
`:"disabled rules: ";i+=r;let a=ht(i)["disabled rules"];return a?(typeof a=="string"&&(a=[a]),a.includes("all")?Nt.map(s=>s.alias()):a):[]}var Nt=[],Ab=Nt.reduce((e,t)=>(e[t.alias()]=t,e),{});function _f(e){Nt.push(e),Nt.sort((t,n)=>Ef.indexOf(t.type)-Ef.indexOf(n.type)||t.name.localeCompare(n.name)),Ab[e.alias()]=e}function ha(e,t){let n;throw e instanceof uc?(n=e.toString(),n=`error in the yaml: ${n.substring(n.indexOf(":")+1)}`):n=`unknown error: ${e.message}`,new pn(`"${t}" encountered an ${n}`,e)}var Tr=Xn(If());function Eb(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];var r=Array.from(typeof e=="string"?[e]:e);r[r.length-1]=r[r.length-1].replace(/\r?\n([\t ]*)$/,"");var i=r.reduce(function(s,l){var u=l.match(/\n([\t ]+|(?!\s).)/g);return u?s.concat(u.map(function(c){var p,m;return(m=(p=c.match(/[\t ]/g))===null||p===void 0?void 0:p.length)!==null&&m!==void 0?m:0})):s},[]);if(i.length){var o=new RegExp(`
[ ]{`+Math.min.apply(Math,i)+"}","g");r=r.map(function(s){return s.replace(o,`
`)})}r[0]=r[0].replace(/^\r?\n/,"");var a=r[0];return t.forEach(function(s,l){var u=a.match(/(?:^|\n)( *)$/),c=u?u[1]:"",p=s;typeof s=="string"&&s.includes(`
`)&&(p=String(s).split(`
`).map(function(m,f){return f===0?m:""+c+m}).join(`
`)),a+=p+r[l+1]}),a}var y=Eb;var ld=Xn(_l());var ze=Xn(_l()),ya="[Obsidian Linter]";function Bf(e,t){let n=`${ya} ${e}:
`;t.stack?n+=t.stack:n+=`${t.name} ${t.message}`,ze.default.error(n)}function ni(e){ze.default.info(`${ya} ${e}`)}function mn(e){ze.default.debug(`${ya} ${e}`)}function Ff(e){ze.default.warn(`${ya} ${e}`)}function Rf(e){switch(e){case ze.default.levels.INFO:{ze.default.setLevel("info");break}case ze.default.levels.TRACE:{ze.default.setLevel("trace");break}case ze.default.levels.DEBUG:{ze.default.setLevel("debug");break}case ze.default.levels.SILENT:{ze.default.setLevel("silent");break}case ze.default.levels.ERROR:{ze.default.setLevel("error");break}case ze.default.levels.WARN:{ze.default.setLevel("warn");break}}}var $a=require("obsidian");var gr,ri,fn,bt=class{static getRule(){if(!pt(bt,gr).has(this.name)){let t=new this,n=new fa(t.name,t.description,t.type,t.safeApply.bind(t),t.exampleBuilders.map(r=>r.example),t.optionBuilders.map(r=>r.option),t.hasSpecialExecutionOrder);pt(bt,gr).set(this.name,n),pt(bt,ri).set(t.name,t)}return pt(bt,gr).get(this.name)}static applyIfEnabledBase(t,n,r,i){let o=t.getOptions(r);if(o[t.enabledOptionName()]){let a=Object.assign({},o,i);mn(`Running ${t.name}`);try{return[t.apply(n,a),!0]}catch(s){ha(s,t.name)}}else return[n,!1]}static getBuilderByName(t){return pt(bt,ri).get(t)}static setNoSettingControl(t,n){pt(bt,fn).has(t)||pt(bt,fn).set(t,[]),pt(bt,fn).get(t).push(n)}static hasSettingControl(t,n){return!pt(bt,fn).has(t)||!pt(bt,fn).get(t).includes(n)}},Ct=bt;gr=new WeakMap,ri=new WeakMap,fn=new WeakMap,Jn(Ct,gr,new Map),Jn(Ct,ri,new Map),Jn(Ct,fn,new Map);var A=class extends Ct{static register(t){let n=t.getRule();_f(n)}safeApply(t,n){return this.apply(t,this.buildRuleOptions(n))}buildRuleOptions(t){t=t!=null?t:{};let n=new this.OptionsClass,r=Object.assign(n,t);for(let i of this.optionBuilders)i.setRuleOption(r,t);return r}get hasSpecialExecutionOrder(){return!1}static applyIfEnabled(t,n,r,i){let o=this.getRule();return r.includes(o.alias())?(mn(o.alias()+" is disabled"),[t,!1]):Ct.applyIfEnabledBase(o,t,n,i)}static getRuleOptions(t){let n=Ct.getRule.bind(this)(),r=new this,i=n.getOptions(t);return r.buildRuleOptions(i)}static noSettingControl(){return(t,n)=>{let r=t.constructor.name;Ct.setNoSettingControl(r,n)}}},Il,T=class{constructor(t){Jn(this,Il,void 0);this.example=new da(t.description,t.before,t.after,t.options)}};Il=new WeakMap;var yr,dn=class{constructor(t){Jn(this,yr,void 0);this.OptionsClass=t.OptionsClass,this.name=t.name,this.description=t.description,this.optionsKey=t.optionsKey}get defaultValue(){return new this.OptionsClass()[this.optionsKey]}get option(){return pt(this,yr)||xu(this,yr,this.buildOption()),pt(this,yr)}setRuleOption(t,n){let r=n[this.name];r!==void 0&&(t[this.optionsKey]=r)}};yr=new WeakMap;var se=class extends dn{buildOption(){return new fr(this.name,this.description,this.defaultValue)}},ba=class extends dn{buildOption(){return new ti(this.name,this.description,this.defaultValue)}},de=class extends dn{constructor(n){super(n);this.records=n.records.map(r=>new pa(r.value,r.description))}buildOption(){return new ma(this.name,this.description,this.defaultValue,this.records)}},Re=class extends dn{constructor(n){var r,i;super(n);this.separator=(r=n.separator)!=null?r:`
`,this.splitter=(i=n.splitter)!=null?i:/\n/}buildOption(){return new ua(this.name,this.description,this.defaultValue.join(this.separator))}setRuleOption(n,r){if(r[this.name]!==void 0){let i=r[this.name].split(this.splitter).filter(function(o){return o!=""});n[this.optionsKey]=i}}},Nn=class extends dn{buildOption(){return new ti(this.name,this.description,this.defaultValue)}},wa=class extends dn{buildOption(){return new ca(this.name,this.description,this.defaultValue)}};var v={code:{replaceAction:"code",placeholder:"{CODE_BLOCK_PLACEHOLDER}"},inlineCode:{replaceAction:"inlineCode",placeholder:"{INLINE_CODE_BLOCK_PLACEHOLDER}"},image:{replaceAction:"image",placeholder:"{IMAGE_PLACEHOLDER}"},thematicBreak:{replaceAction:"thematicBreak",placeholder:"{HORIZONTAL_RULE_PLACEHOLDER}"},italics:{replaceAction:"emphasis",placeholder:"{ITALICS_PLACEHOLDER}"},bold:{replaceAction:"strong",placeholder:"{STRONG_PLACEHOLDER}"},list:{replaceAction:"list",placeholder:"{LIST_PLACEHOLDER}"},blockquote:{replaceAction:"blockquote",placeholder:"{BLOCKQUOTE_PLACEHOLDER}"},table:{replaceAction:"table",placeholder:"{TABLE_PLACEHOLDER}"},math:{replaceAction:"math",placeholder:"{MATH_PLACEHOLDER}"},inlineMath:{replaceAction:"inlineMath",placeholder:"{INLINE_MATH_PLACEHOLDER}"},yaml:{replaceAction:Ie,placeholder:je(`---
---`)},wikiLink:{replaceAction:os,placeholder:"{WIKI_LINK_PLACEHOLDER}"},tag:{replaceAction:Pr,placeholder:"#tag-placeholder"},obsidianMultiLineComments:{replaceAction:pc,placeholder:"{OBSIDIAN_COMMENT_PLACEHOLDER}"},link:{replaceAction:Mb,placeholder:"{REGULAR_LINK_PLACEHOLDER}"}};function $(e,t,n){let r=[];for(let i of e){let o;if(typeof i.replaceAction=="string")o=_b(t,i.placeholder,i.replaceAction);else if(i.replaceAction instanceof RegExp)o=Ib(t,i.placeholder,i.replaceAction);else if(typeof i.replaceAction=="function"){let a=i.replaceAction;o=a(t,i.placeholder)}t=o.newText,r.push({replacedValues:o.replacedValues,placeholder:i.placeholder})}return t=n(t),r=r.reverse(),r!=null&&r.length>0&&r.forEach(i=>{i.replacedValues.forEach(o=>{t=t.replace(new RegExp(i.placeholder,"i"),je(o))})}),t}function _b(e,t,n){let r=Ze(n,e),i=[];for(let o of r){let a=e.substring(o.start.offset,o.end.offset);i.push(a),e=Ve(e,o.start.offset,o.end.offset,t)}return i.reverse(),{newText:e,replacedValues:i}}function Ib(e,t,n){let r=e.match(n),i=[];if(n.flags.includes("g")){if(e=e.replaceAll(n,t),r)for(let o of r)i.push(o)}else e=e.replace(n,t),r&&i.push(r[0]);return{newText:e,replacedValues:i}}function Mb(e,t){let n=Ze("link",e),r=[];for(let i of n){if(i==null)continue;let o=e.substring(i.start.offset,i.end.offset);!o.match(ho)||(r.push(o),e=Ve(e,i.start.offset,i.end.offset,t))}return r.reverse(),{newText:e,replacedValues:r}}var zn=class{constructor(){this.style="Title Case";this.ignoreWords=["macOS","iOS","iPhone","iPad","JavaScript","TypeScript","AppleScript"];this.lowercaseWords=["via","a","an","the","and","or","but","for","nor","so","yet","at","by","in","of","on","to","up","as","is","if","it","for","to","with","without","into","onto","per"];this.ignoreCasedWords=!0}},ii=class extends A{get OptionsClass(){return zn}get name(){return"Capitalize Headings"}get description(){return"Headings should be formatted with capitalization"}get type(){return"Heading"}apply(t,n){return $([v.code,v.yaml,v.link,v.wikiLink,v.tag],t,r=>{let i=r.split(`
`);for(let o=0;o<i.length;o++)if(!!i[o].match(ir))switch(n.style){case"Title Case":{let s=i[o].match(/\S+/g),l=n.ignoreWords,u=n.lowercaseWords,c=!0;for(let p=1;p<s.length;p++){if(!s[p].match(/^[\p{L}'-]+[.?!,:;]?$/u))continue;n.ignoreCasedWords&&s[p]!==s[p].toLowerCase()||l.includes(s[p])||(s[p]=s[p].toLowerCase(),(!u.includes(s[p])||c===!0)&&(s[p]=s[p][0].toUpperCase()+s[p].slice(1))),c=!1}i[o]=i[o].replace(ir,je(`${s.join(" ")}`));break}case"ALL CAPS":i[o]=i[o].toUpperCase();break;case"First letter":i[o]=i[o].toLowerCase().replace(/^#*\s+([^\p{L}])*([\p{L}])/u,s=>s.toUpperCase());break}return i.join(`
`)})}get exampleBuilders(){return[new T({description:"With `Title Case=true`, `Ignore Cased Words=false`",before:y`
# this is a heading 1
## THIS IS A HEADING 2
### a heading 3
`,after:y`
# This is a Heading 1
## This is a Heading 2
### A Heading 3
`,options:{style:"Title Case",ignoreCasedWords:!1}}),new T({description:"With `Title Case=true`, `Ignore Cased Words=true`",before:y`
# this is a heading 1
## THIS IS A HEADING 2
### a hEaDiNg 3
`,after:y`
# This is a Heading 1
## THIS IS A HEADING 2
### A hEaDiNg 3
`,options:{style:"Title Case",ignoreCasedWords:!0}}),new T({description:"With `First letter=true`",before:y`
# this is a heading 1
## this is a heading 2
`,after:y`
# This is a heading 1
## This is a heading 2
`,options:{style:"First letter"}}),new T({description:"With `ALL CAPS=true`",before:y`
# this is a heading 1
## this is a heading 2
`,after:y`
# THIS IS A HEADING 1
## THIS IS A HEADING 2
`,options:{style:"ALL CAPS"}})]}get optionBuilders(){return[new de({OptionsClass:zn,name:"Style",description:"The style of capitalization to use",optionsKey:"style",records:[{value:"Title Case",description:"Capitalize Using Title Case Rules"},{value:"ALL CAPS",description:"CAPITALIZE THE WHOLE TITLE"},{value:"First letter",description:"Only capitalize the first letter"}]}),new se({OptionsClass:zn,name:"Ignore Cased Words",description:"Only apply title case style to words that are all lowercase",optionsKey:"ignoreCasedWords"}),new Re({OptionsClass:zn,name:"Ignore Words",description:"A comma separated list of words to ignore when capitalizing",optionsKey:"ignoreWords",splitter:as,separator:", "}),new Re({OptionsClass:zn,name:"Lowercase Words",description:"A comma separated list of words to keep lowercase",optionsKey:"lowercaseWords",splitter:as,separator:", "})]}};ii=B([A.register],ii);var xa=class{constructor(){this.innerNewLines=!1}},oi=class extends A{get OptionsClass(){return xa}get name(){return"Compact YAML"}get description(){return"Removes leading and trailing blank lines in the YAML front matter."}get type(){return"Spacing"}apply(t,n){return qe(t,r=>(r=r.replace(/^---\n+/,`---
`),r=r.replace(/\n+---/,`
---`),n.innerNewLines&&(r=r.replaceAll(/\n{2,}/g,`
`)),r))}get exampleBuilders(){return[new T({description:"Remove blank lines at the start and end of the YAML",before:y`
---
${""}
date: today
${""}
title: unchanged without inner new lines turned on
${""}
---
`,after:y`
---
date: today
${""}
title: unchanged without inner new lines turned on
---
`}),new T({description:"Remove blank lines anywhere in YAML with inner new lines set to true",before:y`
---
${""}
date: today
${""}
${""}
title: remove inner new lines
${""}
---
${""}
# Header 1
${""}
${""}
Body content here.
`,after:y`
---
date: today
title: remove inner new lines
---
${""}
# Header 1
${""}
${""}
Body content here.
`,options:{innerNewLines:!0}})]}get optionBuilders(){return[new se({OptionsClass:xa,name:"Inner New Lines",description:"Remove new lines that are not at the start or the end of the YAML",optionsKey:"innerNewLines"})]}};oi=B([A.register],oi);var Ml=class{},ai=class extends A{get OptionsClass(){return Ml}get name(){return"Consecutive blank lines"}get description(){return"There should be at most one consecutive blank line."}get type(){return"Spacing"}apply(t,n){return $([v.code,v.yaml,v.link,v.wikiLink,v.tag],t,r=>r.replace(/\n{2,}/g,`
`))}get exampleBuilders(){return[new T({description:"",before:y`
Some text
${""}
${""}
Some more text
`,after:y`
Some text
${""}
Some more text
`})]}get optionBuilders(){return[]}};ai=B([A.register],ai);var Bl=class{},si=class extends A{get OptionsClass(){return Bl}get name(){return"Convert Bullet List Markers"}get description(){return"Converts common bullet list marker symbols to markdown list markers."}get type(){return"Content"}apply(t,n){return $([v.code,v.yaml,v.link,v.wikiLink,v.tag],t,r=>r.replace(/^([^\S\n]*)([•§])([^\S\n]*)/gm,"$1-$3"))}get exampleBuilders(){return[new T({description:"Converts \u2022",before:y`
• item 1
• item 2
`,after:y`
- item 1
- item 2
`}),new T({description:"Converts \xA7",before:y`
• item 1
§ item 2
§ item 3
`,after:y`
- item 1
- item 2
- item 3
`})]}get optionBuilders(){return[]}};si=B([A.register],si);var ka=class{constructor(){this.tabsize=4}},li=class extends A{get OptionsClass(){return ka}get name(){return"Convert Spaces to Tabs"}get description(){return"Converts leading spaces to tabs."}get type(){return"Spacing"}apply(t,n){return $([v.code,v.yaml,v.link,v.wikiLink,v.tag],t,r=>{let i=String(n.tabsize),o=new RegExp("^( *) {"+String(i)+"}","gm");for(;r.match(o)!=null;)r=r.replace(o,"$1 ");return r})}get exampleBuilders(){return[new T({description:"Converting spaces to tabs with `tabsize = 3`",before:y`
- text with no indention
- text indented with 3 spaces
- text with no indention
- text indented with 6 spaces
`,after:y`
- text with no indention
\t- text indented with 3 spaces
- text with no indention
\t\t- text indented with 6 spaces
`,options:{tabsize:3}})]}get optionBuilders(){return[new ba({OptionsClass:ka,name:"Tabsize",description:"Number of spaces that will be converted to a tab",optionsKey:"tabsize"})]}};li=B([A.register],li);var va=class{constructor(){this.style="consistent"}},ui=class extends A{get OptionsClass(){return va}get name(){return"Emphasis Style"}get description(){return"Makes sure the emphasis style is consistent."}get type(){return"Content"}apply(t,n){return $([v.code,v.yaml,v.link,v.wikiLink,v.tag,v.math,v.inlineMath],t,r=>la(r,n.style,"emphasis"))}get exampleBuilders(){return[new T({description:"Emphasis indicators should use underscores when style is set to 'underscore'",before:y`
# Emphasis Cases
${""}
*Test emphasis*
* Test not emphasized *
This is *emphasized* mid sentence
This is *emphasized* mid sentence with a second *emphasis* on the same line
This is ***bold and emphasized***
This is ***nested bold** and ending emphasized*
This is ***nested emphasis* and ending bold**
${""}
**Test bold**
${""}
* List Item1 with *emphasized text*
* List Item2
`,after:y`
# Emphasis Cases
${""}
_Test emphasis_
* Test not emphasized *
This is _emphasized_ mid sentence
This is _emphasized_ mid sentence with a second _emphasis_ on the same line
This is _**bold and emphasized**_
This is _**nested bold** and ending emphasized_
This is **_nested emphasis_ and ending bold**
${""}
**Test bold**
${""}
* List Item1 with _emphasized text_
* List Item2
`,options:{style:"underscore"}}),new T({description:"Emphasis indicators should use asterisks when style is set to 'asterisk'",before:y`
# Emphasis Cases
${""}
_Test emphasis_
_ Test not emphasized _
This is _emphasized_ mid sentence
This is _emphasized_ mid sentence with a second _emphasis_ on the same line
This is ___bold and emphasized___
This is ___nested bold__ and ending emphasized_
This is ___nested emphasis_ and ending bold__
${""}
__Test bold__
`,after:y`
# Emphasis Cases
${""}
*Test emphasis*
_ Test not emphasized _
This is *emphasized* mid sentence
This is *emphasized* mid sentence with a second *emphasis* on the same line
This is *__bold and emphasized__*
This is *__nested bold__ and ending emphasized*
This is __*nested emphasis* and ending bold__
${""}
__Test bold__
`,options:{style:"asterisk"}}),new T({description:"Emphasis indicators should use consistent style based on first emphasis indicator in a file when style is set to 'consistent'",before:y`
# Emphasis First Emphasis Is an Asterisk
${""}
*First emphasis*
This is _emphasized_ mid sentence
This is *emphasized* mid sentence with a second _emphasis_ on the same line
This is *__bold and emphasized__*
This is *__nested bold__ and ending emphasized*
This is **_nested emphasis_ and ending bold**
${""}
__Test bold__
`,after:y`
# Emphasis First Emphasis Is an Asterisk
${""}
*First emphasis*
This is *emphasized* mid sentence
This is *emphasized* mid sentence with a second *emphasis* on the same line
This is *__bold and emphasized__*
This is *__nested bold__ and ending emphasized*
This is ***nested emphasis* and ending bold**
${""}
__Test bold__
`,options:{style:"consistent"}}),new T({description:"Emphasis indicators should use consistent style based on first emphasis indicator in a file when style is set to 'consistent'",before:y`
# Emphasis First Emphasis Is an Underscore
${""}
**_First emphasis_**
This is _emphasized_ mid sentence
This is *emphasized* mid sentence with a second _emphasis_ on the same line
This is *__bold and emphasized__*
This is _**nested bold** and ending emphasized_
This is __*nested emphasis* and ending bold__
${""}
__Test bold__
`,after:y`
# Emphasis First Emphasis Is an Underscore
${""}
**_First emphasis_**
This is _emphasized_ mid sentence
This is _emphasized_ mid sentence with a second _emphasis_ on the same line
This is ___bold and emphasized___
This is _**nested bold** and ending emphasized_
This is ___nested emphasis_ and ending bold__
${""}
__Test bold__
`,options:{style:"consistent"}})]}get optionBuilders(){return[new de({OptionsClass:va,name:"Style",description:"The style used to denote emphasized content",optionsKey:"style",records:[{value:"consistent",description:"Makes sure the first instance of emphasis is the style that will be used throughout the document"},{value:"asterisk",description:"Makes sure * is the emphasis indicator"},{value:"underscore",description:"Makes sure _ is the emphasis indicator"}]})]}};ui=B([A.register],ui);var Fl=class{},ci=class extends A{get OptionsClass(){return Fl}get name(){return"Empty Line Around Blockquotes"}get description(){return"Ensures that there is an empty line around blockquotes unless they start or end a document. **Note that an empty line is either one less level of nesting for blockquotes or a newline character.**"}get type(){return"Spacing"}apply(t,n){return Tf(t)}get exampleBuilders(){return[new T({description:"Blockquotes that start a document do not get an empty line before them.",before:y`
> Quote content here
> quote content continued
# Title here
`,after:y`
> Quote content here
> quote content continued
${""}
# Title here
`}),new T({description:"Blockquotes that end a document do not get an empty line after them.",before:y`
# Heading 1
> Quote content here
> quote content continued
`,after:y`
# Heading 1
${""}
> Quote content here
> quote content continued
`}),new T({description:"Blockquotes that are nested have the proper empty line added",before:y`
# Make sure that nested blockquotes are accounted for correctly
> Quote content here
> quote content continued
> > Nested Blockquote
> > content continued
${""}
**Note that the empty line is either one less blockquote indicator if followed/proceeded by more blockquote content or it is an empty line**
${""}
# Doubly nested code block
${""}
> > Quote content here
> > quote content continued
`,after:y`
# Make sure that nested blockquotes are accounted for correctly
${""}
> Quote content here
> quote content continued
>
> > Nested Blockquote
> > content continued
${""}
**Note that the empty line is either one less blockquote indicator if followed/proceeded by more blockquote content or it is an empty line**
${""}
# Doubly nested code block
${""}
> > Quote content here
> > quote content continued
`})]}get optionBuilders(){return[]}};ci=B([A.register],ci);var Rl=class{},pi=class extends A{get OptionsClass(){return Rl}get name(){return"Empty Line Around Code Fences"}get description(){return"Ensures that there is an empty line around code fences unless they start or end a document."}get type(){return"Spacing"}apply(t,n){return Sf(t)}get exampleBuilders(){return[new T({description:"Fenced code blocks that start a document do not get an empty line before them.",before:y`
\`\`\` js
var temp = 'text';
// this is a code block
\`\`\`
Text after code block.
`,after:y`
\`\`\` js
var temp = 'text';
// this is a code block
\`\`\`
${""}
Text after code block.
`}),new T({description:"Fenced code blocks that end a document do not get an empty line after them.",before:y`
# Heading 1
\`\`\`
Here is a code block
\`\`\`
`,after:y`
# Heading 1
${""}
\`\`\`
Here is a code block
\`\`\`
`}),new T({description:"Fenced code blocks that are in a blockquote have the proper empty line added",before:y`
# Make sure that code blocks in blockquotes are accounted for correctly
> \`\`\`js
> var text = 'this is some text';
> \`\`\`
>
> \`\`\`js
> var other text = 'this is more text';
> \`\`\`
${""}
**Note that the blanks blockquote lines added do not have whitespace after them**
${""}
# Doubly nested code block
${""}
> > \`\`\`js
> > var other text = 'this is more text';
> > \`\`\`
`,after:y`
# Make sure that code blocks in blockquotes are accounted for correctly
>
> \`\`\`js
> var text = 'this is some text';
> \`\`\`
>
> \`\`\`js
> var other text = 'this is more text';
> \`\`\`
>
${""}
**Note that the blanks blockquote lines added do not have whitespace after them**
${""}
# Doubly nested code block
${""}
> >
> > \`\`\`js
> > var other text = 'this is more text';
> > \`\`\`
`}),new T({description:"Nested fenced code blocks get empty lines added around them",before:y`
\`\`\`markdown
# Header
${""}
\`\`\`\`JavaScript
var text = 'some string';
\`\`\`\`
\`\`\`
`,after:y`
\`\`\`markdown
# Header
${""}
\`\`\`\`JavaScript
var text = 'some string';
\`\`\`\`
${""}
\`\`\`
`})]}get optionBuilders(){return[]}};pi=B([A.register],pi);var Dl=class{},mi=class extends A{get OptionsClass(){return Dl}get name(){return"Empty Line Around Tables"}get description(){return"Ensures that there is an empty line around github flavored tables unless they start or end a document."}get type(){return"Spacing"}apply(t,n){return $([v.yaml,v.code],t,r=>Of(r))}get exampleBuilders(){return[new T({description:"Tables that start a document do not get an empty line before them.",before:y`
| Column 1 | Column 2 |
|----------|----------|
| foo | bar |
| baz | qux |
| quux | quuz |
More text.
# Heading
${""}
**Note that text directly following a table is considered part of a table according to github markdown**
`,after:y`
| Column 1 | Column 2 |
|----------|----------|
| foo | bar |
| baz | qux |
| quux | quuz |
More text.
${""}
# Heading
${""}
**Note that text directly following a table is considered part of a table according to github markdown**
`}),new T({description:"Tables that end a document do not get an empty line after them.",before:y`
# Heading 1
| Column 1 | Column 2 |
|----------|----------|
| foo | bar |
| baz | qux |
| quux | quuz |
`,after:y`
# Heading 1
${""}
| Column 1 | Column 2 |
|----------|----------|
| foo | bar |
| baz | qux |
| quux | quuz |
`}),new T({description:"Tables that are not at the start or the end of the document will have an empty line added before and after them",before:y`
# Table 1
| Column 1 | Column 2 | Column 3 |
|----------|----------|----------|
| foo | bar | blob |
| baz | qux | trust |
| quux | quuz | glob |
# Table 2 without Pipe at Start and End
| Column 1 | Column 2 |
:-: | -----------:
bar | baz
foo | bar
# Header for more content
New paragraph.
`,after:y`
# Table 1
${""}
| Column 1 | Column 2 | Column 3 |
|----------|----------|----------|
| foo | bar | blob |
| baz | qux | trust |
| quux | quuz | glob |
${""}
# Table 2 without Pipe at Start and End
${""}
| Column 1 | Column 2 |
:-: | -----------:
bar | baz
foo | bar
${""}
# Header for more content
New paragraph.
`}),new T({description:"Tables in callouts or blockquotes have the appropriately formatted blank lines added",before:y`
> Table in blockquote
> | Column 1 | Column 2 | Column 3 |
> |----------|----------|----------|
> | foo | bar | blob |
> | baz | qux | trust |
> | quux | quuz | glob |
${""}
More content here
${""}
> Table doubly nested in blockquote
> > | Column 1 | Column 2 | Column 3 |
> > |----------|----------|----------|
> > | foo | bar | blob |
> > | baz | qux | trust |
> > | quux | quuz | glob |
`,after:y`
> Table in blockquote
>
> | Column 1 | Column 2 | Column 3 |
> |----------|----------|----------|
> | foo | bar | blob |
> | baz | qux | trust |
> | quux | quuz | glob |
>
${""}
More content here
${""}
> Table doubly nested in blockquote
> >
> > | Column 1 | Column 2 | Column 3 |
> > |----------|----------|----------|
> > | foo | bar | blob |
> > | baz | qux | trust |
> > | quux | quuz | glob |
`})]}get optionBuilders(){return[]}};mi=B([A.register],mi);var br=class{constructor(){this.defaultEscapeCharacter='"';this.tryToEscapeSingleLineArrays=!1;this.forceYamlEscape=[]}},$n=class extends A{get OptionsClass(){return br}get name(){return"Escape YAML Special Characters"}get description(){return`Escapes colons with a space after them (: ), single quotes ('), and double quotes (") in YAML.`}get type(){return"YAML"}apply(t,n){return qe(t,r=>{let i=r.split(`
`),o=i.length;if(o<1)return r;let a=function(u){return u.length>1&&(u.startsWith("'")&&u.endsWith("'")||u.startsWith('"')&&u.endsWith('"'))},s=function(u,c){if(a(c))return u;let p=c.includes("'"),m=c.includes('"'),f=c.includes(": ");if(!p&&!m&&!f||p&&m)return u;let d;return p?d=u.replace(c,`"${c}"`):m?d=u.replace(c,`'${c}'`):d=u.replace(c,`${n.defaultEscapeCharacter}${c}${n.defaultEscapeCharacter}`),d};for(let u=0;u<o;u++){let c=i[u].trim(),p=c.indexOf(":"),m=p<0||p+1>=c.length,f=c.startsWith("-"),d=f&&c.length<2;if(m&&d)continue;let h=1;f||(h+=p);let g=c.substring(h).trim();if(g.startsWith("[")){if(n.tryToEscapeSingleLineArrays){if(g.length<3)continue;let b=g.substring(1,g.length-1).split(","),O=b.length;for(let S=0;S<O;S++){let E=b[S].trim();E.startsWith("[")&&(E=E.substring(1).trimStart()),E.endsWith("]")&&(E=E.substring(0,E.length-1).trimEnd()),b[S]=s(b[S],E)}i[u]=i[u].replace(g,"["+b.join(",")+"]")}continue}i[u]=s(i[u],g)}let l=i.join(`
`);for(let u of n.forceYamlEscape){let c=Be(l,u);if(c!=null){if(c.includes(`
`)||c.startsWith(" [")||a(c))continue;l=Me(l,u,` ${n.defaultEscapeCharacter}${c}${n.defaultEscapeCharacter}`)}}return l})}get exampleBuilders(){return[new T({description:"YAML without anything to escape",before:y`
---
key: value
otherKey: []
---
`,after:y`
---
key: value
otherKey: []
---
`}),new T({description:"YAML with unescaped values",before:y`
---
key: value: with colon in the middle
secondKey: value with ' a single quote present
thirdKey: "already escaped: value"
fourthKey: value with " a double quote present
fifthKey: value with both ' " a double and single quote present is not escaped, but is invalid YAML
sixthKey: colon:between characters is fine
otherKey: []
---
`,after:y`
---
key: "value: with colon in the middle"
secondKey: "value with ' a single quote present"
thirdKey: "already escaped: value"
fourthKey: 'value with " a double quote present'
fifthKey: value with both ' " a double and single quote present is not escaped, but is invalid YAML
sixthKey: colon:between characters is fine
otherKey: []
---
`}),new T({description:"YAML with unescaped values in an expanded list with `Default Escape Character = '`",before:y`
---
key:
- value: with colon in the middle
- value with ' a single quote present
- 'already escaped: value'
- value with " a double quote present
- value with both ' " a double and single quote present is not escaped, but is invalid YAML
- colon:between characters is fine
---
`,after:y`
---
key:
- 'value: with colon in the middle'
- "value with ' a single quote present"
- 'already escaped: value'
- 'value with " a double quote present'
- value with both ' " a double and single quote present is not escaped, but is invalid YAML
- colon:between characters is fine
---
`,options:{defaultEscapeCharacter:"'"}}),new T({description:"YAML with unescaped values with arrays",before:y`
---
array: [value: with colon in the middle, value with ' a single quote present, "already escaped: value", value with " a double quote present, value with both ' " a double and single quote present is not escaped but is invalid YAML, colon:between characters is fine]
nestedArray: [[value: with colon in the middle, value with ' a single quote present], ["already escaped: value", value with " a double quote present], value with both ' " a double and single quote present is not escaped but is invalid YAML, colon:between characters is fine]
nestedArray2: [[value: with colon in the middle], value with ' a single quote present]
---
${""}
_Note that escaped commas in a YAML array will be treated as a separator._
`,after:y`
---
array: ["value: with colon in the middle", "value with ' a single quote present", "already escaped: value", 'value with " a double quote present', value with both ' " a double and single quote present is not escaped but is invalid YAML, colon:between characters is fine]
nestedArray: [["value: with colon in the middle", "value with ' a single quote present"], ["already escaped: value", 'value with " a double quote present'], value with both ' " a double and single quote present is not escaped but is invalid YAML, colon:between characters is fine]
nestedArray2: [["value: with colon in the middle"], "value with ' a single quote present"]
---
${""}
_Note that escaped commas in a YAML array will be treated as a separator._
`,options:{tryToEscapeSingleLineArrays:!0}}),new T({description:"Force YAML keys to be escaped with double quotes where not already escaped with `Force Yaml Escape on Keys = ['key', 'title', 'bool']`",before:y`
---
key: 'Already escaped value'
title: This is a title
bool: false
unaffected: value
---
${""}
_Note that the force Yaml key option should not be used with arrays._
`,after:y`
---
key: 'Already escaped value'
title: "This is a title"
bool: "false"
unaffected: value
---
${""}
_Note that the force Yaml key option should not be used with arrays._
`,options:{forceYamlEscape:["key","title","bool"],defaultEscapeCharacter:'"'}})]}get optionBuilders(){return[new de({OptionsClass:br,name:"Default Escape Character",description:"The default character to use to escape YAML values when a single quote and double quote are not present.",optionsKey:"defaultEscapeCharacter",records:[{value:'"',description:"Use a double quote to escape if no single or double quote is present"},{value:"'",description:"Use a single quote to escape if no single or double quote is present"}]}),new se({OptionsClass:br,name:"Try to Escape Single Line Arrays",description:'Tries to escape array values assuming that an array starts with "[", ends with "]", and has items that are delimited by ",".',optionsKey:"tryToEscapeSingleLineArrays"}),new Re({OptionsClass:br,name:"Force Yaml Escape on Keys",description:"Uses the Yaml escape character on the specified Yaml keys separated by a new line character if it is not already escaped. Do not use on Yaml arrays.",optionsKey:"forceYamlEscape"})]}get hasSpecialExecutionOrder(){return!0}};$n=B([A.register],$n);var Sa=class{};B([A.noSettingControl()],Sa.prototype,"fileName",2);var fi=class extends A{get OptionsClass(){return Sa}get name(){return"File Name Heading"}get description(){return"Inserts the file name as a H1 heading if no H1 heading exists."}get type(){return"Heading"}apply(t,n){return $([v.code,v.yaml,v.link,v.wikiLink,v.tag],t,r=>{if(r.match(/^#\s.*/m))return r;let o=n.fileName,a=r.indexOf(`
---`);return a=a==-1||!r.startsWith(`---
`)?0:a+5,On(r,a,`# ${o}
`)})}get exampleBuilders(){return[new T({description:"Inserts an H1 heading",before:y`
This is a line of text
`,after:y`
# File Name
This is a line of text
`,options:{fileName:"File Name"}}),new T({description:"Inserts heading after YAML front matter",before:y`
---
title: My Title
---
This is a line of text
`,after:y`
---
title: My Title
---
# File Name
This is a line of text
`,options:{fileName:"File Name"}})]}get optionBuilders(){return[]}};fi=B([A.register],fi);var Pl=class{},di=class extends A{get OptionsClass(){return Pl}get name(){return"Footnote after Punctuation"}get description(){return"Ensures that footnote references are placed after punctuation, not before."}get type(){return"Footnote"}apply(t,n){return $([v.code,v.yaml,v.link,v.wikiLink,v.tag],t,r=>r.replace(/(?!^)(\[\^\w+\]) ?([,.;!:?])/gm,"$2$1"))}get exampleBuilders(){return[new T({description:"Placing footnotes after punctuation.",before:y`
Lorem[^1]. Ipsum[^2], doletes.
`,after:y`
Lorem.[^1] Ipsum,[^2] doletes.
`})]}get optionBuilders(){return[]}};di=B([A.register],di);var Nl=class{},Hn=class extends A{get OptionsClass(){return Nl}get name(){return"Format Tags in YAML"}get description(){return"Remove Hashtags from tags in the YAML frontmatter, as they make the tags there invalid."}get type(){return"YAML"}apply(t,n){return qe(t,r=>r.replace(/\ntags:(.*?)(?=\n(?:[A-Za-z-]+?:|---))/s,function(i){return i.replaceAll("#","")}))}get exampleBuilders(){return[new T({description:"Format Tags in YAML frontmatter",before:y`
---
tags: #one #two #three #nested/four/five
---
`,after:y`
---
tags: one two three nested/four/five
---
`}),new T({description:"Format tags in array",before:y`
---
tags: [#one #two #three]
---
`,after:y`
---
tags: [one two three]
---
`}),new T({description:"Format tags in list",before:y`
---
tags:
- #tag1
- #tag2
---
`,after:y`
---
tags:
- tag1
- tag2
---
`})]}get optionBuilders(){return[]}get hasSpecialExecutionOrder(){return!0}};Hn=B([A.register],Hn);var At=class{constructor(){this.aliasArrayStyle="single-line";this.formatAliasKey=!0;this.tagArrayStyle="single-line";this.formatTagKey=!0;this.defaultArrayStyle="single-line";this.formatArrayKeys=!0;this.forceSingleLineArrayStyle=[];this.forceMultiLineArrayStyle=[]}},hi=class extends A{get OptionsClass(){return At}get name(){return"Format Yaml Array"}get description(){return"Allows for the formatting of regular yaml arrays as either multi-line or single-line and `tags` and `aliases` are allowed to have some Obsidian specific yaml formats. Note that single string to single-line goes from a single string entry to a single-line array if more than 1 entry is present. The same is true for single string to multi-line except it becomes a multi-line array."}get type(){return"YAML"}apply(t,n){return qe(t,r=>{let i=ht(r.replace(`---
`,"").replace(`
---`,""));if(!i)return r;let o=function(a){return a&&Object.prototype.toString.call(a)==="[object Date]"&&!isNaN(a)};if(n.formatAliasKey&&Object.keys(i).includes(mt)&&(r=Me(r,mt,ft(bo(Ft(Be(r,mt))),n.aliasArrayStyle))),n.formatTagKey&&Object.keys(i).includes(nn)&&(r=Me(r,nn,ft(yo(Ft(Be(r,nn))),n.tagArrayStyle))),n.formatArrayKeys){let a=[mt,nn,...n.forceMultiLineArrayStyle,...n.forceSingleLineArrayStyle];for(let s of Object.keys(i))a.includes(s)||!(typeof i[s]=="object"&&!o(i[s])&&i[s])||(r=Me(r,s,ft(Ft(Be(r,s)),n.defaultArrayStyle)))}for(let a of n.forceSingleLineArrayStyle)!Object.keys(i).includes(a)||(r=Me(r,a,ft(Ft(Be(r,a)),"single-line")));for(let a of n.forceMultiLineArrayStyle)!Object.keys(i).includes(a)||(r=Me(r,a,ft(Ft(Be(r,a)),"multi-line")));return r})}get exampleBuilders(){return[new T({description:"Format tags as a single-line array delimited by spaces and aliases as a multi-line array and format the key `test` to be a single-line array",before:y`
---
tags:
- computer
- research
aliases: Title 1, Title2
test: this is a value
---
${""}
# Notes:
${""}
Nesting yaml arrays may result in unexpected results.
${""}
Multi-line arrays will have empty values removed only leaving one if it is completely empty. The same is not true for single-line arrays as that is invalid yaml unless it comes as the last entry in the array.
`,after:y`
---
tags: [computer, research]
aliases:
- Title 1
- Title2
test: [this is a value]
---
${""}
# Notes:
${""}
Nesting yaml arrays may result in unexpected results.
${""}
Multi-line arrays will have empty values removed only leaving one if it is completely empty. The same is not true for single-line arrays as that is invalid yaml unless it comes as the last entry in the array.
`,options:{aliasArrayStyle:"multi-line",forceSingleLineArrayStyle:["test"]}}),new T({description:"Format tags as a single string with space delimiters, ignore aliases, and format regular yaml arrays as single-line arrays",before:y`
---
aliases: Typescript
types:
- thought provoking
- peer reviewed
tags: [computer, science, trajectory]
---
`,after:y`
---
aliases: Typescript
types: [thought provoking, peer reviewed]
tags: computer science trajectory
---
`,options:{formatAliasKey:!1,tagArrayStyle:"single string space delimited"}})]}get optionBuilders(){return[new de({OptionsClass:At,name:"Yaml aliases section style",description:"The style of the yaml aliases section",optionsKey:"aliasArrayStyle",records:[{value:"multi-line",description:"```aliases:\\n - Title```"},{value:"single-line",description:"```aliases: [Title]```"},{value:"single string comma delimited",description:"```aliases: Title, Other Title```"},{value:"single string to single-line",description:"Aliases will be formatted as a string if there is 1 or fewer elements like so ```aliases: Title```. If there is more than 1 element, it will be formatted like a single-line array."},{value:"single string to multi-line",description:"Aliases will be formatted as a string if there is 1 or fewer elements like so ```aliases: Title```. If there is more than 1 element, it will be formatted like a multi-line array."}]}),new se({OptionsClass:At,name:"Format yaml aliases section",description:"Turns on formatting for the yaml aliases section. You should not enable this option alongside the rule `YAML Title Alias` as they may not work well together or they may have different format styles selected causing unexpected results.",optionsKey:"formatAliasKey"}),new de({OptionsClass:At,name:"Yaml tags section style",description:"The style of the yaml tags section",optionsKey:"tagArrayStyle",records:[{value:"multi-line",description:"```tags:\\n - tag1```"},{value:"single-line",description:"```tags: [tag1]```"},{value:"single string to single-line",description:"Tags will be formatted as a string if there is 1 or fewer elements like so ```tags: tag1```. If there is more than 1 element, it will be formatted like a single-line array."},{value:"single string to multi-line",description:"Aliases will be formatted as a string if there is 1 or fewer elements like so ```tags: tag1```. If there is more than 1 element, it will be formatted like a multi-line array."},{value:"single-line space delimited",description:"```tags: [tag1 tag2]```"},{value:"single string space delimited",description:"```tags: tag1 tag2```"},{value:"single string comma delimited",description:"```tags: tag1, tag2```"}]}),new se({OptionsClass:At,name:"Format yaml tags section",description:"Turns on formatting for the yaml tags section.",optionsKey:"formatTagKey"}),new de({OptionsClass:At,name:"Default yaml array section style",description:"The style of other yaml arrays that are not `tags`, `aliases` or in `Force key values to be single-line arrays` and `Force key values to be multi-line arrays`",optionsKey:"defaultArrayStyle",records:[{value:"multi-line",description:"```key:\\n - value```"},{value:"single-line",description:"```key: [value]```"}]}),new se({OptionsClass:At,name:"Format yaml array sections",description:"Turns on formatting for regular yaml arrays",optionsKey:"formatArrayKeys"}),new Re({OptionsClass:At,name:"Force key values to be single-line arrays",description:"Forces the yaml array for the new line separated keys to be in single-line format (leave empty to disable this option)",optionsKey:"forceSingleLineArrayStyle"}),new Re({OptionsClass:At,name:"Force key values to be multi-line arrays",description:"Forces the yaml array for the new line separated keys to be in multi-line format (leave empty to disable this option)",optionsKey:"forceMultiLineArrayStyle"})]}};hi=B([A.register],hi);var zl=class{},gi=class extends A{get OptionsClass(){return zl}get name(){return"Header Increment"}get description(){return"Heading levels should only increment by one level at a time"}get type(){return"Heading"}apply(t,n){return $([v.code,v.yaml,v.link,v.wikiLink,v.tag],t,r=>{let i=r.split(`
`),o=0,a=0;for(let s=0;s<i.length;s++){let l=i[s].match(ir);if(!l)continue;let u=l[2].length-a;u>o+1?(a+=u-(o+1),u=o+1):u<o&&(a-=o+a-l[2].length,a<=0&&(u=l[2].length,a=0)),i[s]=i[s].replace(ir,`$1${"#".repeat(u)}$3$4`),o=u}return i.join(`
`)})}get exampleBuilders(){return[new T({description:"",before:y`
# H1
### H3
### H3
#### H4
###### H6
${""}
We skipped a 2nd level heading
`,after:y`
# H1
## H3
## H3
### H4
#### H6
${""}
We skipped a 2nd level heading
`}),new T({description:"Skipped headings in sections that would be decremented will result in those headings not having the same meaning",before:y`
# H1
### H3
${""}
We skip from 1 to 3
${""}
####### H7
${""}
We skip from 3 to 7 leaving out 4, 5, and 6. Thus headings level 4, 5, and 6 will be treated like H3 above until another H2 or H1 is encountered
${""}
###### H6
${""}
We skipped 6 previously so it will be treated the same as the H3 above since it was the next lowest header that was to be decremented
${""}
## H2
${""}
This resets the decrement section so the H6 below is decremented to an H3
${""}
###### H6
`,after:y`
# H1
## H3
${""}
We skip from 1 to 3
${""}
### H7
${""}
We skip from 3 to 7 leaving out 4, 5, and 6. Thus headings level 4, 5, and 6 will be treated like H3 above until another H2 or H1 is encountered
${""}
## H6
${""}
We skipped 6 previously so it will be treated the same as the H3 above since it was the next lowest header that was to be decremented
${""}
## H2
${""}
This resets the decrement section so the H6 below is decremented to an H3
${""}
### H6
`})]}get optionBuilders(){return[]}};gi=B([A.register],gi);var bi=class{constructor(){this.bottom=!0;this.emptyLineAfterYaml=!0}},yi=class extends A{get OptionsClass(){return bi}get name(){return"Heading blank lines"}get description(){return"All headings have a blank line both before and after (except where the heading is at the beginning or end of the document)."}get type(){return"Spacing"}apply(t,n){return $([v.code,v.yaml,v.link,v.wikiLink,v.tag],t,r=>(n.bottom?(r=r.replace(/^(#+\s.*)/gm,`
$1
`),r=r.replace(/\n+(#+\s.*)/g,`
$1`),r=r.replace(/(^#+\s.*)\n+/gm,`$1
`)):(r=r.replace(/(^#+\s.*)\n+/gm,`$1
`),r=r.replace(/\n+(#+\s.*)/g,`
$1`)),r=r.replace(/^\n+(#+\s.*)/,"$1"),r=r.replace(/(#+\s.*)\n+$/,"$1"),n.emptyLineAfterYaml||(r=r.replace(new RegExp("("+Ie.source+")\\n+(#+\\s.*)"),`$1
$5`)),r))}get exampleBuilders(){return[new T({description:"Headings should be surrounded by blank lines",before:y`
# H1
## H2
${""}
${""}
# H1
line
## H2
${""}
`,after:y`
# H1
${""}
## H2
${""}
# H1
${""}
line
${""}
## H2
`}),new T({description:"With `Bottom=false`",before:y`
# H1
line
## H2
# H1
line
`,after:y`
# H1
line
${""}
## H2
${""}
# H1
line
`,options:{bottom:!1,emptyLineAfterYaml:!0}}),new T({description:"Empty line before header and after Yaml is removed with `Empty Line Between Yaml and Header=true`",before:y`
---
key: value
---
# Header
Paragraph here...
`,after:y`
---
key: value
---
# Header
Paragraph here...
`,options:{bottom:!0,emptyLineAfterYaml:!1}})]}get optionBuilders(){return[new se({OptionsClass:bi,name:"Bottom",description:"Insert a blank line after headings",optionsKey:"bottom"}),new se({OptionsClass:bi,name:"Empty Line Between Yaml and Header",description:"Keep the empty line between the Yaml frontmatter and header",optionsKey:"emptyLineAfterYaml"})]}};yi=B([A.register],yi);var Oa=class{constructor(){this.textToInsert=["aliases: ","tags: "]}},wi=class extends A{get OptionsClass(){return Oa}get name(){return"Insert YAML attributes"}get description(){return"Inserts the given YAML attributes into the YAML frontmatter. Put each attribute on a single line."}get type(){return"YAML"}apply(t,n){return t=Bt(t),qe(t,r=>{let i=n.textToInsert.reverse(),o=ht(r.match(Ie)[1]);for(let a of i){let s=a.split(":")[0];Object.prototype.hasOwnProperty.call(o,s)||(r=r.replace(/^---\n/,je(`---
${a}
`)))}return r})}get exampleBuilders(){return[new T({description:"Insert static lines into YAML frontmatter. Text to insert: `aliases:\ntags: doc\nanimal: dog`",before:y`
---
animal: cat
---
`,after:y`
---
aliases:
tags: doc
animal: cat
---
`,options:{textToInsert:["aliases:","tags: doc","animal: dog"]}})]}get optionBuilders(){return[new Re({OptionsClass:Oa,name:"Text to insert",description:"Text to insert into the YAML frontmatter",optionsKey:"textToInsert"})]}};wi=B([A.register],wi);var $l=class{},xi=class extends A{get OptionsClass(){return $l}get name(){return"Line Break at Document End"}get description(){return"Ensures that there is exactly one line break at the end of a document."}get type(){return"Spacing"}apply(t,n){return t=t.replace(/\n+$/g,""),t+=`
`,t}get exampleBuilders(){return[new T({description:"Appending a line break to the end of the document.",before:y`
Lorem ipsum dolor sit amet, consectetur adipiscing elit.
`,after:y`
Lorem ipsum dolor sit amet, consectetur adipiscing elit.
${""}
`}),new T({description:"Removing trailing line breaks to the end of the document, except one.",before:y`
Lorem ipsum dolor sit amet, consectetur adipiscing elit.
${""}
${""}
${""}
`,after:y`
Lorem ipsum dolor sit amet, consectetur adipiscing elit.
${""}
`})]}get optionBuilders(){return[]}};xi=B([A.register],xi);var Hl=class{},ki=class extends A{get OptionsClass(){return Hl}get name(){return"Move Footnotes to the bottom"}get description(){return"Move all footnotes to the bottom of the document."}get type(){return"Footnote"}apply(t,n){return $([v.code,v.yaml],t,r=>gf(r))}get exampleBuilders(){return[new T({description:"Moving footnotes to the bottom",before:y`
Lorem ipsum, consectetur adipiscing elit. [^1] Donec dictum turpis quis ipsum pellentesque.
${""}
[^1]: first footnote
${""}
Quisque lorem est, fringilla sed enim at, sollicitudin lacinia nisi.[^2]
[^2]: second footnote
${""}
Maecenas malesuada dignissim purus ac volutpat.
`,after:y`
Lorem ipsum, consectetur adipiscing elit. [^1] Donec dictum turpis quis ipsum pellentesque.
${""}
Quisque lorem est, fringilla sed enim at, sollicitudin lacinia nisi.[^2]
Maecenas malesuada dignissim purus ac volutpat.
${""}
[^1]: first footnote
[^2]: second footnote
`})]}get optionBuilders(){return[]}};ki=B([A.register],ki);var wr=class{constructor(){this.tagArrayStyle="single-line";this.removeHashtagsFromTagsInBody=!1;this.tagsToIgnore=[]}},vi=class extends A{get OptionsClass(){return wr}get name(){return"Move Tags to Yaml"}get description(){return"Move all tags to Yaml frontmatter of the document."}get type(){return"YAML"}apply(t,n){return $([v.code,v.inlineCode,v.math],t,r=>{let i=r.match(Pr);return i&&(r=Bt(r),r=qe(r,o=>{o=o.replace(`---
`,"").replace("---","");let a=yo(Ft(Be(o,nn))),s=new Set;if(typeof a=="string")s.add(a),a=[a];else if(a!=null)for(let u of a)s.add(u);else a=[];for(let u of i){let c=u.trim().substring(1);!s.has(c)&&!n.tagsToIgnore.includes(c)&&(s.add(c),a.push(c))}return`---
${Me(o,nn,ft(a,n.tagArrayStyle))}---`}),n.removeHashtagsFromTagsInBody&&(r=r.replace(Pr,o=>{let a=o.indexOf("#"),s=o.substring(a+1);return n.tagsToIgnore.includes(s)?o:o.substring(0,a)+s}))),r})}get exampleBuilders(){return[new T({description:"Move tags from body to Yaml with `Tags to ignore = 'ignored-tag'`",before:y`
Text has to do with #test and #markdown
${""}
#test content here
\`\`\`
#ignored
Code block content is ignored
\`\`\`
${""}
This inline code \`#ignored content\`
${""}
#ignored-tag is ignored since it is in the ignored list
`,after:y`
---
tags: [test, markdown]
---
Text has to do with #test and #markdown
${""}
#test content here
\`\`\`
#ignored
Code block content is ignored
\`\`\`
${""}
This inline code \`#ignored content\`
${""}
#ignored-tag is ignored since it is in the ignored list
`,options:{tagsToIgnore:["ignored-tag"]}}),new T({description:"Move tags from body to Yaml with existing tags retains the already existing ones and only adds new ones",before:y`
---
tags: [test, tag2]
---
Text has to do with #test and #markdown
`,after:y`
---
tags: [test, tag2, markdown]
---
Text has to do with #test and #markdown
`}),new T({description:"Move tags to Yaml frontmatter and then remove hashtags in body content tags `Remove the hashtag from tags in content body = true` with `Tags to ignore = 'yet-another-ignored-tag'`.",before:y`
---
tags: [test, tag2]
---
Text has to do with #test and #markdown
${""}
The tag at the end of this line stays as a tag since it is ignored #yet-another-ignored-tag
`,after:y`
---
tags: [test, tag2, markdown]
---
Text has to do with test and markdown
${""}
The tag at the end of this line stays as a tag since it is ignored #yet-another-ignored-tag
`,options:{removeHashtagsFromTagsInBody:!0,tagsToIgnore:["yet-another-ignored-tag"]}})]}get optionBuilders(){return[new de({OptionsClass:wr,name:"Yaml tags section style",description:"The style of the Yaml tags section",optionsKey:"tagArrayStyle",records:[{value:"multi-line",description:"```tags:\\n - tag1```"},{value:"single-line",description:"```tags: [tag1]```"},{value:"single string to single-line",description:"Tags will be formatted as a string if there is 1 or fewer elements like so ```tags: tag1```. If there is more than 1 element, it will be formatted like a single-line array."},{value:"single string to multi-line",description:"Aliases will be formatted as a string if there is 1 or fewer elements like so ```tags: tag1```. If there is more than 1 element, it will be formatted like a multi-line array."},{value:"single-line space delimited",description:"```tags: [tag1 tag2]```"},{value:"single string space delimited",description:"```tags: tag1 tag2```"},{value:"single string comma delimited",description:"```tags: tag1, tag2```"}]}),new se({OptionsClass:wr,name:"Remove the hashtag from tags in content body",description:"Removes `#` from tags in content body after moving them to the Yaml frontmatter",optionsKey:"removeHashtagsFromTagsInBody"}),new Re({OptionsClass:wr,name:"Tags to ignore",description:"The tags that will not be moved to the tags array or removed from the body content if `Remove the hashtag from tags in content body` is enabled. Each tag should be on a new line and without the `#`. **Make sure not to include the hashtag in the tag name.**",optionsKey:"tagsToIgnore"})]}};vi=B([A.register],vi);var Yl=class{},Si=class extends A{get OptionsClass(){return Yl}get name(){return"No Bare URLs"}get description(){return"Encloses bare URLs with angle brackets except when enclosed in back ticks, square braces, or single or double quotes."}get type(){return"Content"}apply(t,n){return $([v.code,v.yaml,v.link,v.wikiLink,v.tag,v.image],t,r=>{let i=r.match(/(https?:\/\/(?:www\.|(?!www))[a-zA-Z0-9][a-zA-Z0-9-]+[a-zA-Z0-9]\.[^\s`\]'">]{2,}|www\.[a-zA-Z0-9][a-zA-Z0-9-]+[a-zA-Z0-9]\.[^\s`\]'">]{2,}|https?:\/\/(?:www\.|(?!www))[a-zA-Z0-9]+\.[^\s`\]'">]{2,}|www\.[a-zA-Z0-9]+\.[^\s`\]'">]{2,})/gi);if(!i)return r;let o=0,a=i.length;for(let s=0;s<a;s++){let l=i[s],u=r.indexOf(l,o),c=u+l.length,p=u===0?void 0:r.charAt(u-1),m=c>=r.length?void 0:r.charAt(c);if(p!=null&&(p==="`"||p==='"'||p==="'"||p==="[")&&m!=null&&(m==="`"||m==='"'||m==="'"||m==="]")){o=u+l.length;continue}if(p!=null&&p==="<"&&m!=null&&m===">"){let f=u-1;for(;f>0&&r.charAt(f-1)==="<";)f--;let d=c;for(;d<r.length-1&&r.charAt(d+1)===">";)d++;r=Ve(r,f,d+1,"<"+l+">"),o=u+l.length;continue}r=Ve(r,u,u+l.length,"<"+l+">"),o=u+l.length+2}return r})}get exampleBuilders(){return[new T({description:"Make sure that links are inside of angle brackets when not in single quotes('), double quotes(\"), or backticks(`)",before:y`
https://github.com
braces around url should stay the same: [https://github.com]
backticks around url should stay the same: \`https://github.com\`
Links mid-sentence should be updated like https://google.com will be.
'https://github.com'
"https://github.com"
<https://github.com>
links should stay the same: [](https://github.com)
https://gitlab.com
`,after:y`
<https://github.com>
braces around url should stay the same: [https://github.com]
backticks around url should stay the same: \`https://github.com\`
Links mid-sentence should be updated like <https://google.com> will be.
'https://github.com'
"https://github.com"
<https://github.com>
links should stay the same: [](https://github.com)
<https://gitlab.com>
`}),new T({description:"Angle brackets are added if the url is not the only text in the single quotes('), double quotes(\"), or backticks(`)",before:y`
[https://github.com some text here]
backticks around a url should stay the same, but only if the only contents of the backticks: \`https://github.com some text here\`
single quotes around a url should stay the same, but only if the contents of the single quotes is the url: 'https://github.com some text here'
double quotes around a url should stay the same, but only if the contents of the double quotes is the url: "https://github.com some text here"
`,after:y`
[<https://github.com> some text here]
backticks around a url should stay the same, but only if the only contents of the backticks: \`<https://github.com> some text here\`
single quotes around a url should stay the same, but only if the contents of the single quotes is the url: '<https://github.com> some text here'
double quotes around a url should stay the same, but only if the contents of the double quotes is the url: "<https://github.com> some text here"
`}),new T({description:"Multiple angle brackets at the start and or end of a url will be reduced down to 1",before:y`
<<https://github.com>
<https://google.com>>
<<https://gitlab.com>>
`,after:y`
<https://github.com>
<https://google.com>
<https://gitlab.com>
`})]}get optionBuilders(){return[]}};Si=B([A.register],Si);var Ti=class{constructor(){this.numberStyle="ascending";this.listEndStyle="."}},Oi=class extends A{get OptionsClass(){return Ti}get name(){return"Ordered List Style"}get description(){return"Makes sure that ordered lists follow the style specified. Note that 2 spaces or 1 tab is considered to be an indentation level."}get type(){return"Content"}apply(t,n){return $([v.code,v.yaml,v.tag],t,r=>Cf(r,n.numberStyle,n.listEndStyle))}get exampleBuilders(){return[new T({description:"Ordered lists have list items set to ascending numerical order when Number Style is `ascending`.",before:y`
1. Item 1
2. Item 2
4. Item 3
${""}
Some text here
${""}
1. Item 1
1. Item 2
1. Item 3
`,after:y`
1. Item 1
2. Item 2
3. Item 3
${""}
Some text here
${""}
1. Item 1
2. Item 2
3. Item 3
`}),new T({description:"Nested ordered lists have list items set to ascending numerical order when Number Style is `ascending`.",before:y`
1. Item 1
2. Item 2
1. Subitem 1
5. Subitem 2
2. Subitem 3
4. Item 3
`,after:y`
1. Item 1
2. Item 2
1. Subitem 1
2. Subitem 2
3. Subitem 3
3. Item 3
`}),new T({description:"Ordered list in blockquote has list items set to '1.' when Number Style is `lazy`.",before:y`
> 1. Item 1
> 4. Item 2
> > 1. Subitem 1
> > 5. Subitem 2
> > 2. Subitem 3
`,after:y`
> 1. Item 1
> 1. Item 2
> > 1. Subitem 1
> > 1. Subitem 2
> > 1. Subitem 3
`,options:{numberStyle:"lazy"}}),new T({description:"Ordered list in blockquote has list items set to ascending numerical order when Number Style is `ascending`.",before:y`
> 1. Item 1
> 4. Item 2
> > 1. Subitem 1
> > 5. Subitem 2
> > 2. Subitem 3
`,after:y`
> 1. Item 1
> 2. Item 2
> > 1. Subitem 1
> > 2. Subitem 2
> > 3. Subitem 3
`}),new T({description:"Nested ordered list has list items set to '1)' when Number Style is `lazy` and Ordered List Indicator End Style is `)`.",before:y`
1. Item 1
2. Item 2
1. Subitem 1
5. Subitem 2
2. Subitem 3
4. Item 3
`,after:y`
1) Item 1
1) Item 2
1) Subitem 1
1) Subitem 2
1) Subitem 3
1) Item 3
`,options:{listEndStyle:")",numberStyle:"lazy"}})]}get optionBuilders(){return[new de({OptionsClass:Ti,name:"Number Style",description:"The number style used in ordered list indicators",optionsKey:"numberStyle",records:[{value:"ascending",description:"Makes sure ordered list items are ascending (i.e. 1, 2, 3, etc.)"},{value:"lazy",description:"Makes sure ordered list item indicators all are the number 1"}]}),new de({OptionsClass:Ti,name:"Ordered List Indicator End Style",description:"The ending character of an ordered list indicator",optionsKey:"listEndStyle",records:[{value:".",description:"Makes sure ordered list items indicators end in '.' (i.e `1.`)"},{value:")",description:"Makes sure ordered list item indicators end in ')' (i.e. `1)`)"}]})]}};Oi=B([A.register],Oi);var jl=class{},Ci=class extends A{get OptionsClass(){return jl}get name(){return"Paragraph blank lines"}get description(){return"All paragraphs should have exactly one blank line both before and after."}get type(){return"Spacing"}apply(t,n){return $([v.obsidianMultiLineComments,v.yaml],t,bf)}get exampleBuilders(){return[new T({description:"Paragraphs should be surrounded by blank lines",before:y`
# H1
Newlines are inserted.
A paragraph is a line that starts with a letter.
`,after:y`
# H1
${""}
Newlines are inserted.
${""}
A paragraph is a line that starts with a letter.
`})]}get optionBuilders(){return[]}};Ci=B([A.register],Ci);var ql=class{},Ai=class extends A{get OptionsClass(){return ql}get name(){return"Proper Ellipsis"}get description(){return"Replaces three consecutive dots with an ellipsis."}get type(){return"Content"}apply(t,n){return $([v.code,v.yaml,v.link,v.wikiLink,v.tag],t,r=>r.replaceAll("...","\u2026"))}get exampleBuilders(){return[new T({description:"Replacing three consecutive dots with an ellipsis.",before:y`
Lorem (...) Impsum.
`,after:y`
Lorem (…) Impsum.
`})]}get optionBuilders(){return[]}};Ai=B([A.register],Ai);var Vl=class{},Ei=class extends A{get OptionsClass(){return Vl}get name(){return"Re-Index Footnotes"}get description(){return"Re-indexes footnote keys and footnote, based on the order of occurrence (NOTE: This rule deliberately does *not* preserve the relation between key and footnote, to be able to re-index duplicate keys.)"}get type(){return"Footnote"}apply(t,n){return $([v.code,v.yaml,v.link,v.wikiLink,v.tag],t,r=>{let i=0;return r=r.replace(/^\[\^\w+\]: /gm,function(){return i++,"[^"+String(i)+"]: "}),i=0,r=r.replace(/(?!^)\[\^\w+\]/gm,function(){return i++,"[^"+String(i)+"]"}),r})}get exampleBuilders(){return[new T({description:"Re-indexing footnotes after having deleted previous footnotes",before:y`
Lorem ipsum at aliquet felis.[^3] Donec dictum turpis quis pellentesque,[^5] et iaculis tortor condimentum.
${""}
[^3]: first footnote
[^5]: second footnote
`,after:y`
Lorem ipsum at aliquet felis.[^1] Donec dictum turpis quis pellentesque,[^2] et iaculis tortor condimentum.
${""}
[^1]: first footnote
[^2]: second footnote
`}),new T({description:"Re-indexing footnotes after inserting a footnote between",before:y`
Lorem ipsum dolor sit amet, consectetur adipiscing elit.[^1] Aenean at aliquet felis. Donec dictum turpis quis ipsum pellentesque, et iaculis tortor condimentum.[^1a] Vestibulum nec blandit felis, vulputate finibus purus.[^2] Praesent quis iaculis diam.
${""}
[^1]: first footnote
[^1a]: third footnote, inserted later
[^2]: second footnotes
`,after:y`
Lorem ipsum dolor sit amet, consectetur adipiscing elit.[^1] Aenean at aliquet felis. Donec dictum turpis quis ipsum pellentesque, et iaculis tortor condimentum.[^2] Vestibulum nec blandit felis, vulputate finibus purus.[^3] Praesent quis iaculis diam.
${""}
[^1]: first footnote
[^2]: third footnote, inserted later
[^3]: second footnotes
`}),new T({description:"Re-indexing duplicate footnote keys",before:y`
Lorem ipsum at aliquet felis.[^1] Donec dictum turpis quis pellentesque,[^1] et iaculis tortor condimentum.
${""}
[^1]: first footnote
[^1]: second footnote
`,after:y`
Lorem ipsum at aliquet felis.[^1] Donec dictum turpis quis pellentesque,[^2] et iaculis tortor condimentum.
${""}
[^1]: first footnote
[^2]: second footnote
`})]}get optionBuilders(){return[]}};Ei=B([A.register],Ei);var Kl=class{},Li=class extends A{get OptionsClass(){return Kl}get name(){return"Remove Consecutive List Markers"}get description(){return"Removes consecutive list markers. Useful when copy-pasting list items."}get type(){return"Content"}apply(t,n){return $([v.code,v.yaml,v.link,v.wikiLink,v.tag],t,r=>r.replace(/^([ |\t]*)- - \b/gm,"$1- "))}get exampleBuilders(){return[new T({description:"Removing consecutive list markers.",before:y`
- item 1
- - copypasted item A
- item 2
- indented item
- - copypasted item B
`,after:y`
- item 1
- copypasted item A
- item 2
- indented item
- copypasted item B
`})]}get optionBuilders(){return[]}};Li=B([A.register],Li);var Yn=class extends A{get OptionsClass(){return Yn}get name(){return"Remove Empty Lines Between List Markers and Checklists"}get description(){return"There should not be any empty lines between list markers and checklists."}get type(){return"Spacing"}apply(t,n){return $([v.code,v.yaml,v.link,v.wikiLink,v.tag,v.thematicBreak],t,r=>{let i=function(c,p,m){let f=new RegExp(`^${p}
{2,}${p}$`,"gm"),d,h=c;do d=h.match(f),h=h.replaceAll(f,m);while(d);return h};return r=i(r,"(( |\\t)*- \\[( |x)\\]( |\\t)+.+)",`$1
$5`),r=i(r,"(( |\\t)*\\d+\\.( |\\t)+.+)",`$1
$4`),r=i(r,"(( |\\t)*\\+( |\\t)+.+)",`$1
$4`),r=i(r,"(( |\\t)*-(?! \\[( |x)\\])( |\\t)+.+)",`$1
$5`),i(r,"(( |\\t)*\\*( |\\t)+.+)",`$1
$4`)})}get exampleBuilders(){return[new T({description:"",before:y`
1. Item 1
${""}
2. Item 2
${""}
- Item 1
${""}
\t- Subitem 1
${""}
- Item 2
${""}
- [x] Item 1
${""}
\t- [ ] Subitem 1
${""}
- [ ] Item 2
${""}
+ Item 1
${""}
\t+ Subitem 1
${""}
+ Item 2
${""}
* Item 1
${""}
\t* Subitem 1
${""}
* Item 2
`,after:y`
1. Item 1
2. Item 2
${""}
- Item 1
\t- Subitem 1
- Item 2
${""}
- [x] Item 1
\t- [ ] Subitem 1
- [ ] Item 2
${""}
+ Item 1
\t+ Subitem 1
+ Item 2
${""}
* Item 1
\t* Subitem 1
* Item 2
`})]}get optionBuilders(){return[]}};Yn=B([A.register],Yn);var Wl=class{},_i=class extends A{get OptionsClass(){return Wl}get name(){return"Remove Empty List Markers"}get description(){return"Removes empty list markers, i.e. list items without content."}get type(){return"Content"}apply(t,n){return $([v.code,v.yaml,v.link,v.wikiLink,v.tag],t,r=>{let i=/^\s*(>\s*)*(-|\*|\+|\d+[.)]|- (\[( |x)\]))\s*?$/gm;return r=r.replace(new RegExp(i.source+"\\n","gm"),""),r=r.replace(new RegExp("\\n"+i.source,"gm"),""),r.replace(i,"")})}get exampleBuilders(){return[new T({description:"Removes empty list markers.",before:y`
- item 1
-
- item 2
${""}
* list 2 item 1
*
* list 2 item 2
${""}
+ list 3 item 1
+
+ list 3 item 2
`,after:y`
- item 1
- item 2
${""}
* list 2 item 1
* list 2 item 2
${""}
+ list 3 item 1
+ list 3 item 2
`}),new T({description:"Removes empty ordered list markers.",before:y`
1. item 1
2.
3. item 2
${""}
1. list 2 item 1
2. list 2 item 2
3. ${""}
${""}
_Note that this rule does not make sure that the ordered list is sequential after removal_
`,after:y`
1. item 1
3. item 2
${""}
1. list 2 item 1
2. list 2 item 2
${""}
_Note that this rule does not make sure that the ordered list is sequential after removal_
`}),new T({description:"Removes empty checklist markers.",before:y`
- [ ] item 1
- [x]
- [ ] item 2
- [ ] ${""}
${""}
_Note that this will affect checked and uncheck checked list items_
`,after:y`
- [ ] item 1
- [ ] item 2
${""}
_Note that this will affect checked and uncheck checked list items_
`}),new T({description:"Removes empty list, checklist, and ordered list markers in callouts/blockquotes",before:y`
> Checklist in blockquote
> - [ ] item 1
> - [x]
> - [ ] item 2
> - [ ] ${""}
${""}
> Ordered List in blockquote
> > 1. item 1
> > 2.
> > 3. item 2
> > 4. ${""}
${""}
> Regular lists in blockquote
>
> - item 1
> -
> - item 2
>
> List 2
>
> * item 1
> *
> * list 2 item 2
>
> List 3
>
> + item 1
> +
> + item 2
`,after:y`
> Checklist in blockquote
> - [ ] item 1
> - [ ] item 2
${""}
> Ordered List in blockquote
> > 1. item 1
> > 3. item 2
${""}
> Regular lists in blockquote
>
> - item 1
> - item 2
>
> List 2
>
> * item 1
> * list 2 item 2
>
> List 3
>
> + item 1
> + item 2
`})]}get optionBuilders(){return[]}};_i=B([A.register],_i);var Ul=class{},Ii=class extends A{get OptionsClass(){return Ul}get name(){return"Remove Hyphenated Line Breaks"}get description(){return"Removes hyphenated line breaks. Useful when pasting text from textbooks."}get type(){return"Content"}apply(t,n){return $([v.code,v.yaml,v.link,v.wikiLink,v.tag],t,r=>r.replace(/\b[-] \b/g,""))}get exampleBuilders(){return[new T({description:"Removing hyphenated line breaks.",before:y`
This text has a linebr eak.
`,after:y`
This text has a linebreak.
`})]}get optionBuilders(){return[]}};Ii=B([A.register],Ii);var Gl=class{},Mi=class extends A{get OptionsClass(){return Gl}get name(){return"Remove link spacing"}get description(){return"Removes spacing around link text."}get type(){return"Spacing"}apply(t,n){return t=wf(t),fc(t)}get exampleBuilders(){return[new T({description:"Space in regular markdown link text",before:y`
[ here is link text1 ](link_here)
[ here is link text2](link_here)
[here is link text3 ](link_here)
[here is link text4](link_here)
[\there is link text5\t](link_here)
[](link_here)
**Note that image markdown syntax does not get affected even if it is transclusion:**
![\there is link text6 ](link_here)
`,after:y`
[here is link text1](link_here)
[here is link text2](link_here)
[here is link text3](link_here)
[here is link text4](link_here)
[here is link text5](link_here)
[](link_here)
**Note that image markdown syntax does not get affected even if it is transclusion:**
![\there is link text6 ](link_here)
`}),new T({description:"Space in wiki link text",before:y`
[[link_here| here is link text1 ]]
[[link_here|here is link text2 ]]
[[link_here| here is link text3]]
[[link_here|here is link text4]]
[[link_here|\there is link text5\t]]
![[link_here|\there is link text6\t]]
[[link_here]]
`,after:y`
[[link_here|here is link text1]]
[[link_here|here is link text2]]
[[link_here|here is link text3]]
[[link_here|here is link text4]]
[[link_here|here is link text5]]
![[link_here|here is link text6]]
[[link_here]]
`})]}get optionBuilders(){return[]}};Mi=B([A.register],Mi);var Zl=class{},Bi=class extends A{get OptionsClass(){return Zl}get name(){return"Remove Multiple Spaces"}get description(){return"Removes two or more consecutive spaces. Ignores spaces at the beginning and ending of the line. "}get type(){return"Content"}apply(t,n){return $([v.table,v.code,v.yaml,v.link,v.wikiLink,v.tag],t,r=>r.replace(/(?!^>)([^\s])( ){2,}([^\s])/gm,"$1 $3"))}get exampleBuilders(){return[new T({description:"Removing double and triple space.",before:y`
Lorem ipsum dolor sit amet.
`,after:y`
Lorem ipsum dolor sit amet.
`})]}get optionBuilders(){return[]}};Bi=B([A.register],Bi);var Ql=class{},Fi=class extends A{get OptionsClass(){return Ql}get name(){return"Remove Space around Fullwidth Characters"}get description(){return"Ensures that fullwidth characters are not followed by whitespace (either single spaces or a tab). Note that this may causes issues with markdown format in some cases."}get type(){return"Spacing"}apply(t,n){let r=/([ \t])+([\u2013\u2014\u2026\u3001\u3002\u300a\u300d-\u300f\u3014\u3015\u3008-\u3011\uff00-\uffff])/g,i=/([\u2013\u2014\u2026\u3001\u3002\u300a\u300d-\u300f\u3014\u3015\u3008-\u3011\uff00-\uffff])([ \t])+/g,o=function(s){return s.replace(r,"$2").replace(i,"$1")},a=$([v.code,v.yaml,v.link,v.wikiLink,v.tag,v.list],t,o);return a=vf(a,o),a}get exampleBuilders(){return[new T({description:"Remove Spaces and Tabs around Fullwidth Characters",before:y`
Full list of affected characters: 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz,.:;!?"'`^~ ̄_&@#%+-*=<>()[]{}⦅⦆|¦/\¬$£¢₩¥。、「」『』〔〕【】—…–《》〈〉
This is a fullwidth period\t 。 with text after it.
This is a fullwidth comma\t with text after it.
This is a fullwidth left parenthesis \twith text after it.
This is a fullwidth right parenthesis with text after it.
This is a fullwidth colon with text after it.
This is a fullwidth semicolon with text after it.
emoves space at start of line
`,after:y`
Full list of affected characters:0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz,.:;!?"'`^~ ̄_&@#%+-*=<>()[]{}⦅⦆|¦/\¬$£¢₩¥。、「」『』〔〕【】—…–《》〈〉
This is a fullwidth period。with text after it.
This is a fullwidth commawith text after it.
This is a fullwidth left parenthesiswith text after it.
This is a fullwidth right parenthesiswith text after it.
This is a fullwidth colonwith text after it.
This is a fullwidth semicolonwith text after it.
emoves space at start of line
`}),new T({description:"Fullwidth Characters in List Do not Affect List Markdown Syntax",before:y`
# List indicators should not have the space after them removed if they are followed by a fullwidth character
${""}
- contents here
- \t more contents here more text here
+ \t another item here
* one last item here
${""}
# Nested in a block quote
${""}
> - contents here
> - \t more contents here more text here
> + \t another item here
> * one last item here
${""}
# Doubly nested in a block quote
${""}
> The following is doubly nested
> > - contents here
> > - \t more contents here more text here
> > + \t another item here
> > * one last item here
`,after:y`
# List indicators should not have the space after them removed if they are followed by a fullwidth character
${""}
- contents here
- more contents heremore text here
+ another item here
* one last item here
${""}
# Nested in a block quote
${""}
> - contents here
> - more contents heremore text here
> + another item here
> * one last item here
${""}
# Doubly nested in a block quote
${""}
> The following is doubly nested
> > - contents here
> > - more contents heremore text here
> > + another item here
> > * one last item here
`})]}get optionBuilders(){return[]}};Fi=B([A.register],Fi);var Ta=class{constructor(){this.yamlKeysToRemove=[]}},Ri=class extends A{get OptionsClass(){return Ta}get name(){return"Remove YAML Keys"}get description(){return"Removes the YAML keys specified"}get type(){return"YAML"}apply(t,n){let r=n.yamlKeysToRemove,i=t.match(Ie);if(!i||r.length===0)return t;let o=i[1];for(let a of r){let s=a.trim();s.endsWith(":")&&(s=s.substring(0,s.length-1)),o=Sn(o,s)}return t.replace(i[1],o)}get exampleBuilders(){return[new T({description:'Removes the values specified in `YAML Keys to Remove` = "status:\nkeywords\ndate"',before:y`
---
language: Typescript
type: programming
tags: computer
keywords:
- keyword1
- keyword2
status: WIP
date: 02/15/2022
---
${""}
# Header Context
${""}
Text
`,after:y`
---
language: Typescript
type: programming
tags: computer
---
${""}
# Header Context
${""}
Text
`,options:{yamlKeysToRemove:["status:","keywords","date"]}})]}get optionBuilders(){return[new Re({OptionsClass:Ta,name:"YAML Keys to Remove",description:"The yaml keys to remove from the yaml frontmatter with or without colons",optionsKey:"yamlKeysToRemove"})]}};Ri=B([A.register],Ri);var Xl=class{},Di=class extends A{get OptionsClass(){return Xl}get name(){return"Space after list markers"}get description(){return"There should be a single space after list markers and checkboxes."}get type(){return"Spacing"}apply(t,n){return $([v.code,v.yaml,v.link,v.wikiLink,v.tag],t,r=>(r=r.replace(/^(\s*\d+\.|\s*[-+*])[^\S\r\n]+/gm,"$1 "),r.replace(/^(\s*\d+\.|\s*[-+*]\s+\[[ xX]\])[^\S\r\n]+/gm,"$1 ")))}get exampleBuilders(){return[new T({description:"",before:y`
1. Item 1
2. Item 2
${""}
- [ ] Item 1
- [x] Item 2
\t- [ ] Item 3
`,after:y`
1. Item 1
2. Item 2
${""}
- [ ] Item 1
- [x] Item 2
\t- [ ] Item 3
`})]}get optionBuilders(){return[]}};Di=B([A.register],Di);var Jl=class{},Pi=class extends A{get OptionsClass(){return Jl}get name(){return"Space between Chinese and English or numbers"}get description(){return"Ensures that Chinese and English or numbers are separated by a single space. Follows these [guidelines](https://github.com/sparanoid/chinese-copywriting-guidelines)"}get type(){return"Spacing"}apply(t,n){let r=/([\u4e00-\u9fa5])( *)(\[[^[]*\]\(.*\)|`[^`]*`|\w+|[-+'"([{¥$]|\*[^*])/gm,i=/(\[[^[]*\]\(.*\)|`[^`]*`|\w+|[-+;:'"°%$)\]}]|[^*]\*)( *)([\u4e00-\u9fa5])/gm,o=function(s){return s.replace(r,"$1 $3").replace(i,"$1 $3")},a=$([v.code,v.inlineCode,v.yaml,v.image,v.link,v.wikiLink,v.tag,v.italics,v.bold,v.math,v.inlineMath],t,o);return a=xf(a,o),a=kf(a,o),a}get exampleBuilders(){return[new T({description:"Space between Chinese and English",before:y`
中文字符串english中文字符串。
`,after:y`
中文字符串 english 中文字符串。
`}),new T({description:"Space between Chinese and link",before:y`
中文字符串[english](http://example.com)中文字符串。
`,after:y`
中文字符串 [english](http://example.com) 中文字符串。
`}),new T({description:"Space between Chinese and inline code block",before:y`
中文字符串\`code\`中文字符串。
`,after:y`
中文字符串 \`code\` 中文字符串。
`}),new T({description:"No space between Chinese and English in tag",before:y`
#标签A #标签2标签
`,after:y`
#标签A #标签2标签
`}),new T({description:"Make sure that spaces are not added between italics and chinese characters to preserve markdown syntax",before:y`
_这是一个数学公式_
*这是一个数学公式english*
${""}
# Handling bold and italics nested in each other is not supported at this time
${""}
**_这是一_个数学公式**
*这是一hello__个数学world公式__*
`,after:y`
_这是一个数学公式_
*这是一个数学公式 english*
${""}
# Handling bold and italics nested in each other is not supported at this time
${""}
**_ 这是一 _ 个数学公式**
*这是一 hello__ 个数学 world 公式 __*
`}),new T({description:"Images and links are ignored",before:y`
[[这是一个数学公式english]]
![[这是一个数学公式english.jpg]]
[这是一个数学公式english](这是一个数学公式english.md)
![这是一个数学公式english](这是一个数学公式english.jpg)
`,after:y`
[[这是一个数学公式english]]
![[这是一个数学公式english.jpg]]
[这是一个数学公式english](这是一个数学公式english.md)
![这是一个数学公式english](这是一个数学公式english.jpg)
`})]}get optionBuilders(){return[]}};Pi=B([A.register],Pi);var Ca=class{constructor(){this.style="consistent"}},Ni=class extends A{get OptionsClass(){return Ca}get name(){return"Strong Style"}get description(){return"Makes sure the strong style is consistent."}get type(){return"Content"}apply(t,n){return $([v.code,v.yaml,v.link,v.wikiLink,v.tag,v.math,v.inlineMath],t,r=>la(r,n.style,"strong"))}get exampleBuilders(){return[new T({description:"Strong indicators should use underscores when style is set to 'underscore'",before:y`
# Strong/Bold Cases
${""}
**Test bold**
** Test not bold **
This is **bold** mid sentence
This is **bold** mid sentence with a second **bold** on the same line
This is ***bold and emphasized***
This is ***nested bold** and ending emphasized*
This is ***nested emphasis* and ending bold**
${""}
*Test emphasis*
${""}
* List Item1 with **bold text**
* List Item2
`,after:y`
# Strong/Bold Cases
${""}
__Test bold__
** Test not bold **
This is __bold__ mid sentence
This is __bold__ mid sentence with a second __bold__ on the same line
This is *__bold and emphasized__*
This is *__nested bold__ and ending emphasized*
This is __*nested emphasis* and ending bold__
${""}
*Test emphasis*
${""}
* List Item1 with __bold text__
* List Item2
`,options:{style:"underscore"}}),new T({description:"Strong indicators should use asterisks when style is set to 'asterisk'",before:y`
# Strong/Bold Cases
${""}
__Test bold__
__ Test not bold __
This is __bold__ mid sentence
This is __bold__ mid sentence with a second __bold__ on the same line
This is ___bold and emphasized___
This is ___nested bold__ and ending emphasized_
This is ___nested emphasis_ and ending bold__
${""}
_Test emphasis_
`,after:y`
# Strong/Bold Cases
${""}
**Test bold**
__ Test not bold __
This is **bold** mid sentence
This is **bold** mid sentence with a second **bold** on the same line
This is _**bold and emphasized**_
This is _**nested bold** and ending emphasized_
This is **_nested emphasis_ and ending bold**
${""}
_Test emphasis_
`,options:{style:"asterisk"}}),new T({description:"Strong indicators should use consistent style based on first strong indicator in a file when style is set to 'consistent'",before:y`
# Strong First Strong Is an Asterisk
${""}
**First bold**
This is __bold__ mid sentence
This is __bold__ mid sentence with a second **bold** on the same line
This is ___bold and emphasized___
This is *__nested bold__ and ending emphasized*
This is **_nested emphasis_ and ending bold**
${""}
__Test bold__
`,after:y`
# Strong First Strong Is an Asterisk
${""}
**First bold**
This is **bold** mid sentence
This is **bold** mid sentence with a second **bold** on the same line
This is _**bold and emphasized**_
This is ***nested bold** and ending emphasized*
This is **_nested emphasis_ and ending bold**
${""}
**Test bold**
`,options:{style:"consistent"}}),new T({description:"Strong indicators should use consistent style based on first strong indicator in a file when style is set to 'consistent'",before:y`
# Strong First Strong Is an Underscore
${""}
__First bold__
This is **bold** mid sentence
This is **bold** mid sentence with a second __bold__ on the same line
This is **_bold and emphasized_**
This is ***nested bold** and ending emphasized*
This is ___nested emphasis_ and ending bold__
${""}
**Test bold**
`,after:y`
# Strong First Strong Is an Underscore
${""}
__First bold__
This is __bold__ mid sentence
This is __bold__ mid sentence with a second __bold__ on the same line
This is ___bold and emphasized___
This is *__nested bold__ and ending emphasized*
This is ___nested emphasis_ and ending bold__
${""}
__Test bold__
`,options:{style:"consistent"}})]}get optionBuilders(){return[new de({OptionsClass:Ca,name:"Style",description:"The style used to denote strong/bolded content",optionsKey:"style",records:[{value:"consistent",description:"Makes sure the first instance of strong is the style that will be used throughout the document"},{value:"asterisk",description:"Makes sure ** is the strong indicator"},{value:"underscore",description:"Makes sure __ is the strong indicator"}]})]}};Ni=B([A.register],Ni);var Aa=class{constructor(){this.twoSpaceLineBreak=!1}},zi=class extends A{get OptionsClass(){return Aa}get name(){return"Trailing spaces"}get description(){return"Removes extra spaces after every line."}get type(){return"Spacing"}apply(t,n){return $([v.code,v.yaml,v.link,v.wikiLink,v.tag],t,r=>n.twoSpaceLineBreak?(r=r.replace(/(\S)[ \t]$/gm,"$1"),r=r.replace(/(\S)[ \t]{3,}$/gm,"$1"),r=r.replace(/(\S)( ?\t\t? ?)$/gm,"$1"),r):r.replace(/[ \t]+$/gm,""))}get exampleBuilders(){return[new T({description:"Removes trailing spaces and tabs.",before:y`
# H1
Line with trailing spaces and tabs. ${""}
`,after:y`
# H1
Line with trailing spaces and tabs.
`}),new T({description:"With `Two Space Linebreak = true`",before:y`
# H1
Line with trailing spaces and tabs. ${""}
`,after:y`
# H1
Line with trailing spaces and tabs. ${""}
`,options:{twoSpaceLineBreak:!0}})]}get optionBuilders(){return[new se({OptionsClass:Aa,name:"Two Space Linebreak",description:'Ignore two spaces followed by a line break ("Two Space Rule").',optionsKey:"twoSpaceLineBreak"})]}};zi=B([A.register],zi);var eu=class{},$i=class extends A{get OptionsClass(){return eu}get name(){return"Two Spaces Between Lines with Content"}get description(){return"Makes sure that two spaces are added to the ends of lines with content continued on the next line for paragraphs, blockquotes, and list items"}get type(){return"Content"}apply(t,n){return $([v.obsidianMultiLineComments,v.yaml],t,yf)}get exampleBuilders(){return[new T({description:"Make sure two spaces are added to the ends of lines that have content on it and the next line for lists, blockquotes, and paragraphs",before:y`
# Heading 1
First paragraph stays as the first paragraph
${""}
- list item 1
- list item 2
Continuation of list item 2
- list item 3
${""}
1. Item 1
2. Item 2
Continuation of item 3
3. Item 3
${""}
Paragraph for with link [[other file name]].
Continuation *of* the paragraph has \`inline code block\` __in it__.
Even more continuation
${""}
Paragraph lines that end in <br/>
Or lines that end in <br>
Are left alone
Since they mean the same thing
${""}
\`\`\` text
Code blocks are ignored
Even with multiple lines
\`\`\`
Another paragraph here
${""}
> Blockquotes are affected
> More content here
Content here
${""}
<div>
html content
should be ignored
</div>
Even more content here
${""}
`,after:y`
# Heading 1
First paragraph stays as the first paragraph
${""}
- list item 1
- list item 2 ${""}
Continuation of list item 2
- list item 3
${""}
1. Item 1
2. Item 2 ${""}
Continuation of item 3
3. Item 3
${""}
Paragraph for with link [[other file name]]. ${""}
Continuation *of* the paragraph has \`inline code block\` __in it__. ${""}
Even more continuation
${""}
Paragraph lines that end in <br/>
Or lines that end in <br>
Are left alone ${""}
Since they mean the same thing
${""}
\`\`\` text
Code blocks are ignored
Even with multiple lines
\`\`\`
Another paragraph here
${""}
> Blockquotes are affected ${""}
> More content here ${""}
Content here
${""}
<div>
html content
should be ignored
</div>
Even more content here
${""}
`})]}get optionBuilders(){return[]}};$i=B([A.register],$i);var Ea=class{constructor(){this.listStyle="consistent"}},Hi=class extends A{get OptionsClass(){return Ea}get name(){return"Unordered List Style"}get description(){return"Makes sure that unordered lists follow the style specified."}get type(){return"Content"}apply(t,n){return $([v.code,v.yaml,v.tag],t,r=>Af(r,n.listStyle))}get exampleBuilders(){return[new T({description:"Unordered lists have their indicator updated to `*` when `List item style = 'consistent'` and `*` is the first unordered list indicator",before:y`
1. ordered item 1
2. ordered item 2
${""}
Checklists should be ignored
- [ ] Checklist item 1
- [x] completed item
${""}
* Item 1
- Sublist 1 item 1
- Sublist 1 item 2
- Item 2
+ Sublist 2 item 1
+ Sublist 2 item 2
+ Item 3
* Sublist 3 item 1
* Sublist 3 item 2
${""}
`,after:y`
1. ordered item 1
2. ordered item 2
${""}
Checklists should be ignored
- [ ] Checklist item 1
- [x] completed item
${""}
* Item 1
* Sublist 1 item 1
* Sublist 1 item 2
* Item 2
* Sublist 2 item 1
* Sublist 2 item 2
* Item 3
* Sublist 3 item 1
* Sublist 3 item 2
${""}
`}),new T({description:"Unordered lists have their indicator updated to `-` when `List item style = '-'`",before:y`
- Item 1
* Sublist 1 item 1
* Sublist 1 item 2
* Item 2
+ Sublist 2 item 1
+ Sublist 2 item 2
+ Item 3
- Sublist 3 item 1
- Sublist 3 item 2
${""}
See that the ordered list is ignored, but its sublist is not
${""}
1. Item 1
- Sub item 1
1. Item 2
* Sub item 2
1. Item 3
+ Sub item 3
`,after:y`
- Item 1
- Sublist 1 item 1
- Sublist 1 item 2
- Item 2
- Sublist 2 item 1
- Sublist 2 item 2
- Item 3
- Sublist 3 item 1
- Sublist 3 item 2
${""}
See that the ordered list is ignored, but its sublist is not
${""}
1. Item 1
- Sub item 1
1. Item 2
- Sub item 2
1. Item 3
- Sub item 3
`,options:{listStyle:"-"}}),new T({description:"Unordered lists have their indicator updated to `*` when `List item style = '*'`",before:y`
- Item 1
* Sublist 1 item 1
* Sublist 1 item 2
* Item 2
+ Sublist 2 item 1
+ Sublist 2 item 2
+ Item 3
- Sublist 3 item 1
- Sublist 3 item 2
${""}
`,after:y`
* Item 1
* Sublist 1 item 1
* Sublist 1 item 2
* Item 2
* Sublist 2 item 1
* Sublist 2 item 2
* Item 3
* Sublist 3 item 1
* Sublist 3 item 2
${""}
`,options:{listStyle:"*"}}),new T({description:"Unordered list in blockquote has list item indicators set to `+` when `List item style = '-'`",before:y`
> - Item 1
> + Item 2
> > * Subitem 1
> > + Subitem 2
> > - Sub sub item 1
> > - Subitem 3
`,after:y`
> + Item 1
> + Item 2
> > + Subitem 1
> > + Subitem 2
> > + Sub sub item 1
> > + Subitem 3
`,options:{listStyle:"+"}})]}get optionBuilders(){return[new de({OptionsClass:Ea,name:"List item style",description:"The list item style to use in unordered lists",optionsKey:"listStyle",records:[{value:"consistent",description:"Makes sure unordered list items use a consistent list item indicator in the file which will be based on the first list item found"},{value:"-",description:"Makes sure unordered list items use `-` as their indicator"},{value:"*",description:"Makes sure unordered list items use `*` as their indicator"},{value:"+",description:"Makes sure unordered list items use `+` as their indicator"}]})]}};Hi=B([A.register],Hi);var Ut=class{constructor(){this.priorityKeysAtStartOfYaml=!0;this.yamlKeyPrioritySortOrder=[];this.yamlSortOrderForOtherKeys="None"}};B([A.noSettingControl()],Ut.prototype,"dateModifiedKey",2),B([A.noSettingControl()],Ut.prototype,"currentTimeFormatted",2),B([A.noSettingControl()],Ut.prototype,"yamlTimestampDateModifiedEnabled",2);var jn=class extends A{get OptionsClass(){return Ut}get name(){return"YAML Key Sort"}get description(){return"Sorts the YAML keys based on the order and priority specified. Note: may remove blank lines as well."}get type(){return"YAML"}apply(t,n){let r=t.match(Ie);if(!r)return t;let i=r[1],o=n.priorityKeysAtStartOfYaml,a=function(S,E){return S==E?E:Me(E,n.dateModifiedKey," "+n.currentTimeFormatted)},s=function(S,E,I){let k=`${E}${S}`;return I&&(k=`${S}${E}`),n.yamlTimestampDateModifiedEnabled&&(k=a(r[1],k)),t.replace(r[1],k)},l=function(S,E){let I="";for(let k of E){let _=Be(S,k);_!==null&&(_.includes(`
`)?I+=`${k}:${_}
`:I+=`${k}: ${_}
`,S=Sn(S,k))}return{remainingYaml:S,sortedYamlKeyValues:I}},u=n.yamlKeyPrioritySortOrder,c=l(i,u),p=c.sortedYamlKeyValues;i=c.remainingYaml;let m=n.yamlSortOrderForOtherKeys,f=ht(i);if(f==null)return s(p,i,o);let d=function(S,E){return S=S.toLowerCase(),E=E.toLowerCase(),S>E?-1:E>S?1:0},h=function(S,E){return S=S.toLowerCase(),E=E.toLowerCase(),S<E?-1:E<S?1:0},g=Object.keys(f),b;if(m==="Ascending Alphabetical")b=h;else if(m==="Descending Alphabetical")b=d;else return s(p,i,o);g=g.sort(b);let O=l(i,g);return s(p,O.sortedYamlKeyValues,o)}get exampleBuilders(){return[new T({description:"Sorts YAML keys in order specified by `YAML Key Priority Sort Order` has a sort order of `date type language`",before:y`
---
language: Typescript
type: programming
tags: computer
keywords: []
status: WIP
date: 02/15/2022
---
`,after:y`
---
date: 02/15/2022
type: programming
language: Typescript
tags: computer
keywords: []
status: WIP
---
`,options:{yamlKeyPrioritySortOrder:["date","type","language"],yamlSortOrderForOtherKeys:"None",priorityKeysAtStartOfYaml:!0}}),new T({description:"Sorts YAML keys in order specified by `YAML Key Priority Sort Order` has a sort order of `date type language` with `'YAML Sort Order for Other Keys' = Ascending Alphabetical`",before:y`
---
language: Typescript
type: programming
tags: computer
keywords: []
status: WIP
date: 02/15/2022
---
`,after:y`
---
date: 02/15/2022
type: programming
language: Typescript
keywords: []
status: WIP
tags: computer
---
`,options:{yamlKeyPrioritySortOrder:["date","type","language"],yamlSortOrderForOtherKeys:"Ascending Alphabetical"}}),new T({description:"Sorts YAML keys in order specified by `YAML Key Priority Sort Order` has a sort order of `date type language` with `'YAML Sort Order for Other Keys' = Descending Alphabetical`",before:y`
---
language: Typescript
type: programming
tags: computer
keywords: []
status: WIP
date: 02/15/2022
---
`,after:y`
---
date: 02/15/2022
type: programming
language: Typescript
tags: computer
status: WIP
keywords: []
---
`,options:{yamlKeyPrioritySortOrder:["date","type","language"],yamlSortOrderForOtherKeys:"Descending Alphabetical",priorityKeysAtStartOfYaml:!0}}),new T({description:"Sorts YAML keys in order specified by `YAML Key Priority Sort Order` has a sort order of `date type language` with `'YAML Sort Order for Other Keys' = Descending Alphabetical` and `'Priority Keys at Start of YAML' = false`",before:y`
---
language: Typescript
type: programming
tags: computer
keywords: []
${""}
status: WIP
date: 02/15/2022
---
`,after:y`
---
tags: computer
status: WIP
keywords: []
date: 02/15/2022
type: programming
language: Typescript
---
`,options:{yamlKeyPrioritySortOrder:["date","type","language"],yamlSortOrderForOtherKeys:"Descending Alphabetical",priorityKeysAtStartOfYaml:!1}})]}get optionBuilders(){return[new Re({OptionsClass:Ut,name:"YAML Key Priority Sort Order",description:"The order in which to sort keys with one on each line where it sorts in the order found in the list",optionsKey:"yamlKeyPrioritySortOrder"}),new se({OptionsClass:Ut,name:"Priority Keys at Start of YAML",description:"YAML Key Priority Sort Order is placed at the start of the YAML frontmatter",optionsKey:"priorityKeysAtStartOfYaml"}),new de({OptionsClass:Ut,name:"YAML Sort Order for Other Keys",description:"The way in which to sort the keys that are not found in the YAML Key Priority Sort Order text area",optionsKey:"yamlSortOrderForOtherKeys",records:[{value:"None",description:"No sorting other than what is in the YAML Key Priority Sort Order text area"},{value:"Ascending Alphabetical",description:"Sorts the keys based on key value from a to z"},{value:"Descending Alphabetical",description:"Sorts the keys based on key value from z to a"}]})]}get hasSpecialExecutionOrder(){return!0}};jn=B([A.register],jn);var Gt=require("obsidian");var dt=class{constructor(){this.dateCreatedKey="date created";this.dateCreated=!0;this.format="dddd, MMMM Do YYYY, h:mm:ss a";this.dateModified=!0;this.dateModifiedKey="date modified";this.locale="en"}};B([A.noSettingControl()],dt.prototype,"alreadyModified",2),B([A.noSettingControl()],dt.prototype,"fileCreatedTime",2),B([A.noSettingControl()],dt.prototype,"fileModifiedTime",2),B([A.noSettingControl()],dt.prototype,"locale",2),B([A.noSettingControl()],dt.prototype,"currentTime",2);var hn=class extends A{get OptionsClass(){return dt}get name(){return"YAML Timestamp"}get description(){return"Keep track of the date the file was last edited in the YAML front matter. Gets dates from file metadata."}get type(){return"YAML"}apply(t,n){let r=n.alreadyModified,i=Bt(t);return r=r||i!==t,qe(i,o=>{let a=`
${n.dateCreatedKey}: [^
]+
`,s=`
${n.dateCreatedKey}:[ ]*
`,l=new RegExp(s),u=new RegExp(a);if(n.dateCreated){let c=(0,Gt.moment)(n.fileCreatedTime);c.locale(n.locale);let p=c.format(n.format),m=`
${n.dateCreatedKey}: ${p}`,f=u.test(o);if(!f&&l.test(o))o=o.replace(l,je(m)+`
`),r=!0;else if(f){if(f){let d=(0,Gt.moment)(o.match(u)[0].replace(n.dateCreatedKey+":","").trim(),n.format,n.locale,!0);(d==null||!d.isValid())&&(o=o.replace(u,je(m)+`
`),r=!0)}}else{let d=o.indexOf(`
---`);o=On(o,d,`
${n.dateCreatedKey}: ${p}`),r=!0}}if(n.dateModified){let c=`
${n.dateModifiedKey}: [^
]+
`,p=`
${n.dateModifiedKey}:[ ]*
`,m=new RegExp(p),f=new RegExp(c),d=(0,Gt.moment)(n.fileModifiedTime);d.locale(n.locale);let h=n.currentTime.format(n.format),g=`
${n.dateModifiedKey}: ${h}`,b=f.test(o);if(b){let O=(0,Gt.moment)(o.match(f)[0].replace(n.dateModifiedKey+":","").trim(),n.format,n.locale,!0);(r||O==null||!O.isValid()||Math.abs(O.diff(d,"seconds"))>5)&&(o=o.replace(f,je(g)+`
`))}else if(m.test(o))o=o.replace(m,je(g)+`
`);else if(!b){let O=o.indexOf(`
---`);o=On(o,O,g)}}return o})}get exampleBuilders(){return[new T({description:"Adds a header with the date.",before:y`
# H1
`,after:y`
---
date created: Wednesday, January 1st 2020, 12:00:00 am
date modified: Thursday, January 2nd 2020, 12:00:05 am
---
# H1
`,options:{fileCreatedTime:"2020-01-01T00:00:00-00:00",fileModifiedTime:"2020-01-02T00:00:00-00:00",currentTime:(0,Gt.moment)("Thursday, January 2nd 2020, 12:00:05 am","dddd, MMMM Do YYYY, h:mm:ss a"),alreadyModified:!1}}),new T({description:"dateCreated option is false",before:y`
# H1
`,after:y`
---
date modified: Thursday, January 2nd 2020, 12:00:05 am
---
# H1
`,options:{dateCreated:!1,fileCreatedTime:"2020-01-01T00:00:00-00:00",fileModifiedTime:"2020-01-01T00:00:00-00:00",currentTime:(0,Gt.moment)("Thursday, January 2nd 2020, 12:00:05 am","dddd, MMMM Do YYYY, h:mm:ss a"),alreadyModified:!1}}),new T({description:"Date Created Key is set",before:y`
# H1
`,after:y`
---
created: Wednesday, January 1st 2020, 12:00:00 am
---
# H1
`,options:{dateCreated:!0,dateModified:!1,dateCreatedKey:"created",fileCreatedTime:"2020-01-01T00:00:00-00:00",currentTime:(0,Gt.moment)("Thursday, January 2nd 2020, 12:00:03 am","dddd, MMMM Do YYYY, h:mm:ss a"),alreadyModified:!1}}),new T({description:"Date Modified Key is set",before:y`
# H1
`,after:y`
---
modified: Wednesday, January 1st 2020, 4:00:00 pm
---
# H1
`,options:{dateCreated:!1,dateModified:!0,dateModifiedKey:"modified",fileModifiedTime:"2020-01-01T00:00:00-00:00",currentTime:(0,Gt.moment)("Wednesday, January 1st 2020, 4:00:00 pm","dddd, MMMM Do YYYY, h:mm:ss a"),alreadyModified:!1}})]}get optionBuilders(){return[new se({OptionsClass:dt,name:"Date Created",description:"Insert the file creation date",optionsKey:"dateCreated"}),new Nn({OptionsClass:dt,name:"Date Created Key",description:"Which YAML key to use for creation date",optionsKey:"dateCreatedKey"}),new se({OptionsClass:dt,name:"Date Modified",description:"Insert the date the file was last modified",optionsKey:"dateModified"}),new Nn({OptionsClass:dt,name:"Date Modified Key",description:"Which YAML key to use for modification date",optionsKey:"dateModifiedKey"}),new wa({OptionsClass:dt,name:"Format",description:"Moment date format to use (see [Moment format options](https://momentjscom.readthedocs.io/en/latest/moment/04-displaying/01-format/))",optionsKey:"format"})]}get hasSpecialExecutionOrder(){return!0}};hn=B([A.register],hn);var gn=class{constructor(){this.yamlAliasesSectionStyle="Multi-line array";this.preserveExistingAliasesSectionStyle=!0;this.keepAliasThatMatchesTheFilename=!1;this.useYamlKeyToKeepTrackOfOldFilenameOrHeading=!0}};B([A.noSettingControl()],gn.prototype,"fileName",2);var Yi=class extends A{get OptionsClass(){return gn}get name(){return"YAML Title Alias"}get description(){return"Inserts the title of the file into the YAML frontmatter's aliases section. Gets the title from the first H1 or filename."}get type(){return"YAML"}apply(t,n){t=Bt(t);let r=$([v.code,v.yaml,v.link,v.wikiLink,v.tag],t,p=>{let m=p.match(/^#\s+(.*)/m);return m?m[1]:""});r=r||n.fileName;let i=null,o=t.match(Ie)[1],a=!n.keepAliasThatMatchesTheFilename&&r===n.fileName;n.useYamlKeyToKeepTrackOfOldFilenameOrHeading&&(i=ht(Be(o,Nr)));let s=o.replace(`---
`,"").replace(`
---`,""),l=ht(o);i=ht(Be(o,Nr));let u="multi-line";switch(n.yamlAliasesSectionStyle){case"Multi-line array":u="multi-line";break;case"Single-line array":u="single-line";break;case"Single string that expands to multi-line array if needed":u="single string to multi-line";break;case"Single string that expands to single-line array if needed":u="single string to single-line";break;default:throw new Error(`Unsupported setting 'YAML aliases section style': ${n.yamlAliasesSectionStyle}`)}let c=function(p,m){if(p==null)return m?"":r;if(typeof p=="string")m?p===r&&(p=""):i===p?p=r:p=[r,p];else if(i!==null){let f=p.indexOf(i);f!==-1&&(m?p.splice(f,1):p[f]=r)}else{let f=p.indexOf(r);f!==-1?m&&p.splice(f,1):m||(p=[r,...p])}return p===""||p.length===0?"":p};if(r=go(r),Object.keys(l).includes(mt)){let p=Be(s,mt),m="multi-line",f=p==="",d=!1;p.includes(`
`)||(p.match(/^\[.*\]/)===null?(m="single string to single-line",d=!0):m="single-line");let h=bo(Ft(p)),g=c(h,a);g===""?s=Sn(s,mt):n.preserveExistingAliasesSectionStyle?!f&&(d&&r==g||!d||h==g)?s=Me(s,mt,ft(g,m)):s=Me(s,mt,ft(g,u)):s=Me(s,mt,ft(g,u))}else a||(s=Me(s,mt,ft(r,u)));return!n.useYamlKeyToKeepTrackOfOldFilenameOrHeading||a?s=Sn(s,Nr):s=Me(s,Nr,` ${r}`),t=t.replace(`---
${o}---
`,`---
${s}---
`),t}get exampleBuilders(){return[new T({description:"Adds a header with the title from heading.",before:y`
# Obsidian
`,after:y`
---
aliases:
- Obsidian
linter-yaml-title-alias: Obsidian
---
# Obsidian
`}),new T({description:"Adds a header with the title from heading without YAML key when the use of the YAML key is set to false.",before:y`
# Obsidian
`,after:y`
---
aliases:
- Obsidian
---
# Obsidian
`,options:{useYamlKeyToKeepTrackOfOldFilenameOrHeading:!1}}),new T({description:"Adds a header with the title.",before:y`
${""}
`,after:y`
---
aliases:
- Filename
linter-yaml-title-alias: Filename
---
${""}
`,options:{fileName:"Filename",keepAliasThatMatchesTheFilename:!0}}),new T({description:"Adds a header with the title without YAML key when the use of the YAML key is set to false.",before:y`
${""}
`,after:y`
---
aliases:
- Filename
---
${""}
`,options:{fileName:"Filename",keepAliasThatMatchesTheFilename:!0,useYamlKeyToKeepTrackOfOldFilenameOrHeading:!1}}),new T({description:"Replaces old filename with new filename when no header is present and filename is different than the old one listed in `linter-yaml-title-alias`.",before:y`
---
aliases:
- Old Filename
- Alias 2
linter-yaml-title-alias: Old Filename
---
${""}
`,after:y`
---
aliases:
- Filename
- Alias 2
linter-yaml-title-alias: Filename
---
${""}
`,options:{fileName:"Filename",keepAliasThatMatchesTheFilename:!0}})]}get optionBuilders(){return[new de({OptionsClass:gn,name:"YAML aliases section style",description:"The style of the aliases YAML section. It is recommended that the value here matches the aliases format for format YAML arrays if in use.",optionsKey:"yamlAliasesSectionStyle",records:[{value:"Multi-line array",description:"```aliases:\\n - Title```"},{value:"Single-line array",description:"```aliases: [Title]```"},{value:"Single string that expands to multi-line array if needed",description:"```aliases: Title```"},{value:"Single string that expands to single-line array if needed",description:"```aliases: Title```"}]}),new se({OptionsClass:gn,name:"Preserve existing aliases section style",description:"If set, the `YAML aliases section style` setting applies only to the newly created sections",optionsKey:"preserveExistingAliasesSectionStyle"}),new se({OptionsClass:gn,name:"Keep alias that matches the filename",description:"Such aliases are usually redundant",optionsKey:"keepAliasThatMatchesTheFilename"}),new se({OptionsClass:gn,name:"Use the YAML key `linter-yaml-title-alias` to help with filename and heading changes",description:"If set, when the first H1 heading changes or filename if first H1 is not present changes, then the old alias stored in this key will be replaced with the new value instead of just inserting a new entry in the aliases array",optionsKey:"useYamlKeyToKeepTrackOfOldFilenameOrHeading"})]}};Yi=B([A.register],Yi);var qi=class{constructor(){this.titleKey="title"}};B([A.noSettingControl()],qi.prototype,"fileName",2);var ji=class extends A{get OptionsClass(){return qi}get name(){return"YAML Title"}get description(){return"Inserts the title of the file into the YAML frontmatter. Gets the title from the first H1 or filename if there is no H1."}get type(){return"YAML"}apply(t,n){t=Bt(t);let r=$([v.code,v.yaml,v.link,v.wikiLink,v.tag],t,i=>{let o=i.match(/^#\s+(.*)/m);return o?o[1]:""});return r=r||n.fileName,r=go(r),qe(t,i=>{let o=`
${n.titleKey}.*
`,a=new RegExp(o);if(a.test(i))i=i.replace(a,je(`
${n.titleKey}: ${r}
`));else{let s=i.indexOf(`
---`);i=On(i,s,`
${n.titleKey}: ${r}`)}return i})}get exampleBuilders(){return[new T({description:"Adds a header with the title from heading.",before:y`
# Obsidian
`,after:y`
---
title: Obsidian
---
# Obsidian
`,options:{fileName:"Filename"}}),new T({description:"Adds a header with the title.",before:y`
${""}
`,after:y`
---
title: Filename
---
${""}
`,options:{fileName:"Filename"}})]}get optionBuilders(){return[new Nn({OptionsClass:qi,name:"Title Key",description:"Which YAML key to use for title",optionsKey:"titleKey"})]}};ji=B([A.register],ji);var Sw=`<svg fill="currentColor" viewBox="0 0 100 100" width="100" height="100" xml:space="preserve" xmlns="http://www.w3.org/2000/svg">
<path d="M5 2v97.649h91.607V28.734l-.715-.663L65.356 2.597 64.56 2Zm5.09 4.246h50.892v25.473h30.536v63.684H10.089Zm55.982 3.051L87.86 27.474H66.072Z" style="stroke-width:2.32417"/>
<g style="opacity:1;fill:none;fill-rule:nonzero;stroke:none;stroke-width:0;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:10;stroke-dasharray:none" stroke-linecap="round">
<path d="M89.161 11.093a1 1 0 0 0-1.656-.392l-7.189 7.189a5.765 5.765 0 0 1-4.104 1.7 5.768 5.768 0 0 1-4.104-1.699 5.811 5.811 0 0 1 0-8.207l7.189-7.189a1 1 0 0 0-.392-1.656C73.042-1.106 66.689.39 62.335 4.745a16.177 16.177 0 0 0-3.792 16.948l-36.85 36.851a16.18 16.18 0 0 0-16.948 3.792C.39 66.691-1.107 73.04.838 78.906a.998.998 0 0 0 1.656.392l7.189-7.189a5.81 5.81 0 0 1 8.207 0 5.764 5.764 0 0 1 1.699 4.104 5.763 5.763 0 0 1-1.7 4.104L10.7 87.506a.999.999 0 0 0 .392 1.656c1.7.563 3.44.839 5.16.839 4.218 0 8.317-1.652 11.41-4.745a16.177 16.177 0 0 0 3.793-16.948l36.851-36.851a16.177 16.177 0 0 0 16.948-3.793c4.357-4.355 5.853-10.705 3.907-16.571z" style="opacity:1;fill:currentColor;fill-rule:nonzero;stroke:none;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:10;stroke-dasharray:none" transform="matrix(.59252 0 0 .54674 22.478 41.225)"/>
<path d="M72.088 57.275a1.003 1.003 0 0 0-.662-.292c-3.462-.155-7.078-1.876-9.923-4.721-1.742-1.743-3.065-3.782-3.863-5.897L46.517 57.488c2.115.799 4.154 2.121 5.897 3.863 2.845 2.846 4.565 6.462 4.721 9.923.012.249.115.485.292.662l14.876 14.876a10.334 10.334 0 0 0 7.33 3.031c2.655 0 5.311-1.01 7.331-3.031 4.041-4.042 4.041-10.619 0-14.661zM5.351 14.171c.123.219.324.384.563.462l5.82 1.89 23.869 23.869 4.638-4.638-23.869-23.869-1.891-5.82a1.003 1.003 0 0 0-.462-.563L4.714.279a1 1 0 0 0-1.196.165L.293 3.668a1 1 0 0 0-.165 1.196Z" style="opacity:1;fill:currentColor;fill-rule:nonzero;stroke:none;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:10;stroke-dasharray:none" transform="matrix(.59252 0 0 .54674 22.478 41.225)"/>
</g>
</svg>`,Ow=`<svg width="100" height="100" viewBox="0 0 100 100" xml:space="preserve" xmlns="http://www.w3.org/2000/svg">
<g style="opacity:1;fill:none;fill-rule:nonzero;stroke:none;stroke-width:0;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:10;stroke-dasharray:none" stroke-linecap="round">
<path d="M89.161 11.093a1 1 0 0 0-1.656-.392l-7.189 7.189a5.765 5.765 0 0 1-4.104 1.7 5.768 5.768 0 0 1-4.104-1.699 5.811 5.811 0 0 1 0-8.207l7.189-7.189a1 1 0 0 0-.392-1.656C73.042-1.106 66.689.39 62.335 4.745a16.177 16.177 0 0 0-3.792 16.948l-36.85 36.851a16.18 16.18 0 0 0-16.948 3.792C.39 66.691-1.107 73.04.838 78.906a.998.998 0 0 0 1.656.392l7.189-7.189a5.81 5.81 0 0 1 8.207 0 5.764 5.764 0 0 1 1.699 4.104 5.763 5.763 0 0 1-1.7 4.104L10.7 87.506a.999.999 0 0 0 .392 1.656c1.7.563 3.44.839 5.16.839 4.218 0 8.317-1.652 11.41-4.745a16.177 16.177 0 0 0 3.793-16.948l36.851-36.851a16.177 16.177 0 0 0 16.948-3.793c4.357-4.355 5.853-10.705 3.907-16.571z" style="opacity:1;fill:currentColor;fill-rule:nonzero;stroke:none;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:10;stroke-dasharray:none" transform="matrix(.57187 0 0 .39802 28.922 50.846)"/>
<path d="M72.088 57.275a1.003 1.003 0 0 0-.662-.292c-3.462-.155-7.078-1.876-9.923-4.721-1.742-1.743-3.065-3.782-3.863-5.897L46.517 57.488c2.115.799 4.154 2.121 5.897 3.863 2.845 2.846 4.565 6.462 4.721 9.923.012.249.115.485.292.662l14.876 14.876a10.334 10.334 0 0 0 7.33 3.031c2.655 0 5.311-1.01 7.331-3.031 4.041-4.042 4.041-10.619 0-14.661zM5.351 14.171c.123.219.324.384.563.462l5.82 1.89 23.869 23.869 4.638-4.638-23.869-23.869-1.891-5.82a1.003 1.003 0 0 0-.462-.563L4.714.279a1 1 0 0 0-1.196.165L.293 3.668a1 1 0 0 0-.165 1.196Z" style="opacity:1;fill:currentColor;fill-rule:nonzero;stroke:none;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:10;stroke-dasharray:none" transform="matrix(.57187 0 0 .39802 28.922 50.846)"/>
</g>
<g style="opacity:1;fill:none;fill-rule:nonzero;stroke:none;stroke-width:0;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:10;stroke-dasharray:none">
<path d="M89.234 35.526a3.794 3.794 0 0 0-3.065-1.536H74.085v-8.511a5.187 5.187 0 0 0-5.181-5.181H44.128a2.196 2.196 0 0 1-1.542-.639l-7.588-7.588a5.144 5.144 0 0 0-3.664-1.518H5.181A5.188 5.188 0 0 0 0 15.735v59.569a4.147 4.147 0 0 0 4.142 4.143h70.075c2.389 0 4.245-1.737 5.093-4.753l10.531-35.792c.344-1.17.124-2.4-.607-3.376zM4.142 76.446c-.63 0-1.142-.513-1.142-1.143V15.735c0-1.203.978-2.181 2.181-2.181h26.154c.574 0 1.136.233 1.542.639l7.588 7.588a5.144 5.144 0 0 0 3.664 1.518h24.776c1.202 0 2.181.978 2.181 2.181v8.511h-50.05a5.292 5.292 0 0 0-5.065 3.817L5.342 74.893c-.442 1.553-.954 1.553-1.2 1.553Zm82.821-38.392-10.537 35.81c-.331 1.179-.983 2.582-2.222 2.582H7.985c.086-.227.167-.469.241-.729l10.629-37.083a2.278 2.278 0 0 1 2.181-1.644h65.133c.36 0 .57.208.663.333a.813.813 0 0 1 .131.731z" style="opacity:1;fill:currentColor;fill-rule:nonzero;stroke:none;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:10;stroke-dasharray:none" transform="matrix(1.06512 0 0 1.385 3.167 -10.742)"/>
</g>
</svg>`,Tw=`<svg width="100" height="100" viewBox="0 0 100 100" xml:space="preserve" xmlns="http://www.w3.org/2000/svg">
<g style="opacity:1;fill:none;fill-rule:nonzero;stroke:none;stroke-width:0;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:10;stroke-dasharray:none" transform="matrix(1.07096 0 0 1.20147 1.964 -4.212)">
<path d="M90 84.505H0V5.495h90zm-86-4h82V9.495H4Z" style="opacity:1;fill:currentColor;fill-rule:nonzero;stroke:none;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:10;stroke-dasharray:none"/>
<path d="M90 32.695H0v-27.2h90zm-86-4h82v-19.2H4Z" style="opacity:1;fill:currentColor;fill-rule:nonzero;stroke:none;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:10;stroke-dasharray:none"/>
<rect x="9.58" y="17.09" rx="0" ry="0" width="3.07" height="4" style="opacity:1;fill:currentColor;fill-rule:nonzero;stroke:none;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:10;stroke-dasharray:none"/>
<rect x="16.45" y="17.09" rx="0" ry="0" width="3.07" height="4" style="opacity:1;fill:currentColor;fill-rule:nonzero;stroke:none;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:10;stroke-dasharray:none"/>
<rect x="23.31" y="17.09" rx="0" ry="0" width="3.07" height="4" style="opacity:1;fill:currentColor;fill-rule:nonzero;stroke:none;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:10;stroke-dasharray:none"/>
<rect x="36.55" y="17.09" rx="0" ry="0" width="43.88" height="4" style="opacity:1;fill:currentColor;fill-rule:nonzero;stroke:none;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:10;stroke-dasharray:none"/>
</g>
<g style="opacity:1;fill:none;fill-rule:nonzero;stroke:none;stroke-width:0;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:10;stroke-dasharray:none" stroke-linecap="round">
<path d="M89.161 11.093a1 1 0 0 0-1.656-.392l-7.189 7.189a5.765 5.765 0 0 1-4.104 1.7 5.768 5.768 0 0 1-4.104-1.699 5.811 5.811 0 0 1 0-8.207l7.189-7.189a1 1 0 0 0-.392-1.656C73.042-1.106 66.689.39 62.335 4.745a16.177 16.177 0 0 0-3.792 16.948l-36.85 36.851a16.18 16.18 0 0 0-16.948 3.792C.39 66.691-1.107 73.04.838 78.906a.998.998 0 0 0 1.656.392l7.189-7.189a5.81 5.81 0 0 1 8.207 0 5.764 5.764 0 0 1 1.699 4.104 5.763 5.763 0 0 1-1.7 4.104L10.7 87.506a.999.999 0 0 0 .392 1.656c1.7.563 3.44.839 5.16.839 4.218 0 8.317-1.652 11.41-4.745a16.177 16.177 0 0 0 3.793-16.948l36.851-36.851a16.177 16.177 0 0 0 16.948-3.793c4.357-4.355 5.853-10.705 3.907-16.571z" style="opacity:1;fill:currentColor;fill-rule:nonzero;stroke:none;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:10;stroke-dasharray:none" transform="matrix(.66714 0 0 .51336 18.867 41.049)"/>
<path d="M72.088 57.275a1.003 1.003 0 0 0-.662-.292c-3.462-.155-7.078-1.876-9.923-4.721-1.742-1.743-3.065-3.782-3.863-5.897L46.517 57.488c2.115.799 4.154 2.121 5.897 3.863 2.845 2.846 4.565 6.462 4.721 9.923.012.249.115.485.292.662l14.876 14.876a10.334 10.334 0 0 0 7.33 3.031c2.655 0 5.311-1.01 7.331-3.031 4.041-4.042 4.041-10.619 0-14.661zM5.351 14.171c.123.219.324.384.563.462l5.82 1.89 23.869 23.869 4.638-4.638-23.869-23.869-1.891-5.82a1.003 1.003 0 0 0-.462-.563L4.714.279a1 1 0 0 0-1.196.165L.293 3.668a1 1 0 0 0-.165 1.196Z" style="opacity:1;fill:currentColor;fill-rule:nonzero;stroke:none;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:10;stroke-dasharray:none" transform="matrix(.66714 0 0 .51336 18.867 41.049)"/>
</g>
</svg>`,Cw=`<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100" viewBox="0 0 100 100">
<path fill="currentColor" d="M75 12.5V6.25H40.625a21.875 21.875 0 0 0 0 43.75H50v31.25h-6.25v6.25H75v-6.25h-6.25V12.5H75zM50 43.75h-9.375a15.625 15.625 0 1 1 0-31.25H50v31.25zm12.5 37.5h-6.25V12.5h6.25v68.75z"/>
</svg>`,Aw=`<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100" viewBox="0 0 125 125">
<path fill="currentColor" d="M55.719 22.131c1.812-.25 2.956-.213 3.831-.037a9.375 9.375 0 0 1 3.038 1.3 4.688 4.688 0 1 0 4.825-8.037 18.606 18.606 0 0 0-6.025-2.45c-2.244-.45-4.525-.406-7.05-.044l-.112.013c-5 .838-8.919 3.419-11.594 7.262-2.581 3.725-3.831 8.375-4.188 13.281a4.688 4.688 0 0 0-.006.331v.05l-.006.15-.019.519-.081 1.688c-.063 1.387-.169 3.25-.287 5.45l-.031.581H30a4.688 4.688 0 0 0 0 9.375h7.469l-.356 6.05a2608.581 2608.581 0 0 1-1.794 28.263c-.669 8.025-1.375 13.362-6.419 16.313-2.519 1.431-6.369 1.344-10.563-.75a4.688 4.688 0 0 0-4.188 8.375c5.794 2.906 13.188 4.069 19.419.506l.037-.019c9.581-5.594 10.425-15.937 11-22.912l.063-.75v-.031c.369-4.8 1.406-21.625 2.188-35.044h11.269a4.688 4.688 0 0 0 0-9.375H47.4c.231-4.175.388-7.225.406-8.225.287-3.788 1.219-6.594 2.525-8.475 1.231-1.769 2.919-2.938 5.388-3.356Zm49.156 42.125a4.688 4.688 0 1 0-6.625-6.631L82.131 73.738a226.175 226.175 0 0 1-4.75-8.463l-.456-.725c-.956-1.531-2.381-3.819-4.112-5.419a10.056 10.056 0 0 0-4.6-2.519 9.662 9.662 0 0 0-5.981.631 4.688 4.688 0 0 0-.875.494l-.206.137a11.125 11.125 0 0 0-1.769 1.456c-.281.294-.563.625-.825.931l-.137.163-1.025 1.188a4.688 4.688 0 0 0 7.087 6.144l1.081-1.263.131-.156c.263-.313.363-.425.419-.481l.075-.056c.063.037.144.106.256.213.356.325.781.844 1.325 1.644a48.75 48.75 0 0 1 1.05 1.619l.55.875c.756 1.469 3.063 5.606 5.912 10.438L57.625 98.25a4.688 4.688 0 1 0 6.625 6.625l16.637-16.631a240.988 240.988 0 0 1 5.1 9.069l.313.544c.813 1.381 2.188 3.731 4 5.45 1.125 1.069 2.637 2.125 4.581 2.637a10.038 10.038 0 0 0 6.6-.6c2.225-1.113 3.6-2.55 5.025-4.869a4.688 4.688 0 0 0-8-4.894 5.95 5.95 0 0 1-.787 1.1.938.938 0 0 1-.2.156 1.163 1.163 0 0 1-.206.037h-.044s-.044-.013-.125-.063a2.419 2.419 0 0 1-.394-.313 9.156 9.156 0 0 1-1.269-1.606 37.587 37.587 0 0 1-.988-1.613l-.375-.644a289.688 289.688 0 0 0-6.381-11.244l17.137-17.144ZM66.25 65.768Zm-.013 0h.013Z"/>
</svg>`,Ew=`<svg xmlns="http://www.w3.org/2000/svg" width="100px" height="100px" preserveAspectRatio="xMidYMid meet" viewBox="0 0 125 125">
<path fill="currentColor" d="M34.375 43.75a3.125 3.125 0 0 0 0 6.25h25a3.125 3.125 0 0 0 0 -6.25h-25Zm0 15.625a3.125 3.125 0 0 0 0 6.25h43.75a3.125 3.125 0 0 0 0 -6.25h-43.75Zm-3.125 18.75a3.125 3.125 0 0 1 3.125 -3.125h31.25a3.125 3.125 0 0 1 0 6.25h-31.25a3.125 3.125 0 0 1 -3.125 -3.125ZM28.125 25A15.625 15.625 0 0 0 12.5 40.625v43.75A15.625 15.625 0 0 0 28.125 100h68.75a15.625 15.625 0 0 0 15.625 -15.625v-43.75A15.625 15.625 0 0 0 96.875 25h-68.75ZM18.75 40.625A9.375 9.375 0 0 1 28.125 31.25h68.75A9.375 9.375 0 0 1 106.25 40.625v43.75a9.375 9.375 0 0 1 -9.375 9.375h-68.75A9.375 9.375 0 0 1 18.75 84.375v-43.75Z"/>
</svg>`,Lw=`<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100" viewBox="0 0 125 125">
<path fill="currentColor" d="M40.625 50a3.125 3.125 0 0 0 0 6.25h43.75a3.125 3.125 0 0 0 0-6.25h-43.75ZM37.5 71.875a3.125 3.125 0 0 1 3.125-3.125h18.75a3.125 3.125 0 0 1 0 6.25h-18.75a3.125 3.125 0 0 1-3.125-3.125ZM40.625 87.5a3.125 3.125 0 0 0 0 6.25h31.25a3.125 3.125 0 0 0 0-6.25h-31.25Zm12.5-75a9.375 9.375 0 0 0-8.844 6.25h-9.906A9.375 9.375 0 0 0 25 28.125v75a9.375 9.375 0 0 0 9.375 9.375h56.25a9.375 9.375 0 0 0 9.375-9.375v-75a9.375 9.375 0 0 0-9.375-9.375h-9.906a9.375 9.375 0 0 0-8.844-6.25h-18.75Zm18.75 6.25a3.125 3.125 0 0 1 0 6.25h-18.75a3.125 3.125 0 0 1 0-6.25h18.75ZM34.375 25h9.906a9.375 9.375 0 0 0 8.844 6.25h18.75A9.375 9.375 0 0 0 80.719 25h9.906a3.125 3.125 0 0 1 3.125 3.125v75a3.125 3.125 0 0 1-3.125 3.125h-56.25a3.125 3.125 0 0 1-3.125-3.125v-75A3.125 3.125 0 0 1 34.375 25Z"/>
</svg>`,_w=`<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100" viewBox="0 0 125 125">
<path fill="currentColor" d="M87.5 18.75h-50A6.25 6.25 0 0 0 31.25 25v68.75h25.138a34.375 34.375 0 0 0 1.156 6.25H31.25a6.25 6.25 0 0 0 6.25 6.25H60a34.63 34.63 0 0 0 4.106 6.25H37.5A12.5 12.5 0 0 1 25 100V25a12.5 12.5 0 0 1 12.5-12.5h50A12.5 12.5 0 0 1 100 25v32.544a34.25 34.25 0 0 0-6.25-1.156V25a6.25 6.25 0 0 0-6.25-6.25Zm-50 12.5v6.25a6.25 6.25 0 0 0 6.25 6.25h37.5a6.25 6.25 0 0 0 6.25-6.25v-6.25A6.25 6.25 0 0 0 81.25 25h-37.5a6.25 6.25 0 0 0-6.25 6.25Zm6.25 0h37.5v6.25h-37.5v-6.25Zm75 59.375a28.125 28.125 0 1 1-56.25 0 28.125 28.125 0 0 1 56.25 0Zm-25-12.5a3.125 3.125 0 0 0-6.25 0V87.5h-9.375a3.125 3.125 0 0 0 0 6.25H87.5v9.375a3.125 3.125 0 0 0 6.25 0V93.75h9.375a3.125 3.125 0 0 0 0-6.25H93.75v-9.375Z"/>
</svg>`,Iw=`<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100" viewBox="0 0 125 125">
<path fill="currentColor" d="M103.581 23.894a4.688 4.688 0 0 0-6.613 3.313c-1.594 7.112-8.175 16.3-16.756 22.019a4.688 4.688 0 1 0 5.2 7.8 54.806 54.806 0 0 0 11.463-10.338v50.187a4.688 4.688 0 0 0 9.375 0v-68.65a4.688 4.688 0 0 0-2.669-4.331Zm-81.706 4.231a4.688 4.688 0 1 0-9.375 0v68.75a4.688 4.688 0 0 0 9.375 0v-31.25h31.25v31.25a4.688 4.688 0 0 0 9.375 0v-68.75a4.688 4.688 0 1 0-9.375 0V56.25h-31.25V28.125Z"/>
</svg>`,Mw=`<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100" viewBox="0 0 125 125">
<path fill="currentColor" d="M108.187 18.75a4.688 4.688 0 0 1 4.313 4.675v34.388a4.688 4.688 0 0 1-9.375 0V38.206a27.531 27.531 0 0 1-1.944 1.431 4.688 4.688 0 0 1-5.2-7.806c3.85-2.563 6.644-6.638 7.25-9.406a4.669 4.669 0 0 1 4.956-3.675ZM63.75 94.188a4.913 4.913 0 0 1-1.25-3.413V41.294a5.188 5.188 0 0 1 1.325-3.606l.025-.025a4.75 4.75 0 0 1 3.519-1.463 4.625 4.625 0 0 1 3.5 1.475c.938.994 1.375 2.244 1.375 3.625v14.669a15.53 15.53 0 0 1 3.006-2.288l.013-.006c2.481-1.438 5.25-2.15 8.275-2.15 5.438 0 9.925 2.063 13.3 6.162 3.356 4.075 4.956 9.412 4.956 15.862 0 6.469-1.6 11.819-4.956 15.9-3.381 4.081-7.906 6.125-13.419 6.125-3.081 0-5.894-.706-8.388-2.156h-.006a15.619 15.619 0 0 1-3.094-2.375 4.656 4.656 0 0 1-4.787 4.525 4.519 4.519 0 0 1-3.375-1.356l-.019-.025Zm11.313-11c1.862 2.325 4.181 3.438 7.062 3.438 3.05 0 5.344-1.106 7.062-3.313 1.75-2.275 2.712-5.475 2.712-9.763 0-4.263-.963-7.456-2.719-9.738-1.719-2.231-4.013-3.344-7.056-3.344-2.875 0-5.194 1.125-7.062 3.475-1.856 2.344-2.856 5.5-2.856 9.606 0 4.125 1 7.294 2.85 9.638Zm-64.125 7.543c0 1.319.531 2.469 1.519 3.344l.043.05a5.5 5.5 0 0 0 3.562 1.194 5 5 0 0 0 3.081-.975 5.731 5.731 0 0 0 1.875-2.694l4.662-12.662h20.462l4.694 12.662a5.719 5.719 0 0 0 1.875 2.688 5 5 0 0 0 3.087.981 5.375 5.375 0 0 0 3.55-1.213 4.313 4.313 0 0 0 1.581-3.375c0-.775-.219-1.625-.537-2.469L41.954 40.224a6.888 6.888 0 0 0-2.288-3.163 6.037 6.037 0 0 0-3.65-1.125c-1.4 0-2.688.344-3.781 1.125a6.8 6.8 0 0 0-2.362 3.206l-18.4 47.994a7.125 7.125 0 0 0-.537 2.469ZM42.987 70h-14.1l7.051-19.35 7.05 19.356Z"/>
</svg>`,Bw=`<svg xmlns="http://www.w3.org/2000/svg" width="100px" height="100px" preserveAspectRatio="xMidYMid meet" viewBox="0 0 3200 3200">
<path fill="currentColor" d="m1473.706 130.869l-573.844 860.463v545.469H548.138v-545.469L0 130.869h395.313l348.55 554.038l351.406 -554.038h378.438zm590.631 1093.281H1427.706l-129.481 312.65H1016.313l596.125 -1405.931h288.356l571.938 1405.931h-301.225l-107.175 -312.65zm-105.75 -279.588l-195.162 -515.938l-217.731 515.938h412.887zM548.131 1691.187v1377.938h295.644V2118.638l309.406 638.875h232.713l319.975 -661.331v972.663h283.619V1691.187h-387.25l-343.606 623.163l-327.25 -623.163h-383.25zM3200 2770H2472.737V1691.187h-301.225v1372.013H3200v-293.188z"/>
</svg>`,Fw=`<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100" viewBox="0 0 100 100">
<path fill="currentColor" d="M9.55 36.915a42.455 42.455 0 0 1 8.9-15.4 2.5 2.5 0 0 1 2.7-.675l9.59 3.43a5 5 0 0 0 6.6-3.81l1.83-10.03a2.5 2.5 0 0 1 1.94-2 42.66 42.66 0 0 1 17.775 0 2.5 2.5 0 0 1 1.935 2l1.835 10.03a5 5 0 0 0 6.6 3.81l9.59-3.43a2.5 2.5 0 0 1 2.7.68 42.455 42.455 0 0 1 8.9 15.395 2.5 2.5 0 0 1-.76 2.675l-7.775 6.6a5 5 0 0 0 0 7.62l7.775 6.6a2.5 2.5 0 0 1 .76 2.675 42.455 42.455 0 0 1-8.9 15.4 2.5 2.5 0 0 1-2.7.675l-9.59-3.43a5 5 0 0 0-6.6 3.81L60.82 89.575a2.5 2.5 0 0 1-1.935 1.995 42.65 42.65 0 0 1-17.775 0 2.5 2.5 0 0 1-1.94-2l-1.825-10.03a5 5 0 0 0-6.6-3.81l-9.595 3.43a2.5 2.5 0 0 1-2.7-.68 42.45 42.45 0 0 1-8.9-15.395 2.5 2.5 0 0 1 .765-2.675l7.77-6.6a5 5 0 0 0 0-7.62l-7.77-6.6a2.5 2.5 0 0 1-.765-2.675Zm5.305-.03 6.47 5.49a10 10 0 0 1 0 15.25l-6.475 5.49a37.45 37.45 0 0 0 6.225 10.76l7.98-2.85a10 10 0 0 1 13.2 7.625l1.525 8.34a37.78 37.78 0 0 0 12.425 0l1.525-8.35a9.99 9.99 0 0 1 13.2-7.62l7.985 2.855a37.46 37.46 0 0 0 6.225-10.76l-6.47-5.49a9.99 9.99 0 0 1 0-15.25l6.47-5.49a37.455 37.455 0 0 0-6.225-10.76l-7.98 2.85a10 10 0 0 1-13.2-7.62l-1.53-8.345a37.775 37.775 0 0 0-12.425 0l-1.52 8.345a10 10 0 0 1-13.205 7.625l-7.98-2.855a37.455 37.455 0 0 0-6.225 10.76ZM37.5 50a12.5 12.5 0 1 1 25 0 12.5 12.5 0 0 1-25 0Zm5 0a7.5 7.5 0 1 0 15 0 7.5 7.5 0 0 0-15 0Z"/>
</svg>`,Qe={folder:{id:"lint-folder",source:Ow},file:{id:"lint-file",source:Sw},vault:{id:"lint-vault",source:Tw},whitespace:{id:"lint-whitespace",source:Cw},math:{id:"lint-math",source:Aw},content:{id:"lint-content",source:Ew},paste:{id:"lint-paste",source:Lw},custom:{id:"lint-custom",source:_w},heading:{id:"lint-heading",source:Iw},footer:{id:"lint-footer",source:Mw},yaml:{id:"lint-yaml",source:Bw},general:{id:"lint-general",source:Fw}};var La=require("obsidian");var _a=class{constructor(){this.disabledRules=[]}lintText(t){let n=t.oldText;this.disabledRules=Lf(n);let r=this.runBeforeRegularRules(t);for(let i of Nt){if(this.disabledRules.includes(i.alias())){mn(i.alias()+" is disabled");continue}else if(i.hasSpecialExecutionOrder)continue;[r]=Ct.applyIfEnabledBase(i,r,t.settings,{fileCreatedTime:t.fileInfo.createdAtFormatted,fileModifiedTime:t.fileInfo.modifiedAtFormatted,fileName:t.fileInfo.name,locale:t.momentLocale})}return t.oldText=r,this.runAfterRegularRules(n,t)}runBeforeRegularRules(t){let n=t.oldText;return[n]=Hn.applyIfEnabled(n,t.settings,this.disabledRules),[n]=$n.applyIfEnabled(n,t.settings,this.disabledRules),n}runAfterRegularRules(t,n){let r=n.oldText,i=n.getCurrentTime(),o;[r,o]=hn.applyIfEnabled(r,n.settings,this.disabledRules,{fileCreatedTime:n.fileInfo.createdAtFormatted,fileModifiedTime:n.fileInfo.modifiedAtFormatted,currentTime:i,alreadyModified:t!=r,locale:n.momentLocale});let a=hn.getRuleOptions(n.settings);return i=n.getCurrentTime(),[r]=jn.applyIfEnabled(r,n.settings,this.disabledRules,{currentTimeFormatted:i.format(a.format),yamlTimestampDateModifiedEnabled:o&&a.dateModified,dateModifiedKey:a.dateModifiedKey}),r}runCustomCommands(t,n){mn("Running Custom Lint Commands");let r=new Set;for(let i of t){if(i.id){if(r.has(i.id)){Ff(`You cannot run the same command ("${i.name}") as a custom lint rule twice.`);continue}}else continue;try{r.add(i.id),n.executeCommandById(i.id)}catch(o){ha(o,`Custom Lint Command ${i.id}`)}}}};function tu(e,t,n,r){let i=(0,La.moment)(t.stat.ctime);i.locale(n);let o=(0,La.moment)(t.stat.mtime);o.locale(n);let a=o.format(),s=i.format();return{oldText:e,fileInfo:{name:t.basename,createdAtFormatted:s,modifiedAtFormatted:a},settings:r,momentLocale:n,getCurrentTime:()=>{let l=(0,La.moment)();return l.locale(n),l}}}var Ia=require("obsidian"),Vi=class extends Ia.Modal{constructor(t,n,r,i,o){super(t),this.modalEl.addClass("confirm-modal"),this.contentEl.createEl("h3",{text:"Warning"}).style.textAlign="center",this.contentEl.createEl("p",{text:n+" Make sure you have backed up your files."}).id="confirm-dialog",this.contentEl.createDiv("modal-button-container",a=>{a.createEl("button",{text:"Cancel"}).addEventListener("click",()=>this.close());let s=a.createEl("button",{attr:{type:"submit"},cls:"mod-cta",text:r});s.addEventListener("click",async l=>{new Ia.Notice(i),this.close(),await o()}),setTimeout(()=>{s.focus()},50)})}};var Ne=require("obsidian");var sd=require("obsidian");var ad=require("obsidian");var we="top",Le="bottom",Ae="right",Te="left",Ma="auto",yn=[we,Le,Ae,Te],Zt="start",qn="end",zf="clippingParents",Ba="viewport",xr="popper",$f="reference",nu=yn.reduce(function(e,t){return e.concat([t+"-"+Zt,t+"-"+qn])},[]),Fa=[].concat(yn,[Ma]).reduce(function(e,t){return e.concat([t,t+"-"+Zt,t+"-"+qn])},[]),Rw="beforeRead",Dw="read",Pw="afterRead",Nw="beforeMain",zw="main",$w="afterMain",Hw="beforeWrite",Yw="write",jw="afterWrite",Hf=[Rw,Dw,Pw,Nw,zw,$w,Hw,Yw,jw];function De(e){return e?(e.nodeName||"").toLowerCase():null}function ge(e){if(e==null)return window;if(e.toString()!=="[object Window]"){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function wt(e){var t=ge(e).Element;return e instanceof t||e instanceof Element}function _e(e){var t=ge(e).HTMLElement;return e instanceof t||e instanceof HTMLElement}function kr(e){if(typeof ShadowRoot=="undefined")return!1;var t=ge(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function qw(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];!_e(o)||!De(o)||(Object.assign(o.style,r),Object.keys(i).forEach(function(a){var s=i[a];s===!1?o.removeAttribute(a):o.setAttribute(a,s===!0?"":s)}))})}function Vw(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]||{},a=Object.keys(t.styles.hasOwnProperty(r)?t.styles[r]:n[r]),s=a.reduce(function(l,u){return l[u]="",l},{});!_e(i)||!De(i)||(Object.assign(i.style,s),Object.keys(o).forEach(function(l){i.removeAttribute(l)}))})}}var Yf={name:"applyStyles",enabled:!0,phase:"write",fn:qw,effect:Vw,requires:["computeStyles"]};function Pe(e){return e.split("-")[0]}var Et=Math.max,Vn=Math.min,Qt=Math.round;function vr(){var e=navigator.userAgentData;return e!=null&&e.brands?e.brands.map(function(t){return t.brand+"/"+t.version}).join(" "):navigator.userAgent}function Ki(){return!/^((?!chrome|android).)*safari/i.test(vr())}function xt(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);var r=e.getBoundingClientRect(),i=1,o=1;t&&_e(e)&&(i=e.offsetWidth>0&&Qt(r.width)/e.offsetWidth||1,o=e.offsetHeight>0&&Qt(r.height)/e.offsetHeight||1);var a=wt(e)?ge(e):window,s=a.visualViewport,l=!Ki()&&n,u=(r.left+(l&&s?s.offsetLeft:0))/i,c=(r.top+(l&&s?s.offsetTop:0))/o,p=r.width/i,m=r.height/o;return{width:p,height:m,top:c,right:u+p,bottom:c+m,left:u,x:u,y:c}}function Kn(e){var t=xt(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 Wi(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&kr(n)){var r=t;do{if(r&&e.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function nt(e){return ge(e).getComputedStyle(e)}function ru(e){return["table","td","th"].indexOf(De(e))>=0}function $e(e){return((wt(e)?e.ownerDocument:e.document)||window.document).documentElement}function Xt(e){return De(e)==="html"?e:e.assignedSlot||e.parentNode||(kr(e)?e.host:null)||$e(e)}function jf(e){return!_e(e)||nt(e).position==="fixed"?null:e.offsetParent}function Kw(e){var t=/firefox/i.test(vr()),n=/Trident/i.test(vr());if(n&&_e(e)){var r=nt(e);if(r.position==="fixed")return null}var i=Xt(e);for(kr(i)&&(i=i.host);_e(i)&&["html","body"].indexOf(De(i))<0;){var o=nt(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 Lt(e){for(var t=ge(e),n=jf(e);n&&ru(n)&&nt(n).position==="static";)n=jf(n);return n&&(De(n)==="html"||De(n)==="body"&&nt(n).position==="static")?t:n||Kw(e)||t}function Wn(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function Un(e,t,n){return Et(e,Vn(t,n))}function qf(e,t,n){var r=Un(e,t,n);return r>n?n:r}function Ui(){return{top:0,right:0,bottom:0,left:0}}function Gi(e){return Object.assign({},Ui(),e)}function Zi(e,t){return t.reduce(function(n,r){return n[r]=e,n},{})}var Ww=function(t,n){return t=typeof t=="function"?t(Object.assign({},n.rects,{placement:n.placement})):t,Gi(typeof t!="number"?t:Zi(t,yn))};function Uw(e){var t,n=e.state,r=e.name,i=e.options,o=n.elements.arrow,a=n.modifiersData.popperOffsets,s=Pe(n.placement),l=Wn(s),u=[Te,Ae].indexOf(s)>=0,c=u?"height":"width";if(!(!o||!a)){var p=Ww(i.padding,n),m=Kn(o),f=l==="y"?we:Te,d=l==="y"?Le:Ae,h=n.rects.reference[c]+n.rects.reference[l]-a[l]-n.rects.popper[c],g=a[l]-n.rects.reference[l],b=Lt(o),O=b?l==="y"?b.clientHeight||0:b.clientWidth||0:0,S=h/2-g/2,E=p[f],I=O-m[c]-p[d],k=O/2-m[c]/2+S,_=Un(E,k,I),M=l;n.modifiersData[r]=(t={},t[M]=_,t.centerOffset=_-k,t)}}function Gw(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)||!Wi(t.elements.popper,i)||(t.elements.arrow=i))}var Vf={name:"arrow",enabled:!0,phase:"main",fn:Uw,effect:Gw,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function kt(e){return e.split("-")[1]}var Zw={top:"auto",right:"auto",bottom:"auto",left:"auto"};function Qw(e){var t=e.x,n=e.y,r=window,i=r.devicePixelRatio||1;return{x:Qt(t*i)/i||0,y:Qt(n*i)/i||0}}function Kf(e){var t,n=e.popper,r=e.popperRect,i=e.placement,o=e.variation,a=e.offsets,s=e.position,l=e.gpuAcceleration,u=e.adaptive,c=e.roundOffsets,p=e.isFixed,m=a.x,f=m===void 0?0:m,d=a.y,h=d===void 0?0:d,g=typeof c=="function"?c({x:f,y:h}):{x:f,y:h};f=g.x,h=g.y;var b=a.hasOwnProperty("x"),O=a.hasOwnProperty("y"),S=Te,E=we,I=window;if(u){var k=Lt(n),_="clientHeight",M="clientWidth";if(k===ge(n)&&(k=$e(n),nt(k).position!=="static"&&s==="absolute"&&(_="scrollHeight",M="scrollWidth")),k=k,i===we||(i===Te||i===Ae)&&o===qn){E=Le;var z=p&&k===I&&I.visualViewport?I.visualViewport.height:k[_];h-=z-r.height,h*=l?1:-1}if(i===Te||(i===we||i===Le)&&o===qn){S=Ae;var q=p&&k===I&&I.visualViewport?I.visualViewport.width:k[M];f-=q-r.width,f*=l?1:-1}}var H=Object.assign({position:s},u&&Zw),U=c===!0?Qw({x:f,y:h}):{x:f,y:h};if(f=U.x,h=U.y,l){var P;return Object.assign({},H,(P={},P[E]=O?"0":"",P[S]=b?"0":"",P.transform=(I.devicePixelRatio||1)<=1?"translate("+f+"px, "+h+"px)":"translate3d("+f+"px, "+h+"px, 0)",P))}return Object.assign({},H,(t={},t[E]=O?h+"px":"",t[S]=b?f+"px":"",t.transform="",t))}function Xw(e){var t=e.state,n=e.options,r=n.gpuAcceleration,i=r===void 0?!0:r,o=n.adaptive,a=o===void 0?!0:o,s=n.roundOffsets,l=s===void 0?!0:s;if(!1)var u;var c={placement:Pe(t.placement),variation:kt(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,Kf(Object.assign({},c,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:a,roundOffsets:l})))),t.modifiersData.arrow!=null&&(t.styles.arrow=Object.assign({},t.styles.arrow,Kf(Object.assign({},c,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})}var Wf={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:Xw,data:{}};var Ra={passive:!0};function Jw(e){var t=e.state,n=e.instance,r=e.options,i=r.scroll,o=i===void 0?!0:i,a=r.resize,s=a===void 0?!0:a,l=ge(t.elements.popper),u=[].concat(t.scrollParents.reference,t.scrollParents.popper);return o&&u.forEach(function(c){c.addEventListener("scroll",n.update,Ra)}),s&&l.addEventListener("resize",n.update,Ra),function(){o&&u.forEach(function(c){c.removeEventListener("scroll",n.update,Ra)}),s&&l.removeEventListener("resize",n.update,Ra)}}var Uf={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:Jw,data:{}};var ex={left:"right",right:"left",bottom:"top",top:"bottom"};function Sr(e){return e.replace(/left|right|bottom|top/g,function(t){return ex[t]})}var tx={start:"end",end:"start"};function Da(e){return e.replace(/start|end/g,function(t){return tx[t]})}function Gn(e){var t=ge(e),n=t.pageXOffset,r=t.pageYOffset;return{scrollLeft:n,scrollTop:r}}function Zn(e){return xt($e(e)).left+Gn(e).scrollLeft}function iu(e,t){var n=ge(e),r=$e(e),i=n.visualViewport,o=r.clientWidth,a=r.clientHeight,s=0,l=0;if(i){o=i.width,a=i.height;var u=Ki();(u||!u&&t==="fixed")&&(s=i.offsetLeft,l=i.offsetTop)}return{width:o,height:a,x:s+Zn(e),y:l}}function ou(e){var t,n=$e(e),r=Gn(e),i=(t=e.ownerDocument)==null?void 0:t.body,o=Et(n.scrollWidth,n.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),a=Et(n.scrollHeight,n.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0),s=-r.scrollLeft+Zn(e),l=-r.scrollTop;return nt(i||n).direction==="rtl"&&(s+=Et(n.clientWidth,i?i.clientWidth:0)-o),{width:o,height:a,x:s,y:l}}function Qn(e){var t=nt(e),n=t.overflow,r=t.overflowX,i=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+i+r)}function Pa(e){return["html","body","#document"].indexOf(De(e))>=0?e.ownerDocument.body:_e(e)&&Qn(e)?e:Pa(Xt(e))}function bn(e,t){var n;t===void 0&&(t=[]);var r=Pa(e),i=r===((n=e.ownerDocument)==null?void 0:n.body),o=ge(r),a=i?[o].concat(o.visualViewport||[],Qn(r)?r:[]):r,s=t.concat(a);return i?s:s.concat(bn(Xt(a)))}function Or(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function nx(e,t){var n=xt(e,!1,t==="fixed");return n.top=n.top+e.clientTop,n.left=n.left+e.clientLeft,n.bottom=n.top+e.clientHeight,n.right=n.left+e.clientWidth,n.width=e.clientWidth,n.height=e.clientHeight,n.x=n.left,n.y=n.top,n}function Gf(e,t,n){return t===Ba?Or(iu(e,n)):wt(t)?nx(t,n):Or(ou($e(e)))}function rx(e){var t=bn(Xt(e)),n=["absolute","fixed"].indexOf(nt(e).position)>=0,r=n&&_e(e)?Lt(e):e;return wt(r)?t.filter(function(i){return wt(i)&&Wi(i,r)&&De(i)!=="body"}):[]}function au(e,t,n,r){var i=t==="clippingParents"?rx(e):[].concat(t),o=[].concat(i,[n]),a=o[0],s=o.reduce(function(l,u){var c=Gf(e,u,r);return l.top=Et(c.top,l.top),l.right=Vn(c.right,l.right),l.bottom=Vn(c.bottom,l.bottom),l.left=Et(c.left,l.left),l},Gf(e,a,r));return s.width=s.right-s.left,s.height=s.bottom-s.top,s.x=s.left,s.y=s.top,s}function Qi(e){var t=e.reference,n=e.element,r=e.placement,i=r?Pe(r):null,o=r?kt(r):null,a=t.x+t.width/2-n.width/2,s=t.y+t.height/2-n.height/2,l;switch(i){case we:l={x:a,y:t.y-n.height};break;case Le:l={x:a,y:t.y+t.height};break;case Ae:l={x:t.x+t.width,y:s};break;case Te:l={x:t.x-n.width,y:s};break;default:l={x:t.x,y:t.y}}var u=i?Wn(i):null;if(u!=null){var c=u==="y"?"height":"width";switch(o){case Zt:l[u]=l[u]-(t[c]/2-n[c]/2);break;case qn:l[u]=l[u]+(t[c]/2-n[c]/2);break;default:}}return l}function _t(e,t){t===void 0&&(t={});var n=t,r=n.placement,i=r===void 0?e.placement:r,o=n.strategy,a=o===void 0?e.strategy:o,s=n.boundary,l=s===void 0?zf:s,u=n.rootBoundary,c=u===void 0?Ba:u,p=n.elementContext,m=p===void 0?xr:p,f=n.altBoundary,d=f===void 0?!1:f,h=n.padding,g=h===void 0?0:h,b=Gi(typeof g!="number"?g:Zi(g,yn)),O=m===xr?$f:xr,S=e.rects.popper,E=e.elements[d?O:m],I=au(wt(E)?E:E.contextElement||$e(e.elements.popper),l,c,a),k=xt(e.elements.reference),_=Qi({reference:k,element:S,strategy:"absolute",placement:i}),M=Or(Object.assign({},S,_)),z=m===xr?M:k,q={top:I.top-z.top+b.top,bottom:z.bottom-I.bottom+b.bottom,left:I.left-z.left+b.left,right:z.right-I.right+b.right},H=e.modifiersData.offset;if(m===xr&&H){var U=H[i];Object.keys(q).forEach(function(P){var V=[Ae,Le].indexOf(P)>=0?1:-1,ne=[we,Le].indexOf(P)>=0?"y":"x";q[P]+=U[ne]*V})}return q}function su(e,t){t===void 0&&(t={});var n=t,r=n.placement,i=n.boundary,o=n.rootBoundary,a=n.padding,s=n.flipVariations,l=n.allowedAutoPlacements,u=l===void 0?Fa:l,c=kt(r),p=c?s?nu:nu.filter(function(d){return kt(d)===c}):yn,m=p.filter(function(d){return u.indexOf(d)>=0});m.length===0&&(m=p);var f=m.reduce(function(d,h){return d[h]=_t(e,{placement:h,boundary:i,rootBoundary:o,padding:a})[Pe(h)],d},{});return Object.keys(f).sort(function(d,h){return f[d]-f[h]})}function ix(e){if(Pe(e)===Ma)return[];var t=Sr(e);return[Da(e),t,Da(t)]}function ox(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,a=n.altAxis,s=a===void 0?!0:a,l=n.fallbackPlacements,u=n.padding,c=n.boundary,p=n.rootBoundary,m=n.altBoundary,f=n.flipVariations,d=f===void 0?!0:f,h=n.allowedAutoPlacements,g=t.options.placement,b=Pe(g),O=b===g,S=l||(O||!d?[Sr(g)]:ix(g)),E=[g].concat(S).reduce(function(it,Xe){return it.concat(Pe(Xe)===Ma?su(t,{placement:Xe,boundary:c,rootBoundary:p,padding:u,flipVariations:d,allowedAutoPlacements:h}):Xe)},[]),I=t.rects.reference,k=t.rects.popper,_=new Map,M=!0,z=E[0],q=0;q<E.length;q++){var H=E[q],U=Pe(H),P=kt(H)===Zt,V=[we,Le].indexOf(U)>=0,ne=V?"width":"height",C=_t(t,{placement:H,boundary:c,rootBoundary:p,altBoundary:m,padding:u}),oe=V?P?Ae:Te:P?Le:we;I[ne]>k[ne]&&(oe=Sr(oe));var te=Sr(oe),he=[];if(o&&he.push(C[U]<=0),s&&he.push(C[oe]<=0,C[te]<=0),he.every(function(it){return it})){z=H,M=!1;break}_.set(H,he)}if(M)for(var le=d?3:1,w=function(Xe){var vt=E.find(function(ot){var ce=_.get(ot);if(ce)return ce.slice(0,Xe).every(function(zt){return zt})});if(vt)return z=vt,"break"},x=le;x>0;x--){var rt=w(x);if(rt==="break")break}t.placement!==z&&(t.modifiersData[r]._skip=!0,t.placement=z,t.reset=!0)}}var Zf={name:"flip",enabled:!0,phase:"main",fn:ox,requiresIfExists:["offset"],data:{_skip:!1}};function Qf(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 Xf(e){return[we,Ae,Le,Te].some(function(t){return e[t]>=0})}function ax(e){var t=e.state,n=e.name,r=t.rects.reference,i=t.rects.popper,o=t.modifiersData.preventOverflow,a=_t(t,{elementContext:"reference"}),s=_t(t,{altBoundary:!0}),l=Qf(a,r),u=Qf(s,i,o),c=Xf(l),p=Xf(u);t.modifiersData[n]={referenceClippingOffsets:l,popperEscapeOffsets:u,isReferenceHidden:c,hasPopperEscaped:p},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":c,"data-popper-escaped":p})}var Jf={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:ax};function sx(e,t,n){var r=Pe(e),i=[Te,we].indexOf(r)>=0?-1:1,o=typeof n=="function"?n(Object.assign({},t,{placement:e})):n,a=o[0],s=o[1];return a=a||0,s=(s||0)*i,[Te,Ae].indexOf(r)>=0?{x:s,y:a}:{x:a,y:s}}function lx(e){var t=e.state,n=e.options,r=e.name,i=n.offset,o=i===void 0?[0,0]:i,a=Fa.reduce(function(c,p){return c[p]=sx(p,t.rects,o),c},{}),s=a[t.placement],l=s.x,u=s.y;t.modifiersData.popperOffsets!=null&&(t.modifiersData.popperOffsets.x+=l,t.modifiersData.popperOffsets.y+=u),t.modifiersData[r]=a}var ed={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:lx};function ux(e){var t=e.state,n=e.name;t.modifiersData[n]=Qi({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})}var td={name:"popperOffsets",enabled:!0,phase:"read",fn:ux,data:{}};function lu(e){return e==="x"?"y":"x"}function cx(e){var t=e.state,n=e.options,r=e.name,i=n.mainAxis,o=i===void 0?!0:i,a=n.altAxis,s=a===void 0?!1:a,l=n.boundary,u=n.rootBoundary,c=n.altBoundary,p=n.padding,m=n.tether,f=m===void 0?!0:m,d=n.tetherOffset,h=d===void 0?0:d,g=_t(t,{boundary:l,rootBoundary:u,padding:p,altBoundary:c}),b=Pe(t.placement),O=kt(t.placement),S=!O,E=Wn(b),I=lu(E),k=t.modifiersData.popperOffsets,_=t.rects.reference,M=t.rects.popper,z=typeof h=="function"?h(Object.assign({},t.rects,{placement:t.placement})):h,q=typeof z=="number"?{mainAxis:z,altAxis:z}:Object.assign({mainAxis:0,altAxis:0},z),H=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,U={x:0,y:0};if(!!k){if(o){var P,V=E==="y"?we:Te,ne=E==="y"?Le:Ae,C=E==="y"?"height":"width",oe=k[E],te=oe+g[V],he=oe-g[ne],le=f?-M[C]/2:0,w=O===Zt?_[C]:M[C],x=O===Zt?-M[C]:-_[C],rt=t.elements.arrow,it=f&&rt?Kn(rt):{width:0,height:0},Xe=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:Ui(),vt=Xe[V],ot=Xe[ne],ce=Un(0,_[C],it[C]),zt=S?_[C]/2-le-ce-vt-q.mainAxis:w-ce-vt-q.mainAxis,St=S?-_[C]/2+le+ce+ot+q.mainAxis:x+ce+ot+q.mainAxis,It=t.elements.arrow&&Lt(t.elements.arrow),Jt=It?E==="y"?It.clientTop||0:It.clientLeft||0:0,wn=(P=H==null?void 0:H[E])!=null?P:0,Ya=oe+zt-wn-Jt,ja=oe+St-wn,Ji=Un(f?Vn(te,Ya):te,oe,f?Et(he,ja):he);k[E]=Ji,U[E]=Ji-oe}if(s){var Cr,eo=E==="x"?we:Te,to=E==="x"?Le:Ae,$t=k[I],xn=I==="y"?"height":"width",Ar=$t+g[eo],no=$t-g[to],Er=[we,Te].indexOf(b)!==-1,ro=(Cr=H==null?void 0:H[I])!=null?Cr:0,io=Er?Ar:$t-_[xn]-M[xn]-ro+q.altAxis,oo=Er?$t+_[xn]+M[xn]-ro-q.altAxis:no,L=f&&Er?qf(io,$t,oo):Un(f?io:Ar,$t,f?oo:no);k[I]=L,U[I]=L-$t}t.modifiersData[r]=U}}var nd={name:"preventOverflow",enabled:!0,phase:"main",fn:cx,requiresIfExists:["offset"]};function uu(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function cu(e){return e===ge(e)||!_e(e)?Gn(e):uu(e)}function px(e){var t=e.getBoundingClientRect(),n=Qt(t.width)/e.offsetWidth||1,r=Qt(t.height)/e.offsetHeight||1;return n!==1||r!==1}function pu(e,t,n){n===void 0&&(n=!1);var r=_e(t),i=_e(t)&&px(t),o=$e(t),a=xt(e,i,n),s={scrollLeft:0,scrollTop:0},l={x:0,y:0};return(r||!r&&!n)&&((De(t)!=="body"||Qn(o))&&(s=cu(t)),_e(t)?(l=xt(t,!0),l.x+=t.clientLeft,l.y+=t.clientTop):o&&(l.x=Zn(o))),{x:a.left+s.scrollLeft-l.x,y:a.top+s.scrollTop-l.y,width:a.width,height:a.height}}function mx(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 a=[].concat(o.requires||[],o.requiresIfExists||[]);a.forEach(function(s){if(!n.has(s)){var l=t.get(s);l&&i(l)}}),r.push(o)}return e.forEach(function(o){n.has(o.name)||i(o)}),r}function mu(e){var t=mx(e);return Hf.reduce(function(n,r){return n.concat(t.filter(function(i){return i.phase===r}))},[])}function fu(e){var t;return function(){return t||(t=new Promise(function(n){Promise.resolve().then(function(){t=void 0,n(e())})})),t}}function du(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 rd={placement:"bottom",modifiers:[],strategy:"absolute"};function id(){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 od(e){e===void 0&&(e={});var t=e,n=t.defaultModifiers,r=n===void 0?[]:n,i=t.defaultOptions,o=i===void 0?rd:i;return function(s,l,u){u===void 0&&(u=o);var c={placement:"bottom",orderedModifiers:[],options:Object.assign({},rd,o),modifiersData:{},elements:{reference:s,popper:l},attributes:{},styles:{}},p=[],m=!1,f={state:c,setOptions:function(b){var O=typeof b=="function"?b(c.options):b;h(),c.options=Object.assign({},o,c.options,O),c.scrollParents={reference:wt(s)?bn(s):s.contextElement?bn(s.contextElement):[],popper:bn(l)};var S=mu(du([].concat(r,c.options.modifiers)));if(c.orderedModifiers=S.filter(function(H){return H.enabled}),!1){var E;if(getBasePlacement(c.options.placement)===auto)var I;var k,_,M,z,q}return d(),f.update()},forceUpdate:function(){if(!m){var b=c.elements,O=b.reference,S=b.popper;if(!!id(O,S)){c.rects={reference:pu(O,Lt(S),c.options.strategy==="fixed"),popper:Kn(S)},c.reset=!1,c.placement=c.options.placement,c.orderedModifiers.forEach(function(H){return c.modifiersData[H.name]=Object.assign({},H.data)});for(var E=0,I=0;I<c.orderedModifiers.length;I++){if(c.reset===!0){c.reset=!1,I=-1;continue}var k=c.orderedModifiers[I],_=k.fn,M=k.options,z=M===void 0?{}:M,q=k.name;typeof _=="function"&&(c=_({state:c,options:z,name:q,instance:f})||c)}}}},update:fu(function(){return new Promise(function(g){f.forceUpdate(),g(c)})}),destroy:function(){h(),m=!0}};if(!id(s,l))return f;f.setOptions(u).then(function(g){!m&&u.onFirstUpdate&&u.onFirstUpdate(g)});function d(){c.orderedModifiers.forEach(function(g){var b=g.name,O=g.options,S=O===void 0?{}:O,E=g.effect;if(typeof E=="function"){var I=E({state:c,name:b,instance:f,options:S}),k=function(){};p.push(I||k)}})}function h(){p.forEach(function(g){return g()}),p=[]}return f}}var fx=[Uf,td,Wf,Yf,ed,Zf,nd,Vf,Jf],hu=od({defaultModifiers:fx});var dx=(e,t)=>(e%t+t)%t,gu=class{constructor(t,n,r){this.owner=t,this.containerEl=n,n.on("click",".suggestion-item",this.onSuggestionClick.bind(this)),n.on("mousemove",".suggestion-item",this.onSuggestionMouseover.bind(this)),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=dx(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.scrollIntoView(!1)}},Na=class{constructor(t,n){this.app=t,this.inputEl=n,this.scope=new ad.Scope,this.suggestEl=createDiv("suggestion-container");let r=this.suggestEl.createDiv("suggestion");this.suggest=new gu(this,r,this.scope),this.scope.register([],"Escape",this.close.bind(this)),this.inputEl.addEventListener("input",this.onInputChanged.bind(this)),this.inputEl.addEventListener("focus",this.onInputChanged.bind(this)),this.inputEl.addEventListener("blur",this.close.bind(this)),this.suggestEl.on("mousedown",".suggestion-container",i=>{i.preventDefault()})}onInputChanged(){let t=this.inputEl.value,n=this.getSuggestions(t);if(!n){this.close();return}n.length>0?(this.suggest.setSuggestions(n),this.open(this.app.dom.appContainerEl,this.inputEl)):this.close()}open(t,n){this.app.keymap.pushScope(this.scope),t.appendChild(this.suggestEl),this.popper=hu(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&&this.popper.destroy(),this.suggestEl.detach()}};var Xi=class extends Na{constructor(n,r,i=[]){super(n,r);this.app=n;this.inputEl=r;this.valuesToExclude=i}getSuggestions(n){let r=this.app.commands.listCommands();if(!r)return[];let i=r.filter(s=>{for(let l of this.valuesToExclude)if(l.id==s.id&&!(this.inputEl.hasAttribute("commandId")&&this.inputEl.getAttribute("commandId")==s.id))return!1;return!0}),o=[],a=n.toLowerCase();return i.forEach(s=>{(s.id.contains(a)||s.name.toLowerCase().contains(a))&&o.push(s)}),o}renderSuggestion(n,r){r.setText(n.name)}selectSuggestion(n){this.inputEl.value=n.name,this.inputEl.setAttribute("commandId",n.id),this.inputEl.trigger("input"),this.close()}};var hx={General:Qe.general.id,Custom:Qe.custom.id,YAML:Qe.yaml.id,Heading:Qe.heading.id,Footnote:Qe.footer.id,Content:Qe.content.id,Spacing:Qe.whitespace.id},za=class extends Ne.PluginSettingTab{constructor(n,r){super(n,r);this.tabContent=new Map;this.selectedTab="General";this.searchSettingInfo=new Map;this.plugin=r}display(){let{containerEl:n}=this;n.empty(),this.generateSettingsTitle(n,Ne.Platform.isMobile);let i=n.createEl("nav",{cls:"linter-setting-header"}).createDiv("linter-setting-tab-group"),o=n.createDiv("linter-setting-content");this.createTabAndContent("General",i,o,(l,u)=>this.generateGeneralSettings(u,l));let a="",s="";for(let l of Nt)l.type!==a&&(s=l.type,this.createTabAndContent(s,i,o),a=l.type),this.addRuleToTab(s,l);this.createTabAndContent("Custom",i,o,(l,u)=>this.generateCustomCommandSettings(u,l)),this.createSearchZeroState(o)}createTabAndContent(n,r,i,o){let a=this.selectedTab===n,s=r.createDiv("linter-navigation-item"),l="linter-desktop";Ne.Platform.isMobile&&(l="linter-mobile"),s.addClass(l),(0,Ne.setIcon)(s.createSpan({cls:"linter-navigation-item-icon"}),hx[n],20),s.createSpan().setText(n),s.onclick=()=>{if(this.selectedTab==n)return;s.addClass("linter-navigation-item-selected");let p=this.tabContent.get(n);if(this.unhideEl(p.content),this.selectedTab!=""){let m=this.tabContent.get(this.selectedTab);m.navButton.removeClass("linter-navigation-item-selected"),this.hideEl(m.content)}else{this.hideEl(this.searchZeroState);for(let m of this.searchSettingInfo)for(let f of m[1])this.unhideEl(f.containerEl);for(let m of this.tabContent){let f=m[1];this.hideEl(f.heading),n!==m[0]&&this.hideEl(f.content)}}this.selectedTab=n};let u=i.createDiv("linter-tab-settings"),c=u.createEl("h2",{text:n+" Settings"});this.hideEl(c),u.id=n.toLowerCase().replace(" ","-"),a?s.addClass("linter-navigation-item-selected"):this.hideEl(u),o&&o(u,n),this.tabContent.set(n,{content:u,heading:c,navButton:s})}addRuleToTab(n,r){let i=this.tabContent.get(n).content;if(i==null)return;let o=i.createDiv();o.id=r.alias(),o.createEl(Ne.Platform.isMobile?"h4":"h3",{},s=>{s.innerHTML=`<a href="${r.getURL()}">${r.name}</a>`});let a=[];for(let s of r.options)s.display(o,this.plugin.settings,this.plugin),a.push(s.searchInfo);this.addSettingToMasterSettingsList(n,o,r.name.toLowerCase(),r.description.toLowerCase(),a,o.id)}generateCustomCommandSettings(n,r){r.createEl(Ne.Platform.isMobile?"h4":"h3",{text:"Custom Commands"});let i=`Custom commands are Obsidian commands that get run after the linter is finished running its regular rules.
This means that they do not run before the YAML timestamp logic runs, so they can cause YAML timestamp to be triggered on the next run of the linter.
You may only select an Obsidian command once. **_Note that this currently only works on linting the current file._**`,o=`When selecting an option, make sure to select the option either by using the mouse or by hitting the enter key.
Other selection methods may not work and only selections of an actual Obsidian command or an empty string will be saved.`;this.addSettingToMasterSettingsList(n,r,n.toLowerCase(),i.replaceAll(`
`," ")+o.replaceAll(`
`," ")),r.createEl("p").innerHTML=ct(i),r.createEl("p",{text:o}).style.color="#EED202";function a(s,l,u){if(u<0||u===s.length)return;let c=s[l];s[l]=s[u],s[u]=c}new Ne.Setting(r).addButton(s=>{s.setButtonText("Add new command").setCta().onClick(()=>{this.plugin.settings.lintCommands.push({id:"",name:""}),this.plugin.saveSettings(),this.display();let l=document.getElementsByClassName("linter-custom-command");l[l.length-1].focus()})}),this.plugin.settings.lintCommands.forEach((s,l)=>{new Ne.Setting(r).addSearch(u=>{new Xi(this.app,u.inputEl,this.plugin.settings.lintCommands),u.setPlaceholder("Obsidian command").setValue(s.name).onChange(c=>{let p={id:u.inputEl.getAttribute("commandId"),name:c};p.name&&p.id?(this.plugin.settings.lintCommands[l]=p,this.plugin.saveSettings()):!p.name&&!p.id&&(this.plugin.settings.lintCommands[l]=p,this.plugin.saveSettings())}),u.inputEl.setAttr("tabIndex",l),u.inputEl.addClass("linter-custom-command")}).addExtraButton(u=>{u.setIcon("up-chevron-glyph").setTooltip("Move up").onClick(()=>{a(this.plugin.settings.lintCommands,l,l-1),this.plugin.saveSettings(),this.display()})}).addExtraButton(u=>{u.setIcon("down-chevron-glyph").setTooltip("Move down").onClick(()=>{a(this.plugin.settings.lintCommands,l,l+1),this.plugin.saveSettings(),this.display()})}).addExtraButton(u=>{u.setIcon("cross").setTooltip("Delete").onClick(()=>{this.plugin.settings.lintCommands.splice(l,1),this.plugin.saveSettings(),this.display()})})})}generateGeneralSettings(n,r){var u;let i=r.createDiv(),o="Lint on save",a="Lint the file on manual save (when `Ctrl + S` is pressed or when `:w` is executed while using vim keybindings)",s=new Ne.Setting(i).setName(o).addToggle(c=>{c.setValue(this.plugin.settings.lintOnSave).onChange(async p=>{this.plugin.settings.lintOnSave=p,await this.plugin.saveSettings()})});s.descEl.innerHTML=ct(a),this.addSettingToMasterSettingsList(n,i,o,a),i=r.createDiv(),o="Display message on lint",a="Display the number of characters changed after linting",new Ne.Setting(i).setName(o).setDesc(a).addToggle(c=>{c.setValue(this.plugin.settings.displayChanged).onChange(async p=>{this.plugin.settings.displayChanged=p,await this.plugin.saveSettings()})}),this.addSettingToMasterSettingsList(n,i,o,a),i=r.createDiv(),o="Folders to ignore",a="Folders to ignore when linting all files or linting on save. Enter folder paths separated by newlines",new Ne.Setting(i).setName(o).setDesc(a).addTextArea(c=>{c.setValue(this.plugin.settings.foldersToIgnore.join(`
`)).onChange(async p=>{this.plugin.settings.foldersToIgnore=p.split(`
`),await this.plugin.saveSettings()})}),this.addSettingToMasterSettingsList(n,i,o,a);let l=(u=navigator.language)==null?void 0:u.toLowerCase();i=r.createDiv(),o="Override locale",a="Set this if you want to use a locale different from the default",new Ne.Setting(i).setName(o).setDesc(a).addDropdown(c=>{c.addOption("system-default",`Same as system (${l})`),sd.moment.locales().forEach(p=>{c.addOption(p,p)}),c.setValue(this.plugin.settings.linterLocale),c.onChange(async p=>{this.plugin.settings.linterLocale=p,await this.plugin.setOrUpdateMomentInstance(),await this.plugin.saveSettings()})}),this.addSettingToMasterSettingsList(n,i,o,a)}generateSearchBar(n){let r=new Ne.Setting(n);r.settingEl.style.border="none",r.addSearch(i=>{this.search=i}),this.search.setPlaceholder("Search all settings"),this.search.inputEl.onfocus=()=>{for(let i of this.tabContent){let o=i[1];o.navButton.removeClass("linter-navigation-item-selected"),this.unhideEl(o.content),this.unhideEl(o.heading);let a=this.search.getValue();this.selectedTab==""&&a.trim()!=""&&this.searchSettings(a.toLowerCase()),this.selectedTab=""}},this.search.onChange(i=>{this.searchSettings(i.toLowerCase())})}generateSettingsTitle(n,r){let i=n.createDiv("linter-setting-title");r?i.addClass("linter-mobile"):i.createEl("h1").setText("Linter"),this.generateSearchBar(i)}searchSettings(n){var a;let r=new Set,i=this,o=function(s,l){i.unhideEl(s),r.has(l)||r.add(l)};for(let s of this.searchSettingInfo){let l=s[0],u=s[1];for(let c of u)if(n.trim()===""||((a=c.alias)==null?void 0:a.includes(n))||c.description.includes(n)||c.name.includes(n))o(c.containerEl,l);else if(c.options)for(let p of c.options){if(p.description.toLowerCase().includes(n)||p.name.toLowerCase().includes(n)){o(c.containerEl,l);break}else if(p.options){for(let m of p.options)if(m.description.toLowerCase().includes(n)||m.value.toLowerCase().includes(n)){o(c.containerEl,l);break}}this.hideEl(c.containerEl)}else this.hideEl(c.containerEl)}for(let s of this.tabContent)r.has(s[0])?this.unhideEl(s[1].heading):this.hideEl(s[1].heading);r.size===0?this.unhideEl(this.searchZeroState):this.hideEl(this.searchZeroState)}createSearchZeroState(n){this.searchZeroState=n.createDiv(),this.hideEl(this.searchZeroState),this.searchZeroState.createEl(Ne.Platform.isMobile?"h3":"h2",{text:"No settings match search"}).style.textAlign="center"}addSettingToMasterSettingsList(n,r,i="",o="",a=null,s=null){let l={containerEl:r,name:i.toLowerCase(),description:o.toLowerCase(),options:a,alias:s};this.searchSettingInfo.has(n)?this.searchSettingInfo.get(n).push(l):this.searchSettingInfo.set(n,[l])}hideEl(n){n.addClass("linter-visually-hidden")}unhideEl(n){n.removeClass("linter-visually-hidden")}};var gx={en:"en-gb",zh:"zh-cn","zh-TW":"zh-tw",ru:"ru",ko:"ko",it:"it",id:"id",ro:"ro","pt-BR":"pt-br",cz:"cs",da:"da",de:"de",es:"es",fr:"fr",no:"nn",pl:"pl",pt:"pt",tr:"tr",hi:"hi",nl:"nl",ar:"ar",ja:"ja"},Ha=class extends xe.Plugin{constructor(){super(...arguments);this.isEnabled=!0;this.rulesRunner=new _a}async onload(){var o,a;ni("Loading plugin"),this.isEnabled=!0;for(let s in Qe){let l=Qe[s];(0,xe.addIcon)(l.id,l.source)}await this.loadSettings(),this.addCommand({id:"lint-file",name:"Lint the current file",editorCallback:s=>this.runLinterEditor(s),icon:Qe.file.id,hotkeys:[{modifiers:["Mod","Alt"],key:"l"}]}),this.addCommand({id:"lint-all-files",name:"Lint all files in the vault",icon:Qe.vault.id,callback:()=>{let s="This will edit all of your files and may introduce errors.",l="Lint All",u="Linting all files...";new Vi(this.app,s,l,u,()=>this.runLinterAllFiles(this.app)).open()}}),this.addCommand({id:"lint-all-files-in-folder",name:"Lint all files in the current folder",icon:Qe.folder.id,editorCheckCallback:(s,l)=>{if(s)return!this.app.workspace.getActiveFile().parent.isRoot();this.createFolderLintModal(this.app.workspace.getActiveFile().parent)}}),this.registerEvent(this.app.workspace.on("file-menu",(s,l)=>{l instanceof xe.TFolder&&s.addItem(u=>{u.setTitle("Lint folder").setIcon(Qe.folder.id).onClick(()=>this.createFolderLintModal(l))})})),this.eventRef=this.app.workspace.on("file-menu",(s,l,u)=>this.onMenuOpenCallback(s,l,u)),this.registerEvent(this.eventRef);let n=(a=(o=this.app.commands)==null?void 0:o.commands)==null?void 0:a["editor:save-file"];typeof(n==null?void 0:n.callback)=="function"&&(n.callback=()=>{if(this.settings.lintOnSave&&this.isEnabled){let s=this.app.workspace.getActiveViewOfType(xe.MarkdownView).editor,l=this.app.workspace.getActiveFile();this.shouldIgnoreFile(l)||this.runLinterEditor(s)}});let i=this;window.CodeMirrorAdapter.commands.save=()=>{i.app.commands.executeCommandById("editor:save-file")},this.addSettingTab(new za(this.app,this))}async onunload(){ni("Unloading plugin"),this.isEnabled=!1,this.app.workspace.offref(this.eventRef)}async loadSettings(){this.settings={ruleConfigs:{},lintOnSave:!1,displayChanged:!0,foldersToIgnore:[],linterLocale:"system-default",logLevel:ld.default.levels.ERROR,lintCommands:[]};let r=await this.loadData()||{};for(let i of Nt)if(this.settings.ruleConfigs[i.name]=i.getDefaultOptions(),(r==null?void 0:r.ruleConfigs)&&(r==null?void 0:r.ruleConfigs[i.name])&&(Object.assign(this.settings.ruleConfigs[i.name],r.ruleConfigs[i.name]),r.ruleConfigs[i.name].Enabled!==void 0)){let o=i.enabledOptionName();this.settings.ruleConfigs[i.name][o]=r.ruleConfigs[i.name].Enabled,delete this.settings.ruleConfigs[i.name].Enabled}Object.prototype.hasOwnProperty.call(r,"lintOnSave")&&(this.settings.lintOnSave=r.lintOnSave),Object.prototype.hasOwnProperty.call(r,"displayChanged")&&(this.settings.displayChanged=r.displayChanged),Object.prototype.hasOwnProperty.call(r,"foldersToIgnore")&&(this.settings.foldersToIgnore=r.foldersToIgnore),Object.prototype.hasOwnProperty.call(r,"linterLocale")&&(this.settings.linterLocale=r.linterLocale),Object.prototype.hasOwnProperty.call(r,"logLevel")&&(this.settings.logLevel=r.logLevel),Object.prototype.hasOwnProperty.call(r,"lintCommands")&&(this.settings.lintCommands=r.lintCommands),Rf(this.settings.logLevel),this.setOrUpdateMomentInstance()}async saveSettings(){await this.saveData(this.settings)}onMenuOpenCallback(n,r,i){r instanceof xe.TFile&&r.extension==="md"&&n.addItem(o=>{o.setIcon(Qe.file.id),o.setTitle("Lint file"),o.onClick(async a=>{this.runLinterFile(r)})})}shouldIgnoreFile(n){for(let r of this.settings.foldersToIgnore)if(r.length>0&&n.path.startsWith(r))return!0;return!1}async runLinterFile(n){let r=gc(await this.app.vault.read(n)),i=this.rulesRunner.lintText(tu(r,n,this.momentLocale,this.settings));await this.app.vault.modify(n,i)}async runLinterAllFiles(n){let r=0;await Promise.all(n.vault.getMarkdownFiles().map(async o=>{if(!this.shouldIgnoreFile(o))try{await this.runLinterFile(o)}catch(a){this.handleLintError(o,a,"Lint All Files Error in File '${file.path}'"),r+=1}}));let i=0;if(r===0)new xe.Notice("Linted all files",i);else{let o=r===1?"was 1 error":"were "+r+" errors";new xe.Notice("Linted all files and there "+o+".",i)}}async runLinterAllFilesInFolder(n){ni("Linting folder "+n.name);let r=0,i=0,o=(0,xe.normalizePath)(n.path)+"/";await Promise.all(this.app.vault.getMarkdownFiles().map(async s=>{if((0,xe.normalizePath)(s.path).startsWith(o)&&!this.shouldIgnoreFile(s)){try{await this.runLinterFile(s)}catch(l){this.handleLintError(s,l,"Lint All Files in Folder Error in File '${file.path}'"),r+=1}i++}}));let a=0;if(r===0)new xe.Notice("Linted all "+i+" files in "+n.name+".",a);else{let s=r===1?"was 1 error":"were "+r+" errors";new xe.Notice("Linted all "+i+" files in "+n.name+" and there "+s+".",a)}}createFolderLintModal(n){let r="This will edit all of your files in "+n.name+" including files in its subfolders which may introduce errors.",i="Lint All Files in "+n.name,o="Linting all files in "+n.name+"...";new Vi(this.app,r,i,o,()=>this.runLinterAllFilesInFolder(n)).open()}runLinterEditor(n){ni("Running linter");let r=this.app.workspace.getActiveFile(),i=n.getValue(),o;try{o=this.rulesRunner.lintText(tu(i,r,this.momentLocale,this.settings))}catch(p){this.handleLintError(r,p,"Lint File Error in File '${file.path}'",!1)}let s=new Tr.default.diff_match_patch().diff_main(i,o),l="";s.forEach(p=>{function m(h){let g=h.split(`
`);return{line:g.length-1,ch:g[g.length-1].length}}let[f,d]=p;if(f==Tr.default.DIFF_INSERT)n.replaceRange(d,m(l)),l+=d;else if(f==Tr.default.DIFF_DELETE){let h=m(l),g=l;g+=d;let b=m(g);n.replaceRange("",h,b)}else l+=d});let u=s.map(p=>p[0]==Tr.default.DIFF_INSERT?p[1].length:0).reduce((p,m)=>p+m,0),c=s.map(p=>p[0]==Tr.default.DIFF_DELETE?p[1].length:0).reduce((p,m)=>p+m,0);this.displayChangedMessage(u,c);try{this.rulesRunner.runCustomCommands(this.settings.lintCommands,this.app.commands)}catch(p){this.handleLintError(r,p,"Lint File Error in File '${file.path}'",!1)}}async setOrUpdateMomentInstance(){var s;let n=localStorage.getItem("language")||"en",r=(s=navigator.language)==null?void 0:s.toLowerCase(),i=gx[n];this.settings.linterLocale!=="system-default"?i=this.settings.linterLocale:r.startsWith(n)&&(i=r),this.momentLocale=i;let o=$a.moment.locale(),a=$a.moment.locale(i);mn(`Trying to switch Moment.js locale to ${i}, got ${a}`),$a.moment.locale(o)}displayChangedMessage(n,r){if(this.settings.displayChanged){let i=y`
${n} characters added
${r} characters removed
`;new xe.Notice(i)}}handleLintError(n,r,i,o=!0){let a=i.replace("${file.path}",n.path);r instanceof pn?o?new xe.Notice(`${a} ${r.message}.
See console for more details.`):new xe.Notice(`${r.message}.
See console for more details.`):new xe.Notice("An unknown error occurred during linting. See console for details"),Bf(a,r)}};
/*!
* Determine if an object is a Buffer
*
* @author Feross Aboukhadijeh <https://feross.org>
* @license MIT
*/
/*! js-yaml 4.1.0 https://github.com/nodeca/js-yaml @license MIT */