varYi=Object.create;varor=Object.defineProperty;varHi=Object.getOwnPropertyDescriptor;varGi=Object.getOwnPropertyNames;varVi=Object.getPrototypeOf,Wi=Object.prototype.hasOwnProperty;varFn=r=>or(r,"__esModule",{value:!0});varKi=(r,e)=>{Fn(r);for(vartine)or(r,t,{get:e[t],enumerable:!0})},Ui=(r,e,t)=>{if(e&&typeofe=="object"||typeofe=="function")for(letnofGi(e))!Wi.call(r,n)&&n!=="default"&&or(r,n,{get:()=>e[n],enumerable:!(t=Hi(e,n))||t.enumerable});returnr},V=r=>Ui(Fn(or(r!=null?Yi(Vi(r)):{},"default",r&&r.__esModule&&"default"inr?{get:()=>r.default,enumerable:!0}:{value:r,enumerable:!0})),r);varMn=(()=>{for(varr=newUint8Array(128),e=0;e<64;e++)r[e<26?e+65:e<52?e+71:e<62?e-4:e*4-205]=e;returnt=>{for(varn=t.length,o=newUint8Array((n-(t[n-1]=="=")-(t[n-2]=="="))*3/4|0),s=0,a=0;s<n;){varA=r[t.charCodeAt(s++)],c=r[t.charCodeAt(s++)],d=r[t.charCodeAt(s++)],f=r[t.charCodeAt(s++)];o[a++]=A<<2|c>>4,o[a++]=c<<4|d>>2,o[a++]=d<<6|f}returno}})();Ki(exports,{default:()=>hn});varvr=V(require("obsidian"));varM=V(require("obsidian"));varPn=V(require("obsidian"));functionK(r){lete=newPn.Notice("",8e3);rinstanceofw&&r.console_msg?(e.noticeEl.innerHTML=`<b>Templater Error</b>:<br/>${r.message}<br/>Check console for more information`,console.error("Templater Error:",r.message,`
`,r.console_msg)):e.noticeEl.innerHTML=`<b>TemplaterError</b>:<br/>${r.message}`}var w=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 ye(r,e){try{return await r()}catch(t){return t instanceof w?K(t):K(new w(e,t.message)),null}}function ce(r,e){try{return r()}catch(t){return K(new w(e,t.message)),null}}var Ce=V(require("obsidian"));function sr(r){return new Promise(e=>setTimeout(e,r))}function Bn(r){return r.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function qn(){return/(<%(?:-|_)?\s*[*~]{0,1})\+((?:.|\s)*?%>)/g}function zi(r,e){e=(0,Ce.normalizePath)(e);let t=r.vault.getAbstractFileByPath(e);if(!t)throw new w(`Folder"${e}"doesn't exist`);if(!(t instanceof Ce.TFolder))throw new w(`${e} is a file, not a folder`);return t}function lt(r,e){e=(0,Ce.normalizePath)(e);let t=r.vault.getAbstractFileByPath(e);if(!t)throw new w(`File "${e}" doesn'texist`);if(!(t instanceof Ce.TFile))throw new w(`${e}isafolder,notafile`);return t}function Ie(r,e){let t=zi(r,e),n=[];return Ce.Vault.recurseChildren(t,o=>{o instanceof Ce.TFile&&n.push(o)}),n.sort((o,s)=>o.path.localeCompare(s.path)),n}function pt(r,e,t){if(t<0||t===r.length)return;let n=r[e];r[e]=r[t],r[t]=n}function xt(r){return r.workspace.activeEditor?.file??r.workspace.getActiveFile()}function On(r){let e=r.lastIndexOf("/");return e!==-1?r.slice(0,e):""}function kr(r){return r!==null&&typeof r=="object"}function Cn(r){let e=r.toString(),t=e.indexOf("(");return e.substring(t+1,e.indexOf(")")).replace(/ /g,"").split(",")}var ii=V(require("obsidian"));var ri=V(require("obsidian"));var W="top",ee="bottom",Q="right",U="left",ar="auto",et=[W,ee,Q,U],We="start",ct="end",In="clippingParents",lr="viewport",Et="popper",Sn="reference",Tr=et.reduce(function(r,e){return r.concat([e+"-"+We,e+"-"+ct])},[]),pr=[].concat(et,[ar]).reduce(function(r,e){return r.concat([e,e+"-"+We,e+"-"+ct])},[]),Ji="beforeRead",Xi="read",Qi="afterRead",Zi="beforeMain",eo="main",to="afterMain",ro="beforeWrite",no="write",io="afterWrite",Dn=[Ji,Xi,Qi,Zi,eo,to,ro,no,io];function re(r){return r?(r.nodeName||"").toLowerCase():null}function L(r){if(r==null)return window;if(r.toString()!=="[object Window]"){var e=r.ownerDocument;return e&&e.defaultView||window}return r}function he(r){var e=L(r).Element;return r instanceof e||r instanceof Element}function te(r){var e=L(r).HTMLElement;return r instanceof e||r instanceof HTMLElement}function kt(r){if(typeof ShadowRoot=="undefined")return!1;var e=L(r).ShadowRoot;return r instanceof e||r instanceof ShadowRoot}function oo(r){var e=r.state;Object.keys(e.elements).forEach(function(t){var n=e.styles[t]||{},o=e.attributes[t]||{},s=e.elements[t];!te(s)||!re(s)||(Object.assign(s.style,n),Object.keys(o).forEach(function(a){var A=o[a];A===!1?s.removeAttribute(a):s.setAttribute(a,A===!0?"":A)}))})}function so(r){var e=r.state,t={popper:{position:e.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(e.elements.popper.style,t.popper),e.styles=t,e.elements.arrow&&Object.assign(e.elements.arrow.style,t.arrow),function(){Object.keys(e.elements).forEach(function(n){var o=e.elements[n],s=e.attributes[n]||{},a=Object.keys(e.styles.hasOwnProperty(n)?e.styles[n]:t[n]),A=a.reduce(function(c,d){return c[d]="",c},{});!te(o)||!re(o)||(Object.assign(o.style,A),Object.keys(s).forEach(function(c){o.removeAttribute(c)}))})}}var $n={name:"applyStyles",enabled:!0,phase:"write",fn:oo,effect:so,requires:["computeStyles"]};function ne(r){return r.split("-")[0]}var xe=Math.max,At=Math.min,Ke=Math.round;function Tt(){var r=navigator.userAgentData;return r!=null&&r.brands&&Array.isArray(r.brands)?r.brands.map(function(e){return e.brand+"/"+e.version}).join(" "):navigator.userAgent}function Dt(){return!/^((?!chrome|android).)*safari/i.test(Tt())}function je(r,e,t){e===void 0&&(e=!1),t===void 0&&(t=!1);var n=r.getBoundingClientRect(),o=1,s=1;e&&te(r)&&(o=r.offsetWidth>0&&Ke(n.width)/r.offsetWidth||1,s=r.offsetHeight>
>\u2014${s}`}catch{return new w("Error generating daily quote"),"Error generating daily quote"}}}generate_random_picture(){return async(e,t,n=!1)=>{try{let o=await this.getRequest(`https://templater-unsplash-2.fly.dev/${t?"?q="+t:""}`).then(a=>a.json),s=o.full;if(e&&!n)if(e.includes("x")){let[a,A]=e.split("x");s=s.concat(`&w=${a}&h=${A}`)}else s=s.concat(`&w=${e}`);return n?`![photo by ${o.photog}(${o.photogUrl}) on Unsplash|${e}](${s})`:`![photo by ${o.photog}(${o.photogUrl}) on Unsplash](${s})`}catch{return new w("Error generating random picture"),"Error generating random picture"}}}generate_request(){return async(e,t)=>{try{let o=await(await this.getRequest(e)).json;return t&&o?t.split(".").reduce((s,a)=>{if(s&&s.hasOwnProperty(a))return s[a];throw new Error(`Path ${t} not found in the JSON response`)},o):o}catch(n){throw console.error(n),new w("Error fetching and extracting value")}}}};var Wr=class extends ue{constructor(){super(...arguments);this.name="hooks";this.event_refs=[]}async create_static_templates(){this.static_functions.set("on_all_templates_executed",this.generate_on_all_templates_executed())}async create_dynamic_templates(){}async teardown(){this.event_refs.forEach(e=>{e.e.offref(e)}),this.event_refs=[]}generate_on_all_templates_executed(){return e=>{let t=this.plugin.app.workspace.on("templater:all-templates-executed",async()=>{await sr(1),e()});t&&this.event_refs.push(t)}}};var Kr=class extends ue{constructor(){super(...arguments);this.name="frontmatter"}async create_static_templates(){}async create_dynamic_templates(){let e=this.plugin.app.metadataCache.getFileCache(this.config.target_file);this.dynamic_functions=new Map(Object.entries(e?.frontmatter||{}))}async teardown(){}};var Se=V(require("obsidian"));var Ur=class extends Se.Modal{constructor(e,t,n,o){super(e);this.prompt_text=t;this.default_value=n;this.multi_line=o;this.submitted=!1}onOpen(){this.titleEl.setText(this.prompt_text),this.createForm()}onClose(){this.contentEl.empty(),this.submitted||this.reject(new w("Cancelled prompt"))}createForm(){let e=this.contentEl.createDiv();e.addClass("templater-prompt-div");let t;if(this.multi_line){t=new Se.TextAreaComponent(e);let n=this.contentEl.createDiv();n.addClass("templater-button-div");let o=new Se.ButtonComponent(n);o.buttonEl.addClass("mod-cta"),o.setButtonText("Submit").onClick(s=>{this.resolveAndClose(s)})}else t=new Se.TextComponent(e);this.value=this.default_value??"",t.inputEl.addClass("templater-prompt-input"),t.setPlaceholder("Type text here"),t.setValue(this.value),t.onChange(n=>this.value=n),t.inputEl.focus(),t.inputEl.addEventListener("keydown",n=>this.enterCallback(n))}enterCallback(e){e.isComposing||e.keyCode===229||(this.multi_line?Se.Platform.isDesktop&&e.key==="Enter"&&!e.shiftKey&&this.resolveAndClose(e):e.key==="Enter"&&this.resolveAndClose(e))}resolveAndClose(e){this.submitted=!0,e.preventDefault(),this.resolve(this.value),this.close()}async openAndGetValue(e,t){this.resolve=e,this.reject=t,this.open()}};var Ai=V(require("obsidian")),zr=class extends Ai.FuzzySuggestModal{constructor(e,t,n,o,s){super(e);this.text_items=t;this.items=n;this.submitted=!1;this.setPlaceholder(o),s&&(this.limit=s)}getItems(){return this.items}onClose(){this.submitted||this.reject(new w("Cancelled prompt"))}selectSuggestion(e,t){this.submitted=!0,this.close(),this.onChooseSuggestion(e,t)}getItemText(e){return this.text_items instanceof Function?this.text_items(e):this.text_items[this.items.indexOf(e)]||"Undefined Text Item"}onChooseItem(e){this.resolve(e)}async openAndGetValue(e,t){this.resolve=e,this.reject=t,this.open()}};var Jr=class extends ue{constructor(){super(...arguments);this.name="system"}async create_static_templates(){this.static_functions.set("clipboard",this.generate_clipboard()),this.static_functions.set("prompt",this.generate_prompt()),this.static_functions.set("suggester",this.generate_suggester())}async create_dynamic_templates(){}async teardown(){}generate_clipboard(){return async()=>await navigator.clipboard.readText()}generate_prompt(){return async(e,t,n=!1,o=!1)=>{let s=new
${r.stack}`:n}function Io(r,e){if(!(r instanceof e))throw new Error(`expectedinstanceof${e.name}`);return r.ptr}var jr=32;function So(r){if(jr==1)throw new Error("out of js stack");return Fe[--jr]=r,jr}function sn(r,e){try{return r.apply(this,e)}catch(t){v.__wbindgen_exn_store(nt(t))}}var jt=class{static __wrap(e){let t=Object.create(jt.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();v.__wbg_parserconfig_free(e)}get interpolate(){let e=v.__wbg_get_parserconfig_interpolate(this.ptr);return String.fromCodePoint(e)}set interpolate(e){v.__wbg_set_parserconfig_interpolate(this.ptr,e.codePointAt(0))}get execution(){let e=v.__wbg_get_parserconfig_execution(this.ptr);return String.fromCodePoint(e)}set execution(e){v.__wbg_set_parserconfig_execution(this.ptr,e.codePointAt(0))}get single_whitespace(){let e=v.__wbg_get_parserconfig_single_whitespace(this.ptr);return String.fromCodePoint(e)}set single_whitespace(e){v.__wbg_set_parserconfig_single_whitespace(this.ptr,e.codePointAt(0))}get multiple_whitespace(){let e=v.__wbg_get_parserconfig_multiple_whitespace(this.ptr);return String.fromCodePoint(e)}set multiple_whitespace(e){v.__wbg_set_parserconfig_multiple_whitespace(this.ptr,e.codePointAt(0))}constructor(e,t,n,o,s,a,A){let c=Je(e,v.__wbindgen_malloc,v.__wbindgen_realloc),d=Me,f=Je(t,v.__wbindgen_malloc,v.__wbindgen_realloc),b=Me,k=Je(A,v.__wbindgen_malloc,v.__wbindgen_realloc),x=Me,O=v.parserconfig_new(c,d,f,b,n.codePointAt(0),o.codePointAt(0),s.codePointAt(0),a.codePointAt(0),k,x);return jt.__wrap(O)}get opening_tag(){try{let n=v.__wbindgen_add_to_stack_pointer(-16);v.parserconfig_opening_tag(n,this.ptr);var e=ge()[n/4+0],t=ge()[n/4+1];return rt(e,t)}finally{v.__wbindgen_add_to_stack_pointer(16),v.__wbindgen_free(e,t)}}set opening_tag(e){let t=Je(e,v.__wbindgen_malloc,v.__wbindgen_realloc),n=Me;v.parserconfig_set_opening_tag(this.ptr,t,n)}get closing_tag(){try{let n=v.__wbindgen_add_to_stack_pointer(-16);v.parserconfig_closing_tag(n,this.ptr);var e=ge()[n/4+0],t=ge()[n/4+1];return rt(e,t)}finally{v.__wbindgen_add_to_stack_pointer(16),v.__wbindgen_free(e,t)}}set closing_tag(e){let t=Je(e,v.__wbindgen_malloc,v.__wbindgen_realloc),n=Me;v.parserconfig_set_closing_tag(this.ptr,t,n)}get global_var(){try{let n=v.__wbindgen_add_to_stack_pointer(-16);v.parserconfig_global_var(n,this.ptr);var e=ge()[n/4+0],t=ge()[n/4+1];return rt(e,t)}finally{v.__wbindgen_add_to_stack_pointer(16),v.__wbindgen_free(e,t)}}set global_var(e){let t=Je(e,v.__wbindgen_malloc,v.__wbindgen_realloc),n=Me;v.parserconfig_set_global_var(this.ptr,t,n)}},qt=class{static __wrap(e){let t=Object.create(qt.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();v.__wbg_renderer_free(e)}constructor(e){Io(e,jt);var t=e.ptr;e.ptr=0;let n=v.renderer_new(t);return qt.__wrap(n)}render_content(e,t){try{let a=v.__wbindgen_add_to_stack_pointer(-16),A=Je(e,v.__wbindgen_malloc,v.__wbindgen_realloc),c=Me;v.renderer_render_content(a,this.ptr,A,c,So(t));var n=ge()[a/4+0],o=ge()[a/4+1],s=ge()[a/4+2];if(s)throw nn(o);return nn(n)}finally{v.__wbindgen_add_to_stack_pointer(16),Fe[jr++]=void 0}}};async function Do(r,e){if(typeof Response=="function"&&r instanceof Response){if(typeof WebAssembly.instantiateStreaming=="function")try{return await WebAssembly.instantiateStreaming(r,e)}catch(n){if(r.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",n);else throw n}let t=await r.arrayBuffer();return await WebAssembly.instantiate(t,e)}else{let t=await WebAssembly.instantiate(r,e);return t instanceof WebAssembly.Instance?{instance:t,module:r}:t}}function $o(){let r={};return r.wbg={},r.wbg.__wbindgen_object_drop_ref=function(e){nn(e)},r.wbg.__wbindgen_string_new=function(e,t){let n=rt(e,t);return nt(n)},r.wbg.__wbindgen_string_get=function(e,t){let n=de
`,a+1))!==-1;o++,s=a);s+=1;let A=e.slice(s,t).length;return{line:o,ch:A}}replace_and_get_cursor_positions(e){let t=[],n,o=new RegExp("<%\\s*tp.file.cursor\\((?<order>[0-9]*)\\)\\s*%>","g");for(;(n=o.exec(e))!=null;)t.push(n);if(t.length===0)return{};t.sort((c,d)=>Number(c.groups&&c.groups.order)-Number(d.groups&&d.groups.order));let s=t[0][0];t=t.filter(c=>c[0]===s);let a=[],A=0;for(let c of t){let d=c.index-A;if(a.push(this.get_editor_position_from_index(e,d)),e=e.replace(new RegExp(Bn(c[0])),""),A+=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 n=t.editor,o=[];for(let a of e)o.push({from:a});let s={selections:o};n.transaction(s)}};var wi=V(require("obsidian"));var Ho={app:{name:"app",description:"This module exposes the app instance. Prefer to use this over the global app instance."},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