vibedoc 1.1.0 → 1.2.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 (247) hide show
  1. package/.next/BUILD_ID +1 -1
  2. package/.next/build-manifest.json +6 -6
  3. package/.next/prerender-manifest.json +3 -3
  4. package/.next/server/app/(app)/activity/page/build-manifest.json +4 -4
  5. package/.next/server/app/(app)/activity/page.js.nft.json +1 -1
  6. package/.next/server/app/(app)/activity/page_client-reference-manifest.js +1 -1
  7. package/.next/server/app/(app)/board/page/build-manifest.json +4 -4
  8. package/.next/server/app/(app)/board/page.js.nft.json +1 -1
  9. package/.next/server/app/(app)/board/page_client-reference-manifest.js +1 -1
  10. package/.next/server/app/(app)/docs/page/build-manifest.json +4 -4
  11. package/.next/server/app/(app)/docs/page.js.nft.json +1 -1
  12. package/.next/server/app/(app)/docs/page_client-reference-manifest.js +1 -1
  13. package/.next/server/app/(app)/explorer/page/build-manifest.json +4 -4
  14. package/.next/server/app/(app)/explorer/page/react-loadable-manifest.json +9 -1
  15. package/.next/server/app/(app)/explorer/page.js.nft.json +1 -1
  16. package/.next/server/app/(app)/explorer/page_client-reference-manifest.js +1 -1
  17. package/.next/server/app/(app)/memory/page/build-manifest.json +4 -4
  18. package/.next/server/app/(app)/memory/page.js.nft.json +1 -1
  19. package/.next/server/app/(app)/memory/page_client-reference-manifest.js +1 -1
  20. package/.next/server/app/(app)/settings/page/build-manifest.json +4 -4
  21. package/.next/server/app/(app)/settings/page.js.nft.json +1 -1
  22. package/.next/server/app/(app)/settings/page_client-reference-manifest.js +1 -1
  23. package/.next/server/app/(app)/setup/page/build-manifest.json +4 -4
  24. package/.next/server/app/(app)/setup/page.js.nft.json +1 -1
  25. package/.next/server/app/(app)/setup/page_client-reference-manifest.js +1 -1
  26. package/.next/server/app/_global-error/page/build-manifest.json +4 -4
  27. package/.next/server/app/_global-error.html +2 -2
  28. package/.next/server/app/_global-error.rsc +1 -1
  29. package/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
  30. package/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
  31. package/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
  32. package/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
  33. package/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  34. package/.next/server/app/_not-found/page/build-manifest.json +4 -4
  35. package/.next/server/app/_not-found.html +1 -1
  36. package/.next/server/app/_not-found.rsc +1 -1
  37. package/.next/server/app/_not-found.segments/_full.segment.rsc +1 -1
  38. package/.next/server/app/_not-found.segments/_head.segment.rsc +1 -1
  39. package/.next/server/app/_not-found.segments/_index.segment.rsc +1 -1
  40. package/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
  41. package/.next/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
  42. package/.next/server/app/_not-found.segments/_tree.segment.rsc +1 -1
  43. package/.next/server/app/activity.html +1 -1
  44. package/.next/server/app/activity.rsc +2 -2
  45. package/.next/server/app/activity.segments/!KGFwcCk/activity/__PAGE__.segment.rsc +2 -2
  46. package/.next/server/app/activity.segments/!KGFwcCk/activity.segment.rsc +1 -1
  47. package/.next/server/app/activity.segments/!KGFwcCk.segment.rsc +1 -1
  48. package/.next/server/app/activity.segments/_full.segment.rsc +2 -2
  49. package/.next/server/app/activity.segments/_head.segment.rsc +1 -1
  50. package/.next/server/app/activity.segments/_index.segment.rsc +1 -1
  51. package/.next/server/app/activity.segments/_tree.segment.rsc +1 -1
  52. package/.next/server/app/api/activity/route.js.nft.json +1 -1
  53. package/.next/server/app/api/backlinks/route.js.nft.json +1 -1
  54. package/.next/server/app/api/context/route.js.nft.json +1 -1
  55. package/.next/server/app/api/decisions/route.js.nft.json +1 -1
  56. package/.next/server/app/api/docs/route.js.nft.json +1 -1
  57. package/.next/server/app/api/explorer/route.js.nft.json +1 -1
  58. package/.next/server/app/api/mcp/route.js.nft.json +1 -1
  59. package/.next/server/app/api/memory/route.js.nft.json +1 -1
  60. package/.next/server/app/api/projects/route.js.nft.json +1 -1
  61. package/.next/server/app/api/settings/route.js.nft.json +1 -1
  62. package/.next/server/app/api/setup/generate/route.js.nft.json +1 -1
  63. package/.next/server/app/api/setup/write/route.js.nft.json +1 -1
  64. package/.next/server/app/api/summary/route.js.nft.json +1 -1
  65. package/.next/server/app/api/tasks/route.js.nft.json +1 -1
  66. package/.next/server/app/board.html +1 -1
  67. package/.next/server/app/board.rsc +2 -2
  68. package/.next/server/app/board.segments/!KGFwcCk/board/__PAGE__.segment.rsc +2 -2
  69. package/.next/server/app/board.segments/!KGFwcCk/board.segment.rsc +1 -1
  70. package/.next/server/app/board.segments/!KGFwcCk.segment.rsc +1 -1
  71. package/.next/server/app/board.segments/_full.segment.rsc +2 -2
  72. package/.next/server/app/board.segments/_head.segment.rsc +1 -1
  73. package/.next/server/app/board.segments/_index.segment.rsc +1 -1
  74. package/.next/server/app/board.segments/_tree.segment.rsc +1 -1
  75. package/.next/server/app/docs.html +1 -1
  76. package/.next/server/app/docs.rsc +2 -2
  77. package/.next/server/app/docs.segments/!KGFwcCk/docs/__PAGE__.segment.rsc +2 -2
  78. package/.next/server/app/docs.segments/!KGFwcCk/docs.segment.rsc +1 -1
  79. package/.next/server/app/docs.segments/!KGFwcCk.segment.rsc +1 -1
  80. package/.next/server/app/docs.segments/_full.segment.rsc +2 -2
  81. package/.next/server/app/docs.segments/_head.segment.rsc +1 -1
  82. package/.next/server/app/docs.segments/_index.segment.rsc +1 -1
  83. package/.next/server/app/docs.segments/_tree.segment.rsc +1 -1
  84. package/.next/server/app/explorer.html +1 -1
  85. package/.next/server/app/explorer.rsc +2 -2
  86. package/.next/server/app/explorer.segments/!KGFwcCk/explorer/__PAGE__.segment.rsc +2 -2
  87. package/.next/server/app/explorer.segments/!KGFwcCk/explorer.segment.rsc +1 -1
  88. package/.next/server/app/explorer.segments/!KGFwcCk.segment.rsc +1 -1
  89. package/.next/server/app/explorer.segments/_full.segment.rsc +2 -2
  90. package/.next/server/app/explorer.segments/_head.segment.rsc +1 -1
  91. package/.next/server/app/explorer.segments/_index.segment.rsc +1 -1
  92. package/.next/server/app/explorer.segments/_tree.segment.rsc +1 -1
  93. package/.next/server/app/index.html +1 -1
  94. package/.next/server/app/index.rsc +1 -1
  95. package/.next/server/app/index.segments/__PAGE__.segment.rsc +1 -1
  96. package/.next/server/app/index.segments/_full.segment.rsc +1 -1
  97. package/.next/server/app/index.segments/_head.segment.rsc +1 -1
  98. package/.next/server/app/index.segments/_index.segment.rsc +1 -1
  99. package/.next/server/app/index.segments/_tree.segment.rsc +1 -1
  100. package/.next/server/app/memory.html +1 -1
  101. package/.next/server/app/memory.rsc +2 -2
  102. package/.next/server/app/memory.segments/!KGFwcCk/memory/__PAGE__.segment.rsc +2 -2
  103. package/.next/server/app/memory.segments/!KGFwcCk/memory.segment.rsc +1 -1
  104. package/.next/server/app/memory.segments/!KGFwcCk.segment.rsc +1 -1
  105. package/.next/server/app/memory.segments/_full.segment.rsc +2 -2
  106. package/.next/server/app/memory.segments/_head.segment.rsc +1 -1
  107. package/.next/server/app/memory.segments/_index.segment.rsc +1 -1
  108. package/.next/server/app/memory.segments/_tree.segment.rsc +1 -1
  109. package/.next/server/app/page/build-manifest.json +4 -4
  110. package/.next/server/app/settings.html +1 -1
  111. package/.next/server/app/settings.rsc +1 -1
  112. package/.next/server/app/settings.segments/!KGFwcCk/settings/__PAGE__.segment.rsc +1 -1
  113. package/.next/server/app/settings.segments/!KGFwcCk/settings.segment.rsc +1 -1
  114. package/.next/server/app/settings.segments/!KGFwcCk.segment.rsc +1 -1
  115. package/.next/server/app/settings.segments/_full.segment.rsc +1 -1
  116. package/.next/server/app/settings.segments/_head.segment.rsc +1 -1
  117. package/.next/server/app/settings.segments/_index.segment.rsc +1 -1
  118. package/.next/server/app/settings.segments/_tree.segment.rsc +1 -1
  119. package/.next/server/app/setup.html +1 -1
  120. package/.next/server/app/setup.rsc +2 -2
  121. package/.next/server/app/setup.segments/!KGFwcCk/setup/__PAGE__.segment.rsc +2 -2
  122. package/.next/server/app/setup.segments/!KGFwcCk/setup.segment.rsc +1 -1
  123. package/.next/server/app/setup.segments/!KGFwcCk.segment.rsc +1 -1
  124. package/.next/server/app/setup.segments/_full.segment.rsc +2 -2
  125. package/.next/server/app/setup.segments/_head.segment.rsc +1 -1
  126. package/.next/server/app/setup.segments/_index.segment.rsc +1 -1
  127. package/.next/server/app/setup.segments/_tree.segment.rsc +1 -1
  128. package/.next/server/chunks/[root-of-the-server]__0e51ee32._.js +2 -2
  129. package/.next/server/chunks/[root-of-the-server]__1453b4c1._.js +1 -1
  130. package/.next/server/chunks/[root-of-the-server]__2bbe3bdc._.js +1 -1
  131. package/.next/server/chunks/[root-of-the-server]__2d66d57b._.js +1 -1
  132. package/.next/server/chunks/[root-of-the-server]__54666fd5._.js +1 -1
  133. package/.next/server/chunks/[root-of-the-server]__7a7e1eb1._.js +1 -1
  134. package/.next/server/chunks/[root-of-the-server]__8e790c7b._.js +1 -1
  135. package/.next/server/chunks/[root-of-the-server]__9d1f6722._.js +1 -1
  136. package/.next/server/chunks/[root-of-the-server]__a0a8fb65._.js +1 -1
  137. package/.next/server/chunks/[root-of-the-server]__a7d932af._.js +1 -1
  138. package/.next/server/chunks/[root-of-the-server]__a9dbcc03._.js +1 -1
  139. package/.next/server/chunks/[root-of-the-server]__aa7a40ec._.js +1 -1
  140. package/.next/server/chunks/[root-of-the-server]__bacbf09e._.js +1 -1
  141. package/.next/server/chunks/[root-of-the-server]__bd44b8e4._.js +1 -1
  142. package/.next/server/chunks/[root-of-the-server]__e27393ea._.js +1 -1
  143. package/.next/server/chunks/_75927d0c._.js +1 -1
  144. package/.next/server/chunks/ssr/1ce3b_dagre-d3-es_src_dagre_index_f9cad90b.js +1 -1
  145. package/.next/server/chunks/ssr/4bd2e_mermaid_dist_chunks_mermaid_core_chunk-S3R3BYOJ_mjs_dfc77fcf._.js +1 -1
  146. package/.next/server/chunks/ssr/78921_y-codemirror_next_src_index_7664c743.js +1 -1
  147. package/.next/server/chunks/ssr/{[root-of-the-server]__2d92fa59._.js → [root-of-the-server]__93c50d95._.js} +2 -2
  148. package/.next/server/chunks/ssr/[root-of-the-server]__93c50d95._.js.map +1 -0
  149. package/.next/server/chunks/ssr/[root-of-the-server]__93f88b5d._.js +1 -1
  150. package/.next/server/chunks/ssr/[root-of-the-server]__c441b191._.js +1 -1
  151. package/.next/server/chunks/ssr/[root-of-the-server]__cb200ebe._.js +1 -1
  152. package/.next/server/chunks/ssr/_0324be5b._.js +1 -1
  153. package/.next/server/chunks/ssr/_04bd0614._.js +1 -1
  154. package/.next/server/chunks/ssr/_07ff42fd._.js +1 -1
  155. package/.next/server/chunks/ssr/_0ee1f47f._.js +3 -0
  156. package/.next/server/chunks/ssr/_0ee1f47f._.js.map +1 -0
  157. package/.next/server/chunks/ssr/_39d9968d._.js +1 -1
  158. package/.next/server/chunks/ssr/_692c5bbf._.js +3 -0
  159. package/.next/server/chunks/ssr/_692c5bbf._.js.map +1 -0
  160. package/.next/server/chunks/ssr/_7b129868._.js +1 -1
  161. package/.next/server/chunks/ssr/_83c6a2ff._.js +1 -1
  162. package/.next/server/chunks/ssr/_85e5ab03._.js +1 -1
  163. package/.next/server/chunks/ssr/_c4b742c5._.js +1 -1
  164. package/.next/server/chunks/ssr/a41dc_lucide-react_dist_esm_icons_folder_de463b3c.js +3 -0
  165. package/.next/server/chunks/ssr/a41dc_lucide-react_dist_esm_icons_folder_de463b3c.js.map +1 -0
  166. package/.next/server/chunks/ssr/a5dda_next_dist_bc8c0e5f._.js +1 -1
  167. package/.next/server/chunks/ssr/a5dda_next_dist_c6de1535._.js +1 -1
  168. package/.next/server/chunks/ssr/a5dda_next_dist_esm_build_templates_app-page_d9140d2d.js +1 -1
  169. package/.next/server/chunks/ssr/fe4dd_lodash-es_092245b0._.js +1 -1
  170. package/.next/server/chunks/ssr/fe4dd_lodash-es_1a0ea541._.js +1 -1
  171. package/.next/server/chunks/ssr/fe4dd_lodash-es_2f02253e._.js +1 -1
  172. package/.next/server/chunks/ssr/fe4dd_lodash-es_59ba66ec._.js +1 -1
  173. package/.next/server/chunks/ssr/fe4dd_lodash-es_6dfac36d._.js +1 -1
  174. package/.next/server/chunks/ssr/fe4dd_lodash-es_dba464ad._.js +1 -1
  175. package/.next/server/chunks/ssr/fe4dd_lodash-es_fe91028b._.js +1 -1
  176. package/.next/server/chunks/ssr/node_modules__pnpm_00962046._.js +1 -1
  177. package/.next/server/chunks/ssr/node_modules__pnpm_337eaf96._.js +1 -1
  178. package/.next/server/chunks/ssr/node_modules__pnpm_3601c997._.js +1 -1
  179. package/.next/server/chunks/ssr/node_modules__pnpm_55b7a1cf._.js +1 -1
  180. package/.next/server/chunks/ssr/node_modules__pnpm_7de47ba7._.js +1 -1
  181. package/.next/server/chunks/ssr/node_modules__pnpm_87d282d9._.js +1 -1
  182. package/.next/server/chunks/ssr/node_modules__pnpm_8b3ed63a._.js +1 -1
  183. package/.next/server/chunks/ssr/node_modules__pnpm_8f8943af._.js +1 -1
  184. package/.next/server/chunks/ssr/node_modules__pnpm_928932b1._.js +1 -1
  185. package/.next/server/chunks/ssr/node_modules__pnpm_df7dcb26._.js +1 -1
  186. package/.next/server/chunks/ssr/node_modules__pnpm_e70a06f1._.js +1 -1
  187. package/.next/server/chunks/ssr/node_modules__pnpm_fa1f464c._.js +1 -1
  188. package/.next/server/middleware-build-manifest.js +4 -4
  189. package/.next/server/pages/404.html +1 -1
  190. package/.next/server/pages/500.html +2 -2
  191. package/.next/server/server-reference-manifest.js +1 -1
  192. package/.next/server/server-reference-manifest.json +1 -1
  193. package/.next/static/chunks/0b640fa39aac2219.js +1 -0
  194. package/.next/static/chunks/0ef3e14dc942367c.js +1 -0
  195. package/.next/static/chunks/13bdd4e22dd90816.js +1 -0
  196. package/.next/static/chunks/{1ed5d145167d8eb4.js → 1ef8bf79adc2568f.js} +5 -5
  197. package/.next/static/chunks/{12a5f59c97d227db.js → 25d2e746e06b38ba.js} +1 -1
  198. package/.next/static/chunks/{811bb9b4cd1b0f6c.js → 316cd4755f253783.js} +1 -1
  199. package/.next/static/chunks/351fac2d373f6f38.js +1 -0
  200. package/.next/static/chunks/{ec0c4ff8847ec34b.js → 452e1bb12e7f0b85.js} +1 -1
  201. package/.next/static/chunks/4a40b1a0e0d1d36e.js +29 -0
  202. package/.next/static/chunks/{70d2c49686d63e40.js → 519aa8080f20453e.js} +1 -1
  203. package/.next/static/chunks/{02e429858f990849.js → 55ab99ffa8724197.js} +1 -1
  204. package/.next/static/chunks/55fe2639abb9cd1a.js +2 -0
  205. package/.next/static/chunks/63e6313e09a72507.js +43 -0
  206. package/.next/static/chunks/6fc607e12ff4f9cc.js +215 -0
  207. package/.next/static/chunks/752c6435ac86719d.js +2 -0
  208. package/.next/static/chunks/8034834601bf13d7.js +1 -0
  209. package/.next/static/chunks/8b98ae3ee4dbcfd1.js +2 -0
  210. package/.next/static/chunks/aad224af68aad5fb.js +4 -0
  211. package/.next/static/chunks/b32c8cafb0f99121.js +24 -0
  212. package/.next/static/chunks/c224fce458bb43f9.js +1 -0
  213. package/.next/static/chunks/c6c6b3aa4797a144.js +1 -0
  214. package/.next/static/chunks/c7596c95b8f7f059.js +1 -0
  215. package/.next/static/chunks/cf9345359d04d2e9.js +63 -0
  216. package/.next/static/chunks/e6164bb2a2fa9b00.js +1 -0
  217. package/.next/static/chunks/e7aa622fd3384345.js +2 -0
  218. package/.next/static/chunks/ed565e62e468fa30.js +24 -0
  219. package/.next/static/chunks/{0bbe3dc32a2a7822.js → fcc2b1530d73e61e.js} +1 -1
  220. package/.next/static/chunks/{turbopack-525ea573490deca2.js → turbopack-2835ad6e71df73d8.js} +1 -1
  221. package/package.json +3 -1
  222. package/.next/server/chunks/ssr/[root-of-the-server]__2d92fa59._.js.map +0 -1
  223. package/.next/server/chunks/ssr/_b9f186b2._.js +0 -3
  224. package/.next/server/chunks/ssr/_b9f186b2._.js.map +0 -1
  225. package/.next/server/chunks/ssr/_e18b7893._.js +0 -3
  226. package/.next/server/chunks/ssr/_e18b7893._.js.map +0 -1
  227. package/.next/static/chunks/0bf088d94c6c3d7f.js +0 -1
  228. package/.next/static/chunks/12cf98019a766d56.js +0 -2
  229. package/.next/static/chunks/5051111686a30794.js +0 -24
  230. package/.next/static/chunks/575ff595808bef08.js +0 -29
  231. package/.next/static/chunks/57eb6d643a88d201.js +0 -1
  232. package/.next/static/chunks/70a4b574c7f36373.js +0 -1
  233. package/.next/static/chunks/73ecac2771f5a28f.js +0 -2
  234. package/.next/static/chunks/7cdf6785100b30b4.js +0 -1
  235. package/.next/static/chunks/962586ff4bc6af4f.js +0 -1
  236. package/.next/static/chunks/aaa492e282370bc6.js +0 -43
  237. package/.next/static/chunks/b07c7aa5dcbca335.js +0 -2
  238. package/.next/static/chunks/b43b33637f3f9958.js +0 -215
  239. package/.next/static/chunks/b90625f065b2fb81.js +0 -1
  240. package/.next/static/chunks/c1ea939eac9e0ef7.js +0 -2
  241. package/.next/static/chunks/c855ae74bfce8619.js +0 -63
  242. package/.next/static/chunks/d4eb6ab4605bef88.js +0 -4
  243. package/.next/static/chunks/d6bceca87929c840.js +0 -24
  244. package/.next/static/chunks/eeb1ca1094488ae7.js +0 -1
  245. /package/.next/static/{eg962yV_Znyf_qyl9Yv8S → T1s0QXbWFmXxNEuUL4myK}/_buildManifest.js +0 -0
  246. /package/.next/static/{eg962yV_Znyf_qyl9Yv8S → T1s0QXbWFmXxNEuUL4myK}/_clientMiddlewareManifest.json +0 -0
  247. /package/.next/static/{eg962yV_Znyf_qyl9Yv8S → T1s0QXbWFmXxNEuUL4myK}/_ssgManifest.js +0 -0
