`+z),Le&&(z=Z(z,Et," "),z=Z(z,wt," "),z=Z(z,St," ")),re&&nt?re.createHTML(z):z},T.setConfig=function(_){Ft(_),xt=!0},T.clearConfig=function(){Me=null,xt=!1},T.isValidAttribute=function(_,h,v){Me||Ft({});var y=$(_),C=$(h);return Cr(y,C,v)},T.addHook=function(_,h){typeof h=="function"&&(le[_]=le[_]||[],I(le[_],h))},T.removeHook=function(_){if(le[_])return c(le[_])},T.removeHooks=function(_){le[_]&&(le[_]=[])},T.removeAllHooks=function(){le={}},T}var Ii=gr();return Ii})});var nr=Oe((Wa,pi)=>{pi.exports=window.DOMPurify||(window.DOMPurify=ir().default||ir())});var vi=Oe((Ka,or)=>{function di(e,t){if(t&&t.documentElement)e=t,t=arguments[2];else if(!e||!e.documentElement)throw new Error("First argument to Readability constructor should be a document object.");if(t=t||{},this._doc=e,this._docJSDOMParser=this._doc.firstChild.__JSDOMParser__,this._articleTitle=null,this._articleByline=null,this._articleDir=null,this._articleSiteName=null,this._attempts=[],this._debug=!!t.debug,this._maxElemsToParse=t.maxElemsToParse||this.DEFAULT_MAX_ELEMS_TO_PARSE,this._nbTopCandidates=t.nbTopCandidates||this.DEFAULT_N_TOP_CANDIDATES,this._charThreshold=t.charThreshold||this.DEFAULT_CHAR_THRESHOLD,this._classesToPreserve=this.CLASSES_TO_PRESERVE.concat(t.classesToPreserve||[]),this._keepClasses=!!t.keepClasses,this._serializer=t.serializer||function(r){return r.innerHTML},this._disableJSONLD=!!t.disableJSONLD,this._flags=this.FLAG_STRIP_UNLIKELYS|this.FLAG_WEIGHT_CLASSES|this.FLAG_CLEAN_CONDITIONALLY,this._debug){let r=function(i){if(i.nodeType==i.TEXT_NODE)return`${i.nodeName}("${i.textContent}")`;let l=Array.from(i.attributes||[],function(o){return`${o.name}="${o.value}"`}).join(" ");return`<${i.localName}${l}>`};this.log=function(){if(typeof dump!="undefined"){var i=Array.prototype.map.call(arguments,function(l){return l&&l.nodeName?r(l):l}).join(" ");dump("Reader: (Readability) "+i+`
`)}else if(typeof console!="undefined"){let l=Array.from(arguments,o=>o&&o.nodeType==this.ELEMENT_NODE?r(o):o);l.unshift("Reader: (Readability)"),console.log.apply(console,l)}}}else this.log=function(){}}di.prototype={FLAG_STRIP_UNLIKELYS:1,FLAG_WEIGHT_CLASSES:2,FLAG_CLEAN_CONDITIONALLY:4,ELEMENT_NODE:1,TEXT_NODE:3,DEFAULT_MAX_ELEMS_TO_PARSE:0,DEFAULT_N_TOP_CANDIDATES:5,DEFAULT_TAGS_TO_SCORE:"section,h2,h3,h4,h5,h6,p,td,pre".toUpperCase().split(","),DEFAULT_CHAR_THRESHOLD:500,REGEXPS:{unlikelyCandidates:/-ad-|ai2html|banner|breadcrumbs|combx|comment|community|cover-wrap|disqus|extra|footer|gdpr|header|legends|menu|related|remark|replies|rss|shoutbox|sidebar|skyscraper|social|sponsor|supplemental|ad-break|agegate|pagination|pager|popup|yom-remote/i,okMaybeItsACandidate:/and|article|body|column|content|main|shadow/i,positive:/article|body|content|entry|hentry|h-entry|main|page|pagination|post|text|blog|story/i,negative:/-ad-|hidden|^hid$| hid$| hid |^hid |banner|combx|comment|com-|contact|foot|footer|footnote|gdpr|masthead|media|meta|outbrain|promo|related|scroll|share|shoutbox|sidebar|skyscraper|sponsor|shopping|tags|tool|widget/i,extraneous:/print|archive|comment|discuss|e[\-]?mail|share|reply|all|login|sign|single|utility/i,byline:/byline|author|dateline|writtenby|p-author/i,replaceFonts:/<(\/?)font[^>]*>/gi,normalize:/\s{2,}/g,videos:/\/\/(www\.)?((dailymotion|youtube|youtube-nocookie|player\.vimeo|v\.qq)\.com|(archive|upload\.wikimedia)\.org|player\.twitch\.tv)/i,shareElements:/(\b|_)(share|sharedaddy)(\b|_)/i,nextLink:/(next|weiter|continue|>([^\|]|$)|»([^\|]|$))/i,prevLink:/(prev|earl|old|new|<|«)/i,tokenize:/\W+/g,whitespace:/^\s*$/,hasContent:/\S$/,hashUrl:/^#.+/,srcsetUrl:/(\S+)(\s+[\d.]+[xw])?(\s*(?:,|$))/g,b64DataUrl:/^data:\s*([^\s;,]+)\s*;\s*base64\s*,/i,jsonLdArticleTypes:/^Article|AdvertiserContentArticle|NewsArticle|AnalysisNewsArticle|AskPublicNewsArticle|BackgroundNewsArticle|OpinionNewsArticle|ReportageNewsArticle|ReviewNewsArticle|Report|SatiricalArticle|ScholarlyArticle|MedicalScholarlyArticle|SocialMediaPosting|BlogPosting|LiveBlogPosting|DiscussionForumPosting|TechArticle|APIReference$/},UNLIKELY_ROLES:["menu","menubar","complementary","navigation","alert","alertdialog","dialog"],DIV_TO_P_ELEMS:new Set(["BLOCKQUOTE","DL","DIV","IMG","OL","P","PRE","TABLE","UL"]),ALTER_TO_DIV_EXCEPTIONS:["DIV","ARTICLE","SECTION","P"],PRESENTATIONAL_ATTRIBUTES:["align","background","bgcolor","border","cellpadding","cellspacing","frame","hspace","rules","style","valign","vspace"],DEPRECATED_SIZE_ATTRIBUTE_ELEMS:["TABLE","TH","TD","HR","PRE"],PHRASING_ELEMS:["ABBR","AUDIO","B","BDO","BR","BUTTON","CITE","CODE","DATA","DATALIST","DFN","EM","EMBED","I","IMG","INPUT","KBD","LABEL","MARK","MATH","METER","NOSCRIPT","OBJECT","OUTPUT","PROGRESS","Q","RUBY","SAMP","SCRIPT","SELECT","SMALL","SPAN","STRONG","SUB","SUP","TEXTAREA","TIME","VAR","WBR"],CLASSES_TO_PRESERVE:["page"],HTML_ESCAPE_MAP:{lt:"<",gt:">",amp:"&",quot:'"',apos:"'"},_postProcessContent:function(e){this._fixRelativeUris(e),this._simplifyNestedElements(e),this._keepClasses||this._cleanClasses(e)},_removeNodes:function(e,t){if(this._docJSDOMParser&&e._isLiveNodeList)throw new Error("Do not pass live node lists to _removeNodes");for(var r=e.length-1;r>=0;r--){var i=e[r],l=i.parentNode;l&&(!t||t.call(this,i,r,e))&&l.removeChild(i)}},_replaceNodeTags:function(e,t){if(this._docJSDOMParser&&e._isLiveNodeList)throw new Error("Do not pass live node lists to _replaceNodeTags");for(let r of e)this._setNodeTag(r,t)},_forEachNode:function(e,t){Array.prototype.forEach.call(e,t,this)},_findNode:function(e,t){return Array.prototype.find.call(e,t,this)},_someNode:function(e,t){return Array.prototype.some.call(e,t,this)},_everyNode:function(e,t){return Array.prototype.every.call(e,t,this)},_concatNodeLists:function(){var e=Array.prototype.slice,t=e.call(arguments),r=t.map(function(i){return e.call(i)});return Array.prototype.concat.apply([],r)},_getAllNodesWithTag:function(e,t){return e.querySelectorAll?e.querySelectorAll(t.join(",")):[].concat.apply([],t.map(function(r){var
%answerContent%`,downloadStackExchangeAssets:!0,downloadStackExchangeAssetsInDir:!1};var L=require("obsidian");var gt=class extends L.PluginSettingTab{constructor(r,i){super(r,i);this.plugin=i}display(){let{containerEl:r}=this;r.empty(),r.createEl("h2",{text:"General"}),new L.Setting(r).setName("Inbox dir").setDesc("Enter valid folder name. For nested folders use this format: Folder A/Folder B. If no folder is enetred, new note will be created in vault root.").addText(a=>a.setPlaceholder("Defaults to root").setValue(this.plugin.settings.inboxDir||D.inboxDir).onChange(async u=>{this.plugin.settings.inboxDir=u,await this.plugin.saveSettings()})),new L.Setting(r).setName("Assets dir").setDesc("Enter valid folder name. For nested folders use this format: Folder A/Folder B. If no folder is enetred, new note will be created in vault root.").addText(a=>a.setPlaceholder("Defaults to root").setValue(this.plugin.settings.assetsDir||D.inboxDir+"/assets").onChange(async u=>{this.plugin.settings.assetsDir=u,await this.plugin.saveSettings()})),new L.Setting(r).setName("Open new note").setDesc("If enabled, new note will open in current workspace").addToggle(a=>a.setValue(this.plugin.settings.openNewNote||D.openNewNote).onChange(async u=>{this.plugin.settings.openNewNote=u,await this.plugin.saveSettings()})),new L.Setting(r).setName("Date format string").setDesc("Format of the %date% variable. NOTE: do not use symbols forbidden in file names.").addText(a=>a.setPlaceholder("Defaults to YYYY-MM-DD HH-mm-ss").setValue(this.plugin.settings.dateTitleFmt||D.dateTitleFmt).onChange(async u=>{this.plugin.settings.dateTitleFmt=u,await this.plugin.saveSettings()})),new L.Setting(r).setName("Date format string in contents").setDesc("Format of the %date% variable for contents").addText(a=>a.setPlaceholder("Defaults to YYYY-MM-DD").setValue(this.plugin.settings.dateContentFmt||D.dateContentFmt).onChange(async u=>{this.plugin.settings.dateContentFmt=u,await this.plugin.saveSettings()})),r.createEl("h2",{text:"YouTube"}),new L.Setting(r).setName("Youtube note template title").setDesc("Available variables: %title%, %date%").addText(a=>a.setPlaceholder("Defaults to %title%").setValue(this.plugin.settings.youtubeNoteTitle||D.youtubeNoteTitle).onChange(async u=>{this.plugin.settings.youtubeNoteTitle=u,await this.plugin.saveSettings()})),new L.Setting(r).setName("Youtube note template").setDesc("Available variables: %date%, %videoTitle%, %videoURL%, %videoId%, %videoPlayer%, %channelId%, %channelName%, %channelURL%").addTextArea(a=>{a.setValue(this.plugin.settings.youtubeNote||D.youtubeNote).onChange(async u=>{this.plugin.settings.youtubeNote=u,await this.plugin.saveSettings()}),a.inputEl.rows=10,a.inputEl.cols=25}),r.createEl("h2",{text:"Vimeo"}),new L.Setting(r).setName("Vimeo note title template").setDesc("Available variables: %title%, %date%").addText(a=>a.setPlaceholder("Defaults to %title%").setValue(this.plugin.settings.vimeoNoteTitle||D.vimeoNoteTitle).onChange(async u=>{this.plugin.settings.vimeoNoteTitle=u,await this.plugin.saveSettings()})),new L.Setting(r).setName("Vimeo note template").setDesc("Available variables: %date%, %videoTitle%, %videoURL%, %videoId%, %videoPlayer%, %channelName%, %channelURL%").addTextArea(a=>{a.setValue(this.plugin.settings.vimeoNote||D.vimeoNote).onChange(async u=>{this.plugin.settings.vimeoNote=u,await this.plugin.saveSettings()}),a.inputEl.rows=10,a.inputEl.cols=25}),r.createEl("h2",{text:"Bilibili"}),new L.Setting(r).setName("Bilibili note template title").setDesc("Available variables: %title%").addText(a=>a.setPlaceholder("Defaults to %title%").setValue(this.plugin.settings.bilibiliNoteTitle||D.bilibiliNoteTitle).onChange(async u=>{this.plugin.settings.bilibiliNoteTitle=u,await this.plugin.saveSettings()})),new L.Setting(r).setName("Bilibili note template").setDesc("Available variables: %videoTitle%, %videoURL%, %videoId%, %videoPlayer%").addTextArea(a=>{a.setValue(this.plugin.settings.bilibiliNote||D.bilibiliNote).onChange(async u=>{this.plugin.settings.bilibiliNote=u,await this.plugin.saveSettings()}),a.inputE
`:r}};this.options=mn({},t,e),this.rules=new ri(this.options)}mt.prototype={turndown:function(e){if(!Bn(e))throw new TypeError(e+" is not a string, or an element/document/fragment node.");if(e==="")return"";var t=ni.call(this,new Dn(e,this.options));return kn.call(this,t)},use:function(e){if(Array.isArray(e))for(var t=0;t<e.length;t++)this.use(e[t]);else if(typeof e=="function")e(this);else throw new TypeError("plugin must be a Function or an Array of Functions");return this},addRule:function(e,t){return this.rules.add(e,t),this},keep:function(e){return this.rules.keep(e),this},remove:function(e){return this.rules.remove(e),this},escape:function(e){return Fn.reduce(function(t,r){return t.replace(r[0],r[1])},e)}};function ni(e){var t=this;return On.call(e.childNodes,function(r,i){i=new In(i,t.options);var l="";return i.nodeType===3?l=i.isCode?i.nodeValue:t.escape(i.nodeValue):i.nodeType===1&&(l=Un.call(t,i)),ai(r,l)},"")}function kn(e){var t=this;return this.rules.forEach(function(r){typeof r.append=="function"&&(e=ai(e,r.append(t.options)))}),e.replace(/^[\t\r\n]+/,"").replace(/[\t\r\n\s]+$/,"")}function Un(e){var t=this.rules.forNode(e),r=ni.call(this,e),i=e.flankingWhitespace;return(i.leading||i.trailing)&&(r=r.trim()),i.leading+t.replacement(r,e,this.options)+i.trailing}function ai(e,t){var r=vn(e),i=dn(t),l=Math.max(e.length-r.length,t.length-i.length),o=`