/*! * Docsify Plugin: search v5.0.0-rc.3 * https://docsify.js.org * (c) 2017-2025 * MIT license */ !function(){"use strict";function e(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var t={async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null};function n(e){t=e}var r={exec:()=>null};function i(e,t=""){let n="string"==typeof e?e:e.source,r={replace:(e,t)=>{let i="string"==typeof t?t:t.source;return i=i.replace(o.caret,"$1"),n=n.replace(e,i),r},getRegex:()=>new RegExp(n,t)};return r}var o={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceTabs:/^\t+/,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] /,listReplaceTask:/^\[[ xX]\] +/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,unescapeTest:/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/gi,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:e=>new RegExp(`^( {0,3}${e})((?:[\t ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ \t][^\\n]*)?(?:\\n|$))`),hrRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}#`),htmlBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}<(?:[a-z].*>|!--)`,"i")},a=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,s=/(?:[*+-]|\d{1,9}[.)])/,u=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,l=i(u).replace(/bull/g,s).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),c=i(u).replace(/bull/g,s).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),h=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,f=/(?!\s*\])(?:\\.|[^\[\]\\])+/,p=i(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",f).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),d=i(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,s).getRegex(),y="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",g=/|$))/,m=i("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|\\n*|$)|\\n*|$)|)[\\s\\S]*?(?:(?:\\n[ \t]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ \t]*)+\\n|$)|(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ \t]*)+\\n|$))","i").replace("comment",g).replace("tag",y).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),b=i(h).replace("hr",a).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",y).getRegex(),v={blockquote:i(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",b).getRegex(),code:/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,def:p,fences:/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,heading:/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,hr:a,html:m,lheading:l,list:d,newline:/^(?:[ \t]*(?:\n|$))+/,paragraph:b,table:r,text:/^[^\n]+/},k=i("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",a).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3}\t)[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",y).getRegex(),w={...v,lheading:c,table:k,paragraph:i(h).replace("hr",a).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",k).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",y).getRegex()},x={...v,html:i("^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+? *(?:\\n{2,}|\\s*$)|\\s]*)*?/?> *(?:\\n{2,}|\\s*$))").replace("comment",g).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:r,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:i(h).replace("hr",a).replace("heading"," *#{1,6} *[^\n]").replace("lheading",l).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},_=/^( {2,}|\\)\n(?!\s*$)/,S=/[\p{P}\p{S}]/u,P=/[\s\p{P}\p{S}]/u,A=/[^\s\p{P}\p{S}]/u,E=i(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,P).getRegex(),O=/(?!~)[\p{P}\p{S}]/u,R=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,T=i(R,"u").replace(/punct/g,S).getRegex(),K=i(R,"u").replace(/punct/g,O).getRegex(),C="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",I=i(C,"gu").replace(/notPunctSpace/g,A).replace(/punctSpace/g,P).replace(/punct/g,S).getRegex(),D=i(C,"gu").replace(/notPunctSpace/g,/(?:[^\s\p{P}\p{S}]|~)/u).replace(/punctSpace/g,/(?!~)[\s\p{P}\p{S}]/u).replace(/punct/g,O).getRegex(),q=i("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,A).replace(/punctSpace/g,P).replace(/punct/g,S).getRegex(),$=i(/\\(punct)/,"gu").replace(/punct/g,S).getRegex(),j=i(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),B=i(g).replace("(?:--\x3e|$)","--\x3e").getRegex(),z=i("^comment|^|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^|^").replace("comment",B).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),N=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,M=i(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",N).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),F=i(/^!?\[(label)\]\[(ref)\]/).replace("label",N).replace("ref",f).getRegex(),L=i(/^!?\[(ref)\](?:\[\])?/).replace("ref",f).getRegex(),U={_backpedal:r,anyPunctuation:$,autolink:j,blockSkip:/\[[^[\]]*?\]\((?:\\.|[^\\\(\)]|\((?:\\.|[^\\\(\)])*\))*\)|`[^`]*?`|<[^<>]*?>/g,br:_,code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,del:r,emStrongLDelim:T,emStrongRDelimAst:I,emStrongRDelimUnd:q,escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,link:M,nolink:L,punctuation:E,reflink:F,reflinkSearch:i("reflink|nolink(?!\\()","g").replace("reflink",F).replace("nolink",L).getRegex(),tag:z,text:/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\":">",'"':""","'":"'"},X=e=>G[e];function W(e,t){if(t){if(o.escapeTest.test(e))return e.replace(o.escapeReplace,X)}else if(o.escapeTestNoEncode.test(e))return e.replace(o.escapeReplaceNoEncode,X);return e}function J(e){try{e=encodeURI(e).replace(o.percentDecode,"%")}catch{return null}return e}function ee(e,t){let n=e.replace(o.findPipe,((e,t,n)=>{let r=!1,i=t;for(;--i>=0&&"\\"===n[i];)r=!r;return r?"|":" |"})).split(o.splitPipe),r=0;if(n[0].trim()||n.shift(),n.length>0&&!n.at(-1)?.trim()&&n.pop(),t)if(n.length>t)n.splice(t);else for(;n.length0)return{type:"space",raw:t[0]}}code(e){let t=this.rules.block.code.exec(e);if(t){let e=t[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:t[0],codeBlockStyle:"indented",text:this.options.pedantic?e:te(e,"\n")}}}fences(e){let t=this.rules.block.fences.exec(e);if(t){let e=t[0],n=function(e,t,n){let r=e.match(n.other.indentCodeCompensation);if(null===r)return t;let i=r[1];return t.split("\n").map((e=>{let t=e.match(n.other.beginningSpace);if(null===t)return e;let[r]=t;return r.length>=i.length?e.slice(i.length):e})).join("\n")}(e,t[3]||"",this.rules);return{type:"code",raw:e,lang:t[2]?t[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):t[2],text:n}}}heading(e){let t=this.rules.block.heading.exec(e);if(t){let e=t[2].trim();if(this.rules.other.endingHash.test(e)){let t=te(e,"#");(this.options.pedantic||!t||this.rules.other.endingSpaceChar.test(t))&&(e=t.trim())}return{type:"heading",raw:t[0],depth:t[1].length,text:e,tokens:this.lexer.inline(e)}}}hr(e){let t=this.rules.block.hr.exec(e);if(t)return{type:"hr",raw:te(t[0],"\n")}}blockquote(e){let t=this.rules.block.blockquote.exec(e);if(t){let e=te(t[0],"\n").split("\n"),n="",r="",i=[];for(;e.length>0;){let t,o=!1,a=[];for(t=0;t1,i={type:"list",raw:"",ordered:r,start:r?+n.slice(0,-1):"",loose:!1,items:[]};n=r?`\\d{1,9}\\${n.slice(-1)}`:`\\${n}`,this.options.pedantic&&(n=r?n:"[*+-]");let o=this.rules.other.listItemRegex(n),a=!1;for(;e;){let n=!1,r="",s="";if(!(t=o.exec(e))||this.rules.block.hr.test(e))break;r=t[0],e=e.substring(r.length);let u=t[2].split("\n",1)[0].replace(this.rules.other.listReplaceTabs,(e=>" ".repeat(3*e.length))),l=e.split("\n",1)[0],c=!u.trim(),h=0;if(this.options.pedantic?(h=2,s=u.trimStart()):c?h=t[1].length+1:(h=t[2].search(this.rules.other.nonSpaceChar),h=h>4?1:h,s=u.slice(h),h+=t[1].length),c&&this.rules.other.blankLine.test(l)&&(r+=l+"\n",e=e.substring(l.length+1),n=!0),!n){let t=this.rules.other.nextBulletRegex(h),n=this.rules.other.hrRegex(h),i=this.rules.other.fencesBeginRegex(h),o=this.rules.other.headingBeginRegex(h),a=this.rules.other.htmlBeginRegex(h);for(;e;){let f,p=e.split("\n",1)[0];if(l=p,this.options.pedantic?(l=l.replace(this.rules.other.listReplaceNesting," "),f=l):f=l.replace(this.rules.other.tabCharGlobal," "),i.test(l)||o.test(l)||a.test(l)||t.test(l)||n.test(l))break;if(f.search(this.rules.other.nonSpaceChar)>=h||!l.trim())s+="\n"+f.slice(h);else{if(c||u.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||i.test(u)||o.test(u)||n.test(u))break;s+="\n"+l}!c&&!l.trim()&&(c=!0),r+=p+"\n",e=e.substring(p.length+1),u=f.slice(h)}}i.loose||(a?i.loose=!0:this.rules.other.doubleBlankLine.test(r)&&(a=!0));let f,p=null;this.options.gfm&&(p=this.rules.other.listIsTask.exec(s),p&&(f="[ ] "!==p[0],s=s.replace(this.rules.other.listReplaceTask,""))),i.items.push({type:"list_item",raw:r,task:!!p,checked:f,loose:!1,text:s,tokens:[]}),i.raw+=r}let s=i.items.at(-1);if(!s)return;s.raw=s.raw.trimEnd(),s.text=s.text.trimEnd(),i.raw=i.raw.trimEnd();for(let e=0;e"space"===e.type)),n=t.length>0&&t.some((e=>this.rules.other.anyLine.test(e.raw)));i.loose=n}if(i.loose)for(let e=0;e({text:e,tokens:this.lexer.inline(e),header:!1,align:o.align[t]}))));return o}}lheading(e){let t=this.rules.block.lheading.exec(e);if(t)return{type:"heading",raw:t[0],depth:"="===t[2].charAt(0)?1:2,text:t[1],tokens:this.lexer.inline(t[1])}}paragraph(e){let t=this.rules.block.paragraph.exec(e);if(t){let e="\n"===t[1].charAt(t[1].length-1)?t[1].slice(0,-1):t[1];return{type:"paragraph",raw:t[0],text:e,tokens:this.lexer.inline(e)}}}text(e){let t=this.rules.block.text.exec(e);if(t)return{type:"text",raw:t[0],text:t[0],tokens:this.lexer.inline(t[0])}}escape(e){let t=this.rules.inline.escape.exec(e);if(t)return{type:"escape",raw:t[0],text:t[1]}}tag(e){let t=this.rules.inline.tag.exec(e);if(t)return!this.lexer.state.inLink&&this.rules.other.startATag.test(t[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(t[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(t[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(t[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:t[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:t[0]}}link(e){let t=this.rules.inline.link.exec(e);if(t){let e=t[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(e)){if(!this.rules.other.endAngleBracket.test(e))return;let t=te(e.slice(0,-1),"\\");if((e.length-t.length)%2==0)return}else{let e=function(e,t){if(-1===e.indexOf(t[1]))return-1;let n=0;for(let r=0;r0?-2:-1}(t[2],"()");if(-2===e)return;if(e>-1){let n=(0===t[0].indexOf("!")?5:4)+t[1].length+e;t[2]=t[2].substring(0,e),t[0]=t[0].substring(0,n).trim(),t[3]=""}}let n=t[2],r="";if(this.options.pedantic){let e=this.rules.other.pedanticHrefTitle.exec(n);e&&(n=e[1],r=e[3])}else r=t[3]?t[3].slice(1,-1):"";return n=n.trim(),this.rules.other.startAngleBracket.test(n)&&(n=this.options.pedantic&&!this.rules.other.endAngleBracket.test(e)?n.slice(1):n.slice(1,-1)),ne(t,{href:n&&n.replace(this.rules.inline.anyPunctuation,"$1"),title:r&&r.replace(this.rules.inline.anyPunctuation,"$1")},t[0],this.lexer,this.rules)}}reflink(e,t){let n;if((n=this.rules.inline.reflink.exec(e))||(n=this.rules.inline.nolink.exec(e))){let e=t[(n[2]||n[1]).replace(this.rules.other.multipleSpaceGlobal," ").toLowerCase()];if(!e){let e=n[0].charAt(0);return{type:"text",raw:e,text:e}}return ne(n,e,n[0],this.lexer,this.rules)}}emStrong(e,t,n=""){let r=this.rules.inline.emStrongLDelim.exec(e);if(!(!r||r[3]&&n.match(this.rules.other.unicodeAlphaNumeric))&&(!r[1]&&!r[2]||!n||this.rules.inline.punctuation.exec(n))){let n,i,o=[...r[0]].length-1,a=o,s=0,u="*"===r[0][0]?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(u.lastIndex=0,t=t.slice(-1*e.length+o);null!=(r=u.exec(t));){if(n=r[1]||r[2]||r[3]||r[4]||r[5]||r[6],!n)continue;if(i=[...n].length,r[3]||r[4]){a+=i;continue}if((r[5]||r[6])&&o%3&&!((o+i)%3)){s+=i;continue}if(a-=i,a>0)continue;i=Math.min(i,i+a+s);let t=[...r[0]][0].length,u=e.slice(0,o+r.index+t+i);if(Math.min(o,i)%2){let e=u.slice(1,-1);return{type:"em",raw:u,text:e,tokens:this.lexer.inlineTokens(e)}}let l=u.slice(2,-2);return{type:"strong",raw:u,text:l,tokens:this.lexer.inlineTokens(l)}}}}codespan(e){let t=this.rules.inline.code.exec(e);if(t){let e=t[2].replace(this.rules.other.newLineCharGlobal," "),n=this.rules.other.nonSpaceChar.test(e),r=this.rules.other.startingSpaceChar.test(e)&&this.rules.other.endingSpaceChar.test(e);return n&&r&&(e=e.substring(1,e.length-1)),{type:"codespan",raw:t[0],text:e}}}br(e){let t=this.rules.inline.br.exec(e);if(t)return{type:"br",raw:t[0]}}del(e){let t=this.rules.inline.del.exec(e);if(t)return{type:"del",raw:t[0],text:t[2],tokens:this.lexer.inlineTokens(t[2])}}autolink(e){let t=this.rules.inline.autolink.exec(e);if(t){let e,n;return"@"===t[2]?(e=t[1],n="mailto:"+e):(e=t[1],n=e),{type:"link",raw:t[0],text:e,href:n,tokens:[{type:"text",raw:e,text:e}]}}}url(e){let t;if(t=this.rules.inline.url.exec(e)){let e,n;if("@"===t[2])e=t[0],n="mailto:"+e;else{let r;do{r=t[0],t[0]=this.rules.inline._backpedal.exec(t[0])?.[0]??""}while(r!==t[0]);e=t[0],n="www."===t[1]?"http://"+t[0]:t[0]}return{type:"link",raw:t[0],text:e,href:n,tokens:[{type:"text",raw:e,text:e}]}}}inlineText(e){let t=this.rules.inline.text.exec(e);if(t){let e=this.lexer.state.inRawBlock;return{type:"text",raw:t[0],text:t[0],escaped:e}}}},ie=class e{tokens;options;state;tokenizer;inlineQueue;constructor(e){this.tokens=[],this.tokens.links=Object.create(null),this.options=e||t,this.options.tokenizer=this.options.tokenizer||new re,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};let n={other:o,block:Q.normal,inline:H.normal};this.options.pedantic?(n.block=Q.pedantic,n.inline=H.pedantic):this.options.gfm&&(n.block=Q.gfm,this.options.breaks?n.inline=H.breaks:n.inline=H.gfm),this.tokenizer.rules=n}static get rules(){return{block:Q,inline:H}}static lex(t,n){return new e(n).lex(t)}static lexInline(t,n){return new e(n).inlineTokens(t)}lex(e){e=e.replace(o.carriageReturn,"\n"),this.blockTokens(e,this.tokens);for(let e=0;e!!(r=n.call({lexer:this},e,t))&&(e=e.substring(r.raw.length),t.push(r),!0))))continue;if(r=this.tokenizer.space(e)){e=e.substring(r.raw.length);let n=t.at(-1);1===r.raw.length&&void 0!==n?n.raw+="\n":t.push(r);continue}if(r=this.tokenizer.code(e)){e=e.substring(r.raw.length);let n=t.at(-1);"paragraph"===n?.type||"text"===n?.type?(n.raw+="\n"+r.raw,n.text+="\n"+r.text,this.inlineQueue.at(-1).src=n.text):t.push(r);continue}if(r=this.tokenizer.fences(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.heading(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.hr(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.blockquote(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.list(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.html(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.def(e)){e=e.substring(r.raw.length);let n=t.at(-1);"paragraph"===n?.type||"text"===n?.type?(n.raw+="\n"+r.raw,n.text+="\n"+r.raw,this.inlineQueue.at(-1).src=n.text):this.tokens.links[r.tag]||(this.tokens.links[r.tag]={href:r.href,title:r.title});continue}if(r=this.tokenizer.table(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.lheading(e)){e=e.substring(r.raw.length),t.push(r);continue}let i=e;if(this.options.extensions?.startBlock){let t,n=1/0,r=e.slice(1);this.options.extensions.startBlock.forEach((e=>{t=e.call({lexer:this},r),"number"==typeof t&&t>=0&&(n=Math.min(n,t))})),n<1/0&&n>=0&&(i=e.substring(0,n+1))}if(this.state.top&&(r=this.tokenizer.paragraph(i))){let o=t.at(-1);n&&"paragraph"===o?.type?(o.raw+="\n"+r.raw,o.text+="\n"+r.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=o.text):t.push(r),n=i.length!==e.length,e=e.substring(r.raw.length)}else if(r=this.tokenizer.text(e)){e=e.substring(r.raw.length);let n=t.at(-1);"text"===n?.type?(n.raw+="\n"+r.raw,n.text+="\n"+r.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=n.text):t.push(r)}else if(e){let t="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(t);break}throw new Error(t)}}return this.state.top=!0,t}inline(e,t=[]){return this.inlineQueue.push({src:e,tokens:t}),t}inlineTokens(e,t=[]){let n=e,r=null;if(this.tokens.links){let e=Object.keys(this.tokens.links);if(e.length>0)for(;null!=(r=this.tokenizer.rules.inline.reflinkSearch.exec(n));)e.includes(r[0].slice(r[0].lastIndexOf("[")+1,-1))&&(n=n.slice(0,r.index)+"["+"a".repeat(r[0].length-2)+"]"+n.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;null!=(r=this.tokenizer.rules.inline.anyPunctuation.exec(n));)n=n.slice(0,r.index)+"++"+n.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);for(;null!=(r=this.tokenizer.rules.inline.blockSkip.exec(n));)n=n.slice(0,r.index)+"["+"a".repeat(r[0].length-2)+"]"+n.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);let i=!1,o="";for(;e;){let r;if(i||(o=""),i=!1,this.options.extensions?.inline?.some((n=>!!(r=n.call({lexer:this},e,t))&&(e=e.substring(r.raw.length),t.push(r),!0))))continue;if(r=this.tokenizer.escape(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.tag(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.link(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.reflink(e,this.tokens.links)){e=e.substring(r.raw.length);let n=t.at(-1);"text"===r.type&&"text"===n?.type?(n.raw+=r.raw,n.text+=r.text):t.push(r);continue}if(r=this.tokenizer.emStrong(e,n,o)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.codespan(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.br(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.del(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.autolink(e)){e=e.substring(r.raw.length),t.push(r);continue}if(!this.state.inLink&&(r=this.tokenizer.url(e))){e=e.substring(r.raw.length),t.push(r);continue}let a=e;if(this.options.extensions?.startInline){let t,n=1/0,r=e.slice(1);this.options.extensions.startInline.forEach((e=>{t=e.call({lexer:this},r),"number"==typeof t&&t>=0&&(n=Math.min(n,t))})),n<1/0&&n>=0&&(a=e.substring(0,n+1))}if(r=this.tokenizer.inlineText(a)){e=e.substring(r.raw.length),"_"!==r.raw.slice(-1)&&(o=r.raw.slice(-1)),i=!0;let n=t.at(-1);"text"===n?.type?(n.raw+=r.raw,n.text+=r.text):t.push(r)}else if(e){let t="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(t);break}throw new Error(t)}}return t}},oe=class{options;parser;constructor(e){this.options=e||t}space(e){return""}code({text:e,lang:t,escaped:n}){let r=(t||"").match(o.notSpaceStart)?.[0],i=e.replace(o.endingNewline,"")+"\n";return r?'
'+(n?i:W(i,!0))+"
\n":"
"+(n?i:W(i,!0))+"
\n"}blockquote({tokens:e}){return`
\n${this.parser.parse(e)}
\n`}html({text:e}){return e}heading({tokens:e,depth:t}){return`${this.parser.parseInline(e)}\n`}hr(e){return"
\n"}list(e){let t=e.ordered,n=e.start,r="";for(let t=0;t\n"+r+"\n"}listitem(e){let t="";if(e.task){let n=this.checkbox({checked:!!e.checked});e.loose?"paragraph"===e.tokens[0]?.type?(e.tokens[0].text=n+" "+e.tokens[0].text,e.tokens[0].tokens&&e.tokens[0].tokens.length>0&&"text"===e.tokens[0].tokens[0].type&&(e.tokens[0].tokens[0].text=n+" "+W(e.tokens[0].tokens[0].text),e.tokens[0].tokens[0].escaped=!0)):e.tokens.unshift({type:"text",raw:n+" ",text:n+" ",escaped:!0}):t+=n+" "}return t+=this.parser.parse(e.tokens,!!e.loose),`
  • ${t}
  • \n`}checkbox({checked:e}){return"'}paragraph({tokens:e}){return`

    ${this.parser.parseInline(e)}

    \n`}table(e){let t="",n="";for(let t=0;t${r}`),"\n\n"+t+"\n"+r+"
    \n"}tablerow({text:e}){return`\n${e}\n`}tablecell(e){let t=this.parser.parseInline(e.tokens),n=e.header?"th":"td";return(e.align?`<${n} align="${e.align}">`:`<${n}>`)+t+`\n`}strong({tokens:e}){return`${this.parser.parseInline(e)}`}em({tokens:e}){return`${this.parser.parseInline(e)}`}codespan({text:e}){return`${W(e,!0)}`}br(e){return"
    "}del({tokens:e}){return`${this.parser.parseInline(e)}`}link({href:e,title:t,tokens:n}){let r=this.parser.parseInline(n),i=J(e);if(null===i)return r;let o='
    ",o}image({href:e,title:t,text:n,tokens:r}){r&&(n=this.parser.parseInline(r,this.parser.textRenderer));let i=J(e);if(null===i)return W(n);let o=`${n}{let i=e[r].flat(1/0);n=n.concat(this.walkTokens(i,t))})):e.tokens&&(n=n.concat(this.walkTokens(e.tokens,t)))}}return n}use(...e){let t=this.defaults.extensions||{renderers:{},childTokens:{}};return e.forEach((e=>{let n={...e};if(n.async=this.defaults.async||n.async||!1,e.extensions&&(e.extensions.forEach((e=>{if(!e.name)throw new Error("extension name required");if("renderer"in e){let n=t.renderers[e.name];t.renderers[e.name]=n?function(...t){let r=e.renderer.apply(this,t);return!1===r&&(r=n.apply(this,t)),r}:e.renderer}if("tokenizer"in e){if(!e.level||"block"!==e.level&&"inline"!==e.level)throw new Error("extension level must be 'block' or 'inline'");let n=t[e.level];n?n.unshift(e.tokenizer):t[e.level]=[e.tokenizer],e.start&&("block"===e.level?t.startBlock?t.startBlock.push(e.start):t.startBlock=[e.start]:"inline"===e.level&&(t.startInline?t.startInline.push(e.start):t.startInline=[e.start]))}"childTokens"in e&&e.childTokens&&(t.childTokens[e.name]=e.childTokens)})),n.extensions=t),e.renderer){let t=this.defaults.renderer||new oe(this.defaults);for(let n in e.renderer){if(!(n in t))throw new Error(`renderer '${n}' does not exist`);if(["options","parser"].includes(n))continue;let r=n,i=e.renderer[r],o=t[r];t[r]=(...e)=>{let n=i.apply(t,e);return!1===n&&(n=o.apply(t,e)),n||""}}n.renderer=t}if(e.tokenizer){let t=this.defaults.tokenizer||new re(this.defaults);for(let n in e.tokenizer){if(!(n in t))throw new Error(`tokenizer '${n}' does not exist`);if(["options","rules","lexer"].includes(n))continue;let r=n,i=e.tokenizer[r],o=t[r];t[r]=(...e)=>{let n=i.apply(t,e);return!1===n&&(n=o.apply(t,e)),n}}n.tokenizer=t}if(e.hooks){let t=this.defaults.hooks||new ue;for(let n in e.hooks){if(!(n in t))throw new Error(`hook '${n}' does not exist`);if(["options","block"].includes(n))continue;let r=n,i=e.hooks[r],o=t[r];ue.passThroughHooks.has(n)?t[r]=e=>{if(this.defaults.async)return Promise.resolve(i.call(t,e)).then((e=>o.call(t,e)));let n=i.call(t,e);return o.call(t,n)}:t[r]=(...e)=>{let n=i.apply(t,e);return!1===n&&(n=o.apply(t,e)),n}}n.hooks=t}if(e.walkTokens){let t=this.defaults.walkTokens,r=e.walkTokens;n.walkTokens=function(e){let n=[];return n.push(r.call(this,e)),t&&(n=n.concat(t.call(this,e))),n}}this.defaults={...this.defaults,...n}})),this}setOptions(e){return this.defaults={...this.defaults,...e},this}lexer(e,t){return ie.lex(e,t??this.defaults)}parser(e,t){return se.parse(e,t??this.defaults)}parseMarkdown(e){return(t,n)=>{let r={...n},i={...this.defaults,...r},o=this.onError(!!i.silent,!!i.async);if(!0===this.defaults.async&&!1===r.async)return o(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(typeof t>"u"||null===t)return o(new Error("marked(): input parameter is undefined or null"));if("string"!=typeof t)return o(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(t)+", string expected"));i.hooks&&(i.hooks.options=i,i.hooks.block=e);let a=i.hooks?i.hooks.provideLexer():e?ie.lex:ie.lexInline,s=i.hooks?i.hooks.provideParser():e?se.parse:se.parseInline;if(i.async)return Promise.resolve(i.hooks?i.hooks.preprocess(t):t).then((e=>a(e,i))).then((e=>i.hooks?i.hooks.processAllTokens(e):e)).then((e=>i.walkTokens?Promise.all(this.walkTokens(e,i.walkTokens)).then((()=>e)):e)).then((e=>s(e,i))).then((e=>i.hooks?i.hooks.postprocess(e):e)).catch(o);try{i.hooks&&(t=i.hooks.preprocess(t));let e=a(t,i);i.hooks&&(e=i.hooks.processAllTokens(e)),i.walkTokens&&this.walkTokens(e,i.walkTokens);let n=s(e,i);return i.hooks&&(n=i.hooks.postprocess(n)),n}catch(e){return o(e)}}}onError(e,t){return n=>{if(n.message+="\nPlease report this to https://github.com/markedjs/marked.",e){let e="

    An error occurred:

    "+W(n.message+"",!0)+"
    ";return t?Promise.resolve(e):e}if(t)return Promise.reject(n);throw n}}};function ce(e,t){return le.parse(e,t)}ce.options=ce.setOptions=function(e){return le.setOptions(e),ce.defaults=le.defaults,n(ce.defaults),ce},ce.getDefaults=e,ce.defaults=t,ce.use=function(...e){return le.use(...e),ce.defaults=le.defaults,n(ce.defaults),ce},ce.walkTokens=function(e,t){return le.walkTokens(e,t)},ce.parseInline=le.parseInline,ce.Parser=se,ce.parser=se.parse,ce.Renderer=oe,ce.TextRenderer=ae,ce.Lexer=ie,ce.lexer=ie.lex,ce.Tokenizer=re,ce.Hooks=ue,ce.parse=ce,ce.options,ce.setOptions,ce.use,ce.walkTokens,ce.parseInline,se.parse,ie.lex;const he=/&(?:amp|lt|gt|quot|#(0+)?39);/g,fe=RegExp(he.source),pe={"&":"&","<":"<",">":">",""":'"',"'":"'"};const de=/[&<>"']/g,ye=RegExp(de.source),ge={"&":"&","<":"<",">":">",'"':""","'":"'"};const me={space:()=>"",code({text:e}){const t=e.replace(/\n$/,"");return(n=t)&&ye.test(n)?n.replace(de,(e=>ge[e])):n||"";var n},blockquote({tokens:e}){return this.parser?.parse(e)||""},html:()=>"",heading({tokens:e}){return this.parser?.parseInline(e)||""},hr:()=>"",list(e){let t="";for(let n=0;n0&&"paragraph"===e.tokens[0].type?(e.tokens[0].text=n+" "+e.tokens[0].text,e.tokens[0].tokens&&e.tokens[0].tokens.length>0&&"text"===e.tokens[0].tokens[0].type&&(e.tokens[0].tokens[0].text=n+" "+e.tokens[0].tokens[0].text)):e.tokens.unshift({type:"text",raw:n+" ",text:n+" "}):t+=n+" "}return t+=this.parser?.parse(e.tokens,!!e.loose),`${t||""}`},checkbox:()=>"",paragraph({tokens:e}){return this.parser?.parseInline(e)||""},table(e){let t="",n="";for(let t=0;te,tablecell(e){return this.parser?.parseInline(e.tokens)||""},strong:({text:e})=>e,em({tokens:e}){return this.parser?.parseInline(e)||""},codespan:({text:e})=>e,br:()=>" ",del({tokens:e}){return this.parser?.parseInline(e)},link({tokens:e,href:t,title:n}){return`${this.parser?.parseInline(e)||""} ${t||""} ${n||""}`},image:({title:e,text:t,href:n})=>`${t||""} ${n||""} ${e||""}`,text(e){return e.tokens?this.parser?.parseInline(e.tokens)||"":e.text||""}},be=ce.setOptions({renderer:me});function ve(e){const t=be.parse(e);var n;return function(e){return e&&e.replace("!>","").replace("?>","")}((n=t)&&fe.test(n)?n.replace(he,(e=>pe[e]||"'")):n||"").trim()}var ke="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function we(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var xe,_e={exports:{}};var Se=(xe||(xe=1,_e.exports=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)},t=function(){return(t=Object.assign||function(e){for(var t,n=1,r=arguments.length;n.",et="String expected.",tt=[],nt="__dbnames",rt="readonly",it="readwrite";function ot(e,t){return e?t?function(){return e.apply(this,arguments)&&t.apply(this,arguments)}:e:t}var at={type:3,lower:-1/0,lowerOpen:!1,upper:[[]],upperOpen:!1};function st(e){return"string"!=typeof e||/\./.test(e)?function(e){return e}:function(t){return void 0===t[e]&&e in t&&delete(t=O(t))[e],t}}function ut(){throw Y.Type()}function lt(e,t){try{var n=ct(e),r=ct(t);if(n!==r)return"Array"===n?1:"Array"===r?-1:"binary"===n?1:"binary"===r?-1:"string"===n?1:"string"===r?-1:"Date"===n?1:"Date"!==r?NaN:-1;switch(n){case"number":case"Date":case"string":return tn+a&&i(n+f)}))}))}var o=gt(n)&&n.limit===1/0&&("function"!=typeof e||e===Et)&&{index:n.index,range:n.range};return i(0).then((function(){if(0=o}))).length?(t.forEach((function(e){l.push((function(){var t=c,n=e._cfg.dbschema;fn(r,t,u),fn(r,n,u),c=r._dbSchema=n;var a=sn(t,n);a.add.forEach((function(e){un(u,e[0],e[1].primKey,e[1].indexes)})),a.change.forEach((function(e){if(e.recreate)throw new Y.Upgrade("Not yet support for changing primary key");var t=u.objectStore(e.name);e.add.forEach((function(e){return cn(t,e)})),e.change.forEach((function(e){t.deleteIndex(e.name),cn(t,e)})),e.del.forEach((function(e){return t.deleteIndex(e)}))}));var l=e._cfg.contentUpgrade;if(l&&e._cfg.version>o){en(r,u),s._memoizedTables={};var h=x(n);a.del.forEach((function(e){h[e]=t[e]})),nn(r,[r.Transaction.prototype]),tn(r,[r.Transaction.prototype],i(h),h),s.schema=h;var f,p=$(l);return p&&Fe(),a=xe.follow((function(){var e;(f=l(s))&&p&&(e=Le.bind(null,null),f.then(e,e))})),f&&"function"==typeof f.then?xe.resolve(f):a.then((function(){return f}))}})),l.push((function(t){var n,i,o=e._cfg.dbschema;n=o,i=t,[].slice.call(i.db.objectStoreNames).forEach((function(e){return null==n[e]&&i.db.deleteObjectStore(e)})),nn(r,[r.Transaction.prototype]),tn(r,[r.Transaction.prototype],r._storeNames,r._dbSchema),s.schema=r._dbSchema})),l.push((function(t){r.idbdb.objectStoreNames.contains("$meta")&&(Math.ceil(r.idbdb.version/10)===e._cfg.version?(r.idbdb.deleteObjectStore("$meta"),delete r._dbSchema.$meta,r._storeNames=r._storeNames.filter((function(e){return"$meta"!==e}))):t.objectStore("$meta").put(e._cfg.version,"version"))}))})),function e(){return l.length?xe.resolve(l.shift()(s.idbtrans)).then(e):xe.resolve()}().then((function(){ln(c,u)}))):xe.resolve();var r,o,s,u,l,c})).catch(s)):(i(o).forEach((function(e){un(n,e,o[e].primKey,o[e].indexes)})),en(e,n),void xe.follow((function(){return e.on.populate.fire(a)})).catch(s));var r,l}))}function an(e,t){ln(e._dbSchema,t),t.db.version%10!=0||t.objectStoreNames.contains("$meta")||t.db.createObjectStore("$meta").add(Math.ceil(t.db.version/10-1),"version");var n=hn(0,e.idbdb,t);fn(e,e._dbSchema,t);for(var r=0,i=sn(n,e._dbSchema).change;rMath.pow(2,62)?0:r.oldVersion,f=r<1,e.idbdb=p.result,a&&an(e,h),on(e,r/10,h,l))}),l),p.onsuccess=De((function(){h=null;var n,s,l,d,y,m=e.idbdb=p.result,b=g(m.objectStoreNames);if(0t.limit?n.length=t.limit:e.length===t.limit&&n.length=r.limit&&(!r.values||e.req.values)&&Xn(e.req.query.range,r.query.range)})),!1,i,o];case"count":return a=o.find((function(e){return Gn(e.req.query.range,r.query.range)})),[a,!!a,i,o]}}(n,r,"query",e),u=s[0],l=s[1],c=s[2],h=s[3];return u&&l?u.obsSet=e.obsSet:(l=i.query(e).then((function(e){var n=e.result;if(u&&(u.res=n),t){for(var r=0,i=n.length;r":">",'"':""","'":"'"};return String(e).replace(/[&<>"']/g,(e=>t[e]))}function Ie(e){return e.text||"table"!==e.type||(e.rows.unshift(e.header),e.text=e.rows.map((e=>e.map((e=>e.text)).join(" | "))).join(" |\n ")),e.text}function De(e){return e.text||"list"!==e.type||(e.text=e.raw),e.text}function qe(e,t="",n,r,i){const o=window.marked.lexer(t),a=window.Docsify.slugify,s=[];let u,l="";return o.forEach(((t,o)=>{if("heading"===t.type&&t.depth<=r){const{str:r,config:o}=function(e=""){const t={};return e&&(e=e.replace(/^('|")/,"").replace(/('|")$/,"").replace(/(?:^|\s):([\w-]+:?)=?([\w-%]+)?/g,((e,n,r)=>-1!==n.indexOf(":")?e:(!0!==(r=r&&r.replace(/"/g,"")||!0)&&void 0!==t[n]?(Array.isArray(t[n])||r===t[n]||(t[n]=[t[n]]),t[n].includes(r)||t[n].push(r)):t[n]=r,""))).trim()),{str:e,config:t}}(t.text);u=n.toURL(e,{id:a(o.id||t.text)}),r&&(l=function(e=""){let t,n;return//g.test(e)&&(e=e.replace("\x3c!-- {docsify-ignore} --\x3e",""),n=!0),/{docsify-ignore}/g.test(e)&&(e=e.replace("{docsify-ignore}",""),n=!0),//g.test(e)&&(e=e.replace("\x3c!-- {docsify-ignore-all} --\x3e",""),t=!0),/{docsify-ignore-all}/g.test(e)&&(e=e.replace("{docsify-ignore-all}",""),t=!0),{content:e,ignoreAllSubs:t,ignoreSubHeading:n}}(r).content,l=function(e=""){return e.replace(/(<\/?a.*?>)/gi,"")}(l.trim())),s[u]={slug:u,title:l,body:"",path:e,indexKey:i}}else{if(0===o&&(u=n.toURL(e),s[u]={slug:u,title:"/"!==e?e.slice(1):"Home Page",body:ve(t.text||""),path:e,indexKey:i}),!u)return;s[u]?s[u].body?(t.text=Ie(t),t.text=De(t),s[u].body+="\n"+ve(t.text||"")):(t.text=Ie(t),t.text=De(t),s[u].body=ve(t.text||"")):s[u]={slug:u,title:"",body:""},s[u].path=e,s[u].indexKey=i}})),a.clear(),s}function $e(e){return e&&e.normalize?e.normalize("NFD").replace(/[\u0300-\u036f]/g,""):e}async function je(e,t){const n="auto"===e.paths,r=n?function(e){const t=[];return Docsify.dom.findAll(".sidebar-nav a:not(.section-link):not([data-nosearch])").forEach((n=>{const r=n.href,i=n.getAttribute("href"),o=e.parse(r).path;o&&-1===t.indexOf(o)&&!Docsify.util.isAbsolutePath(i)&&t.push(o)})),t}(t.router):e.paths;let i="";if(r.length&&n&&e.pathNamespaces){const t=r[0];if(Array.isArray(e.pathNamespaces))i=e.pathNamespaces.filter((e=>t.slice(0,e.length)===e))[0]||i;else if(e.pathNamespaces instanceof RegExp){const n=t.match(e.pathNamespaces);n&&(i=n[0])}const n=-1===r.indexOf(i+"/"),o=-1===r.indexOf(i+"/README");n&&o&&r.unshift(i+"/")}else-1===r.indexOf("/")&&-1===r.indexOf("/README")&&r.unshift("/");const o=((a=e.namespace)?`${Ke.EXPIRE_KEY}/${a}`:Ke.EXPIRE_KEY)+i;var a;const s=function(e){return e?`${Ke.INDEX_KEY}/${e}`:Ke.INDEX_KEY}(e.namespace)+i,u=await Te(o,!0){if(!!Array.isArray(Oe)&&Oe.some((e=>e.path===n)))return c++;Docsify.get(t.router.getFile(n),!1,t.config.requestHeaders).then((async r=>{Oe[n]=qe(n,r,t.router,e.depth,s),l===++c&&await async function(e,t){Oe=Object.values(Oe).flatMap((e=>Object.values(e))),await Re.search.bulkPut(Oe),await Re.expires.put({key:t,value:Date.now()+e})}(e.maxAge,o)}))}))}let Be="";function ze(e){const t=Docsify.dom.find(".search"),n=Docsify.dom.find(t,".results-panel"),r=Docsify.dom.find(".search .results-status");if(!e)return n.innerHTML="",void(r.textContent="");const i=function(e){const t=[];let n=(e=e.trim()).split(/[\s\-,\\/]+/);1!==n.length&&(n=[e,...n]);for(const e of Oe){let r=0,i="",o="",a="";const s=e.title&&e.title.trim(),u=e.body&&e.body.trim(),l=e.slug||"";if(s&&(n.forEach((e=>{const t=new RegExp(Ce($e(e)).replace(/[|\\{}()[\]^$+*?.]/g,"\\$&"),"gi");let n=-1,l=-1;if(o=s?Ce($e(s)):s,a=u?Ce($e(u)):u,n=s?o.search(t):-1,l=u?a.search(t):-1,n>=0||l>=0){r+=n>=0?3:l>=0?2:0,l<0&&(l=0);let o=0,s=0;o=l<11?0:l-10,s=0===o?100:l+e.length+90,a&&s>a.length&&(s=a.length);const u=a&&a.substring(o,s).replace(t,(e=>`${e}`));i+=u}})),r>0)){const e={title:o,content:u?i:"",url:l,score:r};t.push(e)}}return t.sort(((e,t)=>t.score-e.score))}(e);let o="";i.forEach(((e,t)=>{const n=e.content?`...${e.content}...`:"",r=(e.title||"").replace(/<[^>]+>/g,"");o+=`\n
    \n \n

    ${e.title}

    \n

    ${n}

    \n
    \n
    \n `})),n.innerHTML=o||"",r.textContent=i.length?`Found ${i.length} results`:Be}function Ne(e,t){if(!Docsify.dom.find(".sidebar"))return;const n=t.router.parse().query.s||"";Docsify.dom.style("/* prettier-ignore */\n:root {\n --plugin-search-input-bg : var(--form-element-bg);\n --plugin-search-input-border-color : var(--sidebar-border-color);\n --plugin-search-input-border-radius: var(--form-element-border-radius);\n --plugin-search-input-color : var(--form-element-color);\n --plugin-search-kbd-bg : var(--color-bg);\n --plugin-search-kbd-border : 1px solid var(--color-mono-3);\n --plugin-search-kbd-border-radius : 4px;\n --plugin-search-kbd-color : var(--color-mono-5);\n --plugin-search-margin : 10px;\n --plugin-search-reset-bg : var(--theme-color);\n --plugin-search-reset-border : transparent;\n --plugin-search-reset-border-radius: var(--border-radius);\n --plugin-search-reset-color : #fff;\n}\n\n.search {\n margin: var(--plugin-search-margin);\n}\n\n/* Input */\n/* ================================== */\n.search .input-wrap {\n position: relative;\n}\n\n.search input {\n width: 100%;\n padding-inline-end: 36px;\n border: 1px solid var(--plugin-search-input-border-color);\n border-radius: var(--plugin-search-input-border-radius);\n background: var(--plugin-search-input-bg);\n color: var(--plugin-search-input-color);\n}\n\n.search input::-webkit-search-decoration,\n.search input::-webkit-search-cancel-button {\n appearance: none;\n}\n\n.search .clear-button,\n.search .kbd-group {\n visibility: hidden;\n display: flex;\n gap: 0.15em;\n position: absolute;\n right: 7px;\n top: 50%;\n opacity: 0;\n translate: 0 -50%;\n transition-property: opacity, visibility;\n transition-duration: var(--duration-medium);\n}\n\n/* Note: invalid = empty, valid = not empty */\n.search input:valid ~ .clear-button,\n.search input:invalid:where(:focus, :hover) ~ .kbd-group,\n.search .kbd-group:hover {\n visibility: visible;\n opacity: 1;\n}\n\n.search .clear-button {\n --_button-size: 20px;\n --_content-size: 12px;\n\n display: flex;\n align-items: center;\n justify-content: center;\n height: var(--_button-size);\n width: var(--_button-size);\n border: var(--plugin-search-reset-border);\n border-radius: var(--plugin-search-reset-border-radius);\n background: var(--plugin-search-reset-bg);\n cursor: pointer;\n}\n\n.search .clear-button::before,\n.search .clear-button::after {\n content: '';\n position: absolute;\n height: 2px;\n width: var(--_content-size);\n color: var(--plugin-search-reset-color);\n background: var(--plugin-search-reset-color);\n}\n\n.search .clear-button::before {\n rotate: 45deg;\n}\n\n.search .clear-button::after {\n rotate: -45deg;\n}\n\n.search kbd {\n border: var(--plugin-search-kbd-border);\n border-radius: var(--plugin-search-kbd-border-radius);\n background: var(--plugin-search-kbd-bg);\n color: var(--plugin-search-kbd-color);\n font-size: var(--font-size-s);\n}\n\n/* Results */\n/* ================================== */\n.search a:hover {\n color: var(--theme-color);\n}\n\n.search .results-panel:empty {\n display: none;\n}\n\n/* Hide other sidebar items when results are shown */\n.search:has(.results-panel:not(:empty)) ~ * {\n display: none;\n}\n\n/* Dim other sidebar items when no results are found */\n.search:where(:has(input:valid:focus), :has(.results-panel::empty)) ~ * {\n opacity: 0.2;\n}\n\n.search .matching-post {\n overflow: hidden;\n padding: 1em 0 1.2em 0;\n border-bottom: 1px solid var(--color-mono-2);\n}\n\n.search .matching-post:hover a {\n text-decoration-color: transparent;\n}\n\n.search .matching-post:hover .title {\n text-decoration: inherit;\n text-decoration-color: var(--link-underline-color-hover);\n}\n\n.search .matching-post .title {\n margin: 0 0 0.5em 0;\n line-height: 1.4;\n}\n\n.search .matching-post .content {\n margin: 0;\n color: var(--color-mono-6);\n font-size: var(--font-size-s);\n}\n\n.search .results-status {\n margin-bottom: 0;\n color: var(--color-mono-6);\n font-size: var(--font-size-s);\n}\n\n.search .results-status:empty {\n display: none;\n}\n"),function(e,t=""){const{insertAfter:n,insertBefore:r}=e.config?.search||{},i=`\n
    \n \n \n
    \n /\n ⌃K\n
    \n
    \n

    \n
    \n `,o=Docsify.dom.find(".sidebar"),a=Docsify.dom.create("section",i),s=o.querySelector(`:scope ${n||r||"> :first-child"}`);a.classList.add("search"),a.setAttribute("role","search"),o.insertBefore(a,n?s.nextSibling:s)}(t,Ce(n)),function(){const e=Docsify.dom.find(".search"),t=Docsify.dom.find(e,"input"),n=Docsify.dom.find(e,".clear-button");let r;Docsify.dom.on(e,"click",(e=>-1===["A","H2","P","EM"].indexOf(e.target.tagName)&&e.stopPropagation())),Docsify.dom.on(t,"input",(e=>{clearTimeout(r),r=setTimeout((t=>ze(e.target.value.trim())),100)})),Docsify.dom.on(n,"click",(e=>{t.value="",ze()}))}(),n&&setTimeout((e=>ze(n)),500)}function Me(e,t){!function(e,t){const n=Docsify.dom.getNode('.search input[type="search"]');if(n)if("string"==typeof e)n.placeholder=e;else{const r=Object.keys(e).filter((e=>t.indexOf(e)>-1))[0];n.placeholder=e[r]}}(e.placeholder,t.route.path),function(e,t){if("string"==typeof e)Be=e;else{const n=Object.keys(e).filter((e=>t.indexOf(e)>-1))[0];Be=e[n]}}(e.noData,t.route.path)}const Fe={placeholder:"Type to search",noData:"No Results!",paths:"auto",depth:2,maxAge:864e5,namespace:void 0,pathNamespaces:void 0,keyBindings:["/","meta+k","ctrl+k"],insertAfter:void 0,insertBefore:void 0};window.$docsify=window.$docsify||{},$docsify.plugins=[function(e,t){const{util:n}=Docsify,r=t.config.search||Fe;Array.isArray(r)?Fe.paths=r:"object"==typeof r&&(Fe.paths=Array.isArray(r.paths)?r.paths:"auto",Fe.maxAge=n.isPrimitive(r.maxAge)?r.maxAge:Fe.maxAge,Fe.placeholder=r.placeholder||Fe.placeholder,Fe.noData=r.noData||Fe.noData,Fe.depth=r.depth||Fe.depth,Fe.namespace=r.namespace||Fe.namespace,Fe.pathNamespaces=r.pathNamespaces||Fe.pathNamespaces,Fe.keyBindings=r.keyBindings||Fe.keyBindings);const i="auto"===Fe.paths;e.init((()=>{const{keyBindings:e}=t.config;e.constructor===Object&&(e.focusSearch={bindings:Fe.keyBindings,callback(e){const t=document.querySelector(".sidebar"),n=document.querySelector(".sidebar-toggle"),r=t?.querySelector('input[type="search"]'),i=t?.getBoundingClientRect().x<0;i&&n?.click(),setTimeout((()=>r?.focus()),i?250:0)}})})),e.mounted((e=>{Ne(0,t),!i&&je(Fe,t)})),e.doneEach((e=>{Me(Fe,t),i&&je(Fe,t)}))},...$docsify.plugins||[]]}(); //# sourceMappingURL=search.min.js.map