78 lines
77 KiB
Python
78 lines
77 KiB
Python
import{c as it,d as rr,u as sr,C as ir,r as oe,o as or,D as lr,w as dn,a as le,b as f,g as C,n as T,h as b,i as ar,t as de,j as cr,m as ur,l as Xe,v as pr,k as Ie,y as hr,x as me,T as Tt,A as fr,X as gn,z as dr,F as gr,s as mr,e as ae,B as xr,_ as kr}from"./index-B-Ka-o3f.js";import{u as br,S as wr,C as yr,Q as _r,d as Tr,E as vr}from"./clipboard-Bj3kv5gr.js";import{B as Ar}from"./box-CCCmbUYf.js";import{F as mn}from"./file-ExORVwAL.js";import{H as Er}from"./hard-drive-QraB3QOb.js";import{T as Sr}from"./trash-McEm8LQt.js";/**
|
|
* @license lucide-vue-next v0.535.0 - ISC
|
|
*
|
|
* This source code is licensed under the ISC license.
|
|
* See the LICENSE file in the root directory of this source tree.
|
|
*/const Rr=it("arrow-right",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]]);/**
|
|
* @license lucide-vue-next v0.535.0 - ISC
|
|
*
|
|
* This source code is licensed under the ISC license.
|
|
* See the LICENSE file in the root directory of this source tree.
|
|
*/const Lr=it("calendar",[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}]]);/**
|
|
* @license lucide-vue-next v0.535.0 - ISC
|
|
*
|
|
* This source code is licensed under the ISC license.
|
|
* See the LICENSE file in the root directory of this source tree.
|
|
*/const Cr=it("copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]);/**
|
|
* @license lucide-vue-next v0.535.0 - ISC
|
|
*
|
|
* This source code is licensed under the ISC license.
|
|
* See the LICENSE file in the root directory of this source tree.
|
|
*/const xn=it("download",[["path",{d:"M12 15V3",key:"m9g1x1"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["path",{d:"m7 10 5 5 5-5",key:"brsn70"}]]);var Ye=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},Je={exports:{}},Ir=Je.exports,kn;function Dr(){return kn||(kn=1,function(r,e){(function(n,s){s()})(Ir,function(){function n(c,h){return typeof h>"u"?h={autoBom:!1}:typeof h!="object"&&(console.warn("Deprecated: Expected third argument to be a object"),h={autoBom:!h}),h.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(c.type)?new Blob(["\uFEFF",c],{type:c.type}):c}function s(c,h,x){var d=new XMLHttpRequest;d.open("GET",c),d.responseType="blob",d.onload=function(){u(d.response,h,x)},d.onerror=function(){console.error("could not download file")},d.send()}function t(c){var h=new XMLHttpRequest;h.open("HEAD",c,!1);try{h.send()}catch{}return 200<=h.status&&299>=h.status}function l(c){try{c.dispatchEvent(new MouseEvent("click"))}catch{var h=document.createEvent("MouseEvents");h.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),c.dispatchEvent(h)}}var o=typeof window=="object"&&window.window===window?window:typeof self=="object"&&self.self===self?self:typeof Ye=="object"&&Ye.global===Ye?Ye:void 0,a=o.navigator&&/Macintosh/.test(navigator.userAgent)&&/AppleWebKit/.test(navigator.userAgent)&&!/Safari/.test(navigator.userAgent),u=o.saveAs||(typeof window!="object"||window!==o?function(){}:"download"in HTMLAnchorElement.prototype&&!a?function(c,h,x){var d=o.URL||o.webkitURL,_=document.createElement("a");h=h||c.name||"download",_.download=h,_.rel="noopener",typeof c=="string"?(_.href=c,_.origin===location.origin?l(_):t(_.href)?s(c,h,x):l(_,_.target="_blank")):(_.href=d.createObjectURL(c),setTimeout(function(){d.revokeObjectURL(_.href)},4e4),setTimeout(function(){l(_)},0))}:"msSaveOrOpenBlob"in navigator?function(c,h,x){if(h=h||c.name||"download",typeof c!="string")navigator.msSaveOrOpenBlob(n(c,x),h);else if(t(c))s(c,h,x);else{var d=document.createElement("a");d.href=c,d.target="_blank",setTimeout(function(){l(d)})}}:function(c,h,x,d){if(d=d||open("","_blank"),d&&(d.document.title=d.document.body.innerText="downloading..."),typeof c=="string")return s(c,h,x);var _=c.type==="application/octet-stream",v=/constructor/i.test(o.HTMLElement)||o.safari,O=/CriOS\/[\d]+/.test(navigator.userAgent);if((O||_&&v||a)&&typeof FileReader<"u"){var Z=new FileReader;Z.onloadend=function(){var $=Z.result;$=O?$:$.replace(/^data:[^;]*;/,"data:attachment/file;"),d?d.location.href=$:location=$,d=null},Z.readAsDataURL(c)}else{var V=o.URL||o.webkitURL,Q=V.createObjectURL(c);d?d.location=Q:location.href=Q,d=null,setTimeout(function(){V.revokeObjectURL(Q)},4e4)}});o.saveAs=u.saveAs=u,r.exports=u})}(Je)),Je.exports}var Or=Dr();function Mt(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var ke=Mt();function On(r){ke=r}var Ue={exec:()=>null};function A(r,e=""){let n=typeof r=="string"?r:r.source,s={replace:(t,l)=>{let o=typeof l=="string"?l:l.source;return o=o.replace(H.caret,"$1"),n=n.replace(t,o),s},getRegex:()=>new RegExp(n,e)};return s}var H={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceTabs:/^\t+/,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] /,listReplaceTask:/^\[[ xX]\] +/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,unescapeTest:/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:r=>new RegExp(`^( {0,3}${r})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:r=>new RegExp(`^ {0,${Math.min(3,r-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:r=>new RegExp(`^ {0,${Math.min(3,r-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:r=>new RegExp(`^ {0,${Math.min(3,r-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:r=>new RegExp(`^ {0,${Math.min(3,r-1)}}#`),htmlBeginRegex:r=>new RegExp(`^ {0,${Math.min(3,r-1)}}<(?:[a-z].*>|!--)`,"i")},Mr=/^(?:[ \t]*(?:\n|$))+/,Nr=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,Pr=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,Fe=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,zr=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,Nt=/(?:[*+-]|\d{1,9}[.)])/,Mn=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,Nn=A(Mn).replace(/bull/g,Nt).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),$r=A(Mn).replace(/bull/g,Nt).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),Pt=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,Ur=/^[^\n]+/,zt=/(?!\s*\])(?:\\.|[^\[\]\\])+/,Fr=A(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",zt).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),Br=A(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,Nt).getRegex(),ot="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",$t=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,Hr=A("^ {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|$))","i").replace("comment",$t).replace("tag",ot).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),Pn=A(Pt).replace("hr",Fe).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",ot).getRegex(),Gr=A(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",Pn).getRegex(),Ut={blockquote:Gr,code:Nr,def:Fr,fences:Pr,heading:zr,hr:Fe,html:Hr,lheading:Nn,list:Br,newline:Mr,paragraph:Pn,table:Ue,text:Ur},bn=A("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",Fe).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\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",ot).getRegex(),qr={...Ut,lheading:$r,table:bn,paragraph:A(Pt).replace("hr",Fe).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",bn).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",ot).getRegex()},Wr={...Ut,html:A(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",$t).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:Ue,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:A(Pt).replace("hr",Fe).replace("heading",` *#{1,6} *[^
|
|
]`).replace("lheading",Nn).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},jr=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,Zr=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,zn=/^( {2,}|\\)\n(?!\s*$)/,Xr=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,lt=/[\p{P}\p{S}]/u,Ft=/[\s\p{P}\p{S}]/u,$n=/[^\s\p{P}\p{S}]/u,Yr=A(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,Ft).getRegex(),Un=/(?!~)[\p{P}\p{S}]/u,Vr=/(?!~)[\s\p{P}\p{S}]/u,Qr=/(?:[^\s\p{P}\p{S}]|~)/u,Kr=/\[[^[\]]*?\]\((?:\\.|[^\\\(\)]|\((?:\\.|[^\\\(\)])*\))*\)|`[^`]*?`|<(?! )[^<>]*?>/g,Fn=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,Jr=A(Fn,"u").replace(/punct/g,lt).getRegex(),es=A(Fn,"u").replace(/punct/g,Un).getRegex(),Bn="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",ts=A(Bn,"gu").replace(/notPunctSpace/g,$n).replace(/punctSpace/g,Ft).replace(/punct/g,lt).getRegex(),ns=A(Bn,"gu").replace(/notPunctSpace/g,Qr).replace(/punctSpace/g,Vr).replace(/punct/g,Un).getRegex(),rs=A("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,$n).replace(/punctSpace/g,Ft).replace(/punct/g,lt).getRegex(),ss=A(/\\(punct)/,"gu").replace(/punct/g,lt).getRegex(),is=A(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),os=A($t).replace("(?:-->|$)","-->").getRegex(),ls=A("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",os).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),nt=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,as=A(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",nt).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),Hn=A(/^!?\[(label)\]\[(ref)\]/).replace("label",nt).replace("ref",zt).getRegex(),Gn=A(/^!?\[(ref)\](?:\[\])?/).replace("ref",zt).getRegex(),cs=A("reflink|nolink(?!\\()","g").replace("reflink",Hn).replace("nolink",Gn).getRegex(),Bt={_backpedal:Ue,anyPunctuation:ss,autolink:is,blockSkip:Kr,br:zn,code:Zr,del:Ue,emStrongLDelim:Jr,emStrongRDelimAst:ts,emStrongRDelimUnd:rs,escape:jr,link:as,nolink:Gn,punctuation:Yr,reflink:Hn,reflinkSearch:cs,tag:ls,text:Xr,url:Ue},us={...Bt,link:A(/^!?\[(label)\]\((.*?)\)/).replace("label",nt).getRegex(),reflink:A(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",nt).getRegex()},Lt={...Bt,emStrongRDelimAst:ns,emStrongLDelim:es,url:A(/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,"i").replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\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.!#$%&'*+\/=?_`{\|}~-]+@)))/},ps={...Lt,br:A(zn).replace("{2,}","*").getRegex(),text:A(Lt.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},Ve={normal:Ut,gfm:qr,pedantic:Wr},De={normal:Bt,gfm:Lt,breaks:ps,pedantic:us},hs={"&":"&","<":"<",">":">",'"':""","'":"'"},wn=r=>hs[r];function ee(r,e){if(e){if(H.escapeTest.test(r))return r.replace(H.escapeReplace,wn)}else if(H.escapeTestNoEncode.test(r))return r.replace(H.escapeReplaceNoEncode,wn);return r}function yn(r){try{r=encodeURI(r).replace(H.percentDecode,"%")}catch{return null}return r}function _n(r,e){let n=r.replace(H.findPipe,(l,o,a)=>{let u=!1,c=o;for(;--c>=0&&a[c]==="\\";)u=!u;return u?"|":" |"}),s=n.split(H.splitPipe),t=0;if(s[0].trim()||s.shift(),s.length>0&&!s.at(-1)?.trim()&&s.pop(),e)if(s.length>e)s.splice(e);else for(;s.length<e;)s.push("");for(;t<s.length;t++)s[t]=s[t].trim().replace(H.slashPipe,"|");return s}function Oe(r,e,n){let s=r.length;if(s===0)return"";let t=0;for(;t<s&&r.charAt(s-t-1)===e;)t++;return r.slice(0,s-t)}function fs(r,e){if(r.indexOf(e[1])===-1)return-1;let n=0;for(let s=0;s<r.length;s++)if(r[s]==="\\")s++;else if(r[s]===e[0])n++;else if(r[s]===e[1]&&(n--,n<0))return s;return n>0?-2:-1}function Tn(r,e,n,s,t){let l=e.href,o=e.title||null,a=r[1].replace(t.other.outputLinkReplace,"$1");s.state.inLink=!0;let u={type:r[0].charAt(0)==="!"?"image":"link",raw:n,href:l,title:o,text:a,tokens:s.inlineTokens(a)};return s.state.inLink=!1,u}function ds(r,e,n){let s=r.match(n.other.indentCodeCompensation);if(s===null)return e;let t=s[1];return e.split(`
|
|
`).map(l=>{let o=l.match(n.other.beginningSpace);if(o===null)return l;let[a]=o;return a.length>=t.length?l.slice(t.length):l}).join(`
|
|
`)}var rt=class{options;rules;lexer;constructor(r){this.options=r||ke}space(r){let e=this.rules.block.newline.exec(r);if(e&&e[0].length>0)return{type:"space",raw:e[0]}}code(r){let e=this.rules.block.code.exec(r);if(e){let n=e[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:e[0],codeBlockStyle:"indented",text:this.options.pedantic?n:Oe(n,`
|
|
`)}}}fences(r){let e=this.rules.block.fences.exec(r);if(e){let n=e[0],s=ds(n,e[3]||"",this.rules);return{type:"code",raw:n,lang:e[2]?e[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):e[2],text:s}}}heading(r){let e=this.rules.block.heading.exec(r);if(e){let n=e[2].trim();if(this.rules.other.endingHash.test(n)){let s=Oe(n,"#");(this.options.pedantic||!s||this.rules.other.endingSpaceChar.test(s))&&(n=s.trim())}return{type:"heading",raw:e[0],depth:e[1].length,text:n,tokens:this.lexer.inline(n)}}}hr(r){let e=this.rules.block.hr.exec(r);if(e)return{type:"hr",raw:Oe(e[0],`
|
|
`)}}blockquote(r){let e=this.rules.block.blockquote.exec(r);if(e){let n=Oe(e[0],`
|
|
`).split(`
|
|
`),s="",t="",l=[];for(;n.length>0;){let o=!1,a=[],u;for(u=0;u<n.length;u++)if(this.rules.other.blockquoteStart.test(n[u]))a.push(n[u]),o=!0;else if(!o)a.push(n[u]);else break;n=n.slice(u);let c=a.join(`
|
|
`),h=c.replace(this.rules.other.blockquoteSetextReplace,`
|
|
$1`).replace(this.rules.other.blockquoteSetextReplace2,"");s=s?`${s}
|
|
${c}`:c,t=t?`${t}
|
|
${h}`:h;let x=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(h,l,!0),this.lexer.state.top=x,n.length===0)break;let d=l.at(-1);if(d?.type==="code")break;if(d?.type==="blockquote"){let _=d,v=_.raw+`
|
|
`+n.join(`
|
|
`),O=this.blockquote(v);l[l.length-1]=O,s=s.substring(0,s.length-_.raw.length)+O.raw,t=t.substring(0,t.length-_.text.length)+O.text;break}else if(d?.type==="list"){let _=d,v=_.raw+`
|
|
`+n.join(`
|
|
`),O=this.list(v);l[l.length-1]=O,s=s.substring(0,s.length-d.raw.length)+O.raw,t=t.substring(0,t.length-_.raw.length)+O.raw,n=v.substring(l.at(-1).raw.length).split(`
|
|
`);continue}}return{type:"blockquote",raw:s,tokens:l,text:t}}}list(r){let e=this.rules.block.list.exec(r);if(e){let n=e[1].trim(),s=n.length>1,t={type:"list",raw:"",ordered:s,start:s?+n.slice(0,-1):"",loose:!1,items:[]};n=s?`\\d{1,9}\\${n.slice(-1)}`:`\\${n}`,this.options.pedantic&&(n=s?n:"[*+-]");let l=this.rules.other.listItemRegex(n),o=!1;for(;r;){let u=!1,c="",h="";if(!(e=l.exec(r))||this.rules.block.hr.test(r))break;c=e[0],r=r.substring(c.length);let x=e[2].split(`
|
|
`,1)[0].replace(this.rules.other.listReplaceTabs,V=>" ".repeat(3*V.length)),d=r.split(`
|
|
`,1)[0],_=!x.trim(),v=0;if(this.options.pedantic?(v=2,h=x.trimStart()):_?v=e[1].length+1:(v=e[2].search(this.rules.other.nonSpaceChar),v=v>4?1:v,h=x.slice(v),v+=e[1].length),_&&this.rules.other.blankLine.test(d)&&(c+=d+`
|
|
`,r=r.substring(d.length+1),u=!0),!u){let V=this.rules.other.nextBulletRegex(v),Q=this.rules.other.hrRegex(v),$=this.rules.other.fencesBeginRegex(v),I=this.rules.other.headingBeginRegex(v),te=this.rules.other.htmlBeginRegex(v);for(;r;){let ne=r.split(`
|
|
`,1)[0],K;if(d=ne,this.options.pedantic?(d=d.replace(this.rules.other.listReplaceNesting," "),K=d):K=d.replace(this.rules.other.tabCharGlobal," "),$.test(d)||I.test(d)||te.test(d)||V.test(d)||Q.test(d))break;if(K.search(this.rules.other.nonSpaceChar)>=v||!d.trim())h+=`
|
|
`+K.slice(v);else{if(_||x.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||$.test(x)||I.test(x)||Q.test(x))break;h+=`
|
|
`+d}!_&&!d.trim()&&(_=!0),c+=ne+`
|
|
`,r=r.substring(ne.length+1),x=K.slice(v)}}t.loose||(o?t.loose=!0:this.rules.other.doubleBlankLine.test(c)&&(o=!0));let O=null,Z;this.options.gfm&&(O=this.rules.other.listIsTask.exec(h),O&&(Z=O[0]!=="[ ] ",h=h.replace(this.rules.other.listReplaceTask,""))),t.items.push({type:"list_item",raw:c,task:!!O,checked:Z,loose:!1,text:h,tokens:[]}),t.raw+=c}let a=t.items.at(-1);if(a)a.raw=a.raw.trimEnd(),a.text=a.text.trimEnd();else return;t.raw=t.raw.trimEnd();for(let u=0;u<t.items.length;u++)if(this.lexer.state.top=!1,t.items[u].tokens=this.lexer.blockTokens(t.items[u].text,[]),!t.loose){let c=t.items[u].tokens.filter(x=>x.type==="space"),h=c.length>0&&c.some(x=>this.rules.other.anyLine.test(x.raw));t.loose=h}if(t.loose)for(let u=0;u<t.items.length;u++)t.items[u].loose=!0;return t}}html(r){let e=this.rules.block.html.exec(r);if(e)return{type:"html",block:!0,raw:e[0],pre:e[1]==="pre"||e[1]==="script"||e[1]==="style",text:e[0]}}def(r){let e=this.rules.block.def.exec(r);if(e){let n=e[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),s=e[2]?e[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",t=e[3]?e[3].substring(1,e[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):e[3];return{type:"def",tag:n,raw:e[0],href:s,title:t}}}table(r){let e=this.rules.block.table.exec(r);if(!e||!this.rules.other.tableDelimiter.test(e[2]))return;let n=_n(e[1]),s=e[2].replace(this.rules.other.tableAlignChars,"").split("|"),t=e[3]?.trim()?e[3].replace(this.rules.other.tableRowBlankLine,"").split(`
|
|
`):[],l={type:"table",raw:e[0],header:[],align:[],rows:[]};if(n.length===s.length){for(let o of s)this.rules.other.tableAlignRight.test(o)?l.align.push("right"):this.rules.other.tableAlignCenter.test(o)?l.align.push("center"):this.rules.other.tableAlignLeft.test(o)?l.align.push("left"):l.align.push(null);for(let o=0;o<n.length;o++)l.header.push({text:n[o],tokens:this.lexer.inline(n[o]),header:!0,align:l.align[o]});for(let o of t)l.rows.push(_n(o,l.header.length).map((a,u)=>({text:a,tokens:this.lexer.inline(a),header:!1,align:l.align[u]})));return l}}lheading(r){let e=this.rules.block.lheading.exec(r);if(e)return{type:"heading",raw:e[0],depth:e[2].charAt(0)==="="?1:2,text:e[1],tokens:this.lexer.inline(e[1])}}paragraph(r){let e=this.rules.block.paragraph.exec(r);if(e){let n=e[1].charAt(e[1].length-1)===`
|
|
`?e[1].slice(0,-1):e[1];return{type:"paragraph",raw:e[0],text:n,tokens:this.lexer.inline(n)}}}text(r){let e=this.rules.block.text.exec(r);if(e)return{type:"text",raw:e[0],text:e[0],tokens:this.lexer.inline(e[0])}}escape(r){let e=this.rules.inline.escape.exec(r);if(e)return{type:"escape",raw:e[0],text:e[1]}}tag(r){let e=this.rules.inline.tag.exec(r);if(e)return!this.lexer.state.inLink&&this.rules.other.startATag.test(e[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(e[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(e[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(e[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:e[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:e[0]}}link(r){let e=this.rules.inline.link.exec(r);if(e){let n=e[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(n)){if(!this.rules.other.endAngleBracket.test(n))return;let l=Oe(n.slice(0,-1),"\\");if((n.length-l.length)%2===0)return}else{let l=fs(e[2],"()");if(l===-2)return;if(l>-1){let o=(e[0].indexOf("!")===0?5:4)+e[1].length+l;e[2]=e[2].substring(0,l),e[0]=e[0].substring(0,o).trim(),e[3]=""}}let s=e[2],t="";if(this.options.pedantic){let l=this.rules.other.pedanticHrefTitle.exec(s);l&&(s=l[1],t=l[3])}else t=e[3]?e[3].slice(1,-1):"";return s=s.trim(),this.rules.other.startAngleBracket.test(s)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(n)?s=s.slice(1):s=s.slice(1,-1)),Tn(e,{href:s&&s.replace(this.rules.inline.anyPunctuation,"$1"),title:t&&t.replace(this.rules.inline.anyPunctuation,"$1")},e[0],this.lexer,this.rules)}}reflink(r,e){let n;if((n=this.rules.inline.reflink.exec(r))||(n=this.rules.inline.nolink.exec(r))){let s=(n[2]||n[1]).replace(this.rules.other.multipleSpaceGlobal," "),t=e[s.toLowerCase()];if(!t){let l=n[0].charAt(0);return{type:"text",raw:l,text:l}}return Tn(n,t,n[0],this.lexer,this.rules)}}emStrong(r,e,n=""){let s=this.rules.inline.emStrongLDelim.exec(r);if(!(!s||s[3]&&n.match(this.rules.other.unicodeAlphaNumeric))&&(!(s[1]||s[2])||!n||this.rules.inline.punctuation.exec(n))){let t=[...s[0]].length-1,l,o,a=t,u=0,c=s[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(c.lastIndex=0,e=e.slice(-1*r.length+t);(s=c.exec(e))!=null;){if(l=s[1]||s[2]||s[3]||s[4]||s[5]||s[6],!l)continue;if(o=[...l].length,s[3]||s[4]){a+=o;continue}else if((s[5]||s[6])&&t%3&&!((t+o)%3)){u+=o;continue}if(a-=o,a>0)continue;o=Math.min(o,o+a+u);let h=[...s[0]][0].length,x=r.slice(0,t+s.index+h+o);if(Math.min(t,o)%2){let _=x.slice(1,-1);return{type:"em",raw:x,text:_,tokens:this.lexer.inlineTokens(_)}}let d=x.slice(2,-2);return{type:"strong",raw:x,text:d,tokens:this.lexer.inlineTokens(d)}}}}codespan(r){let e=this.rules.inline.code.exec(r);if(e){let n=e[2].replace(this.rules.other.newLineCharGlobal," "),s=this.rules.other.nonSpaceChar.test(n),t=this.rules.other.startingSpaceChar.test(n)&&this.rules.other.endingSpaceChar.test(n);return s&&t&&(n=n.substring(1,n.length-1)),{type:"codespan",raw:e[0],text:n}}}br(r){let e=this.rules.inline.br.exec(r);if(e)return{type:"br",raw:e[0]}}del(r){let e=this.rules.inline.del.exec(r);if(e)return{type:"del",raw:e[0],text:e[2],tokens:this.lexer.inlineTokens(e[2])}}autolink(r){let e=this.rules.inline.autolink.exec(r);if(e){let n,s;return e[2]==="@"?(n=e[1],s="mailto:"+n):(n=e[1],s=n),{type:"link",raw:e[0],text:n,href:s,tokens:[{type:"text",raw:n,text:n}]}}}url(r){let e;if(e=this.rules.inline.url.exec(r)){let n,s;if(e[2]==="@")n=e[0],s="mailto:"+n;else{let t;do t=e[0],e[0]=this.rules.inline._backpedal.exec(e[0])?.[0]??"";while(t!==e[0]);n=e[0],e[1]==="www."?s="http://"+e[0]:s=e[0]}return{type:"link",raw:e[0],text:n,href:s,tokens:[{type:"text",raw:n,text:n}]}}}inlineText(r){let e=this.rules.inline.text.exec(r);if(e){let n=this.lexer.state.inRawBlock;return{type:"text",raw:e[0],text:e[0],escaped:n}}}},ue=class Ct{tokens;options;state;tokenizer;inlineQueue;constructor(e){this.tokens=[],this.tokens.links=Object.create(null),this.options=e||ke,this.options.tokenizer=this.options.tokenizer||new rt,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};let n={other:H,block:Ve.normal,inline:De.normal};this.options.pedantic?(n.block=Ve.pedantic,n.inline=De.pedantic):this.options.gfm&&(n.block=Ve.gfm,this.options.breaks?n.inline=De.breaks:n.inline=De.gfm),this.tokenizer.rules=n}static get rules(){return{block:Ve,inline:De}}static lex(e,n){return new Ct(n).lex(e)}static lexInline(e,n){return new Ct(n).inlineTokens(e)}lex(e){e=e.replace(H.carriageReturn,`
|
|
`),this.blockTokens(e,this.tokens);for(let n=0;n<this.inlineQueue.length;n++){let s=this.inlineQueue[n];this.inlineTokens(s.src,s.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(e,n=[],s=!1){for(this.options.pedantic&&(e=e.replace(H.tabCharGlobal," ").replace(H.spaceLine,""));e;){let t;if(this.options.extensions?.block?.some(o=>(t=o.call({lexer:this},e,n))?(e=e.substring(t.raw.length),n.push(t),!0):!1))continue;if(t=this.tokenizer.space(e)){e=e.substring(t.raw.length);let o=n.at(-1);t.raw.length===1&&o!==void 0?o.raw+=`
|
|
`:n.push(t);continue}if(t=this.tokenizer.code(e)){e=e.substring(t.raw.length);let o=n.at(-1);o?.type==="paragraph"||o?.type==="text"?(o.raw+=`
|
|
`+t.raw,o.text+=`
|
|
`+t.text,this.inlineQueue.at(-1).src=o.text):n.push(t);continue}if(t=this.tokenizer.fences(e)){e=e.substring(t.raw.length),n.push(t);continue}if(t=this.tokenizer.heading(e)){e=e.substring(t.raw.length),n.push(t);continue}if(t=this.tokenizer.hr(e)){e=e.substring(t.raw.length),n.push(t);continue}if(t=this.tokenizer.blockquote(e)){e=e.substring(t.raw.length),n.push(t);continue}if(t=this.tokenizer.list(e)){e=e.substring(t.raw.length),n.push(t);continue}if(t=this.tokenizer.html(e)){e=e.substring(t.raw.length),n.push(t);continue}if(t=this.tokenizer.def(e)){e=e.substring(t.raw.length);let o=n.at(-1);o?.type==="paragraph"||o?.type==="text"?(o.raw+=`
|
|
`+t.raw,o.text+=`
|
|
`+t.raw,this.inlineQueue.at(-1).src=o.text):this.tokens.links[t.tag]||(this.tokens.links[t.tag]={href:t.href,title:t.title});continue}if(t=this.tokenizer.table(e)){e=e.substring(t.raw.length),n.push(t);continue}if(t=this.tokenizer.lheading(e)){e=e.substring(t.raw.length),n.push(t);continue}let l=e;if(this.options.extensions?.startBlock){let o=1/0,a=e.slice(1),u;this.options.extensions.startBlock.forEach(c=>{u=c.call({lexer:this},a),typeof u=="number"&&u>=0&&(o=Math.min(o,u))}),o<1/0&&o>=0&&(l=e.substring(0,o+1))}if(this.state.top&&(t=this.tokenizer.paragraph(l))){let o=n.at(-1);s&&o?.type==="paragraph"?(o.raw+=`
|
|
`+t.raw,o.text+=`
|
|
`+t.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=o.text):n.push(t),s=l.length!==e.length,e=e.substring(t.raw.length);continue}if(t=this.tokenizer.text(e)){e=e.substring(t.raw.length);let o=n.at(-1);o?.type==="text"?(o.raw+=`
|
|
`+t.raw,o.text+=`
|
|
`+t.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=o.text):n.push(t);continue}if(e){let o="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(o);break}else throw new Error(o)}}return this.state.top=!0,n}inline(e,n=[]){return this.inlineQueue.push({src:e,tokens:n}),n}inlineTokens(e,n=[]){let s=e,t=null;if(this.tokens.links){let a=Object.keys(this.tokens.links);if(a.length>0)for(;(t=this.tokenizer.rules.inline.reflinkSearch.exec(s))!=null;)a.includes(t[0].slice(t[0].lastIndexOf("[")+1,-1))&&(s=s.slice(0,t.index)+"["+"a".repeat(t[0].length-2)+"]"+s.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(t=this.tokenizer.rules.inline.anyPunctuation.exec(s))!=null;)s=s.slice(0,t.index)+"++"+s.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);for(;(t=this.tokenizer.rules.inline.blockSkip.exec(s))!=null;)s=s.slice(0,t.index)+"["+"a".repeat(t[0].length-2)+"]"+s.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);let l=!1,o="";for(;e;){l||(o=""),l=!1;let a;if(this.options.extensions?.inline?.some(c=>(a=c.call({lexer:this},e,n))?(e=e.substring(a.raw.length),n.push(a),!0):!1))continue;if(a=this.tokenizer.escape(e)){e=e.substring(a.raw.length),n.push(a);continue}if(a=this.tokenizer.tag(e)){e=e.substring(a.raw.length),n.push(a);continue}if(a=this.tokenizer.link(e)){e=e.substring(a.raw.length),n.push(a);continue}if(a=this.tokenizer.reflink(e,this.tokens.links)){e=e.substring(a.raw.length);let c=n.at(-1);a.type==="text"&&c?.type==="text"?(c.raw+=a.raw,c.text+=a.text):n.push(a);continue}if(a=this.tokenizer.emStrong(e,s,o)){e=e.substring(a.raw.length),n.push(a);continue}if(a=this.tokenizer.codespan(e)){e=e.substring(a.raw.length),n.push(a);continue}if(a=this.tokenizer.br(e)){e=e.substring(a.raw.length),n.push(a);continue}if(a=this.tokenizer.del(e)){e=e.substring(a.raw.length),n.push(a);continue}if(a=this.tokenizer.autolink(e)){e=e.substring(a.raw.length),n.push(a);continue}if(!this.state.inLink&&(a=this.tokenizer.url(e))){e=e.substring(a.raw.length),n.push(a);continue}let u=e;if(this.options.extensions?.startInline){let c=1/0,h=e.slice(1),x;this.options.extensions.startInline.forEach(d=>{x=d.call({lexer:this},h),typeof x=="number"&&x>=0&&(c=Math.min(c,x))}),c<1/0&&c>=0&&(u=e.substring(0,c+1))}if(a=this.tokenizer.inlineText(u)){e=e.substring(a.raw.length),a.raw.slice(-1)!=="_"&&(o=a.raw.slice(-1)),l=!0;let c=n.at(-1);c?.type==="text"?(c.raw+=a.raw,c.text+=a.text):n.push(a);continue}if(e){let c="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(c);break}else throw new Error(c)}}return n}},st=class{options;parser;constructor(r){this.options=r||ke}space(r){return""}code({text:r,lang:e,escaped:n}){let s=(e||"").match(H.notSpaceStart)?.[0],t=r.replace(H.endingNewline,"")+`
|
|
`;return s?'<pre><code class="language-'+ee(s)+'">'+(n?t:ee(t,!0))+`</code></pre>
|
|
`:"<pre><code>"+(n?t:ee(t,!0))+`</code></pre>
|
|
`}blockquote({tokens:r}){return`<blockquote>
|
|
${this.parser.parse(r)}</blockquote>
|
|
`}html({text:r}){return r}heading({tokens:r,depth:e}){return`<h${e}>${this.parser.parseInline(r)}</h${e}>
|
|
`}hr(r){return`<hr>
|
|
`}list(r){let e=r.ordered,n=r.start,s="";for(let o=0;o<r.items.length;o++){let a=r.items[o];s+=this.listitem(a)}let t=e?"ol":"ul",l=e&&n!==1?' start="'+n+'"':"";return"<"+t+l+`>
|
|
`+s+"</"+t+`>
|
|
`}listitem(r){let e="";if(r.task){let n=this.checkbox({checked:!!r.checked});r.loose?r.tokens[0]?.type==="paragraph"?(r.tokens[0].text=n+" "+r.tokens[0].text,r.tokens[0].tokens&&r.tokens[0].tokens.length>0&&r.tokens[0].tokens[0].type==="text"&&(r.tokens[0].tokens[0].text=n+" "+ee(r.tokens[0].tokens[0].text),r.tokens[0].tokens[0].escaped=!0)):r.tokens.unshift({type:"text",raw:n+" ",text:n+" ",escaped:!0}):e+=n+" "}return e+=this.parser.parse(r.tokens,!!r.loose),`<li>${e}</li>
|
|
`}checkbox({checked:r}){return"<input "+(r?'checked="" ':"")+'disabled="" type="checkbox">'}paragraph({tokens:r}){return`<p>${this.parser.parseInline(r)}</p>
|
|
`}table(r){let e="",n="";for(let t=0;t<r.header.length;t++)n+=this.tablecell(r.header[t]);e+=this.tablerow({text:n});let s="";for(let t=0;t<r.rows.length;t++){let l=r.rows[t];n="";for(let o=0;o<l.length;o++)n+=this.tablecell(l[o]);s+=this.tablerow({text:n})}return s&&(s=`<tbody>${s}</tbody>`),`<table>
|
|
<thead>
|
|
`+e+`</thead>
|
|
`+s+`</table>
|
|
`}tablerow({text:r}){return`<tr>
|
|
${r}</tr>
|
|
`}tablecell(r){let e=this.parser.parseInline(r.tokens),n=r.header?"th":"td";return(r.align?`<${n} align="${r.align}">`:`<${n}>`)+e+`</${n}>
|
|
`}strong({tokens:r}){return`<strong>${this.parser.parseInline(r)}</strong>`}em({tokens:r}){return`<em>${this.parser.parseInline(r)}</em>`}codespan({text:r}){return`<code>${ee(r,!0)}</code>`}br(r){return"<br>"}del({tokens:r}){return`<del>${this.parser.parseInline(r)}</del>`}link({href:r,title:e,tokens:n}){let s=this.parser.parseInline(n),t=yn(r);if(t===null)return s;r=t;let l='<a href="'+r+'"';return e&&(l+=' title="'+ee(e)+'"'),l+=">"+s+"</a>",l}image({href:r,title:e,text:n,tokens:s}){s&&(n=this.parser.parseInline(s,this.parser.textRenderer));let t=yn(r);if(t===null)return ee(n);r=t;let l=`<img src="${r}" alt="${n}"`;return e&&(l+=` title="${ee(e)}"`),l+=">",l}text(r){return"tokens"in r&&r.tokens?this.parser.parseInline(r.tokens):"escaped"in r&&r.escaped?r.text:ee(r.text)}},Ht=class{strong({text:r}){return r}em({text:r}){return r}codespan({text:r}){return r}del({text:r}){return r}html({text:r}){return r}text({text:r}){return r}link({text:r}){return""+r}image({text:r}){return""+r}br(){return""}},pe=class It{options;renderer;textRenderer;constructor(e){this.options=e||ke,this.options.renderer=this.options.renderer||new st,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new Ht}static parse(e,n){return new It(n).parse(e)}static parseInline(e,n){return new It(n).parseInline(e)}parse(e,n=!0){let s="";for(let t=0;t<e.length;t++){let l=e[t];if(this.options.extensions?.renderers?.[l.type]){let a=l,u=this.options.extensions.renderers[a.type].call({parser:this},a);if(u!==!1||!["space","hr","heading","code","table","blockquote","list","html","paragraph","text"].includes(a.type)){s+=u||"";continue}}let o=l;switch(o.type){case"space":{s+=this.renderer.space(o);continue}case"hr":{s+=this.renderer.hr(o);continue}case"heading":{s+=this.renderer.heading(o);continue}case"code":{s+=this.renderer.code(o);continue}case"table":{s+=this.renderer.table(o);continue}case"blockquote":{s+=this.renderer.blockquote(o);continue}case"list":{s+=this.renderer.list(o);continue}case"html":{s+=this.renderer.html(o);continue}case"paragraph":{s+=this.renderer.paragraph(o);continue}case"text":{let a=o,u=this.renderer.text(a);for(;t+1<e.length&&e[t+1].type==="text";)a=e[++t],u+=`
|
|
`+this.renderer.text(a);n?s+=this.renderer.paragraph({type:"paragraph",raw:u,text:u,tokens:[{type:"text",raw:u,text:u,escaped:!0}]}):s+=u;continue}default:{let a='Token with "'+o.type+'" type was not found.';if(this.options.silent)return console.error(a),"";throw new Error(a)}}}return s}parseInline(e,n=this.renderer){let s="";for(let t=0;t<e.length;t++){let l=e[t];if(this.options.extensions?.renderers?.[l.type]){let a=this.options.extensions.renderers[l.type].call({parser:this},l);if(a!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(l.type)){s+=a||"";continue}}let o=l;switch(o.type){case"escape":{s+=n.text(o);break}case"html":{s+=n.html(o);break}case"link":{s+=n.link(o);break}case"image":{s+=n.image(o);break}case"strong":{s+=n.strong(o);break}case"em":{s+=n.em(o);break}case"codespan":{s+=n.codespan(o);break}case"br":{s+=n.br(o);break}case"del":{s+=n.del(o);break}case"text":{s+=n.text(o);break}default:{let a='Token with "'+o.type+'" type was not found.';if(this.options.silent)return console.error(a),"";throw new Error(a)}}}return s}},et=class{options;block;constructor(r){this.options=r||ke}static passThroughHooks=new Set(["preprocess","postprocess","processAllTokens"]);preprocess(r){return r}postprocess(r){return r}processAllTokens(r){return r}provideLexer(){return this.block?ue.lex:ue.lexInline}provideParser(){return this.block?pe.parse:pe.parseInline}},gs=class{defaults=Mt();options=this.setOptions;parse=this.parseMarkdown(!0);parseInline=this.parseMarkdown(!1);Parser=pe;Renderer=st;TextRenderer=Ht;Lexer=ue;Tokenizer=rt;Hooks=et;constructor(...r){this.use(...r)}walkTokens(r,e){let n=[];for(let s of r)switch(n=n.concat(e.call(this,s)),s.type){case"table":{let t=s;for(let l of t.header)n=n.concat(this.walkTokens(l.tokens,e));for(let l of t.rows)for(let o of l)n=n.concat(this.walkTokens(o.tokens,e));break}case"list":{let t=s;n=n.concat(this.walkTokens(t.items,e));break}default:{let t=s;this.defaults.extensions?.childTokens?.[t.type]?this.defaults.extensions.childTokens[t.type].forEach(l=>{let o=t[l].flat(1/0);n=n.concat(this.walkTokens(o,e))}):t.tokens&&(n=n.concat(this.walkTokens(t.tokens,e)))}}return n}use(...r){let e=this.defaults.extensions||{renderers:{},childTokens:{}};return r.forEach(n=>{let s={...n};if(s.async=this.defaults.async||s.async||!1,n.extensions&&(n.extensions.forEach(t=>{if(!t.name)throw new Error("extension name required");if("renderer"in t){let l=e.renderers[t.name];l?e.renderers[t.name]=function(...o){let a=t.renderer.apply(this,o);return a===!1&&(a=l.apply(this,o)),a}:e.renderers[t.name]=t.renderer}if("tokenizer"in t){if(!t.level||t.level!=="block"&&t.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");let l=e[t.level];l?l.unshift(t.tokenizer):e[t.level]=[t.tokenizer],t.start&&(t.level==="block"?e.startBlock?e.startBlock.push(t.start):e.startBlock=[t.start]:t.level==="inline"&&(e.startInline?e.startInline.push(t.start):e.startInline=[t.start]))}"childTokens"in t&&t.childTokens&&(e.childTokens[t.name]=t.childTokens)}),s.extensions=e),n.renderer){let t=this.defaults.renderer||new st(this.defaults);for(let l in n.renderer){if(!(l in t))throw new Error(`renderer '${l}' does not exist`);if(["options","parser"].includes(l))continue;let o=l,a=n.renderer[o],u=t[o];t[o]=(...c)=>{let h=a.apply(t,c);return h===!1&&(h=u.apply(t,c)),h||""}}s.renderer=t}if(n.tokenizer){let t=this.defaults.tokenizer||new rt(this.defaults);for(let l in n.tokenizer){if(!(l in t))throw new Error(`tokenizer '${l}' does not exist`);if(["options","rules","lexer"].includes(l))continue;let o=l,a=n.tokenizer[o],u=t[o];t[o]=(...c)=>{let h=a.apply(t,c);return h===!1&&(h=u.apply(t,c)),h}}s.tokenizer=t}if(n.hooks){let t=this.defaults.hooks||new et;for(let l in n.hooks){if(!(l in t))throw new Error(`hook '${l}' does not exist`);if(["options","block"].includes(l))continue;let o=l,a=n.hooks[o],u=t[o];et.passThroughHooks.has(l)?t[o]=c=>{if(this.defaults.async)return Promise.resolve(a.call(t,c)).then(x=>u.call(t,x));let h=a.call(t,c);return u.call(t,h)}:t[o]=(...c)=>{let h=a.apply(t,c);return h===!1&&(h=u.apply(t,c)),h}}s.hooks=t}if(n.walkTokens){let t=this.defaults.walkTokens,l=n.walkTokens;s.walkTokens=function(o){let a=[];return a.push(l.call(this,o)),t&&(a=a.concat(t.call(this,o))),a}}this.defaults={...this.defaults,...s}}),this}setOptions(r){return this.defaults={...this.defaults,...r},this}lexer(r,e){return ue.lex(r,e??this.defaults)}parser(r,e){return pe.parse(r,e??this.defaults)}parseMarkdown(r){return(e,n)=>{let s={...n},t={...this.defaults,...s},l=this.onError(!!t.silent,!!t.async);if(this.defaults.async===!0&&s.async===!1)return l(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(typeof e>"u"||e===null)return l(new Error("marked(): input parameter is undefined or null"));if(typeof e!="string")return l(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(e)+", string expected"));t.hooks&&(t.hooks.options=t,t.hooks.block=r);let o=t.hooks?t.hooks.provideLexer():r?ue.lex:ue.lexInline,a=t.hooks?t.hooks.provideParser():r?pe.parse:pe.parseInline;if(t.async)return Promise.resolve(t.hooks?t.hooks.preprocess(e):e).then(u=>o(u,t)).then(u=>t.hooks?t.hooks.processAllTokens(u):u).then(u=>t.walkTokens?Promise.all(this.walkTokens(u,t.walkTokens)).then(()=>u):u).then(u=>a(u,t)).then(u=>t.hooks?t.hooks.postprocess(u):u).catch(l);try{t.hooks&&(e=t.hooks.preprocess(e));let u=o(e,t);t.hooks&&(u=t.hooks.processAllTokens(u)),t.walkTokens&&this.walkTokens(u,t.walkTokens);let c=a(u,t);return t.hooks&&(c=t.hooks.postprocess(c)),c}catch(u){return l(u)}}}onError(r,e){return n=>{if(n.message+=`
|
|
Please report this to https://github.com/markedjs/marked.`,r){let s="<p>An error occurred:</p><pre>"+ee(n.message+"",!0)+"</pre>";return e?Promise.resolve(s):s}if(e)return Promise.reject(n);throw n}}},xe=new gs;function E(r,e){return xe.parse(r,e)}E.options=E.setOptions=function(r){return xe.setOptions(r),E.defaults=xe.defaults,On(E.defaults),E};E.getDefaults=Mt;E.defaults=ke;E.use=function(...r){return xe.use(...r),E.defaults=xe.defaults,On(E.defaults),E};E.walkTokens=function(r,e){return xe.walkTokens(r,e)};E.parseInline=xe.parseInline;E.Parser=pe;E.parser=pe.parse;E.Renderer=st;E.TextRenderer=Ht;E.Lexer=ue;E.lexer=ue.lex;E.Tokenizer=rt;E.Hooks=et;E.parse=E;E.options;E.setOptions;E.use;E.walkTokens;E.parseInline;pe.parse;ue.lex;/*! @license DOMPurify 3.2.6 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.2.6/LICENSE */const{entries:qn,setPrototypeOf:vn,isFrozen:ms,getPrototypeOf:xs,getOwnPropertyDescriptor:ks}=Object;let{freeze:G,seal:X,create:Wn}=Object,{apply:Dt,construct:Ot}=typeof Reflect<"u"&&Reflect;G||(G=function(e){return e});X||(X=function(e){return e});Dt||(Dt=function(e,n,s){return e.apply(n,s)});Ot||(Ot=function(e,n){return new e(...n)});const Qe=q(Array.prototype.forEach),bs=q(Array.prototype.lastIndexOf),An=q(Array.prototype.pop),Me=q(Array.prototype.push),ws=q(Array.prototype.splice),tt=q(String.prototype.toLowerCase),vt=q(String.prototype.toString),En=q(String.prototype.match),Ne=q(String.prototype.replace),ys=q(String.prototype.indexOf),_s=q(String.prototype.trim),Y=q(Object.prototype.hasOwnProperty),B=q(RegExp.prototype.test),Pe=Ts(TypeError);function q(r){return function(e){e instanceof RegExp&&(e.lastIndex=0);for(var n=arguments.length,s=new Array(n>1?n-1:0),t=1;t<n;t++)s[t-1]=arguments[t];return Dt(r,e,s)}}function Ts(r){return function(){for(var e=arguments.length,n=new Array(e),s=0;s<e;s++)n[s]=arguments[s];return Ot(r,n)}}function y(r,e){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:tt;vn&&vn(r,null);let s=e.length;for(;s--;){let t=e[s];if(typeof t=="string"){const l=n(t);l!==t&&(ms(e)||(e[s]=l),t=l)}r[t]=!0}return r}function vs(r){for(let e=0;e<r.length;e++)Y(r,e)||(r[e]=null);return r}function ce(r){const e=Wn(null);for(const[n,s]of qn(r))Y(r,n)&&(Array.isArray(s)?e[n]=vs(s):s&&typeof s=="object"&&s.constructor===Object?e[n]=ce(s):e[n]=s);return e}function ze(r,e){for(;r!==null;){const s=ks(r,e);if(s){if(s.get)return q(s.get);if(typeof s.value=="function")return q(s.value)}r=xs(r)}function n(){return null}return n}const Sn=G(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),At=G(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),Et=G(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),As=G(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),St=G(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),Es=G(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),Rn=G(["#text"]),Ln=G(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns","slot"]),Rt=G(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),Cn=G(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),Ke=G(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),Ss=X(/\{\{[\w\W]*|[\w\W]*\}\}/gm),Rs=X(/<%[\w\W]*|[\w\W]*%>/gm),Ls=X(/\$\{[\w\W]*/gm),Cs=X(/^data-[\-\w.\u00B7-\uFFFF]+$/),Is=X(/^aria-[\-\w]+$/),jn=X(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),Ds=X(/^(?:\w+script|data):/i),Os=X(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),Zn=X(/^html$/i),Ms=X(/^[a-z][.\w]*(-[.\w]+)+$/i);var In=Object.freeze({__proto__:null,ARIA_ATTR:Is,ATTR_WHITESPACE:Os,CUSTOM_ELEMENT:Ms,DATA_ATTR:Cs,DOCTYPE_NAME:Zn,ERB_EXPR:Rs,IS_ALLOWED_URI:jn,IS_SCRIPT_OR_DATA:Ds,MUSTACHE_EXPR:Ss,TMPLIT_EXPR:Ls});const $e={element:1,text:3,progressingInstruction:7,comment:8,document:9},Ns=function(){return typeof window>"u"?null:window},Ps=function(e,n){if(typeof e!="object"||typeof e.createPolicy!="function")return null;let s=null;const t="data-tt-policy-suffix";n&&n.hasAttribute(t)&&(s=n.getAttribute(t));const l="dompurify"+(s?"#"+s:"");try{return e.createPolicy(l,{createHTML(o){return o},createScriptURL(o){return o}})}catch{return console.warn("TrustedTypes policy "+l+" could not be created."),null}},Dn=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};function Xn(){let r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Ns();const e=k=>Xn(k);if(e.version="3.2.6",e.removed=[],!r||!r.document||r.document.nodeType!==$e.document||!r.Element)return e.isSupported=!1,e;let{document:n}=r;const s=n,t=s.currentScript,{DocumentFragment:l,HTMLTemplateElement:o,Node:a,Element:u,NodeFilter:c,NamedNodeMap:h=r.NamedNodeMap||r.MozNamedAttrMap,HTMLFormElement:x,DOMParser:d,trustedTypes:_}=r,v=u.prototype,O=ze(v,"cloneNode"),Z=ze(v,"remove"),V=ze(v,"nextSibling"),Q=ze(v,"childNodes"),$=ze(v,"parentNode");if(typeof o=="function"){const k=n.createElement("template");k.content&&k.content.ownerDocument&&(n=k.content.ownerDocument)}let I,te="";const{implementation:ne,createNodeIterator:K,createDocumentFragment:at,getElementsByTagName:ct}=n,{importNode:ut}=s;let D=Dn();e.isSupported=typeof qn=="function"&&typeof $=="function"&&ne&&ne.createHTMLDocument!==void 0;const{MUSTACHE_EXPR:he,ERB_EXPR:Ee,TMPLIT_EXPR:w,DATA_ATTR:m,ARIA_ATTR:j,IS_SCRIPT_OR_DATA:R,ATTR_WHITESPACE:fe,CUSTOM_ELEMENT:pt}=In;let{IS_ALLOWED_URI:Gt}=In,N=null;const qt=y({},[...Sn,...At,...Et,...St,...Rn]);let z=null;const Wt=y({},[...Ln,...Rt,...Cn,...Ke]);let L=Object.seal(Wn(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),Se=null,ht=null,jt=!0,ft=!0,Zt=!1,Xt=!0,be=!1,Be=!0,ge=!1,dt=!1,gt=!1,we=!1,He=!1,Ge=!1,Yt=!0,Vt=!1;const Yn="user-content-";let mt=!0,Re=!1,ye={},_e=null;const Qt=y({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let Kt=null;const Jt=y({},["audio","video","img","source","image","track"]);let xt=null;const en=y({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),qe="http://www.w3.org/1998/Math/MathML",We="http://www.w3.org/2000/svg",re="http://www.w3.org/1999/xhtml";let Te=re,kt=!1,bt=null;const Vn=y({},[qe,We,re],vt);let je=y({},["mi","mo","mn","ms","mtext"]),Ze=y({},["annotation-xml"]);const Qn=y({},["title","style","font","a","script"]);let Le=null;const Kn=["application/xhtml+xml","text/html"],Jn="text/html";let P=null,ve=null;const er=n.createElement("form"),tn=function(i){return i instanceof RegExp||i instanceof Function},wt=function(){let i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(ve&&ve===i)){if((!i||typeof i!="object")&&(i={}),i=ce(i),Le=Kn.indexOf(i.PARSER_MEDIA_TYPE)===-1?Jn:i.PARSER_MEDIA_TYPE,P=Le==="application/xhtml+xml"?vt:tt,N=Y(i,"ALLOWED_TAGS")?y({},i.ALLOWED_TAGS,P):qt,z=Y(i,"ALLOWED_ATTR")?y({},i.ALLOWED_ATTR,P):Wt,bt=Y(i,"ALLOWED_NAMESPACES")?y({},i.ALLOWED_NAMESPACES,vt):Vn,xt=Y(i,"ADD_URI_SAFE_ATTR")?y(ce(en),i.ADD_URI_SAFE_ATTR,P):en,Kt=Y(i,"ADD_DATA_URI_TAGS")?y(ce(Jt),i.ADD_DATA_URI_TAGS,P):Jt,_e=Y(i,"FORBID_CONTENTS")?y({},i.FORBID_CONTENTS,P):Qt,Se=Y(i,"FORBID_TAGS")?y({},i.FORBID_TAGS,P):ce({}),ht=Y(i,"FORBID_ATTR")?y({},i.FORBID_ATTR,P):ce({}),ye=Y(i,"USE_PROFILES")?i.USE_PROFILES:!1,jt=i.ALLOW_ARIA_ATTR!==!1,ft=i.ALLOW_DATA_ATTR!==!1,Zt=i.ALLOW_UNKNOWN_PROTOCOLS||!1,Xt=i.ALLOW_SELF_CLOSE_IN_ATTR!==!1,be=i.SAFE_FOR_TEMPLATES||!1,Be=i.SAFE_FOR_XML!==!1,ge=i.WHOLE_DOCUMENT||!1,we=i.RETURN_DOM||!1,He=i.RETURN_DOM_FRAGMENT||!1,Ge=i.RETURN_TRUSTED_TYPE||!1,gt=i.FORCE_BODY||!1,Yt=i.SANITIZE_DOM!==!1,Vt=i.SANITIZE_NAMED_PROPS||!1,mt=i.KEEP_CONTENT!==!1,Re=i.IN_PLACE||!1,Gt=i.ALLOWED_URI_REGEXP||jn,Te=i.NAMESPACE||re,je=i.MATHML_TEXT_INTEGRATION_POINTS||je,Ze=i.HTML_INTEGRATION_POINTS||Ze,L=i.CUSTOM_ELEMENT_HANDLING||{},i.CUSTOM_ELEMENT_HANDLING&&tn(i.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(L.tagNameCheck=i.CUSTOM_ELEMENT_HANDLING.tagNameCheck),i.CUSTOM_ELEMENT_HANDLING&&tn(i.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(L.attributeNameCheck=i.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),i.CUSTOM_ELEMENT_HANDLING&&typeof i.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(L.allowCustomizedBuiltInElements=i.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),be&&(ft=!1),He&&(we=!0),ye&&(N=y({},Rn),z=[],ye.html===!0&&(y(N,Sn),y(z,Ln)),ye.svg===!0&&(y(N,At),y(z,Rt),y(z,Ke)),ye.svgFilters===!0&&(y(N,Et),y(z,Rt),y(z,Ke)),ye.mathMl===!0&&(y(N,St),y(z,Cn),y(z,Ke))),i.ADD_TAGS&&(N===qt&&(N=ce(N)),y(N,i.ADD_TAGS,P)),i.ADD_ATTR&&(z===Wt&&(z=ce(z)),y(z,i.ADD_ATTR,P)),i.ADD_URI_SAFE_ATTR&&y(xt,i.ADD_URI_SAFE_ATTR,P),i.FORBID_CONTENTS&&(_e===Qt&&(_e=ce(_e)),y(_e,i.FORBID_CONTENTS,P)),mt&&(N["#text"]=!0),ge&&y(N,["html","head","body"]),N.table&&(y(N,["tbody"]),delete Se.tbody),i.TRUSTED_TYPES_POLICY){if(typeof i.TRUSTED_TYPES_POLICY.createHTML!="function")throw Pe('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof i.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw Pe('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');I=i.TRUSTED_TYPES_POLICY,te=I.createHTML("")}else I===void 0&&(I=Ps(_,t)),I!==null&&typeof te=="string"&&(te=I.createHTML(""));G&&G(i),ve=i}},nn=y({},[...At,...Et,...As]),rn=y({},[...St,...Es]),tr=function(i){let p=$(i);(!p||!p.tagName)&&(p={namespaceURI:Te,tagName:"template"});const g=tt(i.tagName),S=tt(p.tagName);return bt[i.namespaceURI]?i.namespaceURI===We?p.namespaceURI===re?g==="svg":p.namespaceURI===qe?g==="svg"&&(S==="annotation-xml"||je[S]):!!nn[g]:i.namespaceURI===qe?p.namespaceURI===re?g==="math":p.namespaceURI===We?g==="math"&&Ze[S]:!!rn[g]:i.namespaceURI===re?p.namespaceURI===We&&!Ze[S]||p.namespaceURI===qe&&!je[S]?!1:!rn[g]&&(Qn[g]||!nn[g]):!!(Le==="application/xhtml+xml"&&bt[i.namespaceURI]):!1},J=function(i){Me(e.removed,{element:i});try{$(i).removeChild(i)}catch{Z(i)}},Ae=function(i,p){try{Me(e.removed,{attribute:p.getAttributeNode(i),from:p})}catch{Me(e.removed,{attribute:null,from:p})}if(p.removeAttribute(i),i==="is")if(we||He)try{J(p)}catch{}else try{p.setAttribute(i,"")}catch{}},sn=function(i){let p=null,g=null;if(gt)i="<remove></remove>"+i;else{const M=En(i,/^[\r\n\t ]+/);g=M&&M[0]}Le==="application/xhtml+xml"&&Te===re&&(i='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+i+"</body></html>");const S=I?I.createHTML(i):i;if(Te===re)try{p=new d().parseFromString(S,Le)}catch{}if(!p||!p.documentElement){p=ne.createDocument(Te,"template",null);try{p.documentElement.innerHTML=kt?te:S}catch{}}const U=p.body||p.documentElement;return i&&g&&U.insertBefore(n.createTextNode(g),U.childNodes[0]||null),Te===re?ct.call(p,ge?"html":"body")[0]:ge?p.documentElement:U},on=function(i){return K.call(i.ownerDocument||i,i,c.SHOW_ELEMENT|c.SHOW_COMMENT|c.SHOW_TEXT|c.SHOW_PROCESSING_INSTRUCTION|c.SHOW_CDATA_SECTION,null)},yt=function(i){return i instanceof x&&(typeof i.nodeName!="string"||typeof i.textContent!="string"||typeof i.removeChild!="function"||!(i.attributes instanceof h)||typeof i.removeAttribute!="function"||typeof i.setAttribute!="function"||typeof i.namespaceURI!="string"||typeof i.insertBefore!="function"||typeof i.hasChildNodes!="function")},ln=function(i){return typeof a=="function"&&i instanceof a};function se(k,i,p){Qe(k,g=>{g.call(e,i,p,ve)})}const an=function(i){let p=null;if(se(D.beforeSanitizeElements,i,null),yt(i))return J(i),!0;const g=P(i.nodeName);if(se(D.uponSanitizeElement,i,{tagName:g,allowedTags:N}),Be&&i.hasChildNodes()&&!ln(i.firstElementChild)&&B(/<[/\w!]/g,i.innerHTML)&&B(/<[/\w!]/g,i.textContent)||i.nodeType===$e.progressingInstruction||Be&&i.nodeType===$e.comment&&B(/<[/\w]/g,i.data))return J(i),!0;if(!N[g]||Se[g]){if(!Se[g]&&un(g)&&(L.tagNameCheck instanceof RegExp&&B(L.tagNameCheck,g)||L.tagNameCheck instanceof Function&&L.tagNameCheck(g)))return!1;if(mt&&!_e[g]){const S=$(i)||i.parentNode,U=Q(i)||i.childNodes;if(U&&S){const M=U.length;for(let W=M-1;W>=0;--W){const ie=O(U[W],!0);ie.__removalCount=(i.__removalCount||0)+1,S.insertBefore(ie,V(i))}}}return J(i),!0}return i instanceof u&&!tr(i)||(g==="noscript"||g==="noembed"||g==="noframes")&&B(/<\/no(script|embed|frames)/i,i.innerHTML)?(J(i),!0):(be&&i.nodeType===$e.text&&(p=i.textContent,Qe([he,Ee,w],S=>{p=Ne(p,S," ")}),i.textContent!==p&&(Me(e.removed,{element:i.cloneNode()}),i.textContent=p)),se(D.afterSanitizeElements,i,null),!1)},cn=function(i,p,g){if(Yt&&(p==="id"||p==="name")&&(g in n||g in er))return!1;if(!(ft&&!ht[p]&&B(m,p))){if(!(jt&&B(j,p))){if(!z[p]||ht[p]){if(!(un(i)&&(L.tagNameCheck instanceof RegExp&&B(L.tagNameCheck,i)||L.tagNameCheck instanceof Function&&L.tagNameCheck(i))&&(L.attributeNameCheck instanceof RegExp&&B(L.attributeNameCheck,p)||L.attributeNameCheck instanceof Function&&L.attributeNameCheck(p))||p==="is"&&L.allowCustomizedBuiltInElements&&(L.tagNameCheck instanceof RegExp&&B(L.tagNameCheck,g)||L.tagNameCheck instanceof Function&&L.tagNameCheck(g))))return!1}else if(!xt[p]){if(!B(Gt,Ne(g,fe,""))){if(!((p==="src"||p==="xlink:href"||p==="href")&&i!=="script"&&ys(g,"data:")===0&&Kt[i])){if(!(Zt&&!B(R,Ne(g,fe,"")))){if(g)return!1}}}}}}return!0},un=function(i){return i!=="annotation-xml"&&En(i,pt)},pn=function(i){se(D.beforeSanitizeAttributes,i,null);const{attributes:p}=i;if(!p||yt(i))return;const g={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:z,forceKeepAttr:void 0};let S=p.length;for(;S--;){const U=p[S],{name:M,namespaceURI:W,value:ie}=U,Ce=P(M),_t=ie;let F=M==="value"?_t:_s(_t);if(g.attrName=Ce,g.attrValue=F,g.keepAttr=!0,g.forceKeepAttr=void 0,se(D.uponSanitizeAttribute,i,g),F=g.attrValue,Vt&&(Ce==="id"||Ce==="name")&&(Ae(M,i),F=Yn+F),Be&&B(/((--!?|])>)|<\/(style|title)/i,F)){Ae(M,i);continue}if(g.forceKeepAttr)continue;if(!g.keepAttr){Ae(M,i);continue}if(!Xt&&B(/\/>/i,F)){Ae(M,i);continue}be&&Qe([he,Ee,w],fn=>{F=Ne(F,fn," ")});const hn=P(i.nodeName);if(!cn(hn,Ce,F)){Ae(M,i);continue}if(I&&typeof _=="object"&&typeof _.getAttributeType=="function"&&!W)switch(_.getAttributeType(hn,Ce)){case"TrustedHTML":{F=I.createHTML(F);break}case"TrustedScriptURL":{F=I.createScriptURL(F);break}}if(F!==_t)try{W?i.setAttributeNS(W,M,F):i.setAttribute(M,F),yt(i)?J(i):An(e.removed)}catch{Ae(M,i)}}se(D.afterSanitizeAttributes,i,null)},nr=function k(i){let p=null;const g=on(i);for(se(D.beforeSanitizeShadowDOM,i,null);p=g.nextNode();)se(D.uponSanitizeShadowNode,p,null),an(p),pn(p),p.content instanceof l&&k(p.content);se(D.afterSanitizeShadowDOM,i,null)};return e.sanitize=function(k){let i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},p=null,g=null,S=null,U=null;if(kt=!k,kt&&(k="<!-->"),typeof k!="string"&&!ln(k))if(typeof k.toString=="function"){if(k=k.toString(),typeof k!="string")throw Pe("dirty is not a string, aborting")}else throw Pe("toString is not a function");if(!e.isSupported)return k;if(dt||wt(i),e.removed=[],typeof k=="string"&&(Re=!1),Re){if(k.nodeName){const ie=P(k.nodeName);if(!N[ie]||Se[ie])throw Pe("root node is forbidden and cannot be sanitized in-place")}}else if(k instanceof a)p=sn("<!---->"),g=p.ownerDocument.importNode(k,!0),g.nodeType===$e.element&&g.nodeName==="BODY"||g.nodeName==="HTML"?p=g:p.appendChild(g);else{if(!we&&!be&&!ge&&k.indexOf("<")===-1)return I&&Ge?I.createHTML(k):k;if(p=sn(k),!p)return we?null:Ge?te:""}p&>&&J(p.firstChild);const M=on(Re?k:p);for(;S=M.nextNode();)an(S),pn(S),S.content instanceof l&&nr(S.content);if(Re)return k;if(we){if(He)for(U=at.call(p.ownerDocument);p.firstChild;)U.appendChild(p.firstChild);else U=p;return(z.shadowroot||z.shadowrootmode)&&(U=ut.call(s,U,!0)),U}let W=ge?p.outerHTML:p.innerHTML;return ge&&N["!doctype"]&&p.ownerDocument&&p.ownerDocument.doctype&&p.ownerDocument.doctype.name&&B(Zn,p.ownerDocument.doctype.name)&&(W="<!DOCTYPE "+p.ownerDocument.doctype.name+`>
|
|
`+W),be&&Qe([he,Ee,w],ie=>{W=Ne(W,ie," ")}),I&&Ge?I.createHTML(W):W},e.setConfig=function(){let k=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};wt(k),dt=!0},e.clearConfig=function(){ve=null,dt=!1},e.isValidAttribute=function(k,i,p){ve||wt({});const g=P(k),S=P(i);return cn(g,S,p)},e.addHook=function(k,i){typeof i=="function"&&Me(D[k],i)},e.removeHook=function(k,i){if(i!==void 0){const p=bs(D[k],i);return p===-1?void 0:ws(D[k],p,1)[0]}return An(D[k])},e.removeHooks=function(k){D[k]=[]},e.removeAllHooks=function(){D=Dn()},e}var zs=Xn();const $s={class:"min-h-screen flex items-center justify-center p-4 overflow-hidden transition-colors duration-300"},Us={class:"w-full max-w-md relative z-10"},Fs={class:"p-8"},Bs={class:"flex justify-center mb-8"},Hs={class:"rounded-full bg-gradient-to-r from-indigo-500 via-purple-500 to-pink-500 p-1 animate-spin-slow"},Gs={class:"rounded-full bg-gray-900 p-2"},qs={class:"mb-6 relative"},Ws={class:"relative"},js=["readonly"],Zs={key:0,class:"absolute inset-y-0 right-0 flex items-center pr-3"},Xs=["disabled"],Ys={class:"flex items-center justify-center relative z-10"},Vs={class:"mt-6 text-center"},Qs={class:"flex-grow overflow-y-auto p-6"},Ks={class:"flex-shrink-0 mr-4"},Js={class:"flex-grow min-w-0 mr-4"},ei={class:"flex-shrink-0 flex space-x-2"},ti=["onClick"],ni=["onClick"],ri=["onClick"],si={key:0,class:"fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50"},ii={class:"space-y-4"},oi={class:"flex items-center"},li={class:"flex items-center"},ai={class:"flex items-center"},ci={class:"flex items-center"},ui={key:0,class:"ml-2"},pi={key:1},hi=["href"],fi={class:"mt-6 flex flex-col items-center"},di={class:"bg-white p-2 rounded-lg shadow-md"},gi={key:0,class:"fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50"},mi={class:"flex justify-between items-center mb-4 flex-shrink-0"},xi={class:"flex items-center gap-3"},ki={class:"flex-1 overflow-y-auto custom-scrollbar"},bi=["innerHTML"],wi=rr({__name:"RetrievewFileView",setup(r){const e=sr(),n=window.location.origin,s=fr(),t=ar("isDarkMode"),l=br(),{receiveData:o}=ir(l),a=oe(""),u=oe({readonly:!1,loading:!1}),c=oe(!1),h=oe(""),x=oe(null),d=oe(!1),_=lr(),v=o,O=JSON.parse(localStorage.getItem("config")||"{}"),Z=oe(null);or(()=>{Z.value&&Z.value.focus();const w=_.query.code;w&&typeof w=="string"&&(a.value=w)}),dn(a,w=>{w.length===5&&$()});const V=w=>w.downloadUrl?w.downloadUrl.startsWith("http")?w.downloadUrl:`${n}${w.downloadUrl}`:"",Q=async()=>{x.value&&x.value.content&&await Tr(x.value.content,{successMsg:"内容已复制到剪贴板",errorMsg:"复制失败,请重试"})},$=async()=>{if(a.value.length!==5){e.showAlert("请输入5位取件码","error");return}u.value.readonly=!0,u.value.loading=!0;try{const w=await xr.post("/share/select/",{code:a.value}),m=w.data||w;if(m&&m.code===200)if(m.detail){const j=m.detail.text.startsWith("/share/download")||m.detail.name!=="Text",R={id:Date.now(),code:m.detail.code,filename:m.detail.name,size:I(m.detail.size),downloadUrl:j?m.detail.text:null,content:j?null:m.detail.text,date:new Date().toLocaleString()};let fe=!0;l.receiveData.forEach(pt=>{pt.code===R.code&&(fe=!1)}),fe&&l.addReceiveData(R),j?x.value=R:(x.value=R,D.value=!0),e.showAlert("文件获取成功","success")}else e.showAlert("无效的取件码","error");else e.showAlert("获取文件失败:"+m.detail,"error")}catch(w){console.error("取件失败:",w);const m=w,j=m?.response?.data?.detail||m?.message||"未知错误";e.showAlert("取件失败,请稍后重试:"+j,"error")}finally{u.value.readonly=!1,u.value.loading=!1,a.value=""}},I=w=>{if(w===0)return"0 Bytes";const m=1024,j=["Bytes","KB","MB","GB","TB"],R=Math.floor(Math.log(w)/Math.log(m));return parseFloat((w/Math.pow(m,R)).toFixed(2))+" "+j[R]},te=w=>{x.value=w},ne=w=>{const m=v.value.findIndex(j=>j.id===w);m!==-1&&l.deleteReceiveData(m)},K=()=>{d.value=!d.value},at=()=>{s.push("/send")},ct=w=>w.downloadUrl?`${n}${w.downloadUrl}`:`${n}?code=${w.code}`,ut=w=>{if(w.downloadUrl)window.open(`${w.downloadUrl.startsWith("http")?"":n}${w.downloadUrl}`,"_blank");else if(w.content){const m=new Blob([w.content],{type:"text/plain;charset=utf-8"});Or.saveAs(m,`${w.filename}.txt`)}},D=oe(!1),he=oe("");dn(()=>x.value?.content,async w=>{if(w)try{const m=await E(w);he.value=zs.sanitize(m,{ALLOWED_TAGS:["p","br","strong","em","u","h1","h2","h3","h4","h5","h6","ul","ol","li","blockquote","code","pre","a","img"],ALLOWED_ATTR:["href","src","alt","title","class"],ALLOWED_URI_REGEXP:/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|cid|xmpp|xxx):|[^a-z]|[a-z+.-]+(?:[^a-z+.-:]|$))/i})}catch(m){console.error("Markdown 渲染失败:",m),he.value=w}else he.value=""},{immediate:!0});const Ee=()=>{D.value=!0};return(w,m)=>{const j=hr("router-link");return ae(),le("div",$s,[f("div",Us,[f("div",{class:T(["rounded-3xl shadow-2xl overflow-hidden border transform transition-all duration-300",[b(t)?"bg-gray-800 bg-opacity-50 backdrop-filter backdrop-blur-xl border-gray-700":"bg-white border-gray-200"]])},[f("div",Fs,[f("div",Bs,[f("div",Hs,[f("div",Gs,[C(b(Ar),{class:"w-8 h-8 text-white"})])])]),f("h2",{onClick:at,class:T(["text-3xl cursor-pointer font-extrabold text-center mb-6",[b(t)?"text-transparent bg-clip-text bg-gradient-to-r from-indigo-300 via-purple-300 to-pink-300":"text-indigo-600"]])},de(b(O).name),3),f("form",{onSubmit:cr($,["prevent"])},[f("div",qs,[f("label",{for:"code",class:T(["block text-sm font-medium mb-2",[b(t)?"text-gray-300":"text-gray-800"]])},"取件码",2),f("div",Ws,[ur(f("input",{id:"code","onUpdate:modelValue":m[0]||(m[0]=R=>a.value=R),type:"text",ref_key:"codeInput",ref:Z,class:T(["w-full px-4 py-3 rounded-lg placeholder-gray-400 focus:outline-none focus:ring-2 focus:ring-indigo-500 transition duration-300 pr-10",[b(t)?"bg-gray-700 bg-opacity-50":"bg-gray-100",{"ring-2 ring-red-500":h.value},b(t)?"text-gray-300":"text-gray-800"]]),placeholder:"请输入5位取件码",required:"",readonly:u.value.readonly,maxlength:"5",onFocus:m[1]||(m[1]=R=>c.value=!0),onBlur:m[2]||(m[2]=R=>c.value=!1)},null,42,js),[[pr,a.value]]),u.value.loading?(ae(),le("div",Zs,m[5]||(m[5]=[f("span",{class:"animate-spin rounded-full h-5 w-5 border-b-2 border-indigo-500"},null,-1)]))):Xe("",!0)]),f("div",{class:T(["absolute -bottom-0.5 left-2 h-0.5 bg-gradient-to-r from-indigo-500 via-purple-500 to-pink-500 transition-all duration-300 ease-in-out",{"w-97-100":c.value,"w-0":!c.value}])},null,2)]),f("button",{type:"submit",class:"w-full bg-gradient-to-r from-indigo-500 via-purple-500 to-pink-500 text-white font-bold py-3 px-4 rounded-lg hover:from-indigo-600 hover:via-purple-600 hover:to-pink-600 focus:outline-none focus:ring-2 focus:ring-purple-500 focus:ring-opacity-50 transition duration-300 transform hover:scale-105 hover:shadow-lg relative overflow-hidden group",disabled:u.value.loading},[f("span",Ys,[f("span",null,de(u.value.loading?"处理中...":"提取文件"),1),C(b(Rr),{class:"w-5 h-5 ml-2 transition-transform duration-300 transform group-hover:translate-x-1"})]),m[6]||(m[6]=f("span",{class:"absolute top-0 left-0 w-full h-full bg-gradient-to-r from-pink-500 via-purple-500 to-indigo-500 opacity-0 group-hover:opacity-100 transition-opacity duration-300"},null,-1))],8,Xs)],32),f("div",Vs,[C(j,{to:"/send",class:"text-indigo-400 hover:text-indigo-300 transition duration-300"},{default:Ie(()=>m[7]||(m[7]=[me(" 需要发送文件?点击这里 ",-1)])),_:1,__:[7]})])]),f("div",{class:T(["px-8 py-4 bg-opacity-50 flex justify-between items-center",[b(t)?"bg-gray-800":"bg-gray-100"]])},[f("span",{class:T(["text-sm flex items-center",[b(t)?"text-gray-300":"text-gray-800"]])},[C(b(wr),{class:"w-4 h-4 mr-1 text-green-400"}),m[8]||(m[8]=me(" 安全加密 ",-1))],2),f("button",{onClick:K,class:T(["text-sm hover:text-indigo-300 transition duration-300 flex items-center",[b(t)?"text-indigo-400":"text-indigo-600"]])},[m[9]||(m[9]=me(" 取件记录 ",-1)),C(b(yr),{class:"w-4 h-4 ml-1"})],2)],2)],2)]),C(Tt,{name:"drawer"},{default:Ie(()=>[d.value?(ae(),le("div",{key:0,class:T(["fixed inset-y-0 right-0 w-full sm:w-120 bg-opacity-70 backdrop-filter backdrop-blur-xl shadow-2xl z-50 overflow-hidden flex flex-col",[b(t)?"bg-gray-900":"bg-white"]])},[f("div",{class:T(["flex justify-between items-center p-6 border-b",[b(t)?"border-gray-700":"border-gray-200"]])},[f("h3",{class:T(["text-2xl font-bold",[b(t)?"text-white":"text-gray-800"]])}," 取件记录 ",2),f("button",{onClick:K,class:T(["hover:text-white transition duration-300",[b(t)?"text-gray-400":"text-gray-800"]])},[C(b(gn),{class:"w-6 h-6"})],2)],2),f("div",Qs,[C(dr,{name:"list",tag:"div",class:"space-y-4"},{default:Ie(()=>[(ae(!0),le(gr,null,mr(b(v),R=>(ae(),le("div",{key:R.id,class:T(["bg-opacity-50 rounded-lg p-4 flex items-center shadow-md hover:shadow-lg transition duration-300 transform hover:scale-102",[b(t)?"bg-gray-800 hover:bg-gray-700":"bg-gray-100 hover:bg-white"]])},[f("div",Ks,[C(b(mn),{class:T(["w-10 h-10",[b(t)?"text-indigo-400":"text-indigo-600"]])},null,8,["class"])]),f("div",Js,[f("p",{class:T(["font-medium text-lg truncate",[b(t)?"text-white":"text-gray-800"]])},de(R.filename),3),f("p",{class:T(["text-sm truncate",[b(t)?"text-gray-400":"text-gray-600"]])},de(R.date)+" · "+de(R.size),3)]),f("div",ei,[f("button",{onClick:fe=>te(R),class:T(["p-2 rounded-full hover:bg-opacity-20 transition duration-300",[b(t)?"hover:bg-indigo-400 text-indigo-400":"hover:bg-indigo-100 text-indigo-600"]])},[C(b(vr),{class:"w-5 h-5"})],10,ti),f("button",{onClick:fe=>ut(R),class:T(["p-2 rounded-full hover:bg-opacity-20 transition duration-300",[b(t)?"hover:bg-green-400 text-green-400":"hover:bg-green-100 text-green-600"]])},[C(b(xn),{class:"w-5 h-5"})],10,ni),f("button",{onClick:fe=>ne(R.id),class:T(["p-2 rounded-full hover:bg-opacity-20 transition duration-300",[b(t)?"hover:bg-red-400 text-red-400":"hover:bg-red-100 text-red-600"]])},[C(b(Sr),{class:"w-5 h-5"})],10,ri)])],2))),128))]),_:1})])],2)):Xe("",!0)]),_:1}),C(Tt,{name:"fade"},{default:Ie(()=>[x.value?(ae(),le("div",si,[f("div",{class:T(["p-8 rounded-2xl max-w-md w-full mx-4 shadow-2xl transform transition-all duration-300 ease-out backdrop-filter backdrop-blur-lg overflow-hidden",[b(t)?"bg-gray-800 bg-opacity-70":"bg-white bg-opacity-95"]])},[f("h3",{class:T(["text-2xl font-bold mb-6 truncate",[b(t)?"text-white":"text-gray-800"]])}," 文件详情 ",2),f("div",ii,[f("div",oi,[C(b(mn),{class:T(["w-6 h-6 mr-3 flex-shrink-0",[b(t)?"text-indigo-400":"text-indigo-600"]])},null,8,["class"]),f("p",{class:T([[b(t)?"text-gray-300":"text-gray-800"],"truncate flex-grow"])},[m[10]||(m[10]=f("span",{class:"font-medium"},"文件名:",-1)),me(de(x.value.filename),1)],2)]),f("div",li,[C(b(Lr),{class:T(["w-6 h-6 mr-3 flex-shrink-0",[b(t)?"text-indigo-400":"text-indigo-600"]])},null,8,["class"]),f("p",{class:T([[b(t)?"text-gray-300":"text-gray-800"],"truncate flex-grow"])},[m[11]||(m[11]=f("span",{class:"font-medium"},"取件日期:",-1)),me(de(x.value.date),1)],2)]),f("div",ai,[C(b(Er),{class:T(["w-6 h-6 mr-3 flex-shrink-0",[b(t)?"text-indigo-400":"text-indigo-600"]])},null,8,["class"]),f("p",{class:T([[b(t)?"text-gray-300":"text-gray-800"],"truncate flex-grow"])},[m[12]||(m[12]=f("span",{class:"font-medium"},"文件大小:",-1)),me(de(x.value.size),1)],2)]),f("div",ci,[C(b(xn),{class:T(["w-6 h-6 mr-3",[b(t)?"text-indigo-400":"text-indigo-600"]])},null,8,["class"]),f("p",{class:T([b(t)?"text-gray-300":"text-gray-800"])},m[13]||(m[13]=[f("span",{class:"font-medium"},"文件内容:",-1)]),2),x.value.filename==="Text"?(ae(),le("div",ui,[f("button",{onClick:Ee,class:"px-4 py-2 bg-indigo-600 text-white rounded-lg hover:bg-indigo-700 transition duration-300"}," 预览内容 ")])):(ae(),le("div",pi,[f("a",{href:V(x.value),target:"_blank",rel:"noopener noreferrer",class:"px-4 py-2 bg-indigo-600 text-white rounded-lg hover:bg-indigo-700 transition duration-300"}," 点击下载 ",8,hi)]))])]),f("div",fi,[f("h4",{class:T(["text-lg font-semibold mb-3",[b(t)?"text-white":"text-gray-800"]])}," 取件二维码 ",2),f("div",di,[C(_r,{value:ct(x.value),size:128,level:"M"},null,8,["value"])]),f("p",{class:T(["mt-2 text-sm",[b(t)?"text-gray-400":"text-gray-600"]])}," 扫描二维码快速取件 ",2)]),f("button",{onClick:m[3]||(m[3]=R=>x.value=null),class:"mt-8 w-full bg-gradient-to-r from-indigo-500 to-purple-600 text-white px-6 py-3 rounded-lg font-medium hover:from-indigo-600 hover:to-purple-700 focus:outline-none focus:ring-2 focus:ring-purple-500 focus:ring-opacity-50 transition duration-300 transform hover:scale-105"}," 关闭 ")],2)])):Xe("",!0)]),_:1}),C(Tt,{name:"fade"},{default:Ie(()=>[D.value?(ae(),le("div",gi,[f("div",{class:T(["p-6 rounded-2xl max-w-3xl w-full mx-4 shadow-2xl transform transition-all duration-300 ease-out backdrop-filter backdrop-blur-lg bg-opacity-70 max-h-[85vh] overflow-hidden flex flex-col",[b(t)?"bg-gray-800":"bg-white"]])},[f("div",mi,[f("h3",{class:T(["text-2xl font-bold",[b(t)?"text-white":"text-gray-800"]])}," 内容预览 ",2),f("div",xi,[f("button",{onClick:Q,class:T(["px-4 py-1.5 rounded-lg transition duration-300 flex items-center gap-2 text-sm font-medium",[b(t)?"bg-gray-700 hover:bg-gray-600 text-gray-300 hover:text-white":"bg-gray-100 hover:bg-gray-200 text-gray-700 hover:text-gray-900"]])},[C(b(Cr),{class:"w-4 h-4"}),m[14]||(m[14]=me(" 复制 ",-1))],2),f("button",{onClick:m[4]||(m[4]=R=>D.value=!1),class:T(["p-1.5 rounded-lg transition duration-300 hover:bg-opacity-10",[b(t)?"text-gray-400 hover:text-white hover:bg-white":"text-gray-500 hover:text-gray-900 hover:bg-black"]])},[C(b(gn),{class:"w-5 h-5"})],2)])]),f("div",ki,[f("div",{class:T(["prose max-w-none p-6 rounded-xl break-words overflow-wrap-anywhere",[b(t)?"prose-invert bg-gray-900 bg-opacity-50":"bg-gray-50"]]),innerHTML:he.value},null,10,bi)])],2)])):Xe("",!0)]),_:1})])}}}),Si=kr(wi,[["__scopeId","data-v-39deaf32"]]);export{Si as default};
|