@aiquants/markdown 5.0.0 → 6.0.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 (170) hide show
  1. package/README.md +93 -14
  2. package/dist/{abnfDiagram-VRR7QNED-DeHJ63Vu.js → abnfDiagram-VRR7QNED-D7Rp9EaV.js} +3 -3
  3. package/dist/{abnfDiagram-VRR7QNED-CfVjEUzG.cjs → abnfDiagram-VRR7QNED-KTGT9TWM.cjs} +1 -1
  4. package/dist/{arc-XFFLkHkK.cjs → arc-D5T_urCC.cjs} +1 -1
  5. package/dist/arc-DzZml7Bc.js +83 -0
  6. package/dist/{architectureDiagram-ZJ3FMSHR-7xJ6YYGu.cjs → architectureDiagram-ZJ3FMSHR-BOo3y9aD.cjs} +1 -1
  7. package/dist/{architectureDiagram-ZJ3FMSHR-CQ1m3MUB.js → architectureDiagram-ZJ3FMSHR-DLrGYTYy.js} +123 -123
  8. package/dist/{blockDiagram-677ZJIJ3-BPC3se0e.js → blockDiagram-677ZJIJ3-B60l5Fpl.js} +166 -166
  9. package/dist/{blockDiagram-677ZJIJ3-CJOFqwiW.cjs → blockDiagram-677ZJIJ3-DnjCjo0a.cjs} +1 -1
  10. package/dist/{c4Diagram-LMCZKHZV-BEIrp4t6.js → c4Diagram-LMCZKHZV-BmbplKCu.js} +2 -2
  11. package/dist/{c4Diagram-LMCZKHZV-D8ytYGhR.cjs → c4Diagram-LMCZKHZV-bd8fWQ1F.cjs} +1 -1
  12. package/dist/channel-B3oXm84X.js +5 -0
  13. package/dist/{channel-CJQcZr8o.cjs → channel-DJ_PyD9w.cjs} +1 -1
  14. package/dist/{chunk-2Q5K7J3B-l8ly7Yjr.js → chunk-2Q5K7J3B-C0hbxO3D.js} +1 -1
  15. package/dist/{chunk-2Q5K7J3B-BbMQR3Sm.cjs → chunk-2Q5K7J3B-CWLCO342.cjs} +1 -1
  16. package/dist/{chunk-32BRIVSS-BwDfmprN.cjs → chunk-32BRIVSS-Cb9nTxqN.cjs} +1 -1
  17. package/dist/{chunk-32BRIVSS-BhQJBlVw.js → chunk-32BRIVSS-DUWtkDEY.js} +1 -1
  18. package/dist/{chunk-5VM5RSS4-Bfis-x7E.js → chunk-5VM5RSS4-C3mSh-gE.js} +1 -1
  19. package/dist/{chunk-5VM5RSS4-CqDQlS7v.cjs → chunk-5VM5RSS4-DHA5n_Ls.cjs} +1 -1
  20. package/dist/{chunk-EX3LRPZG-9aDULZwJ.cjs → chunk-EX3LRPZG-ByY6_kep.cjs} +1 -1
  21. package/dist/{chunk-EX3LRPZG-DUTbzwDM.js → chunk-EX3LRPZG-DCF1zjtT.js} +50 -50
  22. package/dist/{chunk-JWPE2WC7-DpcSSOP5.js → chunk-JWPE2WC7-CPLOunIL.js} +1 -1
  23. package/dist/{chunk-JWPE2WC7-5cM5nFf6.cjs → chunk-JWPE2WC7-CUBzYD4G.cjs} +1 -1
  24. package/dist/{chunk-MOJQB5TN-D_h6bolU.js → chunk-MOJQB5TN-CmOhW6SK.js} +9 -9
  25. package/dist/{chunk-MOJQB5TN-Cw864mUL.cjs → chunk-MOJQB5TN-P8-yb3-j.cjs} +1 -1
  26. package/dist/{chunk-PUDLZKDR-B0wZjmzv.js → chunk-PUDLZKDR-DH7B7ZTK.js} +22 -22
  27. package/dist/{chunk-PUDLZKDR-yLvT3c9x.cjs → chunk-PUDLZKDR-pKdIELvz.cjs} +1 -1
  28. package/dist/{chunk-RYQCIY6F-DTKYsCgk.js → chunk-RYQCIY6F-C7ytn_QX.js} +6 -6
  29. package/dist/{chunk-RYQCIY6F-hj9dRWMT.cjs → chunk-RYQCIY6F-DcvQCEoc.cjs} +1 -1
  30. package/dist/{chunk-V7JOEXUC-COa9uddv.js → chunk-V7JOEXUC-BgLcssUF.js} +5 -5
  31. package/dist/{chunk-V7JOEXUC-DIQ8n1AN.cjs → chunk-V7JOEXUC-CtXgqODy.cjs} +1 -1
  32. package/dist/{chunk-VR4S4FIN-B72PxPVm.js → chunk-VR4S4FIN-BK6xeIQk.js} +3 -3
  33. package/dist/{chunk-VR4S4FIN-Cy-2mZJB.cjs → chunk-VR4S4FIN-Cc4GDi2Z.cjs} +1 -1
  34. package/dist/{chunk-XXDRQBXY-D2Sgptl-.js → chunk-XXDRQBXY-COtZ25Ez.js} +1 -1
  35. package/dist/{chunk-XXDRQBXY-DmoUE7-y.cjs → chunk-XXDRQBXY-D1OixGzR.cjs} +1 -1
  36. package/dist/{classDiagram-OUVF2IWQ-GjsCEuKI.cjs → classDiagram-OUVF2IWQ-DDLmqaG6.cjs} +1 -1
  37. package/dist/{classDiagram-v2-EOCWNBFH-Dah4_VL7.js → classDiagram-OUVF2IWQ-Jc-IwOm0.js} +2 -2
  38. package/dist/{classDiagram-v2-EOCWNBFH-GjsCEuKI.cjs → classDiagram-v2-EOCWNBFH-DDLmqaG6.cjs} +1 -1
  39. package/dist/{classDiagram-OUVF2IWQ-Dah4_VL7.js → classDiagram-v2-EOCWNBFH-Jc-IwOm0.js} +2 -2
  40. package/dist/components/MarkdownRenderer.d.ts +5 -2
  41. package/dist/components/MarkdownViewer.d.ts +3 -2
  42. package/dist/components/NodesRenderer.d.ts +1 -5
  43. package/dist/components/embeds/ClientFrame.d.ts +13 -0
  44. package/dist/components/embeds/LinkCard.d.ts +9 -0
  45. package/dist/components/embeds/ProviderEmbed.d.ts +11 -0
  46. package/dist/components/embeds/embedLabels.d.ts +12 -0
  47. package/dist/components/embeds/frameMessages.d.ts +7 -0
  48. package/dist/components/embeds/markdownEmbeds.d.ts +2 -0
  49. package/dist/components/embeds/requestQueue.d.ts +16 -0
  50. package/dist/components/embeds.d.ts +0 -8
  51. package/dist/components/htmlSanitizer.d.ts +4 -0
  52. package/dist/components/mdastNodes/HTMLBlockContainerNode.d.ts +1 -2
  53. package/dist/components/rawHtml.d.ts +6 -3
  54. package/dist/components/viewerLabels.d.ts +3 -1
  55. package/dist/{cose-bilkent-JH36ORCC-Pi0l3C5o.js → cose-bilkent-JH36ORCC-DaucPocG.js} +1 -1
  56. package/dist/{cose-bilkent-JH36ORCC-Vi9pHFwc.cjs → cose-bilkent-JH36ORCC-OwiXHdQY.cjs} +1 -1
  57. package/dist/css/zenn-content.css +0 -40
  58. package/dist/{cynefinDiagram-TSTJHNR4-BQ2k9Z6b.cjs → cynefinDiagram-TSTJHNR4-Ag-HcuUm.cjs} +1 -1
  59. package/dist/{cynefinDiagram-TSTJHNR4-CIh03JTU.js → cynefinDiagram-TSTJHNR4-Dkmz7gDw.js} +47 -47
  60. package/dist/{dagre-VKFMJZFB-cINcPwV3.js → dagre-VKFMJZFB-BHGdcjt3.js} +27 -27
  61. package/dist/{dagre-VKFMJZFB-DI2wSrAy.cjs → dagre-VKFMJZFB-Q4CcAQ09.cjs} +1 -1
  62. package/dist/{diagram-FQU43EPY-BonrBTG_.js → diagram-FQU43EPY-DBASKnKu.js} +42 -42
  63. package/dist/{diagram-FQU43EPY-B6iUH2l5.cjs → diagram-FQU43EPY-jWCrN_AW.cjs} +1 -1
  64. package/dist/{diagram-G47NLZAW-CY6mWS2R.cjs → diagram-G47NLZAW-B4XMStX7.cjs} +1 -1
  65. package/dist/{diagram-G47NLZAW-5N876QQA.js → diagram-G47NLZAW-BY1mmnYA.js} +83 -83
  66. package/dist/{diagram-NH7WQ7WH-x3SaRfd6.cjs → diagram-NH7WQ7WH-BS1eEa9R.cjs} +1 -1
  67. package/dist/{diagram-NH7WQ7WH-LFuTbHxY.js → diagram-NH7WQ7WH-BXFvYRtm.js} +18 -18
  68. package/dist/{diagram-OA4YK3LP-B9mVw8cB.cjs → diagram-OA4YK3LP-CTaL_2Nc.cjs} +1 -1
  69. package/dist/{diagram-OA4YK3LP-Cinpbl0B.js → diagram-OA4YK3LP-DgGrzezu.js} +61 -61
  70. package/dist/{diagram-WEI45ONY-HPCHpafe.js → diagram-WEI45ONY-BHxWKH3v.js} +21 -21
  71. package/dist/{diagram-WEI45ONY-BRYVUhRr.cjs → diagram-WEI45ONY-DX7BGSMI.cjs} +1 -1
  72. package/dist/{ebnfDiagram-CCIWWBDH-oLOdtH39.js → ebnfDiagram-CCIWWBDH-BUK_anpV.js} +5 -5
  73. package/dist/{ebnfDiagram-CCIWWBDH-DhFlIi0a.cjs → ebnfDiagram-CCIWWBDH-BpDmVVJY.cjs} +1 -1
  74. package/dist/embeds/frames.d.ts +4 -0
  75. package/dist/embeds/linkCards.d.ts +16 -0
  76. package/dist/embeds/placeholder.d.ts +15 -0
  77. package/dist/embeds/providers.d.ts +73 -0
  78. package/dist/embeds/testing.cjs +1 -0
  79. package/dist/embeds/testing.d.ts +7 -0
  80. package/dist/embeds/testing.js +67 -0
  81. package/dist/embeds.cjs +1 -0
  82. package/dist/embeds.d.ts +4 -0
  83. package/dist/embeds.js +94 -0
  84. package/dist/{erDiagram-Q63AITRT-DCCFR1Ai.cjs → erDiagram-Q63AITRT-Cd9H9BtP.cjs} +1 -1
  85. package/dist/{erDiagram-Q63AITRT-CCtzpK78.js → erDiagram-Q63AITRT-Qb2bmkNp.js} +9 -9
  86. package/dist/{extractHeadings-CGJexznE.js → extractHeadings-B2pUyEPa.js} +5603 -5517
  87. package/dist/extractHeadings-DgefF9l1.cjs +311 -0
  88. package/dist/flowDiagram-23GEKE2U-BOmNlv7X.cjs +1 -0
  89. package/dist/flowDiagram-23GEKE2U-DMZnRz-6.js +7 -0
  90. package/dist/{ganttDiagram-NO4QXBWP-Dfi3nINO.js → ganttDiagram-NO4QXBWP-BVISsrzr.js} +69 -69
  91. package/dist/{ganttDiagram-NO4QXBWP-C9RPyo4r.cjs → ganttDiagram-NO4QXBWP-C6-ExcDz.cjs} +1 -1
  92. package/dist/{gitGraphDiagram-IHSO6WYX-CjAqPhww.js → gitGraphDiagram-IHSO6WYX-BDVA2TFP.js} +38 -38
  93. package/dist/{gitGraphDiagram-IHSO6WYX-mT3NNT7T.cjs → gitGraphDiagram-IHSO6WYX-DLzPc702.cjs} +1 -1
  94. package/dist/index.cjs +1 -1
  95. package/dist/index.client.cjs +1 -1
  96. package/dist/index.client.d.ts +1 -10
  97. package/dist/index.client.js +41 -49
  98. package/dist/index.js +41 -49
  99. package/dist/index.server.cjs +1 -1
  100. package/dist/index.server.d.ts +0 -2
  101. package/dist/index.server.js +116 -161
  102. package/dist/{infoDiagram-FWYZ7A6U-BXWQ9Vy4.js → infoDiagram-FWYZ7A6U-D31UwqjR.js} +1 -1
  103. package/dist/{infoDiagram-FWYZ7A6U-0Co9BitR.cjs → infoDiagram-FWYZ7A6U-DMF_wb2h.cjs} +1 -1
  104. package/dist/{ishikawaDiagram-FXEZZL3T-BKqUBw1i.cjs → ishikawaDiagram-FXEZZL3T-DUlnwraq.cjs} +1 -1
  105. package/dist/{ishikawaDiagram-FXEZZL3T-CZp5P1WE.js → ishikawaDiagram-FXEZZL3T-XA6-gyHY.js} +35 -35
  106. package/dist/{journeyDiagram-5HDEW3XC-DYVTgOOE.js → journeyDiagram-5HDEW3XC-B8sfsWpu.js} +39 -39
  107. package/dist/{journeyDiagram-5HDEW3XC-CeumPQ1I.cjs → journeyDiagram-5HDEW3XC-CwQyFcYa.cjs} +1 -1
  108. package/dist/{kanban-definition-HUTT4EX6-Cg5KnsE9.cjs → kanban-definition-HUTT4EX6-BjPlt2-E.cjs} +1 -1
  109. package/dist/{kanban-definition-HUTT4EX6-CnleRy80.js → kanban-definition-HUTT4EX6-FTrTBare.js} +123 -123
  110. package/dist/{linear-qqwu6T0F.cjs → linear-D3AJM3sY.cjs} +1 -1
  111. package/dist/{linear-Cf8i6Rsk.js → linear-DI9P_z72.js} +32 -32
  112. package/dist/markdown.css +1 -1
  113. package/dist/{mindmap-definition-LN4V7U3C-DfFWeFph.cjs → mindmap-definition-LN4V7U3C-CxgWZidl.cjs} +1 -1
  114. package/dist/{mindmap-definition-LN4V7U3C-lBin9VOm.js → mindmap-definition-LN4V7U3C-YW4YcL9x.js} +33 -33
  115. package/dist/{pegDiagram-2B236MQR-Cf1f-3yi.cjs → pegDiagram-2B236MQR-CUo7q5bl.cjs} +1 -1
  116. package/dist/{pegDiagram-2B236MQR-BiD21lOj.js → pegDiagram-2B236MQR-sJjLKeF3.js} +5 -5
  117. package/dist/{pieDiagram-ENE6RG2P-jwhVsZgX.cjs → pieDiagram-ENE6RG2P-Cy_sUuLQ.cjs} +1 -1
  118. package/dist/{pieDiagram-ENE6RG2P-BqZb6gaV.js → pieDiagram-ENE6RG2P-D4VanIOv.js} +58 -58
  119. package/dist/providers-Bxr2Wb-j.cjs +1 -0
  120. package/dist/providers-Drq7MT_K.js +209 -0
  121. package/dist/{quadrantDiagram-ABIIQ3AL-sO_sIA7b.cjs → quadrantDiagram-ABIIQ3AL-D3c8xLpt.cjs} +1 -1
  122. package/dist/{quadrantDiagram-ABIIQ3AL-CNe9fRLO.js → quadrantDiagram-ABIIQ3AL-ubxphjb_.js} +48 -48
  123. package/dist/{railroadDiagram-RFXS5EU6-53YTkJrs.js → railroadDiagram-RFXS5EU6-DvpD4C_A.js} +3 -3
  124. package/dist/{railroadDiagram-RFXS5EU6-Dkc8k3e9.cjs → railroadDiagram-RFXS5EU6-_Q4W5hB-.cjs} +1 -1
  125. package/dist/{requirementDiagram-TGXJPOKE-C0GMlJO4.cjs → requirementDiagram-TGXJPOKE-DdYIO-wU.cjs} +1 -1
  126. package/dist/{requirementDiagram-TGXJPOKE-D8Gz7jzA.js → requirementDiagram-TGXJPOKE-Dk_6BuX9.js} +3 -3
  127. package/dist/{sankeyDiagram-HTMAVEWB-CEC0GaCg.js → sankeyDiagram-HTMAVEWB-s3Kd7T8n.js} +67 -67
  128. package/dist/{sankeyDiagram-HTMAVEWB-Bw9J2Ay2.cjs → sankeyDiagram-HTMAVEWB-zuYg6LTg.cjs} +1 -1
  129. package/dist/{sequenceDiagram-DBY2YBRQ-BuqPCreB.cjs → sequenceDiagram-DBY2YBRQ-BvNPCevg.cjs} +1 -1
  130. package/dist/{sequenceDiagram-DBY2YBRQ-CKb4m3I0.js → sequenceDiagram-DBY2YBRQ-YQic4wxL.js} +47 -47
  131. package/dist/{sizeCapture-X5ZJPWSS-Dm3rsxXw.cjs → sizeCapture-X5ZJPWSS-BqrdzzsI.cjs} +1 -1
  132. package/dist/{sizeCapture-X5ZJPWSS-CotnTNAA.js → sizeCapture-X5ZJPWSS-qMsWGfjy.js} +1 -1
  133. package/dist/{stateDiagram-2N3HPSRC-GWEIP-C9.js → stateDiagram-2N3HPSRC-D1Ub8LYq.js} +22 -22
  134. package/dist/{stateDiagram-2N3HPSRC-5Y-OlePe.cjs → stateDiagram-2N3HPSRC-Ds8f-scd.cjs} +1 -1
  135. package/dist/{stateDiagram-v2-6OUMAXLB-BZFV8swJ.js → stateDiagram-v2-6OUMAXLB-DW8wjtk3.js} +2 -2
  136. package/dist/{stateDiagram-v2-6OUMAXLB-v77D3Qyf.cjs → stateDiagram-v2-6OUMAXLB-PmrsPXuZ.cjs} +1 -1
  137. package/dist/styles/markdown.css +1 -1
  138. package/dist/{swimlanes-5IMT3BWC-DujAOwAt.js → swimlanes-5IMT3BWC-C8P8vU0w.js} +313 -313
  139. package/dist/{swimlanes-5IMT3BWC-B1hLl8Ph.cjs → swimlanes-5IMT3BWC-jZhcesRT.cjs} +1 -1
  140. package/dist/{swimlanesDiagram-G3AALYLV-B-5z3jDg.js → swimlanesDiagram-G3AALYLV-B9FKeJRf.js} +2 -2
  141. package/dist/{swimlanesDiagram-G3AALYLV-Cklgsxbg.cjs → swimlanesDiagram-G3AALYLV-M5Cg2MHU.cjs} +1 -1
  142. package/dist/{timeline-definition-FHXFAJF6-Fmzt_lvR.js → timeline-definition-FHXFAJF6-Ch-He--D.js} +34 -34
  143. package/dist/{timeline-definition-FHXFAJF6-B2m-aQLI.cjs → timeline-definition-FHXFAJF6-DZm1-KlQ.cjs} +1 -1
  144. package/dist/{vennDiagram-L72KCM5P-zIXK42Cx.js → vennDiagram-L72KCM5P-CaoPscCM.js} +92 -92
  145. package/dist/{vennDiagram-L72KCM5P-rL7UDYbl.cjs → vennDiagram-L72KCM5P-mUSI238J.cjs} +1 -1
  146. package/dist/{wardleyDiagram-EHGQE667-pTeeZ0uM.js → wardleyDiagram-EHGQE667-CSAqF366.js} +11 -11
  147. package/dist/{wardleyDiagram-EHGQE667-CNLieFen.cjs → wardleyDiagram-EHGQE667-CkKP97H-.cjs} +1 -1
  148. package/dist/{xychartDiagram-FW5EYKEG-CD5ik4HK.cjs → xychartDiagram-FW5EYKEG-BivGpkVk.cjs} +1 -1
  149. package/dist/{xychartDiagram-FW5EYKEG-B6UdSSVZ.js → xychartDiagram-FW5EYKEG-OEsTD_k4.js} +37 -37
  150. package/package.json +21 -8
  151. package/dist/arc-DH6k2JIR.js +0 -83
  152. package/dist/channel-DoH_tsOQ.js +0 -5
  153. package/dist/components/mdastNodes/BlockLinkNode.d.ts +0 -5
  154. package/dist/components/mdastNodes/RichLinkCard.d.ts +0 -8
  155. package/dist/components/mdastNodes/TwitterEmbedNode.d.ts +0 -25
  156. package/dist/components/mdastNodes/YouTubeEmbedNode.d.ts +0 -6
  157. package/dist/extractHeadings-lDHB2sBb.cjs +0 -310
  158. package/dist/flowDiagram-23GEKE2U-ORytlvmX.js +0 -7
  159. package/dist/flowDiagram-23GEKE2U-h2WZTCCn.cjs +0 -1
  160. package/dist/plugins/createIntentTweetLink.d.ts +0 -10
  161. package/dist/plugins/extractYouTubeVideoId.d.ts +0 -5
  162. package/dist/plugins/fetchSiteMetadata.d.ts +0 -9
  163. package/dist/plugins/remark-auto-heading-id.d.ts +0 -2
  164. package/dist/plugins/remark-block-link-metadata.d.ts +0 -23
  165. package/dist/plugins/remark-block-link.d.ts +0 -12
  166. package/dist/plugins/remark-twitter-embed.d.ts +0 -20
  167. package/dist/plugins/remark-youtube-embed.d.ts +0 -14
  168. package/dist/simple-logger-DZxBpX7v.cjs +0 -1
  169. package/dist/simple-logger-i94ikRyH.js +0 -101
  170. package/dist/utils/getFaviconUrl.d.ts +0 -1
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const Pt=require("./chunk-JWPE2WC7-5cM5nFf6.cjs"),f=require("./extractHeadings-lDHB2sBb.cjs"),Ct=require("./cynefin-VYW2F7L2-MpAliYy9.cjs");var D=f.__name((o,r)=>{const e=o<=1?o*100:o;if(e<0||e>100)throw new Error(`${r} must be between 0-1 (decimal) or 0-100 (percentage). Received: ${o}`);return e},"toPercent"),L=f.__name((o,r,e)=>({x:D(r,`${e} evolution`),y:D(o,`${e} visibility`)}),"toCoordinates"),J=f.__name(o=>{if(o){if(o==="+<>")return"bidirectional";if(o==="+<")return"backward";if(o==="+>")return"forward"}},"getFlowFromPort"),St=f.__name(o=>{if(!o?.startsWith("+"))return{};const e=/^\+'([^']*)'/.exec(o)?.[1];return o.includes("<>")?{flow:"bidirectional",label:e}:o.includes("<")?{flow:"backward",label:e}:o.includes(">")?{flow:"forward",label:e}:{label:e}},"extractFlowFromArrow"),Mt=f.__name((o,r)=>{if(Pt.populateCommonDb(o,r),o.size&&r.setSize(o.size.width,o.size.height),o.evolution){const e=o.evolution.stages.map(a=>a.secondName?`${a.name.trim()} / ${a.secondName.trim()}`:a.name.trim()),g=o.evolution.stages.filter(a=>a.boundary!==void 0).map(a=>a.boundary);r.updateAxes({stages:e,stageBoundaries:g})}if(o.anchors.forEach(e=>{const g=L(e.visibility,e.evolution,`Anchor "${e.name}"`);r.addNode(e.name,e.name,g.x,g.y,"anchor")}),o.components.forEach(e=>{const g=L(e.visibility,e.evolution,`Component "${e.name}"`),a=e.label?(e.label.negX?-1:1)*e.label.offsetX:void 0,d=e.label?(e.label.negY?-1:1)*e.label.offsetY:void 0,m=e.decorator?.strategy;r.addNode(e.name,e.name,g.x,g.y,"component",a,d,e.inertia,m)}),o.notes.forEach(e=>{const g=L(e.visibility,e.evolution,`Note "${e.text}"`);r.addNote(e.text,g.x,g.y)}),o.pipelines.forEach(e=>{const g=r.getNode(e.parent);if(!g||typeof g.y!="number")throw new Error(`Pipeline "${e.parent}" must reference an existing component with coordinates.`);const a=g.y;r.startPipeline(e.parent),e.components.forEach(d=>{const m=`${e.parent}_${d.name}`,C=d.label?(d.label.negX?-1:1)*d.label.offsetX:void 0,y=d.label?(d.label.negY?-1:1)*d.label.offsetY:void 0,B=D(d.evolution,`Pipeline component "${d.name}" evolution`);r.addNode(m,d.name,B,a,"pipeline-component",C,y),r.addPipelineComponent(e.parent,m)})}),o.links.forEach(e=>{const g=!!e.arrow&&(e.arrow.includes("-.->")||e.arrow.includes(".-."));let a=J(e.fromPort)??J(e.toPort);const{flow:d,label:m}=St(e.arrow);!a&&d&&(a=d);const C=e.linkLabel,y=m??C;r.addLink(r.resolveNodeId(e.from),r.resolveNodeId(e.to),g,y,a)}),o.evolves.forEach(e=>{const g=r.getNode(e.component);if(g?.y!==void 0){const a=D(e.target,`Evolve target for "${e.component}"`);r.addTrend(e.component,a,g.y)}}),o.annotations.length>0){const e=o.annotations[0],g=L(e.x,e.y,"Annotations box");r.setAnnotationsBox(g.x,g.y)}o.annotation.forEach(e=>{const g=L(e.x,e.y,`Annotation ${e.number}`);r.addAnnotation(e.number,[{x:g.x,y:g.y}],e.text)}),o.accelerators.forEach(e=>{const g=L(e.x,e.y,`Accelerator "${e.name}"`);r.addAccelerator(e.name,g.x,g.y)}),o.deaccelerators.forEach(e=>{const g=L(e.x,e.y,`Deaccelerator "${e.name}"`);r.addDeaccelerator(e.name,g.x,g.y)})},"populateDb"),U={parser:{yy:void 0},parse:f.__name(async o=>{const r=await Ct.parse("wardley",o);f.log.debug(r);const e=U.parser?.yy;if(!e||typeof e.addNode!="function")throw new Error("parser.parser?.yy was not a WardleyDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.");Mt(r,e)},"parse")},X,_t=(X=class{constructor(){this.nodes=new Map,this.links=[],this.trends=new Map,this.pipelines=new Map,this.annotations=[],this.notes=[],this.accelerators=[],this.deaccelerators=[],this.axes={}}addNode(r){const e=this.nodes.get(r.id)??{id:r.id,label:r.label},g={...e,...r,className:r.className??e.className,labelOffsetX:r.labelOffsetX??e.labelOffsetX,labelOffsetY:r.labelOffsetY??e.labelOffsetY};this.nodes.set(r.id,g)}addLink(r){this.links.push(r)}addTrend(r){this.trends.set(r.nodeId,r)}startPipeline(r){this.pipelines.set(r,{nodeId:r,componentIds:[]});const e=this.nodes.get(r);e&&(e.isPipelineParent=!0)}addPipelineComponent(r,e){const g=this.pipelines.get(r);g&&g.componentIds.push(e);const a=this.nodes.get(e);a&&(a.inPipeline=!0)}addAnnotation(r){this.annotations.push(r)}addNote(r){this.notes.push(r)}addAccelerator(r){this.accelerators.push(r)}addDeaccelerator(r){this.deaccelerators.push(r)}setAnnotationsBox(r,e){this.annotationsBox={x:r,y:e}}setAxes(r){this.axes={...this.axes,...r}}setSize(r,e){this.size={width:r,height:e}}getNode(r){return this.nodes.get(r)}resolveNodeId(r){if(this.nodes.has(r))return r;for(const[e,g]of this.nodes)if(g.label===r)return e;return r}build(){const r=[];for(const e of this.nodes.values()){if(typeof e.x!="number"||typeof e.y!="number")throw new Error(`Node "${e.label}" is missing coordinates`);r.push(e)}return{nodes:r,links:[...this.links],trends:[...this.trends.values()],pipelines:[...this.pipelines.values()],annotations:[...this.annotations],notes:[...this.notes],accelerators:[...this.accelerators],deaccelerators:[...this.deaccelerators],annotationsBox:this.annotationsBox,axes:{...this.axes},size:this.size}}clear(){this.nodes.clear(),this.links=[],this.trends.clear(),this.pipelines.clear(),this.annotations=[],this.notes=[],this.accelerators=[],this.deaccelerators=[],this.annotationsBox=void 0,this.axes={},this.size=void 0}},f.__name(X,"WardleyBuilder"),X),k=new _t;function K(){return f.getConfig2()["wardley-beta"]}f.__name(K,"getConfig");function Q(o,r,e,g,a,d,m,C,y){k.addNode({id:o,label:r,x:e,y:g,className:a,labelOffsetX:d,labelOffsetY:m,inertia:C,sourceStrategy:y})}f.__name(Q,"addNode");function tt(o,r,e=!1,g,a){k.addLink({source:o,target:r,dashed:e,label:g,flow:a})}f.__name(tt,"addLink");function et(o,r,e){k.addTrend({nodeId:o,targetX:r,targetY:e})}f.__name(et,"addTrend");function at(o,r,e){k.addAnnotation({number:o,coordinates:r,text:e})}f.__name(at,"addAnnotation");function rt(o,r,e){k.addNote({text:o,x:r,y:e})}f.__name(rt,"addNote");function ot(o,r,e){k.addAccelerator({name:o,x:r,y:e})}f.__name(ot,"addAccelerator");function nt(o,r,e){k.addDeaccelerator({name:o,x:r,y:e})}f.__name(nt,"addDeaccelerator");function st(o,r){k.setAnnotationsBox(o,r)}f.__name(st,"setAnnotationsBox");function it(o,r){k.setSize(o,r)}f.__name(it,"setSize");function dt(o){k.startPipeline(o)}f.__name(dt,"startPipeline");function lt(o,r){k.addPipelineComponent(o,r)}f.__name(lt,"addPipelineComponent");function ct(o){k.setAxes(o)}f.__name(ct,"updateAxes");function pt(o){return k.getNode(o)}f.__name(pt,"getNode");function ft(o){return k.resolveNodeId(o)}f.__name(ft,"resolveNodeId");function ht(){return k.build()}f.__name(ht,"getWardleyData");function gt(){k.clear(),f.clear()}f.__name(gt,"clear");var Nt={getConfig:K,addNode:Q,addLink:tt,addTrend:et,addAnnotation:at,addNote:rt,addAccelerator:ot,addDeaccelerator:nt,setAnnotationsBox:st,setSize:it,startPipeline:dt,addPipelineComponent:lt,updateAxes:ct,getNode:pt,resolveNodeId:ft,getWardleyData:ht,clear:gt,setAccTitle:f.setAccTitle,getAccTitle:f.getAccTitle,setDiagramTitle:f.setDiagramTitle,getDiagramTitle:f.getDiagramTitle,getAccDescription:f.getAccDescription,setAccDescription:f.setAccDescription},Tt=["Genesis","Custom Built","Product","Commodity"],At=f.__name(()=>{const{themeVariables:o}=f.getConfig2();return{backgroundColor:o.wardley?.backgroundColor??o.background??"#fff",axisColor:o.wardley?.axisColor??"#000",axisTextColor:o.wardley?.axisTextColor??o.primaryTextColor??"#222",gridColor:o.wardley?.gridColor??"rgba(100, 100, 100, 0.2)",componentFill:o.wardley?.componentFill??"#fff",componentStroke:o.wardley?.componentStroke??"#000",componentLabelColor:o.wardley?.componentLabelColor??o.primaryTextColor??"#222",linkStroke:o.wardley?.linkStroke??"#000",evolutionStroke:o.wardley?.evolutionStroke??"#dc3545",annotationStroke:o.wardley?.annotationStroke??"#000",annotationTextColor:o.wardley?.annotationTextColor??o.primaryTextColor??"#222",annotationFill:o.wardley?.annotationFill??o.background??"#fff"}},"getTheme"),Lt=f.__name(()=>{const o=f.getConfig2()["wardley-beta"];return{width:o?.width??900,height:o?.height??600,padding:o?.padding??48,nodeRadius:o?.nodeRadius??6,nodeLabelOffset:o?.nodeLabelOffset??8,axisFontSize:o?.axisFontSize??12,labelFontSize:o?.labelFontSize??10,showGrid:o?.showGrid??!1,useMaxWidth:o?.useMaxWidth??!0}},"getConfigValues"),zt=f.__name((o,r,e,g)=>{f.log.debug(`Rendering Wardley map
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const Pt=require("./chunk-JWPE2WC7-CUBzYD4G.cjs"),f=require("./extractHeadings-DgefF9l1.cjs"),Ct=require("./cynefin-VYW2F7L2-MpAliYy9.cjs");var D=f.__name((o,r)=>{const e=o<=1?o*100:o;if(e<0||e>100)throw new Error(`${r} must be between 0-1 (decimal) or 0-100 (percentage). Received: ${o}`);return e},"toPercent"),L=f.__name((o,r,e)=>({x:D(r,`${e} evolution`),y:D(o,`${e} visibility`)}),"toCoordinates"),J=f.__name(o=>{if(o){if(o==="+<>")return"bidirectional";if(o==="+<")return"backward";if(o==="+>")return"forward"}},"getFlowFromPort"),St=f.__name(o=>{if(!o?.startsWith("+"))return{};const e=/^\+'([^']*)'/.exec(o)?.[1];return o.includes("<>")?{flow:"bidirectional",label:e}:o.includes("<")?{flow:"backward",label:e}:o.includes(">")?{flow:"forward",label:e}:{label:e}},"extractFlowFromArrow"),Mt=f.__name((o,r)=>{if(Pt.populateCommonDb(o,r),o.size&&r.setSize(o.size.width,o.size.height),o.evolution){const e=o.evolution.stages.map(a=>a.secondName?`${a.name.trim()} / ${a.secondName.trim()}`:a.name.trim()),g=o.evolution.stages.filter(a=>a.boundary!==void 0).map(a=>a.boundary);r.updateAxes({stages:e,stageBoundaries:g})}if(o.anchors.forEach(e=>{const g=L(e.visibility,e.evolution,`Anchor "${e.name}"`);r.addNode(e.name,e.name,g.x,g.y,"anchor")}),o.components.forEach(e=>{const g=L(e.visibility,e.evolution,`Component "${e.name}"`),a=e.label?(e.label.negX?-1:1)*e.label.offsetX:void 0,d=e.label?(e.label.negY?-1:1)*e.label.offsetY:void 0,m=e.decorator?.strategy;r.addNode(e.name,e.name,g.x,g.y,"component",a,d,e.inertia,m)}),o.notes.forEach(e=>{const g=L(e.visibility,e.evolution,`Note "${e.text}"`);r.addNote(e.text,g.x,g.y)}),o.pipelines.forEach(e=>{const g=r.getNode(e.parent);if(!g||typeof g.y!="number")throw new Error(`Pipeline "${e.parent}" must reference an existing component with coordinates.`);const a=g.y;r.startPipeline(e.parent),e.components.forEach(d=>{const m=`${e.parent}_${d.name}`,C=d.label?(d.label.negX?-1:1)*d.label.offsetX:void 0,y=d.label?(d.label.negY?-1:1)*d.label.offsetY:void 0,B=D(d.evolution,`Pipeline component "${d.name}" evolution`);r.addNode(m,d.name,B,a,"pipeline-component",C,y),r.addPipelineComponent(e.parent,m)})}),o.links.forEach(e=>{const g=!!e.arrow&&(e.arrow.includes("-.->")||e.arrow.includes(".-."));let a=J(e.fromPort)??J(e.toPort);const{flow:d,label:m}=St(e.arrow);!a&&d&&(a=d);const C=e.linkLabel,y=m??C;r.addLink(r.resolveNodeId(e.from),r.resolveNodeId(e.to),g,y,a)}),o.evolves.forEach(e=>{const g=r.getNode(e.component);if(g?.y!==void 0){const a=D(e.target,`Evolve target for "${e.component}"`);r.addTrend(e.component,a,g.y)}}),o.annotations.length>0){const e=o.annotations[0],g=L(e.x,e.y,"Annotations box");r.setAnnotationsBox(g.x,g.y)}o.annotation.forEach(e=>{const g=L(e.x,e.y,`Annotation ${e.number}`);r.addAnnotation(e.number,[{x:g.x,y:g.y}],e.text)}),o.accelerators.forEach(e=>{const g=L(e.x,e.y,`Accelerator "${e.name}"`);r.addAccelerator(e.name,g.x,g.y)}),o.deaccelerators.forEach(e=>{const g=L(e.x,e.y,`Deaccelerator "${e.name}"`);r.addDeaccelerator(e.name,g.x,g.y)})},"populateDb"),U={parser:{yy:void 0},parse:f.__name(async o=>{const r=await Ct.parse("wardley",o);f.log.debug(r);const e=U.parser?.yy;if(!e||typeof e.addNode!="function")throw new Error("parser.parser?.yy was not a WardleyDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.");Mt(r,e)},"parse")},X,_t=(X=class{constructor(){this.nodes=new Map,this.links=[],this.trends=new Map,this.pipelines=new Map,this.annotations=[],this.notes=[],this.accelerators=[],this.deaccelerators=[],this.axes={}}addNode(r){const e=this.nodes.get(r.id)??{id:r.id,label:r.label},g={...e,...r,className:r.className??e.className,labelOffsetX:r.labelOffsetX??e.labelOffsetX,labelOffsetY:r.labelOffsetY??e.labelOffsetY};this.nodes.set(r.id,g)}addLink(r){this.links.push(r)}addTrend(r){this.trends.set(r.nodeId,r)}startPipeline(r){this.pipelines.set(r,{nodeId:r,componentIds:[]});const e=this.nodes.get(r);e&&(e.isPipelineParent=!0)}addPipelineComponent(r,e){const g=this.pipelines.get(r);g&&g.componentIds.push(e);const a=this.nodes.get(e);a&&(a.inPipeline=!0)}addAnnotation(r){this.annotations.push(r)}addNote(r){this.notes.push(r)}addAccelerator(r){this.accelerators.push(r)}addDeaccelerator(r){this.deaccelerators.push(r)}setAnnotationsBox(r,e){this.annotationsBox={x:r,y:e}}setAxes(r){this.axes={...this.axes,...r}}setSize(r,e){this.size={width:r,height:e}}getNode(r){return this.nodes.get(r)}resolveNodeId(r){if(this.nodes.has(r))return r;for(const[e,g]of this.nodes)if(g.label===r)return e;return r}build(){const r=[];for(const e of this.nodes.values()){if(typeof e.x!="number"||typeof e.y!="number")throw new Error(`Node "${e.label}" is missing coordinates`);r.push(e)}return{nodes:r,links:[...this.links],trends:[...this.trends.values()],pipelines:[...this.pipelines.values()],annotations:[...this.annotations],notes:[...this.notes],accelerators:[...this.accelerators],deaccelerators:[...this.deaccelerators],annotationsBox:this.annotationsBox,axes:{...this.axes},size:this.size}}clear(){this.nodes.clear(),this.links=[],this.trends.clear(),this.pipelines.clear(),this.annotations=[],this.notes=[],this.accelerators=[],this.deaccelerators=[],this.annotationsBox=void 0,this.axes={},this.size=void 0}},f.__name(X,"WardleyBuilder"),X),k=new _t;function K(){return f.getConfig2()["wardley-beta"]}f.__name(K,"getConfig");function Q(o,r,e,g,a,d,m,C,y){k.addNode({id:o,label:r,x:e,y:g,className:a,labelOffsetX:d,labelOffsetY:m,inertia:C,sourceStrategy:y})}f.__name(Q,"addNode");function tt(o,r,e=!1,g,a){k.addLink({source:o,target:r,dashed:e,label:g,flow:a})}f.__name(tt,"addLink");function et(o,r,e){k.addTrend({nodeId:o,targetX:r,targetY:e})}f.__name(et,"addTrend");function at(o,r,e){k.addAnnotation({number:o,coordinates:r,text:e})}f.__name(at,"addAnnotation");function rt(o,r,e){k.addNote({text:o,x:r,y:e})}f.__name(rt,"addNote");function ot(o,r,e){k.addAccelerator({name:o,x:r,y:e})}f.__name(ot,"addAccelerator");function nt(o,r,e){k.addDeaccelerator({name:o,x:r,y:e})}f.__name(nt,"addDeaccelerator");function st(o,r){k.setAnnotationsBox(o,r)}f.__name(st,"setAnnotationsBox");function it(o,r){k.setSize(o,r)}f.__name(it,"setSize");function dt(o){k.startPipeline(o)}f.__name(dt,"startPipeline");function lt(o,r){k.addPipelineComponent(o,r)}f.__name(lt,"addPipelineComponent");function ct(o){k.setAxes(o)}f.__name(ct,"updateAxes");function pt(o){return k.getNode(o)}f.__name(pt,"getNode");function ft(o){return k.resolveNodeId(o)}f.__name(ft,"resolveNodeId");function ht(){return k.build()}f.__name(ht,"getWardleyData");function gt(){k.clear(),f.clear()}f.__name(gt,"clear");var Nt={getConfig:K,addNode:Q,addLink:tt,addTrend:et,addAnnotation:at,addNote:rt,addAccelerator:ot,addDeaccelerator:nt,setAnnotationsBox:st,setSize:it,startPipeline:dt,addPipelineComponent:lt,updateAxes:ct,getNode:pt,resolveNodeId:ft,getWardleyData:ht,clear:gt,setAccTitle:f.setAccTitle,getAccTitle:f.getAccTitle,setDiagramTitle:f.setDiagramTitle,getDiagramTitle:f.getDiagramTitle,getAccDescription:f.getAccDescription,setAccDescription:f.setAccDescription},Tt=["Genesis","Custom Built","Product","Commodity"],At=f.__name(()=>{const{themeVariables:o}=f.getConfig2();return{backgroundColor:o.wardley?.backgroundColor??o.background??"#fff",axisColor:o.wardley?.axisColor??"#000",axisTextColor:o.wardley?.axisTextColor??o.primaryTextColor??"#222",gridColor:o.wardley?.gridColor??"rgba(100, 100, 100, 0.2)",componentFill:o.wardley?.componentFill??"#fff",componentStroke:o.wardley?.componentStroke??"#000",componentLabelColor:o.wardley?.componentLabelColor??o.primaryTextColor??"#222",linkStroke:o.wardley?.linkStroke??"#000",evolutionStroke:o.wardley?.evolutionStroke??"#dc3545",annotationStroke:o.wardley?.annotationStroke??"#000",annotationTextColor:o.wardley?.annotationTextColor??o.primaryTextColor??"#222",annotationFill:o.wardley?.annotationFill??o.background??"#fff"}},"getTheme"),Lt=f.__name(()=>{const o=f.getConfig2()["wardley-beta"];return{width:o?.width??900,height:o?.height??600,padding:o?.padding??48,nodeRadius:o?.nodeRadius??6,nodeLabelOffset:o?.nodeLabelOffset??8,axisFontSize:o?.axisFontSize??12,labelFontSize:o?.labelFontSize??10,showGrid:o?.showGrid??!1,useMaxWidth:o?.useMaxWidth??!0}},"getConfigValues"),zt=f.__name((o,r,e,g)=>{f.log.debug(`Rendering Wardley map
2
2
  `+o);const a=Lt(),d=At(),m=a.nodeRadius*1.6,C=g.db,y=C.getWardleyData(),B=C.getDiagramTitle(),S=y.size?.width??a.width,b=y.size?.height??a.height,E=f.selectSvgElement(r);E.selectAll("*").remove(),f.configureSvgSize(E,b,S,a.useMaxWidth),E.attr("viewBox",`0 0 ${S} ${b}`);const v=E.append("g").attr("class","wardley-map"),G=E.append("defs");G.append("marker").attr("id",`arrow-${r}`).attr("viewBox","0 0 10 10").attr("refX",9).attr("refY",5).attr("markerWidth",6).attr("markerHeight",6).attr("orient","auto-start-reverse").append("path").attr("d","M 0 0 L 10 5 L 0 10 z").attr("fill",d.evolutionStroke).attr("stroke","none"),G.append("marker").attr("id",`link-arrow-end-${r}`).attr("viewBox","0 0 10 10").attr("refX",9).attr("refY",5).attr("markerWidth",5).attr("markerHeight",5).attr("orient","auto").append("path").attr("d","M 0 0 L 10 5 L 0 10 z").attr("fill",d.linkStroke).attr("stroke","none"),G.append("marker").attr("id",`link-arrow-start-${r}`).attr("viewBox","0 0 10 10").attr("refX",1).attr("refY",5).attr("markerWidth",5).attr("markerHeight",5).attr("orient","auto").append("path").attr("d","M 10 0 L 0 5 L 10 10 z").attr("fill",d.linkStroke).attr("stroke","none"),v.append("rect").attr("class","wardley-background").attr("width",S).attr("height",b).attr("fill",d.backgroundColor);const Y=S-a.padding*2,I=b-a.padding*2;B&&v.append("text").attr("class","wardley-title").attr("x",S/2).attr("y",a.padding/2).attr("fill",d.axisTextColor).attr("font-size",a.axisFontSize*1.05).attr("font-weight","bold").attr("text-anchor","middle").attr("dominant-baseline","middle").text(B);const N=f.__name(t=>a.padding+t/100*Y,"projectX"),T=f.__name(t=>b-a.padding-t/100*I,"projectY"),O=v.append("g").attr("class","wardley-axes");O.append("line").attr("x1",a.padding).attr("x2",S-a.padding).attr("y1",b-a.padding).attr("y2",b-a.padding).attr("stroke",d.axisColor).attr("stroke-width",1),O.append("line").attr("x1",a.padding).attr("x2",a.padding).attr("y1",a.padding).attr("y2",b-a.padding).attr("stroke",d.axisColor).attr("stroke-width",1);const xt=y.axes.xLabel??"Evolution",yt=y.axes.yLabel??"Visibility";O.append("text").attr("class","wardley-axis-label wardley-axis-label-x").attr("x",a.padding+Y/2).attr("y",b-a.padding/4).attr("fill",d.axisTextColor).attr("font-size",a.axisFontSize).attr("font-weight","bold").attr("text-anchor","middle").text(xt),O.append("text").attr("class","wardley-axis-label wardley-axis-label-y").attr("x",a.padding/3).attr("y",a.padding+I/2).attr("fill",d.axisTextColor).attr("font-size",a.axisFontSize).attr("font-weight","bold").attr("text-anchor","middle").attr("transform",`rotate(-90 ${a.padding/3} ${a.padding+I/2})`).text(yt);const F=y.axes.stages&&y.axes.stages.length>0?y.axes.stages:Tt;if(F.length>0){const t=v.append("g").attr("class","wardley-stages"),s=y.axes.stageBoundaries,n=[];if(s&&s.length===F.length){let i=0;s.forEach(p=>{n.push({start:i,end:p}),i=p})}else{const i=1/F.length;F.forEach((p,l)=>{n.push({start:l*i,end:(l+1)*i})})}F.forEach((i,p)=>{const l=n[p],h=a.padding+l.start*Y,x=a.padding+l.end*Y,u=(h+x)/2;p>0&&t.append("line").attr("x1",h).attr("x2",h).attr("y1",a.padding).attr("y2",b-a.padding).attr("stroke","#000").attr("stroke-width",1).attr("stroke-dasharray","5 5").attr("opacity",.8),t.append("text").attr("class","wardley-stage-label").attr("x",u).attr("y",b-a.padding/1.5).attr("fill",d.axisTextColor).attr("font-size",a.axisFontSize-2).attr("text-anchor","middle").text(i)})}if(a.showGrid){const t=v.append("g").attr("class","wardley-grid");for(let s=1;s<4;s++){const n=s/4,i=a.padding+Y*n;t.append("line").attr("x1",i).attr("x2",i).attr("y1",a.padding).attr("y2",b-a.padding).attr("stroke",d.gridColor).attr("stroke-dasharray","2 6"),t.append("line").attr("x1",a.padding).attr("x2",S-a.padding).attr("y1",b-a.padding-I*n).attr("y2",b-a.padding-I*n).attr("stroke",d.gridColor).attr("stroke-dasharray","2 6")}}const c=new Map;if(y.nodes.forEach(t=>{c.set(t.id,{x:N(t.x),y:T(t.y),node:t})}),y.pipelines.length>0){const t=v.append("g").attr("class","wardley-pipelines"),s=v.append("g").attr("class","wardley-pipeline-links");y.pipelines.forEach(n=>{if(n.componentIds.length===0)return;const i=n.componentIds.map(x=>({id:x,pos:c.get(x),node:y.nodes.find(u=>u.id===x)})).filter(x=>x.pos&&x.node).sort((x,u)=>x.node.x-u.node.x);for(let x=0;x<i.length-1;x++){const u=i[x],w=i[x+1];s.append("line").attr("class","wardley-pipeline-evolution-link").attr("x1",u.pos.x).attr("y1",u.pos.y).attr("x2",w.pos.x).attr("y2",w.pos.y).attr("stroke",d.linkStroke).attr("stroke-width",1).attr("stroke-dasharray","4 4")}let p=1/0,l=-1/0,h=0;if(n.componentIds.forEach(x=>{const u=c.get(x);u&&(p=Math.min(p,u.x),l=Math.max(l,u.x),h=u.y)}),p!==1/0&&l!==-1/0){const u=a.nodeRadius*4,w=h-u/2,P=c.get(n.nodeId);if(P){const _=(p+l)/2;P.x=_,P.y=w-m/6}t.append("rect").attr("class","wardley-pipeline-box").attr("x",p-15).attr("y",w).attr("width",l-p+30).attr("height",u).attr("fill","none").attr("stroke",d.axisColor).attr("stroke-width",1.5).attr("rx",4).attr("ry",4)}})}const j=v.append("g").attr("class","wardley-links"),V=new Map;y.pipelines.forEach(t=>{V.set(t.nodeId,new Set(t.componentIds))});const Z=y.links.filter(t=>!(!c.has(t.source)||!c.has(t.target)||V.get(t.target)?.has(t.source)));j.selectAll("line").data(Z).enter().append("line").attr("class",t=>`wardley-link${t.dashed?" wardley-link--dashed":""}`).attr("x1",t=>{const s=c.get(t.source),n=c.get(t.target),p=y.nodes.find(u=>u.id===t.source).isPipelineParent?m/Math.sqrt(2):a.nodeRadius,l=n.x-s.x,h=n.y-s.y,x=Math.sqrt(l*l+h*h);return s.x+l/x*p}).attr("y1",t=>{const s=c.get(t.source),n=c.get(t.target),p=y.nodes.find(u=>u.id===t.source).isPipelineParent?m/Math.sqrt(2):a.nodeRadius,l=n.x-s.x,h=n.y-s.y,x=Math.sqrt(l*l+h*h);return s.y+h/x*p}).attr("x2",t=>{const s=c.get(t.source),n=c.get(t.target),p=y.nodes.find(u=>u.id===t.target).isPipelineParent?m/Math.sqrt(2):a.nodeRadius,l=s.x-n.x,h=s.y-n.y,x=Math.sqrt(l*l+h*h);return n.x+l/x*p}).attr("y2",t=>{const s=c.get(t.source),n=c.get(t.target),p=y.nodes.find(u=>u.id===t.target).isPipelineParent?m/Math.sqrt(2):a.nodeRadius,l=s.x-n.x,h=s.y-n.y,x=Math.sqrt(l*l+h*h);return n.y+h/x*p}).attr("stroke",d.linkStroke).attr("stroke-width",1).attr("stroke-dasharray",t=>t.dashed?"6 6":null).attr("marker-end",t=>t.flow==="forward"||t.flow==="bidirectional"?`url(#link-arrow-end-${r})`:null).attr("marker-start",t=>t.flow==="backward"||t.flow==="bidirectional"?`url(#link-arrow-start-${r})`:null),j.selectAll("text").data(Z.filter(t=>t.label)).enter().append("text").attr("class","wardley-link-label").attr("x",t=>{const s=c.get(t.source),n=c.get(t.target),i=(s.x+n.x)/2,p=n.y-s.y,l=n.x-s.x,h=Math.sqrt(l*l+p*p),x=8,u=p/h;return i+u*x}).attr("y",t=>{const s=c.get(t.source),n=c.get(t.target),i=(s.y+n.y)/2,p=n.x-s.x,l=n.y-s.y,h=Math.sqrt(p*p+l*l),x=8,u=-p/h;return i+u*x}).attr("fill",d.axisTextColor).attr("font-size",a.labelFontSize).attr("text-anchor","middle").attr("dominant-baseline","middle").attr("transform",t=>{const s=c.get(t.source),n=c.get(t.target),i=(s.x+n.x)/2,p=(s.y+n.y)/2,l=n.x-s.x,h=n.y-s.y,x=Math.sqrt(l*l+h*h),u=8,w=h/x,P=-l/x,_=i+w*u,R=p+P*u;let z=Math.atan2(h,l)*180/Math.PI;return(z>90||z<-90)&&(z+=180),`rotate(${z} ${_} ${R})`}).text(t=>t.label);const ut=v.append("g").attr("class","wardley-trends"),mt=y.trends.map(t=>{const s=c.get(t.nodeId);if(!s)return null;const n=N(t.targetX),i=T(t.targetY),p=n-s.x,l=i-s.y,h=Math.sqrt(p*p+l*l),x=a.nodeRadius+2,u=h>x?n-p/h*x:n,w=h>x?i-l/h*x:i;return{origin:s,targetX:n,targetY:i,adjustedX2:u,adjustedY2:w}}).filter(t=>t!==null);ut.selectAll("line").data(mt).enter().append("line").attr("class","wardley-trend").attr("x1",t=>t.origin.x).attr("y1",t=>t.origin.y).attr("x2",t=>t.adjustedX2).attr("y2",t=>t.adjustedY2).attr("stroke",d.evolutionStroke).attr("stroke-width",1).attr("stroke-dasharray","4 4").attr("marker-end",`url(#arrow-${r})`);const M=v.append("g").attr("class","wardley-nodes").selectAll("g").data(y.nodes).enter().append("g").attr("class",t=>["wardley-node",t.className?`wardley-node--${t.className}`:""].filter(Boolean).join(" "));M.filter(t=>t.sourceStrategy==="outsource").append("circle").attr("class","wardley-outsource-overlay").attr("cx",t=>c.get(t.id).x).attr("cy",t=>c.get(t.id).y).attr("r",a.nodeRadius*2).attr("fill","#666").attr("stroke",d.componentStroke).attr("stroke-width",1),M.filter(t=>t.sourceStrategy==="buy").append("circle").attr("class","wardley-buy-overlay").attr("cx",t=>c.get(t.id).x).attr("cy",t=>c.get(t.id).y).attr("r",a.nodeRadius*2).attr("fill","#ccc").attr("stroke",d.componentStroke).attr("stroke-width",1),M.filter(t=>t.sourceStrategy==="build").append("circle").attr("class","wardley-build-overlay").attr("cx",t=>c.get(t.id).x).attr("cy",t=>c.get(t.id).y).attr("r",a.nodeRadius*2).attr("fill","#eee").attr("stroke","#000").attr("stroke-width",1);const A=M.filter(t=>t.sourceStrategy==="market");A.append("circle").attr("class","wardley-market-overlay").attr("cx",t=>c.get(t.id).x).attr("cy",t=>c.get(t.id).y).attr("r",a.nodeRadius*2).attr("fill","white").attr("stroke",d.componentStroke).attr("stroke-width",1),M.filter(t=>!t.isPipelineParent&&t.sourceStrategy!=="market"&&t.className!=="anchor").append("circle").attr("cx",t=>c.get(t.id).x).attr("cy",t=>c.get(t.id).y).attr("r",a.nodeRadius).attr("fill",d.componentFill).attr("stroke",d.componentStroke).attr("stroke-width",1);const q=a.nodeRadius*.7,$=a.nodeRadius*1.2;if(A.append("line").attr("class","wardley-market-line").attr("x1",t=>c.get(t.id).x).attr("y1",t=>c.get(t.id).y-$).attr("x2",t=>c.get(t.id).x-$*Math.cos(Math.PI/6)).attr("y2",t=>c.get(t.id).y+$*Math.sin(Math.PI/6)).attr("stroke",d.componentStroke).attr("stroke-width",1),A.append("line").attr("class","wardley-market-line").attr("x1",t=>c.get(t.id).x-$*Math.cos(Math.PI/6)).attr("y1",t=>c.get(t.id).y+$*Math.sin(Math.PI/6)).attr("x2",t=>c.get(t.id).x+$*Math.cos(Math.PI/6)).attr("y2",t=>c.get(t.id).y+$*Math.sin(Math.PI/6)).attr("stroke",d.componentStroke).attr("stroke-width",1),A.append("line").attr("class","wardley-market-line").attr("x1",t=>c.get(t.id).x+$*Math.cos(Math.PI/6)).attr("y1",t=>c.get(t.id).y+$*Math.sin(Math.PI/6)).attr("x2",t=>c.get(t.id).x).attr("y2",t=>c.get(t.id).y-$).attr("stroke",d.componentStroke).attr("stroke-width",1),A.append("circle").attr("class","wardley-market-dot").attr("cx",t=>c.get(t.id).x).attr("cy",t=>c.get(t.id).y-$).attr("r",q).attr("fill","white").attr("stroke",d.componentStroke).attr("stroke-width",2),A.append("circle").attr("class","wardley-market-dot").attr("cx",t=>c.get(t.id).x-$*Math.cos(Math.PI/6)).attr("cy",t=>c.get(t.id).y+$*Math.sin(Math.PI/6)).attr("r",q).attr("fill","white").attr("stroke",d.componentStroke).attr("stroke-width",2),A.append("circle").attr("class","wardley-market-dot").attr("cx",t=>c.get(t.id).x+$*Math.cos(Math.PI/6)).attr("cy",t=>c.get(t.id).y+$*Math.sin(Math.PI/6)).attr("r",q).attr("fill","white").attr("stroke",d.componentStroke).attr("stroke-width",2),M.filter(t=>t.isPipelineParent===!0).append("rect").attr("x",t=>c.get(t.id).x-m/2).attr("y",t=>c.get(t.id).y-m/2).attr("width",m).attr("height",m).attr("fill",d.componentFill).attr("stroke",d.componentStroke).attr("stroke-width",1),M.filter(t=>t.inertia===!0).append("line").attr("class","wardley-inertia").attr("x1",t=>{const s=c.get(t.id);let n=t.isPipelineParent?m/2+15:a.nodeRadius+15;return t.sourceStrategy&&(n+=a.nodeRadius+10),s.x+n}).attr("y1",t=>{const s=c.get(t.id),n=t.isPipelineParent?m:a.nodeRadius*2;return s.y-n/2}).attr("x2",t=>{const s=c.get(t.id);let n=t.isPipelineParent?m/2+15:a.nodeRadius+15;return t.sourceStrategy&&(n+=a.nodeRadius+10),s.x+n}).attr("y2",t=>{const s=c.get(t.id),n=t.isPipelineParent?m:a.nodeRadius*2;return s.y+n/2}).attr("stroke",d.componentStroke).attr("stroke-width",6),M.append("text").attr("x",t=>{const s=c.get(t.id);if(t.className==="anchor")return t.labelOffsetX!==void 0?s.x+t.labelOffsetX:s.x;let n=a.nodeLabelOffset;t.sourceStrategy&&t.labelOffsetX===void 0&&(n+=10);const i=t.labelOffsetX??n;return s.x+i}).attr("y",t=>{const s=c.get(t.id);if(t.className==="anchor")return t.labelOffsetY!==void 0?s.y+t.labelOffsetY:s.y-3;let n=-a.nodeLabelOffset;t.sourceStrategy&&t.labelOffsetY===void 0&&(n-=10);const i=t.labelOffsetY??n;return s.y+i}).attr("class","wardley-node-label").attr("fill",t=>t.className==="evolved"?d.evolutionStroke:t.className==="anchor"?"#000":d.componentLabelColor).attr("font-size",a.labelFontSize).attr("font-weight",t=>t.className==="anchor"?"bold":"normal").attr("text-anchor",t=>t.className==="anchor"?"middle":"start").attr("dominant-baseline",t=>t.className==="anchor"?"middle":"auto").text(t=>t.label),y.annotations.length>0){const t=v.append("g").attr("class","wardley-annotations");if(y.annotations.forEach(s=>{const n=s.coordinates.map(i=>({x:N(i.x),y:T(i.y)}));if(n.length>1)for(let i=0;i<n.length-1;i++)t.append("line").attr("class","wardley-annotation-line").attr("x1",n[i].x).attr("y1",n[i].y).attr("x2",n[i+1].x).attr("y2",n[i+1].y).attr("stroke",d.axisColor).attr("stroke-width",1.5).attr("stroke-dasharray","4 4");n.forEach(i=>{const p=t.append("g").attr("class","wardley-annotation");p.append("circle").attr("cx",i.x).attr("cy",i.y).attr("r",10).attr("fill","white").attr("stroke",d.axisColor).attr("stroke-width",1.5),p.append("text").attr("x",i.x).attr("y",i.y).attr("text-anchor","middle").attr("dominant-baseline","central").attr("font-size",10).attr("fill",d.axisTextColor).attr("font-weight","bold").text(s.number)})}),y.annotationsBox){let s=N(y.annotationsBox.x),n=T(y.annotationsBox.y);const i=10,p=16,l=11,h=t.append("g").attr("class","wardley-annotations-box"),x=[...y.annotations].filter(w=>w.text).sort((w,P)=>w.number-P.number),u=[];if(x.forEach((w,P)=>{const _=h.append("text").attr("x",s+i).attr("y",n+i+(P+1)*p).attr("font-size",l).attr("fill",d.axisTextColor).attr("text-anchor","start").attr("dominant-baseline","middle").text(`${w.number}. ${w.text}`);u.push(_)}),u.length>0){let w=0,P=0;u.forEach(H=>{const W=H.node(),$t=W.getComputedTextLength();w=Math.max(w,$t);const vt=W.getBBox();P=Math.max(P,vt.height)});const _=w+i*2+105,R=x.length*p+i*2+P/2,z=a.padding,wt=S-a.padding-_,kt=a.padding,bt=b-a.padding-R;s=Math.max(z,Math.min(s,wt)),n=Math.max(kt,Math.min(n,bt)),u.forEach((H,W)=>{H.attr("x",s+i).attr("y",n+i+(W+1)*p)}),h.insert("rect","text").attr("x",s).attr("y",n).attr("width",_).attr("height",R).attr("fill","white").attr("stroke",d.axisColor).attr("stroke-width",1.5).attr("rx",4).attr("ry",4)}}}if(y.notes.length>0){const t=v.append("g").attr("class","wardley-notes");y.notes.forEach(s=>{const n=N(s.x),i=T(s.y);t.append("text").attr("x",n).attr("y",i).attr("text-anchor","start").attr("font-size",11).attr("fill",d.axisTextColor).attr("font-weight","bold").text(s.text)})}if(y.accelerators.length>0){const t=v.append("g").attr("class","wardley-accelerators");y.accelerators.forEach(s=>{const n=N(s.x),i=T(s.y),p=60,l=30,h=20,x=`
3
3
  M ${n} ${i-l/2}
4
4
  L ${n+p-h} ${i-l/2}
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("./extractHeadings-lDHB2sBb.cjs"),he=require("./init-CHZsXQcr.cjs"),le=require("./ordinal-CagbB1m8.cjs"),Bt=require("./linear-qqwu6T0F.cjs");function ce(i,t,e){i=+i,t=+t,e=(n=arguments.length)<2?(t=i,i=0,1):n<3?1:+e;for(var s=-1,n=Math.max(0,Math.ceil((t-i)/e))|0,o=new Array(n);++s<n;)o[s]=i+s*e;return o}function At(){var i=le.ordinal().unknown(void 0),t=i.domain,e=i.range,s=0,n=1,o,l,f=!1,d=0,k=0,T=.5;delete i.unknown;function R(){var _=t().length,E=n<s,L=E?n:s,P=E?s:n;o=(P-L)/Math.max(1,_-d+k*2),f&&(o=Math.floor(o)),L+=(P-L-o*(_-d))*T,l=o*(1-d),f&&(L=Math.round(L),l=Math.round(l));var M=ce(_).map(function(m){return L+o*m});return e(E?M.reverse():M)}return i.domain=function(_){return arguments.length?(t(_),R()):t()},i.range=function(_){return arguments.length?([s,n]=_,s=+s,n=+n,R()):[s,n]},i.rangeRound=function(_){return[s,n]=_,s=+s,n=+n,f=!0,R()},i.bandwidth=function(){return l},i.step=function(){return o},i.round=function(_){return arguments.length?(f=!!_,R()):f},i.padding=function(_){return arguments.length?(d=Math.min(1,k=+_),R()):d},i.paddingInner=function(_){return arguments.length?(d=Math.min(1,_),R()):d},i.paddingOuter=function(_){return arguments.length?(k=+_,R()):k},i.align=function(_){return arguments.length?(T=Math.max(0,Math.min(1,_)),R()):T},i.copy=function(){return At(t(),[s,n]).round(f).paddingInner(d).paddingOuter(k).align(T)},he.initRange.apply(R(),arguments)}var wt=(function(){var i=a.__name(function(F,h,u,g){for(u=u||{},g=F.length;g--;u[F[g]]=h);return u},"o"),t=[1,10,12,14,16,18,19,21,23],e=[2,6],s=[1,3],n=[1,5],o=[1,6],l=[1,7],f=[1,5,10,12,14,16,18,19,21,23,36,37,38],d=[1,25],k=[1,26],T=[1,28],R=[1,29],_=[1,30],E=[1,31],L=[1,32],P=[1,33],M=[1,34],m=[1,35],D=[1,36],c=[1,37],V=[1,43],W=[1,42],X=[1,47],Y=[1,50],C=[1,10,12,14,16,18,19,21,23,36,37,38],H=[1,10,12,14,16,18,19,21,23,24,26,28,29,36,37,38],b=[1,10,12,14,16,18,19,21,23,24,26,28,29,36,37,38,42,43,44,45,46,47,48,49,50,51],A=[1,65],B=[26,28],S={trace:a.__name(function(){},"trace"),yy:{},symbols_:{error:2,start:3,eol:4,XYCHART:5,chartConfig:6,document:7,CHART_ORIENTATION:8,statement:9,title:10,text:11,X_AXIS:12,parseXAxis:13,Y_AXIS:14,parseYAxis:15,LINE:16,plotData:17,BAR:18,acc_title:19,acc_title_value:20,acc_descr:21,acc_descr_value:22,acc_descr_multiline_value:23,SQUARE_BRACES_START:24,dataPoints:25,SQUARE_BRACES_END:26,dataPoint:27,COMMA:28,NUMBER_WITH_DECIMAL:29,STR:30,xAxisData:31,bandData:32,ARROW_DELIMITER:33,commaSeparatedTexts:34,yAxisData:35,NEWLINE:36,SEMI:37,EOF:38,alphaNum:39,MD_STR:40,alphaNumToken:41,AMP:42,NUM:43,ALPHA:44,PLUS:45,EQUALS:46,MULT:47,DOT:48,BRKT:49,MINUS:50,UNDERSCORE:51,$accept:0,$end:1},terminals_:{2:"error",5:"XYCHART",8:"CHART_ORIENTATION",10:"title",12:"X_AXIS",14:"Y_AXIS",16:"LINE",18:"BAR",19:"acc_title",20:"acc_title_value",21:"acc_descr",22:"acc_descr_value",23:"acc_descr_multiline_value",24:"SQUARE_BRACES_START",26:"SQUARE_BRACES_END",28:"COMMA",29:"NUMBER_WITH_DECIMAL",30:"STR",33:"ARROW_DELIMITER",36:"NEWLINE",37:"SEMI",38:"EOF",40:"MD_STR",42:"AMP",43:"NUM",44:"ALPHA",45:"PLUS",46:"EQUALS",47:"MULT",48:"DOT",49:"BRKT",50:"MINUS",51:"UNDERSCORE"},productions_:[0,[3,2],[3,3],[3,2],[3,1],[6,1],[7,0],[7,2],[9,2],[9,2],[9,2],[9,2],[9,2],[9,3],[9,2],[9,3],[9,2],[9,2],[9,1],[17,3],[25,3],[25,1],[27,2],[27,1],[13,1],[13,2],[13,1],[31,1],[31,3],[32,3],[34,3],[34,1],[15,1],[15,2],[15,1],[35,3],[4,1],[4,1],[4,1],[11,1],[11,1],[11,1],[39,1],[39,2],[41,1],[41,1],[41,1],[41,1],[41,1],[41,1],[41,1],[41,1],[41,1],[41,1]],performAction:a.__name(function(h,u,g,x,w,r,rt){var p=r.length-1;switch(w){case 5:x.setOrientation(r[p]);break;case 9:x.setDiagramTitle(r[p].text.trim());break;case 12:x.setLineData({text:"",type:"text"},r[p]);break;case 13:x.setLineData(r[p-1],r[p]);break;case 14:x.setBarData({text:"",type:"text"},r[p]);break;case 15:x.setBarData(r[p-1],r[p]);break;case 16:this.$=r[p].trim(),x.setAccTitle(this.$);break;case 17:case 18:this.$=r[p].trim(),x.setAccDescription(this.$);break;case 19:this.$=r[p-1];break;case 20:case 30:this.$=[r[p-2],...r[p]];break;case 21:case 31:this.$=[r[p]];break;case 22:this.$={value:Number(r[p-1]),label:r[p]};break;case 23:this.$={value:Number(r[p]),label:""};break;case 24:x.setXAxisTitle(r[p]);break;case 25:x.setXAxisTitle(r[p-1]);break;case 26:x.setXAxisTitle({type:"text",text:""});break;case 27:x.setXAxisBand(r[p]);break;case 28:x.setXAxisRangeData(Number(r[p-2]),Number(r[p]));break;case 29:this.$=r[p-1];break;case 32:x.setYAxisTitle(r[p]);break;case 33:x.setYAxisTitle(r[p-1]);break;case 34:x.setYAxisTitle({type:"text",text:""});break;case 35:x.setYAxisRangeData(Number(r[p-2]),Number(r[p]));break;case 39:this.$={text:r[p],type:"text"};break;case 40:this.$={text:r[p],type:"text"};break;case 41:this.$={text:r[p],type:"markdown"};break;case 42:this.$=r[p];break;case 43:this.$=r[p-1]+""+r[p];break}},"anonymous"),table:[i(t,e,{3:1,4:2,7:4,5:s,36:n,37:o,38:l}),{1:[3]},i(t,e,{4:2,7:4,3:8,5:s,36:n,37:o,38:l}),i(t,e,{4:2,7:4,6:9,3:10,5:s,8:[1,11],36:n,37:o,38:l}),{1:[2,4],9:12,10:[1,13],12:[1,14],14:[1,15],16:[1,16],18:[1,17],19:[1,18],21:[1,19],23:[1,20]},i(f,[2,36]),i(f,[2,37]),i(f,[2,38]),{1:[2,1]},i(t,e,{4:2,7:4,3:21,5:s,36:n,37:o,38:l}),{1:[2,3]},i(f,[2,5]),i(t,[2,7],{4:22,36:n,37:o,38:l}),{11:23,30:d,39:24,40:k,41:27,42:T,43:R,44:_,45:E,46:L,47:P,48:M,49:m,50:D,51:c},{11:39,13:38,24:V,29:W,30:d,31:40,32:41,39:24,40:k,41:27,42:T,43:R,44:_,45:E,46:L,47:P,48:M,49:m,50:D,51:c},{11:45,15:44,29:X,30:d,35:46,39:24,40:k,41:27,42:T,43:R,44:_,45:E,46:L,47:P,48:M,49:m,50:D,51:c},{11:49,17:48,24:Y,30:d,39:24,40:k,41:27,42:T,43:R,44:_,45:E,46:L,47:P,48:M,49:m,50:D,51:c},{11:52,17:51,24:Y,30:d,39:24,40:k,41:27,42:T,43:R,44:_,45:E,46:L,47:P,48:M,49:m,50:D,51:c},{20:[1,53]},{22:[1,54]},i(C,[2,18]),{1:[2,2]},i(C,[2,8]),i(C,[2,9]),i(H,[2,39],{41:55,42:T,43:R,44:_,45:E,46:L,47:P,48:M,49:m,50:D,51:c}),i(H,[2,40]),i(H,[2,41]),i(b,[2,42]),i(b,[2,44]),i(b,[2,45]),i(b,[2,46]),i(b,[2,47]),i(b,[2,48]),i(b,[2,49]),i(b,[2,50]),i(b,[2,51]),i(b,[2,52]),i(b,[2,53]),i(C,[2,10]),i(C,[2,24],{32:41,31:56,24:V,29:W}),i(C,[2,26]),i(C,[2,27]),{33:[1,57]},{11:59,30:d,34:58,39:24,40:k,41:27,42:T,43:R,44:_,45:E,46:L,47:P,48:M,49:m,50:D,51:c},i(C,[2,11]),i(C,[2,32],{35:60,29:X}),i(C,[2,34]),{33:[1,61]},i(C,[2,12]),{17:62,24:Y},{25:63,27:64,29:A},i(C,[2,14]),{17:66,24:Y},i(C,[2,16]),i(C,[2,17]),i(b,[2,43]),i(C,[2,25]),{29:[1,67]},{26:[1,68]},{26:[2,31],28:[1,69]},i(C,[2,33]),{29:[1,70]},i(C,[2,13]),{26:[1,71]},{26:[2,21],28:[1,72]},i(B,[2,23],{30:[1,73]}),i(C,[2,15]),i(C,[2,28]),i(C,[2,29]),{11:59,30:d,34:74,39:24,40:k,41:27,42:T,43:R,44:_,45:E,46:L,47:P,48:M,49:m,50:D,51:c},i(C,[2,35]),i(C,[2,19]),{25:75,27:64,29:A},i(B,[2,22]),{26:[2,30]},{26:[2,20]}],defaultActions:{8:[2,1],10:[2,3],21:[2,2],74:[2,30],75:[2,20]},parseError:a.__name(function(h,u){if(u.recoverable)this.trace(h);else{var g=new Error(h);throw g.hash=u,g}},"parseError"),parse:a.__name(function(h){var u=this,g=[0],x=[],w=[null],r=[],rt=this.table,p="",gt=0,Mt=0,ne=2,It=1,ae=r.slice.call(arguments,1),v=Object.create(this.lexer),U={yy:{}};for(var mt in this.yy)Object.prototype.hasOwnProperty.call(this.yy,mt)&&(U.yy[mt]=this.yy[mt]);v.setInput(h,U.yy),U.yy.lexer=v,U.yy.parser=this,typeof v.yylloc>"u"&&(v.yylloc={});var yt=v.yylloc;r.push(yt);var oe=v.options&&v.options.ranges;typeof U.yy.parseError=="function"?this.parseError=U.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function re(z){g.length=g.length-2*z,w.length=w.length-z,r.length=r.length-z}a.__name(re,"popStack");function zt(){var z;return z=x.pop()||v.lex()||It,typeof z!="number"&&(z instanceof Array&&(x=z,z=x.pop()),z=u.symbols_[z]||z),z}a.__name(zt,"lex");for(var I,$,O,_t,j={},xt,N,Vt,dt;;){if($=g[g.length-1],this.defaultActions[$]?O=this.defaultActions[$]:((I===null||typeof I>"u")&&(I=zt()),O=rt[$]&&rt[$][I]),typeof O>"u"||!O.length||!O[0]){var bt="";dt=[];for(xt in rt[$])this.terminals_[xt]&&xt>ne&&dt.push("'"+this.terminals_[xt]+"'");v.showPosition?bt="Parse error on line "+(gt+1)+`:
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("./extractHeadings-DgefF9l1.cjs"),he=require("./init-CHZsXQcr.cjs"),le=require("./ordinal-CagbB1m8.cjs"),Bt=require("./linear-D3AJM3sY.cjs");function ce(i,t,e){i=+i,t=+t,e=(n=arguments.length)<2?(t=i,i=0,1):n<3?1:+e;for(var s=-1,n=Math.max(0,Math.ceil((t-i)/e))|0,o=new Array(n);++s<n;)o[s]=i+s*e;return o}function At(){var i=le.ordinal().unknown(void 0),t=i.domain,e=i.range,s=0,n=1,o,l,f=!1,d=0,k=0,T=.5;delete i.unknown;function R(){var _=t().length,E=n<s,L=E?n:s,P=E?s:n;o=(P-L)/Math.max(1,_-d+k*2),f&&(o=Math.floor(o)),L+=(P-L-o*(_-d))*T,l=o*(1-d),f&&(L=Math.round(L),l=Math.round(l));var M=ce(_).map(function(m){return L+o*m});return e(E?M.reverse():M)}return i.domain=function(_){return arguments.length?(t(_),R()):t()},i.range=function(_){return arguments.length?([s,n]=_,s=+s,n=+n,R()):[s,n]},i.rangeRound=function(_){return[s,n]=_,s=+s,n=+n,f=!0,R()},i.bandwidth=function(){return l},i.step=function(){return o},i.round=function(_){return arguments.length?(f=!!_,R()):f},i.padding=function(_){return arguments.length?(d=Math.min(1,k=+_),R()):d},i.paddingInner=function(_){return arguments.length?(d=Math.min(1,_),R()):d},i.paddingOuter=function(_){return arguments.length?(k=+_,R()):k},i.align=function(_){return arguments.length?(T=Math.max(0,Math.min(1,_)),R()):T},i.copy=function(){return At(t(),[s,n]).round(f).paddingInner(d).paddingOuter(k).align(T)},he.initRange.apply(R(),arguments)}var wt=(function(){var i=a.__name(function(F,h,u,g){for(u=u||{},g=F.length;g--;u[F[g]]=h);return u},"o"),t=[1,10,12,14,16,18,19,21,23],e=[2,6],s=[1,3],n=[1,5],o=[1,6],l=[1,7],f=[1,5,10,12,14,16,18,19,21,23,36,37,38],d=[1,25],k=[1,26],T=[1,28],R=[1,29],_=[1,30],E=[1,31],L=[1,32],P=[1,33],M=[1,34],m=[1,35],D=[1,36],c=[1,37],V=[1,43],W=[1,42],X=[1,47],Y=[1,50],C=[1,10,12,14,16,18,19,21,23,36,37,38],H=[1,10,12,14,16,18,19,21,23,24,26,28,29,36,37,38],b=[1,10,12,14,16,18,19,21,23,24,26,28,29,36,37,38,42,43,44,45,46,47,48,49,50,51],A=[1,65],B=[26,28],S={trace:a.__name(function(){},"trace"),yy:{},symbols_:{error:2,start:3,eol:4,XYCHART:5,chartConfig:6,document:7,CHART_ORIENTATION:8,statement:9,title:10,text:11,X_AXIS:12,parseXAxis:13,Y_AXIS:14,parseYAxis:15,LINE:16,plotData:17,BAR:18,acc_title:19,acc_title_value:20,acc_descr:21,acc_descr_value:22,acc_descr_multiline_value:23,SQUARE_BRACES_START:24,dataPoints:25,SQUARE_BRACES_END:26,dataPoint:27,COMMA:28,NUMBER_WITH_DECIMAL:29,STR:30,xAxisData:31,bandData:32,ARROW_DELIMITER:33,commaSeparatedTexts:34,yAxisData:35,NEWLINE:36,SEMI:37,EOF:38,alphaNum:39,MD_STR:40,alphaNumToken:41,AMP:42,NUM:43,ALPHA:44,PLUS:45,EQUALS:46,MULT:47,DOT:48,BRKT:49,MINUS:50,UNDERSCORE:51,$accept:0,$end:1},terminals_:{2:"error",5:"XYCHART",8:"CHART_ORIENTATION",10:"title",12:"X_AXIS",14:"Y_AXIS",16:"LINE",18:"BAR",19:"acc_title",20:"acc_title_value",21:"acc_descr",22:"acc_descr_value",23:"acc_descr_multiline_value",24:"SQUARE_BRACES_START",26:"SQUARE_BRACES_END",28:"COMMA",29:"NUMBER_WITH_DECIMAL",30:"STR",33:"ARROW_DELIMITER",36:"NEWLINE",37:"SEMI",38:"EOF",40:"MD_STR",42:"AMP",43:"NUM",44:"ALPHA",45:"PLUS",46:"EQUALS",47:"MULT",48:"DOT",49:"BRKT",50:"MINUS",51:"UNDERSCORE"},productions_:[0,[3,2],[3,3],[3,2],[3,1],[6,1],[7,0],[7,2],[9,2],[9,2],[9,2],[9,2],[9,2],[9,3],[9,2],[9,3],[9,2],[9,2],[9,1],[17,3],[25,3],[25,1],[27,2],[27,1],[13,1],[13,2],[13,1],[31,1],[31,3],[32,3],[34,3],[34,1],[15,1],[15,2],[15,1],[35,3],[4,1],[4,1],[4,1],[11,1],[11,1],[11,1],[39,1],[39,2],[41,1],[41,1],[41,1],[41,1],[41,1],[41,1],[41,1],[41,1],[41,1],[41,1]],performAction:a.__name(function(h,u,g,x,w,r,rt){var p=r.length-1;switch(w){case 5:x.setOrientation(r[p]);break;case 9:x.setDiagramTitle(r[p].text.trim());break;case 12:x.setLineData({text:"",type:"text"},r[p]);break;case 13:x.setLineData(r[p-1],r[p]);break;case 14:x.setBarData({text:"",type:"text"},r[p]);break;case 15:x.setBarData(r[p-1],r[p]);break;case 16:this.$=r[p].trim(),x.setAccTitle(this.$);break;case 17:case 18:this.$=r[p].trim(),x.setAccDescription(this.$);break;case 19:this.$=r[p-1];break;case 20:case 30:this.$=[r[p-2],...r[p]];break;case 21:case 31:this.$=[r[p]];break;case 22:this.$={value:Number(r[p-1]),label:r[p]};break;case 23:this.$={value:Number(r[p]),label:""};break;case 24:x.setXAxisTitle(r[p]);break;case 25:x.setXAxisTitle(r[p-1]);break;case 26:x.setXAxisTitle({type:"text",text:""});break;case 27:x.setXAxisBand(r[p]);break;case 28:x.setXAxisRangeData(Number(r[p-2]),Number(r[p]));break;case 29:this.$=r[p-1];break;case 32:x.setYAxisTitle(r[p]);break;case 33:x.setYAxisTitle(r[p-1]);break;case 34:x.setYAxisTitle({type:"text",text:""});break;case 35:x.setYAxisRangeData(Number(r[p-2]),Number(r[p]));break;case 39:this.$={text:r[p],type:"text"};break;case 40:this.$={text:r[p],type:"text"};break;case 41:this.$={text:r[p],type:"markdown"};break;case 42:this.$=r[p];break;case 43:this.$=r[p-1]+""+r[p];break}},"anonymous"),table:[i(t,e,{3:1,4:2,7:4,5:s,36:n,37:o,38:l}),{1:[3]},i(t,e,{4:2,7:4,3:8,5:s,36:n,37:o,38:l}),i(t,e,{4:2,7:4,6:9,3:10,5:s,8:[1,11],36:n,37:o,38:l}),{1:[2,4],9:12,10:[1,13],12:[1,14],14:[1,15],16:[1,16],18:[1,17],19:[1,18],21:[1,19],23:[1,20]},i(f,[2,36]),i(f,[2,37]),i(f,[2,38]),{1:[2,1]},i(t,e,{4:2,7:4,3:21,5:s,36:n,37:o,38:l}),{1:[2,3]},i(f,[2,5]),i(t,[2,7],{4:22,36:n,37:o,38:l}),{11:23,30:d,39:24,40:k,41:27,42:T,43:R,44:_,45:E,46:L,47:P,48:M,49:m,50:D,51:c},{11:39,13:38,24:V,29:W,30:d,31:40,32:41,39:24,40:k,41:27,42:T,43:R,44:_,45:E,46:L,47:P,48:M,49:m,50:D,51:c},{11:45,15:44,29:X,30:d,35:46,39:24,40:k,41:27,42:T,43:R,44:_,45:E,46:L,47:P,48:M,49:m,50:D,51:c},{11:49,17:48,24:Y,30:d,39:24,40:k,41:27,42:T,43:R,44:_,45:E,46:L,47:P,48:M,49:m,50:D,51:c},{11:52,17:51,24:Y,30:d,39:24,40:k,41:27,42:T,43:R,44:_,45:E,46:L,47:P,48:M,49:m,50:D,51:c},{20:[1,53]},{22:[1,54]},i(C,[2,18]),{1:[2,2]},i(C,[2,8]),i(C,[2,9]),i(H,[2,39],{41:55,42:T,43:R,44:_,45:E,46:L,47:P,48:M,49:m,50:D,51:c}),i(H,[2,40]),i(H,[2,41]),i(b,[2,42]),i(b,[2,44]),i(b,[2,45]),i(b,[2,46]),i(b,[2,47]),i(b,[2,48]),i(b,[2,49]),i(b,[2,50]),i(b,[2,51]),i(b,[2,52]),i(b,[2,53]),i(C,[2,10]),i(C,[2,24],{32:41,31:56,24:V,29:W}),i(C,[2,26]),i(C,[2,27]),{33:[1,57]},{11:59,30:d,34:58,39:24,40:k,41:27,42:T,43:R,44:_,45:E,46:L,47:P,48:M,49:m,50:D,51:c},i(C,[2,11]),i(C,[2,32],{35:60,29:X}),i(C,[2,34]),{33:[1,61]},i(C,[2,12]),{17:62,24:Y},{25:63,27:64,29:A},i(C,[2,14]),{17:66,24:Y},i(C,[2,16]),i(C,[2,17]),i(b,[2,43]),i(C,[2,25]),{29:[1,67]},{26:[1,68]},{26:[2,31],28:[1,69]},i(C,[2,33]),{29:[1,70]},i(C,[2,13]),{26:[1,71]},{26:[2,21],28:[1,72]},i(B,[2,23],{30:[1,73]}),i(C,[2,15]),i(C,[2,28]),i(C,[2,29]),{11:59,30:d,34:74,39:24,40:k,41:27,42:T,43:R,44:_,45:E,46:L,47:P,48:M,49:m,50:D,51:c},i(C,[2,35]),i(C,[2,19]),{25:75,27:64,29:A},i(B,[2,22]),{26:[2,30]},{26:[2,20]}],defaultActions:{8:[2,1],10:[2,3],21:[2,2],74:[2,30],75:[2,20]},parseError:a.__name(function(h,u){if(u.recoverable)this.trace(h);else{var g=new Error(h);throw g.hash=u,g}},"parseError"),parse:a.__name(function(h){var u=this,g=[0],x=[],w=[null],r=[],rt=this.table,p="",gt=0,Mt=0,ne=2,It=1,ae=r.slice.call(arguments,1),v=Object.create(this.lexer),U={yy:{}};for(var mt in this.yy)Object.prototype.hasOwnProperty.call(this.yy,mt)&&(U.yy[mt]=this.yy[mt]);v.setInput(h,U.yy),U.yy.lexer=v,U.yy.parser=this,typeof v.yylloc>"u"&&(v.yylloc={});var yt=v.yylloc;r.push(yt);var oe=v.options&&v.options.ranges;typeof U.yy.parseError=="function"?this.parseError=U.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function re(z){g.length=g.length-2*z,w.length=w.length-z,r.length=r.length-z}a.__name(re,"popStack");function zt(){var z;return z=x.pop()||v.lex()||It,typeof z!="number"&&(z instanceof Array&&(x=z,z=x.pop()),z=u.symbols_[z]||z),z}a.__name(zt,"lex");for(var I,$,O,_t,j={},xt,N,Vt,dt;;){if($=g[g.length-1],this.defaultActions[$]?O=this.defaultActions[$]:((I===null||typeof I>"u")&&(I=zt()),O=rt[$]&&rt[$][I]),typeof O>"u"||!O.length||!O[0]){var bt="";dt=[];for(xt in rt[$])this.terminals_[xt]&&xt>ne&&dt.push("'"+this.terminals_[xt]+"'");v.showPosition?bt="Parse error on line "+(gt+1)+`:
2
2
  `+v.showPosition()+`
3
3
  Expecting `+dt.join(", ")+", got '"+(this.terminals_[I]||I)+"'":bt="Parse error on line "+(gt+1)+": Unexpected "+(I==It?"end of input":"'"+(this.terminals_[I]||I)+"'"),this.parseError(bt,{text:v.match,token:this.terminals_[I]||I,line:v.yylineno,loc:yt,expected:dt})}if(O[0]instanceof Array&&O.length>1)throw new Error("Parse Error: multiple actions possible at state: "+$+", token: "+I);switch(O[0]){case 1:g.push(I),w.push(v.yytext),r.push(v.yylloc),g.push(O[1]),I=null,Mt=v.yyleng,p=v.yytext,gt=v.yylineno,yt=v.yylloc;break;case 2:if(N=this.productions_[O[1]][1],j.$=w[w.length-N],j._$={first_line:r[r.length-(N||1)].first_line,last_line:r[r.length-1].last_line,first_column:r[r.length-(N||1)].first_column,last_column:r[r.length-1].last_column},oe&&(j._$.range=[r[r.length-(N||1)].range[0],r[r.length-1].range[1]]),_t=this.performAction.apply(j,[p,Mt,gt,U.yy,O[1],w,r].concat(ae)),typeof _t<"u")return _t;N&&(g=g.slice(0,-1*N*2),w=w.slice(0,-1*N),r=r.slice(0,-1*N)),g.push(this.productions_[O[1]][0]),w.push(j.$),r.push(j._$),Vt=rt[g[g.length-2]][g[g.length-1]],g.push(Vt);break;case 3:return!0}}return!0},"parse")},ot=(function(){var F={EOF:1,parseError:a.__name(function(u,g){if(this.yy.parser)this.yy.parser.parseError(u,g);else throw new Error(u)},"parseError"),setInput:a.__name(function(h,u){return this.yy=u||this.yy||{},this._input=h,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:a.__name(function(){var h=this._input[0];this.yytext+=h,this.yyleng++,this.offset++,this.match+=h,this.matched+=h;var u=h.match(/(?:\r\n?|\n).*/g);return u?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),h},"input"),unput:a.__name(function(h){var u=h.length,g=h.split(/(?:\r\n?|\n)/g);this._input=h+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-u),this.offset-=u;var x=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),g.length-1&&(this.yylineno-=g.length-1);var w=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:g?(g.length===x.length?this.yylloc.first_column:0)+x[x.length-g.length].length-g[0].length:this.yylloc.first_column-u},this.options.ranges&&(this.yylloc.range=[w[0],w[0]+this.yyleng-u]),this.yyleng=this.yytext.length,this},"unput"),more:a.__name(function(){return this._more=!0,this},"more"),reject:a.__name(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
4
4
  `+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:a.__name(function(h){this.unput(this.match.slice(h))},"less"),pastInput:a.__name(function(){var h=this.matched.substr(0,this.matched.length-this.match.length);return(h.length>20?"...":"")+h.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:a.__name(function(){var h=this.match;return h.length<20&&(h+=this._input.substr(0,20-h.length)),(h.substr(0,20)+(h.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:a.__name(function(){var h=this.pastInput(),u=new Array(h.length+1).join("-");return h+this.upcomingInput()+`
@@ -1,7 +1,7 @@
1
- import { O as xi, Q as di, ae as Yt, ad as fi, U as pi, V as mi, _ as n, $ as Nt, as as yi, a0 as bi, aj as Ai, an as kt, a3 as wi, ap as Ht, aq as Ci, at as Si, bj as Ri, aB as Ot } from "./extractHeadings-CGJexznE.js";
1
+ import { y as xi, z as di, a6 as Yt, a5 as fi, A as pi, G as mi, _ as n, O as Nt, ak as yi, Q as bi, ab as Ai, af as kt, V as wi, ah as Ht, ai as Ci, al as Si, bb as Ri, at as Ot } from "./extractHeadings-B2pUyEPa.js";
2
2
  import { i as _i } from "./init-DjUOC4st.js";
3
3
  import { o as ki } from "./ordinal-B6-f3MAq.js";
4
- import { l as Wt } from "./linear-Cf8i6Rsk.js";
4
+ import { l as Wt } from "./linear-DI9P_z72.js";
5
5
  function Ti(e, t, i) {
6
6
  e = +e, t = +t, i = (a = arguments.length) < 2 ? (t = e, e = 0, 1) : a < 3 ? 1 : +i;
7
7
  for (var s = -1, a = Math.max(0, Math.ceil((t - e) / i)) | 0, o = new Array(a); ++s < a; )
@@ -47,7 +47,7 @@ var Ct = (function() {
47
47
  var e = /* @__PURE__ */ n(function(F, h, u, g) {
48
48
  for (u = u || {}, g = F.length; g--; u[F[g]] = h) ;
49
49
  return u;
50
- }, "o"), t = [1, 10, 12, 14, 16, 18, 19, 21, 23], i = [2, 6], s = [1, 3], a = [1, 5], o = [1, 6], l = [1, 7], f = [1, 5, 10, 12, 14, 16, 18, 19, 21, 23, 36, 37, 38], d = [1, 25], k = [1, 26], T = [1, 28], _ = [1, 29], b = [1, 30], E = [1, 31], L = [1, 32], P = [1, 33], I = [1, 34], m = [1, 35], D = [1, 36], c = [1, 37], z = [1, 43], W = [1, 42], X = [1, 47], Y = [1, 50], S = [1, 10, 12, 14, 16, 18, 19, 21, 23, 36, 37, 38], H = [1, 10, 12, 14, 16, 18, 19, 21, 23, 24, 26, 28, 29, 36, 37, 38], A = [1, 10, 12, 14, 16, 18, 19, 21, 23, 24, 26, 28, 29, 36, 37, 38, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51], w = [1, 65], B = [26, 28], R = {
50
+ }, "o"), t = [1, 10, 12, 14, 16, 18, 19, 21, 23], i = [2, 6], s = [1, 3], a = [1, 5], o = [1, 6], l = [1, 7], f = [1, 5, 10, 12, 14, 16, 18, 19, 21, 23, 36, 37, 38], d = [1, 25], k = [1, 26], T = [1, 28], _ = [1, 29], b = [1, 30], E = [1, 31], L = [1, 32], P = [1, 33], I = [1, 34], m = [1, 35], D = [1, 36], c = [1, 37], V = [1, 43], W = [1, 42], X = [1, 47], Y = [1, 50], S = [1, 10, 12, 14, 16, 18, 19, 21, 23, 36, 37, 38], H = [1, 10, 12, 14, 16, 18, 19, 21, 23, 24, 26, 28, 29, 36, 37, 38], A = [1, 10, 12, 14, 16, 18, 19, 21, 23, 24, 26, 28, 29, 36, 37, 38, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51], w = [1, 65], B = [26, 28], R = {
51
51
  trace: /* @__PURE__ */ n(function() {
52
52
  }, "trace"),
53
53
  yy: {},
@@ -146,7 +146,7 @@ var Ct = (function() {
146
146
  break;
147
147
  }
148
148
  }, "anonymous"),
149
- table: [e(t, i, { 3: 1, 4: 2, 7: 4, 5: s, 36: a, 37: o, 38: l }), { 1: [3] }, e(t, i, { 4: 2, 7: 4, 3: 8, 5: s, 36: a, 37: o, 38: l }), e(t, i, { 4: 2, 7: 4, 6: 9, 3: 10, 5: s, 8: [1, 11], 36: a, 37: o, 38: l }), { 1: [2, 4], 9: 12, 10: [1, 13], 12: [1, 14], 14: [1, 15], 16: [1, 16], 18: [1, 17], 19: [1, 18], 21: [1, 19], 23: [1, 20] }, e(f, [2, 36]), e(f, [2, 37]), e(f, [2, 38]), { 1: [2, 1] }, e(t, i, { 4: 2, 7: 4, 3: 21, 5: s, 36: a, 37: o, 38: l }), { 1: [2, 3] }, e(f, [2, 5]), e(t, [2, 7], { 4: 22, 36: a, 37: o, 38: l }), { 11: 23, 30: d, 39: 24, 40: k, 41: 27, 42: T, 43: _, 44: b, 45: E, 46: L, 47: P, 48: I, 49: m, 50: D, 51: c }, { 11: 39, 13: 38, 24: z, 29: W, 30: d, 31: 40, 32: 41, 39: 24, 40: k, 41: 27, 42: T, 43: _, 44: b, 45: E, 46: L, 47: P, 48: I, 49: m, 50: D, 51: c }, { 11: 45, 15: 44, 29: X, 30: d, 35: 46, 39: 24, 40: k, 41: 27, 42: T, 43: _, 44: b, 45: E, 46: L, 47: P, 48: I, 49: m, 50: D, 51: c }, { 11: 49, 17: 48, 24: Y, 30: d, 39: 24, 40: k, 41: 27, 42: T, 43: _, 44: b, 45: E, 46: L, 47: P, 48: I, 49: m, 50: D, 51: c }, { 11: 52, 17: 51, 24: Y, 30: d, 39: 24, 40: k, 41: 27, 42: T, 43: _, 44: b, 45: E, 46: L, 47: P, 48: I, 49: m, 50: D, 51: c }, { 20: [1, 53] }, { 22: [1, 54] }, e(S, [2, 18]), { 1: [2, 2] }, e(S, [2, 8]), e(S, [2, 9]), e(H, [2, 39], { 41: 55, 42: T, 43: _, 44: b, 45: E, 46: L, 47: P, 48: I, 49: m, 50: D, 51: c }), e(H, [2, 40]), e(H, [2, 41]), e(A, [2, 42]), e(A, [2, 44]), e(A, [2, 45]), e(A, [2, 46]), e(A, [2, 47]), e(A, [2, 48]), e(A, [2, 49]), e(A, [2, 50]), e(A, [2, 51]), e(A, [2, 52]), e(A, [2, 53]), e(S, [2, 10]), e(S, [2, 24], { 32: 41, 31: 56, 24: z, 29: W }), e(S, [2, 26]), e(S, [2, 27]), { 33: [1, 57] }, { 11: 59, 30: d, 34: 58, 39: 24, 40: k, 41: 27, 42: T, 43: _, 44: b, 45: E, 46: L, 47: P, 48: I, 49: m, 50: D, 51: c }, e(S, [2, 11]), e(S, [2, 32], { 35: 60, 29: X }), e(S, [2, 34]), { 33: [1, 61] }, e(S, [2, 12]), { 17: 62, 24: Y }, { 25: 63, 27: 64, 29: w }, e(S, [2, 14]), { 17: 66, 24: Y }, e(S, [2, 16]), e(S, [2, 17]), e(A, [2, 43]), e(S, [2, 25]), { 29: [1, 67] }, { 26: [1, 68] }, { 26: [2, 31], 28: [1, 69] }, e(S, [2, 33]), { 29: [1, 70] }, e(S, [2, 13]), { 26: [1, 71] }, { 26: [2, 21], 28: [1, 72] }, e(B, [2, 23], { 30: [1, 73] }), e(S, [2, 15]), e(S, [2, 28]), e(S, [2, 29]), { 11: 59, 30: d, 34: 74, 39: 24, 40: k, 41: 27, 42: T, 43: _, 44: b, 45: E, 46: L, 47: P, 48: I, 49: m, 50: D, 51: c }, e(S, [2, 35]), e(S, [2, 19]), { 25: 75, 27: 64, 29: w }, e(B, [2, 22]), { 26: [2, 30] }, { 26: [2, 20] }],
149
+ table: [e(t, i, { 3: 1, 4: 2, 7: 4, 5: s, 36: a, 37: o, 38: l }), { 1: [3] }, e(t, i, { 4: 2, 7: 4, 3: 8, 5: s, 36: a, 37: o, 38: l }), e(t, i, { 4: 2, 7: 4, 6: 9, 3: 10, 5: s, 8: [1, 11], 36: a, 37: o, 38: l }), { 1: [2, 4], 9: 12, 10: [1, 13], 12: [1, 14], 14: [1, 15], 16: [1, 16], 18: [1, 17], 19: [1, 18], 21: [1, 19], 23: [1, 20] }, e(f, [2, 36]), e(f, [2, 37]), e(f, [2, 38]), { 1: [2, 1] }, e(t, i, { 4: 2, 7: 4, 3: 21, 5: s, 36: a, 37: o, 38: l }), { 1: [2, 3] }, e(f, [2, 5]), e(t, [2, 7], { 4: 22, 36: a, 37: o, 38: l }), { 11: 23, 30: d, 39: 24, 40: k, 41: 27, 42: T, 43: _, 44: b, 45: E, 46: L, 47: P, 48: I, 49: m, 50: D, 51: c }, { 11: 39, 13: 38, 24: V, 29: W, 30: d, 31: 40, 32: 41, 39: 24, 40: k, 41: 27, 42: T, 43: _, 44: b, 45: E, 46: L, 47: P, 48: I, 49: m, 50: D, 51: c }, { 11: 45, 15: 44, 29: X, 30: d, 35: 46, 39: 24, 40: k, 41: 27, 42: T, 43: _, 44: b, 45: E, 46: L, 47: P, 48: I, 49: m, 50: D, 51: c }, { 11: 49, 17: 48, 24: Y, 30: d, 39: 24, 40: k, 41: 27, 42: T, 43: _, 44: b, 45: E, 46: L, 47: P, 48: I, 49: m, 50: D, 51: c }, { 11: 52, 17: 51, 24: Y, 30: d, 39: 24, 40: k, 41: 27, 42: T, 43: _, 44: b, 45: E, 46: L, 47: P, 48: I, 49: m, 50: D, 51: c }, { 20: [1, 53] }, { 22: [1, 54] }, e(S, [2, 18]), { 1: [2, 2] }, e(S, [2, 8]), e(S, [2, 9]), e(H, [2, 39], { 41: 55, 42: T, 43: _, 44: b, 45: E, 46: L, 47: P, 48: I, 49: m, 50: D, 51: c }), e(H, [2, 40]), e(H, [2, 41]), e(A, [2, 42]), e(A, [2, 44]), e(A, [2, 45]), e(A, [2, 46]), e(A, [2, 47]), e(A, [2, 48]), e(A, [2, 49]), e(A, [2, 50]), e(A, [2, 51]), e(A, [2, 52]), e(A, [2, 53]), e(S, [2, 10]), e(S, [2, 24], { 32: 41, 31: 56, 24: V, 29: W }), e(S, [2, 26]), e(S, [2, 27]), { 33: [1, 57] }, { 11: 59, 30: d, 34: 58, 39: 24, 40: k, 41: 27, 42: T, 43: _, 44: b, 45: E, 46: L, 47: P, 48: I, 49: m, 50: D, 51: c }, e(S, [2, 11]), e(S, [2, 32], { 35: 60, 29: X }), e(S, [2, 34]), { 33: [1, 61] }, e(S, [2, 12]), { 17: 62, 24: Y }, { 25: 63, 27: 64, 29: w }, e(S, [2, 14]), { 17: 66, 24: Y }, e(S, [2, 16]), e(S, [2, 17]), e(A, [2, 43]), e(S, [2, 25]), { 29: [1, 67] }, { 26: [1, 68] }, { 26: [2, 31], 28: [1, 69] }, e(S, [2, 33]), { 29: [1, 70] }, e(S, [2, 13]), { 26: [1, 71] }, { 26: [2, 21], 28: [1, 72] }, e(B, [2, 23], { 30: [1, 73] }), e(S, [2, 15]), e(S, [2, 28]), e(S, [2, 29]), { 11: 59, 30: d, 34: 74, 39: 24, 40: k, 41: 27, 42: T, 43: _, 44: b, 45: E, 46: L, 47: P, 48: I, 49: m, 50: D, 51: c }, e(S, [2, 35]), e(S, [2, 19]), { 25: 75, 27: 64, 29: w }, e(B, [2, 22]), { 26: [2, 30] }, { 26: [2, 20] }],
150
150
  defaultActions: { 8: [2, 1], 10: [2, 3], 21: [2, 2], 74: [2, 30], 75: [2, 20] },
151
151
  parseError: /* @__PURE__ */ n(function(h, u) {
152
152
  if (u.recoverable)
@@ -157,7 +157,7 @@ var Ct = (function() {
157
157
  }
158
158
  }, "parseError"),
159
159
  parse: /* @__PURE__ */ n(function(h) {
160
- var u = this, g = [0], x = [], C = [null], r = [], rt = this.table, p = "", gt = 0, Mt = 0, li = 2, Vt = 1, ci = r.slice.call(arguments, 1), v = Object.create(this.lexer), U = { yy: {} };
160
+ var u = this, g = [0], x = [], C = [null], r = [], rt = this.table, p = "", gt = 0, Mt = 0, li = 2, zt = 1, ci = r.slice.call(arguments, 1), v = Object.create(this.lexer), U = { yy: {} };
161
161
  for (var mt in this.yy)
162
162
  Object.prototype.hasOwnProperty.call(this.yy, mt) && (U.yy[mt] = this.yy[mt]);
163
163
  v.setInput(h, U.yy), U.yy.lexer = v, U.yy.parser = this, typeof v.yylloc > "u" && (v.yylloc = {});
@@ -165,24 +165,24 @@ var Ct = (function() {
165
165
  r.push(yt);
166
166
  var ui = v.options && v.options.ranges;
167
167
  typeof U.yy.parseError == "function" ? this.parseError = U.yy.parseError : this.parseError = Object.getPrototypeOf(this).parseError;
168
- function gi(V) {
169
- g.length = g.length - 2 * V, C.length = C.length - V, r.length = r.length - V;
168
+ function gi(z) {
169
+ g.length = g.length - 2 * z, C.length = C.length - z, r.length = r.length - z;
170
170
  }
171
171
  n(gi, "popStack");
172
- function zt() {
173
- var V;
174
- return V = x.pop() || v.lex() || Vt, typeof V != "number" && (V instanceof Array && (x = V, V = x.pop()), V = u.symbols_[V] || V), V;
172
+ function Vt() {
173
+ var z;
174
+ return z = x.pop() || v.lex() || zt, typeof z != "number" && (z instanceof Array && (x = z, z = x.pop()), z = u.symbols_[z] || z), z;
175
175
  }
176
- n(zt, "lex");
176
+ n(Vt, "lex");
177
177
  for (var M, $, O, bt, q = {}, xt, N, Bt, dt; ; ) {
178
- if ($ = g[g.length - 1], this.defaultActions[$] ? O = this.defaultActions[$] : ((M === null || typeof M > "u") && (M = zt()), O = rt[$] && rt[$][M]), typeof O > "u" || !O.length || !O[0]) {
178
+ if ($ = g[g.length - 1], this.defaultActions[$] ? O = this.defaultActions[$] : ((M === null || typeof M > "u") && (M = Vt()), O = rt[$] && rt[$][M]), typeof O > "u" || !O.length || !O[0]) {
179
179
  var At = "";
180
180
  dt = [];
181
181
  for (xt in rt[$])
182
182
  this.terminals_[xt] && xt > li && dt.push("'" + this.terminals_[xt] + "'");
183
183
  v.showPosition ? At = "Parse error on line " + (gt + 1) + `:
184
184
  ` + v.showPosition() + `
185
- Expecting ` + dt.join(", ") + ", got '" + (this.terminals_[M] || M) + "'" : At = "Parse error on line " + (gt + 1) + ": Unexpected " + (M == Vt ? "end of input" : "'" + (this.terminals_[M] || M) + "'"), this.parseError(At, {
185
+ Expecting ` + dt.join(", ") + ", got '" + (this.terminals_[M] || M) + "'" : At = "Parse error on line " + (gt + 1) + ": Unexpected " + (M == zt ? "end of input" : "'" + (this.terminals_[M] || M) + "'"), this.parseError(At, {
186
186
  text: v.match,
187
187
  token: this.terminals_[M] || M,
188
188
  line: v.yylineno,
@@ -502,10 +502,10 @@ Expecting ` + dt.join(", ") + ", got '" + (this.terminals_[M] || M) + "'" : At =
502
502
  return F;
503
503
  })();
504
504
  R.lexer = ot;
505
- function j() {
505
+ function G() {
506
506
  this.yy = {};
507
507
  }
508
- return n(j, "Parser"), j.prototype = R, R.Parser = j, new j();
508
+ return n(G, "Parser"), G.prototype = R, R.Parser = G, new G();
509
509
  })();
510
510
  Ct.parser = Ct;
511
511
  var Di = Ct;
@@ -517,10 +517,10 @@ function ft(e) {
517
517
  return e.type === "band";
518
518
  }
519
519
  n(ft, "isBandAxisData");
520
- function G(e) {
520
+ function j(e) {
521
521
  return e.type === "linear";
522
522
  }
523
- n(G, "isLinearAxisData");
523
+ n(j, "isLinearAxisData");
524
524
  var Q, Ut = (Q = class {
525
525
  constructor(t) {
526
526
  this.parentGroup = t;
@@ -891,11 +891,11 @@ var tt, Pi = (tt = class {
891
891
  }), t;
892
892
  }
893
893
  }, n(tt, "ChartTitle"), tt);
894
- function jt(e, t, i, s) {
894
+ function Gt(e, t, i, s) {
895
895
  const a = new Ut(s);
896
896
  return new Pi(a, e, t, i);
897
897
  }
898
- n(jt, "getChartTitleComponent");
898
+ n(Gt, "getChartTitleComponent");
899
899
  var it, Ei = (it = class {
900
900
  constructor(t, i, s, a, o) {
901
901
  this.plotData = t, this.xAxis = i, this.yAxis = s, this.orientation = a, this.plotIndex = o;
@@ -1052,10 +1052,10 @@ function qt(e, t, i) {
1052
1052
  return new Mi(e, t, i);
1053
1053
  }
1054
1054
  n(qt, "getPlotComponent");
1055
- var at, Vi = (at = class {
1055
+ var at, zi = (at = class {
1056
1056
  constructor(t, i, s, a) {
1057
1057
  this.chartConfig = t, this.chartData = i, this.componentStore = {
1058
- title: jt(t, i, s, a),
1058
+ title: Gt(t, i, s, a),
1059
1059
  plot: qt(t, i, s),
1060
1060
  xAxis: Rt(
1061
1061
  i.xAxis,
@@ -1134,11 +1134,11 @@ var at, Vi = (at = class {
1134
1134
  t.push(...i.getDrawableElements());
1135
1135
  return t;
1136
1136
  }
1137
- }, n(at, "Orchestrator"), at), nt, zi = (nt = class {
1137
+ }, n(at, "Orchestrator"), at), nt, Vi = (nt = class {
1138
1138
  static build(t, i, s, a) {
1139
- return new Vi(t, i, s, a).getDrawableElement();
1139
+ return new zi(t, i, s, a).getDrawableElement();
1140
1140
  }
1141
- }, n(nt, "XYChartBuilder"), nt), ht = 0, Gt, lt = vt(), ct = Dt(), y = Lt(), _t = ct.plotColorPalette.split(",").map((e) => e.trim()), pt = !1, Tt = !1;
1141
+ }, n(nt, "XYChartBuilder"), nt), ht = 0, jt, lt = vt(), ct = Dt(), y = Lt(), _t = ct.plotColorPalette.split(",").map((e) => e.trim()), pt = !1, Tt = !1;
1142
1142
  function Dt() {
1143
1143
  const e = Si(), t = kt();
1144
1144
  return Ht(e.xyChart, t.themeVariables.xyChart);
@@ -1176,7 +1176,7 @@ function ut(e) {
1176
1176
  }
1177
1177
  n(ut, "textSanitizer");
1178
1178
  function Qt(e) {
1179
- Gt = e;
1179
+ jt = e;
1180
1180
  }
1181
1181
  n(Qt, "setTmpSVGG");
1182
1182
  function Kt(e) {
@@ -1208,7 +1208,7 @@ function ii(e, t) {
1208
1208
  }
1209
1209
  n(ii, "setYAxisRangeData");
1210
1210
  function ei(e) {
1211
- const t = Math.min(...e), i = Math.max(...e), s = G(y.yAxis) ? y.yAxis.min : 1 / 0, a = G(y.yAxis) ? y.yAxis.max : -1 / 0;
1211
+ const t = Math.min(...e), i = Math.max(...e), s = j(y.yAxis) ? y.yAxis.min : 1 / 0, a = j(y.yAxis) ? y.yAxis.max : -1 / 0;
1212
1212
  y.yAxis = {
1213
1213
  type: "linear",
1214
1214
  title: y.yAxis.title,
@@ -1222,10 +1222,10 @@ function Et(e) {
1222
1222
  if (e.length === 0)
1223
1223
  return t;
1224
1224
  if (!pt) {
1225
- const i = G(y.xAxis) ? y.xAxis.min : 1 / 0, s = G(y.xAxis) ? y.xAxis.max : -1 / 0;
1225
+ const i = j(y.xAxis) ? y.xAxis.min : 1 / 0, s = j(y.xAxis) ? y.xAxis.max : -1 / 0;
1226
1226
  Pt(Math.min(i, 1), Math.max(s, e.length));
1227
1227
  }
1228
- if (ft(y.xAxis) && e.length > y.xAxis.categories.length && (e = e.slice(0, y.xAxis.categories.length)), Tt || ei(e), ft(y.xAxis) && (t = y.xAxis.categories.map((i, s) => [i, e[s]])), G(y.xAxis)) {
1228
+ if (ft(y.xAxis) && e.length > y.xAxis.categories.length && (e = e.slice(0, y.xAxis.categories.length)), Tt || ei(e), ft(y.xAxis) && (t = y.xAxis.categories.map((i, s) => [i, e[s]])), j(y.xAxis)) {
1229
1229
  const i = y.xAxis.min, s = y.xAxis.max, a = (s - i) / (e.length - 1), o = [];
1230
1230
  for (let l = i; l <= s; l += a)
1231
1231
  o.push(`${l}`);
@@ -1261,7 +1261,7 @@ n(ai, "setBarData");
1261
1261
  function ni() {
1262
1262
  if (y.plots.length === 0)
1263
1263
  throw Error("No Plot to render, please provide a plot with some data");
1264
- return y.title = Yt(), zi.build(lt, y, ct, Gt);
1264
+ return y.title = Yt(), Vi.build(lt, y, ct, jt);
1265
1265
  }
1266
1266
  n(ni, "getDrawableElem");
1267
1267
  function oi() {
@@ -1319,9 +1319,9 @@ var Bi = /* @__PURE__ */ n(function() {
1319
1319
  const L = a.getDrawableElem(), P = {};
1320
1320
  function I(m) {
1321
1321
  let D = b, c = "";
1322
- for (const [z] of m.entries()) {
1322
+ for (const [V] of m.entries()) {
1323
1323
  let W = b;
1324
- z > 0 && P[c] && (W = P[c]), c += m[z], D = P[c], D || (D = P[c] = W.append("g").attr("class", m[z]));
1324
+ V > 0 && P[c] && (W = P[c]), c += m[V], D = P[c], D || (D = P[c] = W.append("g").attr("class", m[V]));
1325
1325
  }
1326
1326
  return D;
1327
1327
  }
@@ -1335,29 +1335,29 @@ var Bi = /* @__PURE__ */ n(function() {
1335
1335
  if (D.selectAll("rect").data(m.data).enter().append("rect").attr("x", (c) => c.x).attr("y", (c) => c.y).attr("width", (c) => c.width).attr("height", (c) => c.height).attr("fill", (c) => c.fill).attr("stroke", (c) => c.strokeFill).attr("stroke-width", (c) => c.strokeWidth), l.showDataLabel) {
1336
1336
  const c = l.showDataLabelOutsideBar;
1337
1337
  if (l.chartOrientation === "horizontal") {
1338
- let z = function(w, B) {
1338
+ let V = function(w, B) {
1339
1339
  const { data: R, label: ot } = w;
1340
1340
  return B * ot.length * W <= R.width - X;
1341
1341
  };
1342
- n(z, "fitsHorizontally");
1342
+ n(V, "fitsHorizontally");
1343
1343
  const W = 0.7, X = 10, Y = m.data.map((w, B) => ({ data: w, label: f[B].toString() })).filter((w) => w.data.width > 0 && w.data.height > 0), S = Y.map((w) => {
1344
1344
  const { data: B } = w;
1345
1345
  let R = B.height * 0.7;
1346
- for (; !z(w, R) && R > 0; )
1346
+ for (; !V(w, R) && R > 0; )
1347
1347
  R -= 1;
1348
1348
  return R;
1349
1349
  }), H = Math.floor(Math.min(...S)), A = /* @__PURE__ */ n((w) => c ? w.data.x + w.data.width + X : w.data.x + w.data.width - X, "determineLabelXPosition");
1350
1350
  D.selectAll("text").data(Y).enter().append("text").attr("x", A).attr("y", (w) => w.data.y + w.data.height / 2).attr("text-anchor", c ? "start" : "end").attr("dominant-baseline", "middle").attr("fill", o.dataLabelColor).attr("font-size", `${H}px`).text((w) => w.label);
1351
1351
  } else {
1352
- let z = function(A, w, B) {
1352
+ let V = function(A, w, B) {
1353
1353
  const { data: R, label: ot } = A, F = w * ot.length * 0.7, h = R.x + R.width / 2, u = h - F / 2, g = h + F / 2, x = u >= R.x && g <= R.x + R.width, C = R.y + B + w <= R.y + R.height;
1354
1354
  return x && C;
1355
1355
  };
1356
- n(z, "fitsInBar");
1356
+ n(V, "fitsInBar");
1357
1357
  const W = 10, X = m.data.map((A, w) => ({ data: A, label: f[w].toString() })).filter((A) => A.data.width > 0 && A.data.height > 0), Y = X.map((A) => {
1358
1358
  const { data: w, label: B } = A;
1359
1359
  let R = w.width / (B.length * 0.7);
1360
- for (; !z(A, R, W) && R > 0; )
1360
+ for (; !V(A, R, W) && R > 0; )
1361
1361
  R -= 1;
1362
1362
  return R;
1363
1363
  }), S = Math.floor(Math.min(...Y)), H = /* @__PURE__ */ n((A) => c ? A.data.y - W : A.data.y + W, "determineLabelYPosition");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aiquants/markdown",
3
- "version": "5.0.0",
3
+ "version": "6.0.0",
4
4
  "description": "Markdown renderer for React with advanced features",
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs",
@@ -31,6 +31,18 @@
31
31
  "require": "./dist/viewer-settings.cjs",
32
32
  "default": "./dist/viewer-settings.js"
33
33
  },
34
+ "./embeds": {
35
+ "types": "./dist/embeds.d.ts",
36
+ "import": "./dist/embeds.js",
37
+ "require": "./dist/embeds.cjs",
38
+ "default": "./dist/embeds.js"
39
+ },
40
+ "./embeds/testing": {
41
+ "types": "./dist/embeds/testing.d.ts",
42
+ "import": "./dist/embeds/testing.js",
43
+ "require": "./dist/embeds/testing.cjs",
44
+ "default": "./dist/embeds/testing.js"
45
+ },
34
46
  "./styles/markdown.css": "./dist/styles/markdown.css",
35
47
  "./styles/details.css": "./dist/css/details.css",
36
48
  "./styles/github-markdown.css": "./dist/css/github-markdown.css",
@@ -49,7 +61,6 @@
49
61
  "@connectrpc/connect-node": "^1.7.0",
50
62
  "@panzoom/panzoom": "^4.6.1",
51
63
  "@tailwindcss/postcss": "^4.1.18",
52
- "cheerio": "^1.1.2",
53
64
  "clsx": "^2.1.1",
54
65
  "dompurify": "^3.3.1",
55
66
  "fs-extra": "^11.3.2",
@@ -133,17 +144,19 @@
133
144
  "access": "public"
134
145
  },
135
146
  "optionalDependencies": {
136
- "@aiquants/markdown-linux-x64": "5.0.0",
137
- "@aiquants/markdown-linux-arm64": "5.0.0",
138
- "@aiquants/markdown-darwin-x64": "5.0.0",
139
- "@aiquants/markdown-darwin-arm64": "5.0.0",
140
- "@aiquants/markdown-win32-x64": "5.0.0",
141
- "@aiquants/markdown-win32-arm64": "5.0.0"
147
+ "@aiquants/markdown-linux-x64": "6.0.0",
148
+ "@aiquants/markdown-linux-arm64": "6.0.0",
149
+ "@aiquants/markdown-darwin-x64": "6.0.0",
150
+ "@aiquants/markdown-darwin-arm64": "6.0.0",
151
+ "@aiquants/markdown-win32-x64": "6.0.0",
152
+ "@aiquants/markdown-win32-arm64": "6.0.0"
142
153
  },
143
154
  "scripts": {
144
155
  "build": "rimraf dist && vite build && vite build --config vite.config.cli.ts && pnpm build:css && node ../../.config/scripts/strip-dts-comments.mjs dist && node scripts/verify-dist.mjs dist",
145
156
  "build:css": "tailwindcss -i src/styles/tailwind.css -o dist/styles/markdown.css --minify",
146
157
  "build:go": "go build -C ../go/markdown-api -trimpath -ldflags=\"-s -w\" -o dist/markdown-api .",
158
+ "generate:heading-ids": "node scripts/generate-github-slugger-reference.mjs --go-module ../go/markdown-api",
159
+ "check:heading-ids": "node scripts/generate-github-slugger-reference.mjs --go-module ../go/markdown-api --check",
147
160
  "generate": "pnpm dlx @bufbuild/buf generate ../go/markdown-api/proto && pnpm exec biome check --write src/gen",
148
161
  "build:platforms": "node scripts/build-platform-packages.mjs",
149
162
  "publish:platforms": "node scripts/publish-platform-packages.mjs",
@@ -1,83 +0,0 @@
1
- import { aK as ln, aL as an, aM as y, aN as tn, aO as V, aP as O, aQ as _, aR as un, aS as rn, aT as Y, aU as o, aV as M, aW as sn, aX as on, aY as fn } from "./extractHeadings-CGJexznE.js";
2
- function cn(l) {
3
- return l.innerRadius;
4
- }
5
- function yn(l) {
6
- return l.outerRadius;
7
- }
8
- function gn(l) {
9
- return l.startAngle;
10
- }
11
- function dn(l) {
12
- return l.endAngle;
13
- }
14
- function mn(l) {
15
- return l && l.padAngle;
16
- }
17
- function pn(l, h, D, S, v, R, N, a) {
18
- var E = D - l, i = S - h, n = N - v, d = a - R, u = d * E - n * i;
19
- if (!(u * u < y))
20
- return u = (n * (h - R) - d * (l - v)) / u, [l + u * E, h + u * i];
21
- }
22
- function G(l, h, D, S, v, R, N) {
23
- var a = l - D, E = h - S, i = (N ? R : -R) / Y(a * a + E * E), n = i * E, d = -i * a, u = l + n, s = h + d, f = D + n, c = S + d, Q = (u + f) / 2, t = (s + c) / 2, m = f - u, g = c - s, A = m * m + g * g, T = v - R, P = u * c - f * s, I = (g < 0 ? -1 : 1) * Y(fn(0, T * T * A - P * P)), K = (P * g - m * I) / A, L = (-P * m - g * I) / A, w = (P * g + m * I) / A, p = (-P * m + g * I) / A, x = K - Q, e = L - t, r = w - Q, U = p - t;
24
- return x * x + e * e > r * r + U * U && (K = w, L = p), {
25
- cx: K,
26
- cy: L,
27
- x01: -n,
28
- y01: -d,
29
- x11: K * (v / T - 1),
30
- y11: L * (v / T - 1)
31
- };
32
- }
33
- function hn() {
34
- var l = cn, h = yn, D = M(0), S = null, v = gn, R = dn, N = mn, a = null, E = ln(i);
35
- function i() {
36
- var n, d, u = +l.apply(this, arguments), s = +h.apply(this, arguments), f = v.apply(this, arguments) - an, c = R.apply(this, arguments) - an, Q = un(c - f), t = c > f;
37
- if (a || (a = n = E()), s < u && (d = s, s = u, u = d), !(s > y)) a.moveTo(0, 0);
38
- else if (Q > tn - y)
39
- a.moveTo(s * V(f), s * O(f)), a.arc(0, 0, s, f, c, !t), u > y && (a.moveTo(u * V(c), u * O(c)), a.arc(0, 0, u, c, f, t));
40
- else {
41
- var m = f, g = c, A = f, T = c, P = Q, I = Q, K = N.apply(this, arguments) / 2, L = K > y && (S ? +S.apply(this, arguments) : Y(u * u + s * s)), w = _(un(s - u) / 2, +D.apply(this, arguments)), p = w, x = w, e, r;
42
- if (L > y) {
43
- var U = sn(L / u * O(K)), j = sn(L / s * O(K));
44
- (P -= U * 2) > y ? (U *= t ? 1 : -1, A += U, T -= U) : (P = 0, A = T = (f + c) / 2), (I -= j * 2) > y ? (j *= t ? 1 : -1, m += j, g -= j) : (I = 0, m = g = (f + c) / 2);
45
- }
46
- var W = s * V(m), X = s * O(m), z = u * V(T), B = u * O(T);
47
- if (w > y) {
48
- var C = s * V(g), F = s * O(g), H = u * V(A), J = u * O(A), q;
49
- if (Q < rn)
50
- if (q = pn(W, X, H, J, C, F, z, B)) {
51
- var Z = W - q[0], $ = X - q[1], k = C - q[0], b = F - q[1], nn = 1 / O(on((Z * k + $ * b) / (Y(Z * Z + $ * $) * Y(k * k + b * b))) / 2), en = Y(q[0] * q[0] + q[1] * q[1]);
52
- p = _(w, (u - en) / (nn - 1)), x = _(w, (s - en) / (nn + 1));
53
- } else
54
- p = x = 0;
55
- }
56
- I > y ? x > y ? (e = G(H, J, W, X, s, x, t), r = G(C, F, z, B, s, x, t), a.moveTo(e.cx + e.x01, e.cy + e.y01), x < w ? a.arc(e.cx, e.cy, x, o(e.y01, e.x01), o(r.y01, r.x01), !t) : (a.arc(e.cx, e.cy, x, o(e.y01, e.x01), o(e.y11, e.x11), !t), a.arc(0, 0, s, o(e.cy + e.y11, e.cx + e.x11), o(r.cy + r.y11, r.cx + r.x11), !t), a.arc(r.cx, r.cy, x, o(r.y11, r.x11), o(r.y01, r.x01), !t))) : (a.moveTo(W, X), a.arc(0, 0, s, m, g, !t)) : a.moveTo(W, X), !(u > y) || !(P > y) ? a.lineTo(z, B) : p > y ? (e = G(z, B, C, F, u, -p, t), r = G(W, X, H, J, u, -p, t), a.lineTo(e.cx + e.x01, e.cy + e.y01), p < w ? a.arc(e.cx, e.cy, p, o(e.y01, e.x01), o(r.y01, r.x01), !t) : (a.arc(e.cx, e.cy, p, o(e.y01, e.x01), o(e.y11, e.x11), !t), a.arc(0, 0, u, o(e.cy + e.y11, e.cx + e.x11), o(r.cy + r.y11, r.cx + r.x11), t), a.arc(r.cx, r.cy, p, o(r.y11, r.x11), o(r.y01, r.x01), !t))) : a.arc(0, 0, u, T, A, t);
57
- }
58
- if (a.closePath(), n) return a = null, n + "" || null;
59
- }
60
- return i.centroid = function() {
61
- var n = (+l.apply(this, arguments) + +h.apply(this, arguments)) / 2, d = (+v.apply(this, arguments) + +R.apply(this, arguments)) / 2 - rn / 2;
62
- return [V(d) * n, O(d) * n];
63
- }, i.innerRadius = function(n) {
64
- return arguments.length ? (l = typeof n == "function" ? n : M(+n), i) : l;
65
- }, i.outerRadius = function(n) {
66
- return arguments.length ? (h = typeof n == "function" ? n : M(+n), i) : h;
67
- }, i.cornerRadius = function(n) {
68
- return arguments.length ? (D = typeof n == "function" ? n : M(+n), i) : D;
69
- }, i.padRadius = function(n) {
70
- return arguments.length ? (S = n == null ? null : typeof n == "function" ? n : M(+n), i) : S;
71
- }, i.startAngle = function(n) {
72
- return arguments.length ? (v = typeof n == "function" ? n : M(+n), i) : v;
73
- }, i.endAngle = function(n) {
74
- return arguments.length ? (R = typeof n == "function" ? n : M(+n), i) : R;
75
- }, i.padAngle = function(n) {
76
- return arguments.length ? (N = typeof n == "function" ? n : M(+n), i) : N;
77
- }, i.context = function(n) {
78
- return arguments.length ? (a = n ?? null, i) : a;
79
- }, i;
80
- }
81
- export {
82
- hn as d
83
- };
@@ -1,5 +0,0 @@
1
- import { b0 as a, b1 as n } from "./extractHeadings-CGJexznE.js";
2
- const t = (r, o) => a.lang.round(n.parse(r)[o]);
3
- export {
4
- t as c
5
- };
@@ -1,5 +0,0 @@
1
- import { RootContentMap } from "mdast";
2
- import { EnrichedBlockLink } from "../../plugins/remark-block-link-metadata.ts";
3
- export declare const BlockLinkNode: React.FC<{
4
- node: RootContentMap["block-link"] | EnrichedBlockLink;
5
- }>;
@@ -1,8 +0,0 @@
1
- import { SiteMetadata } from "../../plugins/fetchSiteMetadata.ts";
2
- type Props = {
3
- href: string;
4
- isExternal: boolean;
5
- metadata?: SiteMetadata;
6
- };
7
- export declare const RichLinkCard: React.FC<Props>;
8
- export {};
@@ -1,25 +0,0 @@
1
- import { RootContentMap } from "mdast";
2
- import { JSX } from "react";
3
- declare global {
4
- interface Window {
5
- twttr?: {
6
- widgets?: {
7
- load: (element?: HTMLElement) => void;
8
- createTweet: (tweetId: string, element: HTMLElement, options: {
9
- cards?: "hidden" | "visible";
10
- conversation?: "none" | "all";
11
- theme?: "light" | "dark";
12
- width?: number;
13
- align?: "center" | "left" | "right";
14
- lang?: string;
15
- dnt?: "true";
16
- }) => Promise<HTMLElement | undefined>;
17
- };
18
- };
19
- }
20
- }
21
- export declare const TwitterEmbedNode: ({ node, theme, allowWidgetScript }: {
22
- node: RootContentMap["twitter-embed"];
23
- theme: "light" | "dark";
24
- allowWidgetScript: boolean;
25
- }) => JSX.Element | null;
@@ -1,6 +0,0 @@
1
- import { RootContentMap } from "mdast";
2
- import { ReactElement } from "react";
3
- export declare const YouTubeEmbedNode: ({ node, iFrameAllowedDomains }: {
4
- node: RootContentMap["youtube-embed"];
5
- iFrameAllowedDomains: readonly string[];
6
- }) => ReactElement | null;