@waline/client 2.8.1 → 2.9.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (46) hide show
  1. package/README.md +11 -0
  2. package/dist/component.mjs +2 -0
  3. package/dist/component.mjs.map +1 -0
  4. package/dist/{legacy.d.ts → legacy.umd.d.ts} +0 -0
  5. package/dist/legacy.umd.js +2 -0
  6. package/dist/legacy.umd.js.map +1 -0
  7. package/dist/{pageview.cjs.js → pageview.cjs} +2 -2
  8. package/dist/pageview.cjs.map +1 -0
  9. package/dist/{pageview.cjs.d.ts → pageview.d.cts} +0 -0
  10. package/dist/{pageview.esm.d.ts → pageview.d.mts} +0 -0
  11. package/dist/pageview.js +1 -1
  12. package/dist/pageview.js.map +1 -1
  13. package/dist/{pageview.esm.js → pageview.mjs} +2 -2
  14. package/dist/pageview.mjs.map +1 -0
  15. package/dist/shim.cjs +2 -0
  16. package/dist/shim.cjs.map +1 -0
  17. package/dist/{shim.d.ts → shim.d.cts} +0 -0
  18. package/dist/{shim.esm.d.ts → shim.d.mts} +0 -0
  19. package/dist/shim.mjs +2 -0
  20. package/dist/shim.mjs.map +1 -0
  21. package/dist/waline.cjs +2 -0
  22. package/dist/waline.cjs.map +1 -0
  23. package/dist/{waline.cjs.d.ts → waline.d.cts} +0 -0
  24. package/dist/{waline.esm.d.ts → waline.d.mts} +0 -0
  25. package/dist/waline.js +1 -1
  26. package/dist/waline.js.map +1 -1
  27. package/dist/waline.mjs +2 -0
  28. package/dist/waline.mjs.map +1 -0
  29. package/package.json +18 -27
  30. package/src/components/CommentCard.vue +0 -7
  31. package/dist/component.esm.js +0 -2
  32. package/dist/component.esm.js.map +0 -1
  33. package/dist/component.js +0 -2
  34. package/dist/component.js.map +0 -1
  35. package/dist/legacy.js +0 -2
  36. package/dist/legacy.js.map +0 -1
  37. package/dist/pageview.cjs.js.map +0 -1
  38. package/dist/pageview.esm.js.map +0 -1
  39. package/dist/shim.esm.js +0 -2
  40. package/dist/shim.esm.js.map +0 -1
  41. package/dist/shim.js +0 -2
  42. package/dist/shim.js.map +0 -1
  43. package/dist/waline.cjs.js +0 -2
  44. package/dist/waline.cjs.js.map +0 -1
  45. package/dist/waline.esm.js +0 -2
  46. package/dist/waline.esm.js.map +0 -1
