All Downloads are FREE. Search and download functionalities are using the official Maven repository.

package.dist.mermaid.esm.min.mjs Maven / Gradle / Ivy

Go to download

Markdown-ish syntax for generating flowcharts, mindmaps, sequence diagrams, class diagrams, gantt charts, git graphs and more.

There is a newer version: 11.4.0
Show newest version
import{a as qe}from"./chunks/mermaid.esm.min/chunk-OUDNNCD4.mjs";import{a as Fr}from"./chunks/mermaid.esm.min/chunk-WVHPJQMP.mjs";import{a as Tr}from"./chunks/mermaid.esm.min/chunk-CBSWTUHP.mjs";import"./chunks/mermaid.esm.min/chunk-RRFB4HDS.mjs";import"./chunks/mermaid.esm.min/chunk-U6LOUQAF.mjs";import{a as pr}from"./chunks/mermaid.esm.min/chunk-KMOJB3TB.mjs";import{b as Cr,j as $e,l as Sr,m as W,n as Lr,o as _r}from"./chunks/mermaid.esm.min/chunk-AC3VT7B7.mjs";import"./chunks/mermaid.esm.min/chunk-TI4EEUUG.mjs";import{$ as K,A as z,B as Ar,C as se,D as nt,G as Er,M as wr,O as br,aa as fe,b as A,c as Ye,d as mr,f as dr,fa as H,g as Be,h as De,i as ve,j as gr,k as hr,r as Ae,u as Ue,v as xr,w as yr,x as Dr,y as Ge,z as vr}from"./chunks/mermaid.esm.min/chunk-NQURTBEV.mjs";import{d as Ve}from"./chunks/mermaid.esm.min/chunk-YPUTD6PB.mjs";import"./chunks/mermaid.esm.min/chunk-6BY5RJGC.mjs";import{a as o,e as it}from"./chunks/mermaid.esm.min/chunk-GTKDMUJJ.mjs";var Or="c4",tt=o(e=>/^\s*C4Context|C4Container|C4Component|C4Dynamic|C4Deployment/.test(e),"detector"),ot=o(async()=>{let{diagram:e}=await import("./chunks/mermaid.esm.min/c4Diagram-AUYESYAG.mjs");return{id:Or,diagram:e}},"loader"),at={id:Or,detector:tt,loader:ot},kr=at;var Ir="flowchart",lt=o((e,r)=>r?.flowchart?.defaultRenderer==="dagre-wrapper"||r?.flowchart?.defaultRenderer==="elk"?!1:/^\s*graph/.test(e),"detector"),ct=o(async()=>{let{diagram:e}=await import("./chunks/mermaid.esm.min/flowDiagram-JTTVBJUY.mjs");return{id:Ir,diagram:e}},"loader"),st={id:Ir,detector:lt,loader:ct},Mr=st;var Rr="flowchart-v2",ft=o((e,r)=>r?.flowchart?.defaultRenderer==="dagre-d3"||r?.flowchart?.defaultRenderer==="elk"?!1:/^\s*graph/.test(e)&&r?.flowchart?.defaultRenderer==="dagre-wrapper"?!0:/^\s*flowchart/.test(e),"detector"),ut=o(async()=>{let{diagram:e}=await import("./chunks/mermaid.esm.min/flowDiagram-JTTVBJUY.mjs");return{id:Rr,diagram:e}},"loader"),pt={id:Rr,detector:ft,loader:ut},Nr=pt;var Pr="er",mt=o(e=>/^\s*erDiagram/.test(e),"detector"),dt=o(async()=>{let{diagram:e}=await import("./chunks/mermaid.esm.min/erDiagram-Y4N7DENO.mjs");return{id:Pr,diagram:e}},"loader"),gt={id:Pr,detector:mt,loader:dt},jr=gt;var Hr="gitGraph",ht=o(e=>/^\s*gitGraph/.test(e),"detector"),xt=o(async()=>{let{diagram:e}=await import("./chunks/mermaid.esm.min/gitGraphDiagram-LRIBUTDQ.mjs");return{id:Hr,diagram:e}},"loader"),yt={id:Hr,detector:ht,loader:xt},Yr=yt;var Br="gantt",Dt=o(e=>/^\s*gantt/.test(e),"detector"),vt=o(async()=>{let{diagram:e}=await import("./chunks/mermaid.esm.min/ganttDiagram-6SR64PWN.mjs");return{id:Br,diagram:e}},"loader"),At={id:Br,detector:Dt,loader:vt},Ur=At;var Gr="info",Et=o(e=>/^\s*info/.test(e),"detector"),wt=o(async()=>{let{diagram:e}=await import("./chunks/mermaid.esm.min/infoDiagram-YTPSHCSX.mjs");return{id:Gr,diagram:e}},"loader"),$r={id:Gr,detector:Et,loader:wt};var Vr="pie",bt=o(e=>/^\s*pie/.test(e),"detector"),Ct=o(async()=>{let{diagram:e}=await import("./chunks/mermaid.esm.min/pieDiagram-WYSUK7CQ.mjs");return{id:Vr,diagram:e}},"loader"),qr={id:Vr,detector:bt,loader:Ct};var zr="quadrantChart",St=o(e=>/^\s*quadrantChart/.test(e),"detector"),Lt=o(async()=>{let{diagram:e}=await import("./chunks/mermaid.esm.min/quadrantDiagram-K5BY4R5E.mjs");return{id:zr,diagram:e}},"loader"),_t={id:zr,detector:St,loader:Lt},Kr=_t;var Wr="xychart",Tt=o(e=>/^\s*xychart-beta/.test(e),"detector"),Ft=o(async()=>{let{diagram:e}=await import("./chunks/mermaid.esm.min/xychartDiagram-RLS75X5Z.mjs");return{id:Wr,diagram:e}},"loader"),Ot={id:Wr,detector:Tt,loader:Ft},Xr=Ot;var Qr="requirement",kt=o(e=>/^\s*requirement(Diagram)?/.test(e),"detector"),It=o(async()=>{let{diagram:e}=await import("./chunks/mermaid.esm.min/requirementDiagram-2DBX4ZW4.mjs");return{id:Qr,diagram:e}},"loader"),Mt={id:Qr,detector:kt,loader:It},Zr=Mt;var Jr="sequence",Rt=o(e=>/^\s*sequenceDiagram/.test(e),"detector"),Nt=o(async()=>{let{diagram:e}=await import("./chunks/mermaid.esm.min/sequenceDiagram-QBGN4KDC.mjs");return{id:Jr,diagram:e}},"loader"),Pt={id:Jr,detector:Rt,loader:Nt},ei=Pt;var ri="class",jt=o((e,r)=>r?.class?.defaultRenderer==="dagre-wrapper"?!1:/^\s*classDiagram/.test(e),"detector"),Ht=o(async()=>{let{diagram:e}=await import("./chunks/mermaid.esm.min/classDiagram-EPVPYR3L.mjs");return{id:ri,diagram:e}},"loader"),Yt={id:ri,detector:jt,loader:Ht},ii=Yt;var ni="classDiagram",Bt=o((e,r)=>/^\s*classDiagram/.test(e)&&r?.class?.defaultRenderer==="dagre-wrapper"?!0:/^\s*classDiagram-v2/.test(e),"detector"),Ut=o(async()=>{let{diagram:e}=await import("./chunks/mermaid.esm.min/classDiagram-v2-NO4EPWGV.mjs");return{id:ni,diagram:e}},"loader"),Gt={id:ni,detector:Bt,loader:Ut},ti=Gt;var oi="state",$t=o((e,r)=>r?.state?.defaultRenderer==="dagre-wrapper"?!1:/^\s*stateDiagram/.test(e),"detector"),Vt=o(async()=>{let{diagram:e}=await import("./chunks/mermaid.esm.min/stateDiagram-S3XGF733.mjs");return{id:oi,diagram:e}},"loader"),qt={id:oi,detector:$t,loader:Vt},ai=qt;var li="stateDiagram",zt=o((e,r)=>!!(/^\s*stateDiagram-v2/.test(e)||/^\s*stateDiagram/.test(e)&&r?.state?.defaultRenderer==="dagre-wrapper"),"detector"),Kt=o(async()=>{let{diagram:e}=await import("./chunks/mermaid.esm.min/stateDiagram-v2-BSO5MUCZ.mjs");return{id:li,diagram:e}},"loader"),Wt={id:li,detector:zt,loader:Kt},ci=Wt;var si="journey",Xt=o(e=>/^\s*journey/.test(e),"detector"),Qt=o(async()=>{let{diagram:e}=await import("./chunks/mermaid.esm.min/journeyDiagram-VRXW2F6L.mjs");return{id:si,diagram:e}},"loader"),Zt={id:si,detector:Xt,loader:Qt},fi=Zt;var Jt=o((e,r,i)=>{A.debug(`rendering svg for syntax error
`);let t=Fr(r),n=t.append("g");t.attr("viewBox","0 0 2412 512"),wr(t,100,512,!0),n.append("path").attr("class","error-icon").attr("d","m411.313,123.313c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32-9.375,9.375-20.688-20.688c-12.484-12.5-32.766-12.5-45.25,0l-16,16c-1.261,1.261-2.304,2.648-3.31,4.051-21.739-8.561-45.324-13.426-70.065-13.426-105.867,0-192,86.133-192,192s86.133,192 192,192 192-86.133 192-192c0-24.741-4.864-48.327-13.426-70.065 1.402-1.007 2.79-2.049 4.051-3.31l16-16c12.5-12.492 12.5-32.758 0-45.25l-20.688-20.688 9.375-9.375 32.001-31.999zm-219.313,100.687c-52.938,0-96,43.063-96,96 0,8.836-7.164,16-16,16s-16-7.164-16-16c0-70.578 57.422-128 128-128 8.836,0 16,7.164 16,16s-7.164,16-16,16z"),n.append("path").attr("class","error-icon").attr("d","m459.02,148.98c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l16,16c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16.001-16z"),n.append("path").attr("class","error-icon").attr("d","m340.395,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16-16c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l15.999,16z"),n.append("path").attr("class","error-icon").attr("d","m400,64c8.844,0 16-7.164 16-16v-32c0-8.836-7.156-16-16-16-8.844,0-16,7.164-16,16v32c0,8.836 7.156,16 16,16z"),n.append("path").attr("class","error-icon").attr("d","m496,96.586h-32c-8.844,0-16,7.164-16,16 0,8.836 7.156,16 16,16h32c8.844,0 16-7.164 16-16 0-8.836-7.156-16-16-16z"),n.append("path").attr("class","error-icon").attr("d","m436.98,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688l32-32c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32c-6.251,6.25-6.251,16.375-0.001,22.625z"),n.append("text").attr("class","error-text").attr("x",1440).attr("y",250).attr("font-size","150px").style("text-anchor","middle").text("Syntax error in text"),n.append("text").attr("class","error-text").attr("x",1250).attr("y",400).attr("font-size","100px").style("text-anchor","middle").text(`mermaid version ${i}`)},"draw"),ze={draw:Jt},ui=ze;var eo={db:{},renderer:ze,parser:{parse:o(()=>{},"parse")}},pi=eo;var mi="flowchart-elk",ro=o((e,r={})=>/^\s*flowchart-elk/.test(e)||/^\s*flowchart|graph/.test(e)&&r?.flowchart?.defaultRenderer==="elk"?(r.layout="elk",!0):!1,"detector"),io=o(async()=>{let{diagram:e}=await import("./chunks/mermaid.esm.min/flowDiagram-JTTVBJUY.mjs");return{id:mi,diagram:e}},"loader"),no={id:mi,detector:ro,loader:io},di=no;var gi="timeline",to=o(e=>/^\s*timeline/.test(e),"detector"),oo=o(async()=>{let{diagram:e}=await import("./chunks/mermaid.esm.min/timeline-definition-MHTE3MCH.mjs");return{id:gi,diagram:e}},"loader"),ao={id:gi,detector:to,loader:oo},hi=ao;var xi="mindmap",lo=o(e=>/^\s*mindmap/.test(e),"detector"),co=o(async()=>{let{diagram:e}=await import("./chunks/mermaid.esm.min/mindmap-definition-KLCIANCF.mjs");return{id:xi,diagram:e}},"loader"),so={id:xi,detector:lo,loader:co},yi=so;var Di="sankey",fo=o(e=>/^\s*sankey-beta/.test(e),"detector"),uo=o(async()=>{let{diagram:e}=await import("./chunks/mermaid.esm.min/sankeyDiagram-F3GI3WFI.mjs");return{id:Di,diagram:e}},"loader"),po={id:Di,detector:fo,loader:uo},vi=po;var Ai="packet",mo=o(e=>/^\s*packet-beta/.test(e),"detector"),go=o(async()=>{let{diagram:e}=await import("./chunks/mermaid.esm.min/diagram-V25JEYTC.mjs");return{id:Ai,diagram:e}},"loader"),Ei={id:Ai,detector:mo,loader:go};var wi="block",ho=o(e=>/^\s*block-beta/.test(e),"detector"),xo=o(async()=>{let{diagram:e}=await import("./chunks/mermaid.esm.min/blockDiagram-NDWNTGEE.mjs");return{id:wi,diagram:e}},"loader"),yo={id:wi,detector:ho,loader:xo},bi=yo;var Ci=!1,ee=o(()=>{Ci||(Ci=!0,K("error",pi,e=>e.toLowerCase().trim()==="error"),K("---",{db:{clear:o(()=>{},"clear")},styles:{},renderer:{draw:o(()=>{},"draw")},parser:{parse:o(()=>{throw new Error("Diagrams beginning with --- are not valid. If you were trying to use a YAML front-matter, please ensure that you've correctly opened and closed the YAML front-matter with un-indented `---` blocks")},"parse")},init:o(()=>null,"init")},e=>e.toLowerCase().trimStart().startsWith("---")),ve(kr,ti,ii,jr,Ur,$r,qr,Zr,ei,di,Nr,Mr,yi,hi,Yr,ci,ai,fi,Kr,vi,Ei,Xr,bi))},"addDiagrams");var Si=o(async()=>{A.debug("Loading registered diagrams");let r=(await Promise.allSettled(Object.entries(Be).map(async([i,{detector:t,loader:n}])=>{if(n)try{fe(i)}catch{try{let{diagram:l,id:a}=await n();K(a,l,t)}catch(l){throw A.error(`Failed to load external diagram with key ${i}. Removing from detectors.`),delete Be[i],l}}}))).filter(i=>i.status==="rejected");if(r.length>0){A.error(`Failed to load ${r.length} external diagrams`);for(let i of r)A.error(i);throw new Error(`Failed to load ${r.length} external diagrams`)}},"loadRegisteredDiagrams");var Ee="comm",we="rule",be="decl";var Li="@import";var _i="@keyframes";var Ti="@layer";var Ke=Math.abs,ue=String.fromCharCode;function Ce(e){return e.trim()}o(Ce,"trim");function pe(e,r,i){return e.replace(r,i)}o(pe,"replace");function Fi(e,r,i){return e.indexOf(r,i)}o(Fi,"indexof");function X(e,r){return e.charCodeAt(r)|0}o(X,"charat");function Q(e,r,i){return e.slice(r,i)}o(Q,"substr");function O(e){return e.length}o(O,"strlen");function Oi(e){return e.length}o(Oi,"sizeof");function re(e,r){return r.push(e),e}o(re,"append");var Se=1,ie=1,ki=0,k=0,w=0,ne="";function Le(e,r,i,t,n,l,a,c){return{value:e,root:r,parent:i,type:t,props:n,children:l,line:Se,column:ie,length:a,return:"",siblings:c}}o(Le,"node");function Ii(){return w}o(Ii,"char");function Mi(){return w=k>0?X(ne,--k):0,ie--,w===10&&(ie=1,Se--),w}o(Mi,"prev");function I(){return w=k2||We(w)>3?"":" "}o(Pi,"whitespace");function ji(e,r){for(;--r&&I()&&!(w<48||w>102||w>57&&w<65||w>70&&w<97););return _e(e,me()+(r<6&&U()==32&&I()==32))}o(ji,"escaping");function Xe(e){for(;I();)switch(w){case e:return k;case 34:case 39:e!==34&&e!==39&&Xe(w);break;case 40:e===41&&Xe(e);break;case 92:I();break}return k}o(Xe,"delimiter");function Hi(e,r){for(;I()&&e+w!==57;)if(e+w===84&&U()===47)break;return"/*"+_e(r,k-1)+"*"+ue(e===47?e:I())}o(Hi,"commenter");function Yi(e){for(;!We(U());)I();return _e(e,k)}o(Yi,"identifier");function Gi(e){return Ni(Fe("",null,null,null,[""],e=Ri(e),0,[0],e))}o(Gi,"compile");function Fe(e,r,i,t,n,l,a,c,s){for(var u=0,p=0,f=a,m=0,d=0,y=0,x=1,D=1,E=1,h=0,M="",j=n,N=l,F=t,v=M;D;)switch(y=h,h=I()){case 40:if(y!=108&&X(v,f-1)==58){Fi(v+=pe(Te(h),"&","&\f"),"&\f",Ke(u?c[u-1]:0))!=-1&&(E=-1);break}case 34:case 39:case 91:v+=Te(h);break;case 9:case 10:case 13:case 32:v+=Pi(y);break;case 92:v+=ji(me()-1,7);continue;case 47:switch(U()){case 42:case 47:re(Do(Hi(I(),me()),r,i,s),s);break;default:v+="/"}break;case 123*x:c[u++]=O(v)*E;case 125*x:case 59:case 0:switch(h){case 0:case 125:D=0;case 59+p:E==-1&&(v=pe(v,/\f/g,"")),d>0&&O(v)-f&&re(d>32?Ui(v+";",t,i,f-1,s):Ui(pe(v," ","")+";",t,i,f-2,s),s);break;case 59:v+=";";default:if(re(F=Bi(v,r,i,u,p,n,c,M,j=[],N=[],f,l),l),h===123)if(p===0)Fe(v,r,F,F,j,l,f,c,N);else switch(m===99&&X(v,3)===110?100:m){case 100:case 108:case 109:case 115:Fe(e,F,F,t&&re(Bi(e,F,F,0,0,n,c,M,n,j=[],f,N),N),n,N,f,c,t?j:N);break;default:Fe(v,F,F,F,[""],N,0,c,N)}}u=p=d=0,x=E=1,M=v="",f=a;break;case 58:f=1+O(v),d=y;default:if(x<1){if(h==123)--x;else if(h==125&&x++==0&&Mi()==125)continue}switch(v+=ue(h),h*x){case 38:E=p>0?1:(v+="\f",-1);break;case 44:c[u++]=(O(v)-1)*E,E=1;break;case 64:U()===45&&(v+=Te(I())),m=U(),p=f=O(M=v+=Yi(me())),h++;break;case 45:y===45&&O(v)==2&&(x=0)}}return l}o(Fe,"parse");function Bi(e,r,i,t,n,l,a,c,s,u,p,f){for(var m=n-1,d=n===0?l:[""],y=Oi(d),x=0,D=0,E=0;x0?d[h]+" "+M:pe(M,/&\f/g,d[h])))&&(s[E++]=j);return Le(e,r,i,n===0?we:c,s,u,p,f)}o(Bi,"ruleset");function Do(e,r,i,t){return Le(e,r,i,Ee,ue(Ii()),Q(e,2,-2),0,t)}o(Do,"comment");function Ui(e,r,i,t,n){return Le(e,r,i,be,Q(e,0,t),Q(e,t+1,-1),t,n)}o(Ui,"declaration");function Oe(e,r){for(var i="",t=0;t{Vi.forEach(e=>{e()}),Vi=[]},"attachFunctions");var Vn=it(nt(),1);var Ao="graphics-document document";function zi(e,r){e.attr("role",Ao),r!==""&&e.attr("aria-roledescription",r)}o(zi,"setA11yDiagramInfo");function Ki(e,r,i,t){if(e.insert!==void 0){if(i){let n=`chart-desc-${t}`;e.attr("aria-describedby",n),e.insert("desc",":first-child").attr("id",n).text(i)}if(r){let n=`chart-title-${t}`;e.attr("aria-labelledby",n),e.insert("title",":first-child").attr("id",n).text(r)}}}o(Ki,"addSVGa11yTitleDescription");var Wi=o(e=>e.replace(/^\s*%%(?!{)[^\n]+\n?/gm,"").trimStart(),"cleanupComments");function pn(e){return typeof e>"u"||e===null}o(pn,"isNothing");function Eo(e){return typeof e=="object"&&e!==null}o(Eo,"isObject");function wo(e){return Array.isArray(e)?e:pn(e)?[]:[e]}o(wo,"toArray");function bo(e,r){var i,t,n,l;if(r)for(l=Object.keys(r),i=0,t=l.length;ic&&(l=" ... ",r=t-c+l.length),i-t>c&&(a=" ...",i=t+c-a.length),{str:l+e.slice(r,i).replace(/\t/g,"\u2192")+a,pos:t-r+l.length}}o(Qe,"getLine");function Ze(e,r){return C.repeat(" ",r-e.length)+e}o(Ze,"padStart");function Io(e,r){if(r=Object.create(r||null),!e.buffer)return null;r.maxLength||(r.maxLength=79),typeof r.indent!="number"&&(r.indent=1),typeof r.linesBefore!="number"&&(r.linesBefore=3),typeof r.linesAfter!="number"&&(r.linesAfter=2);for(var i=/\r?\n|\r|\0/g,t=[0],n=[],l,a=-1;l=i.exec(e.buffer);)n.push(l.index),t.push(l.index+l[0].length),e.position<=l.index&&a<0&&(a=t.length-2);a<0&&(a=t.length-1);var c="",s,u,p=Math.min(e.line+r.linesAfter,n.length).toString().length,f=r.maxLength-(r.indent+p+3);for(s=1;s<=r.linesBefore&&!(a-s<0);s++)u=Qe(e.buffer,t[a-s],n[a-s],e.position-(t[a]-t[a-s]),f),c=C.repeat(" ",r.indent)+Ze((e.line-s+1).toString(),p)+" | "+u.str+`
`+c;for(u=Qe(e.buffer,t[a],n[a],e.position,f),c+=C.repeat(" ",r.indent)+Ze((e.line+1).toString(),p)+" | "+u.str+`
`,c+=C.repeat("-",r.indent+p+3+u.pos)+`^
`,s=1;s<=r.linesAfter&&!(a+s>=n.length);s++)u=Qe(e.buffer,t[a+s],n[a+s],e.position-(t[a]-t[a+s]),f),c+=C.repeat(" ",r.indent)+Ze((e.line+s+1).toString(),p)+" | "+u.str+`
`;return c.replace(/\n$/,"")}o(Io,"makeSnippet");var Mo=Io,Ro=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],No=["scalar","sequence","mapping"];function Po(e){var r={};return e!==null&&Object.keys(e).forEach(function(i){e[i].forEach(function(t){r[String(t)]=i})}),r}o(Po,"compileStyleAliases");function jo(e,r){if(r=r||{},Object.keys(r).forEach(function(i){if(Ro.indexOf(i)===-1)throw new _('Unknown option "'+i+'" is met in definition of "'+e+'" YAML type.')}),this.options=r,this.tag=e,this.kind=r.kind||null,this.resolve=r.resolve||function(){return!0},this.construct=r.construct||function(i){return i},this.instanceOf=r.instanceOf||null,this.predicate=r.predicate||null,this.represent=r.represent||null,this.representName=r.representName||null,this.defaultStyle=r.defaultStyle||null,this.multi=r.multi||!1,this.styleAliases=Po(r.styleAliases||null),No.indexOf(this.kind)===-1)throw new _('Unknown kind "'+this.kind+'" is specified for "'+e+'" YAML type.')}o(jo,"Type$1");var S=jo;function Xi(e,r){var i=[];return e[r].forEach(function(t){var n=i.length;i.forEach(function(l,a){l.tag===t.tag&&l.kind===t.kind&&l.multi===t.multi&&(n=a)}),i[n]=t}),i}o(Xi,"compileList");function Ho(){var e={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}},r,i;function t(n){n.multi?(e.multi[n.kind].push(n),e.multi.fallback.push(n)):e[n.kind][n.tag]=e.fallback[n.tag]=n}for(o(t,"collectType"),r=0,i=arguments.length;r=0?"0b"+e.toString(2):"-0b"+e.toString(2).slice(1)},"binary"),octal:o(function(e){return e>=0?"0o"+e.toString(8):"-0o"+e.toString(8).slice(1)},"octal"),decimal:o(function(e){return e.toString(10)},"decimal"),hexadecimal:o(function(e){return e>=0?"0x"+e.toString(16).toUpperCase():"-0x"+e.toString(16).toUpperCase().slice(1)},"hexadecimal")},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}}),aa=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function la(e){return!(e===null||!aa.test(e)||e[e.length-1]==="_")}o(la,"resolveYamlFloat");function ca(e){var r,i;return r=e.replace(/_/g,"").toLowerCase(),i=r[0]==="-"?-1:1,"+-".indexOf(r[0])>=0&&(r=r.slice(1)),r===".inf"?i===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:r===".nan"?NaN:i*parseFloat(r,10)}o(ca,"constructYamlFloat");var sa=/^[-+]?[0-9]+e/;function fa(e,r){var i;if(isNaN(e))switch(r){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===e)switch(r){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===e)switch(r){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(C.isNegativeZero(e))return"-0.0";return i=e.toString(10),sa.test(i)?i.replace("e",".e"):i}o(fa,"representYamlFloat");function ua(e){return Object.prototype.toString.call(e)==="[object Number]"&&(e%1!==0||C.isNegativeZero(e))}o(ua,"isFloat");var pa=new S("tag:yaml.org,2002:float",{kind:"scalar",resolve:la,construct:ca,predicate:ua,represent:fa,defaultStyle:"lowercase"}),dn=$o.extend({implicit:[Ko,Zo,oa,pa]}),ma=dn,gn=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),hn=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$");function da(e){return e===null?!1:gn.exec(e)!==null||hn.exec(e)!==null}o(da,"resolveYamlTimestamp");function ga(e){var r,i,t,n,l,a,c,s=0,u=null,p,f,m;if(r=gn.exec(e),r===null&&(r=hn.exec(e)),r===null)throw new Error("Date resolve error");if(i=+r[1],t=+r[2]-1,n=+r[3],!r[4])return new Date(Date.UTC(i,t,n));if(l=+r[4],a=+r[5],c=+r[6],r[7]){for(s=r[7].slice(0,3);s.length<3;)s+="0";s=+s}return r[9]&&(p=+r[10],f=+(r[11]||0),u=(p*60+f)*6e4,r[9]==="-"&&(u=-u)),m=new Date(Date.UTC(i,t,n,l,a,c,s)),u&&m.setTime(m.getTime()-u),m}o(ga,"constructYamlTimestamp");function ha(e){return e.toISOString()}o(ha,"representYamlTimestamp");var xa=new S("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:da,construct:ga,instanceOf:Date,represent:ha});function ya(e){return e==="<<"||e===null}o(ya,"resolveYamlMerge");var Da=new S("tag:yaml.org,2002:merge",{kind:"scalar",resolve:ya}),or=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
\r`;function va(e){if(e===null)return!1;var r,i,t=0,n=e.length,l=or;for(i=0;i64)){if(r<0)return!1;t+=6}return t%8===0}o(va,"resolveYamlBinary");function Aa(e){var r,i,t=e.replace(/[\r\n=]/g,""),n=t.length,l=or,a=0,c=[];for(r=0;r>16&255),c.push(a>>8&255),c.push(a&255)),a=a<<6|l.indexOf(t.charAt(r));return i=n%4*6,i===0?(c.push(a>>16&255),c.push(a>>8&255),c.push(a&255)):i===18?(c.push(a>>10&255),c.push(a>>2&255)):i===12&&c.push(a>>4&255),new Uint8Array(c)}o(Aa,"constructYamlBinary");function Ea(e){var r="",i=0,t,n,l=e.length,a=or;for(t=0;t>18&63],r+=a[i>>12&63],r+=a[i>>6&63],r+=a[i&63]),i=(i<<8)+e[t];return n=l%3,n===0?(r+=a[i>>18&63],r+=a[i>>12&63],r+=a[i>>6&63],r+=a[i&63]):n===2?(r+=a[i>>10&63],r+=a[i>>4&63],r+=a[i<<2&63],r+=a[64]):n===1&&(r+=a[i>>2&63],r+=a[i<<4&63],r+=a[64],r+=a[64]),r}o(Ea,"representYamlBinary");function wa(e){return Object.prototype.toString.call(e)==="[object Uint8Array]"}o(wa,"isBinary");var ba=new S("tag:yaml.org,2002:binary",{kind:"scalar",resolve:va,construct:Aa,predicate:wa,represent:Ea}),Ca=Object.prototype.hasOwnProperty,Sa=Object.prototype.toString;function La(e){if(e===null)return!0;var r=[],i,t,n,l,a,c=e;for(i=0,t=c.length;i>10)+55296,(e-65536&1023)+56320)}o(Va,"charFromCodepoint");var En=new Array(256),wn=new Array(256);for(Z=0;Z<256;Z++)En[Z]=Ji(Z)?1:0,wn[Z]=Ji(Z);var Z;function qa(e,r){this.input=e,this.filename=r.filename||null,this.schema=r.schema||xn,this.onWarning=r.onWarning||null,this.legacy=r.legacy||!1,this.json=r.json||!1,this.listener=r.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=e.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.firstTabInLine=-1,this.documents=[]}o(qa,"State$1");function bn(e,r){var i={name:e.filename,buffer:e.input.slice(0,-1),position:e.position,line:e.line,column:e.position-e.lineStart};return i.snippet=Mo(i),new _(r,i)}o(bn,"generateError");function g(e,r){throw bn(e,r)}o(g,"throwError");function Me(e,r){e.onWarning&&e.onWarning.call(null,bn(e,r))}o(Me,"throwWarning");var en={YAML:o(function(r,i,t){var n,l,a;r.version!==null&&g(r,"duplication of %YAML directive"),t.length!==1&&g(r,"YAML directive accepts exactly one argument"),n=/^([0-9]+)\.([0-9]+)$/.exec(t[0]),n===null&&g(r,"ill-formed argument of the YAML directive"),l=parseInt(n[1],10),a=parseInt(n[2],10),l!==1&&g(r,"unacceptable YAML version of the document"),r.version=t[0],r.checkLineBreaks=a<2,a!==1&&a!==2&&Me(r,"unsupported YAML version of the document")},"handleYamlDirective"),TAG:o(function(r,i,t){var n,l;t.length!==2&&g(r,"TAG directive accepts exactly two arguments"),n=t[0],l=t[1],vn.test(n)||g(r,"ill-formed tag handle (first argument) of the TAG directive"),$.call(r.tagMap,n)&&g(r,'there is a previously declared suffix for "'+n+'" tag handle'),An.test(l)||g(r,"ill-formed tag prefix (second argument) of the TAG directive");try{l=decodeURIComponent(l)}catch{g(r,"tag prefix is malformed: "+l)}r.tagMap[n]=l},"handleTagDirective")};function G(e,r,i,t){var n,l,a,c;if(r1&&(e.result+=C.repeat(`
`,r-1))}o(lr,"writeFoldedLines");function za(e,r,i){var t,n,l,a,c,s,u,p,f=e.kind,m=e.result,d;if(d=e.input.charCodeAt(e.position),T(d)||ae(d)||d===35||d===38||d===42||d===33||d===124||d===62||d===39||d===34||d===37||d===64||d===96||(d===63||d===45)&&(n=e.input.charCodeAt(e.position+1),T(n)||i&&ae(n)))return!1;for(e.kind="scalar",e.result="",l=a=e.position,c=!1;d!==0;){if(d===58){if(n=e.input.charCodeAt(e.position+1),T(n)||i&&ae(n))break}else if(d===35){if(t=e.input.charCodeAt(e.position-1),T(t))break}else{if(e.position===e.lineStart&&Pe(e)||i&&ae(d))break;if(P(d))if(s=e.line,u=e.lineStart,p=e.lineIndent,b(e,!1,-1),e.lineIndent>=r){c=!0,d=e.input.charCodeAt(e.position);continue}else{e.position=a,e.line=s,e.lineStart=u,e.lineIndent=p;break}}c&&(G(e,l,a,!1),lr(e,e.line-s),l=a=e.position,c=!1),J(d)||(a=e.position+1),d=e.input.charCodeAt(++e.position)}return G(e,l,a,!1),e.result?!0:(e.kind=f,e.result=m,!1)}o(za,"readPlainScalar");function Ka(e,r){var i,t,n;if(i=e.input.charCodeAt(e.position),i!==39)return!1;for(e.kind="scalar",e.result="",e.position++,t=n=e.position;(i=e.input.charCodeAt(e.position))!==0;)if(i===39)if(G(e,t,e.position,!0),i=e.input.charCodeAt(++e.position),i===39)t=e.position,e.position++,n=e.position;else return!0;else P(i)?(G(e,t,n,!0),lr(e,b(e,!1,r)),t=n=e.position):e.position===e.lineStart&&Pe(e)?g(e,"unexpected end of the document within a single quoted scalar"):(e.position++,n=e.position);g(e,"unexpected end of the stream within a single quoted scalar")}o(Ka,"readSingleQuotedScalar");function Wa(e,r){var i,t,n,l,a,c;if(c=e.input.charCodeAt(e.position),c!==34)return!1;for(e.kind="scalar",e.result="",e.position++,i=t=e.position;(c=e.input.charCodeAt(e.position))!==0;){if(c===34)return G(e,i,e.position,!0),e.position++,!0;if(c===92){if(G(e,i,e.position,!0),c=e.input.charCodeAt(++e.position),P(c))b(e,!1,r);else if(c<256&&En[c])e.result+=wn[c],e.position++;else if((a=Ga(c))>0){for(n=a,l=0;n>0;n--)c=e.input.charCodeAt(++e.position),(a=Ua(c))>=0?l=(l<<4)+a:g(e,"expected hexadecimal character");e.result+=Va(l),e.position++}else g(e,"unknown escape sequence");i=t=e.position}else P(c)?(G(e,i,t,!0),lr(e,b(e,!1,r)),i=t=e.position):e.position===e.lineStart&&Pe(e)?g(e,"unexpected end of the document within a double quoted scalar"):(e.position++,t=e.position)}g(e,"unexpected end of the stream within a double quoted scalar")}o(Wa,"readDoubleQuotedScalar");function Xa(e,r){var i=!0,t,n,l,a=e.tag,c,s=e.anchor,u,p,f,m,d,y=Object.create(null),x,D,E,h;if(h=e.input.charCodeAt(e.position),h===91)p=93,d=!1,c=[];else if(h===123)p=125,d=!0,c={};else return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=c),h=e.input.charCodeAt(++e.position);h!==0;){if(b(e,!0,r),h=e.input.charCodeAt(e.position),h===p)return e.position++,e.tag=a,e.anchor=s,e.kind=d?"mapping":"sequence",e.result=c,!0;i?h===44&&g(e,"expected the node content, but found ','"):g(e,"missed comma between flow collection entries"),D=x=E=null,f=m=!1,h===63&&(u=e.input.charCodeAt(e.position+1),T(u)&&(f=m=!0,e.position++,b(e,!0,r))),t=e.line,n=e.lineStart,l=e.position,ce(e,r,ke,!1,!0),D=e.tag,x=e.result,b(e,!0,r),h=e.input.charCodeAt(e.position),(m||e.line===t)&&h===58&&(f=!0,h=e.input.charCodeAt(++e.position),b(e,!0,r),ce(e,r,ke,!1,!0),E=e.result),d?le(e,c,y,D,x,E,t,n,l):f?c.push(le(e,null,y,D,x,E,t,n,l)):c.push(x),b(e,!0,r),h=e.input.charCodeAt(e.position),h===44?(i=!0,h=e.input.charCodeAt(++e.position)):i=!1}g(e,"unexpected end of the stream within a flow collection")}o(Xa,"readFlowCollection");function Qa(e,r){var i,t,n=Je,l=!1,a=!1,c=r,s=0,u=!1,p,f;if(f=e.input.charCodeAt(e.position),f===124)t=!1;else if(f===62)t=!0;else return!1;for(e.kind="scalar",e.result="";f!==0;)if(f=e.input.charCodeAt(++e.position),f===43||f===45)Je===n?n=f===43?Qi:ja:g(e,"repeat of a chomping mode identifier");else if((p=$a(f))>=0)p===0?g(e,"bad explicit indentation width of a block scalar; it cannot be less than one"):a?g(e,"repeat of an indentation width identifier"):(c=r+p-1,a=!0);else break;if(J(f)){do f=e.input.charCodeAt(++e.position);while(J(f));if(f===35)do f=e.input.charCodeAt(++e.position);while(!P(f)&&f!==0)}for(;f!==0;){for(ar(e),e.lineIndent=0,f=e.input.charCodeAt(e.position);(!a||e.lineIndentc&&(c=e.lineIndent),P(f)){s++;continue}if(e.lineIndentr)&&s!==0)g(e,"bad indentation of a sequence entry");else if(e.lineIndentr)&&(D&&(a=e.line,c=e.lineStart,s=e.position),ce(e,r,Ie,!0,n)&&(D?y=e.result:x=e.result),D||(le(e,f,m,d,y,x,a,c,s),d=y=x=null),b(e,!0,-1),h=e.input.charCodeAt(e.position)),(e.line===l||e.lineIndent>r)&&h!==0)g(e,"bad indentation of a mapping entry");else if(e.lineIndentr?s=1:e.lineIndent===r?s=0:e.lineIndentr?s=1:e.lineIndent===r?s=0:e.lineIndent tag; it should be "scalar", not "'+e.kind+'"'),f=0,m=e.implicitTypes.length;f"),e.result!==null&&y.kind!==e.kind&&g(e,"unacceptable node kind for !<"+e.tag+'> tag; it should be "'+y.kind+'", not "'+e.kind+'"'),y.resolve(e.result,e.tag)?(e.result=y.construct(e.result,e.tag),e.anchor!==null&&(e.anchorMap[e.anchor]=e.result)):g(e,"cannot resolve a node with !<"+e.tag+"> explicit tag")}return e.listener!==null&&e.listener("close",e),e.tag!==null||e.anchor!==null||p}o(ce,"composeNode");function il(e){var r=e.position,i,t,n,l=!1,a;for(e.version=null,e.checkLineBreaks=e.legacy,e.tagMap=Object.create(null),e.anchorMap=Object.create(null);(a=e.input.charCodeAt(e.position))!==0&&(b(e,!0,-1),a=e.input.charCodeAt(e.position),!(e.lineIndent>0||a!==37));){for(l=!0,a=e.input.charCodeAt(++e.position),i=e.position;a!==0&&!T(a);)a=e.input.charCodeAt(++e.position);for(t=e.input.slice(i,e.position),n=[],t.length<1&&g(e,"directive name must not be less than one character in length");a!==0;){for(;J(a);)a=e.input.charCodeAt(++e.position);if(a===35){do a=e.input.charCodeAt(++e.position);while(a!==0&&!P(a));break}if(P(a))break;for(i=e.position;a!==0&&!T(a);)a=e.input.charCodeAt(++e.position);n.push(e.input.slice(i,e.position))}a!==0&&ar(e),$.call(en,t)?en[t](e,t,n):Me(e,'unknown document directive "'+t+'"')}if(b(e,!0,-1),e.lineIndent===0&&e.input.charCodeAt(e.position)===45&&e.input.charCodeAt(e.position+1)===45&&e.input.charCodeAt(e.position+2)===45?(e.position+=3,b(e,!0,-1)):l&&g(e,"directives end mark is expected"),ce(e,e.lineIndent-1,Ie,!1,!0),b(e,!0,-1),e.checkLineBreaks&&Ya.test(e.input.slice(r,e.position))&&Me(e,"non-ASCII line breaks are interpreted as content"),e.documents.push(e.result),e.position===e.lineStart&&Pe(e)){e.input.charCodeAt(e.position)===46&&(e.position+=3,b(e,!0,-1));return}if(e.position"u"&&(i=r,r=null);var t=Cn(e,i);if(typeof r!="function")return t;for(var n=0,l=t.length;n=55296&&i<=56319&&r+1=56320&&t<=57343)?(i-55296)*1024+t-56320+65536:i}o(de,"codePointAt");function Mn(e){var r=/^\n* /;return r.test(e)}o(Mn,"needIndentIndicator");var Rn=1,nr=2,Nn=3,Pn=4,oe=5;function kl(e,r,i,t,n,l,a,c){var s,u=0,p=null,f=!1,m=!1,d=t!==-1,y=-1,x=Fl(de(e,0))&&Ol(de(e,e.length-1));if(r||a)for(s=0;s=65536?s+=2:s++){if(u=de(e,s),!ye(u))return oe;x=x&&an(u,p,c),p=u}else{for(s=0;s=65536?s+=2:s++){if(u=de(e,s),u===he)f=!0,d&&(m=m||s-y-1>t&&e[y+1]!==" ",y=s);else if(!ye(u))return oe;x=x&&an(u,p,c),p=u}m=m||d&&s-y-1>t&&e[y+1]!==" "}return!f&&!m?x&&!a&&!n(e)?Rn:l===xe?oe:nr:i>9&&Mn(e)?oe:a?l===xe?oe:nr:m?Pn:Nn}o(kl,"chooseScalarStyle");function Il(e,r,i,t,n){e.dump=function(){if(r.length===0)return e.quotingType===xe?'""':"''";if(!e.noCompatMode&&(wl.indexOf(r)!==-1||bl.test(r)))return e.quotingType===xe?'"'+r+'"':"'"+r+"'";var l=e.indent*Math.max(1,i),a=e.lineWidth===-1?-1:Math.max(Math.min(e.lineWidth,40),e.lineWidth-l),c=t||e.flowLevel>-1&&i>=e.flowLevel;function s(u){return Tl(e,u)}switch(o(s,"testAmbiguity"),kl(r,c,e.indent,a,s,e.quotingType,e.forceQuotes&&!t,n)){case Rn:return r;case nr:return"'"+r.replace(/'/g,"''")+"'";case Nn:return"|"+ln(r,e.indent)+cn(tn(r,l));case Pn:return">"+ln(r,e.indent)+cn(tn(Ml(r,a),l));case oe:return'"'+Rl(r)+'"';default:throw new _("impossible error: invalid scalar style")}}()}o(Il,"writeScalar");function ln(e,r){var i=Mn(e)?String(r):"",t=e[e.length-1]===`
`,n=t&&(e[e.length-2]===`
`||e===`
`),l=n?"+":t?"":"-";return i+l+`
`}o(ln,"blockHeader");function cn(e){return e[e.length-1]===`
`?e.slice(0,-1):e}o(cn,"dropEndingNewline");function Ml(e,r){for(var i=/(\n+)([^\n]*)/g,t=function(){var u=e.indexOf(`
`);return u=u!==-1?u:e.length,i.lastIndex=u,sn(e.slice(0,u),r)}(),n=e[0]===`
`||e[0]===" ",l,a;a=i.exec(e);){var c=a[1],s=a[2];l=s[0]===" ",t+=c+(!n&&!l&&s!==""?`
`:"")+sn(s,r),n=l}return t}o(Ml,"foldString");function sn(e,r){if(e===""||e[0]===" ")return e;for(var i=/ [^ ]/g,t,n=0,l,a=0,c=0,s="";t=i.exec(e);)c=t.index,c-n>r&&(l=a>n?a:c,s+=`
`+e.slice(n,l),n=l+1),a=c;return s+=`
`,e.length-n>r&&a>n?s+=e.slice(n,a)+`
`+e.slice(a+1):s+=e.slice(n),s.slice(1)}o(sn,"foldLine");function Rl(e){for(var r="",i=0,t,n=0;n=65536?n+=2:n++)i=de(e,n),t=L[i],!t&&ye(i)?(r+=e[n],i>=65536&&(r+=e[n+1])):r+=t||Sl(i);return r}o(Rl,"escapeString");function Nl(e,r,i){var t="",n=e.tag,l,a,c;for(l=0,a=i.length;l"u"&&Y(e,r,null,!1,!1))&&(t!==""&&(t+=","+(e.condenseFlow?"":" ")),t+=e.dump);e.tag=n,e.dump="["+t+"]"}o(Nl,"writeFlowSequence");function fn(e,r,i,t){var n="",l=e.tag,a,c,s;for(a=0,c=i.length;a"u"&&Y(e,r+1,null,!0,!0,!1,!0))&&((!t||n!=="")&&(n+=ir(e,r)),e.dump&&he===e.dump.charCodeAt(0)?n+="-":n+="- ",n+=e.dump);e.tag=l,e.dump=n||"[]"}o(fn,"writeBlockSequence");function Pl(e,r,i){var t="",n=e.tag,l=Object.keys(i),a,c,s,u,p;for(a=0,c=l.length;a1024&&(p+="? "),p+=e.dump+(e.condenseFlow?'"':"")+":"+(e.condenseFlow?"":" "),Y(e,r,u,!1,!1)&&(p+=e.dump,t+=p));e.tag=n,e.dump="{"+t+"}"}o(Pl,"writeFlowMapping");function jl(e,r,i,t){var n="",l=e.tag,a=Object.keys(i),c,s,u,p,f,m;if(e.sortKeys===!0)a.sort();else if(typeof e.sortKeys=="function")a.sort(e.sortKeys);else if(e.sortKeys)throw new _("sortKeys must be a boolean or a function");for(c=0,s=a.length;c1024,f&&(e.dump&&he===e.dump.charCodeAt(0)?m+="?":m+="? "),m+=e.dump,f&&(m+=ir(e,r)),Y(e,r+1,p,!0,f)&&(e.dump&&he===e.dump.charCodeAt(0)?m+=":":m+=": ",m+=e.dump,n+=m));e.tag=l,e.dump=n||"{}"}o(jl,"writeBlockMapping");function un(e,r,i){var t,n,l,a,c,s;for(n=i?e.explicitTypes:e.implicitTypes,l=0,a=n.length;l tag resolver accepts not "'+s+'" style');e.dump=t}return!0}return!1}o(un,"detectType");function Y(e,r,i,t,n,l,a){e.tag=null,e.dump=i,un(e,i,!1)||un(e,i,!0);var c=Ln.call(e.dump),s=t,u;t&&(t=e.flowLevel<0||e.flowLevel>r);var p=c==="[object Object]"||c==="[object Array]",f,m;if(p&&(f=e.duplicates.indexOf(i),m=f!==-1),(e.tag!==null&&e.tag!=="?"||m||e.indent!==2&&r>0)&&(n=!1),m&&e.usedDuplicates[f])e.dump="*ref_"+f;else{if(p&&m&&!e.usedDuplicates[f]&&(e.usedDuplicates[f]=!0),c==="[object Object]")t&&Object.keys(e.dump).length!==0?(jl(e,r,e.dump,n),m&&(e.dump="&ref_"+f+e.dump)):(Pl(e,r,e.dump),m&&(e.dump="&ref_"+f+" "+e.dump));else if(c==="[object Array]")t&&e.dump.length!==0?(e.noArrayIndent&&!a&&r>0?fn(e,r-1,e.dump,n):fn(e,r,e.dump,n),m&&(e.dump="&ref_"+f+e.dump)):(Nl(e,r,e.dump),m&&(e.dump="&ref_"+f+" "+e.dump));else if(c==="[object String]")e.tag!=="?"&&Il(e,e.dump,r,l,s);else{if(c==="[object Undefined]")return!1;if(e.skipInvalid)return!1;throw new _("unacceptable kind of an object to dump "+c)}e.tag!==null&&e.tag!=="?"&&(u=encodeURI(e.tag[0]==="!"?e.tag.slice(1):e.tag).replace(/!/g,"%21"),e.tag[0]==="!"?u="!"+u:u.slice(0,18)==="tag:yaml.org,2002:"?u="!!"+u.slice(18):u="!<"+u+">",e.dump=u+" "+e.dump)}return!0}o(Y,"writeNode");function Hl(e,r){var i=[],t=[],n,l;for(tr(e,i,t),n=0,l=t.length;ne.replace(/\r\n?/g,`
`).replace(/<(\w+)([^>]*)>/g,(r,i,t)=>"<"+i+t.replace(/="([^"]*)"/g,"='$1'")+">"),"cleanupText"),Vl=o(e=>{let{text:r,metadata:i}=Yn(e),{displayMode:t,title:n,config:l={}}=i;return t&&(l.gantt||(l.gantt={}),l.gantt.displayMode=t),{title:n,config:l,text:r}},"processFrontmatter"),ql=o(e=>{let r=W.detectInit(e)??{},i=W.detectDirective(e,"wrap");return Array.isArray(i)?r.wrap=i.some(({type:t})=>t==="wrap"):i?.type==="wrap"&&(r.wrap=!0),{text:Cr(e),directive:r}},"processDirectives");function fr(e){let r=$l(e),i=Vl(r),t=ql(i.text),n=Sr(i.config,t.directive);return e=Wi(t.text),{code:e,title:i.title,config:n}}o(fr,"preprocessDiagram");function Bn(e){let r=new TextEncoder().encode(e),i=Array.from(r,t=>String.fromCodePoint(t)).join("");return btoa(i)}o(Bn,"toBase64");var zl=5e4,Kl="graph TB;a[Maximum text size in diagram exceeded];style a fill:#faa",Wl="sandbox",Xl="loose",Ql="http://www.w3.org/2000/svg",Zl="http://www.w3.org/1999/xlink",Jl="http://www.w3.org/1999/xhtml",ec="100%",rc="100%",ic="border:0;margin:0;",nc="margin:0",tc="allow-top-navigation-by-user-activation allow-popups",oc='The "iframe" tag is not supported by your browser.',ac=["foreignobject"],lc=["dominant-baseline"];function qn(e){let r=fr(e);return se(),Ar(r.config??{}),r}o(qn,"processAndSetConfigs");async function cc(e,r){ee();try{let{code:i}=qn(e);return{diagramType:(await zn(i)).type}}catch(i){if(r?.suppressErrors)return!1;throw i}}o(cc,"parse");var Un=o((e,r,i=[])=>`
.${e} ${r} { ${i.join(" !important; ")} !important; }`,"cssImportantStyles"),sc=o((e,r=new Map)=>{let i="";if(e.themeCSS!==void 0&&(i+=`
${e.themeCSS}`),e.fontFamily!==void 0&&(i+=`
:root { --mermaid-font-family: ${e.fontFamily}}`),e.altFontFamily!==void 0&&(i+=`
:root { --mermaid-alt-font-family: ${e.altFontFamily}}`),r instanceof Map){let a=e.htmlLabels??e.flowchart?.htmlLabels?["> *","span"]:["rect","polygon","ellipse","circle","path"];r.forEach(c=>{Ve(c.styles)||a.forEach(s=>{i+=Un(c.id,s,c.styles)}),Ve(c.textStyles)||(i+=Un(c.id,"tspan",(c?.textStyles||[]).map(s=>s.replace("color","fill"))))})}return i},"createCssStyles"),fc=o((e,r,i,t)=>{let n=sc(e,i),l=br(r,n,e.themeVariables);return Oe(Gi(`${t}{${l}}`),$i)},"createUserStyles"),uc=o((e="",r,i)=>{let t=e;return!i&&!r&&(t=t.replace(/marker-end="url\([\d+./:=?A-Za-z-]*?#/g,'marker-end="url(#')),t=_r(t),t=t.replace(/
/g,"
"),t},"cleanUpSvgCode"),pc=o((e="",r)=>{let i=r?.viewBox?.baseVal?.height?r.viewBox.baseVal.height+"px":rc,t=Bn(`${e}`);return``},"putIntoIFrame"),Gn=o((e,r,i,t,n)=>{let l=e.append("div");l.attr("id",i),t&&l.attr("style",t);let a=l.append("svg").attr("id",r).attr("width","100%").attr("xmlns",Ql);return n&&a.attr("xmlns:xlink",n),a.append("g"),e},"appendDivSvgG");function $n(e,r){return e.append("iframe").attr("id",r).attr("style","width: 100%; height: 100%;").attr("sandbox","")}o($n,"sandboxedIframe");var mc=o((e,r,i,t)=>{e.getElementById(r)?.remove(),e.getElementById(i)?.remove(),e.getElementById(t)?.remove()},"removeExistingElements"),dc=o(async function(e,r,i){ee();let t=qn(r);r=t.code;let n=z();A.debug(n),r.length>(n?.maxTextSize??zl)&&(r=Kl);let l="#"+e,a="i"+e,c="#"+a,s="d"+e,u="#"+s,p=o(()=>{let He=H(m?c:u).node();He&&"remove"in He&&He.remove()},"removeTempElements"),f=H("body"),m=n.securityLevel===Wl,d=n.securityLevel===Xl,y=n.fontFamily;if(i!==void 0){if(i&&(i.innerHTML=""),m){let R=$n(H(i),a);f=H(R.nodes()[0].contentDocument.body),f.node().style.margin=0}else f=H(i);Gn(f,e,s,`font-family: ${y}`,Zl)}else{if(mc(document,e,s,a),m){let R=$n(H("body"),a);f=H(R.nodes()[0].contentDocument.body),f.node().style.margin=0}else f=H("body");Gn(f,e,s)}let x,D;try{x=await te.fromText(r,{title:t.title})}catch(R){if(n.suppressErrorRendering)throw p(),R;x=await te.fromText("error"),D=R}let E=f.select(u).node(),h=x.type,M=E.firstChild,j=M.firstChild,N=x.renderer.getClasses?.(r,x),F=fc(n,h,N,l),v=document.createElement("style");v.innerHTML=F,M.insertBefore(v,j);try{await x.renderer.draw(r,e,qe,x)}catch(R){throw n.suppressErrorRendering?p():ui.draw(r,e,qe),R}let Jn=f.select(`${u} svg`),et=x.db.getAccTitle?.(),rt=x.db.getAccDescription?.();hc(h,Jn,et,rt),f.select(`[id="${e}"]`).selectAll("foreignobject > *").attr("xmlns",Jl);let q=f.select(u).node().innerHTML;if(A.debug("config.arrowMarkerAbsolute",n.arrowMarkerAbsolute),q=uc(q,m,Er(n.arrowMarkerAbsolute)),m){let R=f.select(u+" svg").node();q=pc(q,R)}else d||(q=Vn.default.sanitize(q,{ADD_TAGS:ac,ADD_ATTR:lc}));if(qi(),D)throw D;return p(),{diagramType:h,svg:q,bindFunctions:x.db.bindFunctions}},"render");function gc(e={}){let r=hr({},e);r?.fontFamily&&!r.themeVariables?.fontFamily&&(r.themeVariables||(r.themeVariables={}),r.themeVariables.fontFamily=r.fontFamily),yr(r),r?.theme&&r.theme in Ae?r.themeVariables=Ae[r.theme].getThemeVariables(r.themeVariables):r&&(r.themeVariables=Ae.default.getThemeVariables(r.themeVariables));let i=typeof r=="object"?xr(r):Ge();Ye(i.logLevel),ee()}o(gc,"initialize");var zn=o((e,r={})=>{let{code:i}=fr(e);return te.fromText(i,r)},"getDiagramFromText");function hc(e,r,i,t){zi(r,e),Ki(r,i,t,r.attr("id"))}o(hc,"addA11yInfo");var V=Object.freeze({render:dc,parse:cc,getDiagramFromText:zn,initialize:gc,getConfig:z,setConfig:vr,getSiteConfig:Ge,updateSiteConfig:Dr,reset:o(()=>{se()},"reset"),globalReset:o(()=>{se(Ue)},"globalReset"),defaultConfig:Ue});Ye(z().logLevel);se(z());var xc=o((e,r,i)=>{A.warn(e),$e(e)?(i&&i(e.str,e.hash),r.push({...e,message:e.str,error:e})):(i&&i(e),e instanceof Error&&r.push({str:e.message,message:e.message,hash:e.name,error:e}))},"handleError"),Kn=o(async function(e={querySelector:".mermaid"}){try{await yc(e)}catch(r){if($e(r)&&A.error(r.str),B.parseError&&B.parseError(r),!e.suppressErrors)throw A.error("Use the suppressErrors option to suppress these errors"),r}},"run"),yc=o(async function({postRenderCallback:e,querySelector:r,nodes:i}={querySelector:".mermaid"}){let t=V.getConfig();A.debug(`${e?"":"No "}Callback function found`);let n;if(i)n=i;else if(r)n=document.querySelectorAll(r);else throw new Error("Nodes and querySelector are both undefined");A.debug(`Found ${n.length} diagrams`),t?.startOnLoad!==void 0&&(A.debug("Start On Load: "+t?.startOnLoad),V.updateSiteConfig({startOnLoad:t?.startOnLoad}));let l=new W.InitIDGenerator(t.deterministicIds,t.deterministicIDSeed),a,c=[];for(let s of Array.from(n)){A.info("Rendering diagram: "+s.id);if(s.getAttribute("data-processed"))continue;s.setAttribute("data-processed","true");let u=`mermaid-${l.next()}`;a=s.innerHTML,a=pr(W.entityDecode(a)).trim().replace(//gi,"
");let p=W.detectInit(a);p&&A.debug("Detected early reinit: ",p);try{let{svg:f,bindFunctions:m}=await Zn(u,a,s);s.innerHTML=f,e&&await e(u),m&&m(s)}catch(f){xc(f,c,B.parseError)}}if(c.length>0)throw c[0]},"runThrowsErrors"),Wn=o(function(e){V.initialize(e)},"initialize"),Dc=o(async function(e,r,i){A.warn("mermaid.init is deprecated. Please use run instead."),e&&Wn(e);let t={postRenderCallback:i,querySelector:".mermaid"};typeof r=="string"?t.querySelector=r:r&&(r instanceof HTMLElement?t.nodes=[r]:t.nodes=r),await Kn(t)},"init"),vc=o(async(e,{lazyLoad:r=!0}={})=>{ee(),ve(...e),r===!1&&await Si()},"registerExternalDiagrams"),Xn=o(function(){if(B.startOnLoad){let{startOnLoad:e}=V.getConfig();e&&B.run().catch(r=>A.error("Mermaid failed to initialize",r))}},"contentLoaded");if(typeof document<"u"){window.addEventListener("load",Xn,!1)}var Ac=o(function(e){B.parseError=e},"setParseErrorHandler"),je=[],ur=!1,Qn=o(async()=>{if(!ur){for(ur=!0;je.length>0;){let e=je.shift();if(e)try{await e()}catch(r){A.error("Error executing queue",r)}}ur=!1}},"executeQueue"),Ec=o(async(e,r)=>new Promise((i,t)=>{let n=o(()=>new Promise((l,a)=>{V.parse(e,r).then(c=>{l(c),i(c)},c=>{A.error("Error parsing",c),B.parseError?.(c),a(c),t(c)})}),"performCall");je.push(n),Qn().catch(t)}),"parse"),Zn=o((e,r,i)=>new Promise((t,n)=>{let l=o(()=>new Promise((a,c)=>{V.render(e,r,i).then(s=>{a(s),t(s)},s=>{A.error("Error parsing",s),B.parseError?.(s),c(s),n(s)})}),"performCall");je.push(l),Qn().catch(n)}),"render"),B={startOnLoad:!0,mermaidAPI:V,parse:Ec,render:Zn,init:Dc,run:Kn,registerExternalDiagrams:vc,registerLayoutLoaders:Tr,initialize:Wn,parseError:void 0,contentLoaded:Xn,setParseErrorHandler:Ac,detectType:De},vu=B;export{vu as default}; /*! Check if previously processed */ /*! * Wait for document loaded before starting the execution */ /*! Bundled license information: js-yaml/dist/js-yaml.mjs: (*! js-yaml 4.1.0 https://github.com/nodeca/js-yaml @license MIT *) */




© 2015 - 2024 Weber Informatics LLC | Privacy Policy