varCm=Object.create;varWn=Object.defineProperty;var_c=Object.getOwnPropertyDescriptor;varMm=Object.getOwnPropertyNames;varqm=Object.getPrototypeOf,Im=Object.prototype.hasOwnProperty;varun=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Fc=(e,t)=>{for(variint)Wn(e,i,{get:t[i],enumerable:!0})},Rc=(e,t,i,n)=>{if(t&&typeoft=="object"||typeoft=="function")for(letrofMm(t))!Im.call(e,r)&&r!==i&&Wn(e,r,{get:()=>t[r],enumerable:!(n=_c(t,r))||n.enumerable});returne};varpn=(e,t,i)=>(i=e!=null?Cm(qm(e)):{},Rc(t||!e||!e.__esModule?Wn(i,"default",{value:e,enumerable:!0}):i,e)),Bm=e=>Rc(Wn({},"__esModule",{value:!0}),e),z=(e,t,i,n)=>{for(varr=n>1?void0:n?_c(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&&Wn(t,i,r),r};varqo=(e,t,i)=>{if(!t.has(e))throwTypeError("Cannot "+i)};varY=(e,t,i)=>(qo(e,t,"read from private field"),i?i.call(e):t.get(e)),ve=(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)},Ie=(e,t,i,n)=>(qo(e,t,"write to private field"),n?n.call(e,i):t.set(e,i),i);varIo=(e,t,i,n)=>({set_(r){Ie(e,t,r,i)},get_(){returnY(e,t,n)}}),he=(e,t,i)=>(qo(e,t,"access private method"),i);varUa=un((Td,Wa)=>{(function(e,t){"use strict";typeofdefine=="function"&&define.amd?define(t):typeofWa=="object"&&Wa.exports?Wa.exports=t():e.log=t()})(Td,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(h,x){vary=h[x];if(typeofy.bind=="function")returny.bind(h);try{returnFunction.prototype.bind.call(y,h)}catch{returnfunction(){returnFunction.prototype.apply.apply(y,[h,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(h){returnh==="debug"&&(h="log"),typeofconsole===t?!1:h==="trace"&&i?o:console[h]!==void0?s(console,h):console.log!==void0?s(console,"log"):e}functionc(){for(varh=this.getLevel(),x=0;x<n.length;x++){vary=n[x];this[y]=x<h?e:this.methodFactory(y,h,this.name)}if(this.log=this.debug,typeofconsole===t&&h<this.levels.SILENT)return"No console available for logging"}functiond(h){returnfunction(){typeofconsole!==t&&(c.call(this),this[h].apply(this,arguments))}}functionu(h,x,y){returnl(h)||d.apply(this,arguments)}functiong(h,x){vary=this,S,A,T,C="loglevel";typeofh=="string"?C+=":"+h:typeofh=="symbol"&&(C=void0);functionq(K){varW=(n[K]||"silent").toUpperCase();if(!(typeofwindow===t||!C)){try{window.localStorage[C]=W;return}catch{}try{window.document.cookie=encodeURIComponent(C)+"="+W+";"}catch{}}}functionL(){varK;if(!(typeofwindow===t||!C)){try{K=window.localStorage[C]}catch{}if(typeofK===t)try{varW=window.document.cookie,Q=encodeURIComponent(C),R=W.indexOf(Q+"=");R!==-1&&(K=/^([^;]+)/.exec(W.slice(R+Q.length+1))[1])}catch{}returny.levels[K]===void0&&(K=void0),K}}function_(){if(!(typeofwindow===t||!C)){try{window.localStorage.removeItem(C)}catch{}try{window.document.cookie=encodeURIComponent(C)+"=; expires=Thu, 01 Jan 1970 00:00:00 UTC"}catch{}}}functionN(K){varW=K;if(typeofW=="string"&&y.levels[W.toUpperCase()]!==void0&&(W=y.levels[W.toUpperCase()]),typeofW=="number"&&W>=0&&W<=y.levels.SILENT)returnW;thrownewTypeError("log.setLevel() called with invalid level: "+K)}y.name=h,y.levels={TRACE:0,DEBUG:1,INFO:2,WARN:3,ERROR:4,SILENT:5},y.methodFactory=x||u,y.getLevel=function(){returnT??A??S},y.setLevel=function(K,W){returnT=N(K),W!==!1&&q(T),c.call(y)},y.setDefaultLevel=function(K){A=N(K),L()||y.setLevel(K,!1)},y.resetLevel=function(){T=null,_(),c.call(y)},y.enableAll=function(K){y.setLevel(y.levels.TRACE,K)},y.disableAll=function(K){y.setLevel(y.levels.SILENT,K)},y.rebuild=function(){if(a!==y&&(S=N(a.getLevel())),c.call(y),a===y)for(varKinr)r[K].rebuild()},S=N(a?a.getLevel():"WARN");varF=L();F!=null&&(T=N(F)),c.call(y)}a=newg,a.getLogger=f
`;return o.replace(/\n$/,"")}var Um=Wm,Vm=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],Gm=["scalar","sequence","mapping"];function Qm(e){var t={};return e!==null&&Object.keys(e).forEach(function(i){e[i].forEach(function(n){t[String(n)]=i})}),t}function Zm(e,t){if(t=t||{},Object.keys(t).forEach(function(i){if(Vm.indexOf(i)===-1)throw new Ue('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=Qm(t.styleAliases||null),Gm.indexOf(this.kind)===-1)throw new Ue('Unknown kind "'+this.kind+'" is specified for "'+e+'" YAML type.')}var je=Zm;function Dc(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 Jm(){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 Ro(e){return this.extend(e)}Ro.prototype.extend=function(t){var i=[],n=[];if(t instanceof je)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 Ue("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");i.forEach(function(a){if(!(a instanceof je))throw new Ue("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(a.loadKind&&a.loadKind!=="scalar")throw new Ue("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 Ue("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 je))throw new Ue("Specified list of YAML types (or a single Type object) contains a non-Type object.")});var r=Object.create(Ro.prototype);return r.implicit=(this.implicit||[]).concat(i),r.explicit=(this.explicit||[]).concat(n),r.compiledImplicit=Dc(r,"implicit"),r.compiledExplicit=Dc(r,"explicit"),r.compiledTypeMap=Jm(r.compiledImplicit,r.compiledExplicit),r};var Xm=Ro,eg=new je("tag:yaml.org,2002:str",{kind:"scalar",construct:function(e){return e!==null?e:""}}),ig=new je("tag:yaml.org,2002:seq",{kind:"sequence",construct:function(e){return e!==null?e:[]}}),tg=new je("tag:yaml.org,2002:map",{kind:"mapping",construct:function(e){return e!==null?e:{}}}),ng=new Xm({explicit:[eg,ig,tg]});function rg(e){if(e===null)return!0;var t=e.length;return t===1&&e==="~"||t===4&&(e==="null"||e==="Null"||e==="NULL")}function ag(){return null}function sg(e){return e===null}var og=new je("tag:yaml.org,2002:null",{kind:"scalar",resolve:rg,construct:ag,predicate:sg,represent:{canonical:function(){return"~"},lowercase:function(){return"null"},uppercase:function(){return"NULL"},camelcase:function(){return"Null"},empty:function(){return""}},defaultStyle:"lowercase"});function lg(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 cg(e){return e==="true"||e==="True"||e==="TRUE"}function dg(e){return Object.prototype.toString.call(e)==="[object Boolean]"}var ug=new je("tag:yaml.org,2002:bool",{kind:"scalar",resolve:lg,construct:cg,predicate:dg,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 ah(e){return e<=65535?String.fromCharCode(e):String.fromCharCode((e-65536>>10)+55296,(e-65536&1023)+56320)}var ld=new Array(256),cd=new Array(256);for(xt=0;xt<256;xt++)ld[xt]=Yc(xt)?1:0,cd[xt]=Yc(xt);var xt;function sh(e,t){this.input=e,this.filename=t.filename||null,this.schema=t.schema||nd,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 dd(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=Um(i),new Ue(t,i)}function j(e,t){throw dd(e,t)}function ja(e,t){e.onWarning&&e.onWarning.call(null,dd(e,t))}var jc={YAML:function(t,i,n){var r,a,s;t.version!==null&&j(t,"duplication of %YAML directive"),n.length!==1&&j(t,"YAML directive accepts exactly one argument"),r=/^([0-9]+)\.([0-9]+)$/.exec(n[0]),r===null&&j(t,"ill-formed argument of the YAML directive"),a=parseInt(r[1],10),s=parseInt(r[2],10),a!==1&&j(t,"unacceptable YAML version of the document"),t.version=n[0],t.checkLineBreaks=s<2,s!==1&&s!==2&&ja(t,"unsupported YAML version of the document")},TAG:function(t,i,n){var r,a;n.length!==2&&j(t,"TAG directive accepts exactly two arguments"),r=n[0],a=n[1],sd.test(r)||j(t,"ill-formed tag handle (first argument) of the TAG directive"),Qi.call(t.tagMap,r)&&j(t,'there is a previously declared suffix for "'+r+'" tag handle'),od.test(a)||j(t,"ill-formed tag prefix (second argument) of the TAG directive");try{a=decodeURIComponent(a)}catch{j(t,"tag prefix is malformed: "+a)}t.tagMap[r]=a}};function Gi(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||j(e,"expected valid JSON character");else Xg.test(o)&&j(e,"the stream contains non-printable characters");e.result+=o}}function Pc(e,t,i,n){var r,a,s,o;for(Te.isObject(i)||j(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],Qi.call(t,a)||(t[a]=i[a],n[a]=!0)}function hn(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])&&j(e,"nested arrays are not supported inside keys"),typeof r=="object"&&Nc(r[c])==="[object Object]"&&(r[c]="[object Object]");if(typeof r=="object"&&Nc(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)Pc(e,t,a[c],i);else Pc(e,t,a,i);else!e.json&&!Qi.call(i,r)&&Qi.call(t,r)&&(e.line=s||e.line,e.lineStart=o||e.lineStart,e.position=l||e.position,j(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 Po(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 ze(e,t,i){for(var n=0,r=e.input.charCodeAt(e.position);r!==0;){for(;wt(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(Ei(r))for(Po(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&&ja(e,"deficient indentation"),n}function $a(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||ii(i)))}function Ho(e,t){t===1?e.result+=" ":t>1&&(e.result+=Te.rep
`,t-1))}function oh(e,t,i){var n,r,a,s,o,l,c,d,u=e.kind,g=e.result,m;if(m=e.input.charCodeAt(e.position),ii(m)||gn(m)||m===35||m===38||m===42||m===33||m===124||m===62||m===39||m===34||m===37||m===64||m===96||(m===63||m===45)&&(r=e.input.charCodeAt(e.position+1),ii(r)||i&&gn(r)))return!1;for(e.kind="scalar",e.result="",a=s=e.position,o=!1;m!==0;){if(m===58){if(r=e.input.charCodeAt(e.position+1),ii(r)||i&&gn(r))break}else if(m===35){if(n=e.input.charCodeAt(e.position-1),ii(n))break}else{if(e.position===e.lineStart&&$a(e)||i&&gn(m))break;if(Ei(m))if(l=e.line,c=e.lineStart,d=e.lineIndent,ze(e,!1,-1),e.lineIndent>=t){o=!0,m=e.input.charCodeAt(e.position);continue}else{e.position=s,e.line=l,e.lineStart=c,e.lineIndent=d;break}}o&&(Gi(e,a,s,!1),Ho(e,e.line-l),a=s=e.position,o=!1),wt(m)||(s=e.position+1),m=e.input.charCodeAt(++e.position)}return Gi(e,a,s,!1),e.result?!0:(e.kind=u,e.result=g,!1)}function lh(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(Gi(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 Ei(i)?(Gi(e,n,r,!0),Ho(e,ze(e,!1,t)),n=r=e.position):e.position===e.lineStart&&$a(e)?j(e,"unexpected end of the document within a single quoted scalar"):(e.position++,r=e.position);j(e,"unexpected end of the stream within a single quoted scalar")}function ch(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 Gi(e,i,e.position,!0),e.position++,!0;if(o===92){if(Gi(e,i,e.position,!0),o=e.input.charCodeAt(++e.position),Ei(o))ze(e,!1,t);else if(o<256&&ld[o])e.result+=cd[o],e.position++;else if((s=nh(o))>0){for(r=s,a=0;r>0;r--)o=e.input.charCodeAt(++e.position),(s=th(o))>=0?a=(a<<4)+s:j(e,"expected hexadecimal character");e.result+=ah(a),e.position++}else j(e,"unknown escape sequence");i=n=e.position}else Ei(o)?(Gi(e,i,n,!0),Ho(e,ze(e,!1,t)),i=n=e.position):e.position===e.lineStart&&$a(e)?j(e,"unexpected end of the document within a double quoted scalar"):(e.position++,n=e.position)}j(e,"unexpected end of the stream within a double quoted scalar")}function dh(e,t){var i=!0,n,r,a,s=e.tag,o,l=e.anchor,c,d,u,g,m,h=Object.create(null),x,y,S,A;if(A=e.input.charCodeAt(e.position),A===91)d=93,m=!1,o=[];else if(A===123)d=125,m=!0,o={};else return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=o),A=e.input.charCodeAt(++e.position);A!==0;){if(ze(e,!0,t),A=e.input.charCodeAt(e.position),A===d)return e.position++,e.tag=s,e.anchor=l,e.kind=m?"mapping":"sequence",e.result=o,!0;i?A===44&&j(e,"expected the node content, but found ','"):j(e,"missed comma between flow collection entries"),y=x=S=null,u=g=!1,A===63&&(c=e.input.charCodeAt(e.position+1),ii(c)&&(u=g=!0,e.position++,ze(e,!0,t))),n=e.line,r=e.lineStart,a=e.position,fn(e,t,Na,!1,!0),y=e.tag,x=e.result,ze(e,!0,t),A=e.input.charCodeAt(e.position),(g||e.line===n)&&A===58&&(u=!0,A=e.input.charCodeAt(++e.position),ze(e,!0,t),fn(e,t,Na,!1,!0),S=e.result),m?hn(e,o,h,y,x,S,n,r,a):u?o.push(hn(e,null,h,y,x,S,n,r,a)):o.push(x),ze(e,!0,t),A=e.input.charCodeAt(e.position),A===44?(i=!0,A=e.input.charCodeAt(++e.position)):i=!1}j(e,"unexpected end of the stream within a flow collection")}function uh(e,t){var i,n,r=Fo,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)Fo===r?r=u===43?Kc:Jg:j(e,"repeat of a chomping mode identifier");else if((d=rh(u))>=0)d===0?j(e,"bad explicit indentation width of a block scalar; it cannot be less than one"):s?j(e,"repeat of an indentation width identifier"):(o=t+d-1,s=!0);else break;if(wt(u)){do u=e.input.charCodeAt(++e.position);while(wt(u));if(u===35)do u=e.input.charCodeAt(++e.position);while(!Ei(u)&&u!==0)}for(;u!==0;){for(Po(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;!Ei(u)&&u!==0;)u=e.input.charCodeAt(++e.position);Gi(e,i,e.position,!1)}return!0}function Hc(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,j(e,"tab characters must not be used in indentation")),!(l!==45||(s=e.input.charCodeAt(e.position+1),!ii(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,fn(e,t,ad,!1,!0),a.push(e.result),ze(e,!0,-1),l=e.input.charCodeAt(e.position),(e.line===i||e.lineIndent>t)&&l!==0)j(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 ph(e,t,i){var n,r,a,s,o,l,c=e.tag,d=e.anchor,u={},g=Object.create(null),m=null,h=null,x=null,y=!1,S=!1,A;if(e.firstTabInLine!==-1)return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=u),A=e.input.charCodeAt(e.position);A!==0;){if(!y&&e.firstTabInLine!==-1&&(e.position=e.firstTabInLine,j(e,"tab characters must not be used in indentation")),n=e.input.charCodeAt(e.position+1),a=e.line,(A===63||A===58)&&ii(n))A===63?(y&&(hn(e,u,g,m,h,null,s,o,l),m=h=x=null),S=!0,y=!0,r=!0):y?(y=!1,r=!0):j(e,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"),e.position+=1,A=n;else{if(s=e.line,o=e.lineStart,l=e.position,!fn(e,i,rd,!1,!0))break;if(e.line===a){for(A=e.input.charCodeAt(e.position);wt(A);)A=e.input.charCodeAt(++e.position);if(A===58)A=e.input.charCodeAt(++e.position),ii(A)||j(e,"a whitespace character is expected after the key-value separator within a block mapping"),y&&(hn(e,u,g,m,h,null,s,o,l),m=h=x=null),S=!0,y=!1,r=!1,m=e.tag,h=e.result;else if(S)j(e,"can not read an implicit mapping pair; a colon is missed");else return e.tag=c,e.anchor=d,!0}else if(S)j(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)&&(y&&(s=e.line,o=e.lineStart,l=e.position),fn(e,t,Ya,!0,r)&&(y?h=e.result:x=e.result),y||(hn(e,u,g,m,h,x,s,o,l),m=h=x=null),ze(e,!0,-1),A=e.input.charCodeAt(e.position)),(e.line===a||e.lineIndent>t)&&A!==0)j(e,"bad indentation of a mapping entry");else if(e.lineIndent<t)break}return y&&hn(e,u,g,m,h,null,s,o,l),S&&(e.tag=c,e.anchor=d,e.kind="mapping",e.result=u),S}function mh(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&&j(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)):j(e,"unexpected end of the stream within a verbatim tag")}else{for(;s!==0&&!ii(s);)s===33&&(n?j(e,"tag suffix cannot contain exclamation marks"):(r=e.input.slice(t-1,e.position+1),sd.test(r)||j(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),ih.test(a)&&j(e,"tag suffix cannot contain flow indicator characters")}a&&!od.test(a)&&j(e,"tag name cannot contain such characters: "+a);try{a=decodeURIComponent(a)}catch{j(e,"tag name is malformed: "+a)}return i?e.tag=a:Qi.call(e.tagMap,r)?e.tag=e.tagMap[r]+a:r==="!"?e.tag="!"+a:r==="!!"?e.tag="tag:yaml.org,2002:"+a:j(e,'undeclared tag handle "'+r+'"'),!0}function gh(e){var t,i;if(i=e.input.charCodeAt(e.position),i!==38)return!1;for(e.anchor!==null&&j(e,"duplication of an anchor property"),i=e.input.charCodeAt(++e.position),t=e.position;i!==0&&!ii(i)&&!gn(i);)i=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 hh(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 sh(e,t),n=e.indexOf("\0");for(n!==-1&&(i.position=n,j(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;)fh(i);return i.documents}function yh(e,t,i){t!==null&&typeof t=="object"&&typeof i>"u"&&(i=t,t=null);var n=ud(e,i);if(typeof t!="function")return n;for(var r=0,a=n.length;r<a;r+=1)t(n[r])}function bh(e,t){var i=ud(e,t);if(i.length!==0){if(i.length===1)return i[0];throw new Ue("expected a single document in the stream, but found more")}}var vh=yh,xh=bh,pd={loadAll:vh,load:xh},md=Object.prototype.toString,gd=Object.prototype.hasOwnProperty,$o=65279,wh=9,Gn=10,kh=13,Sh=32,Ah=33,zh=34,Do=35,Lh=37,Th=38,Eh=39,Oh=42,hd=44,Ch=45,Pa=58,Mh=61,qh=62,Ih=63,Bh=64,fd=91,yd=93,_h=96,bd=123,Fh=124,vd=125,Pe={};Pe[0]="\\0";Pe[7]="\\a";Pe[8]="\\b";Pe[9]="\\t";Pe[10]="\\n";Pe[11]="\\v";Pe[12]="\\f";Pe[13]="\\r";Pe[27]="\\e";Pe[34]='\\"';Pe[92]="\\\\";Pe[133]="\\N";Pe[160]="\\_";Pe[8232]="\\L";Pe[8233]="\\P";var Rh=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"],Dh=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;function Kh(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&&gd.call(l.styleAliases,o)&&(o=l.styleAliases[o]),i[s]=o;return i}function Nh(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 Ue("code point within a string may not be greater than 0xFFFFFFFF");return"\\"+i+Te.repeat("0",n-t.length)+t}var Yh=1,Qn=2;function jh(e){this.schema=e.schema||nd,this.indent=Math.max(1,e.indent||2),this.noArrayIndent=e.noArrayIndent||!1,this.skipInvalid=e.skipInvalid||!1,this.flowLevel=Te.isNothing(e.flowLevel)?-1:e.flowLevel,this.styleMap=Kh(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==='"'?Qn:Yh,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 $c(e,t){for(var i=Te.repeat(" ",t),n=0,r=-1,a="",s,o=e.length;n<o;)r=e.indexOf(`
`+t.stack),se.default.error(i),Xn&&Qa(i.substring(i.indexOf("]")+2),se.default.levels.TRACE)}function yn(e){se.default.info(`${Va}${e}`),Xn&&Qa(e,se.default.levels.INFO)}function ni(e){se.default.debug(`${Va}${e}`),Xn&&Qa(e,se.default.levels.DEBUG)}function kt(e){se.default.warn(`${Va}${e}`),Xn&&Qa(e,se.default.levels.WARN)}function St(e){se.default.getLevel()>se.default.levels.DEBUG||Qo.set(e,performance.now())}function Zi(e){if(se.default.getLevel()>se.default.levels.DEBUG)return;Qo.has(e)||kt(E("logs.timing-key-not-found").replace("{TIMING_KEY}",e));let t=performance.now()-Qo.get(e);ni(`${e}:${t}`+E("logs.milliseconds-abbreviation"))}function Qa(e,t){se.default.getLevel()<=t&&Ga.push(e)}function Od(){Ga=[]}function Zo(e){Xn=e}function Za(e){switch(e){case"INFO":{se.default.setLevel("info");break}case"TRACE":{se.default.setLevel("trace");break}case"DEBUG":{se.default.setLevel("debug");break}case"SILENT":{se.default.setLevel("silent");break}case"ERROR":{se.default.setLevel("error");break}case"WARN":{se.default.setLevel("warn");break}}}function Cd(e){switch(e){case se.default.levels.INFO:return"INFO";case se.default.levels.TRACE:return"TRACE";case se.default.levels.DEBUG:return"DEBUG";case se.default.levels.SILENT:return"SILENT";case se.default.levels.ERROR:return"ERROR";case se.default.levels.WARN:return"WARN"}}var Md={};var qd={};var Id={};var Bd={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
`&&(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(E("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 $u(e){let t=xe("footnoteDefinition",e),i=[],n=new Map,r=new Map,a=[],s=new Set,o=[],l=function(u,g,m){let h=g.match(/\[\^.*?\]/)[0];n.set(g,h);let x=s.has(h);if(x&&i.includes(g)){o.unshift(g);return}else if(x)throw new Error(E("logs.too-many-footnotes-error-message").replace("{FOOTNOTE_KEY}",h));let y;do y=u.lastIndexOf(h,m),y!==-1&&((y+g.length>u.length||u.substring(y,y+g.length)!==g)&&a.push({key:h,position:y}),m=y-1);while(y>0);s.add(h)};for(let u of t){let g=e.substring(u.start.offset,u.end.offset);i.unshift(g),l(e,g,u.start.offset)}let c=1,d=new Set;for(let u of i){if(d.has(u))continue;d.add(u);let g=n.get(u),m=`[^${c++}]`;r.set(g,m)}a.sort((u,g)=>g.position-u.position);for(let u of a){let g=r.get(u.key);e=au(e,u.key,g,u.position)}for(let u of d){let g=n.get(u),m=r.get(g);e=e.replace(u,u.replace(g,m))}for(let u of o){let g=e.replace(`
`);e===g&&(g=e.replace(u,"")),e=g}return e}function ws(e,t,i){let n=xe(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=de(e,a.start.offset,a.end.offset,s)}return e}function Wu(e,t){let i=xe("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 Vu(e){let t=xe("link",e);for(let i of t){if(i==null)continue;let n=e.substring(i.start.offset,i.end.offset);if(!n.match(mr))continue;let r=n.indexOf("]"),a=n.substring(0,1)+n.substring(1,r).trim()+n.substring(r);e=de(e,i.start.offset,i.end.offset,a)}return e}function Gu(e,t){let i=xe("emphasis",e);for(let n of i){let r=e.substring(n.start.offset+1,n.end.offset-1);r=t(r),e=de(e,n.start.offset+1,n.end.offset-1,r)}return e}function Qu(e,t){let i=xe("strong",e);for(let n of i){let r=e.substring(n.start.offset+2,n.end.offset-2);r=t(r),e=de(e,n.start.offset+2,n.end.offset-2,r)}return e}function ks(e,t){let i=bb(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);dp.test(a)&&(r+=4,a=a.substring(4)),a=t(a),e=de(e,r,n.end.offset,a)}return e}function Zu(e){let t=xe("code",e);for(let i of t)e.substring(i.start.offset,i.end.offset).startsWith("```")&&(e=zt(e,i.start.offset,i.end.offset));return e}function Ju(e,t){let i=xe("math",e);for(let n of i)e=zt(e,n.start.offset,n.end.offset);i=xe("inlineMath",e);for(let n of i)e.substring(n.start.offset,n.end.offset).startsWith("$".repeat(t))&&(e=zt(e,n.start.offset,n.end.offset));return e}function Xu(e){let t=xe("blockquote",e);for(letioft){letn=i.end.offset;for(;n<e.length-1&&e.charAt(n)!==`
`;)n++;e=zt(e,i.start.offset,n,!0)}return e}function ep(e,t,i){let n=xe("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 g=u.lastIndexOf("> ");return g!==-1&&(u=u.substring(g+2)),u=u.replaceAll(" "," "),Math.floor((u.split(" ").length-1)/2)+1},l=new Map,c=function(u,g){let m=g;for(;m>u;)l.delete(m--)},d=-1;s=s.replace(/^(( |\t|> )*)((\d+(\.|\)))|[-*+])([^\n]*)$/gm,(u,g="",m,h,x,y,S)=>{let A=1,T=o(g);if(!/^\d/.test(h)){let C=T>d?T:d;return c(T,C),u}return l.has(T)?t==="ascending"&&(A=l.get(T)+1,l.set(T,A)):l.set(T,1),d>T&&c(T,d),d=T,`${g}${A}${i}${S}`}),e=de(e,a,r.end.offset,s)}return e}function ip(e,t){let i=xe("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=de(e,a.start.offset,a.end.offset,s))}return e}function Fl(e,t){let i=xe("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=de(e,n.start.offset,r,a)}return e}function tp(e,t){let i=xe("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=wb(s,t,a.start.offset);for(let l of o)e=Yu(e,l.startIndex,l.endIndex,n,r)}i=xe("inlineMath",e);for(let a of i)e.substring(a.start.offset,a.end.offset).startsWith("$".repeat(t))&&(e=Yu(e,a.start.offset,a.end.offset,n,r));return e}function wb(e,t,i){let n="$".repeat(t),r=t;for(;e.charAt(r)==="$";)n+="$",r++;let a=[],s=Ji(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 Yu(e,t,i,n,r){let a=e.substring(er(e,t),t)??"",[s]=bn(a,a.length),o=e.substring(er(e,i),i)??"",l=e.substring(t,i),c=ap.test(a.trim()),d=!1;for(l=l.replace(n,(u,g,m="")=>{let h="";return!c&&a.trim()!=""?(h+=`
---`)},wikiLink:{replaceAction:Ls,placeholder:"{WIKI_LINK_PLACEHOLDER}"},obsidianMultiLineComments:{replaceAction:pp,placeholder:"{OBSIDIAN_COMMENT_PLACEHOLDER}"},footnoteAtStartOfLine:{replaceAction:zs,placeholder:"{FOOTNOTE_AT_START_OF_LINE_PLACEHOLDER}"},footnoteAfterATask:{replaceAction:/- \[.] (\[\^\w+\]) ?([,.;!:?])/gm,placeholder:"{FOOTNOTE_AFTER_A_TASK_PLACEHOLDER}"},url:{replaceAction:kn,placeholder:"{URL_PLACEHOLDER}"},anchorTag:{replaceAction:gp,placeholder:"{ANCHOR_PLACEHOLDER}"},templaterCommand:{replaceAction:vp,placeholder:"{TEMPLATER_PLACEHOLDER}"},link:{replaceAction:qb,placeholder:"{REGULAR_LINK_PLACEHOLDER}"},tag:{replaceAction:Ib,placeholder:"#tag-placeholder"},table:{replaceAction:Bb,placeholder:"{TABLE_PLACEHOLDER}"},customIgnore:{replaceAction:_b,placeholder:"{CUSTOM_IGNORE_PLACEHOLDER}"}};function Ee(e,t,i){let n=[];for(let r of e){let a;if(typeof r.replaceAction=="string")a=Cb(t,r.placeholder,r.replaceAction);else if(r.replaceAction instanceof RegExp)a=Mb(t,r.placeholder,r.replaceAction);else if(typeof r.replaceAction=="function"){let s=r.replaceAction;a=s(t,r.placeholder)}t=a.newText,n.push({replacedValues:a.replacedValues,placeholder:r.placeholder})}return t=i(t),n=n.reverse(),n!=null&&n.length>0&&n.forEach(r=>{r.replacedValues.forEach(a=>{t=t.replace(new RegExp(r.placeholder,"i"),Ze(a))})}),t}function Cb(e,t,i){let n=xe(i,e),r=[];for(let a of n){let s=e.substring(a.start.offset,a.end.offset);r.push(s),e=de(e,a.start.offset,a.end.offset,t)}return r.reverse(),{newText:e,replacedValues:r}}function Mb(e,t,i){let n=e.match(i),r=[];if(i.flags.includes("g")){if(e=e.replaceAll(i,t),n)for(let a of n)r.push(a)}else e=e.replace(i,t),n&&r.push(n[0]);return{newText:e,replacedValues:r}}function qb(e,t){let i=xe("link",e),n=[];for(let r of i){if(r==null)continue;let a=e.substring(r.start.offset,r.end.offset);a.match(mr)&&(n.push(a),e=de(e,r.start.offset,r.end.offset,t))}return n.reverse(),{newText:e,replacedValues:n}}function Ib(e,t){let i=[];return e=e.replace(gr,(n,r,a)=>(i.push(a),r+t)),{newText:e,replacedValues:i}}function Bb(e,t){let i=Ss(e),n=new Array(i.length),r=0,a=n.length;for(let s of i)n[a-1-r++]=e.substring(s.startIndex,s.endIndex),e=de(e,s.startIndex,s.endIndex,t);return{newText:e,replacedValues:n}}function _b(e,t){let i=np(e),n=new Array(i.length),r=0,a=n.length;for(let s of i)n[a-1-r++]=e.substring(s.startIndex,s.endIndex),e=de(e,s.startIndex,s.endIndex,t);return{newText:e,replacedValues:n}}var D=(s=>(s.YAML="YAML",s.HEADING="Heading",s.FOOTNOTE="Footnote",s.CONTENT="Content",s.SPACING="Spacing",s.PASTE="Paste",s))(D||{}),_s=class{constructor(t,i,n,r,a,s,o,l=[],c=!1,d=[]){this.nameKey=t;this.descriptionKey=i;this.settingsKey=n;this.alias=r;this.type=a;this.applyAfterIgnore=s;this.examples=o;this.options=l;this.hasSpecialExecutionOrder=c;this.ignoreTypes=d;this.ruleHeading=this.getName().toLowerCase().replaceAll(" ","-"),l.unshift(new Ln("enabled",this.descriptionKey,"",!1));for(let u of l)u.ruleAlias=r}getDefaultOptions(){let t={};for(let i of this.options)t[i.configKey]=i.defaultValue;return t}getOptions(t){return t.ruleConfigs[this.settingsKey]}getName(){return E(this.nameKey)}getDescription(){return E(this.descriptionKey)}getURL(){return"https://platers.github.io/obsidian-linter/settings/"+this.type.toLowerCase()+"-rules/#"+this.ruleHeading}enabledOptionName(){return this.options[0].configKey}apply(t,i){return Ee(this.ignoreTypes,t,n=>this.applyAfterIgnore(n,i))}},Fs=class{constructor(t,i,n,r={}){this.description=t,this.options=r,this.before=i,this.after=n}},Op=Object.values(D);function Rs(e){let t=An(e);if(t===null)return[[],!1];let i=Lp(t);return i.includes("all")?[Ii.map(n=>n.alias),!0]:[i,!1]}var Ii=[],Fb={},qt=new Map;function Cp(e){Ii.push(e),Ii.sort((t,i)=>Op.indexOf(t.type)-Op.indexOf(i.type)||t.settingsKey.localeCompare(i.settingsKey)),Fb[e.alias]=e,qt.has(e.type)?qt.get(e.type).push(e):qt.set(e.type,[e])}function Ds(e,t){let i;throw e instanceof Ad?(i=e.toString(),i=E("logs.wrapper-yaml-error").replace("{ERROR_MESSAGE}",i.substring(i.indexOf(":")+1))):i=E("logs.wrapper-unknown-e
`,n),r===-1&&(r=l.length-1,c=!0),[a,o]=bn(l,r-1);let d=o+a.length+1,u=r;c&&u++;let g=l.substring(d,u),m=As.test(g);s=i(a,m),o++,l=de(l,o,o+a.length,s),n=r+1+s.length-a.length}while(!c);return l}get exampleBuilders(){return[new b({description:"When style = `space`, a space is added to blockquotes missing a space after the indicator",before:p`
`,options:{style:"no space"}})]}get optionBuilders(){return[new ie({OptionsClass:js,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"}]})]}};It=z([v.register],It);var Ps=class{};z([v.noSettingControl()],Ps.prototype,"lineContent",2);var Bt=class extends v{constructor(){super({nameKey:"rules.add-blockquote-indentation-on-paste.name",descriptionKey:"rules.add-blockquote-indentation-on-paste.description",type:"Paste"})}get OptionsClass(){return Ps}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 exampleBuilders(){return[new b({description:"Line being pasted into regular text does not get blockquotified with current line being `Part1ofthesentence`",before:p`
`,options:{lineContent:"Part 1 of the sentence"}}),new b({description:"Line being pasted into a blockquote gets blockquotified with current line being `>>`",before:p`
`,options:{style:"ALL CAPS"}})]}get optionBuilders(){return[new ie({OptionsClass:_t,nameKey:"rules.capitalize-headings.style.name",descriptionKey:"rules.capitalize-headings.style.description",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 G({OptionsClass:_t,nameKey:"rules.capitalize-headings.ignore-case-words.name",descriptionKey:"rules.capitalize-headings.ignore-case-words.description",optionsKey:"ignoreCasedWords"}),new me({OptionsClass:_t,nameKey:"rules.capitalize-headings.ignore-words.name",descriptionKey:"rules.capitalize-headings.ignore-words.description",optionsKey:"ignoreWords",splitter:hr,separator:", "}),new me({OptionsClass:_t,nameKey:"rules.capitalize-headings.lowercase-words.name",descriptionKey:"rules.capitalize-headings.lowercase-words.description",optionsKey:"lowercaseWords",splitter:hr,separator:", "})]}};Ft=z([v.register],Ft);var Hs=class{constructor(){this.innerNewLines=!1}},kr=class extends v{constructor(){super({nameKey:"rules.compact-yaml.name",descriptionKey:"rules.compact-yaml.description",type:"Spacing"})}get OptionsClass(){return Hs}apply(t,i){return ye(t,n=>(n=n.replace(/^---\n+/,`---
---`,""));if(!r)return n;for(let a of xi)if(i.dedupeAliasKey&&Object.keys(r).includes(a)){n=oe(n,a,we(st(this.getUniqueArray(Be(pe(n,a)))),i.aliasArrayStyle,i.defaultEscapeCharacter,i.removeUnnecessaryEscapeCharsForMultiLineArrays,!0));break}for(let a of vi)if(i.dedupeTagKey&&Object.keys(r).includes(a)){n=oe(n,a,we(at(this.getUniqueArray(Be(pe(n,a)))),i.tagArrayStyle,i.defaultEscapeCharacter,i.removeUnnecessaryEscapeCharsForMultiLineArrays));break}if(i.dedupeArrayKeys){let a=[...xi,...vi,...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=pe(n,s),l="single-line";o.includes(`
`)&&(l="multi-line");let c=this.getUniqueArray(Be(o));n=oe(n,s,we(c,l,i.defaultEscapeCharacter,i.removeUnnecessaryEscapeCharsForMultiLineArrays))}}return n})}getUniqueArray(t){return t==null||typeof t=="string"||t.length<=1?t:[...new Set(t)]}get exampleBuilders(){return[new b({description:"Dedupe YAML tags is case sensitive and will use your default format for tags.",before:p`
`,options:{aliasArrayStyle:"multi-line"}}),new b({description:"Dedupe YAML aliases is case sensitive and will use your default format for aliases.",before:p`
`,options:{aliasArrayStyle:"multi-line"}}),new b({description:"Dedupe YAML array keys is case sensitive and will try to preserve the original array format.",before:p`
`,options:{aliasArrayStyle:"multi-line"}}),new b({description:"Dedupe YAML respects list of keys to not remove duplicates of for normal arrays (keys to ignore is just `arr2` for this example)",before:p`
`,options:{aliasArrayStyle:"multi-line",ignoreDedupeArrayKeys:["arr2"]}})]}get optionBuilders(){return[new G({OptionsClass:ki,nameKey:"rules.dedupe-yaml-array-values.dedupe-alias-key.name",descriptionKey:"rules.dedupe-yaml-array-values.dedupe-alias-key.description",optionsKey:"dedupeAliasKey"}),new G({OptionsClass:ki,nameKey:"rules.dedupe-yaml-array-values.dedupe-tag-key.name",descriptionKey:"rules.dedupe-yaml-array-values.dedupe-tag-key.description",optionsKey:"dedupeTagKey"}),new G({OptionsClass:ki,nameKey:"rules.dedupe-yaml-array-values.dedupe-array-keys.name",descriptionKey:"rules.dedupe-yaml-array-values.dedupe-array-keys.description",optionsKey:"dedupeArrayKeys"}),new me({OptionsClass:ki,nameKey:"rules.dedupe-yaml-array-values.ignore-keys.name",descriptionKey:"rules.dedupe-yaml-array-values.ignore-keys.description",optionsKey:"ignoreDedupeArrayKeys"})]}};Lr=z([v.register],Lr);var Ws=class{constructor(){this.defaultLanguage=""}},Tr=class extends v{constructor(){super({nameKey:"rules.default-language-for-code-fences.name",descriptionKey:"rules.default-language-for-code-fences.description",type:"Content",ruleIgnoreTypes:[f.yaml,f.math,f.yaml,f.link,f.wikiLink,f.tag]})}get OptionsClass(){return Ws}apply(t,i){return rp(t,i.defaultLanguage)}get exampleBuilders(){return[new b({description:"Add a default language `javascript` to code blocks that do not have a language specified",before:p`
`,options:{defaultLanguage:""}})]}get optionBuilders(){return[new ke({OptionsClass:Ws,nameKey:"rules.default-language-for-code-fences.default-language.name",descriptionKey:"rules.default-language-for-code-fences.default-language.description",optionsKey:"defaultLanguage"})]}};Tr=z([v.register],Tr);var Us=class{constructor(){this.style="consistent"}},Er=class extends v{constructor(){super({nameKey:"rules.emphasis-style.name",descriptionKey:"rules.emphasis-style.description",type:"Content",ruleIgnoreTypes:[f.code,f.math,f.yaml,f.link,f.wikiLink,f.tag,f.math,f.inlineMath]})}get OptionsClass(){return Us}apply(t,i){return ws(t,i.style,"emphasis")}get exampleBuilders(){return[new b({description:"Emphasis indicators should use underscores when style is set to 'underscore'",before:p`
`,options:{style:"asterisk"}}),new b({description:"Emphasis indicators should use consistent style based on first emphasis indicator in a file when style is set to 'consistent'",before:p`
`,options:{style:"consistent"}}),new b({description:"Emphasis indicators should use consistent style based on first emphasis indicator in a file when style is set to 'consistent'",before:p`
`,options:{style:"consistent"}})]}get optionBuilders(){return[new ie({OptionsClass:Us,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"}]})]}};Er=z([v.register],Er);var Ul=class{},Or=class extends v{constructor(){super({nameKey:"rules.empty-line-around-blockquotes.name",descriptionKey:"rules.empty-line-around-blockquotes.description",type:"Spacing"})}get OptionsClass(){return Ul}apply(t,i){return Xu(t)}get exampleBuilders(){return[new b({description:"Blockquotes that start a document do not get an empty line before them.",before:p`
`})]}get optionBuilders(){return[]}};Or=z([v.register],Or);var Vl=class{},Cr=class extends v{constructor(){super({nameKey:"rules.empty-line-around-code-fences.name",descriptionKey:"rules.empty-line-around-code-fences.description",type:"Spacing"})}get OptionsClass(){return Vl}apply(t,i){return Zu(t)}get exampleBuilders(){return[new b({description:"Fenced code blocks that start a document do not get an empty line before them.",before:p`
`})]}get optionBuilders(){return[]}};Cr=z([v.register],Cr);var Vs=class{constructor(){this.minimumNumberOfDollarSignsToBeAMathBlock=2}};z([v.noSettingControl()],Vs.prototype,"minimumNumberOfDollarSignsToBeAMathBlock",2);var Mr=class extends v{constructor(){super({nameKey:"rules.empty-line-around-math-blocks.name",descriptionKey:"rules.empty-line-around-math-blocks.description",type:"Spacing",ruleIgnoreTypes:[f.yaml,f.code]})}get OptionsClass(){return Vs}apply(t,i){return Ju(t,i.minimumNumberOfDollarSignsToBeAMathBlock)}get exampleBuilders(){return[new b({description:"Math blocks that start a document do not get an empty line before them.",before:p`
`}),new b({description:"Math blocks that are singe-line are updated based on the value of `NumberofDollarSignstoIndicateaMathBlock` (in this case its value is 2)",before:p`
`}),new b({description:"Math blocks that are not at the start or the end of the document will have an empty line added before and after them",before:p`
`})]}get optionBuilders(){return[]}};Mr=z([v.register],Mr);var Gl=class{},qr=class extends v{constructor(){super({nameKey:"rules.empty-line-around-tables.name",descriptionKey:"rules.empty-line-around-tables.description",type:"Spacing",ruleIgnoreTypes:[f.yaml,f.code,f.math,f.inlineMath,f.wikiLink,f.link]})}get OptionsClass(){return Gl}apply(t,i){return kp(t)}get exampleBuilders(){return[new b({description:"Tables that start a document do not get an empty line before them.",before:p`
array:[value:withcoloninthemiddle,valuewith' a single quote present, "already escaped: value", value with " a double quote present, value with both '"adoubleandsinglequotepresentisnotescapedbutisinvalidYAML,colon:betweencharactersisfine]
nestedArray:[[value:withcoloninthemiddle,valuewith' a single quote present], ["already escaped: value", value with " a double quote present], value with both '"adoubleandsinglequotepresentisnotescapedbutisinvalidYAML,colon:betweencharactersisfine]
array:["value: with colon in the middle","value with ' a single quote present","already escaped: value",'value with " a double quote present',valuewithboth'"adoubleandsinglequotepresentisnotescapedbutisinvalidYAML,colon:betweencharactersisfine]
nestedArray:[["value: with colon in the middle","value with ' a single quote present"],["already escaped: value",'value with " a double quote present'],valuewithboth'"adoubleandsinglequotepresentisnotescapedbutisinvalidYAML,colon:betweencharactersisfine]
nestedArray2:[["value: with colon in the middle"],"value with ' a single quote present"]
`})]}get optionBuilders(){return[]}};_r=z([v.register],_r);var Fr=class{constructor(){this.defaultEscapeCharacter='"';this.forceYamlEscape=[]}};z([v.noSettingControl()],Fr.prototype,"defaultEscapeCharacter",2);var Dt=class extends v{constructor(){super({nameKey:"rules.force-yaml-escape.name",descriptionKey:"rules.force-yaml-escape.description",type:"YAML",hasSpecialExecutionOrder:!0})}get OptionsClass(){return Fr}apply(t,i){return ye(t,n=>{for(let r of i.forceYamlEscape){let a=pe(n,r);if(a!=null){if(a.includes(`
`)||a.startsWith(" [")||zn(a))continue;a=wi(a,i.defaultEscapeCharacter,!0),n=oe(n,r," "+a)}}return n})}get exampleBuilders(){return[new b({description:"YAML without anything to escape",before:p`
`}),new b({description:"Force YAML keys to be escaped with double quotes where not already escaped with `ForceYAMLEscapeonKeys='key'\\n'title'\\n'bool'`",before:p`
---`,""));if(!r)return n;for(let a of xi)if(i.formatAliasKey&&Object.keys(r).includes(a)){n=oe(n,a,we(st(Be(pe(n,a))),i.aliasArrayStyle,i.defaultEscapeCharacter,i.removeUnnecessaryEscapeCharsForMultiLineArrays,!0));break}for(let a of vi)if(i.formatTagKey&&Object.keys(r).includes(a)){n=oe(n,a,we(at(Be(pe(n,a))),i.tagArrayStyle,i.defaultEscapeCharacter,i.removeUnnecessaryEscapeCharsForMultiLineArrays));break}if(i.formatArrayKeys){let a=[...xi,...vi,...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=oe(n,s,we(Be(pe(n,s)),i.defaultArrayStyle,i.defaultEscapeCharacter,i.removeUnnecessaryEscapeCharsForMultiLineArrays)))}for(let a of i.forceSingleLineArrayStyle)Object.keys(r).includes(a)&&(n=oe(n,a,we(Be(pe(n,a)),"single-line",i.defaultEscapeCharacter,i.removeUnnecessaryEscapeCharsForMultiLineArrays)));for(let a of i.forceMultiLineArrayStyle)Object.keys(r).includes(a)&&(n=oe(n,a,we(Be(pe(n,a)),"multi-line",i.defaultEscapeCharacter,i.removeUnnecessaryEscapeCharsForMultiLineArrays)));return n})}get exampleBuilders(){return[new b({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:p`
`,options:{aliasArrayStyle:"multi-line",forceSingleLineArrayStyle:["test"]}}),new b({description:"Format tags as a single string with space delimiters, ignore aliases, and format regular YAML arrays as single-line arrays",before:p`
`,options:{formatAliasKey:!1,tagArrayStyle:"single string space delimited"}}),new b({description:"Arrays with dictionaries in them are ignored",before:p`
`,options:{bottom:!1,emptyLineAfterYaml:!0}}),new b({description:"Empty line before header and after YAML is removed with `EmptyLineBetweenYAMLandHeader=false`",before:p`
`)))}return n})}get exampleBuilders(){return[new b({description:"Insert static lines into YAML frontmatter. Text to insert: `aliases:\ntags:doc\nanimal:dog`",before:p`
`})]}get optionBuilders(){return[]}};Hr=z([v.register],Hr);var Js=class{constructor(){this.minimumNumberOfDollarSignsToBeAMathBlock=2}};z([v.noSettingControl()],Js.prototype,"minimumNumberOfDollarSignsToBeAMathBlock",2);var Nt=class extends v{constructor(){super({nameKey:"rules.move-math-block-indicators-to-their-own-line.name",descriptionKey:"rules.move-math-block-indicators-to-their-own-line.description",type:"Spacing",ruleIgnoreTypes:[f.code,f.inlineCode],hasSpecialExecutionOrder:!0})}get OptionsClass(){return Js}apply(t,i){return tp(t,i.minimumNumberOfDollarSignsToBeAMathBlock)}get exampleBuilders(){return[new b({description:"Moving math block indicator to its own line when `NumberofDollarSignstoIndicateaMathBlock` = 2",before:p`
`}),new b({description:"Moving math block indicator to its own line when `NumberofDollarSignstoIndicateaMathBlock` = 3 and opening indicator is on the same line as the start of the content",before:p`
`}),new b({description:"Moving math block indicator to its own line when `NumberofDollarSignstoIndicateaMathBlock` = 2 and ending indicator is on the same line as the ending line of the content",before:p`
`,"").replace("---","");let a=[],s=yr;for(let c of vi){let d=pe(r,c);if(d!=null){a=at(Be(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`---
${oe(r,s,we(a,i.tagArrayStyle,i.defaultEscapeCharacter,i.removeUnnecessaryEscapeCharsForMultiLineArrays))}---`}),t=Ee([f.yaml],t,r=>(i.howToHandleExistingTags!=="Nothing"&&(r=r.replace(gr,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 exampleBuilders(){return[new b({description:"Move tags from body to YAML with `Tagstoignore='ignored-tag'`",before:p`
`,options:{tagsToIgnore:["ignored-tag"]}}),new b({description:"Move tags from body to YAML with existing tags retains the already existing ones and only adds new ones",before:p`
`}),new b({description:"Move tags to YAML frontmatter and then remove hashtags in body content tags when `Bodytagoperation='Remove hashtag'` and `Tagstoignore='yet-another-ignored-tag'`.",before:p`
`,options:{howToHandleExistingTags:"Remove hashtag",tagsToIgnore:["yet-another-ignored-tag"]}}),new b({description:"Move tags to YAML frontmatter and then remove body content tags when `Bodytagoperation='Remove whole tag'`.",before:p`
`,options:{howToHandleExistingTags:"Remove whole tag"}})]}get optionBuilders(){return[new ie({OptionsClass:dt,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 me({OptionsClass:dt,nameKey:"rules.move-tags-to-yaml.tags-to-ignore.name",descriptionKey:"rules.move-tags-to-yaml.tags-to-ignore.description",optionsKey:"tagsToIgnore"})]}};$r=z([v.register],$r);var eo=class{constructor(){this.noBareURIs=!1}},Xs="'\"\u2018\u2019\u201C\u201D`[]",fv=["http","ftp","https","smtp"],Wr=class extends v{constructor(){super({nameKey:"rules.no-bare-urls.name",descriptionKey:"rules.no-bare-urls.description",type:"Content",ruleIgnoreTypes:[f.code,f.math,f.yaml,f.link,f.wikiLink,f.tag,f.image,f.inlineCode,f.anchorTag,f.html]})}get OptionsClass(){return eo}apply(t,i){let n=t.match(kn);if(n&&(t=this.handleMatches(t,n,!1)),i.noBareURIs){let r=t.match(mp);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),g=Ji(o,"(");if(g!=0&&g!=Ji(o,")")&&u==")"?(o+=u,c++,u=c>=t.length?void 0:t.charAt(c)):g==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 m=l-1;for(;m>0&&t.charAt(m-1)==="<";)m--;let h=c;for(;h<t.length-1&&t.charAt(h+1)===">";)h++;t=de(t,m,h+1,"<"+o+">"),r=l+o.length;continue}t=de(t,l,l+o.length,"<"+o+">"),r=l+o.length+2}return t}skipMatch(t,i,n,r){let a=t!=null&&Xs.includes(t)||Xs.includes(n.charAt(0)),s=i!=null&&Xs.includes(i)||Xs.includes(n.charAt(n.length-1));return a&&s?!0:r?fv.includes(n.substring(0,n.indexOf(":"))):!1}get exampleBuilders(){return[new b({description:"Makesurethatlinksareinsideofanglebracketswhennotinsinglequotes('),doublequotes(\"), or backticks(`)",before:p`
`,options:{noBareURIs:!0}})]}get optionBuilders(){return[new G({OptionsClass:eo,nameKey:"rules.no-bare-urls.no-bare-uris.name",descriptionKey:"rules.no-bare-urls.no-bare-uris.description",optionsKey:"noBareURIs"})]}};Wr=z([v.register],Wr);var Vr=class{constructor(){this.numberStyle="ascending";this.listEndStyle="."}},Ur=class extends v{constructor(){super({nameKey:"rules.ordered-list-style.name",descriptionKey:"rules.ordered-list-style.description",type:"Content",ruleIgnoreTypes:[f.code,f.math,f.yaml,f.tag]})}get OptionsClass(){return Vr}apply(t,i){return ep(t,i.numberStyle,i.listEndStyle)}get exampleBuilders(){return[new b({description:"Ordered lists have list items set to ascending numerical order when Number Style is `ascending`.",before:p`
`,options:{numberStyle:"lazy"}}),new b({description:"Ordered list in blockquote has list items set to ascending numerical order when Number Style is `ascending`.",before:p`
`}),new b({description:"Nested ordered list has list items set to '1)' when Number Style is `lazy` and Ordered List Indicator End Style is `)`.",before:p`
`,options:{listEndStyle:")",numberStyle:"lazy"}})]}get optionBuilders(){return[new ie({OptionsClass:Vr,nameKey:"rules.ordered-list-style.number-style.name",descriptionKey:"rules.ordered-list-style.number-style.description",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 ie({OptionsClass:Vr,nameKey:"rules.ordered-list-style.list-end-style.name",descriptionKey:"rules.ordered-list-style.list-end-style.description",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)`)"}]})]}};Ur=z([v.register],Ur);var ic=class{},Gr=class extends v{constructor(){super({nameKey:"rules.paragraph-blank-lines.name",descriptionKey:"rules.paragraph-blank-lines.description",type:"Spacing",ruleIgnoreTypes:[f.obsidianMultiLineComments,f.yaml,f.table]})}get OptionsClass(){return ic}apply(t,i){return Uu(t)}get exampleBuilders(){return[new b({description:"Paragraphs should be surrounded by blank lines",before:p`
`}),new b({description:"Paragraphs can be extended via the use of 2 or more spaces at the end of a line, a line break html or xml, or a backslash (\\)",before:p`
`})]}get optionBuilders(){return[]}};Gr=z([v.register],Gr);var Qr=class{};z([v.noSettingControl()],Qr.prototype,"lineContent",2),z([v.noSettingControl()],Qr.prototype,"selectedText",2);var Yt=class extends v{constructor(){super({nameKey:"rules.prevent-double-checklist-indicator-on-paste.name",descriptionKey:"rules.prevent-double-checklist-indicator-on-paste.description",type:"Paste"})}get OptionsClass(){return Qr}apply(t,i){let n=xp.test(i.lineContent),r=Es.test(t),a=Es.test(i.selectedText);return!n||!r||a?t:t.replace(Es,"")}get exampleBuilders(){return[new b({description:"Line being pasted is left alone when current line has no checklist indicator in it: `Regulartexthere`",before:p`
`,options:{lineContent:"Regular text here",selectedText:""}}),new b({description:"Line being pasted into a blockquote without a checklist indicator is left alone when it lacks a checklist indicator: `>>`",before:p`
`,options:{lineContent:"> > ",selectedText:""}}),new b({description:"Line being pasted into a blockquote with a checklist indicator has its checklist indicator removed when current line is: `>-[x]`",before:p`
`,options:{lineContent:"> - [x] ",selectedText:""}}),new b({description:"Line being pasted with a checklist indicator has its checklist indicator removed when current line is: `-[]`",before:p`
`,options:{lineContent:"- [ ] ",selectedText:""}}),new b({description:"Line being pasted as a checklist indicator has its checklist indicator removed when current line is: `-[!]`",before:p`
`,options:{lineContent:"- [!] ",selectedText:""}}),new b({description:"When pasting a checklist and the selected text starts with a checklist, the text to paste should still start with a checklist",before:p`
`,options:{lineContent:"- [!] Some text here",selectedText:"- [!] Some text here"}})]}get optionBuilders(){return[]}};Yt=z([v.register],Yt);var Zr=class{};z([v.noSettingControl()],Zr.prototype,"lineContent",2),z([v.noSettingControl()],Zr.prototype,"selectedText",2);var jt=class extends v{constructor(){super({nameKey:"rules.prevent-double-list-item-indicator-on-paste.name",descriptionKey:"rules.prevent-double-list-item-indicator-on-paste.description",type:"Paste"})}get OptionsClass(){return Zr}apply(t,i){let n=new RegExp(`^${fr}[*+-]`),r=/^\s*[*+-] /,a=n.test(i.lineContent),s=n.test(i.selectedText),o=r.test(t);return s||!a||!o?t:t.replace(r,"")}get exampleBuilders(){return[new b({description:"Line being pasted is left alone when current line has no list indicator in it: `Regulartexthere`",before:p`
`,options:{lineContent:"Regular text here",selectedText:""}}),new b({description:"Line being pasted into a blockquote without a list indicator is left alone when it lacks a list indicator: `>>`",before:p`
`,options:{lineContent:"> > ",selectedText:""}}),new b({description:"Line being pasted into a blockquote with a list indicator is has its list indicator removed when current line is: `>*`",before:p`
`,options:{lineContent:"> * ",selectedText:""}}),new b({description:"Line being pasted with a list indicator is has its list indicator removed when current line is: `+`",before:p`
`,options:{lineContent:"+ ",selectedText:""}}),new b({description:"When pasting a list item and the selected text starts with a list item indicator, the text to paste should still start with a list item indicator",before:p`
`,options:{lineContent:"+ ",selectedText:"+ "}})]}get optionBuilders(){return[]}};jt=z([v.register],jt);var tc=class{},Pt=class extends v{constructor(){super({nameKey:"rules.proper-ellipsis-on-paste.name",descriptionKey:"rules.proper-ellipsis-on-paste.description",type:"Paste"})}get OptionsClass(){return tc}apply(t,i){return t.replaceAll(Ts,"\u2026")}get exampleBuilders(){return[new b({description:"Replacing three consecutive dots with an ellipsis even if spaces are present",before:p`
`})]}get optionBuilders(){return[]}};Jr=z([v.register],Jr);var Ht=class{constructor(){this.singleQuoteStyleEnabled=!0;this.singleQuoteStyle="''";this.doubleQuoteStyleEnabled=!0;this.doubleQuoteStyle='""'}},Xr=class extends v{constructor(){super({nameKey:"rules.quote-style.name",descriptionKey:"rules.quote-style.description",type:"Content",ruleIgnoreTypes:[f.code,f.inlineCode,f.math,f.yaml,f.math,f.inlineMath,f.html,f.link,f.wikiLink,f.templaterCommand]})}get OptionsClass(){return Ht}apply(t,i){let n=t;return i.doubleQuoteStyleEnabled&&(i.doubleQuoteStyle==='""'?n=this.convertSmartDoubleQuotesToStraightQuotes(n):n=this.convertStraightQuoteToSmartQuote(n,'"',"\u201C\u201D"[0],"\u201C\u201D"[1],!1)),i.singleQuoteStyleEnabled&&(i.singleQuoteStyle==="''"?n=this.convertSmartSingleQuotesToStraightQuotes(n):n=this.convertStraightQuoteToSmartQuote(n,"'","\u2018\u2019"[0],"\u2018\u2019"[1],!0)),n}convertSmartSingleQuotesToStraightQuotes(t){return t.replace(bp,"'")}convertSmartDoubleQuotesToStraightQuotes(t){return t.replace(yp,'"')}convertStraightQuoteToSmartQuote(t,i,n,r,a){let s=su(i,t);if(s.length===0)return t;let o=t.length-1,l,c="",d="",u=!1,g=!1,m=!1,h=!1,x=!1,y="";for(let S of s)c=S==0?"":t.charAt(S-1),d=S===o?"":t.charAt(S+1),u=Rl.test(c),g=Rl.test(d),x=u&&g,m=c!=""&&c.trim()==="",h=d!=""&&d.trim()==="",x&&a?l=r:h&&!m?(l=r,y=l):m&&!h?(l=n,y=l):(y===""||y===r?l=n:l=r,y=l),t=de(t,S,S+1,l);return t}get exampleBuilders(){return[new b({description:"Smart quotes used in file are converted to straight quotes when styles are set to `Straight`",before:p`
`}),new b({description:"Blanks lines are removed between like list types (ordered, specific list item indicators, and checklists) while blanks are left between different kinds of list item indicators",before:p`
`})]}get optionBuilders(){return[new ke({nameKey:"rules.remove-space-before-or-after-characters.characters-to-remove-space-before.name",descriptionKey:"rules.remove-space-before-or-after-characters.characters-to-remove-space-before.description",OptionsClass:ca,optionsKey:"charactersToRemoveSpacesBefore"}),new ke({nameKey:"rules.remove-space-before-or-after-characters.characters-to-remove-space-after.name",descriptionKey:"rules.remove-space-before-or-after-characters.characters-to-remove-space-after.description",OptionsClass:ca,optionsKey:"charactersToRemoveSpacesAfter"})]}};la=z([v.register],la);var io=class{constructor(){this.punctuationToRemove=".,;:!\u3002\uFF0C\uFF1B\uFF1A\uFF01"}},da=class extends v{constructor(){super({nameKey:"rules.remove-trailing-punctuation-in-heading.name",descriptionKey:"rules.remove-trailing-punctuation-in-heading.description",type:"Heading",ruleIgnoreTypes:[f.code,f.math,f.yaml]})}get OptionsClass(){return io}apply(t,i){return t.replaceAll(nt,(n,r="",a="",s="",o="",l="")=>{if(o==""||o.match(fp))return n;let c=o.trimEnd(),d=c.charAt(c.length-1);return i.punctuationToRemove.includes(d)?r+a+s+o.substring(0,c.length-1)+o.substring(c.length)+l:n})}get exampleBuilders(){return[new b({description:"Removes punctuation from the end of a heading",before:p`
---`,""));if(!r)return n;for(let a of xi)if(i.sortAliasKey&&Object.keys(r).includes(a)){n=oe(n,a,we(st(this.sortArray(Be(pe(n,a)),i.sortOrder)),i.aliasArrayStyle,i.defaultEscapeCharacter,i.removeUnnecessaryEscapeCharsForMultiLineArrays,!0));break}for(let a of vi)if(i.sortTagKey&&Object.keys(r).includes(a)){n=oe(n,a,we(at(this.sortArray(Be(pe(n,a)),i.sortOrder)),i.tagArrayStyle,i.defaultEscapeCharacter,i.removeUnnecessaryEscapeCharsForMultiLineArrays));break}if(i.sortArrayKeys){let a=[...xi,...vi,...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=pe(n,s),l="single-line";o.includes(`
`,options:{aliasArrayStyle:"multi-line"}}),new b({description:"Sort YAML Arrays respects list of keys to not sort values of for normal arrays (keys to ignore is just `arr2` for this example)",before:p`
`,options:{aliasArrayStyle:"multi-line",ignoreSortArrayKeys:["arr2"]}})]}get optionBuilders(){return[new G({OptionsClass:mi,nameKey:"rules.sort-yaml-array-values.sort-alias-key.name",descriptionKey:"rules.sort-yaml-array-values.sort-alias-key.description",optionsKey:"sortAliasKey"}),new G({OptionsClass:mi,nameKey:"rules.sort-yaml-array-values.sort-tag-key.name",descriptionKey:"rules.sort-yaml-array-values.sort-tag-key.description",optionsKey:"sortTagKey"}),new G({OptionsClass:mi,nameKey:"rules.sort-yaml-array-values.sort-array-keys.name",descriptionKey:"rules.sort-yaml-array-values.sort-array-keys.description",optionsKey:"sortArrayKeys"}),new me({OptionsClass:mi,nameKey:"rules.sort-yaml-array-values.ignore-keys.name",descriptionKey:"rules.sort-yaml-array-values.ignore-keys.description",optionsKey:"ignoreSortArrayKeys"}),new ie({OptionsClass:mi,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"}]})]}};pa=z([v.register],pa);var hc=class{},ma=class extends v{constructor(){super({nameKey:"rules.space-after-list-markers.name",descriptionKey:"rules.space-after-list-markers.description",type:"Spacing",ruleIgnoreTypes:[f.code,f.math,f.yaml,f.link,f.wikiLink,f.tag]})}get OptionsClass(){return hc}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 exampleBuilders(){return[new b({description:"A single space is left between the list marker and the text of the list item",before:p`
`})]}get optionBuilders(){return[new ke({OptionsClass:ha,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 ke({OptionsClass:ha,nameKey:"rules.space-between-chinese-japanese-or-korean-and-english-or-numbers.english-symbols-punctuation-after.name",descriptionKey:"rules.space-between-chinese-japanese-or-korean-and-english-or-numbers.english-symbols-punctuation-after.description",optionsKey:"englishNonLetterCharactersAfterCJKCharacters"})]}};ga=z([v.register],ga);var no=class{constructor(){this.style="consistent"}},fa=class extends v{constructor(){super({nameKey:"rules.strong-style.name",descriptionKey:"rules.strong-style.description",type:"Content",ruleIgnoreTypes:[f.code,f.yaml,f.link,f.wikiLink,f.tag,f.math,f.inlineMath]})}get OptionsClass(){return no}apply(t,i){return ws(t,i.style,"strong")}get exampleBuilders(){return[new b({description:"Strong indicators should use underscores when style is set to 'underscore'",before:p`
`,options:{style:"asterisk"}}),new b({description:"Strong indicators should use consistent style based on first strong indicator in a file when style is set to 'consistent'",before:p`
`,options:{style:"consistent"}}),new b({description:"Strong indicators should use consistent style based on first strong indicator in a file when style is set to 'consistent'",before:p`
`,options:{style:"consistent"}})]}get optionBuilders(){return[new ie({OptionsClass:no,nameKey:"rules.strong-style.style.name",descriptionKey:"rules.strong-style.style.description",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"}]})]}};fa=z([v.register],fa);var ro=class{constructor(){this.twoSpaceLineBreak=!1}},Qt=class extends v{constructor(){super({nameKey:"rules.trailing-spaces.name",descriptionKey:"rules.trailing-spaces.description",type:"Spacing",hasSpecialExecutionOrder:!0,ruleIgnoreTypes:[f.code,f.math,f.yaml,f.link,f.wikiLink,f.tag]})}get OptionsClass(){return ro}apply(t,i){return i.twoSpaceLineBreak?(t=t.replace(/(\S)[ \t]$/gm,"$1"),t=t.replace(/(\S)[ \t]{3,}$/gm,"$1"),t=t.replace(/(\S)( ?\t\t? ?)$/gm,"$1"),t):t.replace(/[ \t]+$/gm,"")}get exampleBuilders(){return[new b({description:"Removes trailing spaces and tabs.",before:p`
`,options:{twoSpaceLineBreak:!0}})]}get optionBuilders(){return[new G({OptionsClass:ro,nameKey:"rules.trailing-spaces.twp-space-line-break.name",descriptionKey:"rules.trailing-spaces.twp-space-line-break.description",optionsKey:"twoSpaceLineBreak"})]}};Qt=z([v.register],Qt);var ao=class{constructor(){this.lineBreakIndicator=" "}},ya=class extends v{constructor(){super({nameKey:"rules.two-spaces-between-lines-with-content.name",descriptionKey:"rules.two-spaces-between-lines-with-content.description",type:"Content",ruleIgnoreTypes:[f.obsidianMultiLineComments,f.yaml,f.table]})}get OptionsClass(){return ao}apply(t,i){return Wu(t,i.lineBreakIndicator)}get exampleBuilders(){return[new b({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 when the line break indicator is ``",before:p`
`,options:{lineBreakIndicator:" "}})]}get optionBuilders(){return[new ie({OptionsClass:ao,nameKey:"rules.two-spaces-between-lines-with-content.line-break-indicator.name",descriptionKey:"rules.two-spaces-between-lines-with-content.line-break-indicator.description",optionsKey:"lineBreakIndicator",records:[{value:" ",description:" "},{value:"<br/>",description:"<br/>"},{value:"<br>",description:"<br>"},{value:"\\",description:"\\"}]})]}};ya=z([v.register],ya);var so=class{constructor(){this.listStyle="consistent"}},ba=class extends v{constructor(){super({nameKey:"rules.unordered-list-style.name",descriptionKey:"rules.unordered-list-style.description",type:"Content",ruleIgnoreTypes:[f.code,f.math,f.yaml,f.tag]})}get OptionsClass(){return so}apply(t,i){return ip(t,i.listStyle)}get exampleBuilders(){return[new b({description:"Unordered lists have their indicator updated to `*` when `Listitemstyle='consistent'` and `*` is the first unordered list indicator",before:p`
`,options:{listStyle:"+"}})]}get optionBuilders(){return[new ie({OptionsClass:so,nameKey:"rules.unordered-list-style.list-style.name",descriptionKey:"rules.unordered-list-style.list-style.description",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"}]})]}};ba=z([v.register],ba);var Pi=class{constructor(){this.priorityKeysAtStartOfYaml=!0;this.yamlKeyPrioritySortOrder=[];this.yamlSortOrderForOtherKeys="None"}};z([v.noSettingControl()],Pi.prototype,"dateModifiedKey",2),z([v.noSettingControl()],Pi.prototype,"currentTimeFormatted",2),z([v.noSettingControl()],Pi.prototype,"yamlTimestampDateModifiedEnabled",2);var Zt=class extends v{constructor(){super({nameKey:"rules.yaml-key-sort.name",descriptionKey:"rules.yaml-key-sort.description",type:"YAML",hasSpecialExecutionOrder:!0})}get OptionsClass(){return Pi}apply(t,i){let n=An(t);if(n===null)return t;let r=n,a=i.priorityKeysAtStartOfYaml,s=i.yamlKeyPrioritySortOrder,o=0;for(let x of s)x.endsWith(":")&&(s[o]=x.substring(0,x.length-1)),o++;let l=si(r),c=this.getYAMLKeysSorted(r,s,l),d=c.sortedYamlKeyValues;r=c.remainingYaml;let u=i.yamlSortOrderForOtherKeys;if(l==null)return this.getTextWithNewYamlFrontmatter(t,n,d,r,a,i.dateModifiedKey,i.currentTimeFormatted,i.yamlTimestampDateModifiedEnabled);let g=Object.keys(l),m;if(u==="Ascending Alphabetical")m=this.sortAlphabeticallyAsc;else if(u==="Descending Alphabetical")m=this.sortAlphabeticallyDesc;else return this.getTextWithNewYamlFrontmatter(t,n,d,r,a,i.dateModifiedKey,i.currentTimeFormatted,i.yamlTimestampDateModifiedEnabled);g=g.sort(m);let h=this.getYAMLKeysSorted(r,g,l);return this.getTextWithNewYamlFrontmatter(t,n,d,h.sortedYamlKeyValues,a,i.dateModifiedKey,i.currentTimeFormatted,i.yamlTimestampDateModifiedEnabled)}getYAMLKeysSorted(t,i,n){let r="";for(let a of i){if(!(a in n))continue;let s=pe(t,a,!1);s!==null&&(s.includes(`
`,t=Ct(t,a,!1))}return{remainingYaml:t,sortedYamlKeyValues:r}}updateDateModifiedIfYamlChanged(t,i,n,r){return t==i?i:oe(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 exampleBuilders(){return[new b({description:"Sorts YAML keys in order specified by `YAMLKeyPrioritySortOrder` has a sort order of `datetypelanguage`",before:p`
`,options:{yamlKeyPrioritySortOrder:["date","type","language"],yamlSortOrderForOtherKeys:"None",priorityKeysAtStartOfYaml:!0}}),new b({description:"Sorts YAML keys in order specified by `YAMLKeyPrioritySortOrder` has a sort order of `datetypelanguage` with `'YAML Sort Order for Other Keys'=AscendingAlphabetical`",before:p`
`,options:{yamlKeyPrioritySortOrder:["date","type","language"],yamlSortOrderForOtherKeys:"Ascending Alphabetical"}}),new b({description:"Sorts YAML keys in order specified by `YAMLKeyPrioritySortOrder` has a sort order of `datetypelanguage` with `'YAML Sort Order for Other Keys'=DescendingAlphabetical`",before:p`
`,options:{yamlKeyPrioritySortOrder:["date","type","language"],yamlSortOrderForOtherKeys:"Descending Alphabetical",priorityKeysAtStartOfYaml:!0}}),new b({description:"Sorts YAML keys in order specified by `YAMLKeyPrioritySortOrder` has a sort order of `datetypelanguage` with `'YAML Sort Order for Other Keys'=DescendingAlphabetical` and `'Priority Keys at Start of YAML'=false`",before:p`
`,options:{yamlKeyPrioritySortOrder:["date","type","language"],yamlSortOrderForOtherKeys:"Descending Alphabetical",priorityKeysAtStartOfYaml:!1}})]}get optionBuilders(){return[new me({OptionsClass:Pi,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 G({OptionsClass:Pi,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 ie({OptionsClass:Pi,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"}]})]}};Zt=z([v.register],Zt);var li=require("obsidian");var jp=pn(Yp());var Xe=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.locale="en"}};z([v.noSettingControl()],Xe.prototype,"alreadyModified",2),z([v.noSettingControl()],Xe.prototype,"fileCreatedTime",2),z([v.noSettingControl()],Xe.prototype,"fileModifiedTime",2),z([v.noSettingControl()],Xe.prototype,"locale",2),z([v.noSettingControl()],Xe.prototype,"currentTime",2),z([v.noSettingControl()],Xe.prototype,"fileName",2);var ut=class extends v{constructor(){super({nameKey:"rules.yaml-timestamp.name",descriptionKey:"rules.yaml-timestamp.description",type:"YAML",hasSpecialExecutionOrder:!0})}get OptionsClass(){return Xe}apply(t,i){let n=i.alreadyModified,r=Ci(t);return n=n||r!==t,i.format=i.format.trimEnd(),ye(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=`
`,options:{fileCreatedTime:"2020-01-01T00:00:00-00:00",fileModifiedTime:"2020-01-02T00:00:00-00:00",currentTime:(0,li.moment)("Thursday, January 2nd 2020, 12:00:05 am","dddd, MMMM Do YYYY, h:mm:ss a"),alreadyModified:!1}}),new b({description:"dateCreated option is false",before:p`
`,options:{dateCreated:!1,fileCreatedTime:"2020-01-01T00:00:00-00:00",fileModifiedTime:"2020-01-01T00:00:00-00:00",currentTime:(0,li.moment)("Thursday, January 2nd 2020, 12:00:05 am","dddd, MMMM Do YYYY, h:mm:ss a"),alreadyModified:!1}}),new b({description:"Date Created Key is set",before:p`
---`,""),c=si(s),d=i.aliasHelperKey??Nl;d.endsWith(":")&&(d=d.substring(0,d.length-1)),a=c[d]??null,a!=null&&(a=a+"",a=wi(a,i.defaultEscapeCharacter,this.forceEscape(a,i.aliasArrayStyle)));let u=null,g=Object.keys(c);for(let m of xi)if(g.includes(m)){u=m;break}if(u!=null){let m=pe(l,u),h="multi-line",x=m==="",y=!1;m.includes(`
`)||(m.match(/^\[.*\]/)===null?(h="single string to single-line",y=!0):h="single-line");let S=st(Be(m)),A=this.getNewAliasValue(S,o,r,a);A===""?l=Ct(l,u):i.preserveExistingAliasesSectionStyle?!x&&(y&&r==A||!y||S==A)?l=oe(l,u,we(A,h,i.defaultEscapeCharacter,i.removeUnnecessaryEscapeCharsForMultiLineArrays,!0)):l=oe(l,u,we(A,i.aliasArrayStyle,i.defaultEscapeCharacter,i.removeUnnecessaryEscapeCharsForMultiLineArrays,!0)):l=oe(l,u,we(A,i.aliasArrayStyle,i.defaultEscapeCharacter,i.removeUnnecessaryEscapeCharsForMultiLineArrays,!0))}else o||(l=oe(l,Kl,we(r,i.aliasArrayStyle,i.defaultEscapeCharacter,i.removeUnnecessaryEscapeCharsForMultiLineArrays,!0)));return!i.useYamlKeyToKeepTrackOfOldFilenameOrHeading||o?l=Ct(l,d):l=oe(l,d,`${r}`),t=t.replace(`---
${l}---`),t}getTitleInfo(t,i,n,r){let a=Ee([f.code,f.math,f.yaml,f.tag],t,Os);a=a||i;let s=wi(a,r,this.forceEscape(a,n));return[a,s]}forceEscape(t,i){return ss(t)||t.includes(",")&&(i==="single-line"||i==="single string to single-line"||i==="single string comma delimited")}getNewAliasValue(t,i,n,r){if(t==null)return i?"":n;if(typeof t=="string")i?t===n&&(t=""):r===t?t=n:t=[n,t];else if(r!==null){let a=t.indexOf(r);a===-1&&zn(r)&&(a=t.indexOf(r.substring(1,r.length-1))),a!==-1?i?t.splice(a,1):t[a]=n:t=[n,...t]}else{let a=t.indexOf(n);a!==-1?i&&t.splice(a,1):i||(t=[n,...t])}return t===""||t.length===0?"":t}get exampleBuilders(){return[new b({description:"Adds a header with the title from heading.",before:p`
`,options:{fileName:"Filename",keepAliasThatMatchesTheFilename:!0}}),new b({description:"Adds a header with the title without YAML key when the use of the YAML key is set to false.",before:p`
`,options:{fileName:"Filename",keepAliasThatMatchesTheFilename:!0,useYamlKeyToKeepTrackOfOldFilenameOrHeading:!1}}),new b({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:p`
`,options:{fileName:"Filename",keepAliasThatMatchesTheFilename:!0}}),new b({description:"Make sure that markdown and wiki links in first H1 get their values converted to text",before:p`
${i.titleKey}:${n}`)}return r})}getFirstH1Header(t){return Ee([f.code,f.math,f.yaml,f.tag],t,Os)}get exampleBuilders(){return[new b({description:"Adds a header with the title from heading when `mode='First H1 or Filename if H1 Missing'`.",before:p`
`,options:{fileName:"Filename"}}),new b({description:"Make sure that markdown links in headings are properly copied to the YAML as just the text when `mode='First H1 or Filename if H1 Missing'`",before:p`
`,options:{mode:"first-h1",fileName:"Filename"}}),new b({description:"When `mode='Filename'`, title uses the filename ignoring all H1s. Note: the filename is \"Filename\" in this example.",before:p`
`,options:{mode:"filename",fileName:"Filename"}})]}get optionBuilders(){return[new ke({OptionsClass:Jt,nameKey:"rules.yaml-title.title-key.name",descriptionKey:"rules.yaml-title.title-key.description",optionsKey:"titleKey"}),new ie({OptionsClass:Jt,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"}]})]}};xa=z([v.register],xa);var rw=`<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}/`,ni(c);let d=new RegExp(`${s.find}`,s.flags);r=r.replace(d,ru(s.replace)),a!=r&&ni(r),a=r}return r})}runPasteLint(t,i,n){let r=n.oldText;return[r]=$t.applyIfEnabled(r,n.settings,[]),[r]=Vt.applyIfEnabled(r,n.settings,[]),[r]=Ut.applyIfEnabled(r,n.settings,[]),[r]=Pt.applyIfEnabled(r,n.settings,[]),[r]=Wt.applyIfEnabled(r,n.settings,[]),[r]=Yt.applyIfEnabled(r,n.settings,[],{lineContent:t,selectedText:i}),[r]=jt.applyIfEnabled(r,n.settings,[],{lineContent:t,selectedText:i}),[r]=Bt.applyIfEnabled(r,n.settings,[],{lineContent:t}),r}};function wa(e,t=null,i,n){let r=t?(0,Bn.moment)(t.stat.ctime):(0,Bn.moment)();r.locale(i);let a=t?(0,Bn.moment)(t.stat.mtime):(0,Bn.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,Bn.moment)();return l.locale(i),l}}}var po=require("obsidian");var ka=class extends po.Modal{constructor(t,i,n,r,a,s=!1){super(t),this.modalEl.addClass("confirm-modal"),this.contentEl.createEl("h3",{text:E("warning-text")}).style.textAlign="center",s&&(this.contentEl.createEl("p",{text:E("custom-command-warning")}).style.fontWeight="bold"),this.contentEl.createEl("p",{text:i+" "+E("file-backup-text")}).id="confirm-dialog",this.contentEl.createDiv("modal-button-container",o=>{o.createEl("button",{text:"Cancel"}).addEventListener("click",()=>this.close());let l=o.createEl("button",{attr:{type:"submit"},cls:"mod-cta",text:n});l.addEventListener("click",async c=>{new po.Notice(r),this.close(),await a()}),setTimeout(()=>{l.focus()},50)})}};var ft=require("obsidian");var Pp=require("obsidian");var vw={General:Oe.general.id,Custom:Oe.custom.id,YAML:Oe.yaml.id,Heading:Oe.heading.id,Footnote:Oe.footer.id,Content:Oe.content.id,Spacing:Oe.whitespace.id,Paste:Oe.paste.id,Debug:Oe.debug.id},xw={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"},Bi=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,Pp.setIcon)(this.navButton.createSpan({cls:"linter-navigation-item-icon"}),vw[n]);let o=E(xw[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}),pi(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"),qi(this.contentEl)):(this.navButton.removeClass("linter-navigation-item-selected"),pi(this.contentEl)),i){case"entering search mode by focusing on the search input box":qi(this.contentEl),qi(this.headingEl);for(let n of this.searchSettingInfo)qi(n.containerEl);break;case"leaving search mode by selecting a tab":pi(this.headingEl);for(let n of this.searchSettingInfo)qi(n.containerEl);break}}};var bm=require("obsidian");var Hp=require("obsidian");var Sa={ruleConfigs:{},lintOnSave:!1,recordLintOnSaveLogs:!1,displayChanged:!0,lintOnFileChange:!1,displayLintOnFileChangeNotice:!1,settingsConvertedToConfigKeyValues:!1,foldersToIgnore:[],linterLocale:"system-default",logLevel:"ERROR",lintCommands:[],customRegexes:[],commonStyles:{aliasArrayStyle:"single-line",tagArrayStyle:"single-line",minimumNumberOfDollarSignsToBeAMathBlock:2,escapeCharacter:'"',removeUnnecessaryEscapeCharsForMultiLineArrays:!1}};var pt=class{construc
`," "))}};var ko=class extends Bi{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)}}};varvm=require("obsidian");varMa=classextendsNn{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()}};varSo=classextendsmt{constructor(i,n,r,a,s){super(i,n,E("options.custom-command.name"),E("options.custom-command.description"),E("options.custom-command.warning"),E("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){newvm.Setting(this.inputElDiv).addSearch(a=>{newMa(this.app,a.inputEl,this.lintCommands),a.setPlaceholder(E("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(E("options.custom-command.move-up-tooltip")).onClick(()=>{this.arrayMove(n,n-1),this.saveSettings(),this.resetInputEls()})}).addExtraButton(a=>{a.setIcon("down-chevron-glyph").setTooltip(E("options.custom-command.move-down-tooltip")).onClick(()=>{this.arrayMove(n,n+1),this.saveSettings(),this.resetInputEls()})}).addExtraButton(a=>{a.setIcon("cross").setTooltip(E("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}};varBc=require("obsidian");varik="gm",Ao=classextendsmt{constructor(i,n,r,a){super(i,n,E("options.custom-replace.name"),E("options.custom-replace.description"),E("options.custom-replace.warning"),E("options.custom-replace.add-input-button-text"),a,()=>{lets={label:"",find:"",replace:"",flags:ik};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=newBc.Setting(s).addText(d=>{d.setPlaceholder(E("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();newBc.Setting(l).addText(d=>{d.setPlaceholder(E("options.custom-replace.regex-to-find-placeholder-text")).setValue(i.find).onChange(u=>{this.regexes[n].find=u,this.saveSettings()})
`," "))}};var xm=require("obsidian");var Lo=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 xm.Setting(this.containerEl);t.settingEl.style.border="none",t.addSearch(i=>{this.search=i}),this.search.setPlaceholder(E("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){qi(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}}pi(s.containerEl)}else pi(s.containerEl);for(let[r,a]of this.tabNameToTab)i.has(r)?qi(a.headingEl):pi(a.headingEl);i.size===0?qi(this.searchZeroState):pi(this.searchZeroState)}focusOnInput(){this.search.inputEl.focus()}};var wm=pn(Ua());var Yn=require("obsidian");var qa=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":E("copy-aria-label")}}),this.copyIconEl=this.copyEl.createSpan(),(0,Yn.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,Yn.setIcon)(t,"linter-success"),setTimeout(()=>{(0,Yn.setIcon)(t,"linter-clipboard")},1500)},i=>{new Yn.Notice(`${E("notice-text.copy-to-clipboard-failed")+i}`,0)})}};var tk=Object.keys(wm.default.levels),To=class extends Bi{constructor(t,i,n,r){super(t,i,"Debug",n,r),this.display()}display(){let t=this.contentEl.createDiv(),i={isForEnum:!0,values:tk,descriptions:[]};this.addSettingSearchInfoForGeneralSettings(new Hi(t,"tabs.debug.log-level.name","tabs.debug.log-level.description","logLevel",this.plugin,i,async()=>{Za(this.plugin.settings.logLevel)})),t=this.contentEl.createDiv();let n=E("tabs.debug.linter-config.name"),r=E("tabs.debug.linter-config.description");new qa(t,n,r).inputEl.setText(JSON.stringify(this.plugin.settings,null,2)),this.addSettingSearchInfo(t,n,r),t=this.contentEl.createDiv(),this.addSettingSearchInfoForGeneralSettings(new _i(t,"tabs.debug.log-collection.name","tabs.debug.log-collection.description","recordLintOnSaveLogs",this.plugin)),t=this.contentEl.createDiv(),n=E("tabs.debug.linter-logs.name"),r=E("tabs.debug.linter-logs.description");let s=new qa(t,n,"");s.inputEl.setText(Ga.join(`
`)),Mi(r,s.descEl,this.plugin.settingsTab.component),this.addSettingSearchInfo(t,n,r)}};var Eo=class extends ft.PluginSettingTab{constructor(i,n){super(i,n);this.plugin=n;this.tabNameToTab=new Map;this.selectedTab="General";this.component=new ft.Component}display(){let{containerEl:i}=this;this.component.load(),i.empty();let n=i.createDiv("linter-setting-title");ft.Platform.isMobile?n.addClass("linter-mobile"):n.createEl("h1").setText(E("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(ft.Platform.isMobile),this.createSearchZeroState(ft.Platform.isMobile),this.generateSearchBar(n),this.selectedTab==""&&this.tabSearcher.focusOnInput()}hide(){this.component.unload()}addTabs(i){this.addTab(new wo(this.tabNavEl,this.settingsContentEl,i,this.plugin,this.app));for(let n of Object.values(D))this.addTab(new ko(this.tabNavEl,this.settingsContentEl,n,qt.get(n),i,this.plugin));this.addTab(new zo(this.tabNavEl,this.settingsContentEl,i,this.app,this.plugin)),this.addTab(new To(this.tabNavEl,this.settingsContentEl,i,this.plugin))}generateSearchBar(i){this.tabSearcher=new Lo(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(),pi(this.searchZeroState),this.searchZeroState.createEl(i?"h3":"h2",{text:E("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 pi(this.searchZeroState),this.tabNameToTab.get(i).updateTabDisplayMode(!0),this.tabNameToTab.get(this.selectedTab).updateTabDisplayMode(!1);this.selectedTab=i}}};var Sm=require("obsidian");var nk=/^---\n/gm,km=`${Sn}:`,Oo=class extends Sm.EditorSuggest{constructor(i){super(i.app);this.plugin=i;this.inline=!1;let n=E("all-rules-option");this.ruleInfo=[{displayName:n,name:n.toLowerCase(),alias:"all"}];for(let r of Ii){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(km)||this.disabledRulesIsEndOfStartOfFileToCursor(n.getRange({line:0,ch:0},i))){this.inline=a.startsWith(km);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]=Rs(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 re.Notice(E("notice-text.empty-clipboard"),yt);return}i.replaceSelection(n)}setCustomCommandCallback(i){(0,Om.warn)(E("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,E("commands.lint-file.error-message")+" '{FILE_PATH}'",!1)}this.customCommandsCallback&&await this.customCommandsCallback(i)})}getEditor(){let i=this.app.workspace.getActiveViewOfType(re.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(){es("en");for(let i of Ii){let n=E("rules."+i.alias+".name"),r=this.settings.ruleConfigs[n];if(r!=null){let a=E("rules."+i.alias+".description"),s={enabled:r[a]??!1};for(let o of i.options){if(o.configKey==="enabled")continue;let l=E("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(),es(window.localStorage.getItem("language"))}getAllFilesInFolder(i){let n=[],r=[i];for(let a of r)for(let s of a.children)s instanceof re.TFile&&this.isMarkdownFile(s)?n.push(s):s instanceof re.TFolder&&r.push(s);return n}updatePasteOverrideStatus(){for(let i of qt.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(`