@intent-hq/web 2.383.0 → 2.383.2

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 (148) hide show
  1. package/package.json +1 -1
  2. package/web/app/immutable/chunks/{BP4Hm_tD.js → -wH-MzHg.js} +2 -2
  3. package/web/app/immutable/chunks/{W2WLehNu.js → 03HQb6Nz.js} +1 -1
  4. package/web/app/immutable/chunks/{1mf839wD.js → 1eGVa7uN.js} +1 -1
  5. package/web/app/immutable/chunks/{DliHiH6M.js → 1pbfqlmC.js} +4 -4
  6. package/web/app/immutable/chunks/{B5M0SkuR.js → 46R-6bwp.js} +1 -1
  7. package/web/app/immutable/chunks/{Dqdvt4Zr.js → 4lxKnD4E.js} +1 -1
  8. package/web/app/immutable/chunks/{hb4NYXGo.js → 5Ya2tobY.js} +1 -1
  9. package/web/app/immutable/chunks/{D5xMHmv3.js → B-HvfCLM.js} +1 -1
  10. package/web/app/immutable/chunks/{D9XKwVJX.js → B54vxPSC.js} +3 -3
  11. package/web/app/immutable/chunks/{BWGnuS1v.js → B6Ea_mQK.js} +1 -1
  12. package/web/app/immutable/chunks/{DY0qeQe8.js → B73pME8S.js} +1 -1
  13. package/web/app/immutable/chunks/{DE7dSDHO.js → B8eFCa5E.js} +1 -1
  14. package/web/app/immutable/chunks/{lVh2oAeQ.js → BALrIQ13.js} +1 -1
  15. package/web/app/immutable/chunks/{D3O8Vtuw.js → BBLmHF-x.js} +1 -1
  16. package/web/app/immutable/chunks/{eQVXRlbn.js → BCEIpZAe.js} +1 -1
  17. package/web/app/immutable/chunks/{DSbNJBwA.js → BDU9DorN.js} +1 -1
  18. package/web/app/immutable/chunks/{CE7VCun2.js → BFnrc2L0.js} +3 -3
  19. package/web/app/immutable/chunks/{CMrw-y4l.js → BGOOya_A.js} +13 -13
  20. package/web/app/immutable/chunks/{BtTA7CNV.js → BI4Gr7El.js} +1 -1
  21. package/web/app/immutable/chunks/{pYQh_Bw_.js → BK3I1582.js} +1 -1
  22. package/web/app/immutable/chunks/{puJFvQs5.js → BL78xDnE.js} +1 -1
  23. package/web/app/immutable/chunks/{Bu7LYnzn.js → BNsReuZq.js} +1 -1
  24. package/web/app/immutable/chunks/{CRs9zG2A.js → BPlFpIis.js} +1 -1
  25. package/web/app/immutable/chunks/{BlDljC9y.js → BQpH3OoI.js} +1 -1
  26. package/web/app/immutable/chunks/{DF2_1gr9.js → BTLLdzM2.js} +1 -1
  27. package/web/app/immutable/chunks/{0HRWclfL.js → BUAZt4k8.js} +1 -1
  28. package/web/app/immutable/chunks/{wIMcEpgB.js → BUtMbPHc.js} +1 -1
  29. package/web/app/immutable/chunks/{duDdSCAT.js → BVGxYq00.js} +1 -1
  30. package/web/app/immutable/chunks/{CuewocoW.js → BYf4P-Xv.js} +1 -1
  31. package/web/app/immutable/chunks/{lwlI9u_5.js → BYtUt_7N.js} +1 -1
  32. package/web/app/immutable/chunks/{BsN2abqQ.js → BaJk_Nxp.js} +1 -1
  33. package/web/app/immutable/chunks/{M5Dwuu-X.js → Bk0JLGzR.js} +1 -1
  34. package/web/app/immutable/chunks/{PO_5m99x.js → Bm_BMJ5S.js} +1 -1
  35. package/web/app/immutable/chunks/{nXfD7jHz.js → BnOThusB.js} +2 -2
  36. package/web/app/immutable/chunks/{pwJelZzH.js → BnaqhxMa.js} +1 -1
  37. package/web/app/immutable/chunks/{DIG1mTAN.js → Bnurq_Pf.js} +2 -2
  38. package/web/app/immutable/chunks/{DOEI9gYY.js → BsLGFv7V.js} +1 -1
  39. package/web/app/immutable/chunks/{Bn880vDO.js → BvYSMLN-.js} +1 -1
  40. package/web/app/immutable/chunks/{cebxNJuC.js → Bw02Klel.js} +4 -4
  41. package/web/app/immutable/chunks/{DWiU4388.js → BxKrk2Xm.js} +1 -1
  42. package/web/app/immutable/chunks/{8r75D0ru.js → C2UQ69-V.js} +1 -1
  43. package/web/app/immutable/chunks/{DMDFfHqn.js → C4oBHTC7.js} +3 -3
  44. package/web/app/immutable/chunks/{S8ugWfAx.js → C5E04JHB.js} +1 -1
  45. package/web/app/immutable/chunks/{B_LcgbLl.js → C5wdJ-5g.js} +1 -1
  46. package/web/app/immutable/chunks/{DdXBqrnq.js → C68E7oEN.js} +1 -1
  47. package/web/app/immutable/chunks/{BAOaoX22.js → C6aFracI.js} +1 -1
  48. package/web/app/immutable/chunks/{wUSGg9l9.js → C9nDXeDI.js} +1 -1
  49. package/web/app/immutable/chunks/{CXS2Ba3S.js → CBvXBpaM.js} +1 -1
  50. package/web/app/immutable/chunks/{COhRCR9P.js → CCMszM-p.js} +2 -2
  51. package/web/app/immutable/chunks/{B2kb4xeF.js → CCNu9Rxf.js} +1 -1
  52. package/web/app/immutable/chunks/{DVROSXw1.js → CCOwocDi.js} +1 -1
  53. package/web/app/immutable/chunks/{BURZJh0r.js → CCsFilO2.js} +1 -1
  54. package/web/app/immutable/chunks/{k0JmlCVk.js → CDTDaiWd.js} +1 -1
  55. package/web/app/immutable/chunks/{DWWC1JsA.js → CERS_x_a.js} +1 -1
  56. package/web/app/immutable/chunks/{AlEhxd2n.js → CHJf6CKw.js} +1 -1
  57. package/web/app/immutable/chunks/{Ct_q9q1G.js → CKjDn57H.js} +1 -1
  58. package/web/app/immutable/chunks/{DO19lrhU.js → CMW1kPYq.js} +1 -1
  59. package/web/app/immutable/chunks/{3xK9OOJy.js → COs0nq_h.js} +1 -1
  60. package/web/app/immutable/chunks/{BeNn_MBw.js → CPfM5J_u.js} +1 -1
  61. package/web/app/immutable/chunks/{Db3Wob9h.js → CRmihGrZ.js} +1 -1
  62. package/web/app/immutable/chunks/{DlJZrxef.js → CTKRrTvZ.js} +2 -2
  63. package/web/app/immutable/chunks/{DLbcryNV.js → CU2vyfYu.js} +1 -1
  64. package/web/app/immutable/chunks/{CxOmNieJ.js → CaOXszWh.js} +1 -1
  65. package/web/app/immutable/chunks/{C0I_aIej.js → CecaUouy.js} +2 -2
  66. package/web/app/immutable/chunks/{DIFhl0he.js → CfqtYdKm.js} +1 -1
  67. package/web/app/immutable/chunks/{C_78iNNC.js → Ci6sHn75.js} +1 -1
  68. package/web/app/immutable/chunks/{L4HdMFBq.js → CjoAn_VO.js} +1 -1
  69. package/web/app/immutable/chunks/{DeHvIzqj.js → CkJj_XU1.js} +2 -2
  70. package/web/app/immutable/chunks/{C5yhcKTW.js → ClJH5EDU.js} +1 -1
  71. package/web/app/immutable/chunks/{DGa13zF2.js → Cq8vwNeW.js} +1 -1
  72. package/web/app/immutable/chunks/{DvSURWC2.js → CqaNT709.js} +3 -3
  73. package/web/app/immutable/chunks/{DMQmPhTl.js → CtxKEpQR.js} +1 -1
  74. package/web/app/immutable/chunks/{baWz1QxB.js → Cv4Nh90j.js} +1 -1
  75. package/web/app/immutable/chunks/{DlliJA4a.js → D3326bvN.js} +3 -3
  76. package/web/app/immutable/chunks/{BX-LCSle.js → D7OzCs6b.js} +1 -1
  77. package/web/app/immutable/chunks/{B2f9w8eB.js → D89oEjt1.js} +1 -1
  78. package/web/app/immutable/chunks/{Cmq0pZIQ.js → D9PsslUR.js} +2 -2
  79. package/web/app/immutable/chunks/{Ba8ctcpl.js → DBUDGVnq.js} +1 -1
  80. package/web/app/immutable/chunks/{CYtPXqgK.js → DF4N7xKD.js} +1 -1
  81. package/web/app/immutable/chunks/{68Tuqjp3.js → DJ7NuUn9.js} +1 -1
  82. package/web/app/immutable/chunks/{Cs2lHsyA.js → DKAEb0Nq.js} +1 -1
  83. package/web/app/immutable/chunks/{BJ_CKcUH.js → DKN2oFQh.js} +1 -1
  84. package/web/app/immutable/chunks/{jcl0zObl.js → DMis7v6J.js} +2 -2
  85. package/web/app/immutable/chunks/{BG9tvqwj.js → DOBbyUSI.js} +1 -1
  86. package/web/app/immutable/chunks/{CPTZJWC9.js → DOTkiVAt.js} +1 -1
  87. package/web/app/immutable/chunks/{BJWt3PU_.js → DPTJGt-4.js} +1 -1
  88. package/web/app/immutable/chunks/{p9X2tUBM.js → DQK1MQRy.js} +1 -1
  89. package/web/app/immutable/chunks/{BA-rwlhs.js → DRJrqXOC.js} +1 -1
  90. package/web/app/immutable/chunks/{C8HkqBCb.js → DTKdf69M.js} +1 -1
  91. package/web/app/immutable/chunks/{BFIcslMA.js → DU6GzJo7.js} +1 -1
  92. package/web/app/immutable/chunks/{BO_DS0RP.js → DUrqr-_9.js} +1 -1
  93. package/web/app/immutable/chunks/{Bir0Y4gf.js → DWKRk5qT.js} +1 -1
  94. package/web/app/immutable/chunks/{CuW3cq2w.js → DYAwS63B.js} +1 -1
  95. package/web/app/immutable/chunks/{DEVX5wOm.js → DYw-jZnX.js} +2 -2
  96. package/web/app/immutable/chunks/{Bs2WE18g.js → DaA4cwB7.js} +1 -1
  97. package/web/app/immutable/chunks/{CPQ-kfy2.js → DbhHGGnX.js} +1 -1
  98. package/web/app/immutable/chunks/{UhL0ohiG.js → Dc-K8gB4.js} +1 -1
  99. package/web/app/immutable/chunks/{CAgnBDaV.js → DgKxSqnb.js} +3 -3
  100. package/web/app/immutable/chunks/{DPA45OJk.js → DhFCW7ui.js} +1 -1
  101. package/web/app/immutable/chunks/{DUIwUF5m.js → Doz22Fw6.js} +1 -1
  102. package/web/app/immutable/chunks/{D_ovLyyd.js → DqVxq9qz.js} +1 -1
  103. package/web/app/immutable/chunks/{Csc9ETIC.js → DqnZckLn.js} +1 -1
  104. package/web/app/immutable/chunks/{U_OQY9n3.js → DtEcb9Kl.js} +1 -1
  105. package/web/app/immutable/chunks/{jn4zbMQy.js → DynK7LpZ.js} +1 -1
  106. package/web/app/immutable/chunks/{DpHn84BV.js → HnXWs0wn.js} +1 -1
  107. package/web/app/immutable/chunks/{9bukzQMK.js → ML4TWB19.js} +1 -1
  108. package/web/app/immutable/chunks/{DpyfxjgC.js → MpqcTAsG.js} +1 -1
  109. package/web/app/immutable/chunks/{Bz7R1ahj.js → NV_vO3Eg.js} +4 -4
  110. package/web/app/immutable/chunks/{BETzmOvF.js → OKklWV7_.js} +1 -1
  111. package/web/app/immutable/chunks/{9gSjzhYc.js → SQ1JAgBB.js} +1 -1
  112. package/web/app/immutable/chunks/{CFvBUo4R.js → TLXVPYri.js} +3 -3
  113. package/web/app/immutable/chunks/{CEgeN2ws.js → TkG8RZHk.js} +1 -1
  114. package/web/app/immutable/chunks/{BwG2vfja.js → VQuhn_Lt.js} +1 -1
  115. package/web/app/immutable/chunks/{BUQUek8g.js → YJiBWTwd.js} +1 -1
  116. package/web/app/immutable/chunks/{CtNkh9GR.js → _Yaq9uZY.js} +1 -1
  117. package/web/app/immutable/chunks/{ChTVnFH2.js → aR25fz44.js} +1 -1
  118. package/web/app/immutable/chunks/{IQ13JH5A.js → dbsKZB4V.js} +1 -1
  119. package/web/app/immutable/chunks/{DjxLojU4.js → g9tUAsNS.js} +1 -1
  120. package/web/app/immutable/chunks/{BmUPAQa9.js → gMS62uii.js} +1 -1
  121. package/web/app/immutable/chunks/{CrkMZYjb.js → g_W_KtW7.js} +1 -1
  122. package/web/app/immutable/chunks/{BfvZe-kN.js → hSGzq1Th.js} +6 -6
  123. package/web/app/immutable/chunks/{DK-ttWlY.js → kLtCLkab.js} +1 -1
  124. package/web/app/immutable/chunks/mEP1tNc7.js +10 -0
  125. package/web/app/immutable/chunks/{eTsHzcIE.js → pWMJoQQd.js} +3 -3
  126. package/web/app/immutable/chunks/{BSKf8bnG.js → sSkm7u9g.js} +1 -1
  127. package/web/app/immutable/chunks/{sdV4t8T0.js → t_AdNc5B.js} +1 -1
  128. package/web/app/immutable/chunks/{DFcppVBl.js → yOorim_l.js} +1 -1
  129. package/web/app/immutable/entry/{app.PfV9Bd5g.js → app.D9Jtjo9u.js} +2 -2
  130. package/web/app/immutable/entry/start.CkN6A8cF.js +1 -0
  131. package/web/app/immutable/nodes/{0.N3QFhxpx.js → 0.D7G8zYtJ.js} +1 -1
  132. package/web/app/immutable/nodes/{1.Cuki-Q-c.js → 1.CeP6l7to.js} +1 -1
  133. package/web/app/immutable/nodes/{10.CzZBTiyD.js → 10.B0HUYmSO.js} +4 -4
  134. package/web/app/immutable/nodes/{11.Cc53X5P2.js → 11.DK72_yYq.js} +1 -1
  135. package/web/app/immutable/nodes/{15.D2GMHiSb.js → 15.u_u2o_gG.js} +1 -1
  136. package/web/app/immutable/nodes/{19.DvFJngD4.js → 19.Ckyt7QSw.js} +2 -2
  137. package/web/app/immutable/nodes/{2.B94-26jU.js → 2.B6dSCynl.js} +4 -4
  138. package/web/app/immutable/nodes/{3.D7lbuuWp.js → 3.BYMfscY7.js} +1 -1
  139. package/web/app/immutable/nodes/{4.YSZzuDIT.js → 4.BbNp4BGO.js} +1 -1
  140. package/web/app/immutable/nodes/{5.ymicNL_Y.js → 5.BY-7-cOX.js} +1 -1
  141. package/web/app/immutable/nodes/{6.CtS0PFqR.js → 6.CgyQkAW2.js} +1 -1
  142. package/web/app/immutable/nodes/{7.BVAyauMB.js → 7.573udsYL.js} +1 -1
  143. package/web/app/immutable/nodes/{8.CHlBOO6u.js → 8.CRV-jSmC.js} +1 -1
  144. package/web/app/immutable/nodes/{9.CNAqB0x1.js → 9.BWV1lf5B.js} +4 -4
  145. package/web/app/version.json +1 -1
  146. package/web/index.html +9 -9
  147. package/web/app/immutable/chunks/4BrIaRe_.js +0 -10
  148. package/web/app/immutable/entry/start.kviRYMjm.js +0 -1
