pi-app 0.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (484) hide show
  1. package/.next/BUILD_ID +1 -0
  2. package/.next/app-path-routes-manifest.json +55 -0
  3. package/.next/build-manifest.json +20 -0
  4. package/.next/diagnostics/build-diagnostics.json +6 -0
  5. package/.next/diagnostics/framework.json +1 -0
  6. package/.next/export-marker.json +6 -0
  7. package/.next/images-manifest.json +68 -0
  8. package/.next/next-minimal-server.js.nft.json +1 -0
  9. package/.next/next-server.js.nft.json +1 -0
  10. package/.next/package.json +1 -0
  11. package/.next/prerender-manifest.json +114 -0
  12. package/.next/react-loadable-manifest.json +2271 -0
  13. package/.next/required-server-files.js +347 -0
  14. package/.next/required-server-files.json +347 -0
  15. package/.next/routes-manifest.json +394 -0
  16. package/.next/server/app/_global-error/page.js +32 -0
  17. package/.next/server/app/_global-error/page.js.nft.json +1 -0
  18. package/.next/server/app/_global-error/page_client-reference-manifest.js +1 -0
  19. package/.next/server/app/_global-error.html +1 -0
  20. package/.next/server/app/_global-error.meta +16 -0
  21. package/.next/server/app/_global-error.rsc +14 -0
  22. package/.next/server/app/_global-error.segments/_full.segment.rsc +14 -0
  23. package/.next/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +5 -0
  24. package/.next/server/app/_global-error.segments/_global-error.segment.rsc +5 -0
  25. package/.next/server/app/_global-error.segments/_head.segment.rsc +5 -0
  26. package/.next/server/app/_global-error.segments/_index.segment.rsc +5 -0
  27. package/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -0
  28. package/.next/server/app/_not-found/page.js +2 -0
  29. package/.next/server/app/_not-found/page.js.nft.json +1 -0
  30. package/.next/server/app/_not-found/page_client-reference-manifest.js +1 -0
  31. package/.next/server/app/_not-found.html +1 -0
  32. package/.next/server/app/_not-found.meta +16 -0
  33. package/.next/server/app/_not-found.rsc +19 -0
  34. package/.next/server/app/_not-found.segments/_full.segment.rsc +19 -0
  35. package/.next/server/app/_not-found.segments/_head.segment.rsc +6 -0
  36. package/.next/server/app/_not-found.segments/_index.segment.rsc +6 -0
  37. package/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +5 -0
  38. package/.next/server/app/_not-found.segments/_not-found.segment.rsc +5 -0
  39. package/.next/server/app/_not-found.segments/_tree.segment.rsc +4 -0
  40. package/.next/server/app/api/agent/[id]/events/route.js +3 -0
  41. package/.next/server/app/api/agent/[id]/events/route.js.nft.json +1 -0
  42. package/.next/server/app/api/agent/[id]/events/route_client-reference-manifest.js +1 -0
  43. package/.next/server/app/api/agent/[id]/export.html/route.js +1 -0
  44. package/.next/server/app/api/agent/[id]/export.html/route.js.nft.json +1 -0
  45. package/.next/server/app/api/agent/[id]/export.html/route_client-reference-manifest.js +1 -0
  46. package/.next/server/app/api/agent/[id]/route.js +1 -0
  47. package/.next/server/app/api/agent/[id]/route.js.nft.json +1 -0
  48. package/.next/server/app/api/agent/[id]/route_client-reference-manifest.js +1 -0
  49. package/.next/server/app/api/agent/new/route.js +1 -0
  50. package/.next/server/app/api/agent/new/route.js.nft.json +1 -0
  51. package/.next/server/app/api/agent/new/route_client-reference-manifest.js +1 -0
  52. package/.next/server/app/api/auth/all-providers/route.js +1 -0
  53. package/.next/server/app/api/auth/all-providers/route.js.nft.json +1 -0
  54. package/.next/server/app/api/auth/all-providers/route_client-reference-manifest.js +1 -0
  55. package/.next/server/app/api/auth/api-key/[provider]/route.js +1 -0
  56. package/.next/server/app/api/auth/api-key/[provider]/route.js.nft.json +1 -0
  57. package/.next/server/app/api/auth/api-key/[provider]/route_client-reference-manifest.js +1 -0
  58. package/.next/server/app/api/auth/login/[provider]/route.js +3 -0
  59. package/.next/server/app/api/auth/login/[provider]/route.js.nft.json +1 -0
  60. package/.next/server/app/api/auth/login/[provider]/route_client-reference-manifest.js +1 -0
  61. package/.next/server/app/api/auth/logout/[provider]/route.js +1 -0
  62. package/.next/server/app/api/auth/logout/[provider]/route.js.nft.json +1 -0
  63. package/.next/server/app/api/auth/logout/[provider]/route_client-reference-manifest.js +1 -0
  64. package/.next/server/app/api/auth/providers/route.js +1 -0
  65. package/.next/server/app/api/auth/providers/route.js.nft.json +1 -0
  66. package/.next/server/app/api/auth/providers/route_client-reference-manifest.js +1 -0
  67. package/.next/server/app/api/cwd/validate/route.js +1 -0
  68. package/.next/server/app/api/cwd/validate/route.js.nft.json +1 -0
  69. package/.next/server/app/api/cwd/validate/route_client-reference-manifest.js +1 -0
  70. package/.next/server/app/api/default-cwd/route.js +1 -0
  71. package/.next/server/app/api/default-cwd/route.js.nft.json +1 -0
  72. package/.next/server/app/api/default-cwd/route_client-reference-manifest.js +1 -0
  73. package/.next/server/app/api/extensions/route.js +2 -0
  74. package/.next/server/app/api/extensions/route.js.nft.json +1 -0
  75. package/.next/server/app/api/extensions/route_client-reference-manifest.js +1 -0
  76. package/.next/server/app/api/files/[...path]/route.js +50 -0
  77. package/.next/server/app/api/files/[...path]/route.js.nft.json +1 -0
  78. package/.next/server/app/api/files/[...path]/route_client-reference-manifest.js +1 -0
  79. package/.next/server/app/api/files/stage/route.js +1 -0
  80. package/.next/server/app/api/files/stage/route.js.nft.json +1 -0
  81. package/.next/server/app/api/files/stage/route_client-reference-manifest.js +1 -0
  82. package/.next/server/app/api/git-branch/route.js +1 -0
  83. package/.next/server/app/api/git-branch/route.js.nft.json +1 -0
  84. package/.next/server/app/api/git-branch/route_client-reference-manifest.js +1 -0
  85. package/.next/server/app/api/health/route.js +1 -0
  86. package/.next/server/app/api/health/route.js.nft.json +1 -0
  87. package/.next/server/app/api/health/route_client-reference-manifest.js +1 -0
  88. package/.next/server/app/api/history/[id]/route.js +2 -0
  89. package/.next/server/app/api/history/[id]/route.js.nft.json +1 -0
  90. package/.next/server/app/api/history/[id]/route_client-reference-manifest.js +1 -0
  91. package/.next/server/app/api/history/route.js +2 -0
  92. package/.next/server/app/api/history/route.js.nft.json +1 -0
  93. package/.next/server/app/api/history/route_client-reference-manifest.js +1 -0
  94. package/.next/server/app/api/home/route.js +1 -0
  95. package/.next/server/app/api/home/route.js.nft.json +1 -0
  96. package/.next/server/app/api/home/route_client-reference-manifest.js +1 -0
  97. package/.next/server/app/api/models/route.js +1 -0
  98. package/.next/server/app/api/models/route.js.nft.json +1 -0
  99. package/.next/server/app/api/models/route_client-reference-manifest.js +1 -0
  100. package/.next/server/app/api/models-config/route.js +1 -0
  101. package/.next/server/app/api/models-config/route.js.nft.json +1 -0
  102. package/.next/server/app/api/models-config/route_client-reference-manifest.js +1 -0
  103. package/.next/server/app/api/models-config/test/route.js +1 -0
  104. package/.next/server/app/api/models-config/test/route.js.nft.json +1 -0
  105. package/.next/server/app/api/models-config/test/route_client-reference-manifest.js +1 -0
  106. package/.next/server/app/api/notifications/agent-end/route.js +3 -0
  107. package/.next/server/app/api/notifications/agent-end/route.js.nft.json +1 -0
  108. package/.next/server/app/api/notifications/agent-end/route_client-reference-manifest.js +1 -0
  109. package/.next/server/app/api/preferences/route.js +2 -0
  110. package/.next/server/app/api/preferences/route.js.nft.json +1 -0
  111. package/.next/server/app/api/preferences/route_client-reference-manifest.js +1 -0
  112. package/.next/server/app/api/product-sessions/[id]/route.js +3 -0
  113. package/.next/server/app/api/product-sessions/[id]/route.js.nft.json +1 -0
  114. package/.next/server/app/api/product-sessions/[id]/route_client-reference-manifest.js +1 -0
  115. package/.next/server/app/api/push/route.js +2 -0
  116. package/.next/server/app/api/push/route.js.nft.json +1 -0
  117. package/.next/server/app/api/push/route_client-reference-manifest.js +1 -0
  118. package/.next/server/app/api/remote/audit/route.js +1 -0
  119. package/.next/server/app/api/remote/audit/route.js.nft.json +1 -0
  120. package/.next/server/app/api/remote/audit/route_client-reference-manifest.js +1 -0
  121. package/.next/server/app/api/remote/client/route.js +1 -0
  122. package/.next/server/app/api/remote/client/route.js.nft.json +1 -0
  123. package/.next/server/app/api/remote/client/route_client-reference-manifest.js +1 -0
  124. package/.next/server/app/api/remote/pair/route.js +1 -0
  125. package/.next/server/app/api/remote/pair/route.js.nft.json +1 -0
  126. package/.next/server/app/api/remote/pair/route_client-reference-manifest.js +1 -0
  127. package/.next/server/app/api/remote/route.js +1 -0
  128. package/.next/server/app/api/remote/route.js.nft.json +1 -0
  129. package/.next/server/app/api/remote/route_client-reference-manifest.js +1 -0
  130. package/.next/server/app/api/scene-overrides/[sceneId]/route.js +3 -0
  131. package/.next/server/app/api/scene-overrides/[sceneId]/route.js.nft.json +1 -0
  132. package/.next/server/app/api/scene-overrides/[sceneId]/route_client-reference-manifest.js +1 -0
  133. package/.next/server/app/api/scene-overrides/export/route.js +4 -0
  134. package/.next/server/app/api/scene-overrides/export/route.js.nft.json +1 -0
  135. package/.next/server/app/api/scene-overrides/export/route_client-reference-manifest.js +1 -0
  136. package/.next/server/app/api/scene-overrides/import/route.js +3 -0
  137. package/.next/server/app/api/scene-overrides/import/route.js.nft.json +1 -0
  138. package/.next/server/app/api/scene-overrides/import/route_client-reference-manifest.js +1 -0
  139. package/.next/server/app/api/scene-overrides/route.js +3 -0
  140. package/.next/server/app/api/scene-overrides/route.js.nft.json +1 -0
  141. package/.next/server/app/api/scene-overrides/route_client-reference-manifest.js +1 -0
  142. package/.next/server/app/api/sessions/[id]/context/route.js +2 -0
  143. package/.next/server/app/api/sessions/[id]/context/route.js.nft.json +1 -0
  144. package/.next/server/app/api/sessions/[id]/context/route_client-reference-manifest.js +1 -0
  145. package/.next/server/app/api/sessions/[id]/route.js +1 -0
  146. package/.next/server/app/api/sessions/[id]/route.js.nft.json +1 -0
  147. package/.next/server/app/api/sessions/[id]/route_client-reference-manifest.js +1 -0
  148. package/.next/server/app/api/sessions/[id]/share/route.js +1 -0
  149. package/.next/server/app/api/sessions/[id]/share/route.js.nft.json +1 -0
  150. package/.next/server/app/api/sessions/[id]/share/route_client-reference-manifest.js +1 -0
  151. package/.next/server/app/api/sessions/new/route.js +1 -0
  152. package/.next/server/app/api/sessions/new/route.js.nft.json +1 -0
  153. package/.next/server/app/api/sessions/new/route_client-reference-manifest.js +1 -0
  154. package/.next/server/app/api/sessions/route.js +2 -0
  155. package/.next/server/app/api/sessions/route.js.nft.json +1 -0
  156. package/.next/server/app/api/sessions/route_client-reference-manifest.js +1 -0
  157. package/.next/server/app/api/settings/default-model/route.js +1 -0
  158. package/.next/server/app/api/settings/default-model/route.js.nft.json +1 -0
  159. package/.next/server/app/api/settings/default-model/route_client-reference-manifest.js +1 -0
  160. package/.next/server/app/api/share/[token]/route.js +2 -0
  161. package/.next/server/app/api/share/[token]/route.js.nft.json +1 -0
  162. package/.next/server/app/api/share/[token]/route_client-reference-manifest.js +1 -0
  163. package/.next/server/app/api/skills/install/route.js +1 -0
  164. package/.next/server/app/api/skills/install/route.js.nft.json +1 -0
  165. package/.next/server/app/api/skills/install/route_client-reference-manifest.js +1 -0
  166. package/.next/server/app/api/skills/route.js +6 -0
  167. package/.next/server/app/api/skills/route.js.nft.json +1 -0
  168. package/.next/server/app/api/skills/route_client-reference-manifest.js +1 -0
  169. package/.next/server/app/api/skills/search/route.js +1 -0
  170. package/.next/server/app/api/skills/search/route.js.nft.json +1 -0
  171. package/.next/server/app/api/skills/search/route_client-reference-manifest.js +1 -0
  172. package/.next/server/app/api/usage/route.js +2 -0
  173. package/.next/server/app/api/usage/route.js.nft.json +1 -0
  174. package/.next/server/app/api/usage/route_client-reference-manifest.js +1 -0
  175. package/.next/server/app/api/web-fetch/install-agent-browser/route.js +3 -0
  176. package/.next/server/app/api/web-fetch/install-agent-browser/route.js.nft.json +1 -0
  177. package/.next/server/app/api/web-fetch/install-agent-browser/route_client-reference-manifest.js +1 -0
  178. package/.next/server/app/api/web-fetch/preferences/route.js +1 -0
  179. package/.next/server/app/api/web-fetch/preferences/route.js.nft.json +1 -0
  180. package/.next/server/app/api/web-fetch/preferences/route_client-reference-manifest.js +1 -0
  181. package/.next/server/app/api/web-fetch/status/route.js +1 -0
  182. package/.next/server/app/api/web-fetch/status/route.js.nft.json +1 -0
  183. package/.next/server/app/api/web-fetch/status/route_client-reference-manifest.js +1 -0
  184. package/.next/server/app/favicon.ico/route.js +1 -0
  185. package/.next/server/app/favicon.ico/route.js.nft.json +1 -0
  186. package/.next/server/app/favicon.ico.body +0 -0
  187. package/.next/server/app/favicon.ico.meta +1 -0
  188. package/.next/server/app/index.html +1 -0
  189. package/.next/server/app/index.meta +14 -0
  190. package/.next/server/app/index.rsc +18 -0
  191. package/.next/server/app/index.segments/__PAGE__.segment.rsc +6 -0
  192. package/.next/server/app/index.segments/_full.segment.rsc +18 -0
  193. package/.next/server/app/index.segments/_head.segment.rsc +6 -0
  194. package/.next/server/app/index.segments/_index.segment.rsc +6 -0
  195. package/.next/server/app/index.segments/_tree.segment.rsc +4 -0
  196. package/.next/server/app/page.js +5 -0
  197. package/.next/server/app/page.js.nft.json +1 -0
  198. package/.next/server/app/page_client-reference-manifest.js +1 -0
  199. package/.next/server/app/share/[token]/page.js +2 -0
  200. package/.next/server/app/share/[token]/page.js.nft.json +1 -0
  201. package/.next/server/app/share/[token]/page_client-reference-manifest.js +1 -0
  202. package/.next/server/app-paths-manifest.json +55 -0
  203. package/.next/server/chunks/1048.js +1 -0
  204. package/.next/server/chunks/1185.js +3 -0
  205. package/.next/server/chunks/1367.js +77 -0
  206. package/.next/server/chunks/1381.js +1 -0
  207. package/.next/server/chunks/165.js +1 -0
  208. package/.next/server/chunks/1681.js +215 -0
  209. package/.next/server/chunks/1703.js +79 -0
  210. package/.next/server/chunks/1712.js +43 -0
  211. package/.next/server/chunks/1813.js +1 -0
  212. package/.next/server/chunks/2325.js +80 -0
  213. package/.next/server/chunks/258.js +1 -0
  214. package/.next/server/chunks/2671.js +287 -0
  215. package/.next/server/chunks/2778.js +1 -0
  216. package/.next/server/chunks/2943.js +1 -0
  217. package/.next/server/chunks/3031.js +226 -0
  218. package/.next/server/chunks/3181.js +1 -0
  219. package/.next/server/chunks/319.js +45 -0
  220. package/.next/server/chunks/3379.js +1 -0
  221. package/.next/server/chunks/3451.js +1 -0
  222. package/.next/server/chunks/349.js +4 -0
  223. package/.next/server/chunks/3493.js +1 -0
  224. package/.next/server/chunks/3672.js +1 -0
  225. package/.next/server/chunks/3701.js +104 -0
  226. package/.next/server/chunks/4035.js +80 -0
  227. package/.next/server/chunks/4248.js +153 -0
  228. package/.next/server/chunks/4325.js +90 -0
  229. package/.next/server/chunks/4367.js +1 -0
  230. package/.next/server/chunks/4406.js +141 -0
  231. package/.next/server/chunks/459.js +2 -0
  232. package/.next/server/chunks/4741.js +18 -0
  233. package/.next/server/chunks/4858.js +148 -0
  234. package/.next/server/chunks/4880.js +1 -0
  235. package/.next/server/chunks/4980.js +1 -0
  236. package/.next/server/chunks/5155.js +5 -0
  237. package/.next/server/chunks/5293.js +166 -0
  238. package/.next/server/chunks/5409.js +1 -0
  239. package/.next/server/chunks/5797.js +93 -0
  240. package/.next/server/chunks/5851.js +36 -0
  241. package/.next/server/chunks/6206.js +1 -0
  242. package/.next/server/chunks/6296.js +1 -0
  243. package/.next/server/chunks/6346.js +1 -0
  244. package/.next/server/chunks/6406.js +23 -0
  245. package/.next/server/chunks/642.js +1 -0
  246. package/.next/server/chunks/6429.js +2 -0
  247. package/.next/server/chunks/6729.js +64 -0
  248. package/.next/server/chunks/6907.js +115 -0
  249. package/.next/server/chunks/6980.js +1 -0
  250. package/.next/server/chunks/7073.js +24 -0
  251. package/.next/server/chunks/7233.js +24 -0
  252. package/.next/server/chunks/7270.js +2 -0
  253. package/.next/server/chunks/7307.js +1 -0
  254. package/.next/server/chunks/7362.js +9 -0
  255. package/.next/server/chunks/7567.js +29 -0
  256. package/.next/server/chunks/8238.js +34 -0
  257. package/.next/server/chunks/8276.js +1 -0
  258. package/.next/server/chunks/8336.js +1 -0
  259. package/.next/server/chunks/8342.js +4 -0
  260. package/.next/server/chunks/8433.js +1 -0
  261. package/.next/server/chunks/8490.js +1 -0
  262. package/.next/server/chunks/8916.js +1 -0
  263. package/.next/server/chunks/9280.js +252 -0
  264. package/.next/server/chunks/9315.js +1 -0
  265. package/.next/server/chunks/966.js +1 -0
  266. package/.next/server/edge-instrumentation.js +2 -0
  267. package/.next/server/edge-runtime-webpack.js +2 -0
  268. package/.next/server/functions-config-manifest.json +8 -0
  269. package/.next/server/instrumentation.js +1 -0
  270. package/.next/server/instrumentation.js.nft.json +1 -0
  271. package/.next/server/interception-route-rewrite-manifest.js +1 -0
  272. package/.next/server/middleware-build-manifest.js +1 -0
  273. package/.next/server/middleware-manifest.json +34 -0
  274. package/.next/server/middleware-react-loadable-manifest.js +1 -0
  275. package/.next/server/middleware.js +10 -0
  276. package/.next/server/next-font-manifest.js +1 -0
  277. package/.next/server/next-font-manifest.json +1 -0
  278. package/.next/server/pages/404.html +1 -0
  279. package/.next/server/pages/500.html +1 -0
  280. package/.next/server/pages-manifest.json +4 -0
  281. package/.next/server/prefetch-hints.json +1 -0
  282. package/.next/server/server-reference-manifest.js +1 -0
  283. package/.next/server/server-reference-manifest.json +1 -0
  284. package/.next/server/webpack-runtime.js +1 -0
  285. package/.next/static/chunks/0b9a0da7.915b07ceecd18755.js +62 -0
  286. package/.next/static/chunks/1413.922d232de90c0c41.js +115 -0
  287. package/.next/static/chunks/1643.467a526a1f24f54d.js +24 -0
  288. package/.next/static/chunks/1852.4afb7f7ef17737c1.js +1 -0
  289. package/.next/static/chunks/1960.b1e26436d7a5f586.js +1 -0
  290. package/.next/static/chunks/2241-3268f463e00f6e38.js +1 -0
  291. package/.next/static/chunks/2261-cd89471c199745e2.js +4 -0
  292. package/.next/static/chunks/2419.fb50b8bb1874d556.js +166 -0
  293. package/.next/static/chunks/2619.9aac8983f30c7c8a.js +1 -0
  294. package/.next/static/chunks/2623.d20fabd8e18197c6.js +287 -0
  295. package/.next/static/chunks/2729.f5365061a849d659.js +34 -0
  296. package/.next/static/chunks/2821.934bcf60fbdc28c6.js +1 -0
  297. package/.next/static/chunks/2918becc.abff2ece1de37bc1.js +153 -0
  298. package/.next/static/chunks/2947.114e51cb06d1c01a.js +23 -0
  299. package/.next/static/chunks/3079.90c6008a4bba4ee1.js +79 -0
  300. package/.next/static/chunks/3274.208ca44844cd7d95.js +148 -0
  301. package/.next/static/chunks/3308.115707ee3fd446be.js +73 -0
  302. package/.next/static/chunks/3325.01cdecedf0fb6d62.js +80 -0
  303. package/.next/static/chunks/3794-ba2500baa4c52d55.js +32 -0
  304. package/.next/static/chunks/3837.a755ccfe6f9c1c1c.js +5 -0
  305. package/.next/static/chunks/394.2860c5a408dc8801.js +1 -0
  306. package/.next/static/chunks/3997.42e942ad02cc6f4b.js +1 -0
  307. package/.next/static/chunks/4491.44fdf20580ac72bd.js +24 -0
  308. package/.next/static/chunks/4829.cf1d50e43e6d9db5.js +1 -0
  309. package/.next/static/chunks/498.fe1d9da9ecad6c36.js +1 -0
  310. package/.next/static/chunks/4bd1b696-e356ca5ba0218e27.js +1 -0
  311. package/.next/static/chunks/5019.b5a1a2b8daf17525.js +1 -0
  312. package/.next/static/chunks/5034.cbaaf32db6d2086d.js +1 -0
  313. package/.next/static/chunks/5035.3755dbc45ec0eb8d.js +90 -0
  314. package/.next/static/chunks/5074.fc63ed48a3b1a61f.js +1 -0
  315. package/.next/static/chunks/5118-c59568935da468da.js +1 -0
  316. package/.next/static/chunks/532.5956ed631aff722b.js +9 -0
  317. package/.next/static/chunks/5326.69460442bdcd6cd3.js +1 -0
  318. package/.next/static/chunks/5403.ff110bf5bf600758.js +64 -0
  319. package/.next/static/chunks/547.902a733488cfe3f7.js +77 -0
  320. package/.next/static/chunks/5567.540d7fc108ad6ee5.js +215 -0
  321. package/.next/static/chunks/5590.ef62922166d308b4.js +1 -0
  322. package/.next/static/chunks/5690.9d6eb1edb1399995.js +1 -0
  323. package/.next/static/chunks/5749.25faee4a1e55b854.js +226 -0
  324. package/.next/static/chunks/58bb9007.1ccb6bba34b4c635.js +80 -0
  325. package/.next/static/chunks/6121.f3f43f1896ea0cd9.js +1 -0
  326. package/.next/static/chunks/634-ca908c8d0258d9db.js +3 -0
  327. package/.next/static/chunks/6600.583c88eef37aa524.js +1 -0
  328. package/.next/static/chunks/6696.c05e02f280b8186b.js +141 -0
  329. package/.next/static/chunks/6922.42148793782d2fe7.js +1 -0
  330. package/.next/static/chunks/7006.e191611ffc2b9528.js +43 -0
  331. package/.next/static/chunks/7343.9574ac32b87d5050.js +1 -0
  332. package/.next/static/chunks/73972abe.25a4cffa03b2bcef.js +119 -0
  333. package/.next/static/chunks/7547.8caf31f3b18ded65.js +93 -0
  334. package/.next/static/chunks/7648.4ae2f183b4db0353.js +1 -0
  335. package/.next/static/chunks/7874.8db6929b94cdf697.js +1 -0
  336. package/.next/static/chunks/7959.1f20a35df316216a.js +104 -0
  337. package/.next/static/chunks/83.85d62d7fc9850b75.js +29 -0
  338. package/.next/static/chunks/8489.fd81b5e4de9f8431.js +36 -0
  339. package/.next/static/chunks/8568.f85d8b36fc9a9037.js +1 -0
  340. package/.next/static/chunks/8863.be51033a67436277.js +1 -0
  341. package/.next/static/chunks/90542734.ecc36ada79772529.js +1 -0
  342. package/.next/static/chunks/9500.1488aec06ee78127.js +1 -0
  343. package/.next/static/chunks/9633.155548b5fca6e580.js +1 -0
  344. package/.next/static/chunks/9779.673004a62d70e36a.js +1 -0
  345. package/.next/static/chunks/9b0008ae.3afefd8b13735168.js +2 -0
  346. package/.next/static/chunks/app/_global-error/page-6ba03eac42f3d2bb.js +1 -0
  347. package/.next/static/chunks/app/_not-found/page-647d65d4d44f4663.js +1 -0
  348. package/.next/static/chunks/app/api/agent/[id]/events/route-6ba03eac42f3d2bb.js +1 -0
  349. package/.next/static/chunks/app/api/agent/[id]/export.html/route-6ba03eac42f3d2bb.js +1 -0
  350. package/.next/static/chunks/app/api/agent/[id]/route-6ba03eac42f3d2bb.js +1 -0
  351. package/.next/static/chunks/app/api/agent/new/route-6ba03eac42f3d2bb.js +1 -0
  352. package/.next/static/chunks/app/api/auth/all-providers/route-6ba03eac42f3d2bb.js +1 -0
  353. package/.next/static/chunks/app/api/auth/api-key/[provider]/route-6ba03eac42f3d2bb.js +1 -0
  354. package/.next/static/chunks/app/api/auth/login/[provider]/route-6ba03eac42f3d2bb.js +1 -0
  355. package/.next/static/chunks/app/api/auth/logout/[provider]/route-6ba03eac42f3d2bb.js +1 -0
  356. package/.next/static/chunks/app/api/auth/providers/route-6ba03eac42f3d2bb.js +1 -0
  357. package/.next/static/chunks/app/api/cwd/validate/route-6ba03eac42f3d2bb.js +1 -0
  358. package/.next/static/chunks/app/api/default-cwd/route-6ba03eac42f3d2bb.js +1 -0
  359. package/.next/static/chunks/app/api/extensions/route-6ba03eac42f3d2bb.js +1 -0
  360. package/.next/static/chunks/app/api/files/[...path]/route-6ba03eac42f3d2bb.js +1 -0
  361. package/.next/static/chunks/app/api/files/stage/route-6ba03eac42f3d2bb.js +1 -0
  362. package/.next/static/chunks/app/api/git-branch/route-6ba03eac42f3d2bb.js +1 -0
  363. package/.next/static/chunks/app/api/health/route-6ba03eac42f3d2bb.js +1 -0
  364. package/.next/static/chunks/app/api/history/[id]/route-6ba03eac42f3d2bb.js +1 -0
  365. package/.next/static/chunks/app/api/history/route-6ba03eac42f3d2bb.js +1 -0
  366. package/.next/static/chunks/app/api/home/route-6ba03eac42f3d2bb.js +1 -0
  367. package/.next/static/chunks/app/api/models/route-6ba03eac42f3d2bb.js +1 -0
  368. package/.next/static/chunks/app/api/models-config/route-6ba03eac42f3d2bb.js +1 -0
  369. package/.next/static/chunks/app/api/models-config/test/route-6ba03eac42f3d2bb.js +1 -0
  370. package/.next/static/chunks/app/api/notifications/agent-end/route-6ba03eac42f3d2bb.js +1 -0
  371. package/.next/static/chunks/app/api/preferences/route-6ba03eac42f3d2bb.js +1 -0
  372. package/.next/static/chunks/app/api/product-sessions/[id]/route-6ba03eac42f3d2bb.js +1 -0
  373. package/.next/static/chunks/app/api/push/route-6ba03eac42f3d2bb.js +1 -0
  374. package/.next/static/chunks/app/api/remote/audit/route-6ba03eac42f3d2bb.js +1 -0
  375. package/.next/static/chunks/app/api/remote/client/route-6ba03eac42f3d2bb.js +1 -0
  376. package/.next/static/chunks/app/api/remote/pair/route-6ba03eac42f3d2bb.js +1 -0
  377. package/.next/static/chunks/app/api/remote/route-6ba03eac42f3d2bb.js +1 -0
  378. package/.next/static/chunks/app/api/scene-overrides/[sceneId]/route-6ba03eac42f3d2bb.js +1 -0
  379. package/.next/static/chunks/app/api/scene-overrides/export/route-6ba03eac42f3d2bb.js +1 -0
  380. package/.next/static/chunks/app/api/scene-overrides/import/route-6ba03eac42f3d2bb.js +1 -0
  381. package/.next/static/chunks/app/api/scene-overrides/route-6ba03eac42f3d2bb.js +1 -0
  382. package/.next/static/chunks/app/api/sessions/[id]/context/route-6ba03eac42f3d2bb.js +1 -0
  383. package/.next/static/chunks/app/api/sessions/[id]/route-6ba03eac42f3d2bb.js +1 -0
  384. package/.next/static/chunks/app/api/sessions/[id]/share/route-6ba03eac42f3d2bb.js +1 -0
  385. package/.next/static/chunks/app/api/sessions/new/route-6ba03eac42f3d2bb.js +1 -0
  386. package/.next/static/chunks/app/api/sessions/route-6ba03eac42f3d2bb.js +1 -0
  387. package/.next/static/chunks/app/api/settings/default-model/route-6ba03eac42f3d2bb.js +1 -0
  388. package/.next/static/chunks/app/api/share/[token]/route-6ba03eac42f3d2bb.js +1 -0
  389. package/.next/static/chunks/app/api/skills/install/route-6ba03eac42f3d2bb.js +1 -0
  390. package/.next/static/chunks/app/api/skills/route-6ba03eac42f3d2bb.js +1 -0
  391. package/.next/static/chunks/app/api/skills/search/route-6ba03eac42f3d2bb.js +1 -0
  392. package/.next/static/chunks/app/api/usage/route-6ba03eac42f3d2bb.js +1 -0
  393. package/.next/static/chunks/app/api/web-fetch/install-agent-browser/route-6ba03eac42f3d2bb.js +1 -0
  394. package/.next/static/chunks/app/api/web-fetch/preferences/route-6ba03eac42f3d2bb.js +1 -0
  395. package/.next/static/chunks/app/api/web-fetch/status/route-6ba03eac42f3d2bb.js +1 -0
  396. package/.next/static/chunks/app/layout-e74bc51db18cfddb.js +1 -0
  397. package/.next/static/chunks/app/page-0a72cdb03c0de546.js +2 -0
  398. package/.next/static/chunks/app/share/[token]/page-801df8f03e50e9cc.js +1 -0
  399. package/.next/static/chunks/d3ac728e.7964f816a1ca64e5.js +1 -0
  400. package/.next/static/chunks/framework-594babcea68f40f6.js +1 -0
  401. package/.next/static/chunks/main-a301b80fa032f44e.js +5 -0
  402. package/.next/static/chunks/main-app-4543b2d36de0bf44.js +1 -0
  403. package/.next/static/chunks/next/dist/client/components/builtin/app-error-6ba03eac42f3d2bb.js +1 -0
  404. package/.next/static/chunks/next/dist/client/components/builtin/forbidden-6ba03eac42f3d2bb.js +1 -0
  405. package/.next/static/chunks/next/dist/client/components/builtin/global-error-7fe17cf3265b4136.js +1 -0
  406. package/.next/static/chunks/next/dist/client/components/builtin/not-found-6ba03eac42f3d2bb.js +1 -0
  407. package/.next/static/chunks/next/dist/client/components/builtin/unauthorized-6ba03eac42f3d2bb.js +1 -0
  408. package/.next/static/chunks/polyfills-42372ed130431b0a.js +1 -0
  409. package/.next/static/chunks/webpack-bef1f311e5b374f6.js +1 -0
  410. package/.next/static/css/889d8f95f57176c7.css +3 -0
  411. package/.next/static/mO8qg2XV3QxoVaZcobTyc/_buildManifest.js +1 -0
  412. package/.next/static/mO8qg2XV3QxoVaZcobTyc/_ssgManifest.js +1 -0
  413. package/.next/static/media/15605e25b523335c-s.woff2 +0 -0
  414. package/.next/static/media/1a3dce5cfb5f7760-s.woff2 +0 -0
  415. package/.next/static/media/1cdd02902f937a18-s.woff2 +0 -0
  416. package/.next/static/media/4c4b3b30b6bcb2be-s.woff2 +0 -0
  417. package/.next/static/media/641a7b8a5800ee0e-s.woff2 +0 -0
  418. package/.next/static/media/7deddc85b7ffd1dc-s.p.woff2 +0 -0
  419. package/.next/static/media/ec14413c594b3356-s.p.woff2 +0 -0
  420. package/.next/trace +6 -0
  421. package/.next/trace-build +1 -0
  422. package/.next/types/app/api/agent/[id]/events/route.ts +351 -0
  423. package/.next/types/app/api/agent/[id]/export.html/route.ts +351 -0
  424. package/.next/types/app/api/agent/[id]/route.ts +351 -0
  425. package/.next/types/app/api/agent/new/route.ts +351 -0
  426. package/.next/types/app/api/auth/all-providers/route.ts +351 -0
  427. package/.next/types/app/api/auth/api-key/[provider]/route.ts +351 -0
  428. package/.next/types/app/api/auth/login/[provider]/route.ts +351 -0
  429. package/.next/types/app/api/auth/logout/[provider]/route.ts +351 -0
  430. package/.next/types/app/api/auth/providers/route.ts +351 -0
  431. package/.next/types/app/api/cwd/validate/route.ts +351 -0
  432. package/.next/types/app/api/default-cwd/route.ts +351 -0
  433. package/.next/types/app/api/extensions/route.ts +351 -0
  434. package/.next/types/app/api/files/[...path]/route.ts +351 -0
  435. package/.next/types/app/api/files/stage/route.ts +351 -0
  436. package/.next/types/app/api/git-branch/route.ts +351 -0
  437. package/.next/types/app/api/health/route.ts +351 -0
  438. package/.next/types/app/api/history/[id]/route.ts +351 -0
  439. package/.next/types/app/api/history/route.ts +351 -0
  440. package/.next/types/app/api/home/route.ts +351 -0
  441. package/.next/types/app/api/models/route.ts +351 -0
  442. package/.next/types/app/api/models-config/route.ts +351 -0
  443. package/.next/types/app/api/models-config/test/route.ts +351 -0
  444. package/.next/types/app/api/notifications/agent-end/route.ts +351 -0
  445. package/.next/types/app/api/preferences/route.ts +351 -0
  446. package/.next/types/app/api/product-sessions/[id]/route.ts +351 -0
  447. package/.next/types/app/api/push/route.ts +351 -0
  448. package/.next/types/app/api/remote/audit/route.ts +351 -0
  449. package/.next/types/app/api/remote/client/route.ts +351 -0
  450. package/.next/types/app/api/remote/pair/route.ts +351 -0
  451. package/.next/types/app/api/remote/route.ts +351 -0
  452. package/.next/types/app/api/scene-overrides/[sceneId]/route.ts +351 -0
  453. package/.next/types/app/api/scene-overrides/export/route.ts +351 -0
  454. package/.next/types/app/api/scene-overrides/import/route.ts +351 -0
  455. package/.next/types/app/api/scene-overrides/route.ts +351 -0
  456. package/.next/types/app/api/sessions/[id]/context/route.ts +351 -0
  457. package/.next/types/app/api/sessions/[id]/route.ts +351 -0
  458. package/.next/types/app/api/sessions/[id]/share/route.ts +351 -0
  459. package/.next/types/app/api/sessions/new/route.ts +351 -0
  460. package/.next/types/app/api/sessions/route.ts +351 -0
  461. package/.next/types/app/api/settings/default-model/route.ts +351 -0
  462. package/.next/types/app/api/share/[token]/route.ts +351 -0
  463. package/.next/types/app/api/skills/install/route.ts +351 -0
  464. package/.next/types/app/api/skills/route.ts +351 -0
  465. package/.next/types/app/api/skills/search/route.ts +351 -0
  466. package/.next/types/app/api/usage/route.ts +351 -0
  467. package/.next/types/app/api/web-fetch/install-agent-browser/route.ts +351 -0
  468. package/.next/types/app/api/web-fetch/preferences/route.ts +351 -0
  469. package/.next/types/app/api/web-fetch/status/route.ts +351 -0
  470. package/.next/types/app/page.ts +87 -0
  471. package/.next/types/app/share/[token]/page.ts +87 -0
  472. package/.next/types/cache-life.d.ts +145 -0
  473. package/.next/types/package.json +1 -0
  474. package/.next/types/routes.d.ts +121 -0
  475. package/.next/types/validator.ts +511 -0
  476. package/LICENSE +21 -0
  477. package/README.md +142 -0
  478. package/bin/pi-app.js +113 -0
  479. package/next.config.ts +61 -0
  480. package/package.json +78 -0
  481. package/public/icon.svg +4 -0
  482. package/public/manifest.webmanifest +18 -0
  483. package/public/pdf.worker.min.mjs +21 -0
  484. package/public/sw.js +63 -0
