varCm=Object.create;var$n=Object.defineProperty;var_c=Object.getOwnPropertyDescriptor;varMm=Object.getOwnPropertyNames;varqm=Object.getPrototypeOf,Im=Object.prototype.hasOwnProperty;varcn=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Fc=(e,t)=>{for(variint)$n(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&&$n(e,r,{get:()=>t[r],enumerable:!(n=_c(t,r))||n.enumerable});returne};vardn=(e,t,i)=>(i=e!=null?Cm(qm(e)):{},Rc(t||!e||!e.__esModule?$n(i,"default",{value:e,enumerable:!0}):i,e)),Bm=e=>Rc($n({},"__esModule",{value:!0}),e),A=(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&&$n(t,i,r),r};varMo=(e,t,i)=>{if(!t.has(e))throwTypeError("Cannot "+i)};varK=(e,t,i)=>(Mo(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)},qe=(e,t,i,n)=>(Mo(e,t,"write to private field"),n?n.call(e,i):t.set(e,i),i);varqo=(e,t,i,n)=>({set_(r){qe(e,t,r,i)},get_(){returnK(e,t,n)}}),he=(e,t,i)=>(Mo(e,t,"access private method"),i);varWa=cn((Ld,$a)=>{(function(e,t){"use strict";typeofdefine=="function"&&define.amd?define(t):typeof$a=="object"&&$a.exports?$a.exports=t():e.log=t()})(Ld,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"];functionr(f,w){varx=f[w];if(typeofx.bind=="function")returnx.bind(f);try{returnFunction.prototype.bind.call(x,f)}catch{returnfunction(){returnFunction.prototype.apply.apply(x,[f,arguments])}}}functiona(){console.log&&(console.log.apply?console.log.apply(console,arguments):Function.prototype.apply.apply(console.log,[console,arguments])),console.trace&&console.trace()}functions(f){returnf==="debug"&&(f="log"),typeofconsole===t?!1:f==="trace"&&i?a:console[f]!==void0?r(console,f):console.log!==void0?r(console,"log"):e}functiono(f,w){for(varx=0;x<n.length;x++){varv=n[x];this[v]=x<f?e:this.methodFactory(v,f,w)}this.log=this.debug}functionl(f,w,x){returnfunction(){typeofconsole!==t&&(o.call(this,w,x),this[f].apply(this,arguments))}}functionc(f,w,x){returns(f)||l.apply(this,arguments)}functiond(f,w,x){varv=this,z;w=w??"WARN";varL="loglevel";typeoff=="string"?L+=":"+f:typeoff=="symbol"&&(L=void0);functionC(q){var_=(n[q]||"silent").toUpperCase();if(!(typeofwindow===t||!L)){try{window.localStorage[L]=_;return}catch{}try{window.document.cookie=encodeURIComponent(L)+"="+_+";"}catch{}}}functionR(){varq;if(!(typeofwindow===t||!L)){try{q=window.localStorage[L]}catch{}if(typeofq===t)try{var_=window.document.cookie,P=_.indexOf(encodeURIComponent(L)+"=");P!==-1&&(q=/^([^;]+)/.exec(_.slice(P))[1])}catch{}returnv.levels[q]===void0&&(q=void0),q}}functionT(){if(!(typeofwindow===t||!L)){try{window.localStorage.removeItem(L);return}catch{}try{window.document.cookie=encodeURIComponent(L)+"=; expires=Thu, 01 Jan 1970 00:00:00 UTC"}catch{}}}v.name=f,v.levels={TRACE:0,DEBUG:1,INFO:2,WARN:3,ERROR:4,SILENT:5},v.methodFactory=x||c,v.getLevel=function(){returnz},v.setLevel=function(q,_){if(typeofq=="string"&&v.levels[q.toUpperCase()]!==void0&&(q=v.levels[q.toUpperCase()]),typeofq=="number"&&q>=0&&q<=v.levels.SILENT){if(z=q,_!==!1&&C(q),o.call(v,q,f),typeofconsole===t&&q<v.levels.SILENT)return"No console available for logging"}elsethrow"log.setLevel() called with invalid level: "+q},v.setDefaultLevel=function(q){w=q,R()||v.setLevel(q,!1)},v.resetLevel=function(){v.setLevel(w,!1),T()},v.enableAll=function(q){v.setLevel(v.levels.TRACE,q)},v.disableAll=function(q){v.setLevel(v.levels.SILENT,q)};varB=R();B==null&&(B=w),v.setLevel(B,!1)}varu=newd,g={};u.getLogger=function(w){if(typeofw!="symbol"&&typeofw!="string"||w==="")thrownewTypeError("You must supply a name when creating a logger.");varx=g[w];returnx||(x=g[w]=newd(w,u.getLevel(),u.methodFac
`;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 Ye=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 Fo(e){return this.extend(e)}Fo.prototype.extend=function(t){var i=[],n=[];if(t instanceof Ye)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 Ye))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 Ye))throw new Ue("Specified list of YAML types (or a single Type object) contains a non-Type object.")});var r=Object.create(Fo.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=Fo,eg=new Ye("tag:yaml.org,2002:str",{kind:"scalar",construct:function(e){return e!==null?e:""}}),ig=new Ye("tag:yaml.org,2002:seq",{kind:"sequence",construct:function(e){return e!==null?e:[]}}),tg=new Ye("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 Ye("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 Ye("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(bt=0;bt<256;bt++)ld[bt]=Yc(bt)?1:0,cd[bt]=Yc(bt);var bt;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 Y(e,t){throw dd(e,t)}function Ya(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&&Y(t,"duplication of %YAML directive"),n.length!==1&&Y(t,"YAML directive accepts exactly one argument"),r=/^([0-9]+)\.([0-9]+)$/.exec(n[0]),r===null&&Y(t,"ill-formed argument of the YAML directive"),a=parseInt(r[1],10),s=parseInt(r[2],10),a!==1&&Y(t,"unacceptable YAML version of the document"),t.version=n[0],t.checkLineBreaks=s<2,s!==1&&s!==2&&Ya(t,"unsupported YAML version of the document")},TAG:function(t,i,n){var r,a;n.length!==2&&Y(t,"TAG directive accepts exactly two arguments"),r=n[0],a=n[1],sd.test(r)||Y(t,"ill-formed tag handle (first argument) of the TAG directive"),Qi.call(t.tagMap,r)&&Y(t,'there is a previously declared suffix for "'+r+'" tag handle'),od.test(a)||Y(t,"ill-formed tag prefix (second argument) of the TAG directive");try{a=decodeURIComponent(a)}catch{Y(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||Y(e,"expected valid JSON character");else Xg.test(o)&&Y(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)||Y(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 mn(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])&&Y(e,"nested arrays are not supported inside keys"),typeof r=="object"&&Kc(r[c])==="[object Object]"&&(r[c]="[object Object]");if(typeof r=="object"&&Kc(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,Y(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 jo(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++):Y(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(;vt(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(Li(r))for(jo(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&&Ya(e,"deficient indentation"),n}function Ha(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 Po(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)||pn(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&&pn(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&&pn(r))break}else if(m===35){if(n=e.input.charCodeAt(e.position-1),ii(n))break}else{if(e.position===e.lineStart&&Ha(e)||i&&pn(m))break;if(Li(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),Po(e,e.line-l),a=s=e.position,o=!1),vt(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 Li(i)?(Gi(e,n,r,!0),Po(e,ze(e,!1,t)),n=r=e.position):e.position===e.lineStart&&Ha(e)?Y(e,"unexpected end of the document within a single quoted scalar"):(e.position++,r=e.position);Y(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),Li(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:Y(e,"expected hexadecimal character");e.result+=ah(a),e.position++}else Y(e,"unknown escape sequence");i=n=e.position}else Li(o)?(Gi(e,i,n,!0),Po(e,ze(e,!1,t)),i=n=e.position):e.position===e.lineStart&&Ha(e)?Y(e,"unexpected end of the document within a double quoted scalar"):(e.position++,n=e.position)}Y(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,f=Object.create(null),w,x,v,z;if(z=e.input.charCodeAt(e.position),z===91)d=93,m=!1,o=[];else if(z===123)d=125,m=!0,o={};else return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=o),z=e.input.charCodeAt(++e.position);z!==0;){if(ze(e,!0,t),z=e.input.charCodeAt(e.position),z===d)return e.position++,e.tag=s,e.anchor=l,e.kind=m?"mapping":"sequence",e.result=o,!0;i?z===44&&Y(e,"expected the node content, but found ','"):Y(e,"missed comma between flow collection entries"),x=w=v=null,u=g=!1,z===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,gn(e,t,Na,!1,!0),x=e.tag,w=e.result,ze(e,!0,t),z=e.input.charCodeAt(e.position),(g||e.line===n)&&z===58&&(u=!0,z=e.input.charCodeAt(++e.position),ze(e,!0,t),gn(e,t,Na,!1,!0),v=e.result),m?mn(e,o,f,x,w,v,n,r,a):u?o.push(mn(e,null,f,x,w,v,n,r,a)):o.push(w),ze(e,!0,t),z=e.input.charCodeAt(e.position),z===44?(i=!0,z=e.input.charCodeAt(++e.position)):i=!1}Y(e,"unexpected end of the stream within a flow collection")}function uh(e,t){var i,n,r=_o,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)_o===r?r=u===43?Nc:Jg:Y(e,"repeat of a chomping mode identifier");else if((d=rh(u))>=0)d===0?Y(e,"bad explicit indentation width of a block scalar; it cannot be less than one"):s?Y(e,"repeat of an indentation width identifier"):(o=t+d-1,s=!0);else break;if(vt(u)){do u=e.input.charCodeAt(++e.position);while(vt(u));if(u===35)do u=e.input.charCodeAt(++e.position);while(!Li(u)&&u!==0)}for(;u!==0;){for(jo(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;!Li(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,Y(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,gn(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)Y(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,f=null,w=null,x=!1,v=!1,z;if(e.firstTabInLine!==-1)return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=u),z=e.input.charCodeAt(e.position);z!==0;){if(!x&&e.firstTabInLine!==-1&&(e.position=e.firstTabInLine,Y(e,"tab characters must not be used in indentation")),n=e.input.charCodeAt(e.position+1),a=e.line,(z===63||z===58)&&ii(n))z===63?(x&&(mn(e,u,g,m,f,null,s,o,l),m=f=w=null),v=!0,x=!0,r=!0):x?(x=!1,r=!0):Y(e,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"),e.position+=1,z=n;else{if(s=e.line,o=e.lineStart,l=e.position,!gn(e,i,rd,!1,!0))break;if(e.line===a){for(z=e.input.charCodeAt(e.position);vt(z);)z=e.input.charCodeAt(++e.position);if(z===58)z=e.input.charCodeAt(++e.position),ii(z)||Y(e,"a whitespace character is expected after the key-value separator within a block mapping"),x&&(mn(e,u,g,m,f,null,s,o,l),m=f=w=null),v=!0,x=!1,r=!1,m=e.tag,f=e.result;else if(v)Y(e,"can not read an implicit mapping pair; a colon is missed");else return e.tag=c,e.anchor=d,!0}else if(v)Y(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)&&(x&&(s=e.line,o=e.lineStart,l=e.position),gn(e,t,Ka,!0,r)&&(x?f=e.result:w=e.result),x||(mn(e,u,g,m,f,w,s,o,l),m=f=w=null),ze(e,!0,-1),z=e.input.charCodeAt(e.position)),(e.line===a||e.lineIndent>t)&&z!==0)Y(e,"bad indentation of a mapping entry");else if(e.lineIndent<t)break}return x&&mn(e,u,g,m,f,null,s,o,l),v&&(e.tag=c,e.anchor=d,e.kind="mapping",e.result=u),v}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&&Y(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)):Y(e,"unexpected end of the stream within a verbatim tag")}else{for(;s!==0&&!ii(s);)s===33&&(n?Y(e,"tag suffix cannot contain exclamation marks"):(r=e.input.slice(t-1,e.position+1),sd.test(r)||Y(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)&&Y(e,"tag suffix cannot contain flow indicator characters")}a&&!od.test(a)&&Y(e,"tag name cannot contain such characters: "+a);try{a=decodeURIComponent(a)}catch{Y(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:Y(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&&Y(e,"duplication of an anchor property"),i=e.input.charCodeAt(++e.position),t=e.position;i!==0&&!ii(i)&&!pn(i);)i=e.input.charCodeAt(++e.position);return e.position===t&&Y(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,Y(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,Ho=65279,wh=9,Vn=10,kh=13,Sh=32,zh=33,Ah=34,Ro=35,Th=37,Lh=38,Eh=39,Oh=42,hd=44,Ch=45,ja=58,Mh=61,qh=62,Ih=63,Bh=64,fd=91,yd=93,_h=96,bd=123,Fh=124,vd=125,je={};je[0]="\\0";je[7]="\\a";je[8]="\\b";je[9]="\\t";je[10]="\\n";je[11]="\\v";je[12]="\\f";je[13]="\\r";je[27]="\\e";je[34]='\\"';je[92]="\\\\";je[133]="\\N";je[160]="\\_";je[8232]="\\L";je[8233]="\\P";var 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 Nh(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 Kh(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,Gn=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=Nh(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==='"'?Gn: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),ae.default.error(i),Jn&&Ga(i.substring(i.indexOf("]")+2),ae.default.levels.TRACE)}function hn(e){ae.default.info(`${Ua}${e}`),Jn&&Ga(e,ae.default.levels.INFO)}function ni(e){ae.default.debug(`${Ua}${e}`),Jn&&Ga(e,ae.default.levels.DEBUG)}function xt(e){ae.default.warn(`${Ua}${e}`),Jn&&Ga(e,ae.default.levels.WARN)}function wt(e){ae.default.getLevel()>ae.default.levels.DEBUG||Go.set(e,performance.now())}function Zi(e){if(ae.default.getLevel()>ae.default.levels.DEBUG)return;Go.has(e)||xt(E("logs.timing-key-not-found").replace("{TIMING_KEY}",e));let t=performance.now()-Go.get(e);ni(`${e}:${t}`+E("logs.milliseconds-abbreviation"))}function Ga(e,t){ae.default.getLevel()<=t&&Va.push(e)}function Od(){Va=[]}function Qo(e){Jn=e}function Qa(e){switch(e){case"INFO":{ae.default.setLevel("info");break}case"TRACE":{ae.default.setLevel("trace");break}case"DEBUG":{ae.default.setLevel("debug");break}case"SILENT":{ae.default.setLevel("silent");break}case"ERROR":{ae.default.setLevel("error");break}case"WARN":{ae.default.setLevel("warn");break}}}function Cd(e){switch(e){case ae.default.levels.INFO:return"INFO";case ae.default.levels.TRACE:return"TRACE";case ae.default.levels.DEBUG:return"DEBUG";case ae.default.levels.SILENT:return"SILENT";case ae.default.levels.ERROR:return"ERROR";case ae.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 f=g.match(/\[\^.*?\]/)[0];n.set(g,f);let w=s.has(f);if(w&&i.includes(g)){o.unshift(g);return}else if(w)throw new Error(E("logs.too-many-footnotes-error-message").replace("{FOOTNOTE_KEY}",f));let x;do x=u.lastIndexOf(f,m),x!==-1&&((x+g.length>u.length||u.substring(x,x+g.length)!==g)&&a.push({key:f,position:x}),m=x-1);while(x>0);s.add(f)};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 xs(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=ce(e,a.start.offset,a.end.offset,s)}return e}function Wu(e){let t=xe("paragraph",e);if(t.length===0)return e;for(let i of t){let n=e.substring(i.start.offset,i.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(pr))continue;let r=n.indexOf("]"),a=n.substring(0,1)+n.substring(1,r).trim()+n.substring(r);e=ce(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=ce(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=ce(e,n.start.offset+2,n.end.offset-2,r)}return e}function ws(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=ce(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=St(e,i.start.offset,i.end.offset));return e}function Ju(e,t){let i=xe("math",e);for(let n of i)e=St(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=St(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=St(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,f,w,x,v)=>{let z=1,L=o(g);if(!/^\d/.test(f)){let C=L>d?L:d;return c(L,C),u}return l.has(L)?t==="ascending"&&(z=l.get(L)+1,l.set(L,z)):l.set(L,1),d>L&&c(L,d),d=L,`${g}${z}${i}${v}`}),e=ce(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=ce(e,a.start.offset,a.end.offset,s))}return e}function _l(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=ce(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=vb(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 vb(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(Xn(e,t),t)??"",[s]=fn(a,a.length),o=e.substring(Xn(e,i),i)??"",l=e.substring(t,i),c=ap.test(a.trim()),d=!1;for(l=l.replace(n,(u,g,m="")=>{let f="";return!c&&a.trim()!=""?(f+=`
---`)},wikiLink:{replaceAction:As,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:xn,placeholder:"{URL_PLACEHOLDER}"},anchorTag:{replaceAction:gp,placeholder:"{ANCHOR_PLACEHOLDER}"},templaterCommand:{replaceAction:vp,placeholder:"{TEMPLATER_PLACEHOLDER}"},link:{replaceAction:Cb,placeholder:"{REGULAR_LINK_PLACEHOLDER}"},tag:{replaceAction:Mb,placeholder:"#tag-placeholder"},table:{replaceAction:qb,placeholder:"{TABLE_PLACEHOLDER}"},customIgnore:{replaceAction:Ib,placeholder:"{CUSTOM_IGNORE_PLACEHOLDER}"}};function Le(e,t,i){let n=[];for(let r of e){let a;if(typeof r.replaceAction=="string")a=Eb(t,r.placeholder,r.replaceAction);else if(r.replaceAction instanceof RegExp)a=Ob(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 Eb(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=ce(e,a.start.offset,a.end.offset,t)}return r.reverse(),{newText:e,replacedValues:r}}function Ob(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 Cb(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(pr)&&(n.push(a),e=ce(e,r.start.offset,r.end.offset,t))}return n.reverse(),{newText:e,replacedValues:n}}function Mb(e,t){let i=[];return e=e.replace(mr,(n,r,a)=>(i.push(a),r+t)),{newText:e,replacedValues:i}}function qb(e,t){let i=ks(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=ce(e,s.startIndex,s.endIndex,t);return{newText:e,replacedValues:n}}function Ib(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=ce(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 zn("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 Le(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=kn(e);if(t===null)return[[],!1];let i=Tp(t);return i.includes("all")?[qi.map(n=>n.alias),!0]:[i,!1]}var qi=[],Bb={},Ct=new Map;function Cp(e){qi.push(e),qi.sort((t,i)=>Op.indexOf(t.type)-Op.indexOf(i.type)||t.settingsKey.localeCompare(i.settingsKey)),Bb[e.alias]=e,Ct.has(e.type)?Ct.get(e.type).push(e):Ct.set(e.type,[e])}function Ds(e,t){let i;throw e instanceof zd?(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]=fn(l,r-1);let d=o+a.length+1,u=r;c&&u++;let g=l.substring(d,u),m=Ss.test(g);s=i(a,m),o++,l=ce(l,o,o+a.length,s),n=r+1+s.length-a.length}while(!c);return l}get exampleBuilders(){return[new y({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 ne({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"}]})]}};Mt=A([b.register],Mt);var Ps=class{};A([b.noSettingControl()],Ps.prototype,"lineContent",2);var qt=class extends b{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 y({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 y({description:"Line being pasted into a blockquote gets blockquotified with current line being `>>`",before:p`
`,options:{style:"ALL CAPS"}})]}get optionBuilders(){return[new ne({OptionsClass:It,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 U({OptionsClass:It,nameKey:"rules.capitalize-headings.ignore-case-words.name",descriptionKey:"rules.capitalize-headings.ignore-case-words.description",optionsKey:"ignoreCasedWords"}),new me({OptionsClass:It,nameKey:"rules.capitalize-headings.ignore-words.name",descriptionKey:"rules.capitalize-headings.ignore-words.description",optionsKey:"ignoreWords",splitter:gr,separator:", "}),new me({OptionsClass:It,nameKey:"rules.capitalize-headings.lowercase-words.name",descriptionKey:"rules.capitalize-headings.lowercase-words.description",optionsKey:"lowercaseWords",splitter:gr,separator:", "})]}};Bt=A([b.register],Bt);var Hs=class{constructor(){this.innerNewLines=!1}},kr=class extends b{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=se(n,a,we(at(this.getUniqueArray(Ie(ue(n,a)))),i.aliasArrayStyle,i.defaultEscapeCharacter,i.removeUnnecessaryEscapeCharsForMultiLineArrays,!0));break}for(let a of vi)if(i.dedupeTagKey&&Object.keys(r).includes(a)){n=se(n,a,we(rt(this.getUniqueArray(Ie(ue(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=ue(n,s),l="single-line";o.includes(`
`)&&(l="multi-line");let c=this.getUniqueArray(Ie(o));n=se(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 y({description:"Dedupe YAML tags is case sensitive and will use your default format for tags.",before:p`
---
tags:[computer,research,computer,Computer]
aliases:
-Title1
-Title2
---
`,after:p`
---
tags:[computer,research,Computer]
aliases:
-Title1
-Title2
---
`,options:{aliasArrayStyle:"multi-line"}}),new y({description:"Dedupe YAML aliases is case sensitive and will use your default format for aliases.",before:p`
---
tags:[computer,research]
aliases:
-Title1
-Title2
-Title1
-Title2
-Title3
---
`,after:p`
---
tags:[computer,research]
aliases:
-Title1
-Title2
-Title3
---
`,options:{aliasArrayStyle:"multi-line"}}),new y({description:"Dedupe YAML array keys is case sensitive and will try to preserve the original array format.",before:p`
---
tags:[computer,research]
aliases:
-Title1
-Title2
arr1:[val,val1,val,val2,Val]
arr2:
-Val
-Val
-val
-val2
-Val2
---
`,after:p`
---
tags:[computer,research]
aliases:
-Title1
-Title2
arr1:[val,val1,val2,Val]
arr2:
-Val
-val
-val2
-Val2
---
`,options:{aliasArrayStyle:"multi-line"}}),new y({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 U({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 U({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 U({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"})]}};Tr=A([b.register],Tr);var Ws=class{constructor(){this.defaultLanguage=""}},Lr=class extends b{constructor(){super({nameKey:"rules.default-language-for-code-fences.name",descriptionKey:"rules.default-language-for-code-fences.description",type:"Content",ruleIgnoreTypes:[h.yaml,h.math,h.yaml,h.link,h.wikiLink,h.tag]})}get OptionsClass(){return Ws}apply(t,i){return rp(t,i.defaultLanguage)}get exampleBuilders(){return[new y({description:"Add a default language `javascript` to code blocks that do not have a language specified",before:p`
`,options:{defaultLanguage:""}})]}get optionBuilders(){return[new $e({OptionsClass:Ws,nameKey:"rules.default-language-for-code-fences.default-language.name",descriptionKey:"rules.default-language-for-code-fences.default-language.description",optionsKey:"defaultLanguage"})]}};Lr=A([b.register],Lr);var Us=class{constructor(){this.style="consistent"}},Er=class extends b{constructor(){super({nameKey:"rules.emphasis-style.name",descriptionKey:"rules.emphasis-style.description",type:"Content",ruleIgnoreTypes:[h.code,h.math,h.yaml,h.link,h.wikiLink,h.tag,h.math,h.inlineMath]})}get OptionsClass(){return Us}apply(t,i){return xs(t,i.style,"emphasis")}get exampleBuilders(){return[new y({description:"Emphasis indicators should use underscores when style is set to 'underscore'",before:p`
`,options:{style:"asterisk"}}),new y({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 y({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 ne({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=A([b.register],Er);var $l=class{},Or=class extends b{constructor(){super({nameKey:"rules.empty-line-around-blockquotes.name",descriptionKey:"rules.empty-line-around-blockquotes.description",type:"Spacing"})}get OptionsClass(){return $l}apply(t,i){return Xu(t)}get exampleBuilders(){return[new y({description:"Blockquotes that start a document do not get an empty line before them.",before:p`
`})]}get optionBuilders(){return[]}};Or=A([b.register],Or);var Wl=class{},Cr=class extends b{constructor(){super({nameKey:"rules.empty-line-around-code-fences.name",descriptionKey:"rules.empty-line-around-code-fences.description",type:"Spacing"})}get OptionsClass(){return Wl}apply(t,i){return Zu(t)}get exampleBuilders(){return[new y({description:"Fenced code blocks that start a document do not get an empty line before them.",before:p`
`})]}get optionBuilders(){return[]}};Cr=A([b.register],Cr);var Vs=class{constructor(){this.minimumNumberOfDollarSignsToBeAMathBlock=2}};A([b.noSettingControl()],Vs.prototype,"minimumNumberOfDollarSignsToBeAMathBlock",2);var Mr=class extends b{constructor(){super({nameKey:"rules.empty-line-around-math-blocks.name",descriptionKey:"rules.empty-line-around-math-blocks.description",type:"Spacing",ruleIgnoreTypes:[h.yaml,h.code]})}get OptionsClass(){return Vs}apply(t,i){return Ju(t,i.minimumNumberOfDollarSignsToBeAMathBlock)}get exampleBuilders(){return[new y({description:"Math blocks that start a document do not get an empty line before them.",before:p`
`}),new y({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 y({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=A([b.register],Mr);var Ul=class{},qr=class extends b{constructor(){super({nameKey:"rules.empty-line-around-tables.name",descriptionKey:"rules.empty-line-around-tables.description",type:"Spacing",ruleIgnoreTypes:[h.yaml,h.code,h.math,h.inlineMath,h.wikiLink,h.link]})}get OptionsClass(){return Ul}apply(t,i){return kp(t)}get exampleBuilders(){return[new y({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=A([b.register],_r);var Fr=class{constructor(){this.defaultEscapeCharacter='"';this.forceYamlEscape=[]}};A([b.noSettingControl()],Fr.prototype,"defaultEscapeCharacter",2);var Ft=class extends b{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=ue(n,r);if(a!=null){if(a.includes(`
`)||a.startsWith(" [")||Sn(a))continue;a=wi(a,i.defaultEscapeCharacter,!0),n=se(n,r," "+a)}}return n})}get exampleBuilders(){return[new y({description:"YAML without anything to escape",before:p`
`}),new y({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=se(n,a,we(at(Ie(ue(n,a))),i.aliasArrayStyle,i.defaultEscapeCharacter,i.removeUnnecessaryEscapeCharsForMultiLineArrays,!0));break}for(let a of vi)if(i.formatTagKey&&Object.keys(r).includes(a)){n=se(n,a,we(rt(Ie(ue(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=se(n,s,we(Ie(ue(n,s)),i.defaultArrayStyle,i.defaultEscapeCharacter,i.removeUnnecessaryEscapeCharsForMultiLineArrays)))}for(let a of i.forceSingleLineArrayStyle)Object.keys(r).includes(a)&&(n=se(n,a,we(Ie(ue(n,a)),"single-line",i.defaultEscapeCharacter,i.removeUnnecessaryEscapeCharsForMultiLineArrays)));for(let a of i.forceMultiLineArrayStyle)Object.keys(r).includes(a)&&(n=se(n,a,we(Ie(ue(n,a)),"multi-line",i.defaultEscapeCharacter,i.removeUnnecessaryEscapeCharsForMultiLineArrays)));return n})}get exampleBuilders(){return[new y({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 y({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 y({description:"Arrays with dictionaries in them are ignored",before:p`
`,options:{bottom:!1,emptyLineAfterYaml:!0}}),new y({description:"Empty line before header and after YAML is removed with `EmptyLineBetweenYAMLandHeader=false`",before:p`
`)))}return n})}get exampleBuilders(){return[new y({description:"Insert static lines into YAML frontmatter. Text to insert: `aliases:\ntags:doc\nanimal:dog`",before:p`
`})]}get optionBuilders(){return[]}};Hr=A([b.register],Hr);var Js=class{constructor(){this.minimumNumberOfDollarSignsToBeAMathBlock=2}};A([b.noSettingControl()],Js.prototype,"minimumNumberOfDollarSignsToBeAMathBlock",2);var Dt=class extends b{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:[h.code,h.inlineCode],hasSpecialExecutionOrder:!0})}get OptionsClass(){return Js}apply(t,i){return tp(t,i.minimumNumberOfDollarSignsToBeAMathBlock)}get exampleBuilders(){return[new y({description:"Moving math block indicator to its own line when `NumberofDollarSignstoIndicateaMathBlock` = 2",before:p`
`}),new y({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 y({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=ue(r,c);if(d!=null){a=rt(Ie(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`---
${se(r,s,we(a,i.tagArrayStyle,i.defaultEscapeCharacter,i.removeUnnecessaryEscapeCharsForMultiLineArrays))}---`}),t=Le([h.yaml],t,r=>(i.howToHandleExistingTags!=="Nothing"&&(r=r.replace(mr,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 y({description:"Move tags from body to YAML with `Tagstoignore='ignored-tag'`",before:p`
`,options:{tagsToIgnore:["ignored-tag"]}}),new y({description:"Move tags from body to YAML with existing tags retains the already existing ones and only adds new ones",before:p`
`}),new y({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 y({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 ne({OptionsClass:ct,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:ct,nameKey:"rules.move-tags-to-yaml.tags-to-ignore.name",descriptionKey:"rules.move-tags-to-yaml.tags-to-ignore.description",optionsKey:"tagsToIgnore"})]}};$r=A([b.register],$r);var eo=class{constructor(){this.noBareURIs=!1}},Xs="'\"\u2018\u2019\u201C\u201D`[]",gv=["http","ftp","https","smtp"],Wr=class extends b{constructor(){super({nameKey:"rules.no-bare-urls.name",descriptionKey:"rules.no-bare-urls.description",type:"Content",ruleIgnoreTypes:[h.code,h.math,h.yaml,h.link,h.wikiLink,h.tag,h.image,h.inlineCode,h.anchorTag,h.html]})}get OptionsClass(){return eo}apply(t,i){let n=t.match(xn);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 f=c;for(;f<t.length-1&&t.charAt(f+1)===">";)f++;t=ce(t,m,f+1,"<"+o+">"),r=l+o.length;continue}t=ce(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?gv.includes(n.substring(0,n.indexOf(":"))):!1}get exampleBuilders(){return[new y({description:"Makesurethatlinksareinsideofanglebracketswhennotinsinglequotes('),doublequotes(\"), or backticks(`)",before:p`
`,options:{noBareURIs:!0}})]}get optionBuilders(){return[new U({OptionsClass:eo,nameKey:"rules.no-bare-urls.no-bare-uris.name",descriptionKey:"rules.no-bare-urls.no-bare-uris.description",optionsKey:"noBareURIs"})]}};Wr=A([b.register],Wr);var Vr=class{constructor(){this.numberStyle="ascending";this.listEndStyle="."}},Ur=class extends b{constructor(){super({nameKey:"rules.ordered-list-style.name",descriptionKey:"rules.ordered-list-style.description",type:"Content",ruleIgnoreTypes:[h.code,h.math,h.yaml,h.tag]})}get OptionsClass(){return Vr}apply(t,i){return ep(t,i.numberStyle,i.listEndStyle)}get exampleBuilders(){return[new y({description:"Ordered lists have list items set to ascending numerical order when Number Style is `ascending`.",before:p`
`,options:{numberStyle:"lazy"}}),new y({description:"Ordered list in blockquote has list items set to ascending numerical order when Number Style is `ascending`.",before:p`
`}),new y({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 ne({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 ne({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=A([b.register],Ur);var Xl=class{},Gr=class extends b{constructor(){super({nameKey:"rules.paragraph-blank-lines.name",descriptionKey:"rules.paragraph-blank-lines.description",type:"Spacing",ruleIgnoreTypes:[h.obsidianMultiLineComments,h.yaml,h.table]})}get OptionsClass(){return Xl}apply(t,i){return Uu(t)}get exampleBuilders(){return[new y({description:"Paragraphs should be surrounded by blank lines",before:p`
`})]}get optionBuilders(){return[]}};Gr=A([b.register],Gr);var Qr=class{};A([b.noSettingControl()],Qr.prototype,"lineContent",2),A([b.noSettingControl()],Qr.prototype,"selectedText",2);var Nt=class extends b{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=Ls.test(t),a=Ls.test(i.selectedText);return!n||!r||a?t:t.replace(Ls,"")}get exampleBuilders(){return[new y({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 y({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 y({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 y({description:"Line being pasted with a checklist indicator has its checklist indicator removed when current line is: `-[]`",before:p`
`,options:{lineContent:"- [ ] ",selectedText:""}}),new y({description:"Line being pasted as a checklist indicator has its checklist indicator removed when current line is: `-[!]`",before:p`
`,options:{lineContent:"- [!] ",selectedText:""}}),new y({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[]}};Nt=A([b.register],Nt);var Zr=class{};A([b.noSettingControl()],Zr.prototype,"lineContent",2),A([b.noSettingControl()],Zr.prototype,"selectedText",2);var Kt=class extends b{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(`^${hr}[*+-]`),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 y({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 y({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 y({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 y({description:"Line being pasted with a list indicator is has its list indicator removed when current line is: `+`",before:p`
`,options:{lineContent:"+ ",selectedText:""}}),new y({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[]}};Kt=A([b.register],Kt);var ec=class{},Yt=class extends b{constructor(){super({nameKey:"rules.proper-ellipsis-on-paste.name",descriptionKey:"rules.proper-ellipsis-on-paste.description",type:"Paste"})}get OptionsClass(){return ec}apply(t,i){return t.replaceAll(Ts,"\u2026")}get exampleBuilders(){return[new y({description:"Replacing three consecutive dots with an ellipsis even if spaces are present",before:p`
`})]}get optionBuilders(){return[]}};Jr=A([b.register],Jr);var jt=class{constructor(){this.singleQuoteStyleEnabled=!0;this.singleQuoteStyle="''";this.doubleQuoteStyleEnabled=!0;this.doubleQuoteStyle='""'}},Xr=class extends b{constructor(){super({nameKey:"rules.quote-style.name",descriptionKey:"rules.quote-style.description",type:"Content",ruleIgnoreTypes:[h.code,h.inlineCode,h.math,h.yaml,h.math,h.inlineMath,h.html,h.link,h.wikiLink,h.templaterCommand]})}get OptionsClass(){return jt}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,f=!1,w=!1,x="";for(let v of s)c=v==0?"":t.charAt(v-1),d=v===o?"":t.charAt(v+1),u=Fl.test(c),g=Fl.test(d),w=u&&g,m=c!=""&&c.trim()==="",f=d!=""&&d.trim()==="",w&&a?l=r:f&&!m?(l=r,x=l):m&&!f?(l=n,x=l):(x===""||x===r?l=n:l=r,x=l),t=ce(t,v,v+1,l);return t}get exampleBuilders(){return[new y({description:"Smart quotes used in file are converted to straight quotes when styles are set to `Straight`",before:p`
`}),new y({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 $e({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 $e({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=A([b.register],la);var io=class{constructor(){this.punctuationToRemove=".,;:!\u3002\uFF0C\uFF1B\uFF1A\uFF01"}},da=class extends b{constructor(){super({nameKey:"rules.remove-trailing-punctuation-in-heading.name",descriptionKey:"rules.remove-trailing-punctuation-in-heading.description",type:"Heading",ruleIgnoreTypes:[h.code,h.math,h.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 y({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=se(n,a,we(at(this.sortArray(Ie(ue(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=se(n,a,we(rt(this.sortArray(Ie(ue(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=ue(n,s),l="single-line";o.includes(`
`,options:{aliasArrayStyle:"multi-line"}}),new y({description:"Sorting YAML array values to be alphabetically descending",before:p`
---
tags:[computer,research,androids,Computer]
aliases:
-Title1
-Title2
---
`,after:p`
---
tags:[research,Computer,computer,androids]
aliases:
-Title2
-Title1
---
`,options:{aliasArrayStyle:"multi-line"}}),new y({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 U({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 U({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 U({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 ne({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=A([b.register],pa);var mc=class{},ma=class extends b{constructor(){super({nameKey:"rules.space-after-list-markers.name",descriptionKey:"rules.space-after-list-markers.description",type:"Spacing",ruleIgnoreTypes:[h.code,h.math,h.yaml,h.link,h.wikiLink,h.tag]})}get OptionsClass(){return mc}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 y({description:"A single space is left between the list marker and the text of the list item",before:p`
`})]}get optionBuilders(){return[]}};ga=A([b.register],ga);var no=class{constructor(){this.style="consistent"}},ha=class extends b{constructor(){super({nameKey:"rules.strong-style.name",descriptionKey:"rules.strong-style.description",type:"Content",ruleIgnoreTypes:[h.code,h.yaml,h.link,h.wikiLink,h.tag,h.math,h.inlineMath]})}get OptionsClass(){return no}apply(t,i){return xs(t,i.style,"strong")}get exampleBuilders(){return[new y({description:"Strong indicators should use underscores when style is set to 'underscore'",before:p`
`,options:{style:"asterisk"}}),new y({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 y({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 ne({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"}]})]}};ha=A([b.register],ha);var ro=class{constructor(){this.twoSpaceLineBreak=!1}},Vt=class extends b{constructor(){super({nameKey:"rules.trailing-spaces.name",descriptionKey:"rules.trailing-spaces.description",type:"Spacing",hasSpecialExecutionOrder:!0,ruleIgnoreTypes:[h.code,h.math,h.yaml,h.link,h.wikiLink,h.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 y({description:"Removes trailing spaces and tabs.",before:p`
`,options:{twoSpaceLineBreak:!0}})]}get optionBuilders(){return[new U({OptionsClass:ro,nameKey:"rules.trailing-spaces.twp-space-line-break.name",descriptionKey:"rules.trailing-spaces.twp-space-line-break.description",optionsKey:"twoSpaceLineBreak"})]}};Vt=A([b.register],Vt);var hc=class{},fa=class extends b{constructor(){super({nameKey:"rules.two-spaces-between-lines-with-content.name",descriptionKey:"rules.two-spaces-between-lines-with-content.description",type:"Content",ruleIgnoreTypes:[h.obsidianMultiLineComments,h.yaml,h.table]})}get OptionsClass(){return hc}apply(t,i){return Wu(t)}get exampleBuilders(){return[new y({description:"Make sure two spaces are added to the ends of lines that have content on it and the next line for lists, blockquotes, and paragraphs",before:p`
`})]}get optionBuilders(){return[]}};fa=A([b.register],fa);var ao=class{constructor(){this.listStyle="consistent"}},ya=class extends b{constructor(){super({nameKey:"rules.unordered-list-style.name",descriptionKey:"rules.unordered-list-style.description",type:"Content",ruleIgnoreTypes:[h.code,h.math,h.yaml,h.tag]})}get OptionsClass(){return ao}apply(t,i){return ip(t,i.listStyle)}get exampleBuilders(){return[new y({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 ne({OptionsClass:ao,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"}]})]}};ya=A([b.register],ya);var Pi=class{constructor(){this.priorityKeysAtStartOfYaml=!0;this.yamlKeyPrioritySortOrder=[];this.yamlSortOrderForOtherKeys="None"}};A([b.noSettingControl()],Pi.prototype,"dateModifiedKey",2),A([b.noSettingControl()],Pi.prototype,"currentTimeFormatted",2),A([b.noSettingControl()],Pi.prototype,"yamlTimestampDateModifiedEnabled",2);var Gt=class extends b{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=kn(t);if(n===null)return t;let r=n,a=i.priorityKeysAtStartOfYaml,s=i.yamlKeyPrioritySortOrder,o=0;for(let w of s)w.endsWith(":")&&(s[o]=w.substring(0,w.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 f=this.getYAMLKeysSorted(r,g,l);return this.getTextWithNewYamlFrontmatter(t,n,d,f.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=ue(t,a,!1);s!==null&&(s.includes(`
`,t=Et(t,a,!1))}return{remainingYaml:t,sortedYamlKeyValues:r}}updateDateModifiedIfYamlChanged(t,i,n,r){return t==i?i:se(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 y({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 y({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 y({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 y({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 U({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 ne({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"}]})]}};Gt=A([b.register],Gt);var li=require("obsidian");var jp=dn(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"}};A([b.noSettingControl()],Xe.prototype,"alreadyModified",2),A([b.noSettingControl()],Xe.prototype,"fileCreatedTime",2),A([b.noSettingControl()],Xe.prototype,"fileModifiedTime",2),A([b.noSettingControl()],Xe.prototype,"locale",2),A([b.noSettingControl()],Xe.prototype,"currentTime",2),A([b.noSettingControl()],Xe.prototype,"fileName",2);var dt=class extends b{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=Oi(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 y({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 y({description:"Date Created Key is set",before:p`
---`,""),c=si(s);a=c[Cs]??null,a!=null&&(a=a+"",a=wi(a,i.defaultEscapeCharacter,this.forceEscape(a,i.aliasArrayStyle)));let d=null,u=Object.keys(c);for(let g of xi)if(u.includes(g)){d=g;break}if(d!=null){let g=ue(l,d),m="multi-line",f=g==="",w=!1;g.includes(`
`)||(g.match(/^\[.*\]/)===null?(m="single string to single-line",w=!0):m="single-line");let x=at(Ie(g)),v=this.getNewAliasValue(x,o,r,a);v===""?l=Et(l,d):i.preserveExistingAliasesSectionStyle?!f&&(w&&r==v||!w||x==v)?l=se(l,d,we(v,m,i.defaultEscapeCharacter,i.removeUnnecessaryEscapeCharsForMultiLineArrays,!0)):l=se(l,d,we(v,i.aliasArrayStyle,i.defaultEscapeCharacter,i.removeUnnecessaryEscapeCharsForMultiLineArrays,!0)):l=se(l,d,we(v,i.aliasArrayStyle,i.defaultEscapeCharacter,i.removeUnnecessaryEscapeCharsForMultiLineArrays,!0))}else o||(l=se(l,Dl,we(r,i.aliasArrayStyle,i.defaultEscapeCharacter,i.removeUnnecessaryEscapeCharsForMultiLineArrays,!0)));return!i.useYamlKeyToKeepTrackOfOldFilenameOrHeading||o?l=Et(l,Cs):l=se(l,Cs,`${r}`),t=t.replace(`---
${l}---`),t}getTitleInfo(t,i,n,r){let a=Le([h.code,h.math,h.yaml,h.tag],t,Es);a=a||i;let s=wi(a,r,this.forceEscape(a,n));return[a,s]}forceEscape(t,i){return as(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&&Sn(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 y({description:"Adds a header with the title from heading.",before:p`
`,options:{fileName:"Filename",keepAliasThatMatchesTheFilename:!0}}),new y({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 y({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 y({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 Le([h.code,h.math,h.yaml,h.tag],t,Es)}get exampleBuilders(){return[new y({description:"Adds a header with the title from heading when `mode='First H1 or Filename if H1 Missing'`.",before:p`
`,options:{fileName:"Filename"}}),new y({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 y({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 $e({OptionsClass:Qt,nameKey:"rules.yaml-title.title-key.name",descriptionKey:"rules.yaml-title.title-key.description",optionsKey:"titleKey"}),new ne({OptionsClass:Qt,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"}]})]}};va=A([b.register],va);var tw=`<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]=Pt.applyIfEnabled(r,n.settings,[]),[r]=Wt.applyIfEnabled(r,n.settings,[]),[r]=$t.applyIfEnabled(r,n.settings,[]),[r]=Yt.applyIfEnabled(r,n.settings,[]),[r]=Ht.applyIfEnabled(r,n.settings,[]),[r]=Nt.applyIfEnabled(r,n.settings,[],{lineContent:t,selectedText:i}),[r]=Kt.applyIfEnabled(r,n.settings,[],{lineContent:t,selectedText:i}),[r]=qt.applyIfEnabled(r,n.settings,[],{lineContent:t}),r}};function xa(e,t=null,i,n){let r=t?(0,qn.moment)(t.stat.ctime):(0,qn.moment)();r.locale(i);let a=t?(0,qn.moment)(t.stat.mtime):(0,qn.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,qn.moment)();return l.locale(i),l}}}var uo=require("obsidian");var wa=class extends uo.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 uo.Notice(r),this.close(),await a()}),setTimeout(()=>{l.focus()},50)})}};var ht=require("obsidian");var Pp=require("obsidian");var yw={General:Ee.general.id,Custom:Ee.custom.id,YAML:Ee.yaml.id,Heading:Ee.heading.id,Footnote:Ee.footer.id,Content:Ee.content.id,Spacing:Ee.whitespace.id,Paste:Ee.paste.id,Debug:Ee.debug.id},bw={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"}),yw[n]);let o=E(bw[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"),Mi(this.contentEl)):(this.navButton.removeClass("linter-navigation-item-selected"),pi(this.contentEl)),i){case"entering search mode by focusing on the search input box":Mi(this.contentEl),Mi(this.headingEl);for(let n of this.searchSettingInfo)Mi(n.containerEl);break;case"leaving search mode by selecting a tab":pi(this.headingEl);for(let n of this.searchSettingInfo)Mi(n.containerEl);break}}};var bm=require("obsidian");var Hp=require("obsidian");var ka={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 ut=class{construc
`," "))}};var wo=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");varCa=classextendsDn{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()}};varko=classextendspt{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=>{newCa(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");varXw="gm",So=classextendspt{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:Xw};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 Ao=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){Mi(r),i.has(a)||i.add(a)};for(let[r,a]of this.searchSettingInfo)for(let s of a)if(t.trim()===""||s.alias?.includes(t)||s.description.includes(t)||s.name.includes(t))n(s.containerEl,r);else if(s.options)for(let o of s.options){if(o.description.toLowerCase().includes(t)||o.name.toLowerCase().includes(t)){n(s.containerEl,r);break}else if(o.options){for(let l of o.options)if(l.description.toLowerCase().includes(t)||l.value.toLowerCase().includes(t)){n(s.containerEl,r);break}}pi(s.containerEl)}else pi(s.containerEl);for(let[r,a]of this.tabNameToTab)i.has(r)?Mi(a.headingEl):pi(a.headingEl);i.size===0?Mi(this.searchZeroState):pi(this.searchZeroState)}focusOnInput(){this.search.inputEl.focus()}};var wm=dn(Wa());var Nn=require("obsidian");var Ma=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,Nn.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,Nn.setIcon)(t,"linter-success"),setTimeout(()=>{(0,Nn.setIcon)(t,"linter-clipboard")},1500)},i=>{new Nn.Notice(`${E("notice-text.copy-to-clipboard-failed")+i}`,0)})}};var ek=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:ek,descriptions:[]};this.addSettingSearchInfoForGeneralSettings(new Hi(t,"tabs.debug.log-level.name","tabs.debug.log-level.description","logLevel",this.plugin,i,async()=>{Qa(this.plugin.settings.logLevel)})),t=this.contentEl.createDiv();let n=E("tabs.debug.linter-config.name"),r=E("tabs.debug.linter-config.description");new Ma(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 Ma(t,n,"");s.inputEl.setText(Va.join(`
`)),Ci(r,s.descEl,this.plugin.settingsTab.component),this.addSettingSearchInfo(t,n,r)}};var Lo=class extends ht.PluginSettingTab{constructor(i,n){super(i,n);this.plugin=n;this.tabNameToTab=new Map;this.selectedTab="General";this.component=new ht.Component}display(){let{containerEl:i}=this;this.component.load(),i.empty();let n=i.createDiv("linter-setting-title");ht.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(ht.Platform.isMobile),this.createSearchZeroState(ht.Platform.isMobile),this.generateSearchBar(n),this.selectedTab==""&&this.tabSearcher.focusOnInput()}hide(){this.component.unload()}addTabs(i){this.addTab(new xo(this.tabNavEl,this.settingsContentEl,i,this.plugin,this.app));for(let n of Object.values(D))this.addTab(new wo(this.tabNavEl,this.settingsContentEl,n,Ct.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 Ao(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 ik=/^---\n/gm,km=`${wn}:`,Eo=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 qi){let a=r.getName();this.ruleInfo.push({displayName:a,name:a.toLowerCase(),alias:r.alias})}}onTrigger(i,n,r){let a=n.getLine(i.line).toLowerCase();if(a.startsWith(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 pe.Notice(E("notice-text.empty-clipboard"),ft);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)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||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(pe.MarkdownView);return i?i.editor:null}getLineContent(i,n){return i.getLine(n.anchor.line)}moveConfigValuesToKeyBasedFormat(){Xa("en");for(let i of qi){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(),Xa(window.localStorage.getItem("language"))}getAllFilesInFolder(i){let n=[],r=[i];for(let a of r)for(let s of a.children)s instanceof pe.TFile&&this.isMarkdownFile(s)?n.push(s):s instanceof pe.TFolder&&r.push(s);return n}updatePasteOverrideStatus(){for(let i of Ct.get("Paste"))if(i.getOptions(this.settings).enabled){this.overridePaste=!0;return}this.overridePaste=!1}};