agentic-mermaid 0.5.3 → 0.5.4

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 (135) hide show
  1. package/CHANGELOG.md +34 -0
  2. package/dist/agent-core.d.ts +7 -7
  3. package/dist/agent-core.js +1 -1
  4. package/dist/agent.d.ts +7 -7
  5. package/dist/agent.js +1 -1
  6. package/dist/agentic-mermaid-mcp.js +1 -1
  7. package/dist/am.js +1 -1
  8. package/dist/browser-lazy/chunks/{agentic-producer-core-CC6OOLDW.js → agentic-producer-core-ECZ3CMZM.js} +1 -1
  9. package/dist/browser-lazy/chunks/{architecture-QUFVKYJR.js → architecture-H5LTMKQW.js} +6 -6
  10. package/dist/browser-lazy/chunks/{block-6J3Q63BO.js → block-566X6FNV.js} +5 -5
  11. package/dist/browser-lazy/chunks/{builtin-backends-7SOZZHPF.js → builtin-backends-VAFEZXKY.js} +6 -6
  12. package/dist/browser-lazy/chunks/{c4-SQVBZAKJ.js → c4-ZXFDLBFK.js} +5 -5
  13. package/dist/browser-lazy/chunks/{chunk-5X6MJX3H.js → chunk-2JQXRKBC.js} +1 -1
  14. package/dist/browser-lazy/chunks/{chunk-E2WMJZNM.js → chunk-37FZNMPR.js} +1 -1
  15. package/dist/browser-lazy/chunks/{chunk-TYZOZXUJ.js → chunk-3JTYTXA6.js} +6 -6
  16. package/dist/browser-lazy/chunks/{chunk-PQGPS2YV.js → chunk-4NILRBC7.js} +1 -1
  17. package/dist/browser-lazy/chunks/{chunk-AMJLVPUB.js → chunk-5LKPDHPC.js} +2 -2
  18. package/dist/browser-lazy/chunks/{chunk-BY2CPG6B.js → chunk-62MR3LWJ.js} +1 -1
  19. package/dist/browser-lazy/chunks/{chunk-J7FFAFQF.js → chunk-64JFHCJC.js} +1 -1
  20. package/dist/browser-lazy/chunks/chunk-6GPDLZFQ.js +1 -0
  21. package/dist/browser-lazy/chunks/{chunk-VWVZGQE2.js → chunk-6UOOATQR.js} +1 -1
  22. package/dist/browser-lazy/chunks/chunk-7TTFBJYA.js +1 -0
  23. package/dist/browser-lazy/chunks/chunk-7UFOFWBA.js +20 -0
  24. package/dist/browser-lazy/chunks/{chunk-5B2Z7575.js → chunk-A7V5VDKN.js} +1 -1
  25. package/dist/browser-lazy/chunks/chunk-CPO5P4L2.js +1 -0
  26. package/dist/browser-lazy/chunks/chunk-EIYLJ4FI.js +20 -0
  27. package/dist/browser-lazy/chunks/{chunk-X2UYKWKM.js → chunk-G4JBA7HU.js} +3 -3
  28. package/dist/browser-lazy/chunks/{chunk-2UIA2IME.js → chunk-IUI4DYC3.js} +1 -1
  29. package/dist/browser-lazy/chunks/{chunk-QA6GJQ4X.js → chunk-J57YRC2M.js} +1 -1
  30. package/dist/browser-lazy/chunks/{chunk-BU5LHXNJ.js → chunk-LBXXKLIR.js} +3 -3
  31. package/dist/browser-lazy/chunks/chunk-NKW2ZNCD.js +1 -0
  32. package/dist/browser-lazy/chunks/{chunk-ICC7HBJX.js → chunk-O34YYEQV.js} +1 -1
  33. package/dist/browser-lazy/chunks/{chunk-UL6NDWLL.js → chunk-OBI5U5XU.js} +1 -1
  34. package/dist/browser-lazy/chunks/{chunk-YCEICNM6.js → chunk-OFOS57WQ.js} +1 -1
  35. package/dist/browser-lazy/chunks/{chunk-OZ443IVJ.js → chunk-PSZEE64O.js} +7 -7
  36. package/dist/browser-lazy/chunks/{chunk-SZELX2EJ.js → chunk-PXTLV57R.js} +1 -1
  37. package/dist/browser-lazy/chunks/{chunk-HLWUNUCM.js → chunk-QVSZOF5M.js} +1 -1
  38. package/dist/browser-lazy/chunks/{chunk-2GPK4VFF.js → chunk-TT5GR5EJ.js} +1 -1
  39. package/dist/browser-lazy/chunks/{chunk-DF6765YX.js → chunk-V6I2VGNQ.js} +5 -5
  40. package/dist/browser-lazy/chunks/{chunk-CN7WTBWB.js → chunk-VRZKI33U.js} +1 -1
  41. package/dist/browser-lazy/chunks/{chunk-2SH76OTH.js → chunk-XHU3A432.js} +1 -1
  42. package/dist/browser-lazy/chunks/{chunk-NO7ZIVRU.js → chunk-YVNJDVQO.js} +1 -1
  43. package/dist/browser-lazy/chunks/chunk-Z7UHFVKN.js +6 -0
  44. package/dist/browser-lazy/chunks/{class-5QA4SCTS.js → class-XIFNVBFE.js} +8 -8
  45. package/dist/{zenuml/chunks/decode-BWERFDGK.js → browser-lazy/chunks/decode-5MFOG3AZ.js} +1 -1
  46. package/dist/browser-lazy/chunks/{elk.bundled-L4CADV5W.js → elk.bundled-RYWHIS5N.js} +8 -8
  47. package/dist/browser-lazy/chunks/er-VEUYJBGG.js +11 -0
  48. package/dist/browser-lazy/chunks/{eventmodeling-2BPLHWRN.js → eventmodeling-G7DITZX7.js} +10 -10
  49. package/dist/browser-lazy/chunks/{flowchart-NEIMZTB5.js → flowchart-SSFIU4EU.js} +1 -1
  50. package/dist/browser-lazy/chunks/{forest-implementation-AEP24AIP.js → forest-implementation-RWFF7XDV.js} +1 -1
  51. package/dist/browser-lazy/chunks/{gantt-RDPIFYAF.js → gantt-HQNVDX2B.js} +6 -6
  52. package/dist/browser-lazy/chunks/{gitgraph-N4Y5RYB7.js → gitgraph-Z5MN6M6L.js} +4 -4
  53. package/dist/browser-lazy/chunks/{ishikawa-LD3YBDJN.js → ishikawa-UEERNFQV.js} +2 -2
  54. package/dist/browser-lazy/chunks/{journey-6YQR5DJX.js → journey-3BEWWGB5.js} +6 -6
  55. package/dist/browser-lazy/chunks/{kanban-PLMJ7NBW.js → kanban-2WFNCWLB.js} +10 -10
  56. package/dist/browser-lazy/chunks/{mermaid-yaml-runtime-QVYX4EWK.js → mermaid-yaml-runtime-IK4ET4BT.js} +8 -8
  57. package/dist/browser-lazy/chunks/{mindmap-K2UBFO3Y.js → mindmap-R2C6SNYR.js} +4 -4
  58. package/dist/browser-lazy/chunks/{packet-CUW4QY6Y.js → packet-GMVCI5YZ.js} +3 -3
  59. package/dist/browser-lazy/chunks/{pie-7F7UUCG3.js → pie-WER45DKC.js} +7 -7
  60. package/dist/browser-lazy/chunks/{quadrant-TOONO2WC.js → quadrant-NCUPSFKN.js} +4 -4
  61. package/dist/browser-lazy/chunks/{radar-J6JVWVAX.js → radar-WLYS4YC5.js} +8 -8
  62. package/dist/browser-lazy/chunks/render-core-42UVWIPF.js +3 -0
  63. package/dist/browser-lazy/chunks/{requirement-CMAKDJPO.js → requirement-AK3NWMJ6.js} +7 -7
  64. package/dist/browser-lazy/chunks/{sankey-AWXQEP3F.js → sankey-C2DY6WVU.js} +4 -4
  65. package/dist/browser-lazy/chunks/{sequence-Q2RJRB4L.js → sequence-D4WJB44W.js} +1 -1
  66. package/dist/browser-lazy/chunks/{state-WRBFQEDX.js → state-YUQVESE7.js} +2 -2
  67. package/dist/browser-lazy/chunks/{timeline-D2KILFXM.js → timeline-BMBJJXWR.js} +4 -4
  68. package/dist/browser-lazy/chunks/{treemap-N3VYX5D4.js → treemap-B66XBZZ6.js} +3 -3
  69. package/dist/browser-lazy/chunks/{xychart-G73OGK66.js → xychart-HAVFROGT.js} +6 -6
  70. package/dist/browser-lazy/chunks/{zenuml-H4BXNYXR.js → zenuml-62RLYFWP.js} +7 -7
  71. package/dist/browser-lazy/index.js +1 -1
  72. package/dist/browser.global.js +507 -507
  73. package/dist/{chunk-DQDKA5ND.js → chunk-2DNGDTJD.js} +2 -2
  74. package/dist/{chunk-GVCHLSHH.js → chunk-4F2UGYTM.js} +2 -2
  75. package/dist/{chunk-H3NCS2XZ.js → chunk-7XYB2LNC.js} +2 -2
  76. package/dist/chunk-DOFB572I.js +58 -0
  77. package/dist/chunk-EHJI3QYE.js +52 -0
  78. package/dist/{chunk-UA234O4M.js → chunk-HINRNKPO.js} +2 -2
  79. package/dist/{chunk-JZOJ4YGS.js → chunk-KXMANAST.js} +33 -33
  80. package/dist/{chunk-7CRDX2QR.js → chunk-U4MT3RRE.js} +2 -2
  81. package/dist/{chunk-NKNFOREZ.js → chunk-WYIB6BUR.js} +2 -2
  82. package/dist/{cli-YGGTJZH7.js → cli-ZYIDBYNS.js} +2 -2
  83. package/dist/{index-EeXqJXr5.d.ts → index-Bvhprdxz.d.ts} +3 -3
  84. package/dist/index.d.ts +4 -4
  85. package/dist/index.js +1 -1
  86. package/dist/{mcp-cli-63DYXTVD.js → mcp-cli-YVDCORWA.js} +2 -2
  87. package/dist/{paint-certification-6rwQjIv_.d.ts → paint-certification-BoLyr006.d.ts} +2 -2
  88. package/dist/{server-5NEOHOFS.js → server-4JGAVXR3.js} +2 -2
  89. package/dist/{svg-styles-BdnoM7AT.d.ts → svg-styles-BnCoXyYe.d.ts} +1 -1
  90. package/dist/svg-styles.d.ts +1 -1
  91. package/dist/svg-styles.js +1 -1
  92. package/dist/svg.d.ts +4 -4
  93. package/dist/svg.js +1 -1
  94. package/dist/{types-BcS52Mjt.d.ts → types-CLVJCaH2.d.ts} +1 -1
  95. package/dist/zenuml/chunks/{appearance-UOQ5KA6O.js → appearance-5RM5MVM2.js} +1 -1
  96. package/dist/zenuml/chunks/{builtin-backends-KDKE7YHO.js → builtin-backends-UTNWL4N3.js} +11 -11
  97. package/dist/zenuml/chunks/{chunk-QWX77U7G.js → chunk-3A6S6GNB.js} +2 -2
  98. package/dist/zenuml/chunks/{chunk-OXQWRSBM.js → chunk-55WS466K.js} +11 -11
  99. package/dist/zenuml/chunks/chunk-6J4BGPB2.js +29 -0
  100. package/dist/zenuml/chunks/chunk-CNLL4BGF.js +1 -0
  101. package/dist/zenuml/chunks/{chunk-RZ6XK5CD.js → chunk-IARQ24W3.js} +13 -13
  102. package/dist/zenuml/chunks/{chunk-42DXZ5C6.js → chunk-ZNZRIISS.js} +2 -2
  103. package/dist/{browser-lazy/chunks/decode-63UIZGD2.js → zenuml/chunks/decode-LDNNXEAO.js} +1 -1
  104. package/dist/zenuml/chunks/{mermaid-yaml-runtime-KZVU74WU.js → mermaid-yaml-runtime-A5CNJ3IE.js} +8 -8
  105. package/dist/zenuml/chunks/render-core-ECIWU5ZS.js +3 -0
  106. package/dist/zenuml/chunks/{zenuml-EA2ZFRUX.js → zenuml-N3LZMB2G.js} +8 -8
  107. package/dist/zenuml.d.ts +2 -2
  108. package/dist/zenuml.js +1 -1
  109. package/docs/MCP-DIRECTORY-LISTINGS.md +81 -12
  110. package/docs/api.md +1 -1
  111. package/package.json +1 -1
  112. package/server.json +2 -2
  113. package/dist/browser-lazy/chunks/chunk-4LHYF3BS.js +0 -1
  114. package/dist/browser-lazy/chunks/chunk-FAIMVOX5.js +0 -6
  115. package/dist/browser-lazy/chunks/chunk-GVOEAY52.js +0 -1
  116. package/dist/browser-lazy/chunks/chunk-J35HAQQF.js +0 -20
  117. package/dist/browser-lazy/chunks/chunk-RIVTHZAQ.js +0 -1
  118. package/dist/browser-lazy/chunks/chunk-Z3FDIVLN.js +0 -20
  119. package/dist/browser-lazy/chunks/er-7ZSKGN7Y.js +0 -11
  120. package/dist/browser-lazy/chunks/render-core-BZOM3K7D.js +0 -3
  121. package/dist/chunk-EHCMJUMD.js +0 -52
  122. package/dist/chunk-OMY6NRQD.js +0 -58
  123. package/dist/zenuml/chunks/chunk-7TVYPTDW.js +0 -1
  124. package/dist/zenuml/chunks/chunk-RLJEI7YN.js +0 -29
  125. package/dist/zenuml/chunks/render-core-V5RQ737O.js +0 -3
  126. /package/dist/browser-lazy/chunks/{chunk-5FQ534HP.js → chunk-BMZ24VPS.js} +0 -0
  127. /package/dist/browser-lazy/chunks/{chunk-2I4UPL7Q.js → chunk-D6MQ7QSU.js} +0 -0
  128. /package/dist/browser-lazy/chunks/{chunk-CQE4HQEW.js → chunk-HJVO5VC3.js} +0 -0
  129. /package/dist/browser-lazy/chunks/{chunk-LH7HUDKW.js → chunk-L4UC3KGS.js} +0 -0
  130. /package/dist/browser-lazy/chunks/{chunk-NMQQMRIR.js → chunk-MFTQWHUB.js} +0 -0
  131. /package/dist/browser-lazy/chunks/{chunk-N5ELX7LR.js → chunk-PJJSDGLB.js} +0 -0
  132. /package/dist/browser-lazy/chunks/{chunk-CSFUKSU6.js → chunk-QCU5G5PZ.js} +0 -0
  133. /package/dist/browser-lazy/chunks/{chunk-VQYYGAXP.js → chunk-TLFX3U6S.js} +0 -0
  134. /package/dist/browser-lazy/chunks/{chunk-5UVGUSD6.js → chunk-YHMTSXIR.js} +0 -0
  135. /package/dist/zenuml/chunks/{chunk-EVPSMEKN.js → chunk-GC7IPQ5P.js} +0 -0
