k5web/assets/index.022841a8.js

58 lines
61 KiB
JavaScript
Raw Normal View History

2024-10-11 10:02:13 +00:00
var Hn=Object.defineProperty;var Bn=(a,e,t)=>e in a?Hn(a,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):a[e]=t;var E=(a,e,t)=>(Bn(a,typeof e!="symbol"?e+"":e,t),t);import{v as Gn,ad as Wn,_ as jn}from"./index.7ba276e1.js";/* empty css *//* empty css *//* empty css *//* empty css */import{d as qn,r as Zn,w as Yn,o as Xn,bW as Vn,bI as Qn,C as ke,D as nt,aI as q,aH as Z,u as Jn,G as qt,aM as he,aN as Ne,aK as Zt,aJ as Yt,aE as Xt,bX as Kn,b8 as ei,bh as ti,bK as ni,bO as ii}from"./arco.9755215d.js";import{g as si}from"./vue.e23f7fca.js";import{u as ri}from"./loading.3855ec1d.js";import{L as oi}from"./index.b12bb178.js";import{S as li}from"./index.ad00038a.js";import"./chart.e5f26fc3.js";import"./slot.820141bd.js";function pt(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}let re=pt();function pn(a){re=a}const hn=/[&<>"']/,ai=new RegExp(hn.source,"g"),fn=/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,ci=new RegExp(fn.source,"g"),ui={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},Vt=a=>ui[a];function U(a,e){if(e){if(hn.test(a))return a.replace(ai,Vt)}else if(fn.test(a))return a.replace(ci,Vt);return a}const pi=/(^|[^\[])\^/g;function T(a,e){let t=typeof a=="string"?a:a.source;e=e||"";const n={replace:(s,i)=>{let r=typeof i=="string"?i:i.source;return r=r.replace(pi,"$1"),t=t.replace(s,r),n},getRegex:()=>new RegExp(t,e)};return n}function Qt(a){try{a=encodeURI(a).replace(/%25/g,"%")}catch{return null}return a}const Ae={exec:()=>null};function Jt(a,e){const t=a.replace(/\|/g,(i,r,l)=>{let c=!1,h=r;for(;--h>=0&&l[h]==="\\";)c=!c;return c?"|":" |"}),n=t.split(/ \|/);let s=0;if(n[0].trim()||n.shift(),n.length>0&&!n[n.length-1].trim()&&n.pop(),e)if(n.length>e)n.splice(e);else for(;n.length<e;)n.push("");for(;s<n.length;s++)n[s]=n[s].trim().replace(/\\\|/g,"|");return n}function be(a,e,t){const n=a.length;if(n===0)return"";let s=0;for(;s<n;){const i=a.charAt(n-s-1);if(i===e&&!t)s++;else if(i!==e&&t)s++;else break}return a.slice(0,n-s)}function hi(a,e){if(a.indexOf(e[1])===-1)return-1;let t=0;for(let n=0;n<a.length;n++)if(a[n]==="\\")n++;else if(a[n]===e[0])t++;else if(a[n]===e[1]&&(t--,t<0))return n;return-1}function Kt(a,e,t,n){const s=e.href,i=e.title?U(e.title):null,r=a[1].replace(/\\([\[\]])/g,"$1");if(a[0].charAt(0)!=="!"){n.state.inLink=!0;const l={type:"link",raw:t,href:s,title:i,text:r,tokens:n.inlineTokens(r)};return n.state.inLink=!1,l}return{type:"image",raw:t,href:s,title:i,text:U(r)}}function fi(a,e){const t=a.match(/^(\s+)(?:```)/);if(t===null)return e;const n=t[1];return e.split(`
2024-10-11 09:02:55 +00:00
`).map(s=>{const i=s.match(/^\s+/);if(i===null)return s;const[r]=i;return r.length>=n.length?s.slice(n.length):s}).join(`
`)}class Ue{constructor(e){E(this,"options");E(this,"rules");E(this,"lexer");this.options=e||re}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 n=t[0].replace(/^(?: {1,4}| {0,3}\t)/gm,"");return{type:"code",raw:t[0],codeBlockStyle:"indented",text:this.options.pedantic?n:be(n,`
`)}}}fences(e){const t=this.rules.block.fences.exec(e);if(t){const n=t[0],s=fi(n,t[3]||"");return{type:"code",raw:n,lang:t[2]?t[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):t[2],text:s}}}heading(e){const t=this.rules.block.heading.exec(e);if(t){let n=t[2].trim();if(/#$/.test(n)){const s=be(n,"#");(this.options.pedantic||!s||/ $/.test(s))&&(n=s.trim())}return{type:"heading",raw:t[0],depth:t[1].length,text:n,tokens:this.lexer.inline(n)}}}hr(e){const t=this.rules.block.hr.exec(e);if(t)return{type:"hr",raw:be(t[0],`
`)}}blockquote(e){const t=this.rules.block.blockquote.exec(e);if(t){let n=be(t[0],`
`).split(`
`),s="",i="";const r=[];for(;n.length>0;){let l=!1;const c=[];let h;for(h=0;h<n.length;h++)if(/^ {0,3}>/.test(n[h]))c.push(n[h]),l=!0;else if(!l)c.push(n[h]);else break;n=n.slice(h);const p=c.join(`
2024-10-11 09:19:39 +00:00
`),m=p.replace(/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,`
2024-10-11 09:02:55 +00:00
$1`).replace(/^ {0,3}>[ \t]?/gm,"");s=s?`${s}
${p}`:p,i=i?`${i}
2024-10-11 09:19:39 +00:00
${m}`:m;const g=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(m,r,!0),this.lexer.state.top=g,n.length===0)break;const x=r[r.length-1];if((x==null?void 0:x.type)==="code")break;if((x==null?void 0:x.type)==="blockquote"){const b=x,_=b.raw+`
2024-10-11 09:02:55 +00:00
`+n.join(`
`),O=this.blockquote(_);r[r.length-1]=O,s=s.substring(0,s.length-b.raw.length)+O.raw,i=i.substring(0,i.length-b.text.length)+O.text;break}else if((x==null?void 0:x.type)==="list"){const b=x,_=b.raw+`
`+n.join(`
`),O=this.list(_);r[r.length-1]=O,s=s.substring(0,s.length-x.raw.length)+O.raw,i=i.substring(0,i.length-b.raw.length)+O.raw,n=_.substring(r[r.length-1].raw.length).split(`
2024-10-11 09:19:39 +00:00
`);continue}}return{type:"blockquote",raw:s,tokens:r,text:i}}}list(e){let t=this.rules.block.list.exec(e);if(t){let n=t[1].trim();const s=n.length>1,i={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:"[*+-]");const r=new RegExp(`^( {0,3}${n})((?:[ ][^\\n]*)?(?:\\n|$))`);let l=!1;for(;e;){let c=!1,h="",p="";if(!(t=r.exec(e))||this.rules.block.hr.test(e))break;h=t[0],e=e.substring(h.length);let m=t[2].split(`
`,1)[0].replace(/^\t+/,j=>" ".repeat(3*j.length)),g=e.split(`
`,1)[0],x=!m.trim(),b=0;if(this.options.pedantic?(b=2,p=m.trimStart()):x?b=t[1].length+1:(b=t[2].search(/[^ ]/),b=b>4?1:b,p=m.slice(b),b+=t[1].length),x&&/^[ \t]*$/.test(g)&&(h+=g+`
`,e=e.substring(g.length+1),c=!0),!c){const j=new RegExp(`^ {0,${Math.min(3,b-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),M=new RegExp(`^ {0,${Math.min(3,b-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),X=new RegExp(`^ {0,${Math.min(3,b-1)}}(?:\`\`\`|~~~)`),A=new RegExp(`^ {0,${Math.min(3,b-1)}}#`),H=new RegExp(`^ {0,${Math.min(3,b-1)}}<[a-z].*>`,"i");for(;e;){const z=e.split(`
`,1)[0];let te;if(g=z,this.options.pedantic?(g=g.replace(/^ {1,4}(?=( {4})*[^ ])/g," "),te=g):te=g.replace(/\t/g," "),X.test(g)||A.test(g)||H.test(g)||j.test(g)||M.test(g))break;if(te.search(/[^ ]/)>=b||!g.trim())p+=`
`+te.slice(b);else{if(x||m.replace(/\t/g," ").search(/[^ ]/)>=4||X.test(m)||A.test(m)||M.test(m))break;p+=`
`+g}!x&&!g.trim()&&(x=!0),h+=z+`
`,e=e.substring(z.length+1),m=te.slice(b)}}i.loose||(l?i.loose=!0:/\n[ \t]*\n[ \t]*$/.test(h)&&(l=!0));let _=null,O;this.options.gfm&&(_=/^\[[ xX]\] /.exec(p),_&&(O=_[0]!=="[ ] ",p=p.replace(/^\[[ xX]\] +/,""))),i.items.push({type:"list_item",raw:h,task:!!_,checked:O,loose:!1,text:p,tokens:[]}),i.raw+=h}i.items[i.items.length-1].raw=i.items[i.items.length-1].raw.trimEnd(),i.items[i.items.length-1].text=i.items[i.items.length-1].text.trimEnd(),i.raw=i.raw.trimEnd();for(let c=0;c<i.items.length;c++)if(this.lexer.state.top=!1,i.items[c].tokens=this.lexer.blockTokens(i.items[c].text,[]),!i.loose){const h=i.items[c].tokens.filter(m=>m.type==="space"),p=h.length>0&&h.some(m=>/\n.*\n/.test(m.raw));i.loose=p}if(i.loose)for(let c=0;c<i.items.length;c++)i.items[c].loose=!0;return i}}html(e){const t=this.rules.block.html.exec(e);if(t)return{type:"html",block:!0,raw:t[0],pre:t[1]==="pre"||t[1]==="script"||t[1]==="style",text:t[0]}}def(e){const t=this.rules.block.def.exec(e);if(t){const n=t[1].toLowerCase().replace(/\s+/g," "),s=t[2]?t[2].replace(/^<(.*)>$/,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",i=t[3]?t[3].substring(1,t[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):t[3];return{type:"def",tag:n,raw:t[0],href:s,title:i}}}table(e){const t=this.rules.block.table.exec(e);if(!t||!/[:|]/.test(t[2]))return;const n=Jt(t[1]),s=t[2].replace(/^\||\| *$/g,"").split("|"),i=t[3]&&t[3].trim()?t[3].replace(/\n[ \t]*$/,"").split(`
`):[],r={type:"table",raw:t[0],header:[],align:[],rows:[]};if(n.length===s.length){for(const l of s)/^ *-+: *$/.test(l)?r.align.push("right"):/^ *:-+: *$/.test(l)?r.align.push("center"):/^ *:-+ *$/.test(l)?r.align.push("left"):r.align.push(null);for(let l=0;l<n.length;l++)r.header.push({text:n[l],tokens:this.lexer.inline(n[l]),header:!0,align:r.align[l]});for(const l of i)r.rows.push(Jt(l,r.header.length).map((c,h)=>({text:c,tokens:this.lexer.inline(c),header:!1,align:r.align[h]})));return r}}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 n=t[1].charAt(t[1].length-1)===`
`?t[1].slice(0,-1):t[1];return{type:"paragraph",raw:t[0],text:n,tokens:this.lexer.inline(n)}}}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:U(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:"html",raw:t[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:t[0]}}link(e){const t=this.rules.inline.link.exec(e);if(t){const n=t[2].trim();if(!this.options.pedantic&&/^</.test(n)){if(!/>$/.test(n))return;const r=be(n.slice(0,-1),"\\");if((n.length-r.length)%2===0)return}else{const r=hi(t[2],"()");if(r>-1){const c=(t[0].indexOf("!")===0?5:4)+t[1].length+r;t[2]=t[2].substring(0,r),t[0]=t[0].substring(0,c).trim(),t[3]=""}}let s=t[2],i="";if(this.options.pedantic){const r=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(s);r&&(s=r[1],i=r[3])}else i=t[3]?t[3].slice(1,-1):"";return s=s.trim(),/^</.test(s)&&(this.options.pedantic&&!/>$/.test(n)?s=s.slice(1):s=s.slice(1,-1)),Kt(t,{href:s&&s.replace(this.rules.inline.anyPunctuation,"$1"),title:i&&i.replace(this.rules.inline.anyPunctuation,"$1")},t[0],this.lexer)}}reflink(e,t){let n;if((n=this.rules.inline.reflink.exec(e))||(n=this.rules.inline.nolink.exec(e))){const s=(n[2]||n[1]).replace(/\s+/g," "),i=t[s.toLowerCase()];if(!i){const r=n[0].charAt(0);return{type:"text",raw:r,text:r}}return Kt(n,i,n[0],this.lexer)}}emStrong(e,t,n=""){let s=this.rules.inline.emStrongLDelim.exec(e);if(!s||s[3]&&n.match(/[\p{L}\p{N}]/u))return;if(!(s[1]||s[2]||"")||!n||this.rules.inline.punctuation.exec(n)){const r=[...s[0]].length-1;let l,c,h=r,p=0;const m=s[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(m.lastIndex=0,t=t.slice(-1*e.length+r);(s=m.exec(t))!=null;){if(l=s[1]||s[2]||s[3]||s[4]||s[5]||s[6],!l)continue;if(c=[...l].length,s[3]||s[4]){h+=c;continue}else if((s[5]||s[6])&&r%3&&!((r+c)%3)){p+=c;continue}if(h-=c,h>0)continue;c=Math.min(c,c+h+p);const g=[...s[0]][0].length,x=e.slice(0,r+s.index+g+c);if(Math.min(r,c)%2){const _=x.slice(1,-1);return{type:"em",raw:x,text:_,tokens:this.lexer.inlineTokens(_)}}const b=x.slice(2,-2);return{type:"strong",raw:x,text:b,tokens:this.lexer.inlineTokens(b)}}}}codespan(e){const t=this.rules.inline.code.exec(e);if(t){let n=t[2].replace(/\n/g," ");const s=/[^ ]/.test(n),i=/^ /.test(n)&&/ $/.test(n);return s&&i&&(n=n.substring(1,n.length-1)),n=U(n,!0),{type:"codespan",raw:t[0],text:n}}}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){const t=this.rules.inline.autolink.exec(e);if(t){let n,s;return t[2]==="@"?(n=U(t[1]),s="mailto:"+n):(n=U(t[1]),s=n),{type:"link",raw:t[0],text:n,href:s,tokens:[{type:"text",raw:n,text:n}]}}}url(e){var n,s;let t;if(t=this.rules.inline.url.exec(e)){let i,r;if(t[2]==="@")i=U(t[0]),r="mailto:"+i;else{let l;do l=t[0],t[0]=(s=(n=this.rules.inline._backpedal.exec(t[0]))==null?void 0:n[0])!=null?s:"";while(l!==t[0]);i=U(t[0]),t[1]==="www."?r="http://"+t[0]:r=t[0]}return{type:"link",raw:t[0],text:i,href:r,tokens:[{type:"text",raw:i,text:i}]}}}inlineText(e){const t=this.rules.inline.text.exec(e);if(t){let n;return this.lexer.state.inRawBlock?n=t[0]:n=U(t[0]),{type:"text",raw:t[0],text:n}}}}const di=/^(?:[ \t]*(?:\n|$))+/,mi=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,gi=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,Se=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,ki=/^ {0,3}(#{1,6})(?=\s|$)
]`).replace("lheading",mn).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},kn=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,Ai=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,bn=/^( {2,}|\\)\n(?!\s*$)/,Ri=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,Le="\\p{P}\\p{S}",Si=T(/^((?![*_])[\spunctuation])/,"u").replace(/punctuation/g,Le).getRegex(),Li=/\[[^[\]]*?\]\([^\(\)]*?\)|`[^`]*?`|<[^<>]*?>/g,Ii=T(/^(?:\*+(?:((?!\*)[punct])|[^\s*]))|^_+(?:((?!_)[punct])|([^\s_]))/,"u").replace(/punct/g,Le).getRegex(),Oi=T("^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)[punct](\\*+)(?=[\\s]|$)|[^punct\\s](\\*+)(?!\\*)(?=[punct\\s]|$)|(?!\\*)[punct\\s](\\*+)(?=[^punct\\s])|[\\s](\\*+)(?!\\*)(?=[punct])|(?!\\*)[punct](\\*+)(?!\\*)(?=[punct])|[^punct\\s](\\*+)(?=[^punct\\s])","gu").replace(/punct/g,Le).getRegex(),Di=T("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)[punct](_+)(?=[\\s]|$)|[^punct\\s](_+)(?!_)(?=[punct\\s]|$)|(?!_)[punct\\s](_+)(?=[^punct\\s])|[\\s](_+)(?!_)(?=[punct])|(?!_)[punct](_+)(?!_)(?=[punct])","gu").replace(/punct/g,Le).getRegex(),Ci=T(/\\([punct])/,"gu").replace(/punct/g,Le).getRegex(),Mi=T(/^<(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(),Ni=T(dt).replace("(?:-->|$)","-->").getRegex(),vi=T("^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",Ni).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),Fe=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,Pi=T(/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/).replace("label",Fe).replace("href",/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),xn=T(/^!?\[(label)\]\[(ref)\]/).replace("label",Fe).replace("ref",ft).getRegex(),_n=T(/^!?\[(ref)\](?:\[\])?/).replace("ref",ft).getRegex(),$i=T("reflink|nolink(?!\\()","g").replace("reflink",xn).replace("nolink",_n).getRegex(),gt={_backpedal:Ae,anyPunctuation:Ci,autolink:Mi,blockSkip:Li,br:bn,code:Ai,del:Ae,emStrongLDelim:Ii,emStrongRDelimAst:Oi,emStrongRDelimUnd:Di,escape:kn,link:Pi,nolink:_n,punctuation:Si,reflink:xn,reflinkSearch:$i,tag:vi,text:Ri,url:Ae},zi={...gt,link:T(/^!?\[(label)\]\((.*?)\)/).replace("label",Fe).getRegex(),reflink:T(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",Fe).getRegex()},at={...gt,escape:T(kn).replace("])","~|])").getRegex(),url:T(/^((?: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\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.!#$%&'*+\/=?_`{\|}~-]+@)))/},Ui={...at,br:T(bn).replace("{2,}","*").getRegex(),text:T(at.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},ve={normal:mt,gfm:Ei,pedantic:yi},xe={normal:gt,gfm:at,breaks:Ui,pedantic:zi};class B{constructor(e){E(this,"tokens");E(this,"options");E(this,"state");E(this,"tokenizer");E(this,"inlineQueue");this.tokens=[],this.tokens.links=Object.create(null),this.options=e||re,this.options.tokenizer=this.options.tokenizer||new Ue,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:ve.normal,inline:xe.normal};this.options.pedantic?(t.block=ve.pedantic,t.inline=xe.pedantic):this.options.gfm&&(t.blo
2024-10-11 09:02:55 +00:00
`),this.blockTokens(e,this.tokens);for(let t=0;t<this.inlineQueue.length;t++){const n=this.inlineQueue[t];this.inlineTokens(n.src,n.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(e,t=[],n=!1){this.options.pedantic&&(e=e.replace(/\t/g," ").replace(/^ +$/gm,""));let s,i,r;for(;e;)if(!(this.options.extensions&&this.options.extensions.block&&this.options.extensions.block.some(l=>(s=l.call({lexer:this},e,t))?(e=e.substring(s.raw.length),t.push(s),!0):!1))){if(s=this.tokenizer.space(e)){e=e.substring(s.raw.length),s.raw.length===1&&t.length>0?t[t.length-1].raw+=`
`:t.push(s);continue}if(s=this.tokenizer.code(e)){e=e.substring(s.raw.length),i=t[t.length-1],i&&(i.type==="paragraph"||i.type==="text")?(i.raw+=`
`+s.raw,i.text+=`
`+s.text,this.inlineQueue[this.inlineQueue.length-1].src=i.text):t.push(s);continue}if(s=this.tokenizer.fences(e)){e=e.substring(s.raw.length),t.push(s);continue}if(s=this.tokenizer.heading(e)){e=e.substring(s.raw.length),t.push(s);continue}if(s=this.tokenizer.hr(e)){e=e.substring(s.raw.length),t.push(s);continue}if(s=this.tokenizer.blockquote(e)){e=e.substring(s.raw.length),t.push(s);continue}if(s=this.tokenizer.list(e)){e=e.substring(s.raw.length),t.push(s);continue}if(s=this.tokenizer.html(e)){e=e.substring(s.raw.length),t.push(s);continue}if(s=this.tokenizer.def(e)){e=e.substring(s.raw.length),i=t[t.length-1],i&&(i.type==="paragraph"||i.type==="text")?(i.raw+=`
`+s.raw,i.text+=`
`+s.raw,this.inlineQueue[this.inlineQueue.length-1].src=i.text):this.tokens.links[s.tag]||(this.tokens.links[s.tag]={href:s.href,title:s.title});continue}if(s=this.tokenizer.table(e)){e=e.substring(s.raw.length),t.push(s);continue}if(s=this.tokenizer.lheading(e)){e=e.substring(s.raw.length),t.push(s);continue}if(r=e,this.options.extensions&&this.options.extensions.startBlock){let l=1/0;const c=e.slice(1);let h;this.options.extensions.startBlock.forEach(p=>{h=p.call({lexer:this},c),typeof h=="number"&&h>=0&&(l=Math.min(l,h))}),l<1/0&&l>=0&&(r=e.substring(0,l+1))}if(this.state.top&&(s=this.tokenizer.paragraph(r))){i=t[t.length-1],n&&(i==null?void 0:i.type)==="paragraph"?(i.raw+=`
`+s.raw,i.text+=`
`+s.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=i.text):t.push(s),n=r.length!==e.length,e=e.substring(s.raw.length);continue}if(s=this.tokenizer.text(e)){e=e.substring(s.raw.length),i=t[t.length-1],i&&i.type==="text"?(i.raw+=`
`+s.raw,i.text+=`
2024-10-11 09:19:39 +00:00
`+s.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=i.text):t.push(s);continue}if(e){const l="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(l);break}else throw new Error(l)}}return this.state.top=!0,t}inline(e,t=[]){return this.inlineQueue.push({src:e,tokens:t}),t}inlineTokens(e,t=[]){let n,s,i,r=e,l,c,h;if(this.tokens.links){const p=Object.keys(this.tokens.links);if(p.length>0)for(;(l=this.tokenizer.rules.inline.reflinkSearch.exec(r))!=null;)p.includes(l[0].slice(l[0].lastIndexOf("[")+1,-1))&&(r=r.slice(0,l.index)+"["+"a".repeat(l[0].length-2)+"]"+r.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(l=this.tokenizer.rules.inline.blockSkip.exec(r))!=null;)r=r.slice(0,l.index)+"["+"a".repeat(l[0].length-2)+"]"+r.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;(l=this.tokenizer.rules.inline.anyPunctuation.exec(r))!=null;)r=r.slice(0,l.index)+"++"+r.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);for(;e;)if(c||(h=""),c=!1,!(this.options.extensions&&this.options.extensions.inline&&this.options.extensions.inline.some(p=>(n=p.call({lexer:this},e,t))?(e=e.substring(n.raw.length),t.push(n),!0):!1))){if(n=this.tokenizer.escape(e)){e=e.substring(n.raw.length),t.push(n);continue}if(n=this.tokenizer.tag(e)){e=e.substring(n.raw.length),s=t[t.length-1],s&&n.type==="text"&&s.type==="text"?(s.raw+=n.raw,s.text+=n.text):t.push(n);continue}if(n=this.tokenizer.link(e)){e=e.substring(n.raw.length),t.push(n);continue}if(n=this.tokenizer.reflink(e,this.tokens.links)){e=e.substring(n.raw.length),s=t[t.length-1],s&&n.type==="text"&&s.type==="text"?(s.raw+=n.raw,s.text+=n.text):t.push(n);continue}if(n=this.tokenizer.emStrong(e,r,h)){e=e.substring(n.raw.length),t.push(n);continue}if(n=this.tokenizer.codespan(e)){e=e.substring(n.raw.length),t.push(n);continue}if(n=this.tokenizer.br(e)){e=e.substring(n.raw.length),t.push(n);continue}if(n=this.tokenizer.del(e)){e=e.substring(n.raw.length),t.push(n);continue}if(n=this.tokenizer.autolink(e)){e=e.substring(n.raw.length),t.push(n);continue}if(!this.state.inLink&&(n=this.tokenizer.url(e))){e=e.substring(n.raw.length),t.push(n);continue}if(i=e,this.options.extensions&&this.options.extensions.startInline){let p=1/0;const m=e.slice(1);let g;this.options.extensions.startInline.forEach(x=>{g=x.call({lexer:this},m),typeof g=="number"&&g>=0&&(p=Math.min(p,g))}),p<1/0&&p>=0&&(i=e.substring(0,p+1))}if(n=this.tokenizer.inlineText(i)){e=e.substring(n.raw.length),n.raw.slice(-1)!=="_"&&(h=n.raw.slice(-1)),c=!0,s=t[t.length-1],s&&s.type==="text"?(s.raw+=n.raw,s.text+=n.text):t.push(n);continue}if(e){const p="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(p);break}else throw new Error(p)}}return t}}class He{constructor(e){E(this,"options");E(this,"parser");this.options=e||re}space(e){return""}code({text:e,lang:t,escaped:n}){var r;const s=(r=(t||"").match(/^\S*/))==null?void 0:r[0],i=e.replace(/\n$/,"")+`
2024-10-11 09:02:55 +00:00
`;return s?'<pre><code class="language-'+U(s)+'">'+(n?i:U(i,!0))+`</code></pre>
`:"<pre><code>"+(n?i:U(i,!0))+`</code></pre>
`}blockquote({tokens:e}){return`<blockquote>
${this.parser.parse(e)}</blockquote>
`}html({text:e}){return e}heading({tokens:e,depth:t}){return`<h${t}>${this.parser.parseInline(e)}</h${t}>
`}hr(e){return`<hr>
`}list(e){const t=e.ordered,n=e.start;let s="";for(let l=0;l<e.items.length;l++){const c=e.items[l];s+=this.listitem(c)}const i=t?"ol":"ul",r=t&&n!==1?' start="'+n+'"':"";return"<"+i+r+`>
`+s+"</"+i+`>
`}listitem(e){let t="";if(e.task){const n=this.checkbox({checked:!!e.checked});e.loose?e.tokens.length>0&&e.tokens[0].type==="paragraph"?(e.tokens[0].text=n+" "+e.tokens[0].text,e.tokens[0].tokens&&e.tokens[0].tokens.length>0&&e.tokens[0].tokens[0].type==="text"&&(e.tokens[0].tokens[0].text=n+" "+e.tokens[0].tokens[0].text)):e.tokens.unshift({type:"text",raw:n+" ",text:n+" "}):t+=n+" "}return t+=this.parser.parse(e.tokens,!!e.loose),`<li>${t}</li>
`}checkbox({checked:e}){return"<input "+(e?'checked="" ':"")+'disabled="" type="checkbox">'}paragraph({tokens:e}){return`<p>${this.parser.parseInline(e)}</p>
`}table(e){let t="",n="";for(let i=0;i<e.header.length;i++)n+=this.tablecell(e.header[i]);t+=this.tablerow({text:n});let s="";for(let i=0;i<e.rows.length;i++){const r=e.rows[i];n="";for(let l=0;l<r.length;l++)n+=this.tablecell(r[l]);s+=this.tablerow({text:n})}return s&&(s=`<tbody>${s}</tbody>`),`<table>
<thead>
`+t+`</thead>
`+s+`</table>
`}tablerow({text:e}){return`<tr>
${e}</tr>
`}tablecell(e){const t=this.parser.parseInline(e.tokens),n=e.header?"th":"td";return(e.align?`<${n} align="${e.align}">`:`<${n}>`)+t+`</${n}>
2024-10-11 09:19:39 +00:00
`}strong({tokens:e}){return`<strong>${this.parser.parseInline(e)}</strong>`}em({tokens:e}){return`<em>${this.parser.parseInline(e)}</em>`}codespan({text:e}){return`<code>${e}</code>`}br(e){return"<br>"}del({tokens:e}){return`<del>${this.parser.parseInline(e)}</del>`}link({href:e,title:t,tokens:n}){const s=this.parser.parseInline(n),i=Qt(e);if(i===null)return s;e=i;let r='<a href="'+e+'"';return t&&(r+=' title="'+t+'"'),r+=">"+s+"</a>",r}image({href:e,title:t,text:n}){const s=Qt(e);if(s===null)return n;e=s;let i=`<img src="${e}" alt="${n}"`;return t&&(i+=` title="${t}"`),i+=">",i}text(e){return"tokens"in e&&e.tokens?this.parser.parseInline(e.tokens):e.text}}class kt{strong({text:e}){return e}em({text:e}){return e}codespan({text:e}){return e}del({text:e}){return e}html({text:e}){return e}text({text:e}){return e}link({text:e}){return""+e}image({text:e}){return""+e}br(){return""}}class G{constructor(e){E(this,"options");E(this,"renderer");E(this,"textRenderer");this.options=e||re,this.options.renderer=this.options.renderer||new He,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new kt}static parse(e,t){return new G(t).parse(e)}static parseInline(e,t){return new G(t).parseInline(e)}parse(e,t=!0){let n="";for(let s=0;s<e.length;s++){const i=e[s];if(this.options.extensions&&this.options.extensions.renderers&&this.options.extensions.renderers[i.type]){const l=i,c=this.options.extensions.renderers[l.type].call({parser:this},l);if(c!==!1||!["space","hr","heading","code","table","blockquote","list","html","paragraph","text"].includes(l.type)){n+=c||"";continue}}const r=i;switch(r.type){case"space":{n+=this.renderer.space(r);continue}case"hr":{n+=this.renderer.hr(r);continue}case"heading":{n+=this.renderer.heading(r);continue}case"code":{n+=this.renderer.code(r);continue}case"table":{n+=this.renderer.table(r);continue}case"blockquote":{n+=this.renderer.blockquote(r);continue}case"list":{n+=this.renderer.list(r);continue}case"html":{n+=this.renderer.html(r);continue}case"paragraph":{n+=this.renderer.paragraph(r);continue}case"text":{let l=r,c=this.renderer.text(l);for(;s+1<e.length&&e[s+1].type==="text";)l=e[++s],c+=`
`+this.renderer.text(l);t?n+=this.renderer.paragraph({type:"paragraph",raw:c,text:c,tokens:[{type:"text",raw:c,text:c}]}):n+=c;continue}default:{const l='Token with "'+r.type+'" type was not found.';if(this.options.silent)return console.error(l),"";throw new Error(l)}}}return n}parseInline(e,t){t=t||this.renderer;let n="";for(let s=0;s<e.length;s++){const i=e[s];if(this.options.extensions&&this.options.extensions.renderers&&this.options.extensions.renderers[i.type]){const l=this.options.extensions.renderers[i.type].call({parser:this},i);if(l!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(i.type)){n+=l||"";continue}}const r=i;switch(r.type){case"escape":{n+=t.text(r);break}case"html":{n+=t.html(r);break}case"link":{n+=t.link(r);break}case"image":{n+=t.image(r);break}case"strong":{n+=t.strong(r);break}case"em":{n+=t.em(r);break}case"codespan":{n+=t.codespan(r);break}case"br":{n+=t.br(r);break}case"del":{n+=t.del(r);break}case"text":{n+=t.text(r);break}default:{const l='Token with "'+r.type+'" type was not found.';if(this.options.silent)return console.error(l),"";throw new Error(l)}}}return n}}class Re{constructor(e){E(this,"options");E(this,"block");this.options=e||re}preprocess(e){return e}postprocess(e){return e}processAllTokens(e){return e}provideLexer(){return this.block?B.lex:B.lexInline}provideParser(){return this.block?G.parse:G.parseInline}}E(Re,"passThroughHooks",new Set(["preprocess","postprocess","processAllTokens"]));class Fi{constructor(...e){E(this,"defaults",pt());E(this,"options",this.setOptions);E(this,"parse",this.parseMarkdown(!0));E(this,"parseInline",this.parseMarkdown(!1));E(this,"Parser",G);E(this,"Renderer",He);E(this,"TextRenderer",kt);E(this,"Lexer",B);E(this,"Tokenizer",Ue);E(this,"Hooks",Re);this.use(...e)}walkTokens(e,t){var s,i;let n=[];for(const r of e)switch(n=n.concat(t.call(this,r)),r.type){case"table":{const l=r;for(const c of l.header)n=n.concat(this.walkTokens(c.tokens,t));for(const c of l.rows)for(const h of c)n=n.concat(this.walkTokens(h.tokens,t));break}case"list":{const l=r;n=n.concat(this.walkTokens(l.items,t));break}default:{const l=r;(i=(s=this.defaults.extensions)==null?void 0:s.childTokens)!=null&&i[l.type]?this.defaults.extensions.childTokens[l.type].forEach(c=>{const h=l[c].flat(1/0);n=n.concat(this.walkTokens(h,t))}):l.tokens&&(n=n.concat(this.walkTokens(l.tokens,t)))}}return n}use(...e){const t=this.defaults.extensions||{renderers:{},childTokens:{}};return e.forEach(n=>{const s={...n};if(s.async=this.defaults.async||s.async||!1,n.extensions&&(n.extensions.forEach(i=>{if(!i.name)throw new Error("extension name required");if("renderer"in i){const r=t.renderers[i.name];r?t.renderers[i.name]=function(...l){let c=i.renderer.apply(this,l);return c===!1&&(c=r.apply(this,l)),c}:t.renderers[i.name]=i.renderer}if("tokenizer"in i){if(!i.level||i.level!=="block"&&i.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");const r=t[i.level];r?r.unshift(i.tokenizer):t[i.level]=[i.tokenizer],i.start&&(i.level==="block"?t.startBlock?t.startBlock.push(i.start):t.startBlock=[i.start]:i.level==="inline"&&(t.startInline?t.startInline.push(i.start):t.startInline=[i.start]))}"childTokens"in i&&i.childTokens&&(t.childTokens[i.name]=i.childTokens)}),s.extensions=t),n.renderer){const i=this.defaults.renderer||new He(this.defaults);for(const r in n.renderer){if(!(r in i))throw new Error(`renderer '${r}' does not exist`);if(["options","parser"].includes(r))continue;const l=r,c=n.renderer[l],h=i[l];i[l]=(...p)=>{let m=c.apply(i,p);return m===!1&&(m=h.apply(i,p)),m||""}}s.renderer=i}if(n.tokenizer){const i=this.defaults.tokenizer||new Ue(this.defaults);for(const r in n.tokenizer){if(!(r in i))throw new Error(`tokenizer '${r}' does not exist`);if(["options","rules","lexer"].includes(r))continue;const l=r,c=n.tokenizer[l],h=i[l];i[l]=(...p)=>{let m=c.apply(i,p);return m===!1&&(m=h.apply(i,p)),m}}s.tokenizer=i}if(n.hooks){const i=this.defaults.hooks||new Re;for(const r in n.hooks){if(!(r in i))throw new Error(`hook '${r}' does not exist`
Please report this to https://github.com/markedjs/marked.`,e){const s="<p>An error occurred:</p><pre>"+U(n.message+"",!0)+"</pre>";return t?Promise.resolve(s):s}if(t)return Promise.reject(n);throw n}}}const se=new Fi;function w(a,e){return se.parse(a,e)}w.options=w.setOptions=function(a){return se.setOptions(a),w.defaults=se.defaults,pn(w.defaults),w};w.getDefaults=pt;w.defaults=re;w.use=function(...a){return se.use(...a),w.defaults=se.defaults,pn(w.defaults),w};w.walkTokens=function(a,e){return se.walkTokens(a,e)};w.parseInline=se.parseInline;w.Parser=G;w.parser=G.parse;w.Renderer=He;w.TextRenderer=kt;w.Lexer=B;w.lexer=B.lex;w.Tokenizer=Ue;w.Hooks=Re;w.parse=w;w.options;w.setOptions;w.use;w.walkTokens;w.parseInline;G.parse;B.lex;/*! @license DOMPurify 3.1.7 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.1.7/LICENSE */const{entries:wn,setPrototypeOf:tn,isFrozen:Hi,getPrototypeOf:Bi,getOwnPropertyDescriptor:Gi}=Object;let{freeze:P,seal:W,create:Tn}=Object,{apply:ct,construct:ut}=typeof Reflect<"u"&&Reflect;P||(P=function(e){return e});W||(W=function(e){return e});ct||(ct=function(e,t,n){return e.apply(t,n)});ut||(ut=function(e,t){return new e(...t)});const Pe=F(Array.prototype.forEach),nn=F(Array.prototype.pop),_e=F(Array.prototype.push),ze=F(String.prototype.toLowerCase),it=F(String.prototype.toString),sn=F(String.prototype.match),we=F(String.prototype.replace),Wi=F(String.prototype.indexOf),ji=F(String.prototype.trim),Y=F(Object.prototype.hasOwnProperty),v=F(RegExp.prototype.test),Te=qi(TypeError);function F(a){return function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),s=1;s<t;s++)n[s-1]=arguments[s];return ct(a,e,n)}}function qi(a){return function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return ut(a,t)}}function k(a,e){let t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:ze;tn&&tn(a,null);let n=e.length;for(;n--;){let s=e[n];if(typeof s=="string"){const i=t(s);i!==s&&(Hi(e)||(e[n]=i),s=i)}a[s]=!0}return a}function Zi(a){for(let e=0;e<a.length;e++)Y(a,e)||(a[e]=null);return a}function ie(a){const e=Tn(null);for(const[t,n]of wn(a))Y(a,t)&&(Array.isArray(n)?e[t]=Zi(n):n&&typeof n=="object"&&n.constructor===Object?e[t]=ie(n):e[t]=n);return e}function Ee(a,e){for(;a!==null;){const n=Gi(a,e);if(n){if(n.get)return F(n.get);if(typeof n.value=="function")return F(n.value)}a=Bi(a)}function t(){return null}return t}const rn=P(["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"]),st=P(["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"]),rt=P(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight"
`+$),oe&&Pe([Ge,We,je],J=>{$=we($,J," ")}),A&&Oe?A.createHTML($):$},e.setConfig=function(){let d=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};tt(d),Xe=!0},e.clearConfig=function(){pe=null,Xe=!1},e.isValidAttribute=function(d,o,u){pe||tt({});const f=I(d),y=I(o);return Ht(f,y,u)},e.addHook=function(d,o){typeof o=="function"&&(V[d]=V[d]||[],_e(V[d],o))},e.removeHook=function(d){if(V[d])return nn(V[d])},e.removeHooks=function(d){V[d]&&(V[d]=[])},e.removeAllHooks=function(){V={}},e}var un=An();const os={class:"container"},ls={name:"DIY"},as=qn({...ls,setup(a){const e=si(),{t}=Gn.exports.useI18n(),n=()=>{e.push({path:"/tool/flash",query:{url:"https://k5.vicicode.cn/diyapi/LOSEHU"+i.flag.join("")+".bin?v="+new Date().getTime()}})},s=()=>{fetch("https://k5.vicicode.cn/diyapi/LOSEHU"+i.flag.join("")+".bin?v="+new Date().getTime()).then(h=>h.blob()).then(h=>{const p=URL.createObjectURL(h),m=document.createElement("a");m.href=p,m.download="LOSEHU-CUSTOM-"+i.flag.join("")+".bin",document.body.appendChild(m),m.click(),document.body.removeChild(m)})},i=Zn({versions:[],flag:[],disMatrix:[],disName:[],showSort:[],readme:""});Yn(()=>[...i.flag],()=>{r()});const r=()=>{i.flag.map((h,p)=>{i.disMatrix[p].forEach((m,g)=>{i.versions.indexOf("LOSEHU"+i.flag.join("").substring(0,p)+g+i.flag.join("").substring(p+1)+".bin")==-1?i.disMatrix[p].set(g,!0):i.disMatrix[p].set(g,!1)})})},{loading:l,setLoading:c}=ri(!0);return Xn(async()=>{c(!0);let h=await(await fetch("https://k5.vicicode.cn/diyapi/function.json?v="+new Date().getTime())).text();h=JSON.parse(h);let p=[],m=[];h.map(_=>{p[_[_.length-1]-1]=_,m.push(_[_.length-1]-1)}),h=p;let g=[],x=[];h.map(_=>{let O=new Map,j=new Map;for(let M=_[0]*2+1;M<_[0]*3+1;M++)O.set(_[M],!1),t("idea.diy")!=="LOSEHU DIY"?j.set(_[M],_[M-_[0]-_[0]]):j.set(_[M],_[M-_[0]]);g.push(O),x.push(j)}),i.flag=new Array(h.length).fill("0"),i.disName=x,i.disMatrix=g,i.showSort=m;const b=await(await fetch("https://k5.vicicode.cn/diyapi/version.json?v="+new Date().getTime())).text();i.versions=JSON.parse(b),r(),c(!1),t("menu.dashboard")=="CPS"?i.readme=un.sanitize(await w.parse(await(await fetch("https://k5.vicicode.cn/diyapi/README_en.md?v="+new Date().getTime())).text())):i.readme=un.sanitize(await w.parse(await(await fetch("https://k5.vicicode.cn/diyapi/README.md?v="+new Date().getTime())).text())),i.readme=i.readme.replaceAll('href="./README_en.md"',""),i.readme=i.readme.replaceAll('href="./README.md"',""),i.readme=i.readme.replaceAll("losehu/uv-k5-firmware-chinese/blob/main/payment/show.png","losehu/uv-k5-firmware-chinese/blob/main/payment/show.png?raw=true"),i.readme=i.readme.replaceAll("/images/c1.JPG","https://github.com/losehu/uv-k5-firmware-custom/blob/main/images/c1.JPG?raw=true"),i.readme=i.readme.replaceAll("/images/c2.JPG","https://github.com/losehu/uv-k5-firmware-custom/blob/main/images/c2.JPG?raw=true"),i.readme=i.readme.replaceAll("/images/c3.JPG","https://github.com/losehu/uv-k5-firmware-custom/blob/main/images/c3.JPG?raw=true"),i.readme=i.readme.replaceAll("/images/c4.JPG","https://github.com/losehu/uv-k5-firmware-custom/blob/main/images/c4.JPG?raw=true"),i.readme=i.readme.replaceAll("a href",'a target="_blank" href')}),(h,p)=>{const m=Wn,g=oi,x=Vn,b=Kn,_=ei,O=ti,j=li,M=Qn,X=ni,A=ii;return ke(),nt("div",os,[q(m,{items:[h.$t("menu.workshop"),h.$t("idea.diy")]},null,8,["items"]),q(A,{gutter:20,align:"stretch"},{default:Z(()=>[q(X,{span:24},{default:Z(()=>[q(M,{class:"general-card",title:h.$t("idea.diy"),loading:Jn(l)},{default:Z(()=>[q(j,{direction:"vertical"},{default:Z(()=>[qt("div",null,[he(Ne(h.$t("oi")),1),q(g,{theme:"primary",href:"https://github.com/losehu/uv-k5-firmware-custom",target:"_blank"},{default:Z(()=>[he("https://github.com/losehu/uv-k5-firmware-custom")]),_:1})]),(ke(!0),nt(Zt,null,Yt(i.showSort,H=>(ke(),Xt(b,{modelValue:i.flag[H],"onUpdate:modelValue":z=>i.flag[H]=z,type:"button"},{default:Z(()=>[(ke(!0),nt(Zt,null,Yt(i.disMatrix[H],z=>(ke(),Xt(x,{value:z[0],disabled:z[1]},{default:Z(()=>[he(Ne(i.disName[H].get(z[0])),1)]),_:2},1032,["value","disabled"]))),256))]),_:2},1032,["model