agentic-mermaid 0.3.2 → 0.4.0

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.
Files changed (56) hide show
  1. package/CHANGELOG.md +102 -0
  2. package/dist/agent-core.d.ts +2 -2
  3. package/dist/agent-core.js +2 -2
  4. package/dist/agent.d.ts +2 -2
  5. package/dist/agent.js +4 -4
  6. package/dist/agentic-mermaid-mcp.js +5 -5
  7. package/dist/am.js +6 -6
  8. package/dist/browser-lazy/chunks/{architecture-WMSX5L4P.js → architecture-NUJTDJJ7.js} +1 -1
  9. package/dist/browser-lazy/chunks/{chunk-TBZAU7KC.js → chunk-2W3BS3M3.js} +1 -1
  10. package/dist/browser-lazy/chunks/{chunk-TEH2PRKN.js → chunk-4RLZTVJP.js} +1 -1
  11. package/dist/browser-lazy/chunks/{chunk-W6Q4PHPC.js → chunk-4ZURJQXD.js} +1 -1
  12. package/dist/browser-lazy/chunks/{chunk-32FWKUUV.js → chunk-55F5M5XA.js} +1 -1
  13. package/dist/browser-lazy/chunks/{chunk-QMZ4Y6I7.js → chunk-5QI4P3EJ.js} +1 -1
  14. package/dist/browser-lazy/chunks/{chunk-AOCFMYYH.js → chunk-6LBHOBXT.js} +1 -1
  15. package/dist/browser-lazy/chunks/{chunk-TDGTBGV3.js → chunk-ASPYKC6M.js} +1 -1
  16. package/dist/browser-lazy/chunks/{chunk-EX6TP7QM.js → chunk-DQHK4JCG.js} +2 -2
  17. package/dist/browser-lazy/chunks/{chunk-RLS545DI.js → chunk-EKHEVTE2.js} +1 -1
  18. package/dist/browser-lazy/chunks/{chunk-QYJMRNS3.js → chunk-HO5GDIPN.js} +1 -1
  19. package/dist/browser-lazy/chunks/{chunk-WN7SFUCZ.js → chunk-N2K2BPQT.js} +1 -1
  20. package/dist/browser-lazy/chunks/{chunk-CCTZFX43.js → chunk-OLQF6DTZ.js} +1 -1
  21. package/dist/browser-lazy/chunks/{chunk-ZZECLXC3.js → chunk-TCPK32QH.js} +1 -1
  22. package/dist/browser-lazy/chunks/{chunk-ANTNEVJC.js → chunk-UO3RFEMI.js} +1 -1
  23. package/dist/browser-lazy/chunks/{chunk-EBPTM2RP.js → chunk-ZMPTJUXS.js} +1 -1
  24. package/dist/browser-lazy/chunks/{class-7JRALQIM.js → class-ABIOBAFL.js} +1 -1
  25. package/dist/browser-lazy/chunks/{er-UDCGHKBX.js → er-CX3NGEC2.js} +1 -1
  26. package/dist/browser-lazy/chunks/{flowchart-5FP7RRIK.js → flowchart-ML54IJ7F.js} +1 -1
  27. package/dist/browser-lazy/chunks/{gantt-NTOIC5CW.js → gantt-ZMOMOTF6.js} +1 -1
  28. package/dist/browser-lazy/chunks/{gitgraph-JYAPXUIJ.js → gitgraph-OBTCRWCA.js} +1 -1
  29. package/dist/browser-lazy/chunks/{journey-646EFIB6.js → journey-RJBHWLRG.js} +1 -1
  30. package/dist/browser-lazy/chunks/{mindmap-2SBTQHQO.js → mindmap-YXHLCHOO.js} +1 -1
  31. package/dist/browser-lazy/chunks/{pie-7FDXZ24K.js → pie-TN2QOLSL.js} +1 -1
  32. package/dist/browser-lazy/chunks/{quadrant-72UT4XAW.js → quadrant-QE5JZ4H2.js} +1 -1
  33. package/dist/browser-lazy/chunks/{radar-SU7BO56J.js → radar-ZPV6O27I.js} +1 -1
  34. package/dist/browser-lazy/chunks/{render-core-Q2JWXDDL.js → render-core-VPMAH3HT.js} +1 -1
  35. package/dist/browser-lazy/chunks/{sequence-5O5ET264.js → sequence-4AERT525.js} +1 -1
  36. package/dist/browser-lazy/chunks/{state-IWPLFQ6R.js → state-67TZ7USF.js} +1 -1
  37. package/dist/browser-lazy/chunks/{timeline-WJWYHH5Y.js → timeline-AHOAT7ZL.js} +1 -1
  38. package/dist/browser-lazy/chunks/{xychart-HHQVQA5O.js → xychart-YUY3CPT2.js} +1 -1
  39. package/dist/browser-lazy/index.js +1 -1
  40. package/dist/browser.global.js +5 -5
  41. package/dist/{chunk-GX7UT56Q.js → chunk-M3VTTD3Q.js} +2 -2
  42. package/dist/{chunk-3D4EHVQ4.js → chunk-PG4PTPJL.js} +7 -7
  43. package/dist/{chunk-R5U67OIW.js → chunk-QWCD67AZ.js} +4 -4
  44. package/dist/{chunk-IVN6KP3W.js → chunk-SDJYD4OP.js} +2 -2
  45. package/dist/{chunk-YWKCUBQN.js → chunk-UKLKEZBJ.js} +2 -2
  46. package/dist/{chunk-NE6JBHSE.js → chunk-WMFFVZ4Q.js} +35 -44
  47. package/dist/{index-BFg_LoZS.d.ts → index-BoqfBufn.d.ts} +1 -1
  48. package/dist/index.d.ts +1 -1
  49. package/dist/index.js +1 -1
  50. package/dist/mcp-cli-YOAFIAVD.js +17 -0
  51. package/docs/style-authoring.md +1 -1
  52. package/package.json +12 -1
  53. package/server.json +2 -2
  54. package/skills/agentic-mermaid-diagram-workflow/SKILL.md +64 -1
  55. package/skills/agentic-mermaid-diagram-workflow/references/hosted-mcp.md +110 -0
  56. package/dist/mcp-cli-XGZP6CMW.js +0 -17