@@ -1,3 +1,3 @@
1
- import{t as D,bo as d,bw as P,b}from"./C0QTy0Sy.js";import{bs as S,a7 as A,ay as C,W as M,bn as x,aA as m,aD as i,c9 as c}from"./3SdAC2_C.js";import{i as z}from"./bhKPSdq4.js";import{D as f,M as B}from"./cebxNJuC.js";import{S as J,p as N}from"./DPA45OJk.js";import{N as W}from"./DVROSXw1.js";import{Jv as $,vI as j,bq as E}from"./tr-2J8Mf.js";import{h as K}from"./DIG1mTAN.js";import{a9 as O}from"./BaujsV9k.js";function R(l,s){if(new.target)return D({component:R,...l});S(s,!0);let o=d(s,"kind",7),t=d(s,"source",7),a=d(s,"workspaceId",7);const g=new W,p=c(()=>{if(o()==="mermaid")return null;const e=g.parseMarkdown(`\`\`\`ws-block:diagram
1
+ import{t as D,bo as d,bw as P,b}from"./C0QTy0Sy.js";import{bs as S,a7 as A,ay as C,W as M,bn as x,aA as m,aD as i,c9 as c}from"./3SdAC2_C.js";import{i as z}from"./bhKPSdq4.js";import{D as f,M as B}from"./Bw02Klel.js";import{S as J,p as N}from"./DhFCW7ui.js";import{N as W}from"./CCOwocDi.js";import{Jv as $,vI as j,bq as E}from"./tr-2J8Mf.js";import{h as K}from"./Bnurq_Pf.js";import{a9 as O}from"./BaujsV9k.js";function R(l,s){if(new.target)return D({component:R,...l});S(s,!0);let o=d(s,"kind",7),t=d(s,"source",7),a=d(s,"workspaceId",7);const g=new W,p=c(()=>{if(o()==="mermaid")return null;const e=g.parseMarkdown(`\`\`\`ws-block:diagram
2
2
  ${t()}
3
3
  \`\`\``)[0],r=e?.primitive.type==="diagram"?JSON.stringify(e.primitive):t();return N(r,!0)});function k(e,r){if(!a()||!r.target)return;const n={openInAdjacentPanel:e.metaKey||e.ctrlKey,sourcePanelId:e.target?.closest("[data-panel-id]")?.getAttribute("data-panel-id")??void 0};r.type==="file"?$.dispatch(j(a(),r.target,n)):r.type==="note"&&K(O(r.target,a()),{...n,workspaceId:E(a()),event:e})}var w={get kind(){return o()},set kind(e){o(e),m()},get source(){return t()},set source(e){t(e),m()},get workspaceId(){return a()},set workspaceId(e){a(e),m()},$set:P,$on:(e,r)=>b(s,e,r)},u=A(),v=C(u);{var y=e=>{f(e,{kind:"mermaid",rendererOwnsActions:!0,children:(r,n)=>{B(r,{get code(){return t()},showExportButton:!0})},$$slots:{default:!0}})},I=e=>{f(e,{kind:"custom",children:(r,n)=>{{let h=c(()=>i(p)?.diagram??null),_=c(()=>i(p)?.error);J(r,{get diagram(){return i(h)},get source(){return t()},get sourceError(){return i(_)},onBindingClick:k})}},$$slots:{default:!0}})};z(v,e=>{o()==="mermaid"?e(y):e(I,-1)})}return M(l,u),x(w)}export{R as default};
