`)}function J(i,e){let t=i.map(a=>a.level).reduce((a,d)=>Math.min(a,d)),n=i.filter(a=>a.level===t),s=e.delimiter?e.delimiter:"|";return n.map(a=>`${a.markdownHref}`).join(`${s.trim()}`)}var v=class extends C.MarkdownRenderChild{constructor(e,t,n,s){super(s);this.app=e;this.config=t;this.filePath=n;this.container=s;this.onSettingsChangeHandler=e=>{this.render(_(this.config,e))};this.onFileChangeHandler=e=>{e.deleted||e.path!==this.filePath||this.render()}}onload(){return r(this,null,function*(){yield this.render(),this.registerEvent(this.app.metadataCache.on("dynamic-toc:settings",this.onSettingsChangeHandler)),this.registerEvent(this.app.metadataCache.on("changed",this.onFileChangeHandler))})}render(e){return r(this,null,function*(){this.container.empty(),this.container.classList.add(u);let t=f(this.app.metadataCache.getCache(this.filePath),e||this.config);yield C.MarkdownRenderer.renderMarkdown(t,this.container,this.filePath,this)})}};var o=h(require("obsidian"));var O=class extends o.PluginSettingTab{constructor(e,t){super(e,t);this.plugin=t}display(){let{containerEl:e}=this;e.empty(),e.createEl("h2",{text:"Dynamic Table of Contents Settings"}),new o.Setting(e).setName("List Style").setDesc("The table indication").addDropdown(n=>n.addOptions({bullet:"Bullet",number:"Number",inline:"Inline"}).setValue(this.plugin.settings.style).onChange(s=>r(this,null,function*(){this.plugin.settings.style=s,yield this.plugin.saveSettings()}))),new o.Setting(e).setName("Enable varied style").setDesc("Varied style allows for the most top level heading to match your list style, then subsequent levels to be the opposite. For example if your list style is number, then your level 2 headings will be number, any levels lower then 2 will be bullet and vice versa.").addToggle(n=>n.setValue(this.plugin.settings.varied_style).onChange(s=>r(this,null,function*(){this.plugin.settings.varied_style=s,yield this.plugin.saveSettings()}))),new o.Setting(e).setName("Delimiter").setDesc("Only used when list style is inline. The delimiter between the list items").addText(n=>n.setPlaceholder("e.g. -, *, ~").setValue(this.plugin.settings.delimiter).onChange(s=>r(this,null,function*(){this.plugin.settings.delimiter=s,this.plugin.saveSettings()}))),new o.Setting(e).setName("Minimum Header Depth").setDesc("The default minimum header depth to render").addSlider(n=>n.setLimits(1,6,1).setValue(this.plugin.settings.min_depth).setDynamicTooltip().onChange(s=>r(this,null,function*(){s>this.plugin.settings.max_depth?new o.Notice("Min Depth is higher than Max Depth"):(this.plugin.settings.min_depth=s,yield this.plugin.saveSettings())}))),new o.Setting(e).setName("Maximum Header Depth").setDesc("The default maximum header depth to render").addSlider(n=>n.setLimits(1,6,1).setValue(this.plugin.settings.max_depth).setDynamicTooltip().onChange(s=>r(this,null,function*(){s<this.plugin.settings.min_depth?new o.Notice("Max Depth is higher than Min Depth"):(this.plugin.settings.max_depth=s,yield this.plugin.saveSettings())}))),new o.Setting(e).setName("Title").setDesc("The title of the table of contents, supports simple markdown such as ## Contents or **Contents**").addText(n=>n.setPlaceholder("## Table of Contents").setValue(this.plugin.settings.title).onChange(s=>r(this,null,function*(){this.plugin.settings.title=s,this.plugin.saveSettings()})));let t=new o.Setting(e).setName("External rendering support").setDesc("Different markdown viewers provided Table of Contents support such as [TOC] or [[_TOC_]]. You may need to restart Obsidian for this to take effect.").addDropdown(n=>n.addOptions(Object.keys(c).reduce((s,a)=>{let d=c[a];return T(y({},s),{[a]:d})},{})).setDisabled(this.plugin.settings.supportAllMatchers).setValue(this.plugin.settings.externalStyle).onChange(s=>r(this,null,function*(){this.plugin.settings.externalStyle=s,yield this.plugin.saveSettings()})));new o.Setting(e).setName("Support all external renderers").setDesc("Cannot be used in conjunction with individual renderers").addToggle(n=>n.setValue(this.plugin.settings.supportAllMatchers).onChange(s=>r(this,nu