@@ -1,4 +1,4 @@
1
- import{a as Qn,b as $}from"./chunk-RLS545DI.js";import{a as Hn}from"./chunk-WN7SFUCZ.js";import{b as Wn,c as qn}from"./chunk-QYJMRNS3.js";import{b as vn}from"./chunk-T7IJ6V4B.js";import"./chunk-5Q4S74UO.js";import"./chunk-STQRDZ67.js";import{a as mn,b as hn}from"./chunk-A7L4WWVW.js";import{a as Ot,b as kn,c as On}from"./chunk-EBPTM2RP.js";import{b as dn,c as pn}from"./chunk-KJVNXJ5Y.js";import"./chunk-M6BT2HIP.js";import{a as Un,b as Jn,c as Xn,d as Kn,f as Yn,g as Zn}from"./chunk-QMZ4Y6I7.js";import{b as un,d as fn,f as Rt}from"./chunk-FFOHLPDA.js";import{b as wt,c as Et}from"./chunk-I6VE56S7.js";import"./chunk-FLD63DXE.js";import"./chunk-32FWKUUV.js";import{$ as Xe,A as Rn,Aa as In,B as xt,Ba as ie,C as Ie,Ca as Pn,Da as Nn,E as kt,Ea as jn,Fa as Ln,Ga as _n,Ha as zn,Ia as Bn,Ja as Gn,K as xn,Ka as Vn,O as z,R as vt,S as wn,d as yn,da as En,g as gn,ga as Mn,h as bn,ha as re,ra as Cn,sa as An,ta as Fn,ua as $n,va as Tn,w as Sn,x as Je,za as Dn}from"./chunk-EX6TP7QM.js";import{e as He,f as Ue}from"./chunk-P7HMSKHJ.js";function Mt(e,t,n){if(e&&e.length){let[r,i]=t,o=Math.PI/180*n,a=Math.cos(o),s=Math.sin(o);for(let d of e){let[l,c]=d;d[0]=(l-r)*a-(c-i)*s+r,d[1]=(l-r)*s+(c-i)*a+i}}}function vi(e,t,n){let r=[];e.forEach(i=>r.push(...i)),Mt(r,t,n)}function wi(e,t){return e[0]===t[0]&&e[1]===t[1]}function er(e,t,n,r=1){let i=n,o=Math.max(t,.1),a=e[0]&&e[0][0]&&typeof e[0][0]=="number"?[e]:e,s=[0,0];if(i)for(let l of a)Mt(l,s,i);let d=Ei(a,o,r);if(i){for(let l of a)Mt(l,s,-i);vi(d,s,-i)}return d}function Ei(e,t,n){let r=[];for(let l of e){let c=[...l];wi(c[0],c[c.length-1])||c.push([c[0][0],c[0][1]]),c.length>2&&r.push(c)}let i=[];t=Math.max(t,.1);let o=[];for(let l of r)for(let c=0;c<l.length-1;c++){let p=l[c],u=l[c+1];if(p[1]!==u[1]){let f=Math.min(p[1],u[1]);o.push({ymin:f,ymax:Math.max(p[1],u[1]),x:f===p[1]?p[0]:u[0],islope:(u[0]-p[0])/(u[1]-p[1])})}}if(o.sort((l,c)=>l.ymin<c.ymin?-1:l.ymin>c.ymin?1:l.x<c.x?-1:l.x>c.x?1:l.ymax===c.ymax?0:(l.ymax-c.ymax)/Math.abs(l.ymax-c.ymax)),!o.length)return i;let a=[],s=o[0].ymin,d=0;for(;a.length||o.length;){if(o.length){let l=-1;for(let p=0;p<o.length&&!(o[p].ymin>s);p++)l=p;o.splice(0,l+1).forEach(p=>{a.push({s,edge:p})})}if(a=a.filter(l=>!(l.edge.ymax<=s)),a.sort((l,c)=>l.edge.x===c.edge.x?0:(l.edge.x-c.edge.x)/Math.abs(l.edge.x-c.edge.x)),(n!==1||d%t===0)&&a.length>1)for(let l=0;l<a.length;l=l+2){let c=l+1;if(c>=a.length)break;let p=a[l].edge,u=a[c].edge;i.push([[Math.round(p.x),s],[Math.round(u.x),s]])}s+=n,a.forEach(l=>{l.edge.x=l.edge.x+n*l.edge.islope}),d++}return i}function X(e,t){var n;let r=t.hachureAngle+90,i=t.hachureGap;i<0&&(i=t.strokeWidth*4),i=Math.round(Math.max(i,.1));let o=1;return t.roughness>=1&&(((n=t.randomizer)===null||n===void 0?void 0:n.next())||Math.random())>.7&&(o=i),er(e,i,r,o||1)}var oe=class{constructor(t){this.helper=t}fillPolygons(t,n){return this._fillPolygons(t,n)}_fillPolygons(t,n){let r=X(t,n);return{type:"fillSketch",ops:this.renderLines(r,n)}}renderLines(t,n){let r=[];for(let i of t)r.push(...this.helper.doubleLineOps(i[0][0],i[0][1],i[1][0],i[1][1],n));return r}};function se(e){let t=e[0],n=e[1];return Math.sqrt(Math.pow(t[0]-n[0],2)+Math.pow(t[1]-n[1],2))}var Ke=class extends oe{fillPolygons(t,n){let r=n.hachureGap;r<0&&(r=n.strokeWidth*4),r=Math.max(r,.1);let i=Object.assign({},n,{hachureGap:r}),o=X(t,i),a=Math.PI/180*n.hachureAngle,s=[],d=r*.5*Math.cos(a),l=r*.5*Math.sin(a);for(let[p,u]of o)se([p,u])&&s.push([[p[0]-d,p[1]+l],[...u]],[[p[0]+d,p[1]-l],[...u]]);return{type:"fillSketch",ops:this.renderLines(s,n)}}};var Ye=class extends oe{fillPolygons(t,n){let r=this._fillPolygons(t,n),i=Object.assign({},n,{hachureAngle:n.hachureAngle+90}),o=this._fillPolygons(t,i);return r.ops=r.ops.concat(o.ops),r}};var Ze=class{constructor(t){this.helper=t}fillPolygons(t,n){n=Object.assign({},n,{hachureAngle:0});let r=X(t,n);return this.dotsOnLines(r,n)}dotsOnLines(t,n){let r=[],i=n.hachureGap;i<0&&(i=n.strokeWidth*4),i=Math.max(i,.1);let o=n.fillWeight;o<0&&(o=n.strokeWidth/2);let a=i/4;for(let s of t){let d=se(s),l=d/i,c=Math.ceil(l)-1,p=d-c*i,u=(s[0][0]+s[1][0])/2-i/4,f=Math.min(s[0][1],s[1][1]);for(let m=0;m<c;m++){let h=f+p+m*i,y=u-a+Math.random()*2*a,g=h-a+Math.random()*2*a,S=this.helper.ellipse(y,g,o,o,n);r.push(...S.ops)}}return{type:"fillSketch",ops:r}}};var Qe=class{constructor(t){this.helper=t}fillPolygons(t,n){let r=X(t,n);return{type:"fillSketch",ops:this.dashedLine(r,n)}}dashedLine(t,n){let r=n.dashOffset<0?n.hachureGap<0?n.strokeWidth*4:n.hachureGap:n.dashOffset,i=n.dashGap<0?n.hachureGap<0?n.strokeWidth*4:n.hachureGap:n.dashGap,o=[];return t.forEach(a=>{let s=se(a),d=Math.floor(s/(r+i)),l=(s+i-d*(r+i))/2,c=a[0],p=a[1];c[0]>p[0]&&(c=a[1],p=a[0]);let u=Math.atan((p[1]-c[1])/(p[0]-c[0]));for(let f=0;f<d;f++){let m=f*(r+i),h=m+r,y=[c[0]+m*Math.cos(u)+l*Math.cos(u),c[1]+m*Math.sin(u)+l*Math.sin(u)],g=[c[0]+h*Math.cos(u)+l*Math.cos(u),c[1]+h*Math.sin(u)+l*Math.sin(u)];o.push(...this.helper.doubleLineOps(y[0],y[1],g[0],g[1],n))}}),o}};var et=class{constructor(t){this.helper=t}fillPolygons(t,n){let r=n.hachureGap<0?n.strokeWidth*4:n.hachureGap,i=n.zigzagOffset<0?r:n.zigzagOffset;n=Object.assign({},n,{hachureGap:r+i});let o=X(t,n);return{type:"fillSketch",ops:this.zigzagLines(o,i,n)}}zigzagLines(t,n,r){let i=[];return t.forEach(o=>{let a=se(o),s=Math.round(a/(2*n)),d=o[0],l=o[1];d[0]>l[0]&&(d=o[1],l=o[0]);let c=Math.atan((l[1]-d[1])/(l[0]-d[0]));for(let p=0;p<s;p++){let u=p*2*n,f=(p+1)*2*n,m=Math.sqrt(2*Math.pow(n,2)),h=[d[0]+u*Math.cos(c),d[1]+u*Math.sin(c)],y=[d[0]+f*Math.cos(c),d[1]+f*Math.sin(c)],g=[h[0]+m*Math.cos(c+Math.PI/4),h[1]+m*Math.sin(c+Math.PI/4)];i.push(...this.helper.doubleLineOps(h[0],h[1],g[0],g[1],r),...this.helper.doubleLineOps(g[0],g[1],y[0],y[1],r))}}),i}};var j={};function tr(e,t){let n=e.fillStyle||"hachure";if(!j[n])switch(n){case"zigzag":j[n]||(j[n]=new Ke(t));break;case"cross-hatch":j[n]||(j[n]=new Ye(t));break;case"dots":j[n]||(j[n]=new Ze(t));break;case"dashed":j[n]||(j[n]=new Qe(t));break;case"zigzag-line":j[n]||(j[n]=new et(t));break;default:n="hachure",j[n]||(j[n]=new oe(t));break}return j[n]}function nr(){return Math.floor(Math.random()*2**31)}var tt=class{constructor(t){this.seed=t}next(){return this.seed?(2**31-1&(this.seed=Math.imul(48271,this.seed)))/2**31:Math.random()}};var nt={A:7,a:7,C:6,c:6,H:1,h:1,L:2,l:2,M:2,m:2,Q:4,q:4,S:4,s:4,T:2,t:2,V:1,v:1,Z:0,z:0};function Mi(e){let t=new Array;for(;e!=="";)if(e.match(/^([ \t\r\n,]+)/))e=e.substr(RegExp.$1.length);else if(e.match(/^([aAcChHlLmMqQsStTvVzZ])/))t[t.length]={type:0,text:RegExp.$1},e=e.substr(RegExp.$1.length);else if(e.match(/^(([-+]?[0-9]+(\.[0-9]*)?|[-+]?\.[0-9]+)([eE][-+]?[0-9]+)?)/))t[t.length]={type:1,text:`${parseFloat(RegExp.$1)}`},e=e.substr(RegExp.$1.length);else return[];return t[t.length]={type:2,text:""},t}function Ct(e,t){return e.type===t}function ve(e){let t=[],n=Mi(e),r="BOD",i=0,o=n[i];for(;!Ct(o,2);){let a=0,s=[];if(r==="BOD")if(o.text==="M"||o.text==="m")i++,a=nt[o.text],r=o.text;else return ve("M0,0"+e);else Ct(o,1)?a=nt[r]:(i++,a=nt[o.text],r=o.text);if(i+a<n.length){for(let d=i;d<i+a;d++){let l=n[d];if(Ct(l,1))s[s.length]=+l.text;else throw new Error("Param not a number: "+r+","+l.text)}if(typeof nt[r]=="number"){let d={key:r,data:s};t.push(d),i+=a,o=n[i],r==="M"&&(r="L"),r==="m"&&(r="l")}else throw new Error("Bad segment: "+r)}else throw new Error("Path data ended short")}return t}function Pe(e){let t=0,n=0,r=0,i=0,o=[];for(let{key:a,data:s}of e)switch(a){case"M":o.push({key:"M",data:[...s]}),[t,n]=s,[r,i]=s;break;case"m":t+=s[0],n+=s[1],o.push({key:"M",data:[t,n]}),r=t,i=n;break;case"L":o.push({key:"L",data:[...s]}),[t,n]=s;break;case"l":t+=s[0],n+=s[1],o.push({key:"L",data:[t,n]});break;case"C":o.push({key:"C",data:[...s]}),t=s[4],n=s[5];break;case"c":{let d=s.map((l,c)=>c%2?l+n:l+t);o.push({key:"C",data:d}),t=d[4],n=d[5];break}case"Q":o.push({key:"Q",data:[...s]}),t=s[2],n=s[3];break;case"q":{let d=s.map((l,c)=>c%2?l+n:l+t);o.push({key:"Q",data:d}),t=d[2],n=d[3];break}case"A":o.push({key:"A",data:[...s]}),t=s[5],n=s[6];break;case"a":t+=s[5],n+=s[6],o.push({key:"A",data:[s[0],s[1],s[2],s[3],s[4],t,n]});break;case"H":o.push({key:"H",data:[...s]}),t=s[0];break;case"h":t+=s[0],o.push({key:"H",data:[t]});break;case"V":o.push({key:"V",data:[...s]}),n=s[0];break;case"v":n+=s[0],o.push({key:"V",data:[n]});break;case"S":o.push({key:"S",data:[...s]}),t=s[2],n=s[3];break;case"s":{let d=s.map((l,c)=>c%2?l+n:l+t);o.push({key:"S",data:d}),t=d[2],n=d[3];break}case"T":o.push({key:"T",data:[...s]}),t=s[0],n=s[1];break;case"t":t+=s[0],n+=s[1],o.push({key:"T",data:[t,n]});break;case"Z":case"z":o.push({key:"Z",data:[]}),t=r,n=i;break}return o}function je(e){let t=[],n="",r=0,i=0,o=0,a=0,s=0,d=0;for(let{key:l,data:c}of e){switch(l){case"M":t.push({key:"M",data:[...c]}),[r,i]=c,[o,a]=c;break;case"C":t.push({key:"C",data:[...c]}),r=c[4],i=c[5],s=c[2],d=c[3];break;case"L":t.push({key:"L",data:[...c]}),[r,i]=c;break;case"H":r=c[0],t.push({key:"L",data:[r,i]});break;case"V":i=c[0],t.push({key:"L",data:[r,i]});break;case"S":{let p=0,u=0;n==="C"||n==="S"?(p=r+(r-s),u=i+(i-d)):(p=r,u=i),t.push({key:"C",data:[p,u,...c]}),s=c[0],d=c[1],r=c[2],i=c[3];break}case"T":{let[p,u]=c,f=0,m=0;n==="Q"||n==="T"?(f=r+(r-s),m=i+(i-d)):(f=r,m=i);let h=r+2*(f-r)/3,y=i+2*(m-i)/3,g=p+2*(f-p)/3,S=u+2*(m-u)/3;t.push({key:"C",data:[h,y,g,S,p,u]}),s=f,d=m,r=p,i=u;break}case"Q":{let[p,u,f,m]=c,h=r+2*(p-r)/3,y=i+2*(u-i)/3,g=f+2*(p-f)/3,S=m+2*(u-m)/3;t.push({key:"C",data:[h,y,g,S,f,m]}),s=p,d=u,r=f,i=m;break}case"A":{let p=Math.abs(c[0]),u=Math.abs(c[1]),f=c[2],m=c[3],h=c[4],y=c[5],g=c[6];p===0||u===0?(t.push({key:"C",data:[r,i,y,g,y,g]}),r=y,i=g):(r!==y||i!==g)&&(rr(r,i,y,g,p,u,f,m,h).forEach(function(k){t.push({key:"C",data:k})}),r=y,i=g);break}case"Z":t.push({key:"Z",data:[]}),r=o,i=a;break}n=l}return t}function Ci(e){return Math.PI*e/180}function Ne(e,t,n){let r=e*Math.cos(n)-t*Math.sin(n),i=e*Math.sin(n)+t*Math.cos(n);return[r,i]}function rr(e,t,n,r,i,o,a,s,d,l){let c=Ci(a),p=[],u=0,f=0,m=0,h=0;if(l)[u,f,m,h]=l;else{[e,t]=Ne(e,t,-c),[n,r]=Ne(n,r,-c);let w=(e-n)/2,x=(t-r)/2,A=w*w/(i*i)+x*x/(o*o);A>1&&(A=Math.sqrt(A),i=A*i,o=A*o);let U=s===d?-1:1,F=i*i,R=o*o,Te=F*R-F*x*x-R*w*w,J=F*x*x+R*w*w,ne=U*Math.sqrt(Math.abs(Te/J));m=ne*i*x/o+(e+n)/2,h=ne*-o*w/i+(t+r)/2,u=Math.asin(parseFloat(((t-h)/o).toFixed(9))),f=Math.asin(parseFloat(((r-h)/o).toFixed(9))),e<m&&(u=Math.PI-u),n<m&&(f=Math.PI-f),u<0&&(u=Math.PI*2+u),f<0&&(f=Math.PI*2+f),d&&u>f&&(u=u-Math.PI*2),!d&&f>u&&(f=f-Math.PI*2)}let y=f-u;if(Math.abs(y)>Math.PI*120/180){let w=f,x=n,A=r;d&&f>u?f=u+Math.PI*120/180*1:f=u+Math.PI*120/180*-1,n=m+i*Math.cos(f),r=h+o*Math.sin(f),p=rr(n,r,x,A,i,o,a,0,d,[f,w,m,h])}y=f-u;let g=Math.cos(u),S=Math.sin(u),k=Math.cos(f),H=Math.sin(f),v=Math.tan(y/4),L=4/3*i*v,Y=4/3*o*v,_=[e,t],N=[e+L*S,t-Y*g],C=[n+L*H,r-Y*k],G=[n,r];if(N[0]=2*_[0]-N[0],N[1]=2*_[1]-N[1],l)return[N,C,G].concat(p);{p=[N,C,G].concat(p);let w=[];for(let x=0;x<p.length;x+=3){let A=Ne(p[x][0],p[x][1],c),U=Ne(p[x+1][0],p[x+1][1],c),F=Ne(p[x+2][0],p[x+2][1],c);w.push([A[0],A[1],U[0],U[1],F[0],F[1]])}return w}}var Ai={randOffset:Ti,randOffsetWithRange:Di,ellipse:$i,doubleLineOps:Ii};function Ft(e,t,n,r,i){return{type:"path",ops:ae(e,t,n,r,i)}}function Le(e,t,n){let r=(e||[]).length;if(r>2){let i=[];for(let o=0;o<r-1;o++)i.push(...ae(e[o][0],e[o][1],e[o+1][0],e[o+1][1],n));return t&&i.push(...ae(e[r-1][0],e[r-1][1],e[0][0],e[0][1],n)),{type:"path",ops:i}}else if(r===2)return Ft(e[0][0],e[0][1],e[1][0],e[1][1],n);return{type:"path",ops:[]}}function Fi(e,t){return Le(e,!0,t)}function ar(e,t,n,r,i){let o=[[e,t],[e+n,t],[e+n,t+r],[e,t+r]];return Fi(o,i)}function $t(e,t){if(e.length){let r=typeof e[0][0]=="number"?[e]:e,i=rt(r[0],1*(1+t.roughness*.2),t),o=t.disableMultiStroke?[]:rt(r[0],1.5*(1+t.roughness*.22),ir(t));for(let a=1;a<r.length;a++){let s=r[a];if(s.length){let d=rt(s,1*(1+t.roughness*.2),t),l=t.disableMultiStroke?[]:rt(s,1.5*(1+t.roughness*.22),ir(t));for(let c of d)c.op!=="move"&&i.push(c);for(let c of l)c.op!=="move"&&o.push(c)}}return{type:"path",ops:i.concat(o)}}return{type:"path",ops:[]}}function $i(e,t,n,r,i){let o=Tt(n,r,i);return st(e,t,i,o).opset}function Tt(e,t,n){let r=Math.sqrt(Math.PI*2*Math.sqrt((Math.pow(e/2,2)+Math.pow(t/2,2))/2)),i=Math.ceil(Math.max(n.curveStepCount,n.curveStepCount/Math.sqrt(200)*r)),o=Math.PI*2/i,a=Math.abs(e/2),s=Math.abs(t/2),d=1-n.curveFitting;return a+=b(a*d,n),s+=b(s*d,n),{increment:o,rx:a,ry:s}}function st(e,t,n,r){let[i,o]=or(r.increment,e,t,r.rx,r.ry,1,r.increment*it(.1,it(.4,1,n),n),n),a=ot(i,null,n);if(!n.disableMultiStroke&&n.roughness!==0){let[s]=or(r.increment,e,t,r.rx,r.ry,1.5,0,n),d=ot(s,null,n);a=a.concat(d)}return{estimatedPoints:o,opset:{type:"path",ops:a}}}function Dt(e,t,n,r,i,o,a,s,d){let l=e,c=t,p=Math.abs(n/2),u=Math.abs(r/2);p+=b(p*.01,d),u+=b(u*.01,d);let f=i,m=o;for(;f<0;)f+=Math.PI*2,m+=Math.PI*2;m-f>Math.PI*2&&(f=0,m=Math.PI*2);let h=Math.PI*2/d.curveStepCount,y=Math.min(h/2,(m-f)/2),g=sr(y,l,c,p,u,f,m,1,d);if(!d.disableMultiStroke){let S=sr(y,l,c,p,u,f,m,1.5,d);g.push(...S)}return a&&(s?g.push(...ae(l,c,l+p*Math.cos(f),c+u*Math.sin(f),d),...ae(l,c,l+p*Math.cos(m),c+u*Math.sin(m),d)):g.push({op:"lineTo",data:[l,c]},{op:"lineTo",data:[l+p*Math.cos(f),c+u*Math.sin(f)]})),{type:"path",ops:g}}function It(e,t){let n=je(Pe(ve(e))),r=[],i=[0,0],o=[0,0];for(let{key:a,data:s}of n)switch(a){case"M":{o=[s[0],s[1]],i=[s[0],s[1]];break}case"L":r.push(...ae(o[0],o[1],s[0],s[1],t)),o=[s[0],s[1]];break;case"C":{let[d,l,c,p,u,f]=s;r.push(...Pi(d,l,c,p,u,f,o,t)),o=[u,f];break}case"Z":r.push(...ae(o[0],o[1],i[0],i[1],t)),o=[i[0],i[1]];break}return{type:"path",ops:r}}function at(e,t){let n=[];for(let r of e)if(r.length){let i=t.maxRandomnessOffset||0,o=r.length;if(o>2){n.push({op:"move",data:[r[0][0]+b(i,t),r[0][1]+b(i,t)]});for(let a=1;a<o;a++)n.push({op:"lineTo",data:[r[a][0]+b(i,t),r[a][1]+b(i,t)]})}}return{type:"fillPath",ops:n}}function ye(e,t){return tr(t,Ai).fillPolygons(e,t)}function cr(e,t,n,r,i,o,a){let s=e,d=t,l=Math.abs(n/2),c=Math.abs(r/2);l+=b(l*.01,a),c+=b(c*.01,a);let p=i,u=o;for(;p<0;)p+=Math.PI*2,u+=Math.PI*2;u-p>Math.PI*2&&(p=0,u=Math.PI*2);let f=(u-p)/a.curveStepCount,m=[];for(let h=p;h<=u;h=h+f)m.push([s+l*Math.cos(h),d+c*Math.sin(h)]);return m.push([s+l*Math.cos(u),d+c*Math.sin(u)]),m.push([s,d]),ye([m],a)}function Ti(e,t){return b(e,t)}function Di(e,t,n){return it(e,t,n)}function Ii(e,t,n,r,i){return ae(e,t,n,r,i,!0)}function ir(e){let t=Object.assign({},e);return t.randomizer=void 0,e.seed&&(t.seed=e.seed+1),t}function lr(e){return e.randomizer||(e.randomizer=new tt(e.seed||0)),e.randomizer.next()}function it(e,t,n,r=1){return n.roughness*r*(lr(n)*(t-e)+e)}function b(e,t,n=1){return it(-e,e,t,n)}function ae(e,t,n,r,i,o=!1){let a=o?i.disableMultiStrokeFill:i.disableMultiStroke,s=At(e,t,n,r,i,!0,!1);if(a)return s;let d=At(e,t,n,r,i,!0,!0);return s.concat(d)}function At(e,t,n,r,i,o,a){let s=Math.pow(e-n,2)+Math.pow(t-r,2),d=Math.sqrt(s),l=1;d<200?l=1:d>500?l=.4:l=-.0016668*d+1.233334;let c=i.maxRandomnessOffset||0;c*c*100>s&&(c=d/10);let p=c/2,u=.2+lr(i)*.2,f=i.bowing*i.maxRandomnessOffset*(r-t)/200,m=i.bowing*i.maxRandomnessOffset*(e-n)/200;f=b(f,i,l),m=b(m,i,l);let h=[],y=()=>b(p,i,l),g=()=>b(c,i,l),S=i.preserveVertices;return o&&(a?h.push({op:"move",data:[e+(S?0:y()),t+(S?0:y())]}):h.push({op:"move",data:[e+(S?0:b(c,i,l)),t+(S?0:b(c,i,l))]})),a?h.push({op:"bcurveTo",data:[f+e+(n-e)*u+y(),m+t+(r-t)*u+y(),f+e+2*(n-e)*u+y(),m+t+2*(r-t)*u+y(),n+(S?0:y()),r+(S?0:y())]}):h.push({op:"bcurveTo",data:[f+e+(n-e)*u+g(),m+t+(r-t)*u+g(),f+e+2*(n-e)*u+g(),m+t+2*(r-t)*u+g(),n+(S?0:g()),r+(S?0:g())]}),h}function rt(e,t,n){if(!e.length)return[];let r=[];r.push([e[0][0]+b(t,n),e[0][1]+b(t,n)]),r.push([e[0][0]+b(t,n),e[0][1]+b(t,n)]);for(let i=1;i<e.length;i++)r.push([e[i][0]+b(t,n),e[i][1]+b(t,n)]),i===e.length-1&&r.push([e[i][0]+b(t,n),e[i][1]+b(t,n)]);return ot(r,null,n)}function ot(e,t,n){let r=e.length,i=[];if(r>3){let o=[],a=1-n.curveTightness;i.push({op:"move",data:[e[1][0],e[1][1]]});for(let s=1;s+2<r;s++){let d=e[s];o[0]=[d[0],d[1]],o[1]=[d[0]+(a*e[s+1][0]-a*e[s-1][0])/6,d[1]+(a*e[s+1][1]-a*e[s-1][1])/6],o[2]=[e[s+1][0]+(a*e[s][0]-a*e[s+2][0])/6,e[s+1][1]+(a*e[s][1]-a*e[s+2][1])/6],o[3]=[e[s+1][0],e[s+1][1]],i.push({op:"bcurveTo",data:[o[1][0],o[1][1],o[2][0],o[2][1],o[3][0],o[3][1]]})}if(t&&t.length===2){let s=n.maxRandomnessOffset;i.push({op:"lineTo",data:[t[0]+b(s,n),t[1]+b(s,n)]})}}else r===3?(i.push({op:"move",data:[e[1][0],e[1][1]]}),i.push({op:"bcurveTo",data:[e[1][0],e[1][1],e[2][0],e[2][1],e[2][0],e[2][1]]})):r===2&&i.push(...At(e[0][0],e[0][1],e[1][0],e[1][1],n,!0,!0));return i}function or(e,t,n,r,i,o,a,s){let d=s.roughness===0,l=[],c=[];if(d){e=e/4,c.push([t+r*Math.cos(-e),n+i*Math.sin(-e)]);for(let p=0;p<=Math.PI*2;p=p+e){let u=[t+r*Math.cos(p),n+i*Math.sin(p)];l.push(u),c.push(u)}c.push([t+r*Math.cos(0),n+i*Math.sin(0)]),c.push([t+r*Math.cos(e),n+i*Math.sin(e)])}else{let p=b(.5,s)-Math.PI/2;c.push([b(o,s)+t+.9*r*Math.cos(p-e),b(o,s)+n+.9*i*Math.sin(p-e)]);let u=Math.PI*2+p-.01;for(let f=p;f<u;f=f+e){let m=[b(o,s)+t+r*Math.cos(f),b(o,s)+n+i*Math.sin(f)];l.push(m),c.push(m)}c.push([b(o,s)+t+r*Math.cos(p+Math.PI*2+a*.5),b(o,s)+n+i*Math.sin(p+Math.PI*2+a*.5)]),c.push([b(o,s)+t+.98*r*Math.cos(p+a),b(o,s)+n+.98*i*Math.sin(p+a)]),c.push([b(o,s)+t+.9*r*Math.cos(p+a*.5),b(o,s)+n+.9*i*Math.sin(p+a*.5)])}return[c,l]}function sr(e,t,n,r,i,o,a,s,d){let l=o+b(.1,d),c=[];c.push([b(s,d)+t+.9*r*Math.cos(l-e),b(s,d)+n+.9*i*Math.sin(l-e)]);for(let p=l;p<=a;p=p+e)c.push([b(s,d)+t+r*Math.cos(p),b(s,d)+n+i*Math.sin(p)]);return c.push([t+r*Math.cos(a),n+i*Math.sin(a)]),c.push([t+r*Math.cos(a),n+i*Math.sin(a)]),ot(c,null,d)}function Pi(e,t,n,r,i,o,a,s){let d=[],l=[s.maxRandomnessOffset||1,(s.maxRandomnessOffset||1)+.3],c=[0,0],p=s.disableMultiStroke?1:2,u=s.preserveVertices;for(let f=0;f<p;f++)f===0?d.push({op:"move",data:[a[0],a[1]]}):d.push({op:"move",data:[a[0]+(u?0:b(l[0],s)),a[1]+(u?0:b(l[0],s))]}),c=u?[i,o]:[i+b(l[f],s),o+b(l[f],s)],d.push({op:"bcurveTo",data:[e+b(l[f],s),t+b(l[f],s),n+b(l[f],s),r+b(l[f],s),c[0],c[1]]});return d}function _e(e){return[...e]}function Pt(e,t=0){let n=e.length;if(n<3)throw new Error("A curve must have at least three points.");let r=[];if(n===3)r.push(_e(e[0]),_e(e[1]),_e(e[2]),_e(e[2]));else{let i=[];i.push(e[0],e[0]);for(let s=1;s<e.length;s++)i.push(e[s]),s===e.length-1&&i.push(e[s]);let o=[],a=1-t;r.push(_e(i[0]));for(let s=1;s+2<i.length;s++){let d=i[s];o[0]=[d[0],d[1]],o[1]=[d[0]+(a*i[s+1][0]-a*i[s-1][0])/6,d[1]+(a*i[s+1][1]-a*i[s-1][1])/6],o[2]=[i[s+1][0]+(a*i[s][0]-a*i[s+2][0])/6,i[s+1][1]+(a*i[s][1]-a*i[s+2][1])/6],o[3]=[i[s+1][0],i[s+1][1]],r.push(o[1],o[2],o[3])}}return r}function Ni(e,t){return Math.sqrt(ct(e,t))}function ct(e,t){return Math.pow(e[0]-t[0],2)+Math.pow(e[1]-t[1],2)}function ji(e,t,n){let r=ct(t,n);if(r===0)return ct(e,t);let i=((e[0]-t[0])*(n[0]-t[0])+(e[1]-t[1])*(n[1]-t[1]))/r;return i=Math.max(0,Math.min(1,i)),ct(e,ge(t,n,i))}function ge(e,t,n){return[e[0]+(t[0]-e[0])*n,e[1]+(t[1]-e[1])*n]}function Li(e,t){let n=e[t+0],r=e[t+1],i=e[t+2],o=e[t+3],a=3*r[0]-2*n[0]-o[0];a*=a;let s=3*r[1]-2*n[1]-o[1];s*=s;let d=3*i[0]-2*o[0]-n[0];d*=d;let l=3*i[1]-2*o[1]-n[1];return l*=l,a<d&&(a=d),s<l&&(s=l),a+s}function Nt(e,t,n,r){let i=r||[];if(Li(e,t)<n){let o=e[t+0];i.length?Ni(i[i.length-1],o)>1&&i.push(o):i.push(o),i.push(e[t+3])}else{let a=e[t+0],s=e[t+1],d=e[t+2],l=e[t+3],c=ge(a,s,.5),p=ge(s,d,.5),u=ge(d,l,.5),f=ge(c,p,.5),m=ge(p,u,.5),h=ge(f,m,.5);Nt([a,c,f,h],0,n,i),Nt([h,m,u,l],0,n,i)}return i}function dr(e,t){return lt(e,0,e.length,t)}function lt(e,t,n,r,i){let o=i||[],a=e[t],s=e[n-1],d=0,l=1;for(let c=t+1;c<n-1;++c){let p=ji(e[c],a,s);p>d&&(d=p,l=c)}return Math.sqrt(d)>r?(lt(e,t,l+1,r,o),lt(e,l,n,r,o)):(o.length||o.push(a),o.push(s)),o}function ze(e,t=.15,n){let r=[],i=(e.length-1)/3;for(let o=0;o<i;o++){let a=o*3;Nt(e,a,t,r)}return n&&n>0?lt(r,0,r.length,n):r}function pr(e,t,n){let r=ve(e),i=je(Pe(r)),o=[],a=[],s=[0,0],d=[],l=()=>{d.length>=4&&a.push(...ze(d,t)),d=[]},c=()=>{l(),a.length&&(o.push(a),a=[])};for(let{key:u,data:f}of i)switch(u){case"M":c(),s=[f[0],f[1]],a.push(s);break;case"L":l(),a.push([f[0],f[1]]);break;case"C":if(!d.length){let m=a.length?a[a.length-1]:s;d.push([m[0],m[1]])}d.push([f[0],f[1]]),d.push([f[2],f[3]]),d.push([f[4],f[5]]);break;case"Z":l(),a.push([s[0],s[1]]);break}if(c(),!n)return o;let p=[];for(let u of o){let f=dr(u,n);f.length&&p.push(f)}return p}var B="none",dt=class{constructor(t){this.defaultOptions={maxRandomnessOffset:2,roughness:1,bowing:1,stroke:"#000",strokeWidth:1,curveTightness:0,curveFitting:.95,curveStepCount:9,fillStyle:"hachure",fillWeight:-1,hachureAngle:-41,hachureGap:-1,dashOffset:-1,dashGap:-1,zigzagOffset:-1,seed:0,disableMultiStroke:!1,disableMultiStrokeFill:!1,preserveVertices:!1,fillShapeRoughnessGain:.8},this.config=t||{},this.config.options&&(this.defaultOptions=this._o(this.config.options))}static newSeed(){return nr()}_o(t){return t?Object.assign({},this.defaultOptions,t):this.defaultOptions}_d(t,n,r){return{shape:t,sets:n||[],options:r||this.defaultOptions}}line(t,n,r,i,o){let a=this._o(o);return this._d("line",[Ft(t,n,r,i,a)],a)}rectangle(t,n,r,i,o){let a=this._o(o),s=[],d=ar(t,n,r,i,a);if(a.fill){let l=[[t,n],[t+r,n],[t+r,n+i],[t,n+i]];a.fillStyle==="solid"?s.push(at([l],a)):s.push(ye([l],a))}return a.stroke!==B&&s.push(d),this._d("rectangle",s,a)}ellipse(t,n,r,i,o){let a=this._o(o),s=[],d=Tt(r,i,a),l=st(t,n,a,d);if(a.fill)if(a.fillStyle==="solid"){let c=st(t,n,a,d).opset;c.type="fillPath",s.push(c)}else s.push(ye([l.estimatedPoints],a));return a.stroke!==B&&s.push(l.opset),this._d("ellipse",s,a)}circle(t,n,r,i){let o=this.ellipse(t,n,r,r,i);return o.shape="circle",o}linearPath(t,n){let r=this._o(n);return this._d("linearPath",[Le(t,!1,r)],r)}arc(t,n,r,i,o,a,s=!1,d){let l=this._o(d),c=[],p=Dt(t,n,r,i,o,a,s,!0,l);if(s&&l.fill)if(l.fillStyle==="solid"){let u=Object.assign({},l);u.disableMultiStroke=!0;let f=Dt(t,n,r,i,o,a,!0,!1,u);f.type="fillPath",c.push(f)}else c.push(cr(t,n,r,i,o,a,l));return l.stroke!==B&&c.push(p),this._d("arc",c,l)}curve(t,n){let r=this._o(n),i=[],o=$t(t,r);if(r.fill&&r.fill!==B)if(r.fillStyle==="solid"){let a=$t(t,Object.assign(Object.assign({},r),{disableMultiStroke:!0,roughness:r.roughness?r.roughness+r.fillShapeRoughnessGain:0}));i.push({type:"fillPath",ops:this._mergedShape(a.ops)})}else{let a=[],s=t;if(s.length){let l=typeof s[0][0]=="number"?[s]:s;for(let c of l)c.length<3?a.push(...c):c.length===3?a.push(...ze(Pt([c[0],c[0],c[1],c[2]]),10,(1+r.roughness)/2)):a.push(...ze(Pt(c),10,(1+r.roughness)/2))}a.length&&i.push(ye([a],r))}return r.stroke!==B&&i.push(o),this._d("curve",i,r)}polygon(t,n){let r=this._o(n),i=[],o=Le(t,!0,r);return r.fill&&(r.fillStyle==="solid"?i.push(at([t],r)):i.push(ye([t],r))),r.stroke!==B&&i.push(o),this._d("polygon",i,r)}path(t,n){let r=this._o(n),i=[];if(!t)return this._d("path",i,r);t=(t||"").replace(/\n/g," ").replace(/(-\s)/g,"-").replace("/(ss)/g"," ");let o=r.fill&&r.fill!=="transparent"&&r.fill!==B,a=r.stroke!==B,s=!!(r.simplification&&r.simplification<1),d=s?4-4*(r.simplification||1):(1+r.roughness)/2,l=pr(t,1,d),c=It(t,r);if(o)if(r.fillStyle==="solid")if(l.length===1){let p=It(t,Object.assign(Object.assign({},r),{disableMultiStroke:!0,roughness:r.roughness?r.roughness+r.fillShapeRoughnessGain:0}));i.push({type:"fillPath",ops:this._mergedShape(p.ops)})}else i.push(at(l,r));else i.push(ye(l,r));return a&&(s?l.forEach(p=>{i.push(Le(p,!1,r))}):i.push(c)),this._d("path",i,r)}opsToPath(t,n){let r="";for(let i of t.ops){let o=typeof n=="number"&&n>=0?i.data.map(a=>+a.toFixed(n)):i.data;switch(i.op){case"move":r+=`M${o[0]} ${o[1]} `;break;case"bcurveTo":r+=`C${o[0]} ${o[1]}, ${o[2]} ${o[3]}, ${o[4]} ${o[5]} `;break;case"lineTo":r+=`L${o[0]} ${o[1]} `;break}}return r.trim()}toPaths(t){let n=t.sets||[],r=t.options||this.defaultOptions,i=[];for(let o of n){let a=null;switch(o.type){case"path":a={d:this.opsToPath(o),stroke:r.stroke,strokeWidth:r.strokeWidth,fill:B};break;case"fillPath":a={d:this.opsToPath(o),stroke:B,strokeWidth:0,fill:r.fill||B};break;case"fillSketch":a=this.fillSketch(o,r);break}a&&i.push(a)}return i}fillSketch(t,n){let r=n.fillWeight;return r<0&&(r=n.strokeWidth/2),{d:this.opsToPath(t),stroke:n.fill||B,strokeWidth:r,fill:B}}_mergedShape(t){return t.filter((n,r)=>r===0?!0:n.op!=="move")}};var Z=new dt;function ur(e){return{roughness:e?.roughness??1,bowing:e?.bowing??1,passes:e?.passes??2,strokeWidth:e?.strokeWidth??1.6,fill:e?.fill??"none",hachureAngle:e?.hachureAngle??-41,hachureGap:e?.hachureGap??5,fillWeight:e?.fillWeight??.9}}function _i(e,t,n,r,i){return{seed:t,roughness:e.roughness,bowing:e.bowing,stroke:n,strokeWidth:r,disableMultiStroke:e.passes<2,...i?{fill:i,fillStyle:e.fill==="solid"?"solid":"hachure",fillWeight:e.fillWeight,hachureGap:e.hachureGap,hachureAngle:e.hachureAngle}:{},preserveVertices:!1}}function zi(e={}){return[`stroke-linecap="${e.lineCap??"round"}"`,`stroke-linejoin="${e.lineJoin??"round"}"`,...e.miterLimit!==void 0?[`stroke-miterlimit="${z(String(e.miterLimit))}"`]:[],...e.dashArray!==void 0?[`stroke-dasharray="${z(e.dashArray)}"`]:[],...e.dashOffset!==void 0?[`stroke-dashoffset="${z(String(e.dashOffset))}"`]:[],...e.opacity!==void 0?[`stroke-opacity="${z(String(e.opacity))}"`]:[],...e.pathLength!==void 0?[`pathLength="${z(String(e.pathLength))}"`]:[],...e.paintOrder!==void 0?[`paint-order="${z(e.paintOrder)}"`]:[],...e.nonScaling?['vector-effect="non-scaling-stroke"']:[]].join(" ")}function ce(e,t,n,r,i,o={},a){let s=[],d=zi(o),l=d?` ${d}`:" ",c=a===void 0?"":` stroke-opacity="${z(String(a))}"`;for(let p of e){let u=Z.opsToPath(p,2);u&&(p.type==="path"?s.push(`<path d="${u}" fill="none" stroke="${t}" stroke-width="${n}"${l}${c} />`):p.type==="fillPath"?s.push(`<path d="${u}" fill="${r}" fill-opacity="${z(String(a??.92))}" stroke="none" />`):p.type==="fillSketch"&&s.push(`<path d="${u}" fill="none" stroke="${r}" stroke-width="${i.fillWeight}"${c} />`))}return s.join(`
1
+ import{a as Qn,b as $}from"./chunk-EKHEVTE2.js";import{a as Hn}from"./chunk-N2K2BPQT.js";import{b as Wn,c as qn}from"./chunk-HO5GDIPN.js";import{b as vn}from"./chunk-T7IJ6V4B.js";import"./chunk-5Q4S74UO.js";import"./chunk-STQRDZ67.js";import{a as mn,b as hn}from"./chunk-A7L4WWVW.js";import{a as Ot,b as kn,c as On}from"./chunk-ZMPTJUXS.js";import{b as dn,c as pn}from"./chunk-KJVNXJ5Y.js";import"./chunk-M6BT2HIP.js";import{a as Un,b as Jn,c as Xn,d as Kn,f as Yn,g as Zn}from"./chunk-5QI4P3EJ.js";import{b as un,d as fn,f as Rt}from"./chunk-FFOHLPDA.js";import{b as wt,c as Et}from"./chunk-I6VE56S7.js";import"./chunk-FLD63DXE.js";import"./chunk-55F5M5XA.js";import{$ as Xe,A as Rn,Aa as In,B as xt,Ba as ie,C as Ie,Ca as Pn,Da as Nn,E as kt,Ea as jn,Fa as Ln,Ga as _n,Ha as zn,Ia as Bn,Ja as Gn,K as xn,Ka as Vn,O as z,R as vt,S as wn,d as yn,da as En,g as gn,ga as Mn,h as bn,ha as re,ra as Cn,sa as An,ta as Fn,ua as $n,va as Tn,w as Sn,x as Je,za as Dn}from"./chunk-DQHK4JCG.js";import{e as He,f as Ue}from"./chunk-P7HMSKHJ.js";function Mt(e,t,n){if(e&&e.length){let[r,i]=t,o=Math.PI/180*n,a=Math.cos(o),s=Math.sin(o);for(let d of e){let[l,c]=d;d[0]=(l-r)*a-(c-i)*s+r,d[1]=(l-r)*s+(c-i)*a+i}}}function vi(e,t,n){let r=[];e.forEach(i=>r.push(...i)),Mt(r,t,n)}function wi(e,t){return e[0]===t[0]&&e[1]===t[1]}function er(e,t,n,r=1){let i=n,o=Math.max(t,.1),a=e[0]&&e[0][0]&&typeof e[0][0]=="number"?[e]:e,s=[0,0];if(i)for(let l of a)Mt(l,s,i);let d=Ei(a,o,r);if(i){for(let l of a)Mt(l,s,-i);vi(d,s,-i)}return d}function Ei(e,t,n){let r=[];for(let l of e){let c=[...l];wi(c[0],c[c.length-1])||c.push([c[0][0],c[0][1]]),c.length>2&&r.push(c)}let i=[];t=Math.max(t,.1);let o=[];for(let l of r)for(let c=0;c<l.length-1;c++){let p=l[c],u=l[c+1];if(p[1]!==u[1]){let f=Math.min(p[1],u[1]);o.push({ymin:f,ymax:Math.max(p[1],u[1]),x:f===p[1]?p[0]:u[0],islope:(u[0]-p[0])/(u[1]-p[1])})}}if(o.sort((l,c)=>l.ymin<c.ymin?-1:l.ymin>c.ymin?1:l.x<c.x?-1:l.x>c.x?1:l.ymax===c.ymax?0:(l.ymax-c.ymax)/Math.abs(l.ymax-c.ymax)),!o.length)return i;let a=[],s=o[0].ymin,d=0;for(;a.length||o.length;){if(o.length){let l=-1;for(let p=0;p<o.length&&!(o[p].ymin>s);p++)l=p;o.splice(0,l+1).forEach(p=>{a.push({s,edge:p})})}if(a=a.filter(l=>!(l.edge.ymax<=s)),a.sort((l,c)=>l.edge.x===c.edge.x?0:(l.edge.x-c.edge.x)/Math.abs(l.edge.x-c.edge.x)),(n!==1||d%t===0)&&a.length>1)for(let l=0;l<a.length;l=l+2){let c=l+1;if(c>=a.length)break;let p=a[l].edge,u=a[c].edge;i.push([[Math.round(p.x),s],[Math.round(u.x),s]])}s+=n,a.forEach(l=>{l.edge.x=l.edge.x+n*l.edge.islope}),d++}return i}function X(e,t){var n;let r=t.hachureAngle+90,i=t.hachureGap;i<0&&(i=t.strokeWidth*4),i=Math.round(Math.max(i,.1));let o=1;return t.roughness>=1&&(((n=t.randomizer)===null||n===void 0?void 0:n.next())||Math.random())>.7&&(o=i),er(e,i,r,o||1)}var oe=class{constructor(t){this.helper=t}fillPolygons(t,n){return this._fillPolygons(t,n)}_fillPolygons(t,n){let r=X(t,n);return{type:"fillSketch",ops:this.renderLines(r,n)}}renderLines(t,n){let r=[];for(let i of t)r.push(...this.helper.doubleLineOps(i[0][0],i[0][1],i[1][0],i[1][1],n));return r}};function se(e){let t=e[0],n=e[1];return Math.sqrt(Math.pow(t[0]-n[0],2)+Math.pow(t[1]-n[1],2))}var Ke=class extends oe{fillPolygons(t,n){let r=n.hachureGap;r<0&&(r=n.strokeWidth*4),r=Math.max(r,.1);let i=Object.assign({},n,{hachureGap:r}),o=X(t,i),a=Math.PI/180*n.hachureAngle,s=[],d=r*.5*Math.cos(a),l=r*.5*Math.sin(a);for(let[p,u]of o)se([p,u])&&s.push([[p[0]-d,p[1]+l],[...u]],[[p[0]+d,p[1]-l],[...u]]);return{type:"fillSketch",ops:this.renderLines(s,n)}}};var Ye=class extends oe{fillPolygons(t,n){let r=this._fillPolygons(t,n),i=Object.assign({},n,{hachureAngle:n.hachureAngle+90}),o=this._fillPolygons(t,i);return r.ops=r.ops.concat(o.ops),r}};var Ze=class{constructor(t){this.helper=t}fillPolygons(t,n){n=Object.assign({},n,{hachureAngle:0});let r=X(t,n);return this.dotsOnLines(r,n)}dotsOnLines(t,n){let r=[],i=n.hachureGap;i<0&&(i=n.strokeWidth*4),i=Math.max(i,.1);let o=n.fillWeight;o<0&&(o=n.strokeWidth/2);let a=i/4;for(let s of t){let d=se(s),l=d/i,c=Math.ceil(l)-1,p=d-c*i,u=(s[0][0]+s[1][0])/2-i/4,f=Math.min(s[0][1],s[1][1]);for(let m=0;m<c;m++){let h=f+p+m*i,y=u-a+Math.random()*2*a,g=h-a+Math.random()*2*a,S=this.helper.ellipse(y,g,o,o,n);r.push(...S.ops)}}return{type:"fillSketch",ops:r}}};var Qe=class{constructor(t){this.helper=t}fillPolygons(t,n){let r=X(t,n);return{type:"fillSketch",ops:this.dashedLine(r,n)}}dashedLine(t,n){let r=n.dashOffset<0?n.hachureGap<0?n.strokeWidth*4:n.hachureGap:n.dashOffset,i=n.dashGap<0?n.hachureGap<0?n.strokeWidth*4:n.hachureGap:n.dashGap,o=[];return t.forEach(a=>{let s=se(a),d=Math.floor(s/(r+i)),l=(s+i-d*(r+i))/2,c=a[0],p=a[1];c[0]>p[0]&&(c=a[1],p=a[0]);let u=Math.atan((p[1]-c[1])/(p[0]-c[0]));for(let f=0;f<d;f++){let m=f*(r+i),h=m+r,y=[c[0]+m*Math.cos(u)+l*Math.cos(u),c[1]+m*Math.sin(u)+l*Math.sin(u)],g=[c[0]+h*Math.cos(u)+l*Math.cos(u),c[1]+h*Math.sin(u)+l*Math.sin(u)];o.push(...this.helper.doubleLineOps(y[0],y[1],g[0],g[1],n))}}),o}};var et=class{constructor(t){this.helper=t}fillPolygons(t,n){let r=n.hachureGap<0?n.strokeWidth*4:n.hachureGap,i=n.zigzagOffset<0?r:n.zigzagOffset;n=Object.assign({},n,{hachureGap:r+i});let o=X(t,n);return{type:"fillSketch",ops:this.zigzagLines(o,i,n)}}zigzagLines(t,n,r){let i=[];return t.forEach(o=>{let a=se(o),s=Math.round(a/(2*n)),d=o[0],l=o[1];d[0]>l[0]&&(d=o[1],l=o[0]);let c=Math.atan((l[1]-d[1])/(l[0]-d[0]));for(let p=0;p<s;p++){let u=p*2*n,f=(p+1)*2*n,m=Math.sqrt(2*Math.pow(n,2)),h=[d[0]+u*Math.cos(c),d[1]+u*Math.sin(c)],y=[d[0]+f*Math.cos(c),d[1]+f*Math.sin(c)],g=[h[0]+m*Math.cos(c+Math.PI/4),h[1]+m*Math.sin(c+Math.PI/4)];i.push(...this.helper.doubleLineOps(h[0],h[1],g[0],g[1],r),...this.helper.doubleLineOps(g[0],g[1],y[0],y[1],r))}}),i}};var j={};function tr(e,t){let n=e.fillStyle||"hachure";if(!j[n])switch(n){case"zigzag":j[n]||(j[n]=new Ke(t));break;case"cross-hatch":j[n]||(j[n]=new Ye(t));break;case"dots":j[n]||(j[n]=new Ze(t));break;case"dashed":j[n]||(j[n]=new Qe(t));break;case"zigzag-line":j[n]||(j[n]=new et(t));break;default:n="hachure",j[n]||(j[n]=new oe(t));break}return j[n]}function nr(){return Math.floor(Math.random()*2**31)}var tt=class{constructor(t){this.seed=t}next(){return this.seed?(2**31-1&(this.seed=Math.imul(48271,this.seed)))/2**31:Math.random()}};var nt={A:7,a:7,C:6,c:6,H:1,h:1,L:2,l:2,M:2,m:2,Q:4,q:4,S:4,s:4,T:2,t:2,V:1,v:1,Z:0,z:0};function Mi(e){let t=new Array;for(;e!=="";)if(e.match(/^([ \t\r\n,]+)/))e=e.substr(RegExp.$1.length);else if(e.match(/^([aAcChHlLmMqQsStTvVzZ])/))t[t.length]={type:0,text:RegExp.$1},e=e.substr(RegExp.$1.length);else if(e.match(/^(([-+]?[0-9]+(\.[0-9]*)?|[-+]?\.[0-9]+)([eE][-+]?[0-9]+)?)/))t[t.length]={type:1,text:`${parseFloat(RegExp.$1)}`},e=e.substr(RegExp.$1.length);else return[];return t[t.length]={type:2,text:""},t}function Ct(e,t){return e.type===t}function ve(e){let t=[],n=Mi(e),r="BOD",i=0,o=n[i];for(;!Ct(o,2);){let a=0,s=[];if(r==="BOD")if(o.text==="M"||o.text==="m")i++,a=nt[o.text],r=o.text;else return ve("M0,0"+e);else Ct(o,1)?a=nt[r]:(i++,a=nt[o.text],r=o.text);if(i+a<n.length){for(let d=i;d<i+a;d++){let l=n[d];if(Ct(l,1))s[s.length]=+l.text;else throw new Error("Param not a number: "+r+","+l.text)}if(typeof nt[r]=="number"){let d={key:r,data:s};t.push(d),i+=a,o=n[i],r==="M"&&(r="L"),r==="m"&&(r="l")}else throw new Error("Bad segment: "+r)}else throw new Error("Path data ended short")}return t}function Pe(e){let t=0,n=0,r=0,i=0,o=[];for(let{key:a,data:s}of e)switch(a){case"M":o.push({key:"M",data:[...s]}),[t,n]=s,[r,i]=s;break;case"m":t+=s[0],n+=s[1],o.push({key:"M",data:[t,n]}),r=t,i=n;break;case"L":o.push({key:"L",data:[...s]}),[t,n]=s;break;case"l":t+=s[0],n+=s[1],o.push({key:"L",data:[t,n]});break;case"C":o.push({key:"C",data:[...s]}),t=s[4],n=s[5];break;case"c":{let d=s.map((l,c)=>c%2?l+n:l+t);o.push({key:"C",data:d}),t=d[4],n=d[5];break}case"Q":o.push({key:"Q",data:[...s]}),t=s[2],n=s[3];break;case"q":{let d=s.map((l,c)=>c%2?l+n:l+t);o.push({key:"Q",data:d}),t=d[2],n=d[3];break}case"A":o.push({key:"A",data:[...s]}),t=s[5],n=s[6];break;case"a":t+=s[5],n+=s[6],o.push({key:"A",data:[s[0],s[1],s[2],s[3],s[4],t,n]});break;case"H":o.push({key:"H",data:[...s]}),t=s[0];break;case"h":t+=s[0],o.push({key:"H",data:[t]});break;case"V":o.push({key:"V",data:[...s]}),n=s[0];break;case"v":n+=s[0],o.push({key:"V",data:[n]});break;case"S":o.push({key:"S",data:[...s]}),t=s[2],n=s[3];break;case"s":{let d=s.map((l,c)=>c%2?l+n:l+t);o.push({key:"S",data:d}),t=d[2],n=d[3];break}case"T":o.push({key:"T",data:[...s]}),t=s[0],n=s[1];break;case"t":t+=s[0],n+=s[1],o.push({key:"T",data:[t,n]});break;case"Z":case"z":o.push({key:"Z",data:[]}),t=r,n=i;break}return o}function je(e){let t=[],n="",r=0,i=0,o=0,a=0,s=0,d=0;for(let{key:l,data:c}of e){switch(l){case"M":t.push({key:"M",data:[...c]}),[r,i]=c,[o,a]=c;break;case"C":t.push({key:"C",data:[...c]}),r=c[4],i=c[5],s=c[2],d=c[3];break;case"L":t.push({key:"L",data:[...c]}),[r,i]=c;break;case"H":r=c[0],t.push({key:"L",data:[r,i]});break;case"V":i=c[0],t.push({key:"L",data:[r,i]});break;case"S":{let p=0,u=0;n==="C"||n==="S"?(p=r+(r-s),u=i+(i-d)):(p=r,u=i),t.push({key:"C",data:[p,u,...c]}),s=c[0],d=c[1],r=c[2],i=c[3];break}case"T":{let[p,u]=c,f=0,m=0;n==="Q"||n==="T"?(f=r+(r-s),m=i+(i-d)):(f=r,m=i);let h=r+2*(f-r)/3,y=i+2*(m-i)/3,g=p+2*(f-p)/3,S=u+2*(m-u)/3;t.push({key:"C",data:[h,y,g,S,p,u]}),s=f,d=m,r=p,i=u;break}case"Q":{let[p,u,f,m]=c,h=r+2*(p-r)/3,y=i+2*(u-i)/3,g=f+2*(p-f)/3,S=m+2*(u-m)/3;t.push({key:"C",data:[h,y,g,S,f,m]}),s=p,d=u,r=f,i=m;break}case"A":{let p=Math.abs(c[0]),u=Math.abs(c[1]),f=c[2],m=c[3],h=c[4],y=c[5],g=c[6];p===0||u===0?(t.push({key:"C",data:[r,i,y,g,y,g]}),r=y,i=g):(r!==y||i!==g)&&(rr(r,i,y,g,p,u,f,m,h).forEach(function(k){t.push({key:"C",data:k})}),r=y,i=g);break}case"Z":t.push({key:"Z",data:[]}),r=o,i=a;break}n=l}return t}function Ci(e){return Math.PI*e/180}function Ne(e,t,n){let r=e*Math.cos(n)-t*Math.sin(n),i=e*Math.sin(n)+t*Math.cos(n);return[r,i]}function rr(e,t,n,r,i,o,a,s,d,l){let c=Ci(a),p=[],u=0,f=0,m=0,h=0;if(l)[u,f,m,h]=l;else{[e,t]=Ne(e,t,-c),[n,r]=Ne(n,r,-c);let w=(e-n)/2,x=(t-r)/2,A=w*w/(i*i)+x*x/(o*o);A>1&&(A=Math.sqrt(A),i=A*i,o=A*o);let U=s===d?-1:1,F=i*i,R=o*o,Te=F*R-F*x*x-R*w*w,J=F*x*x+R*w*w,ne=U*Math.sqrt(Math.abs(Te/J));m=ne*i*x/o+(e+n)/2,h=ne*-o*w/i+(t+r)/2,u=Math.asin(parseFloat(((t-h)/o).toFixed(9))),f=Math.asin(parseFloat(((r-h)/o).toFixed(9))),e<m&&(u=Math.PI-u),n<m&&(f=Math.PI-f),u<0&&(u=Math.PI*2+u),f<0&&(f=Math.PI*2+f),d&&u>f&&(u=u-Math.PI*2),!d&&f>u&&(f=f-Math.PI*2)}let y=f-u;if(Math.abs(y)>Math.PI*120/180){let w=f,x=n,A=r;d&&f>u?f=u+Math.PI*120/180*1:f=u+Math.PI*120/180*-1,n=m+i*Math.cos(f),r=h+o*Math.sin(f),p=rr(n,r,x,A,i,o,a,0,d,[f,w,m,h])}y=f-u;let g=Math.cos(u),S=Math.sin(u),k=Math.cos(f),H=Math.sin(f),v=Math.tan(y/4),L=4/3*i*v,Y=4/3*o*v,_=[e,t],N=[e+L*S,t-Y*g],C=[n+L*H,r-Y*k],G=[n,r];if(N[0]=2*_[0]-N[0],N[1]=2*_[1]-N[1],l)return[N,C,G].concat(p);{p=[N,C,G].concat(p);let w=[];for(let x=0;x<p.length;x+=3){let A=Ne(p[x][0],p[x][1],c),U=Ne(p[x+1][0],p[x+1][1],c),F=Ne(p[x+2][0],p[x+2][1],c);w.push([A[0],A[1],U[0],U[1],F[0],F[1]])}return w}}var Ai={randOffset:Ti,randOffsetWithRange:Di,ellipse:$i,doubleLineOps:Ii};function Ft(e,t,n,r,i){return{type:"path",ops:ae(e,t,n,r,i)}}function Le(e,t,n){let r=(e||[]).length;if(r>2){let i=[];for(let o=0;o<r-1;o++)i.push(...ae(e[o][0],e[o][1],e[o+1][0],e[o+1][1],n));return t&&i.push(...ae(e[r-1][0],e[r-1][1],e[0][0],e[0][1],n)),{type:"path",ops:i}}else if(r===2)return Ft(e[0][0],e[0][1],e[1][0],e[1][1],n);return{type:"path",ops:[]}}function Fi(e,t){return Le(e,!0,t)}function ar(e,t,n,r,i){let o=[[e,t],[e+n,t],[e+n,t+r],[e,t+r]];return Fi(o,i)}function $t(e,t){if(e.length){let r=typeof e[0][0]=="number"?[e]:e,i=rt(r[0],1*(1+t.roughness*.2),t),o=t.disableMultiStroke?[]:rt(r[0],1.5*(1+t.roughness*.22),ir(t));for(let a=1;a<r.length;a++){let s=r[a];if(s.length){let d=rt(s,1*(1+t.roughness*.2),t),l=t.disableMultiStroke?[]:rt(s,1.5*(1+t.roughness*.22),ir(t));for(let c of d)c.op!=="move"&&i.push(c);for(let c of l)c.op!=="move"&&o.push(c)}}return{type:"path",ops:i.concat(o)}}return{type:"path",ops:[]}}function $i(e,t,n,r,i){let o=Tt(n,r,i);return st(e,t,i,o).opset}function Tt(e,t,n){let r=Math.sqrt(Math.PI*2*Math.sqrt((Math.pow(e/2,2)+Math.pow(t/2,2))/2)),i=Math.ceil(Math.max(n.curveStepCount,n.curveStepCount/Math.sqrt(200)*r)),o=Math.PI*2/i,a=Math.abs(e/2),s=Math.abs(t/2),d=1-n.curveFitting;return a+=b(a*d,n),s+=b(s*d,n),{increment:o,rx:a,ry:s}}function st(e,t,n,r){let[i,o]=or(r.increment,e,t,r.rx,r.ry,1,r.increment*it(.1,it(.4,1,n),n),n),a=ot(i,null,n);if(!n.disableMultiStroke&&n.roughness!==0){let[s]=or(r.increment,e,t,r.rx,r.ry,1.5,0,n),d=ot(s,null,n);a=a.concat(d)}return{estimatedPoints:o,opset:{type:"path",ops:a}}}function Dt(e,t,n,r,i,o,a,s,d){let l=e,c=t,p=Math.abs(n/2),u=Math.abs(r/2);p+=b(p*.01,d),u+=b(u*.01,d);let f=i,m=o;for(;f<0;)f+=Math.PI*2,m+=Math.PI*2;m-f>Math.PI*2&&(f=0,m=Math.PI*2);let h=Math.PI*2/d.curveStepCount,y=Math.min(h/2,(m-f)/2),g=sr(y,l,c,p,u,f,m,1,d);if(!d.disableMultiStroke){let S=sr(y,l,c,p,u,f,m,1.5,d);g.push(...S)}return a&&(s?g.push(...ae(l,c,l+p*Math.cos(f),c+u*Math.sin(f),d),...ae(l,c,l+p*Math.cos(m),c+u*Math.sin(m),d)):g.push({op:"lineTo",data:[l,c]},{op:"lineTo",data:[l+p*Math.cos(f),c+u*Math.sin(f)]})),{type:"path",ops:g}}function It(e,t){let n=je(Pe(ve(e))),r=[],i=[0,0],o=[0,0];for(let{key:a,data:s}of n)switch(a){case"M":{o=[s[0],s[1]],i=[s[0],s[1]];break}case"L":r.push(...ae(o[0],o[1],s[0],s[1],t)),o=[s[0],s[1]];break;case"C":{let[d,l,c,p,u,f]=s;r.push(...Pi(d,l,c,p,u,f,o,t)),o=[u,f];break}case"Z":r.push(...ae(o[0],o[1],i[0],i[1],t)),o=[i[0],i[1]];break}return{type:"path",ops:r}}function at(e,t){let n=[];for(let r of e)if(r.length){let i=t.maxRandomnessOffset||0,o=r.length;if(o>2){n.push({op:"move",data:[r[0][0]+b(i,t),r[0][1]+b(i,t)]});for(let a=1;a<o;a++)n.push({op:"lineTo",data:[r[a][0]+b(i,t),r[a][1]+b(i,t)]})}}return{type:"fillPath",ops:n}}function ye(e,t){return tr(t,Ai).fillPolygons(e,t)}function cr(e,t,n,r,i,o,a){let s=e,d=t,l=Math.abs(n/2),c=Math.abs(r/2);l+=b(l*.01,a),c+=b(c*.01,a);let p=i,u=o;for(;p<0;)p+=Math.PI*2,u+=Math.PI*2;u-p>Math.PI*2&&(p=0,u=Math.PI*2);let f=(u-p)/a.curveStepCount,m=[];for(let h=p;h<=u;h=h+f)m.push([s+l*Math.cos(h),d+c*Math.sin(h)]);return m.push([s+l*Math.cos(u),d+c*Math.sin(u)]),m.push([s,d]),ye([m],a)}function Ti(e,t){return b(e,t)}function Di(e,t,n){return it(e,t,n)}function Ii(e,t,n,r,i){return ae(e,t,n,r,i,!0)}function ir(e){let t=Object.assign({},e);return t.randomizer=void 0,e.seed&&(t.seed=e.seed+1),t}function lr(e){return e.randomizer||(e.randomizer=new tt(e.seed||0)),e.randomizer.next()}function it(e,t,n,r=1){return n.roughness*r*(lr(n)*(t-e)+e)}function b(e,t,n=1){return it(-e,e,t,n)}function ae(e,t,n,r,i,o=!1){let a=o?i.disableMultiStrokeFill:i.disableMultiStroke,s=At(e,t,n,r,i,!0,!1);if(a)return s;let d=At(e,t,n,r,i,!0,!0);return s.concat(d)}function At(e,t,n,r,i,o,a){let s=Math.pow(e-n,2)+Math.pow(t-r,2),d=Math.sqrt(s),l=1;d<200?l=1:d>500?l=.4:l=-.0016668*d+1.233334;let c=i.maxRandomnessOffset||0;c*c*100>s&&(c=d/10);let p=c/2,u=.2+lr(i)*.2,f=i.bowing*i.maxRandomnessOffset*(r-t)/200,m=i.bowing*i.maxRandomnessOffset*(e-n)/200;f=b(f,i,l),m=b(m,i,l);let h=[],y=()=>b(p,i,l),g=()=>b(c,i,l),S=i.preserveVertices;return o&&(a?h.push({op:"move",data:[e+(S?0:y()),t+(S?0:y())]}):h.push({op:"move",data:[e+(S?0:b(c,i,l)),t+(S?0:b(c,i,l))]})),a?h.push({op:"bcurveTo",data:[f+e+(n-e)*u+y(),m+t+(r-t)*u+y(),f+e+2*(n-e)*u+y(),m+t+2*(r-t)*u+y(),n+(S?0:y()),r+(S?0:y())]}):h.push({op:"bcurveTo",data:[f+e+(n-e)*u+g(),m+t+(r-t)*u+g(),f+e+2*(n-e)*u+g(),m+t+2*(r-t)*u+g(),n+(S?0:g()),r+(S?0:g())]}),h}function rt(e,t,n){if(!e.length)return[];let r=[];r.push([e[0][0]+b(t,n),e[0][1]+b(t,n)]),r.push([e[0][0]+b(t,n),e[0][1]+b(t,n)]);for(let i=1;i<e.length;i++)r.push([e[i][0]+b(t,n),e[i][1]+b(t,n)]),i===e.length-1&&r.push([e[i][0]+b(t,n),e[i][1]+b(t,n)]);return ot(r,null,n)}function ot(e,t,n){let r=e.length,i=[];if(r>3){let o=[],a=1-n.curveTightness;i.push({op:"move",data:[e[1][0],e[1][1]]});for(let s=1;s+2<r;s++){let d=e[s];o[0]=[d[0],d[1]],o[1]=[d[0]+(a*e[s+1][0]-a*e[s-1][0])/6,d[1]+(a*e[s+1][1]-a*e[s-1][1])/6],o[2]=[e[s+1][0]+(a*e[s][0]-a*e[s+2][0])/6,e[s+1][1]+(a*e[s][1]-a*e[s+2][1])/6],o[3]=[e[s+1][0],e[s+1][1]],i.push({op:"bcurveTo",data:[o[1][0],o[1][1],o[2][0],o[2][1],o[3][0],o[3][1]]})}if(t&&t.length===2){let s=n.maxRandomnessOffset;i.push({op:"lineTo",data:[t[0]+b(s,n),t[1]+b(s,n)]})}}else r===3?(i.push({op:"move",data:[e[1][0],e[1][1]]}),i.push({op:"bcurveTo",data:[e[1][0],e[1][1],e[2][0],e[2][1],e[2][0],e[2][1]]})):r===2&&i.push(...At(e[0][0],e[0][1],e[1][0],e[1][1],n,!0,!0));return i}function or(e,t,n,r,i,o,a,s){let d=s.roughness===0,l=[],c=[];if(d){e=e/4,c.push([t+r*Math.cos(-e),n+i*Math.sin(-e)]);for(let p=0;p<=Math.PI*2;p=p+e){let u=[t+r*Math.cos(p),n+i*Math.sin(p)];l.push(u),c.push(u)}c.push([t+r*Math.cos(0),n+i*Math.sin(0)]),c.push([t+r*Math.cos(e),n+i*Math.sin(e)])}else{let p=b(.5,s)-Math.PI/2;c.push([b(o,s)+t+.9*r*Math.cos(p-e),b(o,s)+n+.9*i*Math.sin(p-e)]);let u=Math.PI*2+p-.01;for(let f=p;f<u;f=f+e){let m=[b(o,s)+t+r*Math.cos(f),b(o,s)+n+i*Math.sin(f)];l.push(m),c.push(m)}c.push([b(o,s)+t+r*Math.cos(p+Math.PI*2+a*.5),b(o,s)+n+i*Math.sin(p+Math.PI*2+a*.5)]),c.push([b(o,s)+t+.98*r*Math.cos(p+a),b(o,s)+n+.98*i*Math.sin(p+a)]),c.push([b(o,s)+t+.9*r*Math.cos(p+a*.5),b(o,s)+n+.9*i*Math.sin(p+a*.5)])}return[c,l]}function sr(e,t,n,r,i,o,a,s,d){let l=o+b(.1,d),c=[];c.push([b(s,d)+t+.9*r*Math.cos(l-e),b(s,d)+n+.9*i*Math.sin(l-e)]);for(let p=l;p<=a;p=p+e)c.push([b(s,d)+t+r*Math.cos(p),b(s,d)+n+i*Math.sin(p)]);return c.push([t+r*Math.cos(a),n+i*Math.sin(a)]),c.push([t+r*Math.cos(a),n+i*Math.sin(a)]),ot(c,null,d)}function Pi(e,t,n,r,i,o,a,s){let d=[],l=[s.maxRandomnessOffset||1,(s.maxRandomnessOffset||1)+.3],c=[0,0],p=s.disableMultiStroke?1:2,u=s.preserveVertices;for(let f=0;f<p;f++)f===0?d.push({op:"move",data:[a[0],a[1]]}):d.push({op:"move",data:[a[0]+(u?0:b(l[0],s)),a[1]+(u?0:b(l[0],s))]}),c=u?[i,o]:[i+b(l[f],s),o+b(l[f],s)],d.push({op:"bcurveTo",data:[e+b(l[f],s),t+b(l[f],s),n+b(l[f],s),r+b(l[f],s),c[0],c[1]]});return d}function _e(e){return[...e]}function Pt(e,t=0){let n=e.length;if(n<3)throw new Error("A curve must have at least three points.");let r=[];if(n===3)r.push(_e(e[0]),_e(e[1]),_e(e[2]),_e(e[2]));else{let i=[];i.push(e[0],e[0]);for(let s=1;s<e.length;s++)i.push(e[s]),s===e.length-1&&i.push(e[s]);let o=[],a=1-t;r.push(_e(i[0]));for(let s=1;s+2<i.length;s++){let d=i[s];o[0]=[d[0],d[1]],o[1]=[d[0]+(a*i[s+1][0]-a*i[s-1][0])/6,d[1]+(a*i[s+1][1]-a*i[s-1][1])/6],o[2]=[i[s+1][0]+(a*i[s][0]-a*i[s+2][0])/6,i[s+1][1]+(a*i[s][1]-a*i[s+2][1])/6],o[3]=[i[s+1][0],i[s+1][1]],r.push(o[1],o[2],o[3])}}return r}function Ni(e,t){return Math.sqrt(ct(e,t))}function ct(e,t){return Math.pow(e[0]-t[0],2)+Math.pow(e[1]-t[1],2)}function ji(e,t,n){let r=ct(t,n);if(r===0)return ct(e,t);let i=((e[0]-t[0])*(n[0]-t[0])+(e[1]-t[1])*(n[1]-t[1]))/r;return i=Math.max(0,Math.min(1,i)),ct(e,ge(t,n,i))}function ge(e,t,n){return[e[0]+(t[0]-e[0])*n,e[1]+(t[1]-e[1])*n]}function Li(e,t){let n=e[t+0],r=e[t+1],i=e[t+2],o=e[t+3],a=3*r[0]-2*n[0]-o[0];a*=a;let s=3*r[1]-2*n[1]-o[1];s*=s;let d=3*i[0]-2*o[0]-n[0];d*=d;let l=3*i[1]-2*o[1]-n[1];return l*=l,a<d&&(a=d),s<l&&(s=l),a+s}function Nt(e,t,n,r){let i=r||[];if(Li(e,t)<n){let o=e[t+0];i.length?Ni(i[i.length-1],o)>1&&i.push(o):i.push(o),i.push(e[t+3])}else{let a=e[t+0],s=e[t+1],d=e[t+2],l=e[t+3],c=ge(a,s,.5),p=ge(s,d,.5),u=ge(d,l,.5),f=ge(c,p,.5),m=ge(p,u,.5),h=ge(f,m,.5);Nt([a,c,f,h],0,n,i),Nt([h,m,u,l],0,n,i)}return i}function dr(e,t){return lt(e,0,e.length,t)}function lt(e,t,n,r,i){let o=i||[],a=e[t],s=e[n-1],d=0,l=1;for(let c=t+1;c<n-1;++c){let p=ji(e[c],a,s);p>d&&(d=p,l=c)}return Math.sqrt(d)>r?(lt(e,t,l+1,r,o),lt(e,l,n,r,o)):(o.length||o.push(a),o.push(s)),o}function ze(e,t=.15,n){let r=[],i=(e.length-1)/3;for(let o=0;o<i;o++){let a=o*3;Nt(e,a,t,r)}return n&&n>0?lt(r,0,r.length,n):r}function pr(e,t,n){let r=ve(e),i=je(Pe(r)),o=[],a=[],s=[0,0],d=[],l=()=>{d.length>=4&&a.push(...ze(d,t)),d=[]},c=()=>{l(),a.length&&(o.push(a),a=[])};for(let{key:u,data:f}of i)switch(u){case"M":c(),s=[f[0],f[1]],a.push(s);break;case"L":l(),a.push([f[0],f[1]]);break;case"C":if(!d.length){let m=a.length?a[a.length-1]:s;d.push([m[0],m[1]])}d.push([f[0],f[1]]),d.push([f[2],f[3]]),d.push([f[4],f[5]]);break;case"Z":l(),a.push([s[0],s[1]]);break}if(c(),!n)return o;let p=[];for(let u of o){let f=dr(u,n);f.length&&p.push(f)}return p}var B="none",dt=class{constructor(t){this.defaultOptions={maxRandomnessOffset:2,roughness:1,bowing:1,stroke:"#000",strokeWidth:1,curveTightness:0,curveFitting:.95,curveStepCount:9,fillStyle:"hachure",fillWeight:-1,hachureAngle:-41,hachureGap:-1,dashOffset:-1,dashGap:-1,zigzagOffset:-1,seed:0,disableMultiStroke:!1,disableMultiStrokeFill:!1,preserveVertices:!1,fillShapeRoughnessGain:.8},this.config=t||{},this.config.options&&(this.defaultOptions=this._o(this.config.options))}static newSeed(){return nr()}_o(t){return t?Object.assign({},this.defaultOptions,t):this.defaultOptions}_d(t,n,r){return{shape:t,sets:n||[],options:r||this.defaultOptions}}line(t,n,r,i,o){let a=this._o(o);return this._d("line",[Ft(t,n,r,i,a)],a)}rectangle(t,n,r,i,o){let a=this._o(o),s=[],d=ar(t,n,r,i,a);if(a.fill){let l=[[t,n],[t+r,n],[t+r,n+i],[t,n+i]];a.fillStyle==="solid"?s.push(at([l],a)):s.push(ye([l],a))}return a.stroke!==B&&s.push(d),this._d("rectangle",s,a)}ellipse(t,n,r,i,o){let a=this._o(o),s=[],d=Tt(r,i,a),l=st(t,n,a,d);if(a.fill)if(a.fillStyle==="solid"){let c=st(t,n,a,d).opset;c.type="fillPath",s.push(c)}else s.push(ye([l.estimatedPoints],a));return a.stroke!==B&&s.push(l.opset),this._d("ellipse",s,a)}circle(t,n,r,i){let o=this.ellipse(t,n,r,r,i);return o.shape="circle",o}linearPath(t,n){let r=this._o(n);return this._d("linearPath",[Le(t,!1,r)],r)}arc(t,n,r,i,o,a,s=!1,d){let l=this._o(d),c=[],p=Dt(t,n,r,i,o,a,s,!0,l);if(s&&l.fill)if(l.fillStyle==="solid"){let u=Object.assign({},l);u.disableMultiStroke=!0;let f=Dt(t,n,r,i,o,a,!0,!1,u);f.type="fillPath",c.push(f)}else c.push(cr(t,n,r,i,o,a,l));return l.stroke!==B&&c.push(p),this._d("arc",c,l)}curve(t,n){let r=this._o(n),i=[],o=$t(t,r);if(r.fill&&r.fill!==B)if(r.fillStyle==="solid"){let a=$t(t,Object.assign(Object.assign({},r),{disableMultiStroke:!0,roughness:r.roughness?r.roughness+r.fillShapeRoughnessGain:0}));i.push({type:"fillPath",ops:this._mergedShape(a.ops)})}else{let a=[],s=t;if(s.length){let l=typeof s[0][0]=="number"?[s]:s;for(let c of l)c.length<3?a.push(...c):c.length===3?a.push(...ze(Pt([c[0],c[0],c[1],c[2]]),10,(1+r.roughness)/2)):a.push(...ze(Pt(c),10,(1+r.roughness)/2))}a.length&&i.push(ye([a],r))}return r.stroke!==B&&i.push(o),this._d("curve",i,r)}polygon(t,n){let r=this._o(n),i=[],o=Le(t,!0,r);return r.fill&&(r.fillStyle==="solid"?i.push(at([t],r)):i.push(ye([t],r))),r.stroke!==B&&i.push(o),this._d("polygon",i,r)}path(t,n){let r=this._o(n),i=[];if(!t)return this._d("path",i,r);t=(t||"").replace(/\n/g," ").replace(/(-\s)/g,"-").replace("/(ss)/g"," ");let o=r.fill&&r.fill!=="transparent"&&r.fill!==B,a=r.stroke!==B,s=!!(r.simplification&&r.simplification<1),d=s?4-4*(r.simplification||1):(1+r.roughness)/2,l=pr(t,1,d),c=It(t,r);if(o)if(r.fillStyle==="solid")if(l.length===1){let p=It(t,Object.assign(Object.assign({},r),{disableMultiStroke:!0,roughness:r.roughness?r.roughness+r.fillShapeRoughnessGain:0}));i.push({type:"fillPath",ops:this._mergedShape(p.ops)})}else i.push(at(l,r));else i.push(ye(l,r));return a&&(s?l.forEach(p=>{i.push(Le(p,!1,r))}):i.push(c)),this._d("path",i,r)}opsToPath(t,n){let r="";for(let i of t.ops){let o=typeof n=="number"&&n>=0?i.data.map(a=>+a.toFixed(n)):i.data;switch(i.op){case"move":r+=`M${o[0]} ${o[1]} `;break;case"bcurveTo":r+=`C${o[0]} ${o[1]}, ${o[2]} ${o[3]}, ${o[4]} ${o[5]} `;break;case"lineTo":r+=`L${o[0]} ${o[1]} `;break}}return r.trim()}toPaths(t){let n=t.sets||[],r=t.options||this.defaultOptions,i=[];for(let o of n){let a=null;switch(o.type){case"path":a={d:this.opsToPath(o),stroke:r.stroke,strokeWidth:r.strokeWidth,fill:B};break;case"fillPath":a={d:this.opsToPath(o),stroke:B,strokeWidth:0,fill:r.fill||B};break;case"fillSketch":a=this.fillSketch(o,r);break}a&&i.push(a)}return i}fillSketch(t,n){let r=n.fillWeight;return r<0&&(r=n.strokeWidth/2),{d:this.opsToPath(t),stroke:n.fill||B,strokeWidth:r,fill:B}}_mergedShape(t){return t.filter((n,r)=>r===0?!0:n.op!=="move")}};var Z=new dt;function ur(e){return{roughness:e?.roughness??1,bowing:e?.bowing??1,passes:e?.passes??2,strokeWidth:e?.strokeWidth??1.6,fill:e?.fill??"none",hachureAngle:e?.hachureAngle??-41,hachureGap:e?.hachureGap??5,fillWeight:e?.fillWeight??.9}}function _i(e,t,n,r,i){return{seed:t,roughness:e.roughness,bowing:e.bowing,stroke:n,strokeWidth:r,disableMultiStroke:e.passes<2,...i?{fill:i,fillStyle:e.fill==="solid"?"solid":"hachure",fillWeight:e.fillWeight,hachureGap:e.hachureGap,hachureAngle:e.hachureAngle}:{},preserveVertices:!1}}function zi(e={}){return[`stroke-linecap="${e.lineCap??"round"}"`,`stroke-linejoin="${e.lineJoin??"round"}"`,...e.miterLimit!==void 0?[`stroke-miterlimit="${z(String(e.miterLimit))}"`]:[],...e.dashArray!==void 0?[`stroke-dasharray="${z(e.dashArray)}"`]:[],...e.dashOffset!==void 0?[`stroke-dashoffset="${z(String(e.dashOffset))}"`]:[],...e.opacity!==void 0?[`stroke-opacity="${z(String(e.opacity))}"`]:[],...e.pathLength!==void 0?[`pathLength="${z(String(e.pathLength))}"`]:[],...e.paintOrder!==void 0?[`paint-order="${z(e.paintOrder)}"`]:[],...e.nonScaling?['vector-effect="non-scaling-stroke"']:[]].join(" ")}function ce(e,t,n,r,i,o={},a){let s=[],d=zi(o),l=d?` ${d}`:" ",c=a===void 0?"":` stroke-opacity="${z(String(a))}"`;for(let p of e){let u=Z.opsToPath(p,2);u&&(p.type==="path"?s.push(`<path d="${u}" fill="none" stroke="${t}" stroke-width="${n}"${l}${c} />`):p.type==="fillPath"?s.push(`<path d="${u}" fill="${r}" fill-opacity="${z(String(a??.92))}" stroke="none" />`):p.type==="fillSketch"&&s.push(`<path d="${u}" fill="none" stroke="${r}" stroke-width="${i.fillWeight}"${c} />`))}return s.join(`
2
2
  `)}function Bi(e,t,n,r,i){let o=Math.min(i,n/2,r/2);return`M ${e+o} ${t} L ${e+n-o} ${t} Q ${e+n} ${t} ${e+n} ${t+o} L ${e+n} ${t+r-o} Q ${e+n} ${t+r} ${e+n-o} ${t+r} L ${e+o} ${t+r} Q ${e} ${t+r} ${e} ${t+r-o} L ${e} ${t+o} Q ${e} ${t} ${e+o} ${t} Z`}function fr(e,t,n,r,i,o,a,s,d){return mr(e,t,n,r,i,o,a,s,d)}function mr(e,t,n,r,i,o,a,s,d){let l={...s,...a!==void 0?{dashArray:a}:{}},c=_i(o,t,n,r,i);try{switch(e.kind){case"rect":return(e.rx??0)>.5?ce(Z.path(Bi(e.x,e.y,e.width,e.height,e.rx),c).sets,n,r,i,o,l,d):ce(Z.rectangle(e.x,e.y,e.width,e.height,c).sets,n,r,i,o,l,d);case"circle":return ce(Z.circle(e.cx,e.cy,e.r*2,c).sets,n,r,i,o,l,d);case"ellipse":return ce(Z.ellipse(e.cx,e.cy,e.rx*2,e.ry*2,c).sets,n,r,i,o,l,d);case"line":return ce(Z.line(e.x1,e.y1,e.x2,e.y2,c).sets,n,r,void 0,o,l,d);case"polygon":return ce(Z.polygon(e.points.map(p=>[p.x,p.y]),c).sets,n,r,i,o,l,d);case"polyline":return ce(Z.linearPath(e.points.map(p=>[p.x,p.y]),c).sets,n,r,void 0,o,l,d);case"path":return ce(Z.path(e.d,c).sets,n,r,i,o,l,d);case"compound":return""}}catch{return""}}function we(e,t,n,r,i,o,a,s,d){if(e.sketcher){let l=e.sketcher(t,{seed:n,stroke:r,width:i,fill:o,p:e.p,style:e.ctx.style,dash:a,strokeProjection:s,opacity:d});if(l!==null)return l}return mr(t,n,r,i,o,e.p,a,s,d)}function hr(e,t,n){return e.replace(`<${t} `,`<${t} ${n} `)}function yr(e){if(e===void 0)return 1;let t=typeof e=="number"?e:parseFloat(e);return Number.isNaN(t)?1:t}function pt(e,t){return e!==void 0?e:t}function Gi(e,t){return/style="/.test(e)?e.replace(/style="([^"]*)"/,(n,r)=>{let i=r.trim().length===0||/;\s*$/.test(r)?"":";";return`style="${r}${i}stroke:none"`}):hr(e,t,'style="stroke:none"')}function jt(e,t){return!t||e===""?e:t.kind==="rotate"?`<g transform="rotate(${t.angle} ${t.cx} ${t.cy})">${e}</g>`:e}function Vi(e,t){let n=t.p,r=re(e),i=Dn(r),o=e.geometry.kind==="compound"?e.geometry.children:[e.geometry];if(i.length<o.length)return r;let a=r.split(`
3
3
  `),s=c=>a.length===1&&c===0?r:a[c]??"",d=[];for(let c=0;c<o.length;c++){let p=i[c],u=pt(p.attrs.get("stroke"),e.paint.stroke),f=pt(p.attrs.get("fill"),e.paint.fill),m=Et(t.ctx.seed,e.id,`outline:${c}`)||1,h=yr(pt(p.attrs.get("stroke-width"),e.paint.strokeWidth)),y=pt(p.attrs.get("stroke-dasharray"),e.paint.strokeDasharray),g=u!==void 0&&u!=="none"&&h>0,S=f!==void 0&&f!=="none",k=S&&n.fill!=="none"?f:void 0;if(!g){if(k){let L=we(t,o[c],m,"none",0,k,y,void 0,e.paint.opacity);if(L){d.push(jt(L,e.transform));continue}}d.push(s(c));continue}let H=Math.max(.6,Math.min(n.strokeWidth*h,n.strokeWidth*4)),v=we(t,o[c],m,u,H,k,y,void 0,e.paint.opacity);if(!v){d.push(s(c));continue}S&&n.fill==="none"&&!Wi(f)&&d.push(Gi(s(c),p.tag)),d.push(jt(v,e.transform))}let l=d.filter(Boolean).join(`
4
4
  `);return e.identity&&!/\sdata-id=/.test(l)?En(l,e.identity):l}function Wi(e){return e.startsWith("var(--_node-fill")||e.startsWith("var(--_group")||e==="var(--bg)"||e==="var(--surface)"}function qi(e,t){let n=re(e);if(e.lineStyle==="invisible"||n==="")return n;let r=e.stroke.color,i=yr(e.stroke.width);if(i<=0)return n;let o=t.p.strokeWidth*i,a=Et(t.ctx.seed,e.id,"stroke")||1,s=e.stroke.dash?typeof e.stroke.dash.array=="string"?e.stroke.dash.array:e.stroke.dash.array.join(" "):void 0,d={...s!==void 0?{dashArray:s}:{},...e.stroke.dash?.offset!==void 0?{dashOffset:e.stroke.dash.offset}:{},lineCap:e.stroke.lineCap,lineJoin:e.stroke.lineJoin,miterLimit:e.stroke.miterLimit,...e.stroke.opacity!==void 0?{opacity:e.stroke.opacity}:{},...e.stroke.pathLength!==void 0?{pathLength:e.stroke.pathLength}:{},...e.stroke.paintOrder!==void 0?{paintOrder:e.stroke.paintOrder}:{},nonScaling:e.stroke.nonScaling},l="",c=e.route.geometry;if(c.kind==="polyline")l=we(t,{kind:"polyline",points:c.points},a,r,o,void 0,s,d);else if(c.kind==="line")l=we(t,c,a,r,o,void 0,s,d);else{let f=Mn(c,e.route.closed);if(f.length===1&&(l=we(t,{kind:"path",d:c.d},a,r,o,void 0,s,d)),!l&&c.points.length>1){let m=f.map((h,y)=>{let g=h.points[0],S=h.points.at(-1),k=h.closed&&g&&S&&(g.x!==S.x||g.y!==S.y)?[...h.points,g]:h.points;return we(t,{kind:"polyline",points:[...k]},a+y,r,o,void 0,s,d)});l=m.every(Boolean)?m.join(`
@@ -1,4 +1,4 @@
1
- import{c as Ye,d as Fe}from"./chunk-A7L4WWVW.js";import{f as Ze}from"./chunk-EBPTM2RP.js";import"./chunk-KJVNXJ5Y.js";import{e as xe}from"./chunk-QMZ4Y6I7.js";import"./chunk-FFOHLPDA.js";import{a as it}from"./chunk-I6VE56S7.js";import{a as rt}from"./chunk-OFRMKQA6.js";import{b as Ne,e as Be}from"./chunk-FLD63DXE.js";import{a as J,c as fe,d as ue,e as ee,g as _e,j as A,k as me}from"./chunk-32FWKUUV.js";import{a as Xe,b as Oe,c as Ge}from"./chunk-EPFMQPXX.js";import{G as Ke,H as Qe,I as Je,L as G,N as Ve,O as b,P as Z,i as ae,ia as V,j as Le,ja as se,ka as U,l as Ue,la as ce,m as We,na as et,oa as tt,pa as oe,qa as ot,t as je,xa as nt}from"./chunk-EX6TP7QM.js";import"./chunk-P7HMSKHJ.js";var Lt=Object.freeze({id:"sequence",upstreamId:"sequence",maturity:"stable",label:"Sequence",headers:["sequenceDiagram"],aliases:[],config:{section:"sequence",keys:["actorMargin","width","height","diagramMarginX","diagramMarginY","messageMargin","noteMargin","activationWidth","showSequenceNumbers","boxMargin","boxTextMargin","messageAlign","mirrorActors","bottomMarginAdj","rightAngles","wrap","wrapPadding","labelBoxWidth","labelBoxHeight","hideUnusedParticipants","forceMenus","arrowMarkerAbsolute","noteAlign","actorFontSize","actorFontFamily","actorFontWeight","noteFontSize","noteFontFamily","noteFontWeight","messageFontSize","messageFontFamily","messageFontWeight","useMaxWidth","useWidth"],noopKeys:["actorFontFamily","actorFontSize","actorFontWeight","arrowMarkerAbsolute","bottomMarginAdj","boxMargin","boxTextMargin","forceMenus","hideUnusedParticipants","labelBoxHeight","labelBoxWidth","messageAlign","messageFontFamily","messageFontSize","messageFontWeight","mirrorActors","noteAlign","noteFontFamily","noteFontSize","noteFontWeight","rightAngles","useMaxWidth","useWidth","wrap","wrapPadding"]},identity:{id:"family:sequence",kind:"family",version:"1.0.0",compatibility:{core:"^0.3.0"},provenance:{owner:"agentic-mermaid",source:"built-in"}},collisionPriority:100,semanticChannels:["category"],semanticRoles:["prelude","defs","chrome","actor","lifeline","activation","message","block","group","note","label","icon"],scenePrimitiveEvidence:[{role:"prelude",primitive:"document",applicability:"applicable",realization:"native",evidence:["src/__tests__/section-a-family-descriptor-conformance.test.ts"]},{role:"defs",primitive:"document",applicability:"applicable",realization:"native",evidence:["src/__tests__/section-a-family-descriptor-conformance.test.ts"]},{role:"defs",primitive:"marker",applicability:"applicable",realization:"native",evidence:["src/__tests__/section-a-family-descriptor-conformance.test.ts"]},{role:"chrome",primitive:"document",applicability:"applicable",realization:"native",evidence:["src/__tests__/section-a-family-descriptor-conformance.test.ts"]},{role:"chrome",primitive:"shape",applicability:"applicable",realization:"native",evidence:["src/__tests__/section-a-family-descriptor-conformance.test.ts"]},{role:"actor",primitive:"shape",applicability:"applicable",realization:"native",evidence:["src/__tests__/section-a-family-descriptor-conformance.test.ts"]},{role:"actor",primitive:"container",applicability:"applicable",realization:"native",evidence:["src/__tests__/section-a-family-descriptor-conformance.test.ts"]},{role:"lifeline",primitive:"connector",applicability:"applicable",realization:"native",evidence:["src/__tests__/section-a-family-descriptor-conformance.test.ts"]},{role:"activation",primitive:"shape",applicability:"applicable",realization:"native",evidence:["src/__tests__/section-a-family-descriptor-conformance.test.ts"]},{role:"message",primitive:"container",applicability:"applicable",realization:"native",evidence:["src/__tests__/section-a-family-descriptor-conformance.test.ts"]},{role:"message",primitive:"connector",applicability:"applicable",realization:"native",evidence:["src/__tests__/section-a-family-descriptor-conformance.test.ts"]},{role:"block",primitive:"shape",applicability:"applicable",realization:"native",evidence:["src/__tests__/section-a-family-descriptor-conformance.test.ts"]},{role:"block",primitive:"container",applicability:"applicable",realization:"native",evidence:["src/__tests__/section-a-family-descriptor-conformance.test.ts"]},{role:"block",primitive:"connector",applicability:"applicable",realization:"native",evidence:["src/__tests__/section-a-family-descriptor-conformance.test.ts"]},{role:"group",primitive:"shape",applicability:"applicable",realization:"native",evidence:["src/__tests__/section-a-family-descriptor-conformance.test.ts"]},{role:"group",primitive:"container",applicability:"applicable",realization:"native",evidence:["src/__tests__/section-a-family-descriptor-conformance.test.ts"]},{role:"note",primitive:"shape",applicability:"applicable",realization:"native",evidence:["src/__tests__/section-a-family-descriptor-conformance.test.ts"]},{role:"note",primitive:"container",applicability:"applicable",realization:"native",evidence:["src/__tests__/section-a-family-descriptor-conformance.test.ts"]},{role:"label",primitive:"text",applicability:"applicable",realization:"native",evidence:["src/__tests__/section-a-family-descriptor-conformance.test.ts"]},{role:"icon",primitive:"document",applicability:"applicable",realization:"native",evidence:["src/__tests__/section-a-family-descriptor-conformance.test.ts"]},{role:"icon",primitive:"text",applicability:"applicable",realization:"native",evidence:["src/__tests__/section-a-family-descriptor-conformance.test.ts"]},{role:"icon",primitive:"shape",applicability:"applicable",realization:"native",evidence:["src/__tests__/section-a-family-descriptor-conformance.test.ts"]}],example:`sequenceDiagram
1
+ import{c as Ye,d as Fe}from"./chunk-A7L4WWVW.js";import{f as Ze}from"./chunk-ZMPTJUXS.js";import"./chunk-KJVNXJ5Y.js";import{e as xe}from"./chunk-5QI4P3EJ.js";import"./chunk-FFOHLPDA.js";import{a as it}from"./chunk-I6VE56S7.js";import{a as rt}from"./chunk-OFRMKQA6.js";import{b as Ne,e as Be}from"./chunk-FLD63DXE.js";import{a as J,c as fe,d as ue,e as ee,g as _e,j as A,k as me}from"./chunk-55F5M5XA.js";import{a as Xe,b as Oe,c as Ge}from"./chunk-EPFMQPXX.js";import{G as Ke,H as Qe,I as Je,L as G,N as Ve,O as b,P as Z,i as ae,ia as V,j as Le,ja as se,ka as U,l as Ue,la as ce,m as We,na as et,oa as tt,pa as oe,qa as ot,t as je,xa as nt}from"./chunk-DQHK4JCG.js";import"./chunk-P7HMSKHJ.js";var Lt=Object.freeze({id:"sequence",upstreamId:"sequence",maturity:"stable",label:"Sequence",headers:["sequenceDiagram"],aliases:[],config:{section:"sequence",keys:["actorMargin","width","height","diagramMarginX","diagramMarginY","messageMargin","noteMargin","activationWidth","showSequenceNumbers","boxMargin","boxTextMargin","messageAlign","mirrorActors","bottomMarginAdj","rightAngles","wrap","wrapPadding","labelBoxWidth","labelBoxHeight","hideUnusedParticipants","forceMenus","arrowMarkerAbsolute","noteAlign","actorFontSize","actorFontFamily","actorFontWeight","noteFontSize","noteFontFamily","noteFontWeight","messageFontSize","messageFontFamily","messageFontWeight","useMaxWidth","useWidth"],noopKeys:["actorFontFamily","actorFontSize","actorFontWeight","arrowMarkerAbsolute","bottomMarginAdj","boxMargin","boxTextMargin","forceMenus","hideUnusedParticipants","labelBoxHeight","labelBoxWidth","messageAlign","messageFontFamily","messageFontSize","messageFontWeight","mirrorActors","noteAlign","noteFontFamily","noteFontSize","noteFontWeight","rightAngles","useMaxWidth","useWidth","wrap","wrapPadding"]},identity:{id:"family:sequence",kind:"family",version:"1.0.0",compatibility:{core:"^0.4.0"},provenance:{owner:"agentic-mermaid",source:"built-in"}},collisionPriority:100,semanticChannels:["category"],semanticRoles:["prelude","defs","chrome","actor","lifeline","activation","message","block","group","note","label","icon"],scenePrimitiveEvidence:[{role:"prelude",primitive:"document",applicability:"applicable",realization:"native",evidence:["src/__tests__/section-a-family-descriptor-conformance.test.ts"]},{role:"defs",primitive:"document",applicability:"applicable",realization:"native",evidence:["src/__tests__/section-a-family-descriptor-conformance.test.ts"]},{role:"defs",primitive:"marker",applicability:"applicable",realization:"native",evidence:["src/__tests__/section-a-family-descriptor-conformance.test.ts"]},{role:"chrome",primitive:"document",applicability:"applicable",realization:"native",evidence:["src/__tests__/section-a-family-descriptor-conformance.test.ts"]},{role:"chrome",primitive:"shape",applicability:"applicable",realization:"native",evidence:["src/__tests__/section-a-family-descriptor-conformance.test.ts"]},{role:"actor",primitive:"shape",applicability:"applicable",realization:"native",evidence:["src/__tests__/section-a-family-descriptor-conformance.test.ts"]},{role:"actor",primitive:"container",applicability:"applicable",realization:"native",evidence:["src/__tests__/section-a-family-descriptor-conformance.test.ts"]},{role:"lifeline",primitive:"connector",applicability:"applicable",realization:"native",evidence:["src/__tests__/section-a-family-descriptor-conformance.test.ts"]},{role:"activation",primitive:"shape",applicability:"applicable",realization:"native",evidence:["src/__tests__/section-a-family-descriptor-conformance.test.ts"]},{role:"message",primitive:"container",applicability:"applicable",realization:"native",evidence:["src/__tests__/section-a-family-descriptor-conformance.test.ts"]},{role:"message",primitive:"connector",applicability:"applicable",realization:"native",evidence:["src/__tests__/section-a-family-descriptor-conformance.test.ts"]},{role:"block",primitive:"shape",applicability:"applicable",realization:"native",evidence:["src/__tests__/section-a-family-descriptor-conformance.test.ts"]},{role:"block",primitive:"container",applicability:"applicable",realization:"native",evidence:["src/__tests__/section-a-family-descriptor-conformance.test.ts"]},{role:"block",primitive:"connector",applicability:"applicable",realization:"native",evidence:["src/__tests__/section-a-family-descriptor-conformance.test.ts"]},{role:"group",primitive:"shape",applicability:"applicable",realization:"native",evidence:["src/__tests__/section-a-family-descriptor-conformance.test.ts"]},{role:"group",primitive:"container",applicability:"applicable",realization:"native",evidence:["src/__tests__/section-a-family-descriptor-conformance.test.ts"]},{role:"note",primitive:"shape",applicability:"applicable",realization:"native",evidence:["src/__tests__/section-a-family-descriptor-conformance.test.ts"]},{role:"note",primitive:"container",applicability:"applicable",realization:"native",evidence:["src/__tests__/section-a-family-descriptor-conformance.test.ts"]},{role:"label",primitive:"text",applicability:"applicable",realization:"native",evidence:["src/__tests__/section-a-family-descriptor-conformance.test.ts"]},{role:"icon",primitive:"document",applicability:"applicable",realization:"native",evidence:["src/__tests__/section-a-family-descriptor-conformance.test.ts"]},{role:"icon",primitive:"text",applicability:"applicable",realization:"native",evidence:["src/__tests__/section-a-family-descriptor-conformance.test.ts"]},{role:"icon",primitive:"shape",applicability:"applicable",realization:"native",evidence:["src/__tests__/section-a-family-descriptor-conformance.test.ts"]}],example:`sequenceDiagram
2
2
  participant U as User
3
3
  participant S as Server
4
4
  U->>S: request
@@ -1,4 +1,4 @@
1
- import{b as l}from"./chunk-WN7SFUCZ.js";import{a as c}from"./chunk-QYJMRNS3.js";import{a as n}from"./chunk-CCTZFX43.js";import"./chunk-T7IJ6V4B.js";import"./chunk-5Q4S74UO.js";import"./chunk-STQRDZ67.js";import{c as o}from"./chunk-W6Q4PHPC.js";import"./chunk-WEUWIFG3.js";import"./chunk-EBPTM2RP.js";import"./chunk-KJVNXJ5Y.js";import"./chunk-M6BT2HIP.js";import"./chunk-32FWKUUV.js";import{a,b as r,c as s}from"./chunk-EPFMQPXX.js";import"./chunk-EX6TP7QM.js";import"./chunk-P7HMSKHJ.js";var d=Object.freeze({id:"state",upstreamId:"stateDiagram",maturity:"stable",label:"State",headers:["stateDiagram","stateDiagram-v2"],aliases:[],config:{section:"state",keys:["arrowMarkerAbsolute","compositTitleSize","defaultRenderer","dividerMargin","edgeLengthFactor","fontSize","fontSizeFactor","forkHeight","forkWidth","labelHeight","miniPadding","nodeSpacing","noteMargin","padding","radius","rankSpacing","sizeUnit","textHeight","titleShift","titleTopMargin"]},identity:{id:"family:state",kind:"family",version:"1.0.0",compatibility:{core:"^0.3.0"},provenance:{owner:"agentic-mermaid",source:"built-in"}},collisionPriority:100,semanticChannels:["status"],semanticRoles:["prelude","defs","chrome","group","group-header","edge","edge-label","node","note","label"],scenePrimitiveEvidence:[{role:"prelude",primitive:"document",applicability:"applicable",realization:"native",evidence:["src/__tests__/section-a-family-descriptor-conformance.test.ts"]},{role:"defs",primitive:"document",applicability:"applicable",realization:"native",evidence:["src/__tests__/section-a-family-descriptor-conformance.test.ts"]},{role:"defs",primitive:"marker",applicability:"applicable",realization:"native",evidence:["src/__tests__/section-a-family-descriptor-conformance.test.ts"]},{role:"chrome",primitive:"document",applicability:"applicable",realization:"native",evidence:["src/__tests__/section-a-family-descriptor-conformance.test.ts"]},{role:"chrome",primitive:"shape",applicability:"applicable",realization:"native",evidence:["src/__tests__/section-a-family-descriptor-conformance.test.ts"]},{role:"group",primitive:"shape",applicability:"applicable",realization:"native",evidence:["src/__tests__/section-a-family-descriptor-conformance.test.ts"]},{role:"group",primitive:"container",applicability:"applicable",realization:"native",evidence:["src/__tests__/section-a-family-descriptor-conformance.test.ts"]},{role:"group-header",primitive:"text",applicability:"applicable",realization:"native",evidence:["src/__tests__/section-a-family-descriptor-conformance.test.ts"]},{role:"group-header",primitive:"shape",applicability:"applicable",realization:"native",evidence:["src/__tests__/section-a-family-descriptor-conformance.test.ts"]},{role:"edge",primitive:"connector",applicability:"applicable",realization:"native",evidence:["src/__tests__/section-a-family-descriptor-conformance.test.ts"]},{role:"edge-label",primitive:"container",applicability:"applicable",realization:"native",evidence:["src/__tests__/section-a-family-descriptor-conformance.test.ts"]},{role:"node",primitive:"shape",applicability:"applicable",realization:"native",evidence:["src/__tests__/section-a-family-descriptor-conformance.test.ts"]},{role:"node",primitive:"container",applicability:"applicable",realization:"native",evidence:["src/__tests__/section-a-family-descriptor-conformance.test.ts"]},{role:"note",primitive:"shape",applicability:"applicable",realization:"native",evidence:["src/__tests__/section-a-family-descriptor-conformance.test.ts"]},{role:"note",primitive:"container",applicability:"applicable",realization:"native",evidence:["src/__tests__/section-a-family-descriptor-conformance.test.ts"]},{role:"label",primitive:"text",applicability:"applicable",realization:"native",evidence:["src/__tests__/section-a-family-descriptor-conformance.test.ts"]}],example:`stateDiagram-v2
1
+ import{b as l}from"./chunk-N2K2BPQT.js";import{a as c}from"./chunk-HO5GDIPN.js";import{a as n}from"./chunk-OLQF6DTZ.js";import"./chunk-T7IJ6V4B.js";import"./chunk-5Q4S74UO.js";import"./chunk-STQRDZ67.js";import{c as o}from"./chunk-4ZURJQXD.js";import"./chunk-WEUWIFG3.js";import"./chunk-ZMPTJUXS.js";import"./chunk-KJVNXJ5Y.js";import"./chunk-M6BT2HIP.js";import"./chunk-55F5M5XA.js";import{a,b as r,c as s}from"./chunk-EPFMQPXX.js";import"./chunk-DQHK4JCG.js";import"./chunk-P7HMSKHJ.js";var d=Object.freeze({id:"state",upstreamId:"stateDiagram",maturity:"stable",label:"State",headers:["stateDiagram","stateDiagram-v2"],aliases:[],config:{section:"state",keys:["arrowMarkerAbsolute","compositTitleSize","defaultRenderer","dividerMargin","edgeLengthFactor","fontSize","fontSizeFactor","forkHeight","forkWidth","labelHeight","miniPadding","nodeSpacing","noteMargin","padding","radius","rankSpacing","sizeUnit","textHeight","titleShift","titleTopMargin"]},identity:{id:"family:state",kind:"family",version:"1.0.0",compatibility:{core:"^0.4.0"},provenance:{owner:"agentic-mermaid",source:"built-in"}},collisionPriority:100,semanticChannels:["status"],semanticRoles:["prelude","defs","chrome","group","group-header","edge","edge-label","node","note","label"],scenePrimitiveEvidence:[{role:"prelude",primitive:"document",applicability:"applicable",realization:"native",evidence:["src/__tests__/section-a-family-descriptor-conformance.test.ts"]},{role:"defs",primitive:"document",applicability:"applicable",realization:"native",evidence:["src/__tests__/section-a-family-descriptor-conformance.test.ts"]},{role:"defs",primitive:"marker",applicability:"applicable",realization:"native",evidence:["src/__tests__/section-a-family-descriptor-conformance.test.ts"]},{role:"chrome",primitive:"document",applicability:"applicable",realization:"native",evidence:["src/__tests__/section-a-family-descriptor-conformance.test.ts"]},{role:"chrome",primitive:"shape",applicability:"applicable",realization:"native",evidence:["src/__tests__/section-a-family-descriptor-conformance.test.ts"]},{role:"group",primitive:"shape",applicability:"applicable",realization:"native",evidence:["src/__tests__/section-a-family-descriptor-conformance.test.ts"]},{role:"group",primitive:"container",applicability:"applicable",realization:"native",evidence:["src/__tests__/section-a-family-descriptor-conformance.test.ts"]},{role:"group-header",primitive:"text",applicability:"applicable",realization:"native",evidence:["src/__tests__/section-a-family-descriptor-conformance.test.ts"]},{role:"group-header",primitive:"shape",applicability:"applicable",realization:"native",evidence:["src/__tests__/section-a-family-descriptor-conformance.test.ts"]},{role:"edge",primitive:"connector",applicability:"applicable",realization:"native",evidence:["src/__tests__/section-a-family-descriptor-conformance.test.ts"]},{role:"edge-label",primitive:"container",applicability:"applicable",realization:"native",evidence:["src/__tests__/section-a-family-descriptor-conformance.test.ts"]},{role:"node",primitive:"shape",applicability:"applicable",realization:"native",evidence:["src/__tests__/section-a-family-descriptor-conformance.test.ts"]},{role:"node",primitive:"container",applicability:"applicable",realization:"native",evidence:["src/__tests__/section-a-family-descriptor-conformance.test.ts"]},{role:"note",primitive:"shape",applicability:"applicable",realization:"native",evidence:["src/__tests__/section-a-family-descriptor-conformance.test.ts"]},{role:"note",primitive:"container",applicability:"applicable",realization:"native",evidence:["src/__tests__/section-a-family-descriptor-conformance.test.ts"]},{role:"label",primitive:"text",applicability:"applicable",realization:"native",evidence:["src/__tests__/section-a-family-descriptor-conformance.test.ts"]}],example:`stateDiagram-v2
2
2
  [*] --> Draft
3
3
  Draft --> Review : submit
4
4
  Review --> [*] : approve`,detect:function(i){let t=(i.split(";")[0]??"").trim().toLowerCase();return/^statediagram(?:-v2)?\s*$/.test(t)},detectLoose:function(i){let t=(i.split(";")[0]??"").trim().toLowerCase();return/^statediagram(?:-v2)?(?:\s|$)/.test(t)}}),p=d;var z=s(p,{normalizeRequest:e=>{let i=l(e.source.frontmatter,e.renderOptions),{stateVisual:t,...m}=i;return{renderOptions:m,...t?{appearance:{family:{visual:t}}}:{}}},layout:e=>{let i=e.familyAppearance?.visual;return r(o(n(e.source.familyText),{...e.renderOptions,...e.styleFace?{styleFace:e.styleFace}:{},...i?{stateVisual:i}:{}}))},lowerScene:a(c)});export{z as default};
@@ -1,4 +1,4 @@
1
- import{a as Le}from"./chunk-M6BT2HIP.js";import{a as Q}from"./chunk-PZEWZT35.js";import{a as Ae}from"./chunk-I6VE56S7.js";import{a as De}from"./chunk-OFRMKQA6.js";import{b as ke,c as Me,d as Fe}from"./chunk-FLD63DXE.js";import{e as me,j as U,k as oe}from"./chunk-32FWKUUV.js";import{a as We,b as Pe,c as Ee}from"./chunk-EPFMQPXX.js";import{G as Ce,H as Re,I as we,L as H,M as K,N as pe,O as M,P as V,e as j,i as q,ia as E,ka as J,la as he,oa as Ie,pa as ae,qa as ze}from"./chunk-EX6TP7QM.js";import"./chunk-P7HMSKHJ.js";var ti=Object.freeze({id:"timeline",upstreamId:"timeline",maturity:"experimental",label:"Timeline",headers:["timeline"],aliases:[],config:{section:"timeline",keys:["disableMulticolor","sectionFills","sectionColours","diagramMarginX","diagramMarginY","leftMargin","width","height","padding","boxMargin","boxTextMargin","noteMargin","messageMargin","messageAlign","bottomMarginAdj","rightAngles","taskFontSize","taskFontFamily","taskMargin","activationWidth","textPlacement","actorColours","useMaxWidth","useWidth"],noopKeys:["diagramMarginX","diagramMarginY","leftMargin","width","height","padding","boxMargin","boxTextMargin","noteMargin","messageMargin","messageAlign","bottomMarginAdj","rightAngles","taskFontSize","taskFontFamily","taskMargin","activationWidth","textPlacement","actorColours","useMaxWidth","useWidth"]},identity:{id:"family:timeline",kind:"family",version:"1.0.0",compatibility:{core:"^0.3.0"},provenance:{owner:"agentic-mermaid",source:"built-in"}},collisionPriority:100,semanticChannels:["category"],semanticRoles:["prelude","chrome","rail","title","section","group-header","period","event","label"],scenePrimitiveEvidence:[{role:"prelude",primitive:"document",applicability:"applicable",realization:"native",evidence:["src/__tests__/section-a-family-descriptor-conformance.test.ts"]},{role:"chrome",primitive:"document",applicability:"applicable",realization:"native",evidence:["src/__tests__/section-a-family-descriptor-conformance.test.ts"]},{role:"rail",primitive:"shape",applicability:"applicable",realization:"native",evidence:["src/__tests__/section-a-family-descriptor-conformance.test.ts"]},{role:"title",primitive:"text",applicability:"applicable",realization:"native",evidence:["src/__tests__/section-a-family-descriptor-conformance.test.ts"]},{role:"section",primitive:"shape",applicability:"applicable",realization:"native",evidence:["src/__tests__/section-a-family-descriptor-conformance.test.ts"]},{role:"section",primitive:"container",applicability:"applicable",realization:"native",evidence:["src/__tests__/section-a-family-descriptor-conformance.test.ts"]},{role:"group-header",primitive:"text",applicability:"applicable",realization:"native",evidence:["src/__tests__/section-a-family-descriptor-conformance.test.ts"]},{role:"group-header",primitive:"shape",applicability:"applicable",realization:"native",evidence:["src/__tests__/section-a-family-descriptor-conformance.test.ts"]},{role:"period",primitive:"shape",applicability:"applicable",realization:"native",evidence:["src/__tests__/section-a-family-descriptor-conformance.test.ts"]},{role:"period",primitive:"container",applicability:"applicable",realization:"native",evidence:["src/__tests__/section-a-family-descriptor-conformance.test.ts"]},{role:"event",primitive:"shape",applicability:"applicable",realization:"native",evidence:["src/__tests__/section-a-family-descriptor-conformance.test.ts"]},{role:"event",primitive:"container",applicability:"applicable",realization:"native",evidence:["src/__tests__/section-a-family-descriptor-conformance.test.ts"]},{role:"label",primitive:"text",applicability:"applicable",realization:"native",evidence:["src/__tests__/section-a-family-descriptor-conformance.test.ts"]}],example:`timeline
1
+ import{a as Le}from"./chunk-M6BT2HIP.js";import{a as Q}from"./chunk-PZEWZT35.js";import{a as Ae}from"./chunk-I6VE56S7.js";import{a as De}from"./chunk-OFRMKQA6.js";import{b as ke,c as Me,d as Fe}from"./chunk-FLD63DXE.js";import{e as me,j as U,k as oe}from"./chunk-55F5M5XA.js";import{a as We,b as Pe,c as Ee}from"./chunk-EPFMQPXX.js";import{G as Ce,H as Re,I as we,L as H,M as K,N as pe,O as M,P as V,e as j,i as q,ia as E,ka as J,la as he,oa as Ie,pa as ae,qa as ze}from"./chunk-DQHK4JCG.js";import"./chunk-P7HMSKHJ.js";var ti=Object.freeze({id:"timeline",upstreamId:"timeline",maturity:"experimental",label:"Timeline",headers:["timeline"],aliases:[],config:{section:"timeline",keys:["disableMulticolor","sectionFills","sectionColours","diagramMarginX","diagramMarginY","leftMargin","width","height","padding","boxMargin","boxTextMargin","noteMargin","messageMargin","messageAlign","bottomMarginAdj","rightAngles","taskFontSize","taskFontFamily","taskMargin","activationWidth","textPlacement","actorColours","useMaxWidth","useWidth"],noopKeys:["diagramMarginX","diagramMarginY","leftMargin","width","height","padding","boxMargin","boxTextMargin","noteMargin","messageMargin","messageAlign","bottomMarginAdj","rightAngles","taskFontSize","taskFontFamily","taskMargin","activationWidth","textPlacement","actorColours","useMaxWidth","useWidth"]},identity:{id:"family:timeline",kind:"family",version:"1.0.0",compatibility:{core:"^0.4.0"},provenance:{owner:"agentic-mermaid",source:"built-in"}},collisionPriority:100,semanticChannels:["category"],semanticRoles:["prelude","chrome","rail","title","section","group-header","period","event","label"],scenePrimitiveEvidence:[{role:"prelude",primitive:"document",applicability:"applicable",realization:"native",evidence:["src/__tests__/section-a-family-descriptor-conformance.test.ts"]},{role:"chrome",primitive:"document",applicability:"applicable",realization:"native",evidence:["src/__tests__/section-a-family-descriptor-conformance.test.ts"]},{role:"rail",primitive:"shape",applicability:"applicable",realization:"native",evidence:["src/__tests__/section-a-family-descriptor-conformance.test.ts"]},{role:"title",primitive:"text",applicability:"applicable",realization:"native",evidence:["src/__tests__/section-a-family-descriptor-conformance.test.ts"]},{role:"section",primitive:"shape",applicability:"applicable",realization:"native",evidence:["src/__tests__/section-a-family-descriptor-conformance.test.ts"]},{role:"section",primitive:"container",applicability:"applicable",realization:"native",evidence:["src/__tests__/section-a-family-descriptor-conformance.test.ts"]},{role:"group-header",primitive:"text",applicability:"applicable",realization:"native",evidence:["src/__tests__/section-a-family-descriptor-conformance.test.ts"]},{role:"group-header",primitive:"shape",applicability:"applicable",realization:"native",evidence:["src/__tests__/section-a-family-descriptor-conformance.test.ts"]},{role:"period",primitive:"shape",applicability:"applicable",realization:"native",evidence:["src/__tests__/section-a-family-descriptor-conformance.test.ts"]},{role:"period",primitive:"container",applicability:"applicable",realization:"native",evidence:["src/__tests__/section-a-family-descriptor-conformance.test.ts"]},{role:"event",primitive:"shape",applicability:"applicable",realization:"native",evidence:["src/__tests__/section-a-family-descriptor-conformance.test.ts"]},{role:"event",primitive:"container",applicability:"applicable",realization:"native",evidence:["src/__tests__/section-a-family-descriptor-conformance.test.ts"]},{role:"label",primitive:"text",applicability:"applicable",realization:"native",evidence:["src/__tests__/section-a-family-descriptor-conformance.test.ts"]}],example:`timeline
2
2
  title Roadmap
3
3
  2025 : Alpha : Beta
4
4
  2026 : GA`,detect:e=>/^timeline(?:\s+(?:td|tb|lr|bt|rl))?\s*$/.test(e),detectLoose:e=>/^timeline(?:\s|$)/.test(e)}),Xe=ti;var o={paddingX:32,paddingY:28,titleFontSize:18,titleFontWeight:600,titleGap:24,titleWrapWidth:420,sectionHeaderHeight:24,sectionFontSize:12,sectionFontWeight:600,sectionHeaderPadX:12,sectionHeaderGap:14,sectionWrapWidth:168,sectionPadX:18,sectionPadBottom:18,sectionGap:28,columnGap:24,pillFontSize:12,pillFontWeight:600,pillWrapWidth:116,pillPadX:12,pillPadY:8,pillMinWidth:72,railToPillGap:22,railToEventsGap:28,markerRadius:8,eventFontSize:12,eventFontWeight:400,eventWrapWidth:148,eventPadX:14,eventPadY:10,eventMinWidth:128,eventGap:10},He=36,ge={nodeLabelFontSize:o.eventFontSize,edgeLabelFontSize:o.pillFontSize,groupHeaderFontSize:o.sectionFontSize,nodeLabelFontWeight:o.eventFontWeight,edgeLabelFontWeight:o.pillFontWeight,groupHeaderFontWeight:o.sectionFontWeight,nodePaddingX:o.eventPadX,nodePaddingY:o.eventPadY,nodeCornerRadius:0,nodeLineWidth:me.outerBox,edgeLineWidth:1.5,groupCornerRadius:0,groupPaddingX:o.sectionPadX,groupPaddingY:o.sectionPadBottom,groupLabelPaddingX:o.sectionHeaderPadX,groupLineWidth:me.outerBox},ni={pill:o.pillWrapWidth,event:o.eventWrapWidth,pillMinWidth:o.pillMinWidth,eventMinWidth:o.eventMinWidth};function Oe(e,i={},r){let n=oe(i,ge,r),t=e.direction==="TD",a=(h,$)=>t?$:h,s=(h,$)=>t?h:$,d=e.sections.some(h=>!!h.label),l=e.sections.length>1||d,c=d?Math.max(o.sectionHeaderHeight,n.groupHeaderFontSize+n.groupPaddingY):0,u=l?n.groupPaddingX:0,v=e.title?le(U(e.title,n.groupTextTransform),o.titleWrapWidth,o.titleFontSize,o.titleFontWeight):void 0,f=v?q(v,o.titleFontSize,o.titleFontWeight):void 0,m=Ne(e,n,ni,t),b=i.timeline?.maxWidth;if(!t&&typeof b=="number"&&Number.isFinite(b)&&b>0){let h=ri(m,u,l),$=m.reduce((P,R)=>P+R.periods.length,0);if(h>b&&$>0){let P=m.reduce(($e,te)=>$e+te.periods.reduce((ne,w)=>ne+w.mainExtent,0),0),R=Math.max(He+n.nodePaddingX*2,(b-(h-P))/$),A=Math.max(He,R-n.nodePaddingX*2);m=Ne(e,n,{pill:Math.min(o.pillWrapWidth,A),event:Math.min(o.eventWrapWidth,A),pillMinWidth:Math.min(o.pillMinWidth,R),eventMinWidth:Math.min(o.eventMinWidth,R)},t)}}let y=Math.max(0,...m.flatMap(h=>h.periods.map($=>s($.pillWidth,$.pillHeight)))),T=o.paddingY;f&&(T+=f.height,T+=o.titleGap);let _=c+(d?o.sectionHeaderGap:0),g=t?o.paddingX:T,S=g+(t?l?u:0:_),p=S+y+o.railToPillGap,Y=p+o.railToEventsGap,z=t?_:0,C=t?T:o.paddingX,O=[],x=p+o.markerRadius;for(let h=0;h<e.sections.length;h++){let $=e.sections[h],P=m[h],R=C,A=z+P.innerMain+u*2,te=C+z+u+(P.innerMain-P.runMain)/2,ne=[],w=p+o.markerRadius;for(let re=0;re<$.periods.length;re++){let de=$.periods[re],k=P.periods[re],F=te+k.mainExtent/2,ce=Y,G=de.events.map((X,ei)=>{let I=k.events[ei],_e=F-a(I.width,I.height)/2,ii={id:X.id,sectionId:$.id,periodId:de.id,periodLabel:k.label,text:I.text,x:t?ce:_e,y:t?_e:ce,width:I.width,height:I.height};return ce+=s(I.width,I.height)+o.eventGap,ii}),ye=p+o.markerRadius,Se=G.length>0?Y-10:p+16,Ze=F-a(k.pillWidth,k.pillHeight)/2;if(ne.push({id:de.id,sectionId:$.id,label:k.label,centerX:t?S+k.pillWidth/2:F,markerX:t?p:F,markerY:t?F:p,pillX:t?S:F-k.pillWidth/2,pillY:t?Ze:S,pillWidth:k.pillWidth,pillHeight:k.pillHeight,stem:t?{x1:ye,y1:F,x2:Se,y2:F}:{x1:F,y1:ye,x2:F,y2:Se},events:G}),G.length>0){let X=G[G.length-1];w=Math.max(w,t?X.x+X.width:X.y+X.height)}te+=k.mainExtent+o.columnGap}w+=n.groupPaddingY,x=Math.max(x,w),O.push({id:$.id,label:P.label,x:t?g:R,y:t?R:g,width:t?w-g:A,height:t?A:w-g,framed:l,headerHeight:c,periods:ne}),C+=A,h<e.sections.length-1&&(C+=l?o.sectionGap:o.columnGap)}let W=C+(t?o.paddingY:o.paddingX),D=x+(t?o.paddingX:o.paddingY),Z=t?D:W,se=t?W:D,B=O.flatMap(h=>h.periods),ve=h=>t?h.markerY:h.centerX,ee=B.length>0?ve(B[0]):t?T:o.paddingX,ie=B.length>0?ve(B[B.length-1]):W-(t?o.paddingY:o.paddingX),xe=ee===ie?ee-42:ee,Te=ee===ie?ie+42:ie;return{width:Z,height:se,title:v?{text:v,x:Z/2,y:o.paddingY+f.height/2}:void 0,accessibilityTitle:e.accessibilityTitle,accessibilityDescription:e.accessibilityDescription,rail:t?{x1:p,y1:xe,x2:p,y2:Te}:{x1:xe,y1:p,x2:Te,y2:p},sections:O}}function Ne(e,i,r,n){let t=(a,s)=>n?s:a;return e.sections.map(a=>{let s=a.label?le(U(a.label,i.groupTextTransform),o.sectionWrapWidth,i.groupHeaderFontSize,i.groupHeaderFontWeight):void 0,d=a.periods.map(v=>{let f=le(U(v.label,i.edgeTextTransform),r.pill,i.edgeLabelFontSize,i.edgeLabelFontWeight),m=q(f,i.edgeLabelFontSize,i.edgeLabelFontWeight),b=Math.max(r.pillMinWidth,m.width+i.nodePaddingX*2),y=m.height+i.nodePaddingY*2,T=v.events.map(g=>{let S=le(U(g.text,i.nodeTextTransform),r.event,i.nodeLabelFontSize,i.nodeLabelFontWeight),p=q(S,i.nodeLabelFontSize,i.nodeLabelFontWeight);return{text:S,width:Math.max(r.eventMinWidth,p.width+i.nodePaddingX*2),height:p.height+i.nodePaddingY*2}}),_=Math.max(t(b,y),...T.map(g=>t(g.width,g.height)));return{label:f,pillWidth:b,pillHeight:y,mainExtent:_,events:T}}),l=d.reduce((v,f,m)=>{let b=m===0?0:o.columnGap;return v+b+f.mainExtent},0),c=s?q(s,i.groupHeaderFontSize,i.groupHeaderFontWeight).width+i.groupLabelPaddingX*2:0,u=n?l:Math.max(l,c);return{label:s,headerWidth:c,runMain:l,innerMain:u,periods:d}})}function ri(e,i,r){let n=o.paddingX;for(let t=0;t<e.length;t++)n+=e[t].innerMain+i*2,t<e.length-1&&(n+=r?o.sectionGap:o.columnGap);return n+o.paddingX}function le(e,i,r,n){return e.split(`
@@ -1,4 +1,4 @@
1
- import{a as ge,b as _e}from"./chunk-TBZAU7KC.js";import{c as D,d as K,e as ke}from"./chunk-A7L4WWVW.js";import"./chunk-KJVNXJ5Y.js";import{a as me,f as Xe}from"./chunk-ZZECLXC3.js";import{e as fe}from"./chunk-QMZ4Y6I7.js";import"./chunk-FFOHLPDA.js";import{b as Ae,f as $e}from"./chunk-FLD63DXE.js";import{a as oe,e as Se,f as Q,j as G,k as Z}from"./chunk-32FWKUUV.js";import{a as Le,b as ve,c as Te}from"./chunk-EPFMQPXX.js";import{G as we,H as ze,I as Me,N as M,ia as I,ja as Pe,ka as N,la as j,na as he,oa as Fe,pa as ue,qa as Re}from"./chunk-EX6TP7QM.js";import"./chunk-P7HMSKHJ.js";var Ct=Object.freeze({id:"xychart",upstreamId:"xychart",maturity:"stable",label:"XY chart",headers:["xychart","xychart-beta"],aliases:[],config:{section:"xyChart",keys:["width","height","useMaxWidth","useWidth","titleFontSize","titlePadding","chartOrientation","plotReservedSpacePercent","showDataLabel","showTitle","showLegend","legendFontSize","legendPadding","xAxis","yAxis"]},identity:{id:"family:xychart",kind:"family",version:"1.0.0",compatibility:{core:"^0.3.0"},provenance:{owner:"agentic-mermaid",source:"built-in"}},collisionPriority:100,semanticChannels:["value","category"],semanticRoles:["prelude","defs","chrome","grid","bar","series","point","axis","legend","title","label"],scenePrimitiveEvidence:[{role:"prelude",primitive:"document",applicability:"applicable",realization:"native",evidence:["src/__tests__/section-a-family-descriptor-conformance.test.ts"]},{role:"defs",primitive:"document",applicability:"applicable",realization:"native",evidence:["src/__tests__/section-a-family-descriptor-conformance.test.ts"]},{role:"chrome",primitive:"document",applicability:"applicable",realization:"native",evidence:["src/__tests__/section-a-family-descriptor-conformance.test.ts"]},{role:"chrome",primitive:"container",applicability:"applicable",realization:"native",evidence:["src/__tests__/section-a-family-descriptor-conformance.test.ts"]},{role:"grid",primitive:"shape",applicability:"applicable",realization:"native",evidence:["src/__tests__/section-a-family-descriptor-conformance.test.ts"]},{role:"bar",primitive:"shape",applicability:"applicable",realization:"native",evidence:["src/__tests__/section-a-family-descriptor-conformance.test.ts"]},{role:"bar",primitive:"data-mark",applicability:"applicable",realization:"native",evidence:["src/__tests__/section-a-family-descriptor-conformance.test.ts"]},{role:"series",primitive:"connector",applicability:"applicable",realization:"native",evidence:["src/__tests__/section-a-family-descriptor-conformance.test.ts"]},{role:"point",primitive:"shape",applicability:"applicable",realization:"native",evidence:["src/__tests__/section-a-family-descriptor-conformance.test.ts"]},{role:"point",primitive:"data-mark",applicability:"applicable",realization:"native",evidence:["src/__tests__/section-a-family-descriptor-conformance.test.ts"]},{role:"axis",primitive:"text",applicability:"applicable",realization:"native",evidence:["src/__tests__/section-a-family-descriptor-conformance.test.ts"]},{role:"axis",primitive:"shape",applicability:"applicable",realization:"native",evidence:["src/__tests__/section-a-family-descriptor-conformance.test.ts"]},{role:"legend",primitive:"text",applicability:"applicable",realization:"native",evidence:["src/__tests__/section-a-family-descriptor-conformance.test.ts"]},{role:"legend",primitive:"shape",applicability:"applicable",realization:"native",evidence:["src/__tests__/section-a-family-descriptor-conformance.test.ts"]},{role:"legend",primitive:"container",applicability:"applicable",realization:"native",evidence:["src/__tests__/section-a-family-descriptor-conformance.test.ts"]},{role:"title",primitive:"text",applicability:"applicable",realization:"native",evidence:["src/__tests__/section-a-family-descriptor-conformance.test.ts"]},{role:"label",primitive:"text",applicability:"applicable",realization:"native",evidence:["src/__tests__/section-a-family-descriptor-conformance.test.ts"]}],example:`xychart-beta
1
+ import{a as ge,b as _e}from"./chunk-2W3BS3M3.js";import{c as D,d as K,e as ke}from"./chunk-A7L4WWVW.js";import"./chunk-KJVNXJ5Y.js";import{a as me,f as Xe}from"./chunk-TCPK32QH.js";import{e as fe}from"./chunk-5QI4P3EJ.js";import"./chunk-FFOHLPDA.js";import{b as Ae,f as $e}from"./chunk-FLD63DXE.js";import{a as oe,e as Se,f as Q,j as G,k as Z}from"./chunk-55F5M5XA.js";import{a as Le,b as ve,c as Te}from"./chunk-EPFMQPXX.js";import{G as we,H as ze,I as Me,N as M,ia as I,ja as Pe,ka as N,la as j,na as he,oa as Fe,pa as ue,qa as Re}from"./chunk-DQHK4JCG.js";import"./chunk-P7HMSKHJ.js";var Ct=Object.freeze({id:"xychart",upstreamId:"xychart",maturity:"stable",label:"XY chart",headers:["xychart","xychart-beta"],aliases:[],config:{section:"xyChart",keys:["width","height","useMaxWidth","useWidth","titleFontSize","titlePadding","chartOrientation","plotReservedSpacePercent","showDataLabel","showTitle","showLegend","legendFontSize","legendPadding","xAxis","yAxis"]},identity:{id:"family:xychart",kind:"family",version:"1.0.0",compatibility:{core:"^0.4.0"},provenance:{owner:"agentic-mermaid",source:"built-in"}},collisionPriority:100,semanticChannels:["value","category"],semanticRoles:["prelude","defs","chrome","grid","bar","series","point","axis","legend","title","label"],scenePrimitiveEvidence:[{role:"prelude",primitive:"document",applicability:"applicable",realization:"native",evidence:["src/__tests__/section-a-family-descriptor-conformance.test.ts"]},{role:"defs",primitive:"document",applicability:"applicable",realization:"native",evidence:["src/__tests__/section-a-family-descriptor-conformance.test.ts"]},{role:"chrome",primitive:"document",applicability:"applicable",realization:"native",evidence:["src/__tests__/section-a-family-descriptor-conformance.test.ts"]},{role:"chrome",primitive:"container",applicability:"applicable",realization:"native",evidence:["src/__tests__/section-a-family-descriptor-conformance.test.ts"]},{role:"grid",primitive:"shape",applicability:"applicable",realization:"native",evidence:["src/__tests__/section-a-family-descriptor-conformance.test.ts"]},{role:"bar",primitive:"shape",applicability:"applicable",realization:"native",evidence:["src/__tests__/section-a-family-descriptor-conformance.test.ts"]},{role:"bar",primitive:"data-mark",applicability:"applicable",realization:"native",evidence:["src/__tests__/section-a-family-descriptor-conformance.test.ts"]},{role:"series",primitive:"connector",applicability:"applicable",realization:"native",evidence:["src/__tests__/section-a-family-descriptor-conformance.test.ts"]},{role:"point",primitive:"shape",applicability:"applicable",realization:"native",evidence:["src/__tests__/section-a-family-descriptor-conformance.test.ts"]},{role:"point",primitive:"data-mark",applicability:"applicable",realization:"native",evidence:["src/__tests__/section-a-family-descriptor-conformance.test.ts"]},{role:"axis",primitive:"text",applicability:"applicable",realization:"native",evidence:["src/__tests__/section-a-family-descriptor-conformance.test.ts"]},{role:"axis",primitive:"shape",applicability:"applicable",realization:"native",evidence:["src/__tests__/section-a-family-descriptor-conformance.test.ts"]},{role:"legend",primitive:"text",applicability:"applicable",realization:"native",evidence:["src/__tests__/section-a-family-descriptor-conformance.test.ts"]},{role:"legend",primitive:"shape",applicability:"applicable",realization:"native",evidence:["src/__tests__/section-a-family-descriptor-conformance.test.ts"]},{role:"legend",primitive:"container",applicability:"applicable",realization:"native",evidence:["src/__tests__/section-a-family-descriptor-conformance.test.ts"]},{role:"title",primitive:"text",applicability:"applicable",realization:"native",evidence:["src/__tests__/section-a-family-descriptor-conformance.test.ts"]},{role:"label",primitive:"text",applicability:"applicable",realization:"native",evidence:["src/__tests__/section-a-family-descriptor-conformance.test.ts"]}],example:`xychart-beta
2
2
  title "Revenue"
3
3
  x-axis [Q1, Q2, Q3]
4
4
  y-axis "USD" 0 --> 100
@@ -1 +1 @@
1
- import{a as n}from"./chunks/chunk-A7L4WWVW.js";import"./chunks/chunk-KJVNXJ5Y.js";import"./chunks/chunk-FFOHLPDA.js";import"./chunks/chunk-FLD63DXE.js";import{e as s}from"./chunks/chunk-P7HMSKHJ.js";var p=Object.freeze(["flowchart","state","sequence","timeline","class","er","journey","architecture","xychart","pie","quadrant","gantt","mindmap","gitgraph","radar"]),d=Object.freeze([Object.freeze({id:"flowchart",detect:function(t){let r=(t.split(";")[0]??"").trim().toLowerCase();return/^(?:flowchart|graph|swimlane)(?:\s|$)/.test(r)}}),Object.freeze({id:"state",detect:function(t){let r=(t.split(";")[0]??"").trim().toLowerCase();return/^statediagram(?:-v2)?\s*$/.test(r)}}),Object.freeze({id:"sequence",detect:e=>/^sequencediagram\s*$/.test(e)}),Object.freeze({id:"timeline",detect:e=>/^timeline(?:\s+(?:td|tb|lr|bt|rl))?\s*$/.test(e)}),Object.freeze({id:"class",detect:e=>/^classdiagram\s*$/.test(e)}),Object.freeze({id:"er",detect:e=>/^erdiagram(?:\s+subgraph\b.*)?\s*$/.test(e)}),Object.freeze({id:"journey",detect:e=>/^journey\s*$/.test(e)}),Object.freeze({id:"architecture",detect:e=>/^architecture(?:-beta)?\s*$/.test(e)}),Object.freeze({id:"xychart",detect:e=>/^xychart(?:-beta)?(?:\s|$)/.test(e)}),Object.freeze({id:"pie",detect:e=>/^pie(?:\s|$)/.test(e)}),Object.freeze({id:"quadrant",detect:e=>/^quadrant(?:chart)?\s*$/.test(e)}),Object.freeze({id:"gantt",detect:e=>/^gantt\s*$/.test(e)}),Object.freeze({id:"mindmap",detect:e=>/^mindmap\s*$/.test(e)}),Object.freeze({id:"gitgraph",detect:e=>/^gitgraph(?:\s+(?:lr|tb|bt))?\s*:?\s*$/.test(e)}),Object.freeze({id:"radar",detect:e=>/^radar-beta(?:\s|:|$)/.test(e)})]);function a(e){let t=(e.split(";")[0]??"").trim().toLowerCase();for(let r of d)if(r.detect(t))return r.id;return null}var m=Object.freeze({flowchart:()=>import("./chunks/flowchart-5FP7RRIK.js"),state:()=>import("./chunks/state-IWPLFQ6R.js"),sequence:()=>import("./chunks/sequence-5O5ET264.js"),timeline:()=>import("./chunks/timeline-WJWYHH5Y.js"),class:()=>import("./chunks/class-7JRALQIM.js"),er:()=>import("./chunks/er-UDCGHKBX.js"),journey:()=>import("./chunks/journey-646EFIB6.js"),architecture:()=>import("./chunks/architecture-WMSX5L4P.js"),xychart:()=>import("./chunks/xychart-HHQVQA5O.js"),pie:()=>import("./chunks/pie-7FDXZ24K.js"),quadrant:()=>import("./chunks/quadrant-72UT4XAW.js"),gantt:()=>import("./chunks/gantt-NTOIC5CW.js"),mindmap:()=>import("./chunks/mindmap-2SBTQHQO.js"),gitgraph:()=>import("./chunks/gitgraph-JYAPXUIJ.js"),radar:()=>import("./chunks/radar-SU7BO56J.js")}),i=class extends Error{code="UNSUPPORTED_FAMILY";constructor(t){super(`Unsupported Mermaid family in async browser renderer: ${JSON.stringify(t)}.`),this.name="BrowserFamilyDetectionError"}};function l(e){let t=n(s(e)),r=a(t.firstLine);if(!r)throw new i(t.firstLine);return r}async function b(e,t={}){let r=l(e),[{default:o},{renderLoadedFamilySvg:c}]=await Promise.all([m[r](),import("./chunks/render-core-Q2JWXDDL.js")]);return c(e,t,o)}export{i as BrowserFamilyDetectionError,b as renderMermaidSVGAsync};
1
+ import{a as n}from"./chunks/chunk-A7L4WWVW.js";import"./chunks/chunk-KJVNXJ5Y.js";import"./chunks/chunk-FFOHLPDA.js";import"./chunks/chunk-FLD63DXE.js";import{e as s}from"./chunks/chunk-P7HMSKHJ.js";var p=Object.freeze(["flowchart","state","sequence","timeline","class","er","journey","architecture","xychart","pie","quadrant","gantt","mindmap","gitgraph","radar"]),d=Object.freeze([Object.freeze({id:"flowchart",detect:function(t){let r=(t.split(";")[0]??"").trim().toLowerCase();return/^(?:flowchart|graph|swimlane)(?:\s|$)/.test(r)}}),Object.freeze({id:"state",detect:function(t){let r=(t.split(";")[0]??"").trim().toLowerCase();return/^statediagram(?:-v2)?\s*$/.test(r)}}),Object.freeze({id:"sequence",detect:e=>/^sequencediagram\s*$/.test(e)}),Object.freeze({id:"timeline",detect:e=>/^timeline(?:\s+(?:td|tb|lr|bt|rl))?\s*$/.test(e)}),Object.freeze({id:"class",detect:e=>/^classdiagram\s*$/.test(e)}),Object.freeze({id:"er",detect:e=>/^erdiagram(?:\s+subgraph\b.*)?\s*$/.test(e)}),Object.freeze({id:"journey",detect:e=>/^journey\s*$/.test(e)}),Object.freeze({id:"architecture",detect:e=>/^architecture(?:-beta)?\s*$/.test(e)}),Object.freeze({id:"xychart",detect:e=>/^xychart(?:-beta)?(?:\s|$)/.test(e)}),Object.freeze({id:"pie",detect:e=>/^pie(?:\s|$)/.test(e)}),Object.freeze({id:"quadrant",detect:e=>/^quadrant(?:chart)?\s*$/.test(e)}),Object.freeze({id:"gantt",detect:e=>/^gantt\s*$/.test(e)}),Object.freeze({id:"mindmap",detect:e=>/^mindmap\s*$/.test(e)}),Object.freeze({id:"gitgraph",detect:e=>/^gitgraph(?:\s+(?:lr|tb|bt))?\s*:?\s*$/.test(e)}),Object.freeze({id:"radar",detect:e=>/^radar-beta(?:\s|:|$)/.test(e)})]);function a(e){let t=(e.split(";")[0]??"").trim().toLowerCase();for(let r of d)if(r.detect(t))return r.id;return null}var m=Object.freeze({flowchart:()=>import("./chunks/flowchart-ML54IJ7F.js"),state:()=>import("./chunks/state-67TZ7USF.js"),sequence:()=>import("./chunks/sequence-4AERT525.js"),timeline:()=>import("./chunks/timeline-AHOAT7ZL.js"),class:()=>import("./chunks/class-ABIOBAFL.js"),er:()=>import("./chunks/er-CX3NGEC2.js"),journey:()=>import("./chunks/journey-RJBHWLRG.js"),architecture:()=>import("./chunks/architecture-NUJTDJJ7.js"),xychart:()=>import("./chunks/xychart-YUY3CPT2.js"),pie:()=>import("./chunks/pie-TN2QOLSL.js"),quadrant:()=>import("./chunks/quadrant-QE5JZ4H2.js"),gantt:()=>import("./chunks/gantt-ZMOMOTF6.js"),mindmap:()=>import("./chunks/mindmap-YXHLCHOO.js"),gitgraph:()=>import("./chunks/gitgraph-OBTCRWCA.js"),radar:()=>import("./chunks/radar-ZPV6O27I.js")}),i=class extends Error{code="UNSUPPORTED_FAMILY";constructor(t){super(`Unsupported Mermaid family in async browser renderer: ${JSON.stringify(t)}.`),this.name="BrowserFamilyDetectionError"}};function l(e){let t=n(s(e)),r=a(t.firstLine);if(!r)throw new i(t.firstLine);return r}async function b(e,t={}){let r=l(e),[{default:o},{renderLoadedFamilySvg:c}]=await Promise.all([m[r](),import("./chunks/render-core-VPMAH3HT.js")]);return c(e,t,o)}export{i as BrowserFamilyDetectionError,b as renderMermaidSVGAsync};