text: const generateRandomKey=MarkUp.generateRandomKey;MarkUp.addExtension({name:"LaTeX",parse:(a,g,i)=>{i[MarkUp.SymHidden]=i[MarkUp.SymHidden]||{};var r=!1;return a=a.replace(/(\\+)\$/g,(t,n)=>{var e=Math.floor(n.length/2),s="",u="%"+MarkUp.PreserveWords["\\"]+"%";for(let f=0;f<e;f++)s+=u;if(e*2!==n.length){let f=MarkUp.PreserveWords.$;s+="%"+f+"%"}else s+="$";return r=!0,s}),a=a.replace(/\$([\w\W]+?)\$/g,(t,n)=>{if(t.indexOf("$$")>=0)return t;var e="latex-"+generateRandomKey();return i[MarkUp.SymHidden][e]='<span class="latex inline">$'+n+"$</span>",r=!0,"%"+e+"%"}),[a,r]}},0,-1),MarkUp.addExtension({name:"FontAwesome",parse:(a,g,i)=>{var r=!1;return a=a.replace(/:([\w\-\.]+?):/g,(t,n,e)=>(n=n.trim(),r=!0,'<i class="fas far fa-'+n+'"></i>')),[a,r]}},0,3),MarkUp.addExtension({name:"HyperLinks",parse:(a,g,i)=>{g.links=g.links||[];var r=!1;return a=a.replace(/([!@#]?)\[([\w %'"\*_\^\|~\-\.\+=·,;:\?!\\\/&\u0800-\uffff]*?)\] *\((\@?[\w\W]*?)\)/g,(t,n,e,s,u)=>{if(s=s.trim(),s.length===0||i[e])return t;if(n===""){g.links.push([e,s]);let f=s.substr(0,1),o=f==="@",l=MarkUp.parseLine(e,g,3,i),h="link-"+generateRandomKey(),d='<a href="';return o?d=d+"#"+s.substr(1,s.length)+'">':s.indexOf("@")>1?d=d+"mailto:"+s+'">':f==="."||f==="\\"||f==="/"||f==="#"?d=d+s+'">':d=d+s+'" target="_blank">',d=d+l+"</a>",i[h]=d,r=!0,"%"+h+"%"}return t}),[a,r]}},0,3),MarkUp.addExtension({name:"AnchorAndTerm",parse:(a,g,i)=>{var r=!1;return a=a.replace(/\[([\w %'"\-\.\+=,;:\?!\\\/&\u0800-\uffff]*?)\] *\{([\w \-\.]+?)\}/g,(t,n,e,s)=>{if(e=e.trim(),n=n.trim(),e.length===0||n.length===0||i[n])return t;var u;if(n=MarkUp.parseLine(n,g,3,i),g.refs[e]){u="term-"+generateRandomKey(),g.termList=g.termList||[],g.termList.push([e,n]),g.termList[e]=n;let f='<a class="terminology" name="'+e+'" href="#ref-'+e+'"><strong>'+n+"</strong></a>";i[u]=f}else{u="anchor-"+generateRandomKey();let f='<a name="'+e+'">'+n+"</a>";i[u]=f}return r=!0,"%"+u+"%"}),[a,r]}},0,3),MarkUp.addExtension({name:"Code",parse:(a,g,i)=>{i[MarkUp.SymHidden]=i[MarkUp.SymHidden]||{};var r=!1;return a=a.replace(/`([\w\W]+?)`/g,(t,n)=>{if(t.indexOf("``")>=0)return t;var e="code-"+generateRandomKey();return i[MarkUp.SymHidden][e]="<code>"+n+"</code>",r=!0,"%"+e+"%"}),[a,r]}}),MarkUp.addExtension({name:"BoldAndItalic",parse:(a,g,i)=>{var r=[];if(a.replace(/\*+/g,(s,u)=>{r.push([u,s.length])}),r.length<2)return[a,!1];var t=(s,u,f)=>{var o=a.substring(s,u+(f?2:1)),l;f?l=o.substring(2,o.length-2):l=o.substring(1,o.length-1);var h=(f?"strong":"em")+"-"+generateRandomKey();l=MarkUp.parseLine(l,g,5,i),f?i[h]="<strong>"+l+"</strong>":i[h]="<em>"+l+"</em>",h="%"+h+"%",a=a.replace(o,h)},n=r[0][1],e=r[1][1];if(n<3){if(n===e)return t(r[0][0],r[1][0],n===2),[a,!0];if(e<3){let s=r[2];return s?(s=s[1],s<3?e===s?(t(r[1][0],r[2][0],e===2),[a,!0]):n===s?(t(r[0][0],r[2][0],n===2),[a,!0]):[a,!1]:(t(r[1][0],r[2][0],e===2),[a,!0])):n>e?(t(r[0][0]+1,r[1][0],!1),[a,!0]):(t(r[0][0],r[1][0],!1),[a,!0])}else return t(r[0][0],r[1][0],n===2),[a,!0]}else return e<3?e===1?(t(r[0][0]+n-1,r[1][0],!1),[a,!0]):(t(r[0][0]+n-2,r[1][0],!0),[a,!0]):(t(r[0][0],r[1][0]+e-2,!0),[a,!0]);return[a,!1]}}),MarkUp.addExtension({name:"SubAndUnderline",parse:(a,g,i)=>{var r=[];if(a.replace(/_+/g,(s,u)=>{r.push([u,s.length])}),r.length<2)return[a,!1];var t=(s,u,f)=>{var o=a.substring(s,u+(f?2:1)),l;f?l=o.substring(2,o.length-2):l=o.substring(1,o.length-1);var h=(f?"underline":"sub")+"-"+generateRandomKey();l=MarkUp.parseLine(l,g,5,i),f?i[h]="<u>"+l+"</u>":i[h]="<sub>"+l+"</sub>",h="%"+h+"%",a=a.replace(o,h)},n=r[0][1],e=r[1][1];if(n<3){if(n===e)return t(r[0][0],r[1][0],n===2),[a,!0];if(e<3){let s=r[2];return s?(s=s[1],s<3?e===s?(t(r[1][0],r[2][0],e===2),[a,!0]):n===s?(t(r[0][0],r[2][0],n===2),[a,!0]):[a,!1]:(t(r[1][0],r[2][0],e===2),[a,!0])):n>e?(t(r[0][0]+1,r[1][0],!1),[a,!0]):(t(r[0][0],r[1][0],!1),[a,!0])}else return t(r[0][0],r[1][0],n===2),[a,!0]}else return e<3?e===1?(t(r[0][0]+n-1,r[1][0],!1),[a,!0]):(t(r[0][0]+n-2,r[1][0],!0),[a,!0]):(t(r[0][0],r[1][0]+e-2,!0),[a,!0]);return[a,!1]}}),MarkUp.addExtension({name:"WavyAndDelete",parse:(a,g,i)=>{var r=[];if(a.replace(/~+/g,(s,u)=>{r.push([u,s.length])}),r.length<2)return[a,!1];var t=(s,u,f)=>{var o=a.substring(s,u+(f?2:1)),l;f?l=o.substring(2,o.length-2):l=o.substring(1,o.length-1);var h=(f?"delete":"wavy")+"-"+generateRandomKey();l=MarkUp.parseLine(l,g,5,i),f?i[h]="<del>"+l+"</del>":i[h]='<span class="text-wavy">'+l+"</span>",h="%"+h+"%",a=a.replace(o,h)},n=r[0][1],e=r[1][1];if(n<3){if(n===e)return t(r[0][0],r[1][0],n===2),[a,!0];if(e<3){let s=r[2];return s?(s=s[1],s<3?e===s?(t(r[1][0],r[2][0],e===2),[a,!0]):n===s?(t(r[0][0],r[2][0],n===2),[a,!0]):[a,!1]:(t(r[1][0],r[2][0],e===2),[a,!0])):n>e?(t(r[0][0]+1,r[1][0],!1),[a,!0]):(t(r[0][0],r[1][0],!1),[a,!0])}else return t(r[0][0],r[1][0],n===2),[a,!0]}else return e<3?e===1?(t(r[0][0]+n-1,r[1][0],!1),[a,!0]):(t(r[0][0]+n-2,r[1][0],!0),[a,!0]):(t(r[0][0],r[1][0]+e-2,!0),[a,!0]);return[a,!1]}}),MarkUp.addExtension({name:"SupAndLarger",parse:(a,g,i)=>{var r=(n,e,s)=>{var u=a.substring(n,e+s),f=u.substring(s,u.length-s),o="larger-"+s+"-"+generateRandomKey();f=MarkUp.parseLine(f,g,5,i),s<=1?i[o]="<sup>"+f+"</sup>":i[o]='<span class="text-larger level-'+(s-1)+'">'+f+"</span>",o="%"+o+"%",a=a.replace(u,o)},t=!1;return a.replace(/(\^+)([\w\W]+?)(\^+)/,(n,e,s,u,f)=>{var o=s.match(/(\\*)\[/);if(o){let l=o[1].length;if(l>>1<<1===l)return n}return e=e.length,u=u.length,e>u?r(f+e-u,f+n.length-u,u):r(f,f+n.length-u,e),t=!0,n}),[a,t]}}),MarkUp.addExtension({name:"Color",parse:(a,g,i)=>{var r=!1;return a=a.replace(/\[(\w+)\]([\w\W]+?)\[\/\]/,(t,n,e,s)=>{if(e.length===0)return t;e=MarkUp.parseLine(e,g,5,i);var u="color-"+generateRandomKey();return i[u]='<span class="color-'+n+'">'+e+"</span>",r=!0,"%"+u+"%"}),[a,r]}},0,6),MarkUp.addExtension({name:"FootnoteAndEndnote",parse:(a,g,i)=>{var r=!1;return a=a.replace(/(\[([\w %'"\-\.\+=,;:\?!\\\/&\u0800-\uffff]*?)\])?\[([\^:])([\w \-\.]+?)\]/g,(t,n,e="",s,u)=>{if(u=u.trim(),u.length===0||!g.refs[u])return t;var f='<a class="notemark" type="';if(s==="^"?f+='endnote" href="#endnote-'+u:f+="footnote",f+='" name="'+u+'">',e&&(f=f+MarkUp.parseLine(e,g,6,i)),f+="<sup>",s==="^"){g.endnotes=g.endnotes||[];let l=g.endnotes.indexOf(u);l<0&&(l=g.endnotes.length,g.endnotes.push(u)),l++,f+="("+l+")"}else{g.footnotes=g.footnotes||[];let l=g.footnotes.indexOf(u);l<0&&(l=g.footnotes.length,g.footnotes.push(u)),f+="[%%FN-"+l+"%%]"}f+="</sup></a>";var o="notemark-"+generateRandomKey();return i[o]=f,"%"+o+"%"}),[a,r]}},0,6),MarkUp.addExtension({name:"Images",parse:(a,g,i)=>{var r=!1;return a=a.replace(/([!@#])\[([^\n]*?)\] *\((\@?[\w\W]*?)\)/g,(t,n,e,s,u)=>{if(s=s.trim(),s.length===0)return t;var f=s.match(/[ 　\t]+"(left|right)"/);f&&(s=s.replace(f[0],""),f=f[1]);var o="image";n==="@"?o="video":n==="#"&&(o="audio"),g[o]=g[o]||[],g[o].push([e,s]);var l='<div class="resource '+o;f&&(l+=" float-"+f),l+='">',l+="<figure>",n==="!"?l+='<img src="'+s+'">':n==="@"?l+='<video src="'+s+'" controls>\u4F60\u7684\u6D4F\u89C8\u5668\u4E0D\u652F\u6301 <code>video</code> \u6807\u7B7E.</video>':n==="#"&&(l+='<audio src="'+s+'" controls>\u4F60\u7684\u6D4F\u89C8\u5668\u4E0D\u652F\u6301 <code>audio</code> \u6807\u7B7E.</audio>'),l+="</figure>",l+="<figcaption>"+e+"</figcaption>",l+="</div>";var h=o+"-"+generateRandomKey();return i[h]=l,r=!0,"%"+h+"%"}),[a,r]}},0,7),MarkUp.addExtension({name:"InlineLinks",parse:(a,g,i)=>{var r=!1;return g.mainParser?(a=a.replace(/https?:\/\/[\w\-\+=\.;\?\\\/%]+/gi,(t,n)=>{g.links.push([t,t]);var e='<a href="'+t+'" target="_blank">'+t+"</a>",s="link-"+generateRandomKey();return i[s]=e,r=!0,"%"+s+"%"}),[a,r]):[a,r]}},0,8),MarkUp.addExtension({name:"Chart",parse:(a,g,i)=>{var r=!1;return a=a.replace(/^[ 　\t]*CHART\((.*?)\):(.*?):(.*?)(:(.*?))?(:(.*?))?[ 　\t]*$/,(t,n,e,s,u,f,o,l)=>{var h="CHART-"+MarkUp.generateRandomKey();return g.charts=g.charts||{},a=a||"",g.charts[h]={table:n,style:e,title:s,lines:f,params:l},r=!0,"[%"+h+"%]"}),a=a.replace(/^[ 　\t]*ANIMATE\((.*?)\):(.*?):(.*?)(:(.*?))?(:(.*?))?[ 　\t]*$/,(t,n,e,s,u,f,o,l)=>{var h="ANIMATE-"+MarkUp.generateRandomKey();return g.animates=g.animates||{},a=a||"",g.animates[h]={table:n,style:e,title:s,lines:f,params:l},r=!0,"[%"+h+"%]"}),[a,r]}},0,-1),MarkUp.addExtension({name:"Chart",parse:(a,g)=>(a=a.replace(/<[pP]>\[%(CHART-.*?)%\]<\/[pP]>/g,(i,r)=>{var{table:t,title:n,style:e,lines:s,params:u}=g.charts[r]||{},f=generateChart[e];if(!f)return'<font color="red">\u6240\u9009\u56FE\u8868\u6837\u5F0F\uFF08'+e+"\uFF09\u4E0D\u5B58\u5728\uFF01</font>";var o=g.tables[t];if(!o)return'<font color="red">\u6240\u9009\u56FE\u8868\uFF08'+t+"\uFF09\u4E0D\u5B58\u5728\uFF01</font>";s=getDatum(o,s);var l='<div class="table-chart"><svg width="'+SVGDefaultSize+'" height="'+SVGDefaultSize+'" viewbox=" 0 0 '+SVGDefaultSize+" "+SVGDefaultSize+'">';return l+=f(s,n,u),l+="</svg></div>",l}),a=a.replace(/<[pP]>\[%(ANIMATE-.*?)%\]<\/[pP]>/g,(i,r)=>{var{table:t,title:n,style:e,lines:s,params:u}=g.animates[r]||{},f=generateAnimate[e];if(!f)return'<font color="red">\u6240\u9009\u52A8\u753B\u56FE\u8868\u6837\u5F0F\uFF08'+e+"\uFF09\u4E0D\u5B58\u5728\uFF01</font>";var o=g.tables[t];if(!o)return'<font color="red">\u6240\u9009\u52A8\u753B\u56FE\u8868\uFF08'+t+"\uFF09\u4E0D\u5B58\u5728\uFF01</font>";s=getDatum(o,s,!1);var l=f(s,n,u);return l}),a)},2,-1);const SVGDefaultSize=600,SVGLineColors=["rgb(21, 85, 154)","rgb(18, 161, 130)","rgb(210, 177, 22)","rgb(255, 153, 0)","rgb(242, 107, 31)","rgb(244, 62, 6)","rgb(149, 28, 72)","rgb(126, 32, 101)","rgb(86, 152, 195)","rgb(41, 183, 203)","rgb(131, 203, 172)","rgb(150, 194, 78)","rgb(210, 217, 122)","rgb(183, 174, 143)","rgb(193, 101, 26)","rgb(100, 72, 61)","rgb(189, 174, 173)","rgb(227, 180, 184)","rgb(215, 196, 187)","rgb(190, 194, 63)","rgb(110, 117, 164)","rgb(46, 169, 223)"],SVGDefaultFillOpacity=.4,getDatum=(a,g,i=!0)=>{var r="",t=!0;if(!g||g==="all"){t=!1;let e=a[0].length;g=[];for(let s=1;s<e;s++)g.push([0,s])}else if(g==="reverse"){t=!0;let e=a.length;g=[];for(let s=1;s<e;s++)g.push([0,s])}else g=g.split(","),g=g.map(e=>{if(e=e.split("-"),e.length>=2){r=e[0];let s=r*1;isNaN(s)?(t=!0,s=parseInt(r.split("").map(u=>MarkUp.Char2Dig[u.toLowerCase()]||u).join(""),26),r=s):(t=!1,r=s),e[0]=r,e.splice(2,e.length-2)}else e.length===1&&(e[1]=e[0],e[0]=r);return e}).filter(e=>e.length===2),g.forEach(e=>{var s=e[1],u=s*1;isNaN(u)&&(u=parseInt(s.split("").map(f=>MarkUp.Char2Dig[f.toLowerCase()]||f).join(""),26)),e[1]=u});var n=[];return t?g.forEach(([e,s])=>{var u=a.length,f=[];for(let o=0;o<u;o++){let l=a[o][s]||"",h=l*1;(l.length===0||isNaN(h))&&(i?h=0:h=l),f.push([a[o][e],h])}f.length>0&&n.push(f)}):g.forEach(([e,s])=>{if(e=a[e],s=a[s],!(!e||!s)){var u=e.length,f=[];for(let o=0;o<u;o++){let l=s[o]||"",h=l*1;(l.length===0||isNaN(h))&&(i?h=0:h=l),f.push([e[o],h])}f.length>0&&n.push(f)}}),n},generateChart={_drawText(a,g,i,r="black",t=!1){var n='<text x="'+a+'" y="'+g+'"';return r&&(n+=' fill="'+r+'"'),t&&(n+=' font-weight="bold"'),n+=">"+i+"</text>",n},_drawLine(a,g,i,r,t,n="black"){var e='<line x1="'+a+'" y1="'+g+'" x2="'+i+'" y2="'+r+'"';return!!n&&!!t&&(e+=' stroke="'+n+'" stroke-width="'+t+'"'),e+=" />",e},_drawRect(a,g,i,r,t,n,e){i<0&&(a+=i,i=-i),r<0&&(g+=r,r=-r);var s='<rect x="'+a+'" y="'+g+'" width="'+i+'" height="'+r+'"';return t&&(s+=' fill="'+t+'"'),!!n&&!!e&&(s+=' stroke="'+n+'" stroke-width="'+e+'"'),s+=" />",s},_drawCircle(a,g,i,r,t,n){var e='<circle cx="'+a+'" cy="'+g+'" r="'+i+'"';return r&&(e+=' fill="'+r+'"'),!!t&&!!n&&(e+=' stroke="'+t+'" stroke-width="'+n+'"'),e+=" />",e},_drawPolygon(a,g,i,r){a=a.map(n=>n.join(",")).join(" ");var t='<polygon points="'+a+'"';return g&&(t+=' fill="'+g+'"'),!!i&&!!r&&(t+=' stroke="'+i+'" stroke-width="'+r+'"'),t+=" />",t},_background(a,g,i,r=!1,t=!1){var n=Infinity,e=0,s=Infinity,u=0,f=[],o,l;i?(a.forEach(p=>{p.forEach(x=>{var v=x[0]*1;isNaN(v)&&(v=0),x[0]=v,v>e&&(e=v),v<n&&(n=v),f.includes(v)||f.push(v)})}),f.sort((p,x)=>p-x)):(a.forEach(p=>{p.forEach(x=>{var v=x[0];f.includes(v)||f.push(v)})}),n=0,e=f.length);var h=n,d=e;if(n===e)n-=.5,e+=.5,o=.1;else{let p=e-n;p*=.05,n-=p,e+=p,o=p/5}a.forEach(p=>{p.forEach(x=>{var v=x[1];v>u&&(u=v),v<s&&(s=v)})}),r&&(s>0&&(s=0),u<0&&(u=0));var m=s,c=u;s===u?(s-=.5,u+=.5,l=.1):(delta=u-s,delta*=.05,s-=delta,u+=delta,l=delta/5);var y=[generateChart._drawRect(0,0,SVGDefaultSize,SVGDefaultSize,"white")];if(y.push(generateChart._drawText(SVGDefaultSize/2-g.length*16/2,16+1,g,"black",!0)),t)return[y.join(""),{xmin:n,xmax:e,ymin:s,ymax:u,xfrom:h,xto:d,yfrom:m,yto:c,sets:f}];if(y.push(generateChart._drawLine((h-n)/(e-n)*SVGDefaultSize,(u-m)/(u-s)*SVGDefaultSize,(d-n)/(e-n)*SVGDefaultSize,(u-m)/(u-s)*SVGDefaultSize,1)),y.push(generateChart._drawLine((h-n)/(e-n)*SVGDefaultSize,(u-m)/(u-s)*SVGDefaultSize,(h-n)/(e-n)*SVGDefaultSize,(u-c)/(u-s)*SVGDefaultSize,1)),i)f.forEach(p=>{y.push(generateChart._drawLine((p-n)/(e-n)*SVGDefaultSize,(u-m)/(u-s)*SVGDefaultSize,(p-n)/(e-n)*SVGDefaultSize,(u-m+l)/(u-s)*SVGDefaultSize,1));var x=p+"",v=x.length*8/2;y.push(generateChart._drawText((p-n)/(e-n)*SVGDefaultSize-v,(u-m+l*1.5)/(u-s)*SVGDefaultSize+16,p))});else{let p=(d-h)/(f.length+1);f.forEach((x,v)=>{var b=((v+1)*p-n)/(e-n)*SVGDefaultSize;y.push(generateChart._drawLine(b,(u-m)/(u-s)*SVGDefaultSize,b,(u-m+l)/(u-s)*SVGDefaultSize,1));var k=x.length*8/SVGDefaultSize/2*SVGDefaultSize;y.push(generateChart._drawText(b-k,(u-m+l*1.5)/(u-s)*SVGDefaultSize+16,x))})}return[y.join(""),{xmin:n,xmax:e,ymin:s,ymax:u,xfrom:h,xto:d,yfrom:m,yto:c,sets:f}]},points(a,g){var[i,r]=generateChart._background(a,g,!0);return i=[i],a.forEach((t,n)=>{n-=Math.floor(n/SVGLineColors.length)*SVGLineColors.length,n=SVGLineColors[n],t.forEach(e=>{i.push(generateChart._drawCircle((e[0]-r.xmin)/(r.xmax-r.xmin)*SVGDefaultSize,(r.ymax-e[1])/(r.ymax-r.ymin)*SVGDefaultSize,2.5,n))})}),i.join("")},lines(a,g){var[i,r]=generateChart._background(a,g,!0);return i=[i],a.forEach((t,n)=>{n-=Math.floor(n/SVGLineColors.length)*SVGLineColors.length,n=SVGLineColors[n],t.sort((u,f)=>u[0]-f[0]);var e=0,s=0;t.forEach((u,f)=>{var o=(u[0]-r.xmin)/(r.xmax-r.xmin)*SVGDefaultSize,l=(r.ymax-u[1])/(r.ymax-r.ymin)*SVGDefaultSize;i.push(generateChart._drawCircle(o,l,2.5,n)),f>0&&i.push(generateChart._drawLine(e,s,o,l,1,n)),e=o,s=l})}),i.join("")},area(a,g,i){i=(i||"").toLowerCase(),i==="true"||i==="yes"?i=!0:i=!1;var[r,t]=generateChart._background(a,g,!0,i);return r=[r],a.forEach((n,e)=>{e-=Math.floor(e/SVGLineColors.length)*SVGLineColors.length,e=SVGLineColors[e],n.sort((f,o)=>f[0]-o[0]);var s=[];i?(s.push([(t.xto-t.xmin)/(t.xmax-t.xmin)*SVGDefaultSize,(t.ymax-0)/(t.ymax-t.ymin)*SVGDefaultSize]),s.push([(t.xfrom-t.xmin)/(t.xmax-t.xmin)*SVGDefaultSize,(t.ymax-0)/(t.ymax-t.ymin)*SVGDefaultSize])):(s.push([(t.xto-t.xmin)/(t.xmax-t.xmin)*SVGDefaultSize,(t.ymax-t.yfrom)/(t.ymax-t.ymin)*SVGDefaultSize]),s.push([(t.xfrom-t.xmin)/(t.xmax-t.xmin)*SVGDefaultSize,(t.ymax-t.yfrom)/(t.ymax-t.ymin)*SVGDefaultSize])),n.forEach((f,o)=>{var l=(f[0]-t.xmin)/(t.xmax-t.xmin)*SVGDefaultSize,h=(t.ymax-f[1])/(t.ymax-t.ymin)*SVGDefaultSize;r.push(generateChart._drawCircle(l,h,2.5,e)),s.push([l,h])});var u=e.replace(/rgb/i,"rgba").replace(")",","+SVGDefaultFillOpacity+")");r.push(generateChart._drawPolygon(s,u,e,1))}),r.join("")},pie(a,g){var[i,r]=generateChart._background(a,g,!1,!1,!0),t=0;a.forEach(f=>{var o=0;f.forEach(l=>{l[1]<=0||(o+=l[1])}),o>t&&(t=o)});var n=SVGDefaultSize/2*.9,e=a.length+(a.length-1)*.1,s=0,u=n/e;return i=[i],a.forEach((f,o)=>{var l=(o+1+o*.1)*u,h=SVGDefaultSize/2-l,d=SVGDefaultSize/2,m=SVGDefaultSize/2-s,c=SVGDefaultSize/2,y=0;f.forEach((p,x)=>{if(!(p[1]<=0)){var v=x-Math.floor(x/SVGLineColors.length)*SVGLineColors.length;v=SVGLineColors[v],y+=p[1];var b=p[1]*2>t?1:0,k=y/t*Math.PI*2,M=Math.sin(k),w=Math.cos(k),E=SVGDefaultSize/2-w*l,U=SVGDefaultSize/2-M*l,L=SVGDefaultSize/2-w*s,_=SVGDefaultSize/2-M*s;i.push('<path fill="'+v+'" d="M '+m+" "+c+" L "+h+" "+d+" A "+l+" "+l+" 0 "+b+" 1 "+E+" "+U+" L "+L+" "+_+" A "+s+" "+s+" 0 "+b+" 0 "+m+" "+c+' Z" />'),h=E,d=U,m=L,c=_}}),s=l+.1*u}),i},column(a,g,i){i=(i||"").toLowerCase(),i==="true"||i==="yes"?i=!0:i=!1;var[r,t]=generateChart._background(a,g,!1,i);r=[r];var n=(t.xto-t.xfrom)/(t.sets.length+1),e=n/(a.length+2)/(t.xmax-t.xmin)*SVGDefaultSize,s=e*a.length/2,u;return i?u=(t.ymax-0)/(t.ymax-t.ymin)*SVGDefaultSize:u=(t.ymax-t.yfrom)/(t.ymax-t.ymin)*SVGDefaultSize,a.forEach((f,o)=>{var l=o-Math.floor(o/SVGLineColors.length)*SVGLineColors.length;l=SVGLineColors[l];var h=e*o-s;f.forEach((d,m)=>{var c=t.sets.indexOf(d[0]);if(!(c<0)){var y=((c+1)*n-t.xmin)/(t.xmax-t.xmin)*SVGDefaultSize+h,p=(t.ymax-d[1])/(t.ymax-t.ymin)*SVGDefaultSize;r.push(generateChart._drawRect(y,p,e,u-p,l))}})}),r.join("")}},generateAnimate={barsanime(a,g,i){i=i.split(",").map(f=>f*1);var[r,t,n]=i;isNaN(r)&&(r=3),isNaN(t)&&(t=500),isNaN(n)&&(n=-1);var e=[!0];a.forEach(f=>{var o=f.map((l,h)=>[...l,h]);o.sort((l,h)=>h[1]-l[1]),o.length>r&&o.splice(r,o.length-r),o.forEach(l=>e[l[2]]=!0)}),a=a.map(f=>f.filter((o,l)=>e[l]));var s=[];a=a.map(f=>f.map((o,l)=>(s[l]=o[0],o[1])));var u=['<div class="animate-chart" duration="'+t+'" repeatWait="'+n+'" barCount="'+r+'" hint="'+s[0]+'">'];return u.push('<div class="animate-chart-title">'+g+'<span class="animate-chart-title-hint"></span></div>'),u.push('<div class="animate-chart-panel">'),s.forEach((f,o)=>{o!==0&&u.push('<div class="animate-chart-bar" index="'+o+'"><span class="animate-chart-bar-title">'+f+'</span><span class="animate-chart-bar-value"></span></div>')}),n<=0&&u.push('<div class="animate-chart-replay"></div>'),u.push("</div>"),u.push('<div class="animate-chart-data" style="display:none;">'+JSON.stringify(a)+"</div>"),u.push("</div>"),u.join("")}};
  