varfa=Object.create;varqn=Object.defineProperty;varda=Object.getOwnPropertyDescriptor;varma=Object.getOwnPropertyNames;varga=Object.getPrototypeOf,ha=Object.prototype.hasOwnProperty;varKi=n=>qn(n,"__esModule",{value:!0});varAa=(n,e)=>{Ki(n);for(vartine)qn(n,t,{get:e[t],enumerable:!0})},_a=(n,e,t)=>{if(e&&typeofe=="object"||typeofe=="function")for(letrofma(e))!ha.call(n,r)&&r!=="default"&&qn(n,r,{get:()=>e[r],enumerable:!(t=da(e,r))||t.enumerable});returnn},ee=n=>_a(Ki(qn(n!=null?fa(ga(n)):{},"default",n&&n.__esModule&&"default"inn?{get:()=>n.default,enumerable:!0}:{value:n,enumerable:!0})),n);varRi=(()=>{for(varn=newUint8Array(128),e=0;e<64;e++)n[e<26?e+65:e<52?e+71:e<62?e-4:e*4-205]=e;returnt=>{for(varr=t.length,i=newUint8Array((r-(t[r-1]=="=")-(t[r-2]=="="))*3/4|0),o=0,a=0;o<r;){varl=n[t.charCodeAt(o++)],c=n[t.charCodeAt(o++)],d=n[t.charCodeAt(o++)],m=n[t.charCodeAt(o++)];i[a++]=l<<2|c>>4,i[a++]=c<<4|d>>2,i[a++]=d<<6|m}returni}})();Aa(exports,{default:()=>Pi});varxr=ee(require("obsidian"));varL=ee(require("obsidian"));varYi=ee(require("obsidian"));functionoe(n){lete=newYi.Notice("",8e3);ninstanceofM&&n.console_msg?(e.noticeEl.innerHTML=`<b>Templater Error</b>:<br/>${n.message}<br/>Check console for more information`,console.error("Templater Error:",n.message,`
`,n.console_msg)):e.noticeEl.innerHTML=`<b>TemplaterError</b>:<br/>${n.message}`}var M=class extends Error{constructor(e,t){super(e);this.console_msg=t;this.name=this.constructor.name,Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor)}};async function Te(n,e){try{return await n()}catch(t){return t instanceof M?oe(t):oe(new M(e,t.message)),null}}function ke(n,e){try{return n()}catch(t){return oe(new M(e,t.message)),null}}var re=function(){function n(){}return n.explainIfInvalidTSDocTagName=function(e){if(e[0]!=="@")return'A TSDoc tag name must start with an "@" symbol';if(!n._tsdocTagNameRegExp.test(e))return"A TSDoc tag name must start with a letter and contain only letters and numbers"},n.validateTSDocTagName=function(e){var t=n.explainIfInvalidTSDocTagName(e);if(t)throw new Error(t)},n.explainIfInvalidLinkUrl=function(e){if(e.length===0)return"The URL cannot be empty";if(!n._urlSchemeRegExp.test(e))return'An @link URL must begin with a scheme comprised only of letters and numbers followed by "://". (For general URLs, use an HTML "<a>" tag instead.)';if(!n._urlSchemeAfterRegExp.test(e))return'An @link URL must have at least one character after "://"'},n.explainIfInvalidHtmlName=function(e){if(!n._htmlNameRegExp.test(e))return"An HTML name must be an ASCII letter followed by zero or more letters, digits, or hyphens"},n.validateHtmlName=function(e){var t=n.explainIfInvalidHtmlName(e);if(t)throw new Error(t)},n.explainIfInvalidPackageName=function(e){if(e.length===0)return"The package name cannot be an empty string";if(!n._validPackageNameRegExp.test(e))return"The package name ".concat(JSON.stringify(e)," is not a valid package name")},n.explainIfInvalidImportPath=function(e,t){if(e.length>0){if(e.indexOf("//")>=0)return'An import path must not contain "//"';if(e[e.length-1]==="/")return'An import path must not end with "/"';if(!t&&e[0]==="/")return'An import path must not start with "/" unless prefixed by a package name'}},n.isSystemSelector=function(e){return n._systemSelectors.has(e)},n.explainIfInvalidUnquotedIdentifier=function(e){if(e.length===0)return"The identifier cannot be an empty string";if(n._identifierBadCharRegExp.test(e))return"The identifier cannot non-word characters";if(n._identifierNumberStartRegExp.test(e))return"The identifier must not start with a number"},n.explainIfInvalidUnquotedMemberIdentifier=function(e){var t=n.explainIfInvalidUnquotedIdentifier(e);if(t!==void 0)return t;if(n.isSystemSelector(e))return'The identifier "'.concat(e,'" must be quoted because it is a TSDoc system selector name')},n._tsdocTagNameRegExp=/^@[a-z][a-z0-9]*$/i,n._urlSchemeRegExp=/^[a-z][a-z0-9]*\:\/\//i,n._urlSchemeAfterRegExp=/^[a-z][a-z0-9]*\:\/\/./i,n._htmlNameRegExp=/^[a-z]+[a-z0-9\-]*$/i,n._identifierBadCharRegExp=/[^a-z0-9_$]/i,n._identifierNumberStartRegExp=/^[0-9]/,n._validPackageNameRegExp=/^(?:@[a-z0-9\-_\.]+\/)?[a-z0-9\-_\.]+$/i,n._systemSelectors=new Set(["instance","static","constructor","class","enum","function","interface","namespace","type","variable"]),n}();var Er=function(){function n(){this._docNodeDefinitionsByKind=new Map,this._docNodeDefinitionsByConstructor=new Map}return n.prototype.registerDocNodes=function(e,t){var r=re.explainIfInvalidPackageName(e);if(r)throw new Error("Invalid NPM package name: "+r);for(var i=0,o=t;i<o.length;i++){var a=o[i];if(!n._nodeKindRegExp.test(a.docNodeKind))throw new Error("The DocNode kind ".concat(JSON.stringify(a.docNodeKind)," is not a valid identifier.")+" It must start with an underscore or letter, and be comprised of letters, numbers, and underscores");var l=this._docNodeDefinitionsByKind.get(a.docNodeKind);if(l!==void 0)throw new Error('The DocNode kind "'.concat(a.docNodeKind,'" was already registered')+" by ".concat(l.packageName));if(l=this._docNodeDefinitionsByConstructor.get(a.constructor),l!==void 0)throw new Error("This DocNode constructor was already registered by ".concat(l.packageName)+" as ".concat(l.docNodeKind));var c={docNodeKind:a.docNodeKind,constructor:a.constructor,packageName:e,allowedChildKinds:new Set};this._docNod
`:this.range.toString()},n}();var ba=function(){var n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},n(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");n(e,t);function r(){this.constructor=e}e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}}(),x;(function(n){n.Spacing="Spacing",n.BlockTag="BlockTag",n.CodeSpan_OpeningDelimiter="CodeSpan_OpeningDelimiter",n.CodeSpan_Code="CodeSpan_Code",n.CodeSpan_ClosingDelimiter="CodeSpan_ClosingDelimiter",n.DeclarationReference_PackageName="DeclarationReference_PackageName",n.DeclarationReference_ImportPath="DeclarationReference_ImportPath",n.DeclarationReference_ImportHash="DeclarationReference_ImportHash",n.ErrorText="ErrorText",n.NonstandardText="NonstandardText",n.EscapedText="EscapedText",n.FencedCode_OpeningFence="FencedCode_OpeningFence",n.FencedCode_Language="FencedCode_Language",n.FencedCode_Code="FencedCode_Code",n.FencedCode_ClosingFence="FencedCode_ClosingFence",n.HtmlAttribute_Name="HtmlAttribute_Name",n.HtmlAttribute_Equals="HtmlAttribute_Equals",n.HtmlAttribute_Value="HtmlAttribute_Value",n.HtmlEndTag_OpeningDelimiter="HtmlEndTag_OpeningDelimiter",n.HtmlEndTag_Name="HtmlEndTag_Name",n.HtmlEndTag_ClosingDelimiter="HtmlEndTag_ClosingDelimiter",n.HtmlStartTag_OpeningDelimiter="HtmlStartTag_OpeningDelimiter",n.HtmlStartTag_Name="HtmlStartTag_Name",n.HtmlStartTag_ClosingDelimiter="HtmlStartTag_ClosingDelimiter",n.InlineTag_OpeningDelimiter="InlineTag_OpeningDelimiter",n.InlineTag_TagName="InlineTag_TagName",n.InlineTag_TagContent="InlineTag_TagContent",n.InlineTag_ClosingDelimiter="InlineTag_ClosingDelimiter",n.LinkTag_UrlDestination="LinkTag_UrlDestination",n.LinkTag_Pipe="LinkTag_Pipe",n.LinkTag_LinkText="LinkTag_LinkText",n.MemberIdentifier_LeftQuote="MemberIdentifier_LeftQuote",n.MemberIdentifier_Identifier="MemberIdentifier_Identifier",n.MemberIdentifier_RightQuote="MemberIdentifier_RightQuote",n.MemberReference_Dot="MemberReference_Dot",n.MemberReference_LeftParenthesis="MemberReference_LeftParenthesis",n.MemberReference_Colon="MemberReference_Colon",n.MemberReference_RightParenthesis="MemberReference_RightParenthesis",n.MemberSelector="MemberSelector",n.DocMemberSymbol_LeftBracket="DocMemberSymbol_LeftBracket",n.DocMemberSymbol_RightBracket="DocMemberSymbol_RightBracket",n.ParamBlock_ParameterName="ParamBlock_ParameterName",n.ParamBlock_Hyphen="ParamBlock_Hyphen",n.PlainText="PlainText",n.SoftBreak="SoftBreak"})(x||(x={}));var j=function(n){ba(e,n);function e(t){var r=n.call(this,t)||this;if(t.excerptKind===x.Spacing)for(var i=0,o=t.content.tokens;i<o.length;i++){var a=o[i];switch(a.kind){case u.Spacing:case u.Newline:case u.EndOfInput:break;default:throw new Error("The excerptKind=Spacing but the range contains a non-whitespace token")}}return r._excerptKind=t.excerptKind,r._content=t.content,r}return Object.defineProperty(e.prototype,"kind",{get:function(){return g.Excerpt},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"excerptKind",{get:function(){return this._excerptKind},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"content",{get:function(){return this._content},enumerable:!1,configurable:!0}),e}(T);var Ea=function(){var n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},n(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");n(e,t);function r(){this.constructor=e}e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}}(),Ln=function(n){Ea(e,n);function e(t){var r=n.call(this,t)||this;return re.validateTSDocTagName(t.tagName),r._tagName=t.tagName,r._tagNameWithUpperCase=t.tagName.toUpperCase(),T.isParsedParameters(t
`?(++t,r=1):++r)}return{line:t,column:r}},n.prototype._validateBounds=function(){if(this.pos<0)throw new Error("TextRange.pos cannot be negative");if(this.end<0)throw new Error("TextRange.end cannot be negative");if(this.end<this.pos)throw new Error("TextRange.end cannot be smaller than TextRange.pos");if(this.pos>this.buffer.length)throw new Error("TextRange.pos cannot exceed the associated text buffer length");if(this.end>this.buffer.length)throw new Error("TextRange.end cannot exceed the associated text buffer length")},n.empty=new n("",0,0),n}();var dn=function(){function n(e){this.messageId=e.messageId,this.unformattedText=e.messageText,this.textRange=e.textRange,this.tokenSequence=e.tokenSequence,this.docNode=e.docNode,this._text=void 0}return n._formatMessageText=function(e,t){if(e||(e="An unknown error occurred"),t.pos!==0||t.end!==0){var r=t.getLocation(t.pos);if(r.line)return"(".concat(r.line,",").concat(r.column,"): ")+e}return e},Object.defineProperty(n.prototype,"text",{get:function(){return this._text===void 0&&(this._text=n._formatMessageText(this.unformattedText,this.textRange)),this._text},enumerable:!1,configurable:!0}),n.prototype.toString=function(){return this.text},n}();var Mr=function(){function n(){this._messages=[]}return Object.defineProperty(n.prototype,"messages",{get:function(){return this._messages},enumerable:!1,configurable:!0}),n.prototype.addMessage=function(e){this._messages.push(e)},n.prototype.addMessageForTextRange=function(e,t,r){this.addMessage(new dn({messageId:e,messageText:t,textRange:r}))},n.prototype.addMessageForTokenSequence=function(e,t,r,i){this.addMessage(new dn({messageId:e,messageText:t,textRange:r.getContainingTextRange(),tokenSequence:r,docNode:i}))},n.prototype.addMessageForDocErrorText=function(e){var t;e.textExcerpt?t=e.textExcerpt:t=e.errorLocation,this.addMessage(new dn({messageId:e.messageId,messageText:e.errorMessage,textRange:t.getContainingTextRange(),tokenSequence:t,docNode:e}))},n}();var Or=function(){function n(e,t){this.commentRange=We.empty,this.lines=[],this.tokens=[],this.configuration=e,this.sourceRange=t,this.docComment=new $n({configuration:this.configuration}),this.log=new Mr}return n}();var _t=function(){function n(e){this.parserContext=e.parserContext,this._startIndex=e.startIndex,this._endIndex=e.endIndex,this._validateBounds()}return n.createEmpty=function(e){return new n({parserContext:e,startIndex:0,endIndex:0})},Object.defineProperty(n.prototype,"startIndex",{get:function(){return this._startIndex},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"endIndex",{get:function(){return this._endIndex},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"tokens",{get:function(){return this.parserContext.tokens.slice(this._startIndex,this._endIndex)},enumerable:!1,configurable:!0}),n.prototype.getNewSequence=function(e,t){return new n({parserContext:this.parserContext,startIndex:e,endIndex:t})},n.prototype.getContainingTextRange=function(){return this.isEmpty()?We.empty:this.parserContext.sourceRange.getNewRange(this.parserContext.tokens[this._startIndex].range.pos,this.parserContext.tokens[this._endIndex-1].range.end)},n.prototype.isEmpty=function(){return this._startIndex===this._endIndex},n.prototype.toString=function(){return this.tokens.map(function(e){return e.toString()}).join("")},n.prototype._validateBounds=function(){if(this.startIndex<0)throw new Error("TokenSequence.startIndex cannot be negative");if(this.endIndex<0)throw new Error("TokenSequence.endIndex cannot be negative");if(this.endIndex<this.startIndex)throw new Error("TokenSequence.endIndex cannot be smaller than TokenSequence.startIndex");if(this.startIndex>this.parserContext.tokens.length)throw new Error("TokenSequence.startIndex cannot exceed the associated token array");if(this.endIndex>this.parserContext.tokens.length)throw new Error("TokenSequence.endIndex cannot exceed the associated token array")},n}();var pe;(function(n){n[n.BeginComment1=0]="BeginComment1",n[n.BeginComment2=1]="BeginComment2",n[n.CollectingFirstLine=2]="CollectingFirstLine
`?(m.push(t.getNewRange(b,b)),a=c):n._whitespaceCharacterRegExp.test(y)||(l=c,d=pe.CollectingLine);break}}return e.commentRange=t.getNewRange(i,o),e.lines=m,!0},n._whitespaceCharacterRegExp=/^\s$/,n}();var mn=function(){function n(){}return n.readTokens=function(e){n._ensureInitialized();for(var t=[],r=void 0,i=0,o=e;i<o.length;i++){var a=o[i];n._pushTokensForLine(t,a),r=a}return r?t.push(new St(u.EndOfInput,r.getNewRange(r.end,r.end),r)):t.push(new St(u.EndOfInput,We.empty,We.empty)),t},n.isPunctuation=function(e){return n._ensureInitialized(),n._punctuationTokens[e]||!1},n._pushTokensForLine=function(e,t){for(var r=t.buffer,i=t.end,o=t.pos,a=void 0,l=o;o<i;){var c=r.charCodeAt(o),d=n._charCodeMap[c];d===void 0&&(d=u.Other),a!==void 0&&d===a&&n._isMultiCharacterToken(a)||(a!==void 0&&e.push(new St(a,t.getNewRange(l,o),t)),l=o,a=d),++o}a!==void 0&&e.push(new St(a,t.getNewRange(l,o),t)),e.push(new St(u.Newline,t.getNewRange(t.end,t.end),t))},n._isMultiCharacterToken=function(e){switch(e){case u.Spacing:case u.AsciiWord:case u.Other:return!0}return!1},n._ensureInitialized=function(){if(!n._charCodeMap){n._charCodeMap={},n._punctuationTokens={};for(var e=n._commonMarkPunctuationCharacters,t=0;t<e.length;++t){var r=e.charCodeAt(t);n._charCodeMap[r]=u.OtherPunctuation}for(var i={"\\":u.Backslash,"<":u.LessThan,">":u.GreaterThan,"=":u.Equals,"'":u.SingleQuote,'"':u.DoubleQuote,"/":u.Slash,"-":u.Hyphen,"@":u.AtSign,"{":u.LeftCurlyBracket,"}":u.RightCurlyBracket,"`":u.Backtick,".":u.Period,":":u.Colon,",":u.Comma,"[":u.LeftSquareBracket,"]":u.RightSquareBracket,"|":u.Pipe,"(":u.LeftParenthesis,")":u.RightParenthesis,"#":u.PoundSymbol,"+":u.Plus,$:u.DollarSign},o=0,a=Object.getOwnPropertyNames(i);o<a.length;o++){var l=a[o];n._charCodeMap[l.charCodeAt(0)]=i[l],n._punctuationTokens[i[l]]=!0}n._punctuationTokens[u.OtherPunctuation]=!0;for(var c=n._wordCharacters,t=0;t<c.length;++t){var r=c.charCodeAt(t);n._charCodeMap[r]=u.AsciiWord}n._charCodeMap["".charCodeAt(0)]=u.Spacing,n._charCodeMap["".charCodeAt(0)]=u.Spacing}},n._commonMarkPunctuationCharacters="!\"#$%&'()*+,-./:;<=>?@[\\]^`{|}~",n._wordCharacters="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_",n}();varBr=function(){functionn(e,t){if(this._parserContext=e,this.tokens=e.tokens,t){if(t.parserContext!==this._parserContext)thrownewError("The embeddedTokenSequence must use the same parser context");this._readerStartIndex=t.startIndex,this._readerEndIndex=t.endIndex}elsethis._readerStartIndex=0,this._readerEndIndex=this.tokens.length;this._currentIndex=this._readerStartIndex,this._accumulatedStartIndex=this._readerStartIndex}returnn.prototype.extractAccumulatedSequence=function(){if(this._accumulatedStartIndex===this._currentIndex)thrownewError("Parser assertion failed: The queue should not be empty when extractAccumulatedSequence() is called");vare=new_t({parserContext:this._parserContext,startIndex:this._accumulatedStartIndex,endIndex:this._currentIndex});returnthis._accumulatedStartIndex=this._currentIndex,e},n.prototype.isAccumulatedSequenceEmpty=function(){returnthis._accumulatedStartIndex===this._currentIndex},n.prototype.tryExtractAccumulatedSequence=function(){if(!this.isAccumulatedSequenceEmpty())returnthis.extractAccumulatedSequence()},n.prototype.assertAccumulatedSequenceIsEmpty=function(){if(!this.isAccumulatedSequenceEmpty()){vare=new_t({parserContext:this._parserContext,startIndex:this._accumulatedStartIndex,endIndex:this._currentIndex}),t=e.tokens.map(function(r){returnr.toString()});thrownewError(`Parser assertion failed: The queue should be empty, but it contains:
`+JSON.stringify(t))}},n.prototype.peekToken=function(){return this.tokens[this._currentIndex]},n.prototype.peekTokenKind=function(){return this._currentIndex>=this._readerEndIndex?u.EndOfInput:this.tokens[this._currentIndex].kind},n.prototype.peekTokenAfterKind=function(){return this._currentIndex+1>=this._readerEndIndex?u.EndOfInput:this.tokens[this._currentIndex+1].kind},n.prototype.peekTokenAfterAfterKind=function(){return this._currentIndex+2>=this._readerEndIndex?u.EndOfInput:this.tokens[this._currentIndex+2].kind},n.prototype.readToken=function(){if(this._currentIndex>=this._readerEndIndex)throw new Error("Cannot read past end of stream");var e=this.tokens[this._currentIndex];if(e.kind===u.EndOfInput)throw new Error("The EndOfInput token cannot be read");return this._currentIndex++,e},n.prototype.peekPreviousTokenKind=function(){return this._currentIndex===0?u.EndOfInput:this.tokens[this._currentIndex-1].kind},n.prototype.createMarker=function(){return this._currentIndex},n.prototype.backtrackToMarker=function(e){if(e>this._currentIndex)throw new Error("The marker has expired");this._currentIndex=e,e<this._accumulatedStartIndex&&(this._accumulatedStartIndex=e)},n}();var ir=function(){return ir=Object.assign||function(n){for(var e,t=1,r=arguments.length;t<r;t++){e=arguments[t];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(n[i]=e[i])}return n},ir.apply(this,arguments)};function gn(n){return n!==void 0&&Object.hasOwnProperty.call(n,"failureMessage")}var Qi=function(){function n(e){this._parserContext=e,this._configuration=e.configuration,this._currentSection=e.docComment.summarySection}return n.prototype.parse=function(){for(var e=new Br(this._parserContext),t=!1;!t;)switch(e.peekTokenKind()){case u.EndOfInput:t=!0;break;case u.Newline:this._pushAccumulatedPlainText(e),e.readToken(),this._pushNode(new Xn({parsed:!0,configuration:this._configuration,softBreakExcerpt:e.extractAccumulatedSequence()}));break;case u.Backslash:this._pushAccumulatedPlainText(e),this._pushNode(this._parseBackslashEscape(e));break;case u.AtSign:this._pushAccumulatedPlainText(e),this._parseAndPushBlock(e);break;case u.LeftCurlyBracket:{this._pushAccumulatedPlainText(e);var r=e.createMarker(),i=this._parseInlineTag(e),o=this._parserContext.docComment;if(i instanceof pn){var a=e.createMarker()-1;o.inheritDocTag===void 0?this._parserContext.docComment.inheritDocTag=i:this._pushNode(this._backtrackAndCreateErrorRange(e,r,a,v.ExtraInheritDocTag,"A doc comment cannot have more than one @inheritDoc tag"))}else this._pushNode(i);break}case u.RightCurlyBracket:this._pushAccumulatedPlainText(e),this._pushNode(this._createError(e,v.EscapeRightBrace,'The "}" character should be escaped using a backslash to avoid confusion with a TSDoc inline tag'));break;case u.LessThan:this._pushAccumulatedPlainText(e),e.peekTokenAfterKind()===u.Slash?this._pushNode(this._parseHtmlEndTag(e)):this._pushNode(this._parseHtmlStartTag(e));break;case u.GreaterThan:this._pushAccumulatedPlainText(e),this._pushNode(this._createError(e,v.EscapeGreaterThan,'The ">" character should be escaped using a backslash to avoid confusion with an HTML tag'));break;case u.Backtick:this._pushAccumulatedPlainText(e),e.peekTokenAfterKind()===u.Backtick&&e.peekTokenAfterAfterKind()===u.Backtick?this._pushNode(this._parseFencedCode(e)):this._pushNode(this._parseCodeSpan(e));break;default:e.readToken();break}this._pushAccumulatedPlainText(e),this._performValidationChecks()},n.prototype._performValidationChecks=function(){var e=this._parserContext.docComment;e.deprecatedBlock&&(rr.hasAnyTextContent(e.deprecatedBlock)||this._parserContext.log.addMessageForTokenSequence(v.MissingDeprecationMessage,"The ".concat(e.deprecatedBlock.blockTag.tagName," block must include a deprecation message,")+" e.g. describing the recommended alternative",e.deprecatedBlock.blockTag.getTokenSequence(),e.deprecatedBlock)),e.inheritDocTag&&(e.remarksBlock&&this._parserContext.log.addMessageForTokenSequence(v.InheritDocIncompatibleTag,'A "'.concat(e.remarksBlock.blockTag.tagName,'" block must not be used, beca
${n.stack}`:r}function Is(n,e){if(!(n instanceof e))throw new Error(`expectedinstanceof${e.name}`);return n.ptr}var Ar=32;function qs(n){if(Ar==1)throw new Error("out of js stack");return He[--Ar]=n,Ar}function xi(n,e){try{return n.apply(this,e)}catch(t){N.__wbindgen_exn_store(vt(t))}}var Lt=class{static __wrap(e){let t=Object.create(Lt.prototype);return t.ptr=e,t}__destroy_into_raw(){let e=this.ptr;return this.ptr=0,e}free(){let e=this.__destroy_into_raw();N.__wbg_parserconfig_free(e)}get interpolate(){let e=N.__wbg_get_parserconfig_interpolate(this.ptr);return String.fromCodePoint(e)}set interpolate(e){N.__wbg_set_parserconfig_interpolate(this.ptr,e.codePointAt(0))}get execution(){let e=N.__wbg_get_parserconfig_execution(this.ptr);return String.fromCodePoint(e)}set execution(e){N.__wbg_set_parserconfig_execution(this.ptr,e.codePointAt(0))}get single_whitespace(){let e=N.__wbg_get_parserconfig_single_whitespace(this.ptr);return String.fromCodePoint(e)}set single_whitespace(e){N.__wbg_set_parserconfig_single_whitespace(this.ptr,e.codePointAt(0))}get multiple_whitespace(){let e=N.__wbg_get_parserconfig_multiple_whitespace(this.ptr);return String.fromCodePoint(e)}set multiple_whitespace(e){N.__wbg_set_parserconfig_multiple_whitespace(this.ptr,e.codePointAt(0))}constructor(e,t,r,i,o,a,l){let c=dt(e,N.__wbindgen_malloc,N.__wbindgen_realloc),d=$e,m=dt(t,N.__wbindgen_malloc,N.__wbindgen_realloc),y=$e,b=dt(l,N.__wbindgen_malloc,N.__wbindgen_realloc),E=$e,P=N.parserconfig_new(c,d,m,y,r.codePointAt(0),i.codePointAt(0),o.codePointAt(0),a.codePointAt(0),b,E);return Lt.__wrap(P)}get opening_tag(){try{let r=N.__wbindgen_add_to_stack_pointer(-16);N.parserconfig_opening_tag(r,this.ptr);var e=Ce()[r/4+0],t=Ce()[r/4+1];return jt(e,t)}finally{N.__wbindgen_add_to_stack_pointer(16),N.__wbindgen_free(e,t)}}set opening_tag(e){let t=dt(e,N.__wbindgen_malloc,N.__wbindgen_realloc),r=$e;N.parserconfig_set_opening_tag(this.ptr,t,r)}get closing_tag(){try{let r=N.__wbindgen_add_to_stack_pointer(-16);N.parserconfig_closing_tag(r,this.ptr);var e=Ce()[r/4+0],t=Ce()[r/4+1];return jt(e,t)}finally{N.__wbindgen_add_to_stack_pointer(16),N.__wbindgen_free(e,t)}}set closing_tag(e){let t=dt(e,N.__wbindgen_malloc,N.__wbindgen_realloc),r=$e;N.parserconfig_set_closing_tag(this.ptr,t,r)}get global_var(){try{let r=N.__wbindgen_add_to_stack_pointer(-16);N.parserconfig_global_var(r,this.ptr);var e=Ce()[r/4+0],t=Ce()[r/4+1];return jt(e,t)}finally{N.__wbindgen_add_to_stack_pointer(16),N.__wbindgen_free(e,t)}}set global_var(e){let t=dt(e,N.__wbindgen_malloc,N.__wbindgen_realloc),r=$e;N.parserconfig_set_global_var(this.ptr,t,r)}},rn=class{static __wrap(e){let t=Object.create(rn.prototype);return t.ptr=e,t}__destroy_into_raw(){let e=this.ptr;return this.ptr=0,e}free(){let e=this.__destroy_into_raw();N.__wbg_renderer_free(e)}constructor(e){Is(e,Lt);var t=e.ptr;e.ptr=0;let r=N.renderer_new(t);return rn.__wrap(r)}render_content(e,t){try{let a=N.__wbindgen_add_to_stack_pointer(-16),l=dt(e,N.__wbindgen_malloc,N.__wbindgen_realloc),c=$e;N.renderer_render_content(a,this.ptr,l,c,qs(t));var r=Ce()[a/4+0],i=Ce()[a/4+1],o=Ce()[a/4+2];if(o)throw Ai(i);return Ai(r)}finally{N.__wbindgen_add_to_stack_pointer(16),He[Ar++]=void 0}}};async function Ls(n,e){if(typeof Response=="function"&&n instanceof Response){if(typeof WebAssembly.instantiateStreaming=="function")try{return await WebAssembly.instantiateStreaming(n,e)}catch(r){if(n.headers.get("Content-Type")!="application/wasm")console.warn("`WebAssembly.instantiateStreaming` failed because your server does not serve wasm with `application/wasm` MIME type. Falling back to `WebAssembly.instantiate` which is slower. Original error:\n",r);else throw r}let t=await n.arrayBuffer();return await WebAssembly.instantiate(t,e)}else{let t=await WebAssembly.instantiate(n,e);return t instanceof WebAssembly.Instance?{instance:t,module:n}:t}}function Hs(){let n={};return n.wbg={},n.wbg.__wbindgen_object_drop_ref=function(e){Ai(e)},n.wbg.__wbindgen_string_new=function(e,t){let r=jt(e,t);return vt(r)},n.wbg.__wbindgen_string_get=function(e,t){let r=Se
`,a+1))!==-1;i++,o=a);o+=1;let l=e.slice(o,t).length;return{line:i,ch:l}}replace_and_get_cursor_positions(e){let t=[],r,i=new RegExp("<%\\s*tp.file.cursor\\((?<order>[0-9]*)\\)\\s*%>","g");for(;(r=i.exec(e))!=null;)t.push(r);if(t.length===0)return{};t.sort((c,d)=>Number(c.groups&&c.groups.order)-Number(d.groups&&d.groups.order));let o=t[0][0];t=t.filter(c=>c[0]===o);let a=[],l=0;for(let c of t){let d=c.index-l;if(a.push(this.get_editor_position_from_index(e,d)),e=e.replace(new RegExp(eo(c[0])),""),l+=c[0].length,c[1]==="")break}return{new_content:e,positions:a}}set_cursor_location(e){let t=this.app.workspace.activeEditor;if(!t||!t.editor)return;let r=t.editor,i=[];for(let a of e)i.push({from:a});let o={selections:i};r.transaction(o)}};var Uo=ee(require("obsidian"));var Us={app:{name:"app",description:"This module exposes the app instance. Prefer to use this over the global app instance."},user:{name:"user",description:"This module exposes custom made scripts, written by yourself within the script file folder location"},config:{name:"config",description:`ThismoduleexposesTemplater'srunningconfiguration.
`,functions:{template_file:{name:"template_file",description:"The `TFile` object representing the template file.",definition:"tp.config.template_file"},target_file:{name:"target_file",description:"The `TFile` object representing the target file where the template will be inserted.",definition:"tp.config.target_file"},run_mode:{name:"run_mode",description:"The `RunMode`, representing the way Templater was launched (Create new from template, Append to active file, ...).",definition:"tp.config.run_mode"},active_file:{name:"active_file",description:"The active file (if existing) when launching Templater.",definition:"tp.config.active_file?"}}},date:{name:"date",description:"This module contains every internal function related to dates.",functions:{now:{name:"now",description:"Retrieves the date.",definition:'tp.date.now(format: string = "YYYY-MM-DD", offset?: number\u23AEstring, reference?: string, reference_format?: string)',args:[{name:"format",description:'The format for the date. Defaults to `"YYYY-MM-DD"`. Refer to [format reference](https://momentjs.com/docs/#/displaying/format/).'},{name:"offset",description:"Duration to offset the date from. If a number is provided, duration will be added to the date in days. You can also specify the offset as a string using the ISO 8601 format."},{name:"reference",description:"The date referential, e.g. set this to the note's title."},{name:"reference_format",description:"The format for the reference date. Refer to [format reference](https://momentjs.com/docs/#/displaying/format/)."}],examples:[{name:"Date now",example:"<% tp.date.now() %>"},{name:"Date now with format",example:'<% tp.date.now("Do MMMM YYYY") %>'},{name:"Last week",example:'<% tp.date.now("YYYY-MM-DD", -7) %>'},{name:"Next week",example:'<% tp.date.now("YYYY-MM-DD", 7) %>'},{name:"Last month",example:'<% tp.date.now("YYYY-MM-DD", "P-1M") %>'},{name:"Next year",example:'<% tp.date.now("YYYY-MM-DD", "P1Y") %>'},{name:"File's title date + 1 day (tomorrow)",example:'<% tp.date.now("YYYY-MM-DD", 1, tp.file.title, "YYYY-MM-DD") %>'},{name:"File's title date - 1 day (yesterday)",example:'<% tp.date.now("YYYY-MM-DD", -1, tp.file.title, "YYYY-MM-DD") %>'}]},tomorrow:{name:"tomorrow",description:"Retrieves tomorrow's date.",definition:'tp.date.tomorrow(format: string = "YYYY-MM-DD")',args:[{name:"format",description:'The format for the date. Defaults to `"YYYY-MM-DD"`. Refer to [format reference](https://momentjs.com/docs/#/displaying/format/).'}],examples:[{name:"Date tomorrow",example:"<% tp.date.tomorrow() %>"},{name:"Date tomorrow with format",example:'<% tp.date.tomorrow("Do MMMM YYYY") %>'}]},yesterday:{name:"yesterday",description:"Retrieves yesterday's date.",definition:'tp.date.yesterday(format: string = "YYYY-MM-DD")',args:[{name:"format",description:'The format for the date. Defaults to `"YYYY-MM-DD"`. Refer to [format reference](https://momentjs.com/docs/#/displaying/format/).'}],examples:[{name:"Date yesterday",example:"<% tp.date.yesterday() %>"},{name:"Date yesterday with format",example:'<% tp.date.yesterday("Do MMMM YYYY") %>'}]},weekday:{name:"weekday",description:"",definition:'tp.date.weekday(format: string = "YYYY-MM-DD", weekday: number, reference?: string, reference_format?: string)',args:[{name:"format",description:'The format for the date. Defaults to `"YYYY-MM-DD"`. Refer to [format reference](https://momentjs.com/docs/#/displaying/format/).'},{name:"weekday",description:"Week day number. If the locale assigns Monday as the first day of the week, `0` will be Monday, `-7` will be last week's day."},{name:"reference",description:"The date referential, e.g. set this to the note's title."},{name:"reference_format",description:"The format for the reference date. Refer to [format reference](https://momentjs.com/docs/#/displaying/format/)."}],examples:[{name:"This week's Monday",example:'<% tp.date.weekday("YYYY-MM-DD", 0) %>'},{name:"Next Monday",example:'<% tp.date.weekday("YYYY-MM-DD", 7) %>'},{name:"File's title Monday",example:'<% tp.date.weekday("YYYY-MM-DD", 0, tp.file.title, "YYYY-MM-DD") %>'},{nam
`}],examples:[{name:"File cursor",example:"<% tp.file.cursor() %>"},{name:"File multi-cursor",example:"<% tp.file.cursor(1) %>Content<% tp.file.cursor(1) %>"}]},cursor_append:{name:"cursor_append",description:"Appends some content after the active cursor in the file.",definition:"tp.file.cursor_append(content: string)",args:[{name:"content",description:"The content to append after the active cursor."}],examples:[{name:"File cursor append",example:'<% tp.file.cursor_append("Some text") %>'}]},exists:{name:"exists",description:"Check to see if a file exists by it's file path. The full path to the file, relative to the Vault and containing the extension, must be provided.",definition:"tp.file.exists(filepath: string)",args:[{name:"filepath",description:"The full file path of the file we want to check existence for."}],examples:[{name:"File existence",example:'<% await tp.file.exists("MyFolder/MyFile.md") %>'},{name:"File existence of current file",example:'<% await tp.file.exists(tp.file.folder(true) + "/" + tp.file.title + ".md") %>'}]},find_tfile:{name:"find_tfile",description:"Search for a file and returns its `TFile` instance.",definition:"tp.file.find_tfile(filename: string)",args:[{name:"filename",description:"The filename we want to search and resolve as a `TFile`."}],examples:[{name:"File find TFile",example:'<% tp.file.find_tfile("MyFile").basename %>'}]},folder:{name:"folder",description:"Retrieves the file's folder name.",definition:"tp.file.folder(absolute: boolean = false)",args:[{name:"absolute",description:"If set to `true`, returns the vault-absolute path of the folder. If `false`, only returns the basename of the folder (the last part). Defaults to `false`."}],examples:[{name:"File folder (Folder)",example:"<% tp.file.folder() %>"},{name:"File folder with vault-absolute path (Path/To/Folder)",example:"<% tp.file.folder(true) %>"}]},include:{name:"include",description:"Includes the file's link content. Templates in the included content will be resolved.",definition:"tp.file.include(include_link: string \u23AE TFile)",args:[{name:"include_link",description:'The link to the file to include, e.g. `"[[MyFile]]"`, or a TFile object. Also supports sections or blocks inclusions.'}],examples:[{name:"File include",example:'<% tp.file.include("[[Template1]]") %>'},{name:"File include TFile",example:'<% tp.file.include(tp.file.find_tfile("MyFile")) %>'},{name:"File include section",example:'<% tp.file.include("[[MyFile#Section1]]") %>'},{name:"File include block",example:'<% tp.file.include("[[MyFile#^block1]]") %>'}]},last_modified_date:{name:"last_modified_date",description:"Retrieves the file's last modification date.",definition:'tp.file.last_modified_date(format: string = "YYYY-MM-DD HH:mm")',args:[{name:"format",description:'The format for the date. Defaults to `"YYYY-MM-DD HH:mm"`. Refer to [format reference](https://momentjs.com/docs/#/displaying/format/).'}],examples:[{name:"File last modified date",example:"<% tp.file.last_modified_date() %>"},{name:"File last modified date with format",example:'<% tp.file.last_modified_date("dddd Do MMMM YYYY HH:mm") %>'}]},move:{name:"move",description:"Moves the file to the desired vault location.",definition:"tp.file.move(new_path: string, file_to_move?: TFile)",args:[{name:"new_path",description:'The new vault relative path of the file, without the file extension. Note: the new path needs to include the folder and the filename, e.g. `"/Notes/MyNote"`.'},{name:"file_to_move",description:"The file to move, defaults to the current file."}],examples:[{name:"File move",example:'<% await tp.file.move("/A/B/" + tp.file.title) %>'},{name:"File move and rename",example:'<% await tp.file.move("/A/B/NewTitle") %>'}]},path:{name:"path",description:"Retrieves the file's absolute path on the system.",definition:"tp.file.path(relative: boolean = false)",args:[{name:"relative",description:"If set to `true`, only retrieves the vault's relative path."}],examples:[{name:"File path",example:"<% tp.file.path() %>"},{name:"File relative path (relative to vault root)",example:"<% tp.file.path