@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,25 +1,25 @@
1
- import { p as ge } from "./chunk-JWPE2WC7-DpcSSOP5.js";
2
- import { _ as w, at as ye, an as ae, ap as ee, as as Se, a0 as ve, $ as te, bZ as B, X as U, V as xe, U as be, ad as we, ae as Ce, Q as Te, O as Le, aq as $e, b_ as Ae, aj as Fe } from "./extractHeadings-CGJexznE.js";
3
- import { s as Ne } from "./chunk-VR4S4FIN-B72PxPVm.js";
4
- import { p as _e } from "./cynefin-VYW2F7L2-Bkk-F_Js.js";
1
+ import { p as ge } from "./chunk-JWPE2WC7-CPLOunIL.js";
2
+ import { _ as w, al as ye, af as ae, ah as ee, ak as Se, Q as ve, O as te, bR as B, K, G as xe, A as be, a5 as we, a6 as Ce, z as Te, y as Le, ai as $e, bS as Ae, ab as Fe } from "./extractHeadings-B2pUyEPa.js";
3
+ import { s as Ne } from "./chunk-VR4S4FIN-BK6xeIQk.js";
4
+ import { p as Me } from "./cynefin-VYW2F7L2-Bkk-F_Js.js";
5
5
  import { b as O } from "./defaultLocale-BgPVtth8.js";
6
- import { o as K } from "./ordinal-B6-f3MAq.js";
7
- function Me(t) {
6
+ import { o as J } from "./ordinal-B6-f3MAq.js";
7
+ function _e(t) {
8
8
  var a = 0, l = t.children, n = l && l.length;
9
9
  if (!n) a = 1;
10
10
  else for (; --n >= 0; ) a += l[n].value;
11
11
  t.value = a;
12
12
  }
13
13
  function ke() {
14
- return this.eachAfter(Me);
14
+ return this.eachAfter(_e);
15
15
  }
16
- function Ve(t, a) {
16
+ function ze(t, a) {
17
17
  let l = -1;
18
18
  for (const n of this)
19
19
  t.call(a, n, ++l, this);
20
20
  return this;
21
21
  }
22
- function ze(t, a) {
22
+ function Ve(t, a) {
23
23
  for (var l = this, n = [l], s, i, h = -1; l = n.pop(); )
24
24
  if (t.call(a, l, ++h, this), s = l.children)
25
25
  for (i = s.length - 1; i >= 0; --i)
@@ -47,12 +47,12 @@ function Be(t) {
47
47
  a.value = l;
48
48
  });
49
49
  }
50
- function Ee(t) {
50
+ function Re(t) {
51
51
  return this.eachBefore(function(a) {
52
52
  a.children && a.children.sort(t);
53
53
  });
54
54
  }
55
- function Re(t) {
55
+ function Ee(t) {
56
56
  for (var a = this, l = We(a, t), n = [a]; a !== l; )
57
57
  a = a.parent, n.push(a);
58
58
  for (var s = n.length; t !== l; )
@@ -80,13 +80,13 @@ function Oe() {
80
80
  a.children || t.push(a);
81
81
  }), t;
82
82
  }
83
- function qe() {
83
+ function Ge() {
84
84
  var t = this, a = [];
85
85
  return t.each(function(l) {
86
86
  l !== t && a.push({ source: l.parent, target: l });
87
87
  }), a;
88
88
  }
89
- function* Ge() {
89
+ function* qe() {
90
90
  var t = this, a, l = [t], n, s, i;
91
91
  do
92
92
  for (a = l.reverse(), l = []; t = a.pop(); )
@@ -96,67 +96,67 @@ function* Ge() {
96
96
  while (l.length);
97
97
  }
98
98
  function ne(t, a) {
99
- t instanceof Map ? (t = [void 0, t], a === void 0 && (a = Ye)) : a === void 0 && (a = je);
100
- for (var l = new Z(t), n, s = [l], i, h, d, g; n = s.pop(); )
99
+ t instanceof Map ? (t = [void 0, t], a === void 0 && (a = je)) : a === void 0 && (a = Ye);
100
+ for (var l = new Q(t), n, s = [l], i, h, d, g; n = s.pop(); )
101
101
  if ((h = a(n.data)) && (g = (h = Array.from(h)).length))
102
102
  for (n.children = h, d = g - 1; d >= 0; --d)
103
- s.push(i = h[d] = new Z(h[d])), i.parent = n, i.depth = n.depth + 1;
104
- return l.eachBefore(Ze);
103
+ s.push(i = h[d] = new Q(h[d])), i.parent = n, i.depth = n.depth + 1;
104
+ return l.eachBefore(Qe);
105
105
  }
106
106
  function Xe() {
107
- return ne(this).eachBefore(Ue);
107
+ return ne(this).eachBefore(Ke);
108
108
  }
109
- function je(t) {
109
+ function Ye(t) {
110
110
  return t.children;
111
111
  }
112
- function Ye(t) {
112
+ function je(t) {
113
113
  return Array.isArray(t) ? t[1] : null;
114
114
  }
115
- function Ue(t) {
115
+ function Ke(t) {
116
116
  t.data.value !== void 0 && (t.value = t.data.value), t.data = t.data.data;
117
117
  }
118
- function Ze(t) {
118
+ function Qe(t) {
119
119
  var a = 0;
120
120
  do
121
121
  t.height = a;
122
122
  while ((t = t.parent) && t.height < ++a);
123
123
  }
124
- function Z(t) {
124
+ function Q(t) {
125
125
  this.data = t, this.depth = this.height = 0, this.parent = null;
126
126
  }
127
- Z.prototype = ne.prototype = {
128
- constructor: Z,
127
+ Q.prototype = ne.prototype = {
128
+ constructor: Q,
129
129
  count: ke,
130
- each: Ve,
130
+ each: ze,
131
131
  eachAfter: De,
132
- eachBefore: ze,
132
+ eachBefore: Ve,
133
133
  find: Pe,
134
134
  sum: Be,
135
- sort: Ee,
136
- path: Re,
135
+ sort: Re,
136
+ path: Ee,
137
137
  ancestors: He,
138
138
  descendants: Ie,
139
139
  leaves: Oe,
140
- links: qe,
140
+ links: Ge,
141
141
  copy: Xe,
142
- [Symbol.iterator]: Ge
142
+ [Symbol.iterator]: qe
143
143
  };
144
- function Qe(t) {
144
+ function Ue(t) {
145
145
  if (typeof t != "function") throw new Error();
146
146
  return t;
147
147
  }
148
- function q() {
148
+ function G() {
149
149
  return 0;
150
150
  }
151
- function G(t) {
151
+ function q(t) {
152
152
  return function() {
153
153
  return t;
154
154
  };
155
155
  }
156
- function Je(t) {
156
+ function Ze(t) {
157
157
  t.x0 = Math.round(t.x0), t.y0 = Math.round(t.y0), t.x1 = Math.round(t.x1), t.y1 = Math.round(t.y1);
158
158
  }
159
- function Ke(t, a, l, n, s) {
159
+ function Je(t, a, l, n, s) {
160
160
  for (var i = t.children, h, d = -1, g = i.length, c = t.value && (n - a) / t.value; ++d < g; )
161
161
  h = i[d], h.y0 = l, h.y1 = s, h.x0 = a, h.x1 = a += h.value * c;
162
162
  }
@@ -166,19 +166,19 @@ function et(t, a, l, n, s) {
166
166
  }
167
167
  var tt = (1 + Math.sqrt(5)) / 2;
168
168
  function at(t, a, l, n, s, i) {
169
- for (var h = [], d = a.children, g, c, u = 0, b = 0, r = d.length, x, S, v = a.value, p, y, N, $, z, W, _; u < r; ) {
169
+ for (var h = [], d = a.children, g, c, u = 0, b = 0, r = d.length, x, S, v = a.value, p, y, N, $, V, W, M; u < r; ) {
170
170
  x = s - l, S = i - n;
171
171
  do
172
172
  p = d[b++].value;
173
173
  while (!p && b < r);
174
- for (y = N = p, W = Math.max(S / x, x / S) / (v * t), _ = p * p * W, z = Math.max(N / _, _ / y); b < r; ++b) {
175
- if (p += c = d[b].value, c < y && (y = c), c > N && (N = c), _ = p * p * W, $ = Math.max(N / _, _ / y), $ > z) {
174
+ for (y = N = p, W = Math.max(S / x, x / S) / (v * t), M = p * p * W, V = Math.max(N / M, M / y); b < r; ++b) {
175
+ if (p += c = d[b].value, c < y && (y = c), c > N && (N = c), M = p * p * W, $ = Math.max(N / M, M / y), $ > V) {
176
176
  p -= c;
177
177
  break;
178
178
  }
179
- z = $;
179
+ V = $;
180
180
  }
181
- h.push(g = { value: p, dice: x < S, children: d.slice(u, b) }), g.dice ? Ke(g, l, n, s, v ? n += S * p / v : i) : et(g, l, n, v ? l += x * p / v : s, i), v -= p, u = b;
181
+ h.push(g = { value: p, dice: x < S, children: d.slice(u, b) }), g.dice ? Je(g, l, n, s, v ? n += S * p / v : i) : et(g, l, n, v ? l += x * p / v : s, i), v -= p, u = b;
182
182
  }
183
183
  return h;
184
184
  }
@@ -191,9 +191,9 @@ const nt = (function t(a) {
191
191
  }, l;
192
192
  })(tt);
193
193
  function lt() {
194
- var t = nt, a = !1, l = 1, n = 1, s = [0], i = q, h = q, d = q, g = q, c = q;
194
+ var t = nt, a = !1, l = 1, n = 1, s = [0], i = G, h = G, d = G, g = G, c = G;
195
195
  function u(r) {
196
- return r.x0 = r.y0 = 0, r.x1 = l, r.y1 = n, r.eachBefore(b), s = [0], a && r.eachBefore(Je), r;
196
+ return r.x0 = r.y0 = 0, r.x1 = l, r.y1 = n, r.eachBefore(b), s = [0], a && r.eachBefore(Ze), r;
197
197
  }
198
198
  function b(r) {
199
199
  var x = s[r.depth], S = r.x0 + x, v = r.y0 + x, p = r.x1 - x, y = r.y1 - x;
@@ -204,24 +204,24 @@ function lt() {
204
204
  }, u.size = function(r) {
205
205
  return arguments.length ? (l = +r[0], n = +r[1], u) : [l, n];
206
206
  }, u.tile = function(r) {
207
- return arguments.length ? (t = Qe(r), u) : t;
207
+ return arguments.length ? (t = Ue(r), u) : t;
208
208
  }, u.padding = function(r) {
209
209
  return arguments.length ? u.paddingInner(r).paddingOuter(r) : u.paddingInner();
210
210
  }, u.paddingInner = function(r) {
211
- return arguments.length ? (i = typeof r == "function" ? r : G(+r), u) : i;
211
+ return arguments.length ? (i = typeof r == "function" ? r : q(+r), u) : i;
212
212
  }, u.paddingOuter = function(r) {
213
213
  return arguments.length ? u.paddingTop(r).paddingRight(r).paddingBottom(r).paddingLeft(r) : u.paddingTop();
214
214
  }, u.paddingTop = function(r) {
215
- return arguments.length ? (h = typeof r == "function" ? r : G(+r), u) : h;
215
+ return arguments.length ? (h = typeof r == "function" ? r : q(+r), u) : h;
216
216
  }, u.paddingRight = function(r) {
217
- return arguments.length ? (d = typeof r == "function" ? r : G(+r), u) : d;
217
+ return arguments.length ? (d = typeof r == "function" ? r : q(+r), u) : d;
218
218
  }, u.paddingBottom = function(r) {
219
- return arguments.length ? (g = typeof r == "function" ? r : G(+r), u) : g;
219
+ return arguments.length ? (g = typeof r == "function" ? r : q(+r), u) : g;
220
220
  }, u.paddingLeft = function(r) {
221
- return arguments.length ? (c = typeof r == "function" ? r : G(+r), u) : c;
221
+ return arguments.length ? (c = typeof r == "function" ? r : q(+r), u) : c;
222
222
  }, u;
223
223
  }
224
- var R, oe = (R = class {
224
+ var E, oe = (E = class {
225
225
  constructor() {
226
226
  this.nodes = [], this.levels = /* @__PURE__ */ new Map(), this.outerNodes = [], this.classes = /* @__PURE__ */ new Map(), this.setAccTitle = xe, this.getAccTitle = be, this.setDiagramTitle = we, this.getDiagramTitle = Ce, this.getAccDescription = Te, this.setAccDescription = Le;
227
227
  }
@@ -256,7 +256,7 @@ var R, oe = (R = class {
256
256
  clear() {
257
257
  Fe(), this.nodes = [], this.levels = /* @__PURE__ */ new Map(), this.outerNodes = [], this.classes = /* @__PURE__ */ new Map(), this.root = void 0;
258
258
  }
259
- }, w(R, "TreeMapDB"), R);
259
+ }, w(E, "TreeMapDB"), E);
260
260
  function ce(t) {
261
261
  if (!t.length)
262
262
  return [];
@@ -307,7 +307,7 @@ var st = /* @__PURE__ */ w((t, a) => {
307
307
  parser: { yy: void 0 },
308
308
  parse: /* @__PURE__ */ w(async (t) => {
309
309
  try {
310
- const l = await _e("treemap", t);
310
+ const l = await Me("treemap", t);
311
311
  te.debug("Treemap AST:", l);
312
312
  const n = he.parser?.yy;
313
313
  if (!(n instanceof oe))
@@ -319,11 +319,11 @@ var st = /* @__PURE__ */ w((t, a) => {
319
319
  throw te.error("Error parsing treemap:", a), a;
320
320
  }
321
321
  }, "parse")
322
- }, it = 10, E = 10, X = 25, ot = /* @__PURE__ */ w((t, a, l, n) => {
322
+ }, it = 10, R = 10, X = 25, ot = /* @__PURE__ */ w((t, a, l, n) => {
323
323
  const s = n.db, i = s.getConfig(), h = i.padding ?? it, d = s.getDiagramTitle(), g = s.getRoot(), { themeVariables: c } = ae();
324
324
  if (!g)
325
325
  return;
326
- const u = d ? 30 : 0, b = Se(a), r = i.nodeWidth ? i.nodeWidth * E : 960, x = i.nodeHeight ? i.nodeHeight * E : 500, S = r, v = x + u;
326
+ const u = d ? 30 : 0, b = Se(a), r = i.nodeWidth ? i.nodeWidth * R : 960, x = i.nodeHeight ? i.nodeHeight * R : 500, S = r, v = x + u;
327
327
  b.attr("viewBox", `0 0 ${S} ${v}`), ve(b, v, S, i.useMaxWidth);
328
328
  let p;
329
329
  try {
@@ -341,7 +341,7 @@ var st = /* @__PURE__ */ w((t, a) => {
341
341
  } catch (e) {
342
342
  te.error("Error creating format function:", e), p = O(",");
343
343
  }
344
- const y = K().range([
344
+ const y = J().range([
345
345
  "transparent",
346
346
  c.cScale0,
347
347
  c.cScale1,
@@ -355,7 +355,7 @@ var st = /* @__PURE__ */ w((t, a) => {
355
355
  c.cScale9,
356
356
  c.cScale10,
357
357
  c.cScale11
358
- ]), N = K().range([
358
+ ]), N = J().range([
359
359
  "transparent",
360
360
  c.cScalePeer0,
361
361
  c.cScalePeer1,
@@ -369,7 +369,7 @@ var st = /* @__PURE__ */ w((t, a) => {
369
369
  c.cScalePeer9,
370
370
  c.cScalePeer10,
371
371
  c.cScalePeer11
372
- ]), $ = K().range([
372
+ ]), $ = J().range([
373
373
  c.cScaleLabel0,
374
374
  c.cScaleLabel1,
375
375
  c.cScaleLabel2,
@@ -384,9 +384,9 @@ var st = /* @__PURE__ */ w((t, a) => {
384
384
  c.cScaleLabel11
385
385
  ]);
386
386
  d && b.append("text").attr("x", S / 2).attr("y", u / 2).attr("class", "treemapTitle").attr("text-anchor", "middle").attr("dominant-baseline", "middle").text(d);
387
- const z = b.append("g").attr("transform", `translate(0, ${u})`).attr("class", "treemapContainer"), W = ne(g).sum((e) => e.value ?? 0).sort((e, o) => (o.value ?? 0) - (e.value ?? 0)), le = lt().size([r, x]).paddingTop(
388
- (e) => e.children && e.children.length > 0 ? X + E : 0
389
- ).paddingInner(h).paddingLeft((e) => e.children && e.children.length > 0 ? E : 0).paddingRight((e) => e.children && e.children.length > 0 ? E : 0).paddingBottom((e) => e.children && e.children.length > 0 ? E : 0).round(!0)(W), de = le.descendants().filter((e) => e.children && e.children.length > 0), H = z.selectAll(".treemapSection").data(de).enter().append("g").attr("class", "treemapSection").attr("transform", (e) => `translate(${e.x0},${e.y0})`);
387
+ const V = b.append("g").attr("transform", `translate(0, ${u})`).attr("class", "treemapContainer"), W = ne(g).sum((e) => e.value ?? 0).sort((e, o) => (o.value ?? 0) - (e.value ?? 0)), le = lt().size([r, x]).paddingTop(
388
+ (e) => e.children && e.children.length > 0 ? X + R : 0
389
+ ).paddingInner(h).paddingLeft((e) => e.children && e.children.length > 0 ? R : 0).paddingRight((e) => e.children && e.children.length > 0 ? R : 0).paddingBottom((e) => e.children && e.children.length > 0 ? R : 0).round(!0)(W), de = le.descendants().filter((e) => e.children && e.children.length > 0), H = V.selectAll(".treemapSection").data(de).enter().append("g").attr("class", "treemapSection").attr("transform", (e) => `translate(${e.x0},${e.y0})`);
390
390
  H.append("rect").attr("width", (e) => e.x1 - e.x0).attr("height", X).attr("class", "treemapSectionHeader").attr("fill", "none").attr("fill-opacity", 0.6).attr("stroke-width", 0.6).attr("style", (e) => e.depth === 0 ? "display: none;" : ""), H.append("clipPath").attr("id", (e, o) => `clip-section-${a}-${o}`).append("rect").attr("width", (e) => Math.max(0, e.x1 - e.x0 - 12)).attr("height", X), H.append("rect").attr("width", (e) => e.x1 - e.x0).attr("height", (e) => e.y1 - e.y0).attr("class", (e, o) => `treemapSection section${o}`).attr("fill", (e) => y(e.data.name)).attr("fill-opacity", 0.6).attr("stroke", (e) => N(e.data.name)).attr("stroke-width", 2).attr("stroke-opacity", 0.4).attr("style", (e) => {
391
391
  if (e.depth === 0)
392
392
  return "display: none;";
@@ -400,20 +400,20 @@ var st = /* @__PURE__ */ w((t, a) => {
400
400
  }).each(function(e) {
401
401
  if (e.depth === 0)
402
402
  return;
403
- const o = U(this), f = e.data.name;
403
+ const o = K(this), f = e.data.name;
404
404
  o.text(f);
405
405
  const C = e.x1 - e.x0, L = 6;
406
406
  let T;
407
407
  i.showValues !== !1 && e.value ? T = C - 10 - 30 - 10 - L : T = C - L - 6;
408
- const m = Math.max(15, T), M = o.node();
409
- if (M.getComputedTextLength() > m) {
410
- let V = f;
411
- for (; V.length > 0; ) {
412
- if (V = f.substring(0, V.length - 1), V.length === 0) {
413
- o.text("..."), M.getComputedTextLength() > m && o.text("");
408
+ const m = Math.max(15, T), _ = o.node();
409
+ if (_.getComputedTextLength() > m) {
410
+ let z = f;
411
+ for (; z.length > 0; ) {
412
+ if (z = f.substring(0, z.length - 1), z.length === 0) {
413
+ o.text("..."), _.getComputedTextLength() > m && o.text("");
414
414
  break;
415
415
  }
416
- if (o.text(V + "..."), M.getComputedTextLength() <= m)
416
+ if (o.text(z + "..."), _.getComputedTextLength() <= m)
417
417
  break;
418
418
  }
419
419
  }
@@ -423,54 +423,54 @@ var st = /* @__PURE__ */ w((t, a) => {
423
423
  const o = "text-anchor: end; dominant-baseline: middle; font-size: 10px; fill:" + $(e.data.name) + "; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;", f = B({ cssCompiledStyles: e.data.cssCompiledStyles });
424
424
  return o + f.labelStyles.replace("color:", "fill:");
425
425
  });
426
- const se = le.leaves(), A = se.length > 20, ue = A ? 16 : 38, j = A ? 14 : 28, D = A ? 4 : 8, I = A ? 4 : 6, Q = A ? 2 : 4, re = A ? 8 : 10, J = A ? 1 : 2, Y = z.selectAll(".treemapLeafGroup").data(se).enter().append("g").attr("class", (e, o) => `treemapNode treemapLeafGroup leaf${o}${e.data.classSelector ? ` ${e.data.classSelector}` : ""}x`).attr("transform", (e) => `translate(${e.x0},${e.y0})`);
427
- Y.append("rect").attr("width", (e) => e.x1 - e.x0).attr("height", (e) => e.y1 - e.y0).attr("class", "treemapLeaf").attr("fill", (e) => e.parent ? y(e.parent.data.name) : y(e.data.name)).attr("style", (e) => B({ cssCompiledStyles: e.data.cssCompiledStyles }).nodeStyles).attr("fill-opacity", 0.3).attr("stroke", (e) => e.parent ? y(e.parent.data.name) : y(e.data.name)).attr("stroke-width", 3), Y.append("clipPath").attr("id", (e, o) => `clip-${a}-${o}`).append("rect").attr("width", (e) => Math.max(0, e.x1 - e.x0 - 4)).attr("height", (e) => Math.max(0, e.y1 - e.y0 - 4)), Y.append("text").attr("class", "treemapLabel").attr("x", (e) => (e.x1 - e.x0) / 2).attr("y", (e) => (e.y1 - e.y0) / 2).attr("style", (e) => {
426
+ const se = le.leaves(), A = se.length > 20, ue = A ? 16 : 38, Y = A ? 14 : 28, D = A ? 4 : 8, I = A ? 4 : 6, U = A ? 2 : 4, re = A ? 8 : 10, Z = A ? 1 : 2, j = V.selectAll(".treemapLeafGroup").data(se).enter().append("g").attr("class", (e, o) => `treemapNode treemapLeafGroup leaf${o}${e.data.classSelector ? ` ${e.data.classSelector}` : ""}x`).attr("transform", (e) => `translate(${e.x0},${e.y0})`);
427
+ j.append("rect").attr("width", (e) => e.x1 - e.x0).attr("height", (e) => e.y1 - e.y0).attr("class", "treemapLeaf").attr("fill", (e) => e.parent ? y(e.parent.data.name) : y(e.data.name)).attr("style", (e) => B({ cssCompiledStyles: e.data.cssCompiledStyles }).nodeStyles).attr("fill-opacity", 0.3).attr("stroke", (e) => e.parent ? y(e.parent.data.name) : y(e.data.name)).attr("stroke-width", 3), j.append("clipPath").attr("id", (e, o) => `clip-${a}-${o}`).append("rect").attr("width", (e) => Math.max(0, e.x1 - e.x0 - 4)).attr("height", (e) => Math.max(0, e.y1 - e.y0 - 4)), j.append("text").attr("class", "treemapLabel").attr("x", (e) => (e.x1 - e.x0) / 2).attr("y", (e) => (e.y1 - e.y0) / 2).attr("style", (e) => {
428
428
  const o = `text-anchor: middle; dominant-baseline: middle; font-size: ${ue}px;fill:` + $(e.data.name) + ";", f = B({ cssCompiledStyles: e.data.cssCompiledStyles });
429
429
  return o + f.labelStyles.replace("color:", "fill:");
430
430
  }).attr("clip-path", (e, o) => `url(#clip-${a}-${o})`).text((e) => e.data.name).each(function(e) {
431
- const o = U(this), f = e.x1 - e.x0, C = e.y1 - e.y0, L = o.node(), T = f - 2 * Q, P = C - 2 * Q;
431
+ const o = K(this), f = e.x1 - e.x0, C = e.y1 - e.y0, L = o.node(), T = f - 2 * U, P = C - 2 * U;
432
432
  if (T < re || P < re) {
433
433
  o.style("display", "none");
434
434
  return;
435
435
  }
436
436
  let m = parseInt(o.style("font-size"), 10);
437
- const M = 0.6;
437
+ const _ = 0.6;
438
438
  for (; L.getComputedTextLength() > T && m > D; )
439
439
  m--, o.style("font-size", `${m}px`);
440
440
  let F = Math.max(
441
441
  I,
442
- Math.min(j, Math.round(m * M))
443
- ), k = m + J + F;
442
+ Math.min(Y, Math.round(m * _))
443
+ ), k = m + Z + F;
444
444
  for (; k > P && m > D && (m--, F = Math.max(
445
445
  I,
446
- Math.min(j, Math.round(m * M))
446
+ Math.min(Y, Math.round(m * _))
447
447
  ), !(F < I && m === D)); )
448
- o.style("font-size", `${m}px`), k = m + J + F;
448
+ o.style("font-size", `${m}px`), k = m + Z + F;
449
449
  o.style("font-size", `${m}px`), A ? (m < D || P < D) && o.style("display", "none") : (L.getComputedTextLength() > T || m < D || P < m) && o.style("display", "none");
450
- }), i.showValues !== !1 && Y.append("text").attr("class", "treemapValue").attr("x", (o) => (o.x1 - o.x0) / 2).attr("y", function(o) {
450
+ }), i.showValues !== !1 && j.append("text").attr("class", "treemapValue").attr("x", (o) => (o.x1 - o.x0) / 2).attr("y", function(o) {
451
451
  return (o.y1 - o.y0) / 2;
452
452
  }).attr("style", (o) => {
453
- const f = `text-anchor: middle; dominant-baseline: hanging; font-size: ${j}px;fill:` + $(o.data.name) + ";", C = B({ cssCompiledStyles: o.data.cssCompiledStyles });
453
+ const f = `text-anchor: middle; dominant-baseline: hanging; font-size: ${Y}px;fill:` + $(o.data.name) + ";", C = B({ cssCompiledStyles: o.data.cssCompiledStyles });
454
454
  return f + C.labelStyles.replace("color:", "fill:");
455
455
  }).attr("clip-path", (o, f) => `url(#clip-${a}-${f})`).text((o) => o.value ? p(o.value) : "").each(function(o) {
456
- const f = U(this), C = this.parentNode;
456
+ const f = K(this), C = this.parentNode;
457
457
  if (!C) {
458
458
  f.style("display", "none");
459
459
  return;
460
460
  }
461
- const L = U(C).select(".treemapLabel");
461
+ const L = K(C).select(".treemapLabel");
462
462
  if (L.empty() || L.style("display") === "none") {
463
463
  f.style("display", "none");
464
464
  return;
465
465
  }
466
466
  const T = parseFloat(L.style("font-size")), m = Math.max(
467
467
  I,
468
- Math.min(j, Math.round(T * 0.6))
468
+ Math.min(Y, Math.round(T * 0.6))
469
469
  );
470
470
  f.style("font-size", `${m}px`);
471
- const F = (o.y1 - o.y0) / 2 + T / 2 + J;
471
+ const F = (o.y1 - o.y0) / 2 + T / 2 + Z;
472
472
  f.attr("y", F);
473
- const k = o.x1 - o.x0, ie = o.y1 - o.y0 - 4, me = k - 2 * Q;
473
+ const k = o.x1 - o.x0, ie = o.y1 - o.y0 - 4, me = k - 2 * U;
474
474
  f.node().getComputedTextLength() > me || F + m > ie || m < I ? f.style("display", "none") : f.style("display", null);
475
475
  });
476
476
  const pe = i.diagramPadding ?? 8;
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const x=require("./chunk-JWPE2WC7-5cM5nFf6.cjs"),a=require("./extractHeadings-lDHB2sBb.cjs"),$=require("./cynefin-VYW2F7L2-MpAliYy9.cjs");var B=a.defaultConfig_default.packet,b,m=(b=class{constructor(){this.packet=[],this.setAccTitle=a.setAccTitle,this.getAccTitle=a.getAccTitle,this.setDiagramTitle=a.setDiagramTitle,this.getDiagramTitle=a.getDiagramTitle,this.getAccDescription=a.getAccDescription,this.setAccDescription=a.setAccDescription}getConfig(){const t=a.cleanAndMerge({...B,...a.getConfig().packet});return t.showBits&&(t.paddingY+=10),t}getPacket(){return this.packet}pushWord(t){t.length>0&&this.packet.push(t)}clear(){a.clear(),this.packet=[]}},a.__name(b,"PacketDB"),b),C=1e4,S=a.__name((e,t)=>{x.populateCommonDb(e,t);let o=-1,i=[],l=1;const{bitsPerRow:c}=t.getConfig();for(let{start:r,end:s,bits:p,label:d}of e.blocks){if(r!==void 0&&s!==void 0&&s<r)throw new Error(`Packet block ${r} - ${s} is invalid. End must be greater than start.`);if(r??=o+1,r!==o+1)throw new Error(`Packet block ${r} - ${s??r} is not contiguous. It should start from ${o+1}.`);if(p===0)throw new Error(`Packet block ${r} is invalid. Cannot have a zero bit field.`);for(s??=r+(p??1)-1,p??=s-r+1,o=s,a.log.debug(`Packet block ${r} - ${o} with label ${d}`);i.length<=c+1&&t.getPacket().length<C;){const[g,n]=_({start:r,end:s,bits:p,label:d},l,c);if(i.push(g),g.end+1===l*c&&(t.pushWord(i),i=[],l++),!n)break;({start:r,end:s,bits:p,label:d}=n)}}t.pushWord(i)},"populate"),_=a.__name((e,t,o)=>{if(e.start===void 0)throw new Error("start should have been set during first phase");if(e.end===void 0)throw new Error("end should have been set during first phase");if(e.start>e.end)throw new Error(`Block start ${e.start} is greater than block end ${e.end}.`);if(e.end+1<=t*o)return[e,void 0];const i=t*o-1,l=t*o;return[{start:e.start,end:i,label:e.label,bits:i-e.start},{start:l,end:e.end,label:e.label,bits:e.end-l}]},"getNextFittingBlock"),w={parser:{yy:void 0},parse:a.__name(async e=>{const t=await $.parse("packet",e),o=w.parser?.yy;if(!(o instanceof m))throw new Error("parser.parser?.yy was not a PacketDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.");a.log.debug(t),S(t,o)},"parse")},P=a.__name((e,t,o,i)=>{const l=i.db,c=l.getConfig(),{rowHeight:r,paddingY:s,bitWidth:p,bitsPerRow:d}=c,g=l.getPacket(),n=l.getDiagramTitle(),k=r+s,h=k*(g.length+1)-(n?0:r),f=p*d+2,u=a.selectSvgElement(t);u.attr("viewBox",`0 0 ${f} ${h}`),a.configureSvgSize(u,h,f,c.useMaxWidth);for(const[v,y]of g.entries())T(u,y,v,c);u.append("text").text(n).attr("x",f/2).attr("y",h-k/2).attr("dominant-baseline","middle").attr("text-anchor","middle").attr("class","packetTitle")},"draw"),T=a.__name((e,t,o,{rowHeight:i,paddingX:l,paddingY:c,bitWidth:r,bitsPerRow:s,showBits:p})=>{const d=e.append("g"),g=o*(i+c)+c;for(const n of t){const k=n.start%s*r+1,h=(n.end-n.start+1)*r-l;if(d.append("rect").attr("x",k).attr("y",g).attr("width",h).attr("height",i).attr("class","packetBlock"),d.append("text").attr("x",k+h/2).attr("y",g+i/2).attr("class","packetLabel").attr("dominant-baseline","middle").attr("text-anchor","middle").text(n.label),!p)continue;const f=n.end===n.start,u=g-2;d.append("text").attr("x",k+(f?h/2:0)).attr("y",u).attr("class","packetByte start").attr("dominant-baseline","auto").attr("text-anchor",f?"middle":"start").text(n.start),f||d.append("text").attr("x",k+h).attr("y",u).attr("class","packetByte end").attr("dominant-baseline","auto").attr("text-anchor","end").text(n.end)}},"drawWord"),D={draw:P},E={byteFontSize:"10px",startByteColor:"black",endByteColor:"black",labelColor:"black",labelFontSize:"12px",titleColor:"black",titleFontSize:"14px",blockStrokeColor:"black",blockStrokeWidth:"1",blockFillColor:"#efefef"},F=a.__name(({packet:e}={})=>{const t=a.cleanAndMerge(E,e);return`
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const x=require("./chunk-JWPE2WC7-CUBzYD4G.cjs"),a=require("./extractHeadings-DgefF9l1.cjs"),$=require("./cynefin-VYW2F7L2-MpAliYy9.cjs");var B=a.defaultConfig_default.packet,b,m=(b=class{constructor(){this.packet=[],this.setAccTitle=a.setAccTitle,this.getAccTitle=a.getAccTitle,this.setDiagramTitle=a.setDiagramTitle,this.getDiagramTitle=a.getDiagramTitle,this.getAccDescription=a.getAccDescription,this.setAccDescription=a.setAccDescription}getConfig(){const t=a.cleanAndMerge({...B,...a.getConfig().packet});return t.showBits&&(t.paddingY+=10),t}getPacket(){return this.packet}pushWord(t){t.length>0&&this.packet.push(t)}clear(){a.clear(),this.packet=[]}},a.__name(b,"PacketDB"),b),C=1e4,S=a.__name((e,t)=>{x.populateCommonDb(e,t);let o=-1,i=[],l=1;const{bitsPerRow:c}=t.getConfig();for(let{start:r,end:s,bits:p,label:d}of e.blocks){if(r!==void 0&&s!==void 0&&s<r)throw new Error(`Packet block ${r} - ${s} is invalid. End must be greater than start.`);if(r??=o+1,r!==o+1)throw new Error(`Packet block ${r} - ${s??r} is not contiguous. It should start from ${o+1}.`);if(p===0)throw new Error(`Packet block ${r} is invalid. Cannot have a zero bit field.`);for(s??=r+(p??1)-1,p??=s-r+1,o=s,a.log.debug(`Packet block ${r} - ${o} with label ${d}`);i.length<=c+1&&t.getPacket().length<C;){const[g,n]=_({start:r,end:s,bits:p,label:d},l,c);if(i.push(g),g.end+1===l*c&&(t.pushWord(i),i=[],l++),!n)break;({start:r,end:s,bits:p,label:d}=n)}}t.pushWord(i)},"populate"),_=a.__name((e,t,o)=>{if(e.start===void 0)throw new Error("start should have been set during first phase");if(e.end===void 0)throw new Error("end should have been set during first phase");if(e.start>e.end)throw new Error(`Block start ${e.start} is greater than block end ${e.end}.`);if(e.end+1<=t*o)return[e,void 0];const i=t*o-1,l=t*o;return[{start:e.start,end:i,label:e.label,bits:i-e.start},{start:l,end:e.end,label:e.label,bits:e.end-l}]},"getNextFittingBlock"),w={parser:{yy:void 0},parse:a.__name(async e=>{const t=await $.parse("packet",e),o=w.parser?.yy;if(!(o instanceof m))throw new Error("parser.parser?.yy was not a PacketDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.");a.log.debug(t),S(t,o)},"parse")},P=a.__name((e,t,o,i)=>{const l=i.db,c=l.getConfig(),{rowHeight:r,paddingY:s,bitWidth:p,bitsPerRow:d}=c,g=l.getPacket(),n=l.getDiagramTitle(),k=r+s,h=k*(g.length+1)-(n?0:r),f=p*d+2,u=a.selectSvgElement(t);u.attr("viewBox",`0 0 ${f} ${h}`),a.configureSvgSize(u,h,f,c.useMaxWidth);for(const[v,y]of g.entries())T(u,y,v,c);u.append("text").text(n).attr("x",f/2).attr("y",h-k/2).attr("dominant-baseline","middle").attr("text-anchor","middle").attr("class","packetTitle")},"draw"),T=a.__name((e,t,o,{rowHeight:i,paddingX:l,paddingY:c,bitWidth:r,bitsPerRow:s,showBits:p})=>{const d=e.append("g"),g=o*(i+c)+c;for(const n of t){const k=n.start%s*r+1,h=(n.end-n.start+1)*r-l;if(d.append("rect").attr("x",k).attr("y",g).attr("width",h).attr("height",i).attr("class","packetBlock"),d.append("text").attr("x",k+h/2).attr("y",g+i/2).attr("class","packetLabel").attr("dominant-baseline","middle").attr("text-anchor","middle").text(n.label),!p)continue;const f=n.end===n.start,u=g-2;d.append("text").attr("x",k+(f?h/2:0)).attr("y",u).attr("class","packetByte start").attr("dominant-baseline","auto").attr("text-anchor",f?"middle":"start").text(n.start),f||d.append("text").attr("x",k+h).attr("y",u).attr("class","packetByte end").attr("dominant-baseline","auto").attr("text-anchor","end").text(n.end)}},"drawWord"),D={draw:P},E={byteFontSize:"10px",startByteColor:"black",endByteColor:"black",labelColor:"black",labelFontSize:"12px",titleColor:"black",titleFontSize:"14px",blockStrokeColor:"black",blockStrokeWidth:"1",blockFillColor:"#efefef"},F=a.__name(({packet:e}={})=>{const t=a.cleanAndMerge(E,e);return`
2
2
  .packetByte {
3
3
  font-size: ${t.byteFontSize};
4
4
  }
@@ -1,14 +1,14 @@
1
- import { p as B } from "./chunk-JWPE2WC7-DpcSSOP5.js";
2
- import { _ as b, ap as m, as as C, a0 as S, $ as w, V as D, U as T, ad as P, ae as z, Q as E, O as F, an as A, aq as W, aj as _ } from "./extractHeadings-CGJexznE.js";
1
+ import { p as B } from "./chunk-JWPE2WC7-CPLOunIL.js";
2
+ import { _ as b, ah as m, ak as C, Q as S, O as w, G as D, A as T, a5 as z, a6 as P, z as A, y as E, af as F, ai as W, ab as _ } from "./extractHeadings-B2pUyEPa.js";
3
3
  import { p as N } from "./cynefin-VYW2F7L2-Bkk-F_Js.js";
4
4
  var L = W.packet, u, v = (u = class {
5
5
  constructor() {
6
- this.packet = [], this.setAccTitle = D, this.getAccTitle = T, this.setDiagramTitle = P, this.getDiagramTitle = z, this.getAccDescription = E, this.setAccDescription = F;
6
+ this.packet = [], this.setAccTitle = D, this.getAccTitle = T, this.setDiagramTitle = z, this.getDiagramTitle = P, this.getAccDescription = A, this.setAccDescription = E;
7
7
  }
8
8
  getConfig() {
9
9
  const t = m({
10
10
  ...L,
11
- ...A().packet
11
+ ...F().packet
12
12
  });
13
13
  return t.showBits && (t.paddingY += 10), t;
14
14
  }
@@ -77,22 +77,22 @@ var L = W.packet, u, v = (u = class {
77
77
  );
78
78
  w.debug(t), O(t, r);
79
79
  }, "parse")
80
- }, j = /* @__PURE__ */ b((e, t, r, s) => {
81
- const n = s.db, l = n.getConfig(), { rowHeight: a, paddingY: i, bitWidth: d, bitsPerRow: c } = l, p = n.getPacket(), o = n.getDiagramTitle(), h = a + i, g = h * (p.length + 1) - (o ? 0 : a), k = d * c + 2, f = C(t);
82
- f.attr("viewBox", `0 0 ${k} ${g}`), S(f, g, k, l.useMaxWidth);
80
+ }, G = /* @__PURE__ */ b((e, t, r, s) => {
81
+ const n = s.db, l = n.getConfig(), { rowHeight: a, paddingY: i, bitWidth: d, bitsPerRow: c } = l, p = n.getPacket(), o = n.getDiagramTitle(), g = a + i, h = g * (p.length + 1) - (o ? 0 : a), k = d * c + 2, f = C(t);
82
+ f.attr("viewBox", `0 0 ${k} ${h}`), S(f, h, k, l.useMaxWidth);
83
83
  for (const [y, $] of p.entries())
84
84
  I(f, $, y, l);
85
- f.append("text").text(o).attr("x", k / 2).attr("y", g - h / 2).attr("dominant-baseline", "middle").attr("text-anchor", "middle").attr("class", "packetTitle");
85
+ f.append("text").text(o).attr("x", k / 2).attr("y", h - g / 2).attr("dominant-baseline", "middle").attr("text-anchor", "middle").attr("class", "packetTitle");
86
86
  }, "draw"), I = /* @__PURE__ */ b((e, t, r, { rowHeight: s, paddingX: n, paddingY: l, bitWidth: a, bitsPerRow: i, showBits: d }) => {
87
87
  const c = e.append("g"), p = r * (s + l) + l;
88
88
  for (const o of t) {
89
- const h = o.start % i * a + 1, g = (o.end - o.start + 1) * a - n;
90
- if (c.append("rect").attr("x", h).attr("y", p).attr("width", g).attr("height", s).attr("class", "packetBlock"), c.append("text").attr("x", h + g / 2).attr("y", p + s / 2).attr("class", "packetLabel").attr("dominant-baseline", "middle").attr("text-anchor", "middle").text(o.label), !d)
89
+ const g = o.start % i * a + 1, h = (o.end - o.start + 1) * a - n;
90
+ if (c.append("rect").attr("x", g).attr("y", p).attr("width", h).attr("height", s).attr("class", "packetBlock"), c.append("text").attr("x", g + h / 2).attr("y", p + s / 2).attr("class", "packetLabel").attr("dominant-baseline", "middle").attr("text-anchor", "middle").text(o.label), !d)
91
91
  continue;
92
92
  const k = o.end === o.start, f = p - 2;
93
- c.append("text").attr("x", h + (k ? g / 2 : 0)).attr("y", f).attr("class", "packetByte start").attr("dominant-baseline", "auto").attr("text-anchor", k ? "middle" : "start").text(o.start), k || c.append("text").attr("x", h + g).attr("y", f).attr("class", "packetByte end").attr("dominant-baseline", "auto").attr("text-anchor", "end").text(o.end);
93
+ c.append("text").attr("x", g + (k ? h / 2 : 0)).attr("y", f).attr("class", "packetByte start").attr("dominant-baseline", "auto").attr("text-anchor", k ? "middle" : "start").text(o.start), k || c.append("text").attr("x", g + h).attr("y", f).attr("class", "packetByte end").attr("dominant-baseline", "auto").attr("text-anchor", "end").text(o.end);
94
94
  }
95
- }, "drawWord"), U = { draw: j }, q = {
95
+ }, "drawWord"), j = { draw: G }, H = {
96
96
  byteFontSize: "10px",
97
97
  startByteColor: "black",
98
98
  endByteColor: "black",
@@ -103,8 +103,8 @@ var L = W.packet, u, v = (u = class {
103
103
  blockStrokeColor: "black",
104
104
  blockStrokeWidth: "1",
105
105
  blockFillColor: "#efefef"
106
- }, G = /* @__PURE__ */ b(({ packet: e } = {}) => {
107
- const t = m(q, e);
106
+ }, K = /* @__PURE__ */ b(({ packet: e } = {}) => {
107
+ const t = m(H, e);
108
108
  return `
109
109
  .packetByte {
110
110
  font-size: ${t.byteFontSize};
@@ -129,14 +129,14 @@ var L = W.packet, u, v = (u = class {
129
129
  fill: ${t.blockFillColor};
130
130
  }
131
131
  `;
132
- }, "styles"), R = {
132
+ }, "styles"), X = {
133
133
  parser: x,
134
134
  get db() {
135
135
  return new v();
136
136
  },
137
- renderer: U,
138
- styles: G
137
+ renderer: j,
138
+ styles: K
139
139
  };
140
140
  export {
141
- R as diagram
141
+ X as diagram
142
142
  };
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const W=require("./chunk-2Q5K7J3B-BbMQR3Sm.cjs"),H=require("./chunk-JWPE2WC7-5cM5nFf6.cjs"),r=require("./extractHeadings-lDHB2sBb.cjs"),z=require("./cynefin-VYW2F7L2-MpAliYy9.cjs");var V=/[─━│┃└┗├┣]/,$=/[└┗├┣]/,O=/[─━]/,T=/^[\s│┃]+$/,B=/^\s*(title[\t ]|accTitle[\t ]*:|accDescr[\t ]*[:{])/,k=/^\s*%%/,X=" ";function D(n){return n.some(e=>V.test(e))}r.__name(D,"isBoxDrawingFormat");function S(n){for(const e of n){const t=$.exec(e);if(t?.index&&t.index>0)return t.index}return 4}r.__name(S,"inferSegmentWidth");function E(n,e){return n.replace(/\bline\s+(\d+)\b/gi,(t,i)=>{const o=parseInt(i,10),c=e.get(o);return c?`line ${c}`:t})}r.__name(E,"remapErrorLines");function N(n){const e=n.split(`
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const W=require("./chunk-2Q5K7J3B-CWLCO342.cjs"),H=require("./chunk-JWPE2WC7-CUBzYD4G.cjs"),r=require("./extractHeadings-DgefF9l1.cjs"),z=require("./cynefin-VYW2F7L2-MpAliYy9.cjs");var V=/[─━│┃└┗├┣]/,$=/[└┗├┣]/,O=/[─━]/,T=/^[\s│┃]+$/,B=/^\s*(title[\t ]|accTitle[\t ]*:|accDescr[\t ]*[:{])/,k=/^\s*%%/,X=" ";function D(n){return n.some(e=>V.test(e))}r.__name(D,"isBoxDrawingFormat");function S(n){for(const e of n){const t=$.exec(e);if(t?.index&&t.index>0)return t.index}return 4}r.__name(S,"inferSegmentWidth");function E(n,e){return n.replace(/\bline\s+(\d+)\b/gi,(t,i)=>{const o=parseInt(i,10),c=e.get(o);return c?`line ${c}`:t})}r.__name(E,"remapErrorLines");function N(n){const e=n.split(`
2
2
  `),t=new Map;let i=-1;for(const[a,s]of e.entries())if(s.trim()==="treeView-beta"){i=a;break}if(i===-1)return{text:n,lineMap:t};const o=[];for(let a=i+1;a<e.length;a++){const s=e[a];s.trim()===""||k.test(s)||B.test(s)||T.test(s)||o.push(s.replace(/\t/g," "))}if(!D(o))return{text:n,lineMap:t};const c=S(o),l=[];let d=0;for(let a=0;a<=i;a++)l.push(e[a]),d++,t.set(d,a+1);for(let a=i+1;a<e.length;a++){const s=e[a],g=s.trim(),p=a+1;if(g===""){l.push(s),d++,t.set(d,p);continue}if(k.test(s)){l.push(s),d++,t.set(d,p);continue}if(B.test(s)){l.push(s),d++,t.set(d,p);continue}if(T.test(s))continue;const h=s.replace(/\t/g," "),m=$.exec(h);if(m?.index!==void 0){const f=m.index,w=Math.round(f/c)+1;let u=f+1;for(;u<h.length&&O.test(h[u]);)u++;for(;u<h.length&&h[u]===" ";)u++;const _=h.slice(u).trimEnd();if(!_)throw new Error(`Line ${p}: Empty node — expected a filename or directory name after the box-drawing prefix`);const R=X.repeat(w);l.push(R+_),d++,t.set(d,p)}else{if(/^[\s─━│┃└┗├┣]+$/.test(h))continue;if(V.test(h))l.push(s),d++,t.set(d,p);else{if(/^\s+/.test(h))throw new Error(`Line ${p}: Unexpected indentation without box-drawing characters. In box-drawing format, use ├── or └── prefixes for indented nodes.`);l.push(s),d++,t.set(d,p)}}}return{text:l.join(`
3
3
  `),lineMap:t}}r.__name(N,"preprocessBoxDrawing");var x=new W.ImperativeState(()=>({cnt:1,stack:[{id:0,level:-1,name:"/",nodeType:"directory",children:[]}]})),G=r.__name(()=>{x.reset(),r.clear()},"clear"),P=r.__name(()=>x.records.stack[0],"getRoot"),Y=r.__name(()=>x.records.cnt,"getCount"),q=r.defaultConfig_default.treeView,F=r.__name(()=>r.cleanAndMerge(q,r.getConfig().treeView),"getConfig"),j=r.__name((n,e,t,i,o,c)=>{for(;n<=x.records.stack[x.records.stack.length-1].level;)x.records.stack.pop();const l={id:x.records.cnt++,level:n,name:e,nodeType:t,icon:o,cssClass:i,description:c,children:[]};x.records.stack[x.records.stack.length-1].children.push(l),x.records.stack.push(l)},"addNode"),Z={clear:G,addNode:j,getRoot:P,getCount:Y,getConfig:F,getAccTitle:r.getAccTitle,getAccDescription:r.getAccDescription,getDiagramTitle:r.getDiagramTitle,setAccDescription:r.setAccDescription,setAccTitle:r.setAccTitle,setDiagramTitle:r.setDiagramTitle},b=Z,J=r.__name(n=>{H.populateCommonDb(n,b);for(const e of n.nodes){const t=typeof e.indent=="number"?e.indent:0;let i=e.name;const o=i.endsWith("/");o&&(i=i.slice(0,-1));const c=o?"directory":"file",l=e.classAnnotation||void 0,d=e.iconAnnotation,a=d!==void 0?d||"none":void 0,s=e.descAnnotation||void 0,g=s?r.sanitizeText(s,r.getConfig()):void 0;b.addNode(t,i,c,l,a,g)}},"populate"),U={parse:r.__name(async n=>{const{text:e,lineMap:t}=N(n);try{const i=await z.parse("treeView",e);r.log.debug(i),J(i)}catch(i){throw t.size>0&&i instanceof Error&&(i.message=E(i.message,t)),i}},"parse")},v={prefix:"mermaid-treeview",height:24,width:24,icons:{folder:{body:'<path fill="currentColor" d="M10.59 4.59A2 2 0 0 0 9.17 4H4a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.17z"/>'},file:{body:'<path fill="currentColor" fill-rule="evenodd" d="M6 2a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8.83a2 2 0 0 0-.59-1.42l-4.82-4.82A2 2 0 0 0 13.17 2H6Zm7.5 1.9l4.6 4.6h-3.6a1 1 0 0 1-1-1V3.9Z" clip-rule="evenodd"/>'}}};function L(n,e){const t=e?.filenameIcons?.[n];if(t)return t;const i=n.lastIndexOf(".");if(i>0){const o=n.substring(i).toLowerCase(),c=e?.extensionIcons;return c?.[o]??c?.[o.slice(1)]}}r.__name(L,"detectIcon");function C(n,e){return n.includes(":")?n:n in v.icons||!e?`${v.prefix}:${n}`:`${e}:${n}`}r.__name(C,"qualifyIcon");function I(n,e){if(n.icon!=="none"){if(n.icon)return C(n.icon,e.defaultIconPack);if(e.showIcons){if(n.nodeType==="file"){const t=L(n.name,e);if(t==="none")return;if(t)return C(t,e.defaultIconPack)}return`${v.prefix}:${n.nodeType==="directory"?"folder":"file"}`}}}r.__name(I,"getNodeIcon");r.registerIconPacks([{name:v.prefix,icons:v}]);var y=14,K=4,Q=16,M=r.__name((n,e)=>`tv-icon-${n}-${e.replace(/[^\w-]/g,"-")}`,"iconSymbolId"),ee=r.__name(async(n,e,t,i)=>{const o=new Set,c=r.__name(a=>{const s=I(a,t);s&&o.add(s),a.children.forEach(c)},"collect");if(c(e),o.size===0)return;const l=await Promise.all([...o].map(async a=>({icon:a,svg:await r.getIconSVG(a,{height:y,width:y})}))),d=n.append("defs");for(const{icon:a,svg:s}of l)d.append("g").attr("id",M(i,a)).html(s)},"injectIconDefs"),te=r.__name((n,e,t,i,o,c)=>{const l=i.append("g");let d="treeView-node-label";t.nodeType==="directory"&&(d+=" treeView-node-dir"),t.cssClass&&(d+=` ${t.cssClass}`);const a=y+K,s=I(t,o),g=s!==void 0;s&&l.append("use").attr("xlink:href",`#${M(c,s)}`).attr("x",n+o.paddingX).attr("y",e+o.paddingY).attr("class","treeView-node-icon");const p=l.append("text").text(t.name).attr("dominant-baseline","middle").attr("class",d),{height:h,width:m}=p.node().getBBox(),f=h+o.paddingY*2,w=n+o.paddingX+(g?a:0);p.attr("x",w),p.attr("y",e+f/2);const u=w+m,_=m+o.paddingX*2+(g?a:0);return t.BBox={x:n,y:e,width:_,height:f},t.cssClass?.split(/\s+/).includes("highlight")&&l.insert("rect",":first-child").attr("x",n).attr("y",e+1).attr("width",0).attr("height",f-2).attr("rx",3).attr("class","treeView-highlight-bg"),{node:t,nodeGroup:l,labelRightEdge:u,centerY:e+f/2}},"positionLabel"),A=r.__name((n,e,t,i,o,c)=>n.append("line").attr("x1",e).attr("y1",t).attr("x2",i).attr("y2",o).attr("stroke-width",c).attr("class","treeView-node-line"),"positionLine"),ne=r.__name((n,e,t,i)=>{let o=0,c=0;const l=[],d=r.__name((g,p,h,m)=>{const f=m*(h.rowIndent+h.paddingX),w=te(f,o,p,g,h,i);l.push(w);const{height:u,width:_}=p.BBox;A(g,f-h.rowIndent,o+u/2,f,o+u/2,h.lineThickness),c=Math.max(c,f+_),o+=u},"drawNode"),a=r.__name((g,p=0)=>{d(n,g,t,p),g.children.forEach(w=>{a(w,p+1)});const{x:h,y:m,height:f}=g.BBox;if(g.children.length){const{y:w,height:u}=g.children[g.children.length-1].BBox;A(n,h+t.paddingX,m+f,h+t.paddingX,w+u/2+t.lineThickness/2,t.lineThickness)}},"processNode");a(e);const s=l.filter(g=>g.node.description);if(s.length>0){const p=Math.max(...l.map(h=>h.labelRightEdge))+Q;for(const h of s){const f=h.nodeGroup.append("text").text(h.node.description).attr("dominant-baseline","middle").attr("class","treeView-node-description").attr("x",p).attr("y",h.centerY).node().getBBox();c=Math.max(c,p+f.width+t.paddingX)}}for(const g of l)if(g.node.cssClass?.split(/\s+/).includes("highlight")){const p=g.nodeGroup.select(".treeView-highlight-bg");if(!p.empty()){const h=c-g.node.BBox.x+8;p.attr("width",h),c=Math.max(c,g.node.BBox.x+h+2)}}return{totalHeight:o,totalWidth:c}},"drawTree"),re=r.__name(async(n,e,t,i)=>{r.log.debug(`Rendering treeView diagram
4
4
  `+n);const o=i.db,c=o.getRoot(),l=o.getConfig(),d=r.selectSvgElement(e);await ee(d,c,l,e);const a=d.append("g");a.attr("class","tree-view");const{totalHeight:s,totalWidth:g}=ne(a,c,l,e);d.attr("viewBox",`-${l.lineThickness/2} 0 ${g} ${s}`),r.configureSvgSize(d,s,g,l.useMaxWidth)},"draw"),ie={draw:re},oe=ie,se={labelFontSize:"16px",labelColor:"black",lineColor:"black",iconColor:"#546e7a",descriptionColor:"#6a9955",highlightBg:"rgba(255, 193, 7, 0.15)",highlightStroke:"#ffc107"},ae=r.__name(({treeView:n})=>{const{labelFontSize:e,labelColor:t,lineColor:i,iconColor:o,descriptionColor:c,highlightBg:l,highlightStroke:d}=r.cleanAndMerge(se,n);return`