@blueking/ai-blueking 0.2.2 → 0.2.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -266,5 +266,5 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
266
266
|
`:">",i)},Wr.prototype.renderInline=function(t,e,n){for(var r,o="",i=this.rules,a=0,s=t.length;a<s;a++)r=t[a].type,typeof i[r]<"u"?o+=i[r](t,a,e,n,this):o+=this.renderToken(t,a,e);return o},Wr.prototype.renderInlineAsText=function(t,e,n){for(var r="",o=0,i=t.length;o<i;o++)t[o].type==="text"?r+=t[o].content:t[o].type==="image"?r+=this.renderInlineAsText(t[o].children,e,n):t[o].type==="softbreak"&&(r+=`
|
|
267
267
|
`);return r},Wr.prototype.render=function(t,e,n){var r,o,i,a="",s=this.rules;for(r=0,o=t.length;r<o;r++)i=t[r].type,i==="inline"?a+=this.renderInline(t[r].children,e,n):typeof s[i]<"u"?a+=s[i](t,r,e,n,this):a+=this.renderToken(t,r,e,n);return a};var cD=Wr;function Jt(){this.__rules__=[],this.__cache__=null}Jt.prototype.__find__=function(t){for(var e=0;e<this.__rules__.length;e++)if(this.__rules__[e].name===t)return e;return-1},Jt.prototype.__compile__=function(){var t=this,e=[""];t.__rules__.forEach(function(n){n.enabled&&n.alt.forEach(function(r){e.indexOf(r)<0&&e.push(r)})}),t.__cache__={},e.forEach(function(n){t.__cache__[n]=[],t.__rules__.forEach(function(r){r.enabled&&(n&&r.alt.indexOf(n)<0||t.__cache__[n].push(r.fn))})})},Jt.prototype.at=function(t,e,n){var r=this.__find__(t),o=n||{};if(r===-1)throw new Error("Parser rule not found: "+t);this.__rules__[r].fn=e,this.__rules__[r].alt=o.alt||[],this.__cache__=null},Jt.prototype.before=function(t,e,n,r){var o=this.__find__(t),i=r||{};if(o===-1)throw new Error("Parser rule not found: "+t);this.__rules__.splice(o,0,{name:e,enabled:!0,fn:n,alt:i.alt||[]}),this.__cache__=null},Jt.prototype.after=function(t,e,n,r){var o=this.__find__(t),i=r||{};if(o===-1)throw new Error("Parser rule not found: "+t);this.__rules__.splice(o+1,0,{name:e,enabled:!0,fn:n,alt:i.alt||[]}),this.__cache__=null},Jt.prototype.push=function(t,e,n){var r=n||{};this.__rules__.push({name:t,enabled:!0,fn:e,alt:r.alt||[]}),this.__cache__=null},Jt.prototype.enable=function(t,e){Array.isArray(t)||(t=[t]);var n=[];return t.forEach(function(r){var o=this.__find__(r);if(o<0){if(e)return;throw new Error("Rules manager: invalid rule name "+r)}this.__rules__[o].enabled=!0,n.push(r)},this),this.__cache__=null,n},Jt.prototype.enableOnly=function(t,e){Array.isArray(t)||(t=[t]),this.__rules__.forEach(function(n){n.enabled=!1}),this.enable(t,e)},Jt.prototype.disable=function(t,e){Array.isArray(t)||(t=[t]);var n=[];return t.forEach(function(r){var o=this.__find__(r);if(o<0){if(e)return;throw new Error("Rules manager: invalid rule name "+r)}this.__rules__[o].enabled=!1,n.push(r)},this),this.__cache__=null,n},Jt.prototype.getRules=function(t){return this.__cache__===null&&this.__compile__(),this.__cache__[t]||[]};var qc=Jt,lD=/\r\n?|\n/g,uD=/\0/g,fD=function(e){var n;n=e.src.replace(lD,`
|
|
268
268
|
`),n=n.replace(uD,"�"),e.src=n},pD=function(e){var n;e.inlineMode?(n=new e.Token("inline","",0),n.content=e.src,n.map=[0,1],n.children=[],e.tokens.push(n)):e.md.block.parse(e.src,e.md,e.env,e.tokens)},dD=function(e){var n=e.tokens,r,o,i;for(o=0,i=n.length;o<i;o++)r=n[o],r.type==="inline"&&e.md.inline.parse(r.content,e.md,e.env,r.children)},gD=Ne.arrayReplaceAt;function mD(t){return/^<a[>\s]/i.test(t)}function hD(t){return/^<\/a\s*>/i.test(t)}var yD=function(e){var n,r,o,i,a,s,c,l,u,f,d,p,m,g,w,h,j=e.tokens,T;if(e.md.options.linkify){for(r=0,o=j.length;r<o;r++)if(!(j[r].type!=="inline"||!e.md.linkify.pretest(j[r].content)))for(i=j[r].children,m=0,n=i.length-1;n>=0;n--){if(s=i[n],s.type==="link_close"){for(n--;i[n].level!==s.level&&i[n].type!=="link_open";)n--;continue}if(s.type==="html_inline"&&(mD(s.content)&&m>0&&m--,hD(s.content)&&m++),!(m>0)&&s.type==="text"&&e.md.linkify.test(s.content)){for(u=s.content,T=e.md.linkify.match(u),c=[],p=s.level,d=0,T.length>0&&T[0].index===0&&n>0&&i[n-1].type==="text_special"&&(T=T.slice(1)),l=0;l<T.length;l++)g=T[l].url,w=e.md.normalizeLink(g),e.md.validateLink(w)&&(h=T[l].text,T[l].schema?T[l].schema==="mailto:"&&!/^mailto:/i.test(h)?h=e.md.normalizeLinkText("mailto:"+h).replace(/^mailto:/,""):h=e.md.normalizeLinkText(h):h=e.md.normalizeLinkText("http://"+h).replace(/^http:\/\//,""),f=T[l].index,f>d&&(a=new e.Token("text","",0),a.content=u.slice(d,f),a.level=p,c.push(a)),a=new e.Token("link_open","a",1),a.attrs=[["href",w]],a.level=p++,a.markup="linkify",a.info="auto",c.push(a),a=new e.Token("text","",0),a.content=h,a.level=p,c.push(a),a=new e.Token("link_close","a",-1),a.level=--p,a.markup="linkify",a.info="auto",c.push(a),d=T[l].lastIndex);d<u.length&&(a=new e.Token("text","",0),a.content=u.slice(d),a.level=p,c.push(a)),j[r].children=i=gD(i,n,c)}}}},cm=/\+-|\.\.|\?\?\?\?|!!!!|,,|--/,vD=/\((c|tm|r)\)/i,bD=/\((c|tm|r)\)/ig,wD={c:"©",r:"®",tm:"™"};function ID(t,e){return wD[e.toLowerCase()]}function MD(t){var e,n,r=0;for(e=t.length-1;e>=0;e--)n=t[e],n.type==="text"&&!r&&(n.content=n.content.replace(bD,ID)),n.type==="link_open"&&n.info==="auto"&&r--,n.type==="link_close"&&n.info==="auto"&&r++}function CD(t){var e,n,r=0;for(e=t.length-1;e>=0;e--)n=t[e],n.type==="text"&&!r&&cm.test(n.content)&&(n.content=n.content.replace(/\+-/g,"±").replace(/\.{2,}/g,"…").replace(/([?!])…/g,"$1..").replace(/([?!]){4,}/g,"$1$1$1").replace(/,{2,}/g,",").replace(/(^|[^-])---(?=[^-]|$)/mg,"$1—").replace(/(^|\s)--(?=\s|$)/mg,"$1–").replace(/(^|[^-\s])--(?=[^-\s]|$)/mg,"$1–")),n.type==="link_open"&&n.info==="auto"&&r--,n.type==="link_close"&&n.info==="auto"&&r++}var xD=function(e){var n;if(e.md.options.typographer)for(n=e.tokens.length-1;n>=0;n--)e.tokens[n].type==="inline"&&(vD.test(e.tokens[n].content)&&MD(e.tokens[n].children),cm.test(e.tokens[n].content)&&CD(e.tokens[n].children))},lm=Ne.isWhiteSpace,um=Ne.isPunctChar,fm=Ne.isMdAsciiPunct,kD=/['"]/,pm=/['"]/g,dm="’";function Ua(t,e,n){return t.slice(0,e)+n+t.slice(e+1)}function jD(t,e){var n,r,o,i,a,s,c,l,u,f,d,p,m,g,w,h,j,T,J,L,N;for(J=[],n=0;n<t.length;n++){for(r=t[n],c=t[n].level,j=J.length-1;j>=0&&!(J[j].level<=c);j--);if(J.length=j+1,r.type==="text"){o=r.content,a=0,s=o.length;e:for(;a<s&&(pm.lastIndex=a,i=pm.exec(o),!!i);){if(w=h=!0,a=i.index+1,T=i[0]==="'",u=32,i.index-1>=0)u=o.charCodeAt(i.index-1);else for(j=n-1;j>=0&&!(t[j].type==="softbreak"||t[j].type==="hardbreak");j--)if(t[j].content){u=t[j].content.charCodeAt(t[j].content.length-1);break}if(f=32,a<s)f=o.charCodeAt(a);else for(j=n+1;j<t.length&&!(t[j].type==="softbreak"||t[j].type==="hardbreak");j++)if(t[j].content){f=t[j].content.charCodeAt(0);break}if(d=fm(u)||um(String.fromCharCode(u)),p=fm(f)||um(String.fromCharCode(f)),m=lm(u),g=lm(f),g?w=!1:p&&(m||d||(w=!1)),m?h=!1:d&&(g||p||(h=!1)),f===34&&i[0]==='"'&&u>=48&&u<=57&&(h=w=!1),w&&h&&(w=d,h=p),!w&&!h){T&&(r.content=Ua(r.content,i.index,dm));continue}if(h){for(j=J.length-1;j>=0&&(l=J[j],!(J[j].level<c));j--)if(l.single===T&&J[j].level===c){l=J[j],T?(L=e.md.options.quotes[2],N=e.md.options.quotes[3]):(L=e.md.options.quotes[0],N=e.md.options.quotes[1]),r.content=Ua(r.content,i.index,N),t[l.token].content=Ua(t[l.token].content,l.pos,L),a+=N.length-1,l.token===n&&(a+=L.length-1),o=r.content,s=o.length,J.length=j;continue e}}w?J.push({token:n,pos:i.index,single:T,level:c}):h&&T&&(r.content=Ua(r.content,i.index,dm))}}}}var TD=function(e){var n;if(e.md.options.typographer)for(n=e.tokens.length-1;n>=0;n--)e.tokens[n].type!=="inline"||!kD.test(e.tokens[n].content)||jD(e.tokens[n].children,e)},LD=function(e){var n,r,o,i,a,s,c=e.tokens;for(n=0,r=c.length;n<r;n++)if(c[n].type==="inline"){for(o=c[n].children,a=o.length,i=0;i<a;i++)o[i].type==="text_special"&&(o[i].type="text");for(i=s=0;i<a;i++)o[i].type==="text"&&i+1<a&&o[i+1].type==="text"?o[i+1].content=o[i].content+o[i+1].content:(i!==s&&(o[s]=o[i]),s++);i!==s&&(o.length=s)}};function $r(t,e,n){this.type=t,this.tag=e,this.attrs=null,this.map=null,this.nesting=n,this.level=0,this.children=null,this.content="",this.markup="",this.info="",this.meta=null,this.block=!1,this.hidden=!1}$r.prototype.attrIndex=function(e){var n,r,o;if(!this.attrs)return-1;for(n=this.attrs,r=0,o=n.length;r<o;r++)if(n[r][0]===e)return r;return-1},$r.prototype.attrPush=function(e){this.attrs?this.attrs.push(e):this.attrs=[e]},$r.prototype.attrSet=function(e,n){var r=this.attrIndex(e),o=[e,n];r<0?this.attrPush(o):this.attrs[r]=o},$r.prototype.attrGet=function(e){var n=this.attrIndex(e),r=null;return n>=0&&(r=this.attrs[n][1]),r},$r.prototype.attrJoin=function(e,n){var r=this.attrIndex(e);r<0?this.attrPush([e,n]):this.attrs[r][1]=this.attrs[r][1]+" "+n};var Xc=$r,SD=Xc;function gm(t,e,n){this.src=t,this.env=n,this.tokens=[],this.inlineMode=!1,this.md=e}gm.prototype.Token=SD;var ND=gm,DD=qc,Kc=[["normalize",fD],["block",pD],["inline",dD],["linkify",yD],["replacements",xD],["smartquotes",TD],["text_join",LD]];function el(){this.ruler=new DD;for(var t=0;t<Kc.length;t++)this.ruler.push(Kc[t][0],Kc[t][1])}el.prototype.process=function(t){var e,n,r;for(r=this.ruler.getRules(""),e=0,n=r.length;e<n;e++)r[e](t)},el.prototype.State=ND;var OD=el,tl=Ne.isSpace;function nl(t,e){var n=t.bMarks[e]+t.tShift[e],r=t.eMarks[e];return t.src.slice(n,r)}function mm(t){var e=[],n=0,r=t.length,o,i=!1,a=0,s="";for(o=t.charCodeAt(n);n<r;)o===124&&(i?(s+=t.substring(a,n-1),a=n):(e.push(s+t.substring(a,n)),s="",a=n+1)),i=o===92,n++,o=t.charCodeAt(n);return e.push(s+t.substring(a)),e}var PD=function(e,n,r,o){var i,a,s,c,l,u,f,d,p,m,g,w,h,j,T,J,L,N;if(n+2>r||(u=n+1,e.sCount[u]<e.blkIndent)||e.sCount[u]-e.blkIndent>=4||(s=e.bMarks[u]+e.tShift[u],s>=e.eMarks[u])||(L=e.src.charCodeAt(s++),L!==124&&L!==45&&L!==58)||s>=e.eMarks[u]||(N=e.src.charCodeAt(s++),N!==124&&N!==45&&N!==58&&!tl(N))||L===45&&tl(N))return!1;for(;s<e.eMarks[u];){if(i=e.src.charCodeAt(s),i!==124&&i!==45&&i!==58&&!tl(i))return!1;s++}for(a=nl(e,n+1),f=a.split("|"),m=[],c=0;c<f.length;c++){if(g=f[c].trim(),!g){if(c===0||c===f.length-1)continue;return!1}if(!/^:?-+:?$/.test(g))return!1;g.charCodeAt(g.length-1)===58?m.push(g.charCodeAt(0)===58?"center":"right"):g.charCodeAt(0)===58?m.push("left"):m.push("")}if(a=nl(e,n).trim(),a.indexOf("|")===-1||e.sCount[n]-e.blkIndent>=4||(f=mm(a),f.length&&f[0]===""&&f.shift(),f.length&&f[f.length-1]===""&&f.pop(),d=f.length,d===0||d!==m.length))return!1;if(o)return!0;for(j=e.parentType,e.parentType="table",J=e.md.block.ruler.getRules("blockquote"),p=e.push("table_open","table",1),p.map=w=[n,0],p=e.push("thead_open","thead",1),p.map=[n,n+1],p=e.push("tr_open","tr",1),p.map=[n,n+1],c=0;c<f.length;c++)p=e.push("th_open","th",1),m[c]&&(p.attrs=[["style","text-align:"+m[c]]]),p=e.push("inline","",0),p.content=f[c].trim(),p.children=[],p=e.push("th_close","th",-1);for(p=e.push("tr_close","tr",-1),p=e.push("thead_close","thead",-1),u=n+2;u<r&&!(e.sCount[u]<e.blkIndent);u++){for(T=!1,c=0,l=J.length;c<l;c++)if(J[c](e,u,r,!0)){T=!0;break}if(T||(a=nl(e,u).trim(),!a)||e.sCount[u]-e.blkIndent>=4)break;for(f=mm(a),f.length&&f[0]===""&&f.shift(),f.length&&f[f.length-1]===""&&f.pop(),u===n+2&&(p=e.push("tbody_open","tbody",1),p.map=h=[n+2,0]),p=e.push("tr_open","tr",1),p.map=[u,u+1],c=0;c<d;c++)p=e.push("td_open","td",1),m[c]&&(p.attrs=[["style","text-align:"+m[c]]]),p=e.push("inline","",0),p.content=f[c]?f[c].trim():"",p.children=[],p=e.push("td_close","td",-1);p=e.push("tr_close","tr",-1)}return h&&(p=e.push("tbody_close","tbody",-1),h[1]=u),p=e.push("table_close","table",-1),w[1]=u,e.parentType=j,e.line=u,!0},zD=function(e,n,r){var o,i,a;if(e.sCount[n]-e.blkIndent<4)return!1;for(i=o=n+1;o<r;){if(e.isEmpty(o)){o++;continue}if(e.sCount[o]-e.blkIndent>=4){o++,i=o;continue}break}return e.line=i,a=e.push("code_block","code",0),a.content=e.getLines(n,i,4+e.blkIndent,!1)+`
|
|
269
|
-
`,a.map=[n,e.line],!0},AD=function(e,n,r,o){var i,a,s,c,l,u,f,d=!1,p=e.bMarks[n]+e.tShift[n],m=e.eMarks[n];if(e.sCount[n]-e.blkIndent>=4||p+3>m||(i=e.src.charCodeAt(p),i!==126&&i!==96)||(l=p,p=e.skipChars(p,i),a=p-l,a<3)||(f=e.src.slice(l,p),s=e.src.slice(p,m),i===96&&s.indexOf(String.fromCharCode(i))>=0))return!1;if(o)return!0;for(c=n;c++,!(c>=r||(p=l=e.bMarks[c]+e.tShift[c],m=e.eMarks[c],p<m&&e.sCount[c]<e.blkIndent));)if(e.src.charCodeAt(p)===i&&!(e.sCount[c]-e.blkIndent>=4)&&(p=e.skipChars(p,i),!(p-l<a)&&(p=e.skipSpaces(p),!(p<m)))){d=!0;break}return a=e.sCount[n],e.line=c+(d?1:0),u=e.push("fence","code",0),u.info=s,u.content=e.getLines(n+1,c,a,!0),u.markup=f,u.map=[n,e.line],!0},ED=Ne.isSpace,JD=function(e,n,r,o){var i,a,s,c,l,u,f,d,p,m,g,w,h,j,T,J,L,N,Y,q,te=e.lineMax,Q=e.bMarks[n]+e.tShift[n],U=e.eMarks[n];if(e.sCount[n]-e.blkIndent>=4||e.src.charCodeAt(Q)!==62)return!1;if(o)return!0;for(m=[],g=[],j=[],T=[],N=e.md.block.ruler.getRules("blockquote"),h=e.parentType,e.parentType="blockquote",d=n;d<r&&(q=e.sCount[d]<e.blkIndent,Q=e.bMarks[d]+e.tShift[d],U=e.eMarks[d],!(Q>=U));d++){if(e.src.charCodeAt(Q++)===62&&!q){for(c=e.sCount[d]+1,e.src.charCodeAt(Q)===32?(Q++,c++,i=!1,J=!0):e.src.charCodeAt(Q)===9?(J=!0,(e.bsCount[d]+c)%4===3?(Q++,c++,i=!1):i=!0):J=!1,p=c,m.push(e.bMarks[d]),e.bMarks[d]=Q;Q<U&&(a=e.src.charCodeAt(Q),ED(a));){a===9?p+=4-(p+e.bsCount[d]+(i?1:0))%4:p++;Q++}u=Q>=U,g.push(e.bsCount[d]),e.bsCount[d]=e.sCount[d]+1+(J?1:0),j.push(e.sCount[d]),e.sCount[d]=p-c,T.push(e.tShift[d]),e.tShift[d]=Q-e.bMarks[d];continue}if(u)break;for(L=!1,s=0,l=N.length;s<l;s++)if(N[s](e,d,r,!0)){L=!0;break}if(L){e.lineMax=d,e.blkIndent!==0&&(m.push(e.bMarks[d]),g.push(e.bsCount[d]),T.push(e.tShift[d]),j.push(e.sCount[d]),e.sCount[d]-=e.blkIndent);break}m.push(e.bMarks[d]),g.push(e.bsCount[d]),T.push(e.tShift[d]),j.push(e.sCount[d]),e.sCount[d]=-1}for(w=e.blkIndent,e.blkIndent=0,Y=e.push("blockquote_open","blockquote",1),Y.markup=">",Y.map=f=[n,0],e.md.block.tokenize(e,n,d),Y=e.push("blockquote_close","blockquote",-1),Y.markup=">",e.lineMax=te,e.parentType=h,f[1]=e.line,s=0;s<T.length;s++)e.bMarks[s+n]=m[s],e.tShift[s+n]=T[s],e.sCount[s+n]=j[s],e.bsCount[s+n]=g[s];return e.blkIndent=w,!0},QD=Ne.isSpace,RD=function(e,n,r,o){var i,a,s,c,l=e.bMarks[n]+e.tShift[n],u=e.eMarks[n];if(e.sCount[n]-e.blkIndent>=4||(i=e.src.charCodeAt(l++),i!==42&&i!==45&&i!==95))return!1;for(a=1;l<u;){if(s=e.src.charCodeAt(l++),s!==i&&!QD(s))return!1;s===i&&a++}return a<3?!1:(o||(e.line=n+1,c=e.push("hr","hr",0),c.map=[n,e.line],c.markup=Array(a+1).join(String.fromCharCode(i))),!0)},hm=Ne.isSpace;function ym(t,e){var n,r,o,i;return r=t.bMarks[e]+t.tShift[e],o=t.eMarks[e],n=t.src.charCodeAt(r++),n!==42&&n!==45&&n!==43||r<o&&(i=t.src.charCodeAt(r),!hm(i))?-1:r}function vm(t,e){var n,r=t.bMarks[e]+t.tShift[e],o=r,i=t.eMarks[e];if(o+1>=i||(n=t.src.charCodeAt(o++),n<48||n>57))return-1;for(;;){if(o>=i)return-1;if(n=t.src.charCodeAt(o++),n>=48&&n<=57){if(o-r>=10)return-1;continue}if(n===41||n===46)break;return-1}return o<i&&(n=t.src.charCodeAt(o),!hm(n))?-1:o}function GD(t,e){var n,r,o=t.level+2;for(n=e+2,r=t.tokens.length-2;n<r;n++)t.tokens[n].level===o&&t.tokens[n].type==="paragraph_open"&&(t.tokens[n+2].hidden=!0,t.tokens[n].hidden=!0,n+=2)}var FD=function(e,n,r,o){var i,a,s,c,l,u,f,d,p,m,g,w,h,j,T,J,L,N,Y,q,te,Q,U,V,X,S,M,I=n,G=!1,_=!0;if(e.sCount[I]-e.blkIndent>=4||e.listIndent>=0&&e.sCount[I]-e.listIndent>=4&&e.sCount[I]<e.blkIndent)return!1;if(o&&e.parentType==="paragraph"&&e.sCount[I]>=e.blkIndent&&(G=!0),(Q=vm(e,I))>=0){if(f=!0,V=e.bMarks[I]+e.tShift[I],h=Number(e.src.slice(V,Q-1)),G&&h!==1)return!1}else if((Q=ym(e,I))>=0)f=!1;else return!1;if(G&&e.skipSpaces(Q)>=e.eMarks[I])return!1;if(o)return!0;for(w=e.src.charCodeAt(Q-1),g=e.tokens.length,f?(M=e.push("ordered_list_open","ol",1),h!==1&&(M.attrs=[["start",h]])):M=e.push("bullet_list_open","ul",1),M.map=m=[I,0],M.markup=String.fromCharCode(w),U=!1,S=e.md.block.ruler.getRules("list"),L=e.parentType,e.parentType="list";I<r;){for(te=Q,j=e.eMarks[I],u=T=e.sCount[I]+Q-(e.bMarks[I]+e.tShift[I]);te<j;){if(i=e.src.charCodeAt(te),i===9)T+=4-(T+e.bsCount[I])%4;else if(i===32)T++;else break;te++}if(a=te,a>=j?l=1:l=T-u,l>4&&(l=1),c=u+l,M=e.push("list_item_open","li",1),M.markup=String.fromCharCode(w),M.map=d=[I,0],f&&(M.info=e.src.slice(V,Q-1)),q=e.tight,Y=e.tShift[I],N=e.sCount[I],J=e.listIndent,e.listIndent=e.blkIndent,e.blkIndent=c,e.tight=!0,e.tShift[I]=a-e.bMarks[I],e.sCount[I]=T,a>=j&&e.isEmpty(I+1)?e.line=Math.min(e.line+2,r):e.md.block.tokenize(e,I,r,!0),(!e.tight||U)&&(_=!1),U=e.line-I>1&&e.isEmpty(e.line-1),e.blkIndent=e.listIndent,e.listIndent=J,e.tShift[I]=Y,e.sCount[I]=N,e.tight=q,M=e.push("list_item_close","li",-1),M.markup=String.fromCharCode(w),I=e.line,d[1]=I,I>=r||e.sCount[I]<e.blkIndent||e.sCount[I]-e.blkIndent>=4)break;for(X=!1,s=0,p=S.length;s<p;s++)if(S[s](e,I,r,!0)){X=!0;break}if(X)break;if(f){if(Q=vm(e,I),Q<0)break;V=e.bMarks[I]+e.tShift[I]}else if(Q=ym(e,I),Q<0)break;if(w!==e.src.charCodeAt(Q-1))break}return f?M=e.push("ordered_list_close","ol",-1):M=e.push("bullet_list_close","ul",-1),M.markup=String.fromCharCode(w),m[1]=I,e.line=I,e.parentType=L,_&&GD(e,g),!0},ZD=Ne.normalizeReference,qa=Ne.isSpace,_D=function(e,n,r,o){var i,a,s,c,l,u,f,d,p,m,g,w,h,j,T,J,L=0,N=e.bMarks[n]+e.tShift[n],Y=e.eMarks[n],q=n+1;if(e.sCount[n]-e.blkIndent>=4||e.src.charCodeAt(N)!==91)return!1;for(;++N<Y;)if(e.src.charCodeAt(N)===93&&e.src.charCodeAt(N-1)!==92){if(N+1===Y||e.src.charCodeAt(N+1)!==58)return!1;break}for(c=e.lineMax,T=e.md.block.ruler.getRules("reference"),m=e.parentType,e.parentType="reference";q<c&&!e.isEmpty(q);q++)if(!(e.sCount[q]-e.blkIndent>3)&&!(e.sCount[q]<0)){for(j=!1,u=0,f=T.length;u<f;u++)if(T[u](e,q,c,!0)){j=!0;break}if(j)break}for(h=e.getLines(n,q,e.blkIndent,!1).trim(),Y=h.length,N=1;N<Y;N++){if(i=h.charCodeAt(N),i===91)return!1;if(i===93){p=N;break}else i===10?L++:i===92&&(N++,N<Y&&h.charCodeAt(N)===10&&L++)}if(p<0||h.charCodeAt(p+1)!==58)return!1;for(N=p+2;N<Y;N++)if(i=h.charCodeAt(N),i===10)L++;else if(!qa(i))break;if(g=e.md.helpers.parseLinkDestination(h,N,Y),!g.ok||(l=e.md.normalizeLink(g.str),!e.md.validateLink(l)))return!1;for(N=g.pos,L+=g.lines,a=N,s=L,w=N;N<Y;N++)if(i=h.charCodeAt(N),i===10)L++;else if(!qa(i))break;for(g=e.md.helpers.parseLinkTitle(h,N,Y),N<Y&&w!==N&&g.ok?(J=g.str,N=g.pos,L+=g.lines):(J="",N=a,L=s);N<Y&&(i=h.charCodeAt(N),!!qa(i));)N++;if(N<Y&&h.charCodeAt(N)!==10&&J)for(J="",N=a,L=s;N<Y&&(i=h.charCodeAt(N),!!qa(i));)N++;return N<Y&&h.charCodeAt(N)!==10||(d=ZD(h.slice(1,p)),!d)?!1:(o||(typeof e.env.references>"u"&&(e.env.references={}),typeof e.env.references[d]>"u"&&(e.env.references[d]={title:J,href:l}),e.parentType=m,e.line=n+L+1),!0)},VD=["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","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","section","source","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],Xa={},HD="[a-zA-Z_:][a-zA-Z0-9:._-]*",YD="[^\"'=<>`\\x00-\\x20]+",BD="'[^']*'",WD='"[^"]*"',$D="(?:"+YD+"|"+BD+"|"+WD+")",UD="(?:\\s+"+HD+"(?:\\s*=\\s*"+$D+")?)",bm="<[A-Za-z][A-Za-z0-9\\-]*"+UD+"*\\s*\\/?>",wm="<\\/[A-Za-z][A-Za-z0-9\\-]*\\s*>",qD="<!---->|<!--(?:-?[^>-])(?:-?[^-])*-->",XD="<[?][\\s\\S]*?[?]>",KD="<![A-Z]+\\s+[^>]*>",e2="<!\\[CDATA\\[[\\s\\S]*?\\]\\]>",t2=new RegExp("^(?:"+bm+"|"+wm+"|"+qD+"|"+XD+"|"+KD+"|"+e2+")"),n2=new RegExp("^(?:"+bm+"|"+wm+")");Xa.HTML_TAG_RE=t2,Xa.HTML_OPEN_CLOSE_TAG_RE=n2;var r2=VD,o2=Xa.HTML_OPEN_CLOSE_TAG_RE,Ur=[[/^<(script|pre|style|textarea)(?=(\s|>|$))/i,/<\/(script|pre|style|textarea)>/i,!0],[/^<!--/,/-->/,!0],[/^<\?/,/\?>/,!0],[/^<![A-Z]/,/>/,!0],[/^<!\[CDATA\[/,/\]\]>/,!0],[new RegExp("^</?("+r2.join("|")+")(?=(\\s|/?>|$))","i"),/^$/,!0],[new RegExp(o2.source+"\\s*$"),/^$/,!1]],i2=function(e,n,r,o){var i,a,s,c,l=e.bMarks[n]+e.tShift[n],u=e.eMarks[n];if(e.sCount[n]-e.blkIndent>=4||!e.md.options.html||e.src.charCodeAt(l)!==60)return!1;for(c=e.src.slice(l,u),i=0;i<Ur.length&&!Ur[i][0].test(c);i++);if(i===Ur.length)return!1;if(o)return Ur[i][2];if(a=n+1,!Ur[i][1].test(c)){for(;a<r&&!(e.sCount[a]<e.blkIndent);a++)if(l=e.bMarks[a]+e.tShift[a],u=e.eMarks[a],c=e.src.slice(l,u),Ur[i][1].test(c)){c.length!==0&&a++;break}}return e.line=a,s=e.push("html_block","",0),s.map=[n,a],s.content=e.getLines(n,a,e.blkIndent,!0),!0},Im=Ne.isSpace,a2=function(e,n,r,o){var i,a,s,c,l=e.bMarks[n]+e.tShift[n],u=e.eMarks[n];if(e.sCount[n]-e.blkIndent>=4||(i=e.src.charCodeAt(l),i!==35||l>=u))return!1;for(a=1,i=e.src.charCodeAt(++l);i===35&&l<u&&a<=6;)a++,i=e.src.charCodeAt(++l);return a>6||l<u&&!Im(i)?!1:(o||(u=e.skipSpacesBack(u,l),s=e.skipCharsBack(u,35,l),s>l&&Im(e.src.charCodeAt(s-1))&&(u=s),e.line=n+1,c=e.push("heading_open","h"+String(a),1),c.markup="########".slice(0,a),c.map=[n,e.line],c=e.push("inline","",0),c.content=e.src.slice(l,u).trim(),c.map=[n,e.line],c.children=[],c=e.push("heading_close","h"+String(a),-1),c.markup="########".slice(0,a)),!0)},s2=function(e,n,r){var o,i,a,s,c,l,u,f,d,p=n+1,m,g=e.md.block.ruler.getRules("paragraph");if(e.sCount[n]-e.blkIndent>=4)return!1;for(m=e.parentType,e.parentType="paragraph";p<r&&!e.isEmpty(p);p++)if(!(e.sCount[p]-e.blkIndent>3)){if(e.sCount[p]>=e.blkIndent&&(l=e.bMarks[p]+e.tShift[p],u=e.eMarks[p],l<u&&(d=e.src.charCodeAt(l),(d===45||d===61)&&(l=e.skipChars(l,d),l=e.skipSpaces(l),l>=u)))){f=d===61?1:2;break}if(!(e.sCount[p]<0)){for(i=!1,a=0,s=g.length;a<s;a++)if(g[a](e,p,r,!0)){i=!0;break}if(i)break}}return f?(o=e.getLines(n,p,e.blkIndent,!1).trim(),e.line=p+1,c=e.push("heading_open","h"+String(f),1),c.markup=String.fromCharCode(d),c.map=[n,e.line],c=e.push("inline","",0),c.content=o,c.map=[n,e.line-1],c.children=[],c=e.push("heading_close","h"+String(f),-1),c.markup=String.fromCharCode(d),e.parentType=m,!0):!1},c2=function(e,n,r){var o,i,a,s,c,l,u=n+1,f=e.md.block.ruler.getRules("paragraph");for(l=e.parentType,e.parentType="paragraph";u<r&&!e.isEmpty(u);u++)if(!(e.sCount[u]-e.blkIndent>3)&&!(e.sCount[u]<0)){for(i=!1,a=0,s=f.length;a<s;a++)if(f[a](e,u,r,!0)){i=!0;break}if(i)break}return o=e.getLines(n,u,e.blkIndent,!1).trim(),e.line=u,c=e.push("paragraph_open","p",1),c.map=[n,e.line],c=e.push("inline","",0),c.content=o,c.map=[n,e.line],c.children=[],c=e.push("paragraph_close","p",-1),e.parentType=l,!0},Mm=Xc,Ka=Ne.isSpace;function an(t,e,n,r){var o,i,a,s,c,l,u,f;for(this.src=t,this.md=e,this.env=n,this.tokens=r,this.bMarks=[],this.eMarks=[],this.tShift=[],this.sCount=[],this.bsCount=[],this.blkIndent=0,this.line=0,this.lineMax=0,this.tight=!1,this.ddIndent=-1,this.listIndent=-1,this.parentType="root",this.level=0,this.result="",i=this.src,f=!1,a=s=l=u=0,c=i.length;s<c;s++){if(o=i.charCodeAt(s),!f)if(Ka(o)){l++,o===9?u+=4-u%4:u++;continue}else f=!0;(o===10||s===c-1)&&(o!==10&&s++,this.bMarks.push(a),this.eMarks.push(s),this.tShift.push(l),this.sCount.push(u),this.bsCount.push(0),f=!1,l=0,u=0,a=s+1)}this.bMarks.push(i.length),this.eMarks.push(i.length),this.tShift.push(0),this.sCount.push(0),this.bsCount.push(0),this.lineMax=this.bMarks.length-1}an.prototype.push=function(t,e,n){var r=new Mm(t,e,n);return r.block=!0,n<0&&this.level--,r.level=this.level,n>0&&this.level++,this.tokens.push(r),r},an.prototype.isEmpty=function(e){return this.bMarks[e]+this.tShift[e]>=this.eMarks[e]},an.prototype.skipEmptyLines=function(e){for(var n=this.lineMax;e<n&&!(this.bMarks[e]+this.tShift[e]<this.eMarks[e]);e++);return e},an.prototype.skipSpaces=function(e){for(var n,r=this.src.length;e<r&&(n=this.src.charCodeAt(e),!!Ka(n));e++);return e},an.prototype.skipSpacesBack=function(e,n){if(e<=n)return e;for(;e>n;)if(!Ka(this.src.charCodeAt(--e)))return e+1;return e},an.prototype.skipChars=function(e,n){for(var r=this.src.length;e<r&&this.src.charCodeAt(e)===n;e++);return e},an.prototype.skipCharsBack=function(e,n,r){if(e<=r)return e;for(;e>r;)if(n!==this.src.charCodeAt(--e))return e+1;return e},an.prototype.getLines=function(e,n,r,o){var i,a,s,c,l,u,f,d=e;if(e>=n)return"";for(u=new Array(n-e),i=0;d<n;d++,i++){for(a=0,f=c=this.bMarks[d],d+1<n||o?l=this.eMarks[d]+1:l=this.eMarks[d];c<l&&a<r;){if(s=this.src.charCodeAt(c),Ka(s))s===9?a+=4-(a+this.bsCount[d])%4:a++;else if(c-f<this.tShift[d])a++;else break;c++}a>r?u[i]=new Array(a-r+1).join(" ")+this.src.slice(c,l):u[i]=this.src.slice(c,l)}return u.join("")},an.prototype.Token=Mm;var l2=an,u2=qc,es=[["table",PD,["paragraph","reference"]],["code",zD],["fence",AD,["paragraph","reference","blockquote","list"]],["blockquote",JD,["paragraph","reference","blockquote","list"]],["hr",RD,["paragraph","reference","blockquote","list"]],["list",FD,["paragraph","reference","blockquote"]],["reference",_D],["html_block",i2,["paragraph","reference","blockquote"]],["heading",a2,["paragraph","reference","blockquote"]],["lheading",s2],["paragraph",c2]];function ts(){this.ruler=new u2;for(var t=0;t<es.length;t++)this.ruler.push(es[t][0],es[t][1],{alt:(es[t][2]||[]).slice()})}ts.prototype.tokenize=function(t,e,n){for(var r,o,i,a=this.ruler.getRules(""),s=a.length,c=e,l=!1,u=t.md.options.maxNesting;c<n&&(t.line=c=t.skipEmptyLines(c),!(c>=n||t.sCount[c]<t.blkIndent));){if(t.level>=u){t.line=n;break}for(i=t.line,o=0;o<s;o++)if(r=a[o](t,c,n,!1),r){if(i>=t.line)throw new Error("block rule didn't increment state.line");break}if(!r)throw new Error("none of the block rules matched");t.tight=!l,t.isEmpty(t.line-1)&&(l=!0),c=t.line,c<n&&t.isEmpty(c)&&(l=!0,c++,t.line=c)}},ts.prototype.parse=function(t,e,n,r){var o;t&&(o=new this.State(t,e,n,r),this.tokenize(o,o.line,o.lineMax))},ts.prototype.State=l2;var f2=ts;function p2(t){switch(t){case 10:case 33:case 35:case 36:case 37:case 38:case 42:case 43:case 45:case 58:case 60:case 61:case 62:case 64:case 91:case 92:case 93:case 94:case 95:case 96:case 123:case 125:case 126:return!0;default:return!1}}for(var d2=function(e,n){for(var r=e.pos;r<e.posMax&&!p2(e.src.charCodeAt(r));)r++;return r===e.pos?!1:(n||(e.pending+=e.src.slice(e.pos,r)),e.pos=r,!0)},g2=/(?:^|[^a-z0-9.+-])([a-z][a-z0-9.+-]*)$/i,m2=function(e,n){var r,o,i,a,s,c,l,u;return!e.md.options.linkify||e.linkLevel>0||(r=e.pos,o=e.posMax,r+3>o)||e.src.charCodeAt(r)!==58||e.src.charCodeAt(r+1)!==47||e.src.charCodeAt(r+2)!==47||(i=e.pending.match(g2),!i)||(a=i[1],s=e.md.linkify.matchAtStart(e.src.slice(r-a.length)),!s)||(c=s.url,c.length<=a.length)||(c=c.replace(/\*+$/,""),l=e.md.normalizeLink(c),!e.md.validateLink(l))?!1:(n||(e.pending=e.pending.slice(0,-a.length),u=e.push("link_open","a",1),u.attrs=[["href",l]],u.markup="linkify",u.info="auto",u=e.push("text","",0),u.content=e.md.normalizeLinkText(c),u=e.push("link_close","a",-1),u.markup="linkify",u.info="auto"),e.pos+=c.length-a.length,!0)},h2=Ne.isSpace,y2=function(e,n){var r,o,i,a=e.pos;if(e.src.charCodeAt(a)!==10)return!1;if(r=e.pending.length-1,o=e.posMax,!n)if(r>=0&&e.pending.charCodeAt(r)===32)if(r>=1&&e.pending.charCodeAt(r-1)===32){for(i=r-1;i>=1&&e.pending.charCodeAt(i-1)===32;)i--;e.pending=e.pending.slice(0,i),e.push("hardbreak","br",0)}else e.pending=e.pending.slice(0,-1),e.push("softbreak","br",0);else e.push("softbreak","br",0);for(a++;a<o&&h2(e.src.charCodeAt(a));)a++;return e.pos=a,!0},v2=Ne.isSpace,rl=[],Cm=0;Cm<256;Cm++)rl.push(0);"\\!\"#$%&'()*+,./:;<=>?@[]^_`{|}~-".split("").forEach(function(t){rl[t.charCodeAt(0)]=1});var b2=function(e,n){var r,o,i,a,s,c=e.pos,l=e.posMax;if(e.src.charCodeAt(c)!==92||(c++,c>=l))return!1;if(r=e.src.charCodeAt(c),r===10){for(n||e.push("hardbreak","br",0),c++;c<l&&(r=e.src.charCodeAt(c),!!v2(r));)c++;return e.pos=c,!0}return a=e.src[c],r>=55296&&r<=56319&&c+1<l&&(o=e.src.charCodeAt(c+1),o>=56320&&o<=57343&&(a+=e.src[c+1],c++)),i="\\"+a,n||(s=e.push("text_special","",0),r<256&&rl[r]!==0?s.content=a:s.content=i,s.markup=i,s.info="escape"),e.pos=c+1,!0},w2=function(e,n){var r,o,i,a,s,c,l,u,f=e.pos,d=e.src.charCodeAt(f);if(d!==96)return!1;for(r=f,f++,o=e.posMax;f<o&&e.src.charCodeAt(f)===96;)f++;if(i=e.src.slice(r,f),l=i.length,e.backticksScanned&&(e.backticks[l]||0)<=r)return n||(e.pending+=i),e.pos+=l,!0;for(c=f;(s=e.src.indexOf("`",c))!==-1;){for(c=s+1;c<o&&e.src.charCodeAt(c)===96;)c++;if(u=c-s,u===l)return n||(a=e.push("code_inline","code",0),a.markup=i,a.content=e.src.slice(f,s).replace(/\n/g," ").replace(/^ (.+) $/,"$1")),e.pos=c,!0;e.backticks[u]=s}return e.backticksScanned=!0,n||(e.pending+=i),e.pos+=l,!0},ns={};ns.tokenize=function(e,n){var r,o,i,a,s,c=e.pos,l=e.src.charCodeAt(c);if(n||l!==126||(o=e.scanDelims(e.pos,!0),a=o.length,s=String.fromCharCode(l),a<2))return!1;for(a%2&&(i=e.push("text","",0),i.content=s,a--),r=0;r<a;r+=2)i=e.push("text","",0),i.content=s+s,e.delimiters.push({marker:l,length:0,token:e.tokens.length-1,end:-1,open:o.can_open,close:o.can_close});return e.pos+=o.length,!0};function xm(t,e){var n,r,o,i,a,s=[],c=e.length;for(n=0;n<c;n++)o=e[n],o.marker===126&&o.end!==-1&&(i=e[o.end],a=t.tokens[o.token],a.type="s_open",a.tag="s",a.nesting=1,a.markup="~~",a.content="",a=t.tokens[i.token],a.type="s_close",a.tag="s",a.nesting=-1,a.markup="~~",a.content="",t.tokens[i.token-1].type==="text"&&t.tokens[i.token-1].content==="~"&&s.push(i.token-1));for(;s.length;){for(n=s.pop(),r=n+1;r<t.tokens.length&&t.tokens[r].type==="s_close";)r++;r--,n!==r&&(a=t.tokens[r],t.tokens[r]=t.tokens[n],t.tokens[n]=a)}}ns.postProcess=function(e){var n,r=e.tokens_meta,o=e.tokens_meta.length;for(xm(e,e.delimiters),n=0;n<o;n++)r[n]&&r[n].delimiters&&xm(e,r[n].delimiters)};var rs={};rs.tokenize=function(e,n){var r,o,i,a=e.pos,s=e.src.charCodeAt(a);if(n||s!==95&&s!==42)return!1;for(o=e.scanDelims(e.pos,s===42),r=0;r<o.length;r++)i=e.push("text","",0),i.content=String.fromCharCode(s),e.delimiters.push({marker:s,length:o.length,token:e.tokens.length-1,end:-1,open:o.can_open,close:o.can_close});return e.pos+=o.length,!0};function km(t,e){var n,r,o,i,a,s,c=e.length;for(n=c-1;n>=0;n--)r=e[n],!(r.marker!==95&&r.marker!==42)&&r.end!==-1&&(o=e[r.end],s=n>0&&e[n-1].end===r.end+1&&e[n-1].marker===r.marker&&e[n-1].token===r.token-1&&e[r.end+1].token===o.token+1,a=String.fromCharCode(r.marker),i=t.tokens[r.token],i.type=s?"strong_open":"em_open",i.tag=s?"strong":"em",i.nesting=1,i.markup=s?a+a:a,i.content="",i=t.tokens[o.token],i.type=s?"strong_close":"em_close",i.tag=s?"strong":"em",i.nesting=-1,i.markup=s?a+a:a,i.content="",s&&(t.tokens[e[n-1].token].content="",t.tokens[e[r.end+1].token].content="",n--))}rs.postProcess=function(e){var n,r=e.tokens_meta,o=e.tokens_meta.length;for(km(e,e.delimiters),n=0;n<o;n++)r[n]&&r[n].delimiters&&km(e,r[n].delimiters)};var I2=Ne.normalizeReference,ol=Ne.isSpace,M2=function(e,n){var r,o,i,a,s,c,l,u,f,d="",p="",m=e.pos,g=e.posMax,w=e.pos,h=!0;if(e.src.charCodeAt(e.pos)!==91||(s=e.pos+1,a=e.md.helpers.parseLinkLabel(e,e.pos,!0),a<0))return!1;if(c=a+1,c<g&&e.src.charCodeAt(c)===40){for(h=!1,c++;c<g&&(o=e.src.charCodeAt(c),!(!ol(o)&&o!==10));c++);if(c>=g)return!1;if(w=c,l=e.md.helpers.parseLinkDestination(e.src,c,e.posMax),l.ok){for(d=e.md.normalizeLink(l.str),e.md.validateLink(d)?c=l.pos:d="",w=c;c<g&&(o=e.src.charCodeAt(c),!(!ol(o)&&o!==10));c++);if(l=e.md.helpers.parseLinkTitle(e.src,c,e.posMax),c<g&&w!==c&&l.ok)for(p=l.str,c=l.pos;c<g&&(o=e.src.charCodeAt(c),!(!ol(o)&&o!==10));c++);}(c>=g||e.src.charCodeAt(c)!==41)&&(h=!0),c++}if(h){if(typeof e.env.references>"u")return!1;if(c<g&&e.src.charCodeAt(c)===91?(w=c+1,c=e.md.helpers.parseLinkLabel(e,c),c>=0?i=e.src.slice(w,c++):c=a+1):c=a+1,i||(i=e.src.slice(s,a)),u=e.env.references[I2(i)],!u)return e.pos=m,!1;d=u.href,p=u.title}return n||(e.pos=s,e.posMax=a,f=e.push("link_open","a",1),f.attrs=r=[["href",d]],p&&r.push(["title",p]),e.linkLevel++,e.md.inline.tokenize(e),e.linkLevel--,f=e.push("link_close","a",-1)),e.pos=c,e.posMax=g,!0},C2=Ne.normalizeReference,il=Ne.isSpace,x2=function(e,n){var r,o,i,a,s,c,l,u,f,d,p,m,g,w="",h=e.pos,j=e.posMax;if(e.src.charCodeAt(e.pos)!==33||e.src.charCodeAt(e.pos+1)!==91||(c=e.pos+2,s=e.md.helpers.parseLinkLabel(e,e.pos+1,!1),s<0))return!1;if(l=s+1,l<j&&e.src.charCodeAt(l)===40){for(l++;l<j&&(o=e.src.charCodeAt(l),!(!il(o)&&o!==10));l++);if(l>=j)return!1;for(g=l,f=e.md.helpers.parseLinkDestination(e.src,l,e.posMax),f.ok&&(w=e.md.normalizeLink(f.str),e.md.validateLink(w)?l=f.pos:w=""),g=l;l<j&&(o=e.src.charCodeAt(l),!(!il(o)&&o!==10));l++);if(f=e.md.helpers.parseLinkTitle(e.src,l,e.posMax),l<j&&g!==l&&f.ok)for(d=f.str,l=f.pos;l<j&&(o=e.src.charCodeAt(l),!(!il(o)&&o!==10));l++);else d="";if(l>=j||e.src.charCodeAt(l)!==41)return e.pos=h,!1;l++}else{if(typeof e.env.references>"u")return!1;if(l<j&&e.src.charCodeAt(l)===91?(g=l+1,l=e.md.helpers.parseLinkLabel(e,l),l>=0?a=e.src.slice(g,l++):l=s+1):l=s+1,a||(a=e.src.slice(c,s)),u=e.env.references[C2(a)],!u)return e.pos=h,!1;w=u.href,d=u.title}return n||(i=e.src.slice(c,s),e.md.inline.parse(i,e.md,e.env,m=[]),p=e.push("image","img",0),p.attrs=r=[["src",w],["alt",""]],p.children=m,p.content=i,d&&r.push(["title",d])),e.pos=l,e.posMax=j,!0},k2=/^([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])?)*)$/,j2=/^([a-zA-Z][a-zA-Z0-9+.\-]{1,31}):([^<>\x00-\x20]*)$/,T2=function(e,n){var r,o,i,a,s,c,l=e.pos;if(e.src.charCodeAt(l)!==60)return!1;for(s=e.pos,c=e.posMax;;){if(++l>=c||(a=e.src.charCodeAt(l),a===60))return!1;if(a===62)break}return r=e.src.slice(s+1,l),j2.test(r)?(o=e.md.normalizeLink(r),e.md.validateLink(o)?(n||(i=e.push("link_open","a",1),i.attrs=[["href",o]],i.markup="autolink",i.info="auto",i=e.push("text","",0),i.content=e.md.normalizeLinkText(r),i=e.push("link_close","a",-1),i.markup="autolink",i.info="auto"),e.pos+=r.length+2,!0):!1):k2.test(r)?(o=e.md.normalizeLink("mailto:"+r),e.md.validateLink(o)?(n||(i=e.push("link_open","a",1),i.attrs=[["href",o]],i.markup="autolink",i.info="auto",i=e.push("text","",0),i.content=e.md.normalizeLinkText(r),i=e.push("link_close","a",-1),i.markup="autolink",i.info="auto"),e.pos+=r.length+2,!0):!1):!1},L2=Xa.HTML_TAG_RE;function S2(t){return/^<a[>\s]/i.test(t)}function N2(t){return/^<\/a\s*>/i.test(t)}function D2(t){var e=t|32;return e>=97&&e<=122}var O2=function(e,n){var r,o,i,a,s=e.pos;return!e.md.options.html||(i=e.posMax,e.src.charCodeAt(s)!==60||s+2>=i)||(r=e.src.charCodeAt(s+1),r!==33&&r!==63&&r!==47&&!D2(r))||(o=e.src.slice(s).match(L2),!o)?!1:(n||(a=e.push("html_inline","",0),a.content=o[0],S2(a.content)&&e.linkLevel++,N2(a.content)&&e.linkLevel--),e.pos+=o[0].length,!0)},jm=Hg,P2=Ne.has,z2=Ne.isValidEntityCode,Tm=Ne.fromCodePoint,A2=/^&#((?:x[a-f0-9]{1,6}|[0-9]{1,7}));/i,E2=/^&([a-z][a-z0-9]{1,31});/i,J2=function(e,n){var r,o,i,a,s=e.pos,c=e.posMax;if(e.src.charCodeAt(s)!==38||s+1>=c)return!1;if(r=e.src.charCodeAt(s+1),r===35){if(i=e.src.slice(s).match(A2),i)return n||(o=i[1][0].toLowerCase()==="x"?parseInt(i[1].slice(1),16):parseInt(i[1],10),a=e.push("text_special","",0),a.content=z2(o)?Tm(o):Tm(65533),a.markup=i[0],a.info="entity"),e.pos+=i[0].length,!0}else if(i=e.src.slice(s).match(E2),i&&P2(jm,i[1]))return n||(a=e.push("text_special","",0),a.content=jm[i[1]],a.markup=i[0],a.info="entity"),e.pos+=i[0].length,!0;return!1};function Lm(t){var e,n,r,o,i,a,s,c,l={},u=t.length;if(u){var f=0,d=-2,p=[];for(e=0;e<u;e++)if(r=t[e],p.push(0),(t[f].marker!==r.marker||d!==r.token-1)&&(f=e),d=r.token,r.length=r.length||0,!!r.close){for(l.hasOwnProperty(r.marker)||(l[r.marker]=[-1,-1,-1,-1,-1,-1]),i=l[r.marker][(r.open?3:0)+r.length%3],n=f-p[f]-1,a=n;n>i;n-=p[n]+1)if(o=t[n],o.marker===r.marker&&o.open&&o.end<0&&(s=!1,(o.close||r.open)&&(o.length+r.length)%3===0&&(o.length%3!==0||r.length%3!==0)&&(s=!0),!s)){c=n>0&&!t[n-1].open?p[n-1]+1:0,p[e]=e-n+c,p[n]=c,r.open=!1,o.end=e,o.close=!1,a=-1,d=-2;break}a!==-1&&(l[r.marker][(r.open?3:0)+(r.length||0)%3]=a)}}}var Q2=function(e){var n,r=e.tokens_meta,o=e.tokens_meta.length;for(Lm(e.delimiters),n=0;n<o;n++)r[n]&&r[n].delimiters&&Lm(r[n].delimiters)},R2=function(e){var n,r,o=0,i=e.tokens,a=e.tokens.length;for(n=r=0;n<a;n++)i[n].nesting<0&&o--,i[n].level=o,i[n].nesting>0&&o++,i[n].type==="text"&&n+1<a&&i[n+1].type==="text"?i[n+1].content=i[n].content+i[n+1].content:(n!==r&&(i[r]=i[n]),r++);n!==r&&(i.length=r)},al=Xc,Sm=Ne.isWhiteSpace,Nm=Ne.isPunctChar,Dm=Ne.isMdAsciiPunct;function yi(t,e,n,r){this.src=t,this.env=n,this.md=e,this.tokens=r,this.tokens_meta=Array(r.length),this.pos=0,this.posMax=this.src.length,this.level=0,this.pending="",this.pendingLevel=0,this.cache={},this.delimiters=[],this._prev_delimiters=[],this.backticks={},this.backticksScanned=!1,this.linkLevel=0}yi.prototype.pushPending=function(){var t=new al("text","",0);return t.content=this.pending,t.level=this.pendingLevel,this.tokens.push(t),this.pending="",t},yi.prototype.push=function(t,e,n){this.pending&&this.pushPending();var r=new al(t,e,n),o=null;return n<0&&(this.level--,this.delimiters=this._prev_delimiters.pop()),r.level=this.level,n>0&&(this.level++,this._prev_delimiters.push(this.delimiters),this.delimiters=[],o={delimiters:this.delimiters}),this.pendingLevel=this.level,this.tokens.push(r),this.tokens_meta.push(o),r},yi.prototype.scanDelims=function(t,e){var n=t,r,o,i,a,s,c,l,u,f,d=!0,p=!0,m=this.posMax,g=this.src.charCodeAt(t);for(r=t>0?this.src.charCodeAt(t-1):32;n<m&&this.src.charCodeAt(n)===g;)n++;return i=n-t,o=n<m?this.src.charCodeAt(n):32,l=Dm(r)||Nm(String.fromCharCode(r)),f=Dm(o)||Nm(String.fromCharCode(o)),c=Sm(r),u=Sm(o),u?d=!1:f&&(c||l||(d=!1)),c?p=!1:l&&(u||f||(p=!1)),e?(a=d,s=p):(a=d&&(!p||l),s=p&&(!d||f)),{can_open:a,can_close:s,length:i}},yi.prototype.Token=al;var G2=yi,Om=qc,sl=[["text",d2],["linkify",m2],["newline",y2],["escape",b2],["backticks",w2],["strikethrough",ns.tokenize],["emphasis",rs.tokenize],["link",M2],["image",x2],["autolink",T2],["html_inline",O2],["entity",J2]],cl=[["balance_pairs",Q2],["strikethrough",ns.postProcess],["emphasis",rs.postProcess],["fragments_join",R2]];function vi(){var t;for(this.ruler=new Om,t=0;t<sl.length;t++)this.ruler.push(sl[t][0],sl[t][1]);for(this.ruler2=new Om,t=0;t<cl.length;t++)this.ruler2.push(cl[t][0],cl[t][1])}vi.prototype.skipToken=function(t){var e,n,r=t.pos,o=this.ruler.getRules(""),i=o.length,a=t.md.options.maxNesting,s=t.cache;if(typeof s[r]<"u"){t.pos=s[r];return}if(t.level<a){for(n=0;n<i;n++)if(t.level++,e=o[n](t,!0),t.level--,e){if(r>=t.pos)throw new Error("inline rule didn't increment state.pos");break}}else t.pos=t.posMax;e||t.pos++,s[r]=t.pos},vi.prototype.tokenize=function(t){for(var e,n,r,o=this.ruler.getRules(""),i=o.length,a=t.posMax,s=t.md.options.maxNesting;t.pos<a;){if(r=t.pos,t.level<s){for(n=0;n<i;n++)if(e=o[n](t,!1),e){if(r>=t.pos)throw new Error("inline rule didn't increment state.pos");break}}if(e){if(t.pos>=a)break;continue}t.pending+=t.src[t.pos++]}t.pending&&t.pushPending()},vi.prototype.parse=function(t,e,n,r){var o,i,a,s=new this.State(t,e,n,r);for(this.tokenize(s),i=this.ruler2.getRules(""),a=i.length,o=0;o<a;o++)i[o](s)},vi.prototype.State=G2;var F2=vi,ll,Pm;function Z2(){return Pm||(Pm=1,ll=function(t){var e={};t=t||{},e.src_Any=em().source,e.src_Cc=nm().source,e.src_Z=im().source,e.src_P=Yc.source,e.src_ZPCc=[e.src_Z,e.src_P,e.src_Cc].join("|"),e.src_ZCc=[e.src_Z,e.src_Cc].join("|");var n="[><|]";return e.src_pseudo_letter="(?:(?!"+n+"|"+e.src_ZPCc+")"+e.src_Any+")",e.src_ip4="(?:(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)",e.src_auth="(?:(?:(?!"+e.src_ZCc+"|[@/\\[\\]()]).)+@)?",e.src_port="(?::(?:6(?:[0-4]\\d{3}|5(?:[0-4]\\d{2}|5(?:[0-2]\\d|3[0-5])))|[1-5]?\\d{1,4}))?",e.src_host_terminator="(?=$|"+n+"|"+e.src_ZPCc+")(?!"+(t["---"]?"-(?!--)|":"-|")+"_|:\\d|\\.-|\\.(?!$|"+e.src_ZPCc+"))",e.src_path="(?:[/?#](?:(?!"+e.src_ZCc+"|"+n+`|[()[\\]{}.,"'?!\\-;]).|\\[(?:(?!`+e.src_ZCc+"|\\]).)*\\]|\\((?:(?!"+e.src_ZCc+"|[)]).)*\\)|\\{(?:(?!"+e.src_ZCc+'|[}]).)*\\}|\\"(?:(?!'+e.src_ZCc+`|["]).)+\\"|\\'(?:(?!`+e.src_ZCc+"|[']).)+\\'|\\'(?="+e.src_pseudo_letter+"|[-])|\\.{2,}[a-zA-Z0-9%/&]|\\.(?!"+e.src_ZCc+"|[.]|$)|"+(t["---"]?"\\-(?!--(?:[^-]|$))(?:-*)|":"\\-+|")+",(?!"+e.src_ZCc+"|$)|;(?!"+e.src_ZCc+"|$)|\\!+(?!"+e.src_ZCc+"|[!]|$)|\\?(?!"+e.src_ZCc+"|[?]|$))+|\\/)?",e.src_email_name='[\\-;:&=\\+\\$,\\.a-zA-Z0-9_][\\-;:&=\\+\\$,\\"\\.a-zA-Z0-9_]*',e.src_xn="xn--[a-z0-9\\-]{1,59}",e.src_domain_root="(?:"+e.src_xn+"|"+e.src_pseudo_letter+"{1,63})",e.src_domain="(?:"+e.src_xn+"|(?:"+e.src_pseudo_letter+")|(?:"+e.src_pseudo_letter+"(?:-|"+e.src_pseudo_letter+"){0,61}"+e.src_pseudo_letter+"))",e.src_host="(?:(?:(?:(?:"+e.src_domain+")\\.)*"+e.src_domain+"))",e.tpl_host_fuzzy="(?:"+e.src_ip4+"|(?:(?:(?:"+e.src_domain+")\\.)+(?:%TLDS%)))",e.tpl_host_no_ip_fuzzy="(?:(?:(?:"+e.src_domain+")\\.)+(?:%TLDS%))",e.src_host_strict=e.src_host+e.src_host_terminator,e.tpl_host_fuzzy_strict=e.tpl_host_fuzzy+e.src_host_terminator,e.src_host_port_strict=e.src_host+e.src_port+e.src_host_terminator,e.tpl_host_port_fuzzy_strict=e.tpl_host_fuzzy+e.src_port+e.src_host_terminator,e.tpl_host_port_no_ip_fuzzy_strict=e.tpl_host_no_ip_fuzzy+e.src_port+e.src_host_terminator,e.tpl_host_fuzzy_test="localhost|www\\.|\\.\\d{1,3}\\.|(?:\\.(?:%TLDS%)(?:"+e.src_ZPCc+"|>|$))",e.tpl_email_fuzzy="(^|"+n+'|"|\\(|'+e.src_ZCc+")("+e.src_email_name+"@"+e.tpl_host_fuzzy_strict+")",e.tpl_link_fuzzy="(^|(?![.:/\\-_@])(?:[$+<=>^`||]|"+e.src_ZPCc+"))((?![$+<=>^`||])"+e.tpl_host_port_fuzzy_strict+e.src_path+")",e.tpl_link_no_ip_fuzzy="(^|(?![.:/\\-_@])(?:[$+<=>^`||]|"+e.src_ZPCc+"))((?![$+<=>^`||])"+e.tpl_host_port_no_ip_fuzzy_strict+e.src_path+")",e}),ll}function ul(t){var e=Array.prototype.slice.call(arguments,1);return e.forEach(function(n){n&&Object.keys(n).forEach(function(r){t[r]=n[r]})}),t}function os(t){return Object.prototype.toString.call(t)}function _2(t){return os(t)==="[object String]"}function V2(t){return os(t)==="[object Object]"}function H2(t){return os(t)==="[object RegExp]"}function zm(t){return os(t)==="[object Function]"}function Y2(t){return t.replace(/[.?*+^$[\]\\(){}|-]/g,"\\$&")}var Am={fuzzyLink:!0,fuzzyEmail:!0,fuzzyIP:!1};function B2(t){return Object.keys(t||{}).reduce(function(e,n){return e||Am.hasOwnProperty(n)},!1)}var W2={"http:":{validate:function(t,e,n){var r=t.slice(e);return n.re.http||(n.re.http=new RegExp("^\\/\\/"+n.re.src_auth+n.re.src_host_port_strict+n.re.src_path,"i")),n.re.http.test(r)?r.match(n.re.http)[0].length:0}},"https:":"http:","ftp:":"http:","//":{validate:function(t,e,n){var r=t.slice(e);return n.re.no_http||(n.re.no_http=new RegExp("^"+n.re.src_auth+"(?:localhost|(?:(?:"+n.re.src_domain+")\\.)+"+n.re.src_domain_root+")"+n.re.src_port+n.re.src_host_terminator+n.re.src_path,"i")),n.re.no_http.test(r)?e>=3&&t[e-3]===":"||e>=3&&t[e-3]==="/"?0:r.match(n.re.no_http)[0].length:0}},"mailto:":{validate:function(t,e,n){var r=t.slice(e);return n.re.mailto||(n.re.mailto=new RegExp("^"+n.re.src_email_name+"@"+n.re.src_host_strict,"i")),n.re.mailto.test(r)?r.match(n.re.mailto)[0].length:0}}},$2="a[cdefgilmnoqrstuwxz]|b[abdefghijmnorstvwyz]|c[acdfghiklmnoruvwxyz]|d[ejkmoz]|e[cegrstu]|f[ijkmor]|g[abdefghilmnpqrstuwy]|h[kmnrtu]|i[delmnoqrst]|j[emop]|k[eghimnprwyz]|l[abcikrstuvy]|m[acdeghklmnopqrstuvwxyz]|n[acefgilopruz]|om|p[aefghklmnrstwy]|qa|r[eosuw]|s[abcdeghijklmnortuvxyz]|t[cdfghjklmnortvwz]|u[agksyz]|v[aceginu]|w[fs]|y[et]|z[amw]",U2="biz|com|edu|gov|net|org|pro|web|xxx|aero|asia|coop|info|museum|name|shop|рф".split("|");function q2(t){t.__index__=-1,t.__text_cache__=""}function X2(t){return function(e,n){var r=e.slice(n);return t.test(r)?r.match(t)[0].length:0}}function Em(){return function(t,e){e.normalize(t)}}function is(t){var e=t.re=Z2()(t.__opts__),n=t.__tlds__.slice();t.onCompile(),t.__tlds_replaced__||n.push($2),n.push(e.src_xn),e.src_tlds=n.join("|");function r(s){return s.replace("%TLDS%",e.src_tlds)}e.email_fuzzy=RegExp(r(e.tpl_email_fuzzy),"i"),e.link_fuzzy=RegExp(r(e.tpl_link_fuzzy),"i"),e.link_no_ip_fuzzy=RegExp(r(e.tpl_link_no_ip_fuzzy),"i"),e.host_fuzzy_test=RegExp(r(e.tpl_host_fuzzy_test),"i");var o=[];t.__compiled__={};function i(s,c){throw new Error('(LinkifyIt) Invalid schema "'+s+'": '+c)}Object.keys(t.__schemas__).forEach(function(s){var c=t.__schemas__[s];if(c!==null){var l={validate:null,link:null};if(t.__compiled__[s]=l,V2(c)){H2(c.validate)?l.validate=X2(c.validate):zm(c.validate)?l.validate=c.validate:i(s,c),zm(c.normalize)?l.normalize=c.normalize:c.normalize?i(s,c):l.normalize=Em();return}if(_2(c)){o.push(s);return}i(s,c)}}),o.forEach(function(s){t.__compiled__[t.__schemas__[s]]&&(t.__compiled__[s].validate=t.__compiled__[t.__schemas__[s]].validate,t.__compiled__[s].normalize=t.__compiled__[t.__schemas__[s]].normalize)}),t.__compiled__[""]={validate:null,normalize:Em()};var a=Object.keys(t.__compiled__).filter(function(s){return s.length>0&&t.__compiled__[s]}).map(Y2).join("|");t.re.schema_test=RegExp("(^|(?!_)(?:[><|]|"+e.src_ZPCc+"))("+a+")","i"),t.re.schema_search=RegExp("(^|(?!_)(?:[><|]|"+e.src_ZPCc+"))("+a+")","ig"),t.re.schema_at_start=RegExp("^"+t.re.schema_search.source,"i"),t.re.pretest=RegExp("("+t.re.schema_test.source+")|("+t.re.host_fuzzy_test.source+")|@","i"),q2(t)}function K2(t,e){var n=t.__index__,r=t.__last_index__,o=t.__text_cache__.slice(n,r);this.schema=t.__schema__.toLowerCase(),this.index=n+e,this.lastIndex=r+e,this.raw=o,this.text=o,this.url=o}function fl(t,e){var n=new K2(t,e);return t.__compiled__[n.schema].normalize(n,t),n}function wt(t,e){if(!(this instanceof wt))return new wt(t,e);e||B2(t)&&(e=t,t={}),this.__opts__=ul({},Am,e),this.__index__=-1,this.__last_index__=-1,this.__schema__="",this.__text_cache__="",this.__schemas__=ul({},W2,t),this.__compiled__={},this.__tlds__=U2,this.__tlds_replaced__=!1,this.re={},is(this)}wt.prototype.add=function(e,n){return this.__schemas__[e]=n,is(this),this},wt.prototype.set=function(e){return this.__opts__=ul(this.__opts__,e),this},wt.prototype.test=function(e){if(this.__text_cache__=e,this.__index__=-1,!e.length)return!1;var n,r,o,i,a,s,c,l,u;if(this.re.schema_test.test(e)){for(c=this.re.schema_search,c.lastIndex=0;(n=c.exec(e))!==null;)if(i=this.testSchemaAt(e,n[2],c.lastIndex),i){this.__schema__=n[2],this.__index__=n.index+n[1].length,this.__last_index__=n.index+n[0].length+i;break}}return this.__opts__.fuzzyLink&&this.__compiled__["http:"]&&(l=e.search(this.re.host_fuzzy_test),l>=0&&(this.__index__<0||l<this.__index__)&&(r=e.match(this.__opts__.fuzzyIP?this.re.link_fuzzy:this.re.link_no_ip_fuzzy))!==null&&(a=r.index+r[1].length,(this.__index__<0||a<this.__index__)&&(this.__schema__="",this.__index__=a,this.__last_index__=r.index+r[0].length))),this.__opts__.fuzzyEmail&&this.__compiled__["mailto:"]&&(u=e.indexOf("@"),u>=0&&(o=e.match(this.re.email_fuzzy))!==null&&(a=o.index+o[1].length,s=o.index+o[0].length,(this.__index__<0||a<this.__index__||a===this.__index__&&s>this.__last_index__)&&(this.__schema__="mailto:",this.__index__=a,this.__last_index__=s))),this.__index__>=0},wt.prototype.pretest=function(e){return this.re.pretest.test(e)},wt.prototype.testSchemaAt=function(e,n,r){return this.__compiled__[n.toLowerCase()]?this.__compiled__[n.toLowerCase()].validate(e,r,this):0},wt.prototype.match=function(e){var n=0,r=[];this.__index__>=0&&this.__text_cache__===e&&(r.push(fl(this,n)),n=this.__last_index__);for(var o=n?e.slice(n):e;this.test(o);)r.push(fl(this,n)),o=o.slice(this.__last_index__),n+=this.__last_index__;return r.length?r:null},wt.prototype.matchAtStart=function(e){if(this.__text_cache__=e,this.__index__=-1,!e.length)return null;var n=this.re.schema_at_start.exec(e);if(!n)return null;var r=this.testSchemaAt(e,n[2],n[0].length);return r?(this.__schema__=n[2],this.__index__=n.index+n[1].length,this.__last_index__=n.index+n[0].length+r,fl(this,0)):null},wt.prototype.tlds=function(e,n){return e=Array.isArray(e)?e:[e],n?(this.__tlds__=this.__tlds__.concat(e).sort().filter(function(r,o,i){return r!==i[o-1]}).reverse(),is(this),this):(this.__tlds__=e.slice(),this.__tlds_replaced__=!0,is(this),this)},wt.prototype.normalize=function(e){e.schema||(e.url="http://"+e.url),e.schema==="mailto:"&&!/^mailto:/i.test(e.url)&&(e.url="mailto:"+e.url)},wt.prototype.onCompile=function(){};var eO=wt;const qr=2147483647,sn=36,pl=1,bi=26,tO=38,nO=700,Jm=72,Qm=128,Rm="-",rO=/^xn--/,oO=/[^\0-\x7F]/,iO=/[\x2E\u3002\uFF0E\uFF61]/g,aO={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},dl=sn-pl,cn=Math.floor,gl=String.fromCharCode;function Qn(t){throw new RangeError(aO[t])}function sO(t,e){const n=[];let r=t.length;for(;r--;)n[r]=e(t[r]);return n}function Gm(t,e){const n=t.split("@");let r="";n.length>1&&(r=n[0]+"@",t=n[1]),t=t.replace(iO,".");const o=t.split("."),i=sO(o,e).join(".");return r+i}function ml(t){const e=[];let n=0;const r=t.length;for(;n<r;){const o=t.charCodeAt(n++);if(o>=55296&&o<=56319&&n<r){const i=t.charCodeAt(n++);(i&64512)==56320?e.push(((o&1023)<<10)+(i&1023)+65536):(e.push(o),n--)}else e.push(o)}return e}const Fm=t=>String.fromCodePoint(...t),cO=function(t){return t>=48&&t<58?26+(t-48):t>=65&&t<91?t-65:t>=97&&t<123?t-97:sn},Zm=function(t,e){return t+22+75*(t<26)-((e!=0)<<5)},_m=function(t,e,n){let r=0;for(t=n?cn(t/nO):t>>1,t+=cn(t/e);t>dl*bi>>1;r+=sn)t=cn(t/dl);return cn(r+(dl+1)*t/(t+tO))},hl=function(t){const e=[],n=t.length;let r=0,o=Qm,i=Jm,a=t.lastIndexOf(Rm);a<0&&(a=0);for(let s=0;s<a;++s)t.charCodeAt(s)>=128&&Qn("not-basic"),e.push(t.charCodeAt(s));for(let s=a>0?a+1:0;s<n;){const c=r;for(let u=1,f=sn;;f+=sn){s>=n&&Qn("invalid-input");const d=cO(t.charCodeAt(s++));d>=sn&&Qn("invalid-input"),d>cn((qr-r)/u)&&Qn("overflow"),r+=d*u;const p=f<=i?pl:f>=i+bi?bi:f-i;if(d<p)break;const m=sn-p;u>cn(qr/m)&&Qn("overflow"),u*=m}const l=e.length+1;i=_m(r-c,l,c==0),cn(r/l)>qr-o&&Qn("overflow"),o+=cn(r/l),r%=l,e.splice(r++,0,o)}return String.fromCodePoint(...e)},yl=function(t){const e=[];t=ml(t);const n=t.length;let r=Qm,o=0,i=Jm;for(const c of t)c<128&&e.push(gl(c));const a=e.length;let s=a;for(a&&e.push(Rm);s<n;){let c=qr;for(const u of t)u>=r&&u<c&&(c=u);const l=s+1;c-r>cn((qr-o)/l)&&Qn("overflow"),o+=(c-r)*l,r=c;for(const u of t)if(u<r&&++o>qr&&Qn("overflow"),u===r){let f=o;for(let d=sn;;d+=sn){const p=d<=i?pl:d>=i+bi?bi:d-i;if(f<p)break;const m=f-p,g=sn-p;e.push(gl(Zm(p+m%g,0))),f=cn(m/g)}e.push(gl(Zm(f,0))),i=_m(o,l,s===a),o=0,++s}++o,++r}return e.join("")},Vm=function(t){return Gm(t,function(e){return rO.test(e)?hl(e.slice(4).toLowerCase()):e})},Hm=function(t){return Gm(t,function(e){return oO.test(e)?"xn--"+yl(e):e})},lO=ey(Object.freeze(Object.defineProperty({__proto__:null,decode:hl,default:{version:"2.3.1",ucs2:{decode:ml,encode:Fm},decode:hl,encode:yl,toASCII:Hm,toUnicode:Vm},encode:yl,toASCII:Hm,toUnicode:Vm,ucs2decode:ml,ucs2encode:Fm},Symbol.toStringTag,{value:"Module"})));var uO={options:{html:!1,xhtmlOut:!1,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:100},components:{core:{},block:{},inline:{}}},fO={options:{html:!1,xhtmlOut:!1,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:20},components:{core:{rules:["normalize","block","inline","text_join"]},block:{rules:["paragraph"]},inline:{rules:["text"],rules2:["balance_pairs","fragments_join"]}}},pO={options:{html:!0,xhtmlOut:!0,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:20},components:{core:{rules:["normalize","block","inline","text_join"]},block:{rules:["blockquote","code","fence","heading","hr","html_block","lheading","list","reference","paragraph"]},inline:{rules:["autolink","backticks","emphasis","entity","escape","html_inline","image","link","newline","text"],rules2:["balance_pairs","emphasis","fragments_join"]}}},wi=Ne,dO=$a,gO=cD,mO=OD,hO=f2,yO=F2,vO=eO,rr=Br,Ym=lO,bO={default:uO,zero:fO,commonmark:pO},wO=/^(vbscript|javascript|file|data):/,IO=/^data:image\/(gif|png|jpeg|webp);/;function MO(t){var e=t.trim().toLowerCase();return wO.test(e)?!!IO.test(e):!0}var Bm=["http:","https:","mailto:"];function CO(t){var e=rr.parse(t,!0);if(e.hostname&&(!e.protocol||Bm.indexOf(e.protocol)>=0))try{e.hostname=Ym.toASCII(e.hostname)}catch{}return rr.encode(rr.format(e))}function xO(t){var e=rr.parse(t,!0);if(e.hostname&&(!e.protocol||Bm.indexOf(e.protocol)>=0))try{e.hostname=Ym.toUnicode(e.hostname)}catch{}return rr.decode(rr.format(e),rr.decode.defaultChars+"%")}function Dt(t,e){if(!(this instanceof Dt))return new Dt(t,e);e||wi.isString(t)||(e=t||{},t="default"),this.inline=new yO,this.block=new hO,this.core=new mO,this.renderer=new gO,this.linkify=new vO,this.validateLink=MO,this.normalizeLink=CO,this.normalizeLinkText=xO,this.utils=wi,this.helpers=wi.assign({},dO),this.options={},this.configure(t),e&&this.set(e)}Dt.prototype.set=function(t){return wi.assign(this.options,t),this},Dt.prototype.configure=function(t){var e=this,n;if(wi.isString(t)&&(n=t,t=bO[n],!t))throw new Error('Wrong `markdown-it` preset "'+n+'", check name');if(!t)throw new Error("Wrong `markdown-it` preset, can't be empty");return t.options&&e.set(t.options),t.components&&Object.keys(t.components).forEach(function(r){t.components[r].rules&&e[r].ruler.enableOnly(t.components[r].rules),t.components[r].rules2&&e[r].ruler2.enableOnly(t.components[r].rules2)}),this},Dt.prototype.enable=function(t,e){var n=[];Array.isArray(t)||(t=[t]),["core","block","inline"].forEach(function(o){n=n.concat(this[o].ruler.enable(t,!0))},this),n=n.concat(this.inline.ruler2.enable(t,!0));var r=t.filter(function(o){return n.indexOf(o)<0});if(r.length&&!e)throw new Error("MarkdownIt. Failed to enable unknown rule(s): "+r);return this},Dt.prototype.disable=function(t,e){var n=[];Array.isArray(t)||(t=[t]),["core","block","inline"].forEach(function(o){n=n.concat(this[o].ruler.disable(t,!0))},this),n=n.concat(this.inline.ruler2.disable(t,!0));var r=t.filter(function(o){return n.indexOf(o)<0});if(r.length&&!e)throw new Error("MarkdownIt. Failed to disable unknown rule(s): "+r);return this},Dt.prototype.use=function(t){var e=[this].concat(Array.prototype.slice.call(arguments,1));return t.apply(t,e),this},Dt.prototype.parse=function(t,e){if(typeof t!="string")throw new Error("Input data should be a String");var n=new this.core.State(t,this,e);return this.core.process(n),n.tokens},Dt.prototype.render=function(t,e){return e=e||{},this.renderer.render(this.parse(t,e),this.options,e)},Dt.prototype.parseInline=function(t,e){var n=new this.core.State(t,this,e);return n.inlineMode=!0,this.core.process(n),n.tokens},Dt.prototype.renderInline=function(t,e){return e=e||{},this.renderer.render(this.parseInline(t,e),this.options,e)};var kO=Dt,jO=kO;const TO=pr(jO),LO="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEgAAABICAYAAABV7bNHAAAAAXNSR0IArs4c6QAAH3tJREFUeF69nAd4VFXax39nStqkNxJC6KGDghQFXIosogGkCKKuFYVFFBVQXEEN69pFF5VFFGRFUelSFUQjCFIUkN5LIIH0hGSSSabd7zln5sIkhBRwv8MzzwBz7yn/8/b3PUfwP2iaphk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dRveaYLT4VEsla+m8EVJyiRzIOScKWDz5zs4tOkYJRfluVqhirubdm5Mxzvb0aZ3U9AMuGTlrLewU9Y4G0yCncv3snHOZmzFZcQ0jsbldJF/Ll/ZRCNTBtH0pgTKbeo6CrfBoBkXvbJWO5h6+INRT90w9d3nbi+5PPcqVX+V/3lNh7ZSUjTDwTZLxJKRI11zT2q3Ia5+uUlFkDTMgQJnuYuMI9nkpOUphzQqMYK45jEEhZs9Al4TygQwmcHlAHkaQRg0JZQPpZ5i69e/KftJsnO9pjH0vL8rTTs3cDnKPDVYyhsxsTPzZNaLU/vG/fj/ernJ5QWnGFJSICUlxT3viBbiNjNaiKqvx6lw4YksMTEKTNKz0MugBTjt4HZ6QnxGI5Rb7Zw7kkl8UiyW8ABl9+iay1bspDCrSLovWni9YM0cYNQc5erUknwkU9N4y+Bg3uhWolhuppxzSkrdb35RFFx7Yqv6yRTPfWWkCOFemKZF2NyMQav6gqVLLKhJpvEpElfRGE+QTAplSTnfz9rEps+30Sm5PcNfulNRlTy8IenLYBRuowmj9F1dDmlJqOOkxxHMCzTwyf2NRIGa1/RrB0Zf7XUDpMDxAUn+e/YJLdZkoL/wXNHVr05XdGlgNKOt+2ATqfO2SGGsjZg+UGKhaS6lqmXBhV7bUq7BRiHEN043G8Y191z+Vnk+10MEfwpAPqaAWAKGET6XvH2WpjXVnAzRDPRAq8Ulb7IAwQS2i+WkHUgnoVUcIdEW3J779DyXvAkOCzdbhYlvH210+ZK3ymNfDzB/KgVVnojawZ8xpPSpeE2gpCw/E21x01TTaIGglabRRIhLVwTKq75kKzYYKTYHUORwcMZdzhEhOIaBU3YnB3VK0cdNSdVM9MYt2fzPAMW3j/8Dx+VMHl8zFNkAAAAASUVORK5CYII=";var vl=(t=>(t.Assistant="assistant",t.System="system",t.User="user",t))(vl||{}),Ii=(t=>(t.Error="error",t.Loading="loading",t.Success="success",t))(Ii||{});const SO={class:"message-content user"},NO={key:0,class:"time-message user"},DO=["innerHTML"],OO={class:"message-photo user"},PO=["src"],zO=k.createElementVNode("span",{class:"message-photo ai"},[k.createElementVNode("i",{class:"ai-blueking-icon ai-blueking-ai"})],-1),AO={class:"message-content ai"},EO={key:0,class:"time-message ai"},JO={key:2,width:"18",height:"18",class:"loading-message","aria-hidden":"true"},QO=[k.createElementVNode("use",{"xlink:href":"#ai-blueking-quanquan"},null,-1)],RO={key:3,class:"message-wrap"},GO=["innerHTML"],FO=k.defineComponent({__name:"render-message",props:{message:{},userPhoto:{default:LO}},setup(t){const e=t,n=k.computed(()=>{var a;const i={error:"ai-blueking-icon ai-blueking-warning-circle-fill",loading:"",success:""};return(a=e.message)!=null&&a.status?i[e.message.status]:""}),r=k.computed(()=>{if(e.message.content){const a=new TO().render(e.message.content);return Q1.sanitize(a)}return""}),o=k.computed(()=>{const i=Fa(e.message.time),a=Fa();return e.message.time?a.isSame(i,"year")?i.format("MM-DD HH:mm:ss"):i.format("YYYY-MM-DD HH:mm:ss"):""});return(i,a)=>(k.openBlock(),k.createElementBlock("li",{class:k.normalizeClass([i.message.role,"message-main"])},[i.message.role===k.unref(vl).User?(k.openBlock(),k.createElementBlock(k.Fragment,{key:0},[k.createElementVNode("p",SO,[o.value?(k.openBlock(),k.createElementBlock("span",NO,k.toDisplayString(o.value),1)):k.createCommentVNode("v-if",!0),k.createElementVNode("span",{class:"markdown-message",innerHTML:r.value},null,8,DO)]),k.createElementVNode("span",OO,[k.createElementVNode("img",{src:i.userPhoto},null,8,PO)])],64)):(k.openBlock(),k.createElementBlock(k.Fragment,{key:1},[zO,k.createElementVNode("p",AO,[o.value?(k.openBlock(),k.createElementBlock("span",EO,k.toDisplayString(o.value),1)):k.createCommentVNode("v-if",!0),n.value?(k.openBlock(),k.createElementBlock("i",{key:1,class:k.normalizeClass(n.value)},null,2)):k.createCommentVNode("v-if",!0),i.message.status===k.unref(Ii).Loading?(k.openBlock(),k.createElementBlock("svg",JO,QO)):k.createCommentVNode("v-if",!0),i.message.status===k.unref(Ii).Error?(k.openBlock(),k.createElementBlock("span",RO,k.toDisplayString(i.message.content),1)):(k.openBlock(),k.createElementBlock("span",{key:4,innerHTML:r.value,class:k.normalizeClass({"markdown-message":!0,loading:i.message.status===k.unref(Ii).Loading})},null,10,GO))])],64))],2))}}),ZO={class:"prompt-list"},_O={class:"search-group"},VO=["onClick"],HO={class:"prompt-content"},YO=Yr(k.defineComponent({__name:"render-send",props:{prompts:{},placeholder:{},value:{}},emits:["update:value","enter","choose-prompt"],setup(t,{emit:e}){const n=t,r=e,o=o1,i=Ga,a=k.ref(""),s=k.ref(40),c=k.ref(),l=k.ref(!1),u=k.computed(()=>{var L;return((L=n.prompts)==null?void 0:L.filter(N=>N.content.includes(a.value)))||[]}),f=k.computed(()=>{var L;return n.placeholder?n.placeholder:(L=n.prompts)!=null&&L.length?He("您可以键入 “/” 查看更多Prompt"):He("请输入")}),d=L=>{r("update:value",L)},p=()=>{var L;n.value==="/"&&((L=n.prompts)!=null&&L.length)?T():J()},m=()=>{k.nextTick(()=>{var N;const L=(N=c.value)==null?void 0:N.$el.querySelector("textarea");(L==null?void 0:L.scrollHeight)>40&&n.value?s.value=L.scrollHeight<=300?L.scrollHeight:300:s.value=40})},g=L=>{r("update:value",L.content),r("choose-prompt",L),J(),j()},w=(L,N)=>{N.key==="Enter"&&!N.shiftKey&&(N.preventDefault(),r("enter"))},h=()=>{d("")},j=()=>{var N;const L=(N=c.value)==null?void 0:N.$el.querySelector("textarea");L==null||L.focus()},T=()=>{l.value=!0},J=()=>{l.value=!1};return k.watch(()=>n.value,()=>{m(),p()}),k.onMounted(j),(L,N)=>(k.openBlock(),k.createBlock(k.unref(bg),{width:"calc(100% - 118px)","ext-cls":"empty-padding",arrow:!1,"is-show":l.value,"popover-delay":0,boundary:"parent",placement:"bottom",theme:"light",trigger:"manual"},{content:k.withCtx(()=>{var Y;return[k.createElementVNode("div",null,[k.withDirectives((k.openBlock(),k.createElementBlock("section",ZO,[k.createVNode(k.unref(Tg),{class:"input-search",modelValue:a.value,"onUpdate:modelValue":N[0]||(N[0]=q=>a.value=q),behavior:"simplicity",clearable:""},null,8,["modelValue"]),k.createElementVNode("section",_O,[(k.openBlock(!0),k.createElementBlock(k.Fragment,null,k.renderList(u.value,(q,te)=>k.withDirectives((k.openBlock(),k.createElementBlock("span",{class:"group-prompt",key:te,onClick:Q=>g(q)},[k.createElementVNode("span",HO,k.toDisplayString(q.content),1)],8,VO)),[[k.unref(i),{content:q.content,placement:"right",theme:"light",width:300,zIndex:9999999,extCls:"prompt-popover"}]])),128)),(Y=u.value)!=null&&Y.length?k.createCommentVNode("v-if",!0):(k.openBlock(),k.createBlock(k.unref(s1),{key:0,class:"exception-wrap-item exception-part",scene:"part",type:"search-empty"}))])])),[[k.unref(o),J]])])]}),default:k.withCtx(()=>[k.createElementVNode("section",{style:k.normalizeStyle({"--text-height":s.value+"px"}),class:"send-prompt-container"},[k.createVNode(k.unref(Tg),{ref_key:"inputRef",ref:c,class:"send-prompt",autosize:!1,clearable:!0,"model-value":L.value,"native-attributes":{autofocus:"autofocus"},placeholder:f.value,row:"1",type:"textarea",onInput:d,onKeydown:w},null,8,["model-value","placeholder"]),L.value?(k.openBlock(),k.createBlock(k.unref(_s),{key:0,class:"show-clear-only-hover bk-input--clear-icon clear-icon",onClick:h})):k.createCommentVNode("v-if",!0)],4)]),_:1},8,["is-show"]))}}),[["__scopeId","data-v-2374c5aa"]]),BO=(t=>(k.pushScopeId("data-v-fd57f18d"),t=t(),k.popScopeId(),t))(()=>k.createElementVNode("svg",{width:"10",height:"10",class:"ai-blueking-render-stop-icon","aria-hidden":"true"},[k.createElementVNode("use",{"xlink:href":"#ai-blueking-tingzhi"})],-1)),WO=Yr(k.defineComponent({__name:"render-stop",props:{isShow:{type:Boolean}},emits:["stop"],setup(t,{emit:e}){const n=e,r=()=>{n("stop")};return(o,i)=>o.isShow?(k.openBlock(),k.createElementBlock("span",{key:0,class:"ai-blueking-render-stop",onClick:r},[BO,k.createTextVNode(" "+k.toDisplayString(k.unref(He)("终止生成")),1)])):k.createCommentVNode("v-if",!0)}}),[["__scopeId","data-v-fd57f18d"]]),$O={key:0,class:"time-wrapper"},UO={class:"time-message"},qO=Yr(k.defineComponent({__name:"render-time",props:{message:{}},setup(t){const e=t,n=k.computed(()=>{var a;const r=Fa(e.message.time),o=Fa(),i={0:He("日"),1:He("一"),2:He("二"),3:He("三"),4:He("四"),5:He("五"),6:He("六")};return!e.message.time||(a=window.showTimes)!=null&&a.some(s=>Math.abs(r.diff(s,"minute"))<10&&s!==e.message.time)?"":(window.showTimes=[...window.showTimes||[],e.message.time],o.isSame(r,"day")?r.format("HH:mm:ss"):o.subtract(1,"day").isSame(r,"week")?He("昨天")+" "+r.format("HH:mm:ss"):o.isSame(r,"week")?He("本周")+i[r.day()]+" "+r.format("HH:mm:ss"):o.subtract(1,"week").isSame(r,"week")?He("上周")+i[r.day()]+" "+r.format("HH:mm:ss"):o.isSame(r,"year")?r.format("MM-DD HH:mm:ss"):r.format("YYYY-MM-DD HH:mm:ss"))});return(r,o)=>n.value?(k.openBlock(),k.createElementBlock("section",$O,[k.createElementVNode("span",UO,k.toDisplayString(n.value),1)])):k.createCommentVNode("v-if",!0)}}),[["__scopeId","data-v-55c9a119"]]),Wm=t=>(k.pushScopeId("data-v-6cc6ac8a"),t=t(),k.popScopeId(),t),XO={key:0,width:"18",height:"18",class:"scroll-loading-icon","aria-hidden":"true"},KO=[Wm(()=>k.createElementVNode("use",{"xlink:href":"#ai-blueking-loading-2"},null,-1))],eP={class:"ai-operation"},tP={class:"ai-operation-tools"},nP={class:"ai-operation-input"},rP=Wm(()=>k.createElementVNode("i",{class:"ai-blueking-icon ai-blueking-fasong"},null,-1)),oP=Yr(k.defineComponent({__name:"render-content",props:{messages:{},prompts:{},loading:{type:Boolean},background:{default:"#f5f7fa"},userPhoto:{},placeholder:{},scrollLoading:{type:Boolean},scrollLoadingEnd:{type:Boolean,default:!0}},emits:["send","choose-prompt","scroll-load","stop"],setup(t,{emit:e}){const n=t,r=e,o=Ga,i=k.ref(""),a=()=>{k.nextTick(()=>{const d=document.querySelector(".ai-blueking-messages");d.scrollTop=d.scrollHeight})},s=p1(d=>{if(n.scrollLoading||n.scrollLoadingEnd)return;d.target.scrollTop<200&&r("scroll-load")}),c=()=>{if(i.value){if(n.loading){l1({theme:"warning",message:He("内容正在执行中,请执行完成后再发送")});return}r("send",i.value),i.value=""}},l=d=>{r("choose-prompt",d)},u=()=>{r("stop")};k.watch(()=>n.messages,()=>{const d=document.querySelector(".ai-blueking-messages");(d==null?void 0:d.scrollTop)+(d==null?void 0:d.clientHeight)+100>=(d==null?void 0:d.scrollHeight)&&a()},{deep:!0});const f=()=>{window.showTimes=[]};return k.onMounted(a),k.onBeforeUnmount(f),(d,p)=>(k.openBlock(),k.createElementBlock("section",{style:k.normalizeStyle({background:d.background}),class:"ai-content"},[k.createElementVNode("ul",{class:"ai-messages ai-blueking-messages",onScrollPassive:p[0]||(p[0]=(...m)=>k.unref(s)&&k.unref(s)(...m))},[d.scrollLoading?(k.openBlock(),k.createElementBlock("svg",XO,KO)):k.createCommentVNode("v-if",!0),(k.openBlock(!0),k.createElementBlock(k.Fragment,null,k.renderList(d.messages,m=>(k.openBlock(),k.createElementBlock(k.Fragment,{key:m.content},[k.createVNode(qO,{class:"render-message",message:m},null,8,["message"]),k.createVNode(FO,{class:"render-message",message:m,"user-photo":d.userPhoto},null,8,["message","user-photo"])],64))),128))],32),k.createElementVNode("section",eP,[k.createElementVNode("span",tP,[k.createVNode(y1),k.createVNode(WO,{"is-show":d.loading,onStop:u},null,8,["is-show"])]),k.createElementVNode("section",nP,[k.createVNode(YO,{value:i.value,"onUpdate:value":p[1]||(p[1]=m=>i.value=m),placeholder:d.placeholder,prompts:d.prompts,onChoosePrompt:l,onEnter:c},null,8,["value","placeholder","prompts"]),k.withDirectives((k.openBlock(),k.createBlock(k.unref(UT),{class:"ai-operation-button",disabled:d.loading||!i.value,size:"large",theme:"primary",onClick:c},{default:k.withCtx(()=>[rP,k.createTextVNode(" "+k.toDisplayString(k.unref(He)("发送")),1)]),_:1},8,["disabled"])),[[k.unref(o),{content:k.unref(He)("内容正在执行中,请执行完成后再发送"),disabled:!d.loading}]])])])],4))}}),[["__scopeId","data-v-6cc6ac8a"]]),iP={class:"ai-modal-header-icon"},aP=Yr(k.defineComponent({__name:"render-modal",props:{headBackground:{default:"linear-gradient(267deg, #2dd1f4 0%, #1482ff 95%)"},positionLimit:{default:()=>({top:0,bottom:0,left:0,right:0})},sizeLimit:{default:()=>({height:320,width:400})},logo:{default:"ai-blueking-icon ai-blueking-ai"},name:{},startPosition:{default:()=>({top:window.innerHeight-560,bottom:0,left:window.innerWidth-400,right:0})}},emits:["clear","close"],setup(t,{emit:e}){const n=t,r=e,o=Ga,i={height:window.innerHeight,width:window.innerWidth},a={isMove:!1,type:"",clientX:0,clientY:0},s=()=>{var X,S,M,I;const V=(G,_)=>G===void 0?_:G;return{top:V((X=n.startPosition)==null?void 0:X.top,i.height-n.sizeLimit.height),bottom:V((S=n.startPosition)==null?void 0:S.bottom,0),left:V((M=n.startPosition)==null?void 0:M.left,0),right:V((I=n.startPosition)==null?void 0:I.right,i.width-n.sizeLimit.width)}},c=k.ref(s()),l=k.computed(()=>c.value.top<=n.positionLimit.top&&c.value.bottom<=n.positionLimit.bottom),u=V=>{a.isMove=!0,a.type="move",a.clientX=V.clientX,a.clientY=V.clientY},f=V=>{a.isMove=!0,a.type="rightDrag",a.clientX=V.clientX},d=V=>{a.isMove=!0,a.type="leftDrag",a.clientX=V.clientX},p=V=>{a.isMove=!0,a.type="topDrag",a.clientY=V.clientY},m=V=>{a.isMove=!0,a.type="bottomDrag",a.clientY=V.clientY},g=V=>{a.isMove=!0,a.type="topLeftDrag",a.clientY=V.clientY,a.clientX=V.clientX},w=V=>{a.isMove=!0,a.type="topRightDrag",a.clientY=V.clientY,a.clientX=V.clientX},h=V=>{a.isMove=!0,a.type="bottomLeftDrag",a.clientY=V.clientY,a.clientX=V.clientX},j=V=>{a.isMove=!0,a.type="bottomRightDrag",a.clientY=V.clientY,a.clientX=V.clientX},T=()=>{a.isMove=!1},J=(V,X)=>{["move","leftDrag"].includes(a.type)&&(c.value.left+=V),["move","rightDrag"].includes(a.type)&&(c.value.right-=V),["move","topDrag"].includes(a.type)&&(c.value.top+=X),["move","bottomDrag"].includes(a.type)&&(c.value.bottom-=X),["topLeftDrag"].includes(a.type)&&(c.value.left+=V,c.value.top+=X),["topRightDrag"].includes(a.type)&&(c.value.right-=V,c.value.top+=X),["bottomLeftDrag"].includes(a.type)&&(c.value.left+=V,c.value.bottom-=X),["bottomRightDrag"].includes(a.type)&&(c.value.right-=V,c.value.bottom-=X)},L=(V,X)=>{const{top:S,bottom:M,left:I,right:G}=c.value;(i.width-I-G<n.sizeLimit.width||I<n.positionLimit.left||G<n.positionLimit.right)&&(["move","leftDrag","topLeftDrag","bottomLeftDrag"].includes(a.type)&&(c.value.left-=V),["move","rightDrag","topRightDrag","bottomRightDrag"].includes(a.type)&&(c.value.right+=V)),(i.height-S-M<n.sizeLimit.height||S<n.positionLimit.top||M<n.positionLimit.bottom)&&(["move","topDrag","topRightDrag","topLeftDrag"].includes(a.type)&&(c.value.top-=X),["move","bottomDrag","bottomLeftDrag","bottomRightDrag"].includes(a.type)&&(c.value.bottom+=X))},N=V=>{if(!a.isMove)return;V.preventDefault();const X=V.clientX-a.clientX,S=V.clientY-a.clientY;J(X,S),L(X,S),a.clientX=V.clientX,a.clientY=V.clientY},Y=()=>{i.height=window.innerHeight,i.width=window.innerWidth,c.value=s()},q=()=>{c.value.top=n.positionLimit.top,c.value.bottom=n.positionLimit.bottom},te=()=>{c.value.top=i.height-n.sizeLimit.height,c.value.bottom=n.positionLimit.bottom},Q=()=>{r("clear")},U=()=>{r("close")};return k.onBeforeMount(()=>{window.addEventListener("mousemove",N,!0),window.addEventListener("mouseup",T),window.addEventListener("resize",Y)}),k.onBeforeUnmount(()=>{window.removeEventListener("mousemove",N,!0),window.removeEventListener("mouseup",T),window.removeEventListener("resize",Y)}),(V,X)=>(k.openBlock(),k.createElementBlock("section",{style:k.normalizeStyle({top:c.value.top+"px",bottom:c.value.bottom+"px",left:c.value.left+"px",right:c.value.right+"px"}),class:"ai-modal"},[k.createElementVNode("header",{style:k.normalizeStyle({background:V.headBackground}),class:"ai-modal-header",onMousedown:k.withModifiers(u,["stop"])},[k.createElementVNode("span",iP,[k.createElementVNode("i",{class:k.normalizeClass(V.logo)},null,2),k.createTextVNode(" "+k.toDisplayString(V.name||k.unref(He)("小鲸")),1)]),k.createElementVNode("span",null,[l.value?k.withDirectives((k.openBlock(),k.createElementBlock("i",{key:0,class:"ai-header-tool ai-blueking-icon ai-blueking-shangxiajuhe",onClick:te},null,512)),[[k.unref(o),{content:k.unref(He)("向下收缩"),distance:20}]]):k.withDirectives((k.openBlock(),k.createElementBlock("i",{key:1,class:"ai-header-tool ai-blueking-icon ai-blueking-shangxialashen-2",onClick:q},null,512)),[[k.unref(o),{content:k.unref(He)("向上扩展"),distance:20}]]),k.withDirectives(k.createElementVNode("i",{class:"ai-header-tool ai-blueking-icon ai-blueking-saoba",onClick:Q},null,512),[[k.unref(o),{content:k.unref(He)("清空聊天记录"),distance:20}]]),k.withDirectives(k.createElementVNode("i",{class:"ai-header-tool ai-blueking-icon ai-blueking-shanchu-2",onClick:U},null,512),[[k.unref(o),{content:k.unref(He)("关闭"),distance:20}]])])],36),k.renderSlot(V.$slots,"default",{},void 0,!0),k.createElementVNode("span",{class:"drag-line left",onMousedown:k.withModifiers(d,["stop"])},null,32),k.createElementVNode("span",{class:"drag-line right",onMousedown:k.withModifiers(f,["stop"])},null,32),k.createElementVNode("span",{class:"drag-line top",onMousedown:k.withModifiers(p,["stop"])},null,32),k.createElementVNode("span",{class:"drag-line bottom",onMousedown:k.withModifiers(m,["stop"])},null,32),k.createElementVNode("span",{class:"drag-line top-left-corner",onMousedown:k.withModifiers(g,["stop"])},null,32),k.createElementVNode("span",{class:"drag-line top-right-corner",onMousedown:k.withModifiers(w,["stop"])},null,32),k.createElementVNode("span",{class:"drag-line bottom-left-corner",onMousedown:k.withModifiers(h,["stop"])},null,32),k.createElementVNode("span",{class:"drag-line bottom-right-corner",onMousedown:k.withModifiers(j,["stop"])},null,32)],4))}}),[["__scopeId","data-v-e603010f"]]),sP=k.defineComponent({__name:"ai-blueking",props:{messages:{},prompts:{},loading:{type:Boolean},headBackground:{},background:{},positionLimit:{},sizeLimit:{},startPosition:{},userPhoto:{},name:{},placeholder:{},logo:{},scrollLoading:{type:Boolean},scrollLoadingEnd:{type:Boolean}},emits:["clear","close","scroll-load","stop","send","choose-prompt"],setup(t,{emit:e}){const n=e,r=()=>{n("clear")},o=()=>{n("close")},i=l=>{n("send",l)},a=()=>{n("stop")},s=()=>{n("scroll-load")},c=l=>{n("choose-prompt",l)};return(l,u)=>(k.openBlock(),k.createBlock(aP,{"head-background":l.headBackground,logo:l.logo,name:l.name,"position-limit":l.positionLimit,"size-limit":l.sizeLimit,"start-position":l.startPosition,onClear:r,onClose:o},{default:k.withCtx(()=>[k.createVNode(oP,{background:l.background,loading:l.loading,messages:l.messages,placeholder:l.placeholder,prompts:l.prompts,"scroll-loading":l.scrollLoading,"scroll-loading-end":l.scrollLoadingEnd,"user-photo":l.userPhoto,onChoosePrompt:c,onScrollLoad:s,onSend:i,onStop:a},null,8,["background","loading","messages","placeholder","prompts","scroll-loading","scroll-loading-end","user-photo"])]),_:1},8,["head-background","logo","name","position-limit","size-limit","start-position"]))}});(function(){var t='<svg xmlns="http://www.w3.org/2000/svg" data-name="ai-blueking" xmlns:xlink="http://www.w3.org/1999/xlink" style="position:absolute;width:0;height:0;visibility:hidden"><symbol id="ai-blueking-check-circle-fill" viewBox="0 0 1024 1024"><path fill="#737987" d="M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm-26.3 606.3l-181-181L350 444l135.8 135.8L712 353.5l45.3 45.3-271.6 271.5z"/></symbol><symbol id="ai-blueking-close-circle-fill" viewBox="0 0 1024 1024"><path fill="#737987" d="M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm158.4 561.1l-45.3 45.3L512 557.3 398.9 670.4l-45.3-45.3L466.7 512 353.6 398.9l45.3-45.3L512 466.7l113.1-113.1 45.3 45.3L557.3 512l113.1 113.1z"/></symbol><symbol id="ai-blueking-warning-circle-fill" viewBox="0 0 1024 1024"><path fill="#737987" d="M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm32 640h-64v-64h64v64zm0-128h-64V320h64v256z"/></symbol><symbol id="ai-blueking-loading-2" viewBox="0 0 1024 1024"><path d="M195.2 195.2a64 64 0 000 90.56l44.8 45.28A64 64 0 00331.04 240l-45.28-44.8a64 64 0 00-90.56 0z" opacity=".1"/><path d="M128 576h64a64 64 0 000-128h-64a64 64 0 000 128z" opacity=".15"/><path d="M285.76 828.8l45.28-44.8A64 64 0 00240 692.96l-44.8 45.28a64 64 0 0090.56 90.56z" opacity=".3"/><path d="M576 896v-64a64 64 0 00-128 0v64a64 64 0 00128 0z" opacity=".45"/><path d="M828.8 828.8a64 64 0 000-90.56L784 692.96A64 64 0 00692.96 784l45.28 45.28a64 64 0 0090.56-.48z" opacity=".6"/><path d="M896 448h-64a64 64 0 000 128h64a64 64 0 000-128z" opacity=".75"/><path d="M738.24 195.2L692.96 240A64 64 0 00784 331.04l45.28-45.28a64 64 0 10-90.56-90.56z" opacity=".9"/><path d="M448 128v64a64 64 0 00128 0v-64a64 64 0 00-128 0z"/></g></symbol><symbol id="ai-blueking-ai" viewBox="0 0 1024 1024"><path fill-rule="evenodd" d="M928 96v448l-1.211-.014C910.455 758.791 730.989 928 512 928 282.25 928 96 741.75 96 512S282.25 96 512 96h416zM488.911 320H379.544L256 672h84.05l23.292-71.909h137.215L523.342 672h87.088L488.911 320zM736 320h-79.494v352H736V320zm-303.797 66.88l47.594 148.343h-95.696l48.102-148.343z"/></symbol><symbol id="ai-blueking-fasong" viewBox="0 0 1024 1024"><path fill-rule="evenodd" d="M924.55 113.365c0-.09-.088-.09-.088-.18a30.217 30.217 0 00-7.78-9.684 31.929 31.929 0 00-10.606-5.918c-.089 0-.177-.09-.266-.09-1.502-.537-3.093-.806-4.685-1.075-.442-.09-.884-.27-1.414-.27-1.503-.179-2.917-.179-4.42-.09-.618 0-1.149-.089-1.768 0-4.242.27-8.485 1.525-12.375 3.498L113.792 485.577c-7.514 3.677-13.26 10.312-15.911 18.382-.796 2.242-1.15 4.663-1.415 6.994-.795 4.753-.618 9.685.884 14.347 2.475 8.16 8.044 14.885 15.558 18.741l194.734 103.836c4.685 2.51 9.812 3.766 15.115 3.766 11.757.09 22.541-6.367 28.287-16.768 8.397-15.513 2.475-34.791-13.083-43.13l-142.316-75.86 572.358-288.014L418.93 634.516c-.265.27-.354.628-.619.897-8.662 5.739-14.32 15.423-14.32 26.542v234.123a32.598 32.598 0 009.547 22.686c6.01 6.008 14.143 9.236 22.54 9.146v.09c17.68 0 32-14.257 32-31.832V675.405l381.07-444.127-79.202 585.802-200.921-97.917c-15.823-7.712-34.828-1.255-42.872 14.526-3.712 7.622-4.243 16.41-1.503 24.48s8.575 14.615 16.177 18.202l238.754 116.48c4.42 2.151 9.193 3.227 14.144 3.227.176 0 .353-.09.53-.09.53 0 1.15.18 1.68.18 15.91.09 29.435-11.657 31.733-27.618l99.003-731.782c2.21-7.532 1.767-15.871-2.122-23.403z"/></symbol><symbol id="ai-blueking-shangxialashen-2" viewBox="0 0 1024 1024"><path fill-rule="evenodd" d="M510.24 64L352 251.52l127.168-.672.928 223.968h.352l.832 298.656-127.168.736L513.792 960 672 772.448l-127.136.704-.928-320h-.384l-.8-202.656 127.168-.704z"/></symbol><symbol id="ai-blueking-shangxiajuhe" viewBox="0 0 1024 1024"><path fill-rule="evenodd" d="M510.24 384L352 192l317.92 1.77L510.24 384zm1.44 256l158.24 192L352 830.23 511.68 640zM128 480h768v64H128z"/></symbol><symbol id="ai-blueking-shanchu-2" viewBox="0 0 1024 1024"><path fill-rule="evenodd" d="M832 259.2L764.8 192 512 444.8 259.2 192 192 259.2 444.8 512 192 764.8l67.2 67.2L512 579.2 764.8 832l67.2-67.2L579.2 512z"/></symbol><symbol id="ai-blueking-saoba" viewBox="0 0 1024 1024"><path fill-rule="evenodd" d="M566.857 64C607.253 64 640 92.654 640 128v96h256c35.346 0 64 28.654 64 64v96c0 35.346-28.654 64-64 64h-5.818v332.453l21.56 102.356c7.284 34.587-14.848 68.532-49.436 75.817a64 64 0 01-13.19 1.374H175.262c-35.346 0-64-28.654-64-64a64 64 0 011.436-13.484l21.12-97.989V448H128c-35.346 0-64-28.654-64-64v-96c0-35.346 28.654-64 64-64h256v-96c0-35.346 32.747-64 73.143-64h109.714zm259.325 384H197.818v343.346l-1.436 6.665L175.262 896H320V704c0-17.673 14.327-32 32-32 17.673 0 32 14.327 32 32v192h96V704c0-17.673 14.327-32 32-32 17.673 0 32 14.327 32 32v192h96V704c0-17.673 14.327-32 32-32 17.673 0 32 14.327 32 32v192h145.115l-21.559-102.356-1.374-6.524V448zM896 288H128v96h768v-96zM566.857 128H457.143v96h109.714v-96z"/></symbol><symbol id="ai-blueking-quanquan" viewBox="0 0 1024 1024"><path fill="#3A84FF" d="M512 64.129c-9.343-.661-18.345 3.338-27.005 11.998-2.666 2.667-4.831 6.165-6.495 10.495-1.664 4.33-2.496 7.498-2.496 9.503v4c0 10.004 2.997 18.003 8.991 23.997 3.328 4.01 7.327 6.847 11.999 8.511 4.671 1.664 8.34 2.496 11.006 2.496h4c68.003 0 130.993 16.83 188.97 50.49 57.978 33.66 103.807 79.49 137.489 137.488 33.681 57.999 50.511 121.16 50.49 189.483-.021 68.322-16.851 131.313-50.49 188.97-33.64 57.657-79.469 103.316-137.489 136.976-58.02 33.66-121.18 50.49-189.482 50.49-68.301 0-131.292-16.83-188.97-50.49-57.68-33.66-103.338-79.319-136.977-136.976-33.639-57.657-50.469-120.818-50.49-189.482 0-10.005-3.669-18.676-11.007-26.013-2.666-3.328-6.164-5.824-10.494-7.487-4.33-1.664-7.498-2.496-9.503-2.496h-4c-10.004 0-18.334 3.338-24.99 10.015-4.01 4.01-6.846 8.18-8.51 12.51-1.664 4.33-2.496 7.498-2.496 9.503v4c0 60.665 11.828 118.663 35.484 173.996 23.656 55.332 55.482 102.996 95.477 142.991 39.996 39.996 87.66 71.822 142.992 95.478 55.332 23.656 113.33 35.483 173.996 35.483 60.665 0 118.664-11.827 173.996-35.483 55.332-23.656 102.996-55.482 142.992-95.478 39.995-39.995 71.82-87.659 95.477-142.991 23.656-55.333 35.484-113.331 35.484-173.996 0-60.665-11.828-118.664-35.484-173.996-23.656-55.333-55.482-102.997-95.477-142.992-39.996-39.996-87.66-71.821-142.992-95.477C630.664 75.989 572.666 64.16 512 64.16v-.032z"/></symbol><symbol id="ai-blueking-xiangxia-2" viewBox="0 0 1024 1024"><path fill-rule="evenodd" d="M176 617.6l92.8-89.6 182.4 179.2V112h121.6v595.2L755.2 528l92.8 89.6L512 944 176 617.6z" clip-rule="evenodd"/></symbol><symbol id="ai-blueking-tingzhi" viewBox="0 0 1024 1024"><path fill="#fdd" d="M256 256h512v512H256V256z"/><path fill="#ea3636" d="M128 128v768h768V128H128zm640 640H256V256h512v512z"/></symbol></svg>';document.body?document.body.insertAdjacentHTML("afterbegin",t):document.addEventListener("DOMContentLoaded",function(){document.body.insertAdjacentHTML("afterbegin",t)})})();class cP{constructor(e,n,r,o,i){sr(this,"controllerMap");sr(this,"handleEnd");sr(this,"handleError");sr(this,"handleReceiveMessage");sr(this,"handleStart");sr(this,"url");this.url=e,this.handleStart=n,this.handleReceiveMessage=r,this.handleEnd=o,this.handleError=i,this.controllerMap={}}stop(e){var n,r;return(r=(n=this.controllerMap[e])==null?void 0:n.abort)==null||r.call(n),this.handleEnd(e)}async stream(e,n,r){const o=new AbortController;this.controllerMap[n]=o,fetch(this.url,{method:"post",signal:o.signal,headers:{"Content-Type":"application/json",...r},mode:"cors",credentials:"include",body:JSON.stringify(e)}).then(async i=>{const a=i.body.pipeThrough(new window.TextDecoderStream).getReader();for(;;)try{const{value:s,done:c}=await a.read();if(!i.ok){this.handleError(s||i.statusText,i.status,n);break}if(c)break;s.toString().split(`
|
|
269
|
+
`,a.map=[n,e.line],!0},AD=function(e,n,r,o){var i,a,s,c,l,u,f,d=!1,p=e.bMarks[n]+e.tShift[n],m=e.eMarks[n];if(e.sCount[n]-e.blkIndent>=4||p+3>m||(i=e.src.charCodeAt(p),i!==126&&i!==96)||(l=p,p=e.skipChars(p,i),a=p-l,a<3)||(f=e.src.slice(l,p),s=e.src.slice(p,m),i===96&&s.indexOf(String.fromCharCode(i))>=0))return!1;if(o)return!0;for(c=n;c++,!(c>=r||(p=l=e.bMarks[c]+e.tShift[c],m=e.eMarks[c],p<m&&e.sCount[c]<e.blkIndent));)if(e.src.charCodeAt(p)===i&&!(e.sCount[c]-e.blkIndent>=4)&&(p=e.skipChars(p,i),!(p-l<a)&&(p=e.skipSpaces(p),!(p<m)))){d=!0;break}return a=e.sCount[n],e.line=c+(d?1:0),u=e.push("fence","code",0),u.info=s,u.content=e.getLines(n+1,c,a,!0),u.markup=f,u.map=[n,e.line],!0},ED=Ne.isSpace,JD=function(e,n,r,o){var i,a,s,c,l,u,f,d,p,m,g,w,h,j,T,J,L,N,Y,q,te=e.lineMax,Q=e.bMarks[n]+e.tShift[n],U=e.eMarks[n];if(e.sCount[n]-e.blkIndent>=4||e.src.charCodeAt(Q)!==62)return!1;if(o)return!0;for(m=[],g=[],j=[],T=[],N=e.md.block.ruler.getRules("blockquote"),h=e.parentType,e.parentType="blockquote",d=n;d<r&&(q=e.sCount[d]<e.blkIndent,Q=e.bMarks[d]+e.tShift[d],U=e.eMarks[d],!(Q>=U));d++){if(e.src.charCodeAt(Q++)===62&&!q){for(c=e.sCount[d]+1,e.src.charCodeAt(Q)===32?(Q++,c++,i=!1,J=!0):e.src.charCodeAt(Q)===9?(J=!0,(e.bsCount[d]+c)%4===3?(Q++,c++,i=!1):i=!0):J=!1,p=c,m.push(e.bMarks[d]),e.bMarks[d]=Q;Q<U&&(a=e.src.charCodeAt(Q),ED(a));){a===9?p+=4-(p+e.bsCount[d]+(i?1:0))%4:p++;Q++}u=Q>=U,g.push(e.bsCount[d]),e.bsCount[d]=e.sCount[d]+1+(J?1:0),j.push(e.sCount[d]),e.sCount[d]=p-c,T.push(e.tShift[d]),e.tShift[d]=Q-e.bMarks[d];continue}if(u)break;for(L=!1,s=0,l=N.length;s<l;s++)if(N[s](e,d,r,!0)){L=!0;break}if(L){e.lineMax=d,e.blkIndent!==0&&(m.push(e.bMarks[d]),g.push(e.bsCount[d]),T.push(e.tShift[d]),j.push(e.sCount[d]),e.sCount[d]-=e.blkIndent);break}m.push(e.bMarks[d]),g.push(e.bsCount[d]),T.push(e.tShift[d]),j.push(e.sCount[d]),e.sCount[d]=-1}for(w=e.blkIndent,e.blkIndent=0,Y=e.push("blockquote_open","blockquote",1),Y.markup=">",Y.map=f=[n,0],e.md.block.tokenize(e,n,d),Y=e.push("blockquote_close","blockquote",-1),Y.markup=">",e.lineMax=te,e.parentType=h,f[1]=e.line,s=0;s<T.length;s++)e.bMarks[s+n]=m[s],e.tShift[s+n]=T[s],e.sCount[s+n]=j[s],e.bsCount[s+n]=g[s];return e.blkIndent=w,!0},QD=Ne.isSpace,RD=function(e,n,r,o){var i,a,s,c,l=e.bMarks[n]+e.tShift[n],u=e.eMarks[n];if(e.sCount[n]-e.blkIndent>=4||(i=e.src.charCodeAt(l++),i!==42&&i!==45&&i!==95))return!1;for(a=1;l<u;){if(s=e.src.charCodeAt(l++),s!==i&&!QD(s))return!1;s===i&&a++}return a<3?!1:(o||(e.line=n+1,c=e.push("hr","hr",0),c.map=[n,e.line],c.markup=Array(a+1).join(String.fromCharCode(i))),!0)},hm=Ne.isSpace;function ym(t,e){var n,r,o,i;return r=t.bMarks[e]+t.tShift[e],o=t.eMarks[e],n=t.src.charCodeAt(r++),n!==42&&n!==45&&n!==43||r<o&&(i=t.src.charCodeAt(r),!hm(i))?-1:r}function vm(t,e){var n,r=t.bMarks[e]+t.tShift[e],o=r,i=t.eMarks[e];if(o+1>=i||(n=t.src.charCodeAt(o++),n<48||n>57))return-1;for(;;){if(o>=i)return-1;if(n=t.src.charCodeAt(o++),n>=48&&n<=57){if(o-r>=10)return-1;continue}if(n===41||n===46)break;return-1}return o<i&&(n=t.src.charCodeAt(o),!hm(n))?-1:o}function GD(t,e){var n,r,o=t.level+2;for(n=e+2,r=t.tokens.length-2;n<r;n++)t.tokens[n].level===o&&t.tokens[n].type==="paragraph_open"&&(t.tokens[n+2].hidden=!0,t.tokens[n].hidden=!0,n+=2)}var FD=function(e,n,r,o){var i,a,s,c,l,u,f,d,p,m,g,w,h,j,T,J,L,N,Y,q,te,Q,U,V,X,S,M,I=n,G=!1,_=!0;if(e.sCount[I]-e.blkIndent>=4||e.listIndent>=0&&e.sCount[I]-e.listIndent>=4&&e.sCount[I]<e.blkIndent)return!1;if(o&&e.parentType==="paragraph"&&e.sCount[I]>=e.blkIndent&&(G=!0),(Q=vm(e,I))>=0){if(f=!0,V=e.bMarks[I]+e.tShift[I],h=Number(e.src.slice(V,Q-1)),G&&h!==1)return!1}else if((Q=ym(e,I))>=0)f=!1;else return!1;if(G&&e.skipSpaces(Q)>=e.eMarks[I])return!1;if(o)return!0;for(w=e.src.charCodeAt(Q-1),g=e.tokens.length,f?(M=e.push("ordered_list_open","ol",1),h!==1&&(M.attrs=[["start",h]])):M=e.push("bullet_list_open","ul",1),M.map=m=[I,0],M.markup=String.fromCharCode(w),U=!1,S=e.md.block.ruler.getRules("list"),L=e.parentType,e.parentType="list";I<r;){for(te=Q,j=e.eMarks[I],u=T=e.sCount[I]+Q-(e.bMarks[I]+e.tShift[I]);te<j;){if(i=e.src.charCodeAt(te),i===9)T+=4-(T+e.bsCount[I])%4;else if(i===32)T++;else break;te++}if(a=te,a>=j?l=1:l=T-u,l>4&&(l=1),c=u+l,M=e.push("list_item_open","li",1),M.markup=String.fromCharCode(w),M.map=d=[I,0],f&&(M.info=e.src.slice(V,Q-1)),q=e.tight,Y=e.tShift[I],N=e.sCount[I],J=e.listIndent,e.listIndent=e.blkIndent,e.blkIndent=c,e.tight=!0,e.tShift[I]=a-e.bMarks[I],e.sCount[I]=T,a>=j&&e.isEmpty(I+1)?e.line=Math.min(e.line+2,r):e.md.block.tokenize(e,I,r,!0),(!e.tight||U)&&(_=!1),U=e.line-I>1&&e.isEmpty(e.line-1),e.blkIndent=e.listIndent,e.listIndent=J,e.tShift[I]=Y,e.sCount[I]=N,e.tight=q,M=e.push("list_item_close","li",-1),M.markup=String.fromCharCode(w),I=e.line,d[1]=I,I>=r||e.sCount[I]<e.blkIndent||e.sCount[I]-e.blkIndent>=4)break;for(X=!1,s=0,p=S.length;s<p;s++)if(S[s](e,I,r,!0)){X=!0;break}if(X)break;if(f){if(Q=vm(e,I),Q<0)break;V=e.bMarks[I]+e.tShift[I]}else if(Q=ym(e,I),Q<0)break;if(w!==e.src.charCodeAt(Q-1))break}return f?M=e.push("ordered_list_close","ol",-1):M=e.push("bullet_list_close","ul",-1),M.markup=String.fromCharCode(w),m[1]=I,e.line=I,e.parentType=L,_&&GD(e,g),!0},ZD=Ne.normalizeReference,qa=Ne.isSpace,_D=function(e,n,r,o){var i,a,s,c,l,u,f,d,p,m,g,w,h,j,T,J,L=0,N=e.bMarks[n]+e.tShift[n],Y=e.eMarks[n],q=n+1;if(e.sCount[n]-e.blkIndent>=4||e.src.charCodeAt(N)!==91)return!1;for(;++N<Y;)if(e.src.charCodeAt(N)===93&&e.src.charCodeAt(N-1)!==92){if(N+1===Y||e.src.charCodeAt(N+1)!==58)return!1;break}for(c=e.lineMax,T=e.md.block.ruler.getRules("reference"),m=e.parentType,e.parentType="reference";q<c&&!e.isEmpty(q);q++)if(!(e.sCount[q]-e.blkIndent>3)&&!(e.sCount[q]<0)){for(j=!1,u=0,f=T.length;u<f;u++)if(T[u](e,q,c,!0)){j=!0;break}if(j)break}for(h=e.getLines(n,q,e.blkIndent,!1).trim(),Y=h.length,N=1;N<Y;N++){if(i=h.charCodeAt(N),i===91)return!1;if(i===93){p=N;break}else i===10?L++:i===92&&(N++,N<Y&&h.charCodeAt(N)===10&&L++)}if(p<0||h.charCodeAt(p+1)!==58)return!1;for(N=p+2;N<Y;N++)if(i=h.charCodeAt(N),i===10)L++;else if(!qa(i))break;if(g=e.md.helpers.parseLinkDestination(h,N,Y),!g.ok||(l=e.md.normalizeLink(g.str),!e.md.validateLink(l)))return!1;for(N=g.pos,L+=g.lines,a=N,s=L,w=N;N<Y;N++)if(i=h.charCodeAt(N),i===10)L++;else if(!qa(i))break;for(g=e.md.helpers.parseLinkTitle(h,N,Y),N<Y&&w!==N&&g.ok?(J=g.str,N=g.pos,L+=g.lines):(J="",N=a,L=s);N<Y&&(i=h.charCodeAt(N),!!qa(i));)N++;if(N<Y&&h.charCodeAt(N)!==10&&J)for(J="",N=a,L=s;N<Y&&(i=h.charCodeAt(N),!!qa(i));)N++;return N<Y&&h.charCodeAt(N)!==10||(d=ZD(h.slice(1,p)),!d)?!1:(o||(typeof e.env.references>"u"&&(e.env.references={}),typeof e.env.references[d]>"u"&&(e.env.references[d]={title:J,href:l}),e.parentType=m,e.line=n+L+1),!0)},VD=["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","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","section","source","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],Xa={},HD="[a-zA-Z_:][a-zA-Z0-9:._-]*",YD="[^\"'=<>`\\x00-\\x20]+",BD="'[^']*'",WD='"[^"]*"',$D="(?:"+YD+"|"+BD+"|"+WD+")",UD="(?:\\s+"+HD+"(?:\\s*=\\s*"+$D+")?)",bm="<[A-Za-z][A-Za-z0-9\\-]*"+UD+"*\\s*\\/?>",wm="<\\/[A-Za-z][A-Za-z0-9\\-]*\\s*>",qD="<!---->|<!--(?:-?[^>-])(?:-?[^-])*-->",XD="<[?][\\s\\S]*?[?]>",KD="<![A-Z]+\\s+[^>]*>",e2="<!\\[CDATA\\[[\\s\\S]*?\\]\\]>",t2=new RegExp("^(?:"+bm+"|"+wm+"|"+qD+"|"+XD+"|"+KD+"|"+e2+")"),n2=new RegExp("^(?:"+bm+"|"+wm+")");Xa.HTML_TAG_RE=t2,Xa.HTML_OPEN_CLOSE_TAG_RE=n2;var r2=VD,o2=Xa.HTML_OPEN_CLOSE_TAG_RE,Ur=[[/^<(script|pre|style|textarea)(?=(\s|>|$))/i,/<\/(script|pre|style|textarea)>/i,!0],[/^<!--/,/-->/,!0],[/^<\?/,/\?>/,!0],[/^<![A-Z]/,/>/,!0],[/^<!\[CDATA\[/,/\]\]>/,!0],[new RegExp("^</?("+r2.join("|")+")(?=(\\s|/?>|$))","i"),/^$/,!0],[new RegExp(o2.source+"\\s*$"),/^$/,!1]],i2=function(e,n,r,o){var i,a,s,c,l=e.bMarks[n]+e.tShift[n],u=e.eMarks[n];if(e.sCount[n]-e.blkIndent>=4||!e.md.options.html||e.src.charCodeAt(l)!==60)return!1;for(c=e.src.slice(l,u),i=0;i<Ur.length&&!Ur[i][0].test(c);i++);if(i===Ur.length)return!1;if(o)return Ur[i][2];if(a=n+1,!Ur[i][1].test(c)){for(;a<r&&!(e.sCount[a]<e.blkIndent);a++)if(l=e.bMarks[a]+e.tShift[a],u=e.eMarks[a],c=e.src.slice(l,u),Ur[i][1].test(c)){c.length!==0&&a++;break}}return e.line=a,s=e.push("html_block","",0),s.map=[n,a],s.content=e.getLines(n,a,e.blkIndent,!0),!0},Im=Ne.isSpace,a2=function(e,n,r,o){var i,a,s,c,l=e.bMarks[n]+e.tShift[n],u=e.eMarks[n];if(e.sCount[n]-e.blkIndent>=4||(i=e.src.charCodeAt(l),i!==35||l>=u))return!1;for(a=1,i=e.src.charCodeAt(++l);i===35&&l<u&&a<=6;)a++,i=e.src.charCodeAt(++l);return a>6||l<u&&!Im(i)?!1:(o||(u=e.skipSpacesBack(u,l),s=e.skipCharsBack(u,35,l),s>l&&Im(e.src.charCodeAt(s-1))&&(u=s),e.line=n+1,c=e.push("heading_open","h"+String(a),1),c.markup="########".slice(0,a),c.map=[n,e.line],c=e.push("inline","",0),c.content=e.src.slice(l,u).trim(),c.map=[n,e.line],c.children=[],c=e.push("heading_close","h"+String(a),-1),c.markup="########".slice(0,a)),!0)},s2=function(e,n,r){var o,i,a,s,c,l,u,f,d,p=n+1,m,g=e.md.block.ruler.getRules("paragraph");if(e.sCount[n]-e.blkIndent>=4)return!1;for(m=e.parentType,e.parentType="paragraph";p<r&&!e.isEmpty(p);p++)if(!(e.sCount[p]-e.blkIndent>3)){if(e.sCount[p]>=e.blkIndent&&(l=e.bMarks[p]+e.tShift[p],u=e.eMarks[p],l<u&&(d=e.src.charCodeAt(l),(d===45||d===61)&&(l=e.skipChars(l,d),l=e.skipSpaces(l),l>=u)))){f=d===61?1:2;break}if(!(e.sCount[p]<0)){for(i=!1,a=0,s=g.length;a<s;a++)if(g[a](e,p,r,!0)){i=!0;break}if(i)break}}return f?(o=e.getLines(n,p,e.blkIndent,!1).trim(),e.line=p+1,c=e.push("heading_open","h"+String(f),1),c.markup=String.fromCharCode(d),c.map=[n,e.line],c=e.push("inline","",0),c.content=o,c.map=[n,e.line-1],c.children=[],c=e.push("heading_close","h"+String(f),-1),c.markup=String.fromCharCode(d),e.parentType=m,!0):!1},c2=function(e,n,r){var o,i,a,s,c,l,u=n+1,f=e.md.block.ruler.getRules("paragraph");for(l=e.parentType,e.parentType="paragraph";u<r&&!e.isEmpty(u);u++)if(!(e.sCount[u]-e.blkIndent>3)&&!(e.sCount[u]<0)){for(i=!1,a=0,s=f.length;a<s;a++)if(f[a](e,u,r,!0)){i=!0;break}if(i)break}return o=e.getLines(n,u,e.blkIndent,!1).trim(),e.line=u,c=e.push("paragraph_open","p",1),c.map=[n,e.line],c=e.push("inline","",0),c.content=o,c.map=[n,e.line],c.children=[],c=e.push("paragraph_close","p",-1),e.parentType=l,!0},Mm=Xc,Ka=Ne.isSpace;function an(t,e,n,r){var o,i,a,s,c,l,u,f;for(this.src=t,this.md=e,this.env=n,this.tokens=r,this.bMarks=[],this.eMarks=[],this.tShift=[],this.sCount=[],this.bsCount=[],this.blkIndent=0,this.line=0,this.lineMax=0,this.tight=!1,this.ddIndent=-1,this.listIndent=-1,this.parentType="root",this.level=0,this.result="",i=this.src,f=!1,a=s=l=u=0,c=i.length;s<c;s++){if(o=i.charCodeAt(s),!f)if(Ka(o)){l++,o===9?u+=4-u%4:u++;continue}else f=!0;(o===10||s===c-1)&&(o!==10&&s++,this.bMarks.push(a),this.eMarks.push(s),this.tShift.push(l),this.sCount.push(u),this.bsCount.push(0),f=!1,l=0,u=0,a=s+1)}this.bMarks.push(i.length),this.eMarks.push(i.length),this.tShift.push(0),this.sCount.push(0),this.bsCount.push(0),this.lineMax=this.bMarks.length-1}an.prototype.push=function(t,e,n){var r=new Mm(t,e,n);return r.block=!0,n<0&&this.level--,r.level=this.level,n>0&&this.level++,this.tokens.push(r),r},an.prototype.isEmpty=function(e){return this.bMarks[e]+this.tShift[e]>=this.eMarks[e]},an.prototype.skipEmptyLines=function(e){for(var n=this.lineMax;e<n&&!(this.bMarks[e]+this.tShift[e]<this.eMarks[e]);e++);return e},an.prototype.skipSpaces=function(e){for(var n,r=this.src.length;e<r&&(n=this.src.charCodeAt(e),!!Ka(n));e++);return e},an.prototype.skipSpacesBack=function(e,n){if(e<=n)return e;for(;e>n;)if(!Ka(this.src.charCodeAt(--e)))return e+1;return e},an.prototype.skipChars=function(e,n){for(var r=this.src.length;e<r&&this.src.charCodeAt(e)===n;e++);return e},an.prototype.skipCharsBack=function(e,n,r){if(e<=r)return e;for(;e>r;)if(n!==this.src.charCodeAt(--e))return e+1;return e},an.prototype.getLines=function(e,n,r,o){var i,a,s,c,l,u,f,d=e;if(e>=n)return"";for(u=new Array(n-e),i=0;d<n;d++,i++){for(a=0,f=c=this.bMarks[d],d+1<n||o?l=this.eMarks[d]+1:l=this.eMarks[d];c<l&&a<r;){if(s=this.src.charCodeAt(c),Ka(s))s===9?a+=4-(a+this.bsCount[d])%4:a++;else if(c-f<this.tShift[d])a++;else break;c++}a>r?u[i]=new Array(a-r+1).join(" ")+this.src.slice(c,l):u[i]=this.src.slice(c,l)}return u.join("")},an.prototype.Token=Mm;var l2=an,u2=qc,es=[["table",PD,["paragraph","reference"]],["code",zD],["fence",AD,["paragraph","reference","blockquote","list"]],["blockquote",JD,["paragraph","reference","blockquote","list"]],["hr",RD,["paragraph","reference","blockquote","list"]],["list",FD,["paragraph","reference","blockquote"]],["reference",_D],["html_block",i2,["paragraph","reference","blockquote"]],["heading",a2,["paragraph","reference","blockquote"]],["lheading",s2],["paragraph",c2]];function ts(){this.ruler=new u2;for(var t=0;t<es.length;t++)this.ruler.push(es[t][0],es[t][1],{alt:(es[t][2]||[]).slice()})}ts.prototype.tokenize=function(t,e,n){for(var r,o,i,a=this.ruler.getRules(""),s=a.length,c=e,l=!1,u=t.md.options.maxNesting;c<n&&(t.line=c=t.skipEmptyLines(c),!(c>=n||t.sCount[c]<t.blkIndent));){if(t.level>=u){t.line=n;break}for(i=t.line,o=0;o<s;o++)if(r=a[o](t,c,n,!1),r){if(i>=t.line)throw new Error("block rule didn't increment state.line");break}if(!r)throw new Error("none of the block rules matched");t.tight=!l,t.isEmpty(t.line-1)&&(l=!0),c=t.line,c<n&&t.isEmpty(c)&&(l=!0,c++,t.line=c)}},ts.prototype.parse=function(t,e,n,r){var o;t&&(o=new this.State(t,e,n,r),this.tokenize(o,o.line,o.lineMax))},ts.prototype.State=l2;var f2=ts;function p2(t){switch(t){case 10:case 33:case 35:case 36:case 37:case 38:case 42:case 43:case 45:case 58:case 60:case 61:case 62:case 64:case 91:case 92:case 93:case 94:case 95:case 96:case 123:case 125:case 126:return!0;default:return!1}}for(var d2=function(e,n){for(var r=e.pos;r<e.posMax&&!p2(e.src.charCodeAt(r));)r++;return r===e.pos?!1:(n||(e.pending+=e.src.slice(e.pos,r)),e.pos=r,!0)},g2=/(?:^|[^a-z0-9.+-])([a-z][a-z0-9.+-]*)$/i,m2=function(e,n){var r,o,i,a,s,c,l,u;return!e.md.options.linkify||e.linkLevel>0||(r=e.pos,o=e.posMax,r+3>o)||e.src.charCodeAt(r)!==58||e.src.charCodeAt(r+1)!==47||e.src.charCodeAt(r+2)!==47||(i=e.pending.match(g2),!i)||(a=i[1],s=e.md.linkify.matchAtStart(e.src.slice(r-a.length)),!s)||(c=s.url,c.length<=a.length)||(c=c.replace(/\*+$/,""),l=e.md.normalizeLink(c),!e.md.validateLink(l))?!1:(n||(e.pending=e.pending.slice(0,-a.length),u=e.push("link_open","a",1),u.attrs=[["href",l]],u.markup="linkify",u.info="auto",u=e.push("text","",0),u.content=e.md.normalizeLinkText(c),u=e.push("link_close","a",-1),u.markup="linkify",u.info="auto"),e.pos+=c.length-a.length,!0)},h2=Ne.isSpace,y2=function(e,n){var r,o,i,a=e.pos;if(e.src.charCodeAt(a)!==10)return!1;if(r=e.pending.length-1,o=e.posMax,!n)if(r>=0&&e.pending.charCodeAt(r)===32)if(r>=1&&e.pending.charCodeAt(r-1)===32){for(i=r-1;i>=1&&e.pending.charCodeAt(i-1)===32;)i--;e.pending=e.pending.slice(0,i),e.push("hardbreak","br",0)}else e.pending=e.pending.slice(0,-1),e.push("softbreak","br",0);else e.push("softbreak","br",0);for(a++;a<o&&h2(e.src.charCodeAt(a));)a++;return e.pos=a,!0},v2=Ne.isSpace,rl=[],Cm=0;Cm<256;Cm++)rl.push(0);"\\!\"#$%&'()*+,./:;<=>?@[]^_`{|}~-".split("").forEach(function(t){rl[t.charCodeAt(0)]=1});var b2=function(e,n){var r,o,i,a,s,c=e.pos,l=e.posMax;if(e.src.charCodeAt(c)!==92||(c++,c>=l))return!1;if(r=e.src.charCodeAt(c),r===10){for(n||e.push("hardbreak","br",0),c++;c<l&&(r=e.src.charCodeAt(c),!!v2(r));)c++;return e.pos=c,!0}return a=e.src[c],r>=55296&&r<=56319&&c+1<l&&(o=e.src.charCodeAt(c+1),o>=56320&&o<=57343&&(a+=e.src[c+1],c++)),i="\\"+a,n||(s=e.push("text_special","",0),r<256&&rl[r]!==0?s.content=a:s.content=i,s.markup=i,s.info="escape"),e.pos=c+1,!0},w2=function(e,n){var r,o,i,a,s,c,l,u,f=e.pos,d=e.src.charCodeAt(f);if(d!==96)return!1;for(r=f,f++,o=e.posMax;f<o&&e.src.charCodeAt(f)===96;)f++;if(i=e.src.slice(r,f),l=i.length,e.backticksScanned&&(e.backticks[l]||0)<=r)return n||(e.pending+=i),e.pos+=l,!0;for(c=f;(s=e.src.indexOf("`",c))!==-1;){for(c=s+1;c<o&&e.src.charCodeAt(c)===96;)c++;if(u=c-s,u===l)return n||(a=e.push("code_inline","code",0),a.markup=i,a.content=e.src.slice(f,s).replace(/\n/g," ").replace(/^ (.+) $/,"$1")),e.pos=c,!0;e.backticks[u]=s}return e.backticksScanned=!0,n||(e.pending+=i),e.pos+=l,!0},ns={};ns.tokenize=function(e,n){var r,o,i,a,s,c=e.pos,l=e.src.charCodeAt(c);if(n||l!==126||(o=e.scanDelims(e.pos,!0),a=o.length,s=String.fromCharCode(l),a<2))return!1;for(a%2&&(i=e.push("text","",0),i.content=s,a--),r=0;r<a;r+=2)i=e.push("text","",0),i.content=s+s,e.delimiters.push({marker:l,length:0,token:e.tokens.length-1,end:-1,open:o.can_open,close:o.can_close});return e.pos+=o.length,!0};function xm(t,e){var n,r,o,i,a,s=[],c=e.length;for(n=0;n<c;n++)o=e[n],o.marker===126&&o.end!==-1&&(i=e[o.end],a=t.tokens[o.token],a.type="s_open",a.tag="s",a.nesting=1,a.markup="~~",a.content="",a=t.tokens[i.token],a.type="s_close",a.tag="s",a.nesting=-1,a.markup="~~",a.content="",t.tokens[i.token-1].type==="text"&&t.tokens[i.token-1].content==="~"&&s.push(i.token-1));for(;s.length;){for(n=s.pop(),r=n+1;r<t.tokens.length&&t.tokens[r].type==="s_close";)r++;r--,n!==r&&(a=t.tokens[r],t.tokens[r]=t.tokens[n],t.tokens[n]=a)}}ns.postProcess=function(e){var n,r=e.tokens_meta,o=e.tokens_meta.length;for(xm(e,e.delimiters),n=0;n<o;n++)r[n]&&r[n].delimiters&&xm(e,r[n].delimiters)};var rs={};rs.tokenize=function(e,n){var r,o,i,a=e.pos,s=e.src.charCodeAt(a);if(n||s!==95&&s!==42)return!1;for(o=e.scanDelims(e.pos,s===42),r=0;r<o.length;r++)i=e.push("text","",0),i.content=String.fromCharCode(s),e.delimiters.push({marker:s,length:o.length,token:e.tokens.length-1,end:-1,open:o.can_open,close:o.can_close});return e.pos+=o.length,!0};function km(t,e){var n,r,o,i,a,s,c=e.length;for(n=c-1;n>=0;n--)r=e[n],!(r.marker!==95&&r.marker!==42)&&r.end!==-1&&(o=e[r.end],s=n>0&&e[n-1].end===r.end+1&&e[n-1].marker===r.marker&&e[n-1].token===r.token-1&&e[r.end+1].token===o.token+1,a=String.fromCharCode(r.marker),i=t.tokens[r.token],i.type=s?"strong_open":"em_open",i.tag=s?"strong":"em",i.nesting=1,i.markup=s?a+a:a,i.content="",i=t.tokens[o.token],i.type=s?"strong_close":"em_close",i.tag=s?"strong":"em",i.nesting=-1,i.markup=s?a+a:a,i.content="",s&&(t.tokens[e[n-1].token].content="",t.tokens[e[r.end+1].token].content="",n--))}rs.postProcess=function(e){var n,r=e.tokens_meta,o=e.tokens_meta.length;for(km(e,e.delimiters),n=0;n<o;n++)r[n]&&r[n].delimiters&&km(e,r[n].delimiters)};var I2=Ne.normalizeReference,ol=Ne.isSpace,M2=function(e,n){var r,o,i,a,s,c,l,u,f,d="",p="",m=e.pos,g=e.posMax,w=e.pos,h=!0;if(e.src.charCodeAt(e.pos)!==91||(s=e.pos+1,a=e.md.helpers.parseLinkLabel(e,e.pos,!0),a<0))return!1;if(c=a+1,c<g&&e.src.charCodeAt(c)===40){for(h=!1,c++;c<g&&(o=e.src.charCodeAt(c),!(!ol(o)&&o!==10));c++);if(c>=g)return!1;if(w=c,l=e.md.helpers.parseLinkDestination(e.src,c,e.posMax),l.ok){for(d=e.md.normalizeLink(l.str),e.md.validateLink(d)?c=l.pos:d="",w=c;c<g&&(o=e.src.charCodeAt(c),!(!ol(o)&&o!==10));c++);if(l=e.md.helpers.parseLinkTitle(e.src,c,e.posMax),c<g&&w!==c&&l.ok)for(p=l.str,c=l.pos;c<g&&(o=e.src.charCodeAt(c),!(!ol(o)&&o!==10));c++);}(c>=g||e.src.charCodeAt(c)!==41)&&(h=!0),c++}if(h){if(typeof e.env.references>"u")return!1;if(c<g&&e.src.charCodeAt(c)===91?(w=c+1,c=e.md.helpers.parseLinkLabel(e,c),c>=0?i=e.src.slice(w,c++):c=a+1):c=a+1,i||(i=e.src.slice(s,a)),u=e.env.references[I2(i)],!u)return e.pos=m,!1;d=u.href,p=u.title}return n||(e.pos=s,e.posMax=a,f=e.push("link_open","a",1),f.attrs=r=[["href",d]],p&&r.push(["title",p]),e.linkLevel++,e.md.inline.tokenize(e),e.linkLevel--,f=e.push("link_close","a",-1)),e.pos=c,e.posMax=g,!0},C2=Ne.normalizeReference,il=Ne.isSpace,x2=function(e,n){var r,o,i,a,s,c,l,u,f,d,p,m,g,w="",h=e.pos,j=e.posMax;if(e.src.charCodeAt(e.pos)!==33||e.src.charCodeAt(e.pos+1)!==91||(c=e.pos+2,s=e.md.helpers.parseLinkLabel(e,e.pos+1,!1),s<0))return!1;if(l=s+1,l<j&&e.src.charCodeAt(l)===40){for(l++;l<j&&(o=e.src.charCodeAt(l),!(!il(o)&&o!==10));l++);if(l>=j)return!1;for(g=l,f=e.md.helpers.parseLinkDestination(e.src,l,e.posMax),f.ok&&(w=e.md.normalizeLink(f.str),e.md.validateLink(w)?l=f.pos:w=""),g=l;l<j&&(o=e.src.charCodeAt(l),!(!il(o)&&o!==10));l++);if(f=e.md.helpers.parseLinkTitle(e.src,l,e.posMax),l<j&&g!==l&&f.ok)for(d=f.str,l=f.pos;l<j&&(o=e.src.charCodeAt(l),!(!il(o)&&o!==10));l++);else d="";if(l>=j||e.src.charCodeAt(l)!==41)return e.pos=h,!1;l++}else{if(typeof e.env.references>"u")return!1;if(l<j&&e.src.charCodeAt(l)===91?(g=l+1,l=e.md.helpers.parseLinkLabel(e,l),l>=0?a=e.src.slice(g,l++):l=s+1):l=s+1,a||(a=e.src.slice(c,s)),u=e.env.references[C2(a)],!u)return e.pos=h,!1;w=u.href,d=u.title}return n||(i=e.src.slice(c,s),e.md.inline.parse(i,e.md,e.env,m=[]),p=e.push("image","img",0),p.attrs=r=[["src",w],["alt",""]],p.children=m,p.content=i,d&&r.push(["title",d])),e.pos=l,e.posMax=j,!0},k2=/^([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])?)*)$/,j2=/^([a-zA-Z][a-zA-Z0-9+.\-]{1,31}):([^<>\x00-\x20]*)$/,T2=function(e,n){var r,o,i,a,s,c,l=e.pos;if(e.src.charCodeAt(l)!==60)return!1;for(s=e.pos,c=e.posMax;;){if(++l>=c||(a=e.src.charCodeAt(l),a===60))return!1;if(a===62)break}return r=e.src.slice(s+1,l),j2.test(r)?(o=e.md.normalizeLink(r),e.md.validateLink(o)?(n||(i=e.push("link_open","a",1),i.attrs=[["href",o]],i.markup="autolink",i.info="auto",i=e.push("text","",0),i.content=e.md.normalizeLinkText(r),i=e.push("link_close","a",-1),i.markup="autolink",i.info="auto"),e.pos+=r.length+2,!0):!1):k2.test(r)?(o=e.md.normalizeLink("mailto:"+r),e.md.validateLink(o)?(n||(i=e.push("link_open","a",1),i.attrs=[["href",o]],i.markup="autolink",i.info="auto",i=e.push("text","",0),i.content=e.md.normalizeLinkText(r),i=e.push("link_close","a",-1),i.markup="autolink",i.info="auto"),e.pos+=r.length+2,!0):!1):!1},L2=Xa.HTML_TAG_RE;function S2(t){return/^<a[>\s]/i.test(t)}function N2(t){return/^<\/a\s*>/i.test(t)}function D2(t){var e=t|32;return e>=97&&e<=122}var O2=function(e,n){var r,o,i,a,s=e.pos;return!e.md.options.html||(i=e.posMax,e.src.charCodeAt(s)!==60||s+2>=i)||(r=e.src.charCodeAt(s+1),r!==33&&r!==63&&r!==47&&!D2(r))||(o=e.src.slice(s).match(L2),!o)?!1:(n||(a=e.push("html_inline","",0),a.content=o[0],S2(a.content)&&e.linkLevel++,N2(a.content)&&e.linkLevel--),e.pos+=o[0].length,!0)},jm=Hg,P2=Ne.has,z2=Ne.isValidEntityCode,Tm=Ne.fromCodePoint,A2=/^&#((?:x[a-f0-9]{1,6}|[0-9]{1,7}));/i,E2=/^&([a-z][a-z0-9]{1,31});/i,J2=function(e,n){var r,o,i,a,s=e.pos,c=e.posMax;if(e.src.charCodeAt(s)!==38||s+1>=c)return!1;if(r=e.src.charCodeAt(s+1),r===35){if(i=e.src.slice(s).match(A2),i)return n||(o=i[1][0].toLowerCase()==="x"?parseInt(i[1].slice(1),16):parseInt(i[1],10),a=e.push("text_special","",0),a.content=z2(o)?Tm(o):Tm(65533),a.markup=i[0],a.info="entity"),e.pos+=i[0].length,!0}else if(i=e.src.slice(s).match(E2),i&&P2(jm,i[1]))return n||(a=e.push("text_special","",0),a.content=jm[i[1]],a.markup=i[0],a.info="entity"),e.pos+=i[0].length,!0;return!1};function Lm(t){var e,n,r,o,i,a,s,c,l={},u=t.length;if(u){var f=0,d=-2,p=[];for(e=0;e<u;e++)if(r=t[e],p.push(0),(t[f].marker!==r.marker||d!==r.token-1)&&(f=e),d=r.token,r.length=r.length||0,!!r.close){for(l.hasOwnProperty(r.marker)||(l[r.marker]=[-1,-1,-1,-1,-1,-1]),i=l[r.marker][(r.open?3:0)+r.length%3],n=f-p[f]-1,a=n;n>i;n-=p[n]+1)if(o=t[n],o.marker===r.marker&&o.open&&o.end<0&&(s=!1,(o.close||r.open)&&(o.length+r.length)%3===0&&(o.length%3!==0||r.length%3!==0)&&(s=!0),!s)){c=n>0&&!t[n-1].open?p[n-1]+1:0,p[e]=e-n+c,p[n]=c,r.open=!1,o.end=e,o.close=!1,a=-1,d=-2;break}a!==-1&&(l[r.marker][(r.open?3:0)+(r.length||0)%3]=a)}}}var Q2=function(e){var n,r=e.tokens_meta,o=e.tokens_meta.length;for(Lm(e.delimiters),n=0;n<o;n++)r[n]&&r[n].delimiters&&Lm(r[n].delimiters)},R2=function(e){var n,r,o=0,i=e.tokens,a=e.tokens.length;for(n=r=0;n<a;n++)i[n].nesting<0&&o--,i[n].level=o,i[n].nesting>0&&o++,i[n].type==="text"&&n+1<a&&i[n+1].type==="text"?i[n+1].content=i[n].content+i[n+1].content:(n!==r&&(i[r]=i[n]),r++);n!==r&&(i.length=r)},al=Xc,Sm=Ne.isWhiteSpace,Nm=Ne.isPunctChar,Dm=Ne.isMdAsciiPunct;function yi(t,e,n,r){this.src=t,this.env=n,this.md=e,this.tokens=r,this.tokens_meta=Array(r.length),this.pos=0,this.posMax=this.src.length,this.level=0,this.pending="",this.pendingLevel=0,this.cache={},this.delimiters=[],this._prev_delimiters=[],this.backticks={},this.backticksScanned=!1,this.linkLevel=0}yi.prototype.pushPending=function(){var t=new al("text","",0);return t.content=this.pending,t.level=this.pendingLevel,this.tokens.push(t),this.pending="",t},yi.prototype.push=function(t,e,n){this.pending&&this.pushPending();var r=new al(t,e,n),o=null;return n<0&&(this.level--,this.delimiters=this._prev_delimiters.pop()),r.level=this.level,n>0&&(this.level++,this._prev_delimiters.push(this.delimiters),this.delimiters=[],o={delimiters:this.delimiters}),this.pendingLevel=this.level,this.tokens.push(r),this.tokens_meta.push(o),r},yi.prototype.scanDelims=function(t,e){var n=t,r,o,i,a,s,c,l,u,f,d=!0,p=!0,m=this.posMax,g=this.src.charCodeAt(t);for(r=t>0?this.src.charCodeAt(t-1):32;n<m&&this.src.charCodeAt(n)===g;)n++;return i=n-t,o=n<m?this.src.charCodeAt(n):32,l=Dm(r)||Nm(String.fromCharCode(r)),f=Dm(o)||Nm(String.fromCharCode(o)),c=Sm(r),u=Sm(o),u?d=!1:f&&(c||l||(d=!1)),c?p=!1:l&&(u||f||(p=!1)),e?(a=d,s=p):(a=d&&(!p||l),s=p&&(!d||f)),{can_open:a,can_close:s,length:i}},yi.prototype.Token=al;var G2=yi,Om=qc,sl=[["text",d2],["linkify",m2],["newline",y2],["escape",b2],["backticks",w2],["strikethrough",ns.tokenize],["emphasis",rs.tokenize],["link",M2],["image",x2],["autolink",T2],["html_inline",O2],["entity",J2]],cl=[["balance_pairs",Q2],["strikethrough",ns.postProcess],["emphasis",rs.postProcess],["fragments_join",R2]];function vi(){var t;for(this.ruler=new Om,t=0;t<sl.length;t++)this.ruler.push(sl[t][0],sl[t][1]);for(this.ruler2=new Om,t=0;t<cl.length;t++)this.ruler2.push(cl[t][0],cl[t][1])}vi.prototype.skipToken=function(t){var e,n,r=t.pos,o=this.ruler.getRules(""),i=o.length,a=t.md.options.maxNesting,s=t.cache;if(typeof s[r]<"u"){t.pos=s[r];return}if(t.level<a){for(n=0;n<i;n++)if(t.level++,e=o[n](t,!0),t.level--,e){if(r>=t.pos)throw new Error("inline rule didn't increment state.pos");break}}else t.pos=t.posMax;e||t.pos++,s[r]=t.pos},vi.prototype.tokenize=function(t){for(var e,n,r,o=this.ruler.getRules(""),i=o.length,a=t.posMax,s=t.md.options.maxNesting;t.pos<a;){if(r=t.pos,t.level<s){for(n=0;n<i;n++)if(e=o[n](t,!1),e){if(r>=t.pos)throw new Error("inline rule didn't increment state.pos");break}}if(e){if(t.pos>=a)break;continue}t.pending+=t.src[t.pos++]}t.pending&&t.pushPending()},vi.prototype.parse=function(t,e,n,r){var o,i,a,s=new this.State(t,e,n,r);for(this.tokenize(s),i=this.ruler2.getRules(""),a=i.length,o=0;o<a;o++)i[o](s)},vi.prototype.State=G2;var F2=vi,ll,Pm;function Z2(){return Pm||(Pm=1,ll=function(t){var e={};t=t||{},e.src_Any=em().source,e.src_Cc=nm().source,e.src_Z=im().source,e.src_P=Yc.source,e.src_ZPCc=[e.src_Z,e.src_P,e.src_Cc].join("|"),e.src_ZCc=[e.src_Z,e.src_Cc].join("|");var n="[><|]";return e.src_pseudo_letter="(?:(?!"+n+"|"+e.src_ZPCc+")"+e.src_Any+")",e.src_ip4="(?:(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)",e.src_auth="(?:(?:(?!"+e.src_ZCc+"|[@/\\[\\]()]).)+@)?",e.src_port="(?::(?:6(?:[0-4]\\d{3}|5(?:[0-4]\\d{2}|5(?:[0-2]\\d|3[0-5])))|[1-5]?\\d{1,4}))?",e.src_host_terminator="(?=$|"+n+"|"+e.src_ZPCc+")(?!"+(t["---"]?"-(?!--)|":"-|")+"_|:\\d|\\.-|\\.(?!$|"+e.src_ZPCc+"))",e.src_path="(?:[/?#](?:(?!"+e.src_ZCc+"|"+n+`|[()[\\]{}.,"'?!\\-;]).|\\[(?:(?!`+e.src_ZCc+"|\\]).)*\\]|\\((?:(?!"+e.src_ZCc+"|[)]).)*\\)|\\{(?:(?!"+e.src_ZCc+'|[}]).)*\\}|\\"(?:(?!'+e.src_ZCc+`|["]).)+\\"|\\'(?:(?!`+e.src_ZCc+"|[']).)+\\'|\\'(?="+e.src_pseudo_letter+"|[-])|\\.{2,}[a-zA-Z0-9%/&]|\\.(?!"+e.src_ZCc+"|[.]|$)|"+(t["---"]?"\\-(?!--(?:[^-]|$))(?:-*)|":"\\-+|")+",(?!"+e.src_ZCc+"|$)|;(?!"+e.src_ZCc+"|$)|\\!+(?!"+e.src_ZCc+"|[!]|$)|\\?(?!"+e.src_ZCc+"|[?]|$))+|\\/)?",e.src_email_name='[\\-;:&=\\+\\$,\\.a-zA-Z0-9_][\\-;:&=\\+\\$,\\"\\.a-zA-Z0-9_]*',e.src_xn="xn--[a-z0-9\\-]{1,59}",e.src_domain_root="(?:"+e.src_xn+"|"+e.src_pseudo_letter+"{1,63})",e.src_domain="(?:"+e.src_xn+"|(?:"+e.src_pseudo_letter+")|(?:"+e.src_pseudo_letter+"(?:-|"+e.src_pseudo_letter+"){0,61}"+e.src_pseudo_letter+"))",e.src_host="(?:(?:(?:(?:"+e.src_domain+")\\.)*"+e.src_domain+"))",e.tpl_host_fuzzy="(?:"+e.src_ip4+"|(?:(?:(?:"+e.src_domain+")\\.)+(?:%TLDS%)))",e.tpl_host_no_ip_fuzzy="(?:(?:(?:"+e.src_domain+")\\.)+(?:%TLDS%))",e.src_host_strict=e.src_host+e.src_host_terminator,e.tpl_host_fuzzy_strict=e.tpl_host_fuzzy+e.src_host_terminator,e.src_host_port_strict=e.src_host+e.src_port+e.src_host_terminator,e.tpl_host_port_fuzzy_strict=e.tpl_host_fuzzy+e.src_port+e.src_host_terminator,e.tpl_host_port_no_ip_fuzzy_strict=e.tpl_host_no_ip_fuzzy+e.src_port+e.src_host_terminator,e.tpl_host_fuzzy_test="localhost|www\\.|\\.\\d{1,3}\\.|(?:\\.(?:%TLDS%)(?:"+e.src_ZPCc+"|>|$))",e.tpl_email_fuzzy="(^|"+n+'|"|\\(|'+e.src_ZCc+")("+e.src_email_name+"@"+e.tpl_host_fuzzy_strict+")",e.tpl_link_fuzzy="(^|(?![.:/\\-_@])(?:[$+<=>^`||]|"+e.src_ZPCc+"))((?![$+<=>^`||])"+e.tpl_host_port_fuzzy_strict+e.src_path+")",e.tpl_link_no_ip_fuzzy="(^|(?![.:/\\-_@])(?:[$+<=>^`||]|"+e.src_ZPCc+"))((?![$+<=>^`||])"+e.tpl_host_port_no_ip_fuzzy_strict+e.src_path+")",e}),ll}function ul(t){var e=Array.prototype.slice.call(arguments,1);return e.forEach(function(n){n&&Object.keys(n).forEach(function(r){t[r]=n[r]})}),t}function os(t){return Object.prototype.toString.call(t)}function _2(t){return os(t)==="[object String]"}function V2(t){return os(t)==="[object Object]"}function H2(t){return os(t)==="[object RegExp]"}function zm(t){return os(t)==="[object Function]"}function Y2(t){return t.replace(/[.?*+^$[\]\\(){}|-]/g,"\\$&")}var Am={fuzzyLink:!0,fuzzyEmail:!0,fuzzyIP:!1};function B2(t){return Object.keys(t||{}).reduce(function(e,n){return e||Am.hasOwnProperty(n)},!1)}var W2={"http:":{validate:function(t,e,n){var r=t.slice(e);return n.re.http||(n.re.http=new RegExp("^\\/\\/"+n.re.src_auth+n.re.src_host_port_strict+n.re.src_path,"i")),n.re.http.test(r)?r.match(n.re.http)[0].length:0}},"https:":"http:","ftp:":"http:","//":{validate:function(t,e,n){var r=t.slice(e);return n.re.no_http||(n.re.no_http=new RegExp("^"+n.re.src_auth+"(?:localhost|(?:(?:"+n.re.src_domain+")\\.)+"+n.re.src_domain_root+")"+n.re.src_port+n.re.src_host_terminator+n.re.src_path,"i")),n.re.no_http.test(r)?e>=3&&t[e-3]===":"||e>=3&&t[e-3]==="/"?0:r.match(n.re.no_http)[0].length:0}},"mailto:":{validate:function(t,e,n){var r=t.slice(e);return n.re.mailto||(n.re.mailto=new RegExp("^"+n.re.src_email_name+"@"+n.re.src_host_strict,"i")),n.re.mailto.test(r)?r.match(n.re.mailto)[0].length:0}}},$2="a[cdefgilmnoqrstuwxz]|b[abdefghijmnorstvwyz]|c[acdfghiklmnoruvwxyz]|d[ejkmoz]|e[cegrstu]|f[ijkmor]|g[abdefghilmnpqrstuwy]|h[kmnrtu]|i[delmnoqrst]|j[emop]|k[eghimnprwyz]|l[abcikrstuvy]|m[acdeghklmnopqrstuvwxyz]|n[acefgilopruz]|om|p[aefghklmnrstwy]|qa|r[eosuw]|s[abcdeghijklmnortuvxyz]|t[cdfghjklmnortvwz]|u[agksyz]|v[aceginu]|w[fs]|y[et]|z[amw]",U2="biz|com|edu|gov|net|org|pro|web|xxx|aero|asia|coop|info|museum|name|shop|рф".split("|");function q2(t){t.__index__=-1,t.__text_cache__=""}function X2(t){return function(e,n){var r=e.slice(n);return t.test(r)?r.match(t)[0].length:0}}function Em(){return function(t,e){e.normalize(t)}}function is(t){var e=t.re=Z2()(t.__opts__),n=t.__tlds__.slice();t.onCompile(),t.__tlds_replaced__||n.push($2),n.push(e.src_xn),e.src_tlds=n.join("|");function r(s){return s.replace("%TLDS%",e.src_tlds)}e.email_fuzzy=RegExp(r(e.tpl_email_fuzzy),"i"),e.link_fuzzy=RegExp(r(e.tpl_link_fuzzy),"i"),e.link_no_ip_fuzzy=RegExp(r(e.tpl_link_no_ip_fuzzy),"i"),e.host_fuzzy_test=RegExp(r(e.tpl_host_fuzzy_test),"i");var o=[];t.__compiled__={};function i(s,c){throw new Error('(LinkifyIt) Invalid schema "'+s+'": '+c)}Object.keys(t.__schemas__).forEach(function(s){var c=t.__schemas__[s];if(c!==null){var l={validate:null,link:null};if(t.__compiled__[s]=l,V2(c)){H2(c.validate)?l.validate=X2(c.validate):zm(c.validate)?l.validate=c.validate:i(s,c),zm(c.normalize)?l.normalize=c.normalize:c.normalize?i(s,c):l.normalize=Em();return}if(_2(c)){o.push(s);return}i(s,c)}}),o.forEach(function(s){t.__compiled__[t.__schemas__[s]]&&(t.__compiled__[s].validate=t.__compiled__[t.__schemas__[s]].validate,t.__compiled__[s].normalize=t.__compiled__[t.__schemas__[s]].normalize)}),t.__compiled__[""]={validate:null,normalize:Em()};var a=Object.keys(t.__compiled__).filter(function(s){return s.length>0&&t.__compiled__[s]}).map(Y2).join("|");t.re.schema_test=RegExp("(^|(?!_)(?:[><|]|"+e.src_ZPCc+"))("+a+")","i"),t.re.schema_search=RegExp("(^|(?!_)(?:[><|]|"+e.src_ZPCc+"))("+a+")","ig"),t.re.schema_at_start=RegExp("^"+t.re.schema_search.source,"i"),t.re.pretest=RegExp("("+t.re.schema_test.source+")|("+t.re.host_fuzzy_test.source+")|@","i"),q2(t)}function K2(t,e){var n=t.__index__,r=t.__last_index__,o=t.__text_cache__.slice(n,r);this.schema=t.__schema__.toLowerCase(),this.index=n+e,this.lastIndex=r+e,this.raw=o,this.text=o,this.url=o}function fl(t,e){var n=new K2(t,e);return t.__compiled__[n.schema].normalize(n,t),n}function wt(t,e){if(!(this instanceof wt))return new wt(t,e);e||B2(t)&&(e=t,t={}),this.__opts__=ul({},Am,e),this.__index__=-1,this.__last_index__=-1,this.__schema__="",this.__text_cache__="",this.__schemas__=ul({},W2,t),this.__compiled__={},this.__tlds__=U2,this.__tlds_replaced__=!1,this.re={},is(this)}wt.prototype.add=function(e,n){return this.__schemas__[e]=n,is(this),this},wt.prototype.set=function(e){return this.__opts__=ul(this.__opts__,e),this},wt.prototype.test=function(e){if(this.__text_cache__=e,this.__index__=-1,!e.length)return!1;var n,r,o,i,a,s,c,l,u;if(this.re.schema_test.test(e)){for(c=this.re.schema_search,c.lastIndex=0;(n=c.exec(e))!==null;)if(i=this.testSchemaAt(e,n[2],c.lastIndex),i){this.__schema__=n[2],this.__index__=n.index+n[1].length,this.__last_index__=n.index+n[0].length+i;break}}return this.__opts__.fuzzyLink&&this.__compiled__["http:"]&&(l=e.search(this.re.host_fuzzy_test),l>=0&&(this.__index__<0||l<this.__index__)&&(r=e.match(this.__opts__.fuzzyIP?this.re.link_fuzzy:this.re.link_no_ip_fuzzy))!==null&&(a=r.index+r[1].length,(this.__index__<0||a<this.__index__)&&(this.__schema__="",this.__index__=a,this.__last_index__=r.index+r[0].length))),this.__opts__.fuzzyEmail&&this.__compiled__["mailto:"]&&(u=e.indexOf("@"),u>=0&&(o=e.match(this.re.email_fuzzy))!==null&&(a=o.index+o[1].length,s=o.index+o[0].length,(this.__index__<0||a<this.__index__||a===this.__index__&&s>this.__last_index__)&&(this.__schema__="mailto:",this.__index__=a,this.__last_index__=s))),this.__index__>=0},wt.prototype.pretest=function(e){return this.re.pretest.test(e)},wt.prototype.testSchemaAt=function(e,n,r){return this.__compiled__[n.toLowerCase()]?this.__compiled__[n.toLowerCase()].validate(e,r,this):0},wt.prototype.match=function(e){var n=0,r=[];this.__index__>=0&&this.__text_cache__===e&&(r.push(fl(this,n)),n=this.__last_index__);for(var o=n?e.slice(n):e;this.test(o);)r.push(fl(this,n)),o=o.slice(this.__last_index__),n+=this.__last_index__;return r.length?r:null},wt.prototype.matchAtStart=function(e){if(this.__text_cache__=e,this.__index__=-1,!e.length)return null;var n=this.re.schema_at_start.exec(e);if(!n)return null;var r=this.testSchemaAt(e,n[2],n[0].length);return r?(this.__schema__=n[2],this.__index__=n.index+n[1].length,this.__last_index__=n.index+n[0].length+r,fl(this,0)):null},wt.prototype.tlds=function(e,n){return e=Array.isArray(e)?e:[e],n?(this.__tlds__=this.__tlds__.concat(e).sort().filter(function(r,o,i){return r!==i[o-1]}).reverse(),is(this),this):(this.__tlds__=e.slice(),this.__tlds_replaced__=!0,is(this),this)},wt.prototype.normalize=function(e){e.schema||(e.url="http://"+e.url),e.schema==="mailto:"&&!/^mailto:/i.test(e.url)&&(e.url="mailto:"+e.url)},wt.prototype.onCompile=function(){};var eO=wt;const qr=2147483647,sn=36,pl=1,bi=26,tO=38,nO=700,Jm=72,Qm=128,Rm="-",rO=/^xn--/,oO=/[^\0-\x7F]/,iO=/[\x2E\u3002\uFF0E\uFF61]/g,aO={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},dl=sn-pl,cn=Math.floor,gl=String.fromCharCode;function Qn(t){throw new RangeError(aO[t])}function sO(t,e){const n=[];let r=t.length;for(;r--;)n[r]=e(t[r]);return n}function Gm(t,e){const n=t.split("@");let r="";n.length>1&&(r=n[0]+"@",t=n[1]),t=t.replace(iO,".");const o=t.split("."),i=sO(o,e).join(".");return r+i}function ml(t){const e=[];let n=0;const r=t.length;for(;n<r;){const o=t.charCodeAt(n++);if(o>=55296&&o<=56319&&n<r){const i=t.charCodeAt(n++);(i&64512)==56320?e.push(((o&1023)<<10)+(i&1023)+65536):(e.push(o),n--)}else e.push(o)}return e}const Fm=t=>String.fromCodePoint(...t),cO=function(t){return t>=48&&t<58?26+(t-48):t>=65&&t<91?t-65:t>=97&&t<123?t-97:sn},Zm=function(t,e){return t+22+75*(t<26)-((e!=0)<<5)},_m=function(t,e,n){let r=0;for(t=n?cn(t/nO):t>>1,t+=cn(t/e);t>dl*bi>>1;r+=sn)t=cn(t/dl);return cn(r+(dl+1)*t/(t+tO))},hl=function(t){const e=[],n=t.length;let r=0,o=Qm,i=Jm,a=t.lastIndexOf(Rm);a<0&&(a=0);for(let s=0;s<a;++s)t.charCodeAt(s)>=128&&Qn("not-basic"),e.push(t.charCodeAt(s));for(let s=a>0?a+1:0;s<n;){const c=r;for(let u=1,f=sn;;f+=sn){s>=n&&Qn("invalid-input");const d=cO(t.charCodeAt(s++));d>=sn&&Qn("invalid-input"),d>cn((qr-r)/u)&&Qn("overflow"),r+=d*u;const p=f<=i?pl:f>=i+bi?bi:f-i;if(d<p)break;const m=sn-p;u>cn(qr/m)&&Qn("overflow"),u*=m}const l=e.length+1;i=_m(r-c,l,c==0),cn(r/l)>qr-o&&Qn("overflow"),o+=cn(r/l),r%=l,e.splice(r++,0,o)}return String.fromCodePoint(...e)},yl=function(t){const e=[];t=ml(t);const n=t.length;let r=Qm,o=0,i=Jm;for(const c of t)c<128&&e.push(gl(c));const a=e.length;let s=a;for(a&&e.push(Rm);s<n;){let c=qr;for(const u of t)u>=r&&u<c&&(c=u);const l=s+1;c-r>cn((qr-o)/l)&&Qn("overflow"),o+=(c-r)*l,r=c;for(const u of t)if(u<r&&++o>qr&&Qn("overflow"),u===r){let f=o;for(let d=sn;;d+=sn){const p=d<=i?pl:d>=i+bi?bi:d-i;if(f<p)break;const m=f-p,g=sn-p;e.push(gl(Zm(p+m%g,0))),f=cn(m/g)}e.push(gl(Zm(f,0))),i=_m(o,l,s===a),o=0,++s}++o,++r}return e.join("")},Vm=function(t){return Gm(t,function(e){return rO.test(e)?hl(e.slice(4).toLowerCase()):e})},Hm=function(t){return Gm(t,function(e){return oO.test(e)?"xn--"+yl(e):e})},lO=ey(Object.freeze(Object.defineProperty({__proto__:null,decode:hl,default:{version:"2.3.1",ucs2:{decode:ml,encode:Fm},decode:hl,encode:yl,toASCII:Hm,toUnicode:Vm},encode:yl,toASCII:Hm,toUnicode:Vm,ucs2decode:ml,ucs2encode:Fm},Symbol.toStringTag,{value:"Module"})));var uO={options:{html:!1,xhtmlOut:!1,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:100},components:{core:{},block:{},inline:{}}},fO={options:{html:!1,xhtmlOut:!1,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:20},components:{core:{rules:["normalize","block","inline","text_join"]},block:{rules:["paragraph"]},inline:{rules:["text"],rules2:["balance_pairs","fragments_join"]}}},pO={options:{html:!0,xhtmlOut:!0,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:20},components:{core:{rules:["normalize","block","inline","text_join"]},block:{rules:["blockquote","code","fence","heading","hr","html_block","lheading","list","reference","paragraph"]},inline:{rules:["autolink","backticks","emphasis","entity","escape","html_inline","image","link","newline","text"],rules2:["balance_pairs","emphasis","fragments_join"]}}},wi=Ne,dO=$a,gO=cD,mO=OD,hO=f2,yO=F2,vO=eO,rr=Br,Ym=lO,bO={default:uO,zero:fO,commonmark:pO},wO=/^(vbscript|javascript|file|data):/,IO=/^data:image\/(gif|png|jpeg|webp);/;function MO(t){var e=t.trim().toLowerCase();return wO.test(e)?!!IO.test(e):!0}var Bm=["http:","https:","mailto:"];function CO(t){var e=rr.parse(t,!0);if(e.hostname&&(!e.protocol||Bm.indexOf(e.protocol)>=0))try{e.hostname=Ym.toASCII(e.hostname)}catch{}return rr.encode(rr.format(e))}function xO(t){var e=rr.parse(t,!0);if(e.hostname&&(!e.protocol||Bm.indexOf(e.protocol)>=0))try{e.hostname=Ym.toUnicode(e.hostname)}catch{}return rr.decode(rr.format(e),rr.decode.defaultChars+"%")}function Dt(t,e){if(!(this instanceof Dt))return new Dt(t,e);e||wi.isString(t)||(e=t||{},t="default"),this.inline=new yO,this.block=new hO,this.core=new mO,this.renderer=new gO,this.linkify=new vO,this.validateLink=MO,this.normalizeLink=CO,this.normalizeLinkText=xO,this.utils=wi,this.helpers=wi.assign({},dO),this.options={},this.configure(t),e&&this.set(e)}Dt.prototype.set=function(t){return wi.assign(this.options,t),this},Dt.prototype.configure=function(t){var e=this,n;if(wi.isString(t)&&(n=t,t=bO[n],!t))throw new Error('Wrong `markdown-it` preset "'+n+'", check name');if(!t)throw new Error("Wrong `markdown-it` preset, can't be empty");return t.options&&e.set(t.options),t.components&&Object.keys(t.components).forEach(function(r){t.components[r].rules&&e[r].ruler.enableOnly(t.components[r].rules),t.components[r].rules2&&e[r].ruler2.enableOnly(t.components[r].rules2)}),this},Dt.prototype.enable=function(t,e){var n=[];Array.isArray(t)||(t=[t]),["core","block","inline"].forEach(function(o){n=n.concat(this[o].ruler.enable(t,!0))},this),n=n.concat(this.inline.ruler2.enable(t,!0));var r=t.filter(function(o){return n.indexOf(o)<0});if(r.length&&!e)throw new Error("MarkdownIt. Failed to enable unknown rule(s): "+r);return this},Dt.prototype.disable=function(t,e){var n=[];Array.isArray(t)||(t=[t]),["core","block","inline"].forEach(function(o){n=n.concat(this[o].ruler.disable(t,!0))},this),n=n.concat(this.inline.ruler2.disable(t,!0));var r=t.filter(function(o){return n.indexOf(o)<0});if(r.length&&!e)throw new Error("MarkdownIt. Failed to disable unknown rule(s): "+r);return this},Dt.prototype.use=function(t){var e=[this].concat(Array.prototype.slice.call(arguments,1));return t.apply(t,e),this},Dt.prototype.parse=function(t,e){if(typeof t!="string")throw new Error("Input data should be a String");var n=new this.core.State(t,this,e);return this.core.process(n),n.tokens},Dt.prototype.render=function(t,e){return e=e||{},this.renderer.render(this.parse(t,e),this.options,e)},Dt.prototype.parseInline=function(t,e){var n=new this.core.State(t,this,e);return n.inlineMode=!0,this.core.process(n),n.tokens},Dt.prototype.renderInline=function(t,e){return e=e||{},this.renderer.render(this.parseInline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E21x01TTaIGglabRRIhLVwTKq75kKzYYKTYHUORwcMZdzhEhOIaBU3YnB3VK0cdNSdVM9MYt2fzPAMW3j/8Dx+VMHl8zFNkAAAAASUVORK5CYII=";var vl=(t=>(t.Assistant="assistant",t.System="system",t.User="user",t))(vl||{}),Ii=(t=>(t.Error="error",t.Loading="loading",t.Success="success",t))(Ii||{});const SO={class:"message-content user"},NO={key:0,class:"time-message user"},DO=["innerHTML"],OO={class:"message-photo user"},PO=["src"],zO=k.createElementVNode("span",{class:"message-photo ai"},[k.createElementVNode("i",{class:"ai-blueking-icon ai-blueking-ai"})],-1),AO={class:"message-content ai"},EO={key:0,class:"time-message ai"},JO={key:2,width:"18",height:"18",class:"loading-message","aria-hidden":"true"},QO=[k.createElementVNode("use",{"xlink:href":"#ai-blueking-quanquan"},null,-1)],RO={key:3,class:"message-wrap"},GO=["innerHTML"],FO=k.defineComponent({__name:"render-message",props:{message:{},userPhoto:{default:LO}},setup(t){const e=t,n=k.computed(()=>{var a;const i={error:"ai-blueking-icon ai-blueking-warning-circle-fill",loading:"",success:""};return(a=e.message)!=null&&a.status?i[e.message.status]:""}),r=k.computed(()=>{if(e.message.content){const a=new TO({html:!0}).render(e.message.content);return Q1.sanitize(a)}return""}),o=k.computed(()=>{const i=Fa(e.message.time),a=Fa();return e.message.time?a.isSame(i,"year")?i.format("MM-DD HH:mm:ss"):i.format("YYYY-MM-DD HH:mm:ss"):""});return(i,a)=>(k.openBlock(),k.createElementBlock("li",{class:k.normalizeClass([i.message.role,"message-main"])},[i.message.role===k.unref(vl).User?(k.openBlock(),k.createElementBlock(k.Fragment,{key:0},[k.createElementVNode("p",SO,[o.value?(k.openBlock(),k.createElementBlock("span",NO,k.toDisplayString(o.value),1)):k.createCommentVNode("v-if",!0),k.createElementVNode("span",{class:"markdown-message",innerHTML:r.value},null,8,DO)]),k.createElementVNode("span",OO,[k.createElementVNode("img",{src:i.userPhoto},null,8,PO)])],64)):(k.openBlock(),k.createElementBlock(k.Fragment,{key:1},[zO,k.createElementVNode("p",AO,[o.value?(k.openBlock(),k.createElementBlock("span",EO,k.toDisplayString(o.value),1)):k.createCommentVNode("v-if",!0),n.value?(k.openBlock(),k.createElementBlock("i",{key:1,class:k.normalizeClass(n.value)},null,2)):k.createCommentVNode("v-if",!0),i.message.status===k.unref(Ii).Loading?(k.openBlock(),k.createElementBlock("svg",JO,QO)):k.createCommentVNode("v-if",!0),i.message.status===k.unref(Ii).Error?(k.openBlock(),k.createElementBlock("span",RO,k.toDisplayString(i.message.content),1)):(k.openBlock(),k.createElementBlock("span",{key:4,innerHTML:r.value,class:k.normalizeClass({"markdown-message":!0,loading:i.message.status===k.unref(Ii).Loading})},null,10,GO))])],64))],2))}}),ZO={class:"prompt-list"},_O={class:"search-group"},VO=["onClick"],HO={class:"prompt-content"},YO=Yr(k.defineComponent({__name:"render-send",props:{prompts:{},placeholder:{},value:{}},emits:["update:value","enter","choose-prompt"],setup(t,{emit:e}){const n=t,r=e,o=o1,i=Ga,a=k.ref(""),s=k.ref(40),c=k.ref(),l=k.ref(!1),u=k.computed(()=>{var L;return((L=n.prompts)==null?void 0:L.filter(N=>N.content.includes(a.value)))||[]}),f=k.computed(()=>{var L;return n.placeholder?n.placeholder:(L=n.prompts)!=null&&L.length?He("您可以键入 “/” 查看更多Prompt"):He("请输入")}),d=L=>{r("update:value",L)},p=()=>{var L;n.value==="/"&&((L=n.prompts)!=null&&L.length)?T():J()},m=()=>{k.nextTick(()=>{var N;const L=(N=c.value)==null?void 0:N.$el.querySelector("textarea");(L==null?void 0:L.scrollHeight)>40&&n.value?s.value=L.scrollHeight<=300?L.scrollHeight:300:s.value=40})},g=L=>{r("update:value",L.content),r("choose-prompt",L),J(),j()},w=(L,N)=>{N.key==="Enter"&&!N.shiftKey&&(N.preventDefault(),r("enter"))},h=()=>{d("")},j=()=>{var N;const L=(N=c.value)==null?void 0:N.$el.querySelector("textarea");L==null||L.focus()},T=()=>{l.value=!0},J=()=>{l.value=!1};return k.watch(()=>n.value,()=>{m(),p()}),k.onMounted(j),(L,N)=>(k.openBlock(),k.createBlock(k.unref(bg),{width:"calc(100% - 118px)","ext-cls":"empty-padding",arrow:!1,"is-show":l.value,"popover-delay":0,boundary:"parent",placement:"bottom",theme:"light",trigger:"manual"},{content:k.withCtx(()=>{var Y;return[k.createElementVNode("div",null,[k.withDirectives((k.openBlock(),k.createElementBlock("section",ZO,[k.createVNode(k.unref(Tg),{class:"input-search",modelValue:a.value,"onUpdate:modelValue":N[0]||(N[0]=q=>a.value=q),behavior:"simplicity",clearable:""},null,8,["modelValue"]),k.createElementVNode("section",_O,[(k.openBlock(!0),k.createElementBlock(k.Fragment,null,k.renderList(u.value,(q,te)=>k.withDirectives((k.openBlock(),k.createElementBlock("span",{class:"group-prompt",key:te,onClick:Q=>g(q)},[k.createElementVNode("span",HO,k.toDisplayString(q.content),1)],8,VO)),[[k.unref(i),{content:q.content,placement:"right",theme:"light",width:300,zIndex:9999999,extCls:"prompt-popover"}]])),128)),(Y=u.value)!=null&&Y.length?k.createCommentVNode("v-if",!0):(k.openBlock(),k.createBlock(k.unref(s1),{key:0,class:"exception-wrap-item exception-part",scene:"part",type:"search-empty"}))])])),[[k.unref(o),J]])])]}),default:k.withCtx(()=>[k.createElementVNode("section",{style:k.normalizeStyle({"--text-height":s.value+"px"}),class:"send-prompt-container"},[k.createVNode(k.unref(Tg),{ref_key:"inputRef",ref:c,class:"send-prompt",autosize:!1,clearable:!0,"model-value":L.value,"native-attributes":{autofocus:"autofocus"},placeholder:f.value,row:"1",type:"textarea",onInput:d,onKeydown:w},null,8,["model-value","placeholder"]),L.value?(k.openBlock(),k.createBlock(k.unref(_s),{key:0,class:"show-clear-only-hover bk-input--clear-icon clear-icon",onClick:h})):k.createCommentVNode("v-if",!0)],4)]),_:1},8,["is-show"]))}}),[["__scopeId","data-v-2374c5aa"]]),BO=(t=>(k.pushScopeId("data-v-fd57f18d"),t=t(),k.popScopeId(),t))(()=>k.createElementVNode("svg",{width:"10",height:"10",class:"ai-blueking-render-stop-icon","aria-hidden":"true"},[k.createElementVNode("use",{"xlink:href":"#ai-blueking-tingzhi"})],-1)),WO=Yr(k.defineComponent({__name:"render-stop",props:{isShow:{type:Boolean}},emits:["stop"],setup(t,{emit:e}){const n=e,r=()=>{n("stop")};return(o,i)=>o.isShow?(k.openBlock(),k.createElementBlock("span",{key:0,class:"ai-blueking-render-stop",onClick:r},[BO,k.createTextVNode(" "+k.toDisplayString(k.unref(He)("终止生成")),1)])):k.createCommentVNode("v-if",!0)}}),[["__scopeId","data-v-fd57f18d"]]),$O={key:0,class:"time-wrapper"},UO={class:"time-message"},qO=Yr(k.defineComponent({__name:"render-time",props:{message:{}},setup(t){const e=t,n=k.computed(()=>{var a;const r=Fa(e.message.time),o=Fa(),i={0:He("日"),1:He("一"),2:He("二"),3:He("三"),4:He("四"),5:He("五"),6:He("六")};return!e.message.time||(a=window.showTimes)!=null&&a.some(s=>Math.abs(r.diff(s,"minute"))<10&&s!==e.message.time)?"":(window.showTimes=[...window.showTimes||[],e.message.time],o.isSame(r,"day")?r.format("HH:mm:ss"):o.subtract(1,"day").isSame(r,"week")?He("昨天")+" "+r.format("HH:mm:ss"):o.isSame(r,"week")?He("本周")+i[r.day()]+" "+r.format("HH:mm:ss"):o.subtract(1,"week").isSame(r,"week")?He("上周")+i[r.day()]+" "+r.format("HH:mm:ss"):o.isSame(r,"year")?r.format("MM-DD HH:mm:ss"):r.format("YYYY-MM-DD HH:mm:ss"))});return(r,o)=>n.value?(k.openBlock(),k.createElementBlock("section",$O,[k.createElementVNode("span",UO,k.toDisplayString(n.value),1)])):k.createCommentVNode("v-if",!0)}}),[["__scopeId","data-v-55c9a119"]]),Wm=t=>(k.pushScopeId("data-v-6cc6ac8a"),t=t(),k.popScopeId(),t),XO={key:0,width:"18",height:"18",class:"scroll-loading-icon","aria-hidden":"true"},KO=[Wm(()=>k.createElementVNode("use",{"xlink:href":"#ai-blueking-loading-2"},null,-1))],eP={class:"ai-operation"},tP={class:"ai-operation-tools"},nP={class:"ai-operation-input"},rP=Wm(()=>k.createElementVNode("i",{class:"ai-blueking-icon ai-blueking-fasong"},null,-1)),oP=Yr(k.defineComponent({__name:"render-content",props:{messages:{},prompts:{},loading:{type:Boolean},background:{default:"#f5f7fa"},userPhoto:{},placeholder:{},scrollLoading:{type:Boolean},scrollLoadingEnd:{type:Boolean,default:!0}},emits:["send","choose-prompt","scroll-load","stop"],setup(t,{emit:e}){const n=t,r=e,o=Ga,i=k.ref(""),a=()=>{k.nextTick(()=>{const d=document.querySelector(".ai-blueking-messages");d.scrollTop=d.scrollHeight})},s=p1(d=>{if(n.scrollLoading||n.scrollLoadingEnd)return;d.target.scrollTop<200&&r("scroll-load")}),c=()=>{if(i.value){if(n.loading){l1({theme:"warning",message:He("内容正在执行中,请执行完成后再发送")});return}r("send",i.value),i.value=""}},l=d=>{r("choose-prompt",d)},u=()=>{r("stop")};k.watch(()=>n.messages,()=>{const d=document.querySelector(".ai-blueking-messages");(d==null?void 0:d.scrollTop)+(d==null?void 0:d.clientHeight)+100>=(d==null?void 0:d.scrollHeight)&&a()},{deep:!0});const f=()=>{window.showTimes=[]};return k.onMounted(a),k.onBeforeUnmount(f),(d,p)=>(k.openBlock(),k.createElementBlock("section",{style:k.normalizeStyle({background:d.background}),class:"ai-content"},[k.createElementVNode("ul",{class:"ai-messages ai-blueking-messages",onScrollPassive:p[0]||(p[0]=(...m)=>k.unref(s)&&k.unref(s)(...m))},[d.scrollLoading?(k.openBlock(),k.createElementBlock("svg",XO,KO)):k.createCommentVNode("v-if",!0),(k.openBlock(!0),k.createElementBlock(k.Fragment,null,k.renderList(d.messages,m=>(k.openBlock(),k.createElementBlock(k.Fragment,{key:m.content},[k.createVNode(qO,{class:"render-message",message:m},null,8,["message"]),k.createVNode(FO,{class:"render-message",message:m,"user-photo":d.userPhoto},null,8,["message","user-photo"])],64))),128))],32),k.createElementVNode("section",eP,[k.createElementVNode("span",tP,[k.createVNode(y1),k.createVNode(WO,{"is-show":d.loading,onStop:u},null,8,["is-show"])]),k.createElementVNode("section",nP,[k.createVNode(YO,{value:i.value,"onUpdate:value":p[1]||(p[1]=m=>i.value=m),placeholder:d.placeholder,prompts:d.prompts,onChoosePrompt:l,onEnter:c},null,8,["value","placeholder","prompts"]),k.withDirectives((k.openBlock(),k.createBlock(k.unref(UT),{class:"ai-operation-button",disabled:d.loading||!i.value,size:"large",theme:"primary",onClick:c},{default:k.withCtx(()=>[rP,k.createTextVNode(" "+k.toDisplayString(k.unref(He)("发送")),1)]),_:1},8,["disabled"])),[[k.unref(o),{content:k.unref(He)("内容正在执行中,请执行完成后再发送"),disabled:!d.loading}]])])])],4))}}),[["__scopeId","data-v-6cc6ac8a"]]),iP={class:"ai-modal-header-icon"},aP=Yr(k.defineComponent({__name:"render-modal",props:{headBackground:{default:"linear-gradient(267deg, #2dd1f4 0%, #1482ff 95%)"},positionLimit:{default:()=>({top:0,bottom:0,left:0,right:0})},sizeLimit:{default:()=>({height:320,width:400})},logo:{default:"ai-blueking-icon ai-blueking-ai"},name:{},startPosition:{default:()=>({top:window.innerHeight-560,bottom:0,left:window.innerWidth-400,right:0})}},emits:["clear","close"],setup(t,{emit:e}){const n=t,r=e,o=Ga,i={height:window.innerHeight,width:window.innerWidth},a={isMove:!1,type:"",clientX:0,clientY:0},s=()=>{var X,S,M,I;const V=(G,_)=>G===void 0?_:G;return{top:V((X=n.startPosition)==null?void 0:X.top,i.height-n.sizeLimit.height),bottom:V((S=n.startPosition)==null?void 0:S.bottom,0),left:V((M=n.startPosition)==null?void 0:M.left,0),right:V((I=n.startPosition)==null?void 0:I.right,i.width-n.sizeLimit.width)}},c=k.ref(s()),l=k.computed(()=>c.value.top<=n.positionLimit.top&&c.value.bottom<=n.positionLimit.bottom),u=V=>{a.isMove=!0,a.type="move",a.clientX=V.clientX,a.clientY=V.clientY},f=V=>{a.isMove=!0,a.type="rightDrag",a.clientX=V.clientX},d=V=>{a.isMove=!0,a.type="leftDrag",a.clientX=V.clientX},p=V=>{a.isMove=!0,a.type="topDrag",a.clientY=V.clientY},m=V=>{a.isMove=!0,a.type="bottomDrag",a.clientY=V.clientY},g=V=>{a.isMove=!0,a.type="topLeftDrag",a.clientY=V.clientY,a.clientX=V.clientX},w=V=>{a.isMove=!0,a.type="topRightDrag",a.clientY=V.clientY,a.clientX=V.clientX},h=V=>{a.isMove=!0,a.type="bottomLeftDrag",a.clientY=V.clientY,a.clientX=V.clientX},j=V=>{a.isMove=!0,a.type="bottomRightDrag",a.clientY=V.clientY,a.clientX=V.clientX},T=()=>{a.isMove=!1},J=(V,X)=>{["move","leftDrag"].includes(a.type)&&(c.value.left+=V),["move","rightDrag"].includes(a.type)&&(c.value.right-=V),["move","topDrag"].includes(a.type)&&(c.value.top+=X),["move","bottomDrag"].includes(a.type)&&(c.value.bottom-=X),["topLeftDrag"].includes(a.type)&&(c.value.left+=V,c.value.top+=X),["topRightDrag"].includes(a.type)&&(c.value.right-=V,c.value.top+=X),["bottomLeftDrag"].includes(a.type)&&(c.value.left+=V,c.value.bottom-=X),["bottomRightDrag"].includes(a.type)&&(c.value.right-=V,c.value.bottom-=X)},L=(V,X)=>{const{top:S,bottom:M,left:I,right:G}=c.value;(i.width-I-G<n.sizeLimit.width||I<n.positionLimit.left||G<n.positionLimit.right)&&(["move","leftDrag","topLeftDrag","bottomLeftDrag"].includes(a.type)&&(c.value.left-=V),["move","rightDrag","topRightDrag","bottomRightDrag"].includes(a.type)&&(c.value.right+=V)),(i.height-S-M<n.sizeLimit.height||S<n.positionLimit.top||M<n.positionLimit.bottom)&&(["move","topDrag","topRightDrag","topLeftDrag"].includes(a.type)&&(c.value.top-=X),["move","bottomDrag","bottomLeftDrag","bottomRightDrag"].includes(a.type)&&(c.value.bottom+=X))},N=V=>{if(!a.isMove)return;V.preventDefault();const X=V.clientX-a.clientX,S=V.clientY-a.clientY;J(X,S),L(X,S),a.clientX=V.clientX,a.clientY=V.clientY},Y=()=>{i.height=window.innerHeight,i.width=window.innerWidth,c.value=s()},q=()=>{c.value.top=n.positionLimit.top,c.value.bottom=n.positionLimit.bottom},te=()=>{c.value.top=i.height-n.sizeLimit.height,c.value.bottom=n.positionLimit.bottom},Q=()=>{r("clear")},U=()=>{r("close")};return k.onBeforeMount(()=>{window.addEventListener("mousemove",N,!0),window.addEventListener("mouseup",T),window.addEventListener("resize",Y)}),k.onBeforeUnmount(()=>{window.removeEventListener("mousemove",N,!0),window.removeEventListener("mouseup",T),window.removeEventListener("resize",Y)}),(V,X)=>(k.openBlock(),k.createElementBlock("section",{style:k.normalizeStyle({top:c.value.top+"px",bottom:c.value.bottom+"px",left:c.value.left+"px",right:c.value.right+"px"}),class:"ai-modal"},[k.createElementVNode("header",{style:k.normalizeStyle({background:V.headBackground}),class:"ai-modal-header",onMousedown:k.withModifiers(u,["stop"])},[k.createElementVNode("span",iP,[k.createElementVNode("i",{class:k.normalizeClass(V.logo)},null,2),k.createTextVNode(" "+k.toDisplayString(V.name||k.unref(He)("小鲸")),1)]),k.createElementVNode("span",null,[l.value?k.withDirectives((k.openBlock(),k.createElementBlock("i",{key:0,class:"ai-header-tool ai-blueking-icon ai-blueking-shangxiajuhe",onClick:te},null,512)),[[k.unref(o),{content:k.unref(He)("向下收缩"),distance:20}]]):k.withDirectives((k.openBlock(),k.createElementBlock("i",{key:1,class:"ai-header-tool ai-blueking-icon ai-blueking-shangxialashen-2",onClick:q},null,512)),[[k.unref(o),{content:k.unref(He)("向上扩展"),distance:20}]]),k.withDirectives(k.createElementVNode("i",{class:"ai-header-tool ai-blueking-icon ai-blueking-saoba",onClick:Q},null,512),[[k.unref(o),{content:k.unref(He)("清空聊天记录"),distance:20}]]),k.withDirectives(k.createElementVNode("i",{class:"ai-header-tool ai-blueking-icon ai-blueking-shanchu-2",onClick:U},null,512),[[k.unref(o),{content:k.unref(He)("关闭"),distance:20}]])])],36),k.renderSlot(V.$slots,"default",{},void 0,!0),k.createElementVNode("span",{class:"drag-line left",onMousedown:k.withModifiers(d,["stop"])},null,32),k.createElementVNode("span",{class:"drag-line right",onMousedown:k.withModifiers(f,["stop"])},null,32),k.createElementVNode("span",{class:"drag-line top",onMousedown:k.withModifiers(p,["stop"])},null,32),k.createElementVNode("span",{class:"drag-line bottom",onMousedown:k.withModifiers(m,["stop"])},null,32),k.createElementVNode("span",{class:"drag-line top-left-corner",onMousedown:k.withModifiers(g,["stop"])},null,32),k.createElementVNode("span",{class:"drag-line top-right-corner",onMousedown:k.withModifiers(w,["stop"])},null,32),k.createElementVNode("span",{class:"drag-line bottom-left-corner",onMousedown:k.withModifiers(h,["stop"])},null,32),k.createElementVNode("span",{class:"drag-line bottom-right-corner",onMousedown:k.withModifiers(j,["stop"])},null,32)],4))}}),[["__scopeId","data-v-e603010f"]]),sP=k.defineComponent({__name:"ai-blueking",props:{messages:{},prompts:{},loading:{type:Boolean},headBackground:{},background:{},positionLimit:{},sizeLimit:{},startPosition:{},userPhoto:{},name:{},placeholder:{},logo:{},scrollLoading:{type:Boolean},scrollLoadingEnd:{type:Boolean}},emits:["clear","close","scroll-load","stop","send","choose-prompt"],setup(t,{emit:e}){const n=e,r=()=>{n("clear")},o=()=>{n("close")},i=l=>{n("send",l)},a=()=>{n("stop")},s=()=>{n("scroll-load")},c=l=>{n("choose-prompt",l)};return(l,u)=>(k.openBlock(),k.createBlock(aP,{"head-background":l.headBackground,logo:l.logo,name:l.name,"position-limit":l.positionLimit,"size-limit":l.sizeLimit,"start-position":l.startPosition,onClear:r,onClose:o},{default:k.withCtx(()=>[k.createVNode(oP,{background:l.background,loading:l.loading,messages:l.messages,placeholder:l.placeholder,prompts:l.prompts,"scroll-loading":l.scrollLoading,"scroll-loading-end":l.scrollLoadingEnd,"user-photo":l.userPhoto,onChoosePrompt:c,onScrollLoad:s,onSend:i,onStop:a},null,8,["background","loading","messages","placeholder","prompts","scroll-loading","scroll-loading-end","user-photo"])]),_:1},8,["head-background","logo","name","position-limit","size-limit","start-position"]))}});(function(){var t='<svg xmlns="http://www.w3.org/2000/svg" data-name="ai-blueking" xmlns:xlink="http://www.w3.org/1999/xlink" style="position:absolute;width:0;height:0;visibility:hidden"><symbol id="ai-blueking-check-circle-fill" viewBox="0 0 1024 1024"><path fill="#737987" d="M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm-26.3 606.3l-181-181L350 444l135.8 135.8L712 353.5l45.3 45.3-271.6 271.5z"/></symbol><symbol id="ai-blueking-close-circle-fill" viewBox="0 0 1024 1024"><path fill="#737987" d="M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm158.4 561.1l-45.3 45.3L512 557.3 398.9 670.4l-45.3-45.3L466.7 512 353.6 398.9l45.3-45.3L512 466.7l113.1-113.1 45.3 45.3L557.3 512l113.1 113.1z"/></symbol><symbol id="ai-blueking-warning-circle-fill" viewBox="0 0 1024 1024"><path fill="#737987" d="M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm32 640h-64v-64h64v64zm0-128h-64V320h64v256z"/></symbol><symbol id="ai-blueking-loading-2" viewBox="0 0 1024 1024"><path d="M195.2 195.2a64 64 0 000 90.56l44.8 45.28A64 64 0 00331.04 240l-45.28-44.8a64 64 0 00-90.56 0z" opacity=".1"/><path d="M128 576h64a64 64 0 000-128h-64a64 64 0 000 128z" opacity=".15"/><path d="M285.76 828.8l45.28-44.8A64 64 0 00240 692.96l-44.8 45.28a64 64 0 0090.56 90.56z" opacity=".3"/><path d="M576 896v-64a64 64 0 00-128 0v64a64 64 0 00128 0z" opacity=".45"/><path d="M828.8 828.8a64 64 0 000-90.56L784 692.96A64 64 0 00692.96 784l45.28 45.28a64 64 0 0090.56-.48z" opacity=".6"/><path d="M896 448h-64a64 64 0 000 128h64a64 64 0 000-128z" opacity=".75"/><path d="M738.24 195.2L692.96 240A64 64 0 00784 331.04l45.28-45.28a64 64 0 10-90.56-90.56z" opacity=".9"/><path d="M448 128v64a64 64 0 00128 0v-64a64 64 0 00-128 0z"/></g></symbol><symbol id="ai-blueking-ai" viewBox="0 0 1024 1024"><path fill-rule="evenodd" d="M928 96v448l-1.211-.014C910.455 758.791 730.989 928 512 928 282.25 928 96 741.75 96 512S282.25 96 512 96h416zM488.911 320H379.544L256 672h84.05l23.292-71.909h137.215L523.342 672h87.088L488.911 320zM736 320h-79.494v352H736V320zm-303.797 66.88l47.594 148.343h-95.696l48.102-148.343z"/></symbol><symbol id="ai-blueking-fasong" viewBox="0 0 1024 1024"><path fill-rule="evenodd" d="M924.55 113.365c0-.09-.088-.09-.088-.18a30.217 30.217 0 00-7.78-9.684 31.929 31.929 0 00-10.606-5.918c-.089 0-.177-.09-.266-.09-1.502-.537-3.093-.806-4.685-1.075-.442-.09-.884-.27-1.414-.27-1.503-.179-2.917-.179-4.42-.09-.618 0-1.149-.089-1.768 0-4.242.27-8.485 1.525-12.375 3.498L113.792 485.577c-7.514 3.677-13.26 10.312-15.911 18.382-.796 2.242-1.15 4.663-1.415 6.994-.795 4.753-.618 9.685.884 14.347 2.475 8.16 8.044 14.885 15.558 18.741l194.734 103.836c4.685 2.51 9.812 3.766 15.115 3.766 11.757.09 22.541-6.367 28.287-16.768 8.397-15.513 2.475-34.791-13.083-43.13l-142.316-75.86 572.358-288.014L418.93 634.516c-.265.27-.354.628-.619.897-8.662 5.739-14.32 15.423-14.32 26.542v234.123a32.598 32.598 0 009.547 22.686c6.01 6.008 14.143 9.236 22.54 9.146v.09c17.68 0 32-14.257 32-31.832V675.405l381.07-444.127-79.202 585.802-200.921-97.917c-15.823-7.712-34.828-1.255-42.872 14.526-3.712 7.622-4.243 16.41-1.503 24.48s8.575 14.615 16.177 18.202l238.754 116.48c4.42 2.151 9.193 3.227 14.144 3.227.176 0 .353-.09.53-.09.53 0 1.15.18 1.68.18 15.91.09 29.435-11.657 31.733-27.618l99.003-731.782c2.21-7.532 1.767-15.871-2.122-23.403z"/></symbol><symbol id="ai-blueking-shangxialashen-2" viewBox="0 0 1024 1024"><path fill-rule="evenodd" d="M510.24 64L352 251.52l127.168-.672.928 223.968h.352l.832 298.656-127.168.736L513.792 960 672 772.448l-127.136.704-.928-320h-.384l-.8-202.656 127.168-.704z"/></symbol><symbol id="ai-blueking-shangxiajuhe" viewBox="0 0 1024 1024"><path fill-rule="evenodd" d="M510.24 384L352 192l317.92 1.77L510.24 384zm1.44 256l158.24 192L352 830.23 511.68 640zM128 480h768v64H128z"/></symbol><symbol id="ai-blueking-shanchu-2" viewBox="0 0 1024 1024"><path fill-rule="evenodd" d="M832 259.2L764.8 192 512 444.8 259.2 192 192 259.2 444.8 512 192 764.8l67.2 67.2L512 579.2 764.8 832l67.2-67.2L579.2 512z"/></symbol><symbol id="ai-blueking-saoba" viewBox="0 0 1024 1024"><path fill-rule="evenodd" d="M566.857 64C607.253 64 640 92.654 640 128v96h256c35.346 0 64 28.654 64 64v96c0 35.346-28.654 64-64 64h-5.818v332.453l21.56 102.356c7.284 34.587-14.848 68.532-49.436 75.817a64 64 0 01-13.19 1.374H175.262c-35.346 0-64-28.654-64-64a64 64 0 011.436-13.484l21.12-97.989V448H128c-35.346 0-64-28.654-64-64v-96c0-35.346 28.654-64 64-64h256v-96c0-35.346 32.747-64 73.143-64h109.714zm259.325 384H197.818v343.346l-1.436 6.665L175.262 896H320V704c0-17.673 14.327-32 32-32 17.673 0 32 14.327 32 32v192h96V704c0-17.673 14.327-32 32-32 17.673 0 32 14.327 32 32v192h96V704c0-17.673 14.327-32 32-32 17.673 0 32 14.327 32 32v192h145.115l-21.559-102.356-1.374-6.524V448zM896 288H128v96h768v-96zM566.857 128H457.143v96h109.714v-96z"/></symbol><symbol id="ai-blueking-quanquan" viewBox="0 0 1024 1024"><path fill="#3A84FF" d="M512 64.129c-9.343-.661-18.345 3.338-27.005 11.998-2.666 2.667-4.831 6.165-6.495 10.495-1.664 4.33-2.496 7.498-2.496 9.503v4c0 10.004 2.997 18.003 8.991 23.997 3.328 4.01 7.327 6.847 11.999 8.511 4.671 1.664 8.34 2.496 11.006 2.496h4c68.003 0 130.993 16.83 188.97 50.49 57.978 33.66 103.807 79.49 137.489 137.488 33.681 57.999 50.511 121.16 50.49 189.483-.021 68.322-16.851 131.313-50.49 188.97-33.64 57.657-79.469 103.316-137.489 136.976-58.02 33.66-121.18 50.49-189.482 50.49-68.301 0-131.292-16.83-188.97-50.49-57.68-33.66-103.338-79.319-136.977-136.976-33.639-57.657-50.469-120.818-50.49-189.482 0-10.005-3.669-18.676-11.007-26.013-2.666-3.328-6.164-5.824-10.494-7.487-4.33-1.664-7.498-2.496-9.503-2.496h-4c-10.004 0-18.334 3.338-24.99 10.015-4.01 4.01-6.846 8.18-8.51 12.51-1.664 4.33-2.496 7.498-2.496 9.503v4c0 60.665 11.828 118.663 35.484 173.996 23.656 55.332 55.482 102.996 95.477 142.991 39.996 39.996 87.66 71.822 142.992 95.478 55.332 23.656 113.33 35.483 173.996 35.483 60.665 0 118.664-11.827 173.996-35.483 55.332-23.656 102.996-55.482 142.992-95.478 39.995-39.995 71.82-87.659 95.477-142.991 23.656-55.333 35.484-113.331 35.484-173.996 0-60.665-11.828-118.664-35.484-173.996-23.656-55.333-55.482-102.997-95.477-142.992-39.996-39.996-87.66-71.821-142.992-95.477C630.664 75.989 572.666 64.16 512 64.16v-.032z"/></symbol><symbol id="ai-blueking-xiangxia-2" viewBox="0 0 1024 1024"><path fill-rule="evenodd" d="M176 617.6l92.8-89.6 182.4 179.2V112h121.6v595.2L755.2 528l92.8 89.6L512 944 176 617.6z" clip-rule="evenodd"/></symbol><symbol id="ai-blueking-tingzhi" viewBox="0 0 1024 1024"><path fill="#fdd" d="M256 256h512v512H256V256z"/><path fill="#ea3636" d="M128 128v768h768V128H128zm640 640H256V256h512v512z"/></symbol></svg>';document.body?document.body.insertAdjacentHTML("afterbegin",t):document.addEventListener("DOMContentLoaded",function(){document.body.insertAdjacentHTML("afterbegin",t)})})();class cP{constructor(e,n,r,o,i){sr(this,"controllerMap");sr(this,"handleEnd");sr(this,"handleError");sr(this,"handleReceiveMessage");sr(this,"handleStart");sr(this,"url");this.url=e,this.handleStart=n,this.handleReceiveMessage=r,this.handleEnd=o,this.handleError=i,this.controllerMap={}}stop(e){var n,r;return(r=(n=this.controllerMap[e])==null?void 0:n.abort)==null||r.call(n),this.handleEnd(e)}async stream(e,n,r){const o=new AbortController;this.controllerMap[n]=o,fetch(this.url,{method:"post",signal:o.signal,headers:{"Content-Type":"application/json",...r},mode:"cors",credentials:"include",body:JSON.stringify(e)}).then(async i=>{const a=i.body.pipeThrough(new window.TextDecoderStream).getReader();for(;;)try{const{value:s,done:c}=await a.read();if(!i.ok){this.handleError(s||i.statusText,i.status,n);break}if(c)break;s.toString().split(`
|
|
270
270
|
`).forEach(u=>{const f=u.replace("data:","").trim();if(f1(f)){const{event:d,content:p,result:m,code:g,message:w}=JSON.parse(f);if(m===!1||i.status!==200){this.handleError(w,g,n);return}switch(d){case"text":this.handleReceiveMessage(p,n);break;case"done":this.handleEnd(n);break;case"error":this.handleError(w,g,n);break}}})}catch(s){(s==null?void 0:s.code)!==20&&this.handleError(s.message,s.code,n);break}}).catch(i=>{(i==null?void 0:i.code)!==20&&this.handleError(i.message,i.code,n)}),await this.handleStart(n)}}return Qk({prefix:"ai-blueking"}),Mt.ChatHelper=cP,Mt.MessageStatus=Ii,Mt.RoleType=vl,Mt.default=sP,Object.defineProperties(Mt,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}}),Mt}({},Vue);
|