`+j),Ie&&(j=Q(j,Lt," "),j=Q(j,It," "),j=Q(j,Ct," ")),re&<?re.createHTML(j):j},T.setConfig=function(E){Wt(E),Ot=!0},T.clearConfig=function(){Oe=null,Ot=!1},T.isValidAttribute=function(E,h,v){Oe||Wt({});var N=z(E),M=z(h);return Hi(N,M,v)},T.addHook=function(E,h){typeof h=="function"&&(ce[E]=ce[E]||[],P(ce[E],h))},T.removeHook=function(E){if(ce[E])return u(ce[E])},T.removeHooks=function(E){ce[E]&&(ce[E]=[])},T.removeAllHooks=function(){ce={}},T}var Vr=Ti();return Vr})});var hi=Ee((gs,_r)=>{_r.exports=window.DOMPurify||(window.DOMPurify=ui().default||ui())});var Dr=Ee((Ns,mi)=>{function Sr(e,i){if(i&&i.documentElement)e=i,i=arguments[2];else if(!e||!e.documentElement)throw new Error("First argument to Readability constructor should be a document object.");if(i=i||{},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=!!i.debug,this._maxElemsToParse=i.maxElemsToParse||this.DEFAULT_MAX_ELEMS_TO_PARSE,this._nbTopCandidates=i.nbTopCandidates||this.DEFAULT_N_TOP_CANDIDATES,this._charThreshold=i.charThreshold||this.DEFAULT_CHAR_THRESHOLD,this._classesToPreserve=this.CLASSES_TO_PRESERVE.concat(i.classesToPreserve||[]),this._keepClasses=!!i.keepClasses,this._serializer=i.serializer||function(t){return t.innerHTML},this._disableJSONLD=!!i.disableJSONLD,this._flags=this.FLAG_STRIP_UNLIKELYS|this.FLAG_WEIGHT_CLASSES|this.FLAG_CLEAN_CONDITIONALLY,this._debug){let t=function(r){if(r.nodeType==r.TEXT_NODE)return`${r.nodeName}("${r.textContent}")`;let s=Array.from(r.attributes||[],function(o){return`${o.name}="${o.value}"`}).join(" ");return`<${r.localName}${s}>`};this.log=function(){if(typeof dump!="undefined"){var r=Array.prototype.map.call(arguments,function(s){return s&&s.nodeName?t(s):s}).join(" ");dump("Reader: (Readability) "+r+`
`)}else if(typeof console!="undefined"){let s=Array.from(arguments,o=>o&&o.nodeType==this.ELEMENT_NODE?t(o):o);s.unshift("Reader: (Readability)"),console.log.apply(console,s)}}}else this.log=function(){}}Sr.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,i){if(this._docJSDOMParser&&e._isLiveNodeList)throw new Error("Do not pass live node lists to _removeNodes");for(var t=e.length-1;t>=0;t--){var r=e[t],s=r.parentNode;s&&(!i||i.call(this,r,t,e))&&s.removeChild(r)}},_replaceNodeTags:function(e,i){if(this._docJSDOMParser&&e._isLiveNodeList)throw new Error("Do not pass live node lists to _replaceNodeTags");for(let t of e)this._setNodeTag(t,i)},_forEachNode:function(e,i){Array.prototype.forEach.call(e,i,this)},_findNode:function(e,i){return Array.prototype.find.call(e,i,this)},_someNode:function(e,i){return Array.prototype.some.call(e,i,this)},_everyNode:function(e,i){return Array.prototype.every.call(e,i,this)},_concatNodeLists:function(){var e=Array.prototype.slice,i=e.call(arguments),t=i.map(function(r){return e.call(r)});return Array.prototype.concat.apply([],t)},_getAllNodesWithTag:function(e,i){return e.querySelectorAll?e.querySelectorAll(i.join(",")):[].concat.apply([],i.map(function(t){var
%videoPlayer%`,bilibiliEmbedWidth:"560",bilibiliEmbedHeight:"315",twitterNoteTitle:"Tweet from %tweetAuthorName% (%date%)",twitterNote:`[[ReadItLater]][[Tweet]]
%answerContent%`,downloadStackExchangeAssets:!0,downloadStackExchangeAssetsInDir:!1,youtubeApiKey:"",tikTokNoteTitle:"TikTok from %authorName% (%date%)",tikTokNote:`[[ReadItLater]][[TikTok]]
%videoPlayer%`,tikTokEmbedWidth:"325",tikTokEmbedHeight:"760",extendShareMenu:!0};var S=require("obsidian");var bt=class extends S.PluginSettingTab{constructor(t,r){super(t,r);this.plugin=r}display(){let{containerEl:t}=this;t.empty(),t.createEl("h2",{text:"General"}),new S.Setting(t).setName("Inbox dir").setDesc("Enter valid folder name. For nested folders use this format: Folder A/Folder B. If no folder is entered, new note will be created in vault root.").addText(n=>n.setPlaceholder("Defaults to root").setValue(this.plugin.settings.inboxDir||_.inboxDir).onChange(async c=>{this.plugin.settings.inboxDir=c,await this.plugin.saveSettings()})),new S.Setting(t).setName("Assets dir").setDesc("Enter valid folder name. For nested folders use this format: Folder A/Folder B. If no folder is entered, new note will be created in vault root.").addText(n=>n.setPlaceholder("Defaults to root").setValue(this.plugin.settings.assetsDir||_.inboxDir+"/assets").onChange(async c=>{this.plugin.settings.assetsDir=c,await this.plugin.saveSettings()})),new S.Setting(t).setName("Open new note").setDesc("If enabled, new note will open in current workspace").addToggle(n=>n.setValue(this.plugin.settings.openNewNote||_.openNewNote).onChange(async c=>{this.plugin.settings.openNewNote=c,await this.plugin.saveSettings()})),new S.Setting(t).setName("Date format string").setDesc("Format of the %date% variable. NOTE: do not use symbols forbidden in file names.").addText(n=>n.setPlaceholder("Defaults to YYYY-MM-DD HH-mm-ss").setValue(this.plugin.settings.dateTitleFmt||_.dateTitleFmt).onChange(async c=>{this.plugin.settings.dateTitleFmt=c,await this.plugin.saveSettings()})),new S.Setting(t).setName("Date format string in contents").setDesc("Format of the %date% variable for contents").addText(n=>n.setPlaceholder("Defaults to YYYY-MM-DD").setValue(this.plugin.settings.dateContentFmt||_.dateContentFmt).onChange(async c=>{this.plugin.settings.dateContentFmt=c,await this.plugin.saveSettings()})),new S.Setting(t).setName("Extend share menu").setDesc("If enabled, share menu will be extended with shortcut to create note directly from it. Requires plugin reload or Obsidian restart to apply change.").addToggle(n=>n.setValue(Object.prototype.hasOwnProperty.call(this.plugin.settings,"extendShareMenu")?this.plugin.settings.extendShareMenu:_.extendShareMenu).onChange(async c=>{this.plugin.settings.extendShareMenu=c,await this.plugin.saveSettings()})),t.createEl("h2",{text:"YouTube"}),new S.Setting(t).setName("Youtube note template title").setDesc("Available variables: %title%, %date%").addText(n=>n.setPlaceholder("Defaults to %title%").setValue(this.plugin.settings.youtubeNoteTitle||_.youtubeNoteTitle).onChange(async c=>{this.plugin.settings.youtubeNoteTitle=c,await this.plugin.saveSettings()})),new S.Setting(t).setName("Youtube note template").setDesc("Available variables: %date%, %videoTitle%, %videoURL%, %videoId%, %videoPlayer%, %channelId%, %channelName%, %channelURL%").addTextArea(n=>{n.setValue(this.plugin.settings.youtubeNote||_.youtubeNote).onChange(async c=>{this.plugin.settings.youtubeNote=c,await this.plugin.saveSettings()}),n.inputEl.rows=10,n.inputEl.cols=25}),new S.Setting(t).setName("Youtube Data API v3 key").setDesc("If entered, additional template variables are available").addText(n=>n.setPlaceholder("").setValue(this.plugin.settings.youtubeApiKey||_.youtubeApiKey).onChange(async c=>{this.plugin.settings.youtubeApiKey=c,await this.plugin.saveSettings()})),new S.Setting(t).setName("Youtube embed player width").addText(n=>n.setPlaceholder(_.youtubeEmbedWidth).setValue(this.plugin.settings.youtubeEmbedWidth||_.youtubeEmbedWidth).onChange(async c=>{this.plugin.settings.youtubeEmbedWidth=c,await this.plugin.saveSettings()})),new S.Setting(t).setName("Youtube embed player height").addText(n=>n.setPlaceholder(_.youtubeEmbedHeight).setValue(this.plugin.settings.youtubeEmbedHeight||_.youtubeEmbedHeight).onChange(async c=>{this.plugin.settings.youtubeEmbedHeight=c,await this.plugin.saveSettings()})),t.createEl("h2",{text:"Vimeo"}),new S.Setting(t).setName("Vimeo
`:t}};this.options=Mn({},i,e),this.rules=new pr(this.options)}Tt.prototype={turndown:function(e){if(!na(e))throw new TypeError(e+" is not a string, or an element/document/fragment node.");if(e==="")return"";var i=mr.call(this,new qn(e,this.options));return ia.call(this,i)},use:function(e){if(Array.isArray(e))for(var i=0;i<e.length;i++)this.use(e[i]);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,i){return this.rules.add(e,i),this},keep:function(e){return this.rules.keep(e),this},remove:function(e){return this.rules.remove(e),this},escape:function(e){return ta.reduce(function(i,t){return i.replace(t[0],t[1])},e)}};function mr(e){var i=this;return ea.call(e.childNodes,function(t,r){r=new Kn(r,i.options);var s="";return r.nodeType===3?s=r.isCode?r.nodeValue:i.escape(r.nodeValue):r.nodeType===1&&(s=ra.call(i,r)),fr(t,s)},"")}function ia(e){var i=this;return this.rules.forEach(function(t){typeof t.append=="function"&&(e=fr(e,t.append(i.options)))}),e.replace(/^[\t\r\n]+/,"").replace(/[\t\r\n\s]+$/,"")}function ra(e){var i=this.rules.forNode(e),t=mr.call(this,e),r=e.flankingWhitespace;return(r.leading||r.trailing)&&(t=t.trim()),r.leading+i.replacement(t,e,this.options)+r.trailing}function fr(e,i){var t=On(e),r=kn(i),s=Math.max(e.length-t.length,i.length-r.length),o=`