@@ -0,0 +1,62 @@
1
+ "use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2995],{63886:(t,e,a)=>{a.d(e,{DA:()=>$,IU:()=>B,U:()=>K,U7:()=>ef,U_:()=>ew,Zk:()=>c,aP:()=>ec,gh:()=>eu,lC:()=>y,on:()=>ey});var l=a(38033),i=a(17541),r=a(27655),n=a(32563),s=a(97096),h=a(32165),o=a(33948),d=a(94529),c=(0,h.K2)(async(t,e,a)=>{let i,h=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));i=void 0===e.label?"":"string"==typeof e.label?e.label:e.label[0];let g=!!e.icon||!!e.img,y="markdown"===e.labelType,f=await (0,r.GZ)(c,(0,s.jZ)((0,n.Sm)(i),(0,s.D7)()),{useHtmlLabels:h,width:e.width||(0,s.D7)().flowchart?.wrappingWidth,classes:y?"markdown-node-label":"",style:e.labelStyle,addSvgBackground:g,markdown:y},(0,s.D7)()),u=f.getBBox(),w=(e?.padding??0)/2;if(h){let t=f.children[0],e=(0,o.Ltv)(f);await (0,l.X)(t,i),u=t.getBoundingClientRect(),e.attr("width",u.width),e.attr("height",u.height)}return h?c.attr("transform","translate("+-u.width/2+", "+-u.height/2+")"):c.attr("transform","translate(0, "+-u.height/2+")"),e.centerLabel&&c.attr("transform","translate("+-u.width/2+", "+-u.height/2+")"),c.insert("rect",":first-child"),{shapeSvg:d,bbox:u,halfPadding:w,label:c}},"labelHelper"),g=(0,h.K2)(async(t,e,a)=>{let l=a.useHtmlLabels??(0,s.E)((0,s.D7)()),i=t.insert("g").attr("class","label").attr("style",a.labelStyle||""),h=await (0,r.GZ)(i,(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.E)((0,s.D7)())){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?i.attr("transform","translate("+-d.width/2+", "+-d.height/2+")"):i.attr("transform","translate(0, "+-d.height/2+")"),a.centerLabel&&i.attr("transform","translate("+-d.width/2+", "+-d.height/2+")"),i.insert("rect",":first-child"),{shapeSvg:t,bbox:d,halfPadding:c,label:i}},"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 u(t){let e=t.map((t,e)=>`${0===e?"M":"L"}${t.x},${t.y}`);return e.push("Z"),e.join(" ")}function w(t,e,a,l,i,r){let n=[],s=a-t,h=2*Math.PI/(s/r),o=e+(l-e)/2;for(let e=0;e<=50;e++){let a=t+e/50*s,l=o+i*Math.sin(h*(a-t));n.push({x:a,y:l})}return n}function p(t,e,a,l,i,r){let n=[],s=i*Math.PI/180,h=(r*Math.PI/180-s)/(l-1);for(let i=0;i<l;i++){let l=s+i*h,r=t+a*Math.cos(l),o=e+a*Math.sin(l);n.push({x:-r,y:-o})}return n}function m(t){let e=Array.from(t.childNodes).filter(t=>"path"===t.tagName),a=document.createElementNS("http://www.w3.org/2000/svg","path"),l=e.map(t=>t.getAttribute("d")).filter(t=>null!==t).join(" ");a.setAttribute("d",l);let i=e.find(t=>"none"!==t.getAttribute("fill")),r=e.find(t=>"none"!==t.getAttribute("stroke")),n=(0,h.K2)((t,e)=>t?.getAttribute(e)??void 0,"getAttr");i&&Object.entries({fill:n(i,"fill"),"fill-opacity":n(i,"fill-opacity")??"1"}).forEach(([t,e])=>{e&&a.setAttribute(t,e)}),r&&Object.entries({stroke:n(r,"stroke"),"stroke-width":n(r,"stroke-width")??"1","stroke-opacity":n(r,"stroke-opacity")??"1"}).forEach(([t,e])=>{e&&a.setAttribute(t,e)});let s=document.createElementNS("http://www.w3.org/2000/svg","g");return s.appendChild(a),s}(0,h.K2)(u,"createPathFromPoints"),(0,h.K2)(w,"generateFullSineWavePoints"),(0,h.K2)(p,"generateCirclePoints"),(0,h.K2)(m,"mergePaths");var x=(0,h.K2)((t,e)=>{var a,l,i=t.x,r=t.y,n=e.x-i,s=e.y-r,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:i+a,y:r+l}},"intersectRect"),$=(0,h.K2)(async(t,e,a,l=!1,i=!1)=>{let n=e||"";"object"==typeof n&&(n=n[0]);let h=(0,s.D7)(),o=(0,s.E)(h);return await (0,r.GZ)(t,n,{style:a,isTitle:l,useHtmlLabels:o,markdown:!1,isNode:i,width:1/0},h)},"createLabel"),b=(0,h.K2)((t,e,a,l,i)=>["M",t+i,e,"H",t+a-i,"A",i,i,"0 0 1",t+a,e+i,"V",e+l-i,"A",i,i,"0 0 1",t+a-i,e+l,"H",t+i,"A",i,i,"0 0 1",t,e+l-i,"V",e+i,"A",i,i,"0 0 1",t+i,e,"Z"].join(" "),"createRoundedRectPathD"),k=(0,h.K2)(async(t,e)=>{let a,n;h.Rm.info("Creating subgraph rect for ",e.id,e);let c=(0,s.D7)(),{themeVariables:g,handDrawnSeed:y}=c,{clusterBkg:f,clusterBorder:u}=g,{labelStyles:w,nodeStyles:p,borderStyles:m,backgroundStyles:k}=(0,i.GX)(e),D=t.insert("g").attr("class","cluster "+e.cssClasses).attr("id",e.domId).attr("data-look",e.look),S=(0,s.E)(c),M=D.insert("g").attr("class","cluster-label "),A=(a="markdown"===e.labelType?await (0,r.GZ)(M,e.label,{style:e.labelStyle,useHtmlLabels:S,isNode:!0,width:e.width}):await $(M,e.label,e.labelStyle||"",!1,!0)).getBBox();if((0,s.E)(c)){let t=a.children[0],e=(0,o.Ltv)(a);A=t.getBoundingClientRect(),e.attr("width",A.width),e.attr("height",A.height)}let v=e.width<=A.width+e.padding?A.width+e.padding:e.width;e.width<=A.width+e.padding?e.diff=(v-e.width)/2-e.padding:e.diff=-e.padding;let K=e.height,B=e.x-v/2,C=e.y-K/2;if(h.Rm.trace("Data ",e,JSON.stringify(e)),"handDrawn"===e.look){let t=d.A.svg(D),a=(0,i.Fr)(e,{roughness:.7,fill:f,stroke:u,fillWeight:3,seed:y}),l=t.path(b(B,C,v,K,0),a);(n=D.insert(()=>(h.Rm.debug("Rough node insert CXC",l),l),":first-child")).select("path:nth-child(2)").attr("style",m.join(";")),n.select("path").attr("style",k.join(";").replace("fill","stroke"))}else(n=D.insert("rect",":first-child")).attr("style",p).attr("rx",e.rx).attr("ry",e.ry).attr("x",B).attr("y",C).attr("width",v).attr("height",K);let{subGraphTitleTopMargin:N}=(0,l.O)(c);if(M.attr("transform",`translate(${e.x-A.width/2}, ${e.y-e.height/2+N})`),w){let t=M.select("span");t&&t.attr("style",w)}let R=n.node().getBBox();return e.offsetX=0,e.width=R.width,e.height=R.height,e.offsetY=A.height-e.padding/2,e.intersect=function(t){return x(e,t)},{cluster:D,labelBBox:A}},"rect"),D=(0,h.K2)((t,e)=>{let a=t.insert("g").attr("class","note-cluster").attr("id",e.domId),l=a.insert("rect",":first-child"),i=0*e.padding,r=i/2;l.attr("rx",e.rx).attr("ry",e.ry).attr("x",e.x-e.width/2-r).attr("y",e.y-e.height/2-r).attr("width",e.width+i).attr("height",e.height+i).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"),S=(0,h.K2)(async(t,e)=>{let a,l=(0,s.D7)(),{themeVariables:i,handDrawnSeed:r}=l,{altBackground:n,compositeBackground:h,compositeTitleBackground:c,nodeBorder:g}=i,y=t.insert("g").attr("class",e.cssClasses).attr("id",e.domId).attr("data-id",e.id).attr("data-look",e.look),f=y.insert("g",":first-child"),u=y.insert("g").attr("class","cluster-label"),w=y.append("rect"),p=await $(u,e.label,e.labelStyle,void 0,!0),m=p.getBBox();if((0,s.E)(l)){let t=p.children[0],e=(0,o.Ltv)(p);m=t.getBoundingClientRect(),e.attr("width",m.width),e.attr("height",m.height)}let k=0*e.padding,D=(e.width<=m.width+e.padding?m.width+e.padding:e.width)+k;e.width<=m.width+e.padding?e.diff=(D-e.width)/2-e.padding:e.diff=-e.padding;let S=e.height+k,M=e.height+k-m.height-6,A=e.x-D/2,v=e.y-S/2;e.width=D;let K=e.y-e.height/2-k/2+m.height+2;if("handDrawn"===e.look){let t=e.cssClasses.includes("statediagram-cluster-alt"),l=d.A.svg(y),i=e.rx||e.ry?l.path(b(A,v,D,S,10),{roughness:.7,fill:c,fillStyle:"solid",stroke:g,seed:r}):l.rectangle(A,v,D,S,{seed:r});a=y.insert(()=>i,":first-child");let s=l.rectangle(A,K,D,M,{fill:t?n:h,fillStyle:t?"hachure":"solid",stroke:g,seed:r});a=y.insert(()=>i,":first-child"),w=y.insert(()=>s)}else(a=f.insert("rect",":first-child")).attr("class","outer").attr("x",A).attr("y",v).attr("width",D).attr("height",S).attr("data-look",e.look),w.attr("class","inner").attr("x",A).attr("y",K).attr("width",D).attr("height",M);return u.attr("transform",`translate(${e.x-m.width/2}, ${v+1-3*!(0,s.E)(l)})`),e.height=a.node().getBBox().height,e.offsetX=0,e.offsetY=m.height-e.padding/2,e.labelBBox=m,e.intersect=function(t){return x(e,t)},{cluster:y,labelBBox:m}},"roundedWithTitle"),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:u,nodeStyles:w,borderStyles:p,backgroundStyles:m}=(0,i.GX)(e),$=t.insert("g").attr("class","cluster "+e.cssClasses).attr("id",e.domId).attr("data-look",e.look),k=(0,s.E)(n),D=$.insert("g").attr("class","cluster-label "),S=await (0,r.GZ)(D,e.label,{style:e.labelStyle,useHtmlLabels:k,isNode:!0,width:e.width}),M=S.getBBox();if((0,s.E)(n)){let t=S.children[0],e=(0,o.Ltv)(S);M=t.getBoundingClientRect(),e.attr("width",M.width),e.attr("height",M.height)}let A=e.width<=M.width+e.padding?M.width+e.padding:e.width;e.width<=M.width+e.padding?e.diff=(A-e.width)/2-e.padding:e.diff=-e.padding;let v=e.height,K=e.x-A/2,B=e.y-v/2;if(h.Rm.trace("Data ",e,JSON.stringify(e)),"handDrawn"===e.look){let t=d.A.svg($),l=(0,i.Fr)(e,{roughness:.7,fill:y,stroke:f,fillWeight:4,seed:g}),r=t.path(b(K,B,A,v,e.rx),l);(a=$.insert(()=>(h.Rm.debug("Rough node insert CXC",r),r),":first-child")).select("path:nth-child(2)").attr("style",p.join(";")),a.select("path").attr("style",m.join(";").replace("fill","stroke"))}else(a=$.insert("rect",":first-child")).attr("style",w).attr("rx",e.rx).attr("ry",e.ry).attr("x",K).attr("y",B).attr("width",A).attr("height",v);let{subGraphTitleTopMargin:C}=(0,l.O)(n);if(D.attr("transform",`translate(${e.x-M.width/2}, ${e.y-e.height/2+C})`),u){let t=D.select("span");t&&t.attr("style",u)}let N=a.node().getBBox();return e.offsetX=0,e.width=N.width,e.height=N.height,e.offsetY=M.height-e.padding/2,e.intersect=function(t){return x(e,t)},{cluster:$,labelBBox:M}},"kanbanSection"),A={rect:k,squareRect:k,roundedWithTitle:S,noteGroup:D,divider:(0,h.K2)((t,e)=>{let a,{themeVariables:l,handDrawnSeed:i}=(0,s.D7)(),{nodeBorder:r}=l,n=t.insert("g").attr("class",e.cssClasses).attr("id",e.domId).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:r,seed:i});a=n.insert(()=>t,":first-child")}else{a=h.insert("rect",":first-child");let t="outer";e.look,t="divider",a.attr("class",t).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:M},v=new Map,K=(0,h.K2)(async(t,e)=>{let a=e.shape||"rect",l=await A[a](t,e);return v.set(e.id,l),l},"insertCluster"),B=(0,h.K2)(()=>{v=new Map},"clear");function C(t,e,a,l){var i=t.x,r=t.y,n=i-l.x,s=r-l.y,h=Math.sqrt(e*e*s*s+a*a*n*n),o=Math.abs(e*a*n/h);l.x<i&&(o=-o);var d=Math.abs(e*a*s/h);return l.y<r&&(d=-d),{x:i+o,y:r+d}}function N(t,e,a){return C(t,e,e,a)}function R(t,e,a,l){{let i=e.y-t.y,r=t.x-e.x,n=e.x*t.y-t.x*e.y,s=i*a.x+r*a.y+n,h=i*l.x+r*l.y+n;if(0!==s&&0!==h&&L(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)&&L(g,y))return;let f=i*d-o*r;if(0===f)return;let u=Math.abs(f/2),w=r*c-d*n;return{x:w<0?(w-u)/f:(w+u)/f,y:(w=o*n-i*c)<0?(w-u)/f:(w+u)/f}}}function L(t,e){return t*e>0}function F(t,e,a){let l=t.x,i=t.y,r=[],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=i-t.height/2-s;for(let l=0;l<e.length;l++){let i=e[l],n=e[l<e.length-1?l+1:0],s=R(t,a,{x:h+i.x,y:o+i.y},{x:h+n.x,y:o+n.y});s&&r.push(s)}return r.length?(r.length>1&&r.sort(function(t,e){let l=t.x-a.x,i=t.y-a.y,r=Math.sqrt(l*l+i*i),n=e.x-a.x,s=e.y-a.y,h=Math.sqrt(n*n+s*s);return r<h?-1:+(r!==h)}),r[0]):t}(0,h.K2)(function(t,e){return t.intersect(e)},"intersectNode"),(0,h.K2)(C,"intersectEllipse"),(0,h.K2)(N,"intersectCircle"),(0,h.K2)(R,"intersectLine"),(0,h.K2)(L,"sameSign"),(0,h.K2)(F,"intersectPolygon");function P(t,e){let{labelStyles:a}=(0,i.GX)(e);e.labelStyle=a;let l=f(e),r=l;l||(r="anchor");let s=t.insert("g").attr("class",r).attr("id",e.domId||e.id),{cssStyles:o}=e,c=d.A.svg(s),g=(0,i.Fr)(e,{fill:"black",stroke:"none",fillStyle:"solid"});"handDrawn"!==e.look&&(g.roughness=0);let u=c.circle(0,0,2,g),w=s.insert(()=>u,":first-child");return w.attr("class","anchor").attr("style",(0,n.KL)(o)),y(e,w),e.intersect=function(t){return h.Rm.info("Circle intersect",e,1,t),N(e,1,t)},s}function X(t,e,a,l,i,r,n){let s=Math.atan2(l-e,a-t),h=Math.sqrt(((a-t)/2/i)**2+((l-e)/2/r)**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*r*Math.sin(s)*(n?-1:1),c=(e+l)/2-o*i*Math.cos(s)*(n?-1:1),g=Math.atan2((e-c)/r,(t-d)/i),y=Math.atan2((l-c)/r,(a-d)/i)-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+i*Math.cos(e),l=c+r*Math.sin(e);f.push({x:a,y:l})}return f}function G(t,e,a){let[l,i]=[e,a].sort((t,e)=>e-t);return i*(1-Math.sqrt(1-(t/l/2)**2))}async function I(t,e){let{labelStyles:a,nodeStyles:l}=(0,i.GX)(e);e.labelStyle=a;let r=e.padding??0,n="neo"===e.look?16:r,s="neo"===e.look?12:r,o=(0,h.K2)(t=>t+s,"calcTotalHeight"),g=(0,h.K2)(t=>{let e=t/2;return[e/(2.5+t/50),e]},"calcEllipseRadius"),{shapeSvg:w,bbox:p}=await c(t,e,f(e)),m=o(e?.height?e?.height:p.height),[x,$]=g(m),b=G(m,x,$),k=(e?.width?e?.width:p.width)+2*n+b-b,{cssStyles:D}=e,S=[{x:k/2,y:-m/2},{x:-k/2,y:-m/2},...X(-k/2,-m/2,-k/2,m/2,x,$,!1),{x:k/2,y:m/2},...X(k/2,m/2,k/2,-m/2,x,$,!0)],M=d.A.svg(w),A=(0,i.Fr)(e,{});"handDrawn"!==e.look&&(A.roughness=0,A.fillStyle="solid");let v=u(S),K=M.path(v,A),B=w.insert(()=>K,":first-child");return B.attr("class","basic label-container outer-path"),D&&"handDrawn"!==e.look&&B.selectAll("path").attr("style",D),l&&"handDrawn"!==e.look&&B.selectAll("path").attr("style",l),B.attr("transform",`translate(${x/2}, 0)`),y(e,B),e.intersect=function(t){return F(e,S,t)},w}function E(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(t,e){let a,{labelStyles:l,nodeStyles:r}=(0,i.GX)(e);e.labelStyle=l;let n=e.padding??0,s="neo"===e.look?28:n,h="neo"===e.look?24:n,{shapeSvg:o,bbox:g}=await c(t,e,f(e)),w=(e?.width??g.width)+("neo"===e.look?2*s:s+12),p=(e?.height??g.height)+("neo"===e.look?2*h:h),m=-p,x=[{x:12,y:m},{x:w,y:m},{x:w,y:0},{x:0,y:0},{x:0,y:m+12},{x:12,y:m}],{cssStyles:$}=e;if("handDrawn"===e.look){let t=d.A.svg(o),l=(0,i.Fr)(e,{}),r=u(x),n=t.path(r,l);a=o.insert(()=>n,":first-child").attr("transform",`translate(${-w/2}, ${p/2})`),$&&a.attr("style",$)}else a=E(o,w,p,x);return r&&a.attr("style",r),y(e,a),e.intersect=function(t){return F(e,x,t)},o}function W(t,e){let{nodeStyles:a}=(0,i.GX)(e);e.label="";let l=t.insert("g").attr("class",f(e)).attr("id",e.domId??e.id),{cssStyles:r}=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,i.Fr)(e,{});"handDrawn"!==e.look&&(o.roughness=0,o.fillStyle="solid");let c=u(s),g=h.path(c,o),y=l.insert(()=>g,":first-child");return r&&"handDrawn"!==e.look&&y.selectAll("path").attr("style",r),a&&"handDrawn"!==e.look&&y.selectAll("path").attr("style",a),e.width=28,e.height=28,e.intersect=function(t){return F(e,s,t)},l}async function H(t,e,a){let l,{labelStyles:r,nodeStyles:s}=(0,i.GX)(e);e.labelStyle=r;let{shapeSvg:o,bbox:g,halfPadding:u}=await c(t,e,f(e)),w=a?.padding??u,p="neo"===e.look?g.width/2+32:g.width/2+w,{cssStyles:m}=e;if("handDrawn"===e.look){let t=d.A.svg(o),a=(0,i.Fr)(e,{}),r=t.circle(0,0,2*p,a);(l=o.insert(()=>r,":first-child")).attr("class","basic label-container").attr("style",(0,n.KL)(m))}else l=o.insert("circle",":first-child").attr("class","basic label-container").attr("style",s).attr("r",p).attr("cx",0).attr("cy",0);return y(e,l),e.calcIntersect=function(t,e){let a=t.width/2;return N(t,a,e)},e.intersect=function(t){return h.Rm.info("Circle intersect",e,p,t),N(e,p,t)},o}function j(t){let e=Math.cos(Math.PI/4),a=Math.sin(Math.PI/4),l=2*t,i={x:l/2*e,y:l/2*a},r={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 ${r.x},${r.y} L ${s.x},${s.y}
2
+ M ${i.x},${i.y} L ${n.x},${n.y}`}function q(t,e){let{labelStyles:a,nodeStyles:l}=(0,i.GX)(e);e.labelStyle=a,e.label="";let r=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(r),c=(0,i.Fr)(e,{});"handDrawn"!==e.look&&(c.roughness=0,c.fillStyle="solid");let g=o.circle(0,0,2*n,c),u=j(n),w=o.path(u,c),p=r.insert(()=>g,":first-child");return p.insert(()=>w),p.attr("class","outer-path"),s&&"handDrawn"!==e.look&&p.selectAll("path").attr("style",s),l&&"handDrawn"!==e.look&&p.selectAll("path").attr("style",l),y(e,p),e.intersect=function(t){return h.Rm.info("crossedCircle intersect",e,{radius:n,point:t}),N(e,n,t)},r}function _(t,e,a,l=100,i=0,r=180){let n=[],s=i*Math.PI/180,h=(r*Math.PI/180-s)/(l-1);for(let i=0;i<l;i++){let l=s+i*h,r=t+a*Math.cos(l),o=e+a*Math.sin(l);n.push({x:-r,y:-o})}return n}async function z(t,e){let{labelStyles:a,nodeStyles:l}=(0,i.GX)(e);e.labelStyle=a;let{shapeSvg:r,bbox:n,label:s}=await c(t,e,f(e)),h="neo"===e.look?18:e.padding??0,o="neo"===e.look?12:e.padding??0,g=n.width+h,w=n.height+o,p=Math.max(5,.1*w),{cssStyles:m}=e,x=[..._(g/2,-w/2,p,30,-90,0),{x:-g/2-p,y:p},..._(g/2+2*p,-p,p,20,-180,-270),..._(g/2+2*p,p,p,20,-90,-180),{x:-g/2-p,y:-w/2},..._(g/2,w/2,p,20,0,90)],$=[{x:g/2,y:-w/2-p},{x:-g/2,y:-w/2-p},..._(g/2,-w/2,p,20,-90,0),{x:-g/2-p,y:-p},..._(g/2+.1*g,-p,p,20,-180,-270),..._(g/2+.1*g,p,p,20,-90,-180),{x:-g/2-p,y:w/2},..._(g/2,w/2,p,20,0,90),{x:-g/2,y:w/2+p},{x:g/2,y:w/2+p}],b=d.A.svg(r),k=(0,i.Fr)(e,{fill:"none"});"handDrawn"!==e.look&&(k.roughness=0,k.fillStyle="solid");let D=u(x).replace("Z",""),S=b.path(D,k),M=u($),A=b.path(M,{...k}),v=r.insert("g",":first-child");return v.insert(()=>A,":first-child").attr("stroke-opacity",0),v.insert(()=>S,":first-child"),v.attr("class","text"),m&&"handDrawn"!==e.look&&v.selectAll("path").attr("style",m),l&&"handDrawn"!==e.look&&v.selectAll("path").attr("style",l),v.attr("transform",`translate(${p}, 0)`),s.attr("transform",`translate(${-g/2+p-(n.x-(n.left??0))},${-w/2+(e.padding??0)/2-(n.y-(n.top??0))})`),y(e,v),e.intersect=function(t){return F(e,$,t)},r}function Z(t,e,a,l=100,i=0,r=180){let n=[],s=i*Math.PI/180,h=(r*Math.PI/180-s)/(l-1);for(let i=0;i<l;i++){let l=s+i*h,r=t+a*Math.cos(l),o=e+a*Math.sin(l);n.push({x:r,y:o})}return n}async function O(t,e){let{labelStyles:a,nodeStyles:l}=(0,i.GX)(e);e.labelStyle=a;let{shapeSvg:r,bbox:n,label:s}=await c(t,e,f(e)),h="neo"===e.look?18:e.padding??0,o="neo"===e.look?12:e.padding??0,g=n.width+("neo"===e.look?2*h:h),w=n.height+("neo"===e.look?2*o:o),p=Math.max(5,.1*w),{cssStyles:m}=e,x=[...Z(g/2,-w/2,p,20,-90,0),{x:g/2+p,y:-p},...Z(g/2+2*p,-p,p,20,-180,-270),...Z(g/2+2*p,p,p,20,-90,-180),{x:g/2+p,y:w/2},...Z(g/2,w/2,p,20,0,90)],$=[{x:-g/2,y:-w/2-p},{x:g/2,y:-w/2-p},...Z(g/2,-w/2,p,20,-90,0),{x:g/2+p,y:-p},...Z(g/2+2*p,-p,p,20,-180,-270),...Z(g/2+2*p,p,p,20,-90,-180),{x:g/2+p,y:w/2},...Z(g/2,w/2,p,20,0,90),{x:g/2,y:w/2+p},{x:-g/2,y:w/2+p}],b=d.A.svg(r),k=(0,i.Fr)(e,{fill:"none"});"handDrawn"!==e.look&&(k.roughness=0,k.fillStyle="solid");let D=u(x).replace("Z",""),S=b.path(D,k),M=u($),A=b.path(M,{...k}),v=r.insert("g",":first-child");return v.insert(()=>A,":first-child").attr("stroke-opacity",0),v.insert(()=>S,":first-child"),v.attr("class","text"),m&&"handDrawn"!==e.look&&v.selectAll("path").attr("style",m),l&&"handDrawn"!==e.look&&v.selectAll("path").attr("style",l),v.attr("transform",`translate(${-p}, 0)`),s.attr("transform",`translate(${-g/2+(e.padding??0)/2-(n.x-(n.left??0))},${-w/2+(e.padding??0)/2-(n.y-(n.top??0))})`),y(e,v),e.intersect=function(t){return F(e,$,t)},r}function V(t,e,a,l=100,i=0,r=180){let n=[],s=i*Math.PI/180,h=(r*Math.PI/180-s)/(l-1);for(let i=0;i<l;i++){let l=s+i*h,r=t+a*Math.cos(l),o=e+a*Math.sin(l);n.push({x:-r,y:-o})}return n}async function Y(t,e){let{labelStyles:a,nodeStyles:l}=(0,i.GX)(e);e.labelStyle=a;let{shapeSvg:r,bbox:n,label:s}=await c(t,e,f(e)),h="neo"===e.look?18:e.padding??0,o="neo"===e.look?12:e.padding??0,g=n.width+("neo"===e.look?2*h:h),w=n.height+("neo"===e.look?2*o:o),p=Math.max(5,.1*w),{cssStyles:m}=e,x=[...V(g/2,-w/2,p,30,-90,0),{x:-g/2-p,y:p},...V(g/2+2*p,-p,p,20,-180,-270),...V(g/2+2*p,p,p,20,-90,-180),{x:-g/2-p,y:-w/2},...V(g/2,w/2,p,20,0,90)],$=[...V(-g/2+p+p/2,-w/2,p,20,-90,-180),{x:g/2-p/2,y:p},...V(-g/2-p/2,-p,p,20,0,90),...V(-g/2-p/2,p,p,20,-90,0),{x:g/2-p/2,y:-p},...V(-g/2+p+p/2,w/2,p,30,-180,-270)],b=[{x:g/2,y:-w/2-p},{x:-g/2,y:-w/2-p},...V(g/2,-w/2,p,20,-90,0),{x:-g/2-p,y:-p},...V(g/2+2*p,-p,p,20,-180,-270),...V(g/2+2*p,p,p,20,-90,-180),{x:-g/2-p,y:w/2},...V(g/2,w/2,p,20,0,90),{x:-g/2,y:w/2+p},{x:g/2-p-p/2,y:w/2+p},...V(-g/2+p+p/2,-w/2,p,20,-90,-180),{x:g/2-p/2,y:p},...V(-g/2-p/2,-p,p,20,0,90),...V(-g/2-p/2,p,p,20,-90,0),{x:g/2-p/2,y:-p},...V(-g/2+p+p/2,w/2,p,30,-180,-270)],k=d.A.svg(r),D=(0,i.Fr)(e,{fill:"none"});"handDrawn"!==e.look&&(D.roughness=0,D.fillStyle="solid");let S=u(x).replace("Z",""),M=k.path(S,D),A=u($).replace("Z",""),v=k.path(A,D),K=u(b),B=k.path(K,{...D}),C=r.insert("g",":first-child");return C.insert(()=>B,":first-child").attr("stroke-opacity",0),C.insert(()=>M,":first-child"),C.insert(()=>v,":first-child"),C.attr("class","text"),m&&"handDrawn"!==e.look&&C.selectAll("path").attr("style",m),l&&"handDrawn"!==e.look&&C.selectAll("path").attr("style",l),C.attr("transform",`translate(${p-p/4}, 0)`),s.attr("transform",`translate(${-g/2+(e.padding??0)/2-(n.x-(n.left??0))},${-w/2+(e.padding??0)/2-(n.y-(n.top??0))})`),y(e,C),e.intersect=function(t){return F(e,b,t)},r}async function U(t,e){let{labelStyles:a,nodeStyles:l}=(0,i.GX)(e);e.labelStyle=a;let r=e.padding??0,n="neo"===e.look?16:r,s="neo"===e.look?12:r,{shapeSvg:h,bbox:o}=await c(t,e,f(e)),g=Math.max(20,(o.width+2*n)*1.25,e?.width??0),w=Math.max(5,o.height+2*s,e?.height??0),m=w/2,{cssStyles:x}=e,$=d.A.svg(h),b=(0,i.Fr)(e,{});"handDrawn"!==e.look&&(b.roughness=0,b.fillStyle="solid");let k=g-m,D=w/4,S=[{x:k,y:0},{x:D,y:0},{x:0,y:w/2},{x:D,y:w},{x:k,y:w},...p(-k,-w/2,m,50,270,90)],M=u(S),A=$.path(M,b),v=h.insert(()=>A,":first-child");return v.attr("class","basic label-container outer-path"),x&&"handDrawn"!==e.look&&v.selectChildren("path").attr("style",x),l&&"handDrawn"!==e.look&&v.selectChildren("path").attr("style",l),v.attr("transform",`translate(${-g/2}, ${-w/2})`),y(e,v),e.intersect=function(t){return F(e,S,t)},h}(0,h.K2)(P,"anchor"),(0,h.K2)(X,"generateArcPoints"),(0,h.K2)(G,"calculateArcSagitta"),(0,h.K2)(I,"bowTieRect"),(0,h.K2)(E,"insertPolygonShape"),(0,h.K2)(T,"card"),(0,h.K2)(W,"choice"),(0,h.K2)(H,"circle"),(0,h.K2)(j,"createLine"),(0,h.K2)(q,"crossedCircle"),(0,h.K2)(_,"generateCirclePoints"),(0,h.K2)(z,"curlyBraceLeft"),(0,h.K2)(Z,"generateCirclePoints"),(0,h.K2)(O,"curlyBraceRight"),(0,h.K2)(V,"generateCirclePoints"),(0,h.K2)(Y,"curlyBraces"),(0,h.K2)(U,"curvedTrapezoid");var J=(0,h.K2)((t,e,a,l,i,r)=>`M${t},${e+r} a${i},${r} 0,0,0 ${a},0 a${i},${r} 0,0,0 ${-a},0 l0,${l} a${i},${r} 0,0,0 ${a},0 l0,${-l}`,"createCylinderPathD"),Q=(0,h.K2)((t,e,a,l,i,r)=>`M${t},${e+r} M${t+a},${e+r} a${i},${r} 0,0,0 ${-a},0 l0,${l} a${i},${r} 0,0,0 ${a},0 l0,${-l}`,"createOuterCylinderPathD"),tt=(0,h.K2)((t,e,a,l,i,r)=>`M${t-a/2},${-l/2} a${i},${r} 0,0,0 ${a},0`,"createInnerCylinderPathD");async function te(t,e){let a,{labelStyles:l,nodeStyles:r}=(0,i.GX)(e);e.labelStyle=l;let s=e.padding??0,h="neo"===e.look?24:s,o="neo"===e.look?24:s;if(e.width||e.height){let t=e.width??0;e.width=(e.width??0)-o,e.width<8&&(e.width=8),e.height=(e.height??0)-h-t/2/(2.5+t/50)*3,e.height<8&&(e.height=8)}let{shapeSvg:g,bbox:u,label:w}=await c(t,e,f(e)),p=(e.width?e.width:u.width)+o,m=p/2,$=m/(2.5+p/50),b=(e.height?e.height:u.height)+h+$,{cssStyles:k}=e;if("handDrawn"===e.look){let t=d.A.svg(g),l=Q(0,0,p,b,m,$),r=tt(0,$,p,b,m,$),n=(0,i.Fr)(e,{}),s=t.path(l,n),h=t.path(r,(0,i.Fr)(e,{fill:"none"}));a=g.insert(()=>h,":first-child"),(a=g.insert(()=>s,":first-child")).attr("class","basic label-container"),k&&a.attr("style",k)}else{let t=J(0,0,p,b,m,$);a=g.insert("path",":first-child").attr("d",t).attr("class","basic label-container outer-path").attr("style",(0,n.KL)(k)).attr("style",r)}return a.attr("label-offset-y",$),a.attr("transform",`translate(${-p/2}, ${-(b/2+$)})`),y(e,a),w.attr("transform",`translate(${-(u.width/2)-(u.x-(u.left??0))}, ${-(u.height/2)+(e.padding??0)/1.5-(u.y-(u.top??0))})`),e.intersect=function(t){let a=x(e,t),l=a.x-(e.x??0);if(0!=m&&(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-$)){let i=$*$*(1-l*l/(m*m));i>0&&(i=Math.sqrt(i)),i=$-i,t.y-(e.y??0)>0&&(i=-i),a.y+=i}return a},g}async function ta(t,e,a){let l,{labelStyles:r,nodeStyles:s}=(0,i.GX)(e);e.labelStyle=r;let{shapeSvg:h,bbox:o}=await c(t,e,f(e)),g=Math.max(o.width+2*a.labelPaddingX,e?.width||0),u=Math.max(o.height+2*a.labelPaddingY,e?.height||0),w=-g/2,p=-u/2,{rx:m,ry:$}=e,{cssStyles:k}=e;if(a?.rx&&a.ry&&(m=a.rx,$=a.ry),"handDrawn"===e.look){let t=d.A.svg(h),a=(0,i.Fr)(e,{}),r=m||$?t.path(b(w,p,g,u,m||0),a):t.rectangle(w,p,g,u,a);(l=h.insert(()=>r,":first-child")).attr("class","basic label-container").attr("style",(0,n.KL)(k))}else(l=h.insert("rect",":first-child")).attr("class","basic label-container").attr("style",s).attr("rx",(0,n.KL)(m)).attr("ry",(0,n.KL)($)).attr("x",w).attr("y",p).attr("width",g).attr("height",u);return y(e,l),e.calcIntersect=function(t,e){return x(t,e)},e.intersect=function(t){return x(e,t)},h}async function tl(t,e){let{cssClasses:a,labelPaddingX:l,labelPaddingY:r,padding:n,width:s,height:h}=e,o=await ta(t,e,{rx:0,ry:0,classes:a??"",labelPaddingX:l??(n??0)*2,labelPaddingY:r??n??0});if("handDrawn"===e.look){let t=d.A.svg(o),a=(0,i.Fr)(e,{}),l=o.select(".basic.label-container > path:nth-child(2)"),r=l.node();if(!r)return o;let n=null;return r instanceof SVGGraphicsElement&&(n=r.getBBox(),o.insert(()=>t.line(n.x,n.y,n.x+n.width,n.y,a),".basic.label-container g.label"),o.insert(()=>t.line(n.x,n.y+n.height,n.x+n.width,n.y+n.height,a),".basic.label-container g.label"),l.remove()),o}let c=o.select(".basic.label-container"),g=(Number(c.attr("width"))||s)??0,y=(Number(c.attr("height"))||h)??0;return g>0&&y>0&&c.attr("stroke-dasharray",`${g} ${y}`),o}async function ti(t,e){let{labelStyles:a,nodeStyles:l}=(0,i.GX)(e);e.labelStyle=a;let r="neo"===e.look?16:e.padding??0,n="neo"===e.look?16:e.padding??0,{shapeSvg:s,bbox:h,label:o}=await c(t,e,f(e)),g=h.width+r,u=h.height+n,w=.2*u,p=-g/2,m=-u/2-w/2,{cssStyles:$}=e,b=d.A.svg(s),k=(0,i.Fr)(e,{});"handDrawn"!==e.look&&(k.roughness=0,k.fillStyle="solid");let D=b.polygon([{x:p,y:m+w},{x:-p,y:m+w},{x:-p,y:-m},{x:p,y:-m},{x:p,y:m},{x:-p,y:m},{x:-p,y:m+w}].map(t=>[t.x,t.y]),k),S=s.insert(()=>D,":first-child");return S.attr("class","basic label-container outer-path"),$&&"handDrawn"!==e.look&&S.selectAll("path").attr("style",$),l&&"handDrawn"!==e.look&&S.selectAll("path").attr("style",l),o.attr("transform",`translate(${p+(e.padding??0)/2-(h.x-(h.left??0))}, ${m+w+(e.padding??0)/2-(h.y-(h.top??0))})`),y(e,S),e.intersect=function(t){return x(e,t)},s}async function tr(t,e){let a,{labelStyles:l,nodeStyles:r}=(0,i.GX)(e),s="neo"===e.look?12:5;e.labelStyle=l;let o=e.padding??0,g="neo"===e.look?16:o,{shapeSvg:u,bbox:w}=await c(t,e,f(e)),p=(e?.width?e?.width/2:w.width/2)+(g??0),m=p-s,{cssStyles:x}=e;if("handDrawn"===e.look){let t=d.A.svg(u),l=(0,i.Fr)(e,{roughness:.2,strokeWidth:2.5}),r=(0,i.Fr)(e,{roughness:.2,strokeWidth:1.5}),s=t.circle(0,0,2*p,l),h=t.circle(0,0,2*m,r);(a=u.insert("g",":first-child")).attr("class",(0,n.KL)(e.cssClasses)).attr("style",(0,n.KL)(x)),a.node()?.appendChild(s),a.node()?.appendChild(h)}else{let t=(a=u.insert("g",":first-child")).insert("circle",":first-child"),e=a.insert("circle");a.attr("class","basic label-container").attr("style",r),t.attr("class","outer-circle").attr("style",r).attr("r",p).attr("cx",0).attr("cy",0),e.attr("class","inner-circle").attr("style",r).attr("r",m).attr("cx",0).attr("cy",0)}return y(e,a),e.intersect=function(t){return h.Rm.info("DoubleCircle intersect",e,p,t),N(e,p,t)},u}function tn(t,e,{config:{themeVariables:a}}){let{labelStyles:l,nodeStyles:r}=(0,i.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,i.Fr)(e,{fillStyle:"solid"});"handDrawn"!==e.look&&(g.roughness=0);let u=o.circle(0,0,14,g),w=n.insert(()=>u,":first-child");return w.selectAll("path").attr("style",`fill: ${c} !important;`),s&&s.length>0&&"handDrawn"!==e.look&&w.selectAll("path").attr("style",s),r&&"handDrawn"!==e.look&&w.selectAll("path").attr("style",r),y(e,w),e.intersect=function(t){return h.Rm.info("filledCircle intersect",e,{radius:7,point:t}),N(e,7,t)},n}async function ts(t,e){let{labelStyles:a,nodeStyles:l}=(0,i.GX)(e);e.labelStyle=a;let r=e.padding??0,n="neo"===e.look?2*r:r;(e.width||e.height)&&(e.height=e?.height??0,e.height<10&&(e.height=10),e.width=(e?.width??0)-n-n/2,e.width<10&&(e.width=10));let{shapeSvg:s,bbox:o,label:g}=await c(t,e,f(e)),w=(e?.width?e?.width:o.width)+(n??0),p=e?.height?e?.height:w+o.height,m=[{x:0,y:-p},{x:p,y:-p},{x:p/2,y:0}],{cssStyles:x}=e,$=d.A.svg(s),b=(0,i.Fr)(e,{});"handDrawn"!==e.look&&(b.roughness=0,b.fillStyle="solid");let k=u(m),D=$.path(k,b),S=s.insert(()=>D,":first-child").attr("transform",`translate(${-p/2}, ${p/2})`).attr("class","outer-path");return x&&"handDrawn"!==e.look&&S.selectChildren("path").attr("style",x),l&&"handDrawn"!==e.look&&S.selectChildren("path").attr("style",l),e.width=w,e.height=p,y(e,S),g.attr("transform",`translate(${-o.width/2-(o.x-(o.left??0))}, ${-p/2+(e.padding??0)/2+(o.y-(o.top??0))})`),e.intersect=function(t){return h.Rm.info("Triangle intersect",e,m,t),F(e,m,t)},s}function th(t,e,{dir:a,config:{state:l,themeVariables:r}}){let{nodeStyles:n}=(0,i.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,u=-1*c/2,w=d.A.svg(s),p=(0,i.Fr)(e,{stroke:r.lineColor,fill:r.lineColor});"handDrawn"!==e.look&&(p.roughness=0,p.fillStyle="solid");let m=w.rectangle(g,u,o,c,p),$=s.insert(()=>m,":first-child");h&&"handDrawn"!==e.look&&$.selectAll("path").attr("style",h),n&&"handDrawn"!==e.look&&$.selectAll("path").attr("style",n),y(e,$);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(e,t)},s}async function to(t,e){let{labelStyles:a,nodeStyles:l}=(0,i.GX)(e);e.labelStyle=a;let r="neo"===e.look?16:e.padding??0,n="neo"===e.look?12:e.padding??0;(e.width||e.height)&&(e.height=(e?.height??0)-2*n,e.height<10&&(e.height=10),e.width=(e?.width??0)-2*r,e.width<15&&(e.width=15));let{shapeSvg:s,bbox:o}=await c(t,e,f(e)),g=(e?.width?e?.width:Math.max(15,o.width))+2*r,w=(e?.height?e?.height:Math.max(10,o.height))+2*n,m=w/2,{cssStyles:x}=e,$=d.A.svg(s),b=(0,i.Fr)(e,{});"handDrawn"!==e.look&&(b.roughness=0,b.fillStyle="solid");let k=[{x:-g/2,y:-w/2},{x:g/2-m,y:-w/2},...p(-g/2+m,0,m,50,90,270),{x:g/2-m,y:w/2},{x:-g/2,y:w/2}],D=u(k),S=$.path(D,b),M=s.insert(()=>S,":first-child");return M.attr("class","basic label-container outer-path"),x&&"handDrawn"!==e.look&&M.selectChildren("path").attr("style",x),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:m,point:t}),F(e,k,t)},s}(0,h.K2)(te,"cylinder"),(0,h.K2)(ta,"drawRect"),(0,h.K2)(tl,"datastore"),(0,h.K2)(ti,"dividedRectangle"),(0,h.K2)(tr,"doublecircle"),(0,h.K2)(tn,"filledCircle"),(0,h.K2)(ts,"flippedTriangle"),(0,h.K2)(th,"forkJoin"),(0,h.K2)(to,"halfRoundedRectangle");var td=(0,h.K2)((t,e,a,l,i)=>`M${t+i},${e} L${t+a-i},${e} L${t+a},${e-l/2} L${t+a-i},${e-l} L${t+i},${e-l} L${t},${e-l/2} Z`,"createHexagonPathD");async function tc(t,e){let a,{labelStyles:l,nodeStyles:r}=(0,i.GX)(e),n="neo"===e.look?3.5:4;e.labelStyle=l;let s=e.padding??0,h="neo"===e.look?70:s,o="neo"===e.look?32:s;if(e.width||e.height){let t=e.height??0;e.width=(e?.width??0)-t/n*2-o,e.height=(e.height??0)-h}let{shapeSvg:g,bbox:u}=await c(t,e,f(e)),w=(e?.height?e?.height:u.height)+h,p=w/n,m=(e?.width?e?.width:u.width)+2*p+o,x=[{x:p,y:0},{x:m-p,y:0},{x:m,y:-w/2},{x:m-p,y:-w},{x:p,y:-w},{x:0,y:-w/2}],{cssStyles:$}=e;if("handDrawn"===e.look){let t=d.A.svg(g),l=(0,i.Fr)(e,{}),r=td(0,0,m,w,p),n=t.path(r,l);a=g.insert(()=>n,":first-child").attr("transform",`translate(${-m/2}, ${w/2})`),$&&a.attr("style",$)}else a=E(g,m,w,x);return r&&a.attr("style",r),e.width=m,e.height=w,y(e,a),e.intersect=function(t){return F(e,x,t)},g}async function tg(t,e){let{labelStyles:a,nodeStyles:l}=(0,i.GX)(e);e.label="",e.labelStyle=a;let{shapeSvg:r}=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(r),w=(0,i.Fr)(e,{});"handDrawn"!==e.look&&(w.roughness=0,w.fillStyle="solid");let p=[{x:0,y:0},{x:n,y:0},{x:0,y:s},{x:n,y:s}],m=u(p),x=g.path(m,w),$=r.insert(()=>x,":first-child");return $.attr("class","basic label-container outer-path"),o&&"handDrawn"!==e.look&&$.selectChildren("path").attr("style",o),l&&"handDrawn"!==e.look&&$.selectChildren("path").attr("style",l),$.attr("transform",`translate(${-n/2}, ${-s/2})`),y(e,$),e.intersect=function(t){return h.Rm.info("Pill intersect",e,{points:p}),F(e,p,t)},r}async function ty(t,e,{config:{themeVariables:a,flowchart:l}}){let{labelStyles:n}=(0,i.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"),u="t"===e.pos,{nodeBorder:w}=a,{stylesMap:p}=(0,i.WW)(e),m=-s/2,$=-s/2,b=8*!!e.label,k=d.A.svg(o),D=(0,i.Fr)(e,{stroke:"none",fill:"none"});"handDrawn"!==e.look&&(D.roughness=0,D.fillStyle="solid");let S=k.rectangle(m,$,s,s,D),M=Math.max(s,g.width),A=s+g.height+b,v=k.rectangle(-M/2,-A/2,M,A,{...D,fill:"transparent",stroke:"none"}),K=o.insert(()=>S,":first-child"),B=o.insert(()=>v);if(e.icon){let t=o.append("g");t.html(`<g>${await (0,r.WY)(e.icon,{height:s,width:s,fallbackPrefix:""})}</g>`);let a=t.node().getBBox(),l=a.width,i=a.height,n=a.x,h=a.y;t.attr("transform",`translate(${-l/2-n},${u?g.height/2+b/2-i/2-h:-g.height/2-b/2-i/2-h})`),t.attr("style",`color: ${p.get("stroke")??w};`)}return f.attr("transform",`translate(${-g.width/2-(g.x-(g.left??0))},${u?-A/2:A/2-g.height})`),K.attr("transform",`translate(0,${u?g.height/2+b/2:-g.height/2-b/2})`),y(e,B),e.intersect=function(t){if(h.Rm.info("iconSquare intersect",e,t),!e.label)return x(e,t);let a=e.x??0,l=e.y??0,i=e.height??0,r=[];return F(e,r=u?[{x:a-g.width/2,y:l-i/2},{x:a+g.width/2,y:l-i/2},{x:a+g.width/2,y:l-i/2+g.height+b},{x:a+s/2,y:l-i/2+g.height+b},{x:a+s/2,y:l+i/2},{x:a-s/2,y:l+i/2},{x:a-s/2,y:l-i/2+g.height+b},{x:a-g.width/2,y:l-i/2+g.height+b}]:[{x:a-s/2,y:l-i/2},{x:a+s/2,y:l-i/2},{x:a+s/2,y:l-i/2+s},{x:a+g.width/2,y:l-i/2+s},{x:a+g.width/2/2,y:l+i/2},{x:a-g.width/2,y:l+i/2},{x:a-g.width/2,y:l-i/2+s},{x:a-s/2,y:l-i/2+s}],t)},o}async function tf(t,e,{config:{themeVariables:a,flowchart:l}}){let{labelStyles:n}=(0,i.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"),u=8*!!e.label,w="t"===e.pos,{nodeBorder:p,mainBkg:m}=a,{stylesMap:$}=(0,i.WW)(e),b=d.A.svg(o),k=(0,i.Fr)(e,{});"handDrawn"!==e.look&&(k.roughness=0,k.fillStyle="solid"),k.stroke=$.get("fill")??m;let D=o.append("g");e.icon&&D.html(`<g>${await (0,r.WY)(e.icon,{height:s,width:s,fallbackPrefix:""})}</g>`);let S=D.node().getBBox(),M=S.width,A=S.height,v=S.x,K=S.y,B=Math.max(M,A)*Math.SQRT2+40,C=b.circle(0,0,B,k),N=Math.max(B,g.width),R=B+g.height+u,L=b.rectangle(-N/2,-R/2,N,R,{...k,fill:"transparent",stroke:"none"}),F=o.insert(()=>C,":first-child"),P=o.insert(()=>L);return D.attr("transform",`translate(${-M/2-v},${w?g.height/2+u/2-A/2-K:-g.height/2-u/2-A/2-K})`),D.attr("style",`color: ${$.get("stroke")??p};`),f.attr("transform",`translate(${-g.width/2-(g.x-(g.left??0))},${w?-R/2:R/2-g.height})`),F.attr("transform",`translate(0,${w?g.height/2+u/2:-g.height/2-u/2})`),y(e,P),e.intersect=function(t){return h.Rm.info("iconSquare intersect",e,t),x(e,t)},o}async function tu(t,e,{config:{themeVariables:a,flowchart:l}}){let{labelStyles:n}=(0,i.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:u}=await c(t,e,"icon-shape default"),w="t"===e.pos,p=s+2*f,m=s+2*f,{nodeBorder:$,mainBkg:k}=a,{stylesMap:D}=(0,i.WW)(e),S=8*!!e.label,M=d.A.svg(o),A=(0,i.Fr)(e,{});"handDrawn"!==e.look&&(A.roughness=0,A.fillStyle="solid"),A.stroke=D.get("fill")??k;let v=M.path(b(-m/2,-p/2,m,p,5),A),K=Math.max(m,g.width),B=p+g.height+S,C=M.rectangle(-K/2,-B/2,K,B,{...A,fill:"transparent",stroke:"none"}),N=o.insert(()=>v,":first-child").attr("class","icon-shape2"),R=o.insert(()=>C);if(e.icon){let t=o.append("g");t.html(`<g>${await (0,r.WY)(e.icon,{height:s,width:s,fallbackPrefix:""})}</g>`);let a=t.node().getBBox(),l=a.width,i=a.height,n=a.x,h=a.y;t.attr("transform",`translate(${-l/2-n},${w?g.height/2+S/2-i/2-h:-g.height/2-S/2-i/2-h})`),t.attr("style",`color: ${D.get("stroke")??$};`)}return u.attr("transform",`translate(${-g.width/2-(g.x-(g.left??0))},${w?-B/2:B/2-g.height})`),N.attr("transform",`translate(0,${w?g.height/2+S/2:-g.height/2-S/2})`),y(e,R),e.intersect=function(t){if(h.Rm.info("iconSquare intersect",e,t),!e.label)return x(e,t);let a=e.x??0,l=e.y??0,i=e.height??0,r=[];return F(e,r=w?[{x:a-g.width/2,y:l-i/2},{x:a+g.width/2,y:l-i/2},{x:a+g.width/2,y:l-i/2+g.height+S},{x:a+m/2,y:l-i/2+g.height+S},{x:a+m/2,y:l+i/2},{x:a-m/2,y:l+i/2},{x:a-m/2,y:l-i/2+g.height+S},{x:a-g.width/2,y:l-i/2+g.height+S}]:[{x:a-m/2,y:l-i/2},{x:a+m/2,y:l-i/2},{x:a+m/2,y:l-i/2+p},{x:a+g.width/2,y:l-i/2+p},{x:a+g.width/2/2,y:l+i/2},{x:a-g.width/2,y:l+i/2},{x:a-g.width/2,y:l-i/2+p},{x:a-m/2,y:l-i/2+p}],t)},o}async function tw(t,e,{config:{themeVariables:a,flowchart:l}}){let{labelStyles:n}=(0,i.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:u}=await c(t,e,"icon-shape default"),w="t"===e.pos,p=s+2*f,m=s+2*f,{nodeBorder:$,mainBkg:k}=a,{stylesMap:D}=(0,i.WW)(e),S=8*!!e.label,M=d.A.svg(o),A=(0,i.Fr)(e,{});"handDrawn"!==e.look&&(A.roughness=0,A.fillStyle="solid"),A.stroke=D.get("fill")??k;let v=M.path(b(-m/2,-p/2,m,p,.1),A),K=Math.max(m,g.width),B=p+g.height+S,C=M.rectangle(-K/2,-B/2,K,B,{...A,fill:"transparent",stroke:"none"}),N=o.insert(()=>v,":first-child"),R=o.insert(()=>C);if(e.icon){let t=o.append("g");t.html(`<g>${await (0,r.WY)(e.icon,{height:s,width:s,fallbackPrefix:""})}</g>`);let a=t.node().getBBox(),l=a.width,i=a.height,n=a.x,h=a.y;t.attr("transform",`translate(${-l/2-n},${w?g.height/2+S/2-i/2-h:-g.height/2-S/2-i/2-h})`),t.attr("style",`color: ${D.get("stroke")??$};`)}return u.attr("transform",`translate(${-g.width/2-(g.x-(g.left??0))},${w?-B/2:B/2-g.height})`),N.attr("transform",`translate(0,${w?g.height/2+S/2:-g.height/2-S/2})`),y(e,R),e.intersect=function(t){if(h.Rm.info("iconSquare intersect",e,t),!e.label)return x(e,t);let a=e.x??0,l=e.y??0,i=e.height??0,r=[];return F(e,r=w?[{x:a-g.width/2,y:l-i/2},{x:a+g.width/2,y:l-i/2},{x:a+g.width/2,y:l-i/2+g.height+S},{x:a+m/2,y:l-i/2+g.height+S},{x:a+m/2,y:l+i/2},{x:a-m/2,y:l+i/2},{x:a-m/2,y:l-i/2+g.height+S},{x:a-g.width/2,y:l-i/2+g.height+S}]:[{x:a-m/2,y:l-i/2},{x:a+m/2,y:l-i/2},{x:a+m/2,y:l-i/2+p},{x:a+g.width/2,y:l-i/2+p},{x:a+g.width/2/2,y:l+i/2},{x:a-g.width/2,y:l+i/2},{x:a-g.width/2,y:l-i/2+p},{x:a-m/2,y:l-i/2+p}],t)},o}async function tp(t,e,{config:{flowchart:a}}){let l=new Image;l.src=e?.img??"",await l.decode();let r=Number(l.naturalWidth.toString().replace("px","")),n=Number(l.naturalHeight.toString().replace("px",""));e.imageAspectRatio=r/n;let{labelStyles:s}=(0,i.GX)(e);e.labelStyle=s;let o=a?.wrappingWidth;e.defaultWidth=a?.wrappingWidth;let g=Math.max(e.label?o??0:0,e?.assetWidth??r),f="on"===e.constraint&&e?.assetHeight?e.assetHeight*e.imageAspectRatio:g,u="on"===e.constraint?f/e.imageAspectRatio:e?.assetHeight??n;e.width=Math.max(f,o??0);let{shapeSvg:w,bbox:p,label:m}=await c(t,e,"image-shape default"),$="t"===e.pos,b=-f/2,k=8*!!e.label,D=d.A.svg(w),S=(0,i.Fr)(e,{});"handDrawn"!==e.look&&(S.roughness=0,S.fillStyle="solid");let M=D.rectangle(b,-u/2,f,u,S),A=Math.max(f,p.width),v=u+p.height+k,K=D.rectangle(-A/2,-v/2,A,v,{...S,fill:"none",stroke:"none"}),B=w.insert(()=>M,":first-child"),C=w.insert(()=>K);if(e.img){let t=w.append("image");t.attr("href",e.img),t.attr("width",f),t.attr("height",u),t.attr("preserveAspectRatio","none"),t.attr("transform",`translate(${-f/2},${$?v/2-u:-v/2})`)}return m.attr("transform",`translate(${-p.width/2-(p.x-(p.left??0))},${$?-u/2-p.height/2-k/2:u/2-p.height/2+k/2})`),B.attr("transform",`translate(0,${$?p.height/2+k/2:-p.height/2-k/2})`),y(e,C),e.intersect=function(t){if(h.Rm.info("iconSquare intersect",e,t),!e.label)return x(e,t);let a=e.x??0,l=e.y??0,i=e.height??0,r=[];return F(e,r=$?[{x:a-p.width/2,y:l-i/2},{x:a+p.width/2,y:l-i/2},{x:a+p.width/2,y:l-i/2+p.height+k},{x:a+f/2,y:l-i/2+p.height+k},{x:a+f/2,y:l+i/2},{x:a-f/2,y:l+i/2},{x:a-f/2,y:l-i/2+p.height+k},{x:a-p.width/2,y:l-i/2+p.height+k}]:[{x:a-f/2,y:l-i/2},{x:a+f/2,y:l-i/2},{x:a+f/2,y:l-i/2+u},{x:a+p.width/2,y:l-i/2+u},{x:a+p.width/2/2,y:l+i/2},{x:a-p.width/2,y:l+i/2},{x:a-p.width/2,y:l-i/2+u},{x:a-f/2,y:l-i/2+u}],t)},w}async function tm(t,e){let a,{labelStyles:l,nodeStyles:r}=(0,i.GX)(e);e.labelStyle=l;let n=e.padding??0,s="neo"===e.look?2*n:n,{shapeSvg:h,bbox:o}=await c(t,e,f(e)),g=Math.max(o.width+(s??0)*2,e?.width??0),w=Math.max(o.height+(n??0)*2,e?.height??0),p=[{x:0,y:0},{x:g,y:0},{x:g+3*w/6,y:-w},{x:-3*w/6,y:-w}],{cssStyles:m}=e;if("handDrawn"===e.look){let t=d.A.svg(h),l=(0,i.Fr)(e,{}),r=u(p),n=t.path(r,l);a=h.insert(()=>n,":first-child").attr("transform",`translate(${-g/2}, ${w/2})`),m&&a.attr("style",m)}else a=E(h,g,w,p);return r&&a.attr("style",r),e.width=g,e.height=w,y(e,a),e.intersect=function(t){return F(e,p,t)},h}async function tx(t,e){let{shapeSvg:a,bbox:l,label:i}=await c(t,e,"label"),r=a.insert("rect",":first-child");return r.attr("width",.1).attr("height",.1),a.attr("class","label edgeLabel"),i.attr("transform",`translate(${-(l.width/2)-(l.x-(l.left??0))}, ${-(l.height/2)-(l.y-(l.top??0))})`),y(e,r),e.intersect=function(t){return x(e,t)},a}async function t$(t,e){let a,{labelStyles:l,nodeStyles:r}=(0,i.GX)(e);e.labelStyle=l;let n=e.padding??0,s="neo"===e.look?2*n:n,{shapeSvg:h,bbox:o}=await c(t,e,f(e)),g=(e?.height??o.height)+n,w=(e?.width??o.width)+s,p=[{x:0,y:0},{x:w+3*g/6,y:0},{x:w,y:-g},{x:-(3*g)/6,y:-g}],{cssStyles:m}=e;if("handDrawn"===e.look){let t=d.A.svg(h),l=(0,i.Fr)(e,{}),r=u(p),n=t.path(r,l);a=h.insert(()=>n,":first-child").attr("transform",`translate(${-w/2}, ${g/2})`),m&&a.attr("style",m)}else a=E(h,w,g,p);return r&&a.attr("style",r),e.width=w,e.height=g,y(e,a),e.intersect=function(t){return F(e,p,t)},h}async function tb(t,e){let a,{labelStyles:l,nodeStyles:r}=(0,i.GX)(e);e.labelStyle=l;let n=e.padding??0,s="neo"===e.look?2*n:n,{shapeSvg:h,bbox:o}=await c(t,e,f(e)),g=(e?.height??o.height)+n,w=(e?.width??o.width)+s,p=[{x:-3*g/6,y:0},{x:w,y:0},{x:w+3*g/6,y:-g},{x:0,y:-g}],{cssStyles:m}=e;if("handDrawn"===e.look){let t=d.A.svg(h),l=(0,i.Fr)(e,{}),r=u(p),n=t.path(r,l);a=h.insert(()=>n,":first-child").attr("transform",`translate(${-w/2}, ${g/2})`),m&&a.attr("style",m)}else a=E(h,w,g,p);return r&&a.attr("style",r),e.width=w,e.height=g,y(e,a),e.intersect=function(t){return F(e,p,t)},h}function tk(t,e){let{labelStyles:a,nodeStyles:l}=(0,i.GX)(e);e.label="",e.labelStyle=a;let r=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(r),w=(0,i.Fr)(e,{});"handDrawn"!==e.look&&(w.roughness=0,w.fillStyle="solid");let p=u(c),m=g.path(p,w),x=r.insert(()=>m,":first-child");return x.attr("class","outer-path"),n&&"handDrawn"!==e.look&&x.selectAll("path").attr("style",n),l&&"handDrawn"!==e.look&&x.selectAll("path").attr("style",l),x.attr("transform",`translate(-${s/2},${-o})`),y(e,x),e.intersect=function(t){return h.Rm.info("lightningBolt intersect",e,t),F(e,c,t)},r}(0,h.K2)(tc,"hexagon"),(0,h.K2)(tg,"hourglass"),(0,h.K2)(ty,"icon"),(0,h.K2)(tf,"iconCircle"),(0,h.K2)(tu,"iconRounded"),(0,h.K2)(tw,"iconSquare"),(0,h.K2)(tp,"imageSquare"),(0,h.K2)(tm,"inv_trapezoid"),(0,h.K2)(tx,"labelRect"),(0,h.K2)(t$,"lean_left"),(0,h.K2)(tb,"lean_right"),(0,h.K2)(tk,"lightningBolt");var tD=(0,h.K2)((t,e,a,l,i,r,n)=>`M${t},${e+r} a${i},${r} 0,0,0 ${a},0 a${i},${r} 0,0,0 ${-a},0 l0,${l} a${i},${r} 0,0,0 ${a},0 l0,${-l} M${t},${e+r+n} a${i},${r} 0,0,0 ${a},0`,"createCylinderPathD"),tS=(0,h.K2)((t,e,a,l,i,r,n)=>`M${t},${e+r} M${t+a},${e+r} a${i},${r} 0,0,0 ${-a},0 l0,${l} a${i},${r} 0,0,0 ${a},0 l0,${-l} M${t},${e+r+n} a${i},${r} 0,0,0 ${a},0`,"createOuterCylinderPathD"),tM=(0,h.K2)((t,e,a,l,i,r)=>`M${t-a/2},${-l/2} a${i},${r} 0,0,0 ${a},0`,"createInnerCylinderPathD");async function tA(t,e){let a,{labelStyles:l,nodeStyles:r}=(0,i.GX)(e);e.labelStyle=l;let s=e.padding??0,h="neo"===e.look?16:s,o="neo"===e.look?24:s;if(e.width||e.height){let t=e.width??0;e.width=(e.width??0)-h,e.width<10&&(e.width=10),e.height=(e.height??0)-o-t/2/(2.5+t/50)*3,e.height<10&&(e.height=10)}let{shapeSvg:g,bbox:u,label:w}=await c(t,e,f(e)),p=(e?.width?e?.width:u.width)+2*h,m=p/2,$=m/(2.5+p/50),b=(e?.height?e?.height:u.height)+$+2*o,k=.1*b,{cssStyles:D}=e;if("handDrawn"===e.look){let t=d.A.svg(g),l=tS(0,0,p,b,m,$,k),r=tM(0,$,p,b,m,$),n=(0,i.Fr)(e,{}),s=t.path(l,n),h=t.path(r,n);g.insert(()=>h,":first-child").attr("class","line"),(a=g.insert(()=>s,":first-child")).attr("class","basic label-container"),D&&a.attr("style",D)}else{let t=tD(0,0,p,b,m,$,k);a=g.insert("path",":first-child").attr("d",t).attr("class","basic label-container outer-path").attr("style",(0,n.KL)(D)).attr("style",r)}return a.attr("label-offset-y",$),a.attr("transform",`translate(${-p/2}, ${-(b/2+$)})`),y(e,a),w.attr("transform",`translate(${-(u.width/2)-(u.x-(u.left??0))}, ${-(u.height/2)+$-(u.y-(u.top??0))})`),e.intersect=function(t){let a=x(e,t),l=a.x-(e.x??0);if(0!=m&&(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-$)){let i=$*$*(1-l*l/(m*m));i>0&&(i=Math.sqrt(i)),i=$-i,t.y-(e.y??0)>0&&(i=-i),a.y+=i}return a},g}async function tv(t,e){let{labelStyles:a,nodeStyles:l}=(0,i.GX)(e);e.labelStyle=a;let r=e.padding??0,n="neo"===e.look?16:r,s="neo"===e.look?12:r;if(e.width||e.height){let t=e.width;e.width=(t??0)*10/11-2*n,e.width<10&&(e.width=10),e.height=(e?.height??0)-2*s,e.height<10&&(e.height=10)}let{shapeSvg:h,bbox:o,label:g}=await c(t,e,f(e)),u=(e?.width?e?.width:o.width)+(n??0)*2,p=(e?.height?e?.height:o.height)+(s??0)*2,m="neo"===e.look?p/4:p/8,x=p+m,{cssStyles:$}=e,b=d.A.svg(h),k=(0,i.Fr)(e,{});"handDrawn"!==e.look&&(k.roughness=0,k.fillStyle="solid");let D=[{x:-u/2-u/2*.1,y:-x/2},{x:-u/2-u/2*.1,y:x/2},...w(-u/2-u/2*.1,x/2,u/2+u/2*.1,x/2,m,.8),{x:u/2+u/2*.1,y:-x/2},{x:-u/2-u/2*.1,y:-x/2},{x:-u/2,y:-x/2},{x:-u/2,y:x/2*1.1},{x:-u/2,y:-x/2}],S=b.polygon(D.map(t=>[t.x,t.y]),k),M=h.insert(()=>S,":first-child");return M.attr("class","basic label-container outer-path"),$&&"handDrawn"!==e.look&&M.selectAll("path").attr("style",$),l&&"handDrawn"!==e.look&&M.selectAll("path").attr("style",l),M.attr("transform",`translate(0,${-m/2})`),g.attr("transform",`translate(${-u/2+(e.padding??0)+u/2*.1/2-(o.x-(o.left??0))},${-p/2+(e.padding??0)-m/2-(o.y-(o.top??0))})`),y(e,M),e.intersect=function(t){return F(e,D,t)},h}async function tK(t,e){let{labelStyles:a,nodeStyles:l}=(0,i.GX)(e);e.labelStyle=a;let r=e.padding??0,n="neo"===e.look?16:r,s="neo"===e.look?12:r,h="neo"===e.look?10:5;(e.width||e.height)&&(e.width=Math.max((e?.width??0)-2*n-2*h,10),e.height=Math.max((e?.height??0)-2*s-2*h,10));let{shapeSvg:o,bbox:g,label:w}=await c(t,e,f(e)),p=(e?.width?e?.width:g.width)+2*n+2*h,x=(e?.height?e?.height:g.height)+2*s+2*h,$=p-2*h,b=x-2*h,k=-$/2,D=-b/2,{cssStyles:S}=e,M=d.A.svg(o),A=(0,i.Fr)(e,{}),v=[{x:k-h,y:D+h},{x:k-h,y:D+b+h},{x:k+$-h,y:D+b+h},{x:k+$-h,y:D+b},{x:k+$,y:D+b},{x:k+$,y:D+b-h},{x:k+$+h,y:D+b-h},{x:k+$+h,y:D-h},{x:k+h,y:D-h},{x:k+h,y:D},{x:k,y:D},{x:k,y:D+h}];"handDrawn"!==e.look&&(A.roughness=0,A.fillStyle="solid");let K=u(v),B=M.path(K,A),C=u([{x:k,y:D+h},{x:k+$-h,y:D+h},{x:k+$-h,y:D+b},{x:k+$,y:D+b},{x:k+$,y:D},{x:k,y:D}]),N=M.path(C,A);"handDrawn"!==e.look&&(B=m(B),N=m(N));let R=o.insert("g",":first-child");return R.insert(()=>B),R.insert(()=>N),R.attr("class","basic label-container outer-path"),S&&"handDrawn"!==e.look&&R.selectAll("path").attr("style",S),l&&"handDrawn"!==e.look&&R.selectAll("path").attr("style",l),w.attr("transform",`translate(${-(g.width/2)-h-(g.x-(g.left??0))}, ${-(g.height/2)+h-(g.y-(g.top??0))})`),y(e,R),e.intersect=function(t){return F(e,v,t)},o}async function tB(t,e){let{labelStyles:a,nodeStyles:l}=(0,i.GX)(e);e.labelStyle=a;let{shapeSvg:r,bbox:n,label:s}=await c(t,e,f(e)),h=e.padding??0,o="neo"===e.look?16:h,g="neo"===e.look?12:h,p=!0;(e.width||e.height)&&(p=!1,e.width=(e?.width??0)-2*o,e.height=(e?.height??0)-3*g);let m=Math.max(n.width,e?.width??0)+2*o,x=Math.max(n.height,e?.height??0)+3*g,$="neo"===e.look?x/4:x/8,b=x+(p?$/2:-$/2),k=-m/2,D=-b/2,{cssStyles:S}=e,M=w(k-10,D+b+10,k+m-10,D+b+10,$,.8),A=M?.[M.length-1],v=[{x:k-10,y:D+10},{x:k-10,y:D+b+10},...M,{x:k+m-10,y:A.y-10},{x:k+m,y:A.y-10},{x:k+m,y:A.y-20},{x:k+m+10,y:A.y-20},{x:k+m+10,y:D-10},{x:k+10,y:D-10},{x:k+10,y:D},{x:k,y:D},{x:k,y:D+10}],K=[{x:k,y:D+10},{x:k+m-10,y:D+10},{x:k+m-10,y:A.y-10},{x:k+m,y:A.y-10},{x:k+m,y:D},{x:k,y:D}],B=d.A.svg(r),C=(0,i.Fr)(e,{});"handDrawn"!==e.look&&(C.roughness=0,C.fillStyle="solid");let N=u(v),R=B.path(N,C),L=u(K),P=B.path(L,C),X=r.insert(()=>R,":first-child");return X.insert(()=>P),X.attr("class","basic label-container outer-path"),S&&"handDrawn"!==e.look&&X.selectAll("path").attr("style",S),l&&"handDrawn"!==e.look&&X.selectAll("path").attr("style",l),X.attr("transform",`translate(0,${-$/2})`),s.attr("transform",`translate(${-(n.width/2)-10-(n.x-(n.left??0))}, ${-(n.height/2)+10-$/2-(n.y-(n.top??0))})`),y(e,X),e.intersect=function(t){return F(e,v,t)},r}async function tC(t,e,{config:{themeVariables:a}}){let{labelStyles:l,nodeStyles:r}=(0,i.GX)(e);e.labelStyle=l,e.useHtmlLabels||(0,s.E)((0,s.zj)())||(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),u=Math.max(h.height+(e.padding??0)*2,e?.height??0),{cssStyles:w}=e,p=d.A.svg(n),m=(0,i.Fr)(e,{fill:a.noteBkgColor,stroke:a.noteBorderColor});"handDrawn"!==e.look&&(m.roughness=0,m.fillStyle="solid");let $=p.rectangle(-g/2,-u/2,g,u,m),b=n.insert(()=>$,":first-child");return b.attr("class","basic label-container outer-path"),o.attr("class","label noteLabel"),w&&"handDrawn"!==e.look&&b.selectAll("path").attr("style",w),r&&"handDrawn"!==e.look&&b.selectAll("path").attr("style",r),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(e,t)},n}(0,h.K2)(tA,"linedCylinder"),(0,h.K2)(tv,"linedWaveEdgedRect"),(0,h.K2)(tK,"multiRect"),(0,h.K2)(tB,"multiWaveEdgedRectangle"),(0,h.K2)(tC,"note");var tN=(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 tR(t,e){let a,{labelStyles:l,nodeStyles:r}=(0,i.GX)(e);e.labelStyle=l;let{shapeSvg:n,bbox:s}=await c(t,e,f(e)),h=s.width+(e.padding??0)+(s.height+(e.padding??0)),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,i.Fr)(e,{}),r=tN(0,0,h),s=t.path(r,l);a=n.insert(()=>s,":first-child").attr("transform",`translate(${-h/2+.5}, ${h/2})`),g&&a.attr("style",g)}else(a=E(n,h,h,o)).attr("transform",`translate(${-h/2+.5}, ${h/2})`);return r&&a.attr("style",r),y(e,a),e.calcIntersect=function(t,e){let a=t.width,l=F(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,i.GX)(e);e.labelStyle=a;let r=e.padding??0,n="neo"===e.look?21:r??0,s="neo"===e.look?12:r??0,{shapeSvg:h,bbox:o,label:g}=await c(t,e,f(e)),w=(e?.width??o.width)+("neo"===e.look?2*n:n),p=(e?.height??o.height)+("neo"===e.look?2*s:s),m=-w/2,x=-p/2,$=x/2,b=[{x:m+$,y:x},{x:m,y:0},{x:m+$,y:-x},{x:-m,y:-x},{x:-m,y:x}],{cssStyles:k}=e,D=d.A.svg(h),S=(0,i.Fr)(e,{});"handDrawn"!==e.look&&(S.roughness=0,S.fillStyle="solid");let M=u(b),A=D.path(M,S),v=h.insert(()=>A,":first-child");return v.attr("class","basic label-container outer-path"),k&&"handDrawn"!==e.look&&v.selectAll("path").attr("style",k),l&&"handDrawn"!==e.look&&v.selectAll("path").attr("style",l),v.attr("transform",`translate(${-$/2},0)`),g.attr("transform",`translate(${-$/2-o.width/2-(o.x-(o.left??0))}, ${-(o.height/2)-(o.y-(o.top??0))})`),y(e,v),e.intersect=function(t){return F(e,b,t)},h}async function tF(t,e){let a,l,r,{labelStyles:n,nodeStyles:c}=(0,i.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"),u=g.insert("g").attr("class","label").attr("style",c),w=e.description,p=e.label,m=await $(u,p,e.labelStyle,!0,!0),k={width:0,height:0};if((0,s.E)((0,s.D7)())){let t=m.children[0],e=(0,o.Ltv)(m);k=t.getBoundingClientRect(),e.attr("width",k.width),e.attr("height",k.height)}h.Rm.info("Text 2",w);let D=w||[],S=m.getBBox(),M=await $(u,Array.isArray(D)?D.join("<br/>"):D,e.labelStyle,!0,!0),A=M.children[0],v=(0,o.Ltv)(M);k=A.getBoundingClientRect(),v.attr("width",k.width),v.attr("height",k.height);let K=(e.padding||0)/2;(0,o.Ltv)(M).attr("transform","translate( "+(k.width>S.width?0:(S.width-k.width)/2)+", "+(S.height+K+5)+")"),(0,o.Ltv)(m).attr("transform","translate( "+(k.width<S.width?0:-(S.width-k.width)/2)+", 0)"),k=u.node().getBBox(),u.attr("transform","translate("+-k.width/2+", "+(-k.height/2-K+3)+")");let B=k.width+(e.padding||0),C=k.height+(e.padding||0),N=-k.width/2-K,R=-k.height/2-K;if("handDrawn"===e.look){let t=d.A.svg(g),a=(0,i.Fr)(e,{}),n=t.path(b(N,R,B,C,e.rx||0),a),s=t.line(-k.width/2-K,-k.height/2-K+S.height+K,k.width/2+K,-k.height/2-K+S.height+K,a);r=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"),r=f.insert("line"),l.attr("class","outer title-state").attr("style",c).attr("x",-k.width/2-K).attr("y",-k.height/2-K).attr("width",k.width+(e.padding||0)).attr("height",k.height+(e.padding||0)),r.attr("class","divider").attr("x1",-k.width/2-K).attr("x2",k.width/2+K).attr("y1",-k.height/2-K+S.height+K).attr("y2",-k.height/2-K+S.height+K);return y(e,l),e.intersect=function(t){return x(e,t)},g}async function tP(t,e,{config:{themeVariables:a}}){let l=a?.radius??5,i={rx:l,ry:l,classes:"",labelPaddingX:(e?.padding??0)*1,labelPaddingY:(e?.padding??0)*1};return ta(t,e,i)}async function tX(t,e){let{labelStyles:a,nodeStyles:l}=(0,i.GX)(e);e.labelStyle=a;let r="neo"===e.look?16:e.padding??0,s="neo"===e.look?12:e.padding??0,{shapeSvg:h,bbox:o,label:g}=await c(t,e,f(e)),u=(e?.width??o.width)+2*r+("neo"===e.look?8:16),w=(e?.height??o.height)+2*s,p=u-8,m=8-u/2,$=-w/2,{cssStyles:b}=e,k=d.A.svg(h),D=(0,i.Fr)(e,{});"handDrawn"!==e.look&&(D.roughness=0,D.fillStyle="solid");let S=k.polygon([{x:m,y:$},{x:m+p,y:$},{x:m+p,y:$+w},{x:m-8,y:$+w},{x:m-8,y:$},{x:m,y:$},{x:m,y:$+w}].map(t=>[t.x,t.y]),D),M=h.insert(()=>S,":first-child");return M.attr("class","basic label-container outer-path").attr("style",(0,n.KL)(b)),l&&"handDrawn"!==e.look&&M.selectAll("path").attr("style",l),b&&"handDrawn"!==e.look&&M.selectAll("path").attr("style",l),g.attr("transform",`translate(${4-o.width/2-(o.x-(o.left??0))}, ${-(o.height/2)-(o.y-(o.top??0))})`),y(e,M),e.intersect=function(t){return x(e,t)},h}async function tG(t,e){let{labelStyles:a,nodeStyles:l}=(0,i.GX)(e);e.labelStyle=a;let r=e.padding??0,n="neo"===e.look?16:r,s="neo"===e.look?12:r;(e.width||e.height)&&(e.width=Math.max((e?.width??0)-2*n,10),e.height=Math.max((e?.height??0)/1.5-2*s,10));let{shapeSvg:h,bbox:o,label:g}=await c(t,e,f(e)),w=(e?.width?e?.width:o.width)+2*n,p=((e?.height?e?.height:o.height)+2*s)*1.5/1.5,m=-w/2,x=-p/2,{cssStyles:$}=e,b=d.A.svg(h),k=(0,i.Fr)(e,{});"handDrawn"!==e.look&&(k.roughness=0,k.fillStyle="solid");let D=[{x:m,y:x},{x:m,y:x+p},{x:m+w,y:x+p},{x:m+w,y:x-p/2}],S=u(D),M=b.path(S,k),A=h.insert(()=>M,":first-child");return A.attr("class","basic label-container outer-path"),$&&"handDrawn"!==e.look&&A.selectChildren("path").attr("style",$),l&&"handDrawn"!==e.look&&A.selectChildren("path").attr("style",l),A.attr("transform",`translate(0, ${p/4})`),g.attr("transform",`translate(${-w/2+(e.padding??0)-(o.x-(o.left??0))}, ${-p/4+(e.padding??0)-(o.y-(o.top??0))})`),y(e,A),e.intersect=function(t){return F(e,D,t)},h}async function tI(t,e){let a=e.padding??0,l="neo"===e.look?16:2*a,i="neo"===e.look?12:a,r={rx:0,ry:0,classes:"",labelPaddingX:e.labelPaddingX??l,labelPaddingY:i};return ta(t,e,r)}async function tE(t,e){let{labelStyles:a,nodeStyles:l}=(0,i.GX)(e);e.labelStyle=a;let r=e.padding??0,n="neo"===e.look?20:r,s="neo"===e.look?12:r,{shapeSvg:h,bbox:o}=await c(t,e,f(e)),g=o.height+("neo"===e.look?2*s:s),w=o.width+g/4+("neo"===e.look?2*n:n),m=g/2,{cssStyles:x}=e,$=d.A.svg(h),b=(0,i.Fr)(e,{});"handDrawn"!==e.look&&(b.roughness=0,b.fillStyle="solid");let k=[{x:-w/2+m,y:-g/2},{x:w/2-m,y:-g/2},...p(-w/2+m,0,m,50,90,270),{x:w/2-m,y:g/2},...p(w/2-m,0,m,50,270,450)],D=u(k),S=$.path(D,b),M=h.insert(()=>S,":first-child");return M.attr("class","basic label-container outer-path"),x&&"handDrawn"!==e.look&&M.selectChildren("path").attr("style",x),l&&"handDrawn"!==e.look&&M.selectChildren("path").attr("style",l),y(e,M),e.intersect=function(t){return F(e,k,t)},h}async function tT(t,e){let a={rx:"neo"===e.look?3:5,ry:"neo"===e.look?3:5,classes:"flowchart-node"};return ta(t,e,a)}function tW(t,e,{config:{themeVariables:a}}){let{labelStyles:l,nodeStyles:r}=(0,i.GX)(e);e.labelStyle=l;let{cssStyles:n}=e,{lineColor:s,stateBorder:h,nodeBorder:o,nodeShadow:c}=a;(e.width||e.height)&&((e.width??0)<14&&(e.width=14),(e.height??0)<14&&(e.height=14)),e.width||(e.width=14),e.height||(e.height=14);let g=t.insert("g").attr("class","node default").attr("id",e.domId??e.id),f=d.A.svg(g),u=(0,i.Fr)(e,{});"handDrawn"!==e.look&&(u.roughness=0,u.fillStyle="solid");let w=f.circle(0,0,e.width,{...u,stroke:s,strokeWidth:2}),p=h??o,m=(e.width??0)*5/14,x=f.circle(0,0,m,{...u,fill:p,stroke:p,strokeWidth:2,fillStyle:"solid"}),$=g.insert(()=>w,":first-child");if($.insert(()=>x),"handDrawn"!==e.look&&$.attr("class","outer-path"),n&&$.selectAll("path").attr("style",n),r&&$.selectAll("path").attr("style",r),e.width<25&&c&&"handDrawn"!==e.look){let e=t.node()?.ownerSVGElement?.id??"",a=e?`${e}-drop-shadow-small`:"drop-shadow-small";$.attr("style",`filter:url(#${a})`)}return y(e,$),e.intersect=function(t){return N(e,(e.width??0)/2,t)},g}function tH(t,e,{config:{themeVariables:a}}){let l,{lineColor:r,nodeShadow:n}=a;(e.width||e.height)&&((e.width??0)<14&&(e.width=14),(e.height??0)<14&&(e.height=14)),e.width||(e.width=14),e.height||(e.height=14);let s=t.insert("g").attr("class","node default").attr("id",e.domId||e.id);if("handDrawn"===e.look){let t=d.A.svg(s).circle(0,0,e.width,(0,i.ue)(r));(l=s.insert(()=>t)).attr("class","state-start").attr("r",(e.width??7)/2).attr("width",e.width??14).attr("height",e.height??14)}else(l=s.insert("circle",":first-child")).attr("class","state-start").attr("r",(e.width??7)/2).attr("width",e.width??14).attr("height",e.height??14);if(e.width<25&&n&&"handDrawn"!==e.look){let e=t.node()?.ownerSVGElement?.id??"",a=e?`${e}-drop-shadow-small`:"drop-shadow-small";l.attr("style",`filter:url(#${a})`)}return y(e,l),e.intersect=function(t){return N(e,(e.width??7)/2,t)},s}async function tj(t,e){let{labelStyles:a,nodeStyles:l}=(0,i.GX)(e);e.labelStyle=a;let r=e?.padding??8,s="neo"===e.look?28:r,h="neo"===e.look?12:r,{shapeSvg:o,bbox:g}=await c(t,e,f(e)),u=(e?.width??g.width)+16+s,w=(e?.height??g.height)+h,p=u-16,m=-u/2,x=-w/2,$=[{x:0,y:0},{x:p,y:0},{x:p,y:-w},{x:0,y:-w},{x:0,y:0},{x:-8,y:0},{x:p+8,y:0},{x:p+8,y:-w},{x:-8,y:-w},{x:-8,y:0}];if("handDrawn"===e.look){let t=d.A.svg(o),a=(0,i.Fr)(e,{}),l=t.rectangle(m,x,p+16,w,a),r=t.line(m+8,x,m+8,x+w,a),s=t.line(m+8+p,x,m+8+p,x+w,a);o.insert(()=>r,":first-child"),o.insert(()=>s,":first-child");let h=o.insert(()=>l,":first-child"),{cssStyles:c}=e;h.attr("class","basic label-container").attr("style",(0,n.KL)(c)),y(e,h)}else{let t=E(o,p,w,$);l&&t.attr("style",l),y(e,t)}return e.intersect=function(t){return F(e,$,t)},o}async function tq(t,e){let{labelStyles:a,nodeStyles:l}=(0,i.GX)(e);e.labelStyle=a;let r=e.padding??0,n="neo"===e.look?16:r,s="neo"===e.look?12:r;(e.width||e.height)&&(e.height=Math.max((e?.height??0)-2*s,10),e.width=Math.max((e?.width??0)-2*n-.2*(e.height+2*s),10));let{shapeSvg:h,bbox:o}=await c(t,e,f(e)),g=(e?.height?e?.height:o.height)+2*s,w=.2*g,p=(e?.width?e?.width:o.width)+2*n+w-w,m=-p/2,x=-g/2,{cssStyles:$}=e,b=d.A.svg(h),k=(0,i.Fr)(e,{}),D=[{x:m-w/2,y:x},{x:m+p+w/2,y:x},{x:m+p+w/2,y:x+g},{x:m-w/2,y:x+g}];"handDrawn"!==e.look&&(k.roughness=0,k.fillStyle="solid");let S=u(D),M=b.path(S,k),A=u([{x:m+p-w/2,y:x+g},{x:m+p+w/2,y:x+g},{x:m+p+w/2,y:x+g-.2*g}]),v=b.path(A,{...k,fillStyle:"solid"}),K=h.insert(()=>v,":first-child");return K.insert(()=>M,":first-child"),K.attr("class","basic label-container outer-path"),$&&"handDrawn"!==e.look&&K.selectAll("path").attr("style",$),l&&"handDrawn"!==e.look&&K.selectAll("path").attr("style",l),y(e,K),e.intersect=function(t){return F(e,D,t)},h}async function t_(t,e){let{labelStyles:a,nodeStyles:l}=(0,i.GX)(e);e.labelStyle=a;let{shapeSvg:r,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/8,p=.2*h,m=.2*o,x=o+g,{cssStyles:$}=e,b=d.A.svg(r),k=(0,i.Fr)(e,{});"handDrawn"!==e.look&&(k.roughness=0,k.fillStyle="solid");let D=[{x:-h/2-h/2*.1,y:x/2},...w(-h/2-h/2*.1,x/2,h/2+h/2*.1,x/2,g,.8),{x:h/2+h/2*.1,y:-x/2},{x:-h/2-h/2*.1,y:-x/2}],S=-h/2+h/2*.1,M=-x/2-.4*m,A=[{x:S+h-p,y:(M+o)*1.3},{x:S+h,y:M+o-m},{x:S+h,y:(M+o)*.9},...w(S+h,(M+o)*1.25,S+h-p,(M+o)*1.3,-(.02*o),.5)],v=u(D),K=b.path(v,k),B=u(A),C=b.path(B,{...k,fillStyle:"solid"}),N=r.insert(()=>C,":first-child");return N.insert(()=>K,":first-child"),N.attr("class","basic label-container outer-path"),$&&"handDrawn"!==e.look&&N.selectAll("path").attr("style",$),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 F(e,D,t)},r}async function tz(t,e){let{labelStyles:a,nodeStyles:l}=(0,i.GX)(e);e.labelStyle=a;let{shapeSvg:r,bbox:n}=await c(t,e,f(e)),s=Math.max(n.width+(e.padding??0),e?.width||0),h=Math.max(n.height+(e.padding??0),e?.height||0),o=r.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(e,t)},r}(0,h.K2)(tR,"question"),(0,h.K2)(tL,"rect_left_inv_arrow"),(0,h.K2)(tF,"rectWithTitle"),(0,h.K2)(tP,"roundedRect"),(0,h.K2)(tX,"shadedProcess"),(0,h.K2)(tG,"slopedRect"),(0,h.K2)(tI,"squareRect"),(0,h.K2)(tE,"stadium"),(0,h.K2)(tT,"state"),(0,h.K2)(tW,"stateEnd"),(0,h.K2)(tH,"stateStart"),(0,h.K2)(tj,"subroutine"),(0,h.K2)(tq,"taggedRect"),(0,h.K2)(t_,"taggedWaveEdgedRectangle"),(0,h.K2)(tz,"text");var tZ=(0,h.K2)((t,e,a,l,i,r)=>`M${t},${e}
3
+ a${i},${r} 0,0,1 0,${-l}
4
+ l${a},0
5
+ a${i},${r} 0,0,1 0,${l}
6
+ M${a},${-l}
7
+ a${i},${r} 0,0,0 0,${l}
8
+ l${-a},0`,"createCylinderPathD"),tO=(0,h.K2)((t,e,a,l,i,r)=>`M${t},${e} M${t+a},${e} a${i},${r} 0,0,0 0,${-l} l${-a},0 a${i},${r} 0,0,0 0,${l} l${a},0`,"createOuterCylinderPathD"),tV=(0,h.K2)((t,e,a,l,i,r)=>`M${t+a/2},${-l/2} a${i},${r} 0,0,0 0,${l}`,"createInnerCylinderPathD");async function tY(t,e){let a,{labelStyles:l,nodeStyles:r}=(0,i.GX)(e);e.labelStyle=l;let s=e.padding??0,h="neo"===e.look?12:s/2;if(e.width||e.height){let t=e.height??0;e.height=(e.height??0)-h,e.height<5&&(e.height=5),e.width=(e.width??0)-h-t/2/(2.5+t/50)*3,e.width<10&&(e.width=10)}let{shapeSvg:o,bbox:g,label:u}=await c(t,e,f(e)),w=(e.height?e.height:g.height)+h,p=w/2,m=p/(2.5+w/50),$=(e.width?e.width:g.width)+m+h,{cssStyles:b}=e;if("handDrawn"===e.look){let t=d.A.svg(o),l=tO(0,0,$,w,m,p),r=tV(0,0,$,w,m,p),n=t.path(l,(0,i.Fr)(e,{})),s=t.path(r,(0,i.Fr)(e,{fill:"none"}));a=o.insert(()=>s,":first-child"),(a=o.insert(()=>n,":first-child")).attr("class","basic label-container"),b&&a.attr("style",b)}else{let t=tZ(0,0,$,w,m,p);(a=o.insert("path",":first-child").attr("d",t).attr("class","basic label-container").attr("style",(0,n.KL)(b)).attr("style",r)).attr("class","basic label-container outer-path"),b&&a.selectAll("path").attr("style",b),r&&a.selectAll("path").attr("style",r)}return a.attr("label-offset-x",m),a.attr("transform",`translate(${-$/2}, ${w/2} )`),u.attr("transform",`translate(${-(g.width/2)-m-(g.x-(g.left??0))}, ${-(g.height/2)-(g.y-(g.top??0))})`),y(e,a),e.intersect=function(t){let a=x(e,t),l=a.y-(e.y??0);if(0!=p&&(Math.abs(l)<(e.height??0)/2||Math.abs(l)==(e.height??0)/2&&Math.abs(a.x-(e.x??0))>(e.width??0)/2-m)){let i=m*m*(1-l*l/(p*p));0!=i&&(i=Math.sqrt(Math.abs(i))),i=m-i,t.x-(e.x??0)>0&&(i=-i),a.x+=i}return a},o}async function tU(t,e){let a,{labelStyles:l,nodeStyles:r}=(0,i.GX)(e);e.labelStyle=l;let n=e.padding??0,s=(e.look,n),h="neo"===e.look?2*n:n,{shapeSvg:o,bbox:g}=await c(t,e,f(e)),w=(e?.height??g.height)+s,p=(e?.width??g.width)+h,m=[{x:-3*w/6,y:0},{x:p+3*w/6,y:0},{x:p,y:-w},{x:0,y:-w}],{cssStyles:x}=e;if("handDrawn"===e.look){let t=d.A.svg(o),l=(0,i.Fr)(e,{}),r=u(m),n=t.path(r,l);a=o.insert(()=>n,":first-child").attr("transform",`translate(${-p/2}, ${w/2})`),x&&a.attr("style",x)}else a=E(o,p,w,m);return r&&a.attr("style",r),e.width=p,e.height=w,y(e,a),e.intersect=function(t){return F(e,m,t)},o}async function tJ(t,e){let{labelStyles:a,nodeStyles:l}=(0,i.GX)(e);e.labelStyle=a;let r=e.padding??0,n="neo"===e.look?16:r,s="neo"===e.look?12:r;(e.width||e.height)&&(e.height=(e.height??0)-2*s,e.height<5&&(e.height=5),e.width=(e.width??0)-2*n,e.width<15&&(e.width=15));let{shapeSvg:h,bbox:o}=await c(t,e,f(e)),g=(e?.width?e?.width:o.width)+2*n,w=(e?.height?e?.height:o.height)+2*s,{cssStyles:p}=e,m=d.A.svg(h),x=(0,i.Fr)(e,{});"handDrawn"!==e.look&&(x.roughness=0,x.fillStyle="solid");let $=[{x:-g/2*.8,y:-w/2},{x:g/2*.8,y:-w/2},{x:g/2,y:-w/2*.6},{x:g/2,y:w/2},{x:-g/2,y:w/2},{x:-g/2,y:-w/2*.6}],b=u($),k=m.path(b,x),D=h.insert(()=>k,":first-child");return D.attr("class","basic label-container outer-path"),p&&"handDrawn"!==e.look&&D.selectChildren("path").attr("style",p),l&&"handDrawn"!==e.look&&D.selectChildren("path").attr("style",l),y(e,D),e.intersect=function(t){return F(e,$,t)},h}async function tQ(t,e){let{labelStyles:a,nodeStyles:l}=(0,i.GX)(e);e.labelStyle=a;let r=e.padding??0,n="neo"===e.look?2*r:r;(e.width||e.height)&&(e.width=((e?.width??0)-n)/2,e.width<10&&(e.width=10),e.height=e?.height??0,e.height<10&&(e.height=10));let{shapeSvg:o,bbox:g,label:w}=await c(t,e,f(e)),p=(0,s._3)((0,s.D7)().flowchart?.htmlLabels),m=(e?.width?e?.width:g.width)+n,x=e?.height?e?.height:m+g.height,$=[{x:0,y:0},{x:x,y:0},{x:x/2,y:-x}],{cssStyles:b}=e,k=d.A.svg(o),D=(0,i.Fr)(e,{});"handDrawn"!==e.look&&(D.roughness=0,D.fillStyle="solid");let S=u($),M=k.path(S,D),A=o.insert(()=>M,":first-child").attr("transform",`translate(${-x/2}, ${x/2})`).attr("class","outer-path");return b&&"handDrawn"!==e.look&&A.selectChildren("path").attr("style",b),l&&"handDrawn"!==e.look&&A.selectChildren("path").attr("style",l),e.width=m,e.height=x,y(e,A),w.attr("transform",`translate(${-g.width/2-(g.x-(g.left??0))}, ${x/2-(g.height+(e.padding??0)/(p?2:1)-(g.y-(g.top??0)))})`),e.intersect=function(t){return h.Rm.info("Triangle intersect",e,$,t),F(e,$,t)},o}async function t0(t,e){let{labelStyles:a,nodeStyles:l}=(0,i.GX)(e);e.labelStyle=a;let r=e.padding??0,n="neo"===e.look?16:r,s="neo"===e.look?12:r,h=!0;(e.width||e.height)&&(h=!1,e.width=(e?.width??0)-2*n,e.width<10&&(e.width=10),e.height=(e?.height??0)-2*s,e.height<10&&(e.height=10));let{shapeSvg:o,bbox:g,label:p}=await c(t,e,f(e)),m=(e?.width?e?.width:g.width)+(n??0)*2,x=(e?.height?e?.height:g.height)+(s??0)*2,$="neo"===e.look?x/4:x/8,b=x+(h?$:-$),{cssStyles:k}=e,D=14-m,S=D>0?D/2:0,M=d.A.svg(o),A=(0,i.Fr)(e,{});"handDrawn"!==e.look&&(A.roughness=0,A.fillStyle="solid");let v=[{x:-m/2-S,y:b/2},...w(-m/2-S,b/2,m/2+S,b/2,$,.8),{x:m/2+S,y:-b/2},{x:-m/2-S,y:-b/2}],K=u(v),B=M.path(K,A),C=o.insert(()=>B,":first-child");return C.attr("class","basic label-container outer-path"),k&&"handDrawn"!==e.look&&C.selectAll("path").attr("style",k),l&&"handDrawn"!==e.look&&C.selectAll("path").attr("style",l),C.attr("transform",`translate(0,${-$/2})`),p.attr("transform",`translate(${-m/2+(e.padding??0)-(g.x-(g.left??0))},${-x/2+(e.padding??0)-$-(g.y-(g.top??0))})`),y(e,C),e.intersect=function(t){return F(e,v,t)},o}async function t2(t,e){let{labelStyles:a,nodeStyles:l}=(0,i.GX)(e);e.labelStyle=a;let r=e.padding??0,n="neo"===e.look?16:r,s="neo"===e.look?20:r;if(e.width||e.height){e.width=e?.width??0,e.width<20&&(e.width=20),e.height=e?.height??0,e.height<10&&(e.height=10);let t=Math.min(.2*e.height,e.height/4);e.height=Math.ceil(e.height-s-20/9*t),e.width=e.width-2*n}let{shapeSvg:h,bbox:o}=await c(t,e,f(e)),g=(e?.width?e?.width:o.width)+2*n,p=(e?.height?e?.height:o.height)+s,m=p/8,x=p+2*m,{cssStyles:$}=e,b=d.A.svg(h),k=(0,i.Fr)(e,{});"handDrawn"!==e.look&&(k.roughness=0,k.fillStyle="solid");let D=[{x:-g/2,y:x/2},...w(-g/2,x/2,g/2,x/2,m,1),{x:g/2,y:-x/2},...w(g/2,-x/2,-g/2,-x/2,m,-1)],S=u(D),M=b.path(S,k),A=h.insert(()=>M,":first-child");return A.attr("class","basic label-container"),$&&"handDrawn"!==e.look&&A.selectAll("path").attr("style",$),l&&"handDrawn"!==e.look&&A.selectAll("path").attr("style",l),y(e,A),e.intersect=function(t){return F(e,D,t)},h}async function t1(t,e){let{labelStyles:a,nodeStyles:l}=(0,i.GX)(e);e.labelStyle=a;let r="neo"===e.look?16:e.padding??0,n="neo"===e.look?12:e.padding??0;(e.width||e.height)&&(e.width=Math.max((e?.width??0)-2*r-10,10),e.height=Math.max((e?.height??0)-2*n-10,10));let{shapeSvg:s,bbox:h,label:o}=await c(t,e,f(e)),g=(e?.width?e?.width:h.width)+2*r+10,u=(e?.height?e?.height:h.height)+2*n+10,w=g-10,p=u-10,m=-w/2,x=-p/2,{cssStyles:$}=e,b=d.A.svg(s),k=(0,i.Fr)(e,{}),D=[{x:m-10,y:x-10},{x:m-10,y:x+p},{x:m+w,y:x+p},{x:m+w,y:x-10}],S=`M${m-10},${x-10} L${m+w},${x-10} L${m+w},${x+p} L${m-10},${x+p} L${m-10},${x-10}
9
+ M${m-10},${x} L${m+w},${x}
10
+ M${m},${x-10} L${m},${x+p}`;"handDrawn"!==e.look&&(k.roughness=0,k.fillStyle="solid");let M=b.path(S,k),A=s.insert(()=>M,":first-child");return A.attr("transform","translate(5, 5)"),A.attr("class","basic label-container outer-path"),$&&"handDrawn"!==e.look&&A.selectAll("path").attr("style",$),l&&"handDrawn"!==e.look&&A.selectAll("path").attr("style",l),o.attr("transform",`translate(${-(h.width/2)+5-(h.x-(h.left??0))}, ${-(h.height/2)+5-(h.y-(h.top??0))})`),y(e,A),e.intersect=function(t){return F(e,D,t)},s}(0,h.K2)(tY,"tiltedCylinder"),(0,h.K2)(tU,"trapezoid"),(0,h.K2)(tJ,"trapezoidalPentagon"),(0,h.K2)(tQ,"triangle"),(0,h.K2)(t0,"waveEdgedRectangle"),(0,h.K2)(t2,"waveRectangle"),(0,h.K2)(t1,"windowPane");var t5=new Set(["redux-color","redux-dark-color"]),t8=new Set(["redux","redux-dark","redux-color","redux-dark-color"]);async function t3(t,e){e.alias&&(e.label=e.alias);let{theme:a,themeVariables:l}=(0,s.zj)(),{rowEven:r,rowOdd:h,nodeBorder:c,borderColorArray:g}=l;if("handDrawn"===e.look){let{themeVariables:a}=(0,s.zj)(),{background:l}=a,i={...e,id:e.id+"-background",domId:(e.domId||e.id)+"-background",look:"default",cssStyles:["stroke: none",`fill: ${l}`]};await t3(t,i)}let u=(0,s.zj)();e.useHtmlLabels=u.htmlLabels;let w=u.er?.diagramPadding??10,p=u.er?.entityPadding??6,{cssStyles:m}=e,{labelStyles:$,nodeStyles:b}=(0,i.GX)(e);if(0===e.attributes.length&&e.label){let l={rx:0,ry:0,labelPaddingX:w,labelPaddingY:1.5*w,classes:""};(0,n.Un)(e.label,u)+2*l.labelPaddingX<u.er.minEntityWidth&&(e.width=u.er.minEntityWidth);let i=await ta(t,e,l);if(null!=a&&t5.has(a)){let t=e.colorIndex??0;i.attr("data-color-id",`color-${t%g.length}`)}if(!(0,s._3)(u.htmlLabels)){let t=i.select("text"),e=t.node()?.getBBox();t.attr("transform",`translate(${-e.width/2}, 0)`)}return i}u.htmlLabels||(w*=1.25,p*=1.25);let k=f(e);k||(k="node default");let D=t.insert("g").attr("class",k).attr("id",e.domId||e.id),S=await t4(D,e.label??"",u,0,0,["name"],$);S.height+=p;let M=0,A=[],v=[],K=0,B=0,C=0,N=0,R=!0,L=!0;for(let t of e.attributes){let e=await t4(D,t.type,u,0,M,["attribute-type"],$);K=Math.max(K,e.width+w);let a=await t4(D,t.name,u,0,M,["attribute-name"],$);B=Math.max(B,a.width+w);let l=await t4(D,t.keys.join(),u,0,M,["attribute-keys"],$);C=Math.max(C,l.width+w);let i=await t4(D,t.comment,u,0,M,["attribute-comment"],$);N=Math.max(N,i.width+w);let r=Math.max(e.height,a.height,l.height,i.height)+p;v.push({yOffset:M,rowHeight:r}),M+=r}let F=4;C<=w&&(R=!1,C=0,F--),N<=w&&(L=!1,N=0,F--);let P=D.node().getBBox();if(S.width+2*w-(K+B+C+N)>0){let t=S.width+2*w-(K+B+C+N);K+=t/F,B+=t/F,C>0&&(C+=t/F),N>0&&(N+=t/F)}let X=K+B+C+N,G=d.A.svg(D),I=(0,i.Fr)(e,{});"handDrawn"!==e.look&&(I.roughness=0,I.fillStyle="solid");let E=0;v.length>0&&(E=v.reduce((t,e)=>t+(e?.rowHeight??0),0));let T=Math.max(P.width+2*w,e?.width||0,X),W=Math.max((E??0)+S.height,e?.height||0),H=-T/2,j=-W/2;if(D.selectAll("g:not(:first-child)").each((t,e,a)=>{let l=(0,o.Ltv)(a[e]),i=l.attr("transform"),r=0,n=0;if(i){let t=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(i);t&&(r=parseFloat(t[1]),n=parseFloat(t[2]),l.attr("class").includes("attribute-name")?r+=K:l.attr("class").includes("attribute-keys")?r+=K+B:l.attr("class").includes("attribute-comment")&&(r+=K+B+C))}l.attr("transform",`translate(${H+w/2+r}, ${n+j+S.height+p/2})`)}),D.select(".name").attr("transform","translate("+-S.width/2+", "+(j+p/2)+")"),null!=a&&t5.has(a)){let t=e.colorIndex??0;D.attr("data-color-id",`color-${t%g.length}`)}let q=G.rectangle(H,j,T,W,I),_=D.insert(()=>q,":first-child").attr("class","outer-path").attr("style",m.join(""));for(let[t,e]of(A.push(0),v.entries())){let a=(t+1)%2==0&&0!==e.yOffset,l=G.rectangle(H,S.height+j+e?.yOffset,T,e?.rowHeight,{...I,fill:a?r:h,stroke:c});D.insert(()=>l,"g.label").attr("style",m.join("")).attr("class",`row-rect-${a?"even":"odd"}`)}let z=t6(H,S.height+j,T+H,S.height+j,1e-4),Z=G.polygon(z.map(t=>[t.x,t.y]),I);if(D.insert(()=>Z).attr("class","divider"),z=t6(K+H,S.height+j,K+H,W+j,1e-4),Z=G.polygon(z.map(t=>[t.x,t.y]),I),D.insert(()=>Z).attr("class","divider"),R){let t=K+B+H;z=t6(t,S.height+j,t,W+j,1e-4),Z=G.polygon(z.map(t=>[t.x,t.y]),I),D.insert(()=>Z).attr("class","divider")}if(L){let t=K+B+C+H;z=t6(t,S.height+j,t,W+j,1e-4),Z=G.polygon(z.map(t=>[t.x,t.y]),I),D.insert(()=>Z).attr("class","divider")}for(let t of A){let e=S.height+j+t;z=t6(H,e,T+H,e,1e-4),Z=G.polygon(z.map(t=>[t.x,t.y]),I),D.insert(()=>Z).attr("class","divider")}if(y(e,_),b&&"handDrawn"!==e.look)if(null!=a&&t8.has(a))D.selectAll("path").attr("style",b);else{let t=b.split(";"),e=t?.filter(t=>t.includes("stroke"))?.map(t=>`${t}`).join("; ");D.selectAll("path").attr("style",e??""),D.selectAll(".row-rect-even path").attr("style",b)}return e.intersect=function(t){return x(e,t)},D}async function t4(t,e,a,l=0,i=0,h=[],d=""){let c=t.insert("g").attr("class",`label ${h.join(" ")}`).attr("transform",`translate(${l}, ${i})`).attr("style",d);e!==(0,s.QO)(e)&&(e=(e=(0,s.QO)(e)).replaceAll("<","&lt;").replaceAll(">","&gt;"));let g=c.node().appendChild(await (0,r.GZ)(c,e,{width:(0,n.Un)(e,a)+100,style:d,useHtmlLabels:a.htmlLabels},a));if(e.includes("&lt;")||e.includes("&gt;")){let t=g.children[0];for(t.textContent=t.textContent.replaceAll("&lt;","<").replaceAll("&gt;",">");t.childNodes[0];)(t=t.childNodes[0]).textContent=t.textContent.replaceAll("&lt;","<").replaceAll("&gt;",">")}let y=g.getBBox();if((0,s._3)(a.htmlLabels)){let t=g.children[0];t.style.textAlign="start";let e=(0,o.Ltv)(g);y=t.getBoundingClientRect(),e.attr("width",y.width),e.attr("height",y.height)}return y}function t6(t,e,a,l,i){return t===a?[{x:t-i/2,y:e},{x:t+i/2,y:e},{x:a+i/2,y:l},{x:a-i/2,y:l}]:[{x:t,y:e-i/2},{x:t,y:e+i/2},{x:a,y:l+i/2},{x:a,y:l-i/2}]}async function t7(t,e,a,l,i=a.class.padding??12){let r=3*!l,n=t.insert("g").attr("class",f(e)).attr("id",e.domId||e.id),s=null,h=null,o=null,d=null,c=0,g=0,y=0;if(s=n.insert("g").attr("class","annotation-group text"),e.annotations.length>0){let t=e.annotations[0];await t9(s,{text:`\xab${t}\xbb`},0),c=s.node().getBBox().height}h=n.insert("g").attr("class","label-group text"),await t9(h,e,0,["font-weight: bolder"]);let u=h.node().getBBox();g=u.height,o=n.insert("g").attr("class","members-group text");let w=0;for(let t of e.members){let e=await t9(o,t,w,[t.parseClassifier()]);w+=e+r}(y=o.node().getBBox().height)<=0&&(y=i/2),d=n.insert("g").attr("class","methods-group text");let p=0;for(let t of e.methods){let e=await t9(d,t,p,[t.parseClassifier()]);p+=e+r}let m=n.node().getBBox();if(null!==s){let t=s.node().getBBox();s.attr("transform",`translate(${-t.width/2})`)}return h.attr("transform",`translate(${-u.width/2}, ${c})`),m=n.node().getBBox(),o.attr("transform",`translate(0, ${c+g+2*i})`),m=n.node().getBBox(),d.attr("transform",`translate(0, ${c+g+(y?y+4*i:2*i)})`),m=n.node().getBBox(),{shapeSvg:n,bbox:m}}async function t9(t,e,a,l=[]){let i,d=t.insert("g").attr("class","label").attr("style",l.join("; ")),c=(0,s.zj)(),g="useHtmlLabels"in e?e.useHtmlLabels:(0,s._3)(c.htmlLabels)??!0,y="";y="text"in e?e.text:e.label,!g&&y.startsWith("\\")&&(y=y.substring(1)),(0,s.Wi)(y)&&(g=!0);let f=await (0,r.GZ)(d,(0,s.oB)((0,n.Sm)(y)),{width:(0,n.Un)(y,c)+50,classes:"markdown-node-label",useHtmlLabels:g},c),u=1;if(g){let t=f.children[0],e=(0,o.Ltv)(f);u=t.innerHTML.split("<br>").length,t.innerHTML.includes("</math>")&&(u+=t.innerHTML.split("<mrow>").length-1);let a=t.getElementsByTagName("img");if(a){let t=""===y.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=5*parseInt(c.fontSize?.toString()??window.getComputedStyle(document.body).fontSize,10)+"px";e.style.minWidth=t,e.style.maxWidth=t}else e.style.width="100%";a(e)}(0,h.K2)(l,"setupImage"),setTimeout(()=>{e.complete&&l()}),e.addEventListener("error",l),e.addEventListener("load",l)})))}i=t.getBoundingClientRect(),e.attr("width",i.width),e.attr("height",i.height)}else{l.includes("font-weight: bolder")&&(0,o.Ltv)(f).selectAll("tspan").attr("font-weight",""),u=f.children.length;let t=f.children[0];(""===f.textContent||f.textContent.includes("&gt"))&&(t.textContent=y[0]+y.substring(1).replaceAll("&gt;",">").replaceAll("&lt;","<").trim()," "===y[1]&&(t.textContent=t.textContent[0]+" "+t.textContent.substring(1))),"undefined"===t.textContent&&(t.textContent=""),i=f.getBBox()}return d.attr("transform","translate(0,"+(-i.height/(2*u)+a)+")"),i.height}async function et(t,e){let a=(0,s.D7)(),{themeVariables:l}=a,{useGradient:r}=l,n=a.class.padding??12,h=e.useHtmlLabels??(0,s._3)(a.htmlLabels)??!0;e.annotations=e.annotations??[],e.members=e.members??[],e.methods=e.methods??[];let{shapeSvg:c,bbox:g}=await t7(t,e,a,h,n),{labelStyles:f,nodeStyles:u}=(0,i.GX)(e);e.labelStyle=f,e.cssStyles=e.styles||"";let w=e.styles?.join(";")||u||"";e.cssStyles||(e.cssStyles=w.replaceAll("!important","").split(";"));let p=0===e.members.length&&0===e.methods.length&&!a.class?.hideEmptyMembersBox,m=d.A.svg(c),$=(0,i.Fr)(e,{});"handDrawn"!==e.look&&($.roughness=0,$.fillStyle="solid");let b=Math.max(e.width??0,g.width),k=Math.max(e.height??0,g.height),D=(e.height??0)>g.height;0===e.members.length&&0===e.methods.length?k+=n:e.members.length>0&&0===e.methods.length&&(k+=2*n);let S=-b/2,M=-k/2,A=p?2*n:0===e.members.length&&0===e.methods.length?-n:0;D&&(A=2*n);let v=m.rectangle(S-n,M-n-(p?n:0===e.members.length&&0===e.methods.length?-n/2:0),b+2*n,k+2*n+A,$),K=c.insert(()=>v,":first-child");K.attr("class","basic label-container outer-path");let B=K.node().getBBox(),C=c.select(".annotation-group").node().getBBox().height-(p?n/2:0)||0,N=c.select(".label-group").node().getBBox().height-(p?n/2:0)||0,R=c.select(".members-group").node().getBBox().height-(p?n/2:0)||0,L=(C+N+M+n-(M-n-(p?n:0===e.members.length&&0===e.methods.length?-n/2:0)))/2;if(c.selectAll(".text").each((t,l,i)=>{let r=(0,o.Ltv)(i[l]),s=r.attr("transform"),d=0;if(s){let t=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(s);t&&(d=parseFloat(t[2]))}let g=d+M+n-(p?n:0===e.members.length&&0===e.methods.length?-n/2:0);if(r.attr("class").includes("methods-group")){let t=Math.max(R,n/2);g=D?Math.max(L,C+N+t+M+2*n+n)+2*n:C+N+t+M+4*n+n}0===e.members.length&&0===e.methods.length&&a.class?.hideEmptyMembersBox&&(g=e.annotations.length>0?d-n:d),h||(g-=4);let y=S;(r.attr("class").includes("label-group")||r.attr("class").includes("annotation-group"))&&(y=-r.node()?.getBBox().width/2||0,c.selectAll("text").each(function(t,e,a){"middle"===window.getComputedStyle(a[e]).textAnchor&&(y=0)})),r.attr("transform",`translate(${y}, ${g})`)}),e.members.length>0||e.methods.length>0||p){let t=C+N+M+n,a=m.line(B.x,t,B.x+B.width,t+.001,$);c.insert(()=>a).attr("class",`divider${"neo"===e.look&&!r?" neo-line":""}`).attr("style",w)}if(p||e.members.length>0||e.methods.length>0){let t=C+N+R+M+2*n+n,a=m.line(B.x,D?Math.max(L,t):t,B.x+B.width,(D?Math.max(L,t):t)+.001,$);c.insert(()=>a).attr("class",`divider${"neo"===e.look&&!r?" neo-line":""}`).attr("style",w)}if("handDrawn"!==e.look&&c.selectAll("path").attr("style",w),K.select(":nth-child(2)").attr("style",w),c.selectAll(".divider").select("path").attr("style",w),e.labelStyle?c.selectAll("span").attr("style",e.labelStyle):c.selectAll("span").attr("style",w),!h){let t=RegExp(/color\s*:\s*([^;]*)/),e=t.exec(w);if(e){let t=e[0].replace("color","fill");c.selectAll("tspan").attr("style",t)}else if(f){let e=t.exec(f);if(e){let t=e[0].replace("color","fill");c.selectAll("tspan").attr("style",t)}}}return y(e,K),e.intersect=function(t){return x(e,t)},c}async function ee(t,e){let a,{labelStyles:l,nodeStyles:r}=(0,i.GX)(e);e.labelStyle=l;let n="verifyMethod"in e,h=f(e),{themeVariables:c}=(0,s.D7)(),{borderColorArray:g,requirementEdgeLabelBackground:u}=c,w=t.insert("g").attr("class",h).attr("id",e.domId??e.id),p=a=n?await ea(w,`&lt;&lt;${e.type}&gt;&gt;`,0,e.labelStyle):await ea(w,"&lt;&lt;Element&gt;&gt;",0,e.labelStyle),m=await ea(w,e.name,p,e.labelStyle+"; font-weight: bold;");if(p+=m+20,n){let t=await ea(w,`${e.requirementId?`ID: ${e.requirementId}`:""}`,p,e.labelStyle);p+=t;let a=await ea(w,`${e.text?`Text: ${e.text}`:""}`,p,e.labelStyle);p+=a;let l=await ea(w,`${e.risk?`Risk: ${e.risk}`:""}`,p,e.labelStyle);p+=l,await ea(w,`${e.verifyMethod?`Verification: ${e.verifyMethod}`:""}`,p,e.labelStyle)}else{let t=await ea(w,`${e.type?`Type: ${e.type}`:""}`,p,e.labelStyle);p+=t,await ea(w,`${e.docRef?`Doc Ref: ${e.docRef}`:""}`,p,e.labelStyle)}let $=(w.node()?.getBBox().width??200)+20,b=(w.node()?.getBBox().height??200)+20,k=-$/2,D=-b/2,S=d.A.svg(w),M=(0,i.Fr)(e,{});"handDrawn"!==e.look&&(M.roughness=0,M.fillStyle="solid");let A=S.rectangle(k,D,$,b,M),v=w.insert(()=>A,":first-child");if(v.attr("class","basic label-container outer-path").attr("style",r),g?.length){let t=e.colorIndex??0;w.attr("data-color-id",`color-${t%g.length}`)}if(w.selectAll(".label").each((t,e,a)=>{let l=(0,o.Ltv)(a[e]),i=l.attr("transform"),r=0,n=0;if(i){let t=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(i);t&&(r=parseFloat(t[1]),n=parseFloat(t[2]))}let s=n-b/2,h=k+10;(0===e||1===e)&&(h=r),l.attr("transform",`translate(${h}, ${s+20})`)}),p>a+m+20){let t,l=D+a+m+20;if("neo"===e.look){let e=[[k,l],[k+$,l],[k+$,l+.001],[k,l+.001]];t=S.polygon(e,M)}else t=S.line(k,l,k+$,l,M);w.insert(()=>t).attr("class","divider")}return y(e,v),e.intersect=function(t){return x(e,t)},r&&"handDrawn"!==e.look&&(u||g?.length)&&w.selectAll("path").attr("style",r),w}async function ea(t,e,a,l=""){let i;if(""===e)return 0;let h=t.insert("g").attr("class","label").attr("style",l),d=(0,s.D7)(),c=d.htmlLabels??!0,g=await (0,r.GZ)(h,(0,s.oB)((0,n.Sm)(e)),{width:(0,n.Un)(e,d)+50,classes:"markdown-node-label",useHtmlLabels:c,style:l},d);if(c){let t=g.children[0],e=(0,o.Ltv)(g);i=t.getBoundingClientRect(),e.attr("width",i.width),e.attr("height",i.height)}else{for(let t of g.children[0].children)l&&t.setAttribute("style",l);i=g.getBBox(),i.height+=6}return h.attr("transform",`translate(${-i.width/2},${-i.height/2+a})`),i.height}(0,h.K2)(t3,"erBox"),(0,h.K2)(t4,"addText"),(0,h.K2)(t6,"lineToPolygon"),(0,h.K2)(t7,"textHelper"),(0,h.K2)(t9,"addText"),(0,h.K2)(et,"classBox"),(0,h.K2)(ee,"requirementBox"),(0,h.K2)(ea,"addText");var el=(0,h.K2)(t=>{switch(t){case"Very High":return"red";case"High":return"orange";case"Medium":return null;case"Low":return"blue";case"Very Low":return"lightblue"}},"colorFromPriority");async function ei(t,e,{config:a}){let l,r,n,s,{labelStyles:h,nodeStyles:o}=(0,i.GX)(e);e.labelStyle=h||"";let u=e.width;e.width=(e.width??200)-10;let{shapeSvg:w,bbox:p,label:m}=await c(t,e,f(e)),$=e.padding||10,k="";"ticket"in e&&e.ticket&&a?.kanban?.ticketBaseUrl&&(k=a?.kanban?.ticketBaseUrl.replace("#TICKET#",e.ticket),l=w.insert("svg:a",":first-child").attr("class","kanban-ticket-link").attr("xlink:href",k).attr("target","_blank"));let D={useHtmlLabels:e.useHtmlLabels,labelStyle:e.labelStyle||"",width:e.width,img:e.img,padding:e.padding||8,centerLabel:!1};l?{label:r,bbox:n}=await g(l,"ticket"in e&&e.ticket||"",D):{label:r,bbox:n}=await g(w,"ticket"in e&&e.ticket||"",D);let{label:S,bbox:M}=await g(w,"assigned"in e&&e.assigned||"",D);e.width=u;let A=e?.width||0,v=Math.max(n.height,M.height)/2,K=Math.max(p.height+20,e?.height||0)+v,B=-A/2,C=-K/2;m.attr("transform","translate("+($-A/2)+", "+(-v-p.height/2)+")"),r.attr("transform","translate("+($-A/2)+", "+(-v+p.height/2)+")"),S.attr("transform","translate("+($+A/2-M.width-20)+", "+(-v+p.height/2)+")");let{rx:N,ry:R}=e,{cssStyles:L}=e;if("handDrawn"===e.look){let t=d.A.svg(w),a=(0,i.Fr)(e,{}),l=N||R?t.path(b(B,C,A,K,N||0),a):t.rectangle(B,C,A,K,a);(s=w.insert(()=>l,":first-child")).attr("class","basic label-container").attr("style",L||null)}else{(s=w.insert("rect",":first-child")).attr("class","basic label-container __APA__").attr("style",o).attr("rx",N??5).attr("ry",R??5).attr("x",B).attr("y",C).attr("width",A).attr("height",K);let t="priority"in e&&e.priority;if(t){let e=w.append("line"),a=B+2,l=C+Math.floor((N??0)/2),i=C+K-Math.floor((N??0)/2);e.attr("x1",a).attr("y1",l).attr("x2",a).attr("y2",i).attr("stroke-width","4").attr("stroke",el(t))}}return y(e,s),e.height=K,e.intersect=function(t){return x(e,t)},w}async function er(t,e){let a,{labelStyles:l,nodeStyles:r}=(0,i.GX)(e);e.labelStyle=l;let{shapeSvg:s,bbox:o,halfPadding:g,label:u}=await c(t,e,f(e)),w=o.width+10*g,p=o.height+8*g,m=.15*w,{cssStyles:$}=e,b=o.width+20,k=o.height+20,D=Math.max(w,b),S=Math.max(p,k);u.attr("transform",`translate(${-o.width/2}, ${-o.height/2})`);let M=`M0 0
11
+ a${m},${m} 1 0,0 ${.25*D},${-1*S*.1}
12
+ a${m},${m} 1 0,0 ${.25*D},0
13
+ a${m},${m} 1 0,0 ${.25*D},0
14
+ a${m},${m} 1 0,0 ${.25*D},${.1*S}
15
+
16
+ a${m},${m} 1 0,0 ${.15*D},${.33*S}
17
+ a${.8*m},${.8*m} 1 0,0 0,${.34*S}
18
+ a${m},${m} 1 0,0 ${-1*D*.15},${.33*S}
19
+
20
+ a${m},${m} 1 0,0 ${-1*D*.25},${.15*S}
21
+ a${m},${m} 1 0,0 ${-1*D*.25},0
22
+ a${m},${m} 1 0,0 ${-1*D*.25},0
23
+ a${m},${m} 1 0,0 ${-1*D*.25},${-1*S*.15}
24
+
25
+ a${m},${m} 1 0,0 ${-1*D*.1},${-1*S*.33}
26
+ a${.8*m},${.8*m} 1 0,0 0,${-1*S*.34}
27
+ a${m},${m} 1 0,0 ${.1*D},${-1*S*.33}
28
+ H0 V0 Z`;if("handDrawn"===e.look){let t=d.A.svg(s),l=(0,i.Fr)(e,{}),r=t.path(M,l);(a=s.insert(()=>r,":first-child")).attr("class","basic label-container").attr("style",(0,n.KL)($))}else a=s.insert("path",":first-child").attr("class","basic label-container").attr("style",r).attr("d",M);return a.attr("transform",`translate(${-D/2}, ${-S/2})`),y(e,a),e.calcIntersect=function(t,e){return x(t,e)},e.intersect=function(t){return h.Rm.info("Bang intersect",e,t),x(e,t)},s}async function en(t,e){let a,{labelStyles:l,nodeStyles:r}=(0,i.GX)(e);e.labelStyle=l;let{shapeSvg:s,bbox:o,halfPadding:g,label:u}=await c(t,e,f(e)),w=o.width+2*g,p=o.height+2*g,m=.15*w,$=.25*w,b=.35*w,k=.2*w,{cssStyles:D}=e,S=`M0 0
29
+ a${m},${m} 0 0,1 ${.25*w},${-1*w*.1}
30
+ a${b},${b} 1 0,1 ${.4*w},${-1*w*.1}
31
+ a${$},${$} 1 0,1 ${.35*w},${.2*w}
32
+
33
+ a${m},${m} 1 0,1 ${.15*w},${.35*p}
34
+ a${k},${k} 1 0,1 ${-1*w*.15},${.65*p}
35
+
36
+ a${$},${m} 1 0,1 ${-1*w*.25},${.15*w}
37
+ a${b},${b} 1 0,1 ${-1*w*.5},0
38
+ a${m},${m} 1 0,1 ${-1*w*.25},${-1*w*.15}
39
+
40
+ a${m},${m} 1 0,1 ${-1*w*.1},${-1*p*.35}
41
+ a${k},${k} 1 0,1 ${.1*w},${-1*p*.65}
42
+ H0 V0 Z`;if("handDrawn"===e.look){let t=d.A.svg(s),l=(0,i.Fr)(e,{}),r=t.path(S,l);(a=s.insert(()=>r,":first-child")).attr("class","basic label-container").attr("style",(0,n.KL)(D))}else a=s.insert("path",":first-child").attr("class","basic label-container").attr("style",r).attr("d",S);return u.attr("transform",`translate(${-o.width/2}, ${-o.height/2})`),a.attr("transform",`translate(${-w/2}, ${-p/2})`),y(e,a),e.calcIntersect=function(t,e){return x(t,e)},e.intersect=function(t){return h.Rm.info("Cloud intersect",e,t),x(e,t)},s}async function es(t,e){let{labelStyles:a,nodeStyles:l}=(0,i.GX)(e);e.labelStyle=a;let{shapeSvg:r,bbox:n,halfPadding:s,label:h}=await c(t,e,f(e)),o=n.width+8*s,d=n.height+2*s,g="neo"===e.look?`
43
+ M${-o/2} ${d/2-5}
44
+ v${-d+10}
45
+ q0,-5 5,-5
46
+ h${o-10}
47
+ q5,0 5,5
48
+ v${d-5}
49
+ H${-o/2}
50
+ Z
51
+ `:`
52
+ M${-o/2} ${d/2-5}
53
+ v${-d+10}
54
+ q0,-5 5,-5
55
+ h${o-10}
56
+ q5,0 5,5
57
+ v${d-10}
58
+ q0,5 -5,5
59
+ h${-(o-10)}
60
+ q-5,0 -5,-5
61
+ Z
62
+ `;if(!e.domId)throw Error(`defaultMindmapNode: node "${e.id}" is missing a domId \u2014 was render.ts domId prefixing skipped?`);let u=r.append("path").attr("id",e.domId).attr("class","node-bkg node-"+e.type).attr("style",l).attr("d",g);return r.append("line").attr("class","node-line-").attr("x1",-o/2).attr("y1",d/2).attr("x2",o/2).attr("y2",d/2),h.attr("transform",`translate(${-n.width/2}, ${-n.height/2})`),r.append(()=>h.node()),y(e,u),e.calcIntersect=function(t,e){return x(t,e)},e.intersect=function(t){return x(e,t)},r}async function eh(t,e){let a={padding:e.padding??0};return H(t,e,a)}(0,h.K2)(ei,"kanbanItem"),(0,h.K2)(er,"bang"),(0,h.K2)(en,"cloud"),(0,h.K2)(es,"defaultMindmapNode"),(0,h.K2)(eh,"mindmapCircle");var eo=[{semanticName:"Process",name:"Rectangle",shortName:"rect",description:"Standard process shape",aliases:["proc","process","rectangle"],internalAliases:["squareRect"],handler:tI},{semanticName:"Event",name:"Rounded Rectangle",shortName:"rounded",description:"Represents an event",aliases:["event"],internalAliases:["roundedRect"],handler:tP},{semanticName:"Terminal Point",name:"Stadium",shortName:"stadium",description:"Terminal point",aliases:["terminal","pill"],handler:tE},{semanticName:"Subprocess",name:"Framed Rectangle",shortName:"fr-rect",description:"Subprocess",aliases:["subprocess","subproc","framed-rectangle","subroutine"],handler:tj},{semanticName:"Database",name:"Cylinder",shortName:"cyl",description:"Database storage",aliases:["db","database","cylinder"],handler:te},{semanticName:"Data Store",name:"Data Store",shortName:"datastore",description:"Data flow diagram data store",aliases:["data-store"],handler:tl},{semanticName:"Start",name:"Circle",shortName:"circle",description:"Starting point",aliases:["circ"],handler:H},{semanticName:"Bang",name:"Bang",shortName:"bang",description:"Bang",aliases:["bang"],handler:er},{semanticName:"Cloud",name:"Cloud",shortName:"cloud",description:"cloud",aliases:["cloud"],handler:en},{semanticName:"Decision",name:"Diamond",shortName:"diam",description:"Decision-making step",aliases:["decision","diamond","question"],handler:tR},{semanticName:"Prepare Conditional",name:"Hexagon",shortName:"hex",description:"Preparation or condition step",aliases:["hexagon","prepare"],handler:tc},{semanticName:"Data Input/Output",name:"Lean Right",shortName:"lean-r",description:"Represents input or output",aliases:["lean-right","in-out"],internalAliases:["lean_right"],handler:tb},{semanticName:"Data Input/Output",name:"Lean Left",shortName:"lean-l",description:"Represents output or input",aliases:["lean-left","out-in"],internalAliases:["lean_left"],handler:t$},{semanticName:"Priority Action",name:"Trapezoid Base Bottom",shortName:"trap-b",description:"Priority action",aliases:["priority","trapezoid-bottom","trapezoid"],handler:tU},{semanticName:"Manual Operation",name:"Trapezoid Base Top",shortName:"trap-t",description:"Represents a manual task",aliases:["manual","trapezoid-top","inv-trapezoid"],internalAliases:["inv_trapezoid"],handler:tm},{semanticName:"Stop",name:"Double Circle",shortName:"dbl-circ",description:"Represents a stop point",aliases:["double-circle"],internalAliases:["doublecircle"],handler:tr},{semanticName:"Text Block",name:"Text Block",shortName:"text",description:"Text block",handler:tz},{semanticName:"Card",name:"Notched Rectangle",shortName:"notch-rect",description:"Represents a card",aliases:["card","notched-rectangle"],handler:T},{semanticName:"Lined/Shaded Process",name:"Lined Rectangle",shortName:"lin-rect",description:"Lined process shape",aliases:["lined-rectangle","lined-process","lin-proc","shaded-process"],handler:tX},{semanticName:"Start",name:"Small Circle",shortName:"sm-circ",description:"Small starting point",aliases:["start","small-circle"],internalAliases:["stateStart"],handler:tH},{semanticName:"Stop",name:"Framed Circle",shortName:"fr-circ",description:"Stop point",aliases:["stop","framed-circle"],internalAliases:["stateEnd"],handler:tW},{semanticName:"Fork/Join",name:"Filled Rectangle",shortName:"fork",description:"Fork or join in process flow",aliases:["join"],internalAliases:["forkJoin"],handler:th},{semanticName:"Collate",name:"Hourglass",shortName:"hourglass",description:"Represents a collate operation",aliases:["hourglass","collate"],handler:tg},{semanticName:"Comment",name:"Curly Brace",shortName:"brace",description:"Adds a comment",aliases:["comment","brace-l"],handler:z},{semanticName:"Comment Right",name:"Curly Brace",shortName:"brace-r",description:"Adds a comment",handler:O},{semanticName:"Comment with braces on both sides",name:"Curly Braces",shortName:"braces",description:"Adds a comment",handler:Y},{semanticName:"Com Link",name:"Lightning Bolt",shortName:"bolt",description:"Communication link",aliases:["com-link","lightning-bolt"],handler:tk},{semanticName:"Document",name:"Document",shortName:"doc",description:"Represents a document",aliases:["doc","document"],handler:t0},{semanticName:"Delay",name:"Half-Rounded Rectangle",shortName:"delay",description:"Represents a delay",aliases:["half-rounded-rectangle"],handler:to},{semanticName:"Direct Access Storage",name:"Horizontal Cylinder",shortName:"h-cyl",description:"Direct access storage",aliases:["das","horizontal-cylinder"],handler:tY},{semanticName:"Disk Storage",name:"Lined Cylinder",shortName:"lin-cyl",description:"Disk storage",aliases:["disk","lined-cylinder"],handler:tA},{semanticName:"Display",name:"Curved Trapezoid",shortName:"curv-trap",description:"Represents a display",aliases:["curved-trapezoid","display"],handler:U},{semanticName:"Divided Process",name:"Divided Rectangle",shortName:"div-rect",description:"Divided process shape",aliases:["div-proc","divided-rectangle","divided-process"],handler:ti},{semanticName:"Extract",name:"Triangle",shortName:"tri",description:"Extraction process",aliases:["extract","triangle"],handler:tQ},{semanticName:"Internal Storage",name:"Window Pane",shortName:"win-pane",description:"Internal storage",aliases:["internal-storage","window-pane"],handler:t1},{semanticName:"Junction",name:"Filled Circle",shortName:"f-circ",description:"Junction point",aliases:["junction","filled-circle"],handler:tn},{semanticName:"Loop Limit",name:"Trapezoidal Pentagon",shortName:"notch-pent",description:"Loop limit step",aliases:["loop-limit","notched-pentagon"],handler:tJ},{semanticName:"Manual File",name:"Flipped Triangle",shortName:"flip-tri",description:"Manual file operation",aliases:["manual-file","flipped-triangle"],handler:ts},{semanticName:"Manual Input",name:"Sloped Rectangle",shortName:"sl-rect",description:"Manual input step",aliases:["manual-input","sloped-rectangle"],handler:tG},{semanticName:"Multi-Document",name:"Stacked Document",shortName:"docs",description:"Multiple documents",aliases:["documents","st-doc","stacked-document"],handler:tB},{semanticName:"Multi-Process",name:"Stacked Rectangle",shortName:"st-rect",description:"Multiple processes",aliases:["procs","processes","stacked-rectangle"],handler:tK},{semanticName:"Stored Data",name:"Bow Tie Rectangle",shortName:"bow-rect",description:"Stored data",aliases:["stored-data","bow-tie-rectangle"],handler:I},{semanticName:"Summary",name:"Crossed Circle",shortName:"cross-circ",description:"Summary",aliases:["summary","crossed-circle"],handler:q},{semanticName:"Tagged Document",name:"Tagged Document",shortName:"tag-doc",description:"Tagged document",aliases:["tag-doc","tagged-document"],handler:t_},{semanticName:"Tagged Process",name:"Tagged Rectangle",shortName:"tag-rect",description:"Tagged process",aliases:["tagged-rectangle","tag-proc","tagged-process"],handler:tq},{semanticName:"Paper Tape",name:"Flag",shortName:"flag",description:"Paper tape",aliases:["paper-tape"],handler:t2},{semanticName:"Odd",name:"Odd",shortName:"odd",description:"Odd shape",internalAliases:["rect_left_inv_arrow"],handler:tL},{semanticName:"Lined Document",name:"Lined Document",shortName:"lin-doc",description:"Lined document",aliases:["lined-document"],handler:tv}],ed=(0,h.K2)(()=>Object.fromEntries([...Object.entries({state:tT,choice:W,note:tC,rectWithTitle:tF,labelRect:tx,iconSquare:tw,iconCircle:tf,icon:ty,iconRounded:tu,imageSquare:tp,anchor:P,kanbanItem:ei,mindmapCircle:eh,defaultMindmapNode:es,classBox:et,erBox:t3,requirementBox:ee}),...eo.flatMap(t=>[t.shortName,..."aliases"in t?t.aliases:[],..."internalAliases"in t?t.internalAliases:[]].map(e=>[e,t.handler]))]),"generateShapeMap")();function ec(t){return t in ed}(0,h.K2)(ec,"isValidShape");var eg=new Map;async function ey(t,e,a){let l,i;"rect"===e.shape&&(e.rx&&e.ry?e.shape="roundedRect":e.shape="squareRect");let r=e.shape?ed[e.shape]:void 0;if(!r)throw Error(`No such shape: ${e.shape}. Please check your syntax.`);if(e.link){let n;"sandbox"===a.config.securityLevel?n="_top":e.linkTarget&&(n=e.linkTarget||"_blank"),l=t.insert("svg:a").attr("xlink:href",e.link).attr("target",n??null),i=await r(l,e,a)}else l=i=await r(t,e,a);return l.attr("data-look",(0,n.KL)(e.look)),e.tooltip&&i.attr("title",e.tooltip),eg.set(e.id,l),e.haveCallback&&l.attr("class",l.attr("class")+" clickable"),l}(0,h.K2)(ey,"insertNode");var ef=(0,h.K2)((t,e)=>{eg.set(e.id,t)},"setNodeElem"),eu=(0,h.K2)(()=>{eg.clear()},"clear"),ew=(0,h.K2)(t=>{let e=eg.get(t.id);h.Rm.trace("Transforming node",t.diff,t,"translate("+(t.x-t.width/2-5)+", "+t.width/2+")");let a=t.diff||0;return t.clusterNode?e.attr("transform","translate("+(t.x+a-t.width/2)+", "+(t.y-t.height/2-8)+")"):e.attr("transform","translate("+t.x+", "+t.y+")"),a},"positionNode")}}]);
@@ -0,0 +1,115 @@
1
+ "use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1413],{21413:(t,e,n)=>{n.d(e,{diagram:()=>tt});var i=n(21354),r=n(32563),a=n(97096),s=n(32165),o=n(33948),l=n(6424),c=n(99507),h=n(68195),d=function(){var t=(0,s.K2)(function(t,e,n,i){for(n=n||{},i=t.length;i--;n[t[i]]=e);return n},"o"),e=[6,11,13,14,15,17,19,20,23,24],n=[1,12],i=[1,13],r=[1,14],a=[1,15],o=[1,16],l=[1,19],c=[1,20],h={trace:(0,s.K2)(function(){},"trace"),yy:{},symbols_:{error:2,start:3,timeline_header:4,document:5,EOF:6,timeline:7,timeline_lr:8,timeline_td:9,line:10,SPACE:11,statement:12,NEWLINE:13,title:14,acc_title:15,acc_title_value:16,acc_descr:17,acc_descr_value:18,acc_descr_multiline_value:19,section:20,period_statement:21,event_statement:22,period:23,event:24,$accept:0,$end:1},terminals_:{2:"error",6:"EOF",7:"timeline",8:"timeline_lr",9:"timeline_td",11:"SPACE",13:"NEWLINE",14:"title",15:"acc_title",16:"acc_title_value",17:"acc_descr",18:"acc_descr_value",19:"acc_descr_multiline_value",20:"section",23:"period",24:"event"},productions_:[0,[3,3],[4,1],[4,1],[4,1],[5,0],[5,2],[10,2],[10,1],[10,1],[10,1],[12,1],[12,2],[12,2],[12,1],[12,1],[12,1],[12,1],[21,1],[22,1]],performAction:(0,s.K2)(function(t,e,n,i,r,a,s){var o=a.length-1;switch(r){case 1:return a[o-1];case 3:i.setDirection("LR");break;case 4:i.setDirection("TD");break;case 5:case 9:case 10:this.$=[];break;case 6:a[o-1].push(a[o]),this.$=a[o-1];break;case 7:case 8:this.$=a[o];break;case 11:i.getCommonDb().setDiagramTitle(a[o].substr(6)),this.$=a[o].substr(6);break;case 12:this.$=a[o].trim(),i.getCommonDb().setAccTitle(this.$);break;case 13:case 14:this.$=a[o].trim(),i.getCommonDb().setAccDescription(this.$);break;case 15:i.addSection(a[o].substr(8)),this.$=a[o].substr(8);break;case 18:i.addTask(a[o],0,""),this.$=a[o];break;case 19:i.addEvent(a[o].substr(2)),this.$=a[o]}},"anonymous"),table:[{3:1,4:2,7:[1,3],8:[1,4],9:[1,5]},{1:[3]},t(e,[2,5],{5:6}),t(e,[2,2]),t(e,[2,3]),t(e,[2,4]),{6:[1,7],10:8,11:[1,9],12:10,13:[1,11],14:n,15:i,17:r,19:a,20:o,21:17,22:18,23:l,24:c},t(e,[2,10],{1:[2,1]}),t(e,[2,6]),{12:21,14:n,15:i,17:r,19:a,20:o,21:17,22:18,23:l,24:c},t(e,[2,8]),t(e,[2,9]),t(e,[2,11]),{16:[1,22]},{18:[1,23]},t(e,[2,14]),t(e,[2,15]),t(e,[2,16]),t(e,[2,17]),t(e,[2,18]),t(e,[2,19]),t(e,[2,7]),t(e,[2,12]),t(e,[2,13])],defaultActions:{},parseError:(0,s.K2)(function(t,e){if(e.recoverable)this.trace(t);else{var n=Error(t);throw n.hash=e,n}},"parseError"),parse:(0,s.K2)(function(t){var e=this,n=[0],i=[],r=[null],a=[],o=this.table,l="",c=0,h=0,d=0,u=a.slice.call(arguments,1),p=Object.create(this.lexer),g={};for(var f in this.yy)Object.prototype.hasOwnProperty.call(this.yy,f)&&(g[f]=this.yy[f]);p.setInput(t,g),g.lexer=p,g.parser=this,void 0===p.yylloc&&(p.yylloc={});var m=p.yylloc;a.push(m);var y=p.options&&p.options.ranges;function b(){var t;return"number"!=typeof(t=i.pop()||p.lex()||1)&&(t instanceof Array&&(t=(i=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof g.parseError?this.parseError=g.parseError:this.parseError=Object.getPrototypeOf(this).parseError,(0,s.K2)(function(t){n.length=n.length-2*t,r.length=r.length-t,a.length=a.length-t},"popStack"),(0,s.K2)(b,"lex");for(var x,k,_,w,$,v,K,S,E,R={};;){if(_=n[n.length-1],this.defaultActions[_]?w=this.defaultActions[_]:(null==x&&(x=b()),w=o[_]&&o[_][x]),void 0===w||!w.length||!w[0]){var I="";for(v in E=[],o[_])this.terminals_[v]&&v>2&&E.push("'"+this.terminals_[v]+"'");I=p.showPosition?"Parse error on line "+(c+1)+":\n"+p.showPosition()+"\nExpecting "+E.join(", ")+", got '"+(this.terminals_[x]||x)+"'":"Parse error on line "+(c+1)+": Unexpected "+(1==x?"end of input":"'"+(this.terminals_[x]||x)+"'"),this.parseError(I,{text:p.match,token:this.terminals_[x]||x,line:p.yylineno,loc:m,expected:E})}if(w[0]instanceof Array&&w.length>1)throw Error("Parse Error: multiple actions possible at state: "+_+", token: "+x);switch(w[0]){case 1:n.push(x),r.push(p.yytext),a.push(p.yylloc),n.push(w[1]),x=null,k?(x=k,k=null):(h=p.yyleng,l=p.yytext,c=p.yylineno,m=p.yylloc,d>0&&d--);break;case 2:if(K=this.productions_[w[1]][1],R.$=r[r.length-K],R._$={first_line:a[a.length-(K||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(K||1)].first_column,last_column:a[a.length-1].last_column},y&&(R._$.range=[a[a.length-(K||1)].range[0],a[a.length-1].range[1]]),void 0!==($=this.performAction.apply(R,[l,h,c,g,w[1],r,a].concat(u))))return $;K&&(n=n.slice(0,-1*K*2),r=r.slice(0,-1*K),a=a.slice(0,-1*K)),n.push(this.productions_[w[1]][0]),r.push(R.$),a.push(R._$),S=o[n[n.length-2]][n[n.length-1]],n.push(S);break;case 3:return!0}}return!0},"parse")};function d(){this.yy={}}return h.lexer={EOF:1,parseError:(0,s.K2)(function(t,e){if(this.yy.parser)this.yy.parser.parseError(t,e);else throw Error(t)},"parseError"),setInput:(0,s.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,s.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,s.K2)(function(t){var e=t.length,n=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 i=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),n.length-1&&(this.yylineno-=n.length-1);var r=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:n?(n.length===i.length?this.yylloc.first_column:0)+i[i.length-n.length].length-n[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[r[0],r[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},"unput"),more:(0,s.K2)(function(){return this._more=!0,this},"more"),reject:(0,s.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,s.K2)(function(t){this.unput(this.match.slice(t))},"less"),pastInput:(0,s.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,s.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,s.K2)(function(){var t=this.pastInput(),e=Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},"showPosition"),test_match:(0,s.K2)(function(t,e){var n,i,r;if(this.options.backtrack_lexer&&(r={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&&(r.yylloc.range=this.yylloc.range.slice(0))),(i=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=i.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:i?i[i.length-1].length-i[i.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],n=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack)for(var a in r)this[a]=r[a];return!1},"test_match"),next:(0,s.K2)(function(){if(this.done)return this.EOF;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var t,e,n,i,r=this._currentRules(),a=0;a<r.length;a++)if((n=this._input.match(this.rules[r[a]]))&&(!e||n[0].length>e[0].length)){if(e=n,i=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(n,r[a])))return t;if(!this._backtrack)return!1;e=!1;continue}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,r[i]))&&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,s.K2)(function(){var t=this.next();return t||this.lex()},"lex"),begin:(0,s.K2)(function(t){this.conditionStack.push(t)},"begin"),popState:(0,s.K2)(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:(0,s.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,s.K2)(function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},"topState"),pushState:(0,s.K2)(function(t){this.begin(t)},"pushState"),stateStackSize:(0,s.K2)(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:(0,s.K2)(function(t,e,n,i){switch(n){case 0:case 1:case 3:case 4:break;case 2:return 13;case 5:return 8;case 6:return 9;case 7:return 7;case 8:return 14;case 9:return this.begin("acc_title"),15;case 10:return this.popState(),"acc_title_value";case 11:return this.begin("acc_descr"),17;case 12:return this.popState(),"acc_descr_value";case 13:this.begin("acc_descr_multiline");break;case 14:this.popState();break;case 15:return"acc_descr_multiline_value";case 16:return 20;case 17:return 24;case 18:return 23;case 19:return 6;case 20:return"INVALID"}},"anonymous"),rules:[/^(?:%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:#[^\n]*)/i,/^(?:timeline[ \t]+LR\b)/i,/^(?:timeline[ \t]+TD\b)/i,/^(?:timeline\b)/i,/^(?:title\s[^\n]+)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:section\s[^:\n]+)/i,/^(?::\s(?:[^:\n]|:(?!\s))+)/i,/^(?:[^#:\n]+)/i,/^(?:$)/i,/^(?:.)/i],conditions:{acc_descr_multiline:{rules:[14,15],inclusive:!1},acc_descr:{rules:[12],inclusive:!1},acc_title:{rules:[10],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7,8,9,11,13,16,17,18,19,20],inclusive:!0}}},(0,s.K2)(d,"Parser"),d.prototype=h,h.Parser=d,new d}();d.parser=d;var u={};(0,s.VA)(u,{addEvent:()=>E,addSection:()=>$,addTask:()=>S,addTaskOrg:()=>R,clear:()=>k,default:()=>T,getCommonDb:()=>x,getDirection:()=>w,getSections:()=>v,getTasks:()=>K,setDirection:()=>_});var p="",g=0,f="LR",m=[],y=[],b=[],x=(0,s.K2)(()=>a.Wt,"getCommonDb"),k=(0,s.K2)(function(){m.length=0,y.length=0,p="",b.length=0,f="LR",(0,a.IU)()},"clear"),_=(0,s.K2)(function(t){f=t},"setDirection"),w=(0,s.K2)(function(){return f},"getDirection"),$=(0,s.K2)(function(t){p=t,m.push(t)},"addSection"),v=(0,s.K2)(function(){return m},"getSections"),K=(0,s.K2)(function(){let t=I(),e=0;for(;!t&&e<100;)t=I(),e++;return y.push(...b),y},"getTasks"),S=(0,s.K2)(function(t,e,n){let i={id:g++,section:p,type:p,task:t,score:e||0,events:n?[n]:[]};b.push(i)},"addTask"),E=(0,s.K2)(function(t){b.find(t=>t.id===g-1).events.push(t)},"addEvent"),R=(0,s.K2)(function(t){let e={section:p,type:p,description:t,task:t,classes:[]};y.push(e)},"addTaskOrg"),I=(0,s.K2)(function(){let t=(0,s.K2)(function(t){return b[t].processed},"compileTask"),e=!0;for(let[n,i]of b.entries())t(n),e=e&&i.processed;return e},"compileTasks"),T={clear:k,getCommonDb:x,getDirection:w,setDirection:_,addSection:$,getSections:v,getTasks:K,addTask:S,addTaskOrg:R,addEvent:E},M=0,L=(0,s.K2)(function(t,e){let n=t.append("rect");return n.attr("x",e.x),n.attr("y",e.y),n.attr("fill",e.fill),n.attr("stroke",e.stroke),n.attr("width",e.width),n.attr("height",e.height),n.attr("rx",e.rx),n.attr("ry",e.ry),void 0!==e.class&&n.attr("class",e.class),n},"drawRect"),C=(0,s.K2)(function(t,e){let n=t.append("circle").attr("cx",e.cx).attr("cy",e.cy).attr("class","face").attr("r",15).attr("stroke-width",2).attr("overflow","visible"),i=t.append("g");function r(t){let n=(0,o.JLW)().startAngle(Math.PI/2).endAngle(Math.PI/2*3).innerRadius(7.5).outerRadius(15/2.2);t.append("path").attr("class","mouth").attr("d",n).attr("transform","translate("+e.cx+","+(e.cy+2)+")")}function a(t){let n=(0,o.JLW)().startAngle(3*Math.PI/2).endAngle(Math.PI/2*5).innerRadius(7.5).outerRadius(15/2.2);t.append("path").attr("class","mouth").attr("d",n).attr("transform","translate("+e.cx+","+(e.cy+7)+")")}function l(t){t.append("line").attr("class","mouth").attr("stroke",2).attr("x1",e.cx-5).attr("y1",e.cy+7).attr("x2",e.cx+5).attr("y2",e.cy+7).attr("class","mouth").attr("stroke-width","1px").attr("stroke","#666")}return i.append("circle").attr("cx",e.cx-5).attr("cy",e.cy-5).attr("r",1.5).attr("stroke-width",2).attr("fill","#666").attr("stroke","#666"),i.append("circle").attr("cx",e.cx+5).attr("cy",e.cy-5).attr("r",1.5).attr("stroke-width",2).attr("fill","#666").attr("stroke","#666"),(0,s.K2)(r,"smile"),(0,s.K2)(a,"sad"),(0,s.K2)(l,"ambivalent"),e.score>3?r(i):e.score<3?a(i):l(i),n},"drawFace"),H=(0,s.K2)(function(t,e){let n=e.text.replace(/<br\s*\/?>/gi," "),i=t.append("text");i.attr("x",e.x),i.attr("y",e.y),i.attr("class","legend"),i.style("text-anchor",e.anchor),void 0!==e.class&&i.attr("class",e.class);let r=i.append("tspan");return r.attr("x",e.x+2*e.textMargin),r.text(n),i},"drawText"),A=-1,D=(0,s.K2)(function(){return{x:0,y:0,width:100,anchor:"start",height:100,rx:0,ry:0}},"getNoteRect"),O=function(){function t(t,e,n,r,a,s,o,l){i(e.append("text").attr("x",n+a/2).attr("y",r+s/2+5).style("font-color",l).style("text-anchor","middle").text(t),o)}function e(t,e,n,r,a,s,o,l,c){let{taskFontSize:h,taskFontFamily:d}=l,u=t.split(/<br\s*\/?>/gi);for(let t=0;t<u.length;t++){let l=t*h-h*(u.length-1)/2,p=e.append("text").attr("x",n+a/2).attr("y",r).attr("fill",c).style("text-anchor","middle").style("font-size",h).style("font-family",d);p.append("tspan").attr("x",n+a/2).attr("dy",l).text(u[t]),p.attr("y",r+s/2).attr("dominant-baseline","central").attr("alignment-baseline","central"),i(p,o)}}function n(t,n,r,a,s,o,l,c){let h=n.append("switch"),d=h.append("foreignObject").attr("x",r).attr("y",a).attr("width",s).attr("height",o).attr("position","fixed").append("xhtml:div").style("display","table").style("height","100%").style("width","100%");d.append("div").attr("class","label").style("display","table-cell").style("text-align","center").style("vertical-align","middle").text(t),e(t,h,r,a,s,o,l,c),i(d,l)}function i(t,e){for(let n in e)n in e&&t.attr(n,e[n])}return(0,s.K2)(t,"byText"),(0,s.K2)(e,"byTspan"),(0,s.K2)(n,"byFo"),(0,s.K2)(i,"_setTextAttrs"),function(i){return"fo"===i.textPlacement?n:"old"===i.textPlacement?t:e}}(),B=(0,s.K2)(function(t,e){M=0,A=-1,t.append("defs").append("marker").attr("id",e+"-arrowhead").attr("refX",5).attr("refY",2).attr("markerWidth",6).attr("markerHeight",4).attr("orient","auto").append("path").attr("d","M 0,0 V 4 L6,2 Z")},"initGraphics");function N(t,e){t.each(function(){var t,n=(0,o.Ltv)(this),i=n.text().split(/(\s+|<br>)/).reverse(),r=[],a=n.attr("y"),s=parseFloat(n.attr("dy")),l=n.text(null).append("tspan").attr("x",0).attr("y",a).attr("dy",s+"em");for(let s=0;s<i.length;s++)t=i[i.length-1-s],r.push(t),l.text(r.join(" ").trim()),(l.node().getComputedTextLength()>e||"<br>"===t)&&(r.pop(),l.text(r.join(" ").trim()),r="<br>"===t?[""]:[t],l=n.append("tspan").attr("x",0).attr("y",a).attr("dy","1.1em").text(t))})}(0,s.K2)(N,"wrap");var W=(0,s.K2)(function(t,e,n,i,r,a=!1){let{theme:s,look:l}=i,c=s?.includes("redux"),h=n%(i?.themeVariables?.THEME_COLOR_LIMIT??12)-1,d=t.append("g");e.section=h,d.attr("class",(e.class?e.class+" ":"")+"timeline-node section-"+h);let u=d.append("g"),p=d.append("g"),g=p.append("text").text(e.descr).attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","middle").attr("text-anchor","middle").call(N,e.width).node().getBBox(),f=i.fontSize?.replace?i.fontSize.replace("px",""):i.fontSize;if(e.height=g.height+1.1*f*.5+e.padding,e.height=Math.max(e.height,e.maxHeight),e.width=e.width+2*e.padding,p.attr("transform","translate("+e.width/2+", "+e.padding/2+")"),c&&p.attr("transform",`translate(${e.width/2}, ${a?e.padding/2+3:e.padding})`),z(u,e,h,r,i),"neo"===l&&(d.attr("data-look","neo"),c)){let e=s.includes("dark"),n=t.node()?.ownerSVGElement??t.node(),i=(0,o.Ltv)(n),r=i.attr("id")??"",a=r?`${r}-drop-shadow`:"drop-shadow";if(i.select(`#${a}`).empty()){let t=i.select("defs");(t.empty()?i.append("defs"):t).append("filter").attr("id",a).attr("height","130%").attr("width","130%").append("feDropShadow").attr("dx","4").attr("dy","4").attr("stdDeviation",0).attr("flood-opacity",e?"0.2":"0.06").attr("flood-color",e?"#FFFFFF":"#000000")}}return e},"drawNode"),P=(0,s.K2)(function(t,e,n){let i=t.append("g"),r=i.append("text").text(e.descr).attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","middle").attr("text-anchor","middle").call(N,e.width).node().getBBox(),a=n.fontSize?.replace?n.fontSize.replace("px",""):n.fontSize;return i.remove(),r.height+1.1*a*.5+e.padding},"getVirtualNodeHeight"),z=(0,s.K2)(function(t,e,n,i,r){let{theme:a}=r,s=5*!a?.includes("redux"),o=s>0?`M0 ${e.height-5} v${-e.height+10} q0,-${s},${s},-${s} h${e.width-10} q${s},0,${s},${s} v${e.height-5} H0 Z`:`M0 ${e.height-5} v${-(e.height-5)} h${e.width} v${e.height} H0 Z`;t.append("path").attr("id",i+"-node-"+M++).attr("class","node-bkg node-"+e.type).attr("d",o),a?.includes("redux")||t.append("line").attr("class","node-line-"+n).attr("x1",0).attr("y1",e.height).attr("x2",e.width).attr("y2",e.height)},"defaultBkg"),j=(0,s.K2)(function(t,e,n,i){let r,l=(0,a.D7)(),{look:c,theme:h,themeVariables:d}=l,{useGradient:u,gradientStart:p,gradientStop:g}=d,f=l.timeline?.leftMargin??50;s.Rm.debug("timeline",i.db);let m=l.securityLevel;"sandbox"===m&&(r=(0,o.Ltv)("#i"+e));let y=("sandbox"===m?(0,o.Ltv)(r.nodes()[0].contentDocument.body):(0,o.Ltv)("body")).select("#"+e);y.append("g");let b=i.db.getTasks(),x=i.db.getCommonDb().getDiagramTitle();s.Rm.debug("task",b),B(y,e);let k=i.db.getSections();s.Rm.debug("sections",k);let _=0,w=0,$=0,v=0,K=50+f,S=50;v=50;let E=0,R=!0;k.forEach(function(t){let e=P(y,{number:E,descr:t,section:E,width:150,padding:20,maxHeight:_},l);s.Rm.debug("sectionHeight before draw",e),_=Math.max(_,e+20)});let I=0,T=0;for(let[t,e]of(s.Rm.debug("tasks.length",b.length),b.entries())){let n=P(y,{number:t,descr:e,section:e.section,width:150,padding:20,maxHeight:w},l);s.Rm.debug("taskHeight before draw",n),w=Math.max(w,n+20),I=Math.max(I,e.events.length);let i=0;for(let t of e.events)i+=P(y,{descr:t,section:e.section,number:e.section,width:150,padding:20,maxHeight:50},l);e.events.length>0&&(i+=(e.events.length-1)*10),T=Math.max(T,i)}s.Rm.debug("maxSectionHeight before draw",_),s.Rm.debug("maxTaskHeight before draw",w),k&&k.length>0?k.forEach(t=>{let n=b.filter(e=>e.section===t),i={number:E,descr:t,section:E,width:200*Math.max(n.length,1)-50,padding:20,maxHeight:_};s.Rm.debug("sectionNode",i);let r=y.append("g"),a=W(r,i,E,l,e);s.Rm.debug("sectionNode output",a),r.attr("transform",`translate(${K}, ${v})`),S+=_+50,n.length>0&&F(y,n,E,K,S,w,l,I,T,_,!1,e),K+=200*Math.max(n.length,1),S=v,E++}):(R=!1,F(y,b,E,K,S,w,l,I,T,_,!0,e));let M=y.node().getBBox();if(s.Rm.debug("bounds",M),x&&y.append("text").text(x).attr("x","neo"===c?2*M.x+f:M.width/2-f).attr("font-size","4ex").attr("font-weight","bold").attr("y",20),$=R?_+w+150:w+100,y.append("g").attr("class","lineWrapper").append("line").attr("x1",f).attr("y1",$).attr("x2",M.width+3*f).attr("y2",$).attr("stroke-width",4).attr("stroke","black").attr("marker-end",`url(#${e}-arrowhead)`),"neo"===c&&u&&"neutral"!==h){let t=y.select("defs"),e=(t.empty()?y.append("defs"):t).append("linearGradient").attr("id",y.attr("id")+"-gradient").attr("gradientUnits","objectBoundingBox").attr("x1","0%").attr("y1","0%").attr("x2","100%").attr("y2","0%");e.append("stop").attr("offset","0%").attr("stop-color",p).attr("stop-opacity",1),e.append("stop").attr("offset","100%").attr("stop-color",g).attr("stop-opacity",1)}(0,a.ot)(void 0,y,l.timeline?.padding??50,l.timeline?.useMaxWidth??!1)},"draw"),F=(0,s.K2)(function(t,e,n,i,r,a,o,l,c,h,d,u){for(let l of e){let e={descr:l.task,section:n,number:n,width:150,padding:20,maxHeight:a};s.Rm.debug("taskNode",e);let h=t.append("g").attr("class","taskWrapper"),p=W(h,e,n,o,u).height;if(s.Rm.debug("taskHeight after draw",p),h.attr("transform",`translate(${i}, ${r})`),a=Math.max(a,p),l.events){let e=t.append("g").attr("class","lineWrapper");r+=100,V(t,l.events,n,i,r,o,u),r-=100,e.append("line").attr("x1",i+95).attr("y1",r+a).attr("x2",i+95).attr("y2",r+a+100+c+100).attr("stroke-width",2).attr("stroke","black").attr("marker-end",`url(#${u}-arrowhead)`).attr("stroke-dasharray","5,5")}i+=200,d&&!o.timeline?.disableMulticolor&&n++}},"drawTasks"),V=(0,s.K2)(function(t,e,n,i,r,a,o){let l=0,c=r;for(let c of(r+=100,e)){let e={descr:c,section:n,number:n,width:150,padding:20,maxHeight:50};s.Rm.debug("eventNode",e);let h=t.append("g").attr("class","eventWrapper"),d=W(h,e,n,a,o,!0).height;l+=d,h.attr("transform",`translate(${i}, ${r})`),r=r+10+d}return r=c,l},"drawEvents"),G={setConf:(0,s.K2)(()=>{},"setConf"),draw:j},U=(0,s.K2)(function(t,e,n,o){let l=(0,a.D7)(),c=l.timeline?.leftMargin??50;s.Rm.debug("timeline",o.db);let h=(0,i.D)(e);h.append("g");let d=o.db.getTasks(),u=o.db.getCommonDb().getDiagramTitle();s.Rm.debug("task",d),B(h);let p=o.db.getSections();s.Rm.debug("sections",p);let g=0,f=0,m=50,y=230,b=0,x=p&&p.length>0,k=50+c+y,_=Math.max(50,y+360-10);p.forEach(function(t){let e=P(h,{number:b,descr:t,section:b,width:_,padding:5,maxHeight:g},l);s.Rm.debug("sectionHeight before draw",e),g=Math.max(g,e)});let w=0;for(let[t,e]of(s.Rm.debug("tasks.length",d.length),d.entries())){let n=P(h,{number:t,descr:e,section:e.section,width:200,padding:5,maxHeight:f},l);s.Rm.debug("taskHeight before draw",n),f=Math.max(f,n);let i=0;for(let t of e.events)i+=P(h,{descr:t,section:e.section,number:e.section,width:300,padding:5,maxHeight:50},l);e.events.length>0&&(i+=(e.events.length-1)*10),w=Math.max(w,i)+0}s.Rm.debug("maxSectionHeight before draw",g),s.Rm.debug("maxTaskHeight before draw",f);let $=Math.max(f,w)+30;x?p.forEach(t=>{let e=d.filter(e=>e.section===t),n={number:b,descr:t,section:b,width:_,padding:5,maxHeight:g};s.Rm.debug("sectionNode",n);let i=h.append("g"),r=W(i,n,b,l);s.Rm.debug("sectionNode output",r);let a=k-y;i.attr("transform",`translate(${a}, ${m})`);let o=m+r.height+20;e.length>0&&Z(h,e,b,k,o,f,l,$,!1);let c=e.length,u=r.height+20+$*Math.max(c,1)-60*(c>0);m+=u,b++}):Z(h,d,b,k,m,f,l,$,!0);let v=h.node()?.getBBox();if(!v)throw Error("bbox not found");if(s.Rm.debug("bounds",v),u){if(h.append("text").text(u).attr("x",v.width/2-c).attr("font-size","4ex").attr("font-weight","bold").attr("y",20),!(v=h.node()?.getBBox()))throw Error("bbox not found");s.Rm.debug("bounds after title",v)}let[K]=(0,r.I5)(l.fontSize),S=h.append("g").attr("class","lineWrapper");S.append("line").attr("x1",k).attr("y1",50-(K??16)*2).attr("x2",k).attr("y2",v.y+v.height+((K??16)*.5+20)).attr("stroke-width",4).attr("stroke","black").attr("marker-end","url(#arrowhead)"),S.lower(),(0,a.ot)(void 0,h,l.timeline?.padding??50,l.timeline?.useMaxWidth??!1)},"draw"),Z=(0,s.K2)(function(t,e,n,i,r,a,o,l,c){for(let h of e){let e={descr:h.task,section:n,number:n,width:200,padding:5,maxHeight:a};s.Rm.debug("taskNode",e);let d=t.append("g").attr("class","taskWrapper"),u=W(d,e,n,o),p=u.height;s.Rm.debug("taskHeight after draw",p);let g=i-20-u.width;if(d.attr("transform",`translate(${g}, ${r})`),a=Math.max(a,p),h.events&&h.events.length>0){let e=r,a=i+50;q(t,h.events,n,i,a,e,o)}r+=l,c&&!o.timeline?.disableMulticolor&&n++}},"drawTasks"),q=(0,s.K2)(function(t,e,n,i,r,a,o){let l=a;for(let a of e){let e={descr:a,section:n,number:n,width:300,padding:5,maxHeight:0};s.Rm.debug("eventNode",e);let c=t.append("g").attr("class","eventWrapper"),h=W(c,e,n,o).height;c.attr("transform",`translate(${r}, ${l})`);let d=t.append("g").attr("class","lineWrapper"),u=l+h/2;d.append("line").attr("x1",i).attr("y1",u).attr("x2",r).attr("y2",u).attr("stroke-width",2).attr("stroke","black").attr("marker-end","url(#arrowhead)").attr("stroke-dasharray","5,5"),l=l+h+10}return l-a},"drawEvents"),J={setConf:(0,s.K2)(()=>{},"setConf"),draw:U},Y=(0,s.K2)(t=>{let{theme:e}=(0,a.zj)(),n=e?.includes("dark"),i=e?.includes("color"),r=t.svgId?.replace(/^#/,"")??"",s=r?`url(#${r}-drop-shadow)`:t.dropShadow??"none",o="";for(let e=0;e<t.THEME_COLOR_LIMIT;e++){let r=`${17-3*e}`,a=i?t.borderColorArray[e]:t.mainBkg,l=i?t.borderColorArray[e]:t.nodeBorder;o+=`
2
+ .section-${e-1} rect,
3
+ .section-${e-1} path,
4
+ .section-${e-1} circle {
5
+ fill: ${n&&i?t.mainBkg:a};
6
+ stroke: ${l};
7
+ stroke-width: ${t.strokeWidth};
8
+ filter: ${s};
9
+ }
10
+
11
+ .section-${e-1} text {
12
+ fill: ${t.nodeBorder};
13
+ font-weight: ${t.fontWeight}
14
+ }
15
+
16
+ .node-icon-${e-1} {
17
+ font-size: 40px;
18
+ color: ${t["cScaleLabel"+e]};
19
+ }
20
+
21
+ .section-edge-${e-1} {
22
+ stroke: ${t["cScale"+e]};
23
+ }
24
+
25
+ .edge-depth-${e-1} {
26
+ stroke-width: ${r};
27
+ }
28
+
29
+ .section-${e-1} line {
30
+ stroke: ${t["cScaleInv"+e]};
31
+ stroke-width: 3;
32
+ }
33
+
34
+ .lineWrapper line {
35
+ stroke: ${t.nodeBorder};
36
+ stroke-width:${t.strokeWidth}
37
+ }
38
+
39
+ .disabled,
40
+ .disabled circle,
41
+ .disabled text {
42
+ fill: ${t.tertiaryColor??"lightgray"};
43
+ }
44
+
45
+ .disabled text {
46
+ fill: ${t.clusterBorder??"#efefef"};
47
+ }
48
+ `}return o},"genReduxSections"),X=(0,s.K2)(t=>{let e="";for(let e=0;e<t.THEME_COLOR_LIMIT;e++)t["lineColor"+e]=t["lineColor"+e]||t["cScaleInv"+e],(0,l.A)(t["lineColor"+e])?t["lineColor"+e]=(0,c.A)(t["lineColor"+e],20):t["lineColor"+e]=(0,h.A)(t["lineColor"+e],20);for(let n=0;n<t.THEME_COLOR_LIMIT;n++){let i=""+(17-3*n);e+=`
49
+ .section-${n-1} rect, .section-${n-1} path, .section-${n-1} circle, .section-${n-1} path {
50
+ fill: ${t["cScale"+n]};
51
+ }
52
+ .section-${n-1} text {
53
+ fill: ${t["cScaleLabel"+n]};
54
+ }
55
+ .node-icon-${n-1} {
56
+ font-size: 40px;
57
+ color: ${t["cScaleLabel"+n]};
58
+ }
59
+ .section-edge-${n-1}{
60
+ stroke: ${t["cScale"+n]};
61
+ }
62
+ .edge-depth-${n-1}{
63
+ stroke-width: ${i};
64
+ }
65
+ .section-${n-1} line {
66
+ stroke: ${t["cScaleInv"+n]} ;
67
+ stroke-width: 3;
68
+ }
69
+
70
+ .lineWrapper line{
71
+ stroke: ${t["cScaleLabel"+n]} ;
72
+ }
73
+
74
+ .disabled, .disabled circle, .disabled text {
75
+ fill: ${t.tertiaryColor??"lightgray"};
76
+ }
77
+ .disabled text {
78
+ fill: ${t.clusterBorder??"#efefef"};
79
+ }
80
+ `}return e},"genSections"),Q=(0,s.K2)(t=>{let{theme:e}=(0,a.zj)(),n=e?.includes("redux"),i="neutral"===e,r=t.svgId?.replace(/^#/,"")??"",s="";if(t.useGradient&&r&&t.THEME_COLOR_LIMIT&&!i)for(let e=0;e<t.THEME_COLOR_LIMIT;e++)s+=`
81
+ .section-${e-1}[data-look="neo"] rect,
82
+ .section-${e-1}[data-look="neo"] path,
83
+ .section-${e-1}[data-look="neo"] circle {
84
+ fill: ${t.mainBkg};
85
+ stroke: url(#${r}-gradient);
86
+ stroke-width: 2;
87
+ }
88
+ .section-${e-1}[data-look="neo"] line {
89
+ stroke: url(#${r}-gradient);
90
+ stroke-width: 2;
91
+ }`;return`
92
+ .edge {
93
+ stroke-width: 3;
94
+ }
95
+ ${n?Y(t):X(t)}
96
+ ${s}
97
+ .section-root rect, .section-root path, .section-root circle {
98
+ fill: ${t.git0};
99
+ }
100
+ .section-root text {
101
+ fill: ${t.gitBranchLabel0};
102
+ }
103
+ .icon-container {
104
+ height:100%;
105
+ display: flex;
106
+ justify-content: center;
107
+ align-items: center;
108
+ }
109
+ .edge {
110
+ fill: none;
111
+ }
112
+ .eventWrapper {
113
+ filter: brightness(120%);
114
+ }
115
+ `},"getStyles"),tt={db:u,renderer:{setConf:(0,s.K2)(()=>{},"setConf"),draw:(0,s.K2)((t,e,n,i)=>"TD"===(i?.db?.getDirection?.()??"LR")?J.draw(t,e,n,i):G.draw(t,e,n,i),"draw")},parser:d,styles:Q}}}]);
@@ -0,0 +1,24 @@
1
+ "use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1643],{36211:(e,t,a)=>{function l(e,t){e.accDescr&&t.setAccDescription?.(e.accDescr),e.accTitle&&t.setAccTitle?.(e.accTitle),e.title&&t.setDiagramTitle?.(e.title)}a.d(t,{S:()=>l}),(0,a(32165).K2)(l,"populateCommonDb")},91643:(e,t,a)=>{a.d(t,{diagram:()=>$});var l=a(21354),r=a(93789),s=a(17541),i=a(36211),n=a(32563),o=a(97096),c=a(32165),d=a(88863),p=a(33948),h=class{constructor(){this.nodes=[],this.levels=new Map,this.outerNodes=[],this.classes=new Map,this.setAccTitle=o.SV,this.getAccTitle=o.iN,this.setDiagramTitle=o.ke,this.getDiagramTitle=o.ab,this.getAccDescription=o.m7,this.setAccDescription=o.EI}static{(0,c.K2)(this,"TreeMapDB")}getNodes(){return this.nodes}getConfig(){let e=o.UI,t=(0,o.zj)();return(0,n.$t)({...e.treemap,...t.treemap??{}})}addNode(e,t){this.nodes.push(e),this.levels.set(e,t),0===t&&(this.outerNodes.push(e),this.root??=e)}getRoot(){return{name:"",children:this.outerNodes}}addClass(e,t){let a=this.classes.get(e)??{id:e,styles:[],textStyles:[]},l=t.replace(/\\,/g,"\xa7\xa7\xa7").replace(/,/g,";").replace(/§§§/g,",").split(";");l&&l.forEach(e=>{(0,s.KX)(e)&&(a?.textStyles?a.textStyles.push(e):a.textStyles=[e]),a?.styles?a.styles.push(e):a.styles=[e]}),this.classes.set(e,a)}getClasses(){return this.classes}getStylesForClass(e){return this.classes.get(e)?.styles??[]}clear(){(0,o.IU)(),this.nodes=[],this.levels=new Map,this.outerNodes=[],this.classes=new Map,this.root=void 0}};function m(e){if(!e.length)return[];let t=[],a=[];return e.forEach(e=>{let l={name:e.name,children:"Leaf"===e.type?void 0:[]};for(l.classSelector=e?.classSelector,e?.cssCompiledStyles&&(l.cssCompiledStyles=e.cssCompiledStyles),"Leaf"===e.type&&void 0!==e.value&&(l.value=e.value);a.length>0&&a[a.length-1].level>=e.level;)a.pop();if(0===a.length)t.push(l);else{let e=a[a.length-1].node;e.children?e.children.push(l):e.children=[l]}"Leaf"!==e.type&&a.push({node:l,level:e.level})}),t}(0,c.K2)(m,"buildHierarchy");var y=(0,c.K2)((e,t)=>{(0,i.S)(e,t);let a=[];for(let a of e.TreemapRows??[])"ClassDefStatement"===a.$type&&t.addClass(a.className??"",a.styleText??"");for(let l of e.TreemapRows??[]){let e=l.item;if(!e)continue;let r=l.indent?parseInt(l.indent):0,s=f(e),i=e.classSelector?t.getStylesForClass(e.classSelector):[],n=i.length>0?i:void 0,o={level:r,name:s,type:e.$type,value:e.value,classSelector:e.classSelector,cssCompiledStyles:n};a.push(o)}let l=m(a),r=(0,c.K2)((e,a)=>{for(let l of e)t.addNode(l,a),l.children&&l.children.length>0&&r(l.children,a+1)},"addNodesRecursively");r(l,0)},"populate"),f=(0,c.K2)(e=>e.name?String(e.name):"","getItemName"),u={parser:{yy:void 0},parse:(0,c.K2)(async e=>{try{let t=d.qg,a=await t("treemap",e);c.Rm.debug("Treemap AST:",a);let l=u.parser?.yy;if(!(l instanceof h))throw Error("parser.parser?.yy was not a TreemapDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.");y(a,l)}catch(e){throw c.Rm.error("Error parsing treemap:",e),e}},"parse")},S=(0,c.K2)((e,t,a,i)=>{let n,d=i.db,h=d.getConfig(),m=h.padding??10,y=d.getDiagramTitle(),f=d.getRoot(),{themeVariables:u}=(0,o.zj)();if(!f)return;let S=30*!!y,g=(0,l.D)(t),x=h.nodeWidth?10*h.nodeWidth:960,$=h.nodeHeight?10*h.nodeHeight:500,b=$+S;g.attr("viewBox",`0 0 ${x} ${b}`),(0,o.a$)(g,b,x,h.useMaxWidth);try{let e=h.valueFormat||",";if("$0,0"===e)n=(0,c.K2)(e=>"$"+(0,p.GPZ)(",")(e),"valueFormat");else if(e.startsWith("$")&&e.includes(",")){let t=/\.\d+/.exec(e),a=t?t[0]:"";n=(0,c.K2)(e=>"$"+(0,p.GPZ)(","+a)(e),"valueFormat")}else if(e.startsWith("$")){let t=e.substring(1);n=(0,c.K2)(e=>"$"+(0,p.GPZ)(t||"")(e),"valueFormat")}else n=(0,p.GPZ)(e)}catch(e){c.Rm.error("Error creating format function:",e),n=(0,p.GPZ)(",")}let v=(0,p.UMr)().range(["transparent",u.cScale0,u.cScale1,u.cScale2,u.cScale3,u.cScale4,u.cScale5,u.cScale6,u.cScale7,u.cScale8,u.cScale9,u.cScale10,u.cScale11]),C=(0,p.UMr)().range(["transparent",u.cScalePeer0,u.cScalePeer1,u.cScalePeer2,u.cScalePeer3,u.cScalePeer4,u.cScalePeer5,u.cScalePeer6,u.cScalePeer7,u.cScalePeer8,u.cScalePeer9,u.cScalePeer10,u.cScalePeer11]),w=(0,p.UMr)().range([u.cScaleLabel0,u.cScaleLabel1,u.cScaleLabel2,u.cScaleLabel3,u.cScaleLabel4,u.cScaleLabel5,u.cScaleLabel6,u.cScaleLabel7,u.cScaleLabel8,u.cScaleLabel9,u.cScaleLabel10,u.cScaleLabel11]);y&&g.append("text").attr("x",x/2).attr("y",S/2).attr("class","treemapTitle").attr("text-anchor","middle").attr("dominant-baseline","middle").text(y);let L=g.append("g").attr("transform",`translate(0, ${S})`).attr("class","treemapContainer"),k=(0,p.Sk5)(f).sum(e=>e.value??0).sort((e,t)=>(t.value??0)-(e.value??0)),T=(0,p.hkb)().size([x,$]).paddingTop(e=>e.children&&e.children.length>0?35:0).paddingInner(m).paddingLeft(e=>e.children&&e.children.length>0?10:0).paddingRight(e=>e.children&&e.children.length>0?10:0).paddingBottom(e=>e.children&&e.children.length>0?10:0).round(!0)(k),P=T.descendants().filter(e=>e.children&&e.children.length>0),M=L.selectAll(".treemapSection").data(P).enter().append("g").attr("class","treemapSection").attr("transform",e=>`translate(${e.x0},${e.y0})`);M.append("rect").attr("width",e=>e.x1-e.x0).attr("height",25).attr("class","treemapSectionHeader").attr("fill","none").attr("fill-opacity",.6).attr("stroke-width",.6).attr("style",e=>0===e.depth?"display: none;":""),M.append("clipPath").attr("id",(e,a)=>`clip-section-${t}-${a}`).append("rect").attr("width",e=>Math.max(0,e.x1-e.x0-12)).attr("height",25),M.append("rect").attr("width",e=>e.x1-e.x0).attr("height",e=>e.y1-e.y0).attr("class",(e,t)=>`treemapSection section${t}`).attr("fill",e=>v(e.data.name)).attr("fill-opacity",.6).attr("stroke",e=>C(e.data.name)).attr("stroke-width",2).attr("stroke-opacity",.4).attr("style",e=>{if(0===e.depth)return"display: none;";let t=(0,s.GX)({cssCompiledStyles:e.data.cssCompiledStyles});return t.nodeStyles+";"+t.borderStyles.join(";")}),M.append("text").attr("class","treemapSectionLabel").attr("x",6).attr("y",12.5).attr("dominant-baseline","middle").text(e=>0===e.depth?"":e.data.name).attr("font-weight","bold").attr("style",e=>0===e.depth?"display: none;":"dominant-baseline: middle; font-size: 12px; fill:"+w(e.data.name)+"; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;"+(0,s.GX)({cssCompiledStyles:e.data.cssCompiledStyles}).labelStyles.replace("color:","fill:")).each(function(e){if(0===e.depth)return;let t=(0,p.Ltv)(this),a=e.data.name;t.text(a);let l=e.x1-e.x0,r=Math.max(15,!1!==h.showValues&&e.value?l-10-30-10-6:l-6-6),s=t.node();if(s.getComputedTextLength()>r){let e=a;for(;e.length>0;){if(0===(e=a.substring(0,e.length-1)).length){t.text("..."),s.getComputedTextLength()>r&&t.text("");break}if(t.text(e+"..."),s.getComputedTextLength()<=r)break}}}),!1!==h.showValues&&M.append("text").attr("class","treemapSectionValue").attr("x",e=>e.x1-e.x0-10).attr("y",12.5).attr("text-anchor","end").attr("dominant-baseline","middle").text(e=>e.value?n(e.value):"").attr("font-style","italic").attr("style",e=>0===e.depth?"display: none;":"text-anchor: end; dominant-baseline: middle; font-size: 10px; fill:"+w(e.data.name)+"; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;"+(0,s.GX)({cssCompiledStyles:e.data.cssCompiledStyles}).labelStyles.replace("color:","fill:"));let z=T.leaves(),F=L.selectAll(".treemapLeafGroup").data(z).enter().append("g").attr("class",(e,t)=>`treemapNode treemapLeafGroup leaf${t}${e.data.classSelector?` ${e.data.classSelector}`:""}x`).attr("transform",e=>`translate(${e.x0},${e.y0})`);F.append("rect").attr("width",e=>e.x1-e.x0).attr("height",e=>e.y1-e.y0).attr("class","treemapLeaf").attr("fill",e=>e.parent?v(e.parent.data.name):v(e.data.name)).attr("style",e=>(0,s.GX)({cssCompiledStyles:e.data.cssCompiledStyles}).nodeStyles).attr("fill-opacity",.3).attr("stroke",e=>e.parent?v(e.parent.data.name):v(e.data.name)).attr("stroke-width",3),F.append("clipPath").attr("id",(e,a)=>`clip-${t}-${a}`).append("rect").attr("width",e=>Math.max(0,e.x1-e.x0-4)).attr("height",e=>Math.max(0,e.y1-e.y0-4)),F.append("text").attr("class","treemapLabel").attr("x",e=>(e.x1-e.x0)/2).attr("y",e=>(e.y1-e.y0)/2).attr("style",e=>"text-anchor: middle; dominant-baseline: middle; font-size: 38px;fill:"+w(e.data.name)+";"+(0,s.GX)({cssCompiledStyles:e.data.cssCompiledStyles}).labelStyles.replace("color:","fill:")).attr("clip-path",(e,a)=>`url(#clip-${t}-${a})`).text(e=>e.data.name).each(function(e){let t=(0,p.Ltv)(this),a=e.x1-e.x0,l=e.y1-e.y0,r=t.node(),s=a-8,i=l-8;if(s<10||i<10)return void t.style("display","none");let n=parseInt(t.style("font-size"),10);for(;r.getComputedTextLength()>s&&n>8;)n--,t.style("font-size",`${n}px`);let o=Math.max(6,Math.min(28,Math.round(.6*n))),c=n+2+o;for(;c>i&&n>8&&(!((o=Math.max(6,Math.min(28,Math.round(.6*--n))))<6)||8!==n);)t.style("font-size",`${n}px`),c=n+2+o;t.style("font-size",`${n}px`),(r.getComputedTextLength()>s||n<8||i<n)&&t.style("display","none")}),!1!==h.showValues&&F.append("text").attr("class","treemapValue").attr("x",e=>(e.x1-e.x0)/2).attr("y",function(e){return(e.y1-e.y0)/2}).attr("style",e=>"text-anchor: middle; dominant-baseline: hanging; font-size: 28px;fill:"+w(e.data.name)+";"+(0,s.GX)({cssCompiledStyles:e.data.cssCompiledStyles}).labelStyles.replace("color:","fill:")).attr("clip-path",(e,a)=>`url(#clip-${t}-${a})`).text(e=>e.value?n(e.value):"").each(function(e){let t=(0,p.Ltv)(this),a=this.parentNode;if(!a)return void t.style("display","none");let l=(0,p.Ltv)(a).select(".treemapLabel");if(l.empty()||"none"===l.style("display"))return void t.style("display","none");let r=parseFloat(l.style("font-size")),s=Math.max(6,Math.min(28,Math.round(.6*r)));t.style("font-size",`${s}px`);let i=(e.y1-e.y0)/2+r/2+2;t.attr("y",i);let n=e.x1-e.x0,o=e.y1-e.y0;t.node().getComputedTextLength()>n-8||i+s>o-4||s<6?t.style("display","none"):t.style("display",null)});let K=h.diagramPadding??8;(0,r.P)(g,K,"flowchart",h?.useMaxWidth||!1)},"draw"),g=(0,c.K2)(function(e,t){return t.db.getClasses()},"getClasses"),x={sectionStrokeColor:"black",sectionStrokeWidth:"1",sectionFillColor:"#efefef",leafStrokeColor:"black",leafStrokeWidth:"1",leafFillColor:"#efefef",labelFontSize:"12px",valueFontSize:"10px",titleFontSize:"14px"},$={parser:u,get db(){return new h},renderer:{draw:S,getClasses:g},styles:(0,c.K2)(({treemap:e}={})=>{let t=(0,o.P$)(),a=(0,o.zj)(),l=(0,n.$t)(t,a.themeVariables),r=(0,n.$t)(x,e),s=r.titleColor??l.titleColor,i=r.labelColor??l.textColor,c=r.valueColor??l.textColor;return`
2
+ .treemapNode.section {
3
+ stroke: ${r.sectionStrokeColor};
4
+ stroke-width: ${r.sectionStrokeWidth};
5
+ fill: ${r.sectionFillColor};
6
+ }
7
+ .treemapNode.leaf {
8
+ stroke: ${r.leafStrokeColor};
9
+ stroke-width: ${r.leafStrokeWidth};
10
+ fill: ${r.leafFillColor};
11
+ }
12
+ .treemapLabel {
13
+ fill: ${i};
14
+ font-size: ${r.labelFontSize};
15
+ }
16
+ .treemapValue {
17
+ fill: ${c};
18
+ font-size: ${r.valueFontSize};
19
+ }
20
+ .treemapTitle {
21
+ fill: ${s};
22
+ font-size: ${r.titleFontSize};
23
+ }
24
+ `},"getStyles")}},93789:(e,t,a)=>{a.d(t,{P:()=>s});var l=a(97096),r=a(32165),s=(0,r.K2)((e,t,a,s)=>{e.attr("class",a);let{width:o,height:c,x:d,y:p}=i(e,t);(0,l.a$)(e,c,o,s);let h=n(d,p,o,c,t);e.attr("viewBox",h),r.Rm.debug(`viewBox configured: ${h} with padding: ${t}`)},"setupViewPortForSVG"),i=(0,r.K2)((e,t)=>{let a=e.node()?.getBBox()||{width:0,height:0,x:0,y:0};return{width:a.width+2*t,height:a.height+2*t,x:a.x,y:a.y}},"calculateDimensionsWithPadding"),n=(0,r.K2)((e,t,a,l,r)=>`${e-r} ${t-r} ${a} ${l}`,"createViewBox")}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1852],{91852:(e,t,n)=>{n.r(t),n.d(t,{render:()=>A});var r=n(72475);n(85774);var a=n(63886),i=n(38033);n(17541),n(27655),n(32563);var d=n(97096),o=n(32165),s=n(86121),l=n(94630),g=n(96380),c=n(49820);function f(e){var t,n,r,a={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),a={v:e};return l.A(n)||(a.value=n),l.A(r)||(a.parent=r),a})),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=e.graph(),a.value=(0,g.A)(r,4)),a}n(32459);var h=n(92821),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 a=t.children(e)||[];e!==r&&a.push(e),o.Rm.warn("Copying (nodes) clusterId",e,"nodes",a),a.forEach(a=>{if(t.children(a).length>0)y(a,t,n,r);else{let i=t.node(a);o.Rm.info("cp ",a," to ",r," with parent ",e),n.setNode(a,i),r!==t.parent(a)&&(o.Rm.warn("Setting parent",a,t.parent(a)),n.setParent(a,t.parent(a))),e!==r&&a!==e?(o.Rm.debug("Setting parent",a,e),n.setParent(a,e)):(o.Rm.info("In copy ",e,"root",r,"data",t.node(e),r),o.Rm.debug("Not Setting parent for node=",a,"cluster!==rootId",e!==r,"node!==clusterId",a!==e));let d=t.edges(a);o.Rm.debug("Copying Edges",d),d.forEach(a=>{o.Rm.info("Edge",a);let i=t.edge(a.v,a.w,a.name);o.Rm.info("Edge data",i,r);try{v(a,r)?(o.Rm.info("Copying as ",a.v,a.w,i,a.name),n.setEdge(a.v,a.w,i,a.name),o.Rm.info("newGraph edges ",n.edges(),n.edge(n.edges()[0]))):o.Rm.info("Skipping copy of edge ",a.v,"--\x3e",a.w," rootId: ",r," clusterId:",e)}catch(e){o.Rm.error(e)}})}o.Rm.debug("Removing node",a),t.removeNode(a)})},"copy"),X=(0,o.K2)((e,t)=>{let n=t.children(e),r=[...n];for(let a of n)m.set(a,e),r=[...r,...X(a,t)];return r},"extractDescendants"),b=(0,o.K2)((e,t,n)=>{let r=e.edges().filter(e=>e.v===t||e.w===t),a=e.edges().filter(e=>e.v===n||e.w===n),i=r.map(e=>({v:e.v===t?n:e.v,w:e.w===t?t:e.w})),d=a.map(e=>({v:e.v,w:e.w}));return i.filter(e=>d.some(t=>e.v===t.v&&e.w===t.w))},"findCommonEdges"),E=(0,o.K2)((e,t,n)=>{let r,a=t.children(e);if(o.Rm.trace("Searching children of id ",e,a),a.length<1)return e;for(let e of a){let a=E(e,t,n),i=b(t,n,a);if(a)if(!(i.length>0))return a;else r=a}return r},"findNonClusterChild"),N=(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: ",E(t,e,t)),u.set(t,X(t,e)),p.set(t,{id:E(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,a=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=N(t.v),a=N(t.w),e.removeEdge(t.v,t.w,t.name),r!==t.v){let a=e.parent(r);p.get(a).externalConnections=!0,n.fromCluster=t.v}if(a!==t.w){let r=e.parent(a);p.get(r).externalConnections=!0,n.toCluster=t.w}o.Rm.warn("Fix Replacing with XXX",r,a,t.name),e.setEdge(r,a,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 a=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,a,r),e.setNode(r,{clusterNode:!0,id:r,clusterData:p.get(r).clusterData,label:p.get(r).label,graph:a}),o.Rm.warn("New graph after copy node: (",r,")",f(a)),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),a=x(e,r);n=[...n,...a]}),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:i,nodesep:s}=t.graph();r.graph.setGraph({...r.graph.graph(),ranksep:i+25,nodesep:s});let l=await D(R,r.graph,n,d,t.node(e),g),c=l.elem;(0,a.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,a.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(E(r.id,t)),p.set(r.id,{id:E(r.id,t),node:r})):(o.Rm.trace("Node - the non recursive path XAX",e,R,t.node(e),c),await (0,a.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,i.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,a.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,i=n?.labelBBox?.height||0;o.Rm.debug("OffsetY",i-r||0,"labelHeight",i,"halfPadding",r),await (0,a.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,a.U_)(n)}})),t.edges().forEach(function(e){let a=t.edge(e);o.Rm.info("Edge "+e.v+" -> "+e.w+": "+JSON.stringify(a),a),a.points.forEach(e=>e.y+=X/2);let i=t.node(e.v);var s=t.node(e.w);let l=(0,r.Jo)(m,a,p,n,i,s,d);(0,r.T_)(a,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{}}),i=t.select("g");(0,r.g0)(i,e.markers,e.type,e.diagramId),(0,a.gh)(),(0,r.IU)(),(0,a.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",a=t+"---"+t+"---2",i=n.node(t);n.setNode(r,{domId:r,id:r,parentId:i.parentId,labelStyle:"",label:"",padding:0,shape:"labelRect",style:"",width:10,height:10}),n.setParent(r,i.parentId),n.setNode(a,{domId:a,id:a,parentId:i.parentId,labelStyle:"",padding:0,shape:"labelRect",label:"",style:"",width:10,height:10}),n.setParent(a,i.parentId);let d=structuredClone(e),o=structuredClone(e),s=structuredClone(e);d.label="",d.arrowTypeEnd="none",d.endLabelLeft="",d.endLabelRight="",d.startLabelLeft="",d.id=t+"-cyclic-special-1",o.startLabelRight="",o.startLabelLeft="",o.endLabelLeft="",o.endLabelRight="",o.arrowTypeStart="none",o.arrowTypeEnd="none",o.id=t+"-cyclic-special-mid",s.label="",s.startLabelRight="",s.startLabelLeft="",s.arrowTypeStart="none",i.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,a,o,t+"-cyclic-special-1"),n.setEdge(a,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(i,n,e.type,e.diagramId,void 0,s)},"render")}}]);