rdesign/frontend/node_modules/mermaid/dist/chunks/mermaid.esm.min/chunk-W2A4CRWB.mjs

2 lines
1.9 KiB
JavaScript

import{a as c}from"./chunk-XBXGYYE5.mjs";import{y as p}from"./chunk-3UWU4A3N.mjs";import{h as l}from"./chunk-MGPAVIPZ.mjs";import{a as o,f as m}from"./chunk-VELTKBKT.mjs";var a=m(c(),1);var x=o((r,t)=>{let e=r.append("rect");if(e.attr("x",t.x),e.attr("y",t.y),e.attr("fill",t.fill),e.attr("stroke",t.stroke),e.attr("width",t.width),e.attr("height",t.height),t.name&&e.attr("name",t.name),t.rx&&e.attr("rx",t.rx),t.ry&&e.attr("ry",t.ry),t.attrs!==void 0)for(let n in t.attrs)e.attr(n,t.attrs[n]);return t.class&&e.attr("class",t.class),e},"drawRect"),g=o((r,t)=>{let e={x:t.startx,y:t.starty,width:t.stopx-t.startx,height:t.stopy-t.starty,fill:t.fill,stroke:t.stroke,class:"rect"};x(r,e).lower()},"drawBackgroundRect"),f=o((r,t)=>{let e=t.text.replace(p," "),n=r.append("text");n.attr("x",t.x),n.attr("y",t.y),n.attr("class","legend"),n.style("text-anchor",t.anchor),t.class&&n.attr("class",t.class);let s=n.append("tspan");return s.attr("x",t.x+t.textMargin*2),s.text(e),n},"drawText"),E=o((r,t,e,n)=>{let s=r.append("image");s.attr("x",t),s.attr("y",e);let i=(0,a.sanitizeUrl)(n);s.attr("xlink:href",i)},"drawImage"),h=o((r,t,e,n)=>{let s=r.append("use");s.attr("x",t),s.attr("y",e);let i=(0,a.sanitizeUrl)(n);s.attr("xlink:href",`#${i}`)},"drawEmbeddedImage"),u=o(()=>({x:0,y:0,width:100,height:100,fill:"#EDF2AE",stroke:"#666",anchor:"start",rx:0,ry:0}),"getNoteRect"),G=o(()=>({x:0,y:0,width:100,height:100,"text-anchor":"start",style:"#666",textMargin:0,rx:0,ry:0,tspan:!0}),"getTextObj"),T=o(()=>{let r=l(".mermaidTooltip");return r.empty()&&(r=l("body").append("div").attr("class","mermaidTooltip").style("opacity",0).style("position","absolute").style("text-align","center").style("max-width","200px").style("padding","2px").style("font-size","12px").style("background","#ffffde").style("border","1px solid #333").style("border-radius","2px").style("pointer-events","none").style("z-index","100")),r},"createTooltip");export{x as a,g as b,f as c,E as d,h as e,u as f,G as g,T as h};