@@ -1,215 +0,0 @@
1
- (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,77123,t=>{"use strict";var e=t.i(13759);t.s(["forEach",()=>e.default])},85898,9235,t=>{"use strict";var e=t.i(17242);let i=function(t){return(null==t?0:t.length)?(0,e.default)(t,1):[]};t.s(["default",0,i],9235),t.s(["flatten",0,i],85898)},80792,86587,34197,93776,t=>{"use strict";var e=t.i(1912),i=t.i(75811),s=t.i(32505),r=t.i(42125);let n=function(t,e){var i=-1,n=(0,r.default)(t)?Array(t.length):[];return(0,s.default)(t,function(t,s,r){n[++i]=e(t,s,r)}),n};t.s(["default",0,n],86587);var a=t.i(94878);let o=function(t,s){return((0,a.default)(t)?e.default:n)(t,(0,i.default)(s,3))};t.s(["default",0,o],34197),t.s(["map",0,o],80792);var l=/\s/;let d=function(t){for(var e=t.length;e--&&l.test(t.charAt(e)););return e};var c=/^\s+/,h=t.i(91947),u=t.i(85647),g=0/0,p=/^[-+]0x[0-9a-f]+$/i,f=/^0b[01]+$/i,_=/^0o[0-7]+$/i,y=parseInt;let m=function(t){if("number"==typeof t)return t;if((0,u.default)(t))return g;if((0,h.default)(t)){var e,i="function"==typeof t.valueOf?t.valueOf():t;t=(0,h.default)(i)?i+"":i}if("string"!=typeof t)return 0===t?t:+t;t=(e=t)?e.slice(0,d(e)+1).replace(c,""):e;var s=f.test(t);return s||_.test(t)?y(t.slice(2),s?2:8):p.test(t)?g:+t};var S=1/0;t.s(["default",0,function(t){return t?(t=m(t))===S||t===-S?(t<0?-1:1)*17976931348623157e292:t==t?t:0:0===t?t:0}],93776)},95790,t=>{"use strict";var e=t.i(88098),i=t.i(22523),s=t.i(43768),r=t.i(98546),n=t.i(91947),a=t.i(23925);let o=function(t,e,o,l){if(!(0,n.default)(t))return t;e=(0,s.default)(e,t);for(var d=-1,c=e.length,h=c-1,u=t;null!=u&&++d<c;){var g=(0,a.default)(e[d]),p=o;if("__proto__"===g||"constructor"===g||"prototype"===g)break;if(d!=h){var f=u[g];void 0===(p=l?l(f,g,u):void 0)&&(p=(0,n.default)(f)?f:(0,r.default)(e[d+1])?[]:{})}(0,i.default)(u,g,p),u=u[g]}return t};t.s(["default",0,function(t,i,r){for(var n=-1,a=i.length,l={};++n<a;){var d=i[n],c=(0,e.default)(t,d);r(c,d)&&o(l,(0,s.default)(d,t),c)}return l}],95790)},83511,t=>{"use strict";var e=t.i(68464),i=t.i(7693),s=t.i(52056),r=t.i(65218),n=Object.prototype,a=n.hasOwnProperty,o=(0,e.default)(function(t,e){t=Object(t);var o=-1,l=e.length,d=l>2?e[2]:void 0;for(d&&(0,s.default)(e[0],e[1],d)&&(l=1);++o<l;)for(var c=e[o],h=(0,r.default)(c),u=-1,g=h.length;++u<g;){var p=h[u],f=t[p];(void 0===f||(0,i.default)(f,n[p])&&!a.call(t,p))&&(t[p]=c[p])}return t});t.s(["defaults",0,o],83511)},22279,t=>{"use strict";var e=t.i(85647);t.s(["default",0,function(t,i,s){for(var r=-1,n=t.length;++r<n;){var a=t[r],o=i(a);if(null!=o&&(void 0===l?o==o&&!(0,e.default)(o):s(o,l)))var l=o,d=a}return d}])},31490,t=>{"use strict";t.s(["last",0,function(t){var e=null==t?0:t.length;return e?t[e-1]:void 0}],31490)},99517,85639,t=>{"use strict";var e=t.i(22279);let i=function(t,e){return t<e};t.s(["default",0,i],85639);var s=t.i(16481);t.s(["default",0,function(t){return t&&t.length?(0,e.default)(t,s.default,i):void 0}],99517)},15987,t=>{"use strict";var e=Object.prototype.hasOwnProperty;let i=function(t,i){return null!=t&&e.call(t,i)};var s=t.i(40160);t.s(["has",0,function(t,e){return null!=t&&(0,s.default)(t,e,i)}],15987)},83375,t=>{"use strict";var e=t.i(75811),i=t.i(42125),s=t.i(26054);t.s(["default",0,function(t){return function(r,n,a){var o=Object(r);if(!(0,i.default)(r)){var l=(0,e.default)(n,3);r=(0,s.default)(r),n=function(t){return l(o[t],t,o)}}var d=t(r,n,a);return d>-1?o[l?r[d]:d]:void 0}}])},40439,t=>{"use strict";var e=t.i(93776);t.s(["default",0,function(t){var i=(0,e.default)(t),s=i%1;return i==i?s?i-s:i:0}])},18573,t=>{"use strict";var e=t.i(83375),i=t.i(78562),s=t.i(75811),r=t.i(40439),n=Math.max,a=(0,e.default)(function(t,e,a){var o=null==t?0:t.length;if(!o)return -1;var l=null==a?0:(0,r.default)(a);return l<0&&(l=n(o+l,0)),(0,i.default)(t,(0,s.default)(e,3),l)});t.s(["find",0,a],18573)},28709,t=>{"use strict";var e=t.i(24277),i=t.i(94878),s=t.i(24904);t.s(["default",0,function(t){return"string"==typeof t||!(0,i.default)(t)&&(0,s.default)(t)&&"[object String]"==(0,e.default)(t)}])},41929,t=>{"use strict";var e=t.i(94878);t.s(["isArray",()=>e.default])},55057,t=>{"use strict";var e=t.i(39467),i=t.i(31195),s=(0,i.__name)((t,s,a,o)=>{t.attr("class",a);let{width:l,height:d,x:c,y:h}=r(t,s);(0,e.configureSvgSize)(t,d,l,o);let u=n(c,h,l,d,s);t.attr("viewBox",u),i.log.debug(`viewBox configured: ${u} with padding: ${s}`)},"setupViewPortForSVG"),r=(0,i.__name)((t,e)=>{let i=t.node()?.getBBox()||{width:0,height:0,x:0,y:0};return{width:i.width+2*e,height:i.height+2*e,x:i.x,y:i.y}},"calculateDimensionsWithPadding"),n=(0,i.__name)((t,e,i,s,r)=>`${t-r} ${e-r} ${i} ${s}`,"createViewBox");t.s(["setupViewPortForSVG",()=>s])},111,t=>{"use strict";var e=t.i(31195);t.i(91577);var i=t.i(92423),s=(0,e.__name)((t,e)=>{let s;return"sandbox"===e&&(s=(0,i.select)("#i"+t)),("sandbox"===e?(0,i.select)(s.nodes()[0].contentDocument.body):(0,i.select)("body")).select(`[id="${t}"]`)},"getDiagramElement");t.s(["getDiagramElement",()=>s])},52483,53282,45365,61210,t=>{"use strict";var e=t.i(62511);t.s(["constant",()=>e.default],53282);var e=e,i=t.i(26152),s=t.i(83757),r=t.i(70473),n=t.i(93182),a=t.i(13759);t.s(["each",()=>a.default],45365);var a=a,o=t.i(57030),l=t.i(17242),d=t.i(68464),c=t.i(85435),h=t.i(29536),u=(0,d.default)(function(t){return(0,c.default)((0,l.default)(t,1,h.default,!0))}),g=t.i(57623),p=t.i(78031);class f{constructor(t={}){this._isDirected=!Object.prototype.hasOwnProperty.call(t,"directed")||t.directed,this._isMultigraph=!!Object.prototype.hasOwnProperty.call(t,"multigraph")&&t.multigraph,this._isCompound=!!Object.prototype.hasOwnProperty.call(t,"compound")&&t.compound,this._label=void 0,this._defaultNodeLabelFn=e.default(void 0),this._defaultEdgeLabelFn=e.default(void 0),this._nodes={},this._isCompound&&(this._parent={},this._children={},this._children["\0"]={}),this._in={},this._preds={},this._out={},this._sucs={},this._edgeObjs={},this._edgeLabels={}}isDirected(){return this._isDirected}isMultigraph(){return this._isMultigraph}isCompound(){return this._isCompound}setGraph(t){return this._label=t,this}graph(){return this._label}setDefaultNodeLabel(t){return i.isFunction(t)||(t=e.default(t)),this._defaultNodeLabelFn=t,this}nodeCount(){return this._nodeCount}nodes(){return s.keys(this._nodes)}sources(){var t=this;return r.filter(this.nodes(),function(e){return n.isEmpty(t._in[e])})}sinks(){var t=this;return r.filter(this.nodes(),function(e){return n.isEmpty(t._out[e])})}setNodes(t,e){var i=arguments,s=this;return a.default(t,function(t){i.length>1?s.setNode(t,e):s.setNode(t)}),this}setNode(t,e){return Object.prototype.hasOwnProperty.call(this._nodes,t)?arguments.length>1&&(this._nodes[t]=e):(this._nodes[t]=arguments.length>1?e:this._defaultNodeLabelFn(t),this._isCompound&&(this._parent[t]="\0",this._children[t]={},this._children["\0"][t]=!0),this._in[t]={},this._preds[t]={},this._out[t]={},this._sucs[t]={},++this._nodeCount),this}node(t){return this._nodes[t]}hasNode(t){return Object.prototype.hasOwnProperty.call(this._nodes,t)}removeNode(t){if(Object.prototype.hasOwnProperty.call(this._nodes,t)){var e=t=>this.removeEdge(this._edgeObjs[t]);delete this._nodes[t],this._isCompound&&(this._removeFromParentsChildList(t),delete this._parent[t],a.default(this.children(t),t=>{this.setParent(t)}),delete this._children[t]),a.default(s.keys(this._in[t]),e),delete this._in[t],delete this._preds[t],a.default(s.keys(this._out[t]),e),delete this._out[t],delete this._sucs[t],--this._nodeCount}return this}setParent(t,e){if(!this._isCompound)throw Error("Cannot set parent in a non-compound graph");if(o.isUndefined(e))e="\0";else{e+="";for(var i=e;!o.isUndefined(i);i=this.parent(i))if(i===t)throw Error("Setting "+e+" as parent of "+t+" would create a cycle");this.setNode(e)}return this.setNode(t),this._removeFromParentsChildList(t),this._parent[t]=e,this._children[e][t]=!0,this}_removeFromParentsChildList(t){delete this._children[this._parent[t]][t]}parent(t){if(this._isCompound){var e=this._parent[t];if("\0"!==e)return e}}children(t){if(o.isUndefined(t)&&(t="\0"),this._isCompound){var e=this._children[t];if(e)return s.keys(e)}else if("\0"===t)return this.nodes();else if(this.hasNode(t))return[]}predecessors(t){var e=this._preds[t];if(e)return s.keys(e)}successors(t){var e=this._sucs[t];if(e)return s.keys(e)}neighbors(t){var e=this.predecessors(t);if(e)return u(e,this.successors(t))}isLeaf(t){return 0===(this.isDirected()?this.successors(t):this.neighbors(t)).length}filterNodes(t){var e=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});e.setGraph(this.graph());var i=this;a.default(this._nodes,function(i,s){t(s)&&e.setNode(s,i)}),a.default(this._edgeObjs,function(t){e.hasNode(t.v)&&e.hasNode(t.w)&&e.setEdge(t,i.edge(t))});var s={};return this._isCompound&&a.default(e.nodes(),function(t){e.setParent(t,function t(r){var n=i.parent(r);return void 0===n||e.hasNode(n)?(s[r]=n,n):n in s?s[n]:t(n)}(t))}),e}setDefaultEdgeLabel(t){return i.isFunction(t)||(t=e.default(t)),this._defaultEdgeLabelFn=t,this}edgeCount(){return this._edgeCount}edges(){return g.values(this._edgeObjs)}setPath(t,e){var i=this,s=arguments;return p.reduce(t,function(t,r){return s.length>1?i.setEdge(t,r,e):i.setEdge(t,r),r}),this}setEdge(){var t,e,i,s,r=!1,n=arguments[0];"object"==typeof n&&null!==n&&"v"in n?(t=n.v,e=n.w,i=n.name,2==arguments.length&&(s=arguments[1],r=!0)):(t=n,e=arguments[1],i=arguments[3],arguments.length>2&&(s=arguments[2],r=!0)),t=""+t,e=""+e,o.isUndefined(i)||(i=""+i);var a=m(this._isDirected,t,e,i);if(Object.prototype.hasOwnProperty.call(this._edgeLabels,a))return r&&(this._edgeLabels[a]=s),this;if(!o.isUndefined(i)&&!this._isMultigraph)throw Error("Cannot set a named edge when isMultigraph = false");this.setNode(t),this.setNode(e),this._edgeLabels[a]=r?s:this._defaultEdgeLabelFn(t,e,i);var l=function(t,e,i,s){var r=""+e,n=""+i;if(!t&&r>n){var a=r;r=n,n=a}var o={v:r,w:n};return s&&(o.name=s),o}(this._isDirected,t,e,i);return t=l.v,e=l.w,Object.freeze(l),this._edgeObjs[a]=l,_(this._preds[e],t),_(this._sucs[t],e),this._in[e][a]=l,this._out[t][a]=l,this._edgeCount++,this}edge(t,e,i){var s=1==arguments.length?S(this._isDirected,arguments[0]):m(this._isDirected,t,e,i);return this._edgeLabels[s]}hasEdge(t,e,i){var s=1==arguments.length?S(this._isDirected,arguments[0]):m(this._isDirected,t,e,i);return Object.prototype.hasOwnProperty.call(this._edgeLabels,s)}removeEdge(t,e,i){var s=1==arguments.length?S(this._isDirected,arguments[0]):m(this._isDirected,t,e,i),r=this._edgeObjs[s];return r&&(t=r.v,e=r.w,delete this._edgeLabels[s],delete this._edgeObjs[s],y(this._preds[e],t),y(this._sucs[t],e),delete this._in[e][s],delete this._out[t][s],this._edgeCount--),this}inEdges(t,e){var i=this._in[t];if(i){var s=g.values(i);return e?r.filter(s,function(t){return t.v===e}):s}}outEdges(t,e){var i=this._out[t];if(i){var s=g.values(i);return e?r.filter(s,function(t){return t.w===e}):s}}nodeEdges(t,e){var i=this.inEdges(t,e);if(i)return i.concat(this.outEdges(t,e))}}function _(t,e){t[e]?t[e]++:t[e]=1}function y(t,e){--t[e]||delete t[e]}function m(t,e,i,s){var r=""+e,n=""+i;if(!t&&r>n){var a=r;r=n,n=a}return r+"\x01"+n+"\x01"+(o.isUndefined(s)?"\0":s)}function S(t,e){return m(t,e.v,e.w,e.name)}f.prototype._nodeCount=0,f.prototype._edgeCount=0,t.s(["Graph",()=>f],61210),t.s([],52483)},71450,t=>{"use strict";var e=t.i(111),i=t.i(55057),s=t.i(15258),r=t.i(285),n=t.i(39467),a=t.i(31195),o=function(){var t=(0,a.__name)(function(t,e,i,s){for(i=i||{},s=t.length;s--;i[t[s]]=e);return i},"o"),e=[1,2],i=[1,3],s=[1,4],r=[2,4],n=[1,9],o=[1,11],l=[1,16],d=[1,17],c=[1,18],h=[1,19],u=[1,33],g=[1,20],p=[1,21],f=[1,22],_=[1,23],y=[1,24],m=[1,26],S=[1,27],b=[1,28],C=[1,29],v=[1,30],x=[1,31],k=[1,32],E=[1,35],T=[1,36],D=[1,37],w=[1,38],$=[1,34],L=[1,4,5,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,41,45,48,51,52,53,54,57],A=[1,4,5,14,15,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,39,40,41,45,48,51,52,53,54,57],I=[4,5,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,41,45,48,51,52,53,54,57],N={trace:(0,a.__name)(function(){},"trace"),yy:{},symbols_:{error:2,start:3,SPACE:4,NL:5,SD:6,document:7,line:8,statement:9,classDefStatement:10,styleStatement:11,cssClassStatement:12,idStatement:13,DESCR:14,"-->":15,HIDE_EMPTY:16,scale:17,WIDTH:18,COMPOSIT_STATE:19,STRUCT_START:20,STRUCT_STOP:21,STATE_DESCR:22,AS:23,ID:24,FORK:25,JOIN:26,CHOICE:27,CONCURRENT:28,note:29,notePosition:30,NOTE_TEXT:31,direction:32,acc_title:33,acc_title_value:34,acc_descr:35,acc_descr_value:36,acc_descr_multiline_value:37,CLICK:38,STRING:39,HREF:40,classDef:41,CLASSDEF_ID:42,CLASSDEF_STYLEOPTS:43,DEFAULT:44,style:45,STYLE_IDS:46,STYLEDEF_STYLEOPTS:47,class:48,CLASSENTITY_IDS:49,STYLECLASS:50,direction_tb:51,direction_bt:52,direction_rl:53,direction_lr:54,eol:55,";":56,EDGE_STATE:57,STYLE_SEPARATOR:58,left_of:59,right_of:60,$accept:0,$end:1},terminals_:{2:"error",4:"SPACE",5:"NL",6:"SD",14:"DESCR",15:"-->",16:"HIDE_EMPTY",17:"scale",18:"WIDTH",19:"COMPOSIT_STATE",20:"STRUCT_START",21:"STRUCT_STOP",22:"STATE_DESCR",23:"AS",24:"ID",25:"FORK",26:"JOIN",27:"CHOICE",28:"CONCURRENT",29:"note",31:"NOTE_TEXT",33:"acc_title",34:"acc_title_value",35:"acc_descr",36:"acc_descr_value",37:"acc_descr_multiline_value",38:"CLICK",39:"STRING",40:"HREF",41:"classDef",42:"CLASSDEF_ID",43:"CLASSDEF_STYLEOPTS",44:"DEFAULT",45:"style",46:"STYLE_IDS",47:"STYLEDEF_STYLEOPTS",48:"class",49:"CLASSENTITY_IDS",50:"STYLECLASS",51:"direction_tb",52:"direction_bt",53:"direction_rl",54:"direction_lr",56:";",57:"EDGE_STATE",58:"STYLE_SEPARATOR",59:"left_of",60:"right_of"},productions_:[0,[3,2],[3,2],[3,2],[7,0],[7,2],[8,2],[8,1],[8,1],[9,1],[9,1],[9,1],[9,1],[9,2],[9,3],[9,4],[9,1],[9,2],[9,1],[9,4],[9,3],[9,6],[9,1],[9,1],[9,1],[9,1],[9,4],[9,4],[9,1],[9,2],[9,2],[9,1],[9,5],[9,5],[10,3],[10,3],[11,3],[12,3],[32,1],[32,1],[32,1],[32,1],[55,1],[55,1],[13,1],[13,1],[13,3],[13,3],[30,1],[30,1]],performAction:(0,a.__name)(function(t,e,i,s,r,n,a){var o=n.length-1;switch(r){case 3:return s.setRootDoc(n[o]),n[o];case 4:this.$=[];break;case 5:"nl"!=n[o]&&(n[o-1].push(n[o]),this.$=n[o-1]);break;case 6:case 7:case 12:this.$=n[o];break;case 8:this.$="nl";break;case 13:let l=n[o-1];l.description=s.trimColon(n[o]),this.$=l;break;case 14:this.$={stmt:"relation",state1:n[o-2],state2:n[o]};break;case 15:let d=s.trimColon(n[o]);this.$={stmt:"relation",state1:n[o-3],state2:n[o-1],description:d};break;case 19:this.$={stmt:"state",id:n[o-3],type:"default",description:"",doc:n[o-1]};break;case 20:var c=n[o],h=n[o-2].trim();if(n[o].match(":")){var u=n[o].split(":");c=u[0],h=[h,u[1]]}this.$={stmt:"state",id:c,type:"default",description:h};break;case 21:this.$={stmt:"state",id:n[o-3],type:"default",description:n[o-5],doc:n[o-1]};break;case 22:this.$={stmt:"state",id:n[o],type:"fork"};break;case 23:this.$={stmt:"state",id:n[o],type:"join"};break;case 24:this.$={stmt:"state",id:n[o],type:"choice"};break;case 25:this.$={stmt:"state",id:s.getDividerId(),type:"divider"};break;case 26:this.$={stmt:"state",id:n[o-1].trim(),note:{position:n[o-2].trim(),text:n[o].trim()}};break;case 29:this.$=n[o].trim(),s.setAccTitle(this.$);break;case 30:case 31:this.$=n[o].trim(),s.setAccDescription(this.$);break;case 32:this.$={stmt:"click",id:n[o-3],url:n[o-2],tooltip:n[o-1]};break;case 33:this.$={stmt:"click",id:n[o-3],url:n[o-1],tooltip:""};break;case 34:case 35:this.$={stmt:"classDef",id:n[o-1].trim(),classes:n[o].trim()};break;case 36:this.$={stmt:"style",id:n[o-1].trim(),styleClass:n[o].trim()};break;case 37:this.$={stmt:"applyClass",id:n[o-1].trim(),styleClass:n[o].trim()};break;case 38:s.setDirection("TB"),this.$={stmt:"dir",value:"TB"};break;case 39:s.setDirection("BT"),this.$={stmt:"dir",value:"BT"};break;case 40:s.setDirection("RL"),this.$={stmt:"dir",value:"RL"};break;case 41:s.setDirection("LR"),this.$={stmt:"dir",value:"LR"};break;case 44:case 45:this.$={stmt:"state",id:n[o].trim(),type:"default",description:""};break;case 46:case 47:this.$={stmt:"state",id:n[o-2].trim(),classes:[n[o].trim()],type:"default",description:""}}},"anonymous"),table:[{3:1,4:e,5:i,6:s},{1:[3]},{3:5,4:e,5:i,6:s},{3:6,4:e,5:i,6:s},t([1,4,5,16,17,19,22,24,25,26,27,28,29,33,35,37,38,41,45,48,51,52,53,54,57],r,{7:7}),{1:[2,1]},{1:[2,2]},{1:[2,3],4:n,5:o,8:8,9:10,10:12,11:13,12:14,13:15,16:l,17:d,19:c,22:h,24:u,25:g,26:p,27:f,28:_,29:y,32:25,33:m,35:S,37:b,38:C,41:v,45:x,48:k,51:E,52:T,53:D,54:w,57:$},t(L,[2,5]),{9:39,10:12,11:13,12:14,13:15,16:l,17:d,19:c,22:h,24:u,25:g,26:p,27:f,28:_,29:y,32:25,33:m,35:S,37:b,38:C,41:v,45:x,48:k,51:E,52:T,53:D,54:w,57:$},t(L,[2,7]),t(L,[2,8]),t(L,[2,9]),t(L,[2,10]),t(L,[2,11]),t(L,[2,12],{14:[1,40],15:[1,41]}),t(L,[2,16]),{18:[1,42]},t(L,[2,18],{20:[1,43]}),{23:[1,44]},t(L,[2,22]),t(L,[2,23]),t(L,[2,24]),t(L,[2,25]),{30:45,31:[1,46],59:[1,47],60:[1,48]},t(L,[2,28]),{34:[1,49]},{36:[1,50]},t(L,[2,31]),{13:51,24:u,57:$},{42:[1,52],44:[1,53]},{46:[1,54]},{49:[1,55]},t(A,[2,44],{58:[1,56]}),t(A,[2,45],{58:[1,57]}),t(L,[2,38]),t(L,[2,39]),t(L,[2,40]),t(L,[2,41]),t(L,[2,6]),t(L,[2,13]),{13:58,24:u,57:$},t(L,[2,17]),t(I,r,{7:59}),{24:[1,60]},{24:[1,61]},{23:[1,62]},{24:[2,48]},{24:[2,49]},t(L,[2,29]),t(L,[2,30]),{39:[1,63],40:[1,64]},{43:[1,65]},{43:[1,66]},{47:[1,67]},{50:[1,68]},{24:[1,69]},{24:[1,70]},t(L,[2,14],{14:[1,71]}),{4:n,5:o,8:8,9:10,10:12,11:13,12:14,13:15,16:l,17:d,19:c,21:[1,72],22:h,24:u,25:g,26:p,27:f,28:_,29:y,32:25,33:m,35:S,37:b,38:C,41:v,45:x,48:k,51:E,52:T,53:D,54:w,57:$},t(L,[2,20],{20:[1,73]}),{31:[1,74]},{24:[1,75]},{39:[1,76]},{39:[1,77]},t(L,[2,34]),t(L,[2,35]),t(L,[2,36]),t(L,[2,37]),t(A,[2,46]),t(A,[2,47]),t(L,[2,15]),t(L,[2,19]),t(I,r,{7:78}),t(L,[2,26]),t(L,[2,27]),{5:[1,79]},{5:[1,80]},{4:n,5:o,8:8,9:10,10:12,11:13,12:14,13:15,16:l,17:d,19:c,21:[1,81],22:h,24:u,25:g,26:p,27:f,28:_,29:y,32:25,33:m,35:S,37:b,38:C,41:v,45:x,48:k,51:E,52:T,53:D,54:w,57:$},t(L,[2,32]),t(L,[2,33]),t(L,[2,21])],defaultActions:{5:[2,1],6:[2,2],47:[2,48],48:[2,49]},parseError:(0,a.__name)(function(t,e){if(e.recoverable)this.trace(t);else{var i=Error(t);throw i.hash=e,i}},"parseError"),parse:(0,a.__name)(function(t){var e=this,i=[0],s=[],r=[null],n=[],o=this.table,l="",d=0,c=0,h=0,u=n.slice.call(arguments,1),g=Object.create(this.lexer),p={};for(var f in this.yy)Object.prototype.hasOwnProperty.call(this.yy,f)&&(p[f]=this.yy[f]);g.setInput(t,p),p.lexer=g,p.parser=this,void 0===g.yylloc&&(g.yylloc={});var _=g.yylloc;n.push(_);var y=g.options&&g.options.ranges;function m(){var t;return"number"!=typeof(t=s.pop()||g.lex()||1)&&(t instanceof Array&&(t=(s=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof p.parseError?this.parseError=p.parseError:this.parseError=Object.getPrototypeOf(this).parseError,(0,a.__name)(function(t){i.length=i.length-2*t,r.length=r.length-t,n.length=n.length-t},"popStack"),(0,a.__name)(m,"lex");for(var S,b,C,v,x,k,E,T,D,w={};;){if(C=i[i.length-1],this.defaultActions[C]?v=this.defaultActions[C]:(null==S&&(S=m()),v=o[C]&&o[C][S]),void 0===v||!v.length||!v[0]){var $="";for(k in D=[],o[C])this.terminals_[k]&&k>2&&D.push("'"+this.terminals_[k]+"'");$=g.showPosition?"Parse error on line "+(d+1)+":\n"+g.showPosition()+"\nExpecting "+D.join(", ")+", got '"+(this.terminals_[S]||S)+"'":"Parse error on line "+(d+1)+": Unexpected "+(1==S?"end of input":"'"+(this.terminals_[S]||S)+"'"),this.parseError($,{text:g.match,token:this.terminals_[S]||S,line:g.yylineno,loc:_,expected:D})}if(v[0]instanceof Array&&v.length>1)throw Error("Parse Error: multiple actions possible at state: "+C+", token: "+S);switch(v[0]){case 1:i.push(S),r.push(g.yytext),n.push(g.yylloc),i.push(v[1]),S=null,b?(S=b,b=null):(c=g.yyleng,l=g.yytext,d=g.yylineno,_=g.yylloc,h>0&&h--);break;case 2:if(E=this.productions_[v[1]][1],w.$=r[r.length-E],w._$={first_line:n[n.length-(E||1)].first_line,last_line:n[n.length-1].last_line,first_column:n[n.length-(E||1)].first_column,last_column:n[n.length-1].last_column},y&&(w._$.range=[n[n.length-(E||1)].range[0],n[n.length-1].range[1]]),void 0!==(x=this.performAction.apply(w,[l,c,d,p,v[1],r,n].concat(u))))return x;E&&(i=i.slice(0,-1*E*2),r=r.slice(0,-1*E),n=n.slice(0,-1*E)),i.push(this.productions_[v[1]][0]),r.push(w.$),n.push(w._$),T=o[i[i.length-2]][i[i.length-1]],i.push(T);break;case 3:return!0}}return!0},"parse")};function O(){this.yy={}}return N.lexer={EOF:1,parseError:(0,a.__name)(function(t,e){if(this.yy.parser)this.yy.parser.parseError(t,e);else throw Error(t)},"parseError"),setInput:(0,a.__name)(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,a.__name)(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,a.__name)(function(t){var e=t.length,i=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var s=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),i.length-1&&(this.yylineno-=i.length-1);var 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:i?(i.length===s.length?this.yylloc.first_column:0)+s[s.length-i.length].length-i[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[r[0],r[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},"unput"),more:(0,a.__name)(function(){return this._more=!0,this},"more"),reject:(0,a.__name)(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,a.__name)(function(t){this.unput(this.match.slice(t))},"less"),pastInput:(0,a.__name)(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,a.__name)(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,a.__name)(function(){var t=this.pastInput(),e=Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},"showPosition"),test_match:(0,a.__name)(function(t,e){var i,s,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))),(s=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=s.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:s?s[s.length-1].length-s[s.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],i=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),i)return i;if(this._backtrack)for(var n in r)this[n]=r[n];return!1},"test_match"),next:(0,a.__name)(function(){if(this.done)return this.EOF;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var t,e,i,s,r=this._currentRules(),n=0;n<r.length;n++)if((i=this._input.match(this.rules[r[n]]))&&(!e||i[0].length>e[0].length)){if(e=i,s=n,this.options.backtrack_lexer){if(!1!==(t=this.test_match(i,r[n])))return t;if(!this._backtrack)return!1;e=!1;continue}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,r[s]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:(0,a.__name)(function(){var t=this.next();return t||this.lex()},"lex"),begin:(0,a.__name)(function(t){this.conditionStack.push(t)},"begin"),popState:(0,a.__name)(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:(0,a.__name)(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,a.__name)(function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},"topState"),pushState:(0,a.__name)(function(t){this.begin(t)},"pushState"),stateStackSize:(0,a.__name)(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:(0,a.__name)(function(t,e,i,s){switch(i){case 0:return 38;case 1:return 40;case 2:return 39;case 3:return 44;case 4:case 45:return 51;case 5:case 46:return 52;case 6:case 47:return 53;case 7:case 48:return 54;case 8:case 9:case 11:case 12:case 13:case 14:case 57:case 59:case 65:break;case 10:case 80:return 5;case 15:case 35:return this.pushState("SCALE"),17;case 16:case 36:return 18;case 17:case 23:case 37:case 52:case 55:this.popState();break;case 18:return this.begin("acc_title"),33;case 19:return this.popState(),"acc_title_value";case 20:return this.begin("acc_descr"),35;case 21:return this.popState(),"acc_descr_value";case 22:this.begin("acc_descr_multiline");break;case 24:return"acc_descr_multiline_value";case 25:return this.pushState("CLASSDEF"),41;case 26:return this.popState(),this.pushState("CLASSDEFID"),"DEFAULT_CLASSDEF_ID";case 27:return this.popState(),this.pushState("CLASSDEFID"),42;case 28:return this.popState(),43;case 29:return this.pushState("CLASS"),48;case 30:return this.popState(),this.pushState("CLASS_STYLE"),49;case 31:return this.popState(),50;case 32:return this.pushState("STYLE"),45;case 33:return this.popState(),this.pushState("STYLEDEF_STYLES"),46;case 34:return this.popState(),47;case 38:this.pushState("STATE");break;case 39:case 42:return this.popState(),e.yytext=e.yytext.slice(0,-8).trim(),25;case 40:case 43:return this.popState(),e.yytext=e.yytext.slice(0,-8).trim(),26;case 41:case 44:return this.popState(),e.yytext=e.yytext.slice(0,-10).trim(),27;case 49:this.pushState("STATE_STRING");break;case 50:return this.pushState("STATE_ID"),"AS";case 51:case 67:return this.popState(),"ID";case 53:return"STATE_DESCR";case 54:return 19;case 56:return this.popState(),this.pushState("struct"),20;case 58:return this.popState(),21;case 60:return this.begin("NOTE"),29;case 61:return this.popState(),this.pushState("NOTE_ID"),59;case 62:return this.popState(),this.pushState("NOTE_ID"),60;case 63:this.popState(),this.pushState("FLOATING_NOTE");break;case 64:return this.popState(),this.pushState("FLOATING_NOTE_ID"),"AS";case 66:return"NOTE_TEXT";case 68:return this.popState(),this.pushState("NOTE_TEXT"),24;case 69:return this.popState(),e.yytext=e.yytext.substr(2).trim(),31;case 70:return this.popState(),e.yytext=e.yytext.slice(0,-8).trim(),31;case 71:case 72:return 6;case 73:return 16;case 74:return 57;case 75:return 24;case 76:return e.yytext=e.yytext.trim(),14;case 77:return 15;case 78:return 28;case 79:return 58;case 81:return"INVALID"}},"anonymous"),rules:[/^(?:click\b)/i,/^(?:href\b)/i,/^(?:"[^"]*")/i,/^(?:default\b)/i,/^(?:.*direction\s+TB[^\n]*)/i,/^(?:.*direction\s+BT[^\n]*)/i,/^(?:.*direction\s+RL[^\n]*)/i,/^(?:.*direction\s+LR[^\n]*)/i,/^(?:%%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[\n]+)/i,/^(?:[\s]+)/i,/^(?:((?!\n)\s)+)/i,/^(?:#[^\n]*)/i,/^(?:%[^\n]*)/i,/^(?:scale\s+)/i,/^(?:\d+)/i,/^(?:\s+width\b)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:classDef\s+)/i,/^(?:DEFAULT\s+)/i,/^(?:\w+\s+)/i,/^(?:[^\n]*)/i,/^(?:class\s+)/i,/^(?:(\w+)+((,\s*\w+)*))/i,/^(?:[^\n]*)/i,/^(?:style\s+)/i,/^(?:[\w,]+\s+)/i,/^(?:[^\n]*)/i,/^(?:scale\s+)/i,/^(?:\d+)/i,/^(?:\s+width\b)/i,/^(?:state\s+)/i,/^(?:.*<<fork>>)/i,/^(?:.*<<join>>)/i,/^(?:.*<<choice>>)/i,/^(?:.*\[\[fork\]\])/i,/^(?:.*\[\[join\]\])/i,/^(?:.*\[\[choice\]\])/i,/^(?:.*direction\s+TB[^\n]*)/i,/^(?:.*direction\s+BT[^\n]*)/i,/^(?:.*direction\s+RL[^\n]*)/i,/^(?:.*direction\s+LR[^\n]*)/i,/^(?:["])/i,/^(?:\s*as\s+)/i,/^(?:[^\n\{]*)/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:[^\n\s\{]+)/i,/^(?:\n)/i,/^(?:\{)/i,/^(?:%%(?!\{)[^\n]*)/i,/^(?:\})/i,/^(?:[\n])/i,/^(?:note\s+)/i,/^(?:left of\b)/i,/^(?:right of\b)/i,/^(?:")/i,/^(?:\s*as\s*)/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:[^\n]*)/i,/^(?:\s*[^:\n\s\-]+)/i,/^(?:\s*:[^:\n;]+)/i,/^(?:[\s\S]*?end note\b)/i,/^(?:stateDiagram\s+)/i,/^(?:stateDiagram-v2\s+)/i,/^(?:hide empty description\b)/i,/^(?:\[\*\])/i,/^(?:[^:\n\s\-\{]+)/i,/^(?:\s*:[^:\n;]+)/i,/^(?:-->)/i,/^(?:--)/i,/^(?::::)/i,/^(?:$)/i,/^(?:.)/i],conditions:{LINE:{rules:[12,13],inclusive:!1},struct:{rules:[12,13,25,29,32,38,45,46,47,48,57,58,59,60,74,75,76,77,78],inclusive:!1},FLOATING_NOTE_ID:{rules:[67],inclusive:!1},FLOATING_NOTE:{rules:[64,65,66],inclusive:!1},NOTE_TEXT:{rules:[69,70],inclusive:!1},NOTE_ID:{rules:[68],inclusive:!1},NOTE:{rules:[61,62,63],inclusive:!1},STYLEDEF_STYLEOPTS:{rules:[],inclusive:!1},STYLEDEF_STYLES:{rules:[34],inclusive:!1},STYLE_IDS:{rules:[],inclusive:!1},STYLE:{rules:[33],inclusive:!1},CLASS_STYLE:{rules:[31],inclusive:!1},CLASS:{rules:[30],inclusive:!1},CLASSDEFID:{rules:[28],inclusive:!1},CLASSDEF:{rules:[26,27],inclusive:!1},acc_descr_multiline:{rules:[23,24],inclusive:!1},acc_descr:{rules:[21],inclusive:!1},acc_title:{rules:[19],inclusive:!1},SCALE:{rules:[16,17,36,37],inclusive:!1},ALIAS:{rules:[],inclusive:!1},STATE_ID:{rules:[51],inclusive:!1},STATE_STRING:{rules:[52,53],inclusive:!1},FORK_STATE:{rules:[],inclusive:!1},STATE:{rules:[12,13,39,40,41,42,43,44,49,50,54,55,56],inclusive:!1},ID:{rules:[12,13],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7,8,9,10,11,13,14,15,18,20,22,25,29,32,35,38,56,60,71,72,73,74,75,76,77,79,80,81],inclusive:!0}}},(0,a.__name)(O,"Parser"),O.prototype=N,N.Parser=O,new O}();o.parser=o;var l="TB",d="state",c="root",h="relation",u="default",g="divider",p="fill:none",f="fill: #333",_="text",y="normal",m="rect",S="rectWithTitle",b="divider",C="roundedWithTitle",v="statediagram",x=`${v}-state`,k="transition",E=`${k} note-edge`,T=`${v}-note`,D=`${v}-cluster`,w=`${v}-cluster-alt`,$="parent",L="note",A="----",I=`${A}${L}`,N=`${A}${$}`,O=(0,a.__name)((t,e=l)=>{if(!t.doc)return e;let i=e;for(let e of t.doc)"dir"===e.stmt&&(i=e.value);return i},"getDir"),B={getClasses:(0,a.__name)(function(t,e){return e.db.getClasses()},"getClasses"),draw:(0,a.__name)(async function(t,o,l,d){a.log.info("REF0:"),a.log.info("Drawing state diagram (v2)",o);let{securityLevel:c,state:h,layout:u}=(0,n.getConfig2)();d.db.extract(d.db.getRootDocV2());let g=d.db.getData(),p=(0,e.getDiagramElement)(o,c);g.type=d.type,g.layoutAlgorithm=u,g.nodeSpacing=h?.nodeSpacing||50,g.rankSpacing=h?.rankSpacing||50,g.markers=["barb"],g.diagramId=o,await (0,s.render)(g,p);try{("function"==typeof d.db.getLinks?d.db.getLinks():new Map).forEach((t,e)=>{let i,s="string"==typeof e?e:"string"==typeof e?.id?e.id:"";if(!s)return void a.log.warn("⚠️ Invalid or missing stateId from key:",JSON.stringify(e));let r=p.node()?.querySelectorAll("g");if(r?.forEach(t=>{t.textContent?.trim()===s&&(i=t)}),!i)return void a.log.warn("⚠️ Could not find node matching text:",s);let n=i.parentNode;if(!n)return void a.log.warn("⚠️ Node has no parent, cannot wrap:",s);let o=document.createElementNS("http://www.w3.org/2000/svg","a"),l=t.url.replace(/^"+|"+$/g,"");if(o.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",l),o.setAttribute("target","_blank"),t.tooltip){let e=t.tooltip.replace(/^"+|"+$/g,"");o.setAttribute("title",e)}n.replaceChild(o,i),o.appendChild(i),a.log.info("🔗 Wrapped node in <a> tag for:",s,t.url)})}catch(t){a.log.error("❌ Error injecting clickable links:",t)}r.utils_default.insertTitle(p,"statediagramTitleText",h?.titleTopMargin??25,d.db.getDiagramTitle()),(0,i.setupViewPortForSVG)(p,8,v,h?.useMaxWidth??!0)},"draw"),getDir:O},R=new Map,P=0;function F(t="",e=0,i="",s=A){let r=null!==i&&i.length>0?`${s}${i}`:"";return`state-${t}${r}-${e}`}(0,a.__name)(F,"stateDomId");var j=(0,a.__name)((t,e,i,s,r,o,l,c)=>{a.log.trace("items",e),e.forEach(e=>{switch(e.stmt){case d:case u:U(t,e,i,s,r,o,l,c);break;case h:{U(t,e.state1,i,s,r,o,l,c),U(t,e.state2,i,s,r,o,l,c);let a={id:"edge"+P,start:e.state1.id,end:e.state2.id,arrowhead:"normal",arrowTypeEnd:"arrow_barb",style:p,labelStyle:"",label:n.common_default.sanitizeText(e.description??"",(0,n.getConfig2)()),arrowheadStyle:f,labelpos:"c",labelType:_,thickness:y,classes:k,look:l};r.push(a),P++}}})},"setupDoc"),G=(0,a.__name)((t,e=l)=>{let i=e;if(t.doc)for(let e of t.doc)"dir"===e.stmt&&(i=e.value);return i},"getDir");function M(t,e,i){if(!e.id||"</join></fork>"===e.id||"</choice>"===e.id)return;e.cssClasses&&(Array.isArray(e.cssCompiledStyles)||(e.cssCompiledStyles=[]),e.cssClasses.split(" ").forEach(t=>{let s=i.get(t);s&&(e.cssCompiledStyles=[...e.cssCompiledStyles??[],...s.styles])}));let s=t.find(t=>t.id===e.id);s?Object.assign(s,e):t.push(e)}function z(t){return t?.classes?.join(" ")??""}function Y(t){return t?.styles??[]}(0,a.__name)(M,"insertOrUpdateNode"),(0,a.__name)(z,"getClassesFromDbInfo"),(0,a.__name)(Y,"getStylesFromDbInfo");var U=(0,a.__name)((t,e,i,s,r,o,l,d)=>{let c=e.id,h=i.get(c),v=z(h),k=Y(h),A=(0,n.getConfig2)();if(a.log.info("dataFetcher parsedItem",e,h,k),"root"!==c){let i=m;!0===e.start?i="stateStart":!1===e.start&&(i="stateEnd"),e.type!==u&&(i=e.type),R.get(c)||R.set(c,{id:c,shape:i,description:n.common_default.sanitizeText(c,A),cssClasses:`${v} ${x}`,cssStyles:k});let h=R.get(c);e.description&&(Array.isArray(h.description)?(h.shape=S,h.description.push(e.description)):h.description?.length&&h.description.length>0?(h.shape=S,h.description===c?h.description=[e.description]:h.description=[h.description,e.description]):(h.shape=m,h.description=e.description),h.description=n.common_default.sanitizeTextOrArray(h.description,A)),h.description?.length===1&&h.shape===S&&("group"===h.type?h.shape=C:h.shape=m),!h.type&&e.doc&&(a.log.info("Setting cluster for XCX",c,G(e)),h.type="group",h.isGroup=!0,h.dir=G(e),h.shape=e.type===g?b:C,h.cssClasses=`${h.cssClasses} ${D} ${o?w:""}`);let O={labelStyle:"",shape:h.shape,label:h.description,cssClasses:h.cssClasses,cssCompiledStyles:[],cssStyles:h.cssStyles,id:c,dir:h.dir,domId:F(c,P),type:h.type,isGroup:"group"===h.type,padding:8,rx:10,ry:10,look:l};if(O.shape===b&&(O.label=""),t&&"root"!==t.id&&(a.log.trace("Setting node ",c," to be child of its parent ",t.id),O.parentId=t.id),O.centerLabel=!0,e.note){let t={labelStyle:"",shape:"note",label:e.note.text,cssClasses:T,cssStyles:[],cssCompiledStyles:[],id:c+I+"-"+P,domId:F(c,P,L),type:h.type,isGroup:"group"===h.type,padding:A.flowchart?.padding,look:l,position:e.note.position},i=c+N,n={labelStyle:"",shape:"noteGroup",label:e.note.text,cssClasses:h.cssClasses,cssStyles:[],id:c+N,domId:F(c,P,$),type:"group",isGroup:!0,padding:16,look:l,position:e.note.position};P++,n.id=i,t.parentId=i,M(s,n,d),M(s,t,d),M(s,O,d);let a=c,o=t.id;"left of"===e.note.position&&(a=t.id,o=c),r.push({id:a+"-"+o,start:a,end:o,arrowhead:"none",arrowTypeEnd:"",style:p,labelStyle:"",classes:E,arrowheadStyle:f,labelpos:"c",labelType:_,thickness:y,look:l})}else M(s,O,d)}e.doc&&(a.log.trace("Adding nodes children "),j(e,e.doc,i,s,r,!o,l,d))},"dataFetcher"),H=(0,a.__name)(()=>{R.clear(),P=0},"reset"),W="start",V="color",X="fill",J=(0,a.__name)(()=>new Map,"newClassesList"),K=(0,a.__name)(()=>({relations:[],states:new Map,documents:{}}),"newDoc"),q=(0,a.__name)(t=>JSON.parse(JSON.stringify(t)),"clone"),Z=class{constructor(t){this.version=t,this.nodes=[],this.edges=[],this.rootDoc=[],this.classes=J(),this.documents={root:K()},this.currentDocument=this.documents.root,this.startEndCount=0,this.dividerCnt=0,this.links=new Map,this.getAccTitle=n.getAccTitle,this.setAccTitle=n.setAccTitle,this.getAccDescription=n.getAccDescription,this.setAccDescription=n.setAccDescription,this.setDiagramTitle=n.setDiagramTitle,this.getDiagramTitle=n.getDiagramTitle,this.clear(),this.setRootDoc=this.setRootDoc.bind(this),this.getDividerId=this.getDividerId.bind(this),this.setDirection=this.setDirection.bind(this),this.trimColon=this.trimColon.bind(this)}static{(0,a.__name)(this,"StateDB")}static{this.relationType={AGGREGATION:0,EXTENSION:1,COMPOSITION:2,DEPENDENCY:3}}extract(t){for(let e of(this.clear(!0),Array.isArray(t)?t:t.doc))switch(e.stmt){case d:this.addState(e.id.trim(),e.type,e.doc,e.description,e.note);break;case h:this.addRelation(e.state1,e.state2,e.description);break;case"classDef":this.addStyleClass(e.id.trim(),e.classes);break;case"style":this.handleStyleDef(e);break;case"applyClass":this.setCssClass(e.id.trim(),e.styleClass);break;case"click":this.addLink(e.id,e.url,e.tooltip)}let e=this.getStates(),i=(0,n.getConfig2)();for(let t of(H(),U(void 0,this.getRootDocV2(),e,this.nodes,this.edges,!0,i.look,this.classes),this.nodes))if(Array.isArray(t.label)){if(t.description=t.label.slice(1),t.isGroup&&t.description.length>0)throw Error(`Group nodes can only have label. Remove the additional description for node [${t.id}]`);t.label=t.label[0]}}handleStyleDef(t){let e=t.id.trim().split(","),i=t.styleClass.split(",");for(let t of e){let e=this.getState(t);if(!e){let i=t.trim();this.addState(i),e=this.getState(i)}e&&(e.styles=i.map(t=>t.replace(/;/g,"")?.trim()))}}setRootDoc(t){a.log.info("Setting root doc",t),this.rootDoc=t,1===this.version?this.extract(t):this.extract(this.getRootDocV2())}docTranslator(t,e,i){if(e.stmt===h){this.docTranslator(t,e.state1,!0),this.docTranslator(t,e.state2,!1);return}if(e.stmt===d&&("[*]"===e.id?(e.id=t.id+(i?"_start":"_end"),e.start=i):e.id=e.id.trim()),e.stmt!==c&&e.stmt!==d||!e.doc)return;let s=[],n=[];for(let t of e.doc)if(t.type===g){let e=q(t);e.doc=q(n),s.push(e),n=[]}else n.push(t);if(s.length>0&&n.length>0){let t={stmt:d,id:(0,r.generateId)(),type:"divider",doc:q(n)};s.push(q(t)),e.doc=s}e.doc.forEach(t=>this.docTranslator(e,t,!0))}getRootDocV2(){return this.docTranslator({id:c,stmt:c},{id:c,stmt:c,doc:this.rootDoc},!0),{id:c,doc:this.rootDoc}}addState(t,e=u,i,s,r,o,l,c){let h=t?.trim();if(this.currentDocument.states.has(h)){let t=this.currentDocument.states.get(h);if(!t)throw Error(`State not found: ${h}`);t.doc||(t.doc=i),t.type||(t.type=e)}else a.log.info("Adding state ",h,s),this.currentDocument.states.set(h,{stmt:d,id:h,descriptions:[],type:e,doc:i,note:r,classes:[],styles:[],textStyles:[]});if(s&&(a.log.info("Setting state description",h,s),(Array.isArray(s)?s:[s]).forEach(t=>this.addDescription(h,t.trim()))),r){let t=this.currentDocument.states.get(h);if(!t)throw Error(`State not found: ${h}`);t.note=r,t.note.text=n.common_default.sanitizeText(t.note.text,(0,n.getConfig2)())}o&&(a.log.info("Setting state classes",h,o),(Array.isArray(o)?o:[o]).forEach(t=>this.setCssClass(h,t.trim()))),l&&(a.log.info("Setting state styles",h,l),(Array.isArray(l)?l:[l]).forEach(t=>this.setStyle(h,t.trim()))),c&&(a.log.info("Setting state styles",h,l),(Array.isArray(c)?c:[c]).forEach(t=>this.setTextStyle(h,t.trim())))}clear(t){this.nodes=[],this.edges=[],this.documents={root:K()},this.currentDocument=this.documents.root,this.startEndCount=0,this.classes=J(),t||(this.links=new Map,(0,n.clear)())}getState(t){return this.currentDocument.states.get(t)}getStates(){return this.currentDocument.states}logDocuments(){a.log.info("Documents = ",this.documents)}getRelations(){return this.currentDocument.relations}addLink(t,e,i){this.links.set(t,{url:e,tooltip:i}),a.log.warn("Adding link",t,e,i)}getLinks(){return this.links}startIdIfNeeded(t=""){return"[*]"===t?(this.startEndCount++,`${W}${this.startEndCount}`):t}startTypeIfNeeded(t="",e=u){return"[*]"===t?W:e}endIdIfNeeded(t=""){return"[*]"===t?(this.startEndCount++,`end${this.startEndCount}`):t}endTypeIfNeeded(t="",e=u){return"[*]"===t?"end":e}addRelationObjs(t,e,i=""){let s=this.startIdIfNeeded(t.id.trim()),r=this.startTypeIfNeeded(t.id.trim(),t.type),a=this.startIdIfNeeded(e.id.trim()),o=this.startTypeIfNeeded(e.id.trim(),e.type);this.addState(s,r,t.doc,t.description,t.note,t.classes,t.styles,t.textStyles),this.addState(a,o,e.doc,e.description,e.note,e.classes,e.styles,e.textStyles),this.currentDocument.relations.push({id1:s,id2:a,relationTitle:n.common_default.sanitizeText(i,(0,n.getConfig2)())})}addRelation(t,e,i){if("object"==typeof t&&"object"==typeof e)this.addRelationObjs(t,e,i);else if("string"==typeof t&&"string"==typeof e){let s=this.startIdIfNeeded(t.trim()),r=this.startTypeIfNeeded(t),a=this.endIdIfNeeded(e.trim()),o=this.endTypeIfNeeded(e);this.addState(s,r),this.addState(a,o),this.currentDocument.relations.push({id1:s,id2:a,relationTitle:i?n.common_default.sanitizeText(i,(0,n.getConfig2)()):void 0})}}addDescription(t,e){let i=this.currentDocument.states.get(t),s=e.startsWith(":")?e.replace(":","").trim():e;i?.descriptions?.push(n.common_default.sanitizeText(s,(0,n.getConfig2)()))}cleanupLabel(t){return t.startsWith(":")?t.slice(2).trim():t.trim()}getDividerId(){return this.dividerCnt++,`divider-id-${this.dividerCnt}`}addStyleClass(t,e=""){this.classes.has(t)||this.classes.set(t,{id:t,styles:[],textStyles:[]});let i=this.classes.get(t);e&&i&&e.split(",").forEach(t=>{let e=t.replace(/([^;]*);/,"$1").trim();if(RegExp(V).exec(t)){let t=e.replace(X,"bgFill").replace(V,X);i.textStyles.push(t)}i.styles.push(e)})}getClasses(){return this.classes}setCssClass(t,e){t.split(",").forEach(t=>{let i=this.getState(t);if(!i){let e=t.trim();this.addState(e),i=this.getState(e)}i?.classes?.push(e)})}setStyle(t,e){this.getState(t)?.styles?.push(e)}setTextStyle(t,e){this.getState(t)?.textStyles?.push(e)}getDirectionStatement(){return this.rootDoc.find(t=>"dir"===t.stmt)}getDirection(){return this.getDirectionStatement()?.value??"TB"}setDirection(t){let e=this.getDirectionStatement();e?e.value=t:this.rootDoc.unshift({stmt:"dir",value:t})}trimColon(t){return t.startsWith(":")?t.slice(1).trim():t.trim()}getData(){let t=(0,n.getConfig2)();return{nodes:this.nodes,edges:this.edges,other:{},config:t,direction:O(this.getRootDocV2())}}getConfig(){return(0,n.getConfig2)().state}},Q=(0,a.__name)(t=>`
2
- defs #statediagram-barbEnd {
3
- fill: ${t.transitionColor};
4
- stroke: ${t.transitionColor};
5
- }
6
- g.stateGroup text {
7
- fill: ${t.nodeBorder};
8
- stroke: none;
9
- font-size: 10px;
10
- }
11
- g.stateGroup text {
12
- fill: ${t.textColor};
13
- stroke: none;
14
- font-size: 10px;
15
-
16
- }
17
- g.stateGroup .state-title {
18
- font-weight: bolder;
19
- fill: ${t.stateLabelColor};
20
- }
21
-
22
- g.stateGroup rect {
23
- fill: ${t.mainBkg};
24
- stroke: ${t.nodeBorder};
25
- }
26
-
27
- g.stateGroup line {
28
- stroke: ${t.lineColor};
29
- stroke-width: 1;
30
- }
31
-
32
- .transition {
33
- stroke: ${t.transitionColor};
34
- stroke-width: 1;
35
- fill: none;
36
- }
37
-
38
- .stateGroup .composit {
39
- fill: ${t.background};
40
- border-bottom: 1px
41
- }
42
-
43
- .stateGroup .alt-composit {
44
- fill: #e0e0e0;
45
- border-bottom: 1px
46
- }
47
-
48
- .state-note {
49
- stroke: ${t.noteBorderColor};
50
- fill: ${t.noteBkgColor};
51
-
52
- text {
53
- fill: ${t.noteTextColor};
54
- stroke: none;
55
- font-size: 10px;
56
- }
57
- }
58
-
59
- .stateLabel .box {
60
- stroke: none;
61
- stroke-width: 0;
62
- fill: ${t.mainBkg};
63
- opacity: 0.5;
64
- }
65
-
66
- .edgeLabel .label rect {
67
- fill: ${t.labelBackgroundColor};
68
- opacity: 0.5;
69
- }
70
- .edgeLabel {
71
- background-color: ${t.edgeLabelBackground};
72
- p {
73
- background-color: ${t.edgeLabelBackground};
74
- }
75
- rect {
76
- opacity: 0.5;
77
- background-color: ${t.edgeLabelBackground};
78
- fill: ${t.edgeLabelBackground};
79
- }
80
- text-align: center;
81
- }
82
- .edgeLabel .label text {
83
- fill: ${t.transitionLabelColor||t.tertiaryTextColor};
84
- }
85
- .label div .edgeLabel {
86
- color: ${t.transitionLabelColor||t.tertiaryTextColor};
87
- }
88
-
89
- .stateLabel text {
90
- fill: ${t.stateLabelColor};
91
- font-size: 10px;
92
- font-weight: bold;
93
- }
94
-
95
- .node circle.state-start {
96
- fill: ${t.specialStateColor};
97
- stroke: ${t.specialStateColor};
98
- }
99
-
100
- .node .fork-join {
101
- fill: ${t.specialStateColor};
102
- stroke: ${t.specialStateColor};
103
- }
104
-
105
- .node circle.state-end {
106
- fill: ${t.innerEndBackground};
107
- stroke: ${t.background};
108
- stroke-width: 1.5
109
- }
110
- .end-state-inner {
111
- fill: ${t.compositeBackground||t.background};
112
- // stroke: ${t.background};
113
- stroke-width: 1.5
114
- }
115
-
116
- .node rect {
117
- fill: ${t.stateBkg||t.mainBkg};
118
- stroke: ${t.stateBorder||t.nodeBorder};
119
- stroke-width: 1px;
120
- }
121
- .node polygon {
122
- fill: ${t.mainBkg};
123
- stroke: ${t.stateBorder||t.nodeBorder};;
124
- stroke-width: 1px;
125
- }
126
- #statediagram-barbEnd {
127
- fill: ${t.lineColor};
128
- }
129
-
130
- .statediagram-cluster rect {
131
- fill: ${t.compositeTitleBackground};
132
- stroke: ${t.stateBorder||t.nodeBorder};
133
- stroke-width: 1px;
134
- }
135
-
136
- .cluster-label, .nodeLabel {
137
- color: ${t.stateLabelColor};
138
- // line-height: 1;
139
- }
140
-
141
- .statediagram-cluster rect.outer {
142
- rx: 5px;
143
- ry: 5px;
144
- }
145
- .statediagram-state .divider {
146
- stroke: ${t.stateBorder||t.nodeBorder};
147
- }
148
-
149
- .statediagram-state .title-state {
150
- rx: 5px;
151
- ry: 5px;
152
- }
153
- .statediagram-cluster.statediagram-cluster .inner {
154
- fill: ${t.compositeBackground||t.background};
155
- }
156
- .statediagram-cluster.statediagram-cluster-alt .inner {
157
- fill: ${t.altBackground?t.altBackground:"#efefef"};
158
- }
159
-
160
- .statediagram-cluster .inner {
161
- rx:0;
162
- ry:0;
163
- }
164
-
165
- .statediagram-state rect.basic {
166
- rx: 5px;
167
- ry: 5px;
168
- }
169
- .statediagram-state rect.divider {
170
- stroke-dasharray: 10,10;
171
- fill: ${t.altBackground?t.altBackground:"#efefef"};
172
- }
173
-
174
- .note-edge {
175
- stroke-dasharray: 5;
176
- }
177
-
178
- .statediagram-note rect {
179
- fill: ${t.noteBkgColor};
180
- stroke: ${t.noteBorderColor};
181
- stroke-width: 1px;
182
- rx: 0;
183
- ry: 0;
184
- }
185
- .statediagram-note rect {
186
- fill: ${t.noteBkgColor};
187
- stroke: ${t.noteBorderColor};
188
- stroke-width: 1px;
189
- rx: 0;
190
- ry: 0;
191
- }
192
-
193
- .statediagram-note text {
194
- fill: ${t.noteTextColor};
195
- }
196
-
197
- .statediagram-note .nodeLabel {
198
- color: ${t.noteTextColor};
199
- }
200
- .statediagram .edgeLabel {
201
- color: red; // ${t.noteTextColor};
202
- }
203
-
204
- #dependencyStart, #dependencyEnd {
205
- fill: ${t.lineColor};
206
- stroke: ${t.lineColor};
207
- stroke-width: 1;
208
- }
209
-
210
- .statediagramTitleText {
211
- text-anchor: middle;
212
- font-size: 18px;
213
- fill: ${t.textColor};
214
- }
215
- `,"getStyles");t.s(["StateDB",()=>Z,"stateDiagram_default",()=>o,"stateRenderer_v3_unified_default",()=>B,"styles_default",()=>Q])},13326,t=>{"use strict";var e,i=t.i(71450);t.i(111),t.i(55057),t.i(15258),t.i(9436),t.i(21463),t.i(57631),t.i(4855),t.i(59654),t.i(88073);var s=t.i(285),r=t.i(39467),n=t.i(31195);t.i(91577);var a=t.i(92423);t.i(49292);var o=t.i(92078);t.i(52483);var l=t.i(61210),d=t.i(58424),c=t.i(52195),h=(0,n.__name)(t=>t.append("circle").attr("class","start-state").attr("r",(0,r.getConfig2)().state.sizeUnit).attr("cx",(0,r.getConfig2)().state.padding+(0,r.getConfig2)().state.sizeUnit).attr("cy",(0,r.getConfig2)().state.padding+(0,r.getConfig2)().state.sizeUnit),"drawStartState"),u=(0,n.__name)(t=>t.append("line").style("stroke","grey").style("stroke-dasharray","3").attr("x1",(0,r.getConfig2)().state.textHeight).attr("class","divider").attr("x2",2*(0,r.getConfig2)().state.textHeight).attr("y1",0).attr("y2",0),"drawDivider"),g=(0,n.__name)((t,e)=>{let i=t.append("text").attr("x",2*(0,r.getConfig2)().state.padding).attr("y",(0,r.getConfig2)().state.textHeight+2*(0,r.getConfig2)().state.padding).attr("font-size",(0,r.getConfig2)().state.fontSize).attr("class","state-title").text(e.id),s=i.node().getBBox();return t.insert("rect",":first-child").attr("x",(0,r.getConfig2)().state.padding).attr("y",(0,r.getConfig2)().state.padding).attr("width",s.width+2*(0,r.getConfig2)().state.padding).attr("height",s.height+2*(0,r.getConfig2)().state.padding).attr("rx",(0,r.getConfig2)().state.radius),i},"drawSimpleState"),p=(0,n.__name)((t,e)=>{let i=(0,n.__name)(function(t,e,i){let s=t.append("tspan").attr("x",2*(0,r.getConfig2)().state.padding).text(e);i||s.attr("dy",(0,r.getConfig2)().state.textHeight)},"addTspan"),s=t.append("text").attr("x",2*(0,r.getConfig2)().state.padding).attr("y",(0,r.getConfig2)().state.textHeight+1.3*(0,r.getConfig2)().state.padding).attr("font-size",(0,r.getConfig2)().state.fontSize).attr("class","state-title").text(e.descriptions[0]).node().getBBox(),a=s.height,o=t.append("text").attr("x",(0,r.getConfig2)().state.padding).attr("y",a+.4*(0,r.getConfig2)().state.padding+(0,r.getConfig2)().state.dividerMargin+(0,r.getConfig2)().state.textHeight).attr("class","state-description"),l=!0,d=!0;e.descriptions.forEach(function(t){l||(i(o,t,d),d=!1),l=!1});let c=t.append("line").attr("x1",(0,r.getConfig2)().state.padding).attr("y1",(0,r.getConfig2)().state.padding+a+(0,r.getConfig2)().state.dividerMargin/2).attr("y2",(0,r.getConfig2)().state.padding+a+(0,r.getConfig2)().state.dividerMargin/2).attr("class","descr-divider"),h=o.node().getBBox(),u=Math.max(h.width,s.width);return c.attr("x2",u+3*(0,r.getConfig2)().state.padding),t.insert("rect",":first-child").attr("x",(0,r.getConfig2)().state.padding).attr("y",(0,r.getConfig2)().state.padding).attr("width",u+2*(0,r.getConfig2)().state.padding).attr("height",h.height+a+2*(0,r.getConfig2)().state.padding).attr("rx",(0,r.getConfig2)().state.radius),t},"drawDescrState"),f=(0,n.__name)((t,e,i)=>{let s,n=(0,r.getConfig2)().state.padding,a=2*(0,r.getConfig2)().state.padding,o=t.node().getBBox(),l=o.width,d=o.x,c=t.append("text").attr("x",0).attr("y",(0,r.getConfig2)().state.titleShift).attr("font-size",(0,r.getConfig2)().state.fontSize).attr("class","state-title").text(e.id),h=c.node().getBBox().width+a,u=Math.max(h,l);u===l&&(u+=a);let g=t.node().getBBox();e.doc,s=d-n,h>l&&(s=(l-u)/2+n),Math.abs(d-g.x)<n&&h>l&&(s=d-(h-l)/2);let p=1-(0,r.getConfig2)().state.textHeight;return t.insert("rect",":first-child").attr("x",s).attr("y",p).attr("class",i?"alt-composit":"composit").attr("width",u).attr("height",g.height+(0,r.getConfig2)().state.textHeight+(0,r.getConfig2)().state.titleShift+1).attr("rx","0"),c.attr("x",s+n),h<=l&&c.attr("x",d+(u-a)/2-h/2+n),t.insert("rect",":first-child").attr("x",s).attr("y",(0,r.getConfig2)().state.titleShift-(0,r.getConfig2)().state.textHeight-(0,r.getConfig2)().state.padding).attr("width",u).attr("height",3*(0,r.getConfig2)().state.textHeight).attr("rx",(0,r.getConfig2)().state.radius),t.insert("rect",":first-child").attr("x",s).attr("y",(0,r.getConfig2)().state.titleShift-(0,r.getConfig2)().state.textHeight-(0,r.getConfig2)().state.padding).attr("width",u).attr("height",g.height+3+2*(0,r.getConfig2)().state.textHeight).attr("rx",(0,r.getConfig2)().state.radius),t},"addTitleAndBox"),_=(0,n.__name)(t=>(t.append("circle").attr("class","end-state-outer").attr("r",(0,r.getConfig2)().state.sizeUnit+(0,r.getConfig2)().state.miniPadding).attr("cx",(0,r.getConfig2)().state.padding+(0,r.getConfig2)().state.sizeUnit+(0,r.getConfig2)().state.miniPadding).attr("cy",(0,r.getConfig2)().state.padding+(0,r.getConfig2)().state.sizeUnit+(0,r.getConfig2)().state.miniPadding),t.append("circle").attr("class","end-state-inner").attr("r",(0,r.getConfig2)().state.sizeUnit).attr("cx",(0,r.getConfig2)().state.padding+(0,r.getConfig2)().state.sizeUnit+2).attr("cy",(0,r.getConfig2)().state.padding+(0,r.getConfig2)().state.sizeUnit+2)),"drawEndState"),y=(0,n.__name)((t,e)=>{let i=(0,r.getConfig2)().state.forkWidth,s=(0,r.getConfig2)().state.forkHeight;if(e.parentId){let t=i;i=s,s=t}return t.append("rect").style("stroke","black").style("fill","black").attr("width",i).attr("height",s).attr("x",(0,r.getConfig2)().state.padding).attr("y",(0,r.getConfig2)().state.padding)},"drawForkJoinState"),m=(0,n.__name)((t,e,i,s)=>{let n=0,a=s.append("text");a.style("text-anchor","start"),a.attr("class","noteText");let o=t.replace(/\r\n/g,"<br/>"),l=(o=o.replace(/\n/g,"<br/>")).split(r.common_default.lineBreakRegex),d=1.25*(0,r.getConfig2)().state.noteMargin;for(let t of l){let s=t.trim();if(s.length>0){let t=a.append("tspan");t.text(s),0===d&&(d+=t.node().getBBox().height),n+=d,t.attr("x",e+(0,r.getConfig2)().state.noteMargin),t.attr("y",i+n+1.25*(0,r.getConfig2)().state.noteMargin)}}return{textWidth:a.node().getBBox().width,textHeight:n}},"_drawLongText"),S=(0,n.__name)((t,e)=>{e.attr("class","state-note");let i=e.append("rect").attr("x",0).attr("y",(0,r.getConfig2)().state.padding),{textWidth:s,textHeight:n}=m(t,0,0,e.append("g"));return i.attr("height",n+2*(0,r.getConfig2)().state.noteMargin),i.attr("width",s+2*(0,r.getConfig2)().state.noteMargin),i},"drawNote"),b=(0,n.__name)(function(t,e){let i=e.id,s={id:i,label:e.id,width:0,height:0},n=t.append("g").attr("id",i).attr("class","stateGroup");"start"===e.type&&h(n),"end"===e.type&&_(n),("fork"===e.type||"join"===e.type)&&y(n,e),"note"===e.type&&S(e.note.text,n),"divider"===e.type&&u(n),"default"===e.type&&0===e.descriptions.length&&g(n,e),"default"===e.type&&e.descriptions.length>0&&p(n,e);let a=n.node().getBBox();return s.width=a.width+2*(0,r.getConfig2)().state.padding,s.height=a.height+2*(0,r.getConfig2)().state.padding,s},"drawState"),C=0,v=(0,n.__name)(function(t,e,a){let o=(0,n.__name)(function(t){switch(t){case i.StateDB.relationType.AGGREGATION:return"aggregation";case i.StateDB.relationType.EXTENSION:return"extension";case i.StateDB.relationType.COMPOSITION:return"composition";case i.StateDB.relationType.DEPENDENCY:return"dependency"}},"getRelationType");e.points=e.points.filter(t=>!Number.isNaN(t.y));let l=e.points,h=(0,d.line)().x(function(t){return t.x}).y(function(t){return t.y}).curve(c.curveBasis),u=t.append("path").attr("d",h(l)).attr("id","edge"+C).attr("class","transition"),g="";if((0,r.getConfig2)().state.arrowMarkerAbsolute&&(g=(0,r.getUrl)(!0)),u.attr("marker-end","url("+g+"#"+o(i.StateDB.relationType.DEPENDENCY)+"End)"),void 0!==a.title){let i=t.append("g").attr("class","stateLabel"),{x:o,y:l}=s.utils_default.calcLabelPosition(e.points),d=r.common_default.getRows(a.title),c=0,h=[],u=0,g=0;for(let t=0;t<=d.length;t++){let e=i.append("text").attr("text-anchor","middle").text(d[t]).attr("x",o).attr("y",l+c),s=e.node().getBBox();u=Math.max(u,s.width),g=Math.min(g,s.x),n.log.info(s.x,o,l+c),0===c&&(c=e.node().getBBox().height,n.log.info("Title height",c,l)),h.push(e)}let p=c*d.length;if(d.length>1){let t=(d.length-1)*c*.5;h.forEach((e,i)=>e.attr("y",l+i*c-t)),p=c*d.length}let f=i.node().getBBox();i.insert("rect",":first-child").attr("class","box").attr("x",o-u/2-(0,r.getConfig2)().state.padding/2).attr("y",l-p/2-(0,r.getConfig2)().state.padding/2-3.5).attr("width",u+(0,r.getConfig2)().state.padding).attr("height",p+(0,r.getConfig2)().state.padding),n.log.info(f)}C++},"drawEdge"),x={},k=(0,n.__name)(function(){},"setConf"),E=(0,n.__name)(function(t){t.append("defs").append("marker").attr("id","dependencyEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 19,7 L9,13 L14,7 L9,1 Z")},"insertMarkers"),T=(0,n.__name)(function(t,i,s,o){let l;e=(0,r.getConfig2)().state;let d=(0,r.getConfig2)().securityLevel;"sandbox"===d&&(l=(0,a.select)("#i"+i));let c="sandbox"===d?(0,a.select)(l.nodes()[0].contentDocument.body):(0,a.select)("body"),h="sandbox"===d?l.nodes()[0].contentDocument:document;n.log.debug("Rendering diagram "+t);let u=c.select(`[id='${i}']`);E(u),w(o.db.getRootDoc(),u,void 0,!1,c,h,o);let g=e.padding,p=u.node().getBBox(),f=p.width+2*g,_=p.height+2*g;(0,r.configureSvgSize)(u,_,1.75*f,e.useMaxWidth),u.attr("viewBox",`${p.x-e.padding} ${p.y-e.padding} `+f+" "+_)},"draw"),D=(0,n.__name)(t=>t?t.length*e.fontSizeFactor:1,"getLabelWidth"),w=(0,n.__name)((t,i,s,a,d,c,h)=>{let u,g=new l.Graph({compound:!0,multigraph:!0}),p=!0;for(u=0;u<t.length;u++)if("relation"===t[u].stmt){p=!1;break}s?g.setGraph({rankdir:"LR",multigraph:!0,compound:!0,ranker:"tight-tree",ranksep:p?1:e.edgeLengthFactor,nodeSep:p?1:50,isMultiGraph:!0}):g.setGraph({rankdir:"TB",multigraph:!0,compound:!0,ranksep:p?1:e.edgeLengthFactor,nodeSep:p?1:50,ranker:"tight-tree",isMultiGraph:!0}),g.setDefaultEdgeLabel(function(){return{}});let _=h.db.getStates(),y=h.db.getRelations();for(let t of Object.keys(_)){let r,n=_[t];if(s&&(n.parentId=s),n.doc){let t=i.append("g").attr("id",n.id).attr("class","stateGroup");r=w(n.doc,t,n.id,!a,d,c,h);{let i=(t=f(t,n,a)).node().getBBox();r.width=i.width,r.height=i.height+e.padding/2,x[n.id]={y:e.compositTitleSize}}}else r=b(i,n,g);if(n.note){let t=b(i,{descriptions:[],id:n.id+"-note",note:n.note,type:"note"},g);"left of"===n.note.position?(g.setNode(r.id+"-note",t),g.setNode(r.id,r)):(g.setNode(r.id,r),g.setNode(r.id+"-note",t)),g.setParent(r.id,r.id+"-group"),g.setParent(r.id+"-note",r.id+"-group")}else g.setNode(r.id,r)}n.log.debug("Count=",g.nodeCount(),g);let m=0;y.forEach(function(t){m++,n.log.debug("Setting edge",t),g.setEdge(t.id1,t.id2,{relation:t,width:D(t.title),height:e.labelHeight*r.common_default.getRows(t.title).length,labelpos:"c"},"id"+m)}),(0,o.layout)(g),n.log.debug("Graph after layout",g.nodes());let S=i.node();g.nodes().forEach(function(t){void 0!==t&&void 0!==g.node(t)?(n.log.warn("Node "+t+": "+JSON.stringify(g.node(t))),d.select("#"+S.id+" #"+t).attr("transform","translate("+(g.node(t).x-g.node(t).width/2)+","+(g.node(t).y+(x[t]?x[t].y:0)-g.node(t).height/2)+" )"),d.select("#"+S.id+" #"+t).attr("data-x-shift",g.node(t).x-g.node(t).width/2),c.querySelectorAll("#"+S.id+" #"+t+" .divider").forEach(t=>{let e=t.parentElement,i=0,s=0;e&&(e.parentElement&&(i=e.parentElement.getBBox().width),Number.isNaN(s=parseInt(e.getAttribute("data-x-shift"),10))&&(s=0)),t.setAttribute("x1",0-s+8),t.setAttribute("x2",i-s-8)})):n.log.debug("No Node "+t+": "+JSON.stringify(g.node(t)))});let C=S.getBBox();g.edges().forEach(function(t){void 0!==t&&void 0!==g.edge(t)&&(n.log.debug("Edge "+t.v+" -> "+t.w+": "+JSON.stringify(g.edge(t))),v(i,g.edge(t),g.edge(t).relation))});let k={id:s||"root",label:s||"root",width:0,height:0};return k.width=(C=S.getBBox()).width+2*e.padding,k.height=C.height+2*e.padding,n.log.debug("Doc rendered",k,g),k},"renderDoc"),$={parser:i.stateDiagram_default,get db(){return new i.StateDB(1)},renderer:{setConf:k,draw:T},styles:i.styles_default,init:(0,n.__name)(t=>{t.state||(t.state={}),t.state.arrowMarkerAbsolute=t.arrowMarkerAbsolute},"init")};t.s(["diagram",()=>$])}]);
@@ -1 +0,0 @@
1
- (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,74929,1526,7308,e=>{"use strict";var t=e.i(11415);let a=(0,t.default)("folder",[["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}]]);e.s(["Folder",()=>a],74929);let l=(0,t.default)("folder-open",[["path",{d:"m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2",key:"usdka0"}]]);e.s(["FolderOpen",()=>l],1526);var s=e.i(65773),i=e.i(91967),n=e.i(9413),r=e.i(36567),c=e.i(18731),d=e.i(22353),o=e.i(85565),x=e.i(90816),h=e.i(11207),p=e.i(76809),u="Collapsible",[f,m]=(0,n.createContextScope)(u),[g,j]=f(u),v=s.forwardRef((e,t)=>{let{__scopeCollapsible:a,open:l,defaultOpen:i,disabled:n,onOpenChange:c,...d}=e,[x,f]=(0,r.useControllableState)({prop:l,defaultProp:i??!1,onChange:c,caller:u});return(0,p.jsx)(g,{scope:a,disabled:n,contentId:(0,h.useId)(),open:x,onOpenToggle:s.useCallback(()=>f(e=>!e),[f]),children:(0,p.jsx)(o.Primitive.div,{"data-state":C(x),"data-disabled":n?"":void 0,...d,ref:t})})});v.displayName=u;var y="CollapsibleTrigger",N=s.forwardRef((e,t)=>{let{__scopeCollapsible:a,...l}=e,s=j(y,a);return(0,p.jsx)(o.Primitive.button,{type:"button","aria-controls":s.contentId,"aria-expanded":s.open||!1,"data-state":C(s.open),"data-disabled":s.disabled?"":void 0,disabled:s.disabled,...l,ref:t,onClick:(0,i.composeEventHandlers)(e.onClick,s.onOpenToggle)})});N.displayName=y;var b="CollapsibleContent",w=s.forwardRef((e,t)=>{let{forceMount:a,...l}=e,s=j(b,e.__scopeCollapsible);return(0,p.jsx)(x.Presence,{present:a||s.open,children:({present:e})=>(0,p.jsx)(k,{...l,ref:t,present:e})})});w.displayName=b;var k=s.forwardRef((e,t)=>{let{__scopeCollapsible:a,present:l,children:i,...n}=e,r=j(b,a),[x,h]=s.useState(l),u=s.useRef(null),f=(0,d.useComposedRefs)(t,u),m=s.useRef(0),g=m.current,v=s.useRef(0),y=v.current,N=r.open||x,w=s.useRef(N),k=s.useRef(void 0);return s.useEffect(()=>{let e=requestAnimationFrame(()=>w.current=!1);return()=>cancelAnimationFrame(e)},[]),(0,c.useLayoutEffect)(()=>{let e=u.current;if(e){k.current=k.current||{transitionDuration:e.style.transitionDuration,animationName:e.style.animationName},e.style.transitionDuration="0s",e.style.animationName="none";let t=e.getBoundingClientRect();m.current=t.height,v.current=t.width,w.current||(e.style.transitionDuration=k.current.transitionDuration,e.style.animationName=k.current.animationName),h(l)}},[r.open,l]),(0,p.jsx)(o.Primitive.div,{"data-state":C(r.open),"data-disabled":r.disabled?"":void 0,id:r.contentId,hidden:!N,...n,ref:f,style:{"--radix-collapsible-content-height":g?`${g}px`:void 0,"--radix-collapsible-content-width":y?`${y}px`:void 0,...e.style},children:N&&i})});function C(e){return e?"open":"closed"}e.s(["Collapsible",()=>v,"CollapsibleContent",()=>w,"CollapsibleTrigger",()=>N],7308)},37516,e=>{"use strict";var t=e.i(76809),a=e.i(65773),l=e.i(55280),s=e.i(63371),i=e.i(11415);let n=(0,i.default)("tree-pine",[["path",{d:"m17 14 3 3.3a1 1 0 0 1-.7 1.7H4.7a1 1 0 0 1-.7-1.7L7 14h-.3a1 1 0 0 1-.7-1.7L9 9h-.2A1 1 0 0 1 8 7.3L12 3l4 4.3a1 1 0 0 1-.8 1.7H15l3 3.3a1 1 0 0 1-.7 1.7H17Z",key:"cpyugq"}],["path",{d:"M12 22v-3",key:"kmzjlo"}]]),r=(0,i.default)("layout-grid",[["rect",{width:"7",height:"7",x:"3",y:"3",rx:"1",key:"1g98yp"}],["rect",{width:"7",height:"7",x:"14",y:"3",rx:"1",key:"6d4xhi"}],["rect",{width:"7",height:"7",x:"14",y:"14",rx:"1",key:"nxv5o0"}],["rect",{width:"7",height:"7",x:"3",y:"14",rx:"1",key:"1bb6yr"}]]),c=(0,i.default)("flame",[["path",{d:"M12 3q1 4 4 6.5t3 5.5a1 1 0 0 1-14 0 5 5 0 0 1 1-3 1 1 0 0 0 5 0c0-2-1.5-3-1.5-5q0-2 2.5-4",key:"1slcih"}]]);var d=e.i(93479),o=e.i(19455),x=e.i(89117),h=e.i(74929),p=e.i(1526),u=e.i(41988),f=e.i(75157),m=e.i(59684),g=e.i(7308);function j({node:e,depth:l,selectedPath:s,onSelect:i,heatmap:n,defaultOpen:r=!1}){let[c,d]=(0,a.useState)(r),o=12*l;if(e.file){var m;let a,l=e.file.path===s,r=n?(m=e.file.mtime,(a=(Date.now()-new Date(m).getTime())/864e5)<=7?"text-green-400":a<=28?"text-yellow-400/70":"text-muted"):"text-muted";return(0,t.jsxs)("button",{onClick:()=>i(e.file.path),className:(0,f.cn)("w-full flex flex-col gap-0.5 px-2 py-1.5 text-left hover:bg-surface2 transition-colors rounded",l&&"bg-surface2 ring-1 ring-inset ring-accent/30"),style:{paddingLeft:o+8},children:[(0,t.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,t.jsx)(x.FileText,{className:(0,f.cn)("w-3.5 h-3.5 flex-shrink-0",r)}),(0,t.jsx)("span",{className:"text-xs text-txt truncate",children:e.name})]}),e.file.description&&(0,t.jsx)("p",{className:"text-[10px] text-muted leading-tight truncate",style:{paddingLeft:20},children:e.file.description})]})}return(0,t.jsxs)(g.Collapsible,{open:c,onOpenChange:d,children:[(0,t.jsx)(g.CollapsibleTrigger,{asChild:!0,children:(0,t.jsxs)("button",{className:"w-full flex items-center gap-1.5 px-2 py-1 text-left hover:bg-surface2 transition-colors rounded",style:{paddingLeft:o+8},children:[(0,t.jsx)(u.ChevronRight,{className:(0,f.cn)("w-3 h-3 text-muted flex-shrink-0 transition-transform duration-200",c&&"rotate-90")}),c?(0,t.jsx)(p.FolderOpen,{className:"w-3.5 h-3.5 text-accent flex-shrink-0"}):(0,t.jsx)(h.Folder,{className:"w-3.5 h-3.5 text-muted flex-shrink-0"}),(0,t.jsx)("span",{className:"text-xs text-txt font-medium",children:e.name})]})}),(0,t.jsx)(g.CollapsibleContent,{children:e.children.map(e=>(0,t.jsx)(j,{node:e,depth:l+1,selectedPath:s,onSelect:i,heatmap:n},e.folderPath))})]})}function v({files:e,selectedPath:l,onSelect:s,heatmap:i}){let n=(0,a.useMemo)(()=>(function(e){let t={name:"",children:[],folderPath:""};for(let a of e){let e=a.path.replace(/\\/g,"/").split("/"),l=t,s="";for(let t=0;t<e.length-1;t++){s=s?`${s}/${e[t]}`:e[t];let a=l.children.find(a=>a.name===e[t]&&!a.file);a||(a={name:e[t],children:[],folderPath:s},l.children.push(a)),l=a}l.children.push({name:e[e.length-1],children:[],file:a,folderPath:a.path})}return t.children})(e),[e]);return(0,t.jsx)(m.ScrollArea,{className:"flex-1",children:(0,t.jsx)("div",{className:"p-2",children:n.map(e=>(0,t.jsx)(j,{node:e,depth:0,selectedPath:l,onSelect:s,heatmap:i,defaultOpen:!0},e.folderPath))})})}var y=e.i(87486);let N={ai:"AI",extracted:"Auto"},b={ai:"default",extracted:"secondary"};function w({files:e,selectedPath:l,onSelect:s}){let i=(0,a.useMemo)(()=>{let t=new Map;for(let a of e){let e=a.section||"root",l=t.get(e)??[];l.push(a),t.set(e,l)}return Array.from(t.entries()).sort(([e],[t])=>e.localeCompare(t))},[e]);return(0,t.jsx)(m.ScrollArea,{className:"flex-1",children:(0,t.jsx)("div",{className:"p-4 space-y-6",children:i.map(([e,a])=>(0,t.jsxs)("div",{children:[(0,t.jsx)("h3",{className:"text-xs font-semibold text-muted uppercase tracking-wider mb-2 px-1",children:e}),(0,t.jsx)("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-2",children:a.map(e=>(0,t.jsxs)("button",{onClick:()=>s(e.path),className:(0,f.cn)("flex flex-col gap-1.5 p-3 rounded-lg border border-border text-left","hover:border-accent/50 hover:bg-surface2 transition-all",l===e.path&&"border-accent/50 bg-surface2"),children:[(0,t.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,t.jsx)(x.FileText,{className:"w-3.5 h-3.5 text-accent flex-shrink-0"}),(0,t.jsx)("span",{className:"text-xs font-medium text-txt truncate flex-1",children:e.name}),(0,t.jsx)(y.Badge,{variant:b[e.source],className:"text-[10px] px-1 py-0 h-4 flex-shrink-0",children:N[e.source]})]}),e.description?(0,t.jsx)("p",{className:"text-[10px] text-muted leading-relaxed line-clamp-2",children:e.description}):(0,t.jsx)("p",{className:"text-[10px] text-muted italic",children:"No description"})]},e.path))})]},e))})})}let k=(0,i.default)("refresh-cw",[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]]),C=(0,i.default)("external-link",[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]]),S={ai:"AI",extracted:"Auto"},A={ai:"default",extracted:"secondary"};function L({file:e,root:l,onEnriched:s,onOpenDoc:i}){let[n,r]=(0,a.useState)(!1),[c,d]=(0,a.useState)(!1),[h,p]=(0,a.useState)(null);if((0,a.useEffect)(()=>{r(!1),d(!1),p(null)},[e?.path]),!e)return(0,t.jsx)("div",{className:"flex-1 flex items-center justify-center text-muted text-sm",children:"Select a file to see details"});let u=e.path.split("/");async function m(){r(!0),p(null);try{let t=await fetch("/api/explorer",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({path:e.path,...l?{root:l}:{}})}),a=await t.json();t.ok?(s(e.path,a.description),d(!0),setTimeout(()=>d(!1),1500)):p(a.error??"Enrichment failed")}finally{r(!1)}}return(0,t.jsxs)("div",{className:"flex-1 p-6 flex flex-col gap-4 overflow-auto",children:[(0,t.jsxs)("div",{className:"flex items-center gap-1.5 text-xs text-muted flex-wrap",children:[(0,t.jsx)(x.FileText,{className:"w-3.5 h-3.5 flex-shrink-0"}),u.map((e,a)=>(0,t.jsxs)("span",{className:"flex items-center gap-1.5",children:[a>0&&(0,t.jsx)("span",{className:"text-muted",children:"/"}),(0,t.jsx)("span",{className:a===u.length-1?"text-txt font-medium":"",children:e})]},a))]}),(0,t.jsx)("p",{className:(0,f.cn)("text-sm leading-relaxed transition-colors duration-500",c?"text-green-400":"text-txt"),children:e.description||(0,t.jsx)("span",{className:"text-muted italic",children:"No description yet — click Re-enrich to generate one"})}),h&&(0,t.jsx)("p",{className:"text-xs text-red-400",children:h}),(0,t.jsxs)("div",{className:"flex items-center gap-2 text-xs text-muted",children:[(0,t.jsx)(y.Badge,{variant:A[e.source],className:"text-[10px]",children:S[e.source]}),(0,t.jsxs)("span",{children:["Updated ",new Date(e.updatedAt).toLocaleDateString()]}),(0,t.jsxs)("span",{className:"ml-auto",children:["Modified ",new Date(e.mtime).toLocaleDateString()]})]}),(0,t.jsxs)("div",{className:"flex gap-2 pt-2",children:[(0,t.jsxs)(o.Button,{variant:"outline",size:"sm",onClick:m,disabled:n,children:[(0,t.jsx)(k,{className:`w-3 h-3 mr-1.5 ${n?"animate-spin":""}`}),"Re-enrich"]}),(0,t.jsxs)(o.Button,{variant:"outline",size:"sm",onClick:()=>i(e.path),children:[(0,t.jsx)(C,{className:"w-3 h-3 mr-1.5"}),"Open in Docs"]})]})]})}let P=[{id:"tree",Icon:n,label:"Tree"},{id:"cards",Icon:r,label:"Cards"},{id:"heatmap",Icon:c,label:"Heatmap"}];function R({files:e,loading:s,view:i,root:n,onEnriched:r,onOpenDoc:c}){let x=(0,l.useRouter)(),[h,p]=(0,a.useState)(""),[u,f]=(0,a.useState)(null),m=e.find(e=>e.path===u)??null,g=h?e.filter(e=>e.path.toLowerCase().includes(h.toLowerCase())||e.description.toLowerCase().includes(h.toLowerCase())):e;return(0,a.useEffect)(()=>{h&&null===m&&null!==u&&f(null)},[h,m,u]),(0,t.jsxs)("div",{className:"flex flex-col h-full",children:[(0,t.jsxs)("div",{className:"flex items-center gap-3 px-4 py-3 border-b border-border shrink-0",children:[(0,t.jsx)("span",{className:"font-display font-semibold text-txt text-sm shrink-0",children:"Explorer"}),(0,t.jsx)(d.Input,{id:"explorer-search",placeholder:"Search files and descriptions…",value:h,onChange:e=>p(e.target.value),className:"flex-1 h-7 text-xs"}),(0,t.jsx)("div",{className:"flex items-center gap-1 shrink-0",children:P.map(({id:e,Icon:a,label:l})=>(0,t.jsxs)(o.Button,{variant:i===e?"secondary":"ghost",size:"sm",className:"h-7 px-2 text-xs gap-1",onClick:()=>{x.push(`/explorer?view=${e}`)},children:[(0,t.jsx)(a,{className:"w-3 h-3"}),l]},e))})]}),s?(0,t.jsx)("div",{className:"flex-1 flex items-center justify-center text-muted text-sm",children:"Loading…"}):"cards"===i?0===g.length?(0,t.jsx)("div",{className:"flex-1 flex items-center justify-center text-muted text-sm",children:"No files match your search"}):(0,t.jsx)(w,{files:g,selectedPath:u,onSelect:f}):(0,t.jsxs)("div",{className:"flex-1 flex overflow-hidden",children:[(0,t.jsx)("div",{className:"w-72 border-r border-border flex flex-col overflow-hidden",children:0===g.length?(0,t.jsx)("div",{className:"flex-1 flex items-center justify-center text-muted text-sm",children:"No files match your search"}):(0,t.jsx)(v,{files:g,selectedPath:u,onSelect:f,heatmap:"heatmap"===i})}),(0,t.jsx)(L,{file:m,root:n,onEnriched:r,onOpenDoc:c})]})]})}function T(){let{rootParam:e,activeProject:i,openDoc:n}=(0,s.useApp)(),r=(0,l.useSearchParams)().get("view")||"tree",[c,d]=(0,a.useState)([]),[o,x]=(0,a.useState)(!0),h=(0,a.useCallback)(async()=>{x(!0);try{let t=await fetch(`/api/explorer${e}`),a=await t.json();d(Array.isArray(a)?a:[])}finally{x(!1)}},[e]);return(0,a.useEffect)(()=>{h()},[h]),(0,t.jsx)(R,{files:c,loading:o,view:r,root:i,onEnriched:function(e,t){d(a=>a.map(a=>a.path===e?{...a,description:t,source:"ai",updatedAt:new Date().toISOString()}:a))},onOpenDoc:n})}function D(){return(0,t.jsx)("div",{className:"flex flex-col h-full",children:(0,t.jsx)(a.Suspense,{fallback:(0,t.jsx)("div",{className:"flex-1 flex items-center justify-center text-muted-foreground text-sm",children:"Loading…"}),children:(0,t.jsx)(T,{})})})}e.s(["default",()=>D],37516)}]);