@@ -1,4 +1,4 @@
1
- import{s as xe}from"./Dqdvt4Zr.js";import{p as be}from"./ChTVnFH2.js";import{b as C,a6 as Ce,W as ae,q as ee,aX as we,B as Te,ay as te,b8 as B,aW as Z,a_ as Le,V as $e,b0 as Ae,Y as Fe,U as _e,aZ as Ne,O as Me,ao as ke,r as Ve}from"./cebxNJuC.js";import{p as ze}from"./BFeEPayU.js";import{f as O,o as Q}from"./9bukzQMK.js";function De(t){var a=0,l=t.children,n=l&&l.length;if(!n)a=1;else for(;--n>=0;)a+=l[n].value;t.value=a}function Pe(){return this.eachAfter(De)}function Be(t,a){let l=-1;for(const n of this)t.call(a,n,++l,this);return this}function We(t,a){for(var l=this,n=[l],s,r,h=-1;l=n.pop();)if(t.call(a,l,++h,this),s=l.children)for(r=s.length-1;r>=0;--r)n.push(s[r]);return this}function Ee(t,a){for(var l=this,n=[l],s=[],r,h,d,f=-1;l=n.pop();)if(s.push(l),r=l.children)for(h=0,d=r.length;h<d;++h)n.push(r[h]);for(;l=s.pop();)t.call(a,l,++f,this);return this}function Re(t,a){let l=-1;for(const n of this)if(t.call(a,n,++l,this))return n}function He(t){return this.eachAfter(function(a){for(var l=+t(a.data)||0,n=a.children,s=n&&n.length;--s>=0;)l+=n[s].value;a.value=l})}function Ie(t){return this.eachBefore(function(a){a.children&&a.children.sort(t)})}function Oe(t){for(var a=this,l=qe(a,t),n=[a];a!==l;)a=a.parent,n.push(a);for(var s=n.length;t!==l;)n.splice(s,0,t),t=t.parent;return n}function qe(t,a){if(t===a)return t;var l=t.ancestors(),n=a.ancestors(),s=null;for(t=l.pop(),a=n.pop();t===a;)s=t,t=l.pop(),a=n.pop();return s}function Ge(){for(var t=this,a=[t];t=t.parent;)a.push(t);return a}function Xe(){return Array.from(this)}function Ye(){var t=[];return this.eachBefore(function(a){a.children||t.push(a)}),t}function je(){var t=this,a=[];return t.each(function(l){l!==t&&a.push({source:l.parent,target:l})}),a}function*Ue(){var t=this,a,l=[t],n,s,r;do for(a=l.reverse(),l=[];t=a.pop();)if(yield t,n=t.children)for(s=0,r=n.length;s<r;++s)l.push(n[s]);while(l.length)}function ne(t,a){t instanceof Map?(t=[void 0,t],a===void 0&&(a=Ke)):a===void 0&&(a=Je);for(var l=new Y(t),n,s=[l],r,h,d,f;n=s.pop();)if((h=a(n.data))&&(f=(h=Array.from(h)).length))for(n.children=h,d=f-1;d>=0;--d)s.push(r=h[d]=new Y(h[d])),r.parent=n,r.depth=n.depth+1;return l.eachBefore(et)}function Ze(){return ne(this).eachBefore(Qe)}function Je(t){return t.children}function Ke(t){return Array.isArray(t)?t[1]:null}function Qe(t){t.data.value!==void 0&&(t.value=t.data.value),t.data=t.data.data}function et(t){var a=0;do t.height=a;while((t=t.parent)&&t.height<++a)}function Y(t){this.data=t,this.depth=this.height=0,this.parent=null}Y.prototype=ne.prototype={constructor:Y,count:Pe,each:Be,eachAfter:Ee,eachBefore:We,find:Re,sum:He,sort:Ie,path:Oe,ancestors:Ge,descendants:Xe,leaves:Ye,links:je,copy:Ze,[Symbol.iterator]:Ue};function tt(t){if(typeof t!="function")throw new Error;return t}function q(){return 0}function G(t){return function(){return t}}function at(t){t.x0=Math.round(t.x0),t.y0=Math.round(t.y0),t.x1=Math.round(t.x1),t.y1=Math.round(t.y1)}function oe(t,a,l,n,s){for(var r=t.children,h,d=-1,f=r.length,o=t.value&&(n-a)/t.value;++d<f;)h=r[d],h.y0=l,h.y1=s,h.x0=a,h.x1=a+=h.value*o}Object.create(Y.prototype);function ce(t,a,l,n,s){for(var r=t.children,h,d=-1,f=r.length,o=t.value&&(s-l)/t.value;++d<f;)h=r[d],h.x0=a,h.x1=n,h.y0=l,h.y1=l+=h.value*o}var he=(1+Math.sqrt(5))/2;function de(t,a,l,n,s,r){for(var h=[],d=a.children,f,o,u=0,S=0,i=d.length,v,x,g=a.value,p,b,_,$,z,R,N;u<i;){v=s-l,x=r-n;do p=d[S++].value;while(!p&&S<i);for(b=_=p,R=Math.max(x/v,v/x)/(g*t),N=p*p*R,z=Math.max(_/N,N/b);S<i;++S){if(p+=o=d[S].value,o<b&&(b=o),o>_&&(_=o),N=p*p*R,$=Math.max(_/N,N/b),$>z){p-=o;break}z=$}h.push(f={value:p,dice:v<x,children:d.slice(u,S)}),f.dice?oe(f,l,n,s,g?n+=x*p/g:r):ce(f,l,n,g?l+=v*p/g:s,r),g-=p,u=S}return h}var nt=(function t(a){function l(n,s,r,h,d){de(a,n,s,r,h,d)}return l.ratio=function(n){return t((n=+n)>1?n:1)},l})(he);function lt(){var t=nt,a=!1,l=1,n=1,s=[0],r=q,h=q,d=q,f=q,o=q;function u(i){return i.x0=i.y0=0,i.x1=l,i.y1=n,i.eachBefore(S),s=[0],a&&i.eachBefore(at),i}function S(i){var v=s[i.depth],x=i.x0+v,g=i.y0+v,p=i.x1-v,b=i.y1-v;p<x&&(x=p=(x+p)/2),b<g&&(g=b=(g+b)/2),i.x0=x,i.y0=g,i.x1=p,i.y1=b,i.children&&(v=s[i.depth+1]=r(i)/2,x+=o(i)-v,g+=h(i)-v,p-=d(i)-v,b-=f(i)-v,p<x&&(x=p=(x+p)/2),b<g&&(g=b=(g+b)/2),t(i,x,g,p,b))}return u.round=function(i){return arguments.length?(a=!!i,u):a},u.size=function(i){return arguments.length?(l=+i[0],n=+i[1],u):[l,n]},u.tile=function(i){return arguments.length?(t=tt(i),u):t},u.padding=function(i){return arguments.length?u.paddingInner(i).paddingOuter(i):u.paddingInner()},u.paddingInner=function(i){return arguments.length?(r=typeof i=="function"?i:G(+i),u):r},u.paddingOuter=function(i){return arguments.length?u.paddingTop(i).paddingRight(i).paddingBottom(i).paddingLeft(i):u.paddingTop()},u.paddingTop=function(i){return arguments.length?(h=typeof i=="function"?i:G(+i),u):h},u.paddingRight=function(i){return arguments.length?(d=typeof i=="function"?i:G(+i),u):d},u.paddingBottom=function(i){return arguments.length?(f=typeof i=="function"?i:G(+i),u):f},u.paddingLeft=function(i){return arguments.length?(o=typeof i=="function"?i:G(+i),u):o},u}(function t(a){function l(n,s,r,h,d){if((f=n._squarify)&&f.ratio===a)for(var f,o,u,S,i=-1,v,x=f.length,g=n.value;++i<x;){for(o=f[i],u=o.children,S=o.value=0,v=u.length;S<v;++S)o.value+=u[S].value;o.dice?oe(o,s,r,h,g?r+=(d-r)*o.value/g:d):ce(o,s,r,g?s+=(h-s)*o.value/g:h,d),g-=o.value}else n._squarify=f=de(a,n,s,r,h,d),f.ratio=a}return l.ratio=function(n){return t((n=+n)>1?n:1)},l})(he);var E,ue=(E=class{constructor(){this.nodes=[],this.levels=new Map,this.outerNodes=[],this.classes=new Map,this.setAccTitle=Le,this.getAccTitle=$e,this.setDiagramTitle=Ae,this.getDiagramTitle=Fe,this.getAccDescription=_e,this.setAccDescription=Ne}getNodes(){return this.nodes}getConfig(){const a=Me,l=ae();return ee({...a.treemap,...l.treemap??{}})}addNode(a,l){this.nodes.push(a),this.levels.set(a,l),l===0&&(this.outerNodes.push(a),this.root??=a)}getRoot(){return{name:"",children:this.outerNodes}}addClass(a,l){const n=this.classes.get(a)??{id:a,styles:[],textStyles:[]},s=l.replace(/\\,/g,"§§§").replace(/,/g,";").replace(/§§§/g,",").split(";");s&&s.forEach(r=>{ke(r)&&(n?.textStyles?n.textStyles.push(r):n.textStyles=[r]),n?.styles?n.styles.push(r):n.styles=[r]}),this.classes.set(a,n)}getClasses(){return this.classes}getStylesForClass(a){return this.classes.get(a)?.styles??[]}clear(){Ve(),this.nodes=[],this.levels=new Map,this.outerNodes=[],this.classes=new Map,this.root=void 0}},C(E,"TreeMapDB"),E);function pe(t){if(!t.length)return[];const a=[],l=[];return t.forEach(n=>{const s={name:n.name,children:n.type==="Leaf"?void 0:[]};for(s.classSelector=n?.classSelector,n?.cssCompiledStyles&&(s.cssCompiledStyles=n.cssCompiledStyles),n.type==="Leaf"&&n.value!==void 0&&(s.value=n.value);l.length>0&&l[l.length-1].level>=n.level;)l.pop();if(l.length===0)a.push(s);else{const r=l[l.length-1].node;r.children?r.children.push(s):r.children=[s]}n.type!=="Leaf"&&l.push({node:s,level:n.level})}),a}C(pe,"buildHierarchy");var st=C((t,a)=>{be(t,a);const l=[];for(const r of t.TreemapRows??[])r.$type==="ClassDefStatement"&&a.addClass(r.className??"",r.styleText??"");for(const r of t.TreemapRows??[]){const h=r.item;if(!h)continue;const d=r.indent?parseInt(r.indent):0,f=rt(h),o=h.classSelector?a.getStylesForClass(h.classSelector):[],u=o.length>0?o:void 0,S={level:d,name:f,type:h.$type,value:h.value,classSelector:h.classSelector,cssCompiledStyles:u};l.push(S)}const n=pe(l),s=C((r,h)=>{for(const d of r)a.addNode(d,h),d.children&&d.children.length>0&&s(d.children,h+1)},"addNodesRecursively");s(n,0)},"populate"),rt=C(t=>t.name?String(t.name):"","getItemName"),fe={parser:{yy:void 0},parse:C(async t=>{try{const l=await ze("treemap",t);te.debug("Treemap AST:",l);const n=fe.parser?.yy;if(!(n instanceof ue))throw new Error("parser.parser?.yy was not a TreemapDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.");st(l,n)}catch(a){throw te.error("Error parsing treemap:",a),a}},"parse")},it=10,W=10,X=25,ot=C((t,a,l,n)=>{const s=n.db,r=s.getConfig(),h=r.padding??it,d=s.getDiagramTitle(),f=s.getRoot(),{themeVariables:o}=ae();if(!f)return;const u=d?30:0,S=we(a),i=r.nodeWidth?r.nodeWidth*W:960,v=r.nodeHeight?r.nodeHeight*W:500,x=i,g=v+u;S.attr("viewBox",`0 0 ${x} ${g}`),Te(S,g,x,r.useMaxWidth);let p;try{const e=r.valueFormat||",";if(e==="$0,0")p=C(c=>"$"+O(",")(c),"valueFormat");else if(e.startsWith("$")&&e.includes(",")){const c=/\.\d+/.exec(e),m=c?c[0]:"";p=C(w=>"$"+O(","+m)(w),"valueFormat")}else if(e.startsWith("$")){const c=e.substring(1);p=C(m=>"$"+O(c||"")(m),"valueFormat")}else p=O(e)}catch(e){te.error("Error creating format function:",e),p=O(",")}const b=Q().range(["transparent",o.cScale0,o.cScale1,o.cScale2,o.cScale3,o.cScale4,o.cScale5,o.cScale6,o.cScale7,o.cScale8,o.cScale9,o.cScale10,o.cScale11]),_=Q().range(["transparent",o.cScalePeer0,o.cScalePeer1,o.cScalePeer2,o.cScalePeer3,o.cScalePeer4,o.cScalePeer5,o.cScalePeer6,o.cScalePeer7,o.cScalePeer8,o.cScalePeer9,o.cScalePeer10,o.cScalePeer11]),$=Q().range([o.cScaleLabel0,o.cScaleLabel1,o.cScaleLabel2,o.cScaleLabel3,o.cScaleLabel4,o.cScaleLabel5,o.cScaleLabel6,o.cScaleLabel7,o.cScaleLabel8,o.cScaleLabel9,o.cScaleLabel10,o.cScaleLabel11]);d&&S.append("text").attr("x",x/2).attr("y",u/2).attr("class","treemapTitle").attr("text-anchor","middle").attr("dominant-baseline","middle").text(d);const z=S.append("g").attr("transform",`translate(0, ${u})`).attr("class","treemapContainer"),R=ne(f).sum(e=>e.value??0).sort((e,c)=>(c.value??0)-(e.value??0)),le=lt().size([i,v]).paddingTop(e=>e.children&&e.children.length>0?X+W:0).paddingInner(h).paddingLeft(e=>e.children&&e.children.length>0?W:0).paddingRight(e=>e.children&&e.children.length>0?W:0).paddingBottom(e=>e.children&&e.children.length>0?W:0).round(!0)(R),me=le.descendants().filter(e=>e.children&&e.children.length>0),H=z.selectAll(".treemapSection").data(me).enter().append("g").attr("class","treemapSection").attr("transform",e=>`translate(${e.x0},${e.y0})`);H.append("rect").attr("width",e=>e.x1-e.x0).attr("height",X).attr("class","treemapSectionHeader").attr("fill","none").attr("fill-opacity",.6).attr("stroke-width",.6).attr("style",e=>e.depth===0?"display: none;":""),H.append("clipPath").attr("id",(e,c)=>`clip-section-${a}-${c}`).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,c)=>`treemapSection section${c}`).attr("fill",e=>b(e.data.name)).attr("fill-opacity",.6).attr("stroke",e=>_(e.data.name)).attr("stroke-width",2).attr("stroke-opacity",.4).attr("style",e=>{if(e.depth===0)return"display: none;";const c=B({cssCompiledStyles:e.data.cssCompiledStyles});return c.nodeStyles+";"+c.borderStyles.join(";")}),H.append("text").attr("class","treemapSectionLabel").attr("x",6).attr("y",X/2).attr("dominant-baseline","middle").text(e=>e.depth===0?"":e.data.name).attr("font-weight","bold").attr("clip-path",(e,c)=>`url(#clip-section-${a}-${c})`).attr("style",e=>{if(e.depth===0)return"display: none;";const c="dominant-baseline: middle; font-size: 12px; fill:"+$(e.data.name)+"; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;",m=B({cssCompiledStyles:e.data.cssCompiledStyles});return c+m.labelStyles.replace("color:","fill:")}).each(function(e){if(e.depth===0)return;const c=Z(this),m=e.data.name;c.text(m);const w=e.x1-e.x0,L=6;let T;r.showValues!==!1&&e.value?T=w-10-30-10-L:T=w-L-6;const y=Math.max(15,T),M=c.node();if(M.getComputedTextLength()>y){let V=m;for(;V.length>0;){if(V=m.substring(0,V.length-1),V.length===0){c.text("..."),M.getComputedTextLength()>y&&c.text("");break}if(c.text(V+"..."),M.getComputedTextLength()<=y)break}}}),r.showValues!==!1&&H.append("text").attr("class","treemapSectionValue").attr("x",e=>e.x1-e.x0-10).attr("y",X/2).attr("text-anchor","end").attr("dominant-baseline","middle").text(e=>e.value?p(e.value):"").attr("font-style","italic").attr("style",e=>{if(e.depth===0)return"display: none;";const c="text-anchor: end; dominant-baseline: middle; font-size: 10px; fill:"+$(e.data.name)+"; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;",m=B({cssCompiledStyles:e.data.cssCompiledStyles});return c+m.labelStyles.replace("color:","fill:")});const se=le.leaves(),A=se.length>20,ge=A?16:38,j=A?14:28,D=A?4:8,I=A?4:6,J=A?2:4,re=A?8:10,K=A?1:2,U=z.selectAll(".treemapLeafGroup").data(se).enter().append("g").attr("class",(e,c)=>`treemapNode treemapLeafGroup leaf${c}${e.data.classSelector?` ${e.data.classSelector}`:""}x`).attr("transform",e=>`translate(${e.x0},${e.y0})`);U.append("rect").attr("width",e=>e.x1-e.x0).attr("height",e=>e.y1-e.y0).attr("class","treemapLeaf").attr("fill",e=>e.parent?b(e.parent.data.name):b(e.data.name)).attr("style",e=>B({cssCompiledStyles:e.data.cssCompiledStyles}).nodeStyles).attr("fill-opacity",.3).attr("stroke",e=>e.parent?b(e.parent.data.name):b(e.data.name)).attr("stroke-width",3),U.append("clipPath").attr("id",(e,c)=>`clip-${a}-${c}`).append("rect").attr("width",e=>Math.max(0,e.x1-e.x0-4)).attr("height",e=>Math.max(0,e.y1-e.y0-4)),U.append("text").attr("class","treemapLabel").attr("x",e=>(e.x1-e.x0)/2).attr("y",e=>(e.y1-e.y0)/2).attr("style",e=>{const c=`text-anchor: middle; dominant-baseline: middle; font-size: ${ge}px;fill:`+$(e.data.name)+";",m=B({cssCompiledStyles:e.data.cssCompiledStyles});return c+m.labelStyles.replace("color:","fill:")}).attr("clip-path",(e,c)=>`url(#clip-${a}-${c})`).text(e=>e.data.name).each(function(e){const c=Z(this),m=e.x1-e.x0,w=e.y1-e.y0,L=c.node(),T=m-2*J,P=w-2*J;if(T<re||P<re){c.style("display","none");return}let y=parseInt(c.style("font-size"),10);const M=.6;for(;L.getComputedTextLength()>T&&y>D;)y--,c.style("font-size",`${y}px`);let F=Math.max(I,Math.min(j,Math.round(y*M))),k=y+K+F;for(;k>P&&y>D&&(y--,F=Math.max(I,Math.min(j,Math.round(y*M))),!(F<I&&y===D));)c.style("font-size",`${y}px`),k=y+K+F;c.style("font-size",`${y}px`),A?(y<D||P<D)&&c.style("display","none"):(L.getComputedTextLength()>T||y<D||P<y)&&c.style("display","none")}),r.showValues!==!1&&U.append("text").attr("class","treemapValue").attr("x",c=>(c.x1-c.x0)/2).attr("y",function(c){return(c.y1-c.y0)/2}).attr("style",c=>{const m=`text-anchor: middle; dominant-baseline: hanging; font-size: ${j}px;fill:`+$(c.data.name)+";",w=B({cssCompiledStyles:c.data.cssCompiledStyles});return m+w.labelStyles.replace("color:","fill:")}).attr("clip-path",(c,m)=>`url(#clip-${a}-${m})`).text(c=>c.value?p(c.value):"").each(function(c){const m=Z(this),w=this.parentNode;if(!w){m.style("display","none");return}const L=Z(w).select(".treemapLabel");if(L.empty()||L.style("display")==="none"){m.style("display","none");return}const T=parseFloat(L.style("font-size")),y=Math.max(I,Math.min(j,Math.round(T*.6)));m.style("font-size",`${y}px`);const F=(c.y1-c.y0)/2+T/2+K;m.attr("y",F);const k=c.x1-c.x0,ie=c.y1-c.y0-4,ve=k-2*J;m.node().getComputedTextLength()>ve||F+y>ie||y<I?m.style("display","none"):m.style("display",null)});const ye=r.diagramPadding??8;xe(S,ye,"flowchart",r?.useMaxWidth||!1)},"draw"),ct=C(function(t,a){return a.db.getClasses()},"getClasses"),ht={draw:ot,getClasses:ct},dt={sectionStrokeColor:"black",sectionStrokeWidth:"1",sectionFillColor:"#efefef",leafStrokeColor:"black",leafStrokeWidth:"1",leafFillColor:"#efefef",labelFontSize:"12px",valueFontSize:"10px",titleFontSize:"14px"},ut=C(({treemap:t}={})=>{const a=Ce(),l=ae(),n=ee(a,l.themeVariables),s=ee(dt,t),r=s.titleColor??n.titleColor,h=s.labelColor??n.textColor,d=s.valueColor??n.textColor;return`
1
+ import{s as xe}from"./4lxKnD4E.js";import{p as be}from"./aR25fz44.js";import{b as C,a6 as Ce,W as ae,q as ee,aX as we,B as Te,ay as te,b8 as B,aW as Z,a_ as Le,V as $e,b0 as Ae,Y as Fe,U as _e,aZ as Ne,O as Me,ao as ke,r as Ve}from"./Bw02Klel.js";import{p as ze}from"./BFeEPayU.js";import{f as O,o as Q}from"./ML4TWB19.js";function De(t){var a=0,l=t.children,n=l&&l.length;if(!n)a=1;else for(;--n>=0;)a+=l[n].value;t.value=a}function Pe(){return this.eachAfter(De)}function Be(t,a){let l=-1;for(const n of this)t.call(a,n,++l,this);return this}function We(t,a){for(var l=this,n=[l],s,r,h=-1;l=n.pop();)if(t.call(a,l,++h,this),s=l.children)for(r=s.length-1;r>=0;--r)n.push(s[r]);return this}function Ee(t,a){for(var l=this,n=[l],s=[],r,h,d,f=-1;l=n.pop();)if(s.push(l),r=l.children)for(h=0,d=r.length;h<d;++h)n.push(r[h]);for(;l=s.pop();)t.call(a,l,++f,this);return this}function Re(t,a){let l=-1;for(const n of this)if(t.call(a,n,++l,this))return n}function He(t){return this.eachAfter(function(a){for(var l=+t(a.data)||0,n=a.children,s=n&&n.length;--s>=0;)l+=n[s].value;a.value=l})}function Ie(t){return this.eachBefore(function(a){a.children&&a.children.sort(t)})}function Oe(t){for(var a=this,l=qe(a,t),n=[a];a!==l;)a=a.parent,n.push(a);for(var s=n.length;t!==l;)n.splice(s,0,t),t=t.parent;return n}function qe(t,a){if(t===a)return t;var l=t.ancestors(),n=a.ancestors(),s=null;for(t=l.pop(),a=n.pop();t===a;)s=t,t=l.pop(),a=n.pop();return s}function Ge(){for(var t=this,a=[t];t=t.parent;)a.push(t);return a}function Xe(){return Array.from(this)}function Ye(){var t=[];return this.eachBefore(function(a){a.children||t.push(a)}),t}function je(){var t=this,a=[];return t.each(function(l){l!==t&&a.push({source:l.parent,target:l})}),a}function*Ue(){var t=this,a,l=[t],n,s,r;do for(a=l.reverse(),l=[];t=a.pop();)if(yield t,n=t.children)for(s=0,r=n.length;s<r;++s)l.push(n[s]);while(l.length)}function ne(t,a){t instanceof Map?(t=[void 0,t],a===void 0&&(a=Ke)):a===void 0&&(a=Je);for(var l=new Y(t),n,s=[l],r,h,d,f;n=s.pop();)if((h=a(n.data))&&(f=(h=Array.from(h)).length))for(n.children=h,d=f-1;d>=0;--d)s.push(r=h[d]=new Y(h[d])),r.parent=n,r.depth=n.depth+1;return l.eachBefore(et)}function Ze(){return ne(this).eachBefore(Qe)}function Je(t){return t.children}function Ke(t){return Array.isArray(t)?t[1]:null}function Qe(t){t.data.value!==void 0&&(t.value=t.data.value),t.data=t.data.data}function et(t){var a=0;do t.height=a;while((t=t.parent)&&t.height<++a)}function Y(t){this.data=t,this.depth=this.height=0,this.parent=null}Y.prototype=ne.prototype={constructor:Y,count:Pe,each:Be,eachAfter:Ee,eachBefore:We,find:Re,sum:He,sort:Ie,path:Oe,ancestors:Ge,descendants:Xe,leaves:Ye,links:je,copy:Ze,[Symbol.iterator]:Ue};function tt(t){if(typeof t!="function")throw new Error;return t}function q(){return 0}function G(t){return function(){return t}}function at(t){t.x0=Math.round(t.x0),t.y0=Math.round(t.y0),t.x1=Math.round(t.x1),t.y1=Math.round(t.y1)}function oe(t,a,l,n,s){for(var r=t.children,h,d=-1,f=r.length,o=t.value&&(n-a)/t.value;++d<f;)h=r[d],h.y0=l,h.y1=s,h.x0=a,h.x1=a+=h.value*o}Object.create(Y.prototype);function ce(t,a,l,n,s){for(var r=t.children,h,d=-1,f=r.length,o=t.value&&(s-l)/t.value;++d<f;)h=r[d],h.x0=a,h.x1=n,h.y0=l,h.y1=l+=h.value*o}var he=(1+Math.sqrt(5))/2;function de(t,a,l,n,s,r){for(var h=[],d=a.children,f,o,u=0,S=0,i=d.length,v,x,g=a.value,p,b,_,$,z,R,N;u<i;){v=s-l,x=r-n;do p=d[S++].value;while(!p&&S<i);for(b=_=p,R=Math.max(x/v,v/x)/(g*t),N=p*p*R,z=Math.max(_/N,N/b);S<i;++S){if(p+=o=d[S].value,o<b&&(b=o),o>_&&(_=o),N=p*p*R,$=Math.max(_/N,N/b),$>z){p-=o;break}z=$}h.push(f={value:p,dice:v<x,children:d.slice(u,S)}),f.dice?oe(f,l,n,s,g?n+=x*p/g:r):ce(f,l,n,g?l+=v*p/g:s,r),g-=p,u=S}return h}var nt=(function t(a){function l(n,s,r,h,d){de(a,n,s,r,h,d)}return l.ratio=function(n){return t((n=+n)>1?n:1)},l})(he);function lt(){var t=nt,a=!1,l=1,n=1,s=[0],r=q,h=q,d=q,f=q,o=q;function u(i){return i.x0=i.y0=0,i.x1=l,i.y1=n,i.eachBefore(S),s=[0],a&&i.eachBefore(at),i}function S(i){var v=s[i.depth],x=i.x0+v,g=i.y0+v,p=i.x1-v,b=i.y1-v;p<x&&(x=p=(x+p)/2),b<g&&(g=b=(g+b)/2),i.x0=x,i.y0=g,i.x1=p,i.y1=b,i.children&&(v=s[i.depth+1]=r(i)/2,x+=o(i)-v,g+=h(i)-v,p-=d(i)-v,b-=f(i)-v,p<x&&(x=p=(x+p)/2),b<g&&(g=b=(g+b)/2),t(i,x,g,p,b))}return u.round=function(i){return arguments.length?(a=!!i,u):a},u.size=function(i){return arguments.length?(l=+i[0],n=+i[1],u):[l,n]},u.tile=function(i){return arguments.length?(t=tt(i),u):t},u.padding=function(i){return arguments.length?u.paddingInner(i).paddingOuter(i):u.paddingInner()},u.paddingInner=function(i){return arguments.length?(r=typeof i=="function"?i:G(+i),u):r},u.paddingOuter=function(i){return arguments.length?u.paddingTop(i).paddingRight(i).paddingBottom(i).paddingLeft(i):u.paddingTop()},u.paddingTop=function(i){return arguments.length?(h=typeof i=="function"?i:G(+i),u):h},u.paddingRight=function(i){return arguments.length?(d=typeof i=="function"?i:G(+i),u):d},u.paddingBottom=function(i){return arguments.length?(f=typeof i=="function"?i:G(+i),u):f},u.paddingLeft=function(i){return arguments.length?(o=typeof i=="function"?i:G(+i),u):o},u}(function t(a){function l(n,s,r,h,d){if((f=n._squarify)&&f.ratio===a)for(var f,o,u,S,i=-1,v,x=f.length,g=n.value;++i<x;){for(o=f[i],u=o.children,S=o.value=0,v=u.length;S<v;++S)o.value+=u[S].value;o.dice?oe(o,s,r,h,g?r+=(d-r)*o.value/g:d):ce(o,s,r,g?s+=(h-s)*o.value/g:h,d),g-=o.value}else n._squarify=f=de(a,n,s,r,h,d),f.ratio=a}return l.ratio=function(n){return t((n=+n)>1?n:1)},l})(he);var E,ue=(E=class{constructor(){this.nodes=[],this.levels=new Map,this.outerNodes=[],this.classes=new Map,this.setAccTitle=Le,this.getAccTitle=$e,this.setDiagramTitle=Ae,this.getDiagramTitle=Fe,this.getAccDescription=_e,this.setAccDescription=Ne}getNodes(){return this.nodes}getConfig(){const a=Me,l=ae();return ee({...a.treemap,...l.treemap??{}})}addNode(a,l){this.nodes.push(a),this.levels.set(a,l),l===0&&(this.outerNodes.push(a),this.root??=a)}getRoot(){return{name:"",children:this.outerNodes}}addClass(a,l){const n=this.classes.get(a)??{id:a,styles:[],textStyles:[]},s=l.replace(/\\,/g,"§§§").replace(/,/g,";").replace(/§§§/g,",").split(";");s&&s.forEach(r=>{ke(r)&&(n?.textStyles?n.textStyles.push(r):n.textStyles=[r]),n?.styles?n.styles.push(r):n.styles=[r]}),this.classes.set(a,n)}getClasses(){return this.classes}getStylesForClass(a){return this.classes.get(a)?.styles??[]}clear(){Ve(),this.nodes=[],this.levels=new Map,this.outerNodes=[],this.classes=new Map,this.root=void 0}},C(E,"TreeMapDB"),E);function pe(t){if(!t.length)return[];const a=[],l=[];return t.forEach(n=>{const s={name:n.name,children:n.type==="Leaf"?void 0:[]};for(s.classSelector=n?.classSelector,n?.cssCompiledStyles&&(s.cssCompiledStyles=n.cssCompiledStyles),n.type==="Leaf"&&n.value!==void 0&&(s.value=n.value);l.length>0&&l[l.length-1].level>=n.level;)l.pop();if(l.length===0)a.push(s);else{const r=l[l.length-1].node;r.children?r.children.push(s):r.children=[s]}n.type!=="Leaf"&&l.push({node:s,level:n.level})}),a}C(pe,"buildHierarchy");var st=C((t,a)=>{be(t,a);const l=[];for(const r of t.TreemapRows??[])r.$type==="ClassDefStatement"&&a.addClass(r.className??"",r.styleText??"");for(const r of t.TreemapRows??[]){const h=r.item;if(!h)continue;const d=r.indent?parseInt(r.indent):0,f=rt(h),o=h.classSelector?a.getStylesForClass(h.classSelector):[],u=o.length>0?o:void 0,S={level:d,name:f,type:h.$type,value:h.value,classSelector:h.classSelector,cssCompiledStyles:u};l.push(S)}const n=pe(l),s=C((r,h)=>{for(const d of r)a.addNode(d,h),d.children&&d.children.length>0&&s(d.children,h+1)},"addNodesRecursively");s(n,0)},"populate"),rt=C(t=>t.name?String(t.name):"","getItemName"),fe={parser:{yy:void 0},parse:C(async t=>{try{const l=await ze("treemap",t);te.debug("Treemap AST:",l);const n=fe.parser?.yy;if(!(n instanceof ue))throw new Error("parser.parser?.yy was not a TreemapDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.");st(l,n)}catch(a){throw te.error("Error parsing treemap:",a),a}},"parse")},it=10,W=10,X=25,ot=C((t,a,l,n)=>{const s=n.db,r=s.getConfig(),h=r.padding??it,d=s.getDiagramTitle(),f=s.getRoot(),{themeVariables:o}=ae();if(!f)return;const u=d?30:0,S=we(a),i=r.nodeWidth?r.nodeWidth*W:960,v=r.nodeHeight?r.nodeHeight*W:500,x=i,g=v+u;S.attr("viewBox",`0 0 ${x} ${g}`),Te(S,g,x,r.useMaxWidth);let p;try{const e=r.valueFormat||",";if(e==="$0,0")p=C(c=>"$"+O(",")(c),"valueFormat");else if(e.startsWith("$")&&e.includes(",")){const c=/\.\d+/.exec(e),m=c?c[0]:"";p=C(w=>"$"+O(","+m)(w),"valueFormat")}else if(e.startsWith("$")){const c=e.substring(1);p=C(m=>"$"+O(c||"")(m),"valueFormat")}else p=O(e)}catch(e){te.error("Error creating format function:",e),p=O(",")}const b=Q().range(["transparent",o.cScale0,o.cScale1,o.cScale2,o.cScale3,o.cScale4,o.cScale5,o.cScale6,o.cScale7,o.cScale8,o.cScale9,o.cScale10,o.cScale11]),_=Q().range(["transparent",o.cScalePeer0,o.cScalePeer1,o.cScalePeer2,o.cScalePeer3,o.cScalePeer4,o.cScalePeer5,o.cScalePeer6,o.cScalePeer7,o.cScalePeer8,o.cScalePeer9,o.cScalePeer10,o.cScalePeer11]),$=Q().range([o.cScaleLabel0,o.cScaleLabel1,o.cScaleLabel2,o.cScaleLabel3,o.cScaleLabel4,o.cScaleLabel5,o.cScaleLabel6,o.cScaleLabel7,o.cScaleLabel8,o.cScaleLabel9,o.cScaleLabel10,o.cScaleLabel11]);d&&S.append("text").attr("x",x/2).attr("y",u/2).attr("class","treemapTitle").attr("text-anchor","middle").attr("dominant-baseline","middle").text(d);const z=S.append("g").attr("transform",`translate(0, ${u})`).attr("class","treemapContainer"),R=ne(f).sum(e=>e.value??0).sort((e,c)=>(c.value??0)-(e.value??0)),le=lt().size([i,v]).paddingTop(e=>e.children&&e.children.length>0?X+W:0).paddingInner(h).paddingLeft(e=>e.children&&e.children.length>0?W:0).paddingRight(e=>e.children&&e.children.length>0?W:0).paddingBottom(e=>e.children&&e.children.length>0?W:0).round(!0)(R),me=le.descendants().filter(e=>e.children&&e.children.length>0),H=z.selectAll(".treemapSection").data(me).enter().append("g").attr("class","treemapSection").attr("transform",e=>`translate(${e.x0},${e.y0})`);H.append("rect").attr("width",e=>e.x1-e.x0).attr("height",X).attr("class","treemapSectionHeader").attr("fill","none").attr("fill-opacity",.6).attr("stroke-width",.6).attr("style",e=>e.depth===0?"display: none;":""),H.append("clipPath").attr("id",(e,c)=>`clip-section-${a}-${c}`).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,c)=>`treemapSection section${c}`).attr("fill",e=>b(e.data.name)).attr("fill-opacity",.6).attr("stroke",e=>_(e.data.name)).attr("stroke-width",2).attr("stroke-opacity",.4).attr("style",e=>{if(e.depth===0)return"display: none;";const c=B({cssCompiledStyles:e.data.cssCompiledStyles});return c.nodeStyles+";"+c.borderStyles.join(";")}),H.append("text").attr("class","treemapSectionLabel").attr("x",6).attr("y",X/2).attr("dominant-baseline","middle").text(e=>e.depth===0?"":e.data.name).attr("font-weight","bold").attr("clip-path",(e,c)=>`url(#clip-section-${a}-${c})`).attr("style",e=>{if(e.depth===0)return"display: none;";const c="dominant-baseline: middle; font-size: 12px; fill:"+$(e.data.name)+"; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;",m=B({cssCompiledStyles:e.data.cssCompiledStyles});return c+m.labelStyles.replace("color:","fill:")}).each(function(e){if(e.depth===0)return;const c=Z(this),m=e.data.name;c.text(m);const w=e.x1-e.x0,L=6;let T;r.showValues!==!1&&e.value?T=w-10-30-10-L:T=w-L-6;const y=Math.max(15,T),M=c.node();if(M.getComputedTextLength()>y){let V=m;for(;V.length>0;){if(V=m.substring(0,V.length-1),V.length===0){c.text("..."),M.getComputedTextLength()>y&&c.text("");break}if(c.text(V+"..."),M.getComputedTextLength()<=y)break}}}),r.showValues!==!1&&H.append("text").attr("class","treemapSectionValue").attr("x",e=>e.x1-e.x0-10).attr("y",X/2).attr("text-anchor","end").attr("dominant-baseline","middle").text(e=>e.value?p(e.value):"").attr("font-style","italic").attr("style",e=>{if(e.depth===0)return"display: none;";const c="text-anchor: end; dominant-baseline: middle; font-size: 10px; fill:"+$(e.data.name)+"; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;",m=B({cssCompiledStyles:e.data.cssCompiledStyles});return c+m.labelStyles.replace("color:","fill:")});const se=le.leaves(),A=se.length>20,ge=A?16:38,j=A?14:28,D=A?4:8,I=A?4:6,J=A?2:4,re=A?8:10,K=A?1:2,U=z.selectAll(".treemapLeafGroup").data(se).enter().append("g").attr("class",(e,c)=>`treemapNode treemapLeafGroup leaf${c}${e.data.classSelector?` ${e.data.classSelector}`:""}x`).attr("transform",e=>`translate(${e.x0},${e.y0})`);U.append("rect").attr("width",e=>e.x1-e.x0).attr("height",e=>e.y1-e.y0).attr("class","treemapLeaf").attr("fill",e=>e.parent?b(e.parent.data.name):b(e.data.name)).attr("style",e=>B({cssCompiledStyles:e.data.cssCompiledStyles}).nodeStyles).attr("fill-opacity",.3).attr("stroke",e=>e.parent?b(e.parent.data.name):b(e.data.name)).attr("stroke-width",3),U.append("clipPath").attr("id",(e,c)=>`clip-${a}-${c}`).append("rect").attr("width",e=>Math.max(0,e.x1-e.x0-4)).attr("height",e=>Math.max(0,e.y1-e.y0-4)),U.append("text").attr("class","treemapLabel").attr("x",e=>(e.x1-e.x0)/2).attr("y",e=>(e.y1-e.y0)/2).attr("style",e=>{const c=`text-anchor: middle; dominant-baseline: middle; font-size: ${ge}px;fill:`+$(e.data.name)+";",m=B({cssCompiledStyles:e.data.cssCompiledStyles});return c+m.labelStyles.replace("color:","fill:")}).attr("clip-path",(e,c)=>`url(#clip-${a}-${c})`).text(e=>e.data.name).each(function(e){const c=Z(this),m=e.x1-e.x0,w=e.y1-e.y0,L=c.node(),T=m-2*J,P=w-2*J;if(T<re||P<re){c.style("display","none");return}let y=parseInt(c.style("font-size"),10);const M=.6;for(;L.getComputedTextLength()>T&&y>D;)y--,c.style("font-size",`${y}px`);let F=Math.max(I,Math.min(j,Math.round(y*M))),k=y+K+F;for(;k>P&&y>D&&(y--,F=Math.max(I,Math.min(j,Math.round(y*M))),!(F<I&&y===D));)c.style("font-size",`${y}px`),k=y+K+F;c.style("font-size",`${y}px`),A?(y<D||P<D)&&c.style("display","none"):(L.getComputedTextLength()>T||y<D||P<y)&&c.style("display","none")}),r.showValues!==!1&&U.append("text").attr("class","treemapValue").attr("x",c=>(c.x1-c.x0)/2).attr("y",function(c){return(c.y1-c.y0)/2}).attr("style",c=>{const m=`text-anchor: middle; dominant-baseline: hanging; font-size: ${j}px;fill:`+$(c.data.name)+";",w=B({cssCompiledStyles:c.data.cssCompiledStyles});return m+w.labelStyles.replace("color:","fill:")}).attr("clip-path",(c,m)=>`url(#clip-${a}-${m})`).text(c=>c.value?p(c.value):"").each(function(c){const m=Z(this),w=this.parentNode;if(!w){m.style("display","none");return}const L=Z(w).select(".treemapLabel");if(L.empty()||L.style("display")==="none"){m.style("display","none");return}const T=parseFloat(L.style("font-size")),y=Math.max(I,Math.min(j,Math.round(T*.6)));m.style("font-size",`${y}px`);const F=(c.y1-c.y0)/2+T/2+K;m.attr("y",F);const k=c.x1-c.x0,ie=c.y1-c.y0-4,ve=k-2*J;m.node().getComputedTextLength()>ve||F+y>ie||y<I?m.style("display","none"):m.style("display",null)});const ye=r.diagramPadding??8;xe(S,ye,"flowchart",r?.useMaxWidth||!1)},"draw"),ct=C(function(t,a){return a.db.getClasses()},"getClasses"),ht={draw:ot,getClasses:ct},dt={sectionStrokeColor:"black",sectionStrokeWidth:"1",sectionFillColor:"#efefef",leafStrokeColor:"black",leafStrokeWidth:"1",leafFillColor:"#efefef",labelFontSize:"12px",valueFontSize:"10px",titleFontSize:"14px"},ut=C(({treemap:t}={})=>{const a=Ce(),l=ae(),n=ee(a,l.themeVariables),s=ee(dt,t),r=s.titleColor??n.titleColor,h=s.labelColor??n.textColor,d=s.valueColor??n.textColor;return`
2
2
  .treemapNode.section {
3
3
  stroke: ${s.sectionStrokeColor};
4
4
  stroke-width: ${s.sectionStrokeWidth};