@@ -1,3 +0,0 @@
1
- import{b as e,c as t,d as n,e as i,f as r,g as a,k as o,l as s,m as l}from"./chunk-RIVTHZAQ.js";import{a as c,b as d,c as u}from"./chunk-E2WMJZNM.js";import{e as f,f as p,g as h,h as m,i as g,j as y,k as w,l as b}from"./chunk-AMJLVPUB.js";import{g as v}from"./chunk-DF6765YX.js";import{f as x,h as $,k as k,l as S,m as j,n as M,o as E,q as C,t as O,v as F,w as N,x as I}from"./chunk-J35HAQQF.js";import{b as z,e as A,f as W}from"./chunk-X2UYKWKM.js";import{g as L,n as R}from"./chunk-TYZOZXUJ.js";import{A as D,Ab as G,B as V,Bb as B,Cb as T,Db as q,Ea as P,Eb as _,Fb as U,Ga as H,Gb as J,Hb as K,Jb as Z,Kb as Y,Lb as X,Mb as Q,Nb as ee,Pb as et,Q as en,Xb as ei,Y as er,Ya as ea,ab as eo,bb as es,cb as el,gb as ec,hb as ed,lb as eu,nb as ef,q as ep,s as eh,u as em,v as eg,vb as ey,w as ew,xb as eb,yb as ev,z as ex,zb as e$}from"./chunk-Z3FDIVLN.js";import"./chunk-N5ELX7LR.js";import{a as ek}from"./chunk-5UVGUSD6.js";import"./chunk-CSFUKSU6.js";function eS(e,t){return e.match(RegExp(`\\b${t}\\s*=\\s*(["'])(.*?)\\1`,"i"))?.[2]}function ej(e,t){return eS(e,"style")?.match(RegExp(`(?:^|;)\\s*${t}\\s*:\\s*([^;]+)`,"i"))?.[1]?.trim()??eS(e,t)}function eM(e,t,n){let i=Number.parseFloat(ej(e,t)??"");return Number.isFinite(i)?i:n}function eE(e,t){let n=ej(e,"font-weight")?.trim().toLowerCase();if(void 0===n)return t;if("normal"===n)return 400;if("bold"===n)return 700;if("bolder"===n)return t<350?400:t<550?700:900;if("lighter"===n)return t<550?100:t<750?400:700;let i=Number.parseFloat(n);return Number.isFinite(i)?i:t}function eC(e){return e.children.filter(e=>"element"===e.kind)}function eO(e,t){var n;let i="b"===t.name||"strong"===t.name,r=e.mono||(n=t.attrs,/\bclass\s*=\s*(["'])[^"']*\bmono\b/i.test(n)||/(?:^|[,\s])monospace(?:[,\s]|$)/i.test(ej(n,"font-family")??""));return{size:eM(t.attrs,"font-size",e.size),weight:i?Math.max(700,eE(t.attrs,e.weight)):eE(t.attrs,e.weight),letterSpacing:eM(t.attrs,"letter-spacing",e.letterSpacing),mono:r,fontFamily:ej(t.attrs,"font-family")??(r&&!e.mono?void 0:e.fontFamily),fontStyle:"i"===t.name||"em"===t.name||"italic"===ej(t.attrs,"font-style")?"italic":"normal"===ej(t.attrs,"font-style")?"normal":e.fontStyle}}function eF(e,t){return RegExp(`\\b${t}\\s*=`,"i").test(e)}function eN(e){return"tspan"===e.name&&["x","y","dx","dy"].some(t=>eF(e.attrs,t))}var eI=new WeakMap,ez=0,eA=new WeakMap,eW=0,eL=new WeakMap,eR=new V(128,8388608),eD=new V(128,0x1000000,e=>{eR.delete(e)}),eG=new WeakSet;function eV(e,t){let n=eI.get(e);return void 0===n&&(n=ez++,eI.set(e,n)),`${n}:${t}`}function eB(e){let t=structuredClone(e),n=new WeakSet,i=(e,t)=>{if(!(null===e||"object"!=typeof e||null===t||"object"!=typeof t||n.has(e)))if(n.add(e),er(e,t),e instanceof Map&&t instanceof Map){let n=t.entries();for(let[t,r]of e){let[e,a]=n.next().value;i(t,e),i(r,a)}}else if(e instanceof Set&&t instanceof Set){let n=t.values();for(let t of e)i(t,n.next().value)}else for(let n of Object.keys(e))i(e[n],t[n])};return i(e,t),t}function eT(e,t,n,i,r){let a={result:n,...i?{projection:i}:{}},o=2*t.length+L([a,Y(n)],0x1000000)+1024;if(o>0x1000000)return void eo("positioned-layout","store-skipped","weight-limit");let s=a;if(r){try{s=eB(a)}catch(e){if(e instanceof Error&&"DataCloneError"===e.name)return void eo("positioned-layout","store-skipped","uncloneable");throw e}X(n,s.result)}r||eA.set(s,{locallyRepeated:!1}),eD.set(eV(e,t),s,o),eG.add(s.result)}function eq(e,t,n){let i=eL.get(t);if(!n)return void eL.delete(t);if(!i||i.request!==e||eD.get(i.key)!==i.snapshot)return;let r=++eW,a=eA.get(i.snapshot);a.locallyRepeated=a.lastUse===r-1,a.lastUse=r;let o=eR.get(i.key);return o?.owner===i.snapshot?o.drawing:void 0}var eP=new Set(["rectangle","rounded","note","service","diamond","stadium","hexagon","cylinder"]),e_={journey:"x",sequence:"none",xychart:"center",quadrant:"center"};function eU(e){return e.role?"box"===e.role:eP.has(e.shape)}function eH(e,t,n,i){return Number.isFinite(e)&&Number.isFinite(t)&&Number.isFinite(n)&&Number.isFinite(i)&&n>=0&&i>=0}function eJ(e,t){let n=Math.min(e.x+e.w,t.x+t.w)-Math.max(e.x,t.x),i=Math.min(e.y+e.h,t.y+t.h)-Math.max(e.y,t.y);return n>.5&&i>.5}function eK(e,t,n="both"){let i="center"===n?t.x+t.w/2>=e.x-.5&&t.x+t.w/2<=e.x+e.w+.5:t.x>=e.x-.5&&t.x+t.w<=e.x+e.w+.5,r="x"===n||("center"===n?t.y+t.h/2>=e.y-.5&&t.y+t.h/2<=e.y+e.h+.5:t.y>=e.y-.5&&t.y+t.h<=e.y+e.h+.5);return i&&r}function eZ(e,t,n){let i=t,r=new Set;for(;i?.parentId&&!r.has(i.id);){if(r.add(i.id),i.parentId===e.id)return!0;i=n.get(i.parentId)}return!1}var eY=new WeakMap,eX=new WeakMap,eQ=new WeakSet;function e0(e,t,n){if(Z(e,{...t,role:n}),"agentic"!==t.requested||"elk"!==t.selected||eQ.has(e))return;eQ.add(e);let i={code:"INEFFECTIVE_CONFIG",field:"graphLayout.backend",message:`Agentic graph layout declined this input; using the requested ELK fallback: ${t.reason??"candidate rejected"}`};(p(e).onConfigDiagnostic??(e=>console.warn(e.message)))(i)}var e1=new Set(["media","supports","container","layer","document"]),e5=new WeakSet;function e2(e,t,n=E()){let i=e.id.startsWith("family:"),r=C(t,i?"external":"internal",n);if(!i&&!n)return r;let a=[];i&&r.family!==e.id&&a.push({code:"SCENE_DOCUMENT",path:"scene.family",message:`external family "${e.id}" emitted a document owned by "${r.family}"`});let o=new Set(e.semanticRoles),s=new Set(e.semanticChannels),l=new Map(e.scenePrimitiveEvidence.map(e=>[`${e.role}\0${e.primitive}`,e]));if(function e(t,n,i="scene.parts"){t.forEach((t,r)=>{let a=`${i}[${r}]`;n(t,a),"group"===t.kind&&e(t.children.map(e=>e.node),n,`${a}.children`)})}(r.parts,(e,t)=>{if(!o.has(e.role))return void a.push({code:"SCENE_PRIMITIVE_CLAIM",path:`${t}.role`,message:`emitted undeclared role "${e.role}"`});for(let n of Object.keys(e.channels??{}))s.has(n)||a.push({code:"SCENE_CHANNEL_CLAIM",path:`${t}.channels.${n}`,message:`emitted undeclared semantic channel "${n}"`});for(let n of $(e)){let i=l.get(`${e.role}\0${n}`);i&&"applicable"===i.applicability&&"unsupported"!==i.realization||a.push({code:"SCENE_PRIMITIVE_CLAIM",path:t,message:`emitted undeclared ${e.role}/${n} primitive`})}}),a.length>0)throw new S(Object.freeze(a));return r}var e3=new WeakMap,e6=new WeakMap;function e8(e,t){let n=e6.get(t);n||(n=new WeakMap,e6.set(t,n));let i=n.get(e);if(i)return eo("positioned-scene","hit"),E(e)&&!i.crossChecks&&(e2(p(e).family,i.scene,!0),i.crossChecks=!0),i.scene;eo("positioned-scene","miss");let r=p(e);if(!r.family.lowerScene)throw Error(`Resolved ${e.output} family has no Scene lowering`);let a="png"===e.output&&!1!==e.appearance.colors.embedFontImport?{...e.appearance.colors,embedFontImport:!1}:e.appearance.colors,o=E(e),s=()=>r.family.lowerScene({positioned:t.positioned,colors:a,resolved:m(e)}),l=eh(r.textMeasurement,()=>e2(r.family,o||r.family.id.startsWith("family:")?s():ea(s),o));return n.set(e,{scene:l,crossChecks:o}),l}function e7(o,s){let l=p(o),c=E(o)?"scene-assertions":l.family.id.startsWith("family:")?"external-family":l.backend&&!F(l.backend.backend)?"alternate-backend":("layout"===l.mode?"default"===o.appearance.inferredBackend:"scene"===l.mode&&l.backend?.inputName==="default")?void 0:"unsupported-mode",d=c?void 0:A(l.family.lowerScene);if(d||(c??="no-native-producer"),c){eo("native-drawing","bypass",c),es("native-drawing",c);return}let u=e3.get(s);u||(u=new WeakMap,e3.set(s,u));let f=u.get(o);if(f){if(eo("native-drawing","hit"),f.producer===A(l.family.lowerScene))return f.drawing;eo("native-drawing","bypass","changed-producer"),u.delete(o)}l.backend&&I(l.backend.conformance,l.backend.inputName);let h=eq(o,s,(d=A(l.family.lowerScene))===W(l.family.lowerScene));if(h){eo("native-drawing","hit",void 0,"positioned-owner");let e=d;if(e&&e===A(l.family.lowerScene)&&e===W(l.family.lowerScene))return u.set(o,{drawing:h,producer:e,certification:h.certification}),h;eo("native-drawing","bypass","changed-producer"),eq(o,s,!1),d=A(l.family.lowerScene)}if(eo("native-drawing","miss"),!(d=A(l.family.lowerScene))){eo("native-drawing","bypass","no-native-producer"),es("native-drawing","no-native-producer");return}let g=d,y="png"===o.output&&!1!==o.appearance.colors.embedFontImport?{...o.appearance.colors,embedFontImport:!1}:o.appearance.colors,w=eh(l.textMeasurement,()=>{let c;return function(o,s,l,c){var d;let u,f,p={family:l,width:s.positioned.width,height:s.positioned.height,colors:s.colors,transparent:s.resolved.renderOptions.transparent??!1},h=a(r);l.startsWith("family:")&&h.uncertain();let m=h.snapshot(p),g=M(p),y=new WeakSet,w=e=>(h.retainFragment()&&y.add(e),Object.freeze(e)),b=e=>{let t=h.leaf(e),n=g.node(t.node);return w({kind:"leaf",node:t.node,svg:n,conditional:t.conditional,nodeCount:1,depth:0,prepared:"document"===e.kind?!/<\s*text/i.test(n):"text"!==e.kind||"prepared"===e.measurement&&void 0!==e.block})},v={shape:e=>b(ev(e)),text:e=>b(G(e)),connector:e=>b(e$(e)),documentOpen:(e,t)=>{let n=h.snapshot(e);return n?(m=Object.freeze({family:l,width:n.width,height:n.height,colors:n.colors,transparent:n.transparent}),m=h.header(m,t)):h.uncertain(),b(J(e,t))},documentContent:(e,t)=>b(B(e,t)),documentText:e=>b(T(e)),definitions:(e,t)=>b(q(e,t)),documentClose:()=>b(_()),group(t){let n=Object.getOwnPropertyDescriptor(t,"children");n&&"value"in n||h.uncertain();let{children:i,...r}=t,a=h.parts(i,k.maxNodes),o=[],s=1,l=0,c=1,d=!0,u=[];for(let e of a){let t=Object.getOwnPropertyDescriptor(e,"node"),n=Object.getOwnPropertyDescriptor(e,"indent");t&&"value"in t&&n&&"value"in n||h.uncertain();let i=Object.freeze({node:e.node,indent:e.indent});o.push(i),y.has(i.node)||h.uncertain(),u.push(i.node),s+=i.node.nodeCount,l+=i.node.svg.length,c=Math.max(c,1+i.node.depth),d=d&&i.node.prepared}if(s>k.maxNodes)throw RangeError("Native drawing contains too many emitted nodes");if(l>k.maxSerializationBytesPerNode)throw RangeError("Native group has an oversized SVG serialization");let f=U({...r,children:[]});g.node(f),g.depth(c);let p=h.snapshot(f),m=p?h.group(p):void 0,b=p?.identity??{id:f.id,role:f.role};for(let e of u)"leaf"!==e.kind||"shape"!==e.node.kind||e.node.identity||g.enclosure(e.node.id,b);let v=[f.open];for(let e of o)v.push(ey(e.node.svg,e.indent));v.push(f.close);let x=v.join(f.join);return g.serialization(x),w({kind:"group",svg:x,children:Object.freeze(u),matrix:m,own:b,owner:p?.owner,conditional:!p||"conditional"===f.visibility,opacity:e(p?.paint?.opacity),nodeCount:s,depth:c,prepared:!/<\s*text/i.test(f.open+f.close)&&d})},pathArtwork:e=>K(v,e)},x=ea(()=>o(v,s));for(let e of["parts","family","width","height","colors","transparent"]){let t=Object.getOwnPropertyDescriptor(x,e);t&&"value"in t||h.uncertain()}let $=h.parts(x.parts,k.maxNodes);for(let e of $)y.has(e)||h.uncertain();let E=g.finish();if(!E.valid)throw new S(E.diagnostics);let C=0,F=-1,N=!0;for(let e of $)C+=e.nodeCount,F+=e.svg.length+1,N=N&&e.prepared;if(C>k.maxNodes)throw RangeError("Native drawing contains too many emitted nodes");if(F>k.maxFinalSvgBytes)throw RangeError("Native drawing exceeds the final SVG limit");let I=O(x,{seed:0,...c?{style:c}:{}}),z=$.map((e,t)=>0===t&&I?`${e.svg}
2
- ${I}`:e.svg).join(`
3
- `);j(z,"native drawing output");let A=m??Object.freeze({...p,colors:Object.freeze({bg:"none",fg:"none"})}),W=h.snapshot({family:x.family,width:x.width,height:x.height,colors:x.colors,transparent:x.transparent}),L=Object.freeze({...A,family:W?.family??l});W&&h.same({...W,width:Number(en(W.width)),height:Number(en(W.height))},L)||h.uncertain();let R=(d=h.observe,u=i(L),f=[],function e(i,r,a){for(let o=0;o<i.length;o++){let s=i[o],l=`${r}.${o}`;if("group"===s.kind){f.push(s);let i,r=1,o;for(let e=f.length-1;e>=0;e--){let n=f[e];(void 0!==n.matrix||void 0!==i)&&(i=H(n.matrix??P,i??P)),r=t(n.opacity,r),n.conditional&&(o=!0)}let c=n(a?.ancestors,s.own),d=s.owner?.id===s.own.id&&s.owner.role===s.own.role?c.at(-1):s.owner;e(s.children,l,{parentMatrix:i,ancestors:c,owner:d,conditional:o,groupOpacity:r}),f.pop()}else if(a){let e=!s.conditional&&d(s.node,s.svg);u.leaf(s.node,l,a.parentMatrix,a.ancestors,a.conditional||!e,a.groupOpacity,s.node.owner??a.owner)}else{let e=!s.conditional&&d(s.node,s.svg);u.leaf(s.node,l,void 0,void 0,!e)}}}($,"scene"),u.finish());return h.finish(R,L),Object.freeze({svg:z,header:L,preparedText:N,paint:R})}(g,{positioned:(c=eX.get(s))&&c!==g?eB(s.positioned):s.positioned,colors:y,resolved:m(o)},l.family.id,o.appearance.styled?o.appearance.style:void 0)});return u.set(o,{drawing:w,producer:g,evidence:w}),w}function e4(e){return e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;")}async function e9(e,t,n){return(await te(e,t,n)).svg}async function te(e,t,n){"default"!==w(t=y(t))&&await import("./builtin-backends-7SOZZHPF.js"),v(n);let i,r=new Map;for(;;)try{return i??=Q("request",()=>b(e,t,"svg",void 0,{expectedFamilyId:n.id,familyDescriptor:n})),function(e){return el(()=>(function(e){var t;!function(e){if(e5.has(e))return;e5.add(e);let t=p(e),n=t.configDiagnostics??[];if(0===n.length)return;let i=t.onConfigDiagnostic??(e=>console.warn(e.message));for(let e of n)i(e)}(e);let n=[],i=(t=Q("layout",()=>{let t,n,i,r;return n=A((t=p(e)).family.lowerScene),i="scene"===t.mode&&N(t.backend?.backend)&&z(t.family)&&!t.textMeasurement&&!!n&&n===W(t.family.lowerScene)&&!E(e),r=function(e,t,n,i,r){let a=p(t),o=a.family;if(o.id!==e)throw Error(`Resolved request planned family ${o.id}, not ${e}`);if(!o.layout)throw Error(`No layout registered for Mermaid family ${e}`);let s=!e.startsWith("family:"),l=`${e}:final`;if(s&&!o.projectPositioned)throw new ee([{strategy:l,violations:["missing final geometry projection"]}]);let c=m(t),d=globalThis.process?.env,u=D("position-cache")&&s&&"gantt"!==e&&!a.textMeasurement&&(d?.AGENTIC_MERMAID_ELK_CACHE??globalThis.AGENTIC_MERMAID_ELK_CACHE)!=="0",f=u&&n===t.source?{...n,cleanup:void 0}:n,h=u?JSON.stringify([f,t.renderOptions,t.appearance,t.familyConfig,i,"class"===e?c.paintBackendId??"backend:default":void 0,Object.entries(d??{}).filter(([e])=>e.startsWith("APL_")).sort(),ex.map(D)]):void 0,g=void 0!==h&&h.length<=65536?h:void 0;return void 0===g&&eo("positioned-layout","bypass",D("position-cache")?s?"gantt"===e?"time-dependent-family":a.textMeasurement?"custom-text-measurement":void 0===h?"elk-cache-disabled":"key-limit":"external-family":"disabled"),eh(a.textMeasurement,()=>{var a,d;let u="ascii"===t.output||"unicode"===t.output||"html"===t.output?"companion":"primary";if(r&&void 0!==g){let e=function(e,t,n){let i=eV(e,t),r=eD.get(i);if(eo("positioned-layout",r?"hit":"miss"),n&&r&&eA.has(r)){let e=Object.freeze({...r.result});return X(r.result,e),eL.set(e,{key:i,snapshot:r,request:n}),eG.add(e),{...r,result:e}}return r}(o,g,"svg"===t.output?t:void 0);if(e?.projection){for(let n of Y(e.result))e0(t,n,u);return eY.set(e.result,e.projection),e.result}}let f=void 0===g?void 0:function(e,t,n=!1){let i=eD.get(eV(e,t));if(n||eo("positioned-layout",i?"hit":"miss"),!i)return;let r=eB(i.result);return X(i.result,r),r}(o,g,r),p=[],h=f??("positioned"in(a=ei(e=>{p.push(e),e0(t,e,u)},()=>o.layout({source:n,renderOptions:c.renderOptions,...c.styleFace?{styleFace:c.styleFace}:{},...c.paintBackendId?{paintBackendId:c.paintBackendId}:{},...c.familyConfig?{familyConfig:c.familyConfig}:{},...c.familyAppearance?{familyAppearance:c.familyAppearance}:{}})))?a:{positioned:a});if(f)for(let e of Y(f))e0(t,e,u);else for(let e of p)Z(h,e);if(s)try{let t=o.projectPositioned({positioned:h.positioned,options:i}),n=(d={...t,kind:e},function(e){let t=[];eH(0,0,e.bounds.w,e.bounds.h)||t.push({metric:"nonFiniteGeometry",detail:`bounds ${e.bounds.w}\xd7${e.bounds.h}`});let n=(n,i,r)=>{r&&(eH(r.x,r.y,r.w,r.h)?(r.x<-.5||r.y<-.5||r.x+r.w>e.bounds.w+.5||r.y+r.h>e.bounds.h+.5)&&t.push({metric:"offCanvas",detail:"node"===n?`node ${i} at (${r.x},${r.y}) ${r.w}\xd7${r.h}`:`${n} ${i}`}):t.push({metric:"nonFiniteGeometry",detail:`${n} ${i}`}))};for(let t of e.nodes)n("node",t.id,t);for(let t of e.nodes)"hidden"!==t.labelVisibility&&"semantic"!==t.labelVisibility&&n("label",t.id,t.labelBounds);for(let t of e.edges)n("label",t.id,t.label?.bounds);for(let t of e.labels??[])"hidden"!==t.visibility&&"semantic"!==t.visibility&&n("label",t.id,t.bounds);for(let n of e.edges){let i=!1;for(let[r,a]of n.path){if(!Number.isFinite(r)||!Number.isFinite(a)){t.push({metric:"nonFiniteGeometry",detail:`edge ${n.id} path`}),i=!0;break}!i&&(r<-.5||a<-.5||r>e.bounds.w+.5||a>e.bounds.h+.5)&&(t.push({metric:"offCanvas",detail:`edge ${n.id} point (${r},${a})`}),i=!0)}}for(let t of e.groups)n("group",t.id,t);let i=e.nodes.filter(eU);for(let e=0;e<i.length;e++)for(let n=e+1;n<i.length;n++){let r=i[e],a=i[n];eH(r.x,r.y,r.w,r.h)&&eH(a.x,a.y,a.w,a.h)&&eJ(r,a)&&t.push({metric:"nodeOverlaps",detail:`${r.id} overlaps ${a.id}`})}let r=e_[e.kind]??"both",a=new Map(e.groups.map(e=>[e.id,e]));if("none"!==r){let n=new Map(e.nodes.map(e=>[e.id,e]));for(let i of e.groups){let e=i.parentId?a.get(i.parentId):void 0;for(let a of(e&&eH(i.x,i.y,i.w,i.h)&&eH(e.x,e.y,e.w,e.h)&&(eK(e,i,r)||t.push({metric:"groupBreaches",detail:`${i.id} outside parent ${e.id}`})),i.members)){let e=n.get(a);!e||!eH(e.x,e.y,e.w,e.h)||eK(i,e,r)||t.push({metric:"groupBreaches",detail:`${a} outside ${i.id}`})}}}for(let n=0;n<e.groups.length;n++)for(let i=n+1;i<e.groups.length;i++){let r=e.groups[n],o=e.groups[i];!eH(r.x,r.y,r.w,r.h)||!eH(o.x,o.y,o.w,o.h)||eJ(r,o)&&(eK(r,o)||eK(o,r)||eZ(r,o,a)||eZ(o,r,a)||t.push({metric:"groupOverlaps",detail:`${r.id} partially overlaps ${o.id}`}))}return{violations:t,groupById:a}}(d).violations);if(n.length)throw new ee([{strategy:l,violations:n.map(e=>`${e.metric}: ${e.detail}`)}]);eY.set(h,t)}catch(e){throw e instanceof ee?e:new ee([{strategy:l,violations:[e instanceof Error?e.message:String(e)]}])}return f||void 0===g||(r&&"svg"===t.output&&("sequence"===e||"flowchart"===e||"state"===e)?function(e,t,n,i){eT(e,t,n,i,!1)}:function(e,t,n,i){eT(e,t,n,i,!0)})(o,g,h,eY.get(h)),h})}(t.family.id,e,e.source,{},i),i&&eG.has(r)&&eX.set(r,n),r}),eh(p(e).textMeasurement,()=>(function(e,t,n,i){let r,a,h=p(e);if("scene"!==h.mode&&"family-svg"!==h.mode||!h.executionDecision)throw Error(`Resolved ${e.output} request has no graphical execution plan`);let g=e.renderOptions,y=h.family,w=(r=e.appearance.colors,a="png"===e.output&&!1!==r.embedFontImport?{...r,embedFontImport:!1}:r,{positioned:t.positioned,colors:a,resolved:m(e)}),b,v=!1,$;if("scene"===h.mode){let n=i?void 0:Q("drawing",()=>e7(e,t)),r=n?void 0:Q("scene",()=>(function(e,t){if("scene"!==p(e).mode)throw Error(`Resolved ${e.output} request has no Scene execution plan`);return e8(e,t)})(e,t));if($=Q("paint-certification",()=>(function(e,t){let n=e3.get(t)?.get(e)?.drawing??e7(e,t);if(n){let i=e3.get(t).get(e);if(eo("paint-certification",i.certification?"hit":"miss",void 0,"native"),i.certification)return i.certification;let r=i.evidence,a=s(r.header,r.paint,eY.get(t),{outputSupported:!e.appearance.colors.shadow});i.certification=a;let o=Object.freeze({svg:n.svg,preparedText:n.preparedText,certification:a}),l=p(e).family.lowerScene;return i.producer===A(l)&&i.producer===W(l)?function(e,t,n){let i=eL.get(t);if(!i||i.request!==e||eD.get(i.key)!==i.snapshot)return;let r=eA.get(i.snapshot);if(r.oversized)return eo("native-drawing","store-skipped","weight-limit");let a=r.drawingWeight??2*i.key.length+4*n.svg.length+1024,o=eR.leastRecentlyUsed(),s=o&&eA.get(o.owner)?.lastUse,l=void 0!==s&&eW-s>=128;if(!r.locallyRepeated&&!l&&!eR.canFit(i.key,a))return eo("native-drawing","store-skipped","drawing-budget");let c={owner:i.snapshot,drawing:n},d=2*i.key.length+L(n,8388608)+1024;if(r.drawingWeight=d,d>8388608){r.oversized=!0,eo("native-drawing","store-skipped","weight-limit");return}r.locallyRepeated||l||eR.canFit(i.key,d)?eR.set(i.key,c,d):eo("native-drawing","store-skipped","drawing-budget")}(e,t,o):(eo("native-drawing","store-skipped","changed-producer"),eq(e,t,!1)),a}let i=e8(e,t),r=e6.get(t).get(e);if(eo("paint-certification",r.certification?"hit":"miss",void 0,"scene"),r.certification)return r.certification;let a=p(e),l=!e.appearance.colors.shadow&&("layout"===a.mode?"default"===e.appearance.inferredBackend:"scene"===a.mode&&a.backend?.inputName==="default");return r.certification=o(i,eY.get(t),{outputSupported:l})})(e,t)),"strict"===g.layoutSafety&&"passed"!==$.status||"failed"===$.status&&h.backend?.inputName==="default")throw new l($);b=n?.svg??Q("backend",()=>{let t={seed:g.seed??0,...e.appearance.styled?{style:e.appearance.style}:{}};return i?.begin(t,r),h.backend.backend.render(r,t)}),v=h.backend?.inputName==="default"&&!y.id.startsWith("family:")&&(n?.preparedText??eb(r))}else{if("strict"===g.layoutSafety)throw new f("Strict layout safety requires native Scene evidence");b=Q("backend",()=>y.renderSvg(w))}j(b,"backend/family SVG output");let k=R(b,w.colors);$?.repairs.length&&h.backend?.inputName==="default"&&(k=function(e,t){let n=ec(e);if(!n)throw Error("Cannot certify a graphical output with no SVG root");let i=e.slice(n.start,n.end).replace(/\sviewBox="[^"]*"/g,""),r=` viewBox="${t.x} ${t.y} ${t.width} ${t.height}"`;return ef(e,n,i.slice(0,-1)+r+">")}(k,$.viewport)),j(k,"color-resolved SVG output"),v||(k=function(e,t){let n=function(e){let t=[],n=[],i=0;for(;i<e.length;){let r=e.indexOf("<",i);if(r<0){n.length>0&&i<e.length&&n[n.length-1].children.push({kind:"text-node",raw:e.slice(i)}),i=e.length;break}if(n.length>0&&r>i&&n[n.length-1].children.push({kind:"text-node",raw:e.slice(i,r)}),e.startsWith("\x3c!--",r)){let t=e.indexOf("--\x3e",r+4);if(t<0)return null;i=t+3;continue}let a=function(e,t){let n="";for(let i=t+1;i<e.length;i++){let t=e[i];if(n){t===n&&(n="");continue}if('"'===t||"'"===t){n=t;continue}if(">"===t)return i}return -1}(e,r);if(a<0)return null;let o=e.slice(r,a+1);if(/^<\?/.test(o)||/^<!/.test(o)){i=a+1;continue}let s=o.match(/^<\/\s*([\w:-]+)\s*>$/);if(s){let e=n.pop();if(!e||e.name!==s[1].toLowerCase())return null;e.closeStart=r,i=a+1;continue}let l=o.match(/^<\s*([\w:-]+)([\s\S]*?)(\/?)>$/);if(!l)return null;let c={kind:"element",name:l[1].toLowerCase(),attrs:l[2],openEnd:a+1,closeStart:a+1,children:[]};n.length>0?n[n.length-1].children.push(c):t.push(c),"/"!==l[3]&&n.push(c),i=a+1}return 0===n.length?t:null}(e);if(!n)return e;let i=[],r={size:0,weight:400,letterSpacing:0,mono:!1,fontStyle:"normal",fontFamily:t},a=(e,t,n,r=!1)=>{if(eF(e.attrs,"data-prepared-text"))return;let o=eO(t,e),s=r||eF(e.attrs,"data-literal-text"),l="text"===e.name&&!n,c=l||n&&eN(e);if(c&&eF(e.attrs,"textLength"))return;if(c&&!(l&&function e(t){return eC(t).some(t=>eN(t)||e(t))}(e))){let n,r,a,o=(n=[],r=!1,(a=(e,t,i)=>{let o=eO(t,e);if(!(!i&&eN(e))){if(!i&&eF(e.attrs,"textLength")){r=!0;return}for(let t of e.children)if("text-node"===t.kind){let e=ek(t.raw);e.length>0&&n.push({text:e,metrics:o})}else a(t,o,!1)}})(e,t,!0),{runs:n,blocked:r}),l=o.blocked?null:function(e,t=!1){let n=e.filter(e=>e.text.length>0);if(0===n.length||n.every(e=>0===e.text.trim().length))return null;let i=0,r=0,a=0;for(let e of n){if(!(e.metrics.size>0))return null;let n=ep(e.text).length;r>0&&n>0&&(i+=a),i+=e.metrics.mono?eg(e.text,e.metrics.size,e.metrics.letterSpacing,e.metrics.weight,e.metrics.fontStyle,e.metrics.fontFamily):t?em(e.text,e.metrics.size,e.metrics.weight,e.metrics.fontStyle,e.metrics.fontFamily)+Math.max(0,n-1)*e.metrics.letterSpacing:ew(e.text,e.metrics.size,e.metrics.weight,e.metrics.letterSpacing,e.metrics.fontStyle,e.metrics.fontFamily),r=n,a=e.metrics.letterSpacing}return Math.round(1e3*i)/1e3}(o.runs,s);null!==l&&i.push({offset:e.openEnd-1,text:` textLength="${l}" lengthAdjust="spacingAndGlyphs" data-font-metrics="deterministic-fit"`})}let d=n||l;for(let t of eC(e))a(t,o,d,s)};for(let e of n)a(e,r,!1);let o=e;for(let e of i.sort((e,t)=>t.offset-e.offset))o=o.slice(0,e.offset)+e.text+o.slice(e.offset);return o}(k,e.appearance.font)),j(k,"font-geometry-fitted SVG output");let S=g.idPrefix??"";S&&j(k=u(k,S),"namespaced SVG output");let M=e.source.accessibility,E="c4"===y.id?"C4 architecture diagram":void 0;(t.injectAccessibility??!0)&&(M.title||M.descr||E)&&j(k=function(e,t,n,i){let r=`${n}svg-title`,a=`${n}svg-desc`,o=[],s=[];if(t.title&&(o.push(`aria-labelledby="${r}"`),s.push(`<title id="${r}">${e4(t.title)}</title>`)),t.descr&&(o.push(`aria-describedby="${a}"`),s.push(`<desc id="${a}">${e4(t.descr)}</desc>`)),0===s.length&&!i)return e;let l=ec(e);if(!l||ed(l,"aria-labelledby")||ed(l,"aria-describedby"))return e;!i||t.title||ed(l,"aria-label")||o.push(`aria-label="${e4(i).replace(/"/g,"&quot;")}"`);let c=`${ed(l,"role")?"":' role="img"'} ${o.join(" ")}`,d=e.slice(l.start,l.end);return ef(e,l,`${d.slice(0,-1)}${c}>${s.join("")}`)}(k,M,S,E),"accessibility-projected SVG output"),i&&(k=i.finish(k)),j(k=function(e){let t=ec(e);if(!t)return e;let n=eu(e);if(0===n.length)return e;let i=`am-${function(e){let t=0xdeadbeef,n=0x41c6ce57;for(let i=0;i<e.length;i++){let r=e.charCodeAt(i);t=Math.imul(t^r,0x9e3779b1),n=Math.imul(n^r,0x5f356495)}return t=Math.imul(t^t>>>16,0x85ebca6b)^Math.imul(n^n>>>13,0xc2b2ae35),n=Math.imul(n^n>>>16,0x85ebca6b)^Math.imul(t^t>>>13,0xc2b2ae35),`${(n>>>0).toString(36).padStart(7,"0")}${(t>>>0).toString(36).padStart(7,"0")}`}(e)}`,r=e;for(let e=n.length-1;e>=0;e--){let t=n[e];r=`${r.slice(0,t.start)}${function e(t,n){let i="",r=0,a=0,o,s=0;for(;r<t.length;){let l=t[r];if(o){"\\"===l?r++:l===o&&(o=void 0),r++;continue}if("/"===l&&"*"===t[r+1]){let e=t.indexOf("*/",r+2);r=e<0?t.length:e+2;continue}if('"'===l||"'"===l)o=l;else if("("===l)s++;else if(")"===l)s=Math.max(0,s-1);else if(";"===l&&0===s)i+=t.slice(a,r+1),a=r+1;else if("{"===l&&0===s){let o=function(e,t){let n=0,i;for(let r=t;r<e.length;r++){let t=e[r];if(i)"\\"===t?r++:t===i&&(i=void 0);else if("/"===t&&"*"===e[r+1]){let t=e.indexOf("*/",r+2);if(t<0)return e.length;r=t+1}else if('"'===t||"'"===t)i=t;else if("{"===t)n++;else if("}"===t&&0==--n)return r}return e.length}(t,r);i+=function(t,n,i){let r=t.match(/^(?:\s*\/\*[\s\S]*?\*\/)*/)[0],a=t.slice(r.length),o=/^\s*@([\w-]+)/.exec(a);if(o){let r=o[1].toLowerCase(),a=e1.has(r)?e(n,i):n;return`${t}{${a}}`}let s=(function(e){let t=[],n=0,i,r=0;for(let a=0;a<e.length;a++){let o=e[a];i?"\\"===o?a++:o===i&&(i=void 0):'"'===o||"'"===o?i=o:"("===o||"["===o?n++:")"===o||"]"===o?n--:","===o&&0===n&&(t.push(e.slice(r,a)),r=a+1)}return t.push(e.slice(r)),t})(a).map(e=>{let t,n;return t=e.match(/^\s*/)[0],0===(n=e.slice(t.length)).length?e:/^svg(?![\w-])/.exec(n)?`${t}svg.${i}${n.slice(3)}`:`${t}.${i} ${n}`}).join(",");return`${r}${s}{${n}}`}(t.slice(a,r),t.slice(r+1,o),n),a=r=o+1;continue}r++}return i+t.slice(a)}(r.slice(t.start,t.end),i)}${r.slice(t.end)}`}let a=r.slice(t.start,t.end),o=ed(t,"class"),s=o?`${a.slice(0,o.valueEnd-t.start)}${o.value?" ":""}${i}${a.slice(o.valueEnd-t.start)}`:`${a.slice(0,-1)} class="${i}">`;return ef(r,t,s)}(c(k)),"style-scoped SVG output"),g.compact&&j(k=d(k),"compacted SVG output");let C="png"===e.output?"strict":g.security,O=Q("svg-security",()=>x(k,C));return n.push(...O.diagnostics),j(k=O.svg,"final SVG output"),Object.freeze({svg:k,executionDecision:h.executionDecision,...$?{layoutCertification:$}:{}})})(e,t,n,void 0)));return function(e,t,n){let i=Object.hasOwn(t,"layoutCertification")?t.layoutCertification:void 0;return function(e,t){let n=t,i;return Object.freeze({svg:e,get receipt(){return void 0===i&&(i=n(),n=void 0),i}})}(t.svg,()=>{var r;let a=(j(r=t.svg,"graphical projection digest input"),g(JSON.stringify(r)));return Object.freeze({...h(e,n),graphicalProjectionDigest:a,executionDecision:t.executionDecision,...i?{layoutCertification:Object.freeze({...i,outputDigest:a})}:{}})})}(e,i,n)})(e))}(i)}catch(i){let e=et(i),t=e?e.load:i?.loadHtmlEntityTable,n=e?"ELK"===e.dependency||"YAML"===e.dependency||"Agentic layout"===e.dependency||"Forest layout"===e.dependency?e.dependency:void 0:"function"==typeof t?"HTML entities":void 0;if(!n||"function"!=typeof t||r.has(n)||[...r.values()].includes(t))throw i;r.set(n,t),await t()}}export{e9 as renderLoadedFamilySvg,te as renderLoadedFamilySvgWithReceipt};