varNm=Object.create;var$n=Object.defineProperty;varYc=Object.getOwnPropertyDescriptor;varjm=Object.getOwnPropertyNames;varYm=Object.getPrototypeOf,Pm=Object.prototype.hasOwnProperty;varmn=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Pc=(e,t)=>{for(variint)$n(e,i,{get:t[i],enumerable:!0})},Hc=(e,t,i,n)=>{if(t&&typeoft=="object"||typeoft=="function")for(letrofjm(t))!Pm.call(e,r)&&r!==i&&$n(e,r,{get:()=>t[r],enumerable:!(n=Yc(t,r))||n.enumerable});returne};vargn=(e,t,i)=>(i=e!=null?Nm(Ym(e)):{},Hc(t||!e||!e.__esModule?$n(i,"default",{value:e,enumerable:!0}):i,e)),Hm=e=>Hc($n({},"__esModule",{value:!0}),e),z=(e,t,i,n)=>{for(varr=n>1?void0:n?Yc(t,i):t,a=e.length-1,s;a>=0;a--)(s=e[a])&&(r=(n?s(t,i,r):s(r))||r);returnn&&r&&$n(t,i,r),r};varKo=(e,t,i)=>{if(!t.has(e))throwTypeError("Cannot "+i)};var_=(e,t,i)=>(Ko(e,t,"read from private field"),i?i.call(e):t.get(e)),ke=(e,t,i)=>{if(t.has(e))throwTypeError("Cannot add the same private member more than once");tinstanceofWeakSet?t.add(e):t.set(e,i)},Me=(e,t,i,n)=>(Ko(e,t,"write to private field"),n?n.call(e,i):t.set(e,i),i);var_o=(e,t,i,n)=>({set_(r){Me(e,t,r,i)},get_(){return_(e,t,n)}}),me=(e,t,i)=>(Ko(e,t,"access private method"),i);varZa=mn((Bd,Qa)=>{(function(e,t){"use strict";typeofdefine=="function"&&define.amd?define(t):typeofQa=="object"&&Qa.exports?Qa.exports=t():e.log=t()})(Bd,function(){"use strict";vare=function(){},t="undefined",i=typeofwindow!==t&&typeofwindow.navigator!==t&&/Trident\/|MSIE /.test(window.navigator.userAgent),n=["trace","debug","info","warn","error"],r={},a=null;functions(g,b){varf=g[b];if(typeoff.bind=="function")returnf.bind(g);try{returnFunction.prototype.bind.call(f,g)}catch{returnfunction(){returnFunction.prototype.apply.apply(f,[g,arguments])}}}functiono(){console.log&&(console.log.apply?console.log.apply(console,arguments):Function.prototype.apply.apply(console.log,[console,arguments])),console.trace&&console.trace()}functionl(g){returng==="debug"&&(g="log"),typeofconsole===t?!1:g==="trace"&&i?o:console[g]!==void0?s(console,g):console.log!==void0?s(console,"log"):e}functionc(){for(varg=this.getLevel(),b=0;b<n.length;b++){varf=n[b];this[f]=b<g?e:this.methodFactory(f,g,this.name)}if(this.log=this.debug,typeofconsole===t&&g<this.levels.SILENT)return"No console available for logging"}functiond(g){returnfunction(){typeofconsole!==t&&(c.call(this),this[g].apply(this,arguments))}}functionu(g,b,f){returnl(g)||d.apply(this,arguments)}functionm(g,b){varf=this,x,k,L,E="loglevel";typeofg=="string"?E+=":"+g:typeofg=="symbol"&&(E=void0);functionO(D){varU=(n[D]||"silent").toUpperCase();if(!(typeofwindow===t||!E)){try{window.localStorage[E]=U;return}catch{}try{window.document.cookie=encodeURIComponent(E)+"="+U+";"}catch{}}}functionS(){varD;if(!(typeofwindow===t||!E)){try{D=window.localStorage[E]}catch{}if(typeofD===t)try{varU=window.document.cookie,$=encodeURIComponent(E),F=U.indexOf($+"=");F!==-1&&(D=/^([^;]+)/.exec(U.slice(F+$.length+1))[1])}catch{}returnf.levels[D]===void0&&(D=void0),D}}functionI(){if(!(typeofwindow===t||!E)){try{window.localStorage.removeItem(E)}catch{}try{window.document.cookie=encodeURIComponent(E)+"=; expires=Thu, 01 Jan 1970 00:00:00 UTC"}catch{}}}functionK(D){varU=D;if(typeofU=="string"&&f.levels[U.toUpperCase()]!==void0&&(U=f.levels[U.toUpperCase()]),typeofU=="number"&&U>=0&&U<=f.levels.SILENT)returnU;thrownewTypeError("log.setLevel() called with invalid level: "+D)}f.name=g,f.levels={TRACE:0,DEBUG:1,INFO:2,WARN:3,ERROR:4,SILENT:5},f.methodFactory=b||u,f.getLevel=function(){returnL??k??x},f.setLevel=function(D,U){returnL=K(D),U!==!1&&O(L),c.call(f)},f.setDefaultLevel=function(D){k=K(D),S()||f.setLevel(D,!1)},f.resetLevel=function(){L=null,I(),c.call(f)},f.enableAll=function(D){f.setLevel(f.levels.TRACE,D)},f.disableAll=function(D){f.setLevel(f.levels.SILENT,D)},f.rebuild=function(){if(a!==f&&(x=K(a.getLevel())),c.call(f),a===f)for(varDinr)r[D].rebuild()},x=K(a?a.getLevel():"WARN");varB=S();B!=null&&(L=K(B)),c.call(f)}a=newm,a.getLogger=f
`;return o.replace(/\n$/,"")}var ng=tg,rg=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],ag=["scalar","sequence","mapping"];function sg(e){var t={};return e!==null&&Object.keys(e).forEach(function(i){e[i].forEach(function(n){t[String(n)]=i})}),t}function og(e,t){if(t=t||{},Object.keys(t).forEach(function(i){if(rg.indexOf(i)===-1)throw new We('Unknown option "'+i+'" 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(i){return i},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=sg(t.styleAliases||null),ag.indexOf(this.kind)===-1)throw new We('Unknown kind "'+this.kind+'" is specified for "'+e+'" YAML type.')}var Ne=og;function Uc(e,t){var i=[];return e[t].forEach(function(n){var r=i.length;i.forEach(function(a,s){a.tag===n.tag&&a.kind===n.kind&&a.multi===n.multi&&(r=s)}),i[r]=n}),i}function lg(){var e={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}},t,i;function n(r){r.multi?(e.multi[r.kind].push(r),e.multi.fallback.push(r)):e[r.kind][r.tag]=e.fallback[r.tag]=r}for(t=0,i=arguments.length;t<i;t+=1)arguments[t].forEach(n);return e}function Po(e){return this.extend(e)}Po.prototype.extend=function(t){var i=[],n=[];if(t instanceof Ne)n.push(t);else if(Array.isArray(t))n=n.concat(t);else if(t&&(Array.isArray(t.implicit)||Array.isArray(t.explicit)))t.implicit&&(i=i.concat(t.implicit)),t.explicit&&(n=n.concat(t.explicit));else throw new We("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");i.forEach(function(a){if(!(a instanceof Ne))throw new We("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(a.loadKind&&a.loadKind!=="scalar")throw new We("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");if(a.multi)throw new We("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.")}),n.forEach(function(a){if(!(a instanceof Ne))throw new We("Specified list of YAML types (or a single Type object) contains a non-Type object.")});var r=Object.create(Po.prototype);return r.implicit=(this.implicit||[]).concat(i),r.explicit=(this.explicit||[]).concat(n),r.compiledImplicit=Uc(r,"implicit"),r.compiledExplicit=Uc(r,"explicit"),r.compiledTypeMap=lg(r.compiledImplicit,r.compiledExplicit),r};var cg=Po,dg=new Ne("tag:yaml.org,2002:str",{kind:"scalar",construct:function(e){return e!==null?e:""}}),ug=new Ne("tag:yaml.org,2002:seq",{kind:"sequence",construct:function(e){return e!==null?e:[]}}),pg=new Ne("tag:yaml.org,2002:map",{kind:"mapping",construct:function(e){return e!==null?e:{}}}),mg=new cg({explicit:[dg,ug,pg]});function gg(e){if(e===null)return!0;var t=e.length;return t===1&&e==="~"||t===4&&(e==="null"||e==="Null"||e==="NULL")}function hg(){return null}function fg(e){return e===null}var yg=new Ne("tag:yaml.org,2002:null",{kind:"scalar",resolve:gg,construct:hg,predicate:fg,represent:{canonical:function(){return"~"},lowercase:function(){return"null"},uppercase:function(){return"NULL"},camelcase:function(){return"Null"},empty:function(){return""}},defaultStyle:"lowercase"});function bg(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 vg(e){return e==="true"||e==="True"||e==="TRUE"}function xg(e){return Object.prototype.toString.call(e)==="[object Boolean]"}var wg=new Ne("tag:yaml.org,2002:bool",{kind:"scalar",resolve:bg,construct:vg,predicate:xg,represent:{lowercase:function(e){return e?"true":"false"},uppercase:function(e){return e?"TRUE":"FALSE"},camelcase:function(e){return e?"True":"False"}},defaultStyle:"lowercase"});functio
`: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 hh(e){return e<=65535?String.fromCharCode(e):String.fromCharCode((e-65536>>10)+55296,(e-65536&1023)+56320)}var hd=new Array(256),fd=new Array(256);for(wt=0;wt<256;wt++)hd[wt]=$c(wt)?1:0,fd[wt]=$c(wt);var wt;function fh(e,t){this.input=e,this.filename=t.filename||null,this.schema=t.schema||dd,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 yd(e,t){var i={name:e.filename,buffer:e.input.slice(0,-1),position:e.position,line:e.line,column:e.position-e.lineStart};return i.snippet=ng(i),new We(t,i)}function N(e,t){throw yd(e,t)}function Wa(e,t){e.onWarning&&e.onWarning.call(null,yd(e,t))}var Gc={YAML:function(t,i,n){var r,a,s;t.version!==null&&N(t,"duplication of %YAML directive"),n.length!==1&&N(t,"YAML directive accepts exactly one argument"),r=/^([0-9]+)\.([0-9]+)$/.exec(n[0]),r===null&&N(t,"ill-formed argument of the YAML directive"),a=parseInt(r[1],10),s=parseInt(r[2],10),a!==1&&N(t,"unacceptable YAML version of the document"),t.version=n[0],t.checkLineBreaks=s<2,s!==1&&s!==2&&Wa(t,"unsupported YAML version of the document")},TAG:function(t,i,n){var r,a;n.length!==2&&N(t,"TAG directive accepts exactly two arguments"),r=n[0],a=n[1],md.test(r)||N(t,"ill-formed tag handle (first argument) of the TAG directive"),Zi.call(t.tagMap,r)&&N(t,'there is a previously declared suffix for "'+r+'" tag handle'),gd.test(a)||N(t,"ill-formed tag prefix (second argument) of the TAG directive");try{a=decodeURIComponent(a)}catch{N(t,"tag prefix is malformed: "+a)}t.tagMap[r]=a}};function Qi(e,t,i,n){var r,a,s,o;if(t<i){if(o=e.input.slice(t,i),n)for(r=0,a=o.length;r<a;r+=1)s=o.charCodeAt(r),s===9||32<=s&&s<=1114111||N(e,"expected valid JSON character");else ch.test(o)&&N(e,"the stream contains non-printable characters");e.result+=o}}function Qc(e,t,i,n){var r,a,s,o;for(Se.isObject(i)||N(e,"cannot merge mappings; the provided source object is unacceptable"),r=Object.keys(i),s=0,o=r.length;s<o;s+=1)a=r[s],Zi.call(t,a)||(t[a]=i[a],n[a]=!0)}function yn(e,t,i,n,r,a,s,o,l){var c,d;if(Array.isArray(r))for(r=Array.prototype.slice.call(r),c=0,d=r.length;c<d;c+=1)Array.isArray(r[c])&&N(e,"nested arrays are not supported inside keys"),typeof r=="object"&&Vc(r[c])==="[object Object]"&&(r[c]="[object Object]");if(typeof r=="object"&&Vc(r)==="[object Object]"&&(r="[object Object]"),r=String(r),t===null&&(t={}),n==="tag:yaml.org,2002:merge")if(Array.isArray(a))for(c=0,d=a.length;c<d;c+=1)Qc(e,t,a[c],i);else Qc(e,t,a,i);else!e.json&&!Zi.call(i,r)&&Zi.call(t,r)&&(e.line=s||e.line,e.lineStart=o||e.lineStart,e.position=l||e.position,N(e,"duplicated mapping key")),r==="__proto__"?Object.defineProperty(t,r,{configurable:!0,enumerable:!0,writable:!0,value:a}):t[r]=a,delete i[r];return t}function Go(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++):N(e,"a line break is expected"),e.line+=1,e.lineStart=e.position,e.firstTabInLine=-1}function ze(e,t,i){for(var n=0,r=e.input.charCodeAt(e.position);r!==0;){for(;kt(r);)r===9&&e.firstTabInLine===-1&&(e.firstTabInLine=e.position),r=e.input.charCodeAt(++e.position);if(t&&r===35)do r=e.input.charCodeAt(++e.position);while(r!==10&&r!==13&&r!==0);if(Ti(r))for(Go(e),r=e.input.charCodeAt(e.position),n++,e.lineIndent=0;r===32;)e.lineIndent++,r=e.input.charCodeAt(++e.position);else break}return i!==-1&&n!==0&&e.lineIndent<i&&Wa(e,"deficient indentation"),n}function Ga(e){var t=e.position,i;return i=e.input.charCodeAt(t),!!((i===45||i===46)&&i===e.input.charCodeAt(t+1)&&i===e.input.charCodeAt(t+2)&&(t+=3,i=e.input.charCodeAt(t),i===0||Xe(i)))}function Qo(e,t){t===1?e.result+=" ":t>1&&(e.result+=Se.rep
`,t-1))}function yh(e,t,i){var n,r,a,s,o,l,c,d,u=e.kind,m=e.result,p;if(p=e.input.charCodeAt(e.position),Xe(p)||fn(p)||p===35||p===38||p===42||p===33||p===124||p===62||p===39||p===34||p===37||p===64||p===96||(p===63||p===45)&&(r=e.input.charCodeAt(e.position+1),Xe(r)||i&&fn(r)))return!1;for(e.kind="scalar",e.result="",a=s=e.position,o=!1;p!==0;){if(p===58){if(r=e.input.charCodeAt(e.position+1),Xe(r)||i&&fn(r))break}else if(p===35){if(n=e.input.charCodeAt(e.position-1),Xe(n))break}else{if(e.position===e.lineStart&&Ga(e)||i&&fn(p))break;if(Ti(p))if(l=e.line,c=e.lineStart,d=e.lineIndent,ze(e,!1,-1),e.lineIndent>=t){o=!0,p=e.input.charCodeAt(e.position);continue}else{e.position=s,e.line=l,e.lineStart=c,e.lineIndent=d;break}}o&&(Qi(e,a,s,!1),Qo(e,e.line-l),a=s=e.position,o=!1),kt(p)||(s=e.position+1),p=e.input.charCodeAt(++e.position)}return Qi(e,a,s,!1),e.result?!0:(e.kind=u,e.result=m,!1)}function bh(e,t){var i,n,r;if(i=e.input.charCodeAt(e.position),i!==39)return!1;for(e.kind="scalar",e.result="",e.position++,n=r=e.position;(i=e.input.charCodeAt(e.position))!==0;)if(i===39)if(Qi(e,n,e.position,!0),i=e.input.charCodeAt(++e.position),i===39)n=e.position,e.position++,r=e.position;else return!0;else Ti(i)?(Qi(e,n,r,!0),Qo(e,ze(e,!1,t)),n=r=e.position):e.position===e.lineStart&&Ga(e)?N(e,"unexpected end of the document within a single quoted scalar"):(e.position++,r=e.position);N(e,"unexpected end of the stream within a single quoted scalar")}function vh(e,t){var i,n,r,a,s,o;if(o=e.input.charCodeAt(e.position),o!==34)return!1;for(e.kind="scalar",e.result="",e.position++,i=n=e.position;(o=e.input.charCodeAt(e.position))!==0;){if(o===34)return Qi(e,i,e.position,!0),e.position++,!0;if(o===92){if(Qi(e,i,e.position,!0),o=e.input.charCodeAt(++e.position),Ti(o))ze(e,!1,t);else if(o<256&&hd[o])e.result+=fd[o],e.position++;else if((s=mh(o))>0){for(r=s,a=0;r>0;r--)o=e.input.charCodeAt(++e.position),(s=ph(o))>=0?a=(a<<4)+s:N(e,"expected hexadecimal character");e.result+=hh(a),e.position++}else N(e,"unknown escape sequence");i=n=e.position}else Ti(o)?(Qi(e,i,n,!0),Qo(e,ze(e,!1,t)),i=n=e.position):e.position===e.lineStart&&Ga(e)?N(e,"unexpected end of the document within a double quoted scalar"):(e.position++,n=e.position)}N(e,"unexpected end of the stream within a double quoted scalar")}function xh(e,t){var i=!0,n,r,a,s=e.tag,o,l=e.anchor,c,d,u,m,p,g=Object.create(null),b,f,x,k;if(k=e.input.charCodeAt(e.position),k===91)d=93,p=!1,o=[];else if(k===123)d=125,p=!0,o={};else return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=o),k=e.input.charCodeAt(++e.position);k!==0;){if(ze(e,!0,t),k=e.input.charCodeAt(e.position),k===d)return e.position++,e.tag=s,e.anchor=l,e.kind=p?"mapping":"sequence",e.result=o,!0;i?k===44&&N(e,"expected the node content, but found ','"):N(e,"missed comma between flow collection entries"),f=b=x=null,u=m=!1,k===63&&(c=e.input.charCodeAt(e.position+1),Xe(c)&&(u=m=!0,e.position++,ze(e,!0,t))),n=e.line,r=e.lineStart,a=e.position,bn(e,t,Ha,!1,!0),f=e.tag,b=e.result,ze(e,!0,t),k=e.input.charCodeAt(e.position),(m||e.line===n)&&k===58&&(u=!0,k=e.input.charCodeAt(++e.position),ze(e,!0,t),bn(e,t,Ha,!1,!0),x=e.result),p?yn(e,o,g,f,b,x,n,r,a):u?o.push(yn(e,null,g,f,b,x,n,r,a)):o.push(b),ze(e,!0,t),k=e.input.charCodeAt(e.position),k===44?(i=!0,k=e.input.charCodeAt(++e.position)):i=!1}N(e,"unexpected end of the stream within a flow collection")}function wh(e,t){var i,n,r=Yo,a=!1,s=!1,o=t,l=0,c=!1,d,u;if(u=e.input.charCodeAt(e.position),u===124)n=!1;else if(u===62)n=!0;else return!1;for(e.kind="scalar",e.result="";u!==0;)if(u=e.input.charCodeAt(++e.position),u===43||u===45)Yo===r?r=u===43?Wc:lh:N(e,"repeat of a chomping mode identifier");else if((d=gh(u))>=0)d===0?N(e,"bad explicit indentation width of a block scalar; it cannot be less than one"):s?N(e,"repeat of an indentation width identifier"):(o=t+d-1,s=!0);else break;if(kt(u)){do u=e.input.charCodeAt(++e.position);while(kt(u));if(u===35)do u=e.input.charCodeAt(++e.position);while(!Ti(u)&&u!==0)}for(;u!==0;){for(Go(e),e.lineIndent=0,u=e.input.charCodeAt(e.position);(!s||e.lineIn
`,a?1+l:l),a=!0,s=!0,l=0,i=e.position;!Ti(u)&&u!==0;)u=e.input.charCodeAt(++e.position);Qi(e,i,e.position,!1)}return!0}function Zc(e,t){var i,n=e.tag,r=e.anchor,a=[],s,o=!1,l;if(e.firstTabInLine!==-1)return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=a),l=e.input.charCodeAt(e.position);l!==0&&(e.firstTabInLine!==-1&&(e.position=e.firstTabInLine,N(e,"tab characters must not be used in indentation")),!(l!==45||(s=e.input.charCodeAt(e.position+1),!Xe(s))));){if(o=!0,e.position++,ze(e,!0,-1)&&e.lineIndent<=t){a.push(null),l=e.input.charCodeAt(e.position);continue}if(i=e.line,bn(e,t,pd,!1,!0),a.push(e.result),ze(e,!0,-1),l=e.input.charCodeAt(e.position),(e.line===i||e.lineIndent>t)&&l!==0)N(e,"bad indentation of a sequence entry");else if(e.lineIndent<t)break}return o?(e.tag=n,e.anchor=r,e.kind="sequence",e.result=a,!0):!1}function kh(e,t,i){var n,r,a,s,o,l,c=e.tag,d=e.anchor,u={},m=Object.create(null),p=null,g=null,b=null,f=!1,x=!1,k;if(e.firstTabInLine!==-1)return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=u),k=e.input.charCodeAt(e.position);k!==0;){if(!f&&e.firstTabInLine!==-1&&(e.position=e.firstTabInLine,N(e,"tab characters must not be used in indentation")),n=e.input.charCodeAt(e.position+1),a=e.line,(k===63||k===58)&&Xe(n))k===63?(f&&(yn(e,u,m,p,g,null,s,o,l),p=g=b=null),x=!0,f=!0,r=!0):f?(f=!1,r=!0):N(e,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"),e.position+=1,k=n;else{if(s=e.line,o=e.lineStart,l=e.position,!bn(e,i,ud,!1,!0))break;if(e.line===a){for(k=e.input.charCodeAt(e.position);kt(k);)k=e.input.charCodeAt(++e.position);if(k===58)k=e.input.charCodeAt(++e.position),Xe(k)||N(e,"a whitespace character is expected after the key-value separator within a block mapping"),f&&(yn(e,u,m,p,g,null,s,o,l),p=g=b=null),x=!0,f=!1,r=!1,p=e.tag,g=e.result;else if(x)N(e,"can not read an implicit mapping pair; a colon is missed");else return e.tag=c,e.anchor=d,!0}else if(x)N(e,"can not read a block mapping entry; a multiline key may not be an implicit key");else return e.tag=c,e.anchor=d,!0}if((e.line===a||e.lineIndent>t)&&(f&&(s=e.line,o=e.lineStart,l=e.position),bn(e,t,Ua,!0,r)&&(f?g=e.result:b=e.result),f||(yn(e,u,m,p,g,b,s,o,l),p=g=b=null),ze(e,!0,-1),k=e.input.charCodeAt(e.position)),(e.line===a||e.lineIndent>t)&&k!==0)N(e,"bad indentation of a mapping entry");else if(e.lineIndent<t)break}return f&&yn(e,u,m,p,g,null,s,o,l),x&&(e.tag=c,e.anchor=d,e.kind="mapping",e.result=u),x}function zh(e){var t,i=!1,n=!1,r,a,s;if(s=e.input.charCodeAt(e.position),s!==33)return!1;if(e.tag!==null&&N(e,"duplication of a tag property"),s=e.input.charCodeAt(++e.position),s===60?(i=!0,s=e.input.charCodeAt(++e.position)):s===33?(n=!0,r="!!",s=e.input.charCodeAt(++e.position)):r="!",t=e.position,i){do s=e.input.charCodeAt(++e.position);while(s!==0&&s!==62);e.position<e.length?(a=e.input.slice(t,e.position),s=e.input.charCodeAt(++e.position)):N(e,"unexpected end of the stream within a verbatim tag")}else{for(;s!==0&&!Xe(s);)s===33&&(n?N(e,"tag suffix cannot contain exclamation marks"):(r=e.input.slice(t-1,e.position+1),md.test(r)||N(e,"named tag handle cannot contain such characters"),n=!0,t=e.position+1)),s=e.input.charCodeAt(++e.position);a=e.input.slice(t,e.position),uh.test(a)&&N(e,"tag suffix cannot contain flow indicator characters")}a&&!gd.test(a)&&N(e,"tag name cannot contain such characters: "+a);try{a=decodeURIComponent(a)}catch{N(e,"tag name is malformed: "+a)}return i?e.tag=a:Zi.call(e.tagMap,r)?e.tag=e.tagMap[r]+a:r==="!"?e.tag="!"+a:r==="!!"?e.tag="tag:yaml.org,2002:"+a:N(e,'undeclared tag handle "'+r+'"'),!0}function Ah(e){var t,i;if(i=e.input.charCodeAt(e.position),i!==38)return!1;for(e.anchor!==null&&N(e,"duplication of an anchor property"),i=e.input.charCodeAt(++e.position),t=e.position;i!==0&&!Xe(i)&&!fn(i);)i=e.input.charCodeAt(++e.position);return e.position===t&&N(e,"name of an anchor node must contain at least one character"),e.anchor=e.input.slice(t,e.position),!0}function Sh(e){var t,i,n;if(n=e.input.charCodeAt(e.position),n!==42)return!1;for(n=e.input.charCodeAt(++e.
`),e.charCodeAt(0)===65279&&(e=e.slice(1)));var i=new fh(e,t),n=e.indexOf("\0");for(n!==-1&&(i.position=n,N(i,"null byte is not allowed in input")),i.input+="\0";i.input.charCodeAt(i.position)===32;)i.lineIndent+=1,i.position+=1;for(;i.position<i.length-1;)Lh(i);return i.documents}function Th(e,t,i){t!==null&&typeof t=="object"&&typeof i>"u"&&(i=t,t=null);var n=bd(e,i);if(typeof t!="function")return n;for(var r=0,a=n.length;r<a;r+=1)t(n[r])}function Eh(e,t){var i=bd(e,t);if(i.length!==0){if(i.length===1)return i[0];throw new We("expected a single document in the stream, but found more")}}var Ch=Th,Oh=Eh,vd={loadAll:Ch,load:Oh},xd=Object.prototype.toString,wd=Object.prototype.hasOwnProperty,Zo=65279,Mh=9,Zn=10,qh=13,Ih=32,Bh=33,Fh=34,Ho=35,Rh=37,Dh=38,Kh=39,_h=42,kd=44,Nh=45,Va=58,jh=61,Yh=62,Ph=63,Hh=64,zd=91,Ad=93,Uh=96,Sd=123,Wh=124,Ld=125,je={};je[0]="\\0";je[7]="\\a";je[8]="\\b";je[9]="\\t";je[10]="\\n";je[11]="\\v";je[12]="\\f";je[13]="\\r";je[27]="\\e";je[34]='\\"';je[92]="\\\\";je[133]="\\N";je[160]="\\_";je[8232]="\\L";je[8233]="\\P";var Vh=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"],$h=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;function Gh(e,t){var i,n,r,a,s,o,l;if(t===null)return{};for(i={},n=Object.keys(t),r=0,a=n.length;r<a;r+=1)s=n[r],o=String(t[s]),s.slice(0,2)==="!!"&&(s="tag:yaml.org,2002:"+s.slice(2)),l=e.compiledTypeMap.fallback[s],l&&wd.call(l.styleAliases,o)&&(o=l.styleAliases[o]),i[s]=o;return i}function Qh(e){var t,i,n;if(t=e.toString(16).toUpperCase(),e<=255)i="x",n=2;else if(e<=65535)i="u",n=4;else if(e<=4294967295)i="U",n=8;else throw new We("code point within a string may not be greater than 0xFFFFFFFF");return"\\"+i+Se.repeat("0",n-t.length)+t}var Zh=1,Jn=2;function Jh(e){this.schema=e.schema||dd,this.indent=Math.max(1,e.indent||2),this.noArrayIndent=e.noArrayIndent||!1,this.skipInvalid=e.skipInvalid||!1,this.flowLevel=Se.isNothing(e.flowLevel)?-1:e.flowLevel,this.styleMap=Gh(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==='"'?Jn:Zh,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 Jc(e,t){for(var i=Se.repeat(" ",t),n=0,r=-1,a="",s,o=e.length;n<o;)r=e.indexOf(`
`+t.stack),re.default.error(i),ir&&es(i.substring(i.indexOf("]")+2),re.default.levels.TRACE)}function vn(e){re.default.info(`${Ja}${e}`),ir&&es(e,re.default.levels.INFO)}function ii(e){re.default.debug(`${Ja}${e}`),ir&&es(e,re.default.levels.DEBUG)}function Yi(e){re.default.warn(`${Ja}${e}`),ir&&es(e,re.default.levels.WARN)}function zt(e){re.default.getLevel()>re.default.levels.DEBUG||tl.set(e,performance.now())}function Ji(e){if(re.default.getLevel()>re.default.levels.DEBUG)return;tl.has(e)||Yi(A("logs.timing-key-not-found").replace("{TIMING_KEY}",e));let t=performance.now()-tl.get(e);ii(`${e}:${t}`+A("logs.milliseconds-abbreviation"))}function es(e,t){re.default.getLevel()<=t&&Xa.push(e)}function Rd(){Xa=[]}function nl(e){ir=e}function is(e){switch(e){case"INFO":{re.default.setLevel("info");break}case"TRACE":{re.default.setLevel("trace");break}case"DEBUG":{re.default.setLevel("debug");break}case"SILENT":{re.default.setLevel("silent");break}case"ERROR":{re.default.setLevel("error");break}case"WARN":{re.default.setLevel("warn");break}}}function Dd(e){switch(e){case re.default.levels.INFO:return"INFO";case re.default.levels.TRACE:return"TRACE";case re.default.levels.DEBUG:return"DEBUG";case re.default.levels.SILENT:return"SILENT";case re.default.levels.ERROR:return"ERROR";case re.default.levels.WARN:return"WARN"}}var Kd={};var _d={};var Nd={};var jd={commands:{"lint-file":{name:"Linten Sie die aktuelle Datei","error-message":"Lint-Datei-Fehler in der Datei"},"lint-file-unless-ignored":{name:"Linten Sie die aktuelle Datei, es sei denn, sie wird ignoriert"},"lint-all-files":{name:"Linten Sie alle Dateien im Vault","error-message":"Beim Linten aller Dateien Fehler in der Datei","success-message":"Alle Dateien gelinted","errors-message-singular":"Beim Linten aller Dateien gab es einen Fehler.","errors-message-plural":"Beim Linten aller Dateien gab es {NUM} Fehler.","start-message":"Dadurch werden alle Ihre Dateien ver\xE4ndert und es k\xF6nnen Fehler entstehen.","submit-button-text":"Linte alle","submit-button-notice-text":"Linte alle Dateien..."},"lint-all-files-in-folder":{name:"Linte alle Dateien im aktuellen Ordner","start-message":"Dadurch werden alle Ihre Dateien in {FOLDER_NAME} bearbeitet, einschlie\xDFlich der Dateien in den Unterordnern, was zu Fehlern f\xFChren kann.","submit-button-text":"Linte alle Dateien in {FOLDER_NAME}","submit-button-notice-text":"Linten aller Dateien in {FOLDER_NAME}...","error-message":"Beim Linten aller Dateien im Ordner gab es Fehler in der Datei","success-message":"Alle {NUM}-Dateien in {FOLDER_NAME} wurden gelinted.","message-singular":"Alle {NUM}-Dateien in {FOLDER_NAME} wurden gelinted und es trat ein Fehler auf.","message-plural":"Alle {FILE_COUNT}-Dateien in {FOLDER_NAME} wurden gelinted und es gab {ERROR_COUNT} Fehler."},"paste-as-plain-text":{name:"Einf\xFCgen als reiner Text und ohne \xC4nderungen"},"lint-file-pop-up-menu-text":{name:"Linte Datei"},"lint-folder-pop-up-menu-text":{name:"Linte Ordner"}},logs:{"plugin-load":"Plugin wird geladen","plugin-unload":"Plugin entladen","folder-lint":"Linting-Ordner ","linter-run":"Laufender Linter","paste-link-warning":"Abgebrochenes Einf\xFCgen des Lints, da der Inhalt der Zwischenablage ein Link ist, wodurch Konflikte mit anderen Plugins vermieden werden, die das Einf\xFCgen \xE4ndern.","see-console":"Weitere Informationen finden Sie in der Konsole.","unknown-error":"Beim Linten ist ein unbekannter Fehler aufgetreten.","moment-locale-not-found":"Beim Versuch, Moment.js locale auf {MOMENT_LOCALE} umzustellen, wurde {CURRENT_LOCALE} angezeigt","file-change-lint-message-start":"Linted","pre-rules":"Regeln vor regul\xE4ren Regeln","post-rules":"Regeln nach regul\xE4ren Regeln","rule-running":"Laufende Regeln","custom-regex":"Benutzerdefinierte Regex-Regeln","running-custom-regex":"Ausf\xFChren von benutzerdefinierten Regex","running-custom-lint-command":"Ausf\xFChren von benutzerdefinierten Lint-Befehlen","custom-lint-duplicate-warning":'Sie k\xF6nnen denselben Befehl ("{COMMAND_NAME}") nicht zweimal als benutzerdefinierte Lint-Regel
`){if(o!==i)break;o=0,n=r}else a===">"&&o++;r--}return s?n:t}function ds(e){let t=wn(e),i=new Map,n="",r=[],a=[];for(let s of t){n=e.substring(s.startIndex,s.endIndex),r=n.split(`
`),r.splice(0,2);for(let o of r){if(a=o.split("|"),a.length!==4){Yi(A("options.custom-auto-correct.custom-row-parse-warning").replace("{ROW}",o));continue}i.set(a[1].trim().toLowerCase(),a[2].trim())}}return i}function Fe(e,t,i,n){let r=e.length,a=0,s;if(t<0?t=-t>r?0:r+t:t=t>r?r:t,i=i>0?i:0,n.length<1e4)s=Array.from(n),s.unshift(t,i),e.splice(...s);else for(i&&e.splice(t,i);a<n.length;)s=n.slice(a,a+1e4),s.unshift(t,0),e.splice(...s),a+=1e4,t+=1e4}function Ve(e,t){return e.length>0?(Fe(e,e.length,0,t),e):t}var Lf=et(/\p{P}/u),ti=et(/[A-Za-z]/),$e=et(/[\dA-Za-z]/),gu=et(/[#-'*+\--9=?A-Z^-~]/);function ar(e){return e!==null&&(e<32||e===127)}var sr=et(/\d/),hu=et(/[\dA-Fa-f]/),cl=et(/[!-/:-@[-`{-~]/);functionq(e){returne!==null&&e<-2}functionte(e){returne!==null&&(e<0||e===32)}functionV(e){returne===-2||e===-1||e===32}functionfu(e){returncl(e)||Lf(e)}varyu=et(/\s/);functionet(e){returnt;functiont(i){returni!==null&&i>-1&&e.test(String.fromCharCode(i))}}functiondl(e){if(e===null||te(e)||yu(e))return1;if(fu(e))return2}functionkn(e,t,i){letn=[],r=-1;for(;++r<e.length;){leta=e[r].resolveAll;a&&!n.includes(a)&&(t=a(t,i),n.push(a))}returnt}varor={name:"attention",tokenize:Ef,resolveAll:Tf};functionTf(e,t){leti=-1,n,r,a,s,o,l,c,d;for(;++i<e.length;)if(e[i][0]==="enter"&&e[i][1].type==="attentionSequence"&&e[i][1]._close){for(n=i;n--;)if(e[n][0]==="exit"&&e[n][1].type==="attentionSequence"&&e[n][1]._open&&t.sliceSerialize(e[n][1]).charCodeAt(0)===t.sliceSerialize(e[i][1]).charCodeAt(0)){if((e[n][1]._close||e[i][1]._open)&&(e[i][1].end.offset-e[i][1].start.offset)%3&&!((e[n][1].end.offset-e[n][1].start.offset+e[i][1].end.offset-e[i][1].start.offset)%3))continue;l=e[n][1].end.offset-e[n][1].start.offset>1&&e[i][1].end.offset-e[i][1].start.offset>1?2:1;letu=Object.assign({},e[n][1].end),m=Object.assign({},e[i][1].start);bu(u,-l),bu(m,l),s={type:l>1?"strongSequence":"emphasisSequence",start:u,end:Object.assign({},e[n][1].end)},o={type:l>1?"strongSequence":"emphasisSequence",start:Object.assign({},e[i][1].start),end:m},a={type:l>1?"strongText":"emphasisText",start:Object.assign({},e[n][1].end),end:Object.assign({},e[i][1].start)},r={type:l>1?"strong":"emphasis",start:Object.assign({},s.start),end:Object.assign({},o.end)},e[n][1].end=Object.assign({},s.start),e[i][1].start=Object.assign({},o.end),c=[],e[n][1].end.offset-e[n][1].start.offset&&(c=Ve(c,[["enter",e[n][1],t],["exit",e[n][1],t]])),c=Ve(c,[["enter",r,t],["enter",s,t],["exit",s,t],["enter",a,t]]),c=Ve(c,kn(t.parser.constructs.insideSpan.null,e.slice(n+1,i),t)),c=Ve(c,[["exit",a,t],["enter",o,t],["exit",o,t],["exit",r,t]]),e[i][1].end.offset-e[i][1].start.offset?(d=2,c=Ve(c,[["enter",e[i][1],t],["exit",e[i][1],t]])):d=0,Fe(e,n-1,i-n+3,c),i=n+c.length-d-2;break}}for(i=-1;++i<e.length;)e[i][1].type==="attentionSequence"&&(e[i][1].type="data");returne}functionEf(e,t){leti=this.parser.constructs.attentionMarkers.null,n=this.previous,r=dl(n),a;returns;functions(l){returna=l,e.enter("attentionSequence"),o(l)}functiono(l){if(l===a)returne.consume(l),o;letc=e.exit("attentionSequence"),d=dl(l),u=!d||d===2&&r||i.includes(l),m=!r||r===2&&d||i.includes(n);returnc._open=!!(a===42?u:u&&(r||!m)),c._close=!!(a===42?m:m&&(d||!u)),t(l)}}functionbu(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}varul={name:"autolink",tokenize:Cf};functionCf(e,t,i){letn=0;returnr;functionr(p){returne.enter("autolink"),e.enter("autolinkMarker"),e.consume(p),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),a}functiona(p){returnti(p)?(e.consume(p),s):c(p)}functions(p){returnp===43||p===45||p===46||$e(p)?(n=1,o(p)):c(p)}functiono(p){returnp===58?(e.consume(p),n=0,l):(p===43||p===45||p===46||$e(p))&&n++<32?(e.consume(p),o):(n=0,c(p))}functionl(p){returnp===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(p),e.exit("autolinkMarker"),e.exit("autolink"),t):p===null||p===32||p===60||ar(p)?i(p):(e.consume(p),l)}functionc(p){returnp===64?(e.consume(p),d):gu(p)?(e.consume(p),c):i(p)}functiond(p){return$e(p)?u(p):i(p)}functionu(p){returnp===46?(e.consu
`&&(e=e.substring(0,s.end.offset)+e.substring(s.end.offset+1)),e=e.substring(0,s.start.offset)+e.substring(s.end.offset),a(e,o,s.start.offset)}for(let s of n){let o=s[1],l=o.referencePositions.length-o.footnotesReferencingKey.length;l=l>=0?l:0;let c=0;for(let d of o.footnotesReferencingKey){if(c+l>=o.referencePositions.length)throw new Error(A("logs.missing-footnote-error-message").replace("{FOOTNOTE}",d));r.set(d,o.referencePositions[l+c++])}}i=i.sort((s,o)=>r.get(s)-r.get(o)),i.length>0&&(e=e.trimEnd()+`
`+s;return e}function Ju(e){let t=ye("footnoteDefinition",e),i=[],n=new Map,r=new Map,a=[],s=new Set,o=[],l=function(u,m,p){let g=m.match(/\[\^.*?\]/)[0];n.set(m,g);let b=s.has(g);if(b&&i.includes(m)){o.unshift(m);return}else if(b)throw new Error(A("logs.too-many-footnotes-error-message").replace("{FOOTNOTE_KEY}",g));let f;do f=u.lastIndexOf(g,p),f!==-1&&((f+m.length>u.length||u.substring(f,f+m.length)!==m)&&a.push({key:g,position:f}),p=f-1);while(f>0);s.add(g)};for(let u of t){let m=e.substring(u.start.offset,u.end.offset);i.unshift(m),l(e,m,u.start.offset)}let c=1,d=new Set;for(let u of i){if(d.has(u))continue;d.add(u);let m=n.get(u),p=`[^${c++}]`;r.set(m,p)}a.sort((u,m)=>m.position-u.position);for(let u of a){let m=r.get(u.key);e=pu(e,u.key,m,u.position)}for(let u of d){let m=n.get(u),p=r.get(m);e=e.replace(u,u.replace(m,p))}for(let u of o){let m=e.replace(`
`);e===m&&(m=e.replace(u,"")),e=m}return e}function Ss(e,t,i){let n=ye(i,e);if(n.length===0)return e;let r="";if(t==="underscore")r="_";else if(t==="asterisk")r="*";else{let a=n[n.length-1];r=e.substring(a.start.offset,a.start.offset+1)}i==="strong"&&(r+=r);for(let a of n){let s=r+e.substring(a.start.offset+r.length,a.end.offset-r.length)+r;e=le(e,a.start.offset,a.end.offset,s)}return e}function Xu(e,t){let i=ye("paragraph",e);if(i.length===0)return e;for(let n of i){let r=e.substring(n.start.offset,n.end.offset).split(`
`),e}function ip(e){let t=ye("link",e);for(let i of t){if(i==null)continue;let n=e.substring(i.start.offset,i.end.offset);if(!n.match(yr))continue;let r=n.indexOf("]"),a=n.substring(0,1)+n.substring(1,r).trim()+n.substring(r);e=le(e,i.start.offset,i.end.offset,a)}return e}function tp(e,t){let i=ye("emphasis",e);for(let n of i){let r=e.substring(n.start.offset+1,n.end.offset-1);r=t(r),e=le(e,n.start.offset+1,n.end.offset-1,r)}return e}function np(e,t){let i=ye("strong",e);for(let n of i){let r=e.substring(n.start.offset+2,n.end.offset-2);r=t(r),e=le(e,n.start.offset+2,n.end.offset-2,r)}return e}function Ls(e,t){let i=Lb(e);for(let n of i){let r=n.start.offset;for(;r>0&&e.charAt(r-1).trim()==="";)r--;(r===0||e.charAt(r-1).trim()!="")&&r++;let a=e.substring(r,n.end.offset);yp.test(a)&&(r+=4,a=a.substring(4)),a=t(a),e=le(e,r,n.end.offset,a)}return e}function rp(e){let t=ye("code",e);for(let i of t){let n=e.substring(i.start.offset,i.end.offset);!n.startsWith("```")&&!n.startsWith("~~~")||(e=St(e,i.start.offset,i.end.offset))}return e}function ap(e,t){let i=ye("math",e);for(let n of i)e=St(e,n.start.offset,n.end.offset);i=ye("inlineMath",e);for(let n of i)e.substring(n.start.offset,n.end.offset).startsWith("$".repeat(t))&&(e=St(e,n.start.offset,n.end.offset));return e}function sp(e){let t=ye("blockquote",e);for(letioft){letn=i.end.offset;for(;n<e.length-1&&e.charAt(n)!==`
`;)n++;e=St(e,i.start.offset,n,!0)}return e}function op(e,t,i){let n=ye("list",e);if(!n)return e;for(let r of n){let a=r.start.offset;for(;a>0&&e.charAt(a-1)!==`
`;)a--;let s=e.substring(a,r.end.offset),o=function(u){let m=u.lastIndexOf("> ");return m!==-1&&(u=u.substring(m+2)),u=u.replaceAll(" "," "),Math.floor((u.split(" ").length-1)/2)+1},l=new Map,c=function(u,m){let p=m;for(;p>u;)l.delete(p--)},d=-1;s=s.replace(/^(( |\t|> )*)((\d+(\.|\)))|[-*+])([^\n]*)$/gm,(u,m="",p,g,b,f,x)=>{let k=1,L=o(m);if(!/^\d/.test(g)){let E=L>d?L:d;return c(L,E),u}return l.has(L)?t==="ascending"&&(k=l.get(L)+1,l.set(L,k)):l.set(L,1),d>L&&c(L,d),d=L,`${m}${k}${i}${x}`}),e=le(e,a,r.end.offset,s)}return e}function lp(e,t){let i=ye("listItem",e);if(!i)return e;let n=/^((\d+[.)])|(- \[[ x]\]))/m,r=t;if(t=="consistent"){let a=i.length-1;for(;a>=0;){let s=e.substring(i[a].start.offset,i[a].end.offset);if(a--,!s.match(n)){r=s.charAt(0);break}}if(a==-1)return e}for(let a of i){let s=e.substring(a.start.offset,a.end.offset);s.match(n)||(s=r+s.substring(1),e=le(e,a.start.offset,a.end.offset,s))}return e}function Pl(e,t){let i=ye("blockquote",e);for(let n of i){let r=n.end.offset;for(;r<e.length-1&&e.charAt(r)!==`
`;)r++;let a=e.substring(n.start.offset,r);a=t(a),e=le(e,n.start.offset,r,a)}return e}function cp(e,t){let i=ye("math",e),n=new RegExp("^(\\${"+t+",})(\\n*)"),r=new RegExp("(\\n*)(\\${"+t+",})([^\\$]*)$");for(let a of i){let s=e.substring(a.start.offset,a.end.offset),o=Cb(s,t,a.start.offset);for(let l of o)e=$u(e,l.startIndex,l.endIndex,n,r)}i=ye("inlineMath",e);for(let a of i)e.substring(a.start.offset,a.end.offset).startsWith("$".repeat(t))&&(e=$u(e,a.start.offset,a.end.offset,n,r));return e}function Cb(e,t,i){let n="$".repeat(t),r=t;for(;e.charAt(r)==="$";)n+="$",r++;let a=[],s=Xi(e,n);if(s<=1)return[];if(s===2)return a.unshift({startIndex:i,endIndex:i+e.length}),a;s===3&&a.unshift({startIndex:i,endIndex:i+e.indexOf(n,n.length)+n.length}),s%2===1&&s--;let o=i,l=n.length;for(;s>2;){let c=e.indexOf(n,l)+n.length;a.unshift({startIndex:o,endIndex:i+c}),o=i+c+1,l=c+1,s-=2}return a.unshift({startIndex:i+e.indexOf(n,l),endIndex:i+e.length}),a}function $u(e,t,i,n,r){let a=e.substring(rr(e,t),t)??"",[s]=xn(a,a.length),o=e.substring(rr(e,i),i)??"",l=e.substring(t,i),c=pp.test(a.trim()),d=!1;for(l=l.replace(n,(u,m,p="")=>{let g="";return!c&&a.trim()!=""?(g+=`
`,n),r===-1&&(r=l.length-1,c=!0),[a,o]=xn(l,r-1);let d=o+a.length+1,u=r;c&&u++;let m=l.substring(d,u);if(m.includes(h.math.placeholder)||m.includes(h.code.placeholder)){n++;continue}let p=Ts.test(m);s=i(a,p),o++,l=le(l,o,o+a.length,s),n=r+1+s.length-a.length}while(!c);return l}get optionBuilders(){return[new ee({OptionsClass:Xs,nameKey:"rules.blockquote-style.style.name",descriptionKey:"rules.blockquote-style.style.description",optionsKey:"style",records:[{value:"space",description:"> indicator is followed by a space"},{value:"no space",description:">indicator is not followed by a space"}]})]}};jt=z([y.register],jt);var eo=class{};z([y.noSettingControl()],eo.prototype,"lineContent",2);var Yt=class extends y{constructor(){super({nameKey:"rules.add-blockquote-indentation-on-paste.name",descriptionKey:"rules.add-blockquote-indentation-on-paste.description",type:"Paste"})}get OptionsClass(){return eo}apply(t,i){let n=/^(\s*)((> ?)+) .*/,r=i.lineContent.match(n);if(!r)return t;let a=r[1]??"",s=r[2]??"";return t.trim().replace(/\n/gm,`
${a}${s}`)}get optionBuilders(){return[]}};Yt=z([y.register],Yt);var Pt=class{constructor(){this.style="Title Case";this.ignoreWords=["macOS","iOS","iPhone","iPad","JavaScript","TypeScript","AppleScript","I"];this.lowercaseWords=["a","an","the","aboard","about","abt.","above","abreast","absent","across","after","against","along","aloft","alongside","amid","amidst","mid","midst","among","amongst","anti","apropos","around","round","as","aslant","astride","at","atop","ontop","bar","barring","before","B4","behind","below","beneath","neath","beside","besides","between","'tween","beyond","but","by","chez","circa","c.","ca.","come","concerning","contra","counting","cum","despite","spite","down","during","effective","ere","except","excepting","excluding","failing","following","for","from","in","including","inside","into","less","like","minus","modulo","mod","near","nearer","nearest","next","notwithstanding","of","o'","off","offshore","on","onto","opposite","out","outside","over","o'er","pace","past","pending","per","plus","post","pre","pro","qua","re","regarding","respecting","sans","save","saving","short","since","sub","than","through","thru","throughout","thruout","till","times","to","t'","touching","toward","towards","under","underneath","unlike","until","unto","up","upon","versus","vs.","v.","via","vice","vis-\xE0-vis","wanting","with","w/","w.","c\u0304","within","w/i","without","'thout","w/o","abroad","adrift","aft","afterward","afterwards","ahead","apart","ashore","aside","away","back","backward","backwards","beforehand","downhill","downstage","downstairs","downstream","downward","downwards","downwind","east","eastward","eastwards","forth","forward","forwards","heavenward","heavenwards","hence","henceforth","here","hereby","herein","hereof","hereto","herewith","home","homeward","homewards","indoors","inward","inwards","leftward","leftwards","north","northeast","northward","northwards","northwest","now","onward","onwards","outdoors","outward","outwards","overboard","overhead","overland","overseas","rightward","rightwards","seaward","seawards","skywards","skyward","south","southeast","southwards","southward","southwest","then","thence","thenceforth","there","thereby","therein","thereof","thereto","therewith","together","underfoot","underground","uphill","upstage","upstairs","upstream","upward","upwards","upwind","west","westward","westwards","when","whence","where","whereby","wherein","whereto","wherewith","although","because","considering","given","granted","if","lest","once","provided","providing","seeing","so","supposing","though","unless","whenever","whereas","wherever","while","whilst","ago","according to","as regards","counter to","instead of","owing to","pertaining to","at the behest of","at the expense of","at the hands of","at risk of","at the risk of","at variance with","by dint of","by means of","by virtue of","by way of","for the sake of","for sake of","for lack of","for want of","from want of","in accordance with","in addition to","in case of","in charge of","in compliance with","in conformity with","in contact with","in exchange for","in favor of","in front of","in lieu of","in light of","in the light of","in line with","in place of","in point of","in quest of","in relation to","in regard to","with regard to","in respect to","with respect to","in return for","in search of","in step with","in touch with","in terms of","in the name of","in view of","on account of","on behalf of","on grounds of","on the grounds of","on the part of","on top of","with a view to","with the exception of","\xE0 la","a la","as soon as","as well as","close to","due to","far from","in case","other than","prior to","pursuant to","regardless of","subsequent to","as long as","as much as","as far as","by the time","in as much as","inasmuch","in order to","in order that","even","provide that","if only","whether","whose","whoever","why","how","or not","whatever","what","both","and","or","not only","but also","either","neither","nor","just","rather","no sooner","such","that","yet","is","it"];this.ignoreCasedWords=!0}},Ht=class extends y{const
---`,""));if(!r)return n;for(let a of bi)if(i.dedupeAliasKey&&Object.keys(r).includes(a)){n=ae(n,a,be(ot(this.getUniqueArray(qe(de(n,a)))),i.aliasArrayStyle,i.defaultEscapeCharacter,i.removeUnnecessaryEscapeCharsForMultiLineArrays,!0));break}for(let a of yi)if(i.dedupeTagKey&&Object.keys(r).includes(a)){n=ae(n,a,be(st(this.getUniqueArray(qe(de(n,a)))),i.tagArrayStyle,i.defaultEscapeCharacter,i.removeUnnecessaryEscapeCharsForMultiLineArrays));break}if(i.dedupeArrayKeys){let a=[...bi,...yi,...i.ignoreDedupeArrayKeys];for(let s of Object.keys(r)){if(a.includes(s)||!Array.isArray(r[s])||r[s].length!==0&&typeof r[s][0]=="object"&&r[s][0]!==null)continue;let o=de(n,s),l="single-line";o.includes(`
`)&&(l="multi-line");let c=this.getUniqueArray(qe(o));n=ae(n,s,be(c,l,i.defaultEscapeCharacter,i.removeUnnecessaryEscapeCharsForMultiLineArrays))}}return n})}getUniqueArray(t){return t==null||typeof t=="string"||t.length<=1?t:[...new Set(t)]}get optionBuilders(){return[new H({OptionsClass:zi,nameKey:"rules.dedupe-yaml-array-values.dedupe-alias-key.name",descriptionKey:"rules.dedupe-yaml-array-values.dedupe-alias-key.description",optionsKey:"dedupeAliasKey"}),new H({OptionsClass:zi,nameKey:"rules.dedupe-yaml-array-values.dedupe-tag-key.name",descriptionKey:"rules.dedupe-yaml-array-values.dedupe-tag-key.description",optionsKey:"dedupeTagKey"}),new H({OptionsClass:zi,nameKey:"rules.dedupe-yaml-array-values.dedupe-array-keys.name",descriptionKey:"rules.dedupe-yaml-array-values.dedupe-array-keys.description",optionsKey:"dedupeArrayKeys"}),new pe({OptionsClass:zi,nameKey:"rules.dedupe-yaml-array-values.ignore-keys.name",descriptionKey:"rules.dedupe-yaml-array-values.ignore-keys.description",optionsKey:"ignoreDedupeArrayKeys"})]}};Kr=z([y.register],Kr);var no=class{constructor(){this.defaultLanguage=""}},_r=class extends y{constructor(){super({nameKey:"rules.default-language-for-code-fences.name",descriptionKey:"rules.default-language-for-code-fences.description",type:"Content",ruleIgnoreTypes:[h.yaml,h.math,h.yaml,h.link,h.wikiLink,h.tag]})}get OptionsClass(){return no}apply(t,i){return up(t,i.defaultLanguage)}get optionBuilders(){return[new xe({OptionsClass:no,nameKey:"rules.default-language-for-code-fences.default-language.name",descriptionKey:"rules.default-language-for-code-fences.default-language.description",optionsKey:"defaultLanguage"})]}};_r=z([y.register],_r);var ro=class{constructor(){this.style="consistent"}},Nr=class extends y{constructor(){super({nameKey:"rules.emphasis-style.name",descriptionKey:"rules.emphasis-style.description",type:"Content",ruleIgnoreTypes:[h.code,h.math,h.yaml,h.link,h.wikiLink,h.tag,h.math,h.inlineMath]})}get OptionsClass(){return ro}apply(t,i){return Ss(t,i.style,"emphasis")}get optionBuilders(){return[new ee({OptionsClass:ro,nameKey:"rules.emphasis-style.style.name",descriptionKey:"rules.emphasis-style.style.description",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"}]})]}};Nr=z([y.register],Nr);var gc=class{},jr=class extends y{constructor(){super({nameKey:"rules.empty-line-around-blockquotes.name",descriptionKey:"rules.empty-line-around-blockquotes.description",type:"Spacing"})}get OptionsClass(){return gc}apply(t,i){return sp(t)}get optionBuilders(){return[]}};jr=z([y.register],jr);var hc=class{},Yr=class extends y{constructor(){super({nameKey:"rules.empty-line-around-code-fences.name",descriptionKey:"rules.empty-line-around-code-fences.description",type:"Spacing"})}get OptionsClass(){return hc}apply(t,i){return rp(t)}get optionBuilders(){return[]}};Yr=z([y.register],Yr);var ao=class{constructor(){this.minimumNumberOfDollarSignsToBeAMathBlock=2}};z([y.noSettingControl()],ao.prototype,"minimumNumberOfDollarSignsToBeAMathBlock",2);var Pr=class extends y{constructor(){super({nameKey:"rules.empty-line-around-math-blocks.name",descriptionKey:"rules.empty-line-around-math-blocks.description",type:"Spacing",ruleIgnoreTypes:[h.yaml,h.code]})}get OptionsClass(){return ao}apply(t,i){return ap(t,i.minimumNumberOfDollarSignsToBeAMathBlock)}get optionBuilders(){return[]}};Pr=z([y.register],Pr);var fc=class{},Hr=class extends y{constructor(){super({nameKey:"rules.empty-line-around-tables.name",descriptionKey:"rules.empty-line-around-tables.description",type:"Spacing",ruleIgnoreTypes:[h.yaml,h.code,h.math,h.inlineMath,h.wikiLink,h.link]})}get OptionsClass(){return fc}apply(t,i){return Cp(t)}get optionBuilders(){return[]}};Hr=z([y.register],Hr);var Ur=class{constructor(){this.defaultEscapeCharacter='"';this.tryToEscapeSingleLineArrays=!1}};z([y.n
---`,""));if(!r)return n;for(let a of bi)if(i.formatAliasKey&&Object.keys(r).includes(a)){n=ae(n,a,be(ot(qe(de(n,a))),i.aliasArrayStyle,i.defaultEscapeCharacter,i.removeUnnecessaryEscapeCharsForMultiLineArrays,!0));break}for(let a of yi)if(i.formatTagKey&&Object.keys(r).includes(a)){n=ae(n,a,be(st(qe(de(n,a))),i.tagArrayStyle,i.defaultEscapeCharacter,i.removeUnnecessaryEscapeCharsForMultiLineArrays));break}if(i.formatArrayKeys){let a=[...bi,...yi,...i.forceMultiLineArrayStyle,...i.forceSingleLineArrayStyle];for(let s of Object.keys(r))a.includes(s)||!Array.isArray(r[s])||r[s].length!==0&&typeof r[s][0]=="object"&&r[s][0]!==null||(n=ae(n,s,be(qe(de(n,s)),i.defaultArrayStyle,i.defaultEscapeCharacter,i.removeUnnecessaryEscapeCharsForMultiLineArrays)))}for(let a of i.forceSingleLineArrayStyle)Object.keys(r).includes(a)&&(n=ae(n,a,be(qe(de(n,a)),"single-line",i.defaultEscapeCharacter,i.removeUnnecessaryEscapeCharsForMultiLineArrays)));for(let a of i.forceMultiLineArrayStyle)Object.keys(r).includes(a)&&(n=ae(n,a,be(qe(de(n,a)),"multi-line",i.defaultEscapeCharacter,i.removeUnnecessaryEscapeCharsForMultiLineArrays)));return n})}get optionBuilders(){return[new H({OptionsClass:ai,nameKey:"rules.format-yaml-array.alias-key.name",descriptionKey:"rules.format-yaml-array.alias-key.description",optionsKey:"formatAliasKey"}),new H({OptionsClass:ai,nameKey:"rules.format-yaml-array.tag-key.name",descriptionKey:"rules.format-yaml-array.tag-key.description",optionsKey:"formatTagKey"}),new ee({OptionsClass:ai,nameKey:"rules.format-yaml-array.default-array-style.name",descriptionKey:"rules.format-yaml-array.default-array-style.description",optionsKey:"defaultArrayStyle",records:[{value:"multi-line",description:"```key:\\n-value```"},{value:"single-line",description:"```key:[value]```"}]}),new H({OptionsClass:ai,nameKey:"rules.format-yaml-array.default-array-keys.name",descriptionKey:"rules.format-yaml-array.default-array-keys.description",optionsKey:"formatArrayKeys"}),new pe({OptionsClass:ai,nameKey:"rules.format-yaml-array.force-single-line-array-style.name",descriptionKey:"rules.format-yaml-array.force-single-line-array-style.description",optionsKey:"forceSingleLineArrayStyle"}),new pe({OptionsClass:ai,nameKey:"rules.format-yaml-array.force-multi-line-array-style.name",descriptionKey:"rules.format-yaml-array.force-multi-line-array-style.description",optionsKey:"forceMultiLineArrayStyle"})]}};Gr=z([y.register],Gr);var oo=class{constructor(){this.startAtH2=!1}},Qr=class extends y{constructor(){super({nameKey:"rules.header-increment.name",descriptionKey:"rules.header-increment.description",type:"Heading",ruleIgnoreTypes:[h.code,h.math,h.yaml,h.link,h.wikiLink,h.tag]})}get OptionsClass(){return oo}apply(t,i){let n=0,r=i.startAtH2?2:1,a=[],s=[0,0,0,0,0,0],o=s.length;return t.replace(rt,(l,c="",d="",u="",m="",p="")=>{let g=d.length;if(g=g<=o?g:o,s[g-1]>=0&&g<n){let b=s.length;for(;a.length!==0&&g<=a[a.length-1];)b=a.pop();a.length===0?b=0:b--;for(let f=s.length-1;f>=b;f--)s[f]=0}if(s[g-1]<=0){let b=n,f=a.length+r;f=f<=o?f:o;for(let x=b;x<g-1;x++)s[x]=f-1;a.push(g),s[g-1]=f}return n=g,c+"#".repeat(s[g-1])+u+m+p})}get optionBuilders(){return[new H({OptionsClass:oo,nameKey:"rules.header-increment.start-at-h2.name",descriptionKey:"rules.header-increment.start-at-h2.description",optionsKey:"startAtH2"})]}};Qr=z([y.register],Qr);var Jr=class{constructor(){this.bottom=!0;this.emptyLineAfterYaml=!0}},Zr=class extends y{constructor(){super({nameKey:"rules.heading-blank-lines.name",descriptionKey:"rules.heading-blank-lines.description",type:"Spacing",ruleIgnoreTypes:[h.code,h.math,h.yaml,h.link,h.wikiLink]})}get OptionsClass(){return Jr}apply(t,i){return i.bottom?(t=t.replace(/^(#+\s.*)/gm,`
`,"").replace("---","");let a=[],s=wr;for(let c of yi){let d=de(r,c);if(d!=null){a=st(qe(d)),s=c;break}}let o=new Set;if(typeof a=="string")o.add(a),a=[a];else if(a!=null)for(let c of a)o.add(c);else a=[];for(let c of n){let d=c.trim().substring(1);!o.has(d)&&!i.tagsToIgnore.includes(d)&&(o.add(d),a.push(d))}return`---
${ae(r,s,be(a,i.tagArrayStyle,i.defaultEscapeCharacter,i.removeUnnecessaryEscapeCharsForMultiLineArrays))}---`}),t=Ee([h.yaml],t,r=>(i.howToHandleExistingTags!=="Nothing"&&(r=r.replace(br,a=>{let s=a.indexOf("#"),o=a.substring(s+1);return i.tagsToIgnore.includes(o)?a:i.howToHandleExistingTags==="Remove hashtag"?a.substring(0,s)+o:""})),r)),t=t.replace(/(\n---)( |\t)+/,"$1")),t}get optionBuilders(){return[new ee({OptionsClass:gt,nameKey:"rules.move-tags-to-yaml.how-to-handle-existing-tags.name",descriptionKey:"rules.move-tags-to-yaml.how-to-handle-existing-tags.description",optionsKey:"howToHandleExistingTags",records:[{value:"Nothing",description:"Leaves tags in the body of the file alone"},{value:"Remove hashtag",description:"Removes `#` from tags in content body after moving them to the YAML frontmatter"},{value:"Remove whole tag",description:"Removes the whole tag in content body after moving them to the YAML frontmatter. _Note that this removes the first space prior to the tag as well_"}]}),new pe({OptionsClass:gt,nameKey:"rules.move-tags-to-yaml.tags-to-ignore.name",descriptionKey:"rules.move-tags-to-yaml.tags-to-ignore.description",optionsKey:"tagsToIgnore"})]}};na=z([y.register],na);var po=class{constructor(){this.noBareURIs=!1}},uo="'\"\u2018\u2019\u201C\u201D`[]",nx=["http","ftp","https","smtp"],ra=class extends y{constructor(){super({nameKey:"rules.no-bare-urls.name",descriptionKey:"rules.no-bare-urls.description",type:"Content",ruleIgnoreTypes:[h.code,h.math,h.yaml,h.link,h.wikiLink,h.tag,h.image,h.inlineCode,h.anchorTag,h.html]})}get OptionsClass(){return po}apply(t,i){let n=t.match(Ct);if(n&&(t=this.handleMatches(t,n,!1)),i.noBareURIs){let r=t.match(xp);r&&(t=this.handleMatches(t,r,!0))}return t}handleMatches(t,i,n){let r=0,a=i.length;for(let s=0;s<a;s++){let o=i[s],l=t.indexOf(o,r),c=l+o.length;o.charAt(0)==="<"&&(o=o.substring(1),l++),o.charAt(o.length-1)===">"&&(o=o.substring(0,o.length-1),c--);let d=l===0?void 0:t.charAt(l-1),u=c>=t.length?void 0:t.charAt(c),m=Xi(o,"(");if(m!=0&&m!=Xi(o,")")&&u==")"?(o+=u,c++,u=c>=t.length?void 0:t.charAt(c)):m==0&&o.endsWith(")")&&(u=")",c--,o=o.substring(0,o.length-1)),this.skipMatch(d,u,o,n)){r=l+o.length;continue}if(d!=null&&d==="<"&&u!=null&&u===">"){let p=l-1;for(;p>0&&t.charAt(p-1)==="<";)p--;let g=c;for(;g<t.length-1&&t.charAt(g+1)===">";)g++;t=le(t,p,g+1,"<"+o+">"),r=l+o.length;continue}t=le(t,l,l+o.length,"<"+o+">"),r=l+o.length+2}return t}skipMatch(t,i,n,r){let a=t!=null&&uo.includes(t)||uo.includes(n.charAt(0)),s=i!=null&&uo.includes(i)||uo.includes(n.charAt(n.length-1));return a&&s?!0:r?nx.includes(n.substring(0,n.indexOf(":"))):!1}get optionBuilders(){return[new H({OptionsClass:po,nameKey:"rules.no-bare-urls.no-bare-uris.name",descriptionKey:"rules.no-bare-urls.no-bare-uris.description",optionsKey:"noBareURIs"})]}};ra=z([y.register],ra);var sa=class{constructor(){this.numberStyle="ascending";this.listEndStyle="."}},aa=class extends y{constructor(){super({nameKey:"rules.ordered-list-style.name",descriptionKey:"rules.ordered-list-style.description",type:"Content",ruleIgnoreTypes:[h.code,h.math,h.yaml,h.tag]})}get OptionsClass(){return sa}apply(t,i){return op(t,i.numberStyle,i.listEndStyle)}get optionBuilders(){return[new ee({OptionsClass:sa,nameKey:"rules.ordered-list-style.number-style.name",descriptionKey:"rules.ordered-list-style.number-style.description",optionsKey:"numberStyle",records:[{value:"ascending",description:"Makessureorderedlistitemsareascending(i.e.1,2,3,etc.)"},{value:"lazy",description:"Makessureorderedlistitemindicatorsallarethenumber1"}]}),new ee({OptionsClass:sa,nameKey:"rules.ordered-list-style.list-end-style.name",descriptionKey:"rules.ordered-list-style.list-end-style.description",optionsKey:"listEndStyle",records:[{value:".",description:"Makessureorderedlistitemsindicatorsendin'.'(i.e`1.`)"},{value:")",description:"Makessureorderedlistitemindicatorsendin')'(i.e.`1)`)"}]})]}};aa=z([y.register],aa);var kc=class{},oa=class extends y{constructor(){super({nameKey:"rules.paragraph-blank-lines.name",
---`,""));if(!r)return n;for(let a of bi)if(i.sortAliasKey&&Object.keys(r).includes(a)){n=ae(n,a,be(ot(this.sortArray(qe(de(n,a)),i.sortOrder)),i.aliasArrayStyle,i.defaultEscapeCharacter,i.removeUnnecessaryEscapeCharsForMultiLineArrays,!0));break}for(let a of yi)if(i.sortTagKey&&Object.keys(r).includes(a)){n=ae(n,a,be(st(this.sortArray(qe(de(n,a)),i.sortOrder)),i.tagArrayStyle,i.defaultEscapeCharacter,i.removeUnnecessaryEscapeCharsForMultiLineArrays));break}if(i.sortArrayKeys){let a=[...bi,...yi,...i.ignoreSortArrayKeys];for(let s of Object.keys(r)){if(a.includes(s)||!Array.isArray(r[s])||r[s].length!==0&&typeof r[s][0]=="object"&&r[s][0]!==null)continue;let o=de(n,s),l="single-line";o.includes(`
`)&&(l="multi-line");let c=this.sortArray(qe(o),i.sortOrder);n=ae(n,s,be(c,l,i.defaultEscapeCharacter,i.removeUnnecessaryEscapeCharsForMultiLineArrays))}}return n})}sortArray(t,i){return t==null||typeof t=="string"||t.length<=1||(t.sort(function(n,r){let a=n.toLowerCase().localeCompare(r.toLowerCase());return a===0?n.localeCompare(r):a}),i==="Ascending Alphabetical")||t.reverse(),t}get optionBuilders(){return[new H({OptionsClass:gi,nameKey:"rules.sort-yaml-array-values.sort-alias-key.name",descriptionKey:"rules.sort-yaml-array-values.sort-alias-key.description",optionsKey:"sortAliasKey"}),new H({OptionsClass:gi,nameKey:"rules.sort-yaml-array-values.sort-tag-key.name",descriptionKey:"rules.sort-yaml-array-values.sort-tag-key.description",optionsKey:"sortTagKey"}),new H({OptionsClass:gi,nameKey:"rules.sort-yaml-array-values.sort-array-keys.name",descriptionKey:"rules.sort-yaml-array-values.sort-array-keys.description",optionsKey:"sortArrayKeys"}),new pe({OptionsClass:gi,nameKey:"rules.sort-yaml-array-values.ignore-keys.name",descriptionKey:"rules.sort-yaml-array-values.ignore-keys.description",optionsKey:"ignoreSortArrayKeys"}),new ee({OptionsClass:gi,nameKey:"rules.sort-yaml-array-values.sort-order.name",descriptionKey:"rules.sort-yaml-array-values.sort-order.description",optionsKey:"sortOrder",records:[{value:"Ascending Alphabetical",description:"Sorts the array values from a to z"},{value:"Descending Alphabetical",description:"Sorts the array values from z to a"}]})]}};Aa=z([y.register],Aa);var Rc=class{},Sa=class extends y{constructor(){super({nameKey:"rules.space-after-list-markers.name",descriptionKey:"rules.space-after-list-markers.description",type:"Spacing",ruleIgnoreTypes:[h.code,h.math,h.yaml,h.link,h.wikiLink,h.tag]})}get OptionsClass(){return Rc}apply(t,i){return t=t.replace(/^(\s*\d+\.|\s*[-+*])[^\S\r\n]+/gm,"$1 "),t.replace(/^(\s*\d+\.|\s*[-+*]\s+\[[ xX]\])[^\S\r\n]+/gm,"$1 ")}get optionBuilders(){return[]}};Sa=z([y.register],Sa);var Ta=class{constructor(){this.englishNonLetterCharactersAfterCJKCharacters=`-+'"([\xA5$`;this.englishNonLetterCharactersBeforeCJKCharacters=`-+;:'"\xB0%$)]`}},La=class extends y{constructor(){super({nameKey:"rules.space-between-chinese-japanese-or-korean-and-english-or-numbers.name",descriptionKey:"rules.space-between-chinese-japanese-or-korean-and-english-or-numbers.description",type:"Spacing",ruleIgnoreTypes:[h.code,h.inlineCode,h.yaml,h.image,h.link,h.wikiLink,h.tag,h.math,h.inlineMath,h.html]})}get OptionsClass(){return Ta}apply(t,i){let n=this.buildHeadRegex(i.englishNonLetterCharactersAfterCJKCharacters),r=this.buildTailRegex(i.englishNonLetterCharactersBeforeCJKCharacters),a=`${h.link.placeholder}|${h.inlineMath.placeholder}|${h.inlineCode.placeholder}|${h.wikiLink.placeholder}`.replaceAll("{","\\{").replaceAll("}","\\}"),s=new RegExp(`(\\p{sc=Han}|\\p{sc=Katakana}|\\p{sc=Hiragana}|\\p{sc=Hangul})( *)(${a})`,"gmu"),o=new RegExp(`(${a})( *)(\\p{sc=Han}|\\p{sc=Katakana}|\\p{sc=Hiragana}|\\p{sc=Hangul})`,"gmu"),l=function(d){return d.replace(n,"$1$3").replace(r,"$1$3")},c=Ee([h.italics,h.bold],t,l);return c=c.replace(s,"$1$3").replace(o,"$1$3"),c=tp(c,l),c=np(c,l),c}buildHeadRegex(t){t&&t!==""&&(t=t.replaceAll(/\s/g,""));let i="";return t&&t.length!=0&&(i=`|[${at(t)}]`),new RegExp(`(\\p{sc=Han}|\\p{sc=Katakana}|\\p{sc=Hiragana}|\\p{sc=Hangul})( *)(\\[[^[]*\\]\\(.*\\)|\`[^\`]*\`|\\w+${i}|\\*[^*])`,"gmu")}buildTailRegex(t){t&&t!==""&&(t=t.replaceAll(/\s/g,""));let i="";return t&&t.length!=0&&(i=`|[${at(t)}]`),new RegExp(`(\\[[^[]*\\]\\(.*\\)|\`[^\`]*\`|\\w+${i}|[^*]\\*)( *)(\\p{sc=Han}|\\p{sc=Katakana}|\\p{sc=Hiragana}|\\p{sc=Hangul})`,"gmu")}get optionBuilders(){return[new xe({OptionsClass:Ta,nameKey:"rules.space-between-chinese-japanese-or-korean-and-english-or-numbers.english-symbols-punctuation-before.name",descriptionKey:"rules.space-between-chinese-japanese-or-korean-and-english-or-numbers.english-symbols-punctuation-before.description",optionsKey:"englishNonLetterCharactersBeforeCJKCharacters"}),new xe({OptionsClass:Ta,nameKey:"rules.space-between-chinese-japanese-or
`,t=Mt(t,a,!1))}return{remainingYaml:t,sortedYamlKeyValues:r}}updateDateModifiedIfYamlChanged(t,i,n,r){return t==i?i:ae(i,n," "+r)}getTextWithNewYamlFrontmatter(t,i,n,r,a,s,o,l){let c=`${r}${n}`;return a&&(c=`${n}${r}`),l&&(c=this.updateDateModifiedIfYamlChanged(i,c,s,o)),t.replace(i,c)}sortAlphabeticallyAsc(t,i){return t=t.toLowerCase(),i=i.toLowerCase(),t<i?-1:i<t?1:0}sortAlphabeticallyDesc(t,i){return t=t.toLowerCase(),i=i.toLowerCase(),t>i?-1:i>t?1:0}get optionBuilders(){return[new pe({OptionsClass:Vi,nameKey:"rules.yaml-key-sort.yaml-key-priority-sort-order.name",descriptionKey:"rules.yaml-key-sort.yaml-key-priority-sort-order.description",optionsKey:"yamlKeyPrioritySortOrder"}),new H({OptionsClass:Vi,nameKey:"rules.yaml-key-sort.priority-keys-at-start-of-yaml.name",descriptionKey:"rules.yaml-key-sort.priority-keys-at-start-of-yaml.description",optionsKey:"priorityKeysAtStartOfYaml"}),new ee({OptionsClass:Vi,nameKey:"rules.yaml-key-sort.yaml-sort-order-for-other-keys.name",descriptionKey:"rules.yaml-key-sort.yaml-sort-order-for-other-keys.description",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"}]})]}};sn=z([y.register],sn);var Ai=require("obsidian");var Nc=gn(xm());var He=class{constructor(){this.dateCreatedKey="date created";this.dateCreated=!0;this.forceRetentionOfCreatedValue=!1;this.format="dddd, MMMM Do YYYY, h:mm:ss a";this.dateModified=!0;this.dateModifiedKey="date modified";this.convertToUTC=!1;this.locale="en"}};z([y.noSettingControl()],He.prototype,"alreadyModified",2),z([y.noSettingControl()],He.prototype,"fileCreatedTime",2),z([y.noSettingControl()],He.prototype,"fileModifiedTime",2),z([y.noSettingControl()],He.prototype,"locale",2),z([y.noSettingControl()],He.prototype,"currentTime",2),z([y.noSettingControl()],He.prototype,"fileName",2);var ht=class extends y{constructor(){super({nameKey:"rules.yaml-timestamp.name",descriptionKey:"rules.yaml-timestamp.description",type:"YAML",hasSpecialExecutionOrder:!0})}get OptionsClass(){return He}apply(t,i){let n=i.alreadyModified,r=Ci(t);return n=n||r!==t,i.format=i.format.trimEnd(),he(r,a=>{if(i.dateCreated){let s=!1;[a,s]=this.handleDateCreatedValue(a,i),n=n||s}return i.dateModified&&(a=this.handleDateModifiedValue(a,n,i)),a})}handleDateCreatedValue(t,i){let n=!1,r=`
---`,""),c=ri(s),d=i.aliasHelperKey??Vl;d.endsWith(":")&&(d=d.substring(0,d.length-1)),a=c[d]??null,a!=null&&(a=a+"",a=vi(a,i.defaultEscapeCharacter,this.forceEscape(a,i.aliasArrayStyle)));let u=null,m=Object.keys(c);for(let p of bi)if(m.includes(p)){u=p;break}if(u!=null){let p=de(l,u),g="multi-line",b=p==="",f=!1;!p.includes(`
`)&&!(p==="[]"&&i.aliasArrayStyle==="multi-line")&&(p.match(/^\[.*\]/)===null?(g="single string to single-line",f=!0):g="single-line");let x=ot(qe(p)),k=this.getNewAliasValue(x,o,r,a);k===""?l=Mt(l,u):i.preserveExistingAliasesSectionStyle?!b&&(f&&r==k||!f||x==k)?l=ae(l,u,be(k,g,i.defaultEscapeCharacter,i.removeUnnecessaryEscapeCharsForMultiLineArrays,!0)):l=ae(l,u,be(k,i.aliasArrayStyle,i.defaultEscapeCharacter,i.removeUnnecessaryEscapeCharsForMultiLineArrays,!0)):l=ae(l,u,be(k,i.aliasArrayStyle,i.defaultEscapeCharacter,i.removeUnnecessaryEscapeCharsForMultiLineArrays,!0))}else o||(l=ae(l,Wl,be(r,i.aliasArrayStyle,i.defaultEscapeCharacter,i.removeUnnecessaryEscapeCharsForMultiLineArrays,!0)));return!i.useYamlKeyToKeepTrackOfOldFilenameOrHeading||o?l=Mt(l,d):l=ae(l,d,`${r}`),t=t.replace(`---
${i.titleKey}:${n}`)}return r})}getFirstH1Header(t){return Ee([h.code,h.math,h.yaml,h.tag],t,qs)}get optionBuilders(){return[new xe({OptionsClass:ln,nameKey:"rules.yaml-title.title-key.name",descriptionKey:"rules.yaml-title.title-key.description",optionsKey:"titleKey"}),new ee({OptionsClass:ln,nameKey:"rules.yaml-title.mode.name",descriptionKey:"rules.yaml-title.mode.description",optionsKey:"mode",records:[{value:"first-h1-or-filename-if-h1-missing",description:"Uses the first H1 in the file or the filename of the file if there is not H1"},{value:"filename",description:"Uses the filename as the title"},{value:"first-h1",description:"Uses the first H1 in the file as the title"}]})]}};cn=z([y.register],cn);var Uw=`<svgxmlns="http://www.w3.org/2000/svg"width="100"height="100"viewBox="0 0 24 24"fill="none"stroke="currentColor"stroke-width="2"stroke-linecap="round"stroke-linejoin="round"class="lucide lucide-file-cog">
`),c+=`/${s.find}/${s.flags}/${s.replace}/`,ii(c);let d=new RegExp(`${s.find}`,s.flags);r=r.replace(d,uu(s.replace)),a!=r&&ii(r),a=r}return r})}runPasteLint(t,i,n){let r=n.oldText;return[r]=Xt.applyIfEnabled(r,n.settings,[]),[r]=nn.applyIfEnabled(r,n.settings,[]),[r]=tn.applyIfEnabled(r,n.settings,[]),[r]=Zt.applyIfEnabled(r,n.settings,[]),[r]=en.applyIfEnabled(r,n.settings,[]),[r]=Gt.applyIfEnabled(r,n.settings,[],{lineContent:t,selectedText:i}),[r]=Qt.applyIfEnabled(r,n.settings,[],{lineContent:t,selectedText:i}),[r]=Yt.applyIfEnabled(r,n.settings,[],{lineContent:t}),r}};function Ma(e,t=null,i,n){let r=t?(0,Yn.moment)(t.stat.ctime):(0,Yn.moment)();r.locale(i);let a=t?(0,Yn.moment)(t.stat.mtime):(0,Yn.moment)();a.locale(i);let s=a.format(),o=r.format();return{oldText:e,fileInfo:{name:t?t.basename:"",createdAtFormatted:o,modifiedAtFormatted:s},settings:n,momentLocale:i,getCurrentTime:()=>{let l=(0,Yn.moment)();return l.locale(i),l}}}var zo=require("obsidian");var qa=class extends zo.Modal{constructor(t,i,n,r,a,s=!1){super(t),this.modalEl.addClass("confirm-modal"),this.contentEl.createEl("h3",{text:A("warning-text")}).style.textAlign="center",s&&(this.contentEl.createEl("p",{text:A("custom-command-warning")}).style.fontWeight="bold"),this.contentEl.createEl("p",{text:i+" "+A("file-backup-text")}).id="confirm-dialog",this.contentEl.createDiv("modal-button-container",o=>{o.createEl("button",{text:A("cancel-button-text")}).addEventListener("click",()=>this.close());let l=o.createEl("button",{attr:{type:"submit"},cls:"mod-cta",text:n});l.addEventListener("click",async c=>{new zo.Notice(r),this.close(),await a()}),setTimeout(()=>{l.focus()},50)})}};var yt=require("obsidian");var wm=require("obsidian");var sk={General:Ce.general.id,Custom:Ce.custom.id,YAML:Ce.yaml.id,Heading:Ce.heading.id,Footnote:Ce.footer.id,Content:Ce.content.id,Spacing:Ce.whitespace.id,Paste:Ce.paste.id,Debug:Ce.debug.id},ok={General:"tabs.names.general",Custom:"tabs.names.custom",YAML:"tabs.names.yaml",Heading:"tabs.names.heading",Footnote:"tabs.names.footnote",Content:"tabs.names.content",Spacing:"tabs.names.spacing",Paste:"tabs.names.paste",Debug:"tabs.names.debug"},Ii=class{constructor(t,i,n,r,a){this.name=n;this.isMobile=r;this.plugin=a;this.searchSettingInfo=[];this.navButton=t.createDiv("linter-navigation-item");let s="linter-desktop";r&&(s="linter-mobile"),this.navButton.addClass(s),(0,wm.setIcon)(this.navButton.createSpan({cls:"linter-navigation-item-icon"}),sk[n]);let o=A(ok[n]);this.navButton.createSpan().setText(o),this.contentEl=i.createDiv("linter-tab-settings"),this.contentEl.id=n.toLowerCase().replace(" ","-"),this.headingEl=this.contentEl.createEl("h2",{text:o}),ci(this.headingEl)}addSettingSearchInfo(t,i="",n="",r=null,a=null){this.searchSettingInfo.push({containerEl:t,name:i.toLowerCase(),description:n.toLowerCase(),options:r,alias:a})}addSettingSearchInfoForGeneralSettings(t){this.searchSettingInfo.push({containerEl:t.containerEl,name:t.name.toLowerCase(),description:t.description.toLowerCase(),options:null,alias:null})}updateTabDisplayMode(t,i="the status is still the same"){switch(t?(this.navButton.addClass("linter-navigation-item-selected"),Mi(this.contentEl)):(this.navButton.removeClass("linter-navigation-item-selected"),ci(this.contentEl)),i){case"entering search mode by focusing on the search input box":Mi(this.contentEl),Mi(this.headingEl);for(let n of this.searchSettingInfo)Mi(n.containerEl);break;case"leaving search mode by selecting a tab":ci(this.headingEl);for(let n of this.searchSettingInfo)Mi(n.containerEl);break}}};var Em=require("obsidian");var km=require("obsidian");var Ia={ruleConfigs:{},lintOnSave:!1,recordLintOnSaveLogs:!1,displayChanged:!0,lintOnFileChange:!1,displayLintOnFileChangeNotice:!1,settingsConvertedToConfigKeyValues:!1,foldersToIgnore:[],filesToIgnore:[],linterLocale:"system-default",logLevel:"ERROR",lintCommands:[],customRegexes:[],commonStyles:{aliasArrayStyle:"single-line",tagArrayStyle:"single-line",minimumNumberOfDollarSignsToBeAMathBlock:2,escapeCharacter:'"',removeUnnecessaryEscapeCharsForMultiLineA
`," "))}};var Eo=class extends Ii{constructor(i,n,r,a,s,o){super(i,n,r,s,o);this.rules=a;this.display()}display(){for(let i of this.rules){let n=this.contentEl.createDiv();n.id=i.alias,n.createEl(this.isMobile?"h4":"h3",{},a=>{a.innerHTML=`<ahref="${i.getURL()}">${i.getName()}</a>`});letr=[];for(letaofi.options)a.display(n,this.plugin.settings,this.plugin),r.push(a.getSearchInfo());this.addSettingSearchInfo(n,i.getName().toLowerCase(),i.getDescription().toLowerCase(),r,n.id)}}};varCm=require("obsidian");varFa=classextendsdt{constructor(i,n,r=[]){super(i,n);this.app=i;this.inputEl=n;this.valuesToExclude=r}getSuggestions(i){letn=this.app.commands.listCommands();if(!n)return[];letr=n.filter(o=>{for(letlofthis.valuesToExclude)if(l.id==o.id&&!(this.inputEl.hasAttribute("commandId")&&this.inputEl.getAttribute("commandId")==o.id))return!1;return!0}),a=[],s=i.toLowerCase();returnr.forEach(o=>{(o.id.contains(s)||o.name.toLowerCase().contains(s))&&a.push(o)}),a}renderSuggestion(i,n){n.setText(i.name)}selectSuggestion(i){this.inputEl.value=i.name,this.inputEl.setAttribute("commandId",i.id),this.inputEl.trigger("input"),this.close()}};varCo=classextendsdi{constructor(i,n,r,a,s){super(i,n,A("options.custom-command.name"),A("options.custom-command.description"),A("options.custom-command.warning"),A("options.custom-command.add-input-button-text"),s,()=>{leto={id:"",name:""};this.lintCommands.push(o),this.saveSettings(),this.addCommand(o,this.lintCommands.length-1,!0)});this.lintCommands=r;this.app=a;this.display()}showInputEls(){this.lintCommands.forEach((i,n)=>{this.addCommand(i,n)})}addCommand(i,n,r=!1){newCm.Setting(this.inputElDiv).addSearch(a=>{newFa(this.app,a.inputEl,this.lintCommands),a.setPlaceholder(A("options.custom-command.command-search-placeholder-text")).setValue(i.name).onChange(s=>{leto={id:a.inputEl.getAttribute("commandId"),name:s};o.name&&o.id?(this.lintCommands[n]=o,this.saveSettings()):!o.name&&!o.id&&(this.lintCommands[n]=o,this.saveSettings())}),a.inputEl.setAttr("tabIndex",n),a.inputEl.addClass("linter-custom-command"),r&&a.inputEl.focus()}).addExtraButton(a=>{a.setIcon("up-chevron-glyph").setTooltip(A("options.custom-command.move-up-tooltip")).onClick(()=>{this.arrayMove(n,n-1),this.saveSettings(),this.resetInputEls()})}).addExtraButton(a=>{a.setIcon("down-chevron-glyph").setTooltip(A("options.custom-command.move-down-tooltip")).onClick(()=>{this.arrayMove(n,n+1),this.saveSettings(),this.resetInputEls()})}).addExtraButton(a=>{a.setIcon("cross").setTooltip(A("options.custom-command.delete-tooltip")).onClick(()=>{this.lintCommands.splice(n,1),this.saveSettings(),this.resetInputEls()})})}arrayMove(i,n){if(n<0||n===this.lintCommands.length)return;letr=this.lintCommands[i];this.lintCommands[i]=this.lintCommands[n],this.lintCommands[n]=r}};varjc=require("obsidian");varck="gm",Oo=classextendsdi{constructor(i,n,r,a){super(i,n,A("options.custom-replace.name"),A("options.custom-replace.description"),A("options.custom-replace.warning"),A("options.custom-replace.add-input-button-text"),a,()=>{lets={label:"",find:"",replace:"",flags:ck};this.regexes.push(s),this.saveSettings(),this.addRegex(s,this.regexes.length-1,!0)});this.regexes=r;this.display(),this.inputElDiv.addClass("linter-custom-regex-replacement-container")}showInputEls(){this.regexes.forEach((i,n)=>{this.addRegex(i,n)})}addRegex(i,n,r=!1){leta=this.inputElDiv.createDiv({cls:"linter-custom-regex-replacement"}),s=a.createDiv(),o=newjc.Setting(s).addText(d=>{d.setPlaceholder(A("options.custom-replace.label-placeholder-text")).setValue(i.label).onChange(u=>{this.regexes[n].label=u,this.saveSettings()}),d.inputEl.setAttr("inputIndex",n),d.inputEl.addClass("linter-custom-regex-replacement-label-input"),r&&d.inputEl.focus()});o.controlEl.addClass("linter-custom-regex-replacement-label"),o.descEl.remove(),o.infoEl.remove(),o.nameEl.remove();letl=a.createDiv();newjc.Setting(l).addText(d=>{d.setPlaceholder(A("options.custom-replace.regex-to-find-placeholder-text")).setValue(i.find).onChange(u=>{this.regexes[n].find=u,this.saveSettings()})
`," "))}};var Om=require("obsidian");var qo=class{constructor(t,i,n,r){this.containerEl=t;this.searchZeroState=i;this.tabNameToTab=n;this.onFocus=r;this.searchSettingInfo=new Map;for(let[a,s]of n)this.searchSettingInfo.set(a,s.searchSettingInfo);this.display()}display(){let t=new Om.Setting(this.containerEl);t.settingEl.style.border="none",t.addSearch(i=>{this.search=i}),this.search.setPlaceholder(A("tabs.default-search-bar-text")),this.search.inputEl.onfocus=()=>{this.onFocus()},this.search.onChange(i=>{this.searchSettings(i.toLowerCase())})}searchSettings(t){let i=new Set,n=function(r,a){Mi(r),i.has(a)||i.add(a)};for(let[r,a]of this.searchSettingInfo)for(let s of a)if(t.trim()===""||s.alias?.includes(t)||s.description.includes(t)||s.name.includes(t))n(s.containerEl,r);else if(s.options)for(let o of s.options){if(o.description.toLowerCase().includes(t)||o.name.toLowerCase().includes(t)){n(s.containerEl,r);break}else if(o.options){for(let l of o.options)if(l.description.toLowerCase().includes(t)||l.value.toLowerCase().includes(t)){n(s.containerEl,r);break}}ci(s.containerEl)}else ci(s.containerEl);for(let[r,a]of this.tabNameToTab)i.has(r)?Mi(a.headingEl):ci(a.headingEl);i.size===0?Mi(this.searchZeroState):ci(this.searchZeroState)}focusOnInput(){this.search.inputEl.focus()}};var Mm=gn(Za());var Pn=require("obsidian");var Ra=class{constructor(t,i,n,r=!0){this.containerEl=t;this.name=i;this.description=n;this.disabled=r;this.display()}display(){let t=this.containerEl.createDiv(),i=t.createDiv("setting-item-info");this.nameEl=i.createDiv("setting-item-name"),this.nameEl.setText(this.name),this.descEl=i.createDiv("setting-item-description"),this.descEl.setText(this.description),this.inputContainerEl=t.createDiv("full-width-textbox-input-wrapper"),this.inputContainerEl.onmouseover=()=>{this.getInput().trim()!=""&&this.copyEl.removeClass("linter-visually-hidden")},this.inputContainerEl.onmouseleave=()=>{this.copyEl.addClass("linter-visually-hidden")},this.inputEl=this.inputContainerEl.createEl("textarea",{cls:"full-width"}),this.inputEl.spellcheck=!1,this.inputEl.disabled=this.disabled,this.copyEl=this.inputContainerEl.createDiv({cls:"settings-copy-button linter-visually-hidden ",attr:{"aria-label":A("copy-aria-label")}}),this.copyIconEl=this.copyEl.createSpan(),(0,Pn.setIcon)(this.copyIconEl,"linter-clipboard"),this.copyIconEl.onclick=()=>{this.handleCopy(this.copyIconEl)}}getInput(){return this.inputEl.value}handleCopy(t){navigator.clipboard.writeText(this.getInput()).then(()=>{(0,Pn.setIcon)(t,"linter-success"),setTimeout(()=>{(0,Pn.setIcon)(t,"linter-clipboard")},1500)},i=>{new Pn.Notice(`${A("notice-text.copy-to-clipboard-failed")+i}`,0)})}};var dk=Object.keys(Mm.default.levels),Io=class extends Ii{constructor(t,i,n,r){super(t,i,"Debug",n,r),this.display()}display(){let t=this.contentEl.createDiv(),i={isForEnum:!0,values:dk,descriptions:[]};this.addSettingSearchInfoForGeneralSettings(new $i(t,"tabs.debug.log-level.name","tabs.debug.log-level.description","logLevel",this.plugin,i,async()=>{is(this.plugin.settings.logLevel)})),t=this.contentEl.createDiv();let n=A("tabs.debug.linter-config.name"),r=A("tabs.debug.linter-config.description");new Ra(t,n,r).inputEl.setText(JSON.stringify(this.plugin.settings,null,2)),this.addSettingSearchInfo(t,n,r),t=this.contentEl.createDiv(),this.addSettingSearchInfoForGeneralSettings(new Bi(t,"tabs.debug.log-collection.name","tabs.debug.log-collection.description","recordLintOnSaveLogs",this.plugin)),t=this.contentEl.createDiv(),n=A("tabs.debug.linter-logs.name"),r=A("tabs.debug.linter-logs.description");let s=new Ra(t,n,"");s.inputEl.setText(Xa.join(`
`)),Oi(r,s.descEl,this.plugin.settingsTab.component),this.addSettingSearchInfo(t,n,r)}};var Bo=class extends yt.PluginSettingTab{constructor(i,n){super(i,n);this.plugin=n;this.tabNameToTab=new Map;this.selectedTab="General";this.component=new yt.Component}display(){let{containerEl:i}=this;this.component.load(),i.empty();let n=i.createDiv("linter-setting-title");yt.Platform.isMobile?n.addClass("linter-mobile"):n.createEl("h1").setText(A("linter-title")),this.navContainer=i.createEl("nav",{cls:"linter-setting-header"}),this.tabNavEl=this.navContainer.createDiv("linter-setting-tab-group"),this.settingsContentEl=i.createDiv("linter-setting-content"),this.addTabs(yt.Platform.isMobile),this.createSearchZeroState(yt.Platform.isMobile),this.generateSearchBar(n),this.selectedTab==""&&this.tabSearcher.focusOnInput()}hide(){this.component.unload()}addTabs(i){this.addTab(new To(this.tabNavEl,this.settingsContentEl,i,this.plugin,this.app));for(let n of Object.values(R))this.addTab(new Eo(this.tabNavEl,this.settingsContentEl,n,Nt.get(n),i,this.plugin));this.addTab(new Mo(this.tabNavEl,this.settingsContentEl,i,this.app,this.plugin)),this.addTab(new Io(this.tabNavEl,this.settingsContentEl,i,this.plugin))}generateSearchBar(i){this.tabSearcher=new qo(i,this.searchZeroState,this.tabNameToTab,()=>{for(let n of this.tabNameToTab.values()){n.updateTabDisplayMode(!1,"entering search mode by focusing on the search input box");let r=this.tabSearcher.search.getValue();this.selectedTab==""&&r.trim()!=""&&this.tabSearcher.searchSettings(r.toLowerCase()),this.selectedTab=""}})}createSearchZeroState(i){this.searchZeroState=this.settingsContentEl.createDiv(),ci(this.searchZeroState),this.searchZeroState.createEl(i?"h3":"h2",{text:A("empty-search-results-text")}).style.textAlign="center"}addTab(i){i.navButton.onclick=()=>{this.onTabClick(i.name)},i.updateTabDisplayMode(this.selectedTab===i.name,"the status is still the same"),this.tabNameToTab.set(i.name,i)}onTabClick(i){if(this.selectedTab!==i){if(this.selectedTab=="")for(let[n,r]of this.tabNameToTab)r.updateTabDisplayMode(n===i,"leaving search mode by selecting a tab");else ci(this.searchZeroState),this.tabNameToTab.get(i).updateTabDisplayMode(!0),this.tabNameToTab.get(this.selectedTab).updateTabDisplayMode(!1);this.selectedTab=i}}};var Im=require("obsidian");var uk=/^---\n/gm,qm=`${Sn}:`,Fo=class extends Im.EditorSuggest{constructor(i){super(i.app);this.plugin=i;this.inline=!1;let n=A("all-rules-option");this.ruleInfo=[{displayName:n,name:n.toLowerCase(),alias:"all"}];for(let r of qi){let a=r.getName();this.ruleInfo.push({displayName:a,name:a.toLowerCase(),alias:r.alias})}}onTrigger(i,n,r){let a=n.getLine(i.line).toLowerCase();if(a.startsWith(qm)||this.disabledRulesIsEndOfStartOfFileToCursor(n.getRange({line:0,ch:0},i))){this.inline=a.startsWith(qm);let o=n.getLine(i.line).substring(0,i.ch),l=o.match(/(\S+)$/)?.first().replaceAll("[","").replaceAll("]","");if(l)return{end:i,start:{ch:o.lastIndexOf(l),line:i.line},query:l}}return null}getSuggestions(i){let[n,r]=$s(i.editor.getValue());if(r)return[];let a=i.query.toLowerCase();return this.ruleInfo.filter(o=>(o.name.contains(a)||o.alias.contains(a))&&!n.includes(o.alias))}renderSuggestion(i,n){n.addClass("mod-complex");let r=n.createDiv({cls:"suggestion-content"});r.createDiv({cls:"suggestion-title"}).setText(`${i.displayName}`),r.createDiv({cls:"suggestion-note"}).setText(`${i.alias}`)}selectSuggestion(i){if(this.context){let n=i.alias;this.inline?n=`${n},`:n=`${n}
`),a=[];if(r.length%i.length!==0)for(let s=0;s<i.length;s++)a.push(n);else{let s=r.length/i.length,o="";for(let l=0;l<r.length;l++)o+=r[l],(l+1===i.length||(l+1)%s===0)&&(a.push(o),o="")}return a}async pasteAsPlainText(i){let n=await navigator.clipboard.readText();if(!n){new X.Notice(A("notice-text.empty-clipboard"),bt);return}i.replaceSelection(n)}setCustomCommandCallback(i){(0,_m.warn)(A("logs.custom-command-callback-warning")),this.customCommandsCallback=i}async runCustomCommandsInSidebar(i){if(!this.settings.lintCommands||this.settings.lintCommands.length==0||!this.hasCustomCommands)return;let n=this.app.workspace.getRightLeaf(!1),r=this.getEditor();await this.customCommandsLock.acquire("command",async()=>{this.currentlyOpeningSidebar=!0,await n.openFile(i),this.rulesRunner.runCustomCommands(this.settings.lintCommands,this.app.commands),this.customCommandsCallback&&await this.customCommandsCallback(i)}),n.detach(),r&&r.focus(),this.currentlyOpeningSidebar=!1}async runCustomCommands(i){!this.settings.lintCommands||this.settings.lintCommands.length==0||!this.hasCustomCommands||await this.customCommandsLock.acquire("command",async()=>{try{this.rulesRunner.runCustomCommands(this.settings.lintCommands,this.app.commands)}catch(n){this.handleLintError(i,n,A("commands.lint-file.error-message")+" '{FILE_PATH}'",!1)}this.customCommandsCallback&&await this.customCommandsCallback(i)})}getEditor(){let i=this.app.workspace.getActiveViewOfType(X.MarkdownView);return i?i.editor:null}getCurrentMode(){let i=this.app.workspace.getActiveFileView();if(!i)return;let n=i.getState();return Object.hasOwn(n,"source")?n.source?"source":"preview":null}getLineContent(i,n){return i.getLine(n.anchor.line)}moveConfigValuesToKeyBasedFormat(){rs("en");for(let i of qi){let n=A("rules."+i.alias+".name"),r=this.settings.ruleConfigs[n];if(r!=null){let a=A("rules."+i.alias+".description"),s={enabled:r[a]??!1};for(let o of i.options){if(o.configKey==="enabled")continue;let l=A("rules."+i.alias+"."+o.configKey+".name");s[o.configKey]=r[l]??o.defaultValue}this.settings.ruleConfigs[i.alias]=s,delete this.settings.ruleConfigs[n]}}this.settings.settingsConvertedToConfigKeyValues=!0,this.saveSettings(),rs(window.localStorage.getItem("language"))}getAllFilesInFolder(i){let n=[],r=[i];for(let a of r)for(let s of a.children)s instanceof X.TFile&&this.isMarkdownFile(s)?n.push(s):s instanceof X.TFolder&&r.push(s);return n}updatePasteOverrideStatus(){for(let i of Nt.get("Paste"))if(i.getOptions(this.settings).enabled){this.overridePaste=!0;return}this.overridePaste=!1}updateHasCustomCommandStatus(){for(let i of this.settings.lintCommands)if(i.id&&i.id.trim()!=""){this.hasCustomCommands=!0;return}this.hasCustomCommands=!1}endOfDocument(i){let n=i.split(`
`);return{line:n.length-1,ch:n[n.length-1].length}}async loadCustomReplacements(){for(let i of this.settings.ruleConfigs["auto-correct-common-misspellings"]["extra-auto-correct-files"]??[])if(i.filePath!=""){let n=this.getFileFromPath(i.filePath);n&&(i.customReplacements=ds(nr(await this.app.vault.cachedRead(n))))}this.hasLoadedFiles=!0}getFileFromPath(i){let n=this.app.vault.getAbstractFileByPath((0,X.normalizePath)(i));return n instanceof X.TFile?n:null}};