@inkeep/agents-manage-ui 0.22.4 → 0.22.5

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 (162) hide show
  1. package/.next/standalone/agents-manage-ui/.next/BUILD_ID +1 -1
  2. package/.next/standalone/agents-manage-ui/.next/app-build-manifest.json +125 -125
  3. package/.next/standalone/agents-manage-ui/.next/app-path-routes-manifest.json +5 -5
  4. package/.next/standalone/agents-manage-ui/.next/build-manifest.json +5 -5
  5. package/.next/standalone/agents-manage-ui/.next/prerender-manifest.json +13 -13
  6. package/.next/standalone/agents-manage-ui/.next/react-loadable-manifest.json +12 -12
  7. package/.next/standalone/agents-manage-ui/.next/server/app/[tenantId]/page.js +1 -1
  8. package/.next/standalone/agents-manage-ui/.next/server/app/[tenantId]/page_client-reference-manifest.js +1 -1
  9. package/.next/standalone/agents-manage-ui/.next/server/app/[tenantId]/projects/[projectId]/agents/[agentId]/page.js +1 -1
  10. package/.next/standalone/agents-manage-ui/.next/server/app/[tenantId]/projects/[projectId]/agents/[agentId]/page_client-reference-manifest.js +1 -1
  11. package/.next/standalone/agents-manage-ui/.next/server/app/[tenantId]/projects/[projectId]/agents/new/page.js +2 -2
  12. package/.next/standalone/agents-manage-ui/.next/server/app/[tenantId]/projects/[projectId]/agents/new/page_client-reference-manifest.js +1 -1
  13. package/.next/standalone/agents-manage-ui/.next/server/app/[tenantId]/projects/[projectId]/agents/page.js +2 -2
  14. package/.next/standalone/agents-manage-ui/.next/server/app/[tenantId]/projects/[projectId]/agents/page_client-reference-manifest.js +1 -1
  15. package/.next/standalone/agents-manage-ui/.next/server/app/[tenantId]/projects/[projectId]/api-keys/page.js +3 -3
  16. package/.next/standalone/agents-manage-ui/.next/server/app/[tenantId]/projects/[projectId]/api-keys/page_client-reference-manifest.js +1 -1
  17. package/.next/standalone/agents-manage-ui/.next/server/app/[tenantId]/projects/[projectId]/artifacts/[artifactComponentId]/page.js +2 -2
  18. package/.next/standalone/agents-manage-ui/.next/server/app/[tenantId]/projects/[projectId]/artifacts/[artifactComponentId]/page.js.nft.json +1 -1
  19. package/.next/standalone/agents-manage-ui/.next/server/app/[tenantId]/projects/[projectId]/artifacts/[artifactComponentId]/page_client-reference-manifest.js +1 -1
  20. package/.next/standalone/agents-manage-ui/.next/server/app/[tenantId]/projects/[projectId]/artifacts/new/page.js +2 -2
  21. package/.next/standalone/agents-manage-ui/.next/server/app/[tenantId]/projects/[projectId]/artifacts/new/page.js.nft.json +1 -1
  22. package/.next/standalone/agents-manage-ui/.next/server/app/[tenantId]/projects/[projectId]/artifacts/new/page_client-reference-manifest.js +1 -1
  23. package/.next/standalone/agents-manage-ui/.next/server/app/[tenantId]/projects/[projectId]/artifacts/page.js +2 -2
  24. package/.next/standalone/agents-manage-ui/.next/server/app/[tenantId]/projects/[projectId]/artifacts/page_client-reference-manifest.js +1 -1
  25. package/.next/standalone/agents-manage-ui/.next/server/app/[tenantId]/projects/[projectId]/components/[dataComponentId]/page.js +2 -2
  26. package/.next/standalone/agents-manage-ui/.next/server/app/[tenantId]/projects/[projectId]/components/[dataComponentId]/page.js.nft.json +1 -1
  27. package/.next/standalone/agents-manage-ui/.next/server/app/[tenantId]/projects/[projectId]/components/[dataComponentId]/page_client-reference-manifest.js +1 -1
  28. package/.next/standalone/agents-manage-ui/.next/server/app/[tenantId]/projects/[projectId]/components/new/page.js +2 -2
  29. package/.next/standalone/agents-manage-ui/.next/server/app/[tenantId]/projects/[projectId]/components/new/page.js.nft.json +1 -1
  30. package/.next/standalone/agents-manage-ui/.next/server/app/[tenantId]/projects/[projectId]/components/new/page_client-reference-manifest.js +1 -1
  31. package/.next/standalone/agents-manage-ui/.next/server/app/[tenantId]/projects/[projectId]/components/page.js +1 -1
  32. package/.next/standalone/agents-manage-ui/.next/server/app/[tenantId]/projects/[projectId]/components/page_client-reference-manifest.js +1 -1
  33. package/.next/standalone/agents-manage-ui/.next/server/app/[tenantId]/projects/[projectId]/credentials/[credentialId]/page.js +1 -1
  34. package/.next/standalone/agents-manage-ui/.next/server/app/[tenantId]/projects/[projectId]/credentials/[credentialId]/page_client-reference-manifest.js +1 -1
  35. package/.next/standalone/agents-manage-ui/.next/server/app/[tenantId]/projects/[projectId]/credentials/new/bearer/page.js +2 -2
  36. package/.next/standalone/agents-manage-ui/.next/server/app/[tenantId]/projects/[projectId]/credentials/new/bearer/page.js.nft.json +1 -1
  37. package/.next/standalone/agents-manage-ui/.next/server/app/[tenantId]/projects/[projectId]/credentials/new/bearer/page_client-reference-manifest.js +1 -1
  38. package/.next/standalone/agents-manage-ui/.next/server/app/[tenantId]/projects/[projectId]/credentials/new/page.js +1 -1
  39. package/.next/standalone/agents-manage-ui/.next/server/app/[tenantId]/projects/[projectId]/credentials/new/page_client-reference-manifest.js +1 -1
  40. package/.next/standalone/agents-manage-ui/.next/server/app/[tenantId]/projects/[projectId]/credentials/new/providers/[providerId]/page.js +1 -1
  41. package/.next/standalone/agents-manage-ui/.next/server/app/[tenantId]/projects/[projectId]/credentials/new/providers/[providerId]/page.js.nft.json +1 -1
  42. package/.next/standalone/agents-manage-ui/.next/server/app/[tenantId]/projects/[projectId]/credentials/new/providers/[providerId]/page_client-reference-manifest.js +1 -1
  43. package/.next/standalone/agents-manage-ui/.next/server/app/[tenantId]/projects/[projectId]/credentials/new/providers/page.js +1 -1
  44. package/.next/standalone/agents-manage-ui/.next/server/app/[tenantId]/projects/[projectId]/credentials/new/providers/page_client-reference-manifest.js +1 -1
  45. package/.next/standalone/agents-manage-ui/.next/server/app/[tenantId]/projects/[projectId]/credentials/page.js +2 -2
  46. package/.next/standalone/agents-manage-ui/.next/server/app/[tenantId]/projects/[projectId]/credentials/page_client-reference-manifest.js +1 -1
  47. package/.next/standalone/agents-manage-ui/.next/server/app/[tenantId]/projects/[projectId]/mcp-servers/[mcpServerId]/edit/page.js +2 -2
  48. package/.next/standalone/agents-manage-ui/.next/server/app/[tenantId]/projects/[projectId]/mcp-servers/[mcpServerId]/edit/page_client-reference-manifest.js +1 -1
  49. package/.next/standalone/agents-manage-ui/.next/server/app/[tenantId]/projects/[projectId]/mcp-servers/[mcpServerId]/page.js +2 -2
  50. package/.next/standalone/agents-manage-ui/.next/server/app/[tenantId]/projects/[projectId]/mcp-servers/[mcpServerId]/page_client-reference-manifest.js +1 -1
  51. package/.next/standalone/agents-manage-ui/.next/server/app/[tenantId]/projects/[projectId]/mcp-servers/new/page.js +2 -2
  52. package/.next/standalone/agents-manage-ui/.next/server/app/[tenantId]/projects/[projectId]/mcp-servers/new/page_client-reference-manifest.js +1 -1
  53. package/.next/standalone/agents-manage-ui/.next/server/app/[tenantId]/projects/[projectId]/mcp-servers/page.js +2 -2
  54. package/.next/standalone/agents-manage-ui/.next/server/app/[tenantId]/projects/[projectId]/mcp-servers/page_client-reference-manifest.js +1 -1
  55. package/.next/standalone/agents-manage-ui/.next/server/app/[tenantId]/projects/[projectId]/page.js +2 -2
  56. package/.next/standalone/agents-manage-ui/.next/server/app/[tenantId]/projects/[projectId]/page_client-reference-manifest.js +1 -1
  57. package/.next/standalone/agents-manage-ui/.next/server/app/[tenantId]/projects/[projectId]/settings/page.js +2 -2
  58. package/.next/standalone/agents-manage-ui/.next/server/app/[tenantId]/projects/[projectId]/settings/page_client-reference-manifest.js +1 -1
  59. package/.next/standalone/agents-manage-ui/.next/server/app/[tenantId]/projects/[projectId]/traces/ai-calls/page.js +2 -2
  60. package/.next/standalone/agents-manage-ui/.next/server/app/[tenantId]/projects/[projectId]/traces/ai-calls/page.js.nft.json +1 -1
  61. package/.next/standalone/agents-manage-ui/.next/server/app/[tenantId]/projects/[projectId]/traces/ai-calls/page_client-reference-manifest.js +1 -1
  62. package/.next/standalone/agents-manage-ui/.next/server/app/[tenantId]/projects/[projectId]/traces/conversations/[conversationId]/page.js +1 -1
  63. package/.next/standalone/agents-manage-ui/.next/server/app/[tenantId]/projects/[projectId]/traces/conversations/[conversationId]/page_client-reference-manifest.js +1 -1
  64. package/.next/standalone/agents-manage-ui/.next/server/app/[tenantId]/projects/[projectId]/traces/page.js +2 -2
  65. package/.next/standalone/agents-manage-ui/.next/server/app/[tenantId]/projects/[projectId]/traces/page.js.nft.json +1 -1
  66. package/.next/standalone/agents-manage-ui/.next/server/app/[tenantId]/projects/[projectId]/traces/page_client-reference-manifest.js +1 -1
  67. package/.next/standalone/agents-manage-ui/.next/server/app/[tenantId]/projects/page.js +1 -1
  68. package/.next/standalone/agents-manage-ui/.next/server/app/[tenantId]/projects/page_client-reference-manifest.js +1 -1
  69. package/.next/standalone/agents-manage-ui/.next/server/app/_not-found/page.js +1 -1
  70. package/.next/standalone/agents-manage-ui/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  71. package/.next/standalone/agents-manage-ui/.next/server/app/_not-found.html +1 -1
  72. package/.next/standalone/agents-manage-ui/.next/server/app/_not-found.rsc +8 -8
  73. package/.next/standalone/agents-manage-ui/.next/server/app/api/signoz/conversations/[conversationId]/route_client-reference-manifest.js +1 -1
  74. package/.next/standalone/agents-manage-ui/.next/server/app/api/signoz/route_client-reference-manifest.js +1 -1
  75. package/.next/standalone/agents-manage-ui/.next/server/app/page.js +2 -2
  76. package/.next/standalone/agents-manage-ui/.next/server/app/page_client-reference-manifest.js +1 -1
  77. package/.next/standalone/agents-manage-ui/.next/server/app-paths-manifest.json +5 -5
  78. package/.next/standalone/agents-manage-ui/.next/server/chunks/1670.js +1 -1
  79. package/.next/standalone/agents-manage-ui/.next/server/chunks/175.js +1 -1
  80. package/.next/standalone/agents-manage-ui/.next/server/chunks/1869.js +1 -0
  81. package/.next/standalone/agents-manage-ui/.next/server/chunks/2153.js +1 -1
  82. package/.next/standalone/agents-manage-ui/.next/server/chunks/2496.js +4 -4
  83. package/.next/standalone/agents-manage-ui/.next/server/chunks/3547.js +1 -1
  84. package/.next/standalone/agents-manage-ui/.next/server/chunks/3840.js +1 -0
  85. package/.next/standalone/agents-manage-ui/.next/server/chunks/{207.js → 453.js} +1 -1
  86. package/.next/standalone/agents-manage-ui/.next/server/chunks/6212.js +1 -1
  87. package/.next/standalone/agents-manage-ui/.next/server/chunks/{7641.js → 6782.js} +1 -1
  88. package/.next/standalone/agents-manage-ui/.next/server/chunks/7457.js +2 -2
  89. package/.next/standalone/agents-manage-ui/.next/server/chunks/7711.js +3 -3
  90. package/.next/standalone/agents-manage-ui/.next/server/chunks/8275.js +1 -1
  91. package/.next/standalone/agents-manage-ui/.next/server/chunks/8982.js +1 -1
  92. package/.next/standalone/agents-manage-ui/.next/server/middleware-build-manifest.js +1 -1
  93. package/.next/standalone/agents-manage-ui/.next/server/middleware-manifest.json +5 -5
  94. package/.next/standalone/agents-manage-ui/.next/server/middleware-react-loadable-manifest.js +1 -1
  95. package/.next/standalone/agents-manage-ui/.next/server/pages/404.html +1 -1
  96. package/.next/standalone/agents-manage-ui/.next/server/pages/500.html +1 -1
  97. package/.next/standalone/agents-manage-ui/.next/server/server-reference-manifest.js +1 -1
  98. package/.next/standalone/agents-manage-ui/.next/server/server-reference-manifest.json +1 -1
  99. package/.next/standalone/agents-manage-ui/.next/static/chunks/13162.49a473711bfc9106.js +1 -0
  100. package/.next/standalone/agents-manage-ui/.next/static/chunks/2100.6da5ac53af6a50b9.js +93 -0
  101. package/.next/standalone/agents-manage-ui/.next/static/chunks/{21078.a7d987aaf4965f33.js → 21078.db6a097e0944219f.js} +1 -1
  102. package/.next/standalone/agents-manage-ui/.next/static/chunks/26917.44af95c2220d2d7a.js +1 -0
  103. package/.next/standalone/agents-manage-ui/.next/static/chunks/331.4164e5bbbf2109c5.js +1 -0
  104. package/.next/standalone/agents-manage-ui/.next/static/chunks/47065.a2df61ae309c6b30.js +55 -0
  105. package/.next/standalone/agents-manage-ui/.next/static/chunks/{48da6a00.6d972ca63d2c3e83.js → 48da6a00.4291466416c0a466.js} +1 -1
  106. package/.next/standalone/agents-manage-ui/.next/static/chunks/53779.d1ecdd05fd8620ac.js +1 -0
  107. package/.next/standalone/agents-manage-ui/.next/static/chunks/54855.ac5c4000030e49f3.js +1 -0
  108. package/.next/standalone/agents-manage-ui/.next/static/chunks/{72963-d8f87b0ac91409cd.js → 64228-648dc5042411205d.js} +1 -1
  109. package/.next/standalone/agents-manage-ui/.next/static/chunks/71558-6a7ced3c9e21fc39.js +1 -0
  110. package/.next/standalone/agents-manage-ui/.next/static/chunks/7190-51a6552459a3376d.js +1 -0
  111. package/.next/standalone/agents-manage-ui/.next/static/chunks/73974.c41c4a27e5a42554.js +62 -0
  112. package/.next/standalone/agents-manage-ui/.next/static/chunks/{89814.587633678bc1263b.js → 89814.9c8e7e476bf1798d.js} +2 -2
  113. package/.next/standalone/agents-manage-ui/.next/static/chunks/93453.a61a7f6334280207.js +59 -0
  114. package/.next/standalone/agents-manage-ui/.next/static/chunks/app/[tenantId]/projects/[projectId]/agents/page-9961edaa999e5895.js +1 -0
  115. package/.next/standalone/agents-manage-ui/.next/static/chunks/app/[tenantId]/projects/[projectId]/api-keys/page-b2769ce928c048d2.js +1 -0
  116. package/.next/standalone/agents-manage-ui/.next/static/chunks/app/[tenantId]/projects/[projectId]/artifacts/[artifactComponentId]/{page-afdaf855aec8af05.js → page-8aa517dc5954ef18.js} +1 -1
  117. package/.next/standalone/agents-manage-ui/.next/static/chunks/app/[tenantId]/projects/[projectId]/artifacts/new/{page-afdaf855aec8af05.js → page-8aa517dc5954ef18.js} +1 -1
  118. package/.next/standalone/agents-manage-ui/.next/static/chunks/app/[tenantId]/projects/[projectId]/artifacts/page-41aeddaaba5e86f9.js +1 -0
  119. package/.next/standalone/agents-manage-ui/.next/static/chunks/app/[tenantId]/projects/[projectId]/components/[dataComponentId]/page-b0291afca477479a.js +1 -0
  120. package/.next/standalone/agents-manage-ui/.next/static/chunks/app/[tenantId]/projects/[projectId]/components/new/page-b0291afca477479a.js +1 -0
  121. package/.next/standalone/agents-manage-ui/.next/static/chunks/app/[tenantId]/projects/[projectId]/components/page-4829a475cd59760a.js +1 -0
  122. package/.next/standalone/agents-manage-ui/.next/static/chunks/app/[tenantId]/projects/[projectId]/credentials/[credentialId]/page-23e1fb1e2d5f5a66.js +1 -0
  123. package/.next/standalone/agents-manage-ui/.next/static/chunks/app/[tenantId]/projects/[projectId]/credentials/new/bearer/page-f2a47a3c378a85ea.js +1 -0
  124. package/.next/standalone/agents-manage-ui/.next/static/chunks/app/[tenantId]/projects/[projectId]/credentials/new/providers/[providerId]/page-ff9eb948e508117c.js +1 -0
  125. package/.next/standalone/agents-manage-ui/.next/static/chunks/app/[tenantId]/projects/[projectId]/credentials/{page-9d1905ada8938af6.js → page-49540c7f1e4c6cc1.js} +1 -1
  126. package/.next/standalone/agents-manage-ui/.next/static/chunks/app/[tenantId]/projects/[projectId]/mcp-servers/new/{page-89cef449fcf9ef7d.js → page-377c75e5161c67cb.js} +1 -1
  127. package/.next/standalone/agents-manage-ui/.next/static/chunks/app/[tenantId]/projects/[projectId]/mcp-servers/{page-069621ec5b0970e5.js → page-0339ee6b779aafd8.js} +1 -1
  128. package/.next/standalone/agents-manage-ui/.next/static/chunks/app/[tenantId]/projects/[projectId]/settings/{page-1273d3fada0586f8.js → page-be8bd412295f982d.js} +1 -1
  129. package/.next/standalone/agents-manage-ui/.next/static/chunks/app/[tenantId]/projects/[projectId]/traces/page-7ff89a7f1a0c8868.js +1 -0
  130. package/.next/standalone/agents-manage-ui/.next/static/chunks/app/[tenantId]/projects/page-be957f199374355d.js +1 -0
  131. package/.next/standalone/agents-manage-ui/.next/static/chunks/app/layout-32972e3ae0a05b82.js +1 -0
  132. package/.next/standalone/agents-manage-ui/.next/static/chunks/{webpack-59bf208cf832faea.js → webpack-eac97a6e1c9c9ceb.js} +1 -1
  133. package/.next/standalone/agents-manage-ui/package.json +1 -1
  134. package/.next/standalone/packages/agents-core/package.json +1 -1
  135. package/package.json +4 -4
  136. package/.next/standalone/agents-manage-ui/.next/server/chunks/3205.js +0 -1
  137. package/.next/standalone/agents-manage-ui/.next/server/chunks/6494.js +0 -1
  138. package/.next/standalone/agents-manage-ui/.next/static/chunks/13162.51bfeffa888e765d.js +0 -1
  139. package/.next/standalone/agents-manage-ui/.next/static/chunks/2100.0cc29b56dc39a91c.js +0 -93
  140. package/.next/standalone/agents-manage-ui/.next/static/chunks/26917.cd86a6e50adbcaf7.js +0 -1
  141. package/.next/standalone/agents-manage-ui/.next/static/chunks/331.4a73e2854eaaf329.js +0 -1
  142. package/.next/standalone/agents-manage-ui/.next/static/chunks/47065.981fe771a3ebbc89.js +0 -55
  143. package/.next/standalone/agents-manage-ui/.next/static/chunks/53779.3c6baf4968503ed4.js +0 -1
  144. package/.next/standalone/agents-manage-ui/.next/static/chunks/54855.9990b0a1efe89008.js +0 -1
  145. package/.next/standalone/agents-manage-ui/.next/static/chunks/71558-78422b7aaa85fd6c.js +0 -1
  146. package/.next/standalone/agents-manage-ui/.next/static/chunks/7190-fd3c76249a4dd920.js +0 -1
  147. package/.next/standalone/agents-manage-ui/.next/static/chunks/73974.646f6f06a0fb78fb.js +0 -62
  148. package/.next/standalone/agents-manage-ui/.next/static/chunks/93453.066f92e65561f306.js +0 -59
  149. package/.next/standalone/agents-manage-ui/.next/static/chunks/app/[tenantId]/projects/[projectId]/agents/page-e003706d61e1eafe.js +0 -1
  150. package/.next/standalone/agents-manage-ui/.next/static/chunks/app/[tenantId]/projects/[projectId]/api-keys/page-ef99f039107dd345.js +0 -1
  151. package/.next/standalone/agents-manage-ui/.next/static/chunks/app/[tenantId]/projects/[projectId]/artifacts/page-bc4833a45b33a47d.js +0 -1
  152. package/.next/standalone/agents-manage-ui/.next/static/chunks/app/[tenantId]/projects/[projectId]/components/[dataComponentId]/page-ef06eff512088fdf.js +0 -1
  153. package/.next/standalone/agents-manage-ui/.next/static/chunks/app/[tenantId]/projects/[projectId]/components/new/page-ef06eff512088fdf.js +0 -1
  154. package/.next/standalone/agents-manage-ui/.next/static/chunks/app/[tenantId]/projects/[projectId]/components/page-78b8833482d1f877.js +0 -1
  155. package/.next/standalone/agents-manage-ui/.next/static/chunks/app/[tenantId]/projects/[projectId]/credentials/[credentialId]/page-a2772a4b6f4e0249.js +0 -1
  156. package/.next/standalone/agents-manage-ui/.next/static/chunks/app/[tenantId]/projects/[projectId]/credentials/new/bearer/page-4864c8674778ee06.js +0 -1
  157. package/.next/standalone/agents-manage-ui/.next/static/chunks/app/[tenantId]/projects/[projectId]/credentials/new/providers/[providerId]/page-b40d929333c3ce65.js +0 -1
  158. package/.next/standalone/agents-manage-ui/.next/static/chunks/app/[tenantId]/projects/[projectId]/traces/page-b23914a33d42bd42.js +0 -1
  159. package/.next/standalone/agents-manage-ui/.next/static/chunks/app/[tenantId]/projects/page-c605715de4c89b47.js +0 -1
  160. package/.next/standalone/agents-manage-ui/.next/static/chunks/app/layout-c0ecff8c2b6e0bcc.js +0 -1
  161. /package/.next/standalone/agents-manage-ui/.next/static/{D8h6pxVIqA0GQjbq_VQqo → APJpYPMfKpAFVamL2w8y-}/_buildManifest.js +0 -0
  162. /package/.next/standalone/agents-manage-ui/.next/static/{D8h6pxVIqA0GQjbq_VQqo → APJpYPMfKpAFVamL2w8y-}/_ssgManifest.js +0 -0
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[13162],{13162:(r,e,s)=>{s.d(e,{diagram:()=>l});var a=s(20871);s(78424),s(61052),s(37317),s(30944),s(17297),s(74303),s(85963),s(95952),s(3334),s(71409),s(98671),s(3386);var t=s(36416),l={parser:a._$,get db(){return new a.NM},renderer:a.Lh,styles:a.tM,init:(0,t.K2)(r=>{r.class||(r.class={}),r.class.arrowMarkerAbsolute=r.arrowMarkerAbsolute},"init")}}}]);
@@ -0,0 +1,93 @@
1
+ "use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2100],{2100:(t,e,i)=>{i.d(e,{diagram:()=>A});var n=i(4635),s=i(78424),r=i(2688),o=i(85963);i(95952),i(3334),i(71409),i(98671);var a=i(3386),l=i(36416),c=i(62835),h=i(23247),u=i(22727),g=function(){var t=(0,l.K2)(function(t,e,i,n){for(i=i||{},n=t.length;n--;i[t[n]]=e);return i},"o"),e=[1,4],i=[1,13],n=[1,12],s=[1,15],r=[1,16],o=[1,20],a=[1,19],c=[6,7,8],h=[1,26],u=[1,24],g=[1,25],d=[6,7,11],p=[1,31],y=[6,7,11,24],f=[1,6,13,16,17,20,23],m=[1,35],b=[1,36],_=[1,6,7,11,13,16,17,20,23],k=[1,38],E={trace:(0,l.K2)(function(){},"trace"),yy:{},symbols_:{error:2,start:3,mindMap:4,spaceLines:5,SPACELINE:6,NL:7,KANBAN:8,document:9,stop:10,EOF:11,statement:12,SPACELIST:13,node:14,shapeData:15,ICON:16,CLASS:17,nodeWithId:18,nodeWithoutId:19,NODE_DSTART:20,NODE_DESCR:21,NODE_DEND:22,NODE_ID:23,SHAPE_DATA:24,$accept:0,$end:1},terminals_:{2:"error",6:"SPACELINE",7:"NL",8:"KANBAN",11:"EOF",13:"SPACELIST",16:"ICON",17:"CLASS",20:"NODE_DSTART",21:"NODE_DESCR",22:"NODE_DEND",23:"NODE_ID",24:"SHAPE_DATA"},productions_:[0,[3,1],[3,2],[5,1],[5,2],[5,2],[4,2],[4,3],[10,1],[10,1],[10,1],[10,2],[10,2],[9,3],[9,2],[12,3],[12,2],[12,2],[12,2],[12,1],[12,2],[12,1],[12,1],[12,1],[12,1],[14,1],[14,1],[19,3],[18,1],[18,4],[15,2],[15,1]],performAction:(0,l.K2)(function(t,e,i,n,s,r,o){var a=r.length-1;switch(s){case 6:case 7:return n;case 8:n.getLogger().trace("Stop NL ");break;case 9:n.getLogger().trace("Stop EOF ");break;case 11:n.getLogger().trace("Stop NL2 ");break;case 12:n.getLogger().trace("Stop EOF2 ");break;case 15:n.getLogger().info("Node: ",r[a-1].id),n.addNode(r[a-2].length,r[a-1].id,r[a-1].descr,r[a-1].type,r[a]);break;case 16:n.getLogger().info("Node: ",r[a].id),n.addNode(r[a-1].length,r[a].id,r[a].descr,r[a].type);break;case 17:n.getLogger().trace("Icon: ",r[a]),n.decorateNode({icon:r[a]});break;case 18:case 23:n.decorateNode({class:r[a]});break;case 19:n.getLogger().trace("SPACELIST");break;case 20:n.getLogger().trace("Node: ",r[a-1].id),n.addNode(0,r[a-1].id,r[a-1].descr,r[a-1].type,r[a]);break;case 21:n.getLogger().trace("Node: ",r[a].id),n.addNode(0,r[a].id,r[a].descr,r[a].type);break;case 22:n.decorateNode({icon:r[a]});break;case 27:n.getLogger().trace("node found ..",r[a-2]),this.$={id:r[a-1],descr:r[a-1],type:n.getType(r[a-2],r[a])};break;case 28:this.$={id:r[a],descr:r[a],type:0};break;case 29:n.getLogger().trace("node found ..",r[a-3]),this.$={id:r[a-3],descr:r[a-1],type:n.getType(r[a-2],r[a])};break;case 30:this.$=r[a-1]+r[a];break;case 31:this.$=r[a]}},"anonymous"),table:[{3:1,4:2,5:3,6:[1,5],8:e},{1:[3]},{1:[2,1]},{4:6,6:[1,7],7:[1,8],8:e},{6:i,7:[1,10],9:9,12:11,13:n,14:14,16:s,17:r,18:17,19:18,20:o,23:a},t(c,[2,3]),{1:[2,2]},t(c,[2,4]),t(c,[2,5]),{1:[2,6],6:i,12:21,13:n,14:14,16:s,17:r,18:17,19:18,20:o,23:a},{6:i,9:22,12:11,13:n,14:14,16:s,17:r,18:17,19:18,20:o,23:a},{6:h,7:u,10:23,11:g},t(d,[2,24],{18:17,19:18,14:27,16:[1,28],17:[1,29],20:o,23:a}),t(d,[2,19]),t(d,[2,21],{15:30,24:p}),t(d,[2,22]),t(d,[2,23]),t(y,[2,25]),t(y,[2,26]),t(y,[2,28],{20:[1,32]}),{21:[1,33]},{6:h,7:u,10:34,11:g},{1:[2,7],6:i,12:21,13:n,14:14,16:s,17:r,18:17,19:18,20:o,23:a},t(f,[2,14],{7:m,11:b}),t(_,[2,8]),t(_,[2,9]),t(_,[2,10]),t(d,[2,16],{15:37,24:p}),t(d,[2,17]),t(d,[2,18]),t(d,[2,20],{24:k}),t(y,[2,31]),{21:[1,39]},{22:[1,40]},t(f,[2,13],{7:m,11:b}),t(_,[2,11]),t(_,[2,12]),t(d,[2,15],{24:k}),t(y,[2,30]),{22:[1,41]},t(y,[2,27]),t(y,[2,29])],defaultActions:{2:[2,1],6:[2,2]},parseError:(0,l.K2)(function(t,e){if(e.recoverable)this.trace(t);else{var i=Error(t);throw i.hash=e,i}},"parseError"),parse:(0,l.K2)(function(t){var e=this,i=[0],n=[],s=[null],r=[],o=this.table,a="",c=0,h=0,u=0,g=r.slice.call(arguments,1),d=Object.create(this.lexer),p={};for(var y in this.yy)Object.prototype.hasOwnProperty.call(this.yy,y)&&(p[y]=this.yy[y]);d.setInput(t,p),p.lexer=d,p.parser=this,void 0===d.yylloc&&(d.yylloc={});var f=d.yylloc;r.push(f);var m=d.options&&d.options.ranges;function b(){var t;return"number"!=typeof(t=n.pop()||d.lex()||1)&&(t instanceof Array&&(t=(n=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof p.parseError?this.parseError=p.parseError:this.parseError=Object.getPrototypeOf(this).parseError,(0,l.K2)(function(t){i.length=i.length-2*t,s.length=s.length-t,r.length=r.length-t},"popStack"),(0,l.K2)(b,"lex");for(var _,k,E,S,N,x,D,L,I,v={};;){if(E=i[i.length-1],this.defaultActions[E]?S=this.defaultActions[E]:(null==_&&(_=b()),S=o[E]&&o[E][_]),void 0===S||!S.length||!S[0]){var C="";for(x in I=[],o[E])this.terminals_[x]&&x>2&&I.push("'"+this.terminals_[x]+"'");C=d.showPosition?"Parse error on line "+(c+1)+":\n"+d.showPosition()+"\nExpecting "+I.join(", ")+", got '"+(this.terminals_[_]||_)+"'":"Parse error on line "+(c+1)+": Unexpected "+(1==_?"end of input":"'"+(this.terminals_[_]||_)+"'"),this.parseError(C,{text:d.match,token:this.terminals_[_]||_,line:d.yylineno,loc:f,expected:I})}if(S[0]instanceof Array&&S.length>1)throw Error("Parse Error: multiple actions possible at state: "+E+", token: "+_);switch(S[0]){case 1:i.push(_),s.push(d.yytext),r.push(d.yylloc),i.push(S[1]),_=null,k?(_=k,k=null):(h=d.yyleng,a=d.yytext,c=d.yylineno,f=d.yylloc,u>0&&u--);break;case 2:if(D=this.productions_[S[1]][1],v.$=s[s.length-D],v._$={first_line:r[r.length-(D||1)].first_line,last_line:r[r.length-1].last_line,first_column:r[r.length-(D||1)].first_column,last_column:r[r.length-1].last_column},m&&(v._$.range=[r[r.length-(D||1)].range[0],r[r.length-1].range[1]]),void 0!==(N=this.performAction.apply(v,[a,h,c,p,S[1],s,r].concat(g))))return N;D&&(i=i.slice(0,-1*D*2),s=s.slice(0,-1*D),r=r.slice(0,-1*D)),i.push(this.productions_[S[1]][0]),s.push(v.$),r.push(v._$),L=o[i[i.length-2]][i[i.length-1]],i.push(L);break;case 3:return!0}}return!0},"parse")};function S(){this.yy={}}return E.lexer={EOF:1,parseError:(0,l.K2)(function(t,e){if(this.yy.parser)this.yy.parser.parseError(t,e);else throw Error(t)},"parseError"),setInput:(0,l.K2)(function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:(0,l.K2)(function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},"input"),unput:(0,l.K2)(function(t){var e=t.length,i=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var n=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),i.length-1&&(this.yylineno-=i.length-1);var s=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:i?(i.length===n.length?this.yylloc.first_column:0)+n[n.length-i.length].length-i[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[s[0],s[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},"unput"),more:(0,l.K2)(function(){return this._more=!0,this},"more"),reject:(0,l.K2)(function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"reject"),less:(0,l.K2)(function(t){this.unput(this.match.slice(t))},"less"),pastInput:(0,l.K2)(function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:(0,l.K2)(function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:(0,l.K2)(function(){var t=this.pastInput(),e=Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},"showPosition"),test_match:(0,l.K2)(function(t,e){var i,n,s;if(this.options.backtrack_lexer&&(s={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(s.yylloc.range=this.yylloc.range.slice(0))),(n=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=n.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:n?n[n.length-1].length-n[n.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],i=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),i)return i;if(this._backtrack)for(var r in s)this[r]=s[r];return!1},"test_match"),next:(0,l.K2)(function(){if(this.done)return this.EOF;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var t,e,i,n,s=this._currentRules(),r=0;r<s.length;r++)if((i=this._input.match(this.rules[s[r]]))&&(!e||i[0].length>e[0].length)){if(e=i,n=r,this.options.backtrack_lexer){if(!1!==(t=this.test_match(i,s[r])))return t;if(!this._backtrack)return!1;e=!1;continue}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,s[n]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:(0,l.K2)(function(){var t=this.next();return t||this.lex()},"lex"),begin:(0,l.K2)(function(t){this.conditionStack.push(t)},"begin"),popState:(0,l.K2)(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:(0,l.K2)(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:(0,l.K2)(function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},"topState"),pushState:(0,l.K2)(function(t){this.begin(t)},"pushState"),stateStackSize:(0,l.K2)(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:(0,l.K2)(function(t,e,i,n){switch(i){case 0:return this.pushState("shapeData"),e.yytext="",24;case 1:return this.pushState("shapeDataStr"),24;case 2:return this.popState(),24;case 3:return e.yytext=e.yytext.replace(/\n\s*/g,"<br/>"),24;case 4:return 24;case 5:case 10:case 29:case 32:this.popState();break;case 6:return t.getLogger().trace("Found comment",e.yytext),6;case 7:return 8;case 8:this.begin("CLASS");break;case 9:return this.popState(),17;case 11:t.getLogger().trace("Begin icon"),this.begin("ICON");break;case 12:return t.getLogger().trace("SPACELINE"),6;case 13:return 7;case 14:return 16;case 15:t.getLogger().trace("end icon"),this.popState();break;case 16:return t.getLogger().trace("Exploding node"),this.begin("NODE"),20;case 17:return t.getLogger().trace("Cloud"),this.begin("NODE"),20;case 18:return t.getLogger().trace("Explosion Bang"),this.begin("NODE"),20;case 19:return t.getLogger().trace("Cloud Bang"),this.begin("NODE"),20;case 20:case 21:case 22:case 23:return this.begin("NODE"),20;case 24:return 13;case 25:return 23;case 26:return 11;case 27:this.begin("NSTR2");break;case 28:return"NODE_DESCR";case 30:t.getLogger().trace("Starting NSTR"),this.begin("NSTR");break;case 31:return t.getLogger().trace("description:",e.yytext),"NODE_DESCR";case 33:return this.popState(),t.getLogger().trace("node end ))"),"NODE_DEND";case 34:return this.popState(),t.getLogger().trace("node end )"),"NODE_DEND";case 35:return this.popState(),t.getLogger().trace("node end ...",e.yytext),"NODE_DEND";case 36:case 39:case 40:return this.popState(),t.getLogger().trace("node end (("),"NODE_DEND";case 37:case 38:return this.popState(),t.getLogger().trace("node end (-"),"NODE_DEND";case 41:case 42:return t.getLogger().trace("Long description:",e.yytext),21}},"anonymous"),rules:[/^(?:@\{)/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^\"]+)/i,/^(?:[^}^"]+)/i,/^(?:\})/i,/^(?:\s*%%.*)/i,/^(?:kanban\b)/i,/^(?::::)/i,/^(?:.+)/i,/^(?:\n)/i,/^(?:::icon\()/i,/^(?:[\s]+[\n])/i,/^(?:[\n]+)/i,/^(?:[^\)]+)/i,/^(?:\))/i,/^(?:-\))/i,/^(?:\(-)/i,/^(?:\)\))/i,/^(?:\))/i,/^(?:\(\()/i,/^(?:\{\{)/i,/^(?:\()/i,/^(?:\[)/i,/^(?:[\s]+)/i,/^(?:[^\(\[\n\)\{\}@]+)/i,/^(?:$)/i,/^(?:["][`])/i,/^(?:[^`"]+)/i,/^(?:[`]["])/i,/^(?:["])/i,/^(?:[^"]+)/i,/^(?:["])/i,/^(?:[\)]\))/i,/^(?:[\)])/i,/^(?:[\]])/i,/^(?:\}\})/i,/^(?:\(-)/i,/^(?:-\))/i,/^(?:\(\()/i,/^(?:\()/i,/^(?:[^\)\]\(\}]+)/i,/^(?:.+(?!\(\())/i],conditions:{shapeDataEndBracket:{rules:[],inclusive:!1},shapeDataStr:{rules:[2,3],inclusive:!1},shapeData:{rules:[1,4,5],inclusive:!1},CLASS:{rules:[9,10],inclusive:!1},ICON:{rules:[14,15],inclusive:!1},NSTR2:{rules:[28,29],inclusive:!1},NSTR:{rules:[31,32],inclusive:!1},NODE:{rules:[27,30,33,34,35,36,37,38,39,40,41,42],inclusive:!1},INITIAL:{rules:[0,6,7,8,11,12,13,16,17,18,19,20,21,22,23,24,25,26],inclusive:!0}}},(0,l.K2)(S,"Parser"),S.prototype=E,E.Parser=S,new S}();g.parser=g;var d=[],p=[],y=0,f={},m=(0,l.K2)(()=>{d=[],p=[],y=0,f={}},"clear"),b=(0,l.K2)(t=>{if(0===d.length)return null;let e=d[0].level,i=null;for(let t=d.length-1;t>=0;t--)if(d[t].level!==e||i||(i=d[t]),d[t].level<e)throw Error('Items without section detected, found section ("'+d[t].label+'")');return t===i?.level?null:i},"getSection"),_=(0,l.K2)(function(){return p},"getSections"),k=(0,l.K2)(function(){let t=[],e=_(),i=(0,a.D7)();for(let n of e){let e={id:n.id,label:(0,a.jZ)(n.label??"",i),isGroup:!0,ticket:n.ticket,shape:"kanbanSection",level:n.level,look:i.look};for(let s of(t.push(e),d.filter(t=>t.parentId===n.id))){let e={id:s.id,parentId:n.id,label:(0,a.jZ)(s.label??"",i),isGroup:!1,ticket:s?.ticket,priority:s?.priority,assigned:s?.assigned,icon:s?.icon,shape:"kanbanItem",level:s.level,rx:5,ry:5,cssStyles:["text-align: left"]};t.push(e)}}return{nodes:t,edges:[],other:{},config:(0,a.D7)()}},"getData"),E=(0,l.K2)((t,e,i,n,s)=>{let o=(0,a.D7)(),l=o.mindmap?.padding??a.UI.mindmap.padding;switch(n){case S.ROUNDED_RECT:case S.RECT:case S.HEXAGON:l*=2}let c={id:(0,a.jZ)(e,o)||"kbn"+y++,level:t,label:(0,a.jZ)(i,o),width:o.mindmap?.maxNodeWidth??a.UI.mindmap.maxNodeWidth,padding:l,isGroup:!1};if(void 0!==s){let t;t=s.includes("\n")?s+"\n":"{\n"+s+"\n}";let e=(0,r.H)(t,{schema:r.r});if(e.shape&&(e.shape!==e.shape.toLowerCase()||e.shape.includes("_")))throw Error(`No such shape: ${e.shape}. Shape names should be lowercase.`);e?.shape&&"kanbanItem"===e.shape&&(c.shape=e?.shape),e?.label&&(c.label=e?.label),e?.icon&&(c.icon=e?.icon.toString()),e?.assigned&&(c.assigned=e?.assigned.toString()),e?.ticket&&(c.ticket=e?.ticket.toString()),e?.priority&&(c.priority=e?.priority)}let h=b(t);h?c.parentId=h.id||"kbn"+y++:p.push(c),d.push(c)},"addNode"),S={DEFAULT:0,NO_BORDER:0,ROUNDED_RECT:1,RECT:2,CIRCLE:3,CLOUD:4,BANG:5,HEXAGON:6},N=(0,l.K2)((t,e)=>{switch(l.Rm.debug("In get type",t,e),t){case"[":return S.RECT;case"(":return")"===e?S.ROUNDED_RECT:S.CLOUD;case"((":return S.CIRCLE;case")":return S.CLOUD;case"))":return S.BANG;case"{{":return S.HEXAGON;default:return S.DEFAULT}},"getType"),x=(0,l.K2)((t,e)=>{f[t]=e},"setElementForId"),D=(0,l.K2)(t=>{if(!t)return;let e=(0,a.D7)(),i=d[d.length-1];t.icon&&(i.icon=(0,a.jZ)(t.icon,e)),t.class&&(i.cssClasses=(0,a.jZ)(t.class,e))},"decorateNode"),L=(0,l.K2)(t=>{switch(t){case S.DEFAULT:return"no-border";case S.RECT:return"rect";case S.ROUNDED_RECT:return"rounded-rect";case S.CIRCLE:return"circle";case S.CLOUD:return"cloud";case S.BANG:return"bang";case S.HEXAGON:return"hexgon";default:return"no-border"}},"type2Str"),I=(0,l.K2)(()=>l.Rm,"getLogger"),v=(0,l.K2)(t=>f[t],"getElementById"),C=(0,l.K2)(async(t,e,i,s)=>{l.Rm.debug("Rendering kanban diagram\n"+t);let r=s.db.getData(),c=(0,a.D7)();c.htmlLabels=!1;let h=(0,n.D)(e),u=h.append("g");u.attr("class","sections");let g=h.append("g");g.attr("class","items");let d=r.nodes.filter(t=>t.isGroup),p=0,y=[],f=25;for(let t of d){let e=c?.kanban?.sectionWidth||200;t.x=e*(p+=1)+(p-1)*10/2,t.width=e,t.y=0,t.height=3*e,t.rx=5,t.ry=5,t.cssClasses=t.cssClasses+" section-"+p;let i=await (0,o.U)(u,t);f=Math.max(f,i?.labelBBox?.height),y.push(i)}let m=0;for(let t of d){let e=y[m];m+=1;let i=c?.kanban?.sectionWidth||200,n=-(3*i)/2+f,s=n;for(let e of r.nodes.filter(e=>e.parentId===t.id)){if(e.isGroup)throw Error("Groups within groups are not allowed in Kanban diagrams");e.x=t.x,e.width=i-15;let n=(await (0,o.on)(g,e,{config:c})).node().getBBox();e.y=s+n.height/2,await (0,o.U_)(e),s=e.y+n.height/2+5}let a=e.cluster.select("rect"),l=Math.max(s-n+30,50)+(f-25);a.attr("height",l)}(0,a.ot)(void 0,h,c.mindmap?.padding??a.UI.kanban.padding,c.mindmap?.useMaxWidth??a.UI.kanban.useMaxWidth)},"draw"),O=(0,l.K2)(t=>{let e="";for(let e=0;e<t.THEME_COLOR_LIMIT;e++)t["lineColor"+e]=t["lineColor"+e]||t["cScaleInv"+e],(0,c.A)(t["lineColor"+e])?t["lineColor"+e]=(0,h.A)(t["lineColor"+e],20):t["lineColor"+e]=(0,u.A)(t["lineColor"+e],20);let i=(0,l.K2)((e,i)=>t.darkMode?(0,u.A)(e,i):(0,h.A)(e,i),"adjuster");for(let n=0;n<t.THEME_COLOR_LIMIT;n++){let s=""+(17-3*n);e+=`
2
+ .section-${n-1} rect, .section-${n-1} path, .section-${n-1} circle, .section-${n-1} polygon, .section-${n-1} path {
3
+ fill: ${i(t["cScale"+n],10)};
4
+ stroke: ${i(t["cScale"+n],10)};
5
+
6
+ }
7
+ .section-${n-1} text {
8
+ fill: ${t["cScaleLabel"+n]};
9
+ }
10
+ .node-icon-${n-1} {
11
+ font-size: 40px;
12
+ color: ${t["cScaleLabel"+n]};
13
+ }
14
+ .section-edge-${n-1}{
15
+ stroke: ${t["cScale"+n]};
16
+ }
17
+ .edge-depth-${n-1}{
18
+ stroke-width: ${s};
19
+ }
20
+ .section-${n-1} line {
21
+ stroke: ${t["cScaleInv"+n]} ;
22
+ stroke-width: 3;
23
+ }
24
+
25
+ .disabled, .disabled circle, .disabled text {
26
+ fill: lightgray;
27
+ }
28
+ .disabled text {
29
+ fill: #efefef;
30
+ }
31
+
32
+ .node rect,
33
+ .node circle,
34
+ .node ellipse,
35
+ .node polygon,
36
+ .node path {
37
+ fill: ${t.background};
38
+ stroke: ${t.nodeBorder};
39
+ stroke-width: 1px;
40
+ }
41
+
42
+ .kanban-ticket-link {
43
+ fill: ${t.background};
44
+ stroke: ${t.nodeBorder};
45
+ text-decoration: underline;
46
+ }
47
+ `}return e},"genSections"),A={db:{clear:m,addNode:E,getSections:_,getData:k,nodeType:S,getType:N,setElementForId:x,decorateNode:D,type2Str:L,getLogger:I,getElementById:v},renderer:{draw:C},parser:g,styles:(0,l.K2)(t=>`
48
+ .edge {
49
+ stroke-width: 3;
50
+ }
51
+ ${O(t)}
52
+ .section-root rect, .section-root path, .section-root circle, .section-root polygon {
53
+ fill: ${t.git0};
54
+ }
55
+ .section-root text {
56
+ fill: ${t.gitBranchLabel0};
57
+ }
58
+ .icon-container {
59
+ height:100%;
60
+ display: flex;
61
+ justify-content: center;
62
+ align-items: center;
63
+ }
64
+ .edge {
65
+ fill: none;
66
+ }
67
+ .cluster-label, .label {
68
+ color: ${t.textColor};
69
+ fill: ${t.textColor};
70
+ }
71
+ .kanban-label {
72
+ dy: 1em;
73
+ alignment-baseline: middle;
74
+ text-anchor: middle;
75
+ dominant-baseline: middle;
76
+ text-align: center;
77
+ }
78
+ ${(0,s.o)()}
79
+ `,"getStyles")}},78424:(t,e,i)=>{i.d(e,{o:()=>n});var n=(0,i(36416).K2)(()=>`
80
+ /* Font Awesome icon styling - consolidated */
81
+ .label-icon {
82
+ display: inline-block;
83
+ height: 1em;
84
+ overflow: visible;
85
+ vertical-align: -0.125em;
86
+ }
87
+
88
+ .node .label-icon path {
89
+ fill: currentColor;
90
+ stroke: revert;
91
+ stroke-width: revert;
92
+ }
93
+ `,"getIconStyles")}}]);
@@ -1,4 +1,4 @@
1
- "use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[21078],{21078:(t,e,s)=>{s.d(e,{diagram:()=>E});var i=s(78424),r=s(2688),a=s(61052),u=s(37317),n=s(30944);s(17297),s(74303);var o=s(8344);s(95952),s(3334),s(71409);var l=s(98671),c=s(3386),h=s(36416),d=s(16222),p=s(57919),g=s(30042),A=class{constructor(){this.vertexCounter=0,this.config=(0,c.D7)(),this.vertices=new Map,this.edges=[],this.classes=new Map,this.subGraphs=[],this.subGraphLookup=new Map,this.tooltips=new Map,this.subCount=0,this.firstGraphFlag=!0,this.secCount=-1,this.posCrossRef=[],this.funs=[],this.setAccTitle=c.SV,this.setAccDescription=c.EI,this.setDiagramTitle=c.ke,this.getAccTitle=c.iN,this.getAccDescription=c.m7,this.getDiagramTitle=c.ab,this.funs.push(this.setupToolTips.bind(this)),this.addVertex=this.addVertex.bind(this),this.firstGraph=this.firstGraph.bind(this),this.setDirection=this.setDirection.bind(this),this.addSubGraph=this.addSubGraph.bind(this),this.addLink=this.addLink.bind(this),this.setLink=this.setLink.bind(this),this.updateLink=this.updateLink.bind(this),this.addClass=this.addClass.bind(this),this.setClass=this.setClass.bind(this),this.destructLink=this.destructLink.bind(this),this.setClickEvent=this.setClickEvent.bind(this),this.setTooltip=this.setTooltip.bind(this),this.updateLinkInterpolate=this.updateLinkInterpolate.bind(this),this.setClickFun=this.setClickFun.bind(this),this.bindFunctions=this.bindFunctions.bind(this),this.lex={firstGraph:this.firstGraph.bind(this)},this.clear(),this.setGen("gen-2")}static{(0,h.K2)(this,"FlowDB")}sanitizeText(t){return c.Y2.sanitizeText(t,this.config)}lookUpDomId(t){for(let e of this.vertices.values())if(e.id===t)return e.domId;return t}addVertex(t,e,s,i,a,u,n={},l){let h,d;if(!t||0===t.trim().length)return;if(void 0!==l){let t;t=l.includes("\n")?l+"\n":"{\n"+l+"\n}",h=(0,r.H)(t,{schema:r.r})}let p=this.edges.find(e=>e.id===t);if(p){let t=h;t?.animate!==void 0&&(p.animate=t.animate),t?.animation!==void 0&&(p.animation=t.animation),t?.curve!==void 0&&(p.interpolate=t.curve);return}let g=this.vertices.get(t);if(void 0===g&&(g={id:t,labelType:"text",domId:"flowchart-"+t+"-"+this.vertexCounter,styles:[],classes:[]},this.vertices.set(t,g)),this.vertexCounter++,void 0!==e?(this.config=(0,c.D7)(),d=this.sanitizeText(e.text.trim()),g.labelType=e.type,d.startsWith('"')&&d.endsWith('"')&&(d=d.substring(1,d.length-1)),g.text=d):void 0===g.text&&(g.text=t),void 0!==s&&(g.type=s),null!=i&&i.forEach(t=>{g.styles.push(t)}),null!=a&&a.forEach(t=>{g.classes.push(t)}),void 0!==u&&(g.dir=u),void 0===g.props?g.props=n:void 0!==n&&Object.assign(g.props,n),void 0!==h){if(h.shape){if(h.shape!==h.shape.toLowerCase()||h.shape.includes("_"))throw Error(`No such shape: ${h.shape}. Shape names should be lowercase.`);if(!(0,o.aP)(h.shape))throw Error(`No such shape: ${h.shape}.`);g.type=h?.shape}h?.label&&(g.text=h?.label),h?.icon&&(g.icon=h?.icon,h.label?.trim()||g.text!==t||(g.text="")),h?.form&&(g.form=h?.form),h?.pos&&(g.pos=h?.pos),h?.img&&(g.img=h?.img,h.label?.trim()||g.text!==t||(g.text="")),h?.constraint&&(g.constraint=h.constraint),h.w&&(g.assetWidth=Number(h.w)),h.h&&(g.assetHeight=Number(h.h))}}addSingleLink(t,e,s,i){let r={start:t,end:e,type:void 0,text:"",labelType:"text",classes:[],isUserDefinedId:!1,interpolate:this.edges.defaultInterpolate};h.Rm.info("abc78 Got edge...",r);let a=s.text;if(void 0!==a&&(r.text=this.sanitizeText(a.text.trim()),r.text.startsWith('"')&&r.text.endsWith('"')&&(r.text=r.text.substring(1,r.text.length-1)),r.labelType=a.type),void 0!==s&&(r.type=s.type,r.stroke=s.stroke,r.length=s.length>10?10:s.length),i&&!this.edges.some(t=>t.id===i))r.id=i,r.isUserDefinedId=!0;else{let t=this.edges.filter(t=>t.start===r.start&&t.end===r.end);0===t.length?r.id=(0,l.rY)(r.start,r.end,{counter:0,prefix:"L"}):r.id=(0,l.rY)(r.start,r.end,{counter:t.length+1,prefix:"L"})}if(this.edges.length<(this.config.maxEdges??500))h.Rm.info("Pushing edge..."),this.edges.push(r);else throw Error(`Edge limit exceeded. ${this.edges.length} edges found, but the limit is ${this.config.maxEdges}.
1
+ "use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[21078],{21078:(t,e,s)=>{s.d(e,{diagram:()=>E});var i=s(78424),r=s(2688),a=s(61052),u=s(37317),n=s(30944);s(17297),s(74303);var o=s(85963);s(95952),s(3334),s(71409);var l=s(98671),c=s(3386),h=s(36416),d=s(16222),p=s(57919),g=s(30042),A=class{constructor(){this.vertexCounter=0,this.config=(0,c.D7)(),this.vertices=new Map,this.edges=[],this.classes=new Map,this.subGraphs=[],this.subGraphLookup=new Map,this.tooltips=new Map,this.subCount=0,this.firstGraphFlag=!0,this.secCount=-1,this.posCrossRef=[],this.funs=[],this.setAccTitle=c.SV,this.setAccDescription=c.EI,this.setDiagramTitle=c.ke,this.getAccTitle=c.iN,this.getAccDescription=c.m7,this.getDiagramTitle=c.ab,this.funs.push(this.setupToolTips.bind(this)),this.addVertex=this.addVertex.bind(this),this.firstGraph=this.firstGraph.bind(this),this.setDirection=this.setDirection.bind(this),this.addSubGraph=this.addSubGraph.bind(this),this.addLink=this.addLink.bind(this),this.setLink=this.setLink.bind(this),this.updateLink=this.updateLink.bind(this),this.addClass=this.addClass.bind(this),this.setClass=this.setClass.bind(this),this.destructLink=this.destructLink.bind(this),this.setClickEvent=this.setClickEvent.bind(this),this.setTooltip=this.setTooltip.bind(this),this.updateLinkInterpolate=this.updateLinkInterpolate.bind(this),this.setClickFun=this.setClickFun.bind(this),this.bindFunctions=this.bindFunctions.bind(this),this.lex={firstGraph:this.firstGraph.bind(this)},this.clear(),this.setGen("gen-2")}static{(0,h.K2)(this,"FlowDB")}sanitizeText(t){return c.Y2.sanitizeText(t,this.config)}lookUpDomId(t){for(let e of this.vertices.values())if(e.id===t)return e.domId;return t}addVertex(t,e,s,i,a,u,n={},l){let h,d;if(!t||0===t.trim().length)return;if(void 0!==l){let t;t=l.includes("\n")?l+"\n":"{\n"+l+"\n}",h=(0,r.H)(t,{schema:r.r})}let p=this.edges.find(e=>e.id===t);if(p){let t=h;t?.animate!==void 0&&(p.animate=t.animate),t?.animation!==void 0&&(p.animation=t.animation),t?.curve!==void 0&&(p.interpolate=t.curve);return}let g=this.vertices.get(t);if(void 0===g&&(g={id:t,labelType:"text",domId:"flowchart-"+t+"-"+this.vertexCounter,styles:[],classes:[]},this.vertices.set(t,g)),this.vertexCounter++,void 0!==e?(this.config=(0,c.D7)(),d=this.sanitizeText(e.text.trim()),g.labelType=e.type,d.startsWith('"')&&d.endsWith('"')&&(d=d.substring(1,d.length-1)),g.text=d):void 0===g.text&&(g.text=t),void 0!==s&&(g.type=s),null!=i&&i.forEach(t=>{g.styles.push(t)}),null!=a&&a.forEach(t=>{g.classes.push(t)}),void 0!==u&&(g.dir=u),void 0===g.props?g.props=n:void 0!==n&&Object.assign(g.props,n),void 0!==h){if(h.shape){if(h.shape!==h.shape.toLowerCase()||h.shape.includes("_"))throw Error(`No such shape: ${h.shape}. Shape names should be lowercase.`);if(!(0,o.aP)(h.shape))throw Error(`No such shape: ${h.shape}.`);g.type=h?.shape}h?.label&&(g.text=h?.label),h?.icon&&(g.icon=h?.icon,h.label?.trim()||g.text!==t||(g.text="")),h?.form&&(g.form=h?.form),h?.pos&&(g.pos=h?.pos),h?.img&&(g.img=h?.img,h.label?.trim()||g.text!==t||(g.text="")),h?.constraint&&(g.constraint=h.constraint),h.w&&(g.assetWidth=Number(h.w)),h.h&&(g.assetHeight=Number(h.h))}}addSingleLink(t,e,s,i){let r={start:t,end:e,type:void 0,text:"",labelType:"text",classes:[],isUserDefinedId:!1,interpolate:this.edges.defaultInterpolate};h.Rm.info("abc78 Got edge...",r);let a=s.text;if(void 0!==a&&(r.text=this.sanitizeText(a.text.trim()),r.text.startsWith('"')&&r.text.endsWith('"')&&(r.text=r.text.substring(1,r.text.length-1)),r.labelType=a.type),void 0!==s&&(r.type=s.type,r.stroke=s.stroke,r.length=s.length>10?10:s.length),i&&!this.edges.some(t=>t.id===i))r.id=i,r.isUserDefinedId=!0;else{let t=this.edges.filter(t=>t.start===r.start&&t.end===r.end);0===t.length?r.id=(0,l.rY)(r.start,r.end,{counter:0,prefix:"L"}):r.id=(0,l.rY)(r.start,r.end,{counter:t.length+1,prefix:"L"})}if(this.edges.length<(this.config.maxEdges??500))h.Rm.info("Pushing edge..."),this.edges.push(r);else throw Error(`Edge limit exceeded. ${this.edges.length} edges found, but the limit is ${this.config.maxEdges}.
2
2
 
3
3
  Initialize mermaid with maxEdges set to a higher number to allow more edges.
4
4
  You cannot set this config via configuration inside the diagram as it is a secure config.
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[26917],{26917:(e,t,n)=>{n.r(t),n.d(t,{render:()=>A});var r=n(17297);n(74303);var i=n(85963),a=n(95952);n(3334),n(71409),n(98671);var d=n(3386),o=n(36416),s=n(15309),l=n(79148),g=n(63709),c=n(35514);function f(e){var t,n,r={options:{directed:e.isDirected(),multigraph:e.isMultigraph(),compound:e.isCompound()},nodes:(t=e,c.A(t.nodes(),function(e){var n=t.node(e),r=t.parent(e),i={v:e};return l.A(n)||(i.value=n),l.A(r)||(i.parent=r),i})),edges:(n=e,c.A(n.edges(),function(e){var t=n.edge(e),r={v:e.v,w:e.w};return l.A(e.name)||(r.name=e.name),l.A(t)||(r.value=t),r}))};return l.A(e.graph())||(r.value=g.A(e.graph())),r}n(78366);var h=n(43111),p=new Map,u=new Map,m=new Map,w=(0,o.K2)(()=>{u.clear(),m.clear(),p.clear()},"clear"),R=(0,o.K2)((e,t)=>{let n=u.get(t)||[];return o.Rm.trace("In isDescendant",t," ",e," = ",n.includes(e)),n.includes(e)},"isDescendant"),v=(0,o.K2)((e,t)=>{let n=u.get(t)||[];return o.Rm.info("Descendants of ",t," is ",n),o.Rm.info("Edge is ",e),e.v!==t&&e.w!==t&&(n?n.includes(e.v)||R(e.v,t)||R(e.w,t)||n.includes(e.w):(o.Rm.debug("Tilt, ",t,",not in descendants"),!1))},"edgeInCluster"),y=(0,o.K2)((e,t,n,r)=>{o.Rm.warn("Copying children of ",e,"root",r,"data",t.node(e),r);let i=t.children(e)||[];e!==r&&i.push(e),o.Rm.warn("Copying (nodes) clusterId",e,"nodes",i),i.forEach(i=>{if(t.children(i).length>0)y(i,t,n,r);else{let a=t.node(i);o.Rm.info("cp ",i," to ",r," with parent ",e),n.setNode(i,a),r!==t.parent(i)&&(o.Rm.warn("Setting parent",i,t.parent(i)),n.setParent(i,t.parent(i))),e!==r&&i!==e?(o.Rm.debug("Setting parent",i,e),n.setParent(i,e)):(o.Rm.info("In copy ",e,"root",r,"data",t.node(e),r),o.Rm.debug("Not Setting parent for node=",i,"cluster!==rootId",e!==r,"node!==clusterId",i!==e));let d=t.edges(i);o.Rm.debug("Copying Edges",d),d.forEach(i=>{o.Rm.info("Edge",i);let a=t.edge(i.v,i.w,i.name);o.Rm.info("Edge data",a,r);try{v(i,r)?(o.Rm.info("Copying as ",i.v,i.w,a,i.name),n.setEdge(i.v,i.w,a,i.name),o.Rm.info("newGraph edges ",n.edges(),n.edge(n.edges()[0]))):o.Rm.info("Skipping copy of edge ",i.v,"--\x3e",i.w," rootId: ",r," clusterId:",e)}catch(e){o.Rm.error(e)}})}o.Rm.debug("Removing node",i),t.removeNode(i)})},"copy"),X=(0,o.K2)((e,t)=>{let n=t.children(e),r=[...n];for(let i of n)m.set(i,e),r=[...r,...X(i,t)];return r},"extractDescendants"),E=(0,o.K2)((e,t,n)=>{let r=e.edges().filter(e=>e.v===t||e.w===t),i=e.edges().filter(e=>e.v===n||e.w===n),a=r.map(e=>({v:e.v===t?n:e.v,w:e.w===t?t:e.w})),d=i.map(e=>({v:e.v,w:e.w}));return a.filter(e=>d.some(t=>e.v===t.v&&e.w===t.w))},"findCommonEdges"),N=(0,o.K2)((e,t,n)=>{let r,i=t.children(e);if(o.Rm.trace("Searching children of id ",e,i),i.length<1)return e;for(let e of i){let i=N(e,t,n),a=E(t,n,i);if(i)if(!(a.length>0))return i;else r=i}return r},"findNonClusterChild"),b=(0,o.K2)(e=>p.has(e)&&p.get(e).externalConnections&&p.has(e)?p.get(e).id:e,"getAnchorId"),C=(0,o.K2)((e,t)=>{if(!e||t>10)return void o.Rm.debug("Opting out, no graph ");for(let t of(o.Rm.debug("Opting in, graph "),e.nodes().forEach(function(t){e.children(t).length>0&&(o.Rm.warn("Cluster identified",t," Replacement id in edges: ",N(t,e,t)),u.set(t,X(t,e)),p.set(t,{id:N(t,e,t),clusterData:e.node(t)}))}),e.nodes().forEach(function(t){let n=e.children(t),r=e.edges();n.length>0?(o.Rm.debug("Cluster identified",t,u),r.forEach(e=>{R(e.v,t)^R(e.w,t)&&(o.Rm.warn("Edge: ",e," leaves cluster ",t),o.Rm.warn("Descendants of XXX ",t,": ",u.get(t)),p.get(t).externalConnections=!0)})):o.Rm.debug("Not a cluster ",t,u)}),p.keys())){let n=p.get(t).id,r=e.parent(n);r!==t&&p.has(r)&&!p.get(r).externalConnections&&(p.get(t).id=r)}e.edges().forEach(function(t){let n=e.edge(t);o.Rm.warn("Edge "+t.v+" -> "+t.w+": "+JSON.stringify(t)),o.Rm.warn("Edge "+t.v+" -> "+t.w+": "+JSON.stringify(e.edge(t)));let r=t.v,i=t.w;if(o.Rm.warn("Fix XXX",p,"ids:",t.v,t.w,"Translating: ",p.get(t.v)," --- ",p.get(t.w)),p.get(t.v)||p.get(t.w)){if(o.Rm.warn("Fixing and trying - removing XXX",t.v,t.w,t.name),r=b(t.v),i=b(t.w),e.removeEdge(t.v,t.w,t.name),r!==t.v){let i=e.parent(r);p.get(i).externalConnections=!0,n.fromCluster=t.v}if(i!==t.w){let r=e.parent(i);p.get(r).externalConnections=!0,n.toCluster=t.w}o.Rm.warn("Fix Replacing with XXX",r,i,t.name),e.setEdge(r,i,n,t.name)}}),o.Rm.warn("Adjusted Graph",f(e)),S(e,0),o.Rm.trace(p)},"adjustClustersAndEdges"),S=(0,o.K2)((e,t)=>{if(o.Rm.warn("extractor - ",t,f(e),e.children("D")),t>10)return void o.Rm.error("Bailing out");let n=e.nodes(),r=!1;for(let t of n){let n=e.children(t);r=r||n.length>0}if(!r)return void o.Rm.debug("Done, no node has children",e.nodes());for(let r of(o.Rm.debug("Nodes = ",n,t),n))if(o.Rm.debug("Extracting node",r,p,p.has(r)&&!p.get(r).externalConnections,!e.parent(r),e.node(r),e.children("D")," Depth ",t),p.has(r))if(!p.get(r).externalConnections&&e.children(r)&&e.children(r).length>0){o.Rm.warn("Cluster without external connections, without a parent and with children",r,t);let n="TB"===e.graph().rankdir?"LR":"TB";p.get(r)?.clusterData?.dir&&(n=p.get(r).clusterData.dir,o.Rm.warn("Fixing dir",p.get(r).clusterData.dir,n));let i=new h.T({multigraph:!0,compound:!0}).setGraph({rankdir:n,nodesep:50,ranksep:50,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}});o.Rm.warn("Old graph before copy",f(e)),y(r,e,i,r),e.setNode(r,{clusterNode:!0,id:r,clusterData:p.get(r).clusterData,label:p.get(r).label,graph:i}),o.Rm.warn("New graph after copy node: (",r,")",f(i)),o.Rm.debug("Old graph after copy",f(e))}else o.Rm.warn("Cluster ** ",r," **not meeting the criteria !externalConnections:",!p.get(r).externalConnections," no parent: ",!e.parent(r)," children ",e.children(r)&&e.children(r).length>0,e.children("D"),t),o.Rm.debug(p);else o.Rm.debug("Not a cluster",r,t);for(let r of(n=e.nodes(),o.Rm.warn("New list of nodes",n),n)){let n=e.node(r);o.Rm.warn(" Now next level",r,n),n?.clusterNode&&S(n.graph,t+1)}},"extractor"),x=(0,o.K2)((e,t)=>{if(0===t.length)return[];let n=Object.assign([],t);return t.forEach(t=>{let r=e.children(t),i=x(e,r);n=[...n,...i]}),n},"sorter"),I=(0,o.K2)(e=>x(e,e.children()),"sortNodesByHierarchy"),D=(0,o.K2)(async(e,t,n,d,l,g)=>{o.Rm.warn("Graph in recursive render:XAX",f(t),l);let c=t.graph().rankdir;o.Rm.trace("Dir in recursive render - dir:",c);let h=e.insert("g").attr("class","root");t.nodes()?o.Rm.info("Recursive render XXX",t.nodes()):o.Rm.info("No nodes found for",t),t.edges().length>0&&o.Rm.info("Recursive edges",t.edge(t.edges()[0]));let u=h.insert("g").attr("class","clusters"),m=h.insert("g").attr("class","edgePaths"),w=h.insert("g").attr("class","edgeLabels"),R=h.insert("g").attr("class","nodes");await Promise.all(t.nodes().map(async function(e){let r=t.node(e);if(void 0!==l){let n=JSON.parse(JSON.stringify(l.clusterData));o.Rm.trace("Setting data for parent cluster XXX\n Node.id = ",e,"\n data=",n.height,"\nParent cluster",l.height),t.setNode(l.id,n),t.parent(e)||(o.Rm.trace("Setting parent",e,l.id),t.setParent(e,l.id,n))}if(o.Rm.info("(Insert) Node XXX"+e+": "+JSON.stringify(t.node(e))),r?.clusterNode){o.Rm.info("Cluster identified XBX",e,r.width,t.node(e));let{ranksep:a,nodesep:s}=t.graph();r.graph.setGraph({...r.graph.graph(),ranksep:a+25,nodesep:s});let l=await D(R,r.graph,n,d,t.node(e),g),c=l.elem;(0,i.lC)(r,c),r.diff=l.diff||0,o.Rm.info("New compound node after recursive render XAX",e,"width",r.width,"height",r.height),(0,i.U7)(c,r)}else t.children(e).length>0?(o.Rm.trace("Cluster - the non recursive path XBX",e,r.id,r,r.width,"Graph:",t),o.Rm.trace(N(r.id,t)),p.set(r.id,{id:N(r.id,t),node:r})):(o.Rm.trace("Node - the non recursive path XAX",e,R,t.node(e),c),await (0,i.on)(R,t.node(e),{config:g,dir:c}))}));let v=(0,o.K2)(async()=>{let e=t.edges().map(async function(e){let n=t.edge(e.v,e.w,e.name);o.Rm.info("Edge "+e.v+" -> "+e.w+": "+JSON.stringify(e)),o.Rm.info("Edge "+e.v+" -> "+e.w+": ",e," ",JSON.stringify(t.edge(e))),o.Rm.info("Fix",p,"ids:",e.v,e.w,"Translating: ",p.get(e.v),p.get(e.w)),await (0,r.jP)(w,n)});await Promise.all(e)},"processEdges");await v(),o.Rm.info("Graph before layout:",JSON.stringify(f(t))),o.Rm.info("############################################# XXX"),o.Rm.info("### Layout ### XXX"),o.Rm.info("############################################# XXX"),(0,s.Zp)(t),o.Rm.info("Graph after layout:",JSON.stringify(f(t)));let y=0,{subGraphTitleTotalMargin:X}=(0,a.O)(g);return await Promise.all(I(t).map(async function(e){let n=t.node(e);if(o.Rm.info("Position XBX => "+e+": ("+n.x,","+n.y,") width: ",n.width," height: ",n.height),n?.clusterNode)n.y+=X,o.Rm.info("A tainted cluster node XBX1",e,n.id,n.width,n.height,n.x,n.y,t.parent(e)),p.get(n.id).node=n,(0,i.U_)(n);else if(t.children(e).length>0){o.Rm.info("A pure cluster node XBX1",e,n.id,n.x,n.y,n.width,n.height,t.parent(e)),n.height+=X,t.node(n.parentId);let r=n?.padding/2||0,a=n?.labelBBox?.height||0;o.Rm.debug("OffsetY",a-r||0,"labelHeight",a,"halfPadding",r),await (0,i.U)(u,n),p.get(n.id).node=n}else{let e=t.node(n.parentId);n.y+=X/2,o.Rm.info("A regular node XBX1 - using the padding",n.id,"parent",n.parentId,n.width,n.height,n.x,n.y,"offsetY",n.offsetY,"parent",e,e?.offsetY,n),(0,i.U_)(n)}})),t.edges().forEach(function(e){let i=t.edge(e);o.Rm.info("Edge "+e.v+" -> "+e.w+": "+JSON.stringify(i),i),i.points.forEach(e=>e.y+=X/2);let a=t.node(e.v);var s=t.node(e.w);let l=(0,r.Jo)(m,i,p,n,a,s,d);(0,r.T_)(i,l)}),t.nodes().forEach(function(e){let n=t.node(e);o.Rm.info(e,n.type,n.diff),n.isGroup&&(y=n.diff)}),o.Rm.warn("Returning from recursive render XAX",h,y),{elem:h,diff:y}},"recursiveRender"),A=(0,o.K2)(async(e,t)=>{let n=new h.T({multigraph:!0,compound:!0}).setGraph({rankdir:e.direction,nodesep:e.config?.nodeSpacing||e.config?.flowchart?.nodeSpacing||e.nodeSpacing,ranksep:e.config?.rankSpacing||e.config?.flowchart?.rankSpacing||e.rankSpacing,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}}),a=t.select("g");(0,r.g0)(a,e.markers,e.type,e.diagramId),(0,i.gh)(),(0,r.IU)(),(0,i.IU)(),w(),e.nodes.forEach(e=>{n.setNode(e.id,{...e}),e.parentId&&n.setParent(e.id,e.parentId)}),o.Rm.debug("Edges:",e.edges),e.edges.forEach(e=>{if(e.start===e.end){let t=e.start,r=t+"---"+t+"---1",i=t+"---"+t+"---2",a=n.node(t);n.setNode(r,{domId:r,id:r,parentId:a.parentId,labelStyle:"",label:"",padding:0,shape:"labelRect",style:"",width:10,height:10}),n.setParent(r,a.parentId),n.setNode(i,{domId:i,id:i,parentId:a.parentId,labelStyle:"",padding:0,shape:"labelRect",label:"",style:"",width:10,height:10}),n.setParent(i,a.parentId);let d=structuredClone(e),o=structuredClone(e),s=structuredClone(e);d.label="",d.arrowTypeEnd="none",d.id=t+"-cyclic-special-1",o.arrowTypeStart="none",o.arrowTypeEnd="none",o.id=t+"-cyclic-special-mid",s.label="",a.isGroup&&(d.fromCluster=t,s.toCluster=t),s.id=t+"-cyclic-special-2",s.arrowTypeStart="none",n.setEdge(t,r,d,t+"-cyclic-special-0"),n.setEdge(r,i,o,t+"-cyclic-special-1"),n.setEdge(i,t,s,t+"-cyc<lic-special-2")}else n.setEdge(e.start,e.end,{...e},e.id)}),o.Rm.warn("Graph at first:",JSON.stringify(f(n))),C(n),o.Rm.warn("Graph after XAX:",JSON.stringify(f(n)));let s=(0,d.D7)();await D(a,n,e.type,e.diagramId,void 0,s)},"render")},63709:(e,t,n)=>{n.d(t,{A:()=>i});var r=n(59564);let i=function(e){return(0,r.A)(e,4)}}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[331],{331:(r,e,s)=>{s.d(e,{diagram:()=>l});var a=s(20871);s(78424),s(61052),s(37317),s(30944),s(17297),s(74303),s(85963),s(95952),s(3334),s(71409),s(98671),s(3386);var t=s(36416),l={parser:a._$,get db(){return new a.NM},renderer:a.Lh,styles:a.tM,init:(0,t.K2)(r=>{r.class||(r.class={}),r.class.arrowMarkerAbsolute=r.arrowMarkerAbsolute},"init")}}}]);
@@ -0,0 +1,55 @@
1
+ "use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[47065],{37317:(t,e,i)=>{i.d(e,{P:()=>r});var s=i(3386),n=i(36416),r=(0,n.K2)((t,e,i,r)=>{t.attr("class",i);let{width:l,height:o,x:h,y:u}=a(t,e);(0,s.a$)(t,o,l,r);let d=c(h,u,l,o,e);t.attr("viewBox",d),n.Rm.debug(`viewBox configured: ${d} with padding: ${e}`)},"setupViewPortForSVG"),a=(0,n.K2)((t,e)=>{let i=t.node()?.getBBox()||{width:0,height:0,x:0,y:0};return{width:i.width+2*e,height:i.height+2*e,x:i.x,y:i.y}},"calculateDimensionsWithPadding"),c=(0,n.K2)((t,e,i,s,n)=>`${t-n} ${e-n} ${i} ${s}`,"createViewBox")},47065:(t,e,i)=>{i.d(e,{diagram:()=>b});var s=i(61052),n=i(37317),r=i(30944);i(17297),i(74303),i(85963),i(95952),i(3334),i(71409);var a=i(98671),c=i(3386),l=i(36416),o=i(16222),h=i(57919),u=i(30042),d=function(){var t=(0,l.K2)(function(t,e,i,s){for(i=i||{},s=t.length;s--;i[t[s]]=e);return i},"o"),e=[6,8,10,22,24,26,28,33,34,35,36,37,40,43,44,50],i=[1,10],s=[1,11],n=[1,12],r=[1,13],a=[1,20],c=[1,21],o=[1,22],h=[1,23],u=[1,24],d=[1,19],y=[1,25],p=[1,26],_=[1,18],g=[1,33],b=[1,34],m=[1,35],f=[1,36],E=[1,37],k=[6,8,10,13,15,17,20,21,22,24,26,28,33,34,35,36,37,40,43,44,50,63,64,65,66,67],S=[1,42],O=[1,43],T=[1,52],A=[40,50,68,69],R=[1,63],N=[1,61],I=[1,58],C=[1,62],x=[1,64],D=[6,8,10,13,17,22,24,26,28,33,34,35,36,37,40,41,42,43,44,48,49,50,63,64,65,66,67],$=[63,64,65,66,67],v=[1,81],K=[1,80],w=[1,78],L=[1,79],M=[6,10,42,47],B=[6,10,13,41,42,47,48,49],F=[1,89],P=[1,88],Y=[1,87],G=[19,56],z=[1,98],U=[1,97],Z=[19,56,58,60],j={trace:(0,l.K2)(function(){},"trace"),yy:{},symbols_:{error:2,start:3,ER_DIAGRAM:4,document:5,EOF:6,line:7,SPACE:8,statement:9,NEWLINE:10,entityName:11,relSpec:12,COLON:13,role:14,STYLE_SEPARATOR:15,idList:16,BLOCK_START:17,attributes:18,BLOCK_STOP:19,SQS:20,SQE:21,title:22,title_value:23,acc_title:24,acc_title_value:25,acc_descr:26,acc_descr_value:27,acc_descr_multiline_value:28,direction:29,classDefStatement:30,classStatement:31,styleStatement:32,direction_tb:33,direction_bt:34,direction_rl:35,direction_lr:36,CLASSDEF:37,stylesOpt:38,separator:39,UNICODE_TEXT:40,STYLE_TEXT:41,COMMA:42,CLASS:43,STYLE:44,style:45,styleComponent:46,SEMI:47,NUM:48,BRKT:49,ENTITY_NAME:50,attribute:51,attributeType:52,attributeName:53,attributeKeyTypeList:54,attributeComment:55,ATTRIBUTE_WORD:56,attributeKeyType:57,",":58,ATTRIBUTE_KEY:59,COMMENT:60,cardinality:61,relType:62,ZERO_OR_ONE:63,ZERO_OR_MORE:64,ONE_OR_MORE:65,ONLY_ONE:66,MD_PARENT:67,NON_IDENTIFYING:68,IDENTIFYING:69,WORD:70,$accept:0,$end:1},terminals_:{2:"error",4:"ER_DIAGRAM",6:"EOF",8:"SPACE",10:"NEWLINE",13:"COLON",15:"STYLE_SEPARATOR",17:"BLOCK_START",19:"BLOCK_STOP",20:"SQS",21:"SQE",22:"title",23:"title_value",24:"acc_title",25:"acc_title_value",26:"acc_descr",27:"acc_descr_value",28:"acc_descr_multiline_value",33:"direction_tb",34:"direction_bt",35:"direction_rl",36:"direction_lr",37:"CLASSDEF",40:"UNICODE_TEXT",41:"STYLE_TEXT",42:"COMMA",43:"CLASS",44:"STYLE",47:"SEMI",48:"NUM",49:"BRKT",50:"ENTITY_NAME",56:"ATTRIBUTE_WORD",58:",",59:"ATTRIBUTE_KEY",60:"COMMENT",63:"ZERO_OR_ONE",64:"ZERO_OR_MORE",65:"ONE_OR_MORE",66:"ONLY_ONE",67:"MD_PARENT",68:"NON_IDENTIFYING",69:"IDENTIFYING",70:"WORD"},productions_:[0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[9,5],[9,9],[9,7],[9,7],[9,4],[9,6],[9,3],[9,5],[9,1],[9,3],[9,7],[9,9],[9,6],[9,8],[9,4],[9,6],[9,2],[9,2],[9,2],[9,1],[9,1],[9,1],[9,1],[9,1],[29,1],[29,1],[29,1],[29,1],[30,4],[16,1],[16,1],[16,3],[16,3],[31,3],[32,4],[38,1],[38,3],[45,1],[45,2],[39,1],[39,1],[39,1],[46,1],[46,1],[46,1],[46,1],[11,1],[11,1],[18,1],[18,2],[51,2],[51,3],[51,3],[51,4],[52,1],[53,1],[54,1],[54,3],[57,1],[55,1],[12,3],[61,1],[61,1],[61,1],[61,1],[61,1],[62,1],[62,1],[14,1],[14,1],[14,1]],performAction:(0,l.K2)(function(t,e,i,s,n,r,a){var c=r.length-1;switch(n){case 1:break;case 2:case 6:case 7:this.$=[];break;case 3:r[c-1].push(r[c]),this.$=r[c-1];break;case 4:case 5:case 55:case 78:case 62:case 63:case 66:this.$=r[c];break;case 8:s.addEntity(r[c-4]),s.addEntity(r[c-2]),s.addRelationship(r[c-4],r[c],r[c-2],r[c-3]);break;case 9:s.addEntity(r[c-8]),s.addEntity(r[c-4]),s.addRelationship(r[c-8],r[c],r[c-4],r[c-5]),s.setClass([r[c-8]],r[c-6]),s.setClass([r[c-4]],r[c-2]);break;case 10:s.addEntity(r[c-6]),s.addEntity(r[c-2]),s.addRelationship(r[c-6],r[c],r[c-2],r[c-3]),s.setClass([r[c-6]],r[c-4]);break;case 11:s.addEntity(r[c-6]),s.addEntity(r[c-4]),s.addRelationship(r[c-6],r[c],r[c-4],r[c-5]),s.setClass([r[c-4]],r[c-2]);break;case 12:s.addEntity(r[c-3]),s.addAttributes(r[c-3],r[c-1]);break;case 13:s.addEntity(r[c-5]),s.addAttributes(r[c-5],r[c-1]),s.setClass([r[c-5]],r[c-3]);break;case 14:s.addEntity(r[c-2]);break;case 15:s.addEntity(r[c-4]),s.setClass([r[c-4]],r[c-2]);break;case 16:s.addEntity(r[c]);break;case 17:s.addEntity(r[c-2]),s.setClass([r[c-2]],r[c]);break;case 18:s.addEntity(r[c-6],r[c-4]),s.addAttributes(r[c-6],r[c-1]);break;case 19:s.addEntity(r[c-8],r[c-6]),s.addAttributes(r[c-8],r[c-1]),s.setClass([r[c-8]],r[c-3]);break;case 20:s.addEntity(r[c-5],r[c-3]);break;case 21:s.addEntity(r[c-7],r[c-5]),s.setClass([r[c-7]],r[c-2]);break;case 22:s.addEntity(r[c-3],r[c-1]);break;case 23:s.addEntity(r[c-5],r[c-3]),s.setClass([r[c-5]],r[c]);break;case 24:case 25:this.$=r[c].trim(),s.setAccTitle(this.$);break;case 26:case 27:this.$=r[c].trim(),s.setAccDescription(this.$);break;case 32:s.setDirection("TB");break;case 33:s.setDirection("BT");break;case 34:s.setDirection("RL");break;case 35:s.setDirection("LR");break;case 36:this.$=r[c-3],s.addClass(r[c-2],r[c-1]);break;case 37:case 38:case 56:case 64:case 43:this.$=[r[c]];break;case 39:case 40:this.$=r[c-2].concat([r[c]]);break;case 41:this.$=r[c-2],s.setClass(r[c-1],r[c]);break;case 42:this.$=r[c-3],s.addCssStyles(r[c-2],r[c-1]);break;case 44:case 65:r[c-2].push(r[c]),this.$=r[c-2];break;case 46:this.$=r[c-1]+r[c];break;case 54:case 76:case 77:case 67:this.$=r[c].replace(/"/g,"");break;case 57:r[c].push(r[c-1]),this.$=r[c];break;case 58:this.$={type:r[c-1],name:r[c]};break;case 59:this.$={type:r[c-2],name:r[c-1],keys:r[c]};break;case 60:this.$={type:r[c-2],name:r[c-1],comment:r[c]};break;case 61:this.$={type:r[c-3],name:r[c-2],keys:r[c-1],comment:r[c]};break;case 68:this.$={cardA:r[c],relType:r[c-1],cardB:r[c-2]};break;case 69:this.$=s.Cardinality.ZERO_OR_ONE;break;case 70:this.$=s.Cardinality.ZERO_OR_MORE;break;case 71:this.$=s.Cardinality.ONE_OR_MORE;break;case 72:this.$=s.Cardinality.ONLY_ONE;break;case 73:this.$=s.Cardinality.MD_PARENT;break;case 74:this.$=s.Identification.NON_IDENTIFYING;break;case 75:this.$=s.Identification.IDENTIFYING}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},t(e,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:9,22:i,24:s,26:n,28:r,29:14,30:15,31:16,32:17,33:a,34:c,35:o,36:h,37:u,40:d,43:y,44:p,50:_},t(e,[2,7],{1:[2,1]}),t(e,[2,3]),{9:27,11:9,22:i,24:s,26:n,28:r,29:14,30:15,31:16,32:17,33:a,34:c,35:o,36:h,37:u,40:d,43:y,44:p,50:_},t(e,[2,5]),t(e,[2,6]),t(e,[2,16],{12:28,61:32,15:[1,29],17:[1,30],20:[1,31],63:g,64:b,65:m,66:f,67:E}),{23:[1,38]},{25:[1,39]},{27:[1,40]},t(e,[2,27]),t(e,[2,28]),t(e,[2,29]),t(e,[2,30]),t(e,[2,31]),t(k,[2,54]),t(k,[2,55]),t(e,[2,32]),t(e,[2,33]),t(e,[2,34]),t(e,[2,35]),{16:41,40:S,41:O},{16:44,40:S,41:O},{16:45,40:S,41:O},t(e,[2,4]),{11:46,40:d,50:_},{16:47,40:S,41:O},{18:48,19:[1,49],51:50,52:51,56:T},{11:53,40:d,50:_},{62:54,68:[1,55],69:[1,56]},t(A,[2,69]),t(A,[2,70]),t(A,[2,71]),t(A,[2,72]),t(A,[2,73]),t(e,[2,24]),t(e,[2,25]),t(e,[2,26]),{13:R,38:57,41:N,42:I,45:59,46:60,48:C,49:x},t(D,[2,37]),t(D,[2,38]),{16:65,40:S,41:O,42:I},{13:R,38:66,41:N,42:I,45:59,46:60,48:C,49:x},{13:[1,67],15:[1,68]},t(e,[2,17],{61:32,12:69,17:[1,70],42:I,63:g,64:b,65:m,66:f,67:E}),{19:[1,71]},t(e,[2,14]),{18:72,19:[2,56],51:50,52:51,56:T},{53:73,56:[1,74]},{56:[2,62]},{21:[1,75]},{61:76,63:g,64:b,65:m,66:f,67:E},t($,[2,74]),t($,[2,75]),{6:v,10:K,39:77,42:w,47:L},{40:[1,82],41:[1,83]},t(M,[2,43],{46:84,13:R,41:N,48:C,49:x}),t(B,[2,45]),t(B,[2,50]),t(B,[2,51]),t(B,[2,52]),t(B,[2,53]),t(e,[2,41],{42:I}),{6:v,10:K,39:85,42:w,47:L},{14:86,40:F,50:P,70:Y},{16:90,40:S,41:O},{11:91,40:d,50:_},{18:92,19:[1,93],51:50,52:51,56:T},t(e,[2,12]),{19:[2,57]},t(G,[2,58],{54:94,55:95,57:96,59:z,60:U}),t([19,56,59,60],[2,63]),t(e,[2,22],{15:[1,100],17:[1,99]}),t([40,50],[2,68]),t(e,[2,36]),{13:R,41:N,45:101,46:60,48:C,49:x},t(e,[2,47]),t(e,[2,48]),t(e,[2,49]),t(D,[2,39]),t(D,[2,40]),t(B,[2,46]),t(e,[2,42]),t(e,[2,8]),t(e,[2,76]),t(e,[2,77]),t(e,[2,78]),{13:[1,102],42:I},{13:[1,104],15:[1,103]},{19:[1,105]},t(e,[2,15]),t(G,[2,59],{55:106,58:[1,107],60:U}),t(G,[2,60]),t(Z,[2,64]),t(G,[2,67]),t(Z,[2,66]),{18:108,19:[1,109],51:50,52:51,56:T},{16:110,40:S,41:O},t(M,[2,44],{46:84,13:R,41:N,48:C,49:x}),{14:111,40:F,50:P,70:Y},{16:112,40:S,41:O},{14:113,40:F,50:P,70:Y},t(e,[2,13]),t(G,[2,61]),{57:114,59:z},{19:[1,115]},t(e,[2,20]),t(e,[2,23],{17:[1,116],42:I}),t(e,[2,11]),{13:[1,117],42:I},t(e,[2,10]),t(Z,[2,65]),t(e,[2,18]),{18:118,19:[1,119],51:50,52:51,56:T},{14:120,40:F,50:P,70:Y},{19:[1,121]},t(e,[2,21]),t(e,[2,9]),t(e,[2,19])],defaultActions:{52:[2,62],72:[2,57]},parseError:(0,l.K2)(function(t,e){if(e.recoverable)this.trace(t);else{var i=Error(t);throw i.hash=e,i}},"parseError"),parse:(0,l.K2)(function(t){var e=this,i=[0],s=[],n=[null],r=[],a=this.table,c="",o=0,h=0,u=0,d=r.slice.call(arguments,1),y=Object.create(this.lexer),p={};for(var _ in this.yy)Object.prototype.hasOwnProperty.call(this.yy,_)&&(p[_]=this.yy[_]);y.setInput(t,p),p.lexer=y,p.parser=this,void 0===y.yylloc&&(y.yylloc={});var g=y.yylloc;r.push(g);var b=y.options&&y.options.ranges;function m(){var t;return"number"!=typeof(t=s.pop()||y.lex()||1)&&(t instanceof Array&&(t=(s=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof p.parseError?this.parseError=p.parseError:this.parseError=Object.getPrototypeOf(this).parseError,(0,l.K2)(function(t){i.length=i.length-2*t,n.length=n.length-t,r.length=r.length-t},"popStack"),(0,l.K2)(m,"lex");for(var f,E,k,S,O,T,A,R,N,I={};;){if(k=i[i.length-1],this.defaultActions[k]?S=this.defaultActions[k]:(null==f&&(f=m()),S=a[k]&&a[k][f]),void 0===S||!S.length||!S[0]){var C="";for(T in N=[],a[k])this.terminals_[T]&&T>2&&N.push("'"+this.terminals_[T]+"'");C=y.showPosition?"Parse error on line "+(o+1)+":\n"+y.showPosition()+"\nExpecting "+N.join(", ")+", got '"+(this.terminals_[f]||f)+"'":"Parse error on line "+(o+1)+": Unexpected "+(1==f?"end of input":"'"+(this.terminals_[f]||f)+"'"),this.parseError(C,{text:y.match,token:this.terminals_[f]||f,line:y.yylineno,loc:g,expected:N})}if(S[0]instanceof Array&&S.length>1)throw Error("Parse Error: multiple actions possible at state: "+k+", token: "+f);switch(S[0]){case 1:i.push(f),n.push(y.yytext),r.push(y.yylloc),i.push(S[1]),f=null,E?(f=E,E=null):(h=y.yyleng,c=y.yytext,o=y.yylineno,g=y.yylloc,u>0&&u--);break;case 2:if(A=this.productions_[S[1]][1],I.$=n[n.length-A],I._$={first_line:r[r.length-(A||1)].first_line,last_line:r[r.length-1].last_line,first_column:r[r.length-(A||1)].first_column,last_column:r[r.length-1].last_column},b&&(I._$.range=[r[r.length-(A||1)].range[0],r[r.length-1].range[1]]),void 0!==(O=this.performAction.apply(I,[c,h,o,p,S[1],n,r].concat(d))))return O;A&&(i=i.slice(0,-1*A*2),n=n.slice(0,-1*A),r=r.slice(0,-1*A)),i.push(this.productions_[S[1]][0]),n.push(I.$),r.push(I._$),R=a[i[i.length-2]][i[i.length-1]],i.push(R);break;case 3:return!0}}return!0},"parse")};function W(){this.yy={}}return j.lexer={EOF:1,parseError:(0,l.K2)(function(t,e){if(this.yy.parser)this.yy.parser.parseError(t,e);else throw Error(t)},"parseError"),setInput:(0,l.K2)(function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:(0,l.K2)(function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},"input"),unput:(0,l.K2)(function(t){var e=t.length,i=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var s=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),i.length-1&&(this.yylineno-=i.length-1);var n=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:i?(i.length===s.length?this.yylloc.first_column:0)+s[s.length-i.length].length-i[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[n[0],n[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},"unput"),more:(0,l.K2)(function(){return this._more=!0,this},"more"),reject:(0,l.K2)(function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"reject"),less:(0,l.K2)(function(t){this.unput(this.match.slice(t))},"less"),pastInput:(0,l.K2)(function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:(0,l.K2)(function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:(0,l.K2)(function(){var t=this.pastInput(),e=Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},"showPosition"),test_match:(0,l.K2)(function(t,e){var i,s,n;if(this.options.backtrack_lexer&&(n={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(n.yylloc.range=this.yylloc.range.slice(0))),(s=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=s.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:s?s[s.length-1].length-s[s.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],i=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),i)return i;if(this._backtrack)for(var r in n)this[r]=n[r];return!1},"test_match"),next:(0,l.K2)(function(){if(this.done)return this.EOF;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var t,e,i,s,n=this._currentRules(),r=0;r<n.length;r++)if((i=this._input.match(this.rules[n[r]]))&&(!e||i[0].length>e[0].length)){if(e=i,s=r,this.options.backtrack_lexer){if(!1!==(t=this.test_match(i,n[r])))return t;if(!this._backtrack)return!1;e=!1;continue}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,n[s]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:(0,l.K2)(function(){var t=this.next();return t||this.lex()},"lex"),begin:(0,l.K2)(function(t){this.conditionStack.push(t)},"begin"),popState:(0,l.K2)(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:(0,l.K2)(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:(0,l.K2)(function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},"topState"),pushState:(0,l.K2)(function(t){this.begin(t)},"pushState"),stateStackSize:(0,l.K2)(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:(0,l.K2)(function(t,e,i,s){switch(i){case 0:return this.begin("acc_title"),24;case 1:return this.popState(),"acc_title_value";case 2:return this.begin("acc_descr"),26;case 3:return this.popState(),"acc_descr_value";case 4:this.begin("acc_descr_multiline");break;case 5:this.popState();break;case 6:return"acc_descr_multiline_value";case 7:return 33;case 8:return 34;case 9:return 35;case 10:return 36;case 11:return 10;case 12:case 23:case 28:case 35:break;case 13:return 8;case 14:return 50;case 15:return 70;case 16:return 4;case 17:return this.begin("block"),17;case 18:case 19:case 38:return 49;case 20:case 37:return 42;case 21:return 15;case 22:case 36:return 13;case 24:return 59;case 25:case 26:return 56;case 27:return 60;case 29:return this.popState(),19;case 30:case 73:return e.yytext[0];case 31:return 20;case 32:return 21;case 33:return this.begin("style"),44;case 34:return this.popState(),10;case 39:return this.begin("style"),37;case 40:return 43;case 41:case 45:case 46:case 59:return 63;case 42:case 43:case 44:case 52:case 54:case 61:return 65;case 47:case 48:case 49:case 50:case 51:case 53:case 60:return 64;case 55:case 56:case 57:case 58:return 66;case 62:return 67;case 63:case 66:case 67:case 68:return 68;case 64:case 65:return 69;case 69:return 41;case 70:return 47;case 71:return 40;case 72:return 48;case 74:return 6}},"anonymous"),rules:[/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:.*direction\s+TB[^\n]*)/i,/^(?:.*direction\s+BT[^\n]*)/i,/^(?:.*direction\s+RL[^\n]*)/i,/^(?:.*direction\s+LR[^\n]*)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:[\s]+)/i,/^(?:"[^"%\r\n\v\b\\]+")/i,/^(?:"[^"]*")/i,/^(?:erDiagram\b)/i,/^(?:\{)/i,/^(?:#)/i,/^(?:#)/i,/^(?:,)/i,/^(?::::)/i,/^(?::)/i,/^(?:\s+)/i,/^(?:\b((?:PK)|(?:FK)|(?:UK))\b)/i,/^(?:([^\s]*)[~].*[~]([^\s]*))/i,/^(?:([\*A-Za-z_\u00C0-\uFFFF][A-Za-z0-9\-\_\[\]\(\)\u00C0-\uFFFF\*]*))/i,/^(?:"[^"]*")/i,/^(?:[\n]+)/i,/^(?:\})/i,/^(?:.)/i,/^(?:\[)/i,/^(?:\])/i,/^(?:style\b)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?::)/i,/^(?:,)/i,/^(?:#)/i,/^(?:classDef\b)/i,/^(?:class\b)/i,/^(?:one or zero\b)/i,/^(?:one or more\b)/i,/^(?:one or many\b)/i,/^(?:1\+)/i,/^(?:\|o\b)/i,/^(?:zero or one\b)/i,/^(?:zero or more\b)/i,/^(?:zero or many\b)/i,/^(?:0\+)/i,/^(?:\}o\b)/i,/^(?:many\(0\))/i,/^(?:many\(1\))/i,/^(?:many\b)/i,/^(?:\}\|)/i,/^(?:one\b)/i,/^(?:only one\b)/i,/^(?:1\b)/i,/^(?:\|\|)/i,/^(?:o\|)/i,/^(?:o\{)/i,/^(?:\|\{)/i,/^(?:\s*u\b)/i,/^(?:\.\.)/i,/^(?:--)/i,/^(?:to\b)/i,/^(?:optionally to\b)/i,/^(?:\.-)/i,/^(?:-\.)/i,/^(?:([^\x00-\x7F]|\w|-|\*)+)/i,/^(?:;)/i,/^(?:([^\x00-\x7F]|\w|-|\*)+)/i,/^(?:[0-9])/i,/^(?:.)/i,/^(?:$)/i],conditions:{style:{rules:[34,35,36,37,38,69,70],inclusive:!1},acc_descr_multiline:{rules:[5,6],inclusive:!1},acc_descr:{rules:[3],inclusive:!1},acc_title:{rules:[1],inclusive:!1},block:{rules:[23,24,25,26,27,28,29,30],inclusive:!1},INITIAL:{rules:[0,2,4,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,31,32,33,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,71,72,73,74],inclusive:!0}}},(0,l.K2)(W,"Parser"),W.prototype=j,j.Parser=W,new W}();d.parser=d;var y=class{constructor(){this.entities=new Map,this.relationships=[],this.classes=new Map,this.direction="TB",this.Cardinality={ZERO_OR_ONE:"ZERO_OR_ONE",ZERO_OR_MORE:"ZERO_OR_MORE",ONE_OR_MORE:"ONE_OR_MORE",ONLY_ONE:"ONLY_ONE",MD_PARENT:"MD_PARENT"},this.Identification={NON_IDENTIFYING:"NON_IDENTIFYING",IDENTIFYING:"IDENTIFYING"},this.setAccTitle=c.SV,this.getAccTitle=c.iN,this.setAccDescription=c.EI,this.getAccDescription=c.m7,this.setDiagramTitle=c.ke,this.getDiagramTitle=c.ab,this.getConfig=(0,l.K2)(()=>(0,c.D7)().er,"getConfig"),this.clear(),this.addEntity=this.addEntity.bind(this),this.addAttributes=this.addAttributes.bind(this),this.addRelationship=this.addRelationship.bind(this),this.setDirection=this.setDirection.bind(this),this.addCssStyles=this.addCssStyles.bind(this),this.addClass=this.addClass.bind(this),this.setClass=this.setClass.bind(this),this.setAccTitle=this.setAccTitle.bind(this),this.setAccDescription=this.setAccDescription.bind(this)}static{(0,l.K2)(this,"ErDB")}addEntity(t,e=""){return this.entities.has(t)?!this.entities.get(t)?.alias&&e&&(this.entities.get(t).alias=e,l.Rm.info(`Add alias '${e}' to entity '${t}'`)):(this.entities.set(t,{id:`entity-${t}-${this.entities.size}`,label:t,attributes:[],alias:e,shape:"erBox",look:(0,c.D7)().look??"default",cssClasses:"default",cssStyles:[]}),l.Rm.info("Added new entity :",t)),this.entities.get(t)}getEntity(t){return this.entities.get(t)}getEntities(){return this.entities}getClasses(){return this.classes}addAttributes(t,e){let i,s=this.addEntity(t);for(i=e.length-1;i>=0;i--)e[i].keys||(e[i].keys=[]),e[i].comment||(e[i].comment=""),s.attributes.push(e[i]),l.Rm.debug("Added attribute ",e[i].name)}addRelationship(t,e,i,s){let n=this.entities.get(t),r=this.entities.get(i);if(!n||!r)return;let a={entityA:n.id,roleA:e,entityB:r.id,relSpec:s};this.relationships.push(a),l.Rm.debug("Added new relationship :",a)}getRelationships(){return this.relationships}getDirection(){return this.direction}setDirection(t){this.direction=t}getCompiledStyles(t){let e=[];for(let i of t){let t=this.classes.get(i);t?.styles&&(e=[...e,...t.styles??[]].map(t=>t.trim())),t?.textStyles&&(e=[...e,...t.textStyles??[]].map(t=>t.trim()))}return e}addCssStyles(t,e){for(let i of t){let t=this.entities.get(i);if(!e||!t)return;for(let i of e)t.cssStyles.push(i)}}addClass(t,e){t.forEach(t=>{let i=this.classes.get(t);void 0===i&&(i={id:t,styles:[],textStyles:[]},this.classes.set(t,i)),e&&e.forEach(function(t){if(/color/.exec(t)){let e=t.replace("fill","bgFill");i.textStyles.push(e)}i.styles.push(t)})})}setClass(t,e){for(let i of t){let t=this.entities.get(i);if(t)for(let i of e)t.cssClasses+=" "+i}}clear(){this.entities=new Map,this.classes=new Map,this.relationships=[],(0,c.IU)()}getData(){let t=[],e=[],i=(0,c.D7)();for(let e of this.entities.keys()){let i=this.entities.get(e);i&&(i.cssCompiledStyles=this.getCompiledStyles(i.cssClasses.split(" ")),t.push(i))}let s=0;for(let t of this.relationships){let n={id:(0,a.rY)(t.entityA,t.entityB,{prefix:"id",counter:s++}),type:"normal",curve:"basis",start:t.entityA,end:t.entityB,label:t.roleA,labelpos:"c",thickness:"normal",classes:"relationshipLine",arrowTypeStart:t.relSpec.cardB.toLowerCase(),arrowTypeEnd:t.relSpec.cardA.toLowerCase(),pattern:"IDENTIFYING"==t.relSpec.relType?"solid":"dashed",look:i.look};e.push(n)}return{nodes:t,edges:e,other:{},config:i,direction:"TB"}}},p={};(0,l.VA)(p,{draw:()=>_});var _=(0,l.K2)(async function(t,e,i,h){l.Rm.info("REF0:"),l.Rm.info("Drawing er diagram (unified)",e);let{securityLevel:u,er:d,layout:y}=(0,c.D7)(),p=h.db.getData(),_=(0,s.A)(e,u);p.type=h.type,p.layoutAlgorithm=(0,r.q7)(y),p.config.flowchart.nodeSpacing=d?.nodeSpacing||140,p.config.flowchart.rankSpacing=d?.rankSpacing||80,p.direction=h.db.getDirection(),p.markers=["only_one","zero_or_one","one_or_more","zero_or_more"],p.diagramId=e,await (0,r.XX)(p,_),"elk"===p.layoutAlgorithm&&_.select(".edges").lower();let g=_.selectAll('[id*="-background"]');Array.from(g).length>0&&g.each(function(){let t=(0,o.Ltv)(this),e=t.attr("id").replace("-background",""),i=_.select(`#${CSS.escape(e)}`);if(!i.empty()){let e=i.attr("transform");t.attr("transform",e)}}),a._K.insertTitle(_,"erDiagramTitleText",d?.titleTopMargin??25,h.db.getDiagramTitle()),(0,n.P)(_,8,"erDiagram",d?.useMaxWidth??!0)},"draw"),g=(0,l.K2)((t,e)=>{let i=h.A,s=i(t,"r"),n=i(t,"g"),r=i(t,"b");return u.A(s,n,r,e)},"fade"),b={parser:d,get db(){return new y},renderer:p,styles:(0,l.K2)(t=>`
2
+ .entityBox {
3
+ fill: ${t.mainBkg};
4
+ stroke: ${t.nodeBorder};
5
+ }
6
+
7
+ .relationshipLabelBox {
8
+ fill: ${t.tertiaryColor};
9
+ opacity: 0.7;
10
+ background-color: ${t.tertiaryColor};
11
+ rect {
12
+ opacity: 0.5;
13
+ }
14
+ }
15
+
16
+ .labelBkg {
17
+ background-color: ${g(t.tertiaryColor,.5)};
18
+ }
19
+
20
+ .edgeLabel .label {
21
+ fill: ${t.nodeBorder};
22
+ font-size: 14px;
23
+ }
24
+
25
+ .label {
26
+ font-family: ${t.fontFamily};
27
+ color: ${t.nodeTextColor||t.textColor};
28
+ }
29
+
30
+ .edge-pattern-dashed {
31
+ stroke-dasharray: 8,8;
32
+ }
33
+
34
+ .node rect,
35
+ .node circle,
36
+ .node ellipse,
37
+ .node polygon
38
+ {
39
+ fill: ${t.mainBkg};
40
+ stroke: ${t.nodeBorder};
41
+ stroke-width: 1px;
42
+ }
43
+
44
+ .relationshipLine {
45
+ stroke: ${t.lineColor};
46
+ stroke-width: 1;
47
+ fill: none;
48
+ }
49
+
50
+ .marker {
51
+ fill: none !important;
52
+ stroke: ${t.lineColor} !important;
53
+ stroke-width: 1;
54
+ }
55
+ `,"getStyles")}},57919:(t,e,i)=>{i.d(e,{A:()=>r});var s=i(58306),n=i(12556);let r=(t,e)=>s.A.lang.round(n.A.parse(t)[e])},61052:(t,e,i)=>{i.d(e,{A:()=>r});var s=i(36416),n=i(16222),r=(0,s.K2)((t,e)=>{let i;return"sandbox"===e&&(i=(0,n.Ltv)("#i"+t)),("sandbox"===e?(0,n.Ltv)(i.nodes()[0].contentDocument.body):(0,n.Ltv)("body")).select(`[id="${t}"]`)},"getDiagramElement")}}]);
@@ -1,4 +1,4 @@
1
- "use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[82629],{8344:(t,e,a)=>{a.d(e,{DA:()=>$,IU:()=>B,U:()=>K,U7:()=>ec,U_:()=>ey,Zk:()=>c,aP:()=>eh,gh:()=>eg,lC:()=>y,on:()=>ed});var l=a(95952),r=a(3334),i=a(71409),n=a(98671),s=a(3386),h=a(36416),o=a(16222),d=a(90758),c=(0,h.K2)(async(t,e,a)=>{let l,r=e.useHtmlLabels||(0,s._3)((0,s.D7)()?.htmlLabels),d=t.insert("g").attr("class",a||"node default").attr("id",e.domId||e.id),c=d.insert("g").attr("class","label").attr("style",(0,n.KL)(e.labelStyle));l=void 0===e.label?"":"string"==typeof e.label?e.label:e.label[0];let g=await (0,i.GZ)(c,(0,s.jZ)((0,n.Sm)(l),(0,s.D7)()),{useHtmlLabels:r,width:e.width||(0,s.D7)().flowchart?.wrappingWidth,cssClasses:"markdown-node-label",style:e.labelStyle,addSvgBackground:!!e.icon||!!e.img}),y=g.getBBox(),f=(e?.padding??0)/2;if(r){let t=g.children[0],e=(0,o.Ltv)(g),a=t.getElementsByTagName("img");if(a){let t=""===l.replace(/<img[^>]*>/g,"").trim();await Promise.all([...a].map(e=>new Promise(a=>{function l(){if(e.style.display="flex",e.style.flexDirection="column",t){let t=(0,s.D7)().fontSize?(0,s.D7)().fontSize:window.getComputedStyle(document.body).fontSize,[a=s.UI.fontSize]=(0,n.I5)(t),l=5*a+"px";e.style.minWidth=l,e.style.maxWidth=l}else e.style.width="100%";a(e)}(0,h.K2)(l,"setupImage"),setTimeout(()=>{e.complete&&l()}),e.addEventListener("error",l),e.addEventListener("load",l)})))}y=t.getBoundingClientRect(),e.attr("width",y.width),e.attr("height",y.height)}return r?c.attr("transform","translate("+-y.width/2+", "+-y.height/2+")"):c.attr("transform","translate(0, "+-y.height/2+")"),e.centerLabel&&c.attr("transform","translate("+-y.width/2+", "+-y.height/2+")"),c.insert("rect",":first-child"),{shapeSvg:d,bbox:y,halfPadding:f,label:c}},"labelHelper"),g=(0,h.K2)(async(t,e,a)=>{let l=a.useHtmlLabels||(0,s._3)((0,s.D7)()?.flowchart?.htmlLabels),r=t.insert("g").attr("class","label").attr("style",a.labelStyle||""),h=await (0,i.GZ)(r,(0,s.jZ)((0,n.Sm)(e),(0,s.D7)()),{useHtmlLabels:l,width:a.width||(0,s.D7)()?.flowchart?.wrappingWidth,style:a.labelStyle,addSvgBackground:!!a.icon||!!a.img}),d=h.getBBox(),c=a.padding/2;if((0,s._3)((0,s.D7)()?.flowchart?.htmlLabels)){let t=h.children[0],e=(0,o.Ltv)(h);d=t.getBoundingClientRect(),e.attr("width",d.width),e.attr("height",d.height)}return l?r.attr("transform","translate("+-d.width/2+", "+-d.height/2+")"):r.attr("transform","translate(0, "+-d.height/2+")"),a.centerLabel&&r.attr("transform","translate("+-d.width/2+", "+-d.height/2+")"),r.insert("rect",":first-child"),{shapeSvg:t,bbox:d,halfPadding:c,label:r}},"insertLabel"),y=(0,h.K2)((t,e)=>{let a=e.node().getBBox();t.width=a.width,t.height=a.height},"updateNodeBounds"),f=(0,h.K2)((t,e)=>("handDrawn"===t.look?"rough-node":"node")+" "+t.cssClasses+" "+(e||""),"getNodeClasses");function p(t){let e=t.map((t,e)=>`${0===e?"M":"L"}${t.x},${t.y}`);return e.push("Z"),e.join(" ")}function u(t,e,a,l,r,i){let n=[],s=a-t,h=2*Math.PI/(s/i),o=e+(l-e)/2;for(let e=0;e<=50;e++){let a=t+e/50*s,l=o+r*Math.sin(h*(a-t));n.push({x:a,y:l})}return n}function m(t,e,a,l,r,i){let n=[],s=r*Math.PI/180,h=(i*Math.PI/180-s)/(l-1);for(let r=0;r<l;r++){let l=s+r*h,i=t+a*Math.cos(l),o=e+a*Math.sin(l);n.push({x:-i,y:-o})}return n}(0,h.K2)(p,"createPathFromPoints"),(0,h.K2)(u,"generateFullSineWavePoints"),(0,h.K2)(m,"generateCirclePoints");var x=(0,h.K2)((t,e)=>{var a,l,r=t.x,i=t.y,n=e.x-r,s=e.y-i,h=t.width/2,o=t.height/2;return Math.abs(s)*h>Math.abs(n)*o?(s<0&&(o=-o),a=0===s?0:o*n/s,l=o):(n<0&&(h=-h),a=h,l=0===n?0:h*s/n),{x:r+a,y:i+l}},"intersectRect");function w(t,e){e&&t.attr("style",e)}async function b(t){let e=(0,o.Ltv)(document.createElementNS("http://www.w3.org/2000/svg","foreignObject")),a=e.append("xhtml:div"),l=(0,s.D7)(),r=t.label;t.label&&(0,s.Wi)(t.label)&&(r=await (0,s.dj)(t.label.replace(s.Y2.lineBreakRegex,"\n"),l));let i='<span class="'+(t.isNode?"nodeLabel":"edgeLabel")+'" '+(t.labelStyle?'style="'+t.labelStyle+'"':"")+">"+r+"</span>";return a.html((0,s.jZ)(i,l)),w(a,t.labelStyle),a.style("display","inline-block"),a.style("padding-right","1px"),a.style("white-space","nowrap"),a.attr("xmlns","http://www.w3.org/1999/xhtml"),e.node()}(0,h.K2)(w,"applyStyle"),(0,h.K2)(b,"addHtmlLabel");var $=(0,h.K2)(async(t,e,a,l)=>{let r=t||"";if("object"==typeof r&&(r=r[0]),(0,s._3)((0,s.D7)().flowchart.htmlLabels)){r=r.replace(/\\n|\n/g,"<br />"),h.Rm.info("vertexText"+r);let t={isNode:l,label:(0,n.Sm)(r).replace(/fa[blrs]?:fa-[\w-]+/g,t=>`<i class='${t.replace(":"," ")}'></i>`),labelStyle:e?e.replace("fill:","color:"):e};return await b(t)}{let t=document.createElementNS("http://www.w3.org/2000/svg","text");t.setAttribute("style",e.replace("color:","fill:"));for(let e of"string"==typeof r?r.split(/\\n|\n|<br\s*\/?>/gi):Array.isArray(r)?r:[]){let l=document.createElementNS("http://www.w3.org/2000/svg","tspan");l.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),l.setAttribute("dy","1em"),l.setAttribute("x","0"),a?l.setAttribute("class","title-row"):l.setAttribute("class","row"),l.textContent=e.trim(),t.appendChild(l)}return t}},"createLabel"),k=(0,h.K2)((t,e,a,l,r)=>["M",t+r,e,"H",t+a-r,"A",r,r,"0 0 1",t+a,e+r,"V",e+l-r,"A",r,r,"0 0 1",t+a-r,e+l,"H",t+r,"A",r,r,"0 0 1",t,e+l-r,"V",e+r,"A",r,r,"0 0 1",t+r,e,"Z"].join(" "),"createRoundedRectPathD"),M=(0,h.K2)(async(t,e)=>{let a;h.Rm.info("Creating subgraph rect for ",e.id,e);let n=(0,s.D7)(),{themeVariables:c,handDrawnSeed:g}=n,{clusterBkg:y,clusterBorder:f}=c,{labelStyles:p,nodeStyles:u,borderStyles:m,backgroundStyles:w}=(0,r.GX)(e),b=t.insert("g").attr("class","cluster "+e.cssClasses).attr("id",e.id).attr("data-look",e.look),$=(0,s._3)(n.flowchart.htmlLabels),M=b.insert("g").attr("class","cluster-label "),S=await (0,i.GZ)(M,e.label,{style:e.labelStyle,useHtmlLabels:$,isNode:!0}),D=S.getBBox();if((0,s._3)(n.flowchart.htmlLabels)){let t=S.children[0],e=(0,o.Ltv)(S);D=t.getBoundingClientRect(),e.attr("width",D.width),e.attr("height",D.height)}let A=e.width<=D.width+e.padding?D.width+e.padding:e.width;e.width<=D.width+e.padding?e.diff=(A-e.width)/2-e.padding:e.diff=-e.padding;let v=e.height,C=e.x-A/2,K=e.y-v/2;if(h.Rm.trace("Data ",e,JSON.stringify(e)),"handDrawn"===e.look){let t=d.A.svg(b),l=(0,r.Fr)(e,{roughness:.7,fill:y,stroke:f,fillWeight:3,seed:g}),i=t.path(k(C,K,A,v,0),l);(a=b.insert(()=>(h.Rm.debug("Rough node insert CXC",i),i),":first-child")).select("path:nth-child(2)").attr("style",m.join(";")),a.select("path").attr("style",w.join(";").replace("fill","stroke"))}else(a=b.insert("rect",":first-child")).attr("style",u).attr("rx",e.rx).attr("ry",e.ry).attr("x",C).attr("y",K).attr("width",A).attr("height",v);let{subGraphTitleTopMargin:B}=(0,l.O)(n);if(M.attr("transform",`translate(${e.x-D.width/2}, ${e.y-e.height/2+B})`),p){let t=M.select("span");t&&t.attr("style",p)}let N=a.node().getBBox();return e.offsetX=0,e.width=N.width,e.height=N.height,e.offsetY=D.height-e.padding/2,e.intersect=function(t){return x(e,t)},{cluster:b,labelBBox:D}},"rect"),S=(0,h.K2)((t,e)=>{let a=t.insert("g").attr("class","note-cluster").attr("id",e.id),l=a.insert("rect",":first-child"),r=0*e.padding,i=r/2;l.attr("rx",e.rx).attr("ry",e.ry).attr("x",e.x-e.width/2-i).attr("y",e.y-e.height/2-i).attr("width",e.width+r).attr("height",e.height+r).attr("fill","none");let n=l.node().getBBox();return e.width=n.width,e.height=n.height,e.intersect=function(t){return x(e,t)},{cluster:a,labelBBox:{width:0,height:0}}},"noteGroup"),D=(0,h.K2)(async(t,e)=>{let a,l=(0,s.D7)(),{themeVariables:r,handDrawnSeed:i}=l,{altBackground:n,compositeBackground:h,compositeTitleBackground:c,nodeBorder:g}=r,y=t.insert("g").attr("class",e.cssClasses).attr("id",e.id).attr("data-id",e.id).attr("data-look",e.look),f=y.insert("g",":first-child"),p=y.insert("g").attr("class","cluster-label"),u=y.append("rect"),m=p.node().appendChild(await $(e.label,e.labelStyle,void 0,!0)),w=m.getBBox();if((0,s._3)(l.flowchart.htmlLabels)){let t=m.children[0],e=(0,o.Ltv)(m);w=t.getBoundingClientRect(),e.attr("width",w.width),e.attr("height",w.height)}let b=0*e.padding,M=(e.width<=w.width+e.padding?w.width+e.padding:e.width)+b;e.width<=w.width+e.padding?e.diff=(M-e.width)/2-e.padding:e.diff=-e.padding;let S=e.height+b,D=e.height+b-w.height-6,A=e.x-M/2,v=e.y-S/2;e.width=M;let C=e.y-e.height/2-b/2+w.height+2;if("handDrawn"===e.look){let t=e.cssClasses.includes("statediagram-cluster-alt"),l=d.A.svg(y),r=e.rx||e.ry?l.path(k(A,v,M,S,10),{roughness:.7,fill:c,fillStyle:"solid",stroke:g,seed:i}):l.rectangle(A,v,M,S,{seed:i});a=y.insert(()=>r,":first-child");let s=l.rectangle(A,C,M,D,{fill:t?n:h,fillStyle:t?"hachure":"solid",stroke:g,seed:i});a=y.insert(()=>r,":first-child"),u=y.insert(()=>s)}else(a=f.insert("rect",":first-child")).attr("class","outer").attr("x",A).attr("y",v).attr("width",M).attr("height",S).attr("data-look",e.look),u.attr("class","inner").attr("x",A).attr("y",C).attr("width",M).attr("height",D);return p.attr("transform",`translate(${e.x-w.width/2}, ${v+1-3*!(0,s._3)(l.flowchart.htmlLabels)})`),e.height=a.node().getBBox().height,e.offsetX=0,e.offsetY=w.height-e.padding/2,e.labelBBox=w,e.intersect=function(t){return x(e,t)},{cluster:y,labelBBox:w}},"roundedWithTitle"),A=(0,h.K2)(async(t,e)=>{let a;h.Rm.info("Creating subgraph rect for ",e.id,e);let n=(0,s.D7)(),{themeVariables:c,handDrawnSeed:g}=n,{clusterBkg:y,clusterBorder:f}=c,{labelStyles:p,nodeStyles:u,borderStyles:m,backgroundStyles:w}=(0,r.GX)(e),b=t.insert("g").attr("class","cluster "+e.cssClasses).attr("id",e.id).attr("data-look",e.look),$=(0,s._3)(n.flowchart.htmlLabels),M=b.insert("g").attr("class","cluster-label "),S=await (0,i.GZ)(M,e.label,{style:e.labelStyle,useHtmlLabels:$,isNode:!0,width:e.width}),D=S.getBBox();if((0,s._3)(n.flowchart.htmlLabels)){let t=S.children[0],e=(0,o.Ltv)(S);D=t.getBoundingClientRect(),e.attr("width",D.width),e.attr("height",D.height)}let A=e.width<=D.width+e.padding?D.width+e.padding:e.width;e.width<=D.width+e.padding?e.diff=(A-e.width)/2-e.padding:e.diff=-e.padding;let v=e.height,C=e.x-A/2,K=e.y-v/2;if(h.Rm.trace("Data ",e,JSON.stringify(e)),"handDrawn"===e.look){let t=d.A.svg(b),l=(0,r.Fr)(e,{roughness:.7,fill:y,stroke:f,fillWeight:4,seed:g}),i=t.path(k(C,K,A,v,e.rx),l);(a=b.insert(()=>(h.Rm.debug("Rough node insert CXC",i),i),":first-child")).select("path:nth-child(2)").attr("style",m.join(";")),a.select("path").attr("style",w.join(";").replace("fill","stroke"))}else(a=b.insert("rect",":first-child")).attr("style",u).attr("rx",e.rx).attr("ry",e.ry).attr("x",C).attr("y",K).attr("width",A).attr("height",v);let{subGraphTitleTopMargin:B}=(0,l.O)(n);if(M.attr("transform",`translate(${e.x-D.width/2}, ${e.y-e.height/2+B})`),p){let t=M.select("span");t&&t.attr("style",p)}let N=a.node().getBBox();return e.offsetX=0,e.width=N.width,e.height=N.height,e.offsetY=D.height-e.padding/2,e.intersect=function(t){return x(e,t)},{cluster:b,labelBBox:D}},"kanbanSection"),v={rect:M,squareRect:M,roundedWithTitle:D,noteGroup:S,divider:(0,h.K2)((t,e)=>{let a,{themeVariables:l,handDrawnSeed:r}=(0,s.D7)(),{nodeBorder:i}=l,n=t.insert("g").attr("class",e.cssClasses).attr("id",e.id).attr("data-look",e.look),h=n.insert("g",":first-child"),o=0*e.padding,c=e.width+o;e.diff=-e.padding;let g=e.height+o,y=e.x-c/2,f=e.y-g/2;if(e.width=c,"handDrawn"===e.look){let t=d.A.svg(n).rectangle(y,f,c,g,{fill:"lightgrey",roughness:.5,strokeLineDash:[5],stroke:i,seed:r});a=n.insert(()=>t,":first-child")}else(a=h.insert("rect",":first-child")).attr("class","divider").attr("x",y).attr("y",f).attr("width",c).attr("height",g).attr("data-look",e.look);return e.height=a.node().getBBox().height,e.offsetX=0,e.offsetY=0,e.intersect=function(t){return x(e,t)},{cluster:n,labelBBox:{}}},"divider"),kanbanSection:A},C=new Map,K=(0,h.K2)(async(t,e)=>{let a=e.shape||"rect",l=await v[a](t,e);return C.set(e.id,l),l},"insertCluster"),B=(0,h.K2)(()=>{C=new Map},"clear");function N(t,e,a,l){var r=t.x,i=t.y,n=r-l.x,s=i-l.y,h=Math.sqrt(e*e*s*s+a*a*n*n),o=Math.abs(e*a*n/h);l.x<r&&(o=-o);var d=Math.abs(e*a*s/h);return l.y<i&&(d=-d),{x:r+o,y:i+d}}function L(t,e,a){return N(t,e,e,a)}function R(t,e,a,l){{let r=e.y-t.y,i=t.x-e.x,n=e.x*t.y-t.x*e.y,s=r*a.x+i*a.y+n,h=r*l.x+i*l.y+n;if(0!==s&&0!==h&&F(s,h))return;let o=l.y-a.y,d=a.x-l.x,c=l.x*a.y-a.x*l.y,g=o*t.x+d*t.y+c,y=o*e.x+d*e.y+c;if(1e-6>Math.abs(g)&&1e-6>Math.abs(y)&&F(g,y))return;let f=r*d-o*i;if(0===f)return;let p=Math.abs(f/2),u=i*c-d*n;return{x:u<0?(u-p)/f:(u+p)/f,y:(u=o*n-r*c)<0?(u-p)/f:(u+p)/f}}}function F(t,e){return t*e>0}function P(t,e,a){let l=t.x,r=t.y,i=[],n=1/0,s=1/0;"function"==typeof e.forEach?e.forEach(function(t){n=Math.min(n,t.x),s=Math.min(s,t.y)}):(n=Math.min(n,e.x),s=Math.min(s,e.y));let h=l-t.width/2-n,o=r-t.height/2-s;for(let l=0;l<e.length;l++){let r=e[l],n=e[l<e.length-1?l+1:0],s=R(t,a,{x:h+r.x,y:o+r.y},{x:h+n.x,y:o+n.y});s&&i.push(s)}return i.length?(i.length>1&&i.sort(function(t,e){let l=t.x-a.x,r=t.y-a.y,i=Math.sqrt(l*l+r*r),n=e.x-a.x,s=e.y-a.y,h=Math.sqrt(n*n+s*s);return i<h?-1:+(i!==h)}),i[0]):t}(0,h.K2)(function(t,e){return t.intersect(e)},"intersectNode"),(0,h.K2)(N,"intersectEllipse"),(0,h.K2)(L,"intersectCircle"),(0,h.K2)(R,"intersectLine"),(0,h.K2)(F,"sameSign"),(0,h.K2)(P,"intersectPolygon");var X={circle:L,polygon:P,rect:x};function G(t,e){let{labelStyles:a}=(0,r.GX)(e);e.labelStyle=a;let l=f(e),i=l;l||(i="anchor");let s=t.insert("g").attr("class",i).attr("id",e.domId||e.id),{cssStyles:o}=e,c=d.A.svg(s),g=(0,r.Fr)(e,{fill:"black",stroke:"none",fillStyle:"solid"});"handDrawn"!==e.look&&(g.roughness=0);let p=c.circle(0,0,2,g),u=s.insert(()=>p,":first-child");return u.attr("class","anchor").attr("style",(0,n.KL)(o)),y(e,u),e.intersect=function(t){return h.Rm.info("Circle intersect",e,1,t),X.circle(e,1,t)},s}function I(t,e,a,l,r,i,n){let s=Math.atan2(l-e,a-t),h=Math.sqrt(((a-t)/2/r)**2+((l-e)/2/i)**2);if(h>1)throw Error("The given radii are too small to create an arc between the points.");let o=Math.sqrt(1-h**2),d=(t+a)/2+o*i*Math.sin(s)*(n?-1:1),c=(e+l)/2-o*r*Math.cos(s)*(n?-1:1),g=Math.atan2((e-c)/i,(t-d)/r),y=Math.atan2((l-c)/i,(a-d)/r)-g;n&&y<0&&(y+=2*Math.PI),!n&&y>0&&(y-=2*Math.PI);let f=[];for(let t=0;t<20;t++){let e=g+t/19*y,a=d+r*Math.cos(e),l=c+i*Math.sin(e);f.push({x:a,y:l})}return f}async function T(t,e){let{labelStyles:a,nodeStyles:l}=(0,r.GX)(e);e.labelStyle=a;let{shapeSvg:i,bbox:n}=await c(t,e,f(e)),s=n.width+e.padding+20,h=n.height+e.padding,o=h/2,g=o/(2.5+h/50),{cssStyles:u}=e,m=[{x:s/2,y:-h/2},{x:-s/2,y:-h/2},...I(-s/2,-h/2,-s/2,h/2,g,o,!1),{x:s/2,y:h/2},...I(s/2,h/2,s/2,-h/2,g,o,!0)],x=d.A.svg(i),w=(0,r.Fr)(e,{});"handDrawn"!==e.look&&(w.roughness=0,w.fillStyle="solid");let b=p(m),$=x.path(b,w),k=i.insert(()=>$,":first-child");return k.attr("class","basic label-container"),u&&"handDrawn"!==e.look&&k.selectAll("path").attr("style",u),l&&"handDrawn"!==e.look&&k.selectAll("path").attr("style",l),k.attr("transform",`translate(${g/2}, 0)`),y(e,k),e.intersect=function(t){return X.polygon(e,m,t)},i}function W(t,e,a,l){return t.insert("polygon",":first-child").attr("points",l.map(function(t){return t.x+","+t.y}).join(" ")).attr("class","label-container").attr("transform","translate("+-e/2+","+a/2+")")}async function _(t,e){let a,{labelStyles:l,nodeStyles:i}=(0,r.GX)(e);e.labelStyle=l;let{shapeSvg:n,bbox:s}=await c(t,e,f(e)),h=s.height+e.padding,o=s.width+e.padding+12,g=-h,u=[{x:12,y:g},{x:o,y:g},{x:o,y:0},{x:0,y:0},{x:0,y:g+12},{x:12,y:g}],{cssStyles:m}=e;if("handDrawn"===e.look){let t=d.A.svg(n),l=(0,r.Fr)(e,{}),i=p(u),s=t.path(i,l);a=n.insert(()=>s,":first-child").attr("transform",`translate(${-o/2}, ${h/2})`),m&&a.attr("style",m)}else a=W(n,o,h,u);return i&&a.attr("style",i),y(e,a),e.intersect=function(t){return X.polygon(e,u,t)},n}function E(t,e){let{nodeStyles:a}=(0,r.GX)(e);e.label="";let l=t.insert("g").attr("class",f(e)).attr("id",e.domId??e.id),{cssStyles:i}=e,n=Math.max(28,e.width??0),s=[{x:0,y:n/2},{x:n/2,y:0},{x:0,y:-n/2},{x:-n/2,y:0}],h=d.A.svg(l),o=(0,r.Fr)(e,{});"handDrawn"!==e.look&&(o.roughness=0,o.fillStyle="solid");let c=p(s),g=h.path(c,o),y=l.insert(()=>g,":first-child");return i&&"handDrawn"!==e.look&&y.selectAll("path").attr("style",i),a&&"handDrawn"!==e.look&&y.selectAll("path").attr("style",a),e.width=28,e.height=28,e.intersect=function(t){return X.polygon(e,s,t)},l}async function H(t,e,a){let l,{labelStyles:i,nodeStyles:s}=(0,r.GX)(e);e.labelStyle=i;let{shapeSvg:o,bbox:g,halfPadding:p}=await c(t,e,f(e)),u=a?.padding??p,m=g.width/2+u,{cssStyles:x}=e;if("handDrawn"===e.look){let t=d.A.svg(o),a=(0,r.Fr)(e,{}),i=t.circle(0,0,2*m,a);(l=o.insert(()=>i,":first-child")).attr("class","basic label-container").attr("style",(0,n.KL)(x))}else l=o.insert("circle",":first-child").attr("class","basic label-container").attr("style",s).attr("r",m).attr("cx",0).attr("cy",0);return y(e,l),e.calcIntersect=function(t,e){let a=t.width/2;return X.circle(t,a,e)},e.intersect=function(t){return h.Rm.info("Circle intersect",e,m,t),X.circle(e,m,t)},o}function j(t){let e=Math.cos(Math.PI/4),a=Math.sin(Math.PI/4),l=2*t,r={x:l/2*e,y:l/2*a},i={x:-(l/2)*e,y:l/2*a},n={x:-(l/2)*e,y:-(l/2)*a},s={x:l/2*e,y:-(l/2)*a};return`M ${i.x},${i.y} L ${s.x},${s.y}
1
+ "use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[82629],{85963:(t,e,a)=>{a.d(e,{DA:()=>$,IU:()=>B,U:()=>K,U7:()=>ec,U_:()=>ey,Zk:()=>c,aP:()=>eh,gh:()=>eg,lC:()=>y,on:()=>ed});var l=a(95952),r=a(3334),i=a(71409),n=a(98671),s=a(3386),h=a(36416),o=a(16222),d=a(90758),c=(0,h.K2)(async(t,e,a)=>{let l,r=e.useHtmlLabels||(0,s._3)((0,s.D7)()?.htmlLabels),d=t.insert("g").attr("class",a||"node default").attr("id",e.domId||e.id),c=d.insert("g").attr("class","label").attr("style",(0,n.KL)(e.labelStyle));l=void 0===e.label?"":"string"==typeof e.label?e.label:e.label[0];let g=await (0,i.GZ)(c,(0,s.jZ)((0,n.Sm)(l),(0,s.D7)()),{useHtmlLabels:r,width:e.width||(0,s.D7)().flowchart?.wrappingWidth,cssClasses:"markdown-node-label",style:e.labelStyle,addSvgBackground:!!e.icon||!!e.img}),y=g.getBBox(),f=(e?.padding??0)/2;if(r){let t=g.children[0],e=(0,o.Ltv)(g),a=t.getElementsByTagName("img");if(a){let t=""===l.replace(/<img[^>]*>/g,"").trim();await Promise.all([...a].map(e=>new Promise(a=>{function l(){if(e.style.display="flex",e.style.flexDirection="column",t){let t=(0,s.D7)().fontSize?(0,s.D7)().fontSize:window.getComputedStyle(document.body).fontSize,[a=s.UI.fontSize]=(0,n.I5)(t),l=5*a+"px";e.style.minWidth=l,e.style.maxWidth=l}else e.style.width="100%";a(e)}(0,h.K2)(l,"setupImage"),setTimeout(()=>{e.complete&&l()}),e.addEventListener("error",l),e.addEventListener("load",l)})))}y=t.getBoundingClientRect(),e.attr("width",y.width),e.attr("height",y.height)}return r?c.attr("transform","translate("+-y.width/2+", "+-y.height/2+")"):c.attr("transform","translate(0, "+-y.height/2+")"),e.centerLabel&&c.attr("transform","translate("+-y.width/2+", "+-y.height/2+")"),c.insert("rect",":first-child"),{shapeSvg:d,bbox:y,halfPadding:f,label:c}},"labelHelper"),g=(0,h.K2)(async(t,e,a)=>{let l=a.useHtmlLabels||(0,s._3)((0,s.D7)()?.flowchart?.htmlLabels),r=t.insert("g").attr("class","label").attr("style",a.labelStyle||""),h=await (0,i.GZ)(r,(0,s.jZ)((0,n.Sm)(e),(0,s.D7)()),{useHtmlLabels:l,width:a.width||(0,s.D7)()?.flowchart?.wrappingWidth,style:a.labelStyle,addSvgBackground:!!a.icon||!!a.img}),d=h.getBBox(),c=a.padding/2;if((0,s._3)((0,s.D7)()?.flowchart?.htmlLabels)){let t=h.children[0],e=(0,o.Ltv)(h);d=t.getBoundingClientRect(),e.attr("width",d.width),e.attr("height",d.height)}return l?r.attr("transform","translate("+-d.width/2+", "+-d.height/2+")"):r.attr("transform","translate(0, "+-d.height/2+")"),a.centerLabel&&r.attr("transform","translate("+-d.width/2+", "+-d.height/2+")"),r.insert("rect",":first-child"),{shapeSvg:t,bbox:d,halfPadding:c,label:r}},"insertLabel"),y=(0,h.K2)((t,e)=>{let a=e.node().getBBox();t.width=a.width,t.height=a.height},"updateNodeBounds"),f=(0,h.K2)((t,e)=>("handDrawn"===t.look?"rough-node":"node")+" "+t.cssClasses+" "+(e||""),"getNodeClasses");function p(t){let e=t.map((t,e)=>`${0===e?"M":"L"}${t.x},${t.y}`);return e.push("Z"),e.join(" ")}function u(t,e,a,l,r,i){let n=[],s=a-t,h=2*Math.PI/(s/i),o=e+(l-e)/2;for(let e=0;e<=50;e++){let a=t+e/50*s,l=o+r*Math.sin(h*(a-t));n.push({x:a,y:l})}return n}function m(t,e,a,l,r,i){let n=[],s=r*Math.PI/180,h=(i*Math.PI/180-s)/(l-1);for(let r=0;r<l;r++){let l=s+r*h,i=t+a*Math.cos(l),o=e+a*Math.sin(l);n.push({x:-i,y:-o})}return n}(0,h.K2)(p,"createPathFromPoints"),(0,h.K2)(u,"generateFullSineWavePoints"),(0,h.K2)(m,"generateCirclePoints");var x=(0,h.K2)((t,e)=>{var a,l,r=t.x,i=t.y,n=e.x-r,s=e.y-i,h=t.width/2,o=t.height/2;return Math.abs(s)*h>Math.abs(n)*o?(s<0&&(o=-o),a=0===s?0:o*n/s,l=o):(n<0&&(h=-h),a=h,l=0===n?0:h*s/n),{x:r+a,y:i+l}},"intersectRect");function w(t,e){e&&t.attr("style",e)}async function b(t){let e=(0,o.Ltv)(document.createElementNS("http://www.w3.org/2000/svg","foreignObject")),a=e.append("xhtml:div"),l=(0,s.D7)(),r=t.label;t.label&&(0,s.Wi)(t.label)&&(r=await (0,s.dj)(t.label.replace(s.Y2.lineBreakRegex,"\n"),l));let i='<span class="'+(t.isNode?"nodeLabel":"edgeLabel")+'" '+(t.labelStyle?'style="'+t.labelStyle+'"':"")+">"+r+"</span>";return a.html((0,s.jZ)(i,l)),w(a,t.labelStyle),a.style("display","inline-block"),a.style("padding-right","1px"),a.style("white-space","nowrap"),a.attr("xmlns","http://www.w3.org/1999/xhtml"),e.node()}(0,h.K2)(w,"applyStyle"),(0,h.K2)(b,"addHtmlLabel");var $=(0,h.K2)(async(t,e,a,l)=>{let r=t||"";if("object"==typeof r&&(r=r[0]),(0,s._3)((0,s.D7)().flowchart.htmlLabels)){r=r.replace(/\\n|\n/g,"<br />"),h.Rm.info("vertexText"+r);let t={isNode:l,label:(0,n.Sm)(r).replace(/fa[blrs]?:fa-[\w-]+/g,t=>`<i class='${t.replace(":"," ")}'></i>`),labelStyle:e?e.replace("fill:","color:"):e};return await b(t)}{let t=document.createElementNS("http://www.w3.org/2000/svg","text");t.setAttribute("style",e.replace("color:","fill:"));for(let e of"string"==typeof r?r.split(/\\n|\n|<br\s*\/?>/gi):Array.isArray(r)?r:[]){let l=document.createElementNS("http://www.w3.org/2000/svg","tspan");l.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),l.setAttribute("dy","1em"),l.setAttribute("x","0"),a?l.setAttribute("class","title-row"):l.setAttribute("class","row"),l.textContent=e.trim(),t.appendChild(l)}return t}},"createLabel"),k=(0,h.K2)((t,e,a,l,r)=>["M",t+r,e,"H",t+a-r,"A",r,r,"0 0 1",t+a,e+r,"V",e+l-r,"A",r,r,"0 0 1",t+a-r,e+l,"H",t+r,"A",r,r,"0 0 1",t,e+l-r,"V",e+r,"A",r,r,"0 0 1",t+r,e,"Z"].join(" "),"createRoundedRectPathD"),M=(0,h.K2)(async(t,e)=>{let a;h.Rm.info("Creating subgraph rect for ",e.id,e);let n=(0,s.D7)(),{themeVariables:c,handDrawnSeed:g}=n,{clusterBkg:y,clusterBorder:f}=c,{labelStyles:p,nodeStyles:u,borderStyles:m,backgroundStyles:w}=(0,r.GX)(e),b=t.insert("g").attr("class","cluster "+e.cssClasses).attr("id",e.id).attr("data-look",e.look),$=(0,s._3)(n.flowchart.htmlLabels),M=b.insert("g").attr("class","cluster-label "),S=await (0,i.GZ)(M,e.label,{style:e.labelStyle,useHtmlLabels:$,isNode:!0}),D=S.getBBox();if((0,s._3)(n.flowchart.htmlLabels)){let t=S.children[0],e=(0,o.Ltv)(S);D=t.getBoundingClientRect(),e.attr("width",D.width),e.attr("height",D.height)}let A=e.width<=D.width+e.padding?D.width+e.padding:e.width;e.width<=D.width+e.padding?e.diff=(A-e.width)/2-e.padding:e.diff=-e.padding;let v=e.height,C=e.x-A/2,K=e.y-v/2;if(h.Rm.trace("Data ",e,JSON.stringify(e)),"handDrawn"===e.look){let t=d.A.svg(b),l=(0,r.Fr)(e,{roughness:.7,fill:y,stroke:f,fillWeight:3,seed:g}),i=t.path(k(C,K,A,v,0),l);(a=b.insert(()=>(h.Rm.debug("Rough node insert CXC",i),i),":first-child")).select("path:nth-child(2)").attr("style",m.join(";")),a.select("path").attr("style",w.join(";").replace("fill","stroke"))}else(a=b.insert("rect",":first-child")).attr("style",u).attr("rx",e.rx).attr("ry",e.ry).attr("x",C).attr("y",K).attr("width",A).attr("height",v);let{subGraphTitleTopMargin:B}=(0,l.O)(n);if(M.attr("transform",`translate(${e.x-D.width/2}, ${e.y-e.height/2+B})`),p){let t=M.select("span");t&&t.attr("style",p)}let N=a.node().getBBox();return e.offsetX=0,e.width=N.width,e.height=N.height,e.offsetY=D.height-e.padding/2,e.intersect=function(t){return x(e,t)},{cluster:b,labelBBox:D}},"rect"),S=(0,h.K2)((t,e)=>{let a=t.insert("g").attr("class","note-cluster").attr("id",e.id),l=a.insert("rect",":first-child"),r=0*e.padding,i=r/2;l.attr("rx",e.rx).attr("ry",e.ry).attr("x",e.x-e.width/2-i).attr("y",e.y-e.height/2-i).attr("width",e.width+r).attr("height",e.height+r).attr("fill","none");let n=l.node().getBBox();return e.width=n.width,e.height=n.height,e.intersect=function(t){return x(e,t)},{cluster:a,labelBBox:{width:0,height:0}}},"noteGroup"),D=(0,h.K2)(async(t,e)=>{let a,l=(0,s.D7)(),{themeVariables:r,handDrawnSeed:i}=l,{altBackground:n,compositeBackground:h,compositeTitleBackground:c,nodeBorder:g}=r,y=t.insert("g").attr("class",e.cssClasses).attr("id",e.id).attr("data-id",e.id).attr("data-look",e.look),f=y.insert("g",":first-child"),p=y.insert("g").attr("class","cluster-label"),u=y.append("rect"),m=p.node().appendChild(await $(e.label,e.labelStyle,void 0,!0)),w=m.getBBox();if((0,s._3)(l.flowchart.htmlLabels)){let t=m.children[0],e=(0,o.Ltv)(m);w=t.getBoundingClientRect(),e.attr("width",w.width),e.attr("height",w.height)}let b=0*e.padding,M=(e.width<=w.width+e.padding?w.width+e.padding:e.width)+b;e.width<=w.width+e.padding?e.diff=(M-e.width)/2-e.padding:e.diff=-e.padding;let S=e.height+b,D=e.height+b-w.height-6,A=e.x-M/2,v=e.y-S/2;e.width=M;let C=e.y-e.height/2-b/2+w.height+2;if("handDrawn"===e.look){let t=e.cssClasses.includes("statediagram-cluster-alt"),l=d.A.svg(y),r=e.rx||e.ry?l.path(k(A,v,M,S,10),{roughness:.7,fill:c,fillStyle:"solid",stroke:g,seed:i}):l.rectangle(A,v,M,S,{seed:i});a=y.insert(()=>r,":first-child");let s=l.rectangle(A,C,M,D,{fill:t?n:h,fillStyle:t?"hachure":"solid",stroke:g,seed:i});a=y.insert(()=>r,":first-child"),u=y.insert(()=>s)}else(a=f.insert("rect",":first-child")).attr("class","outer").attr("x",A).attr("y",v).attr("width",M).attr("height",S).attr("data-look",e.look),u.attr("class","inner").attr("x",A).attr("y",C).attr("width",M).attr("height",D);return p.attr("transform",`translate(${e.x-w.width/2}, ${v+1-3*!(0,s._3)(l.flowchart.htmlLabels)})`),e.height=a.node().getBBox().height,e.offsetX=0,e.offsetY=w.height-e.padding/2,e.labelBBox=w,e.intersect=function(t){return x(e,t)},{cluster:y,labelBBox:w}},"roundedWithTitle"),A=(0,h.K2)(async(t,e)=>{let a;h.Rm.info("Creating subgraph rect for ",e.id,e);let n=(0,s.D7)(),{themeVariables:c,handDrawnSeed:g}=n,{clusterBkg:y,clusterBorder:f}=c,{labelStyles:p,nodeStyles:u,borderStyles:m,backgroundStyles:w}=(0,r.GX)(e),b=t.insert("g").attr("class","cluster "+e.cssClasses).attr("id",e.id).attr("data-look",e.look),$=(0,s._3)(n.flowchart.htmlLabels),M=b.insert("g").attr("class","cluster-label "),S=await (0,i.GZ)(M,e.label,{style:e.labelStyle,useHtmlLabels:$,isNode:!0,width:e.width}),D=S.getBBox();if((0,s._3)(n.flowchart.htmlLabels)){let t=S.children[0],e=(0,o.Ltv)(S);D=t.getBoundingClientRect(),e.attr("width",D.width),e.attr("height",D.height)}let A=e.width<=D.width+e.padding?D.width+e.padding:e.width;e.width<=D.width+e.padding?e.diff=(A-e.width)/2-e.padding:e.diff=-e.padding;let v=e.height,C=e.x-A/2,K=e.y-v/2;if(h.Rm.trace("Data ",e,JSON.stringify(e)),"handDrawn"===e.look){let t=d.A.svg(b),l=(0,r.Fr)(e,{roughness:.7,fill:y,stroke:f,fillWeight:4,seed:g}),i=t.path(k(C,K,A,v,e.rx),l);(a=b.insert(()=>(h.Rm.debug("Rough node insert CXC",i),i),":first-child")).select("path:nth-child(2)").attr("style",m.join(";")),a.select("path").attr("style",w.join(";").replace("fill","stroke"))}else(a=b.insert("rect",":first-child")).attr("style",u).attr("rx",e.rx).attr("ry",e.ry).attr("x",C).attr("y",K).attr("width",A).attr("height",v);let{subGraphTitleTopMargin:B}=(0,l.O)(n);if(M.attr("transform",`translate(${e.x-D.width/2}, ${e.y-e.height/2+B})`),p){let t=M.select("span");t&&t.attr("style",p)}let N=a.node().getBBox();return e.offsetX=0,e.width=N.width,e.height=N.height,e.offsetY=D.height-e.padding/2,e.intersect=function(t){return x(e,t)},{cluster:b,labelBBox:D}},"kanbanSection"),v={rect:M,squareRect:M,roundedWithTitle:D,noteGroup:S,divider:(0,h.K2)((t,e)=>{let a,{themeVariables:l,handDrawnSeed:r}=(0,s.D7)(),{nodeBorder:i}=l,n=t.insert("g").attr("class",e.cssClasses).attr("id",e.id).attr("data-look",e.look),h=n.insert("g",":first-child"),o=0*e.padding,c=e.width+o;e.diff=-e.padding;let g=e.height+o,y=e.x-c/2,f=e.y-g/2;if(e.width=c,"handDrawn"===e.look){let t=d.A.svg(n).rectangle(y,f,c,g,{fill:"lightgrey",roughness:.5,strokeLineDash:[5],stroke:i,seed:r});a=n.insert(()=>t,":first-child")}else(a=h.insert("rect",":first-child")).attr("class","divider").attr("x",y).attr("y",f).attr("width",c).attr("height",g).attr("data-look",e.look);return e.height=a.node().getBBox().height,e.offsetX=0,e.offsetY=0,e.intersect=function(t){return x(e,t)},{cluster:n,labelBBox:{}}},"divider"),kanbanSection:A},C=new Map,K=(0,h.K2)(async(t,e)=>{let a=e.shape||"rect",l=await v[a](t,e);return C.set(e.id,l),l},"insertCluster"),B=(0,h.K2)(()=>{C=new Map},"clear");function N(t,e,a,l){var r=t.x,i=t.y,n=r-l.x,s=i-l.y,h=Math.sqrt(e*e*s*s+a*a*n*n),o=Math.abs(e*a*n/h);l.x<r&&(o=-o);var d=Math.abs(e*a*s/h);return l.y<i&&(d=-d),{x:r+o,y:i+d}}function L(t,e,a){return N(t,e,e,a)}function R(t,e,a,l){{let r=e.y-t.y,i=t.x-e.x,n=e.x*t.y-t.x*e.y,s=r*a.x+i*a.y+n,h=r*l.x+i*l.y+n;if(0!==s&&0!==h&&F(s,h))return;let o=l.y-a.y,d=a.x-l.x,c=l.x*a.y-a.x*l.y,g=o*t.x+d*t.y+c,y=o*e.x+d*e.y+c;if(1e-6>Math.abs(g)&&1e-6>Math.abs(y)&&F(g,y))return;let f=r*d-o*i;if(0===f)return;let p=Math.abs(f/2),u=i*c-d*n;return{x:u<0?(u-p)/f:(u+p)/f,y:(u=o*n-r*c)<0?(u-p)/f:(u+p)/f}}}function F(t,e){return t*e>0}function P(t,e,a){let l=t.x,r=t.y,i=[],n=1/0,s=1/0;"function"==typeof e.forEach?e.forEach(function(t){n=Math.min(n,t.x),s=Math.min(s,t.y)}):(n=Math.min(n,e.x),s=Math.min(s,e.y));let h=l-t.width/2-n,o=r-t.height/2-s;for(let l=0;l<e.length;l++){let r=e[l],n=e[l<e.length-1?l+1:0],s=R(t,a,{x:h+r.x,y:o+r.y},{x:h+n.x,y:o+n.y});s&&i.push(s)}return i.length?(i.length>1&&i.sort(function(t,e){let l=t.x-a.x,r=t.y-a.y,i=Math.sqrt(l*l+r*r),n=e.x-a.x,s=e.y-a.y,h=Math.sqrt(n*n+s*s);return i<h?-1:+(i!==h)}),i[0]):t}(0,h.K2)(function(t,e){return t.intersect(e)},"intersectNode"),(0,h.K2)(N,"intersectEllipse"),(0,h.K2)(L,"intersectCircle"),(0,h.K2)(R,"intersectLine"),(0,h.K2)(F,"sameSign"),(0,h.K2)(P,"intersectPolygon");var X={circle:L,polygon:P,rect:x};function G(t,e){let{labelStyles:a}=(0,r.GX)(e);e.labelStyle=a;let l=f(e),i=l;l||(i="anchor");let s=t.insert("g").attr("class",i).attr("id",e.domId||e.id),{cssStyles:o}=e,c=d.A.svg(s),g=(0,r.Fr)(e,{fill:"black",stroke:"none",fillStyle:"solid"});"handDrawn"!==e.look&&(g.roughness=0);let p=c.circle(0,0,2,g),u=s.insert(()=>p,":first-child");return u.attr("class","anchor").attr("style",(0,n.KL)(o)),y(e,u),e.intersect=function(t){return h.Rm.info("Circle intersect",e,1,t),X.circle(e,1,t)},s}function I(t,e,a,l,r,i,n){let s=Math.atan2(l-e,a-t),h=Math.sqrt(((a-t)/2/r)**2+((l-e)/2/i)**2);if(h>1)throw Error("The given radii are too small to create an arc between the points.");let o=Math.sqrt(1-h**2),d=(t+a)/2+o*i*Math.sin(s)*(n?-1:1),c=(e+l)/2-o*r*Math.cos(s)*(n?-1:1),g=Math.atan2((e-c)/i,(t-d)/r),y=Math.atan2((l-c)/i,(a-d)/r)-g;n&&y<0&&(y+=2*Math.PI),!n&&y>0&&(y-=2*Math.PI);let f=[];for(let t=0;t<20;t++){let e=g+t/19*y,a=d+r*Math.cos(e),l=c+i*Math.sin(e);f.push({x:a,y:l})}return f}async function T(t,e){let{labelStyles:a,nodeStyles:l}=(0,r.GX)(e);e.labelStyle=a;let{shapeSvg:i,bbox:n}=await c(t,e,f(e)),s=n.width+e.padding+20,h=n.height+e.padding,o=h/2,g=o/(2.5+h/50),{cssStyles:u}=e,m=[{x:s/2,y:-h/2},{x:-s/2,y:-h/2},...I(-s/2,-h/2,-s/2,h/2,g,o,!1),{x:s/2,y:h/2},...I(s/2,h/2,s/2,-h/2,g,o,!0)],x=d.A.svg(i),w=(0,r.Fr)(e,{});"handDrawn"!==e.look&&(w.roughness=0,w.fillStyle="solid");let b=p(m),$=x.path(b,w),k=i.insert(()=>$,":first-child");return k.attr("class","basic label-container"),u&&"handDrawn"!==e.look&&k.selectAll("path").attr("style",u),l&&"handDrawn"!==e.look&&k.selectAll("path").attr("style",l),k.attr("transform",`translate(${g/2}, 0)`),y(e,k),e.intersect=function(t){return X.polygon(e,m,t)},i}function W(t,e,a,l){return t.insert("polygon",":first-child").attr("points",l.map(function(t){return t.x+","+t.y}).join(" ")).attr("class","label-container").attr("transform","translate("+-e/2+","+a/2+")")}async function _(t,e){let a,{labelStyles:l,nodeStyles:i}=(0,r.GX)(e);e.labelStyle=l;let{shapeSvg:n,bbox:s}=await c(t,e,f(e)),h=s.height+e.padding,o=s.width+e.padding+12,g=-h,u=[{x:12,y:g},{x:o,y:g},{x:o,y:0},{x:0,y:0},{x:0,y:g+12},{x:12,y:g}],{cssStyles:m}=e;if("handDrawn"===e.look){let t=d.A.svg(n),l=(0,r.Fr)(e,{}),i=p(u),s=t.path(i,l);a=n.insert(()=>s,":first-child").attr("transform",`translate(${-o/2}, ${h/2})`),m&&a.attr("style",m)}else a=W(n,o,h,u);return i&&a.attr("style",i),y(e,a),e.intersect=function(t){return X.polygon(e,u,t)},n}function E(t,e){let{nodeStyles:a}=(0,r.GX)(e);e.label="";let l=t.insert("g").attr("class",f(e)).attr("id",e.domId??e.id),{cssStyles:i}=e,n=Math.max(28,e.width??0),s=[{x:0,y:n/2},{x:n/2,y:0},{x:0,y:-n/2},{x:-n/2,y:0}],h=d.A.svg(l),o=(0,r.Fr)(e,{});"handDrawn"!==e.look&&(o.roughness=0,o.fillStyle="solid");let c=p(s),g=h.path(c,o),y=l.insert(()=>g,":first-child");return i&&"handDrawn"!==e.look&&y.selectAll("path").attr("style",i),a&&"handDrawn"!==e.look&&y.selectAll("path").attr("style",a),e.width=28,e.height=28,e.intersect=function(t){return X.polygon(e,s,t)},l}async function H(t,e,a){let l,{labelStyles:i,nodeStyles:s}=(0,r.GX)(e);e.labelStyle=i;let{shapeSvg:o,bbox:g,halfPadding:p}=await c(t,e,f(e)),u=a?.padding??p,m=g.width/2+u,{cssStyles:x}=e;if("handDrawn"===e.look){let t=d.A.svg(o),a=(0,r.Fr)(e,{}),i=t.circle(0,0,2*m,a);(l=o.insert(()=>i,":first-child")).attr("class","basic label-container").attr("style",(0,n.KL)(x))}else l=o.insert("circle",":first-child").attr("class","basic label-container").attr("style",s).attr("r",m).attr("cx",0).attr("cy",0);return y(e,l),e.calcIntersect=function(t,e){let a=t.width/2;return X.circle(t,a,e)},e.intersect=function(t){return h.Rm.info("Circle intersect",e,m,t),X.circle(e,m,t)},o}function j(t){let e=Math.cos(Math.PI/4),a=Math.sin(Math.PI/4),l=2*t,r={x:l/2*e,y:l/2*a},i={x:-(l/2)*e,y:l/2*a},n={x:-(l/2)*e,y:-(l/2)*a},s={x:l/2*e,y:-(l/2)*a};return`M ${i.x},${i.y} L ${s.x},${s.y}
2
2
  M ${r.x},${r.y} L ${n.x},${n.y}`}function q(t,e){let{labelStyles:a,nodeStyles:l}=(0,r.GX)(e);e.labelStyle=a,e.label="";let i=t.insert("g").attr("class",f(e)).attr("id",e.domId??e.id),n=Math.max(30,e?.width??0),{cssStyles:s}=e,o=d.A.svg(i),c=(0,r.Fr)(e,{});"handDrawn"!==e.look&&(c.roughness=0,c.fillStyle="solid");let g=o.circle(0,0,2*n,c),p=j(n),u=o.path(p,c),m=i.insert(()=>g,":first-child");return m.insert(()=>u),s&&"handDrawn"!==e.look&&m.selectAll("path").attr("style",s),l&&"handDrawn"!==e.look&&m.selectAll("path").attr("style",l),y(e,m),e.intersect=function(t){return h.Rm.info("crossedCircle intersect",e,{radius:n,point:t}),X.circle(e,n,t)},i}function z(t,e,a,l=100,r=0,i=180){let n=[],s=r*Math.PI/180,h=(i*Math.PI/180-s)/(l-1);for(let r=0;r<l;r++){let l=s+r*h,i=t+a*Math.cos(l),o=e+a*Math.sin(l);n.push({x:-i,y:-o})}return n}async function Z(t,e){let{labelStyles:a,nodeStyles:l}=(0,r.GX)(e);e.labelStyle=a;let{shapeSvg:i,bbox:n,label:s}=await c(t,e,f(e)),h=n.width+(e.padding??0),o=n.height+(e.padding??0),g=Math.max(5,.1*o),{cssStyles:u}=e,m=[...z(h/2,-o/2,g,30,-90,0),{x:-h/2-g,y:g},...z(h/2+2*g,-g,g,20,-180,-270),...z(h/2+2*g,g,g,20,-90,-180),{x:-h/2-g,y:-o/2},...z(h/2,o/2,g,20,0,90)],x=[{x:h/2,y:-o/2-g},{x:-h/2,y:-o/2-g},...z(h/2,-o/2,g,20,-90,0),{x:-h/2-g,y:-g},...z(h/2+.1*h,-g,g,20,-180,-270),...z(h/2+.1*h,g,g,20,-90,-180),{x:-h/2-g,y:o/2},...z(h/2,o/2,g,20,0,90),{x:-h/2,y:o/2+g},{x:h/2,y:o/2+g}],w=d.A.svg(i),b=(0,r.Fr)(e,{fill:"none"});"handDrawn"!==e.look&&(b.roughness=0,b.fillStyle="solid");let $=p(m).replace("Z",""),k=w.path($,b),M=p(x),S=w.path(M,{...b}),D=i.insert("g",":first-child");return D.insert(()=>S,":first-child").attr("stroke-opacity",0),D.insert(()=>k,":first-child"),D.attr("class","text"),u&&"handDrawn"!==e.look&&D.selectAll("path").attr("style",u),l&&"handDrawn"!==e.look&&D.selectAll("path").attr("style",l),D.attr("transform",`translate(${g}, 0)`),s.attr("transform",`translate(${-h/2+g-(n.x-(n.left??0))},${-o/2+(e.padding??0)/2-(n.y-(n.top??0))})`),y(e,D),e.intersect=function(t){return X.polygon(e,x,t)},i}function O(t,e,a,l=100,r=0,i=180){let n=[],s=r*Math.PI/180,h=(i*Math.PI/180-s)/(l-1);for(let r=0;r<l;r++){let l=s+r*h,i=t+a*Math.cos(l),o=e+a*Math.sin(l);n.push({x:i,y:o})}return n}async function Y(t,e){let{labelStyles:a,nodeStyles:l}=(0,r.GX)(e);e.labelStyle=a;let{shapeSvg:i,bbox:n,label:s}=await c(t,e,f(e)),h=n.width+(e.padding??0),o=n.height+(e.padding??0),g=Math.max(5,.1*o),{cssStyles:u}=e,m=[...O(h/2,-o/2,g,20,-90,0),{x:h/2+g,y:-g},...O(h/2+2*g,-g,g,20,-180,-270),...O(h/2+2*g,g,g,20,-90,-180),{x:h/2+g,y:o/2},...O(h/2,o/2,g,20,0,90)],x=[{x:-h/2,y:-o/2-g},{x:h/2,y:-o/2-g},...O(h/2,-o/2,g,20,-90,0),{x:h/2+g,y:-g},...O(h/2+2*g,-g,g,20,-180,-270),...O(h/2+2*g,g,g,20,-90,-180),{x:h/2+g,y:o/2},...O(h/2,o/2,g,20,0,90),{x:h/2,y:o/2+g},{x:-h/2,y:o/2+g}],w=d.A.svg(i),b=(0,r.Fr)(e,{fill:"none"});"handDrawn"!==e.look&&(b.roughness=0,b.fillStyle="solid");let $=p(m).replace("Z",""),k=w.path($,b),M=p(x),S=w.path(M,{...b}),D=i.insert("g",":first-child");return D.insert(()=>S,":first-child").attr("stroke-opacity",0),D.insert(()=>k,":first-child"),D.attr("class","text"),u&&"handDrawn"!==e.look&&D.selectAll("path").attr("style",u),l&&"handDrawn"!==e.look&&D.selectAll("path").attr("style",l),D.attr("transform",`translate(${-g}, 0)`),s.attr("transform",`translate(${-h/2+(e.padding??0)/2-(n.x-(n.left??0))},${-o/2+(e.padding??0)/2-(n.y-(n.top??0))})`),y(e,D),e.intersect=function(t){return X.polygon(e,x,t)},i}function U(t,e,a,l=100,r=0,i=180){let n=[],s=r*Math.PI/180,h=(i*Math.PI/180-s)/(l-1);for(let r=0;r<l;r++){let l=s+r*h,i=t+a*Math.cos(l),o=e+a*Math.sin(l);n.push({x:-i,y:-o})}return n}async function V(t,e){let{labelStyles:a,nodeStyles:l}=(0,r.GX)(e);e.labelStyle=a;let{shapeSvg:i,bbox:n,label:s}=await c(t,e,f(e)),h=n.width+(e.padding??0),o=n.height+(e.padding??0),g=Math.max(5,.1*o),{cssStyles:u}=e,m=[...U(h/2,-o/2,g,30,-90,0),{x:-h/2-g,y:g},...U(h/2+2*g,-g,g,20,-180,-270),...U(h/2+2*g,g,g,20,-90,-180),{x:-h/2-g,y:-o/2},...U(h/2,o/2,g,20,0,90)],x=[...U(-h/2+g+g/2,-o/2,g,20,-90,-180),{x:h/2-g/2,y:g},...U(-h/2-g/2,-g,g,20,0,90),...U(-h/2-g/2,g,g,20,-90,0),{x:h/2-g/2,y:-g},...U(-h/2+g+g/2,o/2,g,30,-180,-270)],w=[{x:h/2,y:-o/2-g},{x:-h/2,y:-o/2-g},...U(h/2,-o/2,g,20,-90,0),{x:-h/2-g,y:-g},...U(h/2+2*g,-g,g,20,-180,-270),...U(h/2+2*g,g,g,20,-90,-180),{x:-h/2-g,y:o/2},...U(h/2,o/2,g,20,0,90),{x:-h/2,y:o/2+g},{x:h/2-g-g/2,y:o/2+g},...U(-h/2+g+g/2,-o/2,g,20,-90,-180),{x:h/2-g/2,y:g},...U(-h/2-g/2,-g,g,20,0,90),...U(-h/2-g/2,g,g,20,-90,0),{x:h/2-g/2,y:-g},...U(-h/2+g+g/2,o/2,g,30,-180,-270)],b=d.A.svg(i),$=(0,r.Fr)(e,{fill:"none"});"handDrawn"!==e.look&&($.roughness=0,$.fillStyle="solid");let k=p(m).replace("Z",""),M=b.path(k,$),S=p(x).replace("Z",""),D=b.path(S,$),A=p(w),v=b.path(A,{...$}),C=i.insert("g",":first-child");return C.insert(()=>v,":first-child").attr("stroke-opacity",0),C.insert(()=>M,":first-child"),C.insert(()=>D,":first-child"),C.attr("class","text"),u&&"handDrawn"!==e.look&&C.selectAll("path").attr("style",u),l&&"handDrawn"!==e.look&&C.selectAll("path").attr("style",l),C.attr("transform",`translate(${g-g/4}, 0)`),s.attr("transform",`translate(${-h/2+(e.padding??0)/2-(n.x-(n.left??0))},${-o/2+(e.padding??0)/2-(n.y-(n.top??0))})`),y(e,C),e.intersect=function(t){return X.polygon(e,w,t)},i}async function J(t,e){let{labelStyles:a,nodeStyles:l}=(0,r.GX)(e);e.labelStyle=a;let{shapeSvg:i,bbox:n}=await c(t,e,f(e)),s=Math.max(80,(n.width+(e.padding??0)*2)*1.25,e?.width??0),h=Math.max(20,n.height+(e.padding??0)*2,e?.height??0),o=h/2,{cssStyles:g}=e,u=d.A.svg(i),x=(0,r.Fr)(e,{});"handDrawn"!==e.look&&(x.roughness=0,x.fillStyle="solid");let w=s-o,b=h/4,$=[{x:w,y:0},{x:b,y:0},{x:0,y:h/2},{x:b,y:h},{x:w,y:h},...m(-w,-h/2,o,50,270,90)],k=p($),M=u.path(k,x),S=i.insert(()=>M,":first-child");return S.attr("class","basic label-container"),g&&"handDrawn"!==e.look&&S.selectChildren("path").attr("style",g),l&&"handDrawn"!==e.look&&S.selectChildren("path").attr("style",l),S.attr("transform",`translate(${-s/2}, ${-h/2})`),y(e,S),e.intersect=function(t){return X.polygon(e,$,t)},i}(0,h.K2)(G,"anchor"),(0,h.K2)(I,"generateArcPoints"),(0,h.K2)(T,"bowTieRect"),(0,h.K2)(W,"insertPolygonShape"),(0,h.K2)(_,"card"),(0,h.K2)(E,"choice"),(0,h.K2)(H,"circle"),(0,h.K2)(j,"createLine"),(0,h.K2)(q,"crossedCircle"),(0,h.K2)(z,"generateCirclePoints"),(0,h.K2)(Z,"curlyBraceLeft"),(0,h.K2)(O,"generateCirclePoints"),(0,h.K2)(Y,"curlyBraceRight"),(0,h.K2)(U,"generateCirclePoints"),(0,h.K2)(V,"curlyBraces"),(0,h.K2)(J,"curvedTrapezoid");var Q=(0,h.K2)((t,e,a,l,r,i)=>`M${t},${e+i} a${r},${i} 0,0,0 ${a},0 a${r},${i} 0,0,0 ${-a},0 l0,${l} a${r},${i} 0,0,0 ${a},0 l0,${-l}`,"createCylinderPathD"),tt=(0,h.K2)((t,e,a,l,r,i)=>`M${t},${e+i} M${t+a},${e+i} a${r},${i} 0,0,0 ${-a},0 l0,${l} a${r},${i} 0,0,0 ${a},0 l0,${-l}`,"createOuterCylinderPathD"),te=(0,h.K2)((t,e,a,l,r,i)=>`M${t-a/2},${-l/2} a${r},${i} 0,0,0 ${a},0`,"createInnerCylinderPathD");async function ta(t,e){let a,{labelStyles:l,nodeStyles:i}=(0,r.GX)(e);e.labelStyle=l;let{shapeSvg:s,bbox:h,label:o}=await c(t,e,f(e)),g=Math.max(h.width+e.padding,e.width??0),p=g/2,u=p/(2.5+g/50),m=Math.max(h.height+u+e.padding,e.height??0),{cssStyles:x}=e;if("handDrawn"===e.look){let t=d.A.svg(s),l=tt(0,0,g,m,p,u),i=te(0,u,g,m,p,u),n=t.path(l,(0,r.Fr)(e,{})),h=t.path(i,(0,r.Fr)(e,{fill:"none"}));a=s.insert(()=>h,":first-child"),(a=s.insert(()=>n,":first-child")).attr("class","basic label-container"),x&&a.attr("style",x)}else{let t=Q(0,0,g,m,p,u);a=s.insert("path",":first-child").attr("d",t).attr("class","basic label-container").attr("style",(0,n.KL)(x)).attr("style",i)}return a.attr("label-offset-y",u),a.attr("transform",`translate(${-g/2}, ${-(m/2+u)})`),y(e,a),o.attr("transform",`translate(${-(h.width/2)-(h.x-(h.left??0))}, ${-(h.height/2)+(e.padding??0)/1.5-(h.y-(h.top??0))})`),e.intersect=function(t){let a=X.rect(e,t),l=a.x-(e.x??0);if(0!=p&&(Math.abs(l)<(e.width??0)/2||Math.abs(l)==(e.width??0)/2&&Math.abs(a.y-(e.y??0))>(e.height??0)/2-u)){let r=u*u*(1-l*l/(p*p));r>0&&(r=Math.sqrt(r)),r=u-r,t.y-(e.y??0)>0&&(r=-r),a.y+=r}return a},s}async function tl(t,e){let{labelStyles:a,nodeStyles:l}=(0,r.GX)(e);e.labelStyle=a;let{shapeSvg:i,bbox:n,label:s}=await c(t,e,f(e)),h=n.width+e.padding,o=n.height+e.padding,g=.2*o,p=-h/2,u=-o/2-g/2,{cssStyles:m}=e,x=d.A.svg(i),w=(0,r.Fr)(e,{});"handDrawn"!==e.look&&(w.roughness=0,w.fillStyle="solid");let b=x.polygon([{x:p,y:u+g},{x:-p,y:u+g},{x:-p,y:-u},{x:p,y:-u},{x:p,y:u},{x:-p,y:u},{x:-p,y:u+g}].map(t=>[t.x,t.y]),w),$=i.insert(()=>b,":first-child");return $.attr("class","basic label-container"),m&&"handDrawn"!==e.look&&$.selectAll("path").attr("style",m),l&&"handDrawn"!==e.look&&$.selectAll("path").attr("style",l),s.attr("transform",`translate(${p+(e.padding??0)/2-(n.x-(n.left??0))}, ${u+g+(e.padding??0)/2-(n.y-(n.top??0))})`),y(e,$),e.intersect=function(t){return X.rect(e,t)},i}async function tr(t,e){let a,{labelStyles:l,nodeStyles:i}=(0,r.GX)(e);e.labelStyle=l;let{shapeSvg:s,bbox:o,halfPadding:g}=await c(t,e,f(e)),p=o.width/2+g+5,u=o.width/2+g,{cssStyles:m}=e;if("handDrawn"===e.look){let t=d.A.svg(s),l=(0,r.Fr)(e,{roughness:.2,strokeWidth:2.5}),i=(0,r.Fr)(e,{roughness:.2,strokeWidth:1.5}),h=t.circle(0,0,2*p,l),o=t.circle(0,0,2*u,i);(a=s.insert("g",":first-child")).attr("class",(0,n.KL)(e.cssClasses)).attr("style",(0,n.KL)(m)),a.node()?.appendChild(h),a.node()?.appendChild(o)}else{let t=(a=s.insert("g",":first-child")).insert("circle",":first-child"),e=a.insert("circle");a.attr("class","basic label-container").attr("style",i),t.attr("class","outer-circle").attr("style",i).attr("r",p).attr("cx",0).attr("cy",0),e.attr("class","inner-circle").attr("style",i).attr("r",u).attr("cx",0).attr("cy",0)}return y(e,a),e.intersect=function(t){return h.Rm.info("DoubleCircle intersect",e,p,t),X.circle(e,p,t)},s}function ti(t,e,{config:{themeVariables:a}}){let{labelStyles:l,nodeStyles:i}=(0,r.GX)(e);e.label="",e.labelStyle=l;let n=t.insert("g").attr("class",f(e)).attr("id",e.domId??e.id),{cssStyles:s}=e,o=d.A.svg(n),{nodeBorder:c}=a,g=(0,r.Fr)(e,{fillStyle:"solid"});"handDrawn"!==e.look&&(g.roughness=0);let p=o.circle(0,0,14,g),u=n.insert(()=>p,":first-child");return u.selectAll("path").attr("style",`fill: ${c} !important;`),s&&s.length>0&&"handDrawn"!==e.look&&u.selectAll("path").attr("style",s),i&&"handDrawn"!==e.look&&u.selectAll("path").attr("style",i),y(e,u),e.intersect=function(t){return h.Rm.info("filledCircle intersect",e,{radius:7,point:t}),X.circle(e,7,t)},n}async function tn(t,e){let{labelStyles:a,nodeStyles:l}=(0,r.GX)(e);e.labelStyle=a;let{shapeSvg:i,bbox:n,label:s}=await c(t,e,f(e)),o=n.width+(e.padding??0),g=o+n.height,u=o+n.height,m=[{x:0,y:-g},{x:u,y:-g},{x:u/2,y:0}],{cssStyles:x}=e,w=d.A.svg(i),b=(0,r.Fr)(e,{});"handDrawn"!==e.look&&(b.roughness=0,b.fillStyle="solid");let $=p(m),k=w.path($,b),M=i.insert(()=>k,":first-child").attr("transform",`translate(${-g/2}, ${g/2})`);return x&&"handDrawn"!==e.look&&M.selectChildren("path").attr("style",x),l&&"handDrawn"!==e.look&&M.selectChildren("path").attr("style",l),e.width=o,e.height=g,y(e,M),s.attr("transform",`translate(${-n.width/2-(n.x-(n.left??0))}, ${-g/2+(e.padding??0)/2+(n.y-(n.top??0))})`),e.intersect=function(t){return h.Rm.info("Triangle intersect",e,m,t),X.polygon(e,m,t)},i}function ts(t,e,{dir:a,config:{state:l,themeVariables:i}}){let{nodeStyles:n}=(0,r.GX)(e);e.label="";let s=t.insert("g").attr("class",f(e)).attr("id",e.domId??e.id),{cssStyles:h}=e,o=Math.max(70,e?.width??0),c=Math.max(10,e?.height??0);"LR"===a&&(o=Math.max(10,e?.width??0),c=Math.max(70,e?.height??0));let g=-1*o/2,p=-1*c/2,u=d.A.svg(s),m=(0,r.Fr)(e,{stroke:i.lineColor,fill:i.lineColor});"handDrawn"!==e.look&&(m.roughness=0,m.fillStyle="solid");let x=u.rectangle(g,p,o,c,m),w=s.insert(()=>x,":first-child");h&&"handDrawn"!==e.look&&w.selectAll("path").attr("style",h),n&&"handDrawn"!==e.look&&w.selectAll("path").attr("style",n),y(e,w);let b=l?.padding??0;return e.width&&e.height&&(e.width+=b/2||0,e.height+=b/2||0),e.intersect=function(t){return X.rect(e,t)},s}async function th(t,e){let{labelStyles:a,nodeStyles:l}=(0,r.GX)(e);e.labelStyle=a;let{shapeSvg:i,bbox:n}=await c(t,e,f(e)),s=Math.max(80,n.width+(e.padding??0)*2,e?.width??0),o=Math.max(50,n.height+(e.padding??0)*2,e?.height??0),g=o/2,{cssStyles:u}=e,x=d.A.svg(i),w=(0,r.Fr)(e,{});"handDrawn"!==e.look&&(w.roughness=0,w.fillStyle="solid");let b=[{x:-s/2,y:-o/2},{x:s/2-g,y:-o/2},...m(-s/2+g,0,g,50,90,270),{x:s/2-g,y:o/2},{x:-s/2,y:o/2}],$=p(b),k=x.path($,w),M=i.insert(()=>k,":first-child");return M.attr("class","basic label-container"),u&&"handDrawn"!==e.look&&M.selectChildren("path").attr("style",u),l&&"handDrawn"!==e.look&&M.selectChildren("path").attr("style",l),y(e,M),e.intersect=function(t){return h.Rm.info("Pill intersect",e,{radius:g,point:t}),X.polygon(e,b,t)},i}async function to(t,e){let{labelStyles:a,nodeStyles:l}=(0,r.GX)(e);e.labelStyle=a;let{shapeSvg:i,bbox:n}=await c(t,e,f(e)),s=n.height+(e.padding??0),h=n.width+(e.padding??0)*2.5,{cssStyles:o}=e,g=d.A.svg(i),u=(0,r.Fr)(e,{});"handDrawn"!==e.look&&(u.roughness=0,u.fillStyle="solid");let m=h/2,x=m/6,w=s/2,b=(m+=x)-w/2,$=[{x:-b,y:-w},{x:0,y:-w},{x:b,y:-w},{x:m,y:0},{x:b,y:w},{x:0,y:w},{x:-b,y:w},{x:-m,y:0}],k=p($),M=g.path(k,u),S=i.insert(()=>M,":first-child");return S.attr("class","basic label-container"),o&&"handDrawn"!==e.look&&S.selectChildren("path").attr("style",o),l&&"handDrawn"!==e.look&&S.selectChildren("path").attr("style",l),e.width=h,e.height=s,y(e,S),e.intersect=function(t){return X.polygon(e,$,t)},i}async function td(t,e){let{labelStyles:a,nodeStyles:l}=(0,r.GX)(e);e.label="",e.labelStyle=a;let{shapeSvg:i}=await c(t,e,f(e)),n=Math.max(30,e?.width??0),s=Math.max(30,e?.height??0),{cssStyles:o}=e,g=d.A.svg(i),u=(0,r.Fr)(e,{});"handDrawn"!==e.look&&(u.roughness=0,u.fillStyle="solid");let m=[{x:0,y:0},{x:n,y:0},{x:0,y:s},{x:n,y:s}],x=p(m),w=g.path(x,u),b=i.insert(()=>w,":first-child");return b.attr("class","basic label-container"),o&&"handDrawn"!==e.look&&b.selectChildren("path").attr("style",o),l&&"handDrawn"!==e.look&&b.selectChildren("path").attr("style",l),b.attr("transform",`translate(${-n/2}, ${-s/2})`),y(e,b),e.intersect=function(t){return h.Rm.info("Pill intersect",e,{points:m}),X.polygon(e,m,t)},i}async function tc(t,e,{config:{themeVariables:a,flowchart:l}}){let{labelStyles:n}=(0,r.GX)(e);e.labelStyle=n;let s=Math.max(e.assetHeight??48,e.assetWidth??48);e.width=Math.max(s,l?.wrappingWidth??0);let{shapeSvg:o,bbox:g,label:f}=await c(t,e,"icon-shape default"),p="t"===e.pos,{nodeBorder:u}=a,{stylesMap:m}=(0,r.WW)(e),x=-s/2,w=-s/2,b=8*!!e.label,$=d.A.svg(o),k=(0,r.Fr)(e,{stroke:"none",fill:"none"});"handDrawn"!==e.look&&(k.roughness=0,k.fillStyle="solid");let M=$.rectangle(x,w,s,s,k),S=Math.max(s,g.width),D=s+g.height+b,A=$.rectangle(-S/2,-D/2,S,D,{...k,fill:"transparent",stroke:"none"}),v=o.insert(()=>M,":first-child"),C=o.insert(()=>A);if(e.icon){let t=o.append("g");t.html(`<g>${await (0,i.WY)(e.icon,{height:s,width:s,fallbackPrefix:""})}</g>`);let a=t.node().getBBox(),l=a.width,r=a.height,n=a.x,h=a.y;t.attr("transform",`translate(${-l/2-n},${p?g.height/2+b/2-r/2-h:-g.height/2-b/2-r/2-h})`),t.attr("style",`color: ${m.get("stroke")??u};`)}return f.attr("transform",`translate(${-g.width/2-(g.x-(g.left??0))},${p?-D/2:D/2-g.height})`),v.attr("transform",`translate(0,${p?g.height/2+b/2:-g.height/2-b/2})`),y(e,C),e.intersect=function(t){if(h.Rm.info("iconSquare intersect",e,t),!e.label)return X.rect(e,t);let a=e.x??0,l=e.y??0,r=e.height??0,i=[];return i=p?[{x:a-g.width/2,y:l-r/2},{x:a+g.width/2,y:l-r/2},{x:a+g.width/2,y:l-r/2+g.height+b},{x:a+s/2,y:l-r/2+g.height+b},{x:a+s/2,y:l+r/2},{x:a-s/2,y:l+r/2},{x:a-s/2,y:l-r/2+g.height+b},{x:a-g.width/2,y:l-r/2+g.height+b}]:[{x:a-s/2,y:l-r/2},{x:a+s/2,y:l-r/2},{x:a+s/2,y:l-r/2+s},{x:a+g.width/2,y:l-r/2+s},{x:a+g.width/2/2,y:l+r/2},{x:a-g.width/2,y:l+r/2},{x:a-g.width/2,y:l-r/2+s},{x:a-s/2,y:l-r/2+s}],X.polygon(e,i,t)},o}async function tg(t,e,{config:{themeVariables:a,flowchart:l}}){let{labelStyles:n}=(0,r.GX)(e);e.labelStyle=n;let s=Math.max(e.assetHeight??48,e.assetWidth??48);e.width=Math.max(s,l?.wrappingWidth??0);let{shapeSvg:o,bbox:g,label:f}=await c(t,e,"icon-shape default"),p=8*!!e.label,u="t"===e.pos,{nodeBorder:m,mainBkg:x}=a,{stylesMap:w}=(0,r.WW)(e),b=d.A.svg(o),$=(0,r.Fr)(e,{});"handDrawn"!==e.look&&($.roughness=0,$.fillStyle="solid"),$.stroke=w.get("fill")??x;let k=o.append("g");e.icon&&k.html(`<g>${await (0,i.WY)(e.icon,{height:s,width:s,fallbackPrefix:""})}</g>`);let M=k.node().getBBox(),S=M.width,D=M.height,A=M.x,v=M.y,C=Math.max(S,D)*Math.SQRT2+40,K=b.circle(0,0,C,$),B=Math.max(C,g.width),N=C+g.height+p,L=b.rectangle(-B/2,-N/2,B,N,{...$,fill:"transparent",stroke:"none"}),R=o.insert(()=>K,":first-child"),F=o.insert(()=>L);return k.attr("transform",`translate(${-S/2-A},${u?g.height/2+p/2-D/2-v:-g.height/2-p/2-D/2-v})`),k.attr("style",`color: ${w.get("stroke")??m};`),f.attr("transform",`translate(${-g.width/2-(g.x-(g.left??0))},${u?-N/2:N/2-g.height})`),R.attr("transform",`translate(0,${u?g.height/2+p/2:-g.height/2-p/2})`),y(e,F),e.intersect=function(t){return h.Rm.info("iconSquare intersect",e,t),X.rect(e,t)},o}async function ty(t,e,{config:{themeVariables:a,flowchart:l}}){let{labelStyles:n}=(0,r.GX)(e);e.labelStyle=n;let s=Math.max(e.assetHeight??48,e.assetWidth??48);e.width=Math.max(s,l?.wrappingWidth??0);let{shapeSvg:o,bbox:g,halfPadding:f,label:p}=await c(t,e,"icon-shape default"),u="t"===e.pos,m=s+2*f,x=s+2*f,{nodeBorder:w,mainBkg:b}=a,{stylesMap:$}=(0,r.WW)(e),M=8*!!e.label,S=d.A.svg(o),D=(0,r.Fr)(e,{});"handDrawn"!==e.look&&(D.roughness=0,D.fillStyle="solid"),D.stroke=$.get("fill")??b;let A=S.path(k(-x/2,-m/2,x,m,5),D),v=Math.max(x,g.width),C=m+g.height+M,K=S.rectangle(-v/2,-C/2,v,C,{...D,fill:"transparent",stroke:"none"}),B=o.insert(()=>A,":first-child").attr("class","icon-shape2"),N=o.insert(()=>K);if(e.icon){let t=o.append("g");t.html(`<g>${await (0,i.WY)(e.icon,{height:s,width:s,fallbackPrefix:""})}</g>`);let a=t.node().getBBox(),l=a.width,r=a.height,n=a.x,h=a.y;t.attr("transform",`translate(${-l/2-n},${u?g.height/2+M/2-r/2-h:-g.height/2-M/2-r/2-h})`),t.attr("style",`color: ${$.get("stroke")??w};`)}return p.attr("transform",`translate(${-g.width/2-(g.x-(g.left??0))},${u?-C/2:C/2-g.height})`),B.attr("transform",`translate(0,${u?g.height/2+M/2:-g.height/2-M/2})`),y(e,N),e.intersect=function(t){if(h.Rm.info("iconSquare intersect",e,t),!e.label)return X.rect(e,t);let a=e.x??0,l=e.y??0,r=e.height??0,i=[];return i=u?[{x:a-g.width/2,y:l-r/2},{x:a+g.width/2,y:l-r/2},{x:a+g.width/2,y:l-r/2+g.height+M},{x:a+x/2,y:l-r/2+g.height+M},{x:a+x/2,y:l+r/2},{x:a-x/2,y:l+r/2},{x:a-x/2,y:l-r/2+g.height+M},{x:a-g.width/2,y:l-r/2+g.height+M}]:[{x:a-x/2,y:l-r/2},{x:a+x/2,y:l-r/2},{x:a+x/2,y:l-r/2+m},{x:a+g.width/2,y:l-r/2+m},{x:a+g.width/2/2,y:l+r/2},{x:a-g.width/2,y:l+r/2},{x:a-g.width/2,y:l-r/2+m},{x:a-x/2,y:l-r/2+m}],X.polygon(e,i,t)},o}async function tf(t,e,{config:{themeVariables:a,flowchart:l}}){let{labelStyles:n}=(0,r.GX)(e);e.labelStyle=n;let s=Math.max(e.assetHeight??48,e.assetWidth??48);e.width=Math.max(s,l?.wrappingWidth??0);let{shapeSvg:o,bbox:g,halfPadding:f,label:p}=await c(t,e,"icon-shape default"),u="t"===e.pos,m=s+2*f,x=s+2*f,{nodeBorder:w,mainBkg:b}=a,{stylesMap:$}=(0,r.WW)(e),M=8*!!e.label,S=d.A.svg(o),D=(0,r.Fr)(e,{});"handDrawn"!==e.look&&(D.roughness=0,D.fillStyle="solid"),D.stroke=$.get("fill")??b;let A=S.path(k(-x/2,-m/2,x,m,.1),D),v=Math.max(x,g.width),C=m+g.height+M,K=S.rectangle(-v/2,-C/2,v,C,{...D,fill:"transparent",stroke:"none"}),B=o.insert(()=>A,":first-child"),N=o.insert(()=>K);if(e.icon){let t=o.append("g");t.html(`<g>${await (0,i.WY)(e.icon,{height:s,width:s,fallbackPrefix:""})}</g>`);let a=t.node().getBBox(),l=a.width,r=a.height,n=a.x,h=a.y;t.attr("transform",`translate(${-l/2-n},${u?g.height/2+M/2-r/2-h:-g.height/2-M/2-r/2-h})`),t.attr("style",`color: ${$.get("stroke")??w};`)}return p.attr("transform",`translate(${-g.width/2-(g.x-(g.left??0))},${u?-C/2:C/2-g.height})`),B.attr("transform",`translate(0,${u?g.height/2+M/2:-g.height/2-M/2})`),y(e,N),e.intersect=function(t){if(h.Rm.info("iconSquare intersect",e,t),!e.label)return X.rect(e,t);let a=e.x??0,l=e.y??0,r=e.height??0,i=[];return i=u?[{x:a-g.width/2,y:l-r/2},{x:a+g.width/2,y:l-r/2},{x:a+g.width/2,y:l-r/2+g.height+M},{x:a+x/2,y:l-r/2+g.height+M},{x:a+x/2,y:l+r/2},{x:a-x/2,y:l+r/2},{x:a-x/2,y:l-r/2+g.height+M},{x:a-g.width/2,y:l-r/2+g.height+M}]:[{x:a-x/2,y:l-r/2},{x:a+x/2,y:l-r/2},{x:a+x/2,y:l-r/2+m},{x:a+g.width/2,y:l-r/2+m},{x:a+g.width/2/2,y:l+r/2},{x:a-g.width/2,y:l+r/2},{x:a-g.width/2,y:l-r/2+m},{x:a-x/2,y:l-r/2+m}],X.polygon(e,i,t)},o}async function tp(t,e,{config:{flowchart:a}}){let l=new Image;l.src=e?.img??"",await l.decode();let i=Number(l.naturalWidth.toString().replace("px","")),n=Number(l.naturalHeight.toString().replace("px",""));e.imageAspectRatio=i/n;let{labelStyles:s}=(0,r.GX)(e);e.labelStyle=s;let o=a?.wrappingWidth;e.defaultWidth=a?.wrappingWidth;let g=Math.max(e.label?o??0:0,e?.assetWidth??i),f="on"===e.constraint&&e?.assetHeight?e.assetHeight*e.imageAspectRatio:g,p="on"===e.constraint?f/e.imageAspectRatio:e?.assetHeight??n;e.width=Math.max(f,o??0);let{shapeSvg:u,bbox:m,label:x}=await c(t,e,"image-shape default"),w="t"===e.pos,b=-f/2,$=8*!!e.label,k=d.A.svg(u),M=(0,r.Fr)(e,{});"handDrawn"!==e.look&&(M.roughness=0,M.fillStyle="solid");let S=k.rectangle(b,-p/2,f,p,M),D=Math.max(f,m.width),A=p+m.height+$,v=k.rectangle(-D/2,-A/2,D,A,{...M,fill:"none",stroke:"none"}),C=u.insert(()=>S,":first-child"),K=u.insert(()=>v);if(e.img){let t=u.append("image");t.attr("href",e.img),t.attr("width",f),t.attr("height",p),t.attr("preserveAspectRatio","none"),t.attr("transform",`translate(${-f/2},${w?A/2-p:-A/2})`)}return x.attr("transform",`translate(${-m.width/2-(m.x-(m.left??0))},${w?-p/2-m.height/2-$/2:p/2-m.height/2+$/2})`),C.attr("transform",`translate(0,${w?m.height/2+$/2:-m.height/2-$/2})`),y(e,K),e.intersect=function(t){if(h.Rm.info("iconSquare intersect",e,t),!e.label)return X.rect(e,t);let a=e.x??0,l=e.y??0,r=e.height??0,i=[];return i=w?[{x:a-m.width/2,y:l-r/2},{x:a+m.width/2,y:l-r/2},{x:a+m.width/2,y:l-r/2+m.height+$},{x:a+f/2,y:l-r/2+m.height+$},{x:a+f/2,y:l+r/2},{x:a-f/2,y:l+r/2},{x:a-f/2,y:l-r/2+m.height+$},{x:a-m.width/2,y:l-r/2+m.height+$}]:[{x:a-f/2,y:l-r/2},{x:a+f/2,y:l-r/2},{x:a+f/2,y:l-r/2+p},{x:a+m.width/2,y:l-r/2+p},{x:a+m.width/2/2,y:l+r/2},{x:a-m.width/2,y:l+r/2},{x:a-m.width/2,y:l-r/2+p},{x:a-f/2,y:l-r/2+p}],X.polygon(e,i,t)},u}async function tu(t,e){let a,{labelStyles:l,nodeStyles:i}=(0,r.GX)(e);e.labelStyle=l;let{shapeSvg:n,bbox:s}=await c(t,e,f(e)),h=Math.max(s.width+(e.padding??0)*2,e?.width??0),o=Math.max(s.height+(e.padding??0)*2,e?.height??0),g=[{x:0,y:0},{x:h,y:0},{x:h+3*o/6,y:-o},{x:-3*o/6,y:-o}],{cssStyles:u}=e;if("handDrawn"===e.look){let t=d.A.svg(n),l=(0,r.Fr)(e,{}),i=p(g),s=t.path(i,l);a=n.insert(()=>s,":first-child").attr("transform",`translate(${-h/2}, ${o/2})`),u&&a.attr("style",u)}else a=W(n,h,o,g);return i&&a.attr("style",i),e.width=h,e.height=o,y(e,a),e.intersect=function(t){return X.polygon(e,g,t)},n}async function tm(t,e,a){let l,{labelStyles:i,nodeStyles:s}=(0,r.GX)(e);e.labelStyle=i;let{shapeSvg:h,bbox:o}=await c(t,e,f(e)),g=Math.max(o.width+2*a.labelPaddingX,e?.width||0),p=Math.max(o.height+2*a.labelPaddingY,e?.height||0),u=-g/2,m=-p/2,{rx:x,ry:w}=e,{cssStyles:b}=e;if(a?.rx&&a.ry&&(x=a.rx,w=a.ry),"handDrawn"===e.look){let t=d.A.svg(h),a=(0,r.Fr)(e,{}),i=x||w?t.path(k(u,m,g,p,x||0),a):t.rectangle(u,m,g,p,a);(l=h.insert(()=>i,":first-child")).attr("class","basic label-container").attr("style",(0,n.KL)(b))}else(l=h.insert("rect",":first-child")).attr("class","basic label-container").attr("style",s).attr("rx",(0,n.KL)(x)).attr("ry",(0,n.KL)(w)).attr("x",u).attr("y",m).attr("width",g).attr("height",p);return y(e,l),e.calcIntersect=function(t,e){return X.rect(t,e)},e.intersect=function(t){return X.rect(e,t)},h}async function tx(t,e){let{shapeSvg:a,bbox:l,label:r}=await c(t,e,"label"),i=a.insert("rect",":first-child");return i.attr("width",.1).attr("height",.1),a.attr("class","label edgeLabel"),r.attr("transform",`translate(${-(l.width/2)-(l.x-(l.left??0))}, ${-(l.height/2)-(l.y-(l.top??0))})`),y(e,i),e.intersect=function(t){return X.rect(e,t)},a}async function tw(t,e){let a,{labelStyles:l,nodeStyles:i}=(0,r.GX)(e);e.labelStyle=l;let{shapeSvg:n,bbox:s}=await c(t,e,f(e)),h=Math.max(s.width+(e.padding??0),e?.width??0),o=Math.max(s.height+(e.padding??0),e?.height??0),g=[{x:0,y:0},{x:h+3*o/6,y:0},{x:h,y:-o},{x:-(3*o)/6,y:-o}],{cssStyles:u}=e;if("handDrawn"===e.look){let t=d.A.svg(n),l=(0,r.Fr)(e,{}),i=p(g),s=t.path(i,l);a=n.insert(()=>s,":first-child").attr("transform",`translate(${-h/2}, ${o/2})`),u&&a.attr("style",u)}else a=W(n,h,o,g);return i&&a.attr("style",i),e.width=h,e.height=o,y(e,a),e.intersect=function(t){return X.polygon(e,g,t)},n}async function tb(t,e){let a,{labelStyles:l,nodeStyles:i}=(0,r.GX)(e);e.labelStyle=l;let{shapeSvg:n,bbox:s}=await c(t,e,f(e)),h=Math.max(s.width+(e.padding??0),e?.width??0),o=Math.max(s.height+(e.padding??0),e?.height??0),g=[{x:-3*o/6,y:0},{x:h,y:0},{x:h+3*o/6,y:-o},{x:0,y:-o}],{cssStyles:u}=e;if("handDrawn"===e.look){let t=d.A.svg(n),l=(0,r.Fr)(e,{}),i=p(g),s=t.path(i,l);a=n.insert(()=>s,":first-child").attr("transform",`translate(${-h/2}, ${o/2})`),u&&a.attr("style",u)}else a=W(n,h,o,g);return i&&a.attr("style",i),e.width=h,e.height=o,y(e,a),e.intersect=function(t){return X.polygon(e,g,t)},n}function t$(t,e){let{labelStyles:a,nodeStyles:l}=(0,r.GX)(e);e.label="",e.labelStyle=a;let i=t.insert("g").attr("class",f(e)).attr("id",e.domId??e.id),{cssStyles:n}=e,s=Math.max(35,e?.width??0),o=Math.max(35,e?.height??0),c=[{x:s,y:0},{x:0,y:o+3.5},{x:s-14,y:o+3.5},{x:0,y:2*o},{x:s,y:o-3.5},{x:14,y:o-3.5}],g=d.A.svg(i),u=(0,r.Fr)(e,{});"handDrawn"!==e.look&&(u.roughness=0,u.fillStyle="solid");let m=p(c),x=g.path(m,u),w=i.insert(()=>x,":first-child");return n&&"handDrawn"!==e.look&&w.selectAll("path").attr("style",n),l&&"handDrawn"!==e.look&&w.selectAll("path").attr("style",l),w.attr("transform",`translate(-${s/2},${-o})`),y(e,w),e.intersect=function(t){return h.Rm.info("lightningBolt intersect",e,t),X.polygon(e,c,t)},i}(0,h.K2)(ta,"cylinder"),(0,h.K2)(tl,"dividedRectangle"),(0,h.K2)(tr,"doublecircle"),(0,h.K2)(ti,"filledCircle"),(0,h.K2)(tn,"flippedTriangle"),(0,h.K2)(ts,"forkJoin"),(0,h.K2)(th,"halfRoundedRectangle"),(0,h.K2)(to,"hexagon"),(0,h.K2)(td,"hourglass"),(0,h.K2)(tc,"icon"),(0,h.K2)(tg,"iconCircle"),(0,h.K2)(ty,"iconRounded"),(0,h.K2)(tf,"iconSquare"),(0,h.K2)(tp,"imageSquare"),(0,h.K2)(tu,"inv_trapezoid"),(0,h.K2)(tm,"drawRect"),(0,h.K2)(tx,"labelRect"),(0,h.K2)(tw,"lean_left"),(0,h.K2)(tb,"lean_right"),(0,h.K2)(t$,"lightningBolt");var tk=(0,h.K2)((t,e,a,l,r,i,n)=>`M${t},${e+i} a${r},${i} 0,0,0 ${a},0 a${r},${i} 0,0,0 ${-a},0 l0,${l} a${r},${i} 0,0,0 ${a},0 l0,${-l} M${t},${e+i+n} a${r},${i} 0,0,0 ${a},0`,"createCylinderPathD"),tM=(0,h.K2)((t,e,a,l,r,i,n)=>`M${t},${e+i} M${t+a},${e+i} a${r},${i} 0,0,0 ${-a},0 l0,${l} a${r},${i} 0,0,0 ${a},0 l0,${-l} M${t},${e+i+n} a${r},${i} 0,0,0 ${a},0`,"createOuterCylinderPathD"),tS=(0,h.K2)((t,e,a,l,r,i)=>`M${t-a/2},${-l/2} a${r},${i} 0,0,0 ${a},0`,"createInnerCylinderPathD");async function tD(t,e){let a,{labelStyles:l,nodeStyles:i}=(0,r.GX)(e);e.labelStyle=l;let{shapeSvg:s,bbox:h,label:o}=await c(t,e,f(e)),g=Math.max(h.width+(e.padding??0),e.width??0),p=g/2,u=p/(2.5+g/50),m=Math.max(h.height+u+(e.padding??0),e.height??0),x=.1*m,{cssStyles:w}=e;if("handDrawn"===e.look){let t=d.A.svg(s),l=tM(0,0,g,m,p,u,x),i=tS(0,u,g,m,p,u),n=(0,r.Fr)(e,{}),h=t.path(l,n),o=t.path(i,n);s.insert(()=>o,":first-child").attr("class","line"),(a=s.insert(()=>h,":first-child")).attr("class","basic label-container"),w&&a.attr("style",w)}else{let t=tk(0,0,g,m,p,u,x);a=s.insert("path",":first-child").attr("d",t).attr("class","basic label-container").attr("style",(0,n.KL)(w)).attr("style",i)}return a.attr("label-offset-y",u),a.attr("transform",`translate(${-g/2}, ${-(m/2+u)})`),y(e,a),o.attr("transform",`translate(${-(h.width/2)-(h.x-(h.left??0))}, ${-(h.height/2)+u-(h.y-(h.top??0))})`),e.intersect=function(t){let a=X.rect(e,t),l=a.x-(e.x??0);if(0!=p&&(Math.abs(l)<(e.width??0)/2||Math.abs(l)==(e.width??0)/2&&Math.abs(a.y-(e.y??0))>(e.height??0)/2-u)){let r=u*u*(1-l*l/(p*p));r>0&&(r=Math.sqrt(r)),r=u-r,t.y-(e.y??0)>0&&(r=-r),a.y+=r}return a},s}async function tA(t,e){let{labelStyles:a,nodeStyles:l}=(0,r.GX)(e);e.labelStyle=a;let{shapeSvg:i,bbox:n,label:s}=await c(t,e,f(e)),h=Math.max(n.width+(e.padding??0)*2,e?.width??0),o=Math.max(n.height+(e.padding??0)*2,e?.height??0),g=o/4,p=o+g,{cssStyles:m}=e,x=d.A.svg(i),w=(0,r.Fr)(e,{});"handDrawn"!==e.look&&(w.roughness=0,w.fillStyle="solid");let b=[{x:-h/2-h/2*.1,y:-p/2},{x:-h/2-h/2*.1,y:p/2},...u(-h/2-h/2*.1,p/2,h/2+h/2*.1,p/2,g,.8),{x:h/2+h/2*.1,y:-p/2},{x:-h/2-h/2*.1,y:-p/2},{x:-h/2,y:-p/2},{x:-h/2,y:p/2*1.1},{x:-h/2,y:-p/2}],$=x.polygon(b.map(t=>[t.x,t.y]),w),k=i.insert(()=>$,":first-child");return k.attr("class","basic label-container"),m&&"handDrawn"!==e.look&&k.selectAll("path").attr("style",m),l&&"handDrawn"!==e.look&&k.selectAll("path").attr("style",l),k.attr("transform",`translate(0,${-g/2})`),s.attr("transform",`translate(${-h/2+(e.padding??0)+h/2*.1/2-(n.x-(n.left??0))},${-o/2+(e.padding??0)-g/2-(n.y-(n.top??0))})`),y(e,k),e.intersect=function(t){return X.polygon(e,b,t)},i}async function tv(t,e){let{labelStyles:a,nodeStyles:l}=(0,r.GX)(e);e.labelStyle=a;let{shapeSvg:i,bbox:n,label:s}=await c(t,e,f(e)),h=Math.max(n.width+(e.padding??0)*2,e?.width??0),o=Math.max(n.height+(e.padding??0)*2,e?.height??0),g=-h/2,u=-o/2,{cssStyles:m}=e,x=d.A.svg(i),w=(0,r.Fr)(e,{}),b=[{x:g-5,y:u+5},{x:g-5,y:u+o+5},{x:g+h-5,y:u+o+5},{x:g+h-5,y:u+o},{x:g+h,y:u+o},{x:g+h,y:u+o-5},{x:g+h+5,y:u+o-5},{x:g+h+5,y:u-5},{x:g+5,y:u-5},{x:g+5,y:u},{x:g,y:u},{x:g,y:u+5}];"handDrawn"!==e.look&&(w.roughness=0,w.fillStyle="solid");let $=p(b),k=x.path($,w),M=p([{x:g,y:u+5},{x:g+h-5,y:u+5},{x:g+h-5,y:u+o},{x:g+h,y:u+o},{x:g+h,y:u},{x:g,y:u}]),S=x.path(M,{...w,fill:"none"}),D=i.insert(()=>S,":first-child");return D.insert(()=>k,":first-child"),D.attr("class","basic label-container"),m&&"handDrawn"!==e.look&&D.selectAll("path").attr("style",m),l&&"handDrawn"!==e.look&&D.selectAll("path").attr("style",l),s.attr("transform",`translate(${-(n.width/2)-5-(n.x-(n.left??0))}, ${-(n.height/2)+5-(n.y-(n.top??0))})`),y(e,D),e.intersect=function(t){return X.polygon(e,b,t)},i}async function tC(t,e){let{labelStyles:a,nodeStyles:l}=(0,r.GX)(e);e.labelStyle=a;let{shapeSvg:i,bbox:n,label:s}=await c(t,e,f(e)),h=Math.max(n.width+(e.padding??0)*2,e?.width??0),o=Math.max(n.height+(e.padding??0)*2,e?.height??0),g=o/4,m=o+g,x=-h/2,w=-m/2,{cssStyles:b}=e,$=u(x-5,w+m+5,x+h-5,w+m+5,g,.8),k=$?.[$.length-1],M=[{x:x-5,y:w+5},{x:x-5,y:w+m+5},...$,{x:x+h-5,y:k.y-5},{x:x+h,y:k.y-5},{x:x+h,y:k.y-10},{x:x+h+5,y:k.y-10},{x:x+h+5,y:w-5},{x:x+5,y:w-5},{x:x+5,y:w},{x,y:w},{x,y:w+5}],S=[{x,y:w+5},{x:x+h-5,y:w+5},{x:x+h-5,y:k.y-5},{x:x+h,y:k.y-5},{x:x+h,y:w},{x,y:w}],D=d.A.svg(i),A=(0,r.Fr)(e,{});"handDrawn"!==e.look&&(A.roughness=0,A.fillStyle="solid");let v=p(M),C=D.path(v,A),K=p(S),B=D.path(K,A),N=i.insert(()=>C,":first-child");return N.insert(()=>B),N.attr("class","basic label-container"),b&&"handDrawn"!==e.look&&N.selectAll("path").attr("style",b),l&&"handDrawn"!==e.look&&N.selectAll("path").attr("style",l),N.attr("transform",`translate(0,${-g/2})`),s.attr("transform",`translate(${-(n.width/2)-5-(n.x-(n.left??0))}, ${-(n.height/2)+5-g/2-(n.y-(n.top??0))})`),y(e,N),e.intersect=function(t){return X.polygon(e,M,t)},i}async function tK(t,e,{config:{themeVariables:a}}){let{labelStyles:l,nodeStyles:i}=(0,r.GX)(e);e.labelStyle=l,e.useHtmlLabels||(0,s.zj)().flowchart?.htmlLabels!==!1||(e.centerLabel=!0);let{shapeSvg:n,bbox:h,label:o}=await c(t,e,f(e)),g=Math.max(h.width+(e.padding??0)*2,e?.width??0),p=Math.max(h.height+(e.padding??0)*2,e?.height??0),{cssStyles:u}=e,m=d.A.svg(n),x=(0,r.Fr)(e,{fill:a.noteBkgColor,stroke:a.noteBorderColor});"handDrawn"!==e.look&&(x.roughness=0,x.fillStyle="solid");let w=m.rectangle(-g/2,-p/2,g,p,x),b=n.insert(()=>w,":first-child");return b.attr("class","basic label-container"),u&&"handDrawn"!==e.look&&b.selectAll("path").attr("style",u),i&&"handDrawn"!==e.look&&b.selectAll("path").attr("style",i),o.attr("transform",`translate(${-h.width/2-(h.x-(h.left??0))}, ${-(h.height/2)-(h.y-(h.top??0))})`),y(e,b),e.intersect=function(t){return X.rect(e,t)},n}(0,h.K2)(tD,"linedCylinder"),(0,h.K2)(tA,"linedWaveEdgedRect"),(0,h.K2)(tv,"multiRect"),(0,h.K2)(tC,"multiWaveEdgedRectangle"),(0,h.K2)(tK,"note");var tB=(0,h.K2)((t,e,a)=>`M${t+a/2},${e} L${t+a},${e-a/2} L${t+a/2},${e-a} L${t},${e-a/2} Z`,"createDecisionBoxPathD");async function tN(t,e){let a,{labelStyles:l,nodeStyles:i}=(0,r.GX)(e);e.labelStyle=l;let{shapeSvg:n,bbox:s}=await c(t,e,f(e)),h=s.width+e.padding+(s.height+e.padding),o=[{x:h/2,y:0},{x:h,y:-h/2},{x:h/2,y:-h},{x:0,y:-h/2}],{cssStyles:g}=e;if("handDrawn"===e.look){let t=d.A.svg(n),l=(0,r.Fr)(e,{}),i=tB(0,0,h),s=t.path(i,l);a=n.insert(()=>s,":first-child").attr("transform",`translate(${-h/2+.5}, ${h/2})`),g&&a.attr("style",g)}else(a=W(n,h,h,o)).attr("transform",`translate(${-h/2+.5}, ${h/2})`);return i&&a.attr("style",i),y(e,a),e.calcIntersect=function(t,e){let a=t.width,l=X.polygon(t,[{x:a/2,y:0},{x:a,y:-a/2},{x:a/2,y:-a},{x:0,y:-a/2}],e);return{x:l.x-.5,y:l.y-.5}},e.intersect=function(t){return this.calcIntersect(e,t)},n}async function tL(t,e){let{labelStyles:a,nodeStyles:l}=(0,r.GX)(e);e.labelStyle=a;let{shapeSvg:i,bbox:n,label:s}=await c(t,e,f(e)),h=Math.max(n.width+(e.padding??0),e?.width??0),o=Math.max(n.height+(e.padding??0),e?.height??0),g=-h/2,u=-o/2,m=u/2,x=[{x:g+m,y:u},{x:g,y:0},{x:g+m,y:-u},{x:-g,y:-u},{x:-g,y:u}],{cssStyles:w}=e,b=d.A.svg(i),$=(0,r.Fr)(e,{});"handDrawn"!==e.look&&($.roughness=0,$.fillStyle="solid");let k=p(x),M=b.path(k,$),S=i.insert(()=>M,":first-child");return S.attr("class","basic label-container"),w&&"handDrawn"!==e.look&&S.selectAll("path").attr("style",w),l&&"handDrawn"!==e.look&&S.selectAll("path").attr("style",l),S.attr("transform",`translate(${-m/2},0)`),s.attr("transform",`translate(${-m/2-n.width/2-(n.x-(n.left??0))}, ${-(n.height/2)-(n.y-(n.top??0))})`),y(e,S),e.intersect=function(t){return X.polygon(e,x,t)},i}async function tR(t,e){let a,l,i,{labelStyles:n,nodeStyles:c}=(0,r.GX)(e);e.labelStyle=n,a=e.cssClasses?"node "+e.cssClasses:"node default";let g=t.insert("g").attr("class",a).attr("id",e.domId||e.id),f=g.insert("g"),p=g.insert("g").attr("class","label").attr("style",c),u=e.description,m=e.label,x=p.node().appendChild(await $(m,e.labelStyle,!0,!0)),w={width:0,height:0};if((0,s._3)((0,s.D7)()?.flowchart?.htmlLabels)){let t=x.children[0],e=(0,o.Ltv)(x);w=t.getBoundingClientRect(),e.attr("width",w.width),e.attr("height",w.height)}h.Rm.info("Text 2",u);let b=u||[],M=x.getBBox(),S=p.node().appendChild(await $(b.join?b.join("<br/>"):b,e.labelStyle,!0,!0)),D=S.children[0],A=(0,o.Ltv)(S);w=D.getBoundingClientRect(),A.attr("width",w.width),A.attr("height",w.height);let v=(e.padding||0)/2;(0,o.Ltv)(S).attr("transform","translate( "+(w.width>M.width?0:(M.width-w.width)/2)+", "+(M.height+v+5)+")"),(0,o.Ltv)(x).attr("transform","translate( "+(w.width<M.width?0:-(M.width-w.width)/2)+", 0)"),w=p.node().getBBox(),p.attr("transform","translate("+-w.width/2+", "+(-w.height/2-v+3)+")");let C=w.width+(e.padding||0),K=w.height+(e.padding||0),B=-w.width/2-v,N=-w.height/2-v;if("handDrawn"===e.look){let t=d.A.svg(g),a=(0,r.Fr)(e,{}),n=t.path(k(B,N,C,K,e.rx||0),a),s=t.line(-w.width/2-v,-w.height/2-v+M.height+v,w.width/2+v,-w.height/2-v+M.height+v,a);i=g.insert(()=>(h.Rm.debug("Rough node insert CXC",n),s),":first-child"),l=g.insert(()=>(h.Rm.debug("Rough node insert CXC",n),n),":first-child")}else l=f.insert("rect",":first-child"),i=f.insert("line"),l.attr("class","outer title-state").attr("style",c).attr("x",-w.width/2-v).attr("y",-w.height/2-v).attr("width",w.width+(e.padding||0)).attr("height",w.height+(e.padding||0)),i.attr("class","divider").attr("x1",-w.width/2-v).attr("x2",w.width/2+v).attr("y1",-w.height/2-v+M.height+v).attr("y2",-w.height/2-v+M.height+v);return y(e,l),e.intersect=function(t){return X.rect(e,t)},g}function tF(t,e,a,l,r,i,n){let s=Math.atan2(l-e,a-t),h=Math.sqrt(((a-t)/2/r)**2+((l-e)/2/i)**2);if(h>1)throw Error("The given radii are too small to create an arc between the points.");let o=Math.sqrt(1-h**2),d=(t+a)/2+o*i*Math.sin(s)*(n?-1:1),c=(e+l)/2-o*r*Math.cos(s)*(n?-1:1),g=Math.atan2((e-c)/i,(t-d)/r),y=Math.atan2((l-c)/i,(a-d)/r)-g;n&&y<0&&(y+=2*Math.PI),!n&&y>0&&(y-=2*Math.PI);let f=[];for(let t=0;t<20;t++){let e=g+t/19*y,a=d+r*Math.cos(e),l=c+i*Math.sin(e);f.push({x:a,y:l})}return f}async function tP(t,e){let{labelStyles:a,nodeStyles:l}=(0,r.GX)(e);e.labelStyle=a;let{shapeSvg:i,bbox:n}=await c(t,e,f(e)),s=e?.padding??0,h=e?.padding??0,o=(e?.width?e?.width:n.width)+2*s,g=(e?.height?e?.height:n.height)+2*h,u=e.radius||5,m=e.taper||5,{cssStyles:x}=e,w=d.A.svg(i),b=(0,r.Fr)(e,{});e.stroke&&(b.stroke=e.stroke),"handDrawn"!==e.look&&(b.roughness=0,b.fillStyle="solid");let $=[{x:-o/2+m,y:-g/2},{x:o/2-m,y:-g/2},...tF(o/2-m,-g/2,o/2,-g/2+m,u,u,!0),{x:o/2,y:-g/2+m},{x:o/2,y:g/2-m},...tF(o/2,g/2-m,o/2-m,g/2,u,u,!0),{x:o/2-m,y:g/2},{x:-o/2+m,y:g/2},...tF(-o/2+m,g/2,-o/2,g/2-m,u,u,!0),{x:-o/2,y:g/2-m},{x:-o/2,y:-g/2+m},...tF(-o/2,-g/2+m,-o/2+m,-g/2,u,u,!0)],k=p($),M=w.path(k,b),S=i.insert(()=>M,":first-child");return S.attr("class","basic label-container outer-path"),x&&"handDrawn"!==e.look&&S.selectChildren("path").attr("style",x),l&&"handDrawn"!==e.look&&S.selectChildren("path").attr("style",l),y(e,S),e.intersect=function(t){return X.polygon(e,$,t)},i}async function tX(t,e){let{labelStyles:a,nodeStyles:l}=(0,r.GX)(e);e.labelStyle=a;let{shapeSvg:i,bbox:s,label:h}=await c(t,e,f(e)),o=e?.padding??0,g=Math.max(s.width+(e.padding??0)*2,e?.width??0),p=Math.max(s.height+(e.padding??0)*2,e?.height??0),u=-s.width/2-o,m=-s.height/2-o,{cssStyles:x}=e,w=d.A.svg(i),b=(0,r.Fr)(e,{});"handDrawn"!==e.look&&(b.roughness=0,b.fillStyle="solid");let $=w.polygon([{x:u,y:m},{x:u+g+8,y:m},{x:u+g+8,y:m+p},{x:u-8,y:m+p},{x:u-8,y:m},{x:u,y:m},{x:u,y:m+p}].map(t=>[t.x,t.y]),b),k=i.insert(()=>$,":first-child");return k.attr("class","basic label-container").attr("style",(0,n.KL)(x)),l&&"handDrawn"!==e.look&&k.selectAll("path").attr("style",l),x&&"handDrawn"!==e.look&&k.selectAll("path").attr("style",l),h.attr("transform",`translate(${-g/2+4+(e.padding??0)-(s.x-(s.left??0))},${-p/2+(e.padding??0)-(s.y-(s.top??0))})`),y(e,k),e.intersect=function(t){return X.rect(e,t)},i}async function tG(t,e){let{labelStyles:a,nodeStyles:l}=(0,r.GX)(e);e.labelStyle=a;let{shapeSvg:i,bbox:n,label:s}=await c(t,e,f(e)),h=Math.max(n.width+(e.padding??0)*2,e?.width??0),o=Math.max(n.height+(e.padding??0)*2,e?.height??0),g=-h/2,u=-o/2,{cssStyles:m}=e,x=d.A.svg(i),w=(0,r.Fr)(e,{});"handDrawn"!==e.look&&(w.roughness=0,w.fillStyle="solid");let b=[{x:g,y:u},{x:g,y:u+o},{x:g+h,y:u+o},{x:g+h,y:u-o/2}],$=p(b),k=x.path($,w),M=i.insert(()=>k,":first-child");return M.attr("class","basic label-container"),m&&"handDrawn"!==e.look&&M.selectChildren("path").attr("style",m),l&&"handDrawn"!==e.look&&M.selectChildren("path").attr("style",l),M.attr("transform",`translate(0, ${o/4})`),s.attr("transform",`translate(${-h/2+(e.padding??0)-(n.x-(n.left??0))}, ${-o/4+(e.padding??0)-(n.y-(n.top??0))})`),y(e,M),e.intersect=function(t){return X.polygon(e,b,t)},i}async function tI(t,e){let a={rx:0,ry:0,classes:"",labelPaddingX:e.labelPaddingX??2*(e?.padding||0),labelPaddingY:+(e?.padding||0)};return tm(t,e,a)}async function tT(t,e){let{labelStyles:a,nodeStyles:l}=(0,r.GX)(e);e.labelStyle=a;let{shapeSvg:i,bbox:n}=await c(t,e,f(e)),s=n.height+e.padding,h=n.width+s/4+e.padding,o=s/2,{cssStyles:g}=e,u=d.A.svg(i),x=(0,r.Fr)(e,{});"handDrawn"!==e.look&&(x.roughness=0,x.fillStyle="solid");let w=[{x:-h/2+o,y:-s/2},{x:h/2-o,y:-s/2},...m(-h/2+o,0,o,50,90,270),{x:h/2-o,y:s/2},...m(h/2-o,0,o,50,270,450)],b=p(w),$=u.path(b,x),k=i.insert(()=>$,":first-child");return k.attr("class","basic label-container outer-path"),g&&"handDrawn"!==e.look&&k.selectChildren("path").attr("style",g),l&&"handDrawn"!==e.look&&k.selectChildren("path").attr("style",l),y(e,k),e.intersect=function(t){return X.polygon(e,w,t)},i}async function tW(t,e){return tm(t,e,{rx:5,ry:5,classes:"flowchart-node"})}function t_(t,e,{config:{themeVariables:a}}){let{labelStyles:l,nodeStyles:i}=(0,r.GX)(e);e.labelStyle=l;let{cssStyles:n}=e,{lineColor:s,stateBorder:h,nodeBorder:o}=a,c=t.insert("g").attr("class","node default").attr("id",e.domId||e.id),g=d.A.svg(c),f=(0,r.Fr)(e,{});"handDrawn"!==e.look&&(f.roughness=0,f.fillStyle="solid");let p=g.circle(0,0,14,{...f,stroke:s,strokeWidth:2}),u=h??o,m=g.circle(0,0,5,{...f,fill:u,stroke:u,strokeWidth:2,fillStyle:"solid"}),x=c.insert(()=>p,":first-child");return x.insert(()=>m),n&&x.selectAll("path").attr("style",n),i&&x.selectAll("path").attr("style",i),y(e,x),e.intersect=function(t){return X.circle(e,7,t)},c}function tE(t,e,{config:{themeVariables:a}}){let l,{lineColor:i}=a,n=t.insert("g").attr("class","node default").attr("id",e.domId||e.id);if("handDrawn"===e.look){let t=d.A.svg(n).circle(0,0,14,(0,r.ue)(i));(l=n.insert(()=>t)).attr("class","state-start").attr("r",7).attr("width",14).attr("height",14)}else(l=n.insert("circle",":first-child")).attr("class","state-start").attr("r",7).attr("width",14).attr("height",14);return y(e,l),e.intersect=function(t){return X.circle(e,7,t)},n}async function tH(t,e){let{labelStyles:a,nodeStyles:l}=(0,r.GX)(e);e.labelStyle=a;let{shapeSvg:i,bbox:s}=await c(t,e,f(e)),h=(e?.padding||0)/2,o=s.width+e.padding,g=s.height+e.padding,p=-s.width/2-h,u=-s.height/2-h,m=[{x:0,y:0},{x:o,y:0},{x:o,y:-g},{x:0,y:-g},{x:0,y:0},{x:-8,y:0},{x:o+8,y:0},{x:o+8,y:-g},{x:-8,y:-g},{x:-8,y:0}];if("handDrawn"===e.look){let t=d.A.svg(i),a=(0,r.Fr)(e,{}),l=t.rectangle(p-8,u,o+16,g,a),s=t.line(p,u,p,u+g,a),h=t.line(p+o,u,p+o,u+g,a);i.insert(()=>s,":first-child"),i.insert(()=>h,":first-child");let c=i.insert(()=>l,":first-child"),{cssStyles:f}=e;c.attr("class","basic label-container").attr("style",(0,n.KL)(f)),y(e,c)}else{let t=W(i,o,g,m);l&&t.attr("style",l),y(e,t)}return e.intersect=function(t){return X.polygon(e,m,t)},i}async function tj(t,e){let{labelStyles:a,nodeStyles:l}=(0,r.GX)(e);e.labelStyle=a;let{shapeSvg:i,bbox:n}=await c(t,e,f(e)),s=Math.max(n.width+(e.padding??0)*2,e?.width??0),h=Math.max(n.height+(e.padding??0)*2,e?.height??0),o=-s/2,g=-h/2,u=.2*h,{cssStyles:m}=e,x=d.A.svg(i),w=(0,r.Fr)(e,{}),b=[{x:o-u/2,y:g},{x:o+s+u/2,y:g},{x:o+s+u/2,y:g+h},{x:o-u/2,y:g+h}];"handDrawn"!==e.look&&(w.roughness=0,w.fillStyle="solid");let $=p(b),k=x.path($,w),M=p([{x:o+s-u/2,y:g+h},{x:o+s+u/2,y:g+h},{x:o+s+u/2,y:g+h-.2*h}]),S=x.path(M,{...w,fillStyle:"solid"}),D=i.insert(()=>S,":first-child");return D.insert(()=>k,":first-child"),D.attr("class","basic label-container"),m&&"handDrawn"!==e.look&&D.selectAll("path").attr("style",m),l&&"handDrawn"!==e.look&&D.selectAll("path").attr("style",l),y(e,D),e.intersect=function(t){return X.polygon(e,b,t)},i}async function tq(t,e){let{labelStyles:a,nodeStyles:l}=(0,r.GX)(e);e.labelStyle=a;let{shapeSvg:i,bbox:n,label:s}=await c(t,e,f(e)),h=Math.max(n.width+(e.padding??0)*2,e?.width??0),o=Math.max(n.height+(e.padding??0)*2,e?.height??0),g=o/4,m=.2*h,x=.2*o,w=o+g,{cssStyles:b}=e,$=d.A.svg(i),k=(0,r.Fr)(e,{});"handDrawn"!==e.look&&(k.roughness=0,k.fillStyle="solid");let M=[{x:-h/2-h/2*.1,y:w/2},...u(-h/2-h/2*.1,w/2,h/2+h/2*.1,w/2,g,.8),{x:h/2+h/2*.1,y:-w/2},{x:-h/2-h/2*.1,y:-w/2}],S=-h/2+h/2*.1,D=-w/2-.4*x,A=[{x:S+h-m,y:(D+o)*1.4},{x:S+h,y:D+o-x},{x:S+h,y:(D+o)*.9},...u(S+h,(D+o)*1.3,S+h-m,(D+o)*1.5,-(.03*o),.5)],v=p(M),C=$.path(v,k),K=p(A),B=$.path(K,{...k,fillStyle:"solid"}),N=i.insert(()=>B,":first-child");return N.insert(()=>C,":first-child"),N.attr("class","basic label-container"),b&&"handDrawn"!==e.look&&N.selectAll("path").attr("style",b),l&&"handDrawn"!==e.look&&N.selectAll("path").attr("style",l),N.attr("transform",`translate(0,${-g/2})`),s.attr("transform",`translate(${-h/2+(e.padding??0)-(n.x-(n.left??0))},${-o/2+(e.padding??0)-g/2-(n.y-(n.top??0))})`),y(e,N),e.intersect=function(t){return X.polygon(e,M,t)},i}async function tz(t,e){let{labelStyles:a,nodeStyles:l}=(0,r.GX)(e);e.labelStyle=a;let{shapeSvg:i,bbox:n}=await c(t,e,f(e)),s=Math.max(n.width+e.padding,e?.width||0),h=Math.max(n.height+e.padding,e?.height||0),o=i.insert("rect",":first-child");return o.attr("class","text").attr("style",l).attr("rx",0).attr("ry",0).attr("x",-s/2).attr("y",-h/2).attr("width",s).attr("height",h),y(e,o),e.intersect=function(t){return X.rect(e,t)},i}(0,h.K2)(tN,"question"),(0,h.K2)(tL,"rect_left_inv_arrow"),(0,h.K2)(tR,"rectWithTitle"),(0,h.K2)(tF,"generateArcPoints"),(0,h.K2)(tP,"roundedRect"),(0,h.K2)(tX,"shadedProcess"),(0,h.K2)(tG,"slopedRect"),(0,h.K2)(tI,"squareRect"),(0,h.K2)(tT,"stadium"),(0,h.K2)(tW,"state"),(0,h.K2)(t_,"stateEnd"),(0,h.K2)(tE,"stateStart"),(0,h.K2)(tH,"subroutine"),(0,h.K2)(tj,"taggedRect"),(0,h.K2)(tq,"taggedWaveEdgedRectangle"),(0,h.K2)(tz,"text");var tZ=(0,h.K2)((t,e,a,l,r,i)=>`M${t},${e}
3
3
  a${r},${i} 0,0,1 0,${-l}
4
4
  l${a},0
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[53779],{53779:(t,e,a)=>{a.d(e,{diagram:()=>K});var i,r=a(63677);a(61052),a(37317),a(30944),a(17297),a(74303),a(85963),a(95952),a(3334),a(71409);var d=a(98671),n=a(3386),s=a(36416),o=a(16222),g=a(15309),l=a(43111),p=(0,s.K2)(t=>t.append("circle").attr("class","start-state").attr("r",(0,n.D7)().state.sizeUnit).attr("cx",(0,n.D7)().state.padding+(0,n.D7)().state.sizeUnit).attr("cy",(0,n.D7)().state.padding+(0,n.D7)().state.sizeUnit),"drawStartState"),h=(0,s.K2)(t=>t.append("line").style("stroke","grey").style("stroke-dasharray","3").attr("x1",(0,n.D7)().state.textHeight).attr("class","divider").attr("x2",2*(0,n.D7)().state.textHeight).attr("y1",0).attr("y2",0),"drawDivider"),c=(0,s.K2)((t,e)=>{let a=t.append("text").attr("x",2*(0,n.D7)().state.padding).attr("y",(0,n.D7)().state.textHeight+2*(0,n.D7)().state.padding).attr("font-size",(0,n.D7)().state.fontSize).attr("class","state-title").text(e.id),i=a.node().getBBox();return t.insert("rect",":first-child").attr("x",(0,n.D7)().state.padding).attr("y",(0,n.D7)().state.padding).attr("width",i.width+2*(0,n.D7)().state.padding).attr("height",i.height+2*(0,n.D7)().state.padding).attr("rx",(0,n.D7)().state.radius),a},"drawSimpleState"),x=(0,s.K2)((t,e)=>{let a=(0,s.K2)(function(t,e,a){let i=t.append("tspan").attr("x",2*(0,n.D7)().state.padding).text(e);a||i.attr("dy",(0,n.D7)().state.textHeight)},"addTspan"),i=t.append("text").attr("x",2*(0,n.D7)().state.padding).attr("y",(0,n.D7)().state.textHeight+1.3*(0,n.D7)().state.padding).attr("font-size",(0,n.D7)().state.fontSize).attr("class","state-title").text(e.descriptions[0]).node().getBBox(),r=i.height,d=t.append("text").attr("x",(0,n.D7)().state.padding).attr("y",r+.4*(0,n.D7)().state.padding+(0,n.D7)().state.dividerMargin+(0,n.D7)().state.textHeight).attr("class","state-description"),o=!0,g=!0;e.descriptions.forEach(function(t){o||(a(d,t,g),g=!1),o=!1});let l=t.append("line").attr("x1",(0,n.D7)().state.padding).attr("y1",(0,n.D7)().state.padding+r+(0,n.D7)().state.dividerMargin/2).attr("y2",(0,n.D7)().state.padding+r+(0,n.D7)().state.dividerMargin/2).attr("class","descr-divider"),p=d.node().getBBox(),h=Math.max(p.width,i.width);return l.attr("x2",h+3*(0,n.D7)().state.padding),t.insert("rect",":first-child").attr("x",(0,n.D7)().state.padding).attr("y",(0,n.D7)().state.padding).attr("width",h+2*(0,n.D7)().state.padding).attr("height",p.height+r+2*(0,n.D7)().state.padding).attr("rx",(0,n.D7)().state.radius),t},"drawDescrState"),D=(0,s.K2)((t,e,a)=>{let i,r=(0,n.D7)().state.padding,d=2*(0,n.D7)().state.padding,s=t.node().getBBox(),o=s.width,g=s.x,l=t.append("text").attr("x",0).attr("y",(0,n.D7)().state.titleShift).attr("font-size",(0,n.D7)().state.fontSize).attr("class","state-title").text(e.id),p=l.node().getBBox().width+d,h=Math.max(p,o);h===o&&(h+=d);let c=t.node().getBBox();e.doc,i=g-r,p>o&&(i=(o-h)/2+r),Math.abs(g-c.x)<r&&p>o&&(i=g-(p-o)/2);let x=1-(0,n.D7)().state.textHeight;return t.insert("rect",":first-child").attr("x",i).attr("y",x).attr("class",a?"alt-composit":"composit").attr("width",h).attr("height",c.height+(0,n.D7)().state.textHeight+(0,n.D7)().state.titleShift+1).attr("rx","0"),l.attr("x",i+r),p<=o&&l.attr("x",g+(h-d)/2-p/2+r),t.insert("rect",":first-child").attr("x",i).attr("y",(0,n.D7)().state.titleShift-(0,n.D7)().state.textHeight-(0,n.D7)().state.padding).attr("width",h).attr("height",3*(0,n.D7)().state.textHeight).attr("rx",(0,n.D7)().state.radius),t.insert("rect",":first-child").attr("x",i).attr("y",(0,n.D7)().state.titleShift-(0,n.D7)().state.textHeight-(0,n.D7)().state.padding).attr("width",h).attr("height",c.height+3+2*(0,n.D7)().state.textHeight).attr("rx",(0,n.D7)().state.radius),t},"addTitleAndBox"),u=(0,s.K2)(t=>(t.append("circle").attr("class","end-state-outer").attr("r",(0,n.D7)().state.sizeUnit+(0,n.D7)().state.miniPadding).attr("cx",(0,n.D7)().state.padding+(0,n.D7)().state.sizeUnit+(0,n.D7)().state.miniPadding).attr("cy",(0,n.D7)().state.padding+(0,n.D7)().state.sizeUnit+(0,n.D7)().state.miniPadding),t.append("circle").attr("class","end-state-inner").attr("r",(0,n.D7)().state.sizeUnit).attr("cx",(0,n.D7)().state.padding+(0,n.D7)().state.sizeUnit+2).attr("cy",(0,n.D7)().state.padding+(0,n.D7)().state.sizeUnit+2)),"drawEndState"),f=(0,s.K2)((t,e)=>{let a=(0,n.D7)().state.forkWidth,i=(0,n.D7)().state.forkHeight;if(e.parentId){let t=a;a=i,i=t}return t.append("rect").style("stroke","black").style("fill","black").attr("width",a).attr("height",i).attr("x",(0,n.D7)().state.padding).attr("y",(0,n.D7)().state.padding)},"drawForkJoinState"),y=(0,s.K2)((t,e,a,i)=>{let r=0,d=i.append("text");d.style("text-anchor","start"),d.attr("class","noteText");let s=t.replace(/\r\n/g,"<br/>"),o=(s=s.replace(/\n/g,"<br/>")).split(n.Y2.lineBreakRegex),g=1.25*(0,n.D7)().state.noteMargin;for(let t of o){let i=t.trim();if(i.length>0){let t=d.append("tspan");t.text(i),0===g&&(g+=t.node().getBBox().height),r+=g,t.attr("x",e+(0,n.D7)().state.noteMargin),t.attr("y",a+r+1.25*(0,n.D7)().state.noteMargin)}}return{textWidth:d.node().getBBox().width,textHeight:r}},"_drawLongText"),w=(0,s.K2)((t,e)=>{e.attr("class","state-note");let a=e.append("rect").attr("x",0).attr("y",(0,n.D7)().state.padding),{textWidth:i,textHeight:r}=y(t,0,0,e.append("g"));return a.attr("height",r+2*(0,n.D7)().state.noteMargin),a.attr("width",i+2*(0,n.D7)().state.noteMargin),a},"drawNote"),m=(0,s.K2)(function(t,e){let a=e.id,i={id:a,label:e.id,width:0,height:0},r=t.append("g").attr("id",a).attr("class","stateGroup");"start"===e.type&&p(r),"end"===e.type&&u(r),("fork"===e.type||"join"===e.type)&&f(r,e),"note"===e.type&&w(e.note.text,r),"divider"===e.type&&h(r),"default"===e.type&&0===e.descriptions.length&&c(r,e),"default"===e.type&&e.descriptions.length>0&&x(r,e);let d=r.node().getBBox();return i.width=d.width+2*(0,n.D7)().state.padding,i.height=d.height+2*(0,n.D7)().state.padding,i},"drawState"),b=0,B=(0,s.K2)(function(t,e,a){let i=(0,s.K2)(function(t){switch(t){case r.u4.relationType.AGGREGATION:return"aggregation";case r.u4.relationType.EXTENSION:return"extension";case r.u4.relationType.COMPOSITION:return"composition";case r.u4.relationType.DEPENDENCY:return"dependency"}},"getRelationType");e.points=e.points.filter(t=>!Number.isNaN(t.y));let g=e.points,l=(0,o.n8j)().x(function(t){return t.x}).y(function(t){return t.y}).curve(o.qrM),p=t.append("path").attr("d",l(g)).attr("id","edge"+b).attr("class","transition"),h="";if((0,n.D7)().state.arrowMarkerAbsolute&&(h=(0,n.ID)(!0)),p.attr("marker-end","url("+h+"#"+i(r.u4.relationType.DEPENDENCY)+"End)"),void 0!==a.title){let i=t.append("g").attr("class","stateLabel"),{x:r,y:o}=d._K.calcLabelPosition(e.points),g=n.Y2.getRows(a.title),l=0,p=[],h=0,c=0;for(let t=0;t<=g.length;t++){let e=i.append("text").attr("text-anchor","middle").text(g[t]).attr("x",r).attr("y",o+l),a=e.node().getBBox();h=Math.max(h,a.width),c=Math.min(c,a.x),s.Rm.info(a.x,r,o+l),0===l&&(l=e.node().getBBox().height,s.Rm.info("Title height",l,o)),p.push(e)}let x=l*g.length;if(g.length>1){let t=(g.length-1)*l*.5;p.forEach((e,a)=>e.attr("y",o+a*l-t)),x=l*g.length}let D=i.node().getBBox();i.insert("rect",":first-child").attr("class","box").attr("x",r-h/2-(0,n.D7)().state.padding/2).attr("y",o-x/2-(0,n.D7)().state.padding/2-3.5).attr("width",h+(0,n.D7)().state.padding).attr("height",x+(0,n.D7)().state.padding),s.Rm.info(D)}b++},"drawEdge"),k={},N=(0,s.K2)(function(){},"setConf"),E=(0,s.K2)(function(t){t.append("defs").append("marker").attr("id","dependencyEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 19,7 L9,13 L14,7 L9,1 Z")},"insertMarkers"),S=(0,s.K2)(function(t,e,a,r){let d;i=(0,n.D7)().state;let g=(0,n.D7)().securityLevel;"sandbox"===g&&(d=(0,o.Ltv)("#i"+e));let l="sandbox"===g?(0,o.Ltv)(d.nodes()[0].contentDocument.body):(0,o.Ltv)("body"),p="sandbox"===g?d.nodes()[0].contentDocument:document;s.Rm.debug("Rendering diagram "+t);let h=l.select(`[id='${e}']`);E(h),v(r.db.getRootDoc(),h,void 0,!1,l,p,r);let c=i.padding,x=h.node().getBBox(),D=x.width+2*c,u=x.height+2*c;(0,n.a$)(h,u,1.75*D,i.useMaxWidth),h.attr("viewBox",`${x.x-i.padding} ${x.y-i.padding} `+D+" "+u)},"draw"),M=(0,s.K2)(t=>t?t.length*i.fontSizeFactor:1,"getLabelWidth"),v=(0,s.K2)((t,e,a,r,d,o,p)=>{let h,c=new l.T({compound:!0,multigraph:!0}),x=!0;for(h=0;h<t.length;h++)if("relation"===t[h].stmt){x=!1;break}a?c.setGraph({rankdir:"LR",multigraph:!0,compound:!0,ranker:"tight-tree",ranksep:x?1:i.edgeLengthFactor,nodeSep:x?1:50,isMultiGraph:!0}):c.setGraph({rankdir:"TB",multigraph:!0,compound:!0,ranksep:x?1:i.edgeLengthFactor,nodeSep:x?1:50,ranker:"tight-tree",isMultiGraph:!0}),c.setDefaultEdgeLabel(function(){return{}});let u=p.db.getStates(),f=p.db.getRelations();for(let t of Object.keys(u)){let n,s=u[t];if(a&&(s.parentId=a),s.doc){let t=e.append("g").attr("id",s.id).attr("class","stateGroup");n=v(s.doc,t,s.id,!r,d,o,p);{let e=(t=D(t,s,r)).node().getBBox();n.width=e.width,n.height=e.height+i.padding/2,k[s.id]={y:i.compositTitleSize}}}else n=m(e,s,c);if(s.note){let t=m(e,{descriptions:[],id:s.id+"-note",note:s.note,type:"note"},c);"left of"===s.note.position?(c.setNode(n.id+"-note",t),c.setNode(n.id,n)):(c.setNode(n.id,n),c.setNode(n.id+"-note",t)),c.setParent(n.id,n.id+"-group"),c.setParent(n.id+"-note",n.id+"-group")}else c.setNode(n.id,n)}s.Rm.debug("Count=",c.nodeCount(),c);let y=0;f.forEach(function(t){y++,s.Rm.debug("Setting edge",t),c.setEdge(t.id1,t.id2,{relation:t,width:M(t.title),height:i.labelHeight*n.Y2.getRows(t.title).length,labelpos:"c"},"id"+y)}),(0,g.Zp)(c),s.Rm.debug("Graph after layout",c.nodes());let w=e.node();c.nodes().forEach(function(t){void 0!==t&&void 0!==c.node(t)?(s.Rm.warn("Node "+t+": "+JSON.stringify(c.node(t))),d.select("#"+w.id+" #"+t).attr("transform","translate("+(c.node(t).x-c.node(t).width/2)+","+(c.node(t).y+(k[t]?k[t].y:0)-c.node(t).height/2)+" )"),d.select("#"+w.id+" #"+t).attr("data-x-shift",c.node(t).x-c.node(t).width/2),o.querySelectorAll("#"+w.id+" #"+t+" .divider").forEach(t=>{let e=t.parentElement,a=0,i=0;e&&(e.parentElement&&(a=e.parentElement.getBBox().width),Number.isNaN(i=parseInt(e.getAttribute("data-x-shift"),10))&&(i=0)),t.setAttribute("x1",0-i+8),t.setAttribute("x2",a-i-8)})):s.Rm.debug("No Node "+t+": "+JSON.stringify(c.node(t)))});let b=w.getBBox();c.edges().forEach(function(t){void 0!==t&&void 0!==c.edge(t)&&(s.Rm.debug("Edge "+t.v+" -> "+t.w+": "+JSON.stringify(c.edge(t))),B(e,c.edge(t),c.edge(t).relation))});let N={id:a||"root",label:a||"root",width:0,height:0};return N.width=(b=w.getBBox()).width+2*i.padding,N.height=b.height+2*i.padding,s.Rm.debug("Doc rendered",N,c),N},"renderDoc"),K={parser:r.Zk,get db(){return new r.u4(1)},renderer:{setConf:N,draw:S},styles:r.tM,init:(0,s.K2)(t=>{t.state||(t.state={}),t.state.arrowMarkerAbsolute=t.arrowMarkerAbsolute},"init")}}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[54855],{54855:(e,r,t)=>{t.d(r,{diagram:()=>u});var a=t(63677);t(61052),t(37317),t(30944),t(17297),t(74303),t(85963),t(95952),t(3334),t(71409),t(98671),t(3386);var s=t(36416),u={parser:a.Zk,get db(){return new a.u4(2)},renderer:a.q7,styles:a.tM,init:(0,s.K2)(e=>{e.state||(e.state={}),e.state.arrowMarkerAbsolute=e.arrowMarkerAbsolute},"init")}}}]);