@@ -0,0 +1,2 @@
1
+ const e=["nick","mail","link"],t=t=>t.filter((t=>e.includes(t))),n=e=>new Promise(((t,n)=>{if(e.size>128e3)return n(new Error("File too large! File size limit 128KB"));const r=new FileReader;r.readAsDataURL(e),r.onload=()=>t(r.result?.toString()||""),r.onerror=n})),r=e=>!0===e?'<p class="wl-tex">Tex is not available in preview</p>':'<span class="wl-tex">Tex is not available in preview</span>',l=()=>{const e={next:""},t=({keyword:e,pos:t})=>{const n=new URLSearchParams("media_filter=minimal");return n.set("key","PAY5JLFIH6V6"),n.set("limit","20"),n.set("pos",t||""),n.set("q",e),fetch(`https://g.tenor.com/v1/search?${n.toString()}`,{headers:{"Content-Type":"application/json"}}).then((e=>e.json())).catch((()=>({next:t||"",results:[]})))};return{search:(n="")=>t({keyword:n}).then((t=>(e.next=t.next,t.results.map((e=>({title:e.title,src:e.media[0].tinygif.url})))))),more:n=>t({keyword:n,pos:e.next}).then((t=>(e.next=t.next,t.results.map((e=>({title:e.title,src:e.media[0].tinygif.url}))))))}},i=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"),o=["23AC69","91C132","F19726","E8552D","1AAB8E","E1147F","2980C1","1BA1E6","9FA0A0","F19726","E30B20","E30B20","A3338B"],s={},a=e=>{let t=0;return e.replace(i,((e,n,r)=>{if(r)return`<span style="color: slategray">${r}</span>`;if("<"===n)return"&lt;";let l;s[n]?l=s[n]:(l=o[t],s[n]=l);const i=`<span style="color: #${l}">${n}</span>`;return t=++t%o.length,i}))},c=["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"],u=e=>Object.fromEntries(e.map(((e,t)=>[c[t],e])));var p=u(["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!\n Current word number: $2","Anonymous","Dwarves","Hobbits","Ents","Wizards","Elves","Maiar","GIF","Search GIF","Profile","Approved","Waiting","Spam","Unsticky","Oldest","Latest","Hottest"]),d=u(["ニックネーム","3バイト以上のニックネームをご入力ください.","メールアドレス","メールアドレスをご確認ください.","サイト","オプション","ここにコメント","コメントしましょう~","提出する","Like","Cancel like","返信する","キャンセル","コメント","更新","さらに読み込む","プレビュー","絵文字","画像をアップロード","秒前","分前","時間前","日前","たっだ今","アップロード","ログインする","ログアウト","管理者","トップに置く","ワード","コメントは $0 から $1 ワードの間でなければなりません!\n 現在の単語番号: $2","匿名","うえにん","なかにん","しもおし","特にしもおし","かげ","なぬし","GIF","探す GIF","個人情報","承認済み","待っている","スパム","べたつかない","逆順","正順","人気順"]),h=u(["昵称","昵称不能少于3个字符","邮箱","请填写正确的邮件地址","网址","可选","欢迎评论","来发评论吧~","提交","喜欢","取消喜欢","回复","取消回复","评论","刷新","加载更多...","预览","表情","上传图片","秒前","分钟前","小时前","天前","刚刚","正在上传","登录","退出","博主","置顶","字","评论字数应在 $0 到 $1 字之间!\n当前字数:$2","匿名","潜水","冒泡","吐槽","活跃","话痨","传说","表情包","搜索表情包","个人资料","通过","待审核","垃圾","取消置顶","按倒序","按正序","按热度"]),f=u(["暱稱","暱稱不能少於3個字元","郵箱","請填寫正確的郵件地址","網址","可選","歡迎評論","來發評論吧~","提交","喜歡","取消喜歡","回覆","取消回覆","評論","刷新","載入更多...","預覽","表情","上傳圖片","秒前","分鐘前","小時前","天前","剛剛","正在上傳","登錄","退出","博主","置頂","字","評論字數應在 $0 到 $1 字之間!\n當前字數:$2","匿名","潛水","冒泡","吐槽","活躍","話癆","傳說","表情包","搜索表情包","個人資料","通過","待審核","垃圾","取消置頂","按倒序","按正序","按熱度"]),m=u(["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 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"]),g=u(["Псевдоним","Никнейм не может быть меньше 3 байт.","Эл. адрес","Пожалуйста, подтвердите адрес вашей электронной почты.","Веб-сайт","Необязательный","Комментарий здесь...","Пока нет комментариев.","Отправить","Like","Cancel like","Отвечать","Отменить ответ","Комментарии","Обновить","Загрузи больше...","Превью","эмодзи","Загрузить изображение","секунд назад","несколько минут назад","несколько часов назад","дней назад","прямо сейчас","Загрузка","Авторизоваться","Выход из системы","Админ","Липкий","Слова","Пожалуйста, введите комментарии от $0 до $1 слов!\nНомер текущего слова: $2","Анонимный","Dwarves","Hobbits","Ents","Wizards","Elves","Maiar","GIF","Поиск GIF","Персональные данные","Одобренный","Ожидающий","Спам","Нелипкий","самый старый","последний","самый горячий"]);const v={zh:h,"zh-cn":h,"zh-CN":h,"zh-tw":f,"zh-TW":f,en:p,"en-US":p,"en-us":p,jp:d,"jp-jp":d,"jp-JP":d,"pt-br":m,"pt-BR":m,ru:g,"ru-ru":g,"ru-RU":g};function y(e,t){const n=Object.create(null),r=e.split(",");for(let e=0;e<r.length;e++)n[r[e]]=!0;return t?e=>!!n[e.toLowerCase()]:e=>!!n[e]}const w=y("itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly");function b(e){return!!e||""===e}function k(e){if(V(e)){const t={};for(let n=0;n<e.length;n++){const r=e[n],l=q(r)?$(r):k(r);if(l)for(const e in l)t[e]=l[e]}return t}return q(e)||G(e)?e:void 0}const x=/;(?![^(]*\))/g,_=/:(.+)/;function $(e){const t={};return e.split(x).forEach((e=>{if(e){const n=e.split(_);n.length>1&&(t[n[0].trim()]=n[1].trim())}})),t}function C(e){let t="";if(q(e))t=e;else if(V(e))for(let n=0;n<e.length;n++){const r=C(e[n]);r&&(t+=r+" ")}else if(G(e))for(const n in e)e[n]&&(t+=n+" ");return t.trim()}function S(e,t){if(e===t)return!0;let n=H(e),r=H(t);if(n||r)return!(!n||!r)&&e.getTime()===t.getTime();if(n=Z(e),r=Z(t),n||r)return e===t;if(n=V(e),r=V(t),n||r)return!(!n||!r)&&function(e,t){if(e.length!==t.length)return!1;let n=!0;for(let r=0;n&&r<e.length;r++)n=S(e[r],t[r]);return n}(e,t);if(n=G(e),r=G(t),n||r){if(!n||!r)return!1;if(Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e){const r=e.hasOwnProperty(n),l=t.hasOwnProperty(n);if(r&&!l||!r&&l||!S(e[n],t[n]))return!1}}return String(e)===String(t)}function I(e,t){return e.findIndex((e=>S(e,t)))}const E=e=>q(e)?e:null==e?"":V(e)||G(e)&&(e.toString===J||!W(e.toString))?JSON.stringify(e,z,2):String(e),z=(e,t)=>t&&t.__v_isRef?z(e,t.value):B(t)?{[`Map(${t.size})`]:[...t.entries()].reduce(((e,[t,n])=>(e[`${t} =>`]=n,e)),{})}:D(t)?{[`Set(${t.size})`]:[...t.values()]}:!G(t)||V(t)||Y(t)?t:String(t),R={},A=[],L=()=>{},O=()=>!1,j=/^on[^a-z]/,T=e=>j.test(e),U=e=>e.startsWith("onUpdate:"),M=Object.assign,P=(e,t)=>{const n=e.indexOf(t);n>-1&&e.splice(n,1)},N=Object.prototype.hasOwnProperty,F=(e,t)=>N.call(e,t),V=Array.isArray,B=e=>"[object Map]"===K(e),D=e=>"[object Set]"===K(e),H=e=>"[object Date]"===K(e),W=e=>"function"==typeof e,q=e=>"string"==typeof e,Z=e=>"symbol"==typeof e,G=e=>null!==e&&"object"==typeof e,Q=e=>G(e)&&W(e.then)&&W(e.catch),J=Object.prototype.toString,K=e=>J.call(e),Y=e=>"[object Object]"===K(e),X=e=>q(e)&&"NaN"!==e&&"-"!==e[0]&&""+parseInt(e,10)===e,ee=y(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),te=e=>{const t=Object.create(null);return n=>t[n]||(t[n]=e(n))},ne=/-(\w)/g,re=te((e=>e.replace(ne,((e,t)=>t?t.toUpperCase():"")))),le=/\B([A-Z])/g,ie=te((e=>e.replace(le,"-$1").toLowerCase())),oe=te((e=>e.charAt(0).toUpperCase()+e.slice(1))),se=te((e=>e?`on${oe(e)}`:"")),ae=(e,t)=>!Object.is(e,t),ce=(e,t)=>{for(let n=0;n<e.length;n++)e[n](t)},ue=(e,t,n)=>{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,value:n})},pe=e=>{const t=parseFloat(e);return isNaN(t)?e:t};let de;let he;class fe{constructor(e=!1){this.active=!0,this.effects=[],this.cleanups=[],!e&&he&&(this.parent=he,this.index=(he.scopes||(he.scopes=[])).push(this)-1)}run(e){if(this.active){const t=he;try{return he=this,e()}finally{he=t}}}on(){he=this}off(){he=this.parent}stop(e){if(this.active){let t,n;for(t=0,n=this.effects.length;t<n;t++)this.effects[t].stop();for(t=0,n=this.cleanups.length;t<n;t++)this.cleanups[t]();if(this.scopes)for(t=0,n=this.scopes.length;t<n;t++)this.scopes[t].stop(!0);if(this.parent&&!e){const e=this.parent.scopes.pop();e&&e!==this&&(this.parent.scopes[this.index]=e,e.index=this.index)}this.active=!1}}}const me=e=>{const t=new Set(e);return t.w=0,t.n=0,t},ge=e=>(e.w&be)>0,ve=e=>(e.n&be)>0,ye=new WeakMap;let we=0,be=1;let ke;const xe=Symbol(""),_e=Symbol("");class $e{constructor(e,t=null,n){this.fn=e,this.scheduler=t,this.active=!0,this.deps=[],this.parent=void 0,function(e,t=he){t&&t.active&&t.effects.push(e)}(this,n)}run(){if(!this.active)return this.fn();let e=ke,t=Se;for(;e;){if(e===this)return;e=e.parent}try{return this.parent=ke,ke=this,Se=!0,be=1<<++we,we<=30?(({deps:e})=>{if(e.length)for(let t=0;t<e.length;t++)e[t].w|=be})(this):Ce(this),this.fn()}finally{we<=30&&(e=>{const{deps:t}=e;if(t.length){let n=0;for(let r=0;r<t.length;r++){const l=t[r];ge(l)&&!ve(l)?l.delete(e):t[n++]=l,l.w&=~be,l.n&=~be}t.length=n}})(this),be=1<<--we,ke=this.parent,Se=t,this.parent=void 0,this.deferStop&&this.stop()}}stop(){ke===this?this.deferStop=!0:this.active&&(Ce(this),this.onStop&&this.onStop(),this.active=!1)}}function Ce(e){const{deps:t}=e;if(t.length){for(let n=0;n<t.length;n++)t[n].delete(e);t.length=0}}let Se=!0;const Ie=[];function Ee(){Ie.push(Se),Se=!1}function ze(){const e=Ie.pop();Se=void 0===e||e}function Re(e,t,n){if(Se&&ke){let t=ye.get(e);t||ye.set(e,t=new Map);let r=t.get(n);r||t.set(n,r=me()),Ae(r)}}function Ae(e,t){let n=!1;we<=30?ve(e)||(e.n|=be,n=!ge(e)):n=!e.has(ke),n&&(e.add(ke),ke.deps.push(e))}function Le(e,t,n,r,l,i){const o=ye.get(e);if(!o)return;let s=[];if("clear"===t)s=[...o.values()];else if("length"===n&&V(e))o.forEach(((e,t)=>{("length"===t||t>=r)&&s.push(e)}));else switch(void 0!==n&&s.push(o.get(n)),t){case"add":V(e)?X(n)&&s.push(o.get("length")):(s.push(o.get(xe)),B(e)&&s.push(o.get(_e)));break;case"delete":V(e)||(s.push(o.get(xe)),B(e)&&s.push(o.get(_e)));break;case"set":B(e)&&s.push(o.get(xe))}if(1===s.length)s[0]&&Oe(s[0]);else{const e=[];for(const t of s)t&&e.push(...t);Oe(me(e))}}function Oe(e,t){const n=V(e)?e:[...e];for(const e of n)e.computed&&je(e);for(const e of n)e.computed||je(e)}function je(e,t){(e!==ke||e.allowRecurse)&&(e.scheduler?e.scheduler():e.run())}const Te=y("__proto__,__v_isRef,__isVue"),Ue=new Set(Object.getOwnPropertyNames(Symbol).filter((e=>"arguments"!==e&&"caller"!==e)).map((e=>Symbol[e])).filter(Z)),Me=Be(),Pe=Be(!1,!0),Ne=Be(!0),Fe=Ve();function Ve(){const e={};return["includes","indexOf","lastIndexOf"].forEach((t=>{e[t]=function(...e){const n=St(this);for(let e=0,t=this.length;e<t;e++)Re(n,0,e+"");const r=n[t](...e);return-1===r||!1===r?n[t](...e.map(St)):r}})),["push","pop","shift","unshift","splice"].forEach((t=>{e[t]=function(...e){Ee();const n=St(this)[t].apply(this,e);return ze(),n}})),e}function Be(e=!1,t=!1){return function(n,r,l){if("__v_isReactive"===r)return!e;if("__v_isReadonly"===r)return e;if("__v_isShallow"===r)return t;if("__v_raw"===r&&l===(e?t?vt:gt:t?mt:ft).get(n))return n;const i=V(n);if(!e&&i&&F(Fe,r))return Reflect.get(Fe,r,l);const o=Reflect.get(n,r,l);return(Z(r)?Ue.has(r):Te(r))?o:(e||Re(n,0,r),t?o:Lt(o)?i&&X(r)?o:o.value:G(o)?e?bt(o):wt(o):o)}}function De(e=!1){return function(t,n,r,l){let i=t[n];if(_t(i)&&Lt(i)&&!Lt(r))return!1;if(!e&&($t(r)||_t(r)||(i=St(i),r=St(r)),!V(t)&&Lt(i)&&!Lt(r)))return i.value=r,!0;const o=V(t)&&X(n)?Number(n)<t.length:F(t,n),s=Reflect.set(t,n,r,l);return t===St(l)&&(o?ae(r,i)&&Le(t,"set",n,r):Le(t,"add",n,r)),s}}const He={get:Me,set:De(),deleteProperty:function(e,t){const n=F(e,t),r=Reflect.deleteProperty(e,t);return r&&n&&Le(e,"delete",t,void 0),r},has:function(e,t){const n=Reflect.has(e,t);return Z(t)&&Ue.has(t)||Re(e,0,t),n},ownKeys:function(e){return Re(e,0,V(e)?"length":xe),Reflect.ownKeys(e)}},We={get:Ne,set:(e,t)=>!0,deleteProperty:(e,t)=>!0},qe=M({},He,{get:Pe,set:De(!0)}),Ze=e=>e,Ge=e=>Reflect.getPrototypeOf(e);function Qe(e,t,n=!1,r=!1){const l=St(e=e.__v_raw),i=St(t);n||(t!==i&&Re(l,0,t),Re(l,0,i));const{has:o}=Ge(l),s=r?Ze:n?zt:Et;return o.call(l,t)?s(e.get(t)):o.call(l,i)?s(e.get(i)):void(e!==l&&e.get(t))}function Je(e,t=!1){const n=this.__v_raw,r=St(n),l=St(e);return t||(e!==l&&Re(r,0,e),Re(r,0,l)),e===l?n.has(e):n.has(e)||n.has(l)}function Ke(e,t=!1){return e=e.__v_raw,!t&&Re(St(e),0,xe),Reflect.get(e,"size",e)}function Ye(e){e=St(e);const t=St(this);return Ge(t).has.call(t,e)||(t.add(e),Le(t,"add",e,e)),this}function Xe(e,t){t=St(t);const n=St(this),{has:r,get:l}=Ge(n);let i=r.call(n,e);i||(e=St(e),i=r.call(n,e));const o=l.call(n,e);return n.set(e,t),i?ae(t,o)&&Le(n,"set",e,t):Le(n,"add",e,t),this}function et(e){const t=St(this),{has:n,get:r}=Ge(t);let l=n.call(t,e);l||(e=St(e),l=n.call(t,e)),r&&r.call(t,e);const i=t.delete(e);return l&&Le(t,"delete",e,void 0),i}function tt(){const e=St(this),t=0!==e.size,n=e.clear();return t&&Le(e,"clear",void 0,void 0),n}function nt(e,t){return function(n,r){const l=this,i=l.__v_raw,o=St(i),s=t?Ze:e?zt:Et;return!e&&Re(o,0,xe),i.forEach(((e,t)=>n.call(r,s(e),s(t),l)))}}function rt(e,t,n){return function(...r){const l=this.__v_raw,i=St(l),o=B(i),s="entries"===e||e===Symbol.iterator&&o,a="keys"===e&&o,c=l[e](...r),u=n?Ze:t?zt:Et;return!t&&Re(i,0,a?_e:xe),{next(){const{value:e,done:t}=c.next();return t?{value:e,done:t}:{value:s?[u(e[0]),u(e[1])]:u(e),done:t}},[Symbol.iterator](){return this}}}}function lt(e){return function(...t){return"delete"!==e&&this}}function it(){const e={get(e){return Qe(this,e)},get size(){return Ke(this)},has:Je,add:Ye,set:Xe,delete:et,clear:tt,forEach:nt(!1,!1)},t={get(e){return Qe(this,e,!1,!0)},get size(){return Ke(this)},has:Je,add:Ye,set:Xe,delete:et,clear:tt,forEach:nt(!1,!0)},n={get(e){return Qe(this,e,!0)},get size(){return Ke(this,!0)},has(e){return Je.call(this,e,!0)},add:lt("add"),set:lt("set"),delete:lt("delete"),clear:lt("clear"),forEach:nt(!0,!1)},r={get(e){return Qe(this,e,!0,!0)},get size(){return Ke(this,!0)},has(e){return Je.call(this,e,!0)},add:lt("add"),set:lt("set"),delete:lt("delete"),clear:lt("clear"),forEach:nt(!0,!0)};return["keys","values","entries",Symbol.iterator].forEach((l=>{e[l]=rt(l,!1,!1),n[l]=rt(l,!0,!1),t[l]=rt(l,!1,!0),r[l]=rt(l,!0,!0)})),[e,n,t,r]}const[ot,st,at,ct]=it();function ut(e,t){const n=t?e?ct:at:e?st:ot;return(t,r,l)=>"__v_isReactive"===r?!e:"__v_isReadonly"===r?e:"__v_raw"===r?t:Reflect.get(F(n,r)&&r in t?n:t,r,l)}const pt={get:ut(!1,!1)},dt={get:ut(!1,!0)},ht={get:ut(!0,!1)},ft=new WeakMap,mt=new WeakMap,gt=new WeakMap,vt=new WeakMap;function yt(e){return e.__v_skip||!Object.isExtensible(e)?0:function(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}((e=>K(e).slice(8,-1))(e))}function wt(e){return _t(e)?e:kt(e,!1,He,pt,ft)}function bt(e){return kt(e,!0,We,ht,gt)}function kt(e,t,n,r,l){if(!G(e))return e;if(e.__v_raw&&(!t||!e.__v_isReactive))return e;const i=l.get(e);if(i)return i;const o=yt(e);if(0===o)return e;const s=new Proxy(e,2===o?r:n);return l.set(e,s),s}function xt(e){return _t(e)?xt(e.__v_raw):!(!e||!e.__v_isReactive)}function _t(e){return!(!e||!e.__v_isReadonly)}function $t(e){return!(!e||!e.__v_isShallow)}function Ct(e){return xt(e)||_t(e)}function St(e){const t=e&&e.__v_raw;return t?St(t):e}function It(e){return ue(e,"__v_skip",!0),e}const Et=e=>G(e)?wt(e):e,zt=e=>G(e)?bt(e):e;function Rt(e){Se&&ke&&Ae((e=St(e)).dep||(e.dep=me()))}function At(e,t){(e=St(e)).dep&&Oe(e.dep)}function Lt(e){return!(!e||!0!==e.__v_isRef)}function Ot(e){return Tt(e,!1)}function jt(e){return Tt(e,!0)}function Tt(e,t){return Lt(e)?e:new Ut(e,t)}class Ut{constructor(e,t){this.__v_isShallow=t,this.dep=void 0,this.__v_isRef=!0,this._rawValue=t?e:St(e),this._value=t?e:Et(e)}get value(){return Rt(this),this._value}set value(e){const t=this.__v_isShallow||$t(e)||_t(e);e=t?e:St(e),ae(e,this._rawValue)&&(this._rawValue=e,this._value=t?e:Et(e),At(this))}}function Mt(e){return Lt(e)?e.value:e}const Pt={get:(e,t,n)=>Mt(Reflect.get(e,t,n)),set:(e,t,n,r)=>{const l=e[t];return Lt(l)&&!Lt(n)?(l.value=n,!0):Reflect.set(e,t,n,r)}};function Nt(e){return xt(e)?e:new Proxy(e,Pt)}var Ft;class Vt{constructor(e,t,n,r){this._setter=t,this.dep=void 0,this.__v_isRef=!0,this[Ft]=!1,this._dirty=!0,this.effect=new $e(e,(()=>{this._dirty||(this._dirty=!0,At(this))})),this.effect.computed=this,this.effect.active=this._cacheable=!r,this.__v_isReadonly=n}get value(){const e=St(this);return Rt(e),!e._dirty&&e._cacheable||(e._dirty=!1,e._value=e.effect.run()),e._value}set value(e){this._setter(e)}}function Bt(e,t,n,r){let l;try{l=r?e(...r):e()}catch(e){Ht(e,t,n)}return l}function Dt(e,t,n,r){if(W(e)){const l=Bt(e,t,n,r);return l&&Q(l)&&l.catch((e=>{Ht(e,t,n)})),l}const l=[];for(let i=0;i<e.length;i++)l.push(Dt(e[i],t,n,r));return l}function Ht(e,t,n,r=!0){t&&t.vnode;if(t){let r=t.parent;const l=t.proxy,i=n;for(;r;){const t=r.ec;if(t)for(let n=0;n<t.length;n++)if(!1===t[n](e,l,i))return;r=r.parent}const o=t.appContext.config.errorHandler;if(o)return void Bt(o,null,10,[e,l,i])}!function(e,t,n,r=!0){console.error(e)}(e,0,0,r)}Ft="__v_isReadonly";let Wt=!1,qt=!1;const Zt=[];let Gt=0;const Qt=[];let Jt=null,Kt=0;const Yt=Promise.resolve();let Xt=null;function en(e){const t=Xt||Yt;return e?t.then(this?e.bind(this):e):t}function tn(e){Zt.length&&Zt.includes(e,Wt&&e.allowRecurse?Gt+1:Gt)||(null==e.id?Zt.push(e):Zt.splice(function(e){let t=Gt+1,n=Zt.length;for(;t<n;){const r=t+n>>>1;on(Zt[r])<e?t=r+1:n=r}return t}(e.id),0,e),nn())}function nn(){Wt||qt||(qt=!0,Xt=Yt.then(an))}function rn(e,t=(Wt?Gt+1:0)){for(;t<Zt.length;t++){const e=Zt[t];e&&e.pre&&(Zt.splice(t,1),t--,e())}}function ln(e){if(Qt.length){const e=[...new Set(Qt)];if(Qt.length=0,Jt)return void Jt.push(...e);for(Jt=e,Jt.sort(((e,t)=>on(e)-on(t))),Kt=0;Kt<Jt.length;Kt++)Jt[Kt]();Jt=null,Kt=0}}const on=e=>null==e.id?1/0:e.id,sn=(e,t)=>{const n=on(e)-on(t);if(0===n){if(e.pre&&!t.pre)return-1;if(t.pre&&!e.pre)return 1}return n};function an(e){qt=!1,Wt=!0,Zt.sort(sn);try{for(Gt=0;Gt<Zt.length;Gt++){const e=Zt[Gt];e&&!1!==e.active&&Bt(e,null,14)}}finally{Gt=0,Zt.length=0,ln(),Wt=!1,Xt=null,(Zt.length||Qt.length)&&an()}}function cn(e,t,...n){if(e.isUnmounted)return;const r=e.vnode.props||R;let l=n;const i=t.startsWith("update:"),o=i&&t.slice(7);if(o&&o in r){const e=`${"modelValue"===o?"model":o}Modifiers`,{number:t,trim:i}=r[e]||R;i&&(l=n.map((e=>e.trim()))),t&&(l=n.map(pe))}let s,a=r[s=se(t)]||r[s=se(re(t))];!a&&i&&(a=r[s=se(ie(t))]),a&&Dt(a,e,6,l);const c=r[s+"Once"];if(c){if(e.emitted){if(e.emitted[s])return}else e.emitted={};e.emitted[s]=!0,Dt(c,e,6,l)}}function un(e,t,n=!1){const r=t.emitsCache,l=r.get(e);if(void 0!==l)return l;const i=e.emits;let o={};return i?(V(i)?i.forEach((e=>o[e]=null)):M(o,i),G(e)&&r.set(e,o),o):(G(e)&&r.set(e,null),null)}function pn(e,t){return!(!e||!T(t))&&(t=t.slice(2).replace(/Once$/,""),F(e,t[0].toLowerCase()+t.slice(1))||F(e,ie(t))||F(e,t))}let dn=null,hn=null;function fn(e){const t=dn;return dn=e,hn=e&&e.type.__scopeId||null,t}function mn(e){const{type:t,vnode:n,proxy:r,withProxy:l,props:i,propsOptions:[o],slots:s,attrs:a,emit:c,render:u,renderCache:p,data:d,setupState:h,ctx:f,inheritAttrs:m}=e;let g,v;const y=fn(e);try{if(4&n.shapeFlag){const e=l||r;g=zr(u.call(e,e,p,i,h,d,f)),v=a}else{const e=t;g=zr(e.length>1?e(i,{attrs:a,slots:s,emit:c}):e(i,null)),v=t.props?a:gn(a)}}catch(t){pr.length=0,Ht(t,e,1),g=Cr(cr)}let w=g;if(v&&!1!==m){const e=Object.keys(v),{shapeFlag:t}=w;e.length&&7&t&&(o&&e.some(U)&&(v=vn(v,o)),w=Sr(w,v))}return n.dirs&&(w=Sr(w),w.dirs=w.dirs?w.dirs.concat(n.dirs):n.dirs),n.transition&&(w.transition=n.transition),g=w,fn(y),g}const gn=e=>{let t;for(const n in e)("class"===n||"style"===n||T(n))&&((t||(t={}))[n]=e[n]);return t},vn=(e,t)=>{const n={};for(const r in e)U(r)&&r.slice(9)in t||(n[r]=e[r]);return n};function yn(e,t,n){const r=Object.keys(t);if(r.length!==Object.keys(e).length)return!0;for(let l=0;l<r.length;l++){const i=r[l];if(t[i]!==e[i]&&!pn(n,i))return!0}return!1}function wn(e,t,n=!1){const r=Tr||dn;if(r){const l=null==r.parent?r.vnode.appContext&&r.vnode.appContext.provides:r.parent.provides;if(l&&e in l)return l[e];if(arguments.length>1)return n&&W(t)?t.call(r.proxy):t}}function bn(e,t){return _n(e,null,t)}const kn={};function xn(e,t,n){return _n(e,t,n)}function _n(e,t,{immediate:n,deep:r,flush:l,onTrack:i,onTrigger:o}=R){const s=Tr;let a,c,u=!1,p=!1;if(Lt(e)?(a=()=>e.value,u=$t(e)):xt(e)?(a=()=>e,r=!0):V(e)?(p=!0,u=e.some((e=>xt(e)||$t(e))),a=()=>e.map((e=>Lt(e)?e.value:xt(e)?$n(e):W(e)?Bt(e,s,2):void 0))):a=W(e)?t?()=>Bt(e,s,2):()=>{if(!s||!s.isUnmounted)return c&&c(),Dt(e,s,3,[d])}:L,t&&r){const e=a;a=()=>$n(e())}let d=e=>{c=g.onStop=()=>{Bt(e,s,4)}};if(Nr)return d=L,t?n&&Dt(t,s,3,[a(),p?[]:void 0,d]):a(),L;let h=p?[]:kn;const f=()=>{if(g.active)if(t){const e=g.run();(r||u||(p?e.some(((e,t)=>ae(e,h[t]))):ae(e,h)))&&(c&&c(),Dt(t,s,3,[e,h===kn?void 0:h,d]),h=e)}else g.run()};let m;f.allowRecurse=!!t,"sync"===l?m=f:"post"===l?m=()=>rr(f,s&&s.suspense):(f.pre=!0,s&&(f.id=s.uid),m=()=>tn(f));const g=new $e(a,m);return t?n?f():h=g.run():"post"===l?rr(g.run.bind(g),s&&s.suspense):g.run(),()=>{g.stop(),s&&s.scope&&P(s.scope.effects,g)}}function $n(e,t){if(!G(e)||e.__v_skip)return e;if((t=t||new Set).has(e))return e;if(t.add(e),Lt(e))$n(e.value,t);else if(V(e))for(let n=0;n<e.length;n++)$n(e[n],t);else if(D(e)||B(e))e.forEach((e=>{$n(e,t)}));else if(Y(e))for(const n in e)$n(e[n],t);return e}function Cn(e){return W(e)?{setup:e,name:e.name}:e}const Sn=e=>!!e.type.__asyncLoader;const In=e=>(t,n=Tr)=>(!Nr||"sp"===e)&&function(e,t,n=Tr,r=!1){if(n){const l=n[e]||(n[e]=[]),i=t.__weh||(t.__weh=(...r)=>{if(n.isUnmounted)return;Ee(),Ur(n);const l=Dt(t,n,e,r);return Mr(),ze(),l});return r?l.unshift(i):l.push(i),i}}(e,t,n),En=In("m"),zn=In("bum"),Rn=In("um");function An(e,t){const n=dn;if(null===n)return e;const r=Br(n)||n.proxy,l=e.dirs||(e.dirs=[]);for(let e=0;e<t.length;e++){let[n,i,o,s=R]=t[e];W(n)&&(n={mounted:n,updated:n}),n.deep&&$n(i),l.push({dir:n,instance:r,value:i,oldValue:void 0,arg:o,modifiers:s})}return e}function Ln(e,t,n,r){const l=e.dirs,i=t&&t.dirs;for(let o=0;o<l.length;o++){const s=l[o];i&&(s.oldValue=i[o].value);let a=s.dir[r];a&&(Ee(),Dt(a,n,8,[e.el,s,e,t]),ze())}}function On(e,t){return function(e,t,n=!0,r=!1){const l=dn||Tr;if(l){const n=l.type;if("components"===e){const e=function(e,t=!0){return W(e)?e.displayName||e.name:e.name||t&&e.__name}(n,!1);if(e&&(e===t||e===re(t)||e===oe(re(t))))return n}const i=Tn(l[e]||n[e],t)||Tn(l.appContext[e],t);return!i&&r?n:i}}("components",e,!0,t)||e}const jn=Symbol();function Tn(e,t){return e&&(e[t]||e[re(t)]||e[oe(re(t))])}function Un(e,t,n,r){let l;const i=n&&n[r];if(V(e)||q(e)){l=new Array(e.length);for(let n=0,r=e.length;n<r;n++)l[n]=t(e[n],n,void 0,i&&i[n])}else if("number"==typeof e){l=new Array(e);for(let n=0;n<e;n++)l[n]=t(n+1,n,void 0,i&&i[n])}else if(G(e))if(e[Symbol.iterator])l=Array.from(e,((e,n)=>t(e,n,void 0,i&&i[n])));else{const n=Object.keys(e);l=new Array(n.length);for(let r=0,o=n.length;r<o;r++){const o=n[r];l[r]=t(e[o],o,r,i&&i[r])}}else l=[];return n&&(n[r]=l),l}const Mn=e=>e?Pr(e)?Br(e)||e.proxy:Mn(e.parent):null,Pn=M(Object.create(null),{$:e=>e,$el:e=>e.vnode.el,$data:e=>e.data,$props:e=>e.props,$attrs:e=>e.attrs,$slots:e=>e.slots,$refs:e=>e.refs,$parent:e=>Mn(e.parent),$root:e=>Mn(e.root),$emit:e=>e.emit,$options:e=>e.type,$forceUpdate:e=>e.f||(e.f=()=>tn(e.update)),$nextTick:e=>e.n||(e.n=en.bind(e.proxy)),$watch:e=>L}),Nn={get({_:e},t){const{ctx:n,setupState:r,data:l,props:i,accessCache:o,type:s,appContext:a}=e;let c;if("$"!==t[0]){const s=o[t];if(void 0!==s)switch(s){case 1:return r[t];case 2:return l[t];case 4:return n[t];case 3:return i[t]}else{if(r!==R&&F(r,t))return o[t]=1,r[t];if(l!==R&&F(l,t))return o[t]=2,l[t];if((c=e.propsOptions[0])&&F(c,t))return o[t]=3,i[t];if(n!==R&&F(n,t))return o[t]=4,n[t];o[t]=0}}const u=Pn[t];let p,d;return u?("$attrs"===t&&Re(e,0,t),u(e)):(p=s.__cssModules)&&(p=p[t])?p:n!==R&&F(n,t)?(o[t]=4,n[t]):(d=a.config.globalProperties,F(d,t)?d[t]:void 0)},set({_:e},t,n){const{data:r,setupState:l,ctx:i}=e;return l!==R&&F(l,t)?(l[t]=n,!0):r!==R&&F(r,t)?(r[t]=n,!0):!F(e.props,t)&&(("$"!==t[0]||!(t.slice(1)in e))&&(i[t]=n,!0))},has({_:{data:e,setupState:t,accessCache:n,ctx:r,appContext:l,propsOptions:i}},o){let s;return!!n[o]||e!==R&&F(e,o)||t!==R&&F(t,o)||(s=i[0])&&F(s,o)||F(r,o)||F(Pn,o)||F(l.config.globalProperties,o)},defineProperty(e,t,n){return null!=n.get?e._.accessCache[t]=0:F(n,"value")&&this.set(e,t,n.value,null),Reflect.defineProperty(e,t,n)}};function Fn(e,t,n,r=!1){const l={},i={};ue(i,kr,1),e.propsDefaults=Object.create(null),Vn(e,t,l,i);for(const t in e.propsOptions[0])t in l||(l[t]=void 0);n?e.props=r?l:kt(l,!1,qe,dt,mt):e.type.props?e.props=l:e.props=i,e.attrs=i}function Vn(e,t,n,r){const[l,i]=e.propsOptions;let o,s=!1;if(t)for(let a in t){if(ee(a))continue;const c=t[a];let u;l&&F(l,u=re(a))?i&&i.includes(u)?(o||(o={}))[u]=c:n[u]=c:pn(e.emitsOptions,a)||a in r&&c===r[a]||(r[a]=c,s=!0)}if(i){const t=St(n),r=o||R;for(let o=0;o<i.length;o++){const s=i[o];n[s]=Bn(l,t,s,r[s],e,!F(r,s))}}return s}function Bn(e,t,n,r,l,i){const o=e[n];if(null!=o){const e=F(o,"default");if(e&&void 0===r){const e=o.default;if(o.type!==Function&&W(e)){const{propsDefaults:i}=l;n in i?r=i[n]:(Ur(l),r=i[n]=e.call(null,t),Mr())}else r=e}o[0]&&(i&&!e?r=!1:!o[1]||""!==r&&r!==ie(n)||(r=!0))}return r}function Dn(e,t,n=!1){const r=t.propsCache,l=r.get(e);if(l)return l;const i=e.props,o={},s=[];if(!i)return G(e)&&r.set(e,A),A;if(V(i))for(let e=0;e<i.length;e++){const t=re(i[e]);Hn(t)&&(o[t]=R)}else if(i)for(const e in i){const t=re(e);if(Hn(t)){const n=i[e],r=o[t]=V(n)||W(n)?{type:n}:n;if(r){const e=Zn(Boolean,r.type),n=Zn(String,r.type);r[0]=e>-1,r[1]=n<0||e<n,(e>-1||F(r,"default"))&&s.push(t)}}}const a=[o,s];return G(e)&&r.set(e,a),a}function Hn(e){return"$"!==e[0]}function Wn(e){const t=e&&e.toString().match(/^\s*function (\w+)/);return t?t[1]:null===e?"null":""}function qn(e,t){return Wn(e)===Wn(t)}function Zn(e,t){return V(t)?t.findIndex((t=>qn(t,e))):W(t)&&qn(t,e)?0:-1}const Gn=e=>"_"===e[0]||"$stable"===e,Qn=e=>V(e)?e.map(zr):[zr(e)],Jn=(e,t,n)=>{if(t._n)return t;const r=function(e,t=dn,n){if(!t)return e;if(e._n)return e;const r=(...n)=>{r._d&&mr(-1);const l=fn(t),i=e(...n);return fn(l),r._d&&mr(1),i};return r._n=!0,r._c=!0,r._d=!0,r}(((...e)=>Qn(t(...e))),n);return r._c=!1,r},Kn=(e,t,n)=>{const r=e._ctx;for(const n in e){if(Gn(n))continue;const l=e[n];if(W(l))t[n]=Jn(0,l,r);else if(null!=l){const e=Qn(l);t[n]=()=>e}}},Yn=(e,t)=>{const n=Qn(t);e.slots.default=()=>n};function Xn(){return{app:null,config:{isNativeTag:O,performance:!1,globalProperties:{},optionMergeStrategies:{},errorHandler:void 0,warnHandler:void 0,compilerOptions:{}},mixins:[],components:{},directives:{},provides:Object.create(null),optionsCache:new WeakMap,propsCache:new WeakMap,emitsCache:new WeakMap}}let er=0;function tr(e,t){return function(n,r=null){W(n)||(n=Object.assign({},n)),null==r||G(r)||(r=null);const l=Xn(),i=new Set;let o=!1;const s=l.app={_uid:er++,_component:n,_props:r,_container:null,_context:l,_instance:null,version:Wr,get config(){return l.config},set config(e){},use:(e,...t)=>(i.has(e)||(e&&W(e.install)?(i.add(e),e.install(s,...t)):W(e)&&(i.add(e),e(s,...t))),s),mixin:e=>s,component:(e,t)=>t?(l.components[e]=t,s):l.components[e],directive:(e,t)=>t?(l.directives[e]=t,s):l.directives[e],mount(i,a,c){if(!o){const u=Cr(n,r);return u.appContext=l,a&&t?t(u,i):e(u,i,c),o=!0,s._container=i,i.__vue_app__=s,Br(u.component)||u.component.proxy}},unmount(){o&&(e(null,s._container),delete s._container.__vue_app__)},provide:(e,t)=>(l.provides[e]=t,s)};return s}}function nr(e,t,n,r,l=!1){if(V(e))return void e.forEach(((e,i)=>nr(e,t&&(V(t)?t[i]:t),n,r,l)));if(Sn(r)&&!l)return;const i=4&r.shapeFlag?Br(r.component)||r.component.proxy:r.el,o=l?null:i,{i:s,r:a}=e,c=t&&t.r,u=s.refs===R?s.refs={}:s.refs,p=s.setupState;if(null!=c&&c!==a&&(q(c)?(u[c]=null,F(p,c)&&(p[c]=null)):Lt(c)&&(c.value=null)),W(a))Bt(a,s,12,[o,u]);else{const t=q(a),r=Lt(a);if(t||r){const s=()=>{if(e.f){const n=t?u[a]:a.value;l?V(n)&&P(n,i):V(n)?n.includes(i)||n.push(i):t?(u[a]=[i],F(p,a)&&(p[a]=u[a])):(a.value=[i],e.k&&(u[e.k]=a.value))}else t?(u[a]=o,F(p,a)&&(p[a]=o)):r&&(a.value=o,e.k&&(u[e.k]=o))};o?(s.id=-1,rr(s,n)):s()}}}const rr=function(e,t){var n;t&&t.pendingBranch?V(e)?t.effects.push(...e):t.effects.push(e):(V(n=e)?Qt.push(...n):Jt&&Jt.includes(n,n.allowRecurse?Kt+1:Kt)||Qt.push(n),nn())};function lr(e){return function(e,t){(de||(de="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{})).__VUE__=!0;const{insert:n,remove:r,patchProp:l,createElement:i,createText:o,createComment:s,setText:a,setElementText:c,parentNode:u,nextSibling:p,setScopeId:d=L,cloneNode:h,insertStaticContent:f}=e,m=(e,t,n,r=null,l=null,i=null,o=!1,s=null,a=!!t.dynamicChildren)=>{if(e===t)return;e&&!br(e,t)&&(r=G(e),D(e,l,i,!0),e=null),-2===t.patchFlag&&(a=!1,t.dynamicChildren=null);const{type:c,ref:u,shapeFlag:p}=t;switch(c){case ar:g(e,t,n,r);break;case cr:v(e,t,n,r);break;case ur:null==e&&y(t,n,r,o);break;case sr:E(e,t,n,r,l,i,o,s,a);break;default:1&p?k(e,t,n,r,l,i,o,s,a):6&p?z(e,t,n,r,l,i,o,s,a):(64&p||128&p)&&c.process(e,t,n,r,l,i,o,s,a,K)}null!=u&&l&&nr(u,e&&e.ref,i,t||e,!t)},g=(e,t,r,l)=>{if(null==e)n(t.el=o(t.children),r,l);else{const n=t.el=e.el;t.children!==e.children&&a(n,t.children)}},v=(e,t,r,l)=>{null==e?n(t.el=s(t.children||""),r,l):t.el=e.el},y=(e,t,n,r)=>{[e.el,e.anchor]=f(e.children,t,n,r,e.el,e.anchor)},w=({el:e,anchor:t},r,l)=>{let i;for(;e&&e!==t;)i=p(e),n(e,r,l),e=i;n(t,r,l)},b=({el:e,anchor:t})=>{let n;for(;e&&e!==t;)n=p(e),r(e),e=n;r(t)},k=(e,t,n,r,l,i,o,s,a)=>{o=o||"svg"===t.type,null==e?x(t,n,r,l,i,o,s,a):C(e,t,l,i,o,s,a)},x=(e,t,r,o,s,a,u,p)=>{let d,f;const{type:m,props:g,shapeFlag:v,transition:y,patchFlag:w,dirs:b}=e;if(e.el&&void 0!==h&&-1===w)d=e.el=h(e.el);else{if(d=e.el=i(e.type,a,g&&g.is,g),8&v?c(d,e.children):16&v&&$(e.children,d,null,o,s,a&&"foreignObject"!==m,u,p),b&&Ln(e,null,o,"created"),g){for(const t in g)"value"===t||ee(t)||l(d,t,null,g[t],a,e.children,o,s,Z);"value"in g&&l(d,"value",null,g.value),(f=g.onVnodeBeforeMount)&&Lr(f,o,e)}_(d,e,e.scopeId,u,o)}b&&Ln(e,null,o,"beforeMount");const k=(!s||s&&!s.pendingBranch)&&y&&!y.persisted;k&&y.beforeEnter(d),n(d,t,r),((f=g&&g.onVnodeMounted)||k||b)&&rr((()=>{f&&Lr(f,o,e),k&&y.enter(d),b&&Ln(e,null,o,"mounted")}),s)},_=(e,t,n,r,l)=>{if(n&&d(e,n),r)for(let t=0;t<r.length;t++)d(e,r[t]);if(l){if(t===l.subTree){const t=l.vnode;_(e,t,t.scopeId,t.slotScopeIds,l.parent)}}},$=(e,t,n,r,l,i,o,s,a=0)=>{for(let c=a;c<e.length;c++){const a=e[c]=s?Rr(e[c]):zr(e[c]);m(null,a,t,n,r,l,i,o,s)}},C=(e,t,n,r,i,o,s)=>{const a=t.el=e.el;let{patchFlag:u,dynamicChildren:p,dirs:d}=t;u|=16&e.patchFlag;const h=e.props||R,f=t.props||R;let m;n&&ir(n,!1),(m=f.onVnodeBeforeUpdate)&&Lr(m,n,t,e),d&&Ln(t,e,n,"beforeUpdate"),n&&ir(n,!0);const g=i&&"foreignObject"!==t.type;if(p?S(e.dynamicChildren,p,a,n,r,g,o):s||P(e,t,a,null,n,r,g,o,!1),u>0){if(16&u)I(a,t,h,f,n,r,i);else if(2&u&&h.class!==f.class&&l(a,"class",null,f.class,i),4&u&&l(a,"style",h.style,f.style,i),8&u){const o=t.dynamicProps;for(let t=0;t<o.length;t++){const s=o[t],c=h[s],u=f[s];u===c&&"value"!==s||l(a,s,c,u,i,e.children,n,r,Z)}}1&u&&e.children!==t.children&&c(a,t.children)}else s||null!=p||I(a,t,h,f,n,r,i);((m=f.onVnodeUpdated)||d)&&rr((()=>{m&&Lr(m,n,t,e),d&&Ln(t,e,n,"updated")}),r)},S=(e,t,n,r,l,i,o)=>{for(let s=0;s<t.length;s++){const a=e[s],c=t[s],p=a.el&&(a.type===sr||!br(a,c)||70&a.shapeFlag)?u(a.el):n;m(a,c,p,null,r,l,i,o,!0)}},I=(e,t,n,r,i,o,s)=>{if(n!==r){for(const a in r){if(ee(a))continue;const c=r[a],u=n[a];c!==u&&"value"!==a&&l(e,a,u,c,s,t.children,i,o,Z)}if(n!==R)for(const a in n)ee(a)||a in r||l(e,a,n[a],null,s,t.children,i,o,Z);"value"in r&&l(e,"value",n.value,r.value)}},E=(e,t,r,l,i,s,a,c,u)=>{const p=t.el=e?e.el:o(""),d=t.anchor=e?e.anchor:o("");let{patchFlag:h,dynamicChildren:f,slotScopeIds:m}=t;m&&(c=c?c.concat(m):m),null==e?(n(p,r,l),n(d,r,l),$(t.children,r,d,i,s,a,c,u)):h>0&&64&h&&f&&e.dynamicChildren?(S(e.dynamicChildren,f,r,i,s,a,c),(null!=t.key||i&&t===i.subTree)&&or(e,t,!0)):P(e,t,r,d,i,s,a,c,u)},z=(e,t,n,r,l,i,o,s,a)=>{t.slotScopeIds=s,null==e?512&t.shapeFlag?l.ctx.activate(t,n,r,o,a):O(t,n,r,l,i,o,a):j(e,t,a)},O=(e,t,n,r,l,i,o)=>{const s=e.component=function(e,t,n){const r=e.type,l=(t?t.appContext:e.appContext)||Or,i={uid:jr++,vnode:e,type:r,parent:t,appContext:l,root:null,next:null,subTree:null,effect:null,update:null,scope:new fe(!0),render:null,proxy:null,exposed:null,exposeProxy:null,withProxy:null,provides:t?t.provides:Object.create(l.provides),accessCache:null,renderCache:[],components:null,directives:null,propsOptions:Dn(r,l),emitsOptions:un(r,l),emit:null,emitted:null,propsDefaults:R,inheritAttrs:r.inheritAttrs,ctx:R,data:R,props:R,attrs:R,slots:R,refs:R,setupState:R,setupContext:null,suspense:n,suspenseId:n?n.pendingId:0,asyncDep:null,asyncResolved:!1,isMounted:!1,isUnmounted:!1,isDeactivated:!1,bc:null,c:null,bm:null,m:null,bu:null,u:null,um:null,bum:null,da:null,a:null,rtg:null,rtc:null,ec:null,sp:null};i.ctx={_:i},i.root=t?t.root:i,i.emit=cn.bind(null,i),e.ce&&e.ce(i);return i}(e,r,l);if(e.type.__isKeepAlive&&(s.ctx.renderer=K),function(e,t=!1){Nr=t;const{props:n,children:r}=e.vnode,l=Pr(e);Fn(e,n,l,t),((e,t)=>{if(32&e.vnode.shapeFlag){const n=t._;n?(e.slots=St(t),ue(t,"_",n)):Kn(t,e.slots={})}else e.slots={},t&&Yn(e,t);ue(e.slots,kr,1)})(e,r);const i=l?function(e,t){const n=e.type;e.accessCache=Object.create(null),e.proxy=It(new Proxy(e.ctx,Nn));const{setup:r}=n;if(r){const n=e.setupContext=r.length>1?function(e){const t=t=>{e.exposed=t||{}};let n;return{get attrs(){return n||(n=function(e){return new Proxy(e.attrs,{get:(t,n)=>(Re(e,0,"$attrs"),t[n])})}(e))},slots:e.slots,emit:e.emit,expose:t}}(e):null;Ur(e),Ee();const l=Bt(r,e,0,[e.props,n]);if(ze(),Mr(),Q(l)){if(l.then(Mr,Mr),t)return l.then((n=>{Fr(e,n,t)})).catch((t=>{Ht(t,e,0)}));e.asyncDep=l}else Fr(e,l,t)}else Vr(e,t)}(e,t):void 0;Nr=!1}(s),s.asyncDep){if(l&&l.registerDep(s,T),!e.el){const e=s.subTree=Cr(cr);v(null,e,t,n)}}else T(s,e,t,n,l,i,o)},j=(e,t,n)=>{const r=t.component=e.component;if(function(e,t,n){const{props:r,children:l,component:i}=e,{props:o,children:s,patchFlag:a}=t,c=i.emitsOptions;if(t.dirs||t.transition)return!0;if(!(n&&a>=0))return!(!l&&!s||s&&s.$stable)||r!==o&&(r?!o||yn(r,o,c):!!o);if(1024&a)return!0;if(16&a)return r?yn(r,o,c):!!o;if(8&a){const e=t.dynamicProps;for(let t=0;t<e.length;t++){const n=e[t];if(o[n]!==r[n]&&!pn(c,n))return!0}}return!1}(e,t,n)){if(r.asyncDep&&!r.asyncResolved)return void U(r,t,n);r.next=t,function(e){const t=Zt.indexOf(e);t>Gt&&Zt.splice(t,1)}(r.update),r.update()}else t.el=e.el,r.vnode=t},T=(e,t,n,r,l,i,o)=>{const s=()=>{if(e.isMounted){let t,{next:n,bu:r,u:s,parent:a,vnode:c}=e,p=n;ir(e,!1),n?(n.el=c.el,U(e,n,o)):n=c,r&&ce(r),(t=n.props&&n.props.onVnodeBeforeUpdate)&&Lr(t,a,n,c),ir(e,!0);const d=mn(e),h=e.subTree;e.subTree=d,m(h,d,u(h.el),G(h),e,l,i),n.el=d.el,null===p&&function({vnode:e,parent:t},n){for(;t&&t.subTree===e;)(e=t.vnode).el=n,t=t.parent}(e,d.el),s&&rr(s,l),(t=n.props&&n.props.onVnodeUpdated)&&rr((()=>Lr(t,a,n,c)),l)}else{let o;const{el:s,props:a}=t,{bm:c,m:u,parent:p}=e,d=Sn(t);if(ir(e,!1),c&&ce(c),!d&&(o=a&&a.onVnodeBeforeMount)&&Lr(o,p,t),ir(e,!0),s&&X){const n=()=>{e.subTree=mn(e),X(s,e.subTree,e,l,null)};d?t.type.__asyncLoader().then((()=>!e.isUnmounted&&n())):n()}else{const o=e.subTree=mn(e);m(null,o,n,r,e,l,i),t.el=o.el}if(u&&rr(u,l),!d&&(o=a&&a.onVnodeMounted)){const e=t;rr((()=>Lr(o,p,e)),l)}(256&t.shapeFlag||p&&Sn(p.vnode)&&256&p.vnode.shapeFlag)&&e.a&&rr(e.a,l),e.isMounted=!0,t=n=r=null}},a=e.effect=new $e(s,(()=>tn(c)),e.scope),c=e.update=()=>a.run();c.id=e.uid,ir(e,!0),c()},U=(e,t,n)=>{t.component=e;const r=e.vnode.props;e.vnode=t,e.next=null,function(e,t,n,r){const{props:l,attrs:i,vnode:{patchFlag:o}}=e,s=St(l),[a]=e.propsOptions;let c=!1;if(!(r||o>0)||16&o){let r;Vn(e,t,l,i)&&(c=!0);for(const i in s)t&&(F(t,i)||(r=ie(i))!==i&&F(t,r))||(a?!n||void 0===n[i]&&void 0===n[r]||(l[i]=Bn(a,s,i,void 0,e,!0)):delete l[i]);if(i!==s)for(const e in i)t&&F(t,e)||(delete i[e],c=!0)}else if(8&o){const n=e.vnode.dynamicProps;for(let r=0;r<n.length;r++){let o=n[r];if(pn(e.emitsOptions,o))continue;const u=t[o];if(a)if(F(i,o))u!==i[o]&&(i[o]=u,c=!0);else{const t=re(o);l[t]=Bn(a,s,t,u,e,!1)}else u!==i[o]&&(i[o]=u,c=!0)}}c&&Le(e,"set","$attrs")}(e,t.props,r,n),((e,t,n)=>{const{vnode:r,slots:l}=e;let i=!0,o=R;if(32&r.shapeFlag){const e=t._;e?n&&1===e?i=!1:(M(l,t),n||1!==e||delete l._):(i=!t.$stable,Kn(t,l)),o=t}else t&&(Yn(e,t),o={default:1});if(i)for(const e in l)Gn(e)||e in o||delete l[e]})(e,t.children,n),Ee(),rn(),ze()},P=(e,t,n,r,l,i,o,s,a=!1)=>{const u=e&&e.children,p=e?e.shapeFlag:0,d=t.children,{patchFlag:h,shapeFlag:f}=t;if(h>0){if(128&h)return void V(u,d,n,r,l,i,o,s,a);if(256&h)return void N(u,d,n,r,l,i,o,s,a)}8&f?(16&p&&Z(u,l,i),d!==u&&c(n,d)):16&p?16&f?V(u,d,n,r,l,i,o,s,a):Z(u,l,i,!0):(8&p&&c(n,""),16&f&&$(d,n,r,l,i,o,s,a))},N=(e,t,n,r,l,i,o,s,a)=>{t=t||A;const c=(e=e||A).length,u=t.length,p=Math.min(c,u);let d;for(d=0;d<p;d++){const r=t[d]=a?Rr(t[d]):zr(t[d]);m(e[d],r,n,null,l,i,o,s,a)}c>u?Z(e,l,i,!0,!1,p):$(t,n,r,l,i,o,s,a,p)},V=(e,t,n,r,l,i,o,s,a)=>{let c=0;const u=t.length;let p=e.length-1,d=u-1;for(;c<=p&&c<=d;){const r=e[c],u=t[c]=a?Rr(t[c]):zr(t[c]);if(!br(r,u))break;m(r,u,n,null,l,i,o,s,a),c++}for(;c<=p&&c<=d;){const r=e[p],c=t[d]=a?Rr(t[d]):zr(t[d]);if(!br(r,c))break;m(r,c,n,null,l,i,o,s,a),p--,d--}if(c>p){if(c<=d){const e=d+1,p=e<u?t[e].el:r;for(;c<=d;)m(null,t[c]=a?Rr(t[c]):zr(t[c]),n,p,l,i,o,s,a),c++}}else if(c>d)for(;c<=p;)D(e[c],l,i,!0),c++;else{const h=c,f=c,g=new Map;for(c=f;c<=d;c++){const e=t[c]=a?Rr(t[c]):zr(t[c]);null!=e.key&&g.set(e.key,c)}let v,y=0;const w=d-f+1;let b=!1,k=0;const x=new Array(w);for(c=0;c<w;c++)x[c]=0;for(c=h;c<=p;c++){const r=e[c];if(y>=w){D(r,l,i,!0);continue}let u;if(null!=r.key)u=g.get(r.key);else for(v=f;v<=d;v++)if(0===x[v-f]&&br(r,t[v])){u=v;break}void 0===u?D(r,l,i,!0):(x[u-f]=c+1,u>=k?k=u:b=!0,m(r,t[u],n,null,l,i,o,s,a),y++)}const _=b?function(e){const t=e.slice(),n=[0];let r,l,i,o,s;const a=e.length;for(r=0;r<a;r++){const a=e[r];if(0!==a){if(l=n[n.length-1],e[l]<a){t[r]=l,n.push(r);continue}for(i=0,o=n.length-1;i<o;)s=i+o>>1,e[n[s]]<a?i=s+1:o=s;a<e[n[i]]&&(i>0&&(t[r]=n[i-1]),n[i]=r)}}i=n.length,o=n[i-1];for(;i-- >0;)n[i]=o,o=t[o];return n}(x):A;for(v=_.length-1,c=w-1;c>=0;c--){const e=f+c,p=t[e],d=e+1<u?t[e+1].el:r;0===x[c]?m(null,p,n,d,l,i,o,s,a):b&&(v<0||c!==_[v]?B(p,n,d,2):v--)}}},B=(e,t,r,l,i=null)=>{const{el:o,type:s,transition:a,children:c,shapeFlag:u}=e;if(6&u)return void B(e.component.subTree,t,r,l);if(128&u)return void e.suspense.move(t,r,l);if(64&u)return void s.move(e,t,r,K);if(s===sr){n(o,t,r);for(let e=0;e<c.length;e++)B(c[e],t,r,l);return void n(e.anchor,t,r)}if(s===ur)return void w(e,t,r);if(2!==l&&1&u&&a)if(0===l)a.beforeEnter(o),n(o,t,r),rr((()=>a.enter(o)),i);else{const{leave:e,delayLeave:l,afterLeave:i}=a,s=()=>n(o,t,r),c=()=>{e(o,(()=>{s(),i&&i()}))};l?l(o,s,c):c()}else n(o,t,r)},D=(e,t,n,r=!1,l=!1)=>{const{type:i,props:o,ref:s,children:a,dynamicChildren:c,shapeFlag:u,patchFlag:p,dirs:d}=e;if(null!=s&&nr(s,null,n,e,!0),256&u)return void t.ctx.deactivate(e);const h=1&u&&d,f=!Sn(e);let m;if(f&&(m=o&&o.onVnodeBeforeUnmount)&&Lr(m,t,e),6&u)q(e.component,n,r);else{if(128&u)return void e.suspense.unmount(n,r);h&&Ln(e,null,t,"beforeUnmount"),64&u?e.type.remove(e,t,n,l,K,r):c&&(i!==sr||p>0&&64&p)?Z(c,t,n,!1,!0):(i===sr&&384&p||!l&&16&u)&&Z(a,t,n),r&&H(e)}(f&&(m=o&&o.onVnodeUnmounted)||h)&&rr((()=>{m&&Lr(m,t,e),h&&Ln(e,null,t,"unmounted")}),n)},H=e=>{const{type:t,el:n,anchor:l,transition:i}=e;if(t===sr)return void W(n,l);if(t===ur)return void b(e);const o=()=>{r(n),i&&!i.persisted&&i.afterLeave&&i.afterLeave()};if(1&e.shapeFlag&&i&&!i.persisted){const{leave:t,delayLeave:r}=i,l=()=>t(n,o);r?r(e.el,o,l):l()}else o()},W=(e,t)=>{let n;for(;e!==t;)n=p(e),r(e),e=n;r(t)},q=(e,t,n)=>{const{bum:r,scope:l,update:i,subTree:o,um:s}=e;r&&ce(r),l.stop(),i&&(i.active=!1,D(o,e,t,n)),s&&rr(s,t),rr((()=>{e.isUnmounted=!0}),t),t&&t.pendingBranch&&!t.isUnmounted&&e.asyncDep&&!e.asyncResolved&&e.suspenseId===t.pendingId&&(t.deps--,0===t.deps&&t.resolve())},Z=(e,t,n,r=!1,l=!1,i=0)=>{for(let o=i;o<e.length;o++)D(e[o],t,n,r,l)},G=e=>6&e.shapeFlag?G(e.component.subTree):128&e.shapeFlag?e.suspense.next():p(e.anchor||e.el),J=(e,t,n)=>{null==e?t._vnode&&D(t._vnode,null,null,!0):m(t._vnode||null,e,t,null,null,null,n),rn(),ln(),t._vnode=e},K={p:m,um:D,m:B,r:H,mt:O,mc:$,pc:P,pbc:S,n:G,o:e};let Y,X;t&&([Y,X]=t(K));return{render:J,hydrate:Y,createApp:tr(J,Y)}}(e)}function ir({effect:e,update:t},n){e.allowRecurse=t.allowRecurse=n}function or(e,t,n=!1){const r=e.children,l=t.children;if(V(r)&&V(l))for(let e=0;e<r.length;e++){const t=r[e];let i=l[e];1&i.shapeFlag&&!i.dynamicChildren&&((i.patchFlag<=0||32===i.patchFlag)&&(i=l[e]=Rr(l[e]),i.el=t.el),n||or(t,i))}}const sr=Symbol(void 0),ar=Symbol(void 0),cr=Symbol(void 0),ur=Symbol(void 0),pr=[];let dr=null;function hr(e=!1){pr.push(dr=e?null:[])}let fr=1;function mr(e){fr+=e}function gr(e){return e.dynamicChildren=fr>0?dr||A:null,pr.pop(),dr=pr[pr.length-1]||null,fr>0&&dr&&dr.push(e),e}function vr(e,t,n,r,l,i){return gr($r(e,t,n,r,l,i,!0))}function yr(e,t,n,r,l){return gr(Cr(e,t,n,r,l,!0))}function wr(e){return!!e&&!0===e.__v_isVNode}function br(e,t){return e.type===t.type&&e.key===t.key}const kr="__vInternal",xr=({key:e})=>null!=e?e:null,_r=({ref:e,ref_key:t,ref_for:n})=>null!=e?q(e)||Lt(e)||W(e)?{i:dn,r:e,k:t,f:!!n}:e:null;function $r(e,t=null,n=null,r=0,l=null,i=(e===sr?0:1),o=!1,s=!1){const a={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&xr(t),ref:t&&_r(t),scopeId:hn,slotScopeIds:null,children:n,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetAnchor:null,staticCount:0,shapeFlag:i,patchFlag:r,dynamicProps:l,dynamicChildren:null,appContext:null};return s?(Ar(a,n),128&i&&e.normalize(a)):n&&(a.shapeFlag|=q(n)?8:16),fr>0&&!o&&dr&&(a.patchFlag>0||6&i)&&32!==a.patchFlag&&dr.push(a),a}const Cr=function(e,t=null,n=null,r=0,l=null,i=!1){e&&e!==jn||(e=cr);if(wr(e)){const r=Sr(e,t,!0);return n&&Ar(r,n),fr>0&&!i&&dr&&(6&r.shapeFlag?dr[dr.indexOf(e)]=r:dr.push(r)),r.patchFlag|=-2,r}o=e,W(o)&&"__vccOpts"in o&&(e=e.__vccOpts);var o;if(t){t=function(e){return e?Ct(e)||kr in e?M({},e):e:null}(t);let{class:e,style:n}=t;e&&!q(e)&&(t.class=C(e)),G(n)&&(Ct(n)&&!V(n)&&(n=M({},n)),t.style=k(n))}const s=q(e)?1:(e=>e.__isSuspense)(e)?128:(e=>e.__isTeleport)(e)?64:G(e)?4:W(e)?2:0;return $r(e,t,n,r,l,s,i,!0)};function Sr(e,t,n=!1){const{props:r,ref:l,patchFlag:i,children:o}=e,s=t?function(...e){const t={};for(let n=0;n<e.length;n++){const r=e[n];for(const e in r)if("class"===e)t.class!==r.class&&(t.class=C([t.class,r.class]));else if("style"===e)t.style=k([t.style,r.style]);else if(T(e)){const n=t[e],l=r[e];!l||n===l||V(n)&&n.includes(l)||(t[e]=n?[].concat(n,l):l)}else""!==e&&(t[e]=r[e])}return t}(r||{},t):r;return{__v_isVNode:!0,__v_skip:!0,type:e.type,props:s,key:s&&xr(s),ref:t&&t.ref?n&&l?V(l)?l.concat(_r(t)):[l,_r(t)]:_r(t):l,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:o,target:e.target,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==sr?-1===i?16:16|i:i,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:e.transition,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&Sr(e.ssContent),ssFallback:e.ssFallback&&Sr(e.ssFallback),el:e.el,anchor:e.anchor}}function Ir(e=" ",t=0){return Cr(ar,null,e,t)}function Er(e="",t=!1){return t?(hr(),yr(cr,null,e)):Cr(cr,null,e)}function zr(e){return null==e||"boolean"==typeof e?Cr(cr):V(e)?Cr(sr,null,e.slice()):"object"==typeof e?Rr(e):Cr(ar,null,String(e))}function Rr(e){return null===e.el||e.memo?e:Sr(e)}function Ar(e,t){let n=0;const{shapeFlag:r}=e;if(null==t)t=null;else if(V(t))n=16;else if("object"==typeof t){if(65&r){const n=t.default;return void(n&&(n._c&&(n._d=!1),Ar(e,n()),n._c&&(n._d=!0)))}{n=32;const r=t._;r||kr in t?3===r&&dn&&(1===dn.slots._?t._=1:(t._=2,e.patchFlag|=1024)):t._ctx=dn}}else W(t)?(t={default:t,_ctx:dn},n=32):(t=String(t),64&r?(n=16,t=[Ir(t)]):n=8);e.children=t,e.shapeFlag|=n}function Lr(e,t,n,r=null){Dt(e,t,7,[n,r])}const Or=Xn();let jr=0;let Tr=null;const Ur=e=>{Tr=e,e.scope.on()},Mr=()=>{Tr&&Tr.scope.off(),Tr=null};function Pr(e){return 4&e.vnode.shapeFlag}let Nr=!1;function Fr(e,t,n){W(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:G(t)&&(e.setupState=Nt(t)),Vr(e,n)}function Vr(e,t,n){const r=e.type;e.render||(e.render=r.render||L)}function Br(e){if(e.exposed)return e.exposeProxy||(e.exposeProxy=new Proxy(Nt(It(e.exposed)),{get:(t,n)=>n in t?t[n]:n in Pn?Pn[n](e):void 0}))}const Dr=(e,t)=>function(e,t,n=!1){let r,l;const i=W(e);return i?(r=e,l=L):(r=e.get,l=e.set),new Vt(r,l,i||!l,n)}(e,0,Nr);function Hr(e,t,n){const r=arguments.length;return 2===r?G(t)&&!V(t)?wr(t)?Cr(e,null,[t]):Cr(e,t):Cr(e,null,t):(r>3?n=Array.prototype.slice.call(arguments,2):3===r&&wr(n)&&(n=[n]),Cr(e,t,n))}const Wr="3.2.39",qr="undefined"!=typeof document?document:null,Zr=qr&&qr.createElement("template"),Gr={insert:(e,t,n)=>{t.insertBefore(e,n||null)},remove:e=>{const t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,n,r)=>{const l=t?qr.createElementNS("http://www.w3.org/2000/svg",e):qr.createElement(e,n?{is:n}:void 0);return"select"===e&&r&&null!=r.multiple&&l.setAttribute("multiple",r.multiple),l},createText:e=>qr.createTextNode(e),createComment:e=>qr.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>qr.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},cloneNode(e){const t=e.cloneNode(!0);return"_value"in e&&(t._value=e._value),t},insertStaticContent(e,t,n,r,l,i){const o=n?n.previousSibling:t.lastChild;if(l&&(l===i||l.nextSibling))for(;t.insertBefore(l.cloneNode(!0),n),l!==i&&(l=l.nextSibling););else{Zr.innerHTML=r?`<svg>${e}</svg>`:e;const l=Zr.content;if(r){const e=l.firstChild;for(;e.firstChild;)l.appendChild(e.firstChild);l.removeChild(e)}t.insertBefore(l,n)}return[o?o.nextSibling:t.firstChild,n?n.previousSibling:t.lastChild]}};const Qr=/\s*!important$/;function Jr(e,t,n){if(V(n))n.forEach((n=>Jr(e,t,n)));else if(null==n&&(n=""),t.startsWith("--"))e.setProperty(t,n);else{const r=function(e,t){const n=Yr[t];if(n)return n;let r=re(t);if("filter"!==r&&r in e)return Yr[t]=r;r=oe(r);for(let n=0;n<Kr.length;n++){const l=Kr[n]+r;if(l in e)return Yr[t]=l}return t}(e,t);Qr.test(n)?e.setProperty(ie(r),n.replace(Qr,""),"important"):e[r]=n}}const Kr=["Webkit","Moz","ms"],Yr={};const Xr="http://www.w3.org/1999/xlink";const[el,tl]=(()=>{let e=Date.now,t=!1;if("undefined"!=typeof window){Date.now()>document.createEvent("Event").timeStamp&&(e=performance.now.bind(performance));const n=navigator.userAgent.match(/firefox\/(\d+)/i);t=!!(n&&Number(n[1])<=53)}return[e,t]})();let nl=0;const rl=Promise.resolve(),ll=()=>{nl=0};function il(e,t,n,r){e.addEventListener(t,n,r)}function ol(e,t,n,r,l=null){const i=e._vei||(e._vei={}),o=i[t];if(r&&o)o.value=r;else{const[n,s]=function(e){let t;if(sl.test(e)){let n;for(t={};n=e.match(sl);)e=e.slice(0,e.length-n[0].length),t[n[0].toLowerCase()]=!0}return[":"===e[2]?e.slice(3):ie(e.slice(2)),t]}(t);if(r){const o=i[t]=function(e,t){const n=e=>{const r=e.timeStamp||el();(tl||r>=n.attached-1)&&Dt(function(e,t){if(V(t)){const n=e.stopImmediatePropagation;return e.stopImmediatePropagation=()=>{n.call(e),e._stopped=!0},t.map((e=>t=>!t._stopped&&e&&e(t)))}return t}(e,n.value),t,5,[e])};return n.value=e,n.attached=(()=>nl||(rl.then(ll),nl=el()))(),n}(r,l);il(e,n,o,s)}else o&&(!function(e,t,n,r){e.removeEventListener(t,n,r)}(e,n,o,s),i[t]=void 0)}}const sl=/(?:Once|Passive|Capture)$/;const al=/^on[a-z]/;const cl=e=>{const t=e.props["onUpdate:modelValue"]||!1;return V(t)?e=>ce(t,e):t};function ul(e){e.target.composing=!0}function pl(e){const t=e.target;t.composing&&(t.composing=!1,t.dispatchEvent(new Event("input")))}const dl={created(e,{modifiers:{lazy:t,trim:n,number:r}},l){e._assign=cl(l);const i=r||l.props&&"number"===l.props.type;il(e,t?"change":"input",(t=>{if(t.target.composing)return;let r=e.value;n&&(r=r.trim()),i&&(r=pe(r)),e._assign(r)})),n&&il(e,"change",(()=>{e.value=e.value.trim()})),t||(il(e,"compositionstart",ul),il(e,"compositionend",pl),il(e,"change",pl))},mounted(e,{value:t}){e.value=null==t?"":t},beforeUpdate(e,{value:t,modifiers:{lazy:n,trim:r,number:l}},i){if(e._assign=cl(i),e.composing)return;if(document.activeElement===e&&"range"!==e.type){if(n)return;if(r&&e.value.trim()===t)return;if((l||"number"===e.type)&&pe(e.value)===t)return}const o=null==t?"":t;e.value!==o&&(e.value=o)}},hl={deep:!0,created(e,t,n){e._assign=cl(n),il(e,"change",(()=>{const t=e._modelValue,n=yl(e),r=e.checked,l=e._assign;if(V(t)){const e=I(t,n),i=-1!==e;if(r&&!i)l(t.concat(n));else if(!r&&i){const n=[...t];n.splice(e,1),l(n)}}else if(D(t)){const e=new Set(t);r?e.add(n):e.delete(n),l(e)}else l(wl(e,r))}))},mounted:fl,beforeUpdate(e,t,n){e._assign=cl(n),fl(e,t,n)}};function fl(e,{value:t,oldValue:n},r){e._modelValue=t,V(t)?e.checked=I(t,r.props.value)>-1:D(t)?e.checked=t.has(r.props.value):t!==n&&(e.checked=S(t,wl(e,!0)))}const ml={created(e,{value:t},n){e.checked=S(t,n.props.value),e._assign=cl(n),il(e,"change",(()=>{e._assign(yl(e))}))},beforeUpdate(e,{value:t,oldValue:n},r){e._assign=cl(r),t!==n&&(e.checked=S(t,r.props.value))}},gl={deep:!0,created(e,{value:t,modifiers:{number:n}},r){const l=D(t);il(e,"change",(()=>{const t=Array.prototype.filter.call(e.options,(e=>e.selected)).map((e=>n?pe(yl(e)):yl(e)));e._assign(e.multiple?l?new Set(t):t:t[0])})),e._assign=cl(r)},mounted(e,{value:t}){vl(e,t)},beforeUpdate(e,t,n){e._assign=cl(n)},updated(e,{value:t}){vl(e,t)}};function vl(e,t){const n=e.multiple;if(!n||V(t)||D(t)){for(let r=0,l=e.options.length;r<l;r++){const l=e.options[r],i=yl(l);if(n)V(t)?l.selected=I(t,i)>-1:l.selected=t.has(i);else if(S(yl(l),t))return void(e.selectedIndex!==r&&(e.selectedIndex=r))}n||-1===e.selectedIndex||(e.selectedIndex=-1)}}function yl(e){return"_value"in e?e._value:e.value}function wl(e,t){const n=t?"_trueValue":"_falseValue";return n in e?e[n]:t}const bl={created(e,t,n){kl(e,t,n,null,"created")},mounted(e,t,n){kl(e,t,n,null,"mounted")},beforeUpdate(e,t,n,r){kl(e,t,n,r,"beforeUpdate")},updated(e,t,n,r){kl(e,t,n,r,"updated")}};function kl(e,t,n,r,l){const i=function(e,t){switch(e){case"SELECT":return gl;case"TEXTAREA":return dl;default:switch(t){case"checkbox":return hl;case"radio":return ml;default:return dl}}}(e.tagName,n.props&&n.props.type)[l];i&&i(e,t,n,r)}const xl={beforeMount(e,{value:t},{transition:n}){e._vod="none"===e.style.display?"":e.style.display,n&&t?n.beforeEnter(e):_l(e,t)},mounted(e,{value:t},{transition:n}){n&&t&&n.enter(e)},updated(e,{value:t,oldValue:n},{transition:r}){!t!=!n&&(r?t?(r.beforeEnter(e),_l(e,!0),r.enter(e)):r.leave(e,(()=>{_l(e,!1)})):_l(e,t))},beforeUnmount(e,{value:t}){_l(e,t)}};function _l(e,t){e.style.display=t?e._vod:"none"}const $l=M({patchProp:(e,t,n,r,l=!1,i,o,s,a)=>{"class"===t?function(e,t,n){const r=e._vtc;r&&(t=(t?[t,...r]:[...r]).join(" ")),null==t?e.removeAttribute("class"):n?e.setAttribute("class",t):e.className=t}(e,r,l):"style"===t?function(e,t,n){const r=e.style,l=q(n);if(n&&!l){for(const e in n)Jr(r,e,n[e]);if(t&&!q(t))for(const e in t)null==n[e]&&Jr(r,e,"")}else{const i=r.display;l?t!==n&&(r.cssText=n):t&&e.removeAttribute("style"),"_vod"in e&&(r.display=i)}}(e,n,r):T(t)?U(t)||ol(e,t,0,r,o):("."===t[0]?(t=t.slice(1),1):"^"===t[0]?(t=t.slice(1),0):function(e,t,n,r){if(r)return"innerHTML"===t||"textContent"===t||!!(t in e&&al.test(t)&&W(n));if("spellcheck"===t||"draggable"===t||"translate"===t)return!1;if("form"===t)return!1;if("list"===t&&"INPUT"===e.tagName)return!1;if("type"===t&&"TEXTAREA"===e.tagName)return!1;if(al.test(t)&&q(n))return!1;return t in e}(e,t,r,l))?function(e,t,n,r,l,i,o){if("innerHTML"===t||"textContent"===t)return r&&o(r,l,i),void(e[t]=null==n?"":n);if("value"===t&&"PROGRESS"!==e.tagName&&!e.tagName.includes("-")){e._value=n;const r=null==n?"":n;return e.value===r&&"OPTION"!==e.tagName||(e.value=r),void(null==n&&e.removeAttribute(t))}let s=!1;if(""===n||null==n){const r=typeof e[t];"boolean"===r?n=b(n):null==n&&"string"===r?(n="",s=!0):"number"===r&&(n=0,s=!0)}try{e[t]=n}catch(e){}s&&e.removeAttribute(t)}(e,t,r,i,o,s,a):("true-value"===t?e._trueValue=r:"false-value"===t&&(e._falseValue=r),function(e,t,n,r,l){if(r&&t.startsWith("xlink:"))null==n?e.removeAttributeNS(Xr,t.slice(6,t.length)):e.setAttributeNS(Xr,t,n);else{const r=w(t);null==n||r&&!b(n)?e.removeAttribute(t):e.setAttribute(t,r?"":n)}}(e,t,r,l))}},Gr);let Cl;const Sl=(...e)=>{const t=(Cl||(Cl=lr($l))).createApp(...e),{mount:n}=t;return t.mount=e=>{const r=function(e){if(q(e)){return document.querySelector(e)}return e}(e);if(!r)return;const l=t._component;W(l)||l.render||l.template||(l.template=r.innerHTML),r.innerHTML="";const i=n(r,!1,r instanceof SVGElement);return r instanceof Element&&(r.removeAttribute("v-cloak"),r.setAttribute("data-v-app","")),i},t};var Il;const El="undefined"!=typeof window,zl=()=>{};function Rl(e){return"function"==typeof e?e():Mt(e)}function Al(e,t){return function(...n){e((()=>t.apply(this,n)),{fn:t,thisArg:this,args:n})}}El&&(null==(Il=null==window?void 0:window.navigator)?void 0:Il.userAgent)&&/iP(ad|hone|od)/.test(window.navigator.userAgent);const Ll=e=>e();function Ol(e){return!!he&&(function(e){he&&he.cleanups.push(e)}(e),!0)}function jl(e,t=200,n={}){return Al(function(e,t={}){let n,r;return l=>{const i=Rl(e),o=Rl(t.maxWait);if(n&&clearTimeout(n),i<=0||void 0!==o&&o<=0)return r&&(clearTimeout(r),r=null),l();o&&!r&&(r=setTimeout((()=>{n&&clearTimeout(n),r=null,l()}),o)),n=setTimeout((()=>{r&&clearTimeout(r),r=null,l()}),i)}}(t,n),e)}function Tl(e,t=!0){Tr||dn?En(e):t?e():en(e)}var Ul=Object.getOwnPropertySymbols,Ml=Object.prototype.hasOwnProperty,Pl=Object.prototype.propertyIsEnumerable;function Nl(e,t,n={}){const r=n,{eventFilter:l=Ll}=r,i=((e,t)=>{var n={};for(var r in e)Ml.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&Ul)for(var r of Ul(e))t.indexOf(r)<0&&Pl.call(e,r)&&(n[r]=e[r]);return n})(r,["eventFilter"]);return xn(e,Al(l,t),i)}var Fl=Object.defineProperty,Vl=Object.defineProperties,Bl=Object.getOwnPropertyDescriptors,Dl=Object.getOwnPropertySymbols,Hl=Object.prototype.hasOwnProperty,Wl=Object.prototype.propertyIsEnumerable,ql=(e,t,n)=>t in e?Fl(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;function Zl(e,t,n={}){const r=n,{eventFilter:l}=r,i=((e,t)=>{var n={};for(var r in e)Hl.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&Dl)for(var r of Dl(e))t.indexOf(r)<0&&Wl.call(e,r)&&(n[r]=e[r]);return n})(r,["eventFilter"]),{eventFilter:o,pause:s,resume:a,isActive:c}=function(e=Ll){const t=Ot(!0);return{isActive:t,pause:function(){t.value=!1},resume:function(){t.value=!0},eventFilter:(...n)=>{t.value&&e(...n)}}}(l),u=Nl(e,t,(p=((e,t)=>{for(var n in t||(t={}))Hl.call(t,n)&&ql(e,n,t[n]);if(Dl)for(var n of Dl(t))Wl.call(t,n)&&ql(e,n,t[n]);return e})({},i),Vl(p,Bl({eventFilter:o}))));var p;return{stop:u,pause:s,resume:a,isActive:c}}const Gl=El?window:void 0,Ql=El?window.document:void 0;function Jl(...e){let t,n,r,l;if("string"==typeof e[0]?([n,r,l]=e,t=Gl):[t,n,r,l]=e,!t)return zl;let i=zl;const o=xn((()=>function(e){var t;const n=Rl(e);return null!=(t=null==n?void 0:n.$el)?t:n}(t)),(e=>{i(),e&&(e.addEventListener(n,r,l),i=()=>{e.removeEventListener(n,r,l),i=zl})}),{immediate:!0,flush:"post"}),s=()=>{o(),i()};return Ol(s),s}El&&window.navigator,El&&window.location;const Kl="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},Yl="__vueuse_ssr_handlers__";Kl[Yl]=Kl[Yl]||{};const Xl=Kl[Yl];var ei=Object.defineProperty,ti=Object.getOwnPropertySymbols,ni=Object.prototype.hasOwnProperty,ri=Object.prototype.propertyIsEnumerable,li=(e,t,n)=>t in e?ei(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,ii=(e,t)=>{for(var n in t||(t={}))ni.call(t,n)&&li(e,n,t[n]);if(ti)for(var n of ti(t))ri.call(t,n)&&li(e,n,t[n]);return e};const oi={boolean:{read:e=>"true"===e,write:e=>String(e)},object:{read:e=>JSON.parse(e),write:e=>JSON.stringify(e)},number:{read:e=>Number.parseFloat(e),write:e=>String(e)},any:{read:e=>e,write:e=>String(e)},string:{read:e=>e,write:e=>String(e)},map:{read:e=>new Map(JSON.parse(e)),write:e=>JSON.stringify(Array.from(e.entries()))},set:{read:e=>new Set(JSON.parse(e)),write:e=>JSON.stringify(Array.from(e))},date:{read:e=>new Date(e),write:e=>e.toISOString()}};function si(e,t,n,r={}){var l;const{flush:i="pre",deep:o=!0,listenToStorageChanges:s=!0,writeDefaults:a=!0,mergeDefaults:c=!1,shallow:u,window:p=Gl,eventFilter:d,onError:h=(e=>{console.error(e)})}=r,f=(u?jt:Ot)(t);if(!n)try{n=function(e,t){return Xl[e]||t}("getDefaultStorage",(()=>{var e;return null==(e=Gl)?void 0:e.localStorage}))()}catch(e){h(e)}if(!n)return f;const m=Rl(t),g=function(e){return null==e?"any":e instanceof Set?"set":e instanceof Map?"map":e instanceof Date?"date":"boolean"==typeof e?"boolean":"string"==typeof e?"string":"object"==typeof e||Array.isArray(e)?"object":Number.isNaN(e)?"any":"number"}(m),v=null!=(l=r.serializer)?l:oi[g],{pause:y,resume:w}=Zl(f,(()=>function(t){try{null==t?n.removeItem(e):n.setItem(e,v.write(t))}catch(e){h(e)}}(f.value)),{flush:i,deep:o,eventFilter:d});return p&&s&&Jl(p,"storage",b),b(),f;function b(t){t&&t.key!==e||(f.value=function(t){if(!t||t.key===e){y();try{const r=t?t.newValue:n.getItem(e);if(null==r)return a&&null!==m&&n.setItem(e,v.write(m)),m;if(!t&&c){const e=v.read(r);return"function"==typeof c?c(e,m):"object"!==g||Array.isArray(e)?e:ii(ii({},m),e)}return"string"!=typeof r?r:v.read(r)}catch(e){h(e)}finally{w()}}}(t))}}var ai,ci,ui=Object.defineProperty,pi=Object.getOwnPropertySymbols,di=Object.prototype.hasOwnProperty,hi=Object.prototype.propertyIsEnumerable,fi=(e,t,n)=>t in e?ui(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;function mi(e={}){const{controls:t=!1,interval:n="requestAnimationFrame"}=e,r=Ot(new Date),l=()=>r.value=new Date,i="requestAnimationFrame"===n?function(e,t={}){const{immediate:n=!0,window:r=Gl}=t,l=Ot(!1);let i=null;function o(){l.value&&r&&(e(),i=r.requestAnimationFrame(o))}function s(){!l.value&&r&&(l.value=!0,o())}function a(){l.value=!1,null!=i&&r&&(r.cancelAnimationFrame(i),i=null)}return n&&s(),Ol(a),{isActive:l,pause:a,resume:s}}(l,{immediate:!0}):function(e,t=1e3,n={}){const{immediate:r=!0,immediateCallback:l=!1}=n;let i=null;const o=Ot(!1);function s(){i&&(clearInterval(i),i=null)}function a(){o.value=!1,s()}function c(){Mt(t)<=0||(o.value=!0,l&&e(),s(),i=setInterval(e,Rl(t)))}r&&El&&c(),Lt(t)&&Ol(xn(t,(()=>{o.value&&El&&c()})));return Ol(a),{isActive:o,pause:a,resume:c}}(l,n,{immediate:!0});return t?((e,t)=>{for(var n in t||(t={}))di.call(t,n)&&fi(e,n,t[n]);if(pi)for(var n of pi(t))hi.call(t,n)&&fi(e,n,t[n]);return e})({now:r},i):r}(ci=ai||(ai={})).UP="UP",ci.RIGHT="RIGHT",ci.DOWN="DOWN",ci.LEFT="LEFT",ci.NONE="NONE";let gi=0;var vi=Object.defineProperty,yi=Object.getOwnPropertySymbols,wi=Object.prototype.hasOwnProperty,bi=Object.prototype.propertyIsEnumerable,ki=(e,t,n)=>t in e?vi(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;((e,t)=>{for(var n in t||(t={}))wi.call(t,n)&&ki(e,n,t[n]);if(yi)for(var n of yi(t))bi.call(t,n)&&ki(e,n,t[n])})({linear:function(e){return e}},{easeInSine:[.12,0,.39,0],easeOutSine:[.61,1,.88,1],easeInOutSine:[.37,0,.63,1],easeInQuad:[.11,0,.5,0],easeOutQuad:[.5,1,.89,1],easeInOutQuad:[.45,0,.55,1],easeInCubic:[.32,0,.67,0],easeOutCubic:[.33,1,.68,1],easeInOutCubic:[.65,0,.35,1],easeInQuart:[.5,0,.75,0],easeOutQuart:[.25,1,.5,1],easeInOutQuart:[.76,0,.24,1],easeInQuint:[.64,0,.78,0],easeOutQuint:[.22,1,.36,1],easeInOutQuint:[.83,0,.17,1],easeInExpo:[.7,0,.84,0],easeOutExpo:[.16,1,.3,1],easeInOutExpo:[.87,0,.13,1],easeInCirc:[.55,0,1,.45],easeOutCirc:[0,.55,.45,1],easeInOutCirc:[.85,0,.15,1],easeInBack:[.36,0,.66,-.56],easeOutBack:[.34,1.56,.64,1],easeInOutBack:[.68,-.6,.32,1.6]});const xi=e=>{try{e=decodeURI(e)}catch(e){}return e},_i=(e="")=>e.replace(/\/$/u,""),$i=e=>/^(https?:)?\/\//.test(e),Ci=e=>{const t=_i(e);return $i(t)?t:`https://${t}`},Si=e=>Array.isArray(e)?e:!!e&&[0,e],Ii=(e,t)=>"function"==typeof e?e:!1!==e&&t,Ei="{--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}",zi=(e,t)=>{let n=e.toString();for(;n.length<t;)n="0"+n;return n},Ri=(e,t,n)=>{if(!e)return"";const r="string"==typeof e?new Date(-1!==e.indexOf(" ")?e.replace(/-/g,"/"):e):e,l=t.getTime()-r.getTime(),i=Math.floor(l/864e5);if(0===i){const e=l%864e5,t=Math.floor(e/36e5);if(0===t){const t=e%36e5,r=Math.floor(t/6e4);if(0===r){const e=t%6e4;return`${Math.round(e/1e3)} ${n.seconds}`}return`${r} ${n.minutes}`}return`${t} ${n.hours}`}return i<0?n.now:i<8?`${i} ${n.days}`:(e=>{const t=zi(e.getDate(),2),n=zi(e.getMonth()+1,2);return`${zi(e.getFullYear(),2)}-${n}-${t}`})(r)},Ai=e=>{const t=si("WALINE_EMOJI",{}),n=Boolean(/@[0-9]+\.[0-9]+\.[0-9]+/.test(e));if(n){const n=t.value[e];if(n)return Promise.resolve(n)}return fetch(`${e}/info.json`).then((e=>e.json())).then((r=>{const l={folder:e,...r};return n&&(t.value[e]=l),l}))},Li=(e,t="",n="",r="")=>`${t?`${t}/`:""}${n}${e}${r?`.${r}`:""}`,Oi=e=>{"AbortError"!==e.name&&console.error(e.message)},ji={"Content-Type":"application/json"},Ti=(e,t="")=>{if("object"==typeof e&&e.errno)throw new TypeError(`Fetch ${t} failed with ${e.errno}: ${e.errmsg}`);return e},Ui=({serverURL:e,lang:t,token:n,objectId:r,...l})=>fetch(`${e}/comment/${r}?lang=${t}`,{method:"PUT",headers:{"Content-Type":"application/json",Authorization:`Bearer ${n}`},body:JSON.stringify(l)}).then((e=>e.json())),Mi=({serverURL:e,lang:t,paths:n,signal:r})=>fetch(`${e}/article?path=${encodeURIComponent(n.join(","))}&lang=${t}`,{signal:r}).then((e=>e.json())).then((e=>Ti(e,"visit count"))).then((e=>Array.isArray(e)?e:[e])),Pi=({serverURL:e,lang:t,path:n})=>fetch(`${e}/article?lang=${t}`,{method:"POST",headers:ji,body:JSON.stringify({path:n})}).then((e=>e.json())).then((e=>Ti(e,"visit count"))),Ni=e=>e instanceof HTMLElement?e:"string"==typeof e?document.querySelector(e):null,Fi=e=>e.type.includes("image"),Vi=e=>{const t=Array.from(e).find(Fi);return t?t.getAsFile():null};function Bi(){return{async:!1,baseUrl:null,breaks:!1,extensions:null,gfm:!0,headerIds:!0,headerPrefix:"",highlight:null,langPrefix:"language-",mangle:!0,pedantic:!1,renderer:null,sanitize:!1,sanitizer:null,silent:!1,smartLists:!1,smartypants:!1,tokenizer:null,walkTokens:null,xhtml:!1}}let Di={async:!1,baseUrl:null,breaks:!1,extensions:null,gfm:!0,headerIds:!0,headerPrefix:"",highlight:null,langPrefix:"language-",mangle:!0,pedantic:!1,renderer:null,sanitize:!1,sanitizer:null,silent:!1,smartLists:!1,smartypants:!1,tokenizer:null,walkTokens:null,xhtml:!1};const Hi=/[&<>"']/,Wi=/[&<>"']/g,qi=/[<>"']|&(?!#?\w+;)/,Zi=/[<>"']|&(?!#?\w+;)/g,Gi={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},Qi=e=>Gi[e];function Ji(e,t){if(t){if(Hi.test(e))return e.replace(Wi,Qi)}else if(qi.test(e))return e.replace(Zi,Qi);return e}const Ki=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/gi;function Yi(e){return e.replace(Ki,((e,t)=>"colon"===(t=t.toLowerCase())?":":"#"===t.charAt(0)?"x"===t.charAt(1)?String.fromCharCode(parseInt(t.substring(2),16)):String.fromCharCode(+t.substring(1)):""))}const Xi=/(^|[^\[])\^/g;function eo(e,t){e="string"==typeof e?e:e.source,t=t||"";const n={replace:(t,r)=>(r=(r=r.source||r).replace(Xi,"$1"),e=e.replace(t,r),n),getRegex:()=>new RegExp(e,t)};return n}const to=/[^\w:]/g,no=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function ro(e,t,n){if(e){let e;try{e=decodeURIComponent(Yi(n)).replace(to,"").toLowerCase()}catch(e){return null}if(0===e.indexOf("javascript:")||0===e.indexOf("vbscript:")||0===e.indexOf("data:"))return null}t&&!no.test(n)&&(n=function(e,t){lo[" "+e]||(io.test(e)?lo[" "+e]=e+"/":lo[" "+e]=po(e,"/",!0));const n=-1===(e=lo[" "+e]).indexOf(":");return"//"===t.substring(0,2)?n?t:e.replace(oo,"$1")+t:"/"===t.charAt(0)?n?t:e.replace(so,"$1")+t:e+t}(t,n));try{n=encodeURI(n).replace(/%25/g,"%")}catch(e){return null}return n}const lo={},io=/^[^:]+:\/*[^/]*$/,oo=/^([^:]+:)[\s\S]*$/,so=/^([^:]+:\/*[^/]*)[\s\S]*$/;const ao={exec:function(){}};function co(e){let t,n,r=1;for(;r<arguments.length;r++)for(n in t=arguments[r],t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e}function uo(e,t){const n=e.replace(/\|/g,((e,t,n)=>{let r=!1,l=t;for(;--l>=0&&"\\"===n[l];)r=!r;return r?"|":" |"})).split(/ \|/);let r=0;if(n[0].trim()||n.shift(),n.length>0&&!n[n.length-1].trim()&&n.pop(),n.length>t)n.splice(t);else for(;n.length<t;)n.push("");for(;r<n.length;r++)n[r]=n[r].trim().replace(/\\\|/g,"|");return n}function po(e,t,n){const r=e.length;if(0===r)return"";let l=0;for(;l<r;){const i=e.charAt(r-l-1);if(i!==t||n){if(i===t||!n)break;l++}else l++}return e.slice(0,r-l)}function ho(e){e&&e.sanitize&&!e.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 fo(e,t){if(t<1)return"";let n="";for(;t>1;)1&t&&(n+=e),t>>=1,e+=e;return n+e}function mo(e,t,n,r){const l=t.href,i=t.title?Ji(t.title):null,o=e[1].replace(/\\([\[\]])/g,"$1");if("!"!==e[0].charAt(0)){r.state.inLink=!0;const e={type:"link",raw:n,href:l,title:i,text:o,tokens:r.inlineTokens(o)};return r.state.inLink=!1,e}return{type:"image",raw:n,href:l,title:i,text:Ji(o)}}class go{constructor(e){this.options=e||Di}space(e){const t=this.rules.block.newline.exec(e);if(t&&t[0].length>0)return{type:"space",raw:t[0]}}code(e){const t=this.rules.block.code.exec(e);if(t){const e=t[0].replace(/^ {1,4}/gm,"");return{type:"code",raw:t[0],codeBlockStyle:"indented",text:this.options.pedantic?e:po(e,"\n")}}}fences(e){const t=this.rules.block.fences.exec(e);if(t){const e=t[0],n=function(e,t){const n=e.match(/^(\s+)(?:```)/);if(null===n)return t;const r=n[1];return t.split("\n").map((e=>{const t=e.match(/^\s+/);if(null===t)return e;const[n]=t;return n.length>=r.length?e.slice(r.length):e})).join("\n")}(e,t[3]||"");return{type:"code",raw:e,lang:t[2]?t[2].trim():t[2],text:n}}}heading(e){const t=this.rules.block.heading.exec(e);if(t){let e=t[2].trim();if(/#$/.test(e)){const t=po(e,"#");this.options.pedantic?e=t.trim():t&&!/ $/.test(t)||(e=t.trim())}return{type:"heading",raw:t[0],depth:t[1].length,text:e,tokens:this.lexer.inline(e)}}}hr(e){const t=this.rules.block.hr.exec(e);if(t)return{type:"hr",raw:t[0]}}blockquote(e){const t=this.rules.block.blockquote.exec(e);if(t){const e=t[0].replace(/^ *>[ \t]?/gm,"");return{type:"blockquote",raw:t[0],tokens:this.lexer.blockTokens(e,[]),text:e}}}list(e){let t=this.rules.block.list.exec(e);if(t){let n,r,l,i,o,s,a,c,u,p,d,h,f=t[1].trim();const m=f.length>1,g={type:"list",raw:"",ordered:m,start:m?+f.slice(0,-1):"",loose:!1,items:[]};f=m?`\\d{1,9}\\${f.slice(-1)}`:`\\${f}`,this.options.pedantic&&(f=m?f:"[*+-]");const v=new RegExp(`^( {0,3}${f})((?:[\t ][^\\n]*)?(?:\\n|$))`);for(;e&&(h=!1,t=v.exec(e))&&!this.rules.block.hr.test(e);){if(n=t[0],e=e.substring(n.length),c=t[2].split("\n",1)[0],u=e.split("\n",1)[0],this.options.pedantic?(i=2,d=c.trimLeft()):(i=t[2].search(/[^ ]/),i=i>4?1:i,d=c.slice(i),i+=t[1].length),s=!1,!c&&/^ *$/.test(u)&&(n+=u+"\n",e=e.substring(u.length+1),h=!0),!h){const t=new RegExp(`^ {0,${Math.min(3,i-1)}}(?:[*+-]|\\d{1,9}[.)])((?: [^\\n]*)?(?:\\n|$))`),r=new RegExp(`^ {0,${Math.min(3,i-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),l=new RegExp(`^ {0,${Math.min(3,i-1)}}(?:\`\`\`|~~~)`),o=new RegExp(`^ {0,${Math.min(3,i-1)}}#`);for(;e&&(p=e.split("\n",1)[0],c=p,this.options.pedantic&&(c=c.replace(/^ {1,4}(?=( {4})*[^ ])/g," ")),!l.test(c))&&!o.test(c)&&!t.test(c)&&!r.test(e);){if(c.search(/[^ ]/)>=i||!c.trim())d+="\n"+c.slice(i);else{if(s)break;d+="\n"+c}s||c.trim()||(s=!0),n+=p+"\n",e=e.substring(p.length+1)}}g.loose||(a?g.loose=!0:/\n *\n *$/.test(n)&&(a=!0)),this.options.gfm&&(r=/^\[[ xX]\] /.exec(d),r&&(l="[ ] "!==r[0],d=d.replace(/^\[[ xX]\] +/,""))),g.items.push({type:"list_item",raw:n,task:!!r,checked:l,loose:!1,text:d}),g.raw+=n}g.items[g.items.length-1].raw=n.trimRight(),g.items[g.items.length-1].text=d.trimRight(),g.raw=g.raw.trimRight();const y=g.items.length;for(o=0;o<y;o++){this.lexer.state.top=!1,g.items[o].tokens=this.lexer.blockTokens(g.items[o].text,[]);const e=g.items[o].tokens.filter((e=>"space"===e.type)),t=e.every((e=>{const t=e.raw.split("");let n=0;for(const e of t)if("\n"===e&&(n+=1),n>1)return!0;return!1}));!g.loose&&e.length&&t&&(g.loose=!0,g.items[o].loose=!0)}return g}}html(e){const t=this.rules.block.html.exec(e);if(t){const e={type:"html",raw:t[0],pre:!this.options.sanitizer&&("pre"===t[1]||"script"===t[1]||"style"===t[1]),text:t[0]};if(this.options.sanitize){const n=this.options.sanitizer?this.options.sanitizer(t[0]):Ji(t[0]);e.type="paragraph",e.text=n,e.tokens=this.lexer.inline(n)}return e}}def(e){const t=this.rules.block.def.exec(e);if(t){t[3]&&(t[3]=t[3].substring(1,t[3].length-1));return{type:"def",tag:t[1].toLowerCase().replace(/\s+/g," "),raw:t[0],href:t[2],title:t[3]}}}table(e){const t=this.rules.block.table.exec(e);if(t){const e={type:"table",header:uo(t[1]).map((e=>({text:e}))),align:t[2].replace(/^ *|\| *$/g,"").split(/ *\| */),rows:t[3]&&t[3].trim()?t[3].replace(/\n[ \t]*$/,"").split("\n"):[]};if(e.header.length===e.align.length){e.raw=t[0];let n,r,l,i,o=e.align.length;for(n=0;n<o;n++)/^ *-+: *$/.test(e.align[n])?e.align[n]="right":/^ *:-+: *$/.test(e.align[n])?e.align[n]="center":/^ *:-+ *$/.test(e.align[n])?e.align[n]="left":e.align[n]=null;for(o=e.rows.length,n=0;n<o;n++)e.rows[n]=uo(e.rows[n],e.header.length).map((e=>({text:e})));for(o=e.header.length,r=0;r<o;r++)e.header[r].tokens=this.lexer.inline(e.header[r].text);for(o=e.rows.length,r=0;r<o;r++)for(i=e.rows[r],l=0;l<i.length;l++)i[l].tokens=this.lexer.inline(i[l].text);return e}}}lheading(e){const t=this.rules.block.lheading.exec(e);if(t)return{type:"heading",raw:t[0],depth:"="===t[2].charAt(0)?1:2,text:t[1],tokens:this.lexer.inline(t[1])}}paragraph(e){const t=this.rules.block.paragraph.exec(e);if(t){const e="\n"===t[1].charAt(t[1].length-1)?t[1].slice(0,-1):t[1];return{type:"paragraph",raw:t[0],text:e,tokens:this.lexer.inline(e)}}}text(e){const t=this.rules.block.text.exec(e);if(t)return{type:"text",raw:t[0],text:t[0],tokens:this.lexer.inline(t[0])}}escape(e){const t=this.rules.inline.escape.exec(e);if(t)return{type:"escape",raw:t[0],text:Ji(t[1])}}tag(e){const t=this.rules.inline.tag.exec(e);if(t)return!this.lexer.state.inLink&&/^<a /i.test(t[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&/^<\/a>/i.test(t[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&/^<(pre|code|kbd|script)(\s|>)/i.test(t[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(t[0])&&(this.lexer.state.inRawBlock=!1),{type:this.options.sanitize?"text":"html",raw:t[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(t[0]):Ji(t[0]):t[0]}}link(e){const t=this.rules.inline.link.exec(e);if(t){const e=t[2].trim();if(!this.options.pedantic&&/^</.test(e)){if(!/>$/.test(e))return;const t=po(e.slice(0,-1),"\\");if((e.length-t.length)%2==0)return}else{const e=function(e,t){if(-1===e.indexOf(t[1]))return-1;const n=e.length;let r=0,l=0;for(;l<n;l++)if("\\"===e[l])l++;else if(e[l]===t[0])r++;else if(e[l]===t[1]&&(r--,r<0))return l;return-1}(t[2],"()");if(e>-1){const n=(0===t[0].indexOf("!")?5:4)+t[1].length+e;t[2]=t[2].substring(0,e),t[0]=t[0].substring(0,n).trim(),t[3]=""}}let n=t[2],r="";if(this.options.pedantic){const e=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(n);e&&(n=e[1],r=e[3])}else r=t[3]?t[3].slice(1,-1):"";return n=n.trim(),/^</.test(n)&&(n=this.options.pedantic&&!/>$/.test(e)?n.slice(1):n.slice(1,-1)),mo(t,{href:n?n.replace(this.rules.inline._escapes,"$1"):n,title:r?r.replace(this.rules.inline._escapes,"$1"):r},t[0],this.lexer)}}reflink(e,t){let n;if((n=this.rules.inline.reflink.exec(e))||(n=this.rules.inline.nolink.exec(e))){let e=(n[2]||n[1]).replace(/\s+/g," ");if(e=t[e.toLowerCase()],!e||!e.href){const e=n[0].charAt(0);return{type:"text",raw:e,text:e}}return mo(n,e,n[0],this.lexer)}}emStrong(e,t,n=""){let r=this.rules.inline.emStrong.lDelim.exec(e);if(!r)return;if(r[3]&&n.match(/[\p{L}\p{N}]/u))return;const l=r[1]||r[2]||"";if(!l||l&&(""===n||this.rules.inline.punctuation.exec(n))){const n=r[0].length-1;let l,i,o=n,s=0;const a="*"===r[0][0]?this.rules.inline.emStrong.rDelimAst:this.rules.inline.emStrong.rDelimUnd;for(a.lastIndex=0,t=t.slice(-1*e.length+n);null!=(r=a.exec(t));){if(l=r[1]||r[2]||r[3]||r[4]||r[5]||r[6],!l)continue;if(i=l.length,r[3]||r[4]){o+=i;continue}if((r[5]||r[6])&&n%3&&!((n+i)%3)){s+=i;continue}if(o-=i,o>0)continue;if(i=Math.min(i,i+o+s),Math.min(n,i)%2){const t=e.slice(1,n+r.index+i);return{type:"em",raw:e.slice(0,n+r.index+i+1),text:t,tokens:this.lexer.inlineTokens(t)}}const t=e.slice(2,n+r.index+i-1);return{type:"strong",raw:e.slice(0,n+r.index+i+1),text:t,tokens:this.lexer.inlineTokens(t)}}}}codespan(e){const t=this.rules.inline.code.exec(e);if(t){let e=t[2].replace(/\n/g," ");const n=/[^ ]/.test(e),r=/^ /.test(e)&&/ $/.test(e);return n&&r&&(e=e.substring(1,e.length-1)),e=Ji(e,!0),{type:"codespan",raw:t[0],text:e}}}br(e){const t=this.rules.inline.br.exec(e);if(t)return{type:"br",raw:t[0]}}del(e){const t=this.rules.inline.del.exec(e);if(t)return{type:"del",raw:t[0],text:t[2],tokens:this.lexer.inlineTokens(t[2])}}autolink(e,t){const n=this.rules.inline.autolink.exec(e);if(n){let e,r;return"@"===n[2]?(e=Ji(this.options.mangle?t(n[1]):n[1]),r="mailto:"+e):(e=Ji(n[1]),r=e),{type:"link",raw:n[0],text:e,href:r,tokens:[{type:"text",raw:e,text:e}]}}}url(e,t){let n;if(n=this.rules.inline.url.exec(e)){let e,r;if("@"===n[2])e=Ji(this.options.mangle?t(n[0]):n[0]),r="mailto:"+e;else{let t;do{t=n[0],n[0]=this.rules.inline._backpedal.exec(n[0])[0]}while(t!==n[0]);e=Ji(n[0]),r="www."===n[1]?"http://"+e:e}return{type:"link",raw:n[0],text:e,href:r,tokens:[{type:"text",raw:e,text:e}]}}}inlineText(e,t){const n=this.rules.inline.text.exec(e);if(n){let e;return e=this.lexer.state.inRawBlock?this.options.sanitize?this.options.sanitizer?this.options.sanitizer(n[0]):Ji(n[0]):n[0]:Ji(this.options.smartypants?t(n[0]):n[0]),{type:"text",raw:n[0],text:e}}}}const vo={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>]+)>?(?:(?: +(?:\n *)?| *\n *)(title))? *(?:\n+|$)/,table:ao,lheading:/^([^\n]+)\n {0,3}(=+|-+) *(?:\n+|$)/,_paragraph:/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,text:/^[^\n]+/,_label:/(?!\s*\])(?:\\.|[^\[\]\\])+/,_title:/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/};vo.def=eo(vo.def).replace("label",vo._label).replace("title",vo._title).getRegex(),vo.bullet=/(?:[*+-]|\d{1,9}[.)])/,vo.listItemStart=eo(/^( *)(bull) */).replace("bull",vo.bullet).getRegex(),vo.list=eo(vo.list).replace(/bull/g,vo.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+vo.def.source+")").getRegex(),vo._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",vo._comment=/<!--(?!-?>)[\s\S]*?(?:-->|$)/,vo.html=eo(vo.html,"i").replace("comment",vo._comment).replace("tag",vo._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),vo.paragraph=eo(vo._paragraph).replace("hr",vo.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",vo._tag).getRegex(),vo.blockquote=eo(vo.blockquote).replace("paragraph",vo.paragraph).getRegex(),vo.normal=co({},vo),vo.gfm=co({},vo.normal,{table:"^ *([^\\n ].*\\|.*)\\n {0,3}(?:\\| *)?(:?-+:? *(?:\\| *:?-+:? *)*)(?:\\| *)?(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)"}),vo.gfm.table=eo(vo.gfm.table).replace("hr",vo.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",vo._tag).getRegex(),vo.gfm.paragraph=eo(vo._paragraph).replace("hr",vo.hr).replace("heading"," {0,3}#{1,6} ").replace("|lheading","").replace("table",vo.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",vo._tag).getRegex(),vo.pedantic=co({},vo.normal,{html:eo("^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:\"[^\"]*\"|'[^']*'|\\s[^'\"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))").replace("comment",vo._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:ao,paragraph:eo(vo.normal._paragraph).replace("hr",vo.hr).replace("heading"," *#{1,6} *[^\n]").replace("lheading",vo.lheading).replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").getRegex()});const yo={escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:ao,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:ao,text:/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,punctuation:/^([\spunctuation])/};function wo(e){return e.replace(/---/g,"—").replace(/--/g,"–").replace(/(^|[-\u2014/(\[{"\s])'/g,"$1‘").replace(/'/g,"’").replace(/(^|[-\u2014/(\[{\u2018\s])"/g,"$1“").replace(/"/g,"”").replace(/\.{3}/g,"…")}function bo(e){let t,n,r="";const l=e.length;for(t=0;t<l;t++)n=e.charCodeAt(t),Math.random()>.5&&(n="x"+n.toString(16)),r+="&#"+n+";";return r}yo._punctuation="!\"#$%&'()+\\-.,/:;<=>?@\\[\\]`^{|}~",yo.punctuation=eo(yo.punctuation).replace(/punctuation/g,yo._punctuation).getRegex(),yo.blockSkip=/\[[^\]]*?\]\([^\)]*?\)|`[^`]*?`|<[^>]*?>/g,yo.escapedEmSt=/\\\*|\\_/g,yo._comment=eo(vo._comment).replace("(?:--\x3e|$)","--\x3e").getRegex(),yo.emStrong.lDelim=eo(yo.emStrong.lDelim).replace(/punct/g,yo._punctuation).getRegex(),yo.emStrong.rDelimAst=eo(yo.emStrong.rDelimAst,"g").replace(/punct/g,yo._punctuation).getRegex(),yo.emStrong.rDelimUnd=eo(yo.emStrong.rDelimUnd,"g").replace(/punct/g,yo._punctuation).getRegex(),yo._escapes=/\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g,yo._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/,yo._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])?)+(?![-_])/,yo.autolink=eo(yo.autolink).replace("scheme",yo._scheme).replace("email",yo._email).getRegex(),yo._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/,yo.tag=eo(yo.tag).replace("comment",yo._comment).replace("attribute",yo._attribute).getRegex(),yo._label=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,yo._href=/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/,yo._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/,yo.link=eo(yo.link).replace("label",yo._label).replace("href",yo._href).replace("title",yo._title).getRegex(),yo.reflink=eo(yo.reflink).replace("label",yo._label).replace("ref",vo._label).getRegex(),yo.nolink=eo(yo.nolink).replace("ref",vo._label).getRegex(),yo.reflinkSearch=eo(yo.reflinkSearch,"g").replace("reflink",yo.reflink).replace("nolink",yo.nolink).getRegex(),yo.normal=co({},yo),yo.pedantic=co({},yo.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:eo(/^!?\[(label)\]\((.*?)\)/).replace("label",yo._label).getRegex(),reflink:eo(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",yo._label).getRegex()}),yo.gfm=co({},yo.normal,{escape:eo(yo.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.!#$%&'*+\/=?_`{\|}~-]+@)))/}),yo.gfm.url=eo(yo.gfm.url,"i").replace("email",yo.gfm._extended_email).getRegex(),yo.breaks=co({},yo.gfm,{br:eo(yo.br).replace("{2,}","*").getRegex(),text:eo(yo.gfm.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()});class ko{constructor(e){this.tokens=[],this.tokens.links=Object.create(null),this.options=e||Di,this.options.tokenizer=this.options.tokenizer||new go,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 t={block:vo.normal,inline:yo.normal};this.options.pedantic?(t.block=vo.pedantic,t.inline=yo.pedantic):this.options.gfm&&(t.block=vo.gfm,this.options.breaks?t.inline=yo.breaks:t.inline=yo.gfm),this.tokenizer.rules=t}static get rules(){return{block:vo,inline:yo}}static lex(e,t){return new ko(t).lex(e)}static lexInline(e,t){return new ko(t).inlineTokens(e)}lex(e){let t;for(e=e.replace(/\r\n|\r/g,"\n"),this.blockTokens(e,this.tokens);t=this.inlineQueue.shift();)this.inlineTokens(t.src,t.tokens);return this.tokens}blockTokens(e,t=[]){let n,r,l,i;for(e=this.options.pedantic?e.replace(/\t/g," ").replace(/^ +$/gm,""):e.replace(/^( *)(\t+)/gm,((e,t,n)=>t+" ".repeat(n.length)));e;)if(!(this.options.extensions&&this.options.extensions.block&&this.options.extensions.block.some((r=>!!(n=r.call({lexer:this},e,t))&&(e=e.substring(n.raw.length),t.push(n),!0)))))if(n=this.tokenizer.space(e))e=e.substring(n.raw.length),1===n.raw.length&&t.length>0?t[t.length-1].raw+="\n":t.push(n);else if(n=this.tokenizer.code(e))e=e.substring(n.raw.length),r=t[t.length-1],!r||"paragraph"!==r.type&&"text"!==r.type?t.push(n):(r.raw+="\n"+n.raw,r.text+="\n"+n.text,this.inlineQueue[this.inlineQueue.length-1].src=r.text);else if(n=this.tokenizer.fences(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.heading(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.hr(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.blockquote(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.list(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.html(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.def(e))e=e.substring(n.raw.length),r=t[t.length-1],!r||"paragraph"!==r.type&&"text"!==r.type?this.tokens.links[n.tag]||(this.tokens.links[n.tag]={href:n.href,title:n.title}):(r.raw+="\n"+n.raw,r.text+="\n"+n.raw,this.inlineQueue[this.inlineQueue.length-1].src=r.text);else if(n=this.tokenizer.table(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.lheading(e))e=e.substring(n.raw.length),t.push(n);else{if(l=e,this.options.extensions&&this.options.extensions.startBlock){let t=1/0;const n=e.slice(1);let r;this.options.extensions.startBlock.forEach((function(e){r=e.call({lexer:this},n),"number"==typeof r&&r>=0&&(t=Math.min(t,r))})),t<1/0&&t>=0&&(l=e.substring(0,t+1))}if(this.state.top&&(n=this.tokenizer.paragraph(l)))r=t[t.length-1],i&&"paragraph"===r.type?(r.raw+="\n"+n.raw,r.text+="\n"+n.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=r.text):t.push(n),i=l.length!==e.length,e=e.substring(n.raw.length);else if(n=this.tokenizer.text(e))e=e.substring(n.raw.length),r=t[t.length-1],r&&"text"===r.type?(r.raw+="\n"+n.raw,r.text+="\n"+n.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=r.text):t.push(n);else if(e){const t="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(t);break}throw new Error(t)}}return this.state.top=!0,t}inline(e,t=[]){return this.inlineQueue.push({src:e,tokens:t}),t}inlineTokens(e,t=[]){let n,r,l,i,o,s,a=e;if(this.tokens.links){const e=Object.keys(this.tokens.links);if(e.length>0)for(;null!=(i=this.tokenizer.rules.inline.reflinkSearch.exec(a));)e.includes(i[0].slice(i[0].lastIndexOf("[")+1,-1))&&(a=a.slice(0,i.index)+"["+fo("a",i[0].length-2)+"]"+a.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;null!=(i=this.tokenizer.rules.inline.blockSkip.exec(a));)a=a.slice(0,i.index)+"["+fo("a",i[0].length-2)+"]"+a.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;null!=(i=this.tokenizer.rules.inline.escapedEmSt.exec(a));)a=a.slice(0,i.index)+"++"+a.slice(this.tokenizer.rules.inline.escapedEmSt.lastIndex);for(;e;)if(o||(s=""),o=!1,!(this.options.extensions&&this.options.extensions.inline&&this.options.extensions.inline.some((r=>!!(n=r.call({lexer:this},e,t))&&(e=e.substring(n.raw.length),t.push(n),!0)))))if(n=this.tokenizer.escape(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.tag(e))e=e.substring(n.raw.length),r=t[t.length-1],r&&"text"===n.type&&"text"===r.type?(r.raw+=n.raw,r.text+=n.text):t.push(n);else if(n=this.tokenizer.link(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.reflink(e,this.tokens.links))e=e.substring(n.raw.length),r=t[t.length-1],r&&"text"===n.type&&"text"===r.type?(r.raw+=n.raw,r.text+=n.text):t.push(n);else if(n=this.tokenizer.emStrong(e,a,s))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.codespan(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.br(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.del(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.autolink(e,bo))e=e.substring(n.raw.length),t.push(n);else if(this.state.inLink||!(n=this.tokenizer.url(e,bo))){if(l=e,this.options.extensions&&this.options.extensions.startInline){let t=1/0;const n=e.slice(1);let r;this.options.extensions.startInline.forEach((function(e){r=e.call({lexer:this},n),"number"==typeof r&&r>=0&&(t=Math.min(t,r))})),t<1/0&&t>=0&&(l=e.substring(0,t+1))}if(n=this.tokenizer.inlineText(l,wo))e=e.substring(n.raw.length),"_"!==n.raw.slice(-1)&&(s=n.raw.slice(-1)),o=!0,r=t[t.length-1],r&&"text"===r.type?(r.raw+=n.raw,r.text+=n.text):t.push(n);else if(e){const t="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(t);break}throw new Error(t)}}else e=e.substring(n.raw.length),t.push(n);return t}}class xo{constructor(e){this.options=e||Di}code(e,t,n){const r=(t||"").match(/\S*/)[0];if(this.options.highlight){const t=this.options.highlight(e,r);null!=t&&t!==e&&(n=!0,e=t)}return e=e.replace(/\n$/,"")+"\n",r?'<pre><code class="'+this.options.langPrefix+Ji(r,!0)+'">'+(n?e:Ji(e,!0))+"</code></pre>\n":"<pre><code>"+(n?e:Ji(e,!0))+"</code></pre>\n"}blockquote(e){return`<blockquote>\n${e}</blockquote>\n`}html(e){return e}heading(e,t,n,r){if(this.options.headerIds){return`<h${t} id="${this.options.headerPrefix+r.slug(n)}">${e}</h${t}>\n`}return`<h${t}>${e}</h${t}>\n`}hr(){return this.options.xhtml?"<hr/>\n":"<hr>\n"}list(e,t,n){const r=t?"ol":"ul";return"<"+r+(t&&1!==n?' start="'+n+'"':"")+">\n"+e+"</"+r+">\n"}listitem(e){return`<li>${e}</li>\n`}checkbox(e){return"<input "+(e?'checked="" ':"")+'disabled="" type="checkbox"'+(this.options.xhtml?" /":"")+"> "}paragraph(e){return`<p>${e}</p>\n`}table(e,t){return t&&(t=`<tbody>${t}</tbody>`),"<table>\n<thead>\n"+e+"</thead>\n"+t+"</table>\n"}tablerow(e){return`<tr>\n${e}</tr>\n`}tablecell(e,t){const n=t.header?"th":"td";return(t.align?`<${n} align="${t.align}">`:`<${n}>`)+e+`</${n}>\n`}strong(e){return`<strong>${e}</strong>`}em(e){return`<em>${e}</em>`}codespan(e){return`<code>${e}</code>`}br(){return this.options.xhtml?"<br/>":"<br>"}del(e){return`<del>${e}</del>`}link(e,t,n){if(null===(e=ro(this.options.sanitize,this.options.baseUrl,e)))return n;let r='<a href="'+Ji(e)+'"';return t&&(r+=' title="'+t+'"'),r+=">"+n+"</a>",r}image(e,t,n){if(null===(e=ro(this.options.sanitize,this.options.baseUrl,e)))return n;let r=`<img src="${e}" alt="${n}"`;return t&&(r+=` title="${t}"`),r+=this.options.xhtml?"/>":">",r}text(e){return e}}class _o{strong(e){return e}em(e){return e}codespan(e){return e}del(e){return e}html(e){return e}text(e){return e}link(e,t,n){return""+n}image(e,t,n){return""+n}br(){return""}}class $o{constructor(){this.seen={}}serialize(e){return e.toLowerCase().trim().replace(/<[!\/a-z].*?>/gi,"").replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g,"").replace(/\s/g,"-")}getNextSafeSlug(e,t){let n=e,r=0;if(this.seen.hasOwnProperty(n)){r=this.seen[e];do{r++,n=e+"-"+r}while(this.seen.hasOwnProperty(n))}return t||(this.seen[e]=r,this.seen[n]=0),n}slug(e,t={}){const n=this.serialize(e);return this.getNextSafeSlug(n,t.dryrun)}}class Co{constructor(e){this.options=e||Di,this.options.renderer=this.options.renderer||new xo,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new _o,this.slugger=new $o}static parse(e,t){return new Co(t).parse(e)}static parseInline(e,t){return new Co(t).parseInline(e)}parse(e,t=!0){let n,r,l,i,o,s,a,c,u,p,d,h,f,m,g,v,y,w,b,k="";const x=e.length;for(n=0;n<x;n++)if(p=e[n],this.options.extensions&&this.options.extensions.renderers&&this.options.extensions.renderers[p.type]&&(b=this.options.extensions.renderers[p.type].call({parser:this},p),!1!==b||!["space","hr","heading","code","table","blockquote","list","html","paragraph","text"].includes(p.type)))k+=b||"";else switch(p.type){case"space":continue;case"hr":k+=this.renderer.hr();continue;case"heading":k+=this.renderer.heading(this.parseInline(p.tokens),p.depth,Yi(this.parseInline(p.tokens,this.textRenderer)),this.slugger);continue;case"code":k+=this.renderer.code(p.text,p.lang,p.escaped);continue;case"table":for(c="",a="",i=p.header.length,r=0;r<i;r++)a+=this.renderer.tablecell(this.parseInline(p.header[r].tokens),{header:!0,align:p.align[r]});for(c+=this.renderer.tablerow(a),u="",i=p.rows.length,r=0;r<i;r++){for(s=p.rows[r],a="",o=s.length,l=0;l<o;l++)a+=this.renderer.tablecell(this.parseInline(s[l].tokens),{header:!1,align:p.align[l]});u+=this.renderer.tablerow(a)}k+=this.renderer.table(c,u);continue;case"blockquote":u=this.parse(p.tokens),k+=this.renderer.blockquote(u);continue;case"list":for(d=p.ordered,h=p.start,f=p.loose,i=p.items.length,u="",r=0;r<i;r++)g=p.items[r],v=g.checked,y=g.task,m="",g.task&&(w=this.renderer.checkbox(v),f?g.tokens.length>0&&"paragraph"===g.tokens[0].type?(g.tokens[0].text=w+" "+g.tokens[0].text,g.tokens[0].tokens&&g.tokens[0].tokens.length>0&&"text"===g.tokens[0].tokens[0].type&&(g.tokens[0].tokens[0].text=w+" "+g.tokens[0].tokens[0].text)):g.tokens.unshift({type:"text",text:w}):m+=w),m+=this.parse(g.tokens,f),u+=this.renderer.listitem(m,y,v);k+=this.renderer.list(u,d,h);continue;case"html":k+=this.renderer.html(p.text);continue;case"paragraph":k+=this.renderer.paragraph(this.parseInline(p.tokens));continue;case"text":for(u=p.tokens?this.parseInline(p.tokens):p.text;n+1<x&&"text"===e[n+1].type;)p=e[++n],u+="\n"+(p.tokens?this.parseInline(p.tokens):p.text);k+=t?this.renderer.paragraph(u):u;continue;default:{const e='Token with "'+p.type+'" type was not found.';if(this.options.silent)return void console.error(e);throw new Error(e)}}return k}parseInline(e,t){t=t||this.renderer;let n,r,l,i="";const o=e.length;for(n=0;n<o;n++)if(r=e[n],this.options.extensions&&this.options.extensions.renderers&&this.options.extensions.renderers[r.type]&&(l=this.options.extensions.renderers[r.type].call({parser:this},r),!1!==l||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(r.type)))i+=l||"";else switch(r.type){case"escape":case"text":i+=t.text(r.text);break;case"html":i+=t.html(r.text);break;case"link":i+=t.link(r.href,r.title,this.parseInline(r.tokens,t));break;case"image":i+=t.image(r.href,r.title,r.text);break;case"strong":i+=t.strong(this.parseInline(r.tokens,t));break;case"em":i+=t.em(this.parseInline(r.tokens,t));break;case"codespan":i+=t.codespan(r.text);break;case"br":i+=t.br();break;case"del":i+=t.del(this.parseInline(r.tokens,t));break;default:{const e='Token with "'+r.type+'" type was not found.';if(this.options.silent)return void console.error(e);throw new Error(e)}}return i}}function So(e,t,n){if(null==e)throw new Error("marked(): input parameter is undefined or null");if("string"!=typeof e)throw new Error("marked(): input parameter is of type "+Object.prototype.toString.call(e)+", string expected");if("function"==typeof t&&(n=t,t=null),ho(t=co({},So.defaults,t||{})),n){const r=t.highlight;let l;try{l=ko.lex(e,t)}catch(e){return n(e)}const i=function(e){let i;if(!e)try{t.walkTokens&&So.walkTokens(l,t.walkTokens),i=Co.parse(l,t)}catch(t){e=t}return t.highlight=r,e?n(e):n(null,i)};if(!r||r.length<3)return i();if(delete t.highlight,!l.length)return i();let o=0;return So.walkTokens(l,(function(e){"code"===e.type&&(o++,setTimeout((()=>{r(e.text,e.lang,(function(t,n){if(t)return i(t);null!=n&&n!==e.text&&(e.text=n,e.escaped=!0),o--,0===o&&i()}))}),0))})),void(0===o&&i())}function r(e){if(e.message+="\nPlease report this to https://github.com/markedjs/marked.",t.silent)return"<p>An error occurred:</p><pre>"+Ji(e.message+"",!0)+"</pre>";throw e}try{const n=ko.lex(e,t);if(t.walkTokens){if(t.async)return Promise.all(So.walkTokens(n,t.walkTokens)).then((()=>Co.parse(n,t))).catch(r);So.walkTokens(n,t.walkTokens)}return Co.parse(n,t)}catch(e){r(e)}}So.options=So.setOptions=function(e){var t;return co(So.defaults,e),t=So.defaults,Di=t,So},So.getDefaults=Bi,So.defaults=Di,So.use=function(...e){const t=co({},...e),n=So.defaults.extensions||{renderers:{},childTokens:{}};let r;e.forEach((e=>{if(e.extensions&&(r=!0,e.extensions.forEach((e=>{if(!e.name)throw new Error("extension name required");if(e.renderer){const t=n.renderers?n.renderers[e.name]:null;n.renderers[e.name]=t?function(...n){let r=e.renderer.apply(this,n);return!1===r&&(r=t.apply(this,n)),r}:e.renderer}if(e.tokenizer){if(!e.level||"block"!==e.level&&"inline"!==e.level)throw new Error("extension level must be 'block' or 'inline'");n[e.level]?n[e.level].unshift(e.tokenizer):n[e.level]=[e.tokenizer],e.start&&("block"===e.level?n.startBlock?n.startBlock.push(e.start):n.startBlock=[e.start]:"inline"===e.level&&(n.startInline?n.startInline.push(e.start):n.startInline=[e.start]))}e.childTokens&&(n.childTokens[e.name]=e.childTokens)}))),e.renderer){const n=So.defaults.renderer||new xo;for(const t in e.renderer){const r=n[t];n[t]=(...l)=>{let i=e.renderer[t].apply(n,l);return!1===i&&(i=r.apply(n,l)),i}}t.renderer=n}if(e.tokenizer){const n=So.defaults.tokenizer||new go;for(const t in e.tokenizer){const r=n[t];n[t]=(...l)=>{let i=e.tokenizer[t].apply(n,l);return!1===i&&(i=r.apply(n,l)),i}}t.tokenizer=n}if(e.walkTokens){const n=So.defaults.walkTokens;t.walkTokens=function(t){let r=[];return r.push(e.walkTokens.call(this,t)),n&&(r=r.concat(n.call(this,t))),r}}r&&(t.extensions=n),So.setOptions(t)}))},So.walkTokens=function(e,t){let n=[];for(const r of e)switch(n=n.concat(t.call(So,r)),r.type){case"table":for(const e of r.header)n=n.concat(So.walkTokens(e.tokens,t));for(const e of r.rows)for(const r of e)n=n.concat(So.walkTokens(r.tokens,t));break;case"list":n=n.concat(So.walkTokens(r.items,t));break;default:So.defaults.extensions&&So.defaults.extensions.childTokens&&So.defaults.extensions.childTokens[r.type]?So.defaults.extensions.childTokens[r.type].forEach((function(e){n=n.concat(So.walkTokens(r[e],t))})):r.tokens&&(n=n.concat(So.walkTokens(r.tokens,t)))}return n},So.parseInline=function(e,t){if(null==e)throw new Error("marked.parseInline(): input parameter is undefined or null");if("string"!=typeof e)throw new Error("marked.parseInline(): input parameter is of type "+Object.prototype.toString.call(e)+", string expected");ho(t=co({},So.defaults,t||{}));try{const n=ko.lexInline(e,t);return t.walkTokens&&So.walkTokens(n,t.walkTokens),Co.parseInline(n,t)}catch(e){if(e.message+="\nPlease report this to https://github.com/markedjs/marked.",t.silent)return"<p>An error occurred:</p><pre>"+Ji(e.message+"",!0)+"</pre>";throw e}},So.Parser=Co,So.parser=Co.parse,So.Renderer=xo,So.TextRenderer=_o,So.Lexer=ko,So.lexer=ko.lex,So.Tokenizer=go,So.Slugger=$o,So.parse=So;const Io=/\$.*?\$/,Eo=/^\$(.*?)\$/,zo=/^(?:\s{0,3})\$\$((?:[^\n]|\n[^\n])+?)\n{0,1}\$\$/,Ro=(e="",t={})=>e.replace(/:(.+?):/g,((e,n)=>t[n]?`<img class="wl-emoji" src="${t[n]}" alt="${n}">`:e)),Ao=(e,{emojiMap:t,highlighter:n,texRenderer:r})=>{if(So.setOptions({highlight:n||void 0,breaks:!0,smartLists:!0,smartypants:!0}),r){const e=(e=>[{name:"blockMath",level:"block",tokenizer(t){const n=zo.exec(t);if(null!==n)return{type:"html",raw:n[0],text:e(!0,n[1])}}},{name:"inlineMath",level:"inline",start(e){const t=e.search(Io);return-1!==t?t:e.length},tokenizer(t){const n=Eo.exec(t);if(null!==n)return{type:"html",raw:n[0],text:e(!1,n[1])}}}])(r);So.use({extensions:e})}return So.parse(Ro(e,t))},Lo=e=>e.dataset.path||e.getAttribute("id");let Oo=null;const jo=()=>Oo||(Oo=si("WALINE_USER",{}));let To=null;const Uo=()=>To||(To=si("WALINE_LIKE",[])),Mo=({serverURL:e,path:t=window.location.pathname,selector:n=".waline-comment-count",lang:r="zh-CN"})=>{const l=new AbortController,i=document.querySelectorAll(n),o=jo();return i.length&&(({serverURL:e,lang:t,paths:n,signal:r,token:l})=>{const i={};return l&&(i.Authorization=`Bearer ${l}`),fetch(`${e}/comment?type=count&url=${encodeURIComponent(n.join(","))}&lang=${t}`,{signal:r,headers:i}).then((e=>e.json())).then((e=>Ti(e,"comment count"))).then((e=>Array.isArray(e)?e:[e]))})({serverURL:Ci(e),paths:Array.from(i).map((e=>xi(e.dataset.path||e.getAttribute("id")||t))),lang:r,signal:l.signal,token:o.value?.token}).then((e=>{i.forEach(((t,n)=>{t.innerText=e[n].toString()}))})).catch(Oi),l.abort.bind(l)};var Po,No,Fo="function"==typeof Map?new Map:(Po=[],No=[],{has:function(e){return Po.indexOf(e)>-1},get:function(e){return No[Po.indexOf(e)]},set:function(e,t){-1===Po.indexOf(e)&&(Po.push(e),No.push(t))},delete:function(e){var t=Po.indexOf(e);t>-1&&(Po.splice(t,1),No.splice(t,1))}}),Vo=function(e){return new Event(e,{bubbles:!0})};try{new Event("test")}catch(Po){Vo=function(e){var t=document.createEvent("Event");return t.initEvent(e,!0,!1),t}}function Bo(e){var t=Fo.get(e);t&&t.destroy()}function Do(e){var t=Fo.get(e);t&&t.update()}var Ho=null;"undefined"==typeof window||"function"!=typeof window.getComputedStyle?((Ho=function(e){return e}).destroy=function(e){return e},Ho.update=function(e){return e}):((Ho=function(e,t){return e&&Array.prototype.forEach.call(e.length?e:[e],(function(e){return function(e){if(e&&e.nodeName&&"TEXTAREA"===e.nodeName&&!Fo.has(e)){var t,n=null,r=null,l=null,i=function(){e.clientWidth!==r&&c()},o=function(t){window.removeEventListener("resize",i,!1),e.removeEventListener("input",c,!1),e.removeEventListener("keyup",c,!1),e.removeEventListener("autosize:destroy",o,!1),e.removeEventListener("autosize:update",c,!1),Object.keys(t).forEach((function(n){e.style[n]=t[n]})),Fo.delete(e)}.bind(e,{height:e.style.height,resize:e.style.resize,overflowY:e.style.overflowY,overflowX:e.style.overflowX,wordWrap:e.style.wordWrap});e.addEventListener("autosize:destroy",o,!1),"onpropertychange"in e&&"oninput"in e&&e.addEventListener("keyup",c,!1),window.addEventListener("resize",i,!1),e.addEventListener("input",c,!1),e.addEventListener("autosize:update",c,!1),e.style.overflowX="hidden",e.style.wordWrap="break-word",Fo.set(e,{destroy:o,update:c}),"vertical"===(t=window.getComputedStyle(e,null)).resize?e.style.resize="none":"both"===t.resize&&(e.style.resize="horizontal"),n="content-box"===t.boxSizing?-(parseFloat(t.paddingTop)+parseFloat(t.paddingBottom)):parseFloat(t.borderTopWidth)+parseFloat(t.borderBottomWidth),isNaN(n)&&(n=0),c()}function s(t){var n=e.style.width;e.style.width="0px",e.style.width=n,e.style.overflowY=t}function a(){if(0!==e.scrollHeight){var t=function(e){for(var t=[];e&&e.parentNode&&e.parentNode instanceof Element;)e.parentNode.scrollTop&&t.push({node:e.parentNode,scrollTop:e.parentNode.scrollTop}),e=e.parentNode;return t}(e),l=document.documentElement&&document.documentElement.scrollTop;e.style.height="",e.style.height=e.scrollHeight+n+"px",r=e.clientWidth,t.forEach((function(e){e.node.scrollTop=e.scrollTop})),l&&(document.documentElement.scrollTop=l)}}function c(){a();var t=Math.round(parseFloat(e.style.height)),n=window.getComputedStyle(e,null),r="content-box"===n.boxSizing?Math.round(parseFloat(n.height)):e.offsetHeight;if(r<t?"hidden"===n.overflowY&&(s("scroll"),a(),r="content-box"===n.boxSizing?Math.round(parseFloat(window.getComputedStyle(e,null).height)):e.offsetHeight):"hidden"!==n.overflowY&&(s("hidden"),a(),r="content-box"===n.boxSizing?Math.round(parseFloat(window.getComputedStyle(e,null).height)):e.offsetHeight),l!==r){l=r;var i=Vo("autosize:resized");try{e.dispatchEvent(i)}catch(e){}}}}(e)})),e}).destroy=function(e){return e&&Array.prototype.forEach.call(e.length?e:[e],Bo),e},Ho.update=function(e){return e&&Array.prototype.forEach.call(e.length?e:[e],Do),e});var Wo=Ho;const qo=({size:e})=>Hr("svg",{width:e,height:e,viewBox:"0 0 100 100",preserveAspectRatio:"xMidYMid"},Hr("circle",{cx:50,cy:50,fill:"none",stroke:"currentColor",strokeWidth:"4",r:"40","stroke-dasharray":"85 30"},Hr("animateTransform",{attributeName:"transform",type:"rotate",repeatCount:"indefinite",dur:"1s",values:"0 50 50;360 50 50",keyTimes:"0;1"})));var Zo=Cn({name:"ImageWall",components:{LoadingIcon:qo},props:{items:{type:Array,default:()=>[]},columnWidth:{type:Number,default:300},gap:{type:Number,default:0}},emits:["insert"],setup(e){let t=null;const n=Ot(null),r=Ot({}),l=Ot([]),i=()=>{const t=Math.floor((n.value.getBoundingClientRect().width+e.gap)/(e.columnWidth+e.gap));return t>0?t:1},o=async t=>{if(t>=e.items.length)return;await en();const r=Array.from(n.value?.children||[]).reduce(((e,t)=>t.getBoundingClientRect().height<e.getBoundingClientRect().height?t:e));l.value[Number(r.dataset.index)].push(t),await o(t+1)},s=async(e=!1)=>{if(l.value.length===i()&&!e)return;var t;l.value=(t=i(),new Array(t).fill(null).map((()=>[])));const n=window.scrollY;await o(0),window.scrollTo({top:n})};return xn((()=>[e.items]),(()=>{r.value={},s(!0)})),xn((()=>[e.columnWidth,e.gap]),(()=>s())),En((()=>{s(!0),t=new ResizeObserver((()=>s())),t.observe(n.value)})),zn((()=>t.unobserve(n.value))),{columns:l,state:r,wall:n}}}),Go=(e,t)=>{const n=e.__vccOpts||e;for(const[e,r]of t)n[e]=r;return n};const Qo=["data-index"],Jo=["src","title","onLoad","onClick"];var Ko=Cn({name:"CommentBox",components:{CloseIcon:({size:e})=>Hr("svg",{class:"wl-close-icon",viewBox:"0 0 1024 1024",width:e,height:e},[Hr("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"}),Hr("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"})]),EmojiIcon:()=>Hr("svg",{viewBox:"0 0 1024 1024",width:"24",height:"24"},Hr("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"})),ImageIcon:()=>Hr("svg",{viewBox:"0 0 1024 1024",width:"24",height:"24"},[Hr("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"}),Hr("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"})]),ImageWall:Go(Zo,[["render",function(e,t,n,r,l,i){const o=On("LoadingIcon");return hr(),vr("div",{ref:"wall",class:"wl-gallery",style:k({gap:`${e.gap}px`})},[(hr(!0),vr(sr,null,Un(e.columns,((t,n)=>(hr(),vr("div",{key:n,class:"wl-gallery-column","data-index":n,style:k({gap:`${e.gap}px`})},[(hr(!0),vr(sr,null,Un(t,(t=>(hr(),vr(sr,{key:t},[e.state[e.items[t].src]?Er("v-if",!0):(hr(),yr(o,{key:0,size:36,style:{margin:"20px auto"}})),$r("img",{class:"wl-gallery-item",src:e.items[t].src,title:e.items[t].title,loading:"lazy",onLoad:n=>e.state[e.items[t].src]=!0,onClick:n=>e.$emit("insert",`![](${e.items[t].src})`)},null,40,Jo)],64)))),128))],12,Qo)))),128))],4)}],["__file","ImageWall.vue"]]),MarkdownIcon:()=>Hr("svg",{width:"16",height:"16",ariaHidden:"true"},Hr("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"})),PreviewIcon:()=>Hr("svg",{viewBox:"0 0 1024 1024",width:"24",height:"24"},[Hr("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"}),Hr("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"})]),LoadingIcon:qo,GifIcon:()=>Hr("svg",{width:24,height:24,fill:"currentcolor",viewBox:"0 0 24 24"},[Hr("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"}),Hr("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"})])},props:{rootId:{type:String,default:""},replyId:{type:String,default:""},replyUser:{type:String,default:""},edit:{type:Object,default:null}},emits:["submit","cancel-reply","cancel-edit"],setup(e,{emit:t}){const n=wn("config"),r=si("WALINE_COMMENT_BOX_EDITOR",""),l=si("WALINE_USER_META",{nick:"",mail:"",link:""}),i=jo(),o=Ot({}),s=Ot(null),a=Ot(null),c=Ot(null),u=Ot(null),p=Ot(null),d=Ot(null),h=Ot(null),f=Ot({tabs:[],map:{}}),m=Ot(0),g=Ot(!1),v=Ot(!1),y=Ot(!1),w=Ot(""),b=Ot(0),k=wt({loading:!0,list:[]}),x=Ot(0),_=Ot(!1),$=Ot(""),C=Ot(!1),S=Dr((()=>n.value.locale)),I=Dr((()=>Boolean(i.value?.token))),E=Dr((()=>!1!==n.value.imageUploader)),z=e=>{const t=s.value,n=t.selectionStart,l=t.selectionEnd||0,i=t.scrollTop;r.value=t.value.substring(0,n)+e+t.value.substring(l,t.value.length),t.focus(),t.selectionStart=n+e.length,t.selectionEnd=n+e.length,t.scrollTop=i},R=e=>{const t=`![${n.value.locale.uploading} ${e.name}]()`;return z(t),Promise.resolve().then((()=>n.value.imageUploader(e))).then((n=>{r.value=r.value.replace(t,`\r\n![${e.name}](${n})`)})).catch((e=>{alert(e.message),r.value=r.value.replace(t,"")}))},A=()=>{const{serverURL:a,lang:c,login:u,wordLimit:p,requiredMeta:d}=n.value,h={comment:$.value,nick:l.value.nick,mail:l.value.mail,link:l.value.link,ua:navigator.userAgent,url:n.value.path};if(i.value?.token)h.nick=i.value.display_name,h.mail=i.value.email,h.link=i.value.url;else{if("force"===u)return;if(d.indexOf("nick")>-1&&!h.nick)return o.value.nick?.focus(),alert(S.value.nickError);if(d.indexOf("mail")>-1&&!h.mail||h.mail&&!/^\w(?:[\w._-]*\w)?@(?:\w(?:[\w-]*\w)?\.)*\w+$/.exec(h.mail))return o.value.mail?.focus(),alert(S.value.mailError);if(!h.comment)return void s.value?.focus();h.nick||(h.nick=S.value.anonymous)}if(!_.value)return alert(S.value.wordHint.replace("$0",p[0].toString()).replace("$1",p[1].toString()).replace("$2",b.value.toString()));h.comment=Ro(h.comment,f.value.map),e.replyId&&e.rootId?(h.pid=e.replyId,h.rid=e.rootId,h.at=e.replyUser):e.edit&&(h.eid=e.edit.objectId),C.value=!0,(({serverURL:e,lang:t,token:n,comment:r})=>{const l={"Content-Type":"application/json"};return n&&(l.Authorization=`Bearer ${n}`),r.eid?fetch(`${e}/comment/${r.eid}?lang=${t}`,{method:"PUT",headers:l,body:JSON.stringify(r)}).then((e=>e.json())):fetch(`${e}/comment?lang=${t}`,{method:"POST",headers:l,body:JSON.stringify(r)}).then((e=>e.json()))})({serverURL:a,lang:c,token:i.value?.token,comment:h}).then((n=>{if(C.value=!1,n.errmsg)return alert(n.errmsg);t("submit",n.data),r.value="",w.value="",e.replyId&&t("cancel-reply"),e.edit?.objectId&&t("cancel-edit")})).catch((e=>{C.value=!1,alert(e.message)}))},L=e=>{c.value.contains(e.target)||u.value.contains(e.target)||(g.value=!1),p.value.contains(e.target)||d.value.contains(e.target)||(v.value=!1)},O=async e=>{const{scrollTop:t,clientHeight:r,scrollHeight:l}=e.target,i=(r+t)/l,o=n.value.search,s=h.value?.value||"";i<.9||k.loading||(k.loading=!0,k.list.push(...o.more?await o.more(s,k.list.length):await o.search(s)),k.loading=!1,setTimeout((()=>{e.target.scrollTop=t}),50))},j=jl((e=>{k.list=[],O(e)}),300);xn([n,b],(([e,t])=>{const{wordLimit:n}=e;n?t<n[0]&&0!==n[0]?(x.value=n[0],_.value=!1):t>n[1]?(x.value=n[1],_.value=!1):(x.value=n[1],_.value=!0):(x.value=0,_.value=!0)}),{immediate:!0}),xn(v,(async e=>{if(!e)return;const t=n.value.search;h.value&&(h.value.value=""),k.loading=!0,k.list=t.default?await t.default():await t.search(""),k.loading=!1}));const T=({data:e})=>{e&&"profile"===e.type&&(i.value={...i.value,...e.data},[localStorage,sessionStorage].filter((e=>e.getItem("WALINE_USER"))).forEach((e=>e.setItem("WALINE_USER",JSON.stringify(i)))))};return En((()=>{document.body.addEventListener("click",L),window.addEventListener("message",T),e.edit?.objectId&&(r.value=e.edit.orig),xn((()=>r.value),(e=>{const{highlighter:t,texRenderer:r}=n.value;$.value=e,w.value=Ao(e,{emojiMap:f.value.map,highlighter:t,texRenderer:r}),b.value=(e=>(e=>e.match(/[\w\d\s\u00C0-\u024F]+/giu)||[])(e).reduce(((e,t)=>e+(""===t.trim()?0:t.trim().split(/\s+/u).length)),0)+(e=>e.match(/[\u4E00-\u9FA5]/gu)||[])(e).length)(e),e?Wo(s.value):Wo.destroy(s.value)}),{immediate:!0}),xn((()=>n.value.emoji),(e=>{return(t=Array.isArray(e)?e:[],Promise.all(t.map((e=>"string"==typeof e?Ai(_i(e)):Promise.resolve(e)))).then((e=>{const t={tabs:[],map:{}};return e.forEach((e=>{const{name:n,folder:r,icon:l,prefix:i,type:o,items:s}=e;t.tabs.push({name:n,icon:Li(l,r,i,o),items:s.map((e=>{const n=`${i||""}${e}`;return t.map[n]=Li(e,r,i,o),n}))})})),t}))).then((e=>{f.value=e}));var t}),{immediate:!0})})),Rn((()=>{document.body.removeEventListener("click",L),window.removeEventListener("message",T)})),{config:n,locale:S,insert:z,onChange:()=>{const e=a.value;e.files&&E.value&&R(e.files[0]).then((()=>{e.value=""}))},onDrop:e=>{if(e.dataTransfer?.items){const t=Vi(e.dataTransfer.items);t&&E.value&&(R(t),e.preventDefault())}},onKeyDown:e=>{const t=e.key;(e.ctrlKey||e.metaKey)&&"Enter"===t&&A()},onPaste:e=>{if(e.clipboardData){const t=Vi(e.clipboardData.items);t&&E.value&&R(t)}},onLogin:e=>{e.preventDefault();const{lang:t,serverURL:r}=n.value,l=(window.innerWidth-450)/2,o=(window.innerHeight-450)/2,s=window.open(`${r}/ui/login?lng=${encodeURIComponent(t)}`,"_blank",`width=450,height=450,left=${l},top=${o},scrollbars=no,resizable=no,status=no,location=no,toolbar=no,menubar=no`);s?.postMessage({type:"TOKEN",data:null},"*");const a=({data:e})=>{e&&"userInfo"===e.type&&e.data.token&&(s?.close(),i.value=e.data,(e.data.remember?localStorage:sessionStorage).setItem("WALINE_USER",JSON.stringify(e.data)),window.removeEventListener("message",a))};window.addEventListener("message",a)},onLogout:()=>{i.value={},localStorage.setItem("WALINE_USER","null"),sessionStorage.setItem("WALINE_USER","null")},onProfile:e=>{e.preventDefault();const{lang:t,serverURL:r}=n.value,l=(window.innerWidth-800)/2,o=(window.innerHeight-800)/2;window.open(`${r}/ui/profile?lng=${encodeURIComponent(t)}`,"_blank",`width=800,height=800,left=${l},top=${o},scrollbars=no,resizable=no,status=no,location=no,toolbar=no,menubar=no`)?.postMessage({type:"TOKEN",data:i.value.token},"*")},submitComment:A,onImageWallScroll:O,onGifSearch:j,isLogin:I,userInfo:i,isSubmitting:C,wordNumber:b,wordLimit:x,isWordNumberLegal:_,editor:r,userMeta:l,emoji:f,emojiTabIndex:m,showEmoji:g,gifData:k,showGif:v,canUploadImage:E,previewText:w,showPreview:y,inputRefs:o,editorRef:s,emojiButtonRef:c,emojiPopupRef:u,gifButtonRef:p,gifPopupRef:d,imageUploadRef:a,gifSearchInputRef:h}}});const Yo={class:"wl-comment"},Xo={key:0,class:"wl-login-info"},es={class:"wl-avatar"},ts=["title"],ns=["title"],rs=["src"],ls=["title","textContent"],is={class:"wl-panel"},os=["for","textContent"],ss=["id","onUpdate:modelValue","name","type"],as=["placeholder"],cs={class:"wl-preview"},us=$r("hr",null,null,-1),ps=["innerHTML"],ds={class:"wl-footer"},hs={class:"wl-actions"},fs={href:"https://guides.github.com/features/mastering-markdown/",title:"Markdown Guide","aria-label":"Markdown is supported",class:"wl-action",target:"_blank",rel:"noreferrer"},ms=["title"],gs=["title"],vs=["title"],ys=["title"],ws={class:"wl-info"},bs={class:"wl-text-number"},ks={key:0},xs=Ir("  /  "),_s=["textContent"],$s=["textContent"],Cs=["disabled"],Ss=["placeholder"],Is={key:0,class:"wl-loading"},Es={key:0,class:"wl-tab-wrapper"},zs=["title","onClick"],Rs=["src","alt"],As={key:0,class:"wl-tabs"},Ls=["onClick"],Os=["src","alt","title"],js=["title"];var Ts=Go(Ko,[["render",function(e,t,n,r,l,i){const o=On("CloseIcon"),s=On("MarkdownIcon"),a=On("EmojiIcon"),c=On("GifIcon"),u=On("ImageIcon"),p=On("PreviewIcon"),d=On("LoadingIcon"),h=On("ImageWall");return hr(),vr("div",Yo,["disable"!==e.config.login&&e.isLogin&&!e.edit?.objectId?(hr(),vr("div",Xo,[$r("div",es,[$r("button",{class:"wl-logout-btn",title:e.locale.logout,onClick:t[0]||(t[0]=(...t)=>e.onLogout&&e.onLogout(...t))},[Cr(o,{size:14})],8,ts),$r("a",{href:"#",class:"wl-login-nick","aria-label":"Profile",title:e.locale.profile,onClick:t[1]||(t[1]=(...t)=>e.onProfile&&e.onProfile(...t))},[$r("img",{src:e.userInfo.avatar,alt:"avatar"},null,8,rs)],8,ns)]),$r("a",{href:"#",class:"wl-login-nick","aria-label":"Profile",title:e.locale.profile,onClick:t[2]||(t[2]=(...t)=>e.onProfile&&e.onProfile(...t)),textContent:E(e.userInfo.display_name)},null,8,ls)])):Er("v-if",!0),$r("div",is,["force"!==e.config.login&&e.config.meta.length&&!e.isLogin?(hr(),vr("div",{key:0,class:C(["wl-header",`item${e.config.meta.length}`])},[(hr(!0),vr(sr,null,Un(e.config.meta,(t=>(hr(),vr("div",{key:t,class:"wl-header-item"},[$r("label",{for:t,textContent:E(e.locale[t]+(e.config.requiredMeta.includes(t)||!e.config.requiredMeta.length?"":`(${e.locale.optional})`))},null,8,os),An($r("input",{id:`wl-${t}`,ref_for:!0,ref:n=>{n&&(e.inputRefs[t]=n)},"onUpdate:modelValue":n=>e.userMeta[t]=n,class:C(["wl-input",`wl-${t}`]),name:t,type:"mail"===t?"email":"text"},null,10,ss),[[bl,e.userMeta[t]]])])))),128))],2)):Er("v-if",!0),An($r("textarea",{id:"wl-edit",ref:"editorRef","onUpdate:modelValue":t[3]||(t[3]=t=>e.editor=t),class:"wl-editor",placeholder:e.replyUser?`@${e.replyUser}`:e.locale.placeholder,onKeydown:t[4]||(t[4]=(...t)=>e.onKeyDown&&e.onKeyDown(...t)),onDrop:t[5]||(t[5]=(...t)=>e.onDrop&&e.onDrop(...t)),onPaste:t[6]||(t[6]=(...t)=>e.onPaste&&e.onPaste(...t))},null,40,as),[[dl,e.editor]]),An($r("div",cs,[us,$r("h4",null,E(e.locale.preview)+":",1),Er(" eslint-disable-next-line vue/no-v-html "),$r("div",{class:"wl-content",innerHTML:e.previewText},null,8,ps)],512),[[xl,e.showPreview]]),$r("div",ds,[$r("div",hs,[$r("a",fs,[Cr(s)]),An($r("button",{ref:"emojiButtonRef",class:C(["wl-action",{actived:e.showEmoji}]),title:e.locale.emoji,onClick:t[7]||(t[7]=t=>e.showEmoji=!e.showEmoji)},[Cr(a)],10,ms),[[xl,e.emoji.tabs.length]]),e.config.search?(hr(),vr("button",{key:0,ref:"gifButtonRef",class:C(["wl-action",{actived:e.showGif}]),title:e.locale.gif,onClick:t[8]||(t[8]=t=>e.showGif=!e.showGif)},[Cr(c)],10,gs)):Er("v-if",!0),$r("input",{id:"wl-image-upload",ref:"imageUploadRef",class:"upload",type:"file",accept:".png,.jpg,.jpeg,.webp,.bmp,.gif",onChange:t[9]||(t[9]=(...t)=>e.onChange&&e.onChange(...t))},null,544),e.canUploadImage?(hr(),vr("label",{key:1,for:"wl-image-upload",class:"wl-action",title:e.locale.uploadImage},[Cr(u)],8,vs)):Er("v-if",!0),$r("button",{class:C(["wl-action",{actived:e.showPreview}]),title:e.locale.preview,onClick:t[10]||(t[10]=t=>e.showPreview=!e.showPreview)},[Cr(p)],10,ys)]),$r("div",ws,[$r("div",bs,[Ir(E(e.wordNumber)+" ",1),e.config.wordLimit?(hr(),vr("span",ks,[xs,$r("span",{class:C({illegal:!e.isWordNumberLegal}),textContent:E(e.wordLimit)},null,10,_s)])):Er("v-if",!0),Ir("  "+E(e.locale.word),1)]),"disable"===e.config.login||e.isLogin?Er("v-if",!0):(hr(),vr("button",{key:0,class:"wl-btn",onClick:t[11]||(t[11]=(...t)=>e.onLogin&&e.onLogin(...t)),textContent:E(e.locale.login)},null,8,$s)),"force"!==e.config.login||e.isLogin?(hr(),vr("button",{key:1,class:"wl-btn primary",title:"Cmd|Ctrl + Enter",disabled:e.isSubmitting,onClick:t[12]||(t[12]=(...t)=>e.submitComment&&e.submitComment(...t))},[e.isSubmitting?(hr(),yr(d,{key:0,size:16})):(hr(),vr(sr,{key:1},[Ir(E(e.locale.submit),1)],64))],8,Cs)):Er("v-if",!0)]),$r("div",{ref:"gifPopupRef",class:C(["wl-gif-popup",{display:e.showGif}])},[$r("input",{ref:"gifSearchInputRef",type:"text",placeholder:e.locale.gifSearchPlaceholder,onInput:t[13]||(t[13]=(...t)=>e.onGifSearch&&e.onGifSearch(...t))},null,40,Ss),Cr(h,{items:e.gifData.list,"column-width":200,gap:6,onInsert:t[14]||(t[14]=t=>e.insert(t)),onScroll:e.onImageWallScroll},null,8,["items","onScroll"]),e.gifData.loading?(hr(),vr("div",Is,[Cr(d,{size:30})])):Er("v-if",!0)],2),$r("div",{ref:"emojiPopupRef",class:C(["wl-emoji-popup",{display:e.showEmoji}])},[(hr(!0),vr(sr,null,Un(e.emoji.tabs,((t,n)=>(hr(),vr(sr,{key:t.name},[n===e.emojiTabIndex?(hr(),vr("div",Es,[(hr(!0),vr(sr,null,Un(t.items,(t=>(hr(),vr("button",{key:t,title:t,onClick:n=>e.insert(`:${t}:`)},[e.showEmoji?(hr(),vr("img",{key:0,class:"wl-emoji",src:e.emoji.map[t],alt:t,loading:"lazy",referrerPolicy:"no-referrer"},null,8,Rs)):Er("v-if",!0)],8,zs)))),128))])):Er("v-if",!0)],64)))),128)),e.emoji.tabs.length>1?(hr(),vr("div",As,[(hr(!0),vr(sr,null,Un(e.emoji.tabs,((t,n)=>(hr(),vr("button",{key:t.name,class:C(["wl-tab",{active:e.emojiTabIndex===n}]),onClick:t=>e.emojiTabIndex=n},[$r("img",{class:"wl-emoji",src:t.icon,alt:t.name,title:t.name,loading:"lazy",referrerPolicy:"no-referrer"},null,8,Os)],10,Ls)))),128))])):Er("v-if",!0)],2)])]),e.replyId||e.edit?.objectId?(hr(),vr("button",{key:1,class:"wl-close",title:e.locale.cancelReply,onClick:t[15]||(t[15]=t=>e.$emit(e.replyId?"cancel-reply":"cancel-edit"))},[Cr(o,{size:24})],8,js)):Er("v-if",!0)])}],["__file","CommentBox.vue"]]);const Us=["approved","waiting","spam"];var Ms=Cn({components:{CommentBox:Ts,DeleteIcon:()=>Hr("svg",{viewBox:"0 0 1024 1024",width:"24",height:"24"},Hr("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"})),LikeIcon:({active:e=!1})=>Hr("svg",{viewBox:"0 0 1024 1024",width:"24",height:"24"},[Hr("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"+(e?"":"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:e?"red":"currentColor"})]),ReplyIcon:()=>Hr("svg",{viewBox:"0 0 1024 1024",width:"24",height:"24"},Hr("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"})),EditIcon:()=>Hr("svg",{viewBox:"0 0 1024 1024",width:"24",height:"24"},Hr("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"})),VerifiedIcon:()=>Hr("svg",{class:"verified-icon",viewBox:"0 0 1024 1024",width:"14",height:"14"},Hr("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"}))},props:{comment:{type:Object,required:!0},rootId:{type:String,required:!0},reply:{type:Object,default:null},edit:{type:Object,default:null}},emits:["submit","reply","like","delete","status","sticky","edit"],setup(e){const t=wn("config"),n=Uo(),r=jo(),l=Dr((()=>t.value.locale)),i=Dr((()=>{const{link:t}=e.comment;return t?$i(t)?t:`https://${t}`:""})),o=Dr((()=>n.value.includes(e.comment.objectId))),s=((e,t)=>{const n=mi();return Dr((()=>Ri(e,n.value,t)))})(e.comment.insertedAt,l.value),a=Dr((()=>"administrator"===r.value.type)),c=Dr((()=>e.comment.user_id&&r.value.objectId===e.comment.user_id)),u=Dr((()=>e.comment.objectId===e.reply?.objectId)),p=Dr((()=>e.comment.objectId===e.edit?.objectId));return{config:t,locale:l,isReplyingCurrent:u,isEditingCurrent:p,link:i,like:o,time:s,isAdmin:a,isOwner:c,commentStatus:Us}}});const Ps=["id"],Ns={class:"wl-user","aria-hidden":"true"},Fs=["src"],Vs={class:"wl-card"},Bs={class:"wl-head"},Ds=["href"],Hs={key:1,class:"wl-nick"},Ws=["textContent"],qs=["textContent"],Zs=["textContent"],Gs=["textContent"],Qs=["textContent"],Js={class:"wl-comment-actions"},Ks=["title"],Ys=["textContent"],Xs=["title"],ea={class:"wl-meta","aria-hidden":"true"},ta=["data-value","textContent"],na=["data-value","textContent"],ra=["data-value","textContent"],la=["innerHTML"],ia={key:1,class:"wl-admin-actions"},oa={class:"wl-comment-status"},sa=["disabled","onClick","textContent"],aa={key:3,class:"wl-quote"};const ca=[{key:"insertedAt_desc",name:"latest"},{key:"insertedAt_asc",name:"oldest"},{key:"like_desc",name:"hottest"}];var ua=Cn({name:"WalineRoot",components:{CommentBox:Ts,CommentCard:Go(Ms,[["render",function(e,t,n,r,l,i){const o=On("VerifiedIcon"),s=On("EditIcon"),a=On("DeleteIcon"),c=On("LikeIcon"),u=On("ReplyIcon"),p=On("CommentBox"),d=On("CommentCard",!0);return hr(),vr("div",{id:e.comment.objectId,class:"wl-item"},[$r("div",Ns,[e.comment.avatar?(hr(),vr("img",{key:0,src:e.comment.avatar},null,8,Fs)):Er("v-if",!0),e.comment.type?(hr(),yr(o,{key:1})):Er("v-if",!0)]),$r("div",Vs,[$r("div",Bs,[e.link?(hr(),vr("a",{key:0,class:"wl-nick",href:e.link,target:"_blank",rel:"nofollow noreferrer"},E(e.comment.nick),9,Ds)):(hr(),vr("span",Hs,E(e.comment.nick),1)),"administrator"===e.comment.type?(hr(),vr("span",{key:2,class:"wl-badge",textContent:E(e.locale.admin)},null,8,Ws)):Er("v-if",!0),e.comment.label?(hr(),vr("span",{key:3,class:"wl-badge",textContent:E(e.comment.label)},null,8,qs)):Er("v-if",!0),e.comment.sticky?(hr(),vr("span",{key:4,class:"wl-badge",textContent:E(e.locale.sticky)},null,8,Zs)):Er("v-if",!0),void 0!==e.comment.level&&e.comment.level>=0?(hr(),vr("span",{key:5,class:C(`wl-badge level${e.comment.level}`),textContent:E(e.locale[`level${e.comment.level}`]||`Level ${e.comment.level}`)},null,10,Gs)):Er("v-if",!0),$r("span",{class:"wl-time",textContent:E(e.time)},null,8,Qs),$r("div",Js,[e.isAdmin||e.isOwner?(hr(),vr("button",{key:0,class:"wl-edit",onClick:t[0]||(t[0]=t=>e.$emit("edit",e.comment))},[Cr(s)])):Er("v-if",!0),e.isAdmin||e.isOwner?(hr(),vr("button",{key:1,class:"wl-delete",onClick:t[1]||(t[1]=t=>e.$emit("delete",e.comment))},[Cr(a)])):Er("v-if",!0),$r("button",{class:"wl-like",title:e.like?e.locale.cancelLike:e.locale.like,onClick:t[2]||(t[2]=t=>e.$emit("like",e.comment))},[Cr(c,{active:e.like},null,8,["active"]),"like"in e.comment?(hr(),vr("span",{key:0,textContent:E(e.comment.like)},null,8,Ys)):Er("v-if",!0)],8,Ks),$r("button",{class:C(["wl-reply",{active:e.isReplyingCurrent}]),title:e.isReplyingCurrent?e.locale.cancelReply:e.locale.reply,onClick:t[3]||(t[3]=t=>e.$emit("reply",e.isReplyingCurrent?null:e.comment))},[Cr(u)],10,Xs)])]),$r("div",ea,[e.comment.addr?(hr(),vr("span",{key:0,class:"wl-addr","data-value":e.comment.addr,textContent:E(e.comment.addr)},null,8,ta)):Er("v-if",!0),e.comment.browser?(hr(),vr("span",{key:1,class:"wl-browser","data-value":e.comment.browser,textContent:E(e.comment.browser)},null,8,na)):Er("v-if",!0),e.comment.os?(hr(),vr("span",{key:2,class:"wl-os","data-value":e.comment.os,textContent:E(e.comment.os)},null,8,ra)):Er("v-if",!0)]),Er(" eslint-disable vue/no-v-html "),e.isEditingCurrent?Er("v-if",!0):(hr(),vr("div",{key:0,class:"wl-content",innerHTML:e.comment.comment},null,8,la)),Er(" eslint-enable vue/no-v-html "),e.isAdmin&&!e.isEditingCurrent?(hr(),vr("div",ia,[$r("span",oa,[(hr(!0),vr(sr,null,Un(e.commentStatus,(t=>(hr(),vr("button",{key:t,class:C(`wl-btn wl-${t}`),disabled:e.comment.status===t,onClick:n=>e.$emit("status",{status:t,comment:e.comment}),textContent:E(e.locale[t])},null,10,sa)))),128))]),e.isAdmin&&!e.comment.rid?(hr(),vr("button",{key:0,class:"wl-btn wl-sticky",onClick:t[4]||(t[4]=t=>e.$emit("sticky",e.comment))},E(e.comment.sticky?e.locale.unsticky:e.locale.sticky),1)):Er("v-if",!0)])):Er("v-if",!0),e.isReplyingCurrent||e.isEditingCurrent?(hr(),vr("div",{key:2,class:C({"wl-reply-wrapper":e.isReplyingCurrent,"wl-edit-wrapper":e.isEditingCurrent})},[Cr(p,{edit:e.edit,"reply-id":e.reply?.objectId,"reply-user":e.comment.nick,"root-id":e.rootId,onSubmit:t[5]||(t[5]=t=>e.$emit("submit",t)),onCancelReply:t[6]||(t[6]=t=>e.$emit("reply",null)),onCancelEdit:t[7]||(t[7]=t=>e.$emit("edit",null))},null,8,["edit","reply-id","reply-user","root-id"])],2)):Er("v-if",!0),e.comment.children?(hr(),vr("div",aa,[(hr(!0),vr(sr,null,Un(e.comment.children,(n=>(hr(),yr(d,{key:n.objectId,comment:n,reply:e.reply,edit:e.edit,"root-id":e.rootId,onReply:t[8]||(t[8]=t=>e.$emit("reply",t)),onSubmit:t[9]||(t[9]=t=>e.$emit("submit",t)),onLike:t[10]||(t[10]=t=>e.$emit("like",t)),onEdit:t[11]||(t[11]=t=>e.$emit("edit",t)),onDelete:t[12]||(t[12]=t=>e.$emit("delete",t)),onStatus:t[13]||(t[13]=t=>e.$emit("status",t)),onSticky:t[14]||(t[14]=t=>e.$emit("sticky",t))},null,8,["comment","reply","edit","root-id"])))),128))])):Er("v-if",!0)])],8,Ps)}],["__file","CommentCard.vue"]]),LoadingIcon:qo},props:["serverURL","path","meta","requiredMeta","dark","lang","locale","pageSize","wordLimit","emoji","login","highlighter","texRenderer","imageUploader","search","copyright"],setup(e){const i=Dr((()=>(({serverURL:e,path:i=location.pathname,lang:o="zh-CN",locale:s,emoji:c=["//unpkg.com/@waline/emojis@1.1.0/weibo"],meta:u=["nick","mail","link"],requiredMeta:p=[],dark:d=!1,pageSize:h=10,wordLimit:f,imageUploader:m,highlighter:g,texRenderer:y,copyright:w=!0,login:b="enable",search:k=l(),...x})=>({serverURL:Ci(e),path:xi(i),locale:{...v[o]||v["zh-CN"],..."object"==typeof s?s:{}},wordLimit:Si(f),meta:t(u),requiredMeta:t(p),imageUploader:Ii(m,n),highlighter:Ii(g,a),texRenderer:Ii(y,r),lang:o,dark:d,emoji:c,pageSize:h,login:b,copyright:w,search:k,...x}))(e))),o=jo(),s=Uo(),c=Ot("loading"),u=Ot(0),p=Ot(1),d=Ot(0),h=Ot(ca[0].key),f=Ot([]),m=Ot(null),g=Ot(null),y=Dr((()=>{return"string"==typeof(e=i.value.dark)?"auto"===e?`@media(prefers-color-scheme:dark){body${Ei}}`:`${e}${Ei}`:!0===e?`:root${Ei}`:"";var e}));let w;!function(e,t={}){const n=Ot(!1),{document:r=Ql,immediate:l=!0,manual:i=!1,id:o="vueuse_styletag_"+ ++gi}=t,s=Ot(e);let a=()=>{};const c=()=>{if(!r)return;const e=r.getElementById(o)||r.createElement("style");e.type="text/css",e.id=o,t.media&&(e.media=t.media),r.head.appendChild(e),n.value||(a=xn(s,(t=>{e.innerText=t}),{immediate:!0}),n.value=!0)},u=()=>{r&&n.value&&(a(),r.head.removeChild(r.getElementById(o)),n.value=!1)};l&&!i&&Tl(c),i||Ol(u),bt(n)}(y);const b=e=>{const{serverURL:t,path:n,pageSize:r}=i.value,l=new AbortController;c.value="loading",w?.(),(({serverURL:e,lang:t,path:n,page:r,pageSize:l,sortBy:i,signal:o,token:s})=>{const a={};return s&&(a.Authorization=`Bearer ${s}`),fetch(`${e}/comment?path=${encodeURIComponent(n)}&pageSize=${l}&page=${r}&lang=${t}&sortBy=${i}`,{signal:o,headers:a}).then((e=>e.json())).then((e=>Ti(e,"comment list")))})({serverURL:t,lang:i.value.lang,path:n,pageSize:r,sortBy:h.value,page:e,signal:l.signal,token:o.value?.token}).then((t=>{c.value="success",u.value=t.count,f.value.push(...t.data),p.value=e,d.value=t.totalPages})).catch((e=>{"AbortError"!==e.name&&(console.error(e.message),c.value="error")})),w=l.abort.bind(l)},k=()=>{u.value=0,f.value=[],b(1)};return function(e,t){if(Tr){let n=Tr.provides;const r=Tr.parent&&Tr.parent.provides;r===n&&(n=Tr.provides=Object.create(r)),n[e]=t}}("config",i),xn((()=>e.path),k),En((()=>k())),{config:i,darkmodeStyle:y,i18n:Dr((()=>i.value.locale)),status:c,count:u,page:p,totalPages:d,sortBy:h,sortByItems:ca,data:f,reply:m,edit:g,loadMore:()=>b(p.value+1),refresh:k,onSortByChange:e=>{h.value!==e&&(h.value=e,k())},onReply:e=>{m.value=e},onSubmit:e=>{if(g.value)g.value.comment=e.comment,g.value.orig=e.orig;else if(e.rid){const t=f.value.find((({objectId:t})=>t===e.rid));if(!t)return;Array.isArray(t.children)||(t.children=[]),t.children.push(e)}else f.value.unshift(e)},onStatusChange:async({comment:e,status:t})=>{if(e.status===t)return;const{serverURL:n,lang:r}=i.value;await Ui({serverURL:n,lang:r,token:o.value?.token,objectId:e.objectId,status:t}),e.status=t},onDelete:async({objectId:e})=>{if(!confirm("Are you sure you want to delete this comment?"))return;const{serverURL:t,lang:n}=i.value;await(({serverURL:e,lang:t,token:n,objectId:r})=>fetch(`${e}/comment/${r}?lang=${t}`,{method:"DELETE",headers:{Authorization:`Bearer ${n}`}}).then((e=>e.json())))({serverURL:t,lang:n,token:o.value?.token,objectId:e}),f.value.some(((t,n)=>t.objectId===e?(f.value=f.value.filter(((e,t)=>t!==n)),!0):t.children.some(((r,l)=>r.objectId===e&&(f.value[n].children=t.children.filter(((e,t)=>t!==l)),!0)))))},onSticky:async e=>{if(e.rid)return;const{serverURL:t,lang:n}=i.value;await Ui({serverURL:t,lang:n,token:o.value?.token,objectId:e.objectId,sticky:e.sticky?0:1}),e.sticky=!e.sticky},onLike:async e=>{const{serverURL:t,lang:n}=i.value,{objectId:r}=e,l=s.value.includes(r);await(({serverURL:e,lang:t,objectId:n,like:r})=>fetch(`${e}/comment/${n}?lang=${t}`,{method:"PUT",headers:ji,body:JSON.stringify({like:r})}).then((e=>e.json())))({serverURL:t,lang:n,objectId:r,like:!l}),l?s.value=s.value.filter((e=>e!==r)):(s.value=[...s.value,r],s.value.length>50&&(s.value=s.value.slice(-50))),e.like=(e.like||0)+(l?-1:1)},onEdit:e=>{g.value=e},version:"2.9.1"}}});const pa={"data-waline":""},da={class:"wl-meta-head"},ha={class:"wl-count"},fa=["textContent"],ma={class:"wl-sort"},ga=["onClick"],va={class:"wl-cards"},ya={key:1,class:"wl-operation"},wa=["textContent"],ba={key:0,class:"wl-loading"},ka=["textContent"],xa={class:"wl-operation"},_a=["textContent"],$a={key:3,class:"wl-power"},Ca=Ir(" Powered by "),Sa=$r("a",{href:"https://github.com/walinejs/waline",target:"_blank",rel:"noreferrer"}," Waline ",-1);var Ia=Go(ua,[["render",function(e,t,n,r,l,i){const o=On("CommentBox"),s=On("CommentCard"),a=On("LoadingIcon");return hr(),vr("div",pa,[e.reply?Er("v-if",!0):(hr(),yr(o,{key:0,onSubmit:e.onSubmit},null,8,["onSubmit"])),$r("div",da,[$r("div",ha,[e.count?(hr(),vr("span",{key:0,class:"wl-num",textContent:E(e.count)},null,8,fa)):Er("v-if",!0),Ir(" "+E(e.i18n.comment),1)]),$r("ul",ma,[(hr(!0),vr(sr,null,Un(e.sortByItems,(t=>(hr(),vr("li",{key:t.key,class:C([t.key===e.sortBy?"active":""]),onClick:n=>e.onSortByChange(t.key)},E(e.i18n[t.name]),11,ga)))),128))])]),$r("div",va,[(hr(!0),vr(sr,null,Un(e.data,(t=>(hr(),yr(s,{key:t.objectId,"root-id":t.objectId,comment:t,reply:e.reply,edit:e.edit,onReply:e.onReply,onEdit:e.onEdit,onSubmit:e.onSubmit,onStatus:e.onStatusChange,onDelete:e.onDelete,onSticky:e.onSticky,onLike:e.onLike},null,8,["root-id","comment","reply","edit","onReply","onEdit","onSubmit","onStatus","onDelete","onSticky","onLike"])))),128))]),"error"===e.status?(hr(),vr("div",ya,[$r("button",{type:"button",class:"wl-btn",onClick:t[0]||(t[0]=(...t)=>e.refresh&&e.refresh(...t)),textContent:E(e.i18n.refresh)},null,8,wa)])):(hr(),vr(sr,{key:2},["loading"===e.status?(hr(),vr("div",ba,[Cr(a,{size:30})])):e.data.length?e.page<e.totalPages?(hr(),vr(sr,{key:2},[Er(" Load more button "),$r("div",xa,[$r("button",{type:"button",class:"wl-btn",onClick:t[1]||(t[1]=(...t)=>e.loadMore&&e.loadMore(...t)),textContent:E(e.i18n.more)},null,8,_a)])],2112)):Er("v-if",!0):(hr(),vr("div",{key:1,class:"wl-empty",textContent:E(e.i18n.sofa)},null,8,ka))],64)),Er(" Copyright Information "),e.config.copyright?(hr(),vr("div",$a,[Ca,Sa,Ir(" v"+E(e.version),1)])):Er("v-if",!0)])}],["__file","Waline.vue"]]);const Ea=(e,t)=>{t.forEach(((t,n)=>{t.innerText=e[n].toString()}))},za=({serverURL:e,path:t=window.location.pathname,selector:n=".waline-pageview-count",update:r=!0,lang:l="zh-CN"})=>{const i=new AbortController,o=Array.from(document.querySelectorAll(n)),s=e=>{const n=Lo(e);return null!==n&&t!==n},a=n=>Mi({serverURL:Ci(e),paths:n.map((e=>Lo(e)||t)),lang:l,signal:i.signal}).then((e=>Ea(e,n))).catch(Oi);if(r){const n=o.filter((e=>!s(e))),r=o.filter(s);Pi({serverURL:Ci(e),path:t,lang:l}).then((e=>Ea(new Array(n.length).fill(e),n))),r.length&&a(r)}else a(o);return i.abort.bind(i)},Ra=({el:e="#waline",path:t=window.location.pathname,comment:n=!1,pageview:r=!1,...l})=>{const i=e?Ni(e):null;if(e&&!i)throw new Error("Option 'el' do not match any domElement!");if(!l.serverURL)throw new Error("Option 'serverURL' is missing!");const o=wt({...l}),s=wt({comment:n,pageview:r,path:t}),a=i?Sl((()=>Hr(Ia,{path:s.path,...o}))):null;a&&a.mount(i);const c=bn((()=>{s.comment&&Mo({serverURL:o.serverURL,path:s.path,selector:"string"==typeof s.comment?s.comment:void 0})})),u=bn((()=>{s.pageview&&za({serverURL:o.serverURL,path:s.path,selector:"string"==typeof s.pageview?s.pageview:void 0})}));return{el:i,update:({comment:e,pageview:t,path:n=window.location.pathname,...r}={})=>{Object.entries(r).forEach((([e,t])=>{o[e]=t})),s.path=n,void 0!==e&&(s.comment=e),void 0!==t&&(s.pageview=t)},destroy:()=>{a?.unmount(),c(),u()}}},Aa="2.9.1",La=({el:e,serverURL:t,count:n,lang:r="zh-CN"})=>{const l=jo(),i=Ni(e),o=new AbortController;return(({serverURL:e,lang:t,count:n,signal:r,token:l})=>{const i={};return l&&(i.Authorization=`Bearer ${l}`),fetch(`${e}/comment?type=recent&count=${n}&lang=${t}`,{signal:r,headers:i}).then((e=>e.json())).then((e=>Ti(e,"recent comment")))})({serverURL:t,count:n,lang:r,signal:o.signal,token:l.value?.token}).then((e=>i&&e.length?(i.innerHTML=`<ul class="wl-recent-list">${e.map((e=>`<li class="wl-recent-item"><a href="${e.url}">${e.nick}</a>:${e.comment}</li>`)).join("")}</ul>`,{comments:e,destroy:()=>{o.abort(),i.innerHTML=""}}):{comments:e,destroy:()=>o.abort()}))};export{La as RecentComments,Mo as commentCount,v as defaultLocales,Ra as init,za as pageviewCount,Aa as version};
2
+ //# sourceMappingURL=waline.mjs.map