-
Notifications
You must be signed in to change notification settings - Fork 1
/
YunWaline-727719f3.js
60 lines (60 loc) · 148 KB
/
YunWaline-727719f3.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
var ca=Object.defineProperty;var ua=(l,t,n)=>t in l?ca(l,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):l[t]=n;var Wt=(l,t,n)=>(ua(l,typeof t!="symbol"?t+"":t,n),n);import{a as b,h as Le,s as E,L as Me,ab as fe,ao as Rn,o as p,g as m,F as X,i as ie,n as dt,e as R,c as de,j as _,K as Fe,ap as zn,T as G,l as Sn,t as T,m as Q,b as J,aq as P,ar as Ce,as as qe,at as In,y as De,au as En,av as An,aw as jn,z as ht,d as be,ax as Tn,p as Un,ay as Mn,az as Pn,aA as On,Z as pa,k as da,aB as ha,aC as ma,G as ga}from"./app-4433fae6.js";var Xe=new Map;function fa(l){var t=Xe.get(l);t&&t.destroy()}function va(l){var t=Xe.get(l);t&&t.update()}var Je=null;typeof window>"u"?((Je=function(l){return l}).destroy=function(l){return l},Je.update=function(l){return l}):((Je=function(l,t){return l&&Array.prototype.forEach.call(l.length?l:[l],function(n){return function(e){if(e&&e.nodeName&&e.nodeName==="TEXTAREA"&&!Xe.has(e)){var a,i=null,r=window.getComputedStyle(e),o=(a=e.value,function(){v({testForHeightReduction:a===""||!e.value.startsWith(a),restoreTextAlign:null}),a=e.value}),u=function(d){e.removeEventListener("autosize:destroy",u),e.removeEventListener("autosize:update",c),e.removeEventListener("input",o),window.removeEventListener("resize",c),Object.keys(d).forEach(function(y){return e.style[y]=d[y]}),Xe.delete(e)}.bind(e,{height:e.style.height,resize:e.style.resize,textAlign:e.style.textAlign,overflowY:e.style.overflowY,overflowX:e.style.overflowX,wordWrap:e.style.wordWrap});e.addEventListener("autosize:destroy",u),e.addEventListener("autosize:update",c),e.addEventListener("input",o),window.addEventListener("resize",c),e.style.overflowX="hidden",e.style.wordWrap="break-word",Xe.set(e,{destroy:u,update:c}),c()}function v(d){var y,w,I=d.restoreTextAlign,s=I===void 0?null:I,g=d.testForHeightReduction,z=g===void 0||g,j=r.overflowY;if(e.scrollHeight!==0&&(r.resize==="vertical"?e.style.resize="none":r.resize==="both"&&(e.style.resize="horizontal"),z&&(y=function(C){for(var K=[];C&&C.parentNode&&C.parentNode instanceof Element;)C.parentNode.scrollTop&&K.push([C.parentNode,C.parentNode.scrollTop]),C=C.parentNode;return function(){return K.forEach(function(Y){var W=Y[0],ce=Y[1];W.style.scrollBehavior="auto",W.scrollTop=ce,W.style.scrollBehavior=null})}}(e),e.style.height=""),w=r.boxSizing==="content-box"?e.scrollHeight-(parseFloat(r.paddingTop)+parseFloat(r.paddingBottom)):e.scrollHeight+parseFloat(r.borderTopWidth)+parseFloat(r.borderBottomWidth),r.maxHeight!=="none"&&w>parseFloat(r.maxHeight)?(r.overflowY==="hidden"&&(e.style.overflow="scroll"),w=parseFloat(r.maxHeight)):r.overflowY!=="hidden"&&(e.style.overflow="hidden"),e.style.height=w+"px",s&&(e.style.textAlign=s),y&&y(),i!==w&&(e.dispatchEvent(new Event("autosize:resized",{bubbles:!0})),i=w),j!==r.overflow&&!s)){var S=r.textAlign;r.overflow==="hidden"&&(e.style.textAlign=S==="start"?"end":"start"),v({restoreTextAlign:S,testForHeightReduction:!0})}}function c(){v({testForHeightReduction:!0,restoreTextAlign:null})}}(n)}),l}).destroy=function(l){return l&&Array.prototype.forEach.call(l.length?l:[l],fa),l},Je.update=function(l){return l&&Array.prototype.forEach.call(l.length?l:[l],va),l});var mt=Je;function Dn(){return{async:!1,baseUrl:null,breaks:!1,extensions:null,gfm:!0,headerIds:!0,headerPrefix:"",highlight:null,hooks:null,langPrefix:"language-",mangle:!0,pedantic:!1,renderer:null,sanitize:!1,sanitizer:null,silent:!1,smartypants:!1,tokenizer:null,walkTokens:null,xhtml:!1}}let Be=Dn();function wa(l){Be=l}const Hn=/[&<>"']/,ya=new RegExp(Hn.source,"g"),Vn=/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,ka=new RegExp(Vn.source,"g"),ba={"&":"&","<":"<",">":">",'"':""","'":"'"},Ft=l=>ba[l];function ge(l,t){if(t){if(Hn.test(l))return l.replace(ya,Ft)}else if(Vn.test(l))return l.replace(ka,Ft);return l}const $a=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function Bn(l){return l.replace($a,(t,n)=>(n=n.toLowerCase(),n==="colon"?":":n.charAt(0)==="#"?n.charAt(1)==="x"?String.fromCharCode(parseInt(n.substring(2),16)):String.fromCharCode(+n.substring(1)):""))}const xa=/(^|[^\[])\^/g;function te(l,t){l=typeof l=="string"?l:l.source,t=t||"";const n={replace:(e,a)=>(a=a.source||a,a=a.replace(xa,"$1"),l=l.replace(e,a),n),getRegex:()=>new RegExp(l,t)};return n}const Ca=/[^\w:]/g,La=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function qt(l,t,n){if(l){let e;try{e=decodeURIComponent(Bn(n)).replace(Ca,"").toLowerCase()}catch{return null}if(e.indexOf("javascript:")===0||e.indexOf("vbscript:")===0||e.indexOf("data:")===0)return null}t&&!La.test(n)&&(n=Sa(t,n));try{n=encodeURI(n).replace(/%25/g,"%")}catch{return null}return n}const rt={},_a=/^[^:]+:\/*[^/]*$/,Ra=/^([^:]+:)[\s\S]*$/,za=/^([^:]+:\/*[^/]*)[\s\S]*$/;function Sa(l,t){rt[" "+l]||(_a.test(l)?rt[" "+l]=l+"/":rt[" "+l]=ct(l,"/",!0)),l=rt[" "+l];const n=l.indexOf(":")===-1;return t.substring(0,2)==="//"?n?t:l.replace(Ra,"$1")+t:t.charAt(0)==="/"?n?t:l.replace(za,"$1")+t:l+t}const gt={exec:function(){}};function Zt(l,t){const n=l.replace(/\|/g,(i,r,o)=>{let u=!1,v=r;for(;--v>=0&&o[v]==="\\";)u=!u;return u?"|":" |"}),e=n.split(/ \|/);let a=0;if(e[0].trim()||e.shift(),e.length>0&&!e[e.length-1].trim()&&e.pop(),e.length>t)e.splice(t);else for(;e.length<t;)e.push("");for(;a<e.length;a++)e[a]=e[a].trim().replace(/\\\|/g,"|");return e}function ct(l,t,n){const e=l.length;if(e===0)return"";let a=0;for(;a<e;){const i=l.charAt(e-a-1);if(i===t&&!n)a++;else if(i!==t&&n)a++;else break}return l.slice(0,e-a)}function Ia(l,t){if(l.indexOf(t[1])===-1)return-1;const n=l.length;let e=0,a=0;for(;a<n;a++)if(l[a]==="\\")a++;else if(l[a]===t[0])e++;else if(l[a]===t[1]&&(e--,e<0))return a;return-1}function Ea(l){l&&l.sanitize&&!l.silent&&console.warn("marked(): sanitize and sanitizer parameters are deprecated since version 0.7.0, should not be used and will be removed in the future. Read more here: https://marked.js.org/#/USING_ADVANCED.md#options")}function Kt(l,t){if(t<1)return"";let n="";for(;t>1;)t&1&&(n+=l),t>>=1,l+=l;return n+l}function Gt(l,t,n,e){const a=t.href,i=t.title?ge(t.title):null,r=l[1].replace(/\\([\[\]])/g,"$1");if(l[0].charAt(0)!=="!"){e.state.inLink=!0;const o={type:"link",raw:n,href:a,title:i,text:r,tokens:e.inlineTokens(r)};return e.state.inLink=!1,o}return{type:"image",raw:n,href:a,title:i,text:ge(r)}}function Aa(l,t){const n=l.match(/^(\s+)(?:```)/);if(n===null)return t;const e=n[1];return t.split(`
`).map(a=>{const i=a.match(/^\s+/);if(i===null)return a;const[r]=i;return r.length>=e.length?a.slice(e.length):a}).join(`
`)}class Ht{constructor(t){this.options=t||Be}space(t){const n=this.rules.block.newline.exec(t);if(n&&n[0].length>0)return{type:"space",raw:n[0]}}code(t){const n=this.rules.block.code.exec(t);if(n){const e=n[0].replace(/^ {1,4}/gm,"");return{type:"code",raw:n[0],codeBlockStyle:"indented",text:this.options.pedantic?e:ct(e,`
`)}}}fences(t){const n=this.rules.block.fences.exec(t);if(n){const e=n[0],a=Aa(e,n[3]||"");return{type:"code",raw:e,lang:n[2]?n[2].trim().replace(this.rules.inline._escapes,"$1"):n[2],text:a}}}heading(t){const n=this.rules.block.heading.exec(t);if(n){let e=n[2].trim();if(/#$/.test(e)){const a=ct(e,"#");(this.options.pedantic||!a||/ $/.test(a))&&(e=a.trim())}return{type:"heading",raw:n[0],depth:n[1].length,text:e,tokens:this.lexer.inline(e)}}}hr(t){const n=this.rules.block.hr.exec(t);if(n)return{type:"hr",raw:n[0]}}blockquote(t){const n=this.rules.block.blockquote.exec(t);if(n){const e=n[0].replace(/^ *>[ \t]?/gm,""),a=this.lexer.state.top;this.lexer.state.top=!0;const i=this.lexer.blockTokens(e);return this.lexer.state.top=a,{type:"blockquote",raw:n[0],tokens:i,text:e}}}list(t){let n=this.rules.block.list.exec(t);if(n){let e,a,i,r,o,u,v,c,d,y,w,I,s=n[1].trim();const g=s.length>1,z={type:"list",raw:"",ordered:g,start:g?+s.slice(0,-1):"",loose:!1,items:[]};s=g?`\\d{1,9}\\${s.slice(-1)}`:`\\${s}`,this.options.pedantic&&(s=g?s:"[*+-]");const j=new RegExp(`^( {0,3}${s})((?:[ ][^\\n]*)?(?:\\n|$))`);for(;t&&(I=!1,!(!(n=j.exec(t))||this.rules.block.hr.test(t)));){if(e=n[0],t=t.substring(e.length),c=n[2].split(`
`,1)[0].replace(/^\t+/,C=>" ".repeat(3*C.length)),d=t.split(`
`,1)[0],this.options.pedantic?(r=2,w=c.trimLeft()):(r=n[2].search(/[^ ]/),r=r>4?1:r,w=c.slice(r),r+=n[1].length),u=!1,!c&&/^ *$/.test(d)&&(e+=d+`
`,t=t.substring(d.length+1),I=!0),!I){const C=new RegExp(`^ {0,${Math.min(3,r-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),K=new RegExp(`^ {0,${Math.min(3,r-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),Y=new RegExp(`^ {0,${Math.min(3,r-1)}}(?:\`\`\`|~~~)`),W=new RegExp(`^ {0,${Math.min(3,r-1)}}#`);for(;t&&(y=t.split(`
`,1)[0],d=y,this.options.pedantic&&(d=d.replace(/^ {1,4}(?=( {4})*[^ ])/g," ")),!(Y.test(d)||W.test(d)||C.test(d)||K.test(t)));){if(d.search(/[^ ]/)>=r||!d.trim())w+=`
`+d.slice(r);else{if(u||c.search(/[^ ]/)>=4||Y.test(c)||W.test(c)||K.test(c))break;w+=`
`+d}!u&&!d.trim()&&(u=!0),e+=y+`
`,t=t.substring(y.length+1),c=d.slice(r)}}z.loose||(v?z.loose=!0:/\n *\n *$/.test(e)&&(v=!0)),this.options.gfm&&(a=/^\[[ xX]\] /.exec(w),a&&(i=a[0]!=="[ ] ",w=w.replace(/^\[[ xX]\] +/,""))),z.items.push({type:"list_item",raw:e,task:!!a,checked:i,loose:!1,text:w}),z.raw+=e}z.items[z.items.length-1].raw=e.trimRight(),z.items[z.items.length-1].text=w.trimRight(),z.raw=z.raw.trimRight();const S=z.items.length;for(o=0;o<S;o++)if(this.lexer.state.top=!1,z.items[o].tokens=this.lexer.blockTokens(z.items[o].text,[]),!z.loose){const C=z.items[o].tokens.filter(Y=>Y.type==="space"),K=C.length>0&&C.some(Y=>/\n.*\n/.test(Y.raw));z.loose=K}if(z.loose)for(o=0;o<S;o++)z.items[o].loose=!0;return z}}html(t){const n=this.rules.block.html.exec(t);if(n){const e={type:"html",raw:n[0],pre:!this.options.sanitizer&&(n[1]==="pre"||n[1]==="script"||n[1]==="style"),text:n[0]};if(this.options.sanitize){const a=this.options.sanitizer?this.options.sanitizer(n[0]):ge(n[0]);e.type="paragraph",e.text=a,e.tokens=this.lexer.inline(a)}return e}}def(t){const n=this.rules.block.def.exec(t);if(n){const e=n[1].toLowerCase().replace(/\s+/g," "),a=n[2]?n[2].replace(/^<(.*)>$/,"$1").replace(this.rules.inline._escapes,"$1"):"",i=n[3]?n[3].substring(1,n[3].length-1).replace(this.rules.inline._escapes,"$1"):n[3];return{type:"def",tag:e,raw:n[0],href:a,title:i}}}table(t){const n=this.rules.block.table.exec(t);if(n){const e={type:"table",header:Zt(n[1]).map(a=>({text:a})),align:n[2].replace(/^ *|\| *$/g,"").split(/ *\| */),rows:n[3]&&n[3].trim()?n[3].replace(/\n[ \t]*$/,"").split(`
`):[]};if(e.header.length===e.align.length){e.raw=n[0];let a=e.align.length,i,r,o,u;for(i=0;i<a;i++)/^ *-+: *$/.test(e.align[i])?e.align[i]="right":/^ *:-+: *$/.test(e.align[i])?e.align[i]="center":/^ *:-+ *$/.test(e.align[i])?e.align[i]="left":e.align[i]=null;for(a=e.rows.length,i=0;i<a;i++)e.rows[i]=Zt(e.rows[i],e.header.length).map(v=>({text:v}));for(a=e.header.length,r=0;r<a;r++)e.header[r].tokens=this.lexer.inline(e.header[r].text);for(a=e.rows.length,r=0;r<a;r++)for(u=e.rows[r],o=0;o<u.length;o++)u[o].tokens=this.lexer.inline(u[o].text);return e}}}lheading(t){const n=this.rules.block.lheading.exec(t);if(n)return{type:"heading",raw:n[0],depth:n[2].charAt(0)==="="?1:2,text:n[1],tokens:this.lexer.inline(n[1])}}paragraph(t){const n=this.rules.block.paragraph.exec(t);if(n){const e=n[1].charAt(n[1].length-1)===`
`?n[1].slice(0,-1):n[1];return{type:"paragraph",raw:n[0],text:e,tokens:this.lexer.inline(e)}}}text(t){const n=this.rules.block.text.exec(t);if(n)return{type:"text",raw:n[0],text:n[0],tokens:this.lexer.inline(n[0])}}escape(t){const n=this.rules.inline.escape.exec(t);if(n)return{type:"escape",raw:n[0],text:ge(n[1])}}tag(t){const n=this.rules.inline.tag.exec(t);if(n)return!this.lexer.state.inLink&&/^<a /i.test(n[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&/^<\/a>/i.test(n[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&/^<(pre|code|kbd|script)(\s|>)/i.test(n[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(n[0])&&(this.lexer.state.inRawBlock=!1),{type:this.options.sanitize?"text":"html",raw:n[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(n[0]):ge(n[0]):n[0]}}link(t){const n=this.rules.inline.link.exec(t);if(n){const e=n[2].trim();if(!this.options.pedantic&&/^</.test(e)){if(!/>$/.test(e))return;const r=ct(e.slice(0,-1),"\\");if((e.length-r.length)%2===0)return}else{const r=Ia(n[2],"()");if(r>-1){const u=(n[0].indexOf("!")===0?5:4)+n[1].length+r;n[2]=n[2].substring(0,r),n[0]=n[0].substring(0,u).trim(),n[3]=""}}let a=n[2],i="";if(this.options.pedantic){const r=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(a);r&&(a=r[1],i=r[3])}else i=n[3]?n[3].slice(1,-1):"";return a=a.trim(),/^</.test(a)&&(this.options.pedantic&&!/>$/.test(e)?a=a.slice(1):a=a.slice(1,-1)),Gt(n,{href:a&&a.replace(this.rules.inline._escapes,"$1"),title:i&&i.replace(this.rules.inline._escapes,"$1")},n[0],this.lexer)}}reflink(t,n){let e;if((e=this.rules.inline.reflink.exec(t))||(e=this.rules.inline.nolink.exec(t))){let a=(e[2]||e[1]).replace(/\s+/g," ");if(a=n[a.toLowerCase()],!a){const i=e[0].charAt(0);return{type:"text",raw:i,text:i}}return Gt(e,a,e[0],this.lexer)}}emStrong(t,n,e=""){let a=this.rules.inline.emStrong.lDelim.exec(t);if(!a||a[3]&&e.match(/[\p{L}\p{N}]/u))return;const i=a[1]||a[2]||"";if(!i||i&&(e===""||this.rules.inline.punctuation.exec(e))){const r=a[0].length-1;let o,u,v=r,c=0;const d=a[0][0]==="*"?this.rules.inline.emStrong.rDelimAst:this.rules.inline.emStrong.rDelimUnd;for(d.lastIndex=0,n=n.slice(-1*t.length+r);(a=d.exec(n))!=null;){if(o=a[1]||a[2]||a[3]||a[4]||a[5]||a[6],!o)continue;if(u=o.length,a[3]||a[4]){v+=u;continue}else if((a[5]||a[6])&&r%3&&!((r+u)%3)){c+=u;continue}if(v-=u,v>0)continue;u=Math.min(u,u+v+c);const y=t.slice(0,r+a.index+(a[0].length-o.length)+u);if(Math.min(r,u)%2){const I=y.slice(1,-1);return{type:"em",raw:y,text:I,tokens:this.lexer.inlineTokens(I)}}const w=y.slice(2,-2);return{type:"strong",raw:y,text:w,tokens:this.lexer.inlineTokens(w)}}}}codespan(t){const n=this.rules.inline.code.exec(t);if(n){let e=n[2].replace(/\n/g," ");const a=/[^ ]/.test(e),i=/^ /.test(e)&&/ $/.test(e);return a&&i&&(e=e.substring(1,e.length-1)),e=ge(e,!0),{type:"codespan",raw:n[0],text:e}}}br(t){const n=this.rules.inline.br.exec(t);if(n)return{type:"br",raw:n[0]}}del(t){const n=this.rules.inline.del.exec(t);if(n)return{type:"del",raw:n[0],text:n[2],tokens:this.lexer.inlineTokens(n[2])}}autolink(t,n){const e=this.rules.inline.autolink.exec(t);if(e){let a,i;return e[2]==="@"?(a=ge(this.options.mangle?n(e[1]):e[1]),i="mailto:"+a):(a=ge(e[1]),i=a),{type:"link",raw:e[0],text:a,href:i,tokens:[{type:"text",raw:a,text:a}]}}}url(t,n){let e;if(e=this.rules.inline.url.exec(t)){let a,i;if(e[2]==="@")a=ge(this.options.mangle?n(e[0]):e[0]),i="mailto:"+a;else{let r;do r=e[0],e[0]=this.rules.inline._backpedal.exec(e[0])[0];while(r!==e[0]);a=ge(e[0]),e[1]==="www."?i="http:https://"+e[0]:i=e[0]}return{type:"link",raw:e[0],text:a,href:i,tokens:[{type:"text",raw:a,text:a}]}}}inlineText(t,n){const e=this.rules.inline.text.exec(t);if(e){let a;return this.lexer.state.inRawBlock?a=this.options.sanitize?this.options.sanitizer?this.options.sanitizer(e[0]):ge(e[0]):e[0]:a=ge(this.options.smartypants?n(e[0]):e[0]),{type:"text",raw:e[0],text:a}}}}const V={newline:/^(?: *(?:\n|$))+/,code:/^( {4}[^\n]+(?:\n(?: *(?:\n|$))*)?)+/,fences:/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,hr:/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,heading:/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,blockquote:/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/,list:/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/,html:"^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n *)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$))",def:/^ {0,3}\[(label)\]: *(?:\n *)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n *)?| *\n *)(title))? *(?:\n+|$)/,table:gt,lheading:/^((?:.|\n(?!\n))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,_paragraph:/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,text:/^[^\n]+/};V._label=/(?!\s*\])(?:\\.|[^\[\]\\])+/;V._title=/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/;V.def=te(V.def).replace("label",V._label).replace("title",V._title).getRegex();V.bullet=/(?:[*+-]|\d{1,9}[.)])/;V.listItemStart=te(/^( *)(bull) */).replace("bull",V.bullet).getRegex();V.list=te(V.list).replace(/bull/g,V.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+V.def.source+")").getRegex();V._tag="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|section|source|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul";V._comment=/<!--(?!-?>)[\s\S]*?(?:-->|$)/;V.html=te(V.html,"i").replace("comment",V._comment).replace("tag",V._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex();V.paragraph=te(V._paragraph).replace("hr",V.hr).replace("heading"," {0,3}#{1,6} ").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","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",V._tag).getRegex();V.blockquote=te(V.blockquote).replace("paragraph",V.paragraph).getRegex();V.normal={...V};V.gfm={...V.normal,table:"^ *([^\\n ].*\\|.*)\\n {0,3}(?:\\| *)?(:?-+:? *(?:\\| *:?-+:? *)*)(?:\\| *)?(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)"};V.gfm.table=te(V.gfm.table).replace("hr",V.hr).replace("heading"," {0,3}#{1,6} ").replace("blockquote"," {0,3}>").replace("code"," {4}[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",V._tag).getRegex();V.gfm.paragraph=te(V._paragraph).replace("hr",V.hr).replace("heading"," {0,3}#{1,6} ").replace("|lheading","").replace("table",V.gfm.table).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",V._tag).getRegex();V.pedantic={...V.normal,html:te(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",V._comment).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:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:gt,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:te(V.normal._paragraph).replace("hr",V.hr).replace("heading",` *#{1,6} *[^
]`).replace("lheading",V.lheading).replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").getRegex()};const A={escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:gt,tag:"^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>",link:/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/,reflink:/^!?\[(label)\]\[(ref)\]/,nolink:/^!?\[(ref)\](?:\[\])?/,reflinkSearch:"reflink|nolink(?!\\()",emStrong:{lDelim:/^(?:\*+(?:([punct_])|[^\s*]))|^_+(?:([punct*])|([^\s_]))/,rDelimAst:/^(?:[^_*\\]|\\.)*?\_\_(?:[^_*\\]|\\.)*?\*(?:[^_*\\]|\\.)*?(?=\_\_)|(?:[^*\\]|\\.)+(?=[^*])|[punct_](\*+)(?=[\s]|$)|(?:[^punct*_\s\\]|\\.)(\*+)(?=[punct_\s]|$)|[punct_\s](\*+)(?=[^punct*_\s])|[\s](\*+)(?=[punct_])|[punct_](\*+)(?=[punct_])|(?:[^punct*_\s\\]|\\.)(\*+)(?=[^punct*_\s])/,rDelimUnd:/^(?:[^_*\\]|\\.)*?\*\*(?:[^_*\\]|\\.)*?\_(?:[^_*\\]|\\.)*?(?=\*\*)|(?:[^_\\]|\\.)+(?=[^_])|[punct*](\_+)(?=[\s]|$)|(?:[^punct*_\s\\]|\\.)(\_+)(?=[punct*\s]|$)|[punct*\s](\_+)(?=[^punct*_\s])|[\s](\_+)(?=[punct*])|[punct*](\_+)(?=[punct*])/},code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,br:/^( {2,}|\\)\n(?!\s*$)/,del:gt,text:/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,punctuation:/^([\spunctuation])/};A._punctuation="!\"#$%&'()+\\-.,/:;<=>?@\\[\\]`^{|}~";A.punctuation=te(A.punctuation).replace(/punctuation/g,A._punctuation).getRegex();A.blockSkip=/\[[^\]]*?\]\([^\)]*?\)|`[^`]*?`|<[^>]*?>/g;A.escapedEmSt=/(?:^|[^\\])(?:\\\\)*\\[*_]/g;A._comment=te(V._comment).replace("(?:-->|$)","-->").getRegex();A.emStrong.lDelim=te(A.emStrong.lDelim).replace(/punct/g,A._punctuation).getRegex();A.emStrong.rDelimAst=te(A.emStrong.rDelimAst,"g").replace(/punct/g,A._punctuation).getRegex();A.emStrong.rDelimUnd=te(A.emStrong.rDelimUnd,"g").replace(/punct/g,A._punctuation).getRegex();A._escapes=/\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g;A._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/;A._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])?)+(?![-_])/;A.autolink=te(A.autolink).replace("scheme",A._scheme).replace("email",A._email).getRegex();A._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/;A.tag=te(A.tag).replace("comment",A._comment).replace("attribute",A._attribute).getRegex();A._label=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/;A._href=/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/;A._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/;A.link=te(A.link).replace("label",A._label).replace("href",A._href).replace("title",A._title).getRegex();A.reflink=te(A.reflink).replace("label",A._label).replace("ref",V._label).getRegex();A.nolink=te(A.nolink).replace("ref",V._label).getRegex();A.reflinkSearch=te(A.reflinkSearch,"g").replace("reflink",A.reflink).replace("nolink",A.nolink).getRegex();A.normal={...A};A.pedantic={...A.normal,strong:{start:/^__|\*\*/,middle:/^__(?=\S)([\s\S]*?\S)__(?!_)|^\*\*(?=\S)([\s\S]*?\S)\*\*(?!\*)/,endAst:/\*\*(?!\*)/g,endUnd:/__(?!_)/g},em:{start:/^_|\*/,middle:/^()\*(?=\S)([\s\S]*?\S)\*(?!\*)|^_(?=\S)([\s\S]*?\S)_(?!_)/,endAst:/\*(?!\*)/g,endUnd:/_(?!_)/g},link:te(/^!?\[(label)\]\((.*?)\)/).replace("label",A._label).getRegex(),reflink:te(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",A._label).getRegex()};A.gfm={...A.normal,escape:te(A.escape).replace("])","~|])").getRegex(),_extended_email:/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/,url:/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])([\s\S]*?[^\s~])\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/};A.gfm.url=te(A.gfm.url,"i").replace("email",A.gfm._extended_email).getRegex();A.breaks={...A.gfm,br:te(A.br).replace("{2,}","*").getRegex(),text:te(A.gfm.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()};function ja(l){return l.replace(/---/g,"—").replace(/--/g,"–").replace(/(^|[-\u2014/(\[{"\s])'/g,"$1‘").replace(/'/g,"’").replace(/(^|[-\u2014/(\[{\u2018\s])"/g,"$1“").replace(/"/g,"”").replace(/\.{3}/g,"…")}function Yt(l){let t="",n,e;const a=l.length;for(n=0;n<a;n++)e=l.charCodeAt(n),Math.random()>.5&&(e="x"+e.toString(16)),t+="&#"+e+";";return t}class He{constructor(t){this.tokens=[],this.tokens.links=Object.create(null),this.options=t||Be,this.options.tokenizer=this.options.tokenizer||new Ht,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};const n={block:V.normal,inline:A.normal};this.options.pedantic?(n.block=V.pedantic,n.inline=A.pedantic):this.options.gfm&&(n.block=V.gfm,this.options.breaks?n.inline=A.breaks:n.inline=A.gfm),this.tokenizer.rules=n}static get rules(){return{block:V,inline:A}}static lex(t,n){return new He(n).lex(t)}static lexInline(t,n){return new He(n).inlineTokens(t)}lex(t){t=t.replace(/\r\n|\r/g,`
`),this.blockTokens(t,this.tokens);let n;for(;n=this.inlineQueue.shift();)this.inlineTokens(n.src,n.tokens);return this.tokens}blockTokens(t,n=[]){this.options.pedantic?t=t.replace(/\t/g," ").replace(/^ +$/gm,""):t=t.replace(/^( *)(\t+)/gm,(o,u,v)=>u+" ".repeat(v.length));let e,a,i,r;for(;t;)if(!(this.options.extensions&&this.options.extensions.block&&this.options.extensions.block.some(o=>(e=o.call({lexer:this},t,n))?(t=t.substring(e.raw.length),n.push(e),!0):!1))){if(e=this.tokenizer.space(t)){t=t.substring(e.raw.length),e.raw.length===1&&n.length>0?n[n.length-1].raw+=`
`:n.push(e);continue}if(e=this.tokenizer.code(t)){t=t.substring(e.raw.length),a=n[n.length-1],a&&(a.type==="paragraph"||a.type==="text")?(a.raw+=`
`+e.raw,a.text+=`
`+e.text,this.inlineQueue[this.inlineQueue.length-1].src=a.text):n.push(e);continue}if(e=this.tokenizer.fences(t)){t=t.substring(e.raw.length),n.push(e);continue}if(e=this.tokenizer.heading(t)){t=t.substring(e.raw.length),n.push(e);continue}if(e=this.tokenizer.hr(t)){t=t.substring(e.raw.length),n.push(e);continue}if(e=this.tokenizer.blockquote(t)){t=t.substring(e.raw.length),n.push(e);continue}if(e=this.tokenizer.list(t)){t=t.substring(e.raw.length),n.push(e);continue}if(e=this.tokenizer.html(t)){t=t.substring(e.raw.length),n.push(e);continue}if(e=this.tokenizer.def(t)){t=t.substring(e.raw.length),a=n[n.length-1],a&&(a.type==="paragraph"||a.type==="text")?(a.raw+=`
`+e.raw,a.text+=`
`+e.raw,this.inlineQueue[this.inlineQueue.length-1].src=a.text):this.tokens.links[e.tag]||(this.tokens.links[e.tag]={href:e.href,title:e.title});continue}if(e=this.tokenizer.table(t)){t=t.substring(e.raw.length),n.push(e);continue}if(e=this.tokenizer.lheading(t)){t=t.substring(e.raw.length),n.push(e);continue}if(i=t,this.options.extensions&&this.options.extensions.startBlock){let o=1/0;const u=t.slice(1);let v;this.options.extensions.startBlock.forEach(function(c){v=c.call({lexer:this},u),typeof v=="number"&&v>=0&&(o=Math.min(o,v))}),o<1/0&&o>=0&&(i=t.substring(0,o+1))}if(this.state.top&&(e=this.tokenizer.paragraph(i))){a=n[n.length-1],r&&a.type==="paragraph"?(a.raw+=`
`+e.raw,a.text+=`
`+e.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=a.text):n.push(e),r=i.length!==t.length,t=t.substring(e.raw.length);continue}if(e=this.tokenizer.text(t)){t=t.substring(e.raw.length),a=n[n.length-1],a&&a.type==="text"?(a.raw+=`
`+e.raw,a.text+=`
`+e.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=a.text):n.push(e);continue}if(t){const o="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(o);break}else throw new Error(o)}}return this.state.top=!0,n}inline(t,n=[]){return this.inlineQueue.push({src:t,tokens:n}),n}inlineTokens(t,n=[]){let e,a,i,r=t,o,u,v;if(this.tokens.links){const c=Object.keys(this.tokens.links);if(c.length>0)for(;(o=this.tokenizer.rules.inline.reflinkSearch.exec(r))!=null;)c.includes(o[0].slice(o[0].lastIndexOf("[")+1,-1))&&(r=r.slice(0,o.index)+"["+Kt("a",o[0].length-2)+"]"+r.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(o=this.tokenizer.rules.inline.blockSkip.exec(r))!=null;)r=r.slice(0,o.index)+"["+Kt("a",o[0].length-2)+"]"+r.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;(o=this.tokenizer.rules.inline.escapedEmSt.exec(r))!=null;)r=r.slice(0,o.index+o[0].length-2)+"++"+r.slice(this.tokenizer.rules.inline.escapedEmSt.lastIndex),this.tokenizer.rules.inline.escapedEmSt.lastIndex--;for(;t;)if(u||(v=""),u=!1,!(this.options.extensions&&this.options.extensions.inline&&this.options.extensions.inline.some(c=>(e=c.call({lexer:this},t,n))?(t=t.substring(e.raw.length),n.push(e),!0):!1))){if(e=this.tokenizer.escape(t)){t=t.substring(e.raw.length),n.push(e);continue}if(e=this.tokenizer.tag(t)){t=t.substring(e.raw.length),a=n[n.length-1],a&&e.type==="text"&&a.type==="text"?(a.raw+=e.raw,a.text+=e.text):n.push(e);continue}if(e=this.tokenizer.link(t)){t=t.substring(e.raw.length),n.push(e);continue}if(e=this.tokenizer.reflink(t,this.tokens.links)){t=t.substring(e.raw.length),a=n[n.length-1],a&&e.type==="text"&&a.type==="text"?(a.raw+=e.raw,a.text+=e.text):n.push(e);continue}if(e=this.tokenizer.emStrong(t,r,v)){t=t.substring(e.raw.length),n.push(e);continue}if(e=this.tokenizer.codespan(t)){t=t.substring(e.raw.length),n.push(e);continue}if(e=this.tokenizer.br(t)){t=t.substring(e.raw.length),n.push(e);continue}if(e=this.tokenizer.del(t)){t=t.substring(e.raw.length),n.push(e);continue}if(e=this.tokenizer.autolink(t,Yt)){t=t.substring(e.raw.length),n.push(e);continue}if(!this.state.inLink&&(e=this.tokenizer.url(t,Yt))){t=t.substring(e.raw.length),n.push(e);continue}if(i=t,this.options.extensions&&this.options.extensions.startInline){let c=1/0;const d=t.slice(1);let y;this.options.extensions.startInline.forEach(function(w){y=w.call({lexer:this},d),typeof y=="number"&&y>=0&&(c=Math.min(c,y))}),c<1/0&&c>=0&&(i=t.substring(0,c+1))}if(e=this.tokenizer.inlineText(i,ja)){t=t.substring(e.raw.length),e.raw.slice(-1)!=="_"&&(v=e.raw.slice(-1)),u=!0,a=n[n.length-1],a&&a.type==="text"?(a.raw+=e.raw,a.text+=e.text):n.push(e);continue}if(t){const c="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(c);break}else throw new Error(c)}}return n}}class Vt{constructor(t){this.options=t||Be}code(t,n,e){const a=(n||"").match(/\S*/)[0];if(this.options.highlight){const i=this.options.highlight(t,a);i!=null&&i!==t&&(e=!0,t=i)}return t=t.replace(/\n$/,"")+`
`,a?'<pre><code class="'+this.options.langPrefix+ge(a)+'">'+(e?t:ge(t,!0))+`</code></pre>
`:"<pre><code>"+(e?t:ge(t,!0))+`</code></pre>
`}blockquote(t){return`<blockquote>
${t}</blockquote>
`}html(t){return t}heading(t,n,e,a){if(this.options.headerIds){const i=this.options.headerPrefix+a.slug(e);return`<h${n} id="${i}">${t}</h${n}>
`}return`<h${n}>${t}</h${n}>
`}hr(){return this.options.xhtml?`<hr/>
`:`<hr>
`}list(t,n,e){const a=n?"ol":"ul",i=n&&e!==1?' start="'+e+'"':"";return"<"+a+i+`>
`+t+"</"+a+`>
`}listitem(t){return`<li>${t}</li>
`}checkbox(t){return"<input "+(t?'checked="" ':"")+'disabled="" type="checkbox"'+(this.options.xhtml?" /":"")+"> "}paragraph(t){return`<p>${t}</p>
`}table(t,n){return n&&(n=`<tbody>${n}</tbody>`),`<table>
<thead>
`+t+`</thead>
`+n+`</table>
`}tablerow(t){return`<tr>
${t}</tr>
`}tablecell(t,n){const e=n.header?"th":"td";return(n.align?`<${e} align="${n.align}">`:`<${e}>`)+t+`</${e}>
`}strong(t){return`<strong>${t}</strong>`}em(t){return`<em>${t}</em>`}codespan(t){return`<code>${t}</code>`}br(){return this.options.xhtml?"<br/>":"<br>"}del(t){return`<del>${t}</del>`}link(t,n,e){if(t=qt(this.options.sanitize,this.options.baseUrl,t),t===null)return e;let a='<a href="'+t+'"';return n&&(a+=' title="'+n+'"'),a+=">"+e+"</a>",a}image(t,n,e){if(t=qt(this.options.sanitize,this.options.baseUrl,t),t===null)return e;let a=`<img src="${t}" alt="${e}"`;return n&&(a+=` title="${n}"`),a+=this.options.xhtml?"/>":">",a}text(t){return t}}class Nn{strong(t){return t}em(t){return t}codespan(t){return t}del(t){return t}html(t){return t}text(t){return t}link(t,n,e){return""+e}image(t,n,e){return""+e}br(){return""}}class Wn{constructor(){this.seen={}}serialize(t){return t.toLowerCase().trim().replace(/<[!\/a-z].*?>/ig,"").replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g,"").replace(/\s/g,"-")}getNextSafeSlug(t,n){let e=t,a=0;if(this.seen.hasOwnProperty(e)){a=this.seen[t];do a++,e=t+"-"+a;while(this.seen.hasOwnProperty(e))}return n||(this.seen[t]=a,this.seen[e]=0),e}slug(t,n={}){const e=this.serialize(t);return this.getNextSafeSlug(e,n.dryrun)}}class Ve{constructor(t){this.options=t||Be,this.options.renderer=this.options.renderer||new Vt,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new Nn,this.slugger=new Wn}static parse(t,n){return new Ve(n).parse(t)}static parseInline(t,n){return new Ve(n).parseInline(t)}parse(t,n=!0){let e="",a,i,r,o,u,v,c,d,y,w,I,s,g,z,j,S,C,K,Y;const W=t.length;for(a=0;a<W;a++){if(w=t[a],this.options.extensions&&this.options.extensions.renderers&&this.options.extensions.renderers[w.type]&&(Y=this.options.extensions.renderers[w.type].call({parser:this},w),Y!==!1||!["space","hr","heading","code","table","blockquote","list","html","paragraph","text"].includes(w.type))){e+=Y||"";continue}switch(w.type){case"space":continue;case"hr":{e+=this.renderer.hr();continue}case"heading":{e+=this.renderer.heading(this.parseInline(w.tokens),w.depth,Bn(this.parseInline(w.tokens,this.textRenderer)),this.slugger);continue}case"code":{e+=this.renderer.code(w.text,w.lang,w.escaped);continue}case"table":{for(d="",c="",o=w.header.length,i=0;i<o;i++)c+=this.renderer.tablecell(this.parseInline(w.header[i].tokens),{header:!0,align:w.align[i]});for(d+=this.renderer.tablerow(c),y="",o=w.rows.length,i=0;i<o;i++){for(v=w.rows[i],c="",u=v.length,r=0;r<u;r++)c+=this.renderer.tablecell(this.parseInline(v[r].tokens),{header:!1,align:w.align[r]});y+=this.renderer.tablerow(c)}e+=this.renderer.table(d,y);continue}case"blockquote":{y=this.parse(w.tokens),e+=this.renderer.blockquote(y);continue}case"list":{for(I=w.ordered,s=w.start,g=w.loose,o=w.items.length,y="",i=0;i<o;i++)j=w.items[i],S=j.checked,C=j.task,z="",j.task&&(K=this.renderer.checkbox(S),g?j.tokens.length>0&&j.tokens[0].type==="paragraph"?(j.tokens[0].text=K+" "+j.tokens[0].text,j.tokens[0].tokens&&j.tokens[0].tokens.length>0&&j.tokens[0].tokens[0].type==="text"&&(j.tokens[0].tokens[0].text=K+" "+j.tokens[0].tokens[0].text)):j.tokens.unshift({type:"text",text:K}):z+=K),z+=this.parse(j.tokens,g),y+=this.renderer.listitem(z,C,S);e+=this.renderer.list(y,I,s);continue}case"html":{e+=this.renderer.html(w.text);continue}case"paragraph":{e+=this.renderer.paragraph(this.parseInline(w.tokens));continue}case"text":{for(y=w.tokens?this.parseInline(w.tokens):w.text;a+1<W&&t[a+1].type==="text";)w=t[++a],y+=`
`+(w.tokens?this.parseInline(w.tokens):w.text);e+=n?this.renderer.paragraph(y):y;continue}default:{const ce='Token with "'+w.type+'" type was not found.';if(this.options.silent){console.error(ce);return}else throw new Error(ce)}}}return e}parseInline(t,n){n=n||this.renderer;let e="",a,i,r;const o=t.length;for(a=0;a<o;a++){if(i=t[a],this.options.extensions&&this.options.extensions.renderers&&this.options.extensions.renderers[i.type]&&(r=this.options.extensions.renderers[i.type].call({parser:this},i),r!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(i.type))){e+=r||"";continue}switch(i.type){case"escape":{e+=n.text(i.text);break}case"html":{e+=n.html(i.text);break}case"link":{e+=n.link(i.href,i.title,this.parseInline(i.tokens,n));break}case"image":{e+=n.image(i.href,i.title,i.text);break}case"strong":{e+=n.strong(this.parseInline(i.tokens,n));break}case"em":{e+=n.em(this.parseInline(i.tokens,n));break}case"codespan":{e+=n.codespan(i.text);break}case"br":{e+=n.br();break}case"del":{e+=n.del(this.parseInline(i.tokens,n));break}case"text":{e+=n.text(i.text);break}default:{const u='Token with "'+i.type+'" type was not found.';if(this.options.silent){console.error(u);return}else throw new Error(u)}}}return e}}class ft{constructor(t){this.options=t||Be}preprocess(t){return t}postprocess(t){return t}}Wt(ft,"passThroughHooks",new Set(["preprocess","postprocess"]));function Ta(l,t,n){return e=>{if(e.message+=`
Please report this to https://github.com/markedjs/marked.`,l){const a="<p>An error occurred:</p><pre>"+ge(e.message+"",!0)+"</pre>";if(t)return Promise.resolve(a);if(n){n(null,a);return}return a}if(t)return Promise.reject(e);if(n){n(e);return}throw e}}function Fn(l,t){return(n,e,a)=>{typeof e=="function"&&(a=e,e=null);const i={...e};e={...D.defaults,...i};const r=Ta(e.silent,e.async,a);if(typeof n>"u"||n===null)return r(new Error("marked(): input parameter is undefined or null"));if(typeof n!="string")return r(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(n)+", string expected"));if(Ea(e),e.hooks&&(e.hooks.options=e),a){const o=e.highlight;let u;try{e.hooks&&(n=e.hooks.preprocess(n)),u=l(n,e)}catch(d){return r(d)}const v=function(d){let y;if(!d)try{e.walkTokens&&D.walkTokens(u,e.walkTokens),y=t(u,e),e.hooks&&(y=e.hooks.postprocess(y))}catch(w){d=w}return e.highlight=o,d?r(d):a(null,y)};if(!o||o.length<3||(delete e.highlight,!u.length))return v();let c=0;D.walkTokens(u,function(d){d.type==="code"&&(c++,setTimeout(()=>{o(d.text,d.lang,function(y,w){if(y)return v(y);w!=null&&w!==d.text&&(d.text=w,d.escaped=!0),c--,c===0&&v()})},0))}),c===0&&v();return}if(e.async)return Promise.resolve(e.hooks?e.hooks.preprocess(n):n).then(o=>l(o,e)).then(o=>e.walkTokens?Promise.all(D.walkTokens(o,e.walkTokens)).then(()=>o):o).then(o=>t(o,e)).then(o=>e.hooks?e.hooks.postprocess(o):o).catch(r);try{e.hooks&&(n=e.hooks.preprocess(n));const o=l(n,e);e.walkTokens&&D.walkTokens(o,e.walkTokens);let u=t(o,e);return e.hooks&&(u=e.hooks.postprocess(u)),u}catch(o){return r(o)}}}function D(l,t,n){return Fn(He.lex,Ve.parse)(l,t,n)}D.options=D.setOptions=function(l){return D.defaults={...D.defaults,...l},wa(D.defaults),D};D.getDefaults=Dn;D.defaults=Be;D.use=function(...l){const t=D.defaults.extensions||{renderers:{},childTokens:{}};l.forEach(n=>{const e={...n};if(e.async=D.defaults.async||e.async||!1,n.extensions&&(n.extensions.forEach(a=>{if(!a.name)throw new Error("extension name required");if(a.renderer){const i=t.renderers[a.name];i?t.renderers[a.name]=function(...r){let o=a.renderer.apply(this,r);return o===!1&&(o=i.apply(this,r)),o}:t.renderers[a.name]=a.renderer}if(a.tokenizer){if(!a.level||a.level!=="block"&&a.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");t[a.level]?t[a.level].unshift(a.tokenizer):t[a.level]=[a.tokenizer],a.start&&(a.level==="block"?t.startBlock?t.startBlock.push(a.start):t.startBlock=[a.start]:a.level==="inline"&&(t.startInline?t.startInline.push(a.start):t.startInline=[a.start]))}a.childTokens&&(t.childTokens[a.name]=a.childTokens)}),e.extensions=t),n.renderer){const a=D.defaults.renderer||new Vt;for(const i in n.renderer){const r=a[i];a[i]=(...o)=>{let u=n.renderer[i].apply(a,o);return u===!1&&(u=r.apply(a,o)),u}}e.renderer=a}if(n.tokenizer){const a=D.defaults.tokenizer||new Ht;for(const i in n.tokenizer){const r=a[i];a[i]=(...o)=>{let u=n.tokenizer[i].apply(a,o);return u===!1&&(u=r.apply(a,o)),u}}e.tokenizer=a}if(n.hooks){const a=D.defaults.hooks||new ft;for(const i in n.hooks){const r=a[i];ft.passThroughHooks.has(i)?a[i]=o=>{if(D.defaults.async)return Promise.resolve(n.hooks[i].call(a,o)).then(v=>r.call(a,v));const u=n.hooks[i].call(a,o);return r.call(a,u)}:a[i]=(...o)=>{let u=n.hooks[i].apply(a,o);return u===!1&&(u=r.apply(a,o)),u}}e.hooks=a}if(n.walkTokens){const a=D.defaults.walkTokens;e.walkTokens=function(i){let r=[];return r.push(n.walkTokens.call(this,i)),a&&(r=r.concat(a.call(this,i))),r}}D.setOptions(e)})};D.walkTokens=function(l,t){let n=[];for(const e of l)switch(n=n.concat(t.call(D,e)),e.type){case"table":{for(const a of e.header)n=n.concat(D.walkTokens(a.tokens,t));for(const a of e.rows)for(const i of a)n=n.concat(D.walkTokens(i.tokens,t));break}case"list":{n=n.concat(D.walkTokens(e.items,t));break}default:D.defaults.extensions&&D.defaults.extensions.childTokens&&D.defaults.extensions.childTokens[e.type]?D.defaults.extensions.childTokens[e.type].forEach(function(a){n=n.concat(D.walkTokens(e[a],t))}):e.tokens&&(n=n.concat(D.walkTokens(e.tokens,t)))}return n};D.parseInline=Fn(He.lexInline,Ve.parseInline);D.Parser=Ve;D.parser=Ve.parse;D.Renderer=Vt;D.TextRenderer=Nn;D.Lexer=He;D.lexer=He.lex;D.Tokenizer=Ht;D.Slugger=Wn;D.Hooks=ft;D.parse=D;D.options;D.setOptions;D.use;D.walkTokens;D.parseInline;Ve.parse;He.lex;const Qt=({size:l})=>P("svg",{class:"wl-close-icon",viewBox:"0 0 1024 1024",width:l,height:l},[P("path",{d:"M697.173 85.333h-369.92c-144.64 0-241.92 101.547-241.92 252.587v348.587c0 150.613 97.28 252.16 241.92 252.16h369.92c144.64 0 241.494-101.547 241.494-252.16V337.92c0-151.04-96.854-252.587-241.494-252.587z",fill:"currentColor"}),P("path",{d:"m640.683 587.52-75.947-75.861 75.904-75.862a37.29 37.29 0 0 0 0-52.778 37.205 37.205 0 0 0-52.779 0l-75.946 75.818-75.862-75.946a37.419 37.419 0 0 0-52.821 0 37.419 37.419 0 0 0 0 52.821l75.947 75.947-75.776 75.733a37.29 37.29 0 1 0 52.778 52.821l75.776-75.776 75.947 75.947a37.376 37.376 0 0 0 52.779-52.821z",fill:"#888"})]),Ua=()=>P("svg",{viewBox:"0 0 1024 1024",width:"24",height:"24"},P("path",{d:"m341.013 394.667 27.755 393.45h271.83l27.733-393.45h64.106l-28.01 397.952a64 64 0 0 1-63.83 59.498H368.768a64 64 0 0 1-63.83-59.52l-28.053-397.93h64.128zm139.307 19.818v298.667h-64V414.485h64zm117.013 0v298.667h-64V414.485h64zM181.333 288h640v64h-640v-64zm453.483-106.667v64h-256v-64h256z",fill:"red"})),Ma=()=>P("svg",{viewBox:"0 0 1024 1024",width:"24",height:"24"},P("path",{d:"M563.2 463.3 677 540c1.7 1.2 3.7 1.8 5.8 1.8.7 0 1.4-.1 2-.2 2.7-.5 5.1-2.1 6.6-4.4l25.3-37.8c1.5-2.3 2.1-5.1 1.6-7.8s-2.1-5.1-4.4-6.6l-73.6-49.1 73.6-49.1c2.3-1.5 3.9-3.9 4.4-6.6.5-2.7 0-5.5-1.6-7.8l-25.3-37.8a10.1 10.1 0 0 0-6.6-4.4c-.7-.1-1.3-.2-2-.2-2.1 0-4.1.6-5.8 1.8l-113.8 76.6c-9.2 6.2-14.7 16.4-14.7 27.5.1 11 5.5 21.3 14.7 27.4zM387 348.8h-45.5c-5.7 0-10.4 4.7-10.4 10.4v153.3c0 5.7 4.7 10.4 10.4 10.4H387c5.7 0 10.4-4.7 10.4-10.4V359.2c0-5.7-4.7-10.4-10.4-10.4zm333.8 241.3-41-20a10.3 10.3 0 0 0-8.1-.5c-2.6.9-4.8 2.9-5.9 5.4-30.1 64.9-93.1 109.1-164.4 115.2-5.7.5-9.9 5.5-9.5 11.2l3.9 45.5c.5 5.3 5 9.5 10.3 9.5h.9c94.8-8 178.5-66.5 218.6-152.7 2.4-5 .3-11.2-4.8-13.6zm186-186.1c-11.9-42-30.5-81.4-55.2-117.1-24.1-34.9-53.5-65.6-87.5-91.2-33.9-25.6-71.5-45.5-111.6-59.2-41.2-14-84.1-21.1-127.8-21.1h-1.2c-75.4 0-148.8 21.4-212.5 61.7-63.7 40.3-114.3 97.6-146.5 165.8-32.2 68.1-44.3 143.6-35.1 218.4 9.3 74.8 39.4 145 87.3 203.3.1.2.3.3.4.5l36.2 38.4c1.1 1.2 2.5 2.1 3.9 2.6 73.3 66.7 168.2 103.5 267.5 103.5 73.3 0 145.2-20.3 207.7-58.7 37.3-22.9 70.3-51.5 98.1-85 27.1-32.7 48.7-69.5 64.2-109.1 15.5-39.7 24.4-81.3 26.6-123.8 2.4-43.6-2.5-87-14.5-129zm-60.5 181.1c-8.3 37-22.8 72-43 104-19.7 31.1-44.3 58.6-73.1 81.7-28.8 23.1-61 41-95.7 53.4-35.6 12.7-72.9 19.1-110.9 19.1-82.6 0-161.7-30.6-222.8-86.2l-34.1-35.8c-23.9-29.3-42.4-62.2-55.1-97.7-12.4-34.7-18.8-71-19.2-107.9-.4-36.9 5.4-73.3 17.1-108.2 12-35.8 30-69.2 53.4-99.1 31.7-40.4 71.1-72 117.2-94.1 44.5-21.3 94-32.6 143.4-32.6 49.3 0 97 10.8 141.8 32 34.3 16.3 65.3 38.1 92 64.8 26.1 26 47.5 56 63.6 89.2 16.2 33.2 26.6 68.5 31 105.1 4.6 37.5 2.7 75.3-5.6 112.3z",fill:"currentColor"})),Pa=()=>P("svg",{viewBox:"0 0 1024 1024",width:"24",height:"24"},[P("path",{d:"M784 112H240c-88 0-160 72-160 160v480c0 88 72 160 160 160h544c88 0 160-72 160-160V272c0-88-72-160-160-160zm96 640c0 52.8-43.2 96-96 96H240c-52.8 0-96-43.2-96-96V272c0-52.8 43.2-96 96-96h544c52.8 0 96 43.2 96 96v480z",fill:"currentColor"}),P("path",{d:"M352 480c52.8 0 96-43.2 96-96s-43.2-96-96-96-96 43.2-96 96 43.2 96 96 96zm0-128c17.6 0 32 14.4 32 32s-14.4 32-32 32-32-14.4-32-32 14.4-32 32-32zm462.4 379.2-3.2-3.2-177.6-177.6c-25.6-25.6-65.6-25.6-91.2 0l-80 80-36.8-36.8c-25.6-25.6-65.6-25.6-91.2 0L200 728c-4.8 6.4-8 14.4-8 24 0 17.6 14.4 32 32 32 9.6 0 16-3.2 22.4-9.6L380.8 640l134.4 134.4c6.4 6.4 14.4 9.6 24 9.6 17.6 0 32-14.4 32-32 0-9.6-4.8-17.6-9.6-24l-52.8-52.8 80-80L769.6 776c6.4 4.8 12.8 8 20.8 8 17.6 0 32-14.4 32-32 0-8-3.2-16-8-20.8z",fill:"currentColor"})]),Oa=({active:l=!1})=>P("svg",{viewBox:"0 0 1024 1024",width:"24",height:"24"},[P("path",{d:"M850.654 323.804c-11.042-25.625-26.862-48.532-46.885-68.225-20.022-19.61-43.258-34.936-69.213-45.73-26.78-11.124-55.124-16.727-84.375-16.727-40.622 0-80.256 11.123-114.698 32.135A214.79 214.79 0 0 0 512 241.819a214.79 214.79 0 0 0-23.483-16.562c-34.442-21.012-74.076-32.135-114.698-32.135-29.25 0-57.595 5.603-84.375 16.727-25.872 10.711-49.19 26.12-69.213 45.73-20.105 19.693-35.843 42.6-46.885 68.225-11.453 26.615-17.303 54.877-17.303 83.963 0 27.439 5.603 56.03 16.727 85.117 9.31 24.307 22.659 49.52 39.715 74.981 27.027 40.293 64.188 82.316 110.33 124.915 76.465 70.615 152.189 119.394 155.402 121.371l19.528 12.525c8.652 5.52 19.776 5.52 28.427 0l19.529-12.525c3.213-2.06 78.854-50.756 155.401-121.371 46.143-42.6 83.304-84.622 110.33-124.915 17.057-25.46 30.487-50.674 39.716-74.981 11.124-29.087 16.727-57.678 16.727-85.117.082-29.086-5.768-57.348-17.221-83.963z"+(l?"":"M512 761.5S218.665 573.55 218.665 407.767c0-83.963 69.461-152.023 155.154-152.023 60.233 0 112.473 33.618 138.181 82.727 25.708-49.109 77.948-82.727 138.18-82.727 85.694 0 155.155 68.06 155.155 152.023C805.335 573.551 512 761.5 512 761.5z"),fill:l?"red":"currentColor"})]),Da=()=>P("svg",{viewBox:"0 0 1024 1024",width:"24",height:"24"},[P("path",{d:"M710.816 654.301c70.323-96.639 61.084-230.578-23.705-314.843-46.098-46.098-107.183-71.109-172.28-71.109-65.008 0-126.092 25.444-172.28 71.109-45.227 46.098-70.756 107.183-70.756 172.106 0 64.923 25.444 126.007 71.194 172.106 46.099 46.098 107.184 71.109 172.28 71.109 51.414 0 100.648-16.212 142.824-47.404l126.53 126.006c7.058 7.06 16.297 10.979 26.406 10.979 10.105 0 19.343-3.919 26.402-10.979 14.467-14.467 14.467-38.172 0-52.723L710.816 654.301zm-315.107-23.265c-65.88-65.88-65.88-172.54 0-238.42 32.069-32.07 74.245-49.149 119.471-49.149 45.227 0 87.407 17.603 119.472 49.149 65.88 65.879 65.88 172.539 0 238.42-63.612 63.178-175.242 63.178-238.943 0zm0 0",fill:"currentColor"}),P("path",{d:"M703.319 121.603H321.03c-109.8 0-199.469 89.146-199.469 199.38v382.034c0 109.796 89.236 199.38 199.469 199.38h207.397c20.653 0 37.384-16.645 37.384-37.299 0-20.649-16.731-37.296-37.384-37.296H321.03c-68.582 0-124.352-55.77-124.352-124.267V321.421c0-68.496 55.77-124.267 124.352-124.267h382.289c68.582 0 124.352 55.771 124.352 124.267V524.72c0 20.654 16.736 37.299 37.385 37.299 20.654 0 37.384-16.645 37.384-37.299V320.549c-.085-109.8-89.321-198.946-199.121-198.946zm0 0",fill:"currentColor"})]),Ha=()=>P("svg",{width:"16",height:"16",ariaHidden:"true"},P("path",{d:"M14.85 3H1.15C.52 3 0 3.52 0 4.15v7.69C0 12.48.52 13 1.15 13h13.69c.64 0 1.15-.52 1.15-1.15v-7.7C16 3.52 15.48 3 14.85 3zM9 11H7V8L5.5 9.92 4 8v3H2V5h2l1.5 2L7 5h2v6zm2.99.5L9.5 8H11V5h2v3h1.5l-2.51 3.5z",fill:"currentColor"})),Va=()=>P("svg",{viewBox:"0 0 1024 1024",width:"24",height:"24"},P("path",{d:"M810.667 213.333a64 64 0 0 1 64 64V704a64 64 0 0 1-64 64H478.336l-146.645 96.107a21.333 21.333 0 0 1-33.024-17.856V768h-85.334a64 64 0 0 1-64-64V277.333a64 64 0 0 1 64-64h597.334zm0 64H213.333V704h149.334v63.296L459.243 704h351.424V277.333zm-271.36 213.334v64h-176.64v-64h176.64zm122.026-128v64H362.667v-64h298.666z",fill:"currentColor"})),Ba=()=>P("svg",{viewBox:"0 0 1024 1024",width:"24",height:"24"},P("path",{d:"M813.039 318.772L480.53 651.278H360.718V531.463L693.227 198.961C697.904 194.284 704.027 192 710.157 192C716.302 192 722.436 194.284 727.114 198.961L813.039 284.88C817.72 289.561 820 295.684 820 301.825C820 307.95 817.72 314.093 813.039 318.772ZM710.172 261.888L420.624 551.431V591.376H460.561L750.109 301.825L710.172 261.888ZM490.517 291.845H240.906V771.09H720.156V521.479C720.156 504.947 733.559 491.529 750.109 491.529C766.653 491.529 780.063 504.947 780.063 521.479V791.059C780.063 813.118 762.18 831 740.125 831H220.937C198.882 831 181 813.118 181 791.059V271.872C181 249.817 198.882 231.935 220.937 231.935H490.517C507.06 231.935 520.47 245.352 520.47 261.888C520.47 278.424 507.06 291.845 490.517 291.845Z",fill:"currentColor"})),Na=()=>P("svg",{class:"verified-icon",viewBox:"0 0 1024 1024",width:"14",height:"14"},P("path",{d:"m894.4 461.56-54.4-63.2c-10.4-12-18.8-34.4-18.8-50.4v-68c0-42.4-34.8-77.2-77.2-77.2h-68c-15.6 0-38.4-8.4-50.4-18.8l-63.2-54.4c-27.6-23.6-72.8-23.6-100.8 0l-62.8 54.8c-12 10-34.8 18.4-50.4 18.4h-69.2c-42.4 0-77.2 34.8-77.2 77.2v68.4c0 15.6-8.4 38-18.4 50l-54 63.6c-23.2 27.6-23.2 72.4 0 100l54 63.6c10 12 18.4 34.4 18.4 50v68.4c0 42.4 34.8 77.2 77.2 77.2h69.2c15.6 0 38.4 8.4 50.4 18.8l63.2 54.4c27.6 23.6 72.8 23.6 100.8 0l63.2-54.4c12-10.4 34.4-18.8 50.4-18.8h68c42.4 0 77.2-34.8 77.2-77.2v-68c0-15.6 8.4-38.4 18.8-50.4l54.4-63.2c23.2-27.6 23.2-73.2-.4-100.8zm-216-25.2-193.2 193.2a30 30 0 0 1-42.4 0l-96.8-96.8a30.16 30.16 0 0 1 0-42.4c11.6-11.6 30.8-11.6 42.4 0l75.6 75.6 172-172c11.6-11.6 30.8-11.6 42.4 0 11.6 11.6 11.6 30.8 0 42.4z",fill:"#27ae60"})),et=({size:l=100})=>P("svg",{width:l,height:l,viewBox:"0 0 100 100",preserveAspectRatio:"xMidYMid"},P("circle",{cx:50,cy:50,fill:"none",stroke:"currentColor",strokeWidth:"4",r:"40","stroke-dasharray":"85 30"},P("animateTransform",{attributeName:"transform",type:"rotate",repeatCount:"indefinite",dur:"1s",values:"0 50 50;360 50 50",keyTimes:"0;1"}))),Wa=()=>P("svg",{width:24,height:24,fill:"currentcolor",viewBox:"0 0 24 24"},[P("path",{style:"transform: translateY(0.5px)",d:"M18.968 10.5H15.968V11.484H17.984V12.984H15.968V15H14.468V9H18.968V10.5V10.5ZM8.984 9C9.26533 9 9.49967 9.09367 9.687 9.281C9.87433 9.46833 9.968 9.70267 9.968 9.984V10.5H6.499V13.5H8.468V12H9.968V14.016C9.968 14.2973 9.87433 14.5317 9.687 14.719C9.49967 14.9063 9.26533 15 8.984 15H5.984C5.70267 15 5.46833 14.9063 5.281 14.719C5.09367 14.5317 5 14.2973 5 14.016V9.985C5 9.70367 5.09367 9.46933 5.281 9.282C5.46833 9.09467 5.70267 9.001 5.984 9.001H8.984V9ZM11.468 9H12.968V15H11.468V9V9Z"}),P("path",{d:"M18.5 3H5.75C3.6875 3 2 4.6875 2 6.75V18C2 20.0625 3.6875 21.75 5.75 21.75H18.5C20.5625 21.75 22.25 20.0625 22.25 18V6.75C22.25 4.6875 20.5625 3 18.5 3ZM20.75 18C20.75 19.2375 19.7375 20.25 18.5 20.25H5.75C4.5125 20.25 3.5 19.2375 3.5 18V6.75C3.5 5.5125 4.5125 4.5 5.75 4.5H18.5C19.7375 4.5 20.75 5.5125 20.75 6.75V18Z"})]),qn={"Content-Type":"application/json"},Pt=(l,t="")=>{if(typeof l=="object"&&l.errno)throw new TypeError(`${t} failed with ${l.errno}: ${l.errmsg}`);return l},Jt=({serverURL:l,lang:t,path:n,type:e,action:a})=>fetch(`${l}/article?lang=${t}`,{method:"POST",headers:qn,body:JSON.stringify({path:n,type:e,action:a})}).then(i=>i.json()),ut=({serverURL:l,lang:t,token:n,objectId:e,comment:a})=>fetch(`${l}/comment/${e}?lang=${t}`,{method:"PUT",headers:{...qn,Authorization:`Bearer ${n}`},body:JSON.stringify(a)}).then(i=>i.json()).then(i=>Pt(i,"Update comment"));let Xt=null;const Zn=()=>Xt||(Xt=Ce("WALINE_LIKE",[]));let en=null;const Fa=()=>en??(en=Ce("WALINE_REACTION",{}));var vt=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},Kn={},Ne={},tt={},qa=vt&&vt.__awaiter||function(l,t,n,e){return new(n||(n=Promise))(function(a,i){function r(v){try{u(e.next(v))}catch(c){i(c)}}function o(v){try{u(e.throw(v))}catch(c){i(c)}}function u(v){var c;v.done?a(v.value):(c=v.value,c instanceof n?c:new n(function(d){d(c)})).then(r,o)}u((e=e.apply(l,t||[])).next())})},Za=vt&&vt.__generator||function(l,t){var n,e,a,i,r={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]};return i={next:o(0),throw:o(1),return:o(2)},typeof Symbol=="function"&&(i[Symbol.iterator]=function(){return this}),i;function o(u){return function(v){return function(c){if(n)throw new TypeError("Generator is already executing.");for(;r;)try{if(n=1,e&&(a=2&c[0]?e.return:c[0]?e.throw||((a=e.return)&&a.call(e),0):e.next)&&!(a=a.call(e,c[1])).done)return a;switch(e=0,a&&(c=[2&c[0],a.value]),c[0]){case 0:case 1:a=c;break;case 4:return r.label++,{value:c[1],done:!1};case 5:r.label++,e=c[1],c=[0];continue;case 7:c=r.ops.pop(),r.trys.pop();continue;default:if(a=r.trys,!((a=a.length>0&&a[a.length-1])||c[0]!==6&&c[0]!==2)){r=0;continue}if(c[0]===3&&(!a||c[1]>a[0]&&c[1]<a[3])){r.label=c[1];break}if(c[0]===6&&r.label<a[1]){r.label=a[1],a=c;break}if(a&&r.label<a[2]){r.label=a[2],r.ops.push(c);break}a[2]&&r.ops.pop(),r.trys.pop();continue}c=t.call(l,r)}catch(d){c=[6,d],e=0}finally{n=a=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}([u,v])}}};Object.defineProperty(tt,"__esModule",{value:!0}),tt.ReCaptchaInstance=void 0;var Ka=function(){function l(t,n,e){this.siteKey=t,this.recaptchaID=n,this.recaptcha=e,this.styleContainer=null}return l.prototype.execute=function(t){return qa(this,void 0,void 0,function(){return Za(this,function(n){return[2,this.recaptcha.enterprise?this.recaptcha.enterprise.execute(this.recaptchaID,{action:t}):this.recaptcha.execute(this.recaptchaID,{action:t})]})})},l.prototype.getSiteKey=function(){return this.siteKey},l.prototype.hideBadge=function(){this.styleContainer===null&&(this.styleContainer=document.createElement("style"),this.styleContainer.innerHTML=".grecaptcha-badge{visibility:hidden !important;}",document.head.appendChild(this.styleContainer))},l.prototype.showBadge=function(){this.styleContainer!==null&&(document.head.removeChild(this.styleContainer),this.styleContainer=null)},l}();tt.ReCaptchaInstance=Ka,Object.defineProperty(Ne,"__esModule",{value:!0}),Ne.getInstance=Ne.load=void 0;var Pe,Ga=tt;(function(l){l[l.NOT_LOADED=0]="NOT_LOADED",l[l.LOADING=1]="LOADING",l[l.LOADED=2]="LOADED"})(Pe||(Pe={}));var tn=function(){function l(){}return l.load=function(t,n){if(n===void 0&&(n={}),typeof document>"u")return Promise.reject(new Error("This is a library for the browser!"));if(l.getLoadingState()===Pe.LOADED)return l.instance.getSiteKey()===t?Promise.resolve(l.instance):Promise.reject(new Error("reCAPTCHA already loaded with different site key!"));if(l.getLoadingState()===Pe.LOADING)return t!==l.instanceSiteKey?Promise.reject(new Error("reCAPTCHA already loaded with different site key!")):new Promise(function(a,i){l.successfulLoadingConsumers.push(function(r){return a(r)}),l.errorLoadingRunnable.push(function(r){return i(r)})});l.instanceSiteKey=t,l.setLoadingState(Pe.LOADING);var e=new l;return new Promise(function(a,i){e.loadScript(t,n.useRecaptchaNet||!1,n.useEnterprise||!1,n.renderParameters?n.renderParameters:{},n.customUrl).then(function(){l.setLoadingState(Pe.LOADED);var r=e.doExplicitRender(grecaptcha,t,n.explicitRenderParameters?n.explicitRenderParameters:{},n.useEnterprise||!1),o=new Ga.ReCaptchaInstance(t,r,grecaptcha);l.successfulLoadingConsumers.forEach(function(u){return u(o)}),l.successfulLoadingConsumers=[],n.autoHideBadge&&o.hideBadge(),l.instance=o,a(o)}).catch(function(r){l.errorLoadingRunnable.forEach(function(o){return o(r)}),l.errorLoadingRunnable=[],i(r)})})},l.getInstance=function(){return l.instance},l.setLoadingState=function(t){l.loadingState=t},l.getLoadingState=function(){return l.loadingState===null?Pe.NOT_LOADED:l.loadingState},l.prototype.loadScript=function(t,n,e,a,i){var r=this;n===void 0&&(n=!1),e===void 0&&(e=!1),a===void 0&&(a={}),i===void 0&&(i="");var o=document.createElement("script");o.setAttribute("recaptcha-v3-script","");var u="https://www.google.com/recaptcha/api.js";n&&(u=e?"https://recaptcha.net/recaptcha/enterprise.js":"https://recaptcha.net/recaptcha/api.js"),e&&(u="https://www.google.com/recaptcha/enterprise.js"),i&&(u=i),a.render&&(a.render=void 0);var v=this.buildQueryString(a);return o.src=u+"?render=explicit"+v,new Promise(function(c,d){o.addEventListener("load",r.waitForScriptToLoad(function(){c(o)},e),!1),o.onerror=function(y){l.setLoadingState(Pe.NOT_LOADED),d(y)},document.head.appendChild(o)})},l.prototype.buildQueryString=function(t){return Object.keys(t).length<1?"":"&"+Object.keys(t).filter(function(n){return!!t[n]}).map(function(n){return n+"="+t[n]}).join("&")},l.prototype.waitForScriptToLoad=function(t,n){var e=this;return function(){window.grecaptcha===void 0?setTimeout(function(){e.waitForScriptToLoad(t,n)},l.SCRIPT_LOAD_DELAY):n?window.grecaptcha.enterprise.ready(function(){t()}):window.grecaptcha.ready(function(){t()})}},l.prototype.doExplicitRender=function(t,n,e,a){var i={sitekey:n,badge:e.badge,size:e.size,tabindex:e.tabindex};return e.container?a?t.enterprise.render(e.container,i):t.render(e.container,i):a?t.enterprise.render(i):t.render(i)},l.loadingState=null,l.instance=null,l.instanceSiteKey=null,l.successfulLoadingConsumers=[],l.errorLoadingRunnable=[],l.SCRIPT_LOAD_DELAY=25,l}();Ne.load=tn.load,Ne.getInstance=tn.getInstance,function(l){Object.defineProperty(l,"__esModule",{value:!0}),l.ReCaptchaInstance=l.getInstance=l.load=void 0;var t=Ne;Object.defineProperty(l,"load",{enumerable:!0,get:function(){return t.load}}),Object.defineProperty(l,"getInstance",{enumerable:!0,get:function(){return t.getInstance}});var n=tt;Object.defineProperty(l,"ReCaptchaInstance",{enumerable:!0,get:function(){return n.ReCaptchaInstance}})}(Kn);const nn={};let an=null;const Bt=()=>an??(an=Ce("WALINE_USER",{})),Ya={key:0,class:"wl-reaction"},Qa=["textContent"],Ja={class:"wl-reaction-list"},Xa=["onClick"],el={class:"wl-reaction-img"},tl=["src","alt"],nl=["textContent"],al=["textContent"];var ll=Le({__name:"ArticleReaction",setup(l,{expose:t}){t();const n=Fa(),e=Fe("config"),a=E(-1),i=E([]),r=G(()=>e.value.locale),o=G(()=>e.value.reaction.length>0),u=G(()=>{const{reaction:d,path:y}=e.value;return d.map((w,I)=>({icon:w,desc:r.value[`reaction${I}`],active:n.value[y]===I}))});let v;const c=async()=>{if(o.value){const{serverURL:d,lang:y,path:w,reaction:I}=e.value,s=new AbortController;v=s.abort.bind(s);const g=await(({serverURL:z,lang:j,paths:S,type:C,signal:K})=>fetch(`${z}/article?path=${encodeURIComponent(S.join(","))}&type=${encodeURIComponent(C.join(","))}&lang=${j}`,{signal:K}).then(Y=>Y.json()))({serverURL:d,lang:y,paths:[w],type:I.map((z,j)=>`reaction${j}`),signal:s.signal});if(Array.isArray(g)||typeof g=="number")return;i.value=I.map((z,j)=>g[`reaction${j}`])}};return Me(()=>{fe(()=>[e.value.serverURL,e.value.path],()=>{c()},{immediate:!0})}),qe(()=>v==null?void 0:v()),(d,y)=>u.value.length?(p(),m("div",Ya,[b("div",{class:"wl-reaction-title",textContent:T(r.value.reactionTitle)},null,8,Qa),b("ul",Ja,[(p(!0),m(X,null,ie(u.value,({active:w,icon:I,desc:s},g)=>(p(),m("li",{key:g,class:Q(["wl-reaction-item",{active:w}]),onClick:z=>(async j=>{if(a.value===-1){const{serverURL:S,lang:C,path:K}=e.value,Y=n.value[K];a.value=j,Y!==void 0&&(await Jt({serverURL:S,lang:C,path:K,type:`reaction${Y}`,action:"desc"}),i.value[Y]=Math.max(i.value[Y]-1,0)),Y!==j&&(await Jt({serverURL:S,lang:C,path:K,type:`reaction${j}`}),i.value[j]=(i.value[j]||0)+1),Y===j?delete n.value[K]:n.value[K]=j,a.value=-1}})(g)},[b("div",el,[b("img",{src:I,alt:s},null,8,tl),a.value===g?(p(),de(_(et),{key:0,class:"wl-reaction-loading"})):(p(),m("div",{key:1,class:"wl-reaction-votes",textContent:T(i.value[g]||0)},null,8,nl))]),b("div",{class:"wl-reaction-text",textContent:T(s)},null,8,al)],10,Xa))),128))])])):R("v-if",!0)}}),lt=(l,t)=>{const n=l.__vccOpts||l;for(const[e,a]of t)n[e]=a;return n},il=lt(ll,[["__file","ArticleReaction.vue"]]);const rl=["data-index"],ol=["src","title","onClick"];var sl=lt(Le({__name:"ImageWall",props:{items:{default:()=>[]},columnWidth:{default:300},gap:{default:0}},emits:["insert"],setup(l,{expose:t}){const n=l;t();let e=null;const a=E(null),i=E({}),r=E([]),o=()=>{const d=Math.floor((a.value.getBoundingClientRect().width+n.gap)/(n.columnWidth+n.gap));return d>0?d:1},u=async d=>{var w;if(d>=n.items.length)return;await Mn();const y=Array.from(((w=a.value)==null?void 0:w.children)||[]).reduce((I,s)=>s.getBoundingClientRect().height<I.getBoundingClientRect().height?s:I);r.value[Number(y.dataset.index)].push(d),await u(d+1)},v=async(d=!1)=>{if(r.value.length===o()&&!d)return;var y;r.value=(y=o(),new Array(y).fill(null).map(()=>[]));const w=window.scrollY;await u(0),window.scrollTo({top:w})},c=d=>{i.value[d.target.src]=!0};return Me(()=>{v(!0),e=new ResizeObserver(()=>{v()}),e.observe(a.value),fe(()=>[n.items],()=>{i.value={},v(!0)}),fe(()=>[n.columnWidth,n.gap],()=>{v()})}),Rn(()=>e.unobserve(a.value)),(d,y)=>(p(),m("div",{ref_key:"wall",ref:a,class:"wl-gallery",style:dt({gap:`${d.gap}px`})},[(p(!0),m(X,null,ie(r.value,(w,I)=>(p(),m("div",{key:I,class:"wl-gallery-column","data-index":I,style:dt({gap:`${d.gap}px`})},[(p(!0),m(X,null,ie(w,s=>(p(),m(X,{key:s},[i.value[d.items[s].src]?R("v-if",!0):(p(),de(_(et),{key:0,size:36,style:{margin:"20px auto"}})),b("img",{class:"wl-gallery-item",src:d.items[s].src,title:d.items[s].title,loading:"lazy",onLoad:c,onClick:g=>d.$emit("insert",`![](${d.items[s].src})`)},null,40,ol)],64))),128))],12,rl))),128))],4))}}),[["__file","ImageWall.vue"]]);const cl=l=>{try{l=decodeURI(l)}catch{}return l},Gn=(l="")=>l.replace(/\/$/u,""),Yn=l=>/^(https?:)?\/\//.test(l),ul=["nick","mail","link"],ln=l=>l.filter(t=>ul.includes(t)),rn=["//unpkg.com/@waline/[email protected]/weibo"],pl=["//unpkg.com/@waline/emojis/tieba/tieba_agree.png","//unpkg.com/@waline/emojis/tieba/tieba_look_down.png","//unpkg.com/@waline/emojis/tieba/tieba_sunglasses.png","//unpkg.com/@waline/emojis/tieba/tieba_pick_nose.png","//unpkg.com/@waline/emojis/tieba/tieba_awkward.png","//unpkg.com/@waline/emojis/tieba/tieba_sleep.png"],dl=l=>new Promise((t,n)=>{if(l.size>128e3)return n(new Error("File too large! File size limit 128KB"));const e=new FileReader;e.readAsDataURL(l),e.onload=()=>{var a;return t(((a=e.result)==null?void 0:a.toString())||"")},e.onerror=n}),hl=l=>l===!0?'<p class="wl-tex">Tex is not available in preview</p>':'<span class="wl-tex">Tex is not available in preview</span>',ml=l=>{const t=async(n,e={})=>fetch(`https://api.giphy.com/v1/gifs/${n}?${new URLSearchParams({lang:l,limit:"20",rating:"g",api_key:"6CIMLkNMMOhRcXPoMCPkFy4Ybk2XUiMp",...e}).toString()}`).then(a=>a.json()).then(({data:a})=>a.map(i=>({title:i.title,src:i.images.downsized_medium.url})));return{search:n=>t("search",{q:n,offset:"0"}),default:()=>t("trending",{}),more:(n,e=0)=>t("search",{q:n,offset:e.toString()})}},gl=new RegExp(`(${/[\u4E00-\u9FFF\u3400-\u4dbf\uf900-\ufaff\u3040-\u309f\uac00-\ud7af\u0400-\u04FF]+|\w+/.source}|${/</.source})|((?:${/(?:^|\s)\/\/(.+?)$/gm.source})|(?:${/\/\*([\S\s]*?)\*\//gm.source}))`,"gmi"),on=["23AC69","91C132","F19726","E8552D","1AAB8E","E1147F","2980C1","1BA1E6","9FA0A0","F19726","E30B20","E30B20","A3338B"],bt={},fl=l=>{let t=0;return l.replace(gl,(n,e,a)=>{if(a)return`<span style="color: slategray">${a}</span>`;if(e==="<")return"<";let i;bt[e]?i=bt[e]:(i=on[t],bt[e]=i);const r=`<span style="color: #${i}">${e}</span>`;return t=++t%on.length,r})},vl=["nick","nickError","mail","mailError","link","optional","placeholder","sofa","submit","like","cancelLike","reply","cancelReply","comment","refresh","more","preview","emoji","uploadImage","seconds","minutes","hours","days","now","uploading","login","logout","admin","sticky","word","wordHint","anonymous","level0","level1","level2","level3","level4","level5","gif","gifSearchPlaceholder","profile","approved","waiting","spam","unsticky","oldest","latest","hottest","reactionTitle"],Ze=l=>Object.fromEntries(l.map((t,n)=>[vl[n],t]));var $t=Ze(["NickName","NickName cannot be less than 3 bytes.","E-Mail","Please confirm your email address.","Website","Optional","Comment here...","No comment yet.","Submit","Like","Cancel like","Reply","Cancel reply","Comments","Refresh","Load More...","Preview","Emoji","Upload Image","seconds ago","minutes ago","hours ago","days ago","just now","Uploading","Login","logout","Admin","Sticky","Words",`Please input comments between $0 and $1 words!
Current word number: $2`,"Anonymous","Dwarves","Hobbits","Ents","Wizards","Elves","Maiar","GIF","Search GIF","Profile","Approved","Waiting","Spam","Unsticky","Oldest","Latest","Hottest","What do you think?"]),ot=Ze(["ニックネーム","3バイト以上のニックネームをご入力ください.","メールアドレス","メールアドレスをご確認ください.","サイト","オプション","ここにコメント","コメントしましょう~","提出する","Like","Cancel like","返信する","キャンセル","コメント","更新","さらに読み込む","プレビュー","絵文字","画像をアップロード","秒前","分前","時間前","日前","たっだ今","アップロード","ログインする","ログアウト","管理者","トップに置く","ワード",`コメントは $0 から $1 ワードの間でなければなりません!
現在の単語番号: $2`,"匿名","うえにん","なかにん","しもおし","特にしもおし","かげ","なぬし","GIF","探す GIF","個人情報","承認済み","待っている","スパム","べたつかない","逆順","正順","人気順","どう思いますか?"]),sn=Ze(["Apelido","Apelido não pode ser menor que 3 bytes.","E-Mail","Por favor, confirme seu endereço de e-mail.","Website","Opcional","Comente aqui...","Nenhum comentário, ainda.","Enviar","Like","Cancel like","Responder","Cancelar resposta","Comentários","Refrescar","Carregar Mais...","Visualizar","Emoji","Enviar Imagem","segundos atrás","minutos atrás","horas atrás","dias atrás","agora mesmo","Enviando","Entrar","Sair","Admin","Sticky","Palavras",`Favor enviar comentário com $0 a $1 palavras!
Número de palavras atuais: $2`,"Anônimo","Dwarves","Hobbits","Ents","Wizards","Elves","Maiar","GIF","Pesquisar GIF","informação pessoal","Aprovado","Espera","Spam","Unsticky","Mais velho","Mais recentes","Mais quente","O que você acha?"]),xt=Ze(["Псевдоним","Никнейм не может быть меньше 3 байт.","Эл. адрес","Пожалуйста, подтвердите адрес вашей электронной почты.","Веб-сайт","Необязательный","Комментарий здесь...","Пока нет комментариев.","Отправить","Like","Cancel like","Отвечать","Отменить ответ","Комментарии","Обновить","Загрузи больше...","Превью","эмодзи","Загрузить изображение","секунд назад","несколько минут назад","несколько часов назад","дней назад","прямо сейчас","Загрузка","Авторизоваться","Выход из системы","Админ","Липкий","Слова",`Пожалуйста, введите комментарии от $0 до $1 слов!
Номер текущего слова: $2`,"Анонимный","Dwarves","Hobbits","Ents","Wizards","Elves","Maiar","GIF","Поиск GIF","Персональные данные","Одобренный","Ожидающий","Спам","Нелипкий","самый старый","последний","самый горячий","Что вы думаете?"]),Ct=Ze(["昵称","昵称不能少于3个字符","邮箱","请填写正确的邮件地址","网址","可选","欢迎评论","来发评论吧~","提交","喜欢","取消喜欢","回复","取消回复","评论","刷新","加载更多...","预览","表情","上传图片","秒前","分钟前","小时前","天前","刚刚","正在上传","登录","退出","博主","置顶","字",`评论字数应在 $0 到 $1 字之间!
当前字数:$2`,"匿名","潜水","冒泡","吐槽","活跃","话痨","传说","表情包","搜索表情包","个人资料","通过","待审核","垃圾","取消置顶","按倒序","按正序","按热度","你认为这篇文章怎么样?"]),cn=Ze(["暱稱","暱稱不能少於3個字元","郵箱","請填寫正確的郵件地址","網址","可選","歡迎留言","來發留言吧~","送出","喜歡","取消喜歡","回覆","取消回覆","留言","重整","載入更多...","預覽","表情","上傳圖片","秒前","分鐘前","小時前","天前","剛剛","正在上傳","登入","登出","管理者","置頂","字",`留言字數應在 $0 到 $1 字之間!
目前字數:$2`,"匿名","潛水","冒泡","吐槽","活躍","多話","傳說","表情包","搜尋表情包","個人資料","通過","待審核","垃圾","取消置頂","最早","最新","熱門","你認為這篇文章怎麼樣?"]);const Lt={zh:Ct,"zh-cn":Ct,"zh-CN":Ct,"zh-tw":cn,"zh-TW":cn,en:$t,"en-US":$t,"en-us":$t,jp:ot,ja:ot,"jp-jp":ot,"jp-JP":ot,"pt-br":sn,"pt-BR":sn,ru:xt,"ru-ru":xt,"ru-RU":xt},wl=l=>{const t=Gn(l);return Yn(t)?t:`https://${t}`},yl=l=>Array.isArray(l)?l:!!l&&[0,l],_t=(l,t)=>typeof l=="function"?l:l!==!1&&t,Rt="{--waline-white:#000;--waline-light-grey:#666;--waline-dark-grey:#999;--waline-color:#888;--waline-bgcolor:#1e1e1e;--waline-bgcolor-light:#272727;--waline-bgcolor-hover: #444;--waline-border-color:#333;--waline-disable-bgcolor:#444;--waline-disable-color:#272727;--waline-bq-color:#272727;--waline-info-bgcolor:#272727;--waline-info-color:#666}",zt=(l,t)=>{let n=l.toString();for(;n.length<t;)n="0"+n;return n},kl=(l,t,n)=>{if(!l)return"";const e=typeof l=="string"?new Date(l.indexOf(" ")!==-1?l.replace(/-/g,"/"):l):l,a=t.getTime()-e.getTime(),i=Math.floor(a/864e5);if(i===0){const r=a%864e5,o=Math.floor(r/36e5);if(o===0){const u=r%36e5,v=Math.floor(u/6e4);if(v===0){const c=u%6e4;return`${Math.round(c/1e3)} ${n.seconds}`}return`${v} ${n.minutes}`}return`${o} ${n.hours}`}return i<0?n.now:i<8?`${i} ${n.days}`:(r=>{const o=zt(r.getDate(),2),u=zt(r.getMonth()+1,2);return`${zt(r.getFullYear(),2)}-${u}-${o}`})(e)},bl=/^[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])?)*$/,$l=l=>{const t=Ce("WALINE_EMOJI",{}),n=!!/@[0-9]+\.[0-9]+\.[0-9]+/.test(l);if(n){const e=t.value[l];if(e)return Promise.resolve(e)}return fetch(`${l}/info.json`).then(e=>e.json()).then(e=>{const a={folder:l,...e};return n&&(t.value[l]=a),a})},un=(l,t="",n="",e="")=>`${t?`${t}/`:""}${n}${l}${e?`.${e}`:""}`,xl=l=>l.type.includes("image"),pn=l=>{const t=Array.from(l).find(xl);return t?t.getAsFile():null},Cl=/\$.*?\$/,Ll=/^\$(.*?)\$/,_l=/^(?:\s{0,3})\$\$((?:[^\n]|\n[^\n])+?)\n{0,1}\$\$/,Qn=(l="",t={})=>l.replace(/:(.+?):/g,(n,e)=>t[e]?`<img class="wl-emoji" src="${t[e]}" alt="${e}">`:n),Rl=(l,{emojiMap:t,highlighter:n,texRenderer:e})=>{if(D.setOptions({highlight:n||void 0,breaks:!0,smartLists:!0,smartypants:!0}),e){const a=(i=>[{name:"blockMath",level:"block",tokenizer(r){const o=_l.exec(r);if(o!==null)return{type:"html",raw:o[0],text:i(!0,o[1])}}},{name:"inlineMath",level:"inline",start(r){const o=r.search(Cl);return o!==-1?o:r.length},tokenizer(r){const o=Ll.exec(r);if(o!==null)return{type:"html",raw:o[0],text:i(!1,o[1])}}}])(e);D.use({extensions:a})}return D.parse(Qn(l,t))},zl={class:"wl-comment"},Sl={key:0,class:"wl-login-info"},Il={class:"wl-avatar"},El=["title"],Al=["title"],jl=["src"],Tl=["title","textContent"],Ul={class:"wl-panel"},Ml=["for","textContent"],Pl=["id","onUpdate:modelValue","name","type"],Ol=["placeholder"],Dl={class:"wl-preview"},Hl=b("hr",null,null,-1),Vl=["innerHTML"],Bl={class:"wl-footer"},Nl={class:"wl-actions"},Wl={href:"https://guides.github.com/features/mastering-markdown/",title:"Markdown Guide","aria-label":"Markdown is supported",class:"wl-action",target:"_blank",rel:"noopener noreferrer"},Fl=["title"],ql=["title"],Zl=["title"],Kl=["title"],Gl={class:"wl-info"},Yl=b("div",{class:"wl-captcha-container"},null,-1),Ql={class:"wl-text-number"},Jl={key:0},Xl=["textContent"],ei=["textContent"],ti=["disabled"],ni=["placeholder"],ai={key:1,class:"wl-loading"},li={key:0,class:"wl-tab-wrapper"},ii=["title","onClick"],ri=["src","alt"],oi={key:0,class:"wl-tabs"},si=["onClick"],ci=["src","alt","title"],ui=["title"];var pi=Le({__name:"CommentBox",props:{edit:{default:null},rootId:{default:""},replyId:{default:""},replyUser:{default:""}},emits:["log","cancelEdit","cancelReply","submit"],setup(l,{expose:t,emit:n}){const e=l;t();const a=Fe("config"),i=Ce("WALINE_COMMENT_BOX_EDITOR",""),r=Ce("WALINE_USER_META",{nick:"",mail:"",link:""}),o=Bt(),u=E({}),v=E(null),c=E(null),d=E(null),y=E(null),w=E(null),I=E(null),s=E(null),g=E({tabs:[],map:{}}),z=E(0),j=E(!1),S=E(!1),C=E(!1),K=E(""),Y=E(0),W=In({loading:!0,list:[]}),ce=E(0),he=E(!1),Ae=E(""),ve=E(!1),$=E(!1),L=G(()=>a.value.locale),U=G(()=>{var f;return!!((f=o.value)!=null&&f.token)}),F=G(()=>a.value.imageUploader!==!1),H=f=>{const h=v.value,x=h.selectionStart,M=h.selectionEnd||0,k=h.scrollTop;i.value=h.value.substring(0,x)+f+h.value.substring(M,h.value.length),h.focus(),h.selectionStart=x+f.length,h.selectionEnd=x+f.length,h.scrollTop=k},ee=f=>{const h=f.key;(f.ctrlKey||f.metaKey)&&h==="Enter"&&$e()},q=f=>{const h=`![${a.value.locale.uploading} ${f.name}]()`;return H(h),Promise.resolve().then(()=>a.value.imageUploader(f)).then(x=>{i.value=i.value.replace(h,`\r
![${f.name}](${x})`)}).catch(x=>{alert(x.message),i.value=i.value.replace(h,"")})},ne=f=>{var h;if((h=f.dataTransfer)!=null&&h.items){const x=pn(f.dataTransfer.items);x&&F.value&&(q(x),f.preventDefault())}},re=f=>{if(f.clipboardData){const h=pn(f.clipboardData.items);h&&F.value&&q(h)}},we=()=>{const f=c.value;f.files&&F.value&&q(f.files[0]).then(()=>{f.value=""})},$e=async()=>{var Te,ze,Se,Ge,Ye,Qe;const{serverURL:f,lang:h,login:x,wordLimit:M,requiredMeta:k,recaptchaV3Key:O,turnstileKey:B}=a.value,Z=await(async()=>{if(!navigator)return"";const{userAgentData:me}=navigator;let pe=navigator.userAgent;if(!me||me.platform!=="Windows")return pe;const{platformVersion:se}=await me.getHighEntropyValues(["platformVersion"]);return se&&parseInt(se.split(".")[0])>=13&&(pe=pe.replace("Windows NT 10.0","Windows NT 11.0")),pe})(),N={comment:Ae.value,nick:r.value.nick,mail:r.value.mail,link:r.value.link,url:a.value.path,ua:Z};if((Te=o.value)!=null&&Te.token)N.nick=o.value.display_name,N.mail=o.value.email,N.link=o.value.url;else{if(x==="force")return;if(k.indexOf("nick")>-1&&!N.nick)return(ze=u.value.nick)==null||ze.focus(),alert(L.value.nickError);if(k.indexOf("mail")>-1&&!N.mail||N.mail&&(ue=N.mail,!bl.test(ue)))return(Se=u.value.mail)==null||Se.focus(),alert(L.value.mailError);N.nick||(N.nick=L.value.anonymous)}var ue;if(N.comment){if(!he.value)return alert(L.value.wordHint.replace("$0",M[0].toString()).replace("$1",M[1].toString()).replace("$2",Y.value.toString()));N.comment=Qn(N.comment,g.value.map),e.replyId&&e.rootId&&(N.pid=e.replyId,N.rid=e.rootId,N.at=e.replyUser),ve.value=!0;try{O&&(N.recaptchaV3=await(se=>{const Ie=nn[se]??(nn[se]=Kn.load(se,{useRecaptchaNet:!0,autoHideBadge:!0}));return{execute:le=>Ie.then(Ee=>Ee.execute(le))}})(O).execute("social")),B&&(N.turnstile=await(ae=B,{execute:se=>new Promise(Ie=>{Pn("https://challenges.cloudflare.com/turnstile/v0/api.js",()=>{const le=window==null?void 0:window.turnstile,Ee={sitekey:ae,action:se,size:"compact",callback(Ue){Ie(Ue)}};le==null||le.ready(()=>le==null?void 0:le.render(".wl-captcha-container",Ee))},{async:!1})})}).execute("social"));const me={serverURL:f,lang:h,token:(Ge=o.value)==null?void 0:Ge.token,comment:N},pe=await(e.edit?ut({objectId:e.edit.objectId,...me}):(({serverURL:se,lang:Ie,token:le,comment:Ee})=>{const Ue={"Content-Type":"application/json"};return le&&(Ue.Authorization=`Bearer ${le}`),fetch(`${se}/comment?lang=${Ie}`,{method:"POST",headers:Ue,body:JSON.stringify(Ee)}).then(kt=>kt.json())})(me));if(ve.value=!1,pe.errmsg)return alert(pe.errmsg);n("submit",pe.data),i.value="",K.value="",e.replyId&&n("cancelReply"),(Ye=e.edit)!=null&&Ye.objectId&&n("cancelEdit")}catch(me){ve.value=!1,alert(me.message)}var ae}else(Qe=v.value)==null||Qe.focus()},_e=f=>{f.preventDefault();const{lang:h,serverURL:x}=a.value;(({lang:M,serverURL:k})=>{const O=(window.innerWidth-450)/2,B=(window.innerHeight-450)/2,Z=window.open(`${k}/ui/login?lng=${encodeURIComponent(M)}`,"_blank",`width=450,height=450,left=${O},top=${B},scrollbars=no,resizable=no,status=no,location=no,toolbar=no,menubar=no`);return Z==null||Z.postMessage({type:"TOKEN",data:null},"*"),new Promise(N=>{const ue=({data:ae})=>{ae&&typeof ae=="object"&&ae.type==="userInfo"&&ae.data.token&&(Z==null||Z.close(),window.removeEventListener("message",ue),N(ae.data))};window.addEventListener("message",ue)})})({serverURL:x,lang:h}).then(M=>{o.value=M,(M.remember?localStorage:sessionStorage).setItem("WALINE_USER",JSON.stringify(M)),n("log")})},Re=()=>{o.value={},localStorage.setItem("WALINE_USER","null"),sessionStorage.setItem("WALINE_USER","null"),n("log")},ye=f=>{f.preventDefault();const{lang:h,serverURL:x}=a.value,M=(window.innerWidth-800)/2,k=(window.innerHeight-800)/2,O=new URLSearchParams({lng:h,token:o.value.token}),B=window.open(`${x}/ui/profile?${O.toString()}`,"_blank",`width=800,height=800,left=${M},top=${k},scrollbars=no,resizable=no,status=no,location=no,toolbar=no,menubar=no`);B==null||B.postMessage({type:"TOKEN",data:o.value.token},"*")},ke=f=>{var h,x,M,k;(h=d.value)!=null&&h.contains(f.target)||(x=y.value)!=null&&x.contains(f.target)||(j.value=!1),(M=w.value)!=null&&M.contains(f.target)||(k=I.value)!=null&&k.contains(f.target)||(S.value=!1)},oe=async f=>{var Z;const{scrollTop:h,clientHeight:x,scrollHeight:M}=f.target,k=(x+h)/M,O=a.value.search,B=((Z=s.value)==null?void 0:Z.value)||"";k<.9||W.loading||$.value||(W.loading=!0,(O.more&&W.list.length?await O.more(B,W.list.length):await O.search(B)).length?W.list=[...W.list,...O.more&&W.list.length?await O.more(B,W.list.length):await O.search(B)]:$.value=!0,W.loading=!1,setTimeout(()=>{f.target.scrollTop=h},50))},xe=On(f=>{W.list=[],$.value=!1,oe(f)},300);fe([a,Y],([f,h])=>{const{wordLimit:x}=f;x?h<x[0]&&x[0]!==0?(ce.value=x[0],he.value=!1):h>x[1]?(ce.value=x[1],he.value=!1):(ce.value=x[1],he.value=!0):(ce.value=0,he.value=!0)},{immediate:!0});const je=({data:f})=>{f&&f.type==="profile"&&(o.value={...o.value,...f.data},[localStorage,sessionStorage].filter(h=>h.getItem("WALINE_USER")).forEach(h=>h.setItem("WALINE_USER",JSON.stringify(o))))};return Me(()=>{var f;document.body.addEventListener("click",ke),window.addEventListener("message",je),(f=e.edit)!=null&&f.objectId&&(i.value=e.edit.orig),fe(S,async h=>{if(!h)return;const x=a.value.search;s.value&&(s.value.value=""),W.loading=!0,W.list=x.default?await x.default():await x.search(""),W.loading=!1}),fe(()=>i.value,h=>{const{highlighter:x,texRenderer:M}=a.value;Ae.value=h,K.value=Rl(h,{emojiMap:g.value.map,highlighter:x,texRenderer:M}),Y.value=(k=>{var O,B;return(((O=(Z=>Z.match(/[\w\d\s,.\u00C0-\u024F\u0400-\u04FF]+/giu))(k))==null?void 0:O.reduce((Z,N)=>Z+(N.trim()===""?0:N.trim().split(/\s+/u).length),0))||0)+(((B=(Z=>Z.match(/[\u4E00-\u9FD5]/gu))(k))==null?void 0:B.length)||0)})(h),h?mt(v.value):mt.destroy(v.value)},{immediate:!0}),fe(()=>a.value.emoji,h=>{return(x=h,Promise.all(x.map(M=>typeof M=="string"?$l(Gn(M)):Promise.resolve(M))).then(M=>{const k={tabs:[],map:{}};return M.forEach(O=>{const{name:B,folder:Z,icon:N,prefix:ue,type:ae,items:Te}=O;k.tabs.push({name:B,icon:un(N,Z,ue,ae),items:Te.map(ze=>{const Se=`${ue||""}${ze}`;return k.map[Se]=un(ze,Z,ue,ae),Se})})}),k})).then(M=>{g.value=M});var x},{immediate:!0})}),qe(()=>{document.body.removeEventListener("click",ke),window.removeEventListener("message",je)}),(f,h)=>{var x,M;return p(),m("div",zl,[_(a).login!=="disable"&&U.value&&!((x=f.edit)!=null&&x.objectId)?(p(),m("div",Sl,[b("div",Il,[b("button",{type:"submit",class:"wl-logout-btn",title:L.value.logout,onClick:Re},[J(_(Qt),{size:14})],8,El),b("a",{href:"#",class:"wl-login-nick","aria-label":"Profile",title:L.value.profile,onClick:ye},[b("img",{src:_(o).avatar,alt:"avatar"},null,8,jl)],8,Al)]),b("a",{href:"#",class:"wl-login-nick","aria-label":"Profile",title:L.value.profile,onClick:ye,textContent:T(_(o).display_name)},null,8,Tl)])):R("v-if",!0),b("div",Ul,[_(a).login!=="force"&&_(a).meta.length&&!U.value?(p(),m("div",{key:0,class:Q(["wl-header",`item${_(a).meta.length}`])},[(p(!0),m(X,null,ie(_(a).meta,k=>(p(),m("div",{key:k,class:"wl-header-item"},[b("label",{for:`wl-${k}`,textContent:T(L.value[k]+(_(a).requiredMeta.includes(k)||!_(a).requiredMeta.length?"":`(${L.value.optional})`))},null,8,Ml),De(b("input",{id:`wl-${k}`,ref_for:!0,ref:O=>{O&&(u.value[k]=O)},"onUpdate:modelValue":O=>_(r)[k]=O,class:Q(["wl-input",`wl-${k}`]),name:k,type:k==="mail"?"email":"text"},null,10,Pl),[[En,_(r)[k]]])]))),128))],2)):R("v-if",!0),De(b("textarea",{id:"wl-edit",ref_key:"editorRef",ref:v,"onUpdate:modelValue":h[0]||(h[0]=k=>jn(i)?i.value=k:null),class:"wl-editor",placeholder:f.replyUser?`@${f.replyUser}`:L.value.placeholder,onKeydown:ee,onDrop:ne,onPaste:re},null,40,Ol),[[An,_(i)]]),De(b("div",Dl,[Hl,b("h4",null,T(L.value.preview)+":",1),b("div",{class:"wl-content",innerHTML:K.value},null,8,Vl)],512),[[ht,C.value]]),b("div",Bl,[b("div",Nl,[b("a",Wl,[J(_(Ha))]),De(b("button",{ref_key:"emojiButtonRef",ref:d,type:"button",class:Q(["wl-action",{active:j.value}]),title:L.value.emoji,onClick:h[1]||(h[1]=k=>j.value=!j.value)},[J(_(Ma))],10,Fl),[[ht,g.value.tabs.length]]),_(a).search?(p(),m("button",{key:0,ref_key:"gifButtonRef",ref:w,type:"button",class:Q(["wl-action",{active:S.value}]),title:L.value.gif,onClick:h[2]||(h[2]=k=>S.value=!S.value)},[J(_(Wa))],10,ql)):R("v-if",!0),b("input",{id:"wl-image-upload",ref_key:"imageUploadRef",ref:c,class:"upload",type:"file",accept:".png,.jpg,.jpeg,.webp,.bmp,.gif",onChange:we},null,544),F.value?(p(),m("label",{key:1,for:"wl-image-upload",class:"wl-action",title:L.value.uploadImage},[J(_(Pa))],8,Zl)):R("v-if",!0),b("button",{type:"button",class:Q(["wl-action",{active:C.value}]),title:L.value.preview,onClick:h[3]||(h[3]=k=>C.value=!C.value)},[J(_(Da))],10,Kl)]),b("div",Gl,[Yl,b("div",Ql,[be(T(Y.value)+" ",1),_(a).wordLimit?(p(),m("span",Jl,[be(" / "),b("span",{class:Q({illegal:!he.value}),textContent:T(ce.value)},null,10,Xl)])):R("v-if",!0),be(" "+T(L.value.word),1)]),_(a).login==="disable"||U.value?R("v-if",!0):(p(),m("button",{key:0,type:"button",class:"wl-btn",onClick:_e,textContent:T(L.value.login)},null,8,ei)),_(a).login!=="force"||U.value?(p(),m("button",{key:1,type:"submit",class:"primary wl-btn",title:"Cmd|Ctrl + Enter",disabled:ve.value,onClick:$e},[ve.value?(p(),de(_(et),{key:0,size:16})):(p(),m(X,{key:1},[be(T(L.value.submit),1)],64))],8,ti)):R("v-if",!0)]),b("div",{ref_key:"gifPopupRef",ref:I,class:Q(["wl-gif-popup",{display:S.value}])},[b("input",{ref_key:"gifSearchInputRef",ref:s,type:"text",placeholder:L.value.gifSearchPlaceholder,onInput:h[4]||(h[4]=(...k)=>_(xe)&&_(xe)(...k))},null,40,ni),W.list.length?(p(),de(sl,{key:0,items:W.list,"column-width":200,gap:6,onInsert:h[5]||(h[5]=k=>H(k)),onScroll:oe},null,8,["items"])):R("v-if",!0),W.loading?(p(),m("div",ai,[J(_(et),{size:30})])):R("v-if",!0)],2),b("div",{ref_key:"emojiPopupRef",ref:y,class:Q(["wl-emoji-popup",{display:j.value}])},[(p(!0),m(X,null,ie(g.value.tabs,(k,O)=>(p(),m(X,{key:k.name},[O===z.value?(p(),m("div",li,[(p(!0),m(X,null,ie(k.items,B=>(p(),m("button",{key:B,type:"button",title:B,onClick:Z=>H(`:${B}:`)},[j.value?(p(),m("img",{key:0,class:"wl-emoji",src:g.value.map[B],alt:B,loading:"lazy",referrerPolicy:"no-referrer"},null,8,ri)):R("v-if",!0)],8,ii))),128))])):R("v-if",!0)],64))),128)),g.value.tabs.length>1?(p(),m("div",oi,[(p(!0),m(X,null,ie(g.value.tabs,(k,O)=>(p(),m("button",{key:k.name,type:"button",class:Q(["wl-tab",{active:z.value===O}]),onClick:B=>z.value=O},[b("img",{class:"wl-emoji",src:k.icon,alt:k.name,title:k.name,loading:"lazy",referrerPolicy:"no-referrer"},null,8,ci)],10,si))),128))])):R("v-if",!0)],2)])]),f.replyId||(M=f.edit)!=null&&M.objectId?(p(),m("button",{key:1,type:"button",class:"wl-close",title:L.value.cancelReply,onClick:h[6]||(h[6]=k=>f.$emit(f.replyId?"cancelReply":"cancelEdit"))},[J(_(Qt),{size:24})],8,ui)):R("v-if",!0)])}}}),Jn=lt(pi,[["__file","CommentBox.vue"]]);const di=["id"],hi={class:"wl-user","aria-hidden":"true"},mi=["src"],gi={class:"wl-card"},fi={class:"wl-head"},vi=["href"],wi={key:1,class:"wl-nick"},yi=["textContent"],ki=["textContent"],bi=["textContent"],$i=["textContent"],xi=["textContent"],Ci={class:"wl-comment-actions"},Li=["title"],_i=["textContent"],Ri=["title"],zi={class:"wl-meta","aria-hidden":"true"},Si=["data-value","textContent"],Ii=["data-value","textContent"],Ei=["data-value","textContent"],Ai=["innerHTML"],ji={key:1,class:"wl-admin-actions"},Ti={class:"wl-comment-status"},Ui=["disabled","onClick","textContent"],Mi={key:3,class:"wl-quote"};var Pi=lt(Le({__name:"CommentCard",props:{comment:{},edit:{default:null},rootId:{},reply:{default:null}},emits:["log","submit","delete","edit","like","status","sticky","reply"],setup(l){const t=l,n=["approved","waiting","spam"],e=Fe("config"),a=Zn(),i=zn(),r=Bt(),o=G(()=>e.value.locale),u=G(()=>{const{link:s}=t.comment;return s?Yn(s)?s:`https://${s}`:""}),v=G(()=>a.value.includes(t.comment.objectId)),c=G(()=>kl(t.comment.insertedAt,i.value,o.value)),d=G(()=>r.value.type==="administrator"),y=G(()=>t.comment.user_id&&r.value.objectId===t.comment.user_id),w=G(()=>{var s;return t.comment.objectId===((s=t.reply)==null?void 0:s.objectId)}),I=G(()=>{var s;return t.comment.objectId===((s=t.edit)==null?void 0:s.objectId)});return(s,g)=>{var j;const z=Sn("CommentCard",!0);return p(),m("div",{id:s.comment.objectId,class:"wl-card-item"},[b("div",hi,[s.comment.avatar?(p(),m("img",{key:0,src:s.comment.avatar},null,8,mi)):R("v-if",!0),s.comment.type?(p(),de(_(Na),{key:1})):R("v-if",!0)]),b("div",gi,[b("div",fi,[u.value?(p(),m("a",{key:0,class:"wl-nick",href:u.value,target:"_blank",rel:" noopener noreferrer"},T(s.comment.nick),9,vi)):(p(),m("span",wi,T(s.comment.nick),1)),s.comment.type==="administrator"?(p(),m("span",{key:2,class:"wl-badge",textContent:T(o.value.admin)},null,8,yi)):R("v-if",!0),s.comment.label?(p(),m("span",{key:3,class:"wl-badge",textContent:T(s.comment.label)},null,8,ki)):R("v-if",!0),s.comment.sticky?(p(),m("span",{key:4,class:"wl-badge",textContent:T(o.value.sticky)},null,8,bi)):R("v-if",!0),s.comment.level!==void 0&&s.comment.level>=0?(p(),m("span",{key:5,class:Q(`wl-badge level${s.comment.level}`),textContent:T(o.value[`level${s.comment.level}`]||`Level ${s.comment.level}`)},null,10,$i)):R("v-if",!0),b("span",{class:"wl-time",textContent:T(c.value)},null,8,xi),b("div",Ci,[d.value||y.value?(p(),m("button",{key:0,type:"button",class:"wl-edit",onClick:g[0]||(g[0]=()=>s.$emit("edit",s.comment))},[J(_(Ba))])):R("v-if",!0),d.value||y.value?(p(),m("button",{key:1,type:"button",class:"wl-delete",onClick:g[1]||(g[1]=S=>s.$emit("delete",s.comment))},[J(_(Ua))])):R("v-if",!0),b("button",{type:"button",class:"wl-like",title:v.value?o.value.cancelLike:o.value.like,onClick:g[2]||(g[2]=S=>s.$emit("like",s.comment))},[J(_(Oa),{active:v.value},null,8,["active"]),"like"in s.comment?(p(),m("span",{key:0,textContent:T(s.comment.like)},null,8,_i)):R("v-if",!0)],8,Li),b("button",{type:"button",class:Q(["wl-reply",{active:w.value}]),title:w.value?o.value.cancelReply:o.value.reply,onClick:g[3]||(g[3]=S=>s.$emit("reply",w.value?null:s.comment))},[J(_(Va))],10,Ri)])]),b("div",zi,[s.comment.addr?(p(),m("span",{key:0,class:"wl-addr","data-value":s.comment.addr,textContent:T(s.comment.addr)},null,8,Si)):R("v-if",!0),s.comment.browser?(p(),m("span",{key:1,class:"wl-browser","data-value":s.comment.browser,textContent:T(s.comment.browser)},null,8,Ii)):R("v-if",!0),s.comment.os?(p(),m("span",{key:2,class:"wl-os","data-value":s.comment.os,textContent:T(s.comment.os)},null,8,Ei)):R("v-if",!0)]),I.value?R("v-if",!0):(p(),m("div",{key:0,class:"wl-content",innerHTML:s.comment.comment},null,8,Ai)),d.value&&!I.value?(p(),m("div",ji,[b("span",Ti,[(p(),m(X,null,ie(n,S=>b("button",{key:S,type:"submit",class:Q(`wl-btn wl-${S}`),disabled:s.comment.status===S,onClick:C=>s.$emit("status",{status:S,comment:s.comment}),textContent:T(o.value[S])},null,10,Ui)),64))]),d.value&&!s.comment.rid?(p(),m("button",{key:0,type:"submit",class:"wl-btn wl-sticky",onClick:g[4]||(g[4]=S=>s.$emit("sticky",s.comment))},T(s.comment.sticky?o.value.unsticky:o.value.sticky),1)):R("v-if",!0)])):R("v-if",!0),w.value||I.value?(p(),m("div",{key:2,class:Q({"wl-reply-wrapper":w.value,"wl-edit-wrapper":I.value})},[J(Jn,{edit:s.edit,"reply-id":(j=s.reply)==null?void 0:j.objectId,"reply-user":s.comment.nick,"root-id":s.rootId,onLog:g[5]||(g[5]=S=>s.$emit("log")),onCancelReply:g[6]||(g[6]=S=>s.$emit("reply",null)),onCancelEdit:g[7]||(g[7]=S=>s.$emit("edit",null)),onSubmit:g[8]||(g[8]=S=>s.$emit("submit",S))},null,8,["edit","reply-id","reply-user","root-id"])],2)):R("v-if",!0),s.comment.children?(p(),m("div",Mi,[(p(!0),m(X,null,ie(s.comment.children,S=>(p(),de(z,{key:S.objectId,comment:S,reply:s.reply,edit:s.edit,"root-id":s.rootId,onLog:g[9]||(g[9]=C=>s.$emit("log")),onDelete:g[10]||(g[10]=C=>s.$emit("delete",C)),onEdit:g[11]||(g[11]=C=>s.$emit("edit",C)),onLike:g[12]||(g[12]=C=>s.$emit("like",C)),onReply:g[13]||(g[13]=C=>s.$emit("reply",C)),onStatus:g[14]||(g[14]=C=>s.$emit("status",C)),onSticky:g[15]||(g[15]=C=>s.$emit("sticky",C)),onSubmit:g[16]||(g[16]=C=>s.$emit("submit",C))},null,8,["comment","reply","edit","root-id"]))),128))])):R("v-if",!0)])],8,di)}}}),[["__file","CommentCard.vue"]]);const Oi="2.15.5",Di={"data-waline":""},Hi={class:"wl-meta-head"},Vi={class:"wl-count"},Bi=["textContent"],Ni={class:"wl-sort"},Wi=["onClick"],Fi={class:"wl-cards"},qi={key:1,class:"wl-operation"},Zi=["textContent"],Ki={key:0,class:"wl-loading"},Gi=["textContent"],Yi={key:2,class:"wl-operation"},Qi=["textContent"],Ji={key:3,class:"wl-power"},Xi=b("a",{href:"https://github.com/walinejs/waline",target:"_blank",rel:"noopener noreferrer"}," Waline ",-1);var er=Le({__name:"WalineComment",props:["serverURL","path","meta","requiredMeta","dark","commentSorting","lang","locale","pageSize","wordLimit","emoji","login","highlighter","texRenderer","imageUploader","search","copyright","recaptchaV3Key","turnstileKey","reaction"],setup(l){const t=l,n={latest:"insertedAt_desc",oldest:"insertedAt_asc",hottest:"like_desc"},e=Object.keys(n),a=Bt(),i=Zn(),r=E("loading"),o=E(0),u=E(1),v=E(0),c=G(()=>(({serverURL:$,path:L=location.pathname,lang:U=typeof navigator>"u"?"en-US":navigator.language,locale:F,emoji:H=rn,meta:ee=["nick","mail","link"],requiredMeta:q=[],dark:ne=!1,pageSize:re=10,wordLimit:we,imageUploader:$e,highlighter:_e,texRenderer:Re,copyright:ye=!0,login:ke="enable",search:oe,reaction:xe,recaptchaV3Key:je="",turnstileKey:f="",commentSorting:h="latest",...x})=>({serverURL:wl($),path:cl(L),locale:{...Lt[U]||Lt["en-US"],...typeof F=="object"?F:{}},wordLimit:yl(we),meta:ln(ee),requiredMeta:ln(q),imageUploader:_t($e,dl),highlighter:_t(_e,fl),texRenderer:_t(Re,hl),lang:Object.keys(Lt).includes(U)?U:"en-US",dark:ne,emoji:typeof H=="boolean"?H?rn:[]:H,pageSize:re,login:ke,copyright:ye,search:oe!==!1&&(typeof oe=="object"?oe:ml(U)),recaptchaV3Key:je,turnstileKey:f,reaction:Array.isArray(xe)?xe:xe===!0?pl:[],commentSorting:h,...x}))(t)),d=E(c.value.commentSorting),y=E([]),w=E(null),I=E(null),s=G(()=>{return typeof($=c.value.dark)=="string"?$==="auto"?`@media(prefers-color-scheme:dark){body${Rt}}`:`${$}${Rt}`:$===!0?`:root${Rt}`:"";var $}),g=G(()=>c.value.locale);let z;Tn(s,{id:"waline-darkmode"});const j=$=>{var ee;const{serverURL:L,path:U,pageSize:F}=c.value,H=new AbortController;r.value="loading",z==null||z(),(({serverURL:q,lang:ne,path:re,page:we,pageSize:$e,sortBy:_e,signal:Re,token:ye})=>{const ke={};return ye&&(ke.Authorization=`Bearer ${ye}`),fetch(`${q}/comment?path=${encodeURIComponent(re)}&pageSize=${$e}&page=${we}&lang=${ne}&sortBy=${_e}`,{signal:Re,headers:ke}).then(oe=>oe.json()).then(oe=>Pt(oe,"Get comment data"))})({serverURL:L,lang:c.value.lang,path:U,pageSize:F,sortBy:n[d.value],page:$,signal:H.signal,token:(ee=a.value)==null?void 0:ee.token}).then(q=>{r.value="success",o.value=q.count,y.value.push(...q.data),u.value=$,v.value=q.totalPages}).catch(q=>{q.name!=="AbortError"&&(console.error(q.message),r.value="error")}),z=H.abort.bind(H)},S=()=>j(u.value+1),C=()=>{o.value=0,y.value=[],j(1)},K=$=>{w.value=$},Y=$=>{I.value=$},W=$=>{if(I.value)I.value.comment=$.comment,I.value.orig=$.orig;else if($.rid){const L=y.value.find(({objectId:U})=>U===$.rid);if(!L)return;Array.isArray(L.children)||(L.children=[]),L.children.push($)}else y.value.unshift($),o.value+=1},ce=async({comment:$,status:L})=>{var H;if($.status===L)return;const{serverURL:U,lang:F}=c.value;await ut({serverURL:U,lang:F,token:(H=a.value)==null?void 0:H.token,objectId:$.objectId,comment:{status:L}}),$.status=L},he=async $=>{var F;if($.rid)return;const{serverURL:L,lang:U}=c.value;await ut({serverURL:L,lang:U,token:(F=a.value)==null?void 0:F.token,objectId:$.objectId,comment:{sticky:$.sticky?0:1}}),$.sticky=!$.sticky},Ae=async({objectId:$})=>{var F;if(!confirm("Are you sure you want to delete this comment?"))return;const{serverURL:L,lang:U}=c.value;await(({serverURL:H,lang:ee,token:q,objectId:ne})=>fetch(`${H}/comment/${ne}?lang=${ee}`,{method:"DELETE",headers:{Authorization:`Bearer ${q}`}}).then(re=>re.json()).then(re=>Pt(re,"Delete comment")))({serverURL:L,lang:U,token:(F=a.value)==null?void 0:F.token,objectId:$}),y.value.some((H,ee)=>H.objectId===$?(y.value=y.value.filter((q,ne)=>ne!==ee),!0):H.children.some((q,ne)=>q.objectId===$&&(y.value[ee].children=H.children.filter((re,we)=>we!==ne),!0)))},ve=async $=>{var ee;const{serverURL:L,lang:U}=c.value,{objectId:F}=$,H=i.value.includes(F);await ut({serverURL:L,lang:U,objectId:F,token:(ee=a.value)==null?void 0:ee.token,comment:{like:!H}}),H?i.value=i.value.filter(q=>q!==F):(i.value=[...i.value,F],i.value.length>50&&(i.value=i.value.slice(-50))),$.like=($.like||0)+(H?-1:1)};return Un("config",c),Me(()=>{fe(()=>[t.serverURL,t.path],()=>C(),{immediate:!0})}),qe(()=>z==null?void 0:z()),($,L)=>(p(),m("div",Di,[J(il),w.value?R("v-if",!0):(p(),de(Jn,{key:0,onLog:C,onSubmit:W})),b("div",Hi,[b("div",Vi,[o.value?(p(),m("span",{key:0,class:"wl-num",textContent:T(o.value)},null,8,Bi)):R("v-if",!0),be(" "+T(g.value.comment),1)]),b("ul",Ni,[(p(!0),m(X,null,ie(_(e),U=>(p(),m("li",{key:U,class:Q([U===d.value?"active":""]),onClick:F=>(H=>{d.value!==H&&(d.value=H,C())})(U)},T(g.value[U]),11,Wi))),128))])]),b("div",Fi,[(p(!0),m(X,null,ie(y.value,U=>(p(),de(Pi,{key:U.objectId,"root-id":U.objectId,comment:U,reply:w.value,edit:I.value,onLog:C,onReply:K,onEdit:Y,onSubmit:W,onStatus:ce,onDelete:Ae,onSticky:he,onLike:ve},null,8,["root-id","comment","reply","edit"]))),128))]),r.value==="error"?(p(),m("div",qi,[b("button",{type:"button",class:"wl-btn",onClick:C,textContent:T(g.value.refresh)},null,8,Zi)])):(p(),m(X,{key:2},[r.value==="loading"?(p(),m("div",Ki,[J(_(et),{size:30})])):y.value.length?u.value<v.value?(p(),m("div",Yi,[b("button",{type:"button",class:"wl-btn",onClick:S,textContent:T(g.value.more)},null,8,Qi)])):R("v-if",!0):(p(),m("div",{key:1,class:"wl-empty",textContent:T(g.value.sofa)},null,8,Gi))],64)),c.value.copyright?(p(),m("div",Ji,[be(" Powered by "),Xi,be(" v"+T(_(Oi)),1)])):R("v-if",!0)]))}}),tr=lt(er,[["__file","WalineComment.vue"]]);const nr=["nick","mail","link"],dn=l=>l.filter(t=>nr.includes(t)),hn=["//unpkg.com/@waline/[email protected]/weibo"],ar="en-US",lr=["//unpkg.com/@waline/emojis/tieba/tieba_agree.png","//unpkg.com/@waline/emojis/tieba/tieba_look_down.png","//unpkg.com/@waline/emojis/tieba/tieba_sunglasses.png","//unpkg.com/@waline/emojis/tieba/tieba_pick_nose.png","//unpkg.com/@waline/emojis/tieba/tieba_awkward.png","//unpkg.com/@waline/emojis/tieba/tieba_sleep.png"],ir=l=>new Promise((t,n)=>{if(l.size>128e3)return n(new Error("File too large! File size limit 128KB"));const e=new FileReader;e.readAsDataURL(l),e.onload=()=>{var a;return t(((a=e.result)==null?void 0:a.toString())||"")},e.onerror=n}),rr=l=>l===!0?'<p class="wl-tex">Tex is not available in preview</p>':'<span class="wl-tex">Tex is not available in preview</span>',or=l=>{const t=async(n,e={})=>fetch(`https://api.giphy.com/v1/gifs/${n}?${new URLSearchParams({lang:l,limit:"20",rating:"g",api_key:"6CIMLkNMMOhRcXPoMCPkFy4Ybk2XUiMp",...e}).toString()}`).then(a=>a.json()).then(({data:a})=>a.map(i=>({title:i.title,src:i.images.downsized_medium.url})));return{search:n=>t("search",{q:n,offset:"0"}),default:()=>t("trending",{}),more:(n,e=0)=>t("search",{q:n,offset:e.toString()})}},sr=new RegExp(`(${/[\u4E00-\u9FFF\u3400-\u4dbf\uf900-\ufaff\u3040-\u309f\uac00-\ud7af\u0400-\u04FF]+|\w+/.source}|${/</.source})|((?:${/(?:^|\s)\/\/(.+?)$/gm.source})|(?:${/\/\*([\S\s]*?)\*\//gm.source}))`,"gmi"),mn=["23AC69","91C132","F19726","E8552D","1AAB8E","E1147F","2980C1","1BA1E6","9FA0A0","F19726","E30B20","E30B20","A3338B"],St={},cr=l=>{let t=0;return l.replace(sr,(n,e,a)=>{if(a)return`<span style="color: slategray">${a}</span>`;if(e==="<")return"<";let i;St[e]?i=St[e]:(i=mn[t],St[e]=i);const r=`<span style="color: #${i}">${e}</span>`;return t=++t%mn.length,r})},ur=["nick","nickError","mail","mailError","link","optional","placeholder","sofa","submit","like","cancelLike","reply","cancelReply","comment","refresh","more","preview","emoji","uploadImage","seconds","minutes","hours","days","now","uploading","login","logout","admin","sticky","word","wordHint","anonymous","level0","level1","level2","level3","level4","level5","gif","gifSearchPlaceholder","profile","approved","waiting","spam","unsticky","oldest","latest","hottest","reactionTitle"],Ke=l=>Object.fromEntries(l.map((t,n)=>[ur[n],t]));var It=Ke(["NickName","NickName cannot be less than 3 bytes.","E-Mail","Please confirm your email address.","Website","Optional","Comment here...","No comment yet.","Submit","Like","Cancel like","Reply","Cancel reply","Comments","Refresh","Load More...","Preview","Emoji","Upload Image","seconds ago","minutes ago","hours ago","days ago","just now","Uploading","Login","logout","Admin","Sticky","Words",`Please input comments between $0 and $1 words!
Current word number: $2`,"Anonymous","Dwarves","Hobbits","Ents","Wizards","Elves","Maiar","GIF","Search GIF","Profile","Approved","Waiting","Spam","Unsticky","Oldest","Latest","Hottest","What do you think?"]),st=Ke(["ニックネーム","3バイト以上のニックネームをご入力ください.","メールアドレス","メールアドレスをご確認ください.","サイト","オプション","ここにコメント","コメントしましょう~","提出する","Like","Cancel like","返信する","キャンセル","コメント","更新","さらに読み込む","プレビュー","絵文字","画像をアップロード","秒前","分前","時間前","日前","たっだ今","アップロード","ログインする","ログアウト","管理者","トップに置く","ワード",`コメントは $0 から $1 ワードの間でなければなりません!
現在の単語番号: $2`,"匿名","うえにん","なかにん","しもおし","特にしもおし","かげ","なぬし","GIF","探す GIF","個人情報","承認済み","待っている","スパム","べたつかない","逆順","正順","人気順","どう思いますか?"]),gn=Ke(["Apelido","Apelido não pode ser menor que 3 bytes.","E-Mail","Por favor, confirme seu endereço de e-mail.","Website","Opcional","Comente aqui...","Nenhum comentário, ainda.","Enviar","Like","Cancel like","Responder","Cancelar resposta","Comentários","Refrescar","Carregar Mais...","Visualizar","Emoji","Enviar Imagem","segundos atrás","minutos atrás","horas atrás","dias atrás","agora mesmo","Enviando","Entrar","Sair","Admin","Sticky","Palavras",`Favor enviar comentário com $0 a $1 palavras!
Número de palavras atuais: $2`,"Anônimo","Dwarves","Hobbits","Ents","Wizards","Elves","Maiar","GIF","Pesquisar GIF","informação pessoal","Aprovado","Espera","Spam","Unsticky","Mais velho","Mais recentes","Mais quente","O que você acha?"]),Et=Ke(["Псевдоним","Никнейм не может быть меньше 3 байт.","Эл. адрес","Пожалуйста, подтвердите адрес вашей электронной почты.","Веб-сайт","Необязательный","Комментарий здесь...","Пока нет комментариев.","Отправить","Like","Cancel like","Отвечать","Отменить ответ","Комментарии","Обновить","Загрузи больше...","Превью","эмодзи","Загрузить изображение","секунд назад","несколько минут назад","несколько часов назад","дней назад","прямо сейчас","Загрузка","Авторизоваться","Выход из системы","Админ","Липкий","Слова",`Пожалуйста, введите комментарии от $0 до $1 слов!
Номер текущего слова: $2`,"Анонимный","Dwarves","Hobbits","Ents","Wizards","Elves","Maiar","GIF","Поиск GIF","Персональные данные","Одобренный","Ожидающий","Спам","Нелипкий","самый старый","последний","самый горячий","Что вы думаете?"]),At=Ke(["昵称","昵称不能少于3个字符","邮箱","请填写正确的邮件地址","网址","可选","欢迎评论","来发评论吧~","提交","喜欢","取消喜欢","回复","取消回复","评论","刷新","加载更多...","预览","表情","上传图片","秒前","分钟前","小时前","天前","刚刚","正在上传","登录","退出","博主","置顶","字",`评论字数应在 $0 到 $1 字之间!
当前字数:$2`,"匿名","潜水","冒泡","吐槽","活跃","话痨","传说","表情包","搜索表情包","个人资料","通过","待审核","垃圾","取消置顶","按倒序","按正序","按热度","你认为这篇文章怎么样?"]),fn=Ke(["暱稱","暱稱不能少於3個字元","郵箱","請填寫正確的郵件地址","網址","可選","歡迎留言","來發留言吧~","送出","喜歡","取消喜歡","回覆","取消回覆","留言","重整","載入更多...","預覽","表情","上傳圖片","秒前","分鐘前","小時前","天前","剛剛","正在上傳","登入","登出","管理者","置頂","字",`留言字數應在 $0 到 $1 字之間!
目前字數:$2`,"匿名","潛水","冒泡","吐槽","活躍","多話","傳說","表情包","搜尋表情包","個人資料","通過","待審核","垃圾","取消置頂","最早","最新","熱門","你認為這篇文章怎麼樣?"]);const jt={zh:At,"zh-cn":At,"zh-CN":At,"zh-tw":fn,"zh-TW":fn,en:It,"en-US":It,"en-us":It,jp:st,ja:st,"jp-jp":st,"jp-JP":st,"pt-br":gn,"pt-BR":gn,ru:Et,"ru-ru":Et,"ru-RU":Et},Xn={"Content-Type":"application/json"},Ot=(l,t="")=>{if(typeof l=="object"&&l.errno)throw new TypeError(`${t} failed with ${l.errno}: ${l.errmsg}`);return l},ea=({serverURL:l,lang:t,paths:n,type:e,signal:a})=>fetch(`${l}/article?path=${encodeURIComponent(n.join(","))}&type=${encodeURIComponent(e.join(","))}&lang=${t}`,{signal:a}).then(i=>i.json()),Dt=({serverURL:l,lang:t,path:n,type:e,action:a})=>fetch(`${l}/article?lang=${t}`,{method:"POST",headers:Xn,body:JSON.stringify({path:n,type:e,action:a})}).then(i=>i.json()),pt=({serverURL:l,lang:t,token:n,objectId:e,comment:a})=>fetch(`${l}/comment/${e}?lang=${t}`,{method:"PUT",headers:{...Xn,Authorization:`Bearer ${n}`},body:JSON.stringify(a)}).then(i=>i.json()).then(i=>Ot(i,"Update comment")),ta=l=>{try{l=decodeURI(l)}catch{}return l},na=(l="")=>l.replace(/\/$/u,""),aa=l=>/^(https?:)?\/\//.test(l),wt=l=>{const t=na(l);return aa(t)?t:`https://${t}`},pr=l=>Array.isArray(l)?l:!!l&&[0,l],Tt=(l,t)=>typeof l=="function"?l:l!==!1&&t,Ut="{--waline-white:#000;--waline-light-grey:#666;--waline-dark-grey:#999;--waline-color:#888;--waline-bgcolor:#1e1e1e;--waline-bgcolor-light:#272727;--waline-bgcolor-hover: #444;--waline-border-color:#333;--waline-disable-bgcolor:#444;--waline-disable-color:#272727;--waline-bq-color:#272727;--waline-info-bgcolor:#272727;--waline-info-color:#666}",Mt=(l,t)=>{let n=l.toString();for(;n.length<t;)n="0"+n;return n},dr=(l,t,n)=>{if(!l)return"";const e=typeof l=="string"?new Date(l.indexOf(" ")!==-1?l.replace(/-/g,"/"):l):l,a=t.getTime()-e.getTime(),i=Math.floor(a/864e5);if(i===0){const r=a%864e5,o=Math.floor(r/36e5);if(o===0){const u=r%36e5,v=Math.floor(u/6e4);if(v===0){const c=u%6e4;return`${Math.round(c/1e3)} ${n.seconds}`}return`${v} ${n.minutes}`}return`${o} ${n.hours}`}return i<0?n.now:i<8?`${i} ${n.days}`:(r=>{const o=Mt(r.getDate(),2),u=Mt(r.getMonth()+1,2);return`${Mt(r.getFullYear(),2)}-${u}-${o}`})(e)},hr=/^[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])?)*$/,mr=l=>{const t=Ce("WALINE_EMOJI",{}),n=!!/@[0-9]+\.[0-9]+\.[0-9]+/.test(l);if(n){const e=t.value[l];if(e)return Promise.resolve(e)}return fetch(`${l}/info.json`).then(e=>e.json()).then(e=>{const a={folder:l,...e};return n&&(t.value[l]=a),a})},vn=(l,t="",n="",e="")=>`${t?`${t}/`:""}${n}${l}${e?`.${e}`:""}`,la=l=>{l.name!=="AbortError"&&console.error(l.message)},gr=l=>l.type.includes("image"),wn=l=>{const t=Array.from(l).find(gr);return t?t.getAsFile():null},fr=/\$.*?\$/,vr=/^\$(.*?)\$/,wr=/^(?:\s{0,3})\$\$((?:[^\n]|\n[^\n])+?)\n{0,1}\$\$/,ia=(l="",t={})=>l.replace(/:(.+?):/g,(n,e)=>t[e]?`<img class="wl-emoji" src="${t[e]}" alt="${e}">`:n),yr=(l,{emojiMap:t,highlighter:n,texRenderer:e})=>{if(D.setOptions({highlight:n||void 0,breaks:!0,smartLists:!0,smartypants:!0}),e){const a=(i=>[{name:"blockMath",level:"block",tokenizer(r){const o=wr.exec(r);if(o!==null)return{type:"html",raw:o[0],text:i(!0,o[1])}}},{name:"inlineMath",level:"inline",start(r){const o=r.search(fr);return o!==-1?o:r.length},tokenizer(r){const o=vr.exec(r);if(o!==null)return{type:"html",raw:o[0],text:i(!1,o[1])}}}])(e);D.use({extensions:a})}return D.parse(ia(l,t))},yn=l=>l.dataset.path||l.getAttribute("id"),kr=({serverURL:l,path:t=window.location.pathname,selector:n=".waline-comment-count",lang:e=navigator.language})=>{const a=new AbortController,i=document.querySelectorAll(n);return i.length&&(({serverURL:r,lang:o,paths:u,signal:v})=>fetch(`${r}/comment?type=count&url=${encodeURIComponent(u.join(","))}&lang=${o}`,{signal:v}).then(c=>c.json()).then(c=>Array.isArray(c)?c:[c]))({serverURL:wt(l),paths:Array.from(i).map(r=>ta(r.dataset.path||r.getAttribute("id")||t)),lang:e,signal:a.signal}).then(r=>{i.forEach((o,u)=>{o.innerText=r[u].toString()})}).catch(la),a.abort.bind(a)},kn=({size:l})=>P("svg",{class:"wl-close-icon",viewBox:"0 0 1024 1024",width:l,height:l},[P("path",{d:"M697.173 85.333h-369.92c-144.64 0-241.92 101.547-241.92 252.587v348.587c0 150.613 97.28 252.16 241.92 252.16h369.92c144.64 0 241.494-101.547 241.494-252.16V337.92c0-151.04-96.854-252.587-241.494-252.587z",fill:"currentColor"}),P("path",{d:"m640.683 587.52-75.947-75.861 75.904-75.862a37.29 37.29 0 0 0 0-52.778 37.205 37.205 0 0 0-52.779 0l-75.946 75.818-75.862-75.946a37.419 37.419 0 0 0-52.821 0 37.419 37.419 0 0 0 0 52.821l75.947 75.947-75.776 75.733a37.29 37.29 0 1 0 52.778 52.821l75.776-75.776 75.947 75.947a37.376 37.376 0 0 0 52.779-52.821z",fill:"#888"})]),br=()=>P("svg",{viewBox:"0 0 1024 1024",width:"24",height:"24"},P("path",{d:"m341.013 394.667 27.755 393.45h271.83l27.733-393.45h64.106l-28.01 397.952a64 64 0 0 1-63.83 59.498H368.768a64 64 0 0 1-63.83-59.52l-28.053-397.93h64.128zm139.307 19.818v298.667h-64V414.485h64zm117.013 0v298.667h-64V414.485h64zM181.333 288h640v64h-640v-64zm453.483-106.667v64h-256v-64h256z",fill:"red"})),$r=()=>P("svg",{viewBox:"0 0 1024 1024",width:"24",height:"24"},P("path",{d:"M563.2 463.3 677 540c1.7 1.2 3.7 1.8 5.8 1.8.7 0 1.4-.1 2-.2 2.7-.5 5.1-2.1 6.6-4.4l25.3-37.8c1.5-2.3 2.1-5.1 1.6-7.8s-2.1-5.1-4.4-6.6l-73.6-49.1 73.6-49.1c2.3-1.5 3.9-3.9 4.4-6.6.5-2.7 0-5.5-1.6-7.8l-25.3-37.8a10.1 10.1 0 0 0-6.6-4.4c-.7-.1-1.3-.2-2-.2-2.1 0-4.1.6-5.8 1.8l-113.8 76.6c-9.2 6.2-14.7 16.4-14.7 27.5.1 11 5.5 21.3 14.7 27.4zM387 348.8h-45.5c-5.7 0-10.4 4.7-10.4 10.4v153.3c0 5.7 4.7 10.4 10.4 10.4H387c5.7 0 10.4-4.7 10.4-10.4V359.2c0-5.7-4.7-10.4-10.4-10.4zm333.8 241.3-41-20a10.3 10.3 0 0 0-8.1-.5c-2.6.9-4.8 2.9-5.9 5.4-30.1 64.9-93.1 109.1-164.4 115.2-5.7.5-9.9 5.5-9.5 11.2l3.9 45.5c.5 5.3 5 9.5 10.3 9.5h.9c94.8-8 178.5-66.5 218.6-152.7 2.4-5 .3-11.2-4.8-13.6zm186-186.1c-11.9-42-30.5-81.4-55.2-117.1-24.1-34.9-53.5-65.6-87.5-91.2-33.9-25.6-71.5-45.5-111.6-59.2-41.2-14-84.1-21.1-127.8-21.1h-1.2c-75.4 0-148.8 21.4-212.5 61.7-63.7 40.3-114.3 97.6-146.5 165.8-32.2 68.1-44.3 143.6-35.1 218.4 9.3 74.8 39.4 145 87.3 203.3.1.2.3.3.4.5l36.2 38.4c1.1 1.2 2.5 2.1 3.9 2.6 73.3 66.7 168.2 103.5 267.5 103.5 73.3 0 145.2-20.3 207.7-58.7 37.3-22.9 70.3-51.5 98.1-85 27.1-32.7 48.7-69.5 64.2-109.1 15.5-39.7 24.4-81.3 26.6-123.8 2.4-43.6-2.5-87-14.5-129zm-60.5 181.1c-8.3 37-22.8 72-43 104-19.7 31.1-44.3 58.6-73.1 81.7-28.8 23.1-61 41-95.7 53.4-35.6 12.7-72.9 19.1-110.9 19.1-82.6 0-161.7-30.6-222.8-86.2l-34.1-35.8c-23.9-29.3-42.4-62.2-55.1-97.7-12.4-34.7-18.8-71-19.2-107.9-.4-36.9 5.4-73.3 17.1-108.2 12-35.8 30-69.2 53.4-99.1 31.7-40.4 71.1-72 117.2-94.1 44.5-21.3 94-32.6 143.4-32.6 49.3 0 97 10.8 141.8 32 34.3 16.3 65.3 38.1 92 64.8 26.1 26 47.5 56 63.6 89.2 16.2 33.2 26.6 68.5 31 105.1 4.6 37.5 2.7 75.3-5.6 112.3z",fill:"currentColor"})),xr=()=>P("svg",{viewBox:"0 0 1024 1024",width:"24",height:"24"},[P("path",{d:"M784 112H240c-88 0-160 72-160 160v480c0 88 72 160 160 160h544c88 0 160-72 160-160V272c0-88-72-160-160-160zm96 640c0 52.8-43.2 96-96 96H240c-52.8 0-96-43.2-96-96V272c0-52.8 43.2-96 96-96h544c52.8 0 96 43.2 96 96v480z",fill:"currentColor"}),P("path",{d:"M352 480c52.8 0 96-43.2 96-96s-43.2-96-96-96-96 43.2-96 96 43.2 96 96 96zm0-128c17.6 0 32 14.4 32 32s-14.4 32-32 32-32-14.4-32-32 14.4-32 32-32zm462.4 379.2-3.2-3.2-177.6-177.6c-25.6-25.6-65.6-25.6-91.2 0l-80 80-36.8-36.8c-25.6-25.6-65.6-25.6-91.2 0L200 728c-4.8 6.4-8 14.4-8 24 0 17.6 14.4 32 32 32 9.6 0 16-3.2 22.4-9.6L380.8 640l134.4 134.4c6.4 6.4 14.4 9.6 24 9.6 17.6 0 32-14.4 32-32 0-9.6-4.8-17.6-9.6-24l-52.8-52.8 80-80L769.6 776c6.4 4.8 12.8 8 20.8 8 17.6 0 32-14.4 32-32 0-8-3.2-16-8-20.8z",fill:"currentColor"})]),Cr=({active:l=!1})=>P("svg",{viewBox:"0 0 1024 1024",width:"24",height:"24"},[P("path",{d:"M850.654 323.804c-11.042-25.625-26.862-48.532-46.885-68.225-20.022-19.61-43.258-34.936-69.213-45.73-26.78-11.124-55.124-16.727-84.375-16.727-40.622 0-80.256 11.123-114.698 32.135A214.79 214.79 0 0 0 512 241.819a214.79 214.79 0 0 0-23.483-16.562c-34.442-21.012-74.076-32.135-114.698-32.135-29.25 0-57.595 5.603-84.375 16.727-25.872 10.711-49.19 26.12-69.213 45.73-20.105 19.693-35.843 42.6-46.885 68.225-11.453 26.615-17.303 54.877-17.303 83.963 0 27.439 5.603 56.03 16.727 85.117 9.31 24.307 22.659 49.52 39.715 74.981 27.027 40.293 64.188 82.316 110.33 124.915 76.465 70.615 152.189 119.394 155.402 121.371l19.528 12.525c8.652 5.52 19.776 5.52 28.427 0l19.529-12.525c3.213-2.06 78.854-50.756 155.401-121.371 46.143-42.6 83.304-84.622 110.33-124.915 17.057-25.46 30.487-50.674 39.716-74.981 11.124-29.087 16.727-57.678 16.727-85.117.082-29.086-5.768-57.348-17.221-83.963z"+(l?"":"M512 761.5S218.665 573.55 218.665 407.767c0-83.963 69.461-152.023 155.154-152.023 60.233 0 112.473 33.618 138.181 82.727 25.708-49.109 77.948-82.727 138.18-82.727 85.694 0 155.155 68.06 155.155 152.023C805.335 573.551 512 761.5 512 761.5z"),fill:l?"red":"currentColor"})]),Lr=()=>P("svg",{viewBox:"0 0 1024 1024",width:"24",height:"24"},[P("path",{d:"M710.816 654.301c70.323-96.639 61.084-230.578-23.705-314.843-46.098-46.098-107.183-71.109-172.28-71.109-65.008 0-126.092 25.444-172.28 71.109-45.227 46.098-70.756 107.183-70.756 172.106 0 64.923 25.444 126.007 71.194 172.106 46.099 46.098 107.184 71.109 172.28 71.109 51.414 0 100.648-16.212 142.824-47.404l126.53 126.006c7.058 7.06 16.297 10.979 26.406 10.979 10.105 0 19.343-3.919 26.402-10.979 14.467-14.467 14.467-38.172 0-52.723L710.816 654.301zm-315.107-23.265c-65.88-65.88-65.88-172.54 0-238.42 32.069-32.07 74.245-49.149 119.471-49.149 45.227 0 87.407 17.603 119.472 49.149 65.88 65.879 65.88 172.539 0 238.42-63.612 63.178-175.242 63.178-238.943 0zm0 0",fill:"currentColor"}),P("path",{d:"M703.319 121.603H321.03c-109.8 0-199.469 89.146-199.469 199.38v382.034c0 109.796 89.236 199.38 199.469 199.38h207.397c20.653 0 37.384-16.645 37.384-37.299 0-20.649-16.731-37.296-37.384-37.296H321.03c-68.582 0-124.352-55.77-124.352-124.267V321.421c0-68.496 55.77-124.267 124.352-124.267h382.289c68.582 0 124.352 55.771 124.352 124.267V524.72c0 20.654 16.736 37.299 37.385 37.299 20.654 0 37.384-16.645 37.384-37.299V320.549c-.085-109.8-89.321-198.946-199.121-198.946zm0 0",fill:"currentColor"})]),_r=()=>P("svg",{width:"16",height:"16",ariaHidden:"true"},P("path",{d:"M14.85 3H1.15C.52 3 0 3.52 0 4.15v7.69C0 12.48.52 13 1.15 13h13.69c.64 0 1.15-.52 1.15-1.15v-7.7C16 3.52 15.48 3 14.85 3zM9 11H7V8L5.5 9.92 4 8v3H2V5h2l1.5 2L7 5h2v6zm2.99.5L9.5 8H11V5h2v3h1.5l-2.51 3.5z",fill:"currentColor"})),Rr=()=>P("svg",{viewBox:"0 0 1024 1024",width:"24",height:"24"},P("path",{d:"M810.667 213.333a64 64 0 0 1 64 64V704a64 64 0 0 1-64 64H478.336l-146.645 96.107a21.333 21.333 0 0 1-33.024-17.856V768h-85.334a64 64 0 0 1-64-64V277.333a64 64 0 0 1 64-64h597.334zm0 64H213.333V704h149.334v63.296L459.243 704h351.424V277.333zm-271.36 213.334v64h-176.64v-64h176.64zm122.026-128v64H362.667v-64h298.666z",fill:"currentColor"})),zr=()=>P("svg",{viewBox:"0 0 1024 1024",width:"24",height:"24"},P("path",{d:"M813.039 318.772L480.53 651.278H360.718V531.463L693.227 198.961C697.904 194.284 704.027 192 710.157 192C716.302 192 722.436 194.284 727.114 198.961L813.039 284.88C817.72 289.561 820 295.684 820 301.825C820 307.95 817.72 314.093 813.039 318.772ZM710.172 261.888L420.624 551.431V591.376H460.561L750.109 301.825L710.172 261.888ZM490.517 291.845H240.906V771.09H720.156V521.479C720.156 504.947 733.559 491.529 750.109 491.529C766.653 491.529 780.063 504.947 780.063 521.479V791.059C780.063 813.118 762.18 831 740.125 831H220.937C198.882 831 181 813.118 181 791.059V271.872C181 249.817 198.882 231.935 220.937 231.935H490.517C507.06 231.935 520.47 245.352 520.47 261.888C520.47 278.424 507.06 291.845 490.517 291.845Z",fill:"currentColor"})),Sr=()=>P("svg",{class:"verified-icon",viewBox:"0 0 1024 1024",width:"14",height:"14"},P("path",{d:"m894.4 461.56-54.4-63.2c-10.4-12-18.8-34.4-18.8-50.4v-68c0-42.4-34.8-77.2-77.2-77.2h-68c-15.6 0-38.4-8.4-50.4-18.8l-63.2-54.4c-27.6-23.6-72.8-23.6-100.8 0l-62.8 54.8c-12 10-34.8 18.4-50.4 18.4h-69.2c-42.4 0-77.2 34.8-77.2 77.2v68.4c0 15.6-8.4 38-18.4 50l-54 63.6c-23.2 27.6-23.2 72.4 0 100l54 63.6c10 12 18.4 34.4 18.4 50v68.4c0 42.4 34.8 77.2 77.2 77.2h69.2c15.6 0 38.4 8.4 50.4 18.8l63.2 54.4c27.6 23.6 72.8 23.6 100.8 0l63.2-54.4c12-10.4 34.4-18.8 50.4-18.8h68c42.4 0 77.2-34.8 77.2-77.2v-68c0-15.6 8.4-38.4 18.8-50.4l54.4-63.2c23.2-27.6 23.2-73.2-.4-100.8zm-216-25.2-193.2 193.2a30 30 0 0 1-42.4 0l-96.8-96.8a30.16 30.16 0 0 1 0-42.4c11.6-11.6 30.8-11.6 42.4 0l75.6 75.6 172-172c11.6-11.6 30.8-11.6 42.4 0 11.6 11.6 11.6 30.8 0 42.4z",fill:"#27ae60"})),nt=({size:l=100})=>P("svg",{width:l,height:l,viewBox:"0 0 100 100",preserveAspectRatio:"xMidYMid"},P("circle",{cx:50,cy:50,fill:"none",stroke:"currentColor",strokeWidth:"4",r:"40","stroke-dasharray":"85 30"},P("animateTransform",{attributeName:"transform",type:"rotate",repeatCount:"indefinite",dur:"1s",values:"0 50 50;360 50 50",keyTimes:"0;1"}))),Ir=()=>P("svg",{width:24,height:24,fill:"currentcolor",viewBox:"0 0 24 24"},[P("path",{style:"transform: translateY(0.5px)",d:"M18.968 10.5H15.968V11.484H17.984V12.984H15.968V15H14.468V9H18.968V10.5V10.5ZM8.984 9C9.26533 9 9.49967 9.09367 9.687 9.281C9.87433 9.46833 9.968 9.70267 9.968 9.984V10.5H6.499V13.5H8.468V12H9.968V14.016C9.968 14.2973 9.87433 14.5317 9.687 14.719C9.49967 14.9063 9.26533 15 8.984 15H5.984C5.70267 15 5.46833 14.9063 5.281 14.719C5.09367 14.5317 5 14.2973 5 14.016V9.985C5 9.70367 5.09367 9.46933 5.281 9.282C5.46833 9.09467 5.70267 9.001 5.984 9.001H8.984V9ZM11.468 9H12.968V15H11.468V9V9Z"}),P("path",{d:"M18.5 3H5.75C3.6875 3 2 4.6875 2 6.75V18C2 20.0625 3.6875 21.75 5.75 21.75H18.5C20.5625 21.75 22.25 20.0625 22.25 18V6.75C22.25 4.6875 20.5625 3 18.5 3ZM20.75 18C20.75 19.2375 19.7375 20.25 18.5 20.25H5.75C4.5125 20.25 3.5 19.2375 3.5 18V6.75C3.5 5.5125 4.5125 4.5 5.75 4.5H18.5C19.7375 4.5 20.75 5.5125 20.75 6.75V18Z"})]);let bn=null;const ra=()=>bn||(bn=Ce("WALINE_LIKE",[]));let $n=null;const Er=()=>$n??($n=Ce("WALINE_REACTION",{}));var yt=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},oa={},We={},at={},Ar=yt&&yt.__awaiter||function(l,t,n,e){return new(n||(n=Promise))(function(a,i){function r(v){try{u(e.next(v))}catch(c){i(c)}}function o(v){try{u(e.throw(v))}catch(c){i(c)}}function u(v){var c;v.done?a(v.value):(c=v.value,c instanceof n?c:new n(function(d){d(c)})).then(r,o)}u((e=e.apply(l,t||[])).next())})},jr=yt&&yt.__generator||function(l,t){var n,e,a,i,r={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]};return i={next:o(0),throw:o(1),return:o(2)},typeof Symbol=="function"&&(i[Symbol.iterator]=function(){return this}),i;function o(u){return function(v){return function(c){if(n)throw new TypeError("Generator is already executing.");for(;r;)try{if(n=1,e&&(a=2&c[0]?e.return:c[0]?e.throw||((a=e.return)&&a.call(e),0):e.next)&&!(a=a.call(e,c[1])).done)return a;switch(e=0,a&&(c=[2&c[0],a.value]),c[0]){case 0:case 1:a=c;break;case 4:return r.label++,{value:c[1],done:!1};case 5:r.label++,e=c[1],c=[0];continue;case 7:c=r.ops.pop(),r.trys.pop();continue;default:if(a=r.trys,!((a=a.length>0&&a[a.length-1])||c[0]!==6&&c[0]!==2)){r=0;continue}if(c[0]===3&&(!a||c[1]>a[0]&&c[1]<a[3])){r.label=c[1];break}if(c[0]===6&&r.label<a[1]){r.label=a[1],a=c;break}if(a&&r.label<a[2]){r.label=a[2],r.ops.push(c);break}a[2]&&r.ops.pop(),r.trys.pop();continue}c=t.call(l,r)}catch(d){c=[6,d],e=0}finally{n=a=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}([u,v])}}};Object.defineProperty(at,"__esModule",{value:!0}),at.ReCaptchaInstance=void 0;var Tr=function(){function l(t,n,e){this.siteKey=t,this.recaptchaID=n,this.recaptcha=e,this.styleContainer=null}return l.prototype.execute=function(t){return Ar(this,void 0,void 0,function(){return jr(this,function(n){return[2,this.recaptcha.enterprise?this.recaptcha.enterprise.execute(this.recaptchaID,{action:t}):this.recaptcha.execute(this.recaptchaID,{action:t})]})})},l.prototype.getSiteKey=function(){return this.siteKey},l.prototype.hideBadge=function(){this.styleContainer===null&&(this.styleContainer=document.createElement("style"),this.styleContainer.innerHTML=".grecaptcha-badge{visibility:hidden !important;}",document.head.appendChild(this.styleContainer))},l.prototype.showBadge=function(){this.styleContainer!==null&&(document.head.removeChild(this.styleContainer),this.styleContainer=null)},l}();at.ReCaptchaInstance=Tr,Object.defineProperty(We,"__esModule",{value:!0}),We.getInstance=We.load=void 0;var Oe,Ur=at;(function(l){l[l.NOT_LOADED=0]="NOT_LOADED",l[l.LOADING=1]="LOADING",l[l.LOADED=2]="LOADED"})(Oe||(Oe={}));var xn=function(){function l(){}return l.load=function(t,n){if(n===void 0&&(n={}),typeof document>"u")return Promise.reject(new Error("This is a library for the browser!"));if(l.getLoadingState()===Oe.LOADED)return l.instance.getSiteKey()===t?Promise.resolve(l.instance):Promise.reject(new Error("reCAPTCHA already loaded with different site key!"));if(l.getLoadingState()===Oe.LOADING)return t!==l.instanceSiteKey?Promise.reject(new Error("reCAPTCHA already loaded with different site key!")):new Promise(function(a,i){l.successfulLoadingConsumers.push(function(r){return a(r)}),l.errorLoadingRunnable.push(function(r){return i(r)})});l.instanceSiteKey=t,l.setLoadingState(Oe.LOADING);var e=new l;return new Promise(function(a,i){e.loadScript(t,n.useRecaptchaNet||!1,n.useEnterprise||!1,n.renderParameters?n.renderParameters:{},n.customUrl).then(function(){l.setLoadingState(Oe.LOADED);var r=e.doExplicitRender(grecaptcha,t,n.explicitRenderParameters?n.explicitRenderParameters:{},n.useEnterprise||!1),o=new Ur.ReCaptchaInstance(t,r,grecaptcha);l.successfulLoadingConsumers.forEach(function(u){return u(o)}),l.successfulLoadingConsumers=[],n.autoHideBadge&&o.hideBadge(),l.instance=o,a(o)}).catch(function(r){l.errorLoadingRunnable.forEach(function(o){return o(r)}),l.errorLoadingRunnable=[],i(r)})})},l.getInstance=function(){return l.instance},l.setLoadingState=function(t){l.loadingState=t},l.getLoadingState=function(){return l.loadingState===null?Oe.NOT_LOADED:l.loadingState},l.prototype.loadScript=function(t,n,e,a,i){var r=this;n===void 0&&(n=!1),e===void 0&&(e=!1),a===void 0&&(a={}),i===void 0&&(i="");var o=document.createElement("script");o.setAttribute("recaptcha-v3-script","");var u="https://www.google.com/recaptcha/api.js";n&&(u=e?"https://recaptcha.net/recaptcha/enterprise.js":"https://recaptcha.net/recaptcha/api.js"),e&&(u="https://www.google.com/recaptcha/enterprise.js"),i&&(u=i),a.render&&(a.render=void 0);var v=this.buildQueryString(a);return o.src=u+"?render=explicit"+v,new Promise(function(c,d){o.addEventListener("load",r.waitForScriptToLoad(function(){c(o)},e),!1),o.onerror=function(y){l.setLoadingState(Oe.NOT_LOADED),d(y)},document.head.appendChild(o)})},l.prototype.buildQueryString=function(t){return Object.keys(t).length<1?"":"&"+Object.keys(t).filter(function(n){return!!t[n]}).map(function(n){return n+"="+t[n]}).join("&")},l.prototype.waitForScriptToLoad=function(t,n){var e=this;return function(){window.grecaptcha===void 0?setTimeout(function(){e.waitForScriptToLoad(t,n)},l.SCRIPT_LOAD_DELAY):n?window.grecaptcha.enterprise.ready(function(){t()}):window.grecaptcha.ready(function(){t()})}},l.prototype.doExplicitRender=function(t,n,e,a){var i={sitekey:n,badge:e.badge,size:e.size,tabindex:e.tabindex};return e.container?a?t.enterprise.render(e.container,i):t.render(e.container,i):a?t.enterprise.render(i):t.render(i)},l.loadingState=null,l.instance=null,l.instanceSiteKey=null,l.successfulLoadingConsumers=[],l.errorLoadingRunnable=[],l.SCRIPT_LOAD_DELAY=25,l}();We.load=xn.load,We.getInstance=xn.getInstance,function(l){Object.defineProperty(l,"__esModule",{value:!0}),l.ReCaptchaInstance=l.getInstance=l.load=void 0;var t=We;Object.defineProperty(l,"load",{enumerable:!0,get:function(){return t.load}}),Object.defineProperty(l,"getInstance",{enumerable:!0,get:function(){return t.getInstance}});var n=at;Object.defineProperty(l,"ReCaptchaInstance",{enumerable:!0,get:function(){return n.ReCaptchaInstance}})}(oa);const Cn={};let Ln=null;const Nt=()=>Ln??(Ln=Ce("WALINE_USER",{})),Mr={key:0,class:"wl-reaction"},Pr=["textContent"],Or={class:"wl-reaction-list"},Dr=["onClick"],Hr={class:"wl-reaction-img"},Vr=["src","alt"],Br=["textContent"],Nr=["textContent"];var Wr=Le({__name:"ArticleReaction",setup(l,{expose:t}){t();const n=Er(),e=Fe("config"),a=E(-1),i=E([]),r=G(()=>e.value.locale),o=G(()=>e.value.reaction.length>0),u=G(()=>{const{reaction:c,path:d}=e.value;return c.map((y,w)=>({icon:y,desc:r.value[`reaction${w}`],active:n.value[d]===w}))});let v;return Me(()=>{fe(()=>[e.value.serverURL,e.value.path],()=>{(async()=>{if(o.value){const{serverURL:c,lang:d,path:y,reaction:w}=e.value,I=new AbortController;v=I.abort.bind(I);const s=await ea({serverURL:c,lang:d,paths:[y],type:w.map((g,z)=>`reaction${z}`),signal:I.signal});if(Array.isArray(s)||typeof s=="number")return;i.value=w.map((g,z)=>s[`reaction${z}`])}})()},{immediate:!0})}),qe(()=>v==null?void 0:v()),(c,d)=>u.value.length?(p(),m("div",Mr,[b("div",{class:"wl-reaction-title",textContent:T(r.value.reactionTitle)},null,8,Pr),b("ul",Or,[(p(!0),m(X,null,ie(u.value,({active:y,icon:w,desc:I},s)=>(p(),m("li",{key:s,class:Q(["wl-reaction-item",{active:y}]),onClick:g=>(async z=>{if(a.value===-1){const{serverURL:j,lang:S,path:C}=e.value,K=n.value[C];a.value=z,K!==void 0&&(await Dt({serverURL:j,lang:S,path:C,type:`reaction${K}`,action:"desc"}),i.value[K]=Math.max(i.value[K]-1,0)),K!==z&&(await Dt({serverURL:j,lang:S,path:C,type:`reaction${z}`}),i.value[z]=(i.value[z]||0)+1),K===z?delete n.value[C]:n.value[C]=z,a.value=-1}})(s)},[b("div",Hr,[b("img",{src:w,alt:I},null,8,Vr),a.value===s?(p(),de(_(nt),{key:0,class:"wl-reaction-loading"})):(p(),m("div",{key:1,class:"wl-reaction-votes",textContent:T(i.value[s]||0)},null,8,Br))]),b("div",{class:"wl-reaction-text",textContent:T(I)},null,8,Nr)],10,Dr))),128))])])):R("v-if",!0)}}),it=(l,t)=>{const n=l.__vccOpts||l;for(const[e,a]of t)n[e]=a;return n},Fr=it(Wr,[["__file","ArticleReaction.vue"]]);const qr=["data-index"],Zr=["src","title","onClick"];var Kr=it(Le({__name:"ImageWall",props:{items:{default:()=>[]},columnWidth:{default:300},gap:{default:0}},emits:["insert"],setup(l,{expose:t}){const n=l;t();let e=null;const a=E(null),i=E({}),r=E([]),o=()=>{const d=Math.floor((a.value.getBoundingClientRect().width+n.gap)/(n.columnWidth+n.gap));return d>0?d:1},u=async d=>{var w;if(d>=n.items.length)return;await Mn();const y=Array.from(((w=a.value)==null?void 0:w.children)||[]).reduce((I,s)=>s.getBoundingClientRect().height<I.getBoundingClientRect().height?s:I);r.value[Number(y.dataset.index)].push(d),await u(d+1)},v=async(d=!1)=>{if(r.value.length===o()&&!d)return;var y;r.value=(y=o(),new Array(y).fill(null).map(()=>[]));const w=window.scrollY;await u(0),window.scrollTo({top:w})},c=d=>{i.value[d.target.src]=!0};return Me(()=>{v(!0),e=new ResizeObserver(()=>{v()}),e.observe(a.value),fe(()=>[n.items],()=>{i.value={},v(!0)}),fe(()=>[n.columnWidth,n.gap],()=>{v()})}),Rn(()=>e.unobserve(a.value)),(d,y)=>(p(),m("div",{ref_key:"wall",ref:a,class:"wl-gallery",style:dt({gap:`${d.gap}px`})},[(p(!0),m(X,null,ie(r.value,(w,I)=>(p(),m("div",{key:I,class:"wl-gallery-column","data-index":I,style:dt({gap:`${d.gap}px`})},[(p(!0),m(X,null,ie(w,s=>(p(),m(X,{key:s},[i.value[d.items[s].src]?R("v-if",!0):(p(),de(_(nt),{key:0,size:36,style:{margin:"20px auto"}})),b("img",{class:"wl-gallery-item",src:d.items[s].src,title:d.items[s].title,loading:"lazy",onLoad:c,onClick:g=>d.$emit("insert",`![](${d.items[s].src})`)},null,40,Zr)],64))),128))],12,qr))),128))],4))}}),[["__file","ImageWall.vue"]]);const Gr={class:"wl-comment"},Yr={key:0,class:"wl-login-info"},Qr={class:"wl-avatar"},Jr=["title"],Xr=["title"],eo=["src"],to=["title","textContent"],no={class:"wl-panel"},ao=["for","textContent"],lo=["id","onUpdate:modelValue","name","type"],io=["placeholder"],ro={class:"wl-preview"},oo=b("hr",null,null,-1),so=["innerHTML"],co={class:"wl-footer"},uo={class:"wl-actions"},po={href:"https://guides.github.com/features/mastering-markdown/",title:"Markdown Guide","aria-label":"Markdown is supported",class:"wl-action",target:"_blank",rel:"noopener noreferrer"},ho=["title"],mo=["title"],go=["title"],fo=["title"],vo={class:"wl-info"},wo=b("div",{class:"wl-captcha-container"},null,-1),yo={class:"wl-text-number"},ko={key:0},bo=["textContent"],$o=["textContent"],xo=["disabled"],Co=["placeholder"],Lo={key:1,class:"wl-loading"},_o={key:0,class:"wl-tab-wrapper"},Ro=["title","onClick"],zo=["src","alt"],So={key:0,class:"wl-tabs"},Io=["onClick"],Eo=["src","alt","title"],Ao=["title"];var jo=Le({__name:"CommentBox",props:{edit:{default:null},rootId:{default:""},replyId:{default:""},replyUser:{default:""}},emits:["log","cancelEdit","cancelReply","submit"],setup(l,{expose:t,emit:n}){const e=l;t();const a=Fe("config"),i=Ce("WALINE_COMMENT_BOX_EDITOR",""),r=Ce("WALINE_USER_META",{nick:"",mail:"",link:""}),o=Nt(),u=E({}),v=E(null),c=E(null),d=E(null),y=E(null),w=E(null),I=E(null),s=E(null),g=E({tabs:[],map:{}}),z=E(0),j=E(!1),S=E(!1),C=E(!1),K=E(""),Y=E(0),W=In({loading:!0,list:[]}),ce=E(0),he=E(!1),Ae=E(""),ve=E(!1),$=E(!1),L=G(()=>a.value.locale),U=G(()=>{var f;return!!((f=o.value)!=null&&f.token)}),F=G(()=>a.value.imageUploader!==!1),H=f=>{const h=v.value,x=h.selectionStart,M=h.selectionEnd||0,k=h.scrollTop;i.value=h.value.substring(0,x)+f+h.value.substring(M,h.value.length),h.focus(),h.selectionStart=x+f.length,h.selectionEnd=x+f.length,h.scrollTop=k},ee=f=>{const h=f.key;(f.ctrlKey||f.metaKey)&&h==="Enter"&&$e()},q=f=>{const h=`![${a.value.locale.uploading} ${f.name}]()`;return H(h),Promise.resolve().then(()=>a.value.imageUploader(f)).then(x=>{i.value=i.value.replace(h,`\r
![${f.name}](${x})`)}).catch(x=>{alert(x.message),i.value=i.value.replace(h,"")})},ne=f=>{var h;if((h=f.dataTransfer)!=null&&h.items){const x=wn(f.dataTransfer.items);x&&F.value&&(q(x),f.preventDefault())}},re=f=>{if(f.clipboardData){const h=wn(f.clipboardData.items);h&&F.value&&q(h)}},we=()=>{const f=c.value;f.files&&F.value&&q(f.files[0]).then(()=>{f.value=""})},$e=async()=>{var Te,ze,Se,Ge,Ye,Qe;const{serverURL:f,lang:h,login:x,wordLimit:M,requiredMeta:k,recaptchaV3Key:O,turnstileKey:B}=a.value,Z=await(async()=>{if(!navigator)return"";const{userAgentData:me}=navigator;let pe=navigator.userAgent;if(!me||me.platform!=="Windows")return pe;const{platformVersion:se}=await me.getHighEntropyValues(["platformVersion"]);return se&&parseInt(se.split(".")[0])>=13&&(pe=pe.replace("Windows NT 10.0","Windows NT 11.0")),pe})(),N={comment:Ae.value,nick:r.value.nick,mail:r.value.mail,link:r.value.link,url:a.value.path,ua:Z};if((Te=o.value)!=null&&Te.token)N.nick=o.value.display_name,N.mail=o.value.email,N.link=o.value.url;else{if(x==="force")return;if(k.indexOf("nick")>-1&&!N.nick)return(ze=u.value.nick)==null||ze.focus(),alert(L.value.nickError);if(k.indexOf("mail")>-1&&!N.mail||N.mail&&(ue=N.mail,!hr.test(ue)))return(Se=u.value.mail)==null||Se.focus(),alert(L.value.mailError);N.nick||(N.nick=L.value.anonymous)}var ue;if(N.comment){if(!he.value)return alert(L.value.wordHint.replace("$0",M[0].toString()).replace("$1",M[1].toString()).replace("$2",Y.value.toString()));N.comment=ia(N.comment,g.value.map),e.replyId&&e.rootId&&(N.pid=e.replyId,N.rid=e.rootId,N.at=e.replyUser),ve.value=!0;try{O&&(N.recaptchaV3=await(se=>{const Ie=Cn[se]??(Cn[se]=oa.load(se,{useRecaptchaNet:!0,autoHideBadge:!0}));return{execute:le=>Ie.then(Ee=>Ee.execute(le))}})(O).execute("social")),B&&(N.turnstile=await(ae=B,{execute:se=>new Promise(Ie=>{Pn("https://challenges.cloudflare.com/turnstile/v0/api.js",()=>{const le=window==null?void 0:window.turnstile,Ee={sitekey:ae,action:se,size:"compact",callback(Ue){Ie(Ue)}};le==null||le.ready(()=>le==null?void 0:le.render(".wl-captcha-container",Ee))},{async:!1})})}).execute("social"));const me={serverURL:f,lang:h,token:(Ge=o.value)==null?void 0:Ge.token,comment:N},pe=await(e.edit?pt({objectId:e.edit.objectId,...me}):(({serverURL:se,lang:Ie,token:le,comment:Ee})=>{const Ue={"Content-Type":"application/json"};return le&&(Ue.Authorization=`Bearer ${le}`),fetch(`${se}/comment?lang=${Ie}`,{method:"POST",headers:Ue,body:JSON.stringify(Ee)}).then(kt=>kt.json())})(me));if(ve.value=!1,pe.errmsg)return alert(pe.errmsg);n("submit",pe.data),i.value="",K.value="",e.replyId&&n("cancelReply"),(Ye=e.edit)!=null&&Ye.objectId&&n("cancelEdit")}catch(me){ve.value=!1,alert(me.message)}var ae}else(Qe=v.value)==null||Qe.focus()},_e=f=>{f.preventDefault();const{lang:h,serverURL:x}=a.value;(({lang:M,serverURL:k})=>{const O=(window.innerWidth-450)/2,B=(window.innerHeight-450)/2,Z=window.open(`${k}/ui/login?lng=${encodeURIComponent(M)}`,"_blank",`width=450,height=450,left=${O},top=${B},scrollbars=no,resizable=no,status=no,location=no,toolbar=no,menubar=no`);return Z==null||Z.postMessage({type:"TOKEN",data:null},"*"),new Promise(N=>{const ue=({data:ae})=>{ae&&typeof ae=="object"&&ae.type==="userInfo"&&ae.data.token&&(Z==null||Z.close(),window.removeEventListener("message",ue),N(ae.data))};window.addEventListener("message",ue)})})({serverURL:x,lang:h}).then(M=>{o.value=M,(M.remember?localStorage:sessionStorage).setItem("WALINE_USER",JSON.stringify(M)),n("log")})},Re=()=>{o.value={},localStorage.setItem("WALINE_USER","null"),sessionStorage.setItem("WALINE_USER","null"),n("log")},ye=f=>{f.preventDefault();const{lang:h,serverURL:x}=a.value,M=(window.innerWidth-800)/2,k=(window.innerHeight-800)/2,O=new URLSearchParams({lng:h,token:o.value.token}),B=window.open(`${x}/ui/profile?${O.toString()}`,"_blank",`width=800,height=800,left=${M},top=${k},scrollbars=no,resizable=no,status=no,location=no,toolbar=no,menubar=no`);B==null||B.postMessage({type:"TOKEN",data:o.value.token},"*")},ke=f=>{var h,x,M,k;(h=d.value)!=null&&h.contains(f.target)||(x=y.value)!=null&&x.contains(f.target)||(j.value=!1),(M=w.value)!=null&&M.contains(f.target)||(k=I.value)!=null&&k.contains(f.target)||(S.value=!1)},oe=async f=>{var Z;const{scrollTop:h,clientHeight:x,scrollHeight:M}=f.target,k=(x+h)/M,O=a.value.search,B=((Z=s.value)==null?void 0:Z.value)||"";k<.9||W.loading||$.value||(W.loading=!0,(O.more&&W.list.length?await O.more(B,W.list.length):await O.search(B)).length?W.list=[...W.list,...O.more&&W.list.length?await O.more(B,W.list.length):await O.search(B)]:$.value=!0,W.loading=!1,setTimeout(()=>{f.target.scrollTop=h},50))},xe=On(f=>{W.list=[],$.value=!1,oe(f)},300);fe([a,Y],([f,h])=>{const{wordLimit:x}=f;x?h<x[0]&&x[0]!==0?(ce.value=x[0],he.value=!1):h>x[1]?(ce.value=x[1],he.value=!1):(ce.value=x[1],he.value=!0):(ce.value=0,he.value=!0)},{immediate:!0});const je=({data:f})=>{f&&f.type==="profile"&&(o.value={...o.value,...f.data},[localStorage,sessionStorage].filter(h=>h.getItem("WALINE_USER")).forEach(h=>h.setItem("WALINE_USER",JSON.stringify(o))))};return Me(()=>{var f;document.body.addEventListener("click",ke),window.addEventListener("message",je),(f=e.edit)!=null&&f.objectId&&(i.value=e.edit.orig),fe(S,async h=>{if(!h)return;const x=a.value.search;s.value&&(s.value.value=""),W.loading=!0,W.list=x.default?await x.default():await x.search(""),W.loading=!1}),fe(()=>i.value,h=>{const{highlighter:x,texRenderer:M}=a.value;Ae.value=h,K.value=yr(h,{emojiMap:g.value.map,highlighter:x,texRenderer:M}),Y.value=(k=>{var O,B;return(((O=(Z=>Z.match(/[\w\d\s,.\u00C0-\u024F\u0400-\u04FF]+/giu))(k))==null?void 0:O.reduce((Z,N)=>Z+(N.trim()===""?0:N.trim().split(/\s+/u).length),0))||0)+(((B=(Z=>Z.match(/[\u4E00-\u9FD5]/gu))(k))==null?void 0:B.length)||0)})(h),h?mt(v.value):mt.destroy(v.value)},{immediate:!0}),fe(()=>a.value.emoji,h=>{return(x=h,Promise.all(x.map(M=>typeof M=="string"?mr(na(M)):Promise.resolve(M))).then(M=>{const k={tabs:[],map:{}};return M.forEach(O=>{const{name:B,folder:Z,icon:N,prefix:ue,type:ae,items:Te}=O;k.tabs.push({name:B,icon:vn(N,Z,ue,ae),items:Te.map(ze=>{const Se=`${ue||""}${ze}`;return k.map[Se]=vn(ze,Z,ue,ae),Se})})}),k})).then(M=>{g.value=M});var x},{immediate:!0})}),qe(()=>{document.body.removeEventListener("click",ke),window.removeEventListener("message",je)}),(f,h)=>{var x,M;return p(),m("div",Gr,[_(a).login!=="disable"&&U.value&&!((x=f.edit)!=null&&x.objectId)?(p(),m("div",Yr,[b("div",Qr,[b("button",{type:"submit",class:"wl-logout-btn",title:L.value.logout,onClick:Re},[J(_(kn),{size:14})],8,Jr),b("a",{href:"#",class:"wl-login-nick","aria-label":"Profile",title:L.value.profile,onClick:ye},[b("img",{src:_(o).avatar,alt:"avatar"},null,8,eo)],8,Xr)]),b("a",{href:"#",class:"wl-login-nick","aria-label":"Profile",title:L.value.profile,onClick:ye,textContent:T(_(o).display_name)},null,8,to)])):R("v-if",!0),b("div",no,[_(a).login!=="force"&&_(a).meta.length&&!U.value?(p(),m("div",{key:0,class:Q(["wl-header",`item${_(a).meta.length}`])},[(p(!0),m(X,null,ie(_(a).meta,k=>(p(),m("div",{key:k,class:"wl-header-item"},[b("label",{for:`wl-${k}`,textContent:T(L.value[k]+(_(a).requiredMeta.includes(k)||!_(a).requiredMeta.length?"":`(${L.value.optional})`))},null,8,ao),De(b("input",{id:`wl-${k}`,ref_for:!0,ref:O=>{O&&(u.value[k]=O)},"onUpdate:modelValue":O=>_(r)[k]=O,class:Q(["wl-input",`wl-${k}`]),name:k,type:k==="mail"?"email":"text"},null,10,lo),[[En,_(r)[k]]])]))),128))],2)):R("v-if",!0),De(b("textarea",{id:"wl-edit",ref_key:"editorRef",ref:v,"onUpdate:modelValue":h[0]||(h[0]=k=>jn(i)?i.value=k:null),class:"wl-editor",placeholder:f.replyUser?`@${f.replyUser}`:L.value.placeholder,onKeydown:ee,onDrop:ne,onPaste:re},null,40,io),[[An,_(i)]]),De(b("div",ro,[oo,b("h4",null,T(L.value.preview)+":",1),b("div",{class:"wl-content",innerHTML:K.value},null,8,so)],512),[[ht,C.value]]),b("div",co,[b("div",uo,[b("a",po,[J(_(_r))]),De(b("button",{ref_key:"emojiButtonRef",ref:d,type:"button",class:Q(["wl-action",{active:j.value}]),title:L.value.emoji,onClick:h[1]||(h[1]=k=>j.value=!j.value)},[J(_($r))],10,ho),[[ht,g.value.tabs.length]]),_(a).search?(p(),m("button",{key:0,ref_key:"gifButtonRef",ref:w,type:"button",class:Q(["wl-action",{active:S.value}]),title:L.value.gif,onClick:h[2]||(h[2]=k=>S.value=!S.value)},[J(_(Ir))],10,mo)):R("v-if",!0),b("input",{id:"wl-image-upload",ref_key:"imageUploadRef",ref:c,class:"upload",type:"file",accept:".png,.jpg,.jpeg,.webp,.bmp,.gif",onChange:we},null,544),F.value?(p(),m("label",{key:1,for:"wl-image-upload",class:"wl-action",title:L.value.uploadImage},[J(_(xr))],8,go)):R("v-if",!0),b("button",{type:"button",class:Q(["wl-action",{active:C.value}]),title:L.value.preview,onClick:h[3]||(h[3]=k=>C.value=!C.value)},[J(_(Lr))],10,fo)]),b("div",vo,[wo,b("div",yo,[be(T(Y.value)+" ",1),_(a).wordLimit?(p(),m("span",ko,[be(" / "),b("span",{class:Q({illegal:!he.value}),textContent:T(ce.value)},null,10,bo)])):R("v-if",!0),be(" "+T(L.value.word),1)]),_(a).login==="disable"||U.value?R("v-if",!0):(p(),m("button",{key:0,type:"button",class:"wl-btn",onClick:_e,textContent:T(L.value.login)},null,8,$o)),_(a).login!=="force"||U.value?(p(),m("button",{key:1,type:"submit",class:"primary wl-btn",title:"Cmd|Ctrl + Enter",disabled:ve.value,onClick:$e},[ve.value?(p(),de(_(nt),{key:0,size:16})):(p(),m(X,{key:1},[be(T(L.value.submit),1)],64))],8,xo)):R("v-if",!0)]),b("div",{ref_key:"gifPopupRef",ref:I,class:Q(["wl-gif-popup",{display:S.value}])},[b("input",{ref_key:"gifSearchInputRef",ref:s,type:"text",placeholder:L.value.gifSearchPlaceholder,onInput:h[4]||(h[4]=(...k)=>_(xe)&&_(xe)(...k))},null,40,Co),W.list.length?(p(),de(Kr,{key:0,items:W.list,"column-width":200,gap:6,onInsert:h[5]||(h[5]=k=>H(k)),onScroll:oe},null,8,["items"])):R("v-if",!0),W.loading?(p(),m("div",Lo,[J(_(nt),{size:30})])):R("v-if",!0)],2),b("div",{ref_key:"emojiPopupRef",ref:y,class:Q(["wl-emoji-popup",{display:j.value}])},[(p(!0),m(X,null,ie(g.value.tabs,(k,O)=>(p(),m(X,{key:k.name},[O===z.value?(p(),m("div",_o,[(p(!0),m(X,null,ie(k.items,B=>(p(),m("button",{key:B,type:"button",title:B,onClick:Z=>H(`:${B}:`)},[j.value?(p(),m("img",{key:0,class:"wl-emoji",src:g.value.map[B],alt:B,loading:"lazy",referrerPolicy:"no-referrer"},null,8,zo)):R("v-if",!0)],8,Ro))),128))])):R("v-if",!0)],64))),128)),g.value.tabs.length>1?(p(),m("div",So,[(p(!0),m(X,null,ie(g.value.tabs,(k,O)=>(p(),m("button",{key:k.name,type:"button",class:Q(["wl-tab",{active:z.value===O}]),onClick:B=>z.value=O},[b("img",{class:"wl-emoji",src:k.icon,alt:k.name,title:k.name,loading:"lazy",referrerPolicy:"no-referrer"},null,8,Eo)],10,Io))),128))])):R("v-if",!0)],2)])]),f.replyId||(M=f.edit)!=null&&M.objectId?(p(),m("button",{key:1,type:"button",class:"wl-close",title:L.value.cancelReply,onClick:h[6]||(h[6]=k=>f.$emit(f.replyId?"cancelReply":"cancelEdit"))},[J(_(kn),{size:24})],8,Ao)):R("v-if",!0)])}}}),sa=it(jo,[["__file","CommentBox.vue"]]);const To=["id"],Uo={class:"wl-user","aria-hidden":"true"},Mo=["src"],Po={class:"wl-card"},Oo={class:"wl-head"},Do=["href"],Ho={key:1,class:"wl-nick"},Vo=["textContent"],Bo=["textContent"],No=["textContent"],Wo=["textContent"],Fo=["textContent"],qo={class:"wl-comment-actions"},Zo=["title"],Ko=["textContent"],Go=["title"],Yo={class:"wl-meta","aria-hidden":"true"},Qo=["data-value","textContent"],Jo=["data-value","textContent"],Xo=["data-value","textContent"],es=["innerHTML"],ts={key:1,class:"wl-admin-actions"},ns={class:"wl-comment-status"},as=["disabled","onClick","textContent"],ls={key:3,class:"wl-quote"};var is=it(Le({__name:"CommentCard",props:{comment:{},edit:{default:null},rootId:{},reply:{default:null}},emits:["log","submit","delete","edit","like","status","sticky","reply"],setup(l){const t=l,n=["approved","waiting","spam"],e=Fe("config"),a=ra(),i=zn(),r=Nt(),o=G(()=>e.value.locale),u=G(()=>{const{link:s}=t.comment;return s?aa(s)?s:`https://${s}`:""}),v=G(()=>a.value.includes(t.comment.objectId)),c=G(()=>dr(t.comment.insertedAt,i.value,o.value)),d=G(()=>r.value.type==="administrator"),y=G(()=>t.comment.user_id&&r.value.objectId===t.comment.user_id),w=G(()=>{var s;return t.comment.objectId===((s=t.reply)==null?void 0:s.objectId)}),I=G(()=>{var s;return t.comment.objectId===((s=t.edit)==null?void 0:s.objectId)});return(s,g)=>{var j;const z=Sn("CommentCard",!0);return p(),m("div",{id:s.comment.objectId,class:"wl-card-item"},[b("div",Uo,[s.comment.avatar?(p(),m("img",{key:0,src:s.comment.avatar},null,8,Mo)):R("v-if",!0),s.comment.type?(p(),de(_(Sr),{key:1})):R("v-if",!0)]),b("div",Po,[b("div",Oo,[u.value?(p(),m("a",{key:0,class:"wl-nick",href:u.value,target:"_blank",rel:" noopener noreferrer"},T(s.comment.nick),9,Do)):(p(),m("span",Ho,T(s.comment.nick),1)),s.comment.type==="administrator"?(p(),m("span",{key:2,class:"wl-badge",textContent:T(o.value.admin)},null,8,Vo)):R("v-if",!0),s.comment.label?(p(),m("span",{key:3,class:"wl-badge",textContent:T(s.comment.label)},null,8,Bo)):R("v-if",!0),s.comment.sticky?(p(),m("span",{key:4,class:"wl-badge",textContent:T(o.value.sticky)},null,8,No)):R("v-if",!0),s.comment.level!==void 0&&s.comment.level>=0?(p(),m("span",{key:5,class:Q(`wl-badge level${s.comment.level}`),textContent:T(o.value[`level${s.comment.level}`]||`Level ${s.comment.level}`)},null,10,Wo)):R("v-if",!0),b("span",{class:"wl-time",textContent:T(c.value)},null,8,Fo),b("div",qo,[d.value||y.value?(p(),m("button",{key:0,type:"button",class:"wl-edit",onClick:g[0]||(g[0]=()=>s.$emit("edit",s.comment))},[J(_(zr))])):R("v-if",!0),d.value||y.value?(p(),m("button",{key:1,type:"button",class:"wl-delete",onClick:g[1]||(g[1]=S=>s.$emit("delete",s.comment))},[J(_(br))])):R("v-if",!0),b("button",{type:"button",class:"wl-like",title:v.value?o.value.cancelLike:o.value.like,onClick:g[2]||(g[2]=S=>s.$emit("like",s.comment))},[J(_(Cr),{active:v.value},null,8,["active"]),"like"in s.comment?(p(),m("span",{key:0,textContent:T(s.comment.like)},null,8,Ko)):R("v-if",!0)],8,Zo),b("button",{type:"button",class:Q(["wl-reply",{active:w.value}]),title:w.value?o.value.cancelReply:o.value.reply,onClick:g[3]||(g[3]=S=>s.$emit("reply",w.value?null:s.comment))},[J(_(Rr))],10,Go)])]),b("div",Yo,[s.comment.addr?(p(),m("span",{key:0,class:"wl-addr","data-value":s.comment.addr,textContent:T(s.comment.addr)},null,8,Qo)):R("v-if",!0),s.comment.browser?(p(),m("span",{key:1,class:"wl-browser","data-value":s.comment.browser,textContent:T(s.comment.browser)},null,8,Jo)):R("v-if",!0),s.comment.os?(p(),m("span",{key:2,class:"wl-os","data-value":s.comment.os,textContent:T(s.comment.os)},null,8,Xo)):R("v-if",!0)]),I.value?R("v-if",!0):(p(),m("div",{key:0,class:"wl-content",innerHTML:s.comment.comment},null,8,es)),d.value&&!I.value?(p(),m("div",ts,[b("span",ns,[(p(),m(X,null,ie(n,S=>b("button",{key:S,type:"submit",class:Q(`wl-btn wl-${S}`),disabled:s.comment.status===S,onClick:C=>s.$emit("status",{status:S,comment:s.comment}),textContent:T(o.value[S])},null,10,as)),64))]),d.value&&!s.comment.rid?(p(),m("button",{key:0,type:"submit",class:"wl-btn wl-sticky",onClick:g[4]||(g[4]=S=>s.$emit("sticky",s.comment))},T(s.comment.sticky?o.value.unsticky:o.value.sticky),1)):R("v-if",!0)])):R("v-if",!0),w.value||I.value?(p(),m("div",{key:2,class:Q({"wl-reply-wrapper":w.value,"wl-edit-wrapper":I.value})},[J(sa,{edit:s.edit,"reply-id":(j=s.reply)==null?void 0:j.objectId,"reply-user":s.comment.nick,"root-id":s.rootId,onLog:g[5]||(g[5]=S=>s.$emit("log")),onCancelReply:g[6]||(g[6]=S=>s.$emit("reply",null)),onCancelEdit:g[7]||(g[7]=S=>s.$emit("edit",null)),onSubmit:g[8]||(g[8]=S=>s.$emit("submit",S))},null,8,["edit","reply-id","reply-user","root-id"])],2)):R("v-if",!0),s.comment.children?(p(),m("div",ls,[(p(!0),m(X,null,ie(s.comment.children,S=>(p(),de(z,{key:S.objectId,comment:S,reply:s.reply,edit:s.edit,"root-id":s.rootId,onLog:g[9]||(g[9]=C=>s.$emit("log")),onDelete:g[10]||(g[10]=C=>s.$emit("delete",C)),onEdit:g[11]||(g[11]=C=>s.$emit("edit",C)),onLike:g[12]||(g[12]=C=>s.$emit("like",C)),onReply:g[13]||(g[13]=C=>s.$emit("reply",C)),onStatus:g[14]||(g[14]=C=>s.$emit("status",C)),onSticky:g[15]||(g[15]=C=>s.$emit("sticky",C)),onSubmit:g[16]||(g[16]=C=>s.$emit("submit",C))},null,8,["comment","reply","edit","root-id"]))),128))])):R("v-if",!0)])],8,To)}}}),[["__file","CommentCard.vue"]]);const rs="2.15.5",os={"data-waline":""},ss={class:"wl-meta-head"},cs={class:"wl-count"},us=["textContent"],ps={class:"wl-sort"},ds=["onClick"],hs={class:"wl-cards"},ms={key:1,class:"wl-operation"},gs=["textContent"],fs={key:0,class:"wl-loading"},vs=["textContent"],ws={key:2,class:"wl-operation"},ys=["textContent"],ks={key:3,class:"wl-power"},bs=b("a",{href:"https://github.com/walinejs/waline",target:"_blank",rel:"noopener noreferrer"}," Waline ",-1);var $s=Le({__name:"WalineComment",props:["serverURL","path","meta","requiredMeta","dark","commentSorting","lang","locale","pageSize","wordLimit","emoji","login","highlighter","texRenderer","imageUploader","search","copyright","recaptchaV3Key","turnstileKey","reaction"],setup(l){const t=l,n={latest:"insertedAt_desc",oldest:"insertedAt_asc",hottest:"like_desc"},e=Object.keys(n),a=Nt(),i=ra(),r=E("loading"),o=E(0),u=E(1),v=E(0),c=G(()=>(({serverURL:$,path:L=location.pathname,lang:U=typeof navigator>"u"?"en-US":navigator.language,locale:F,emoji:H=hn,meta:ee=["nick","mail","link"],requiredMeta:q=[],dark:ne=!1,pageSize:re=10,wordLimit:we,imageUploader:$e,highlighter:_e,texRenderer:Re,copyright:ye=!0,login:ke="enable",search:oe,reaction:xe,recaptchaV3Key:je="",turnstileKey:f="",commentSorting:h="latest",...x})=>({serverURL:wt($),path:ta(L),locale:{...jt[U]||jt[ar],...typeof F=="object"?F:{}},wordLimit:pr(we),meta:dn(ee),requiredMeta:dn(q),imageUploader:Tt($e,ir),highlighter:Tt(_e,cr),texRenderer:Tt(Re,rr),lang:Object.keys(jt).includes(U)?U:"en-US",dark:ne,emoji:typeof H=="boolean"?H?hn:[]:H,pageSize:re,login:ke,copyright:ye,search:oe!==!1&&(typeof oe=="object"?oe:or(U)),recaptchaV3Key:je,turnstileKey:f,reaction:Array.isArray(xe)?xe:xe===!0?lr:[],commentSorting:h,...x}))(t)),d=E(c.value.commentSorting),y=E([]),w=E(null),I=E(null),s=G(()=>{return typeof($=c.value.dark)=="string"?$==="auto"?`@media(prefers-color-scheme:dark){body${Ut}}`:`${$}${Ut}`:$===!0?`:root${Ut}`:"";var $}),g=G(()=>c.value.locale);let z;Tn(s,{id:"waline-darkmode"});const j=$=>{var ee;const{serverURL:L,path:U,pageSize:F}=c.value,H=new AbortController;r.value="loading",z==null||z(),(({serverURL:q,lang:ne,path:re,page:we,pageSize:$e,sortBy:_e,signal:Re,token:ye})=>{const ke={};return ye&&(ke.Authorization=`Bearer ${ye}`),fetch(`${q}/comment?path=${encodeURIComponent(re)}&pageSize=${$e}&page=${we}&lang=${ne}&sortBy=${_e}`,{signal:Re,headers:ke}).then(oe=>oe.json()).then(oe=>Ot(oe,"Get comment data"))})({serverURL:L,lang:c.value.lang,path:U,pageSize:F,sortBy:n[d.value],page:$,signal:H.signal,token:(ee=a.value)==null?void 0:ee.token}).then(q=>{r.value="success",o.value=q.count,y.value.push(...q.data),u.value=$,v.value=q.totalPages}).catch(q=>{q.name!=="AbortError"&&(console.error(q.message),r.value="error")}),z=H.abort.bind(H)},S=()=>j(u.value+1),C=()=>{o.value=0,y.value=[],j(1)},K=$=>{w.value=$},Y=$=>{I.value=$},W=$=>{if(I.value)I.value.comment=$.comment,I.value.orig=$.orig;else if($.rid){const L=y.value.find(({objectId:U})=>U===$.rid);if(!L)return;Array.isArray(L.children)||(L.children=[]),L.children.push($)}else y.value.unshift($),o.value+=1},ce=async({comment:$,status:L})=>{var H;if($.status===L)return;const{serverURL:U,lang:F}=c.value;await pt({serverURL:U,lang:F,token:(H=a.value)==null?void 0:H.token,objectId:$.objectId,comment:{status:L}}),$.status=L},he=async $=>{var F;if($.rid)return;const{serverURL:L,lang:U}=c.value;await pt({serverURL:L,lang:U,token:(F=a.value)==null?void 0:F.token,objectId:$.objectId,comment:{sticky:$.sticky?0:1}}),$.sticky=!$.sticky},Ae=async({objectId:$})=>{var F;if(!confirm("Are you sure you want to delete this comment?"))return;const{serverURL:L,lang:U}=c.value;await(({serverURL:H,lang:ee,token:q,objectId:ne})=>fetch(`${H}/comment/${ne}?lang=${ee}`,{method:"DELETE",headers:{Authorization:`Bearer ${q}`}}).then(re=>re.json()).then(re=>Ot(re,"Delete comment")))({serverURL:L,lang:U,token:(F=a.value)==null?void 0:F.token,objectId:$}),y.value.some((H,ee)=>H.objectId===$?(y.value=y.value.filter((q,ne)=>ne!==ee),!0):H.children.some((q,ne)=>q.objectId===$&&(y.value[ee].children=H.children.filter((re,we)=>we!==ne),!0)))},ve=async $=>{var ee;const{serverURL:L,lang:U}=c.value,{objectId:F}=$,H=i.value.includes(F);await pt({serverURL:L,lang:U,objectId:F,token:(ee=a.value)==null?void 0:ee.token,comment:{like:!H}}),H?i.value=i.value.filter(q=>q!==F):(i.value=[...i.value,F],i.value.length>50&&(i.value=i.value.slice(-50))),$.like=($.like||0)+(H?-1:1)};return Un("config",c),Me(()=>{fe(()=>[t.serverURL,t.path],()=>C(),{immediate:!0})}),qe(()=>z==null?void 0:z()),($,L)=>(p(),m("div",os,[J(Fr),w.value?R("v-if",!0):(p(),de(sa,{key:0,onLog:C,onSubmit:W})),b("div",ss,[b("div",cs,[o.value?(p(),m("span",{key:0,class:"wl-num",textContent:T(o.value)},null,8,us)):R("v-if",!0),be(" "+T(g.value.comment),1)]),b("ul",ps,[(p(!0),m(X,null,ie(_(e),U=>(p(),m("li",{key:U,class:Q([U===d.value?"active":""]),onClick:F=>(H=>{d.value!==H&&(d.value=H,C())})(U)},T(g.value[U]),11,ds))),128))])]),b("div",hs,[(p(!0),m(X,null,ie(y.value,U=>(p(),de(is,{key:U.objectId,"root-id":U.objectId,comment:U,reply:w.value,edit:I.value,onLog:C,onReply:K,onEdit:Y,onSubmit:W,onStatus:ce,onDelete:Ae,onSticky:he,onLike:ve},null,8,["root-id","comment","reply","edit"]))),128))]),r.value==="error"?(p(),m("div",ms,[b("button",{type:"button",class:"wl-btn",onClick:C,textContent:T(g.value.refresh)},null,8,gs)])):(p(),m(X,{key:2},[r.value==="loading"?(p(),m("div",fs,[J(_(nt),{size:30})])):y.value.length?u.value<v.value?(p(),m("div",ws,[b("button",{type:"button",class:"wl-btn",onClick:S,textContent:T(g.value.more)},null,8,ys)])):R("v-if",!0):(p(),m("div",{key:1,class:"wl-empty",textContent:T(g.value.sofa)},null,8,vs))],64)),c.value.copyright?(p(),m("div",ks,[be(" Powered by "),bs,be(" v"+T(_(rs)),1)])):R("v-if",!0)]))}});it($s,[["__file","WalineComment.vue"]]);const _n=(l,t)=>{t.forEach((n,e)=>{n.innerText=l[e].toString()})},xs=({serverURL:l,path:t=window.location.pathname,selector:n=".waline-pageview-count",update:e=!0,lang:a=navigator.language})=>{const i=new AbortController,r=Array.from(document.querySelectorAll(n)),o=c=>{const d=yn(c);return d!==null&&t!==d},u=c=>(({serverURL:d,lang:y,paths:w,signal:I})=>ea({serverURL:d,lang:y,paths:w,type:["time"],signal:I}).then(s=>Array.isArray(s)?s:[s]))({serverURL:wt(l),paths:c.map(d=>yn(d)||t),lang:a,signal:i.signal}).then(d=>_n(d,c)).catch(la);if(e){const c=r.filter(y=>!o(y)),d=r.filter(o);(v={serverURL:wt(l),path:t,lang:a},Dt({...v,type:"time",action:"inc"})).then(y=>_n(new Array(c.length).fill(y),c)),d.length&&u(d)}else u(r);var v;return i.abort.bind(i)},Cs=(l="//unpkg.com/")=>[`${l}@waline/emojis/bilibili/`,`${l}@waline/emojis/qq/`,`${l}@waline/emojis/weibo/`];const Ls=Le({__name:"WalineClient",props:{options:{}},setup(l){const t=l,n=pa(),{locale:e}=da(),a=G(()=>t.options.path||n.path.replace(/\/$/,"")),i=G(()=>Cs(t.options.cdn));return Me(()=>{const{pageview:r,comment:o}=t.options;r&&xs({serverURL:t.options.serverURL,path:a.value,selector:typeof r=="string"?r:void 0}),o&&kr({serverURL:t.options.serverURL,path:a.value,selector:typeof o=="string"?o:void 0})}),(r,o)=>(p(),de(_(tr),ha(r.options,{"server-u-r-l":r.options.serverURL,lang:_(e),path:a.value,dark:_(ma),emoji:i.value}),null,16,["server-u-r-l","lang","path","dark","emoji"]))}});function _s(){const l=ga();return G(()=>l.value.addons["valaxy-addon-waline"])}const Ss=Le({__name:"YunWaline",setup(l){const t=_s();return(n,e)=>{const a=Ls;return p(),de(a,{w:"full",options:_(t).options},null,8,["options"])}}});export{Ss as default};