varkm=Object.create;varFn=Object.defineProperty;varOc=Object.getOwnPropertyDescriptor;varzm=Object.getOwnPropertyNames;varSm=Object.getPrototypeOf,Am=Object.prototype.hasOwnProperty;vartn=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Mc=(e,t)=>{for(variint)Fn(e,i,{get:t[i],enumerable:!0})},Cc=(e,t,i,n)=>{if(t&&typeoft=="object"||typeoft=="function")for(letrofzm(t))!Am.call(e,r)&&r!==i&&Fn(e,r,{get:()=>t[r],enumerable:!(n=Oc(t,r))||n.enumerable});returne};varRn=(e,t,i)=>(i=e!=null?km(Sm(e)):{},Cc(t||!e||!e.__esModule?Fn(i,"default",{value:e,enumerable:!0}):i,e)),Tm=e=>Cc(Fn({},"__esModule",{value:!0}),e),A=(e,t,i,n)=>{for(varr=n>1?void0:n?Oc(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&&Fn(t,i,r),r};varAo=(e,t,i)=>{if(!t.has(e))throwTypeError("Cannot "+i)};varK=(e,t,i)=>(Ao(e,t,"read from private field"),i?i.call(e):t.get(e)),he=(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)},Ee=(e,t,i,n)=>(Ao(e,t,"write to private field"),n?n.call(e,i):t.set(e,i),i);varTo=(e,t,i,n)=>({set_(r){Ee(e,t,r,i)},get_(){returnK(e,t,n)}}),pe=(e,t,i)=>(Ao(e,t,"access private method"),i);varPo=tn((wd,Ra)=>{(function(e,t){"use strict";typeofdefine=="function"&&define.amd?define(t):typeofRa=="object"&&Ra.exports?Ra.exports=t():e.log=t()})(wd,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){varv=f[w];if(typeofv.bind=="function")returnv.bind(f);try{returnFunction.prototype.bind.call(v,f)}catch{returnfunction(){returnFunction.prototype.apply.apply(v,[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(varv=0;v<n.length;v++){varb=n[v];this[b]=v<f?e:this.methodFactory(b,f,w)}this.log=this.debug}functionl(f,w,v){returnfunction(){typeofconsole!==t&&(o.call(this,w,v),this[f].apply(this,arguments))}}functionc(f,w,v){returns(f)||l.apply(this,arguments)}functiond(f,w,v){varb=this,S;w=w??"WARN";varL="loglevel";typeoff=="string"?L+=":"+f:typeoff=="symbol"&&(L=void0);functionM(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{}returnb.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{}}}b.name=f,b.levels={TRACE:0,DEBUG:1,INFO:2,WARN:3,ERROR:4,SILENT:5},b.methodFactory=v||c,b.getLevel=function(){returnS},b.setLevel=function(q,_){if(typeofq=="string"&&b.levels[q.toUpperCase()]!==void0&&(q=b.levels[q.toUpperCase()]),typeofq=="number"&&q>=0&&q<=b.levels.SILENT){if(S=q,_!==!1&&M(q),o.call(b,q,f),typeofconsole===t&&q<b.levels.SILENT)return"No console available for logging"}elsethrow"log.setLevel() called with invalid level: "+q},b.setDefaultLevel=function(q){w=q,R()||b.setLevel(q,!1)},b.resetLevel=function(){b.setLevel(w,!1),T()},b.enableAll=function(q){b.setLevel(b.levels.TRACE,q)},b.disableAll=function(q){b.setLevel(b.levels.SILENT,q)};varB=R();B==null&&(B=w),b.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.");varv=g[w];returnv||(v=g[w]=newd(w,u.getLevel(),u.methodFac
`;return o.replace(/\n$/,"")}var Nm=Dm,Km=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],jm=["scalar","sequence","mapping"];function Ym(e){var t={};return e!==null&&Object.keys(e).forEach(function(i){e[i].forEach(function(n){t[String(n)]=i})}),t}function Pm(e,t){if(t=t||{},Object.keys(t).forEach(function(i){if(Km.indexOf(i)===-1)throw new $e('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=Ym(t.styleAliases||null),jm.indexOf(this.kind)===-1)throw new $e('Unknown kind "'+this.kind+'" is specified for "'+e+'" YAML type.')}var Ne=Pm;function qc(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 Hm(){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 Mo(e){return this.extend(e)}Mo.prototype.extend=function(t){var i=[],n=[];if(t instanceof Ne)n.push(t);else if(Array.isArray(t))n=n.concat(t);else if(t&&(Array.isArray(t.implicit)||Array.isArray(t.explicit)))t.implicit&&(i=i.concat(t.implicit)),t.explicit&&(n=n.concat(t.explicit));else throw new $e("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");i.forEach(function(a){if(!(a instanceof Ne))throw new $e("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(a.loadKind&&a.loadKind!=="scalar")throw new $e("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 $e("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.")}),n.forEach(function(a){if(!(a instanceof Ne))throw new $e("Specified list of YAML types (or a single Type object) contains a non-Type object.")});var r=Object.create(Mo.prototype);return r.implicit=(this.implicit||[]).concat(i),r.explicit=(this.explicit||[]).concat(n),r.compiledImplicit=qc(r,"implicit"),r.compiledExplicit=qc(r,"explicit"),r.compiledTypeMap=Hm(r.compiledImplicit,r.compiledExplicit),r};var $m=Mo,Wm=new Ne("tag:yaml.org,2002:str",{kind:"scalar",construct:function(e){return e!==null?e:""}}),Um=new Ne("tag:yaml.org,2002:seq",{kind:"sequence",construct:function(e){return e!==null?e:[]}}),Vm=new Ne("tag:yaml.org,2002:map",{kind:"mapping",construct:function(e){return e!==null?e:{}}}),Gm=new $m({explicit:[Wm,Um,Vm]});function Qm(e){if(e===null)return!0;var t=e.length;return t===1&&e==="~"||t===4&&(e==="null"||e==="Null"||e==="NULL")}function Zm(){return null}function Jm(e){return e===null}var Xm=new Ne("tag:yaml.org,2002:null",{kind:"scalar",resolve:Qm,construct:Zm,predicate:Jm,represent:{canonical:function(){return"~"},lowercase:function(){return"null"},uppercase:function(){return"NULL"},camelcase:function(){return"Null"},empty:function(){return""}},defaultStyle:"lowercase"});function eg(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 ig(e){return e==="true"||e==="True"||e==="TRUE"}function tg(e){return Object.prototype.toString.call(e)==="[object Boolean]"}var ng=new Ne("tag:yaml.org,2002:bool",{kind:"scalar",resolve:eg,construct:ig,predicate:tg,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 Zg(e){return e<=65535?String.fromCharCode(e):String.fromCharCode((e-65536>>10)+55296,(e-65536&1023)+56320)}var td=new Array(256),nd=new Array(256);for(pt=0;pt<256;pt++)td[pt]=_c(pt)?1:0,nd[pt]=_c(pt);var pt;function Jg(e,t){this.input=e,this.filename=t.filename||null,this.schema=t.schema||Zc,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 rd(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=Nm(i),new $e(t,i)}function j(e,t){throw rd(e,t)}function Ia(e,t){e.onWarning&&e.onWarning.call(null,rd(e,t))}var Fc={YAML:function(t,i,n){var r,a,s;t.version!==null&&j(t,"duplication of %YAML directive"),n.length!==1&&j(t,"YAML directive accepts exactly one argument"),r=/^([0-9]+)\.([0-9]+)$/.exec(n[0]),r===null&&j(t,"ill-formed argument of the YAML directive"),a=parseInt(r[1],10),s=parseInt(r[2],10),a!==1&&j(t,"unacceptable YAML version of the document"),t.version=n[0],t.checkLineBreaks=s<2,s!==1&&s!==2&&Ia(t,"unsupported YAML version of the document")},TAG:function(t,i,n){var r,a;n.length!==2&&j(t,"TAG directive accepts exactly two arguments"),r=n[0],a=n[1],ed.test(r)||j(t,"ill-formed tag handle (first argument) of the TAG directive"),Wi.call(t.tagMap,r)&&j(t,'there is a previously declared suffix for "'+r+'" tag handle'),id.test(a)||j(t,"ill-formed tag prefix (second argument) of the TAG directive");try{a=decodeURIComponent(a)}catch{j(t,"tag prefix is malformed: "+a)}t.tagMap[r]=a}};function $i(e,t,i,n){var r,a,s,o;if(t<i){if(o=e.input.slice(t,i),n)for(r=0,a=o.length;r<a;r+=1)s=o.charCodeAt(r),s===9||32<=s&&s<=1114111||j(e,"expected valid JSON character");else $g.test(o)&&j(e,"the stream contains non-printable characters");e.result+=o}}function Rc(e,t,i,n){var r,a,s,o;for(ke.isObject(i)||j(e,"cannot merge mappings; the provided source object is unacceptable"),r=Object.keys(i),s=0,o=r.length;s<o;s+=1)a=r[s],Wi.call(t,a)||(t[a]=i[a],n[a]=!0)}function an(e,t,i,n,r,a,s,o,l){var c,d;if(Array.isArray(r))for(r=Array.prototype.slice.call(r),c=0,d=r.length;c<d;c+=1)Array.isArray(r[c])&&j(e,"nested arrays are not supported inside keys"),typeof r=="object"&&Bc(r[c])==="[object Object]"&&(r[c]="[object Object]");if(typeof r=="object"&&Bc(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)Rc(e,t,a[c],i);else Rc(e,t,a,i);else!e.json&&!Wi.call(i,r)&&Wi.call(t,r)&&(e.line=s||e.line,e.lineStart=o||e.lineStart,e.position=l||e.position,j(e,"duplicated mapping key")),r==="__proto__"?Object.defineProperty(t,r,{configurable:!0,enumerable:!0,writable:!0,value:a}):t[r]=a,delete i[r];return t}function Fo(e){var t;t=e.input.charCodeAt(e.position),t===10?e.position++:t===13?(e.position++,e.input.charCodeAt(e.position)===10&&e.position++):j(e,"a line break is expected"),e.line+=1,e.lineStart=e.position,e.firstTabInLine=-1}function ve(e,t,i){for(var n=0,r=e.input.charCodeAt(e.position);r!==0;){for(;mt(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(wi(r))for(Fo(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&&Ia(e,"deficient indentation"),n}function Fa(e){var t=e.position,i;return i=e.input.charCodeAt(t),!!((i===45||i===46)&&i===e.input.charCodeAt(t+1)&&i===e.input.charCodeAt(t+2)&&(t+=3,i=e.input.charCodeAt(t),i===0||Xe(i)))}function Ro(e,t){t===1?e.result+=" ":t>1&&(e.result+=ke.rep
`,t-1))}function Xg(e,t,i){var n,r,a,s,o,l,c,d,u=e.kind,g=e.result,p;if(p=e.input.charCodeAt(e.position),Xe(p)||rn(p)||p===35||p===38||p===42||p===33||p===124||p===62||p===39||p===34||p===37||p===64||p===96||(p===63||p===45)&&(r=e.input.charCodeAt(e.position+1),Xe(r)||i&&rn(r)))return!1;for(e.kind="scalar",e.result="",a=s=e.position,o=!1;p!==0;){if(p===58){if(r=e.input.charCodeAt(e.position+1),Xe(r)||i&&rn(r))break}else if(p===35){if(n=e.input.charCodeAt(e.position-1),Xe(n))break}else{if(e.position===e.lineStart&&Fa(e)||i&&rn(p))break;if(wi(p))if(l=e.line,c=e.lineStart,d=e.lineIndent,ve(e,!1,-1),e.lineIndent>=t){o=!0,p=e.input.charCodeAt(e.position);continue}else{e.position=s,e.line=l,e.lineStart=c,e.lineIndent=d;break}}o&&($i(e,a,s,!1),Ro(e,e.line-l),a=s=e.position,o=!1),mt(p)||(s=e.position+1),p=e.input.charCodeAt(++e.position)}return $i(e,a,s,!1),e.result?!0:(e.kind=u,e.result=g,!1)}function eh(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($i(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 wi(i)?($i(e,n,r,!0),Ro(e,ve(e,!1,t)),n=r=e.position):e.position===e.lineStart&&Fa(e)?j(e,"unexpected end of the document within a single quoted scalar"):(e.position++,r=e.position);j(e,"unexpected end of the stream within a single quoted scalar")}function ih(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 $i(e,i,e.position,!0),e.position++,!0;if(o===92){if($i(e,i,e.position,!0),o=e.input.charCodeAt(++e.position),wi(o))ve(e,!1,t);else if(o<256&&td[o])e.result+=nd[o],e.position++;else if((s=Gg(o))>0){for(r=s,a=0;r>0;r--)o=e.input.charCodeAt(++e.position),(s=Vg(o))>=0?a=(a<<4)+s:j(e,"expected hexadecimal character");e.result+=Zg(a),e.position++}else j(e,"unknown escape sequence");i=n=e.position}else wi(o)?($i(e,i,n,!0),Ro(e,ve(e,!1,t)),i=n=e.position):e.position===e.lineStart&&Fa(e)?j(e,"unexpected end of the document within a double quoted scalar"):(e.position++,n=e.position)}j(e,"unexpected end of the stream within a double quoted scalar")}function th(e,t){var i=!0,n,r,a,s=e.tag,o,l=e.anchor,c,d,u,g,p,f=Object.create(null),w,v,b,S;if(S=e.input.charCodeAt(e.position),S===91)d=93,p=!1,o=[];else if(S===123)d=125,p=!0,o={};else return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=o),S=e.input.charCodeAt(++e.position);S!==0;){if(ve(e,!0,t),S=e.input.charCodeAt(e.position),S===d)return e.position++,e.tag=s,e.anchor=l,e.kind=p?"mapping":"sequence",e.result=o,!0;i?S===44&&j(e,"expected the node content, but found ','"):j(e,"missed comma between flow collection entries"),v=w=b=null,u=g=!1,S===63&&(c=e.input.charCodeAt(e.position+1),Xe(c)&&(u=g=!0,e.position++,ve(e,!0,t))),n=e.line,r=e.lineStart,a=e.position,sn(e,t,Ca,!1,!0),v=e.tag,w=e.result,ve(e,!0,t),S=e.input.charCodeAt(e.position),(g||e.line===n)&&S===58&&(u=!0,S=e.input.charCodeAt(++e.position),ve(e,!0,t),sn(e,t,Ca,!1,!0),b=e.result),p?an(e,o,f,v,w,b,n,r,a):u?o.push(an(e,null,f,v,w,b,n,r,a)):o.push(w),ve(e,!0,t),S=e.input.charCodeAt(e.position),S===44?(i=!0,S=e.input.charCodeAt(++e.position)):i=!1}j(e,"unexpected end of the stream within a flow collection")}function nh(e,t){var i,n,r=Oo,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)Oo===r?r=u===43?Ic:Hg:j(e,"repeat of a chomping mode identifier");else if((d=Qg(u))>=0)d===0?j(e,"bad explicit indentation width of a block scalar; it cannot be less than one"):s?j(e,"repeat of an indentation width identifier"):(o=t+d-1,s=!0);else break;if(mt(u)){do u=e.input.charCodeAt(++e.position);while(mt(u));if(u===35)do u=e.input.charCodeAt(++e.position);while(!wi(u)&&u!==0)}for(;u!==0;){for(Fo(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;!wi(u)&&u!==0;)u=e.input.charCodeAt(++e.position);$i(e,i,e.position,!1)}return!0}function Dc(e,t){var i,n=e.tag,r=e.anchor,a=[],s,o=!1,l;if(e.firstTabInLine!==-1)return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=a),l=e.input.charCodeAt(e.position);l!==0&&(e.firstTabInLine!==-1&&(e.position=e.firstTabInLine,j(e,"tab characters must not be used in indentation")),!(l!==45||(s=e.input.charCodeAt(e.position+1),!Xe(s))));){if(o=!0,e.position++,ve(e,!0,-1)&&e.lineIndent<=t){a.push(null),l=e.input.charCodeAt(e.position);continue}if(i=e.line,sn(e,t,Xc,!1,!0),a.push(e.result),ve(e,!0,-1),l=e.input.charCodeAt(e.position),(e.line===i||e.lineIndent>t)&&l!==0)j(e,"bad indentation of a sequence entry");else if(e.lineIndent<t)break}return o?(e.tag=n,e.anchor=r,e.kind="sequence",e.result=a,!0):!1}function rh(e,t,i){var n,r,a,s,o,l,c=e.tag,d=e.anchor,u={},g=Object.create(null),p=null,f=null,w=null,v=!1,b=!1,S;if(e.firstTabInLine!==-1)return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=u),S=e.input.charCodeAt(e.position);S!==0;){if(!v&&e.firstTabInLine!==-1&&(e.position=e.firstTabInLine,j(e,"tab characters must not be used in indentation")),n=e.input.charCodeAt(e.position+1),a=e.line,(S===63||S===58)&&Xe(n))S===63?(v&&(an(e,u,g,p,f,null,s,o,l),p=f=w=null),b=!0,v=!0,r=!0):v?(v=!1,r=!0):j(e,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"),e.position+=1,S=n;else{if(s=e.line,o=e.lineStart,l=e.position,!sn(e,i,Jc,!1,!0))break;if(e.line===a){for(S=e.input.charCodeAt(e.position);mt(S);)S=e.input.charCodeAt(++e.position);if(S===58)S=e.input.charCodeAt(++e.position),Xe(S)||j(e,"a whitespace character is expected after the key-value separator within a block mapping"),v&&(an(e,u,g,p,f,null,s,o,l),p=f=w=null),b=!0,v=!1,r=!1,p=e.tag,f=e.result;else if(b)j(e,"can not read an implicit mapping pair; a colon is missed");else return e.tag=c,e.anchor=d,!0}else if(b)j(e,"can not read a block mapping entry; a multiline key may not be an implicit key");else return e.tag=c,e.anchor=d,!0}if((e.line===a||e.lineIndent>t)&&(v&&(s=e.line,o=e.lineStart,l=e.position),sn(e,t,qa,!0,r)&&(v?f=e.result:w=e.result),v||(an(e,u,g,p,f,w,s,o,l),p=f=w=null),ve(e,!0,-1),S=e.input.charCodeAt(e.position)),(e.line===a||e.lineIndent>t)&&S!==0)j(e,"bad indentation of a mapping entry");else if(e.lineIndent<t)break}return v&&an(e,u,g,p,f,null,s,o,l),b&&(e.tag=c,e.anchor=d,e.kind="mapping",e.result=u),b}function ah(e){var t,i=!1,n=!1,r,a,s;if(s=e.input.charCodeAt(e.position),s!==33)return!1;if(e.tag!==null&&j(e,"duplication of a tag property"),s=e.input.charCodeAt(++e.position),s===60?(i=!0,s=e.input.charCodeAt(++e.position)):s===33?(n=!0,r="!!",s=e.input.charCodeAt(++e.position)):r="!",t=e.position,i){do s=e.input.charCodeAt(++e.position);while(s!==0&&s!==62);e.position<e.length?(a=e.input.slice(t,e.position),s=e.input.charCodeAt(++e.position)):j(e,"unexpected end of the stream within a verbatim tag")}else{for(;s!==0&&!Xe(s);)s===33&&(n?j(e,"tag suffix cannot contain exclamation marks"):(r=e.input.slice(t-1,e.position+1),ed.test(r)||j(e,"named tag handle cannot contain such characters"),n=!0,t=e.position+1)),s=e.input.charCodeAt(++e.position);a=e.input.slice(t,e.position),Ug.test(a)&&j(e,"tag suffix cannot contain flow indicator characters")}a&&!id.test(a)&&j(e,"tag name cannot contain such characters: "+a);try{a=decodeURIComponent(a)}catch{j(e,"tag name is malformed: "+a)}return i?e.tag=a:Wi.call(e.tagMap,r)?e.tag=e.tagMap[r]+a:r==="!"?e.tag="!"+a:r==="!!"?e.tag="tag:yaml.org,2002:"+a:j(e,'undeclared tag handle "'+r+'"'),!0}function sh(e){var t,i;if(i=e.input.charCodeAt(e.position),i!==38)return!1;for(e.anchor!==null&&j(e,"duplication of an anchor property"),i=e.input.charCodeAt(++e.position),t=e.position;i!==0&&!Xe(i)&&!rn(i);)i=e.input.charCodeAt(++e.position);return e.position===t&&j(e,"name of an anchor node must contain at least one character"),e.anchor=e.input.slice(t,e.position),!0}function oh(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 Jg(e,t),n=e.indexOf("\0");for(n!==-1&&(i.position=n,j(i,"null byte is not allowed in input")),i.input+="\0";i.input.charCodeAt(i.position)===32;)i.lineIndent+=1,i.position+=1;for(;i.position<i.length-1;)lh(i);return i.documents}function ch(e,t,i){t!==null&&typeof t=="object"&&typeof i>"u"&&(i=t,t=null);var n=ad(e,i);if(typeof t!="function")return n;for(var r=0,a=n.length;r<a;r+=1)t(n[r])}function dh(e,t){var i=ad(e,t);if(i.length!==0){if(i.length===1)return i[0];throw new $e("expected a single document in the stream, but found more")}}var uh=ch,ph=dh,sd={loadAll:uh,load:ph},od=Object.prototype.toString,ld=Object.prototype.hasOwnProperty,Do=65279,mh=9,Kn=10,gh=13,hh=32,fh=33,yh=34,Co=35,bh=37,vh=38,xh=39,wh=42,cd=44,kh=45,Ba=58,zh=61,Sh=62,Ah=63,Th=64,dd=91,ud=93,Lh=96,pd=123,Eh=124,md=125,Ke={};Ke[0]="\\0";Ke[7]="\\a";Ke[8]="\\b";Ke[9]="\\t";Ke[10]="\\n";Ke[11]="\\v";Ke[12]="\\f";Ke[13]="\\r";Ke[27]="\\e";Ke[34]='\\"';Ke[92]="\\\\";Ke[133]="\\N";Ke[160]="\\_";Ke[8232]="\\L";Ke[8233]="\\P";var Oh=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"],Mh=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;function Ch(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&&ld.call(l.styleAliases,o)&&(o=l.styleAliases[o]),i[s]=o;return i}function qh(e){var t,i,n;if(t=e.toString(16).toUpperCase(),e<=255)i="x",n=2;else if(e<=65535)i="u",n=4;else if(e<=4294967295)i="U",n=8;else throw new $e("code point within a string may not be greater than 0xFFFFFFFF");return"\\"+i+ke.repeat("0",n-t.length)+t}var Ih=1,jn=2;function Bh(e){this.schema=e.schema||Zc,this.indent=Math.max(1,e.indent||2),this.noArrayIndent=e.noArrayIndent||!1,this.skipInvalid=e.skipInvalid||!1,this.flowLevel=ke.isNothing(e.flowLevel)?-1:e.flowLevel,this.styleMap=Ch(this.schema,e.styles||null),this.sortKeys=e.sortKeys||!1,this.lineWidth=e.lineWidth||80,this.noRefs=e.noRefs||!1,this.noCompatMode=e.noCompatMode||!1,this.condenseFlow=e.condenseFlow||!1,this.quotingType=e.quotingType==='"'?jn:Ih,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 Nc(e,t){for(var i=ke.repeat(" ",t),n=0,r=-1,a="",s,o=e.length;n<o;)r=e.indexOf(`
`+t.stack),re.default.error(i),Hn&&Ka(i.substring(i.indexOf("]")+2),re.default.levels.TRACE)}function on(e){re.default.info(`${Da}${e}`),Hn&&Ka(e,re.default.levels.INFO)}function gi(e){re.default.debug(`${Da}${e}`),Hn&&Ka(e,re.default.levels.DEBUG)}function gt(e){re.default.warn(`${Da}${e}`),Hn&&Ka(e,re.default.levels.WARN)}function ht(e){re.default.getLevel()>re.default.levels.DEBUG||Ho.set(e,performance.now())}function Ui(e){if(re.default.getLevel()>re.default.levels.DEBUG)return;Ho.has(e)||gt(E("logs.timing-key-not-found").replace("{TIMING_KEY}",e));let t=performance.now()-Ho.get(e);gi(`${e}:${t}`+E("logs.milliseconds-abbreviation"))}function Ka(e,t){re.default.getLevel()<=t&&Na.push(e)}function zd(){Na=[]}function $o(e){Hn=e}function ja(e){switch(e){case"INFO":{re.default.setLevel("info");break}case"TRACE":{re.default.setLevel("trace");break}case"DEBUG":{re.default.setLevel("debug");break}case"SILENT":{re.default.setLevel("silent");break}case"ERROR":{re.default.setLevel("error");break}case"WARN":{re.default.setLevel("warn");break}}}function Sd(e){switch(e){case re.default.levels.INFO:return"INFO";case re.default.levels.TRACE:return"TRACE";case re.default.levels.DEBUG:return"DEBUG";case re.default.levels.SILENT:return"SILENT";case re.default.levels.ERROR:return"ERROR";case re.default.levels.WARN:return"WARN"}}var Ad={};var Td={};var Ld={};var Ed={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
`);let c=1,d=new Set;for(let u of i){if(d.has(u))continue;d.add(u);let g=r.get(u),p=`[^${c++}]`;a.set(g,p),e+=`
`+u.replace(g,p)}for(let u of s){let g=a.get(u.key);e=Xd(e,u.key,g,u.position)}return e}function Nu(e,t,i,n){for(let r of e){let a=t.substring(r.start.offset,r.end.offset);i.push(a),r.end.offset<t.length&&t[r.end.offset]===`
`&&(t=t.substring(0,r.end.offset)+t.substring(r.end.offset+1)),t=t.substring(0,r.start.offset)+t.substring(r.end.offset),n(t,a,r.start.offset)}return t}function ps(e,t,i){let n=fe(i,e);if(n.length===0)return e;let r="";if(t==="underscore")r="_";else if(t==="asterisk")r="*";else{let a=n[n.length-1];r=e.substring(a.start.offset,a.start.offset+1)}i==="strong"&&(r+=r);for(let a of n){let s=r+e.substring(a.start.offset+r.length,a.end.offset-r.length)+r;e=le(e,a.start.offset,a.end.offset,s)}return e}function Ku(e){let t=fe("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 Yu(e){let t=fe("link",e);for(let i of t){if(i==null)continue;let n=e.substring(i.start.offset,i.end.offset);if(!n.match(rr))continue;let r=n.indexOf("]"),a=n.substring(0,1)+n.substring(1,r).trim()+n.substring(r);e=le(e,i.start.offset,i.end.offset,a)}return e}function Pu(e,t){let i=fe("emphasis",e);for(let n of i){let r=e.substring(n.start.offset+1,n.end.offset-1);r=t(r),e=le(e,n.start.offset+1,n.end.offset-1,r)}return e}function Hu(e,t){let i=fe("strong",e);for(let n of i){let r=e.substring(n.start.offset+2,n.end.offset-2);r=t(r),e=le(e,n.start.offset+2,n.end.offset-2,r)}return e}function ms(e,t){let i=db(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);np.test(a)&&(r+=4,a=a.substring(4)),a=t(a),e=le(e,r,n.end.offset,a)}return e}function $u(e){let t=fe("code",e);for(let i of t)e.substring(i.start.offset,i.end.offset).startsWith("```")&&(e=yt(e,i.start.offset,i.end.offset));return e}function Wu(e,t){let i=fe("math",e);for(let n of i)e=yt(e,n.start.offset,n.end.offset);i=fe("inlineMath",e);for(let n of i)e.substring(n.start.offset,n.end.offset).startsWith("$".repeat(t))&&(e=yt(e,n.start.offset,n.end.offset));return e}function Uu(e){let t=fe("blockquote",e);for(letioft){letn=i.end.offset;for(;n<e.length-1&&e.charAt(n)!==`
`;)n++;e=yt(e,i.start.offset,n,!0)}return e}function Vu(e,t,i){let n=fe("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 p=g;for(;p>u;)l.delete(p--)},d=-1;s=s.replace(/^(( |\t|> )*)((\d+(\.|\)))|[-*+])([^\n]*)$/gm,(u,g="",p,f,w,v,b)=>{let S=1,L=o(g);if(!/^\d/.test(f)){let M=L>d?L:d;return c(L,M),u}return l.has(L)?t==="ascending"&&(S=l.get(L)+1,l.set(L,S)):l.set(L,1),d>L&&c(L,d),d=L,`${g}${S}${i}${b}`}),e=le(e,a,r.end.offset,s)}return e}function Gu(e,t){let i=fe("listItem",e);if(!i)return e;let n=/^((\d+[.)])|(- \[[ x]\]))/m,r=t;if(t=="consistent"){let a=i.length-1;for(;a>=0;){let s=e.substring(i[a].start.offset,i[a].end.offset);if(a--,!s.match(n)){r=s.charAt(0);break}}if(a==-1)return e}for(let a of i){let s=e.substring(a.start.offset,a.end.offset);s.match(n)||(s=r+s.substring(1),e=le(e,a.start.offset,a.end.offset,s))}return e}function Ol(e,t){let i=fe("blockquote",e);for(let n of i){let r=n.end.offset;for(;r<e.length-1&&e.charAt(r)!==`
`;)r++;let a=e.substring(n.start.offset,r);a=t(a),e=le(e,n.start.offset,r,a)}return e}function Qu(e,t){let i=fe("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=ub(s,t,a.start.offset);for(let l of o)e=_u(e,l.startIndex,l.endIndex,n,r)}i=fe("inlineMath",e);for(let a of i)e.substring(a.start.offset,a.end.offset).startsWith("$".repeat(t))&&(e=_u(e,a.start.offset,a.end.offset,n,r));return e}function ub(e,t,i){let n="$".repeat(t),r=t;for(;e.charAt(r)==="$";)n+="$",r++;let a=[],s=Vi(e,n);if(s<=1)return[];if(s===2)return a.unshift({startIndex:i,endIndex:i+e.length}),a;s===3&&a.unshift({startIndex:i,endIndex:i+e.indexOf(n,n.length)+n.length}),s%2===1&&s--;let o=i,l=n.length;for(;s>2;){let c=e.indexOf(n,l)+n.length;a.unshift({startIndex:o,endIndex:i+c}),o=i+c+1,l=c+1,s-=2}return a.unshift({startIndex:i+e.indexOf(n,l),endIndex:i+e.length}),a}function _u(e,t,i,n,r){let a=e.substring($n(e,t),t)??"",s=e.substring($n(e,i),i)??"",o=/^(>( |\t)*)+\$+$/m,l=e.substring(t,i);return l=l.replace(n,(c,d,u="")=>u===""?d+`
---`)},wikiLink:{replaceAction:fs,placeholder:"{WIKI_LINK_PLACEHOLDER}"},obsidianMultiLineComments:{replaceAction:ap,placeholder:"{OBSIDIAN_COMMENT_PLACEHOLDER}"},footnoteAtStartOfLine:{replaceAction:hs,placeholder:"{FOOTNOTE_AT_START_OF_LINE_PLACEHOLDER}"},footnoteAfterATask:{replaceAction:/- \[.] (\[\^\w+\]) ?([,.;!:?])/gm,placeholder:"{FOOTNOTE_AFTER_A_TASK_PLACEHOLDER}"},url:{replaceAction:un,placeholder:"{URL_PLACEHOLDER}"},anchorTag:{replaceAction:op,placeholder:"{ANCHOR_PLACEHOLDER}"},templaterCommand:{replaceAction:pp,placeholder:"{TEMPLATER_PLACEHOLDER}"},link:{replaceAction:kb,placeholder:"{REGULAR_LINK_PLACEHOLDER}"},tag:{replaceAction:zb,placeholder:"#tag-placeholder"},table:{replaceAction:Sb,placeholder:"{TABLE_PLACEHOLDER}"},customIgnore:{replaceAction:Ab,placeholder:"{CUSTOM_IGNORE_PLACEHOLDER}"}};function ze(e,t,i){let n=[];for(let r of e){let a;if(typeof r.replaceAction=="string")a=xb(t,r.placeholder,r.replaceAction);else if(r.replaceAction instanceof RegExp)a=wb(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"),Ge(a))})}),t}function xb(e,t,i){let n=fe(i,e),r=[];for(let a of n){let s=e.substring(a.start.offset,a.end.offset);r.push(s),e=le(e,a.start.offset,a.end.offset,t)}return r.reverse(),{newText:e,replacedValues:r}}function wb(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 kb(e,t){let i=fe("link",e),n=[];for(let r of i){if(r==null)continue;let a=e.substring(r.start.offset,r.end.offset);a.match(rr)&&(n.push(a),e=le(e,r.start.offset,r.end.offset,t))}return n.reverse(),{newText:e,replacedValues:n}}function zb(e,t){let i=[];return e=e.replace(ar,(n,r,a)=>(i.push(a),r+t)),{newText:e,replacedValues:i}}function Sb(e,t){let i=gs(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=le(e,s.startIndex,s.endIndex,t);return{newText:e,replacedValues:n}}function Ab(e,t){let i=Zu(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=le(e,s.startIndex,s.endIndex,t);return{newText:e,replacedValues:n}}var N=(s=>(s.YAML="YAML",s.HEADING="Heading",s.FOOTNOTE="Footnote",s.CONTENT="Content",s.SPACING="Spacing",s.PASTE="Paste",s))(N||{}),Es=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 fn("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 ze(this.ignoreTypes,t,n=>this.applyAfterIgnore(n,i))}},Os=class{constructor(t,i,n,r={}){this.description=t,this.options=r,this.before=i,this.after=n}},kp=Object.values(N);function Ms(e){let t=gn(e);if(t===null)return[[],!1];let i=vp(t);return i.includes("all")?[Li.map(n=>n.alias),!0]:[i,!1]}var Li=[],Tb={},zt=new Map;function zp(e){Li.push(e),Li.sort((t,i)=>kp.indexOf(t.type)-kp.indexOf(i.type)||t.settingsKey.localeCompare(i.settingsKey)),Tb[e.alias]=e,zt.has(e.type)?zt.get(e.type).push(e):zt.set(e.type,[e])}function Cs(e,t){let i;throw e instanceof bd?(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]=Ga(l,r-1),s=i(a),o++,l=le(l,o,o+a.length,s),n=r+1+a.length-s.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:m`
`,options:{style:"no space"}})]}get optionBuilders(){return[new se({OptionsClass:_s,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"}]})]}};St=A([x.register],St);var Fs=class{};A([x.noSettingControl()],Fs.prototype,"lineContent",2);var At=class extends x{constructor(){super({nameKey:"rules.add-blockquote-indentation-on-paste.name",descriptionKey:"rules.add-blockquote-indentation-on-paste.description",type:"Paste"})}get OptionsClass(){return Fs}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:m`
`,options:{lineContent:"Part 1 of the sentence"}}),new y({description:"Line being pasted into a blockquote gets blockquotified with current line being `>>`",before:m`
`,options:{style:"ALL CAPS"}})]}get optionBuilders(){return[new se({OptionsClass:Tt,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 Z({OptionsClass:Tt,nameKey:"rules.capitalize-headings.ignore-case-words.name",descriptionKey:"rules.capitalize-headings.ignore-case-words.description",optionsKey:"ignoreCasedWords"}),new xe({OptionsClass:Tt,nameKey:"rules.capitalize-headings.ignore-words.name",descriptionKey:"rules.capitalize-headings.ignore-words.description",optionsKey:"ignoreWords",splitter:sr,separator:", "}),new xe({OptionsClass:Tt,nameKey:"rules.capitalize-headings.lowercase-words.name",descriptionKey:"rules.capitalize-headings.lowercase-words.description",optionsKey:"lowercaseWords",splitter:sr,separator:", "})]}};Lt=A([x.register],Lt);var Rs=class{constructor(){this.innerNewLines=!1}},fr=class extends x{constructor(){super({nameKey:"rules.compact-yaml.name",descriptionKey:"rules.compact-yaml.description",type:"Spacing"})}get OptionsClass(){return Rs}apply(t,i){return Oe(t,n=>(n=n.replace(/^---\n+/,`---
`,options:{tabsize:3}})]}get optionBuilders(){return[new qs({OptionsClass:Ds,nameKey:"rules.convert-spaces-to-tabs.tabsize.name",descriptionKey:"rules.convert-spaces-to-tabs.tabsize.description",optionsKey:"tabsize"})]}};vr=A([x.register],vr);var Ns=class{constructor(){this.defaultLanguage=""}},xr=class extends x{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 Ns}apply(t,i){return Ju(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:m`
\`\`\`
vartemp='text';
// this is a code block
\`\`\`
`,after:m`
\`\`\`javascript
vartemp='text';
// this is a code block
\`\`\`
`,options:{defaultLanguage:"javascript"}}),new y({description:"If a code block already has a language specified, do not change it",before:m`
\`\`\`javascript
vartemp='text';
// this is a code block
\`\`\`
`,after:m`
\`\`\`javascript
vartemp='text';
// this is a code block
\`\`\`
`,options:{defaultLanguage:"shell"}}),new y({description:"Empty string as the default language will not add a language to code blocks",before:m`
\`\`\`
vartemp='text';
// this is a code block
\`\`\`
`,after:m`
\`\`\`
vartemp='text';
// this is a code block
\`\`\`
`,options:{defaultLanguage:""}})]}get optionBuilders(){return[new Pe({OptionsClass:Ns,nameKey:"rules.default-language-for-code-fences.default-language.name",descriptionKey:"rules.default-language-for-code-fences.default-language.description",optionsKey:"defaultLanguage"})]}};xr=A([x.register],xr);var Ks=class{constructor(){this.style="consistent"}},wr=class extends x{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 Ks}apply(t,i){return ps(t,i.style,"emphasis")}get exampleBuilders(){return[new y({description:"Emphasis indicators should use underscores when style is set to 'underscore'",before:m`
`,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:m`
`,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:m`
`,options:{style:"consistent"}})]}get optionBuilders(){return[new se({OptionsClass:Ks,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"}]})]}};wr=A([x.register],wr);var Nl=class{},kr=class extends x{constructor(){super({nameKey:"rules.empty-line-around-blockquotes.name",descriptionKey:"rules.empty-line-around-blockquotes.description",type:"Spacing"})}get OptionsClass(){return Nl}apply(t,i){return Uu(t)}get exampleBuilders(){return[new y({description:"Blockquotes that start a document do not get an empty line before them.",before:m`
`})]}get optionBuilders(){return[]}};kr=A([x.register],kr);var Kl=class{},zr=class extends x{constructor(){super({nameKey:"rules.empty-line-around-code-fences.name",descriptionKey:"rules.empty-line-around-code-fences.description",type:"Spacing"})}get OptionsClass(){return Kl}apply(t,i){return $u(t)}get exampleBuilders(){return[new y({description:"Fenced code blocks that start a document do not get an empty line before them.",before:m`
`})]}get optionBuilders(){return[]}};zr=A([x.register],zr);var js=class{constructor(){this.minimumNumberOfDollarSignsToBeAMathBlock=2}};A([x.noSettingControl()],js.prototype,"minimumNumberOfDollarSignsToBeAMathBlock",2);var Sr=class extends x{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 js}apply(t,i){return Wu(t,i.minimumNumberOfDollarSignsToBeAMathBlock)}get exampleBuilders(){return[new y({description:"Math blocks that start a document do not get an empty line before them.",before:m`
`}),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:m`
`}),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:m`
`})]}get optionBuilders(){return[]}};Sr=A([x.register],Sr);var jl=class{},Ar=class extends x{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 jl}apply(t,i){return hp(t)}get exampleBuilders(){return[new y({description:"Tables that start a document do not get an empty line before them.",before:m`
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[]}};Er=A([x.register],Er);var Or=class{constructor(){this.defaultEscapeCharacter='"';this.forceYamlEscape=[]}};A([x.noSettingControl()],Or.prototype,"defaultEscapeCharacter",2);var Ot=class extends x{constructor(){super({nameKey:"rules.force-yaml-escape.name",descriptionKey:"rules.force-yaml-escape.description",type:"YAML",hasSpecialExecutionOrder:!0})}get OptionsClass(){return Or}apply(t,i){return Oe(t,n=>{for(let r of i.forceYamlEscape){let a=Be(n,r);if(a!=null){if(a.includes(`
`)||a.startsWith(" [")||hn(a))continue;a=fi(a,i.defaultEscapeCharacter,!0),n=Me(n,r," "+a)}}return n})}get exampleBuilders(){return[new y({description:"YAML without anything to escape",before:m`
`}),new y({description:"Force YAML keys to be escaped with double quotes where not already escaped with `ForceYAMLEscapeonKeys='key'\\n'title'\\n'bool'`",before:m`
---`,""));if(!r)return n;for(let a of ur)if(i.formatAliasKey&&Object.keys(r).includes(a)){n=Me(n,a,ni(zs(Si(Be(n,a))),i.aliasArrayStyle,i.defaultEscapeCharacter,i.removeUnnecessaryEscapeCharsForMultiLineArrays,!0));break}for(let a of dr)if(i.formatTagKey&&Object.keys(r).includes(a)){n=Me(n,a,ni(ks(Si(Be(n,a))),i.tagArrayStyle,i.defaultEscapeCharacter,i.removeUnnecessaryEscapeCharsForMultiLineArrays));break}if(i.formatArrayKeys){let a=[...ur,...dr,...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=Me(n,s,ni(Si(Be(n,s)),i.defaultArrayStyle,i.defaultEscapeCharacter,i.removeUnnecessaryEscapeCharsForMultiLineArrays)))}for(let a of i.forceSingleLineArrayStyle)Object.keys(r).includes(a)&&(n=Me(n,a,ni(Si(Be(n,a)),"single-line",i.defaultEscapeCharacter,i.removeUnnecessaryEscapeCharsForMultiLineArrays)));for(let a of i.forceMultiLineArrayStyle)Object.keys(r).includes(a)&&(n=Me(n,a,ni(Si(Be(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:m`
`,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:m`
`,options:{formatAliasKey:!1,tagArrayStyle:"single string space delimited"}}),new y({description:"Arrays with dictionaries in them are ignored",before:m`
`,options:{bottom:!1,emptyLineAfterYaml:!0}}),new y({description:"Empty line before header and after YAML is removed with `EmptyLineBetweenYAMLandHeader=false`",before:m`
`)))}return n})}get exampleBuilders(){return[new y({description:"Insert static lines into YAML frontmatter. Text to insert: `aliases:\ntags:doc\nanimal:dog`",before:m`
`})]}get optionBuilders(){return[]}};Rr=A([x.register],Rr);var Ws=class{constructor(){this.minimumNumberOfDollarSignsToBeAMathBlock=2}};A([x.noSettingControl()],Ws.prototype,"minimumNumberOfDollarSignsToBeAMathBlock",2);var Ct=class extends x{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 Ws}apply(t,i){return Qu(t,i.minimumNumberOfDollarSignsToBeAMathBlock)}get exampleBuilders(){return[new y({description:"Moving math block indicator to its own line when `NumberofDollarSignstoIndicateaMathBlock` = 2",before:m`
`}),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:m`
`}),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:m`
`,"").replace("---","");let a=[],s=cr;for(let c of dr){let d=Be(r,c);if(d!=null){a=ks(Si(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`---
${Me(r,s,ni(a,i.tagArrayStyle,i.defaultEscapeCharacter,i.removeUnnecessaryEscapeCharsForMultiLineArrays))}---`}),t=ze([h.yaml],t,r=>(i.howToHandleExistingTags!=="Nothing"&&(r=r.replace(ar,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:m`
`,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:m`
`}),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:m`
`,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:m`
`,options:{howToHandleExistingTags:"Remove whole tag"}})]}get optionBuilders(){return[new se({OptionsClass:nt,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 xe({OptionsClass:nt,nameKey:"rules.move-tags-to-yaml.tags-to-ignore.name",descriptionKey:"rules.move-tags-to-yaml.tags-to-ignore.description",optionsKey:"tagsToIgnore"})]}};Dr=A([x.register],Dr);var Vs=class{constructor(){this.noBareURIs=!1}},Us="'\"\u2018\u2019\u201C\u201D`[]",av=["http","ftp","https","smtp"],Nr=class extends x{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 Vs}apply(t,i){let n=t.match(un);if(n&&(t=this.handleMatches(t,n,!1)),i.noBareURIs){let r=t.match(sp);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=Vi(o,"(");if(g!=0&&g!=Vi(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 p=l-1;for(;p>0&&t.charAt(p-1)==="<";)p--;let f=c;for(;f<t.length-1&&t.charAt(f+1)===">";)f++;t=le(t,p,f+1,"<"+o+">"),r=l+o.length;continue}t=le(t,l,l+o.length,"<"+o+">"),r=l+o.length+2}return t}skipMatch(t,i,n,r){let a=t!=null&&Us.includes(t)||Us.includes(n.charAt(0)),s=i!=null&&Us.includes(i)||Us.includes(n.charAt(n.length-1));return a&&s?!0:r?av.includes(n.substring(0,n.indexOf(":"))):!1}get exampleBuilders(){return[new y({description:"Makesurethatlinksareinsideofanglebracketswhennotinsinglequotes('),doublequotes(\"), or backticks(`)",before:m`
`,options:{noBareURIs:!0}})]}get optionBuilders(){return[new Z({OptionsClass:Vs,nameKey:"rules.no-bare-urls.no-bare-uris.name",descriptionKey:"rules.no-bare-urls.no-bare-uris.description",optionsKey:"noBareURIs"})]}};Nr=A([x.register],Nr);var jr=class{constructor(){this.numberStyle="ascending";this.listEndStyle="."}},Kr=class extends x{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 jr}apply(t,i){return Vu(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:m`
`,options:{numberStyle:"lazy"}}),new y({description:"Ordered list in blockquote has list items set to ascending numerical order when Number Style is `ascending`.",before:m`
`}),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:m`
`,options:{listEndStyle:")",numberStyle:"lazy"}})]}get optionBuilders(){return[new se({OptionsClass:jr,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 se({OptionsClass:jr,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)`)"}]})]}};Kr=A([x.register],Kr);var Ul=class{},Yr=class extends x{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 Ul}apply(t,i){return ju(t)}get exampleBuilders(){return[new y({description:"Paragraphs should be surrounded by blank lines",before:m`
`})]}get optionBuilders(){return[]}};Yr=A([x.register],Yr);var Pr=class{};A([x.noSettingControl()],Pr.prototype,"lineContent",2),A([x.noSettingControl()],Pr.prototype,"selectedText",2);var qt=class extends x{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 Pr}apply(t,i){let n=mp.test(i.lineContent),r=bs.test(t),a=bs.test(i.selectedText);return!n||!r||a?t:t.replace(bs,"")}get exampleBuilders(){return[new y({description:"Line being pasted is left alone when current line has no checklist indicator in it: `Regulartexthere`",before:m`
`,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:m`
`,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:m`
`,options:{lineContent:"> - [x] ",selectedText:""}}),new y({description:"Line being pasted with a checklist indicator has its checklist indicator removed when current line is: `-[]`",before:m`
`,options:{lineContent:"- [ ] ",selectedText:""}}),new y({description:"Line being pasted as a checklist indicator has its checklist indicator removed when current line is: `-[!]`",before:m`
`,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:m`
`,options:{lineContent:"- [!] Some text here",selectedText:"- [!] Some text here"}})]}get optionBuilders(){return[]}};qt=A([x.register],qt);var Hr=class{};A([x.noSettingControl()],Hr.prototype,"lineContent",2),A([x.noSettingControl()],Hr.prototype,"selectedText",2);var It=class extends x{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 Hr}apply(t,i){let n=new RegExp(`^${or}[*+-]`),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:m`
`,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:m`
`,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:m`
`,options:{lineContent:"> * ",selectedText:""}}),new y({description:"Line being pasted with a list indicator is has its list indicator removed when current line is: `+`",before:m`
`,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:m`
`,options:{lineContent:"+ ",selectedText:"+ "}})]}get optionBuilders(){return[]}};It=A([x.register],It);var Vl=class{},Bt=class extends x{constructor(){super({nameKey:"rules.proper-ellipsis-on-paste.name",descriptionKey:"rules.proper-ellipsis-on-paste.description",type:"Paste"})}get OptionsClass(){return Vl}apply(t,i){return t.replaceAll(ys,"\u2026")}get exampleBuilders(){return[new y({description:"Replacing three consecutive dots with an ellipsis even if spaces are present",before:m`
`})]}get optionBuilders(){return[]}};$r=A([x.register],$r);var _t=class{constructor(){this.singleQuoteStyleEnabled=!0;this.singleQuoteStyle="''";this.doubleQuoteStyleEnabled=!0;this.doubleQuoteStyle='""'}},Wr=class extends x{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 _t}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(up,"'")}convertSmartDoubleQuotesToStraightQuotes(t){return t.replace(dp,'"')}convertStraightQuoteToSmartQuote(t,i,n,r,a){let s=eu(i,t);if(s.length===0)return t;let o=t.length-1,l,c="",d="",u=!1,g=!1,p=!1,f=!1,w=!1,v="";for(let b of s)c=b==0?"":t.charAt(b-1),d=b===o?"":t.charAt(b+1),u=Ml.test(c),g=Ml.test(d),w=u&&g,p=c!=""&&c.trim()==="",f=d!=""&&d.trim()==="",w&&a?l=r:f&&!p?(l=r,v=l):p&&!f?(l=n,v=l):(v===""||v===r?l=n:l=r,v=l),t=le(t,b,b+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:m`
`}),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:m`
`})]}get optionBuilders(){return[new Pe({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:ta,optionsKey:"charactersToRemoveSpacesBefore"}),new Pe({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:ta,optionsKey:"charactersToRemoveSpacesAfter"})]}};ia=A([x.register],ia);var Gs=class{constructor(){this.punctuationToRemove=".,;:!\u3002\uFF0C\uFF1B\uFF1A\uFF01"}},na=class extends x{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 Gs}apply(t,i){return t.replaceAll(Xi,(n,r="",a="",s="",o="",l="")=>{if(o==""||o.match(cp))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:m`
`,options:{yamlKeysToRemove:["status:","keywords","date"]}})]}get optionBuilders(){return[new xe({OptionsClass:Qs,nameKey:"rules.remove-yaml-keys.yaml-keys-to-remove.name",descriptionKey:"rules.remove-yaml-keys.yaml-keys-to-remove.description",optionsKey:"yamlKeysToRemove"})]}};ra=A([x.register],ra);var oc=class{},aa=class extends x{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 oc}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:m`
`})]}get optionBuilders(){return[]}};sa=A([x.register],sa);var Zs=class{constructor(){this.style="consistent"}},oa=class extends x{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 Zs}apply(t,i){return ps(t,i.style,"strong")}get exampleBuilders(){return[new y({description:"Strong indicators should use underscores when style is set to 'underscore'",before:m`
`,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:m`
`,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:m`
`,options:{style:"consistent"}})]}get optionBuilders(){return[new se({OptionsClass:Zs,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"}]})]}};oa=A([x.register],oa);var Js=class{constructor(){this.twoSpaceLineBreak=!1}},jt=class extends x{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 Js}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:m`
`,options:{twoSpaceLineBreak:!0}})]}get optionBuilders(){return[new Z({OptionsClass:Js,nameKey:"rules.trailing-spaces.twp-space-line-break.name",descriptionKey:"rules.trailing-spaces.twp-space-line-break.description",optionsKey:"twoSpaceLineBreak"})]}};jt=A([x.register],jt);var cc=class{},la=class extends x{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 cc}apply(t,i){return Ku(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:m`
`})]}get optionBuilders(){return[]}};la=A([x.register],la);var Xs=class{constructor(){this.listStyle="consistent"}},ca=class extends x{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 Xs}apply(t,i){return Gu(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:m`
`,options:{listStyle:"+"}})]}get optionBuilders(){return[new se({OptionsClass:Xs,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"}]})]}};ca=A([x.register],ca);var Ni=class{constructor(){this.priorityKeysAtStartOfYaml=!0;this.yamlKeyPrioritySortOrder=[];this.yamlSortOrderForOtherKeys="None"}};A([x.noSettingControl()],Ni.prototype,"dateModifiedKey",2),A([x.noSettingControl()],Ni.prototype,"currentTimeFormatted",2),A([x.noSettingControl()],Ni.prototype,"yamlTimestampDateModifiedEnabled",2);var Yt=class extends x{constructor(){super({nameKey:"rules.yaml-key-sort.name",descriptionKey:"rules.yaml-key-sort.description",type:"YAML",hasSpecialExecutionOrder:!0})}get OptionsClass(){return Ni}apply(t,i){let n=gn(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=this.getYAMLKeysSorted(r,s),c=l.sortedYamlKeyValues;r=l.remainingYaml;let d=i.yamlSortOrderForOtherKeys,u=Di(r);if(u==null)return this.getTextWithNewYamlFrontmatter(t,n,c,r,a,i.dateModifiedKey,i.currentTimeFormatted,i.yamlTimestampDateModifiedEnabled);let g=Object.keys(u),p;if(d==="Ascending Alphabetical")p=this.sortAlphabeticallyAsc;else if(d==="Descending Alphabetical")p=this.sortAlphabeticallyDesc;else return this.getTextWithNewYamlFrontmatter(t,n,c,r,a,i.dateModifiedKey,i.currentTimeFormatted,i.yamlTimestampDateModifiedEnabled);g=g.sort(p);let f=this.getYAMLKeysSorted(r,g);return this.getTextWithNewYamlFrontmatter(t,n,c,f.sortedYamlKeyValues,a,i.dateModifiedKey,i.currentTimeFormatted,i.yamlTimestampDateModifiedEnabled)}getYAMLKeysSorted(t,i){let n="";for(let r of i){let a=Be(t,r);a!==null&&(a.includes(`
`,t=wt(t,r))}return{remainingYaml:t,sortedYamlKeyValues:n}}updateDateModifiedIfYamlChanged(t,i,n,r){return t==i?i:Me(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:m`
`,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:m`
`,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:m`
`,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:m`
`,options:{yamlKeyPrioritySortOrder:["date","type","language"],yamlSortOrderForOtherKeys:"Descending Alphabetical",priorityKeysAtStartOfYaml:!1}})]}get optionBuilders(){return[new xe({OptionsClass:Ni,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 Z({OptionsClass:Ni,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 se({OptionsClass:Ni,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"}]})]}};Yt=A([x.register],Yt);var ai=require("obsidian");var _p=Rn(Bp());var Ze=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([x.noSettingControl()],Ze.prototype,"alreadyModified",2),A([x.noSettingControl()],Ze.prototype,"fileCreatedTime",2),A([x.noSettingControl()],Ze.prototype,"fileModifiedTime",2),A([x.noSettingControl()],Ze.prototype,"locale",2),A([x.noSettingControl()],Ze.prototype,"currentTime",2),A([x.noSettingControl()],Ze.prototype,"fileName",2);var rt=class extends x{constructor(){super({nameKey:"rules.yaml-timestamp.name",descriptionKey:"rules.yaml-timestamp.description",type:"YAML",hasSpecialExecutionOrder:!0})}get OptionsClass(){return Ze}apply(t,i){let n=i.alreadyModified,r=zi(t);return n=n||r!==t,i.format=i.format.trimEnd(),Oe(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,ai.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:m`
`,options:{dateCreated:!1,fileCreatedTime:"2020-01-01T00:00:00-00:00",fileModifiedTime:"2020-01-01T00:00:00-00:00",currentTime:(0,ai.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:m`
---`,""),c=Di(s);a=c[ws]??null,a!=null&&(a=a+"",a=fi(a,i.defaultEscapeCharacter,this.forceEscape(a,i.aliasArrayStyle)));let d=null,u=Object.keys(c);for(let g of ur)if(u.includes(g)){d=g;break}if(d!=null){let g=Be(l,d),p="multi-line",f=g==="",w=!1;g.includes(`
`)||(g.match(/^\[.*\]/)===null?(p="single string to single-line",w=!0):p="single-line");let v=zs(Si(g)),b=this.getNewAliasValue(v,o,r,a);b===""?l=wt(l,d):i.preserveExistingAliasesSectionStyle?!f&&(w&&r==b||!w||v==b)?l=Me(l,d,ni(b,p,i.defaultEscapeCharacter,i.removeUnnecessaryEscapeCharsForMultiLineArrays,!0)):l=Me(l,d,ni(b,i.aliasArrayStyle,i.defaultEscapeCharacter,i.removeUnnecessaryEscapeCharsForMultiLineArrays,!0)):l=Me(l,d,ni(b,i.aliasArrayStyle,i.defaultEscapeCharacter,i.removeUnnecessaryEscapeCharsForMultiLineArrays,!0))}else o||(l=Me(l,ql,ni(r,i.aliasArrayStyle,i.defaultEscapeCharacter,i.removeUnnecessaryEscapeCharsForMultiLineArrays,!0)));return!i.useYamlKeyToKeepTrackOfOldFilenameOrHeading||o?l=wt(l,ws):l=Me(l,ws,`${r}`),t=t.replace(`---
${l}---`),t}getTitleInfo(t,i,n,r){let a=ze([h.code,h.math,h.yaml,h.tag],t,vs);a=a||i;let s=fi(a,r,this.forceEscape(a,n));return[a,s]}forceEscape(t,i){return Za(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&&hn(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:m`
`,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:m`
`,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:m`
`,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:m`
${i.titleKey}:${n}`)}return r})}getFirstH1Header(t){return ze([h.code,h.math,h.yaml,h.tag],t,vs)}get exampleBuilders(){return[new y({description:"Adds a header with the title from heading when `mode='First H1 or Filename if H1 Missing'`.",before:m`
`,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:m`
`,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:m`
`,options:{mode:"filename",fileName:"Filename"}})]}get optionBuilders(){return[new Pe({OptionsClass:Pt,nameKey:"rules.yaml-title.title-key.name",descriptionKey:"rules.yaml-title.title-key.description",optionsKey:"titleKey"}),new se({OptionsClass:Pt,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"}]})]}};ua=A([x.register],ua);var Wx=`<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">
`," "))}};var ho=class extends Oi{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)}}};varpm=require("obsidian");varka=classextendsOn{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()}};varfo=classextendsst{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){newpm.Setting(this.inputElDiv).addSearch(a=>{newka(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}};varEc=require("obsidian");varPw="gm",yo=classextendsst{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:Pw};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=newEc.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();newEc.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 mm=require("obsidian");var vo=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 mm.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){Ti(r),i.has(a)||i.add(a)};for(let[r,a]of this.searchSettingInfo)for(let s of a)if(t.trim()===""||s.alias?.includes(t)||s.description.includes(t)||s.name.includes(t))n(s.containerEl,r);else if(s.options)for(let o of s.options){if(o.description.toLowerCase().includes(t)||o.name.toLowerCase().includes(t)){n(s.containerEl,r);break}else if(o.options){for(let l of o.options)if(l.description.toLowerCase().includes(t)||l.value.toLowerCase().includes(t)){n(s.containerEl,r);break}}ci(s.containerEl)}else ci(s.containerEl);for(let[r,a]of this.tabNameToTab)i.has(r)?Ti(a.headingEl):ci(a.headingEl);i.size===0?Ti(this.searchZeroState):ci(this.searchZeroState)}focusOnInput(){this.search.inputEl.focus()}};var gm=Rn(Po());var Mn=require("obsidian");var za=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,Mn.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,Mn.setIcon)(t,"linter-success"),setTimeout(()=>{(0,Mn.setIcon)(t,"linter-clipboard")},1500)},i=>{new Mn.Notice(`${E("notice-text.copy-to-clipboard-failed")+i}`,0)})}};var Hw=Object.keys(gm.default.levels),xo=class extends Oi{constructor(t,i,n,r){super(t,i,"Debug",n,r),this.display()}display(){let t=this.contentEl.createDiv(),i={isForEnum:!0,values:Hw,descriptions:[]};this.addSettingSearchInfoForGeneralSettings(new Ki(t,"tabs.debug.log-level.name","tabs.debug.log-level.description","logLevel",this.plugin,i,async()=>{ja(this.plugin.settings.logLevel)})),t=this.contentEl.createDiv();let n=E("tabs.debug.linter-config.name"),r=E("tabs.debug.linter-config.description");new za(t,n,r).inputEl.setText(JSON.stringify(this.plugin.settings,null,2)),this.addSettingSearchInfo(t,n,r),t=this.contentEl.createDiv(),this.addSettingSearchInfoForGeneralSettings(new Mi(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 za(t,n,"");s.inputEl.setText(Na.join(`
`)),Ai(r,s.descEl,this.plugin.settingsTab.component),this.addSettingSearchInfo(t,n,r)}};var wo=class extends ct.PluginSettingTab{constructor(i,n){super(i,n);this.plugin=n;this.tabNameToTab=new Map;this.selectedTab="General";this.component=new ct.Component}display(){let{containerEl:i}=this;this.component.load(),i.empty();let n=i.createDiv("linter-setting-title");ct.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(ct.Platform.isMobile),this.createSearchZeroState(ct.Platform.isMobile),this.generateSearchBar(n),this.selectedTab==""&&this.tabSearcher.focusOnInput()}hide(){this.component.unload()}addTabs(i){this.addTab(new go(this.tabNavEl,this.settingsContentEl,i,this.plugin,this.app));for(let n of Object.values(N))this.addTab(new ho(this.tabNavEl,this.settingsContentEl,n,zt.get(n),i,this.plugin));this.addTab(new bo(this.tabNavEl,this.settingsContentEl,i,this.app,this.plugin)),this.addTab(new xo(this.tabNavEl,this.settingsContentEl,i,this.plugin))}generateSearchBar(i){this.tabSearcher=new vo(i,this.searchZeroState,this.tabNameToTab,()=>{for(let n of this.tabNameToTab.values()){n.updateTabDisplayMode(!1,"entering search mode by focusing on the search input box");let r=this.tabSearcher.search.getValue();this.selectedTab==""&&r.trim()!=""&&this.tabSearcher.searchSettings(r.toLowerCase()),this.selectedTab=""}})}createSearchZeroState(i){this.searchZeroState=this.settingsContentEl.createDiv(),ci(this.searchZeroState),this.searchZeroState.createEl(i?"h3":"h2",{text: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 ci(this.searchZeroState),this.tabNameToTab.get(i).updateTabDisplayMode(!0),this.tabNameToTab.get(this.selectedTab).updateTabDisplayMode(!1);this.selectedTab=i}}};var fm=require("obsidian");var $w=/^---\n/gm,hm=`${mn}:`,ko=class extends fm.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 Li){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(hm)||this.disabledRulesIsEndOfStartOfFileToCursor(n.getRange({line:0,ch:0},i))){this.inline=a.startsWith(hm);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]=Ms(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 de.Notice(E("notice-text.empty-clipboard"),dt);return}i.replaceSelection(n)}getEditor(){let i=this.app.workspace.getActiveViewOfType(de.MarkdownView);return i?i.editor:null}getLineContent(i,n){return i.getLine(n.anchor.line)}moveConfigValuesToKeyBasedFormat(){Ha("en");for(let i of Li){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(),Ha(window.localStorage.getItem("language"))}getAllFilesInFolder(i){let n=[],r=[i];for(let a of r)for(let s of a.children)s instanceof de.TFile&&this.isMarkdownFile(s)?n.push(s):s instanceof de.TFolder&&r.push(s);return n}updatePasteOverrideStatus(){for(let i of zt.get("Paste"))if(i.getOptions(this.settings).enabled){this.overridePaste=!0;return}this.overridePaste=!1}};