"use strict";var X=Object.defineProperty;var K=Object.getOwnPropertySymbols;var Z=Object.prototype.hasOwnProperty,q=Object.prototype.propertyIsEnumerable;var U=(y,r,l)=>r in y?X(y,r,{enumerable:!0,configurable:!0,writable:!0,value:l}):y[r]=l,j=(y,r)=>{for(var l in r||(r={}))Z.call(r,l)&&U(y,l,r[l]);if(K)for(var l of K(r))q.call(r,l)&&U(y,l,r[l]);return y};var z=(y,r,l)=>new Promise((E,b)=>{var S=p=>{try{k(l.next(p))}catch(w){b(w)}},t=p=>{try{k(l.throw(p))}catch(w){b(w)}},k=p=>p.done?E(p.value):Promise.resolve(p.value).then(S,t);k((l=l.apply(y,r)).next())});(self.webpackChunk=self.webpackChunk||[]).push([["node_modules_mermaid_dist_classDiagram-v2-d4efdcc3_js"],{"./node_modules/mermaid/dist/classDiagram-v2-d4efdcc3.js":function(y,r,l){l.d(r,{diagram:function(){return Q}});var E=l("./node_modules/mermaid/dist/styles-8b67d7cb.js"),b=l("./node_modules/d3/src/index.js"),S=l("./node_modules/dagre-d3-es/src/graphlib/index.js"),t=l("./node_modules/mermaid/dist/mermaid-0d192ec3.js"),k=l("./node_modules/mermaid/dist/index-f9462f3f.js"),p=l("./node_modules/dayjs/dayjs.min.js"),w=l("./node_modules/@braintree/sanitize-url/dist/index.js"),ee=l("./node_modules/dompurify/dist/purify.js"),te=l("./node_modules/dagre-d3-es/src/dagre/index.js"),se=l("./node_modules/dagre-d3-es/src/graphlib/json.js");const L=a=>t.e.sanitizeText(a,(0,t.c)());let P={dividerMargin:10,padding:5,textHeight:10,curve:void 0};const Y=function(a,n,m,i){const e=Object.keys(a);t.l.info("keys:",e),t.l.info(a),e.forEach(function(c){var f;var o,_;const s=a[c],u={shape:"rect",id:s.id,domId:s.domId,labelText:L(s.id),labelStyle:"",style:"fill: none; stroke: black",padding:(f=(o=(0,t.c)().flowchart)==null?void 0:o.padding)!=null?f:(_=(0,t.c)().class)==null?void 0:_.padding};n.setNode(s.id,u),A(s.classes,n,m,i,s.id),t.l.info("setNode",u)})},A=function(a,n,m,i,e){const c=Object.keys(a);t.l.info("keys:",c),t.l.info(a),c.filter(o=>a[o].parent==e).forEach(function(o){var D,g;var _,s;const d=a[o],u=d.cssClasses.join(" "),f={labelStyle:"",style:""},T=(D=d.label)!=null?D:d.id,v=0,x="class_box",h={labelStyle:f.labelStyle,shape:x,labelText:L(T),classData:d,rx:v,ry:v,class:u,style:f.style,id:d.id,domId:d.domId,tooltip:i.db.getTooltip(d.id,e)||"",haveCallback:d.haveCallback,link:d.link,width:d.type==="group"?500:void 0,type:d.type,padding:(g=(_=(0,t.c)().flowchart)==null?void 0:_.padding)!=null?g:(s=(0,t.c)().class)==null?void 0:s.padding};n.setNode(d.id,h),e&&n.setParent(d.id,e),t.l.info("setNode",h)})},$=function(a,n,m,i){t.l.info(a),a.forEach(function(e,c){var g;var o,_;const s=e,d="",u={labelStyle:"",style:""},f=s.text,T=0,v="note",x={labelStyle:u.labelStyle,shape:v,labelText:L(f),noteData:s,rx:T,ry:T,class:d,style:u.style,id:s.id,domId:s.id,tooltip:"",type:"note",padding:(g=(o=(0,t.c)().flowchart)==null?void 0:o.padding)!=null?g:(_=(0,t.c)().class)==null?void 0:_.padding};if(n.setNode(s.id,x),t.l.info("setNode",x),!s.class||!(s.class in i))return;const h=m+c,D={id:`edgeNote${h}`,classes:"relation",pattern:"dotted",arrowhead:"none",startLabelRight:"",endLabelLeft:"",arrowTypeStart:"none",arrowTypeEnd:"none",style:"fill:none",labelStyle:"",curve:(0,t.n)(P.curve,b.c_6)};n.setEdge(s.id,s.class,D,h)})},G=function(a,n){const m=(0,t.c)().flowchart;let i=0;a.forEach(function(e){var _;var c;i++;const o={classes:"relation",pattern:e.relation.lineType==1?"dashed":"solid",id:"id"+i,arrowhead:e.type==="arrow_open"?"none":"normal",startLabelRight:e.relationTitle1==="none"?"":e.relationTitle1,endLabelLeft:e.relationTitle2==="none"?"":e.relationTitle2,arrowTypeStart:I(e.relation.type1),arrowTypeEnd:I(e.relation.type2),style:"fill:none",labelStyle:"",curve:(0,t.n)(m==null?void 0:m.curve,b.c_6)};if(t.l.info(o,e),e.style!==void 0){const s=(0,t.k)(e.style);o.style=s.style,o.labelStyle=s.labelStyle}e.text=e.title,e.text===void 0?e.style!==void 0&&(o.arrowheadStyle="fill: #333"):(o.arrowheadStyle="fill: #333",o.labelpos="c",((_=(c=(0,t.c)().flowchart)==null?void 0:c.htmlLabels)!=null?_:(0,t.c)().htmlLabels)?(o.labelType="html",o.label='<span class="edgeLabel">'+e.text+"</span>"):(o.labelType="text",o.label=e.text.replace(t.e.lineBreakRegex,`
`),e.style===void 0&&(o.style=o.style||"stroke: #333; stroke-width: 1.5px;fill:none"),o.labelStyle=o.labelStyle.replace("color:","fill:"))),n.setEdge(e.id1,e.id2,o,i)})},H=function(a){P=j(j({},P),a)},F=function(a,n,m,i){return z(this,null,function*(){var g,O,R,B;t.l.info("Drawing class - ",n);const e=(g=(0,t.c)().flowchart)!=null?g:(0,t.c)().class,c=(0,t.c)().securityLevel;t.l.info("config:",e);const o=(O=e==null?void 0:e.nodeSpacing)!=null?O:50,_=(R=e==null?void 0:e.rankSpacing)!=null?R:50,s=new S.k({multigraph:!0,compound:!0}).setGraph({rankdir:i.db.getDirection(),nodesep:o,ranksep:_,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}}),d=i.db.getNamespaces(),u=i.db.getClasses(),f=i.db.getRelations(),T=i.db.getNotes();t.l.info(f),Y(d,s,n,i),A(u,s,n,i),G(f,s),$(T,s,f.length+1,u);let v;c==="sandbox"&&(v=(0,b.Ys)("#i"+n));const x=c==="sandbox"?(0,b.Ys)(v.nodes()[0].contentDocument.body):(0,b.Ys)("body"),h=x.select(`[id="${n}"]`),D=x.select("#"+n+" g");if(yield(0,k.r)(D,s,["aggregation","extension","composition","dependency","lollipop"],"classDiagram",n),t.u.insertTitle(h,"classTitleText",(B=e==null?void 0:e.titleTopMargin)!=null?B:5,i.db.getDiagramTitle()),(0,t.o)(s,h,e==null?void 0:e.diagramPadding,e==null?void 0:e.useMaxWidth),!(e!=null&&e.htmlLabels)){const N=c==="sandbox"?v.nodes()[0].contentDocument:document,V=N.querySelectorAll('[id="'+n+'"] .edgeLabel .label');for(const C of V){const W=C.getBBox(),M=N.createElementNS("http://www.w3.org/2000/svg","rect");M.setAttribute("rx",0),M.setAttribute("ry",0),M.setAttribute("width",W.width),M.setAttribute("height",W.height),C.insertBefore(M,C.firstChild)}}})};function I(a){let n;switch(a){case 0:n="aggregation";break;case 1:n="extension";break;case 2:n="composition";break;case 3:n="dependency";break;case 4:n="lollipop";break;default:n="none"}return n}const J={setConf:H,draw:F},Q={parser:E.p,db:E.d,renderer:J,styles:E.s,init:a=>{a.class||(a.class={}),a.class.arrowMarkerAbsolute=a.arrowMarkerAbsolute,E.d.clear()}}}}]);
