@futdevpro/ccap 1.1.2956 → 1.1.2960

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 (240) hide show
  1. package/cli/build/_collections/update/update-error-buffer-entry.interface.d.ts +17 -0
  2. package/cli/build/_collections/update/update-error-buffer-entry.interface.d.ts.map +1 -0
  3. package/cli/build/_collections/update/update-error-buffer-entry.interface.js +3 -0
  4. package/cli/build/_collections/update/update-error-buffer-entry.interface.js.map +1 -0
  5. package/cli/build/_collections/update/update-error-buffer.util.d.ts +35 -0
  6. package/cli/build/_collections/update/update-error-buffer.util.d.ts.map +1 -0
  7. package/cli/build/_collections/update/update-error-buffer.util.js +76 -0
  8. package/cli/build/_collections/update/update-error-buffer.util.js.map +1 -0
  9. package/cli/build/_collections/update/update-error-buffer.util.spec.d.ts +8 -0
  10. package/cli/build/_collections/update/update-error-buffer.util.spec.d.ts.map +1 -0
  11. package/cli/build/_collections/update/update-error-buffer.util.spec.js +95 -0
  12. package/cli/build/_collections/update/update-error-buffer.util.spec.js.map +1 -0
  13. package/cli/build/_collections/update/update-runner.util.d.ts +7 -1
  14. package/cli/build/_collections/update/update-runner.util.d.ts.map +1 -1
  15. package/cli/build/_collections/update/update-runner.util.js +9 -2
  16. package/cli/build/_collections/update/update-runner.util.js.map +1 -1
  17. package/cli/build/_collections/update/update-runner.util.spec.js +11 -0
  18. package/cli/build/_collections/update/update-runner.util.spec.js.map +1 -1
  19. package/cli/build/_commands/info.d.ts +69 -0
  20. package/cli/build/_commands/info.d.ts.map +1 -0
  21. package/cli/build/_commands/info.interface.d.ts +70 -0
  22. package/cli/build/_commands/info.interface.d.ts.map +1 -0
  23. package/cli/build/_commands/info.interface.js +6 -0
  24. package/cli/build/_commands/info.interface.js.map +1 -0
  25. package/cli/build/_commands/info.js +379 -0
  26. package/cli/build/_commands/info.js.map +1 -0
  27. package/cli/build/_commands/info.spec.d.ts +8 -0
  28. package/cli/build/_commands/info.spec.d.ts.map +1 -0
  29. package/cli/build/_commands/info.spec.js +124 -0
  30. package/cli/build/_commands/info.spec.js.map +1 -0
  31. package/cli/build/_commands/logs.d.ts +41 -0
  32. package/cli/build/_commands/logs.d.ts.map +1 -0
  33. package/cli/build/_commands/logs.interface.d.ts +16 -0
  34. package/cli/build/_commands/logs.interface.d.ts.map +1 -0
  35. package/cli/build/_commands/logs.interface.js +3 -0
  36. package/cli/build/_commands/logs.interface.js.map +1 -0
  37. package/cli/build/_commands/logs.js +175 -0
  38. package/cli/build/_commands/logs.js.map +1 -0
  39. package/cli/build/_commands/logs.spec.d.ts +7 -0
  40. package/cli/build/_commands/logs.spec.d.ts.map +1 -0
  41. package/cli/build/_commands/logs.spec.js +120 -0
  42. package/cli/build/_commands/logs.spec.js.map +1 -0
  43. package/cli/build/_commands/update.d.ts +17 -13
  44. package/cli/build/_commands/update.d.ts.map +1 -1
  45. package/cli/build/_commands/update.js +61 -25
  46. package/cli/build/_commands/update.js.map +1 -1
  47. package/cli/build/program.js +40 -1
  48. package/cli/build/program.js.map +1 -1
  49. package/client-dist/{agent-instances.module-5SGOQHZE.js → agent-instances.module-2URQPTNT.js} +2 -2
  50. package/client-dist/{ca.module-OCEZIM6Z.js → ca.module-JUKBF44B.js} +2 -2
  51. package/client-dist/{cc-usage-dashboard.component-GI5LK2ZY.js → cc-usage-dashboard.component-UEDH2XKN.js} +2 -2
  52. package/client-dist/{cc.module-7FRXT32H.js → cc.module-S5PA32TN.js} +2 -2
  53. package/client-dist/{chunk-V4V6NHXT.js → chunk-3CCTA7PZ.js} +2 -2
  54. package/client-dist/{chunk-DAV3UNQX.js → chunk-3MRPZKCQ.js} +2 -2
  55. package/client-dist/{chunk-EWVZESJW.js → chunk-3W3OBILQ.js} +2 -2
  56. package/client-dist/{chunk-JJMNZIAQ.js → chunk-4LELMYV2.js} +2 -2
  57. package/client-dist/{chunk-3BVLFJ5H.js → chunk-4LPEUFAW.js} +2 -2
  58. package/client-dist/{chunk-7LEYLJ7K.js → chunk-4LUVD2AP.js} +2 -2
  59. package/client-dist/{chunk-JLA2PX42.js → chunk-5BZODWW7.js} +2 -2
  60. package/client-dist/{chunk-ZP3HA643.js → chunk-5YO3LDJM.js} +2 -2
  61. package/client-dist/{chunk-KOF3QQI6.js → chunk-6JO7UKOI.js} +2 -2
  62. package/client-dist/{chunk-FB3RWQTM.js → chunk-6T3T47WR.js} +2 -2
  63. package/client-dist/{chunk-7OU5EIQN.js → chunk-6V3AY4GG.js} +2 -2
  64. package/client-dist/{chunk-CS6PNARE.js → chunk-744OTLPJ.js} +2 -2
  65. package/client-dist/{chunk-I5B5NLNT.js → chunk-7Y6EDEKN.js} +2 -2
  66. package/client-dist/{chunk-J2Y64TJX.js → chunk-A4J42SWO.js} +2 -2
  67. package/client-dist/{chunk-QBFOD33L.js → chunk-AINXWTEN.js} +2 -2
  68. package/client-dist/{chunk-4V5CKMM7.js → chunk-ALZ7U76J.js} +2 -2
  69. package/client-dist/{chunk-H6H3DTA3.js → chunk-BKYQ746Q.js} +2 -2
  70. package/client-dist/{chunk-37AFYV4M.js → chunk-BV6QDXRW.js} +2 -2
  71. package/client-dist/{chunk-37AFYV4M.js.map → chunk-BV6QDXRW.js.map} +1 -1
  72. package/client-dist/{chunk-FJQ56J6K.js → chunk-CKHGJZOB.js} +2 -2
  73. package/client-dist/{chunk-JVHTYQOT.js → chunk-DE3BOHO5.js} +2 -2
  74. package/client-dist/{chunk-SQ64MCSX.js → chunk-DJCLH4DQ.js} +2 -2
  75. package/client-dist/{chunk-T6T7P3PI.js → chunk-DODMVPWS.js} +2 -2
  76. package/client-dist/{chunk-DQWIQMJR.js → chunk-FKOWRSW7.js} +2 -2
  77. package/client-dist/{chunk-TSUGHIGA.js → chunk-FXDLW3RE.js} +2 -2
  78. package/client-dist/{chunk-2BWFVPTP.js → chunk-GTS3HVE3.js} +2 -2
  79. package/client-dist/{chunk-DDV2CYX5.js → chunk-GWYU4AVI.js} +2 -2
  80. package/client-dist/{chunk-XBIXPQFJ.js → chunk-HRA33EDX.js} +2 -2
  81. package/client-dist/{chunk-T4VU2VZX.js → chunk-IQYJH4J7.js} +2 -2
  82. package/client-dist/{chunk-MJW74BVF.js → chunk-J7XG5WST.js} +2 -2
  83. package/client-dist/{chunk-PNTHQY7R.js → chunk-JLUYCPX3.js} +2 -2
  84. package/client-dist/{chunk-ZLIDOLOB.js → chunk-JOEQVHLP.js} +2 -2
  85. package/client-dist/{chunk-6NLDSDVJ.js → chunk-KHMRNG5E.js} +2 -2
  86. package/client-dist/{chunk-246ZTR5O.js → chunk-KIRC3TOF.js} +2 -2
  87. package/client-dist/{chunk-DDRFKBEB.js → chunk-M2VDKALL.js} +2 -2
  88. package/client-dist/{chunk-XWEW3BLS.js → chunk-MYK7GACV.js} +2 -2
  89. package/client-dist/{chunk-44PBXW6P.js → chunk-NVDOMHCP.js} +2 -2
  90. package/client-dist/{chunk-LV74GN4F.js → chunk-OCYK4I37.js} +2 -2
  91. package/client-dist/{chunk-FLC62MUK.js → chunk-OLTVSW6P.js} +2 -2
  92. package/client-dist/{chunk-HU6WMEXD.js → chunk-OV776GY4.js} +2 -2
  93. package/client-dist/{chunk-S5TMOEID.js → chunk-PEIQDAXN.js} +2 -2
  94. package/client-dist/{chunk-2JP2POHI.js → chunk-PGEEVNYW.js} +2 -2
  95. package/client-dist/{chunk-WTLQBK4J.js → chunk-PKVKXWSS.js} +2 -2
  96. package/client-dist/{chunk-MSC5PDVD.js → chunk-PRF3OUI7.js} +2 -2
  97. package/client-dist/{chunk-5UB3EISH.js → chunk-REWBQNDV.js} +2 -2
  98. package/client-dist/{chunk-IMYGUQJE.js → chunk-TNTQYNFQ.js} +2 -2
  99. package/client-dist/{chunk-YAL3F5I2.js → chunk-U4RZ7GFY.js} +2 -2
  100. package/client-dist/{chunk-3N4SIVK5.js → chunk-UEFUKRAM.js} +2 -2
  101. package/client-dist/{chunk-PECMBLKI.js → chunk-UEQKXLYY.js} +2 -2
  102. package/client-dist/{chunk-TH3RT3KI.js → chunk-VH4GKMD3.js} +2 -2
  103. package/client-dist/{chunk-WPGGMZPB.js → chunk-VPWEWXFD.js} +2 -2
  104. package/client-dist/{chunk-RD66WNGY.js → chunk-W6RXT6D7.js} +2 -2
  105. package/client-dist/{chunk-LRT6KDL6.js → chunk-WAVRMTHA.js} +2 -2
  106. package/client-dist/{chunk-3KCBESYF.js → chunk-WLVM35I4.js} +2 -2
  107. package/client-dist/{chunk-S7RPTNLO.js → chunk-ZDABQIBP.js} +2 -2
  108. package/client-dist/{chunk-KPGAWVWR.js → chunk-ZKC5Z3IN.js} +2 -2
  109. package/client-dist/{chunk-IQWBHMY2.js → chunk-ZVAWABJH.js} +2 -2
  110. package/client-dist/{consultant.module-X4IBYYQS.js → consultant.module-N64GJRK3.js} +2 -2
  111. package/client-dist/{crd.module-4JESGZ6J.js → crd.module-2TLXBWL3.js} +2 -2
  112. package/client-dist/{dashboard.module-S24CPFKY.js → dashboard.module-A5AQ4MXU.js} +2 -2
  113. package/client-dist/{do.module-KMXSJLSC.js → do.module-7A4O3RFF.js} +2 -2
  114. package/client-dist/{document-library.module-NVMIG2CU.js → document-library.module-N5KBWUB6.js} +2 -2
  115. package/client-dist/{embedding-eval.module-H6GIG3JO.js → embedding-eval.module-O6SZBU7X.js} +2 -2
  116. package/client-dist/{embedding-registry.module-5ISUMQ7P.js → embedding-registry.module-OA77P44J.js} +2 -2
  117. package/client-dist/{err.module-NJA2KCSV.js → err.module-RWJUO7EF.js} +2 -2
  118. package/client-dist/{feedback.module-DRAGZ6Y4.js → feedback.module-GUBGJMFD.js} +2 -2
  119. package/client-dist/{host-runtime-mcp.module-VG5PUGZU.js → host-runtime-mcp.module-P3PVLVPH.js} +2 -2
  120. package/client-dist/index.html +1 -1
  121. package/client-dist/{live-dev-pipeline.module-S7CEI343.js → live-dev-pipeline.module-HUI2EWPA.js} +2 -2
  122. package/client-dist/{logs.module-PDM3A7YM.js → logs.module-KCU67S7S.js} +2 -2
  123. package/client-dist/{main-3BCKKE3E.js → main-SB4UO4OC.js} +3 -3
  124. package/client-dist/{master-control-remote-poc.module-ZT3ZPSP2.js → master-control-remote-poc.module-3UBJZBTK.js} +2 -2
  125. package/client-dist/{mobile-app.module-WOWIODHA.js → mobile-app.module-X6U46WW7.js} +2 -2
  126. package/client-dist/{model-registry.module-ABJPN7CO.js → model-registry.module-3PG3PJ3J.js} +2 -2
  127. package/client-dist/{oc.module-IYJQQ4V2.js → oc.module-C52TEII4.js} +2 -2
  128. package/client-dist/{orc.module-L3UX2YOG.js → orc.module-KR5CVMQM.js} +2 -2
  129. package/client-dist/{project-management.module-CH4QROUC.js → project-management.module-IHLVVJ2G.js} +2 -2
  130. package/client-dist/project-source-routed.module-GBWQ63AE.js +2 -0
  131. package/client-dist/{scheduler.module-UBFVRLQC.js → scheduler.module-U2LB4R6N.js} +2 -2
  132. package/client-dist/{session.module-SPGTZVT2.js → session.module-HOSGEEDR.js} +2 -2
  133. package/client-dist/{set.module-E3ZIGRQY.js → set.module-BXGLV3NK.js} +2 -2
  134. package/client-dist/{setup.module-AQ4H55JC.js → setup.module-47WXGX3F.js} +2 -2
  135. package/client-dist/{terminals.module-I63ACO43.js → terminals.module-KPNW6NBJ.js} +2 -2
  136. package/client-dist/{voice-notes-poc.module-6DL3W2E3.js → voice-notes-poc.module-KUQCUNUK.js} +2 -2
  137. package/client-dist/{wfs.module-MXS63ER2.js → wfs.module-KFTICN4O.js} +2 -2
  138. package/package.json +1 -1
  139. package/server/build/src/_modules/setup-config/_collections/utils/update-error-buffer-replay/sc-update-error-buffer-replay-result.interface.d.ts +18 -0
  140. package/server/build/src/_modules/setup-config/_collections/utils/update-error-buffer-replay/sc-update-error-buffer-replay-result.interface.d.ts.map +1 -0
  141. package/server/build/src/_modules/setup-config/_collections/utils/update-error-buffer-replay/sc-update-error-buffer-replay-result.interface.js +3 -0
  142. package/server/build/src/_modules/setup-config/_collections/utils/update-error-buffer-replay/sc-update-error-buffer-replay-result.interface.js.map +1 -0
  143. package/server/build/src/_modules/setup-config/_collections/utils/update-error-buffer-replay/sc-update-error-buffer-replay.util.d.ts +31 -0
  144. package/server/build/src/_modules/setup-config/_collections/utils/update-error-buffer-replay/sc-update-error-buffer-replay.util.d.ts.map +1 -0
  145. package/server/build/src/_modules/setup-config/_collections/utils/update-error-buffer-replay/sc-update-error-buffer-replay.util.js +184 -0
  146. package/server/build/src/_modules/setup-config/_collections/utils/update-error-buffer-replay/sc-update-error-buffer-replay.util.js.map +1 -0
  147. package/server/build/src/_modules/setup-config/_collections/utils/update-error-buffer-replay/sc-update-error-buffer-replay.util.spec.d.ts +9 -0
  148. package/server/build/src/_modules/setup-config/_collections/utils/update-error-buffer-replay/sc-update-error-buffer-replay.util.spec.d.ts.map +1 -0
  149. package/server/build/src/_modules/setup-config/_collections/utils/update-error-buffer-replay/sc-update-error-buffer-replay.util.spec.js +135 -0
  150. package/server/build/src/_modules/setup-config/_collections/utils/update-error-buffer-replay/sc-update-error-buffer-replay.util.spec.js.map +1 -0
  151. package/server/build/src/app.server.d.ts.map +1 -1
  152. package/server/build/src/app.server.js +10 -0
  153. package/server/build/src/app.server.js.map +1 -1
  154. package/client-dist/project-source-routed.module-SF6CNR34.js +0 -2
  155. /package/client-dist/{agent-instances.module-5SGOQHZE.js.map → agent-instances.module-2URQPTNT.js.map} +0 -0
  156. /package/client-dist/{ca.module-OCEZIM6Z.js.map → ca.module-JUKBF44B.js.map} +0 -0
  157. /package/client-dist/{cc-usage-dashboard.component-GI5LK2ZY.js.map → cc-usage-dashboard.component-UEDH2XKN.js.map} +0 -0
  158. /package/client-dist/{cc.module-7FRXT32H.js.map → cc.module-S5PA32TN.js.map} +0 -0
  159. /package/client-dist/{chunk-V4V6NHXT.js.map → chunk-3CCTA7PZ.js.map} +0 -0
  160. /package/client-dist/{chunk-DAV3UNQX.js.map → chunk-3MRPZKCQ.js.map} +0 -0
  161. /package/client-dist/{chunk-EWVZESJW.js.map → chunk-3W3OBILQ.js.map} +0 -0
  162. /package/client-dist/{chunk-JJMNZIAQ.js.map → chunk-4LELMYV2.js.map} +0 -0
  163. /package/client-dist/{chunk-3BVLFJ5H.js.map → chunk-4LPEUFAW.js.map} +0 -0
  164. /package/client-dist/{chunk-7LEYLJ7K.js.map → chunk-4LUVD2AP.js.map} +0 -0
  165. /package/client-dist/{chunk-JLA2PX42.js.map → chunk-5BZODWW7.js.map} +0 -0
  166. /package/client-dist/{chunk-ZP3HA643.js.map → chunk-5YO3LDJM.js.map} +0 -0
  167. /package/client-dist/{chunk-KOF3QQI6.js.map → chunk-6JO7UKOI.js.map} +0 -0
  168. /package/client-dist/{chunk-FB3RWQTM.js.map → chunk-6T3T47WR.js.map} +0 -0
  169. /package/client-dist/{chunk-7OU5EIQN.js.map → chunk-6V3AY4GG.js.map} +0 -0
  170. /package/client-dist/{chunk-CS6PNARE.js.map → chunk-744OTLPJ.js.map} +0 -0
  171. /package/client-dist/{chunk-I5B5NLNT.js.map → chunk-7Y6EDEKN.js.map} +0 -0
  172. /package/client-dist/{chunk-J2Y64TJX.js.map → chunk-A4J42SWO.js.map} +0 -0
  173. /package/client-dist/{chunk-QBFOD33L.js.map → chunk-AINXWTEN.js.map} +0 -0
  174. /package/client-dist/{chunk-4V5CKMM7.js.map → chunk-ALZ7U76J.js.map} +0 -0
  175. /package/client-dist/{chunk-H6H3DTA3.js.map → chunk-BKYQ746Q.js.map} +0 -0
  176. /package/client-dist/{chunk-FJQ56J6K.js.map → chunk-CKHGJZOB.js.map} +0 -0
  177. /package/client-dist/{chunk-JVHTYQOT.js.map → chunk-DE3BOHO5.js.map} +0 -0
  178. /package/client-dist/{chunk-SQ64MCSX.js.map → chunk-DJCLH4DQ.js.map} +0 -0
  179. /package/client-dist/{chunk-T6T7P3PI.js.map → chunk-DODMVPWS.js.map} +0 -0
  180. /package/client-dist/{chunk-DQWIQMJR.js.map → chunk-FKOWRSW7.js.map} +0 -0
  181. /package/client-dist/{chunk-TSUGHIGA.js.map → chunk-FXDLW3RE.js.map} +0 -0
  182. /package/client-dist/{chunk-2BWFVPTP.js.map → chunk-GTS3HVE3.js.map} +0 -0
  183. /package/client-dist/{chunk-DDV2CYX5.js.map → chunk-GWYU4AVI.js.map} +0 -0
  184. /package/client-dist/{chunk-XBIXPQFJ.js.map → chunk-HRA33EDX.js.map} +0 -0
  185. /package/client-dist/{chunk-T4VU2VZX.js.map → chunk-IQYJH4J7.js.map} +0 -0
  186. /package/client-dist/{chunk-MJW74BVF.js.map → chunk-J7XG5WST.js.map} +0 -0
  187. /package/client-dist/{chunk-PNTHQY7R.js.map → chunk-JLUYCPX3.js.map} +0 -0
  188. /package/client-dist/{chunk-ZLIDOLOB.js.map → chunk-JOEQVHLP.js.map} +0 -0
  189. /package/client-dist/{chunk-6NLDSDVJ.js.map → chunk-KHMRNG5E.js.map} +0 -0
  190. /package/client-dist/{chunk-246ZTR5O.js.map → chunk-KIRC3TOF.js.map} +0 -0
  191. /package/client-dist/{chunk-DDRFKBEB.js.map → chunk-M2VDKALL.js.map} +0 -0
  192. /package/client-dist/{chunk-XWEW3BLS.js.map → chunk-MYK7GACV.js.map} +0 -0
  193. /package/client-dist/{chunk-44PBXW6P.js.map → chunk-NVDOMHCP.js.map} +0 -0
  194. /package/client-dist/{chunk-LV74GN4F.js.map → chunk-OCYK4I37.js.map} +0 -0
  195. /package/client-dist/{chunk-FLC62MUK.js.map → chunk-OLTVSW6P.js.map} +0 -0
  196. /package/client-dist/{chunk-HU6WMEXD.js.map → chunk-OV776GY4.js.map} +0 -0
  197. /package/client-dist/{chunk-S5TMOEID.js.map → chunk-PEIQDAXN.js.map} +0 -0
  198. /package/client-dist/{chunk-2JP2POHI.js.map → chunk-PGEEVNYW.js.map} +0 -0
  199. /package/client-dist/{chunk-WTLQBK4J.js.map → chunk-PKVKXWSS.js.map} +0 -0
  200. /package/client-dist/{chunk-MSC5PDVD.js.map → chunk-PRF3OUI7.js.map} +0 -0
  201. /package/client-dist/{chunk-5UB3EISH.js.map → chunk-REWBQNDV.js.map} +0 -0
  202. /package/client-dist/{chunk-IMYGUQJE.js.map → chunk-TNTQYNFQ.js.map} +0 -0
  203. /package/client-dist/{chunk-YAL3F5I2.js.map → chunk-U4RZ7GFY.js.map} +0 -0
  204. /package/client-dist/{chunk-3N4SIVK5.js.map → chunk-UEFUKRAM.js.map} +0 -0
  205. /package/client-dist/{chunk-PECMBLKI.js.map → chunk-UEQKXLYY.js.map} +0 -0
  206. /package/client-dist/{chunk-TH3RT3KI.js.map → chunk-VH4GKMD3.js.map} +0 -0
  207. /package/client-dist/{chunk-WPGGMZPB.js.map → chunk-VPWEWXFD.js.map} +0 -0
  208. /package/client-dist/{chunk-RD66WNGY.js.map → chunk-W6RXT6D7.js.map} +0 -0
  209. /package/client-dist/{chunk-LRT6KDL6.js.map → chunk-WAVRMTHA.js.map} +0 -0
  210. /package/client-dist/{chunk-3KCBESYF.js.map → chunk-WLVM35I4.js.map} +0 -0
  211. /package/client-dist/{chunk-S7RPTNLO.js.map → chunk-ZDABQIBP.js.map} +0 -0
  212. /package/client-dist/{chunk-KPGAWVWR.js.map → chunk-ZKC5Z3IN.js.map} +0 -0
  213. /package/client-dist/{chunk-IQWBHMY2.js.map → chunk-ZVAWABJH.js.map} +0 -0
  214. /package/client-dist/{consultant.module-X4IBYYQS.js.map → consultant.module-N64GJRK3.js.map} +0 -0
  215. /package/client-dist/{crd.module-4JESGZ6J.js.map → crd.module-2TLXBWL3.js.map} +0 -0
  216. /package/client-dist/{dashboard.module-S24CPFKY.js.map → dashboard.module-A5AQ4MXU.js.map} +0 -0
  217. /package/client-dist/{do.module-KMXSJLSC.js.map → do.module-7A4O3RFF.js.map} +0 -0
  218. /package/client-dist/{document-library.module-NVMIG2CU.js.map → document-library.module-N5KBWUB6.js.map} +0 -0
  219. /package/client-dist/{embedding-eval.module-H6GIG3JO.js.map → embedding-eval.module-O6SZBU7X.js.map} +0 -0
  220. /package/client-dist/{embedding-registry.module-5ISUMQ7P.js.map → embedding-registry.module-OA77P44J.js.map} +0 -0
  221. /package/client-dist/{err.module-NJA2KCSV.js.map → err.module-RWJUO7EF.js.map} +0 -0
  222. /package/client-dist/{feedback.module-DRAGZ6Y4.js.map → feedback.module-GUBGJMFD.js.map} +0 -0
  223. /package/client-dist/{host-runtime-mcp.module-VG5PUGZU.js.map → host-runtime-mcp.module-P3PVLVPH.js.map} +0 -0
  224. /package/client-dist/{live-dev-pipeline.module-S7CEI343.js.map → live-dev-pipeline.module-HUI2EWPA.js.map} +0 -0
  225. /package/client-dist/{logs.module-PDM3A7YM.js.map → logs.module-KCU67S7S.js.map} +0 -0
  226. /package/client-dist/{main-3BCKKE3E.js.map → main-SB4UO4OC.js.map} +0 -0
  227. /package/client-dist/{master-control-remote-poc.module-ZT3ZPSP2.js.map → master-control-remote-poc.module-3UBJZBTK.js.map} +0 -0
  228. /package/client-dist/{mobile-app.module-WOWIODHA.js.map → mobile-app.module-X6U46WW7.js.map} +0 -0
  229. /package/client-dist/{model-registry.module-ABJPN7CO.js.map → model-registry.module-3PG3PJ3J.js.map} +0 -0
  230. /package/client-dist/{oc.module-IYJQQ4V2.js.map → oc.module-C52TEII4.js.map} +0 -0
  231. /package/client-dist/{orc.module-L3UX2YOG.js.map → orc.module-KR5CVMQM.js.map} +0 -0
  232. /package/client-dist/{project-management.module-CH4QROUC.js.map → project-management.module-IHLVVJ2G.js.map} +0 -0
  233. /package/client-dist/{project-source-routed.module-SF6CNR34.js.map → project-source-routed.module-GBWQ63AE.js.map} +0 -0
  234. /package/client-dist/{scheduler.module-UBFVRLQC.js.map → scheduler.module-U2LB4R6N.js.map} +0 -0
  235. /package/client-dist/{session.module-SPGTZVT2.js.map → session.module-HOSGEEDR.js.map} +0 -0
  236. /package/client-dist/{set.module-E3ZIGRQY.js.map → set.module-BXGLV3NK.js.map} +0 -0
  237. /package/client-dist/{setup.module-AQ4H55JC.js.map → setup.module-47WXGX3F.js.map} +0 -0
  238. /package/client-dist/{terminals.module-I63ACO43.js.map → terminals.module-KPNW6NBJ.js.map} +0 -0
  239. /package/client-dist/{voice-notes-poc.module-6DL3W2E3.js.map → voice-notes-poc.module-KUQCUNUK.js.map} +0 -0
  240. /package/client-dist/{wfs.module-MXS63ER2.js.map → wfs.module-KFTICN4O.js.map} +0 -0
@@ -1,3 +1,3 @@
1
- import{c as Ce}from"./chunk-7LEYLJ7K.js";import{b as Ye}from"./chunk-COVCHZOZ.js";import{a as v}from"./chunk-UFBTR2BG.js";import{h as Be,i as Fe}from"./chunk-WPGGMZPB.js";import{I as Ve}from"./chunk-37AFYV4M.js";import{Aa as Oe,Ba as Re,C as Z,D as ae,Fa as m,Ga as L,Ha as _e,Ia as ze,J as R,K as z,L as H,M as ye,P as Pe,T as ne,Ta as le,U as F,Z as u,a as I,aa as V,b as w,da as D,fa as Y,ga as me,hb as g,ja as se,jb as Se,k as ke,la as S,oa as Le,p as be,pa as we,qa as p,ra as d,sa as W,ua as ie,ub as de,va as B,wa as C,xb as He,y as xe,za as Ge}from"./chunk-TBMJSIBB.js";var ve=class i{static getEmoji(o){let e=o.data??{},t=typeof e.step=="string"?e.step:"";return t==="run-initialization"?"\u{1F680}":t==="run-flow-complete"?"\u{1F3AF}":t==="tool-error-retry"?"\u26A0\uFE0F\u{1F9E0}":t.includes("tool-error")||t.includes("error-recovery")?"\u{1F527}\u274C":t.includes("agentic-loop-iteration")?"":o.eventType==="tool-call"||typeof e.toolId=="string"?"\u{1F527}":o.eventType==="llm-call"||typeof e.callType=="string"?"\u{1F9E0}":o.eventType==="error"?"\u26A0\uFE0F":""}static getBubbleClasses(o){let e=o.data??{},t=typeof e.step=="string"?e.step:"";return t==="run-initialization"||t==="run-flow-complete"?"bg-green-500/10 text-green-300 border border-green-500/50":t==="tool-error-retry"||t.includes("tool-error")||t.includes("error-recovery")?"bg-orange-500/10 text-orange-300 border border-orange-500/50":o.eventType==="error"||t.includes("circuit-breaker")?"bg-red-500/10 text-red-300 border border-red-500/50":t.includes("agentic-loop")?"bg-blue-500/10 text-blue-300 border border-blue-500/50":o.eventType==="tool-call"||typeof e.toolId=="string"?"bg-yellow-500/10 text-yellow-300 border border-yellow-500/50":o.eventType==="llm-call"||typeof e.callType=="string"?"bg-purple-500/10 text-purple-300 border border-purple-500/50":"bg-neutral-700 text-neutral-200 border border-neonCyan"}static getStepLabel(o){let e=o.data??{},t=e.step,n=e.toolId;if(typeof t=="string"&&t.length>0)return i.formatStepId(t);if(o.eventType==="tool-call"&&typeof n=="string"&&n.length>0)return`Eszk\xF6z: ${n}`;if(o.eventType==="llm-call"){let r=e.callType;return typeof r=="string"?`LLM: ${i.formatStepId(r)}`:"LLM h\xEDv\xE1s"}if(o.eventType==="error"){let r=e.message;return typeof r=="string"&&r.length>0?`Hiba: ${r.substring(0,40)}${r.length>40?"\u2026":""}`:"Hiba"}return o.eventType==="compacting"?typeof t=="string"&&t.length>0?i.formatStepId(t):"Compacting":i.formatEventTypeFallback(o.eventType)}static formatStepId(o){return o.split("-").map(e=>e.length>0?e.charAt(0).toUpperCase()+e.slice(1).toLowerCase():e).join(" ")}static getDotClasses(o){let e=o.data??{},t=typeof e.step=="string"?e.step:"";return t==="run-initialization"||t==="run-flow-complete"?"bg-green-400":t==="tool-error-retry"||t.includes("tool-error")||t.includes("error-recovery")?"bg-orange-400":o.eventType==="error"||t.includes("circuit-breaker")?"bg-red-400":t.includes("agentic-loop")?"bg-blue-400":o.eventType==="tool-call"||typeof e.toolId=="string"?"bg-yellow-400":o.eventType==="llm-call"||typeof e.callType=="string"?"bg-purple-400":"bg-neutral-400"}static formatEventTypeFallback(o){return{step:"L\xE9p\xE9s","tool-call":"Eszk\xF6zh\xEDv\xE1s","context-update":"Kontextus friss\xEDt\xE9s",compacting:"Compacting","llm-call":"LLM h\xEDv\xE1s","session-event":"Session event",error:"Hiba"}[o]??o}};var x=function(i){return i.pending="pending",i.active="active",i.completed="completed",i.error="error",i}(x||{});var tt={[v.runInitialization]:"milestone-init",[v.analyze]:"phase-analyze",[v.analyzeResult]:"llm-analyze",[v.assemble]:"phase-assemble",[v.execution]:"phase-execution",[v.executionStart]:"phase-execution",[v.finalization]:"phase-finalization",[v.llmRunFinalization]:"llm-finalization",[v.postFinalization]:"phase-finalization",[v.runFlowComplete]:"milestone-complete"},nt=["milestone-init","phase-analyze","llm-analyze","phase-assemble","phase-execution","phase-finalization","llm-finalization","milestone-complete"],N=class i{static mapPhaseToNodeId(o){return tt[o]??null}static computeStateTransitions(o){let e=i.mapPhaseToNodeId(o);if(!e)return[];let t=[],n=!1;for(let r of nt)r===e?(t.push({nodeId:r,state:x.active}),n=!0):n||t.push({nodeId:r,state:x.completed});return t}static extractIterationData(o){let e=o.action;if(typeof e!="string")return null;let t=o.tool,n=typeof t=="string"?t:"",r=o.intent,s=typeof r=="string"?r:"",a=o.iterationCount;return{actionType:e,tool:n,intent:s,iterationIndex:typeof a=="number"?a:0}}static mapMonitoringEventToIterationNodeId(o,e){let t=o.data??{},n=t.step,r=typeof n=="string"?n:"",s=`iter-${e}`;if(o.eventType==="llm-call"){let a=t.callType;if(a==="agentic-loop")return`${s}-llm-decision`;if(a==="tool-description")return`${s}-tool-desc`;if(a==="tool-error-retry")return`${s}-tool-error-retry`;if(a==="tool-result-chunking")return`${s}-tool-chunking`;if(a==="goal-state-update")return`${s}-goal-update`}return o.eventType==="tool-call"?`${s}-tool-call`:o.eventType==="error"||r.includes("tool-error")?`${s}-tool-call`:null}static isTerminalPhase(o){return o===v.runFlowComplete}static SKELETON_LLM_NODE_MAP={analyze:"llm-analyze","run-finalization":"llm-finalization"};static LLM_CALL_PHASE_MAP={analyze:"phase-analyze","subanalyze-run-tasks":"phase-analyze","instant-reply":"phase-execution","run-finalization":"phase-finalization","chat-history-compacting":"phase-execution","execution-history-compacting":"phase-execution","soul-compacting":"phase-execution","context-compacting":"phase-execution","message-interceptor":"phase-execution"};static ITERATION_LLM_CALL_TYPES=new Set(["agentic-loop","tool-description","tool-error-retry","tool-result-chunking","goal-state-update"]);static LLM_CALL_LABEL_MAP={analyze:"LLM: Analyze","subanalyze-run-tasks":"LLM: Subanalyze","instant-reply":"LLM: Instant Reply","agentic-loop":"LLM Decision","tool-description":"Tool Description","tool-error-retry":"LLM: Error Retry","run-finalization":"LLM: Summary","chat-history-compacting":"LLM: Compact Chat","execution-history-compacting":"LLM: Compact Exec","soul-compacting":"LLM: Compact Soul","context-compacting":"LLM: Compact Ctx","tool-result-chunking":"LLM: Chunking","goal-state-update":"LLM: Goal Update","message-interceptor":"LLM: Msg Intercept"};static getPreCreatedSkeletonNodeId(o){return i.SKELETON_LLM_NODE_MAP[o]??null}static getLlmCallPhaseId(o){return i.LLM_CALL_PHASE_MAP[o]??null}static isIterationLlmCall(o){return i.ITERATION_LLM_CALL_TYPES.has(o)}static getLlmCallLabel(o){return i.LLM_CALL_LABEL_MAP[o]??`LLM: ${o}`}};var k=function(i){return i.sequential="sequential",i.loopEntry="loop-entry",i.errorRetry="error-retry",i}(k||{});var f=function(i){return i.phase="phase",i.milestone="milestone",i.llmCall="llm-call",i.toolCall="tool-call",i.toolError="tool-error",i.loopIteration="loop-iteration",i.action="action",i.error="error",i}(f||{});var je="milestone-init",Ee="phase-analyze",it="llm-analyze",Me="phase-assemble",ee="phase-execution",he="phase-finalization",Ae="llm-finalization",De="milestone-complete",P=class i{static buildSkeletonLayout(){let o=48+220/2,e=48,t=[],n=[],r=i.createNode({id:je,category:f.milestone,label:"Initialization",phase:v.runInitialization,x:o-200/2,y:e,width:200,height:48});t.push(r),e+=84;let s=i.createNode({id:Ee,category:f.phase,label:"Analyze",phase:v.analyze,x:o-220/2,y:e,width:220,height:60});t.push(s);let a=i.createNode({id:it,category:f.llmCall,label:"LLM: Analyze",phase:v.analyzeResult,x:o+220/2+28,y:e+16/2,width:160,height:44,parentId:Ee});t.push(a),n.push(i.createEdge(je,Ee,k.sequential)),e+=96;let h=i.createNode({id:Me,category:f.phase,label:"Assemble",phase:v.assemble,x:o-220/2,y:e,width:220,height:60});t.push(h),n.push(i.createEdge(Ee,Me,k.sequential)),e+=96;let l=i.createNode({id:ee,category:f.phase,label:"Execution",phase:v.execution,x:o-220/2,y:e,width:220,height:60});t.push(l),n.push(i.createEdge(Me,ee,k.sequential)),e+=96;let c=i.createNode({id:he,category:f.phase,label:"Finalization",phase:v.finalization,x:o-220/2,y:e,width:220,height:60});t.push(c);let _=i.createNode({id:Ae,category:f.llmCall,label:"LLM: Summary",phase:v.llmRunFinalization,x:o+220/2+28,y:e+16/2,width:160,height:44,parentId:he});t.push(_),n.push(i.createEdge(ee,he,k.sequential)),e+=96;let y=i.createNode({id:De,category:f.milestone,label:"Flow Complete",phase:v.runFlowComplete,x:o-200/2,y:e,width:200,height:48});t.push(y),n.push(i.createEdge(he,De,k.sequential));let T=i.recalculateViewBox(t,48);return{nodes:t,edges:n,viewBox:T,loopContainerBounds:null}}static addIterationColumn(o,e,t,n){let r=o.nodes.map(b=>I({},b)),s=[...o.edges],a=r.find(b=>b.id===ee);if(!a)return o;let h=a.x+20+e*208,l=a.y+60+20,c=`iter-${e}`,_=l,y=[],T=i.createNode({id:`${c}-llm-decision`,category:f.llmCall,label:"LLM Decision",phase:v.llmAgenticLoop,x:h,y:_,width:160,height:44,parentId:ee,iterationIndex:e});y.push(T),_+=68;let M=i.formatActionLabel(t),O=i.createNode({id:`${c}-action`,category:f.action,label:M,phase:v.agenticLoopIteration,x:h+20/2,y:_,width:140,height:32,parentId:ee,iterationIndex:e,data:n});if(y.push(O),_+=56,t==="tool-select"){let b=i.createNode({id:`${c}-tool-desc`,category:f.llmCall,label:"Tool Description",phase:v.llmToolDescription,x:h,y:_,width:160,height:44,parentId:ee,iterationIndex:e});y.push(b),_+=68;let q=n.tool,Q=typeof q=="string"?q:"tool",te=i.createNode({id:`${c}-tool-call`,category:f.toolCall,label:Q,phase:null,x:h,y:_,width:160,height:44,parentId:ee,iterationIndex:e,data:n});y.push(te),_+=68}for(let b=0;b<y.length-1;b++)s.push(i.createEdge(y[b].id,y[b+1].id,k.sequential));r.push(...y);let E=20*2+(e+1)*180+e*28,j=60+20*2+(_-l);a.width=Math.max(a.width,E),a.height=Math.max(a.height,j);let K=a.y+a.height,A=[he,Ae,De],ue=K+36;for(let b of A){let q=r.find(Q=>Q.id===b);if(q){if(b===Ae){let Q=r.find(te=>te.id===he);Q&&(q.y=Q.y+16/2);continue}q.y=ue,ue+=q.height+36}}let ge={x:a.x,y:a.y+60,width:a.width,height:a.height-60},J=r,Je=s.map(b=>{let q=J.find(te=>te.id===b.sourceNodeId),Q=J.find(te=>te.id===b.targetNodeId);return!q||!Q?b:w(I({},b),{pathD:i.computeEdgePath(q,Q,b.category)})}),et=i.recalculateViewBox(J,48);return{nodes:J,edges:Je,viewBox:et,loopContainerBounds:ge}}static computeEdgePath(o,e,t){let n=o.x+o.width/2,r=o.y+o.height,s=e.x+e.width/2,a=e.y;if(Math.abs(n-s)<20)return`M ${n} ${r} L ${s} ${a}`;let h=o.x+o.width,l=o.y+o.height/2,c=e.x,_=e.y+e.height/2;if(e.parentId===o.id)return`M ${h} ${l} L ${c} ${_}`;let y=r+(a-r)/2;return`M ${n} ${r} L ${n} ${y} L ${s} ${y} L ${s} ${a}`}static recalculateViewBox(o,e){if(o.length===0)return{x:0,y:0,width:600,height:400};let t=1/0,n=1/0,r=-1/0,s=-1/0;for(let a of o)t=Math.min(t,a.x),n=Math.min(n,a.y),r=Math.max(r,a.x+a.width),s=Math.max(s,a.y+a.height);return{x:t-e,y:n-e,width:r-t+e*2,height:s-n+e*2}}static addDynamicLlmNode(o,e,t,n,r,s){let a=o.nodes.map(A=>I({},A)),h=[...o.edges],l=a.find(A=>A.id===e);if(!l)return o;let c,_;l.category===f.phase||l.category===f.milestone?(c=l.x+l.width+28,_=l.y+(l.height-44)/2):(c=l.x,_=l.y+l.height+24);let T=i.createNode({id:t,category:f.llmCall,label:n,phase:null,x:c,y:_,width:160,height:44,parentId:r,iterationIndex:s??void 0});a.push(T),h.push(i.createEdge(e,t,k.sequential));let M=T.y+T.height;s!=null?i.expandExecutionContainer(a,M):i.shiftDownstreamIfOverlap(a,r,M);let O=o.loopContainerBounds,E=a.find(A=>A.id==="phase-execution");E&&E.height>60&&(O={x:E.x,y:E.y+60,width:E.width,height:E.height-60});let j=h.map(A=>{let ue=a.find(J=>J.id===A.sourceNodeId),ge=a.find(J=>J.id===A.targetNodeId);return!ue||!ge?A:w(I({},A),{pathD:i.computeEdgePath(ue,ge,A.category)})}),K=i.recalculateViewBox(a,48);return{nodes:a,edges:j,viewBox:K,loopContainerBounds:O}}static expandExecutionContainer(o,e){let t=o.find(l=>l.id==="phase-execution");if(!t)return;let n=t.y+60+20,r=60+20*2+(e+24-n);if(r<=t.height)return;t.height=r;let s=t.y+t.height,a=["phase-finalization","llm-finalization","milestone-complete"],h=s+36;for(let l of a){let c=o.find(_=>_.id===l);if(c){if(l==="llm-finalization"){let _=o.find(y=>y.id==="phase-finalization");_&&(c.y=_.y+16/2);continue}c.y<h&&(c.y=h),h=c.y+c.height+36}}for(let l of o)if(l.parentId==="phase-finalization"&&l.id!=="llm-finalization"&&l.category===f.llmCall){let c=o.find(_=>_.id==="phase-finalization");c&&(l.y=Math.max(l.y,c.y))}}static shiftDownstreamIfOverlap(o,e,t){let n=["milestone-init","phase-analyze","phase-assemble","phase-execution","phase-finalization","milestone-complete"],r=n.indexOf(e);if(r<0||r>=n.length-1)return;let s=n[r+1],a=o.find(_=>_.id===s);if(!a||t+36<=a.y)return;let h=t+36-a.y,l=new Set;for(let _ of o)_.parentId===e&&_.category===f.llmCall&&l.add(_.id);let c=a.y;for(let _ of o)_.y>=c&&!l.has(_.id)&&(_.y+=h)}static createNode(o){return{id:o.id,category:o.category,state:x.pending,label:o.label,phase:o.phase,x:o.x,y:o.y,width:o.width,height:o.height,data:o.data??{},iterationIndex:o.iterationIndex??null,parentId:o.parentId??null,monitoringEvent:null}}static createEdge(o,e,t){let n=t===k.errorRetry?"#f97316":t===k.loopEntry?"#3b82f6":"#525252",r=t===k.loopEntry?"8 4":t===k.errorRetry?"6 3":"none",s=t===k.errorRetry?"url(#ses-arrow-error)":t===k.loopEntry?"url(#ses-arrow-loop)":"url(#ses-arrow-seq)";return{id:`edge-${o}-${e}`,category:t,sourceNodeId:o,targetNodeId:e,pathD:"",strokeColor:n,strokeDashArray:r,markerEnd:s}}static formatActionLabel(o){return{"tool-select":"Tool Select","tool-group-open":"Tool Group","context-handling":"Context","loop-debrief":"Debrief",result:"Result"}[o]??o}};var qe=(()=>{class i{baseUrl=`${Ve.api.baseUrl}/session`;http=Z(He);getEvents(e){let t=encodeURIComponent(e.trim());return be(this.http.get(`${this.baseUrl}/${t}/events`))}getRunTrace(e){let t=e.sessionId.trim(),n=encodeURIComponent(e.runId.trim());return be(this.http.get(`${this.baseUrl}/${encodeURIComponent(t)}/runs/${n}/trace`))}static \u0275fac=function(t){return new(t||i)};static \u0275prov=xe({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})();var Ze=(()=>{class i{session_DS=Z(Ce);monitoring_AS=Z(qe);destroyRef=Z(Pe);graphLayout_$=V(null);activeNodeId_$=V("");selectedNodeId_$=V("");isLive_$=V(!1);isGraphOpen_$=V(!1);graphSessionId_$=V("");graphRunId_$=V("");isLoading_$=V(!1);currentIterationIndex=-1;monitoringSubscription=null;lastAppliedPhase="";phaseRightColumnLast={};iterationColumnLast={};dynamicNodeCounter=0;constructor(){Se(()=>{let e=this.session_DS.agentEvents_$();!this.isGraphOpen_$()||!this.isLive_$()||this.applyAgentEvent(e)},{allowSignalWrites:!0}),this.destroyRef.onDestroy(()=>{this.disposeSubscriptions()})}openGraphForRun(e,t,n){this.disposeSubscriptions(),this.resetState(),this.graphSessionId_$.set(e),this.graphRunId_$.set(t),this.isLive_$.set(n),this.isGraphOpen_$.set(!0),n?this.initLiveGraph():this.loadHistoricalGraph(e,t)}closeGraph(){this.disposeSubscriptions(),this.isGraphOpen_$.set(!1),this.selectedNodeId_$.set("")}selectNode(e){let t=this.selectedNodeId_$();this.selectedNodeId_$.set(t===e?"":e)}clearSelection(){this.selectedNodeId_$.set("")}initLiveGraph(){let e=P.buildSkeletonLayout(),t=this.recalculateEdgePaths(e);this.graphLayout_$.set(t),this.phaseRightColumnLast={"phase-analyze":"llm-analyze","phase-finalization":"llm-finalization"},this.iterationColumnLast={},this.monitoringSubscription=this.session_DS.monitoringEvent_S.subscribe(n=>{n.sessionId===this.graphSessionId_$()&&this.applyMonitoringEvent(n.event)})}applyAgentEvent(e){let t=e.phase;if(typeof t!="string"||t.length===0||t===this.lastAppliedPhase)return;if(this.lastAppliedPhase=t,t===v.agenticLoopIteration){let r=N.extractIterationData(e);r&&this.addIteration(r);return}let n=N.computeStateTransitions(t);n.length!==0&&(this.applyStateTransitions(n),N.isTerminalPhase(t)&&this.markAllIterationNodesCompleted())}addIteration(e){let t=this.graphLayout_$();if(!t)return;this.currentIterationIndex=e.iterationIndex,this.markPreviousIterationCompleted(e.iterationIndex);let n=P.addIterationColumn(t,e.iterationIndex,e.actionType,{tool:e.tool,intent:e.intent}),r=e.actionType==="tool-select"?`iter-${e.iterationIndex}-tool-call`:`iter-${e.iterationIndex}-action`;this.iterationColumnLast[e.iterationIndex]=r;let s=`iter-${e.iterationIndex}-llm-decision`,a=this.setNodeState(n,s,x.active);this.activeNodeId_$.set(s),this.graphLayout_$.set(this.recalculateEdgePaths(a))}markPreviousIterationCompleted(e){if(e<=0)return;let t=this.graphLayout_$();if(!t)return;let n=`iter-${e-1}`,r=t;for(let s of t.nodes)s.id.startsWith(n)&&s.state!==x.error&&(r=this.setNodeState(r,s.id,x.completed));this.graphLayout_$.set(r)}applyMonitoringEvent(e){let t=this.graphLayout_$();if(!t)return;let n=typeof e.eventType=="string"?e.eventType:"",r=typeof e.status=="string"?e.status:"",s=i.toRecord(e.data),a=typeof e.durationMs=="number"?e.durationMs:0,h=typeof e.inputSize=="number"?e.inputSize:0,l=typeof e.outputSize=="number"?e.outputSize:0,c={eventType:n,timestamp:new Date,data:s,durationMs:a,status:r,sessionId:this.graphSessionId_$(),runId:this.graphRunId_$(),inputSize:h,outputSize:l};if(n==="llm-call"){this.handleLlmCallMonitoringEvent(c,t);return}if(this.currentIterationIndex<0)return;let _=N.mapMonitoringEventToIterationNodeId(c,this.currentIterationIndex);if(!_)return;let y=this.enrichNodeWithMonitoringEvent(t,_,c);y&&this.graphLayout_$.set(y)}handleLlmCallMonitoringEvent(e,t){let n=e.data?.callType,r=typeof n=="string"?n:"";if(!r)return;let s=N.getPreCreatedSkeletonNodeId(r);if(s){let h=this.enrichNodeWithMonitoringEvent(t,s,e);h&&this.graphLayout_$.set(h);return}if(N.isIterationLlmCall(r)&&this.currentIterationIndex>=0){let h=N.mapMonitoringEventToIterationNodeId(e,this.currentIterationIndex);if(h){if(t.nodes.findIndex(c=>c.id===h)>=0){let c=this.enrichNodeWithMonitoringEvent(t,h,e);c&&this.graphLayout_$.set(c)}else this.createDynamicIterationLlmNode(t,r,h,e);return}}let a=N.getLlmCallPhaseId(r);a&&this.createDynamicSkeletonLlmNode(t,r,a,e)}enrichNodeWithMonitoringEvent(e,t,n){let r=e.nodes.findIndex(_=>_.id===t);if(r<0)return null;let s=n.data??{},a=n.status==="error",h=n.durationMs??0,l=a?x.error:h>0?x.completed:x.active,c=[...e.nodes];return c[r]=w(I({},c[r]),{state:l,monitoringEvent:n,data:w(I(I({},c[r].data),s),{durationMs:h})}),this.activeNodeId_$.set(l===x.active?t:""),w(I({},e),{nodes:c})}createDynamicSkeletonLlmNode(e,t,n,r){this.dynamicNodeCounter++;let s=`llm-dyn-${this.dynamicNodeCounter}`,a=N.getLlmCallLabel(t),h=this.phaseRightColumnLast[n]??n,l=P.addDynamicLlmNode(e,h,s,a,n,null);this.phaseRightColumnLast[n]=s;let c=this.enrichNodeWithMonitoringEvent(l,s,r);this.graphLayout_$.set(c??l)}createDynamicIterationLlmNode(e,t,n,r){let s=N.getLlmCallLabel(t),a=this.iterationColumnLast[this.currentIterationIndex]??`iter-${this.currentIterationIndex}-action`,h=P.addDynamicLlmNode(e,a,n,s,"phase-execution",this.currentIterationIndex);this.iterationColumnLast[this.currentIterationIndex]=n;let l=this.enrichNodeWithMonitoringEvent(h,n,r);this.graphLayout_$.set(l??h)}loadHistoricalGraph(e,t){return ke(this,null,function*(){this.isLoading_$.set(!0);try{let n=yield this.monitoring_AS.getRunTrace({sessionId:e,runId:t});this.buildHistoricalGraph(n.trace)}catch{let n=P.buildSkeletonLayout();this.graphLayout_$.set(this.recalculateEdgePaths(n))}finally{this.isLoading_$.set(!1)}})}buildHistoricalGraph(e){let t=P.buildSkeletonLayout();t=this.recalculateEdgePaths(t);let n="",r=-1,s={"phase-analyze":"llm-analyze","phase-finalization":"llm-finalization"},a={},h=0;for(let l of e){let c=l.data??{},_=c.step,y=typeof _=="string"?_:"";if(y.length>0&&N.mapPhaseToNodeId(y)&&y!==n){n=y;let M=N.computeStateTransitions(y);for(let O of M)t=this.setNodeState(t,O.nodeId,O.state)}if(y==="agentic-loop-iteration"||y.includes("agentic-loop")){let T=c.action,M=typeof T=="string"?T:"",O=c.tool,E=typeof O=="string"?O:"";if(M.length>0){r++,t=P.addIterationColumn(t,r,M,{tool:E});let j=M==="tool-select"?`iter-${r}-tool-call`:`iter-${r}-action`;a[r]=j}}if(l.eventType==="llm-call"){let T=c.callType,M=typeof T=="string"?T:"";if(M){let O=N.getPreCreatedSkeletonNodeId(M);if(O)t=this.enrichHistoricalNode(t,O,l,c);else if(N.isIterationLlmCall(M)&&r>=0){let E=N.mapMonitoringEventToIterationNodeId(l,r);if(E)if(t.nodes.findIndex(K=>K.id===E)>=0)t=this.enrichHistoricalNode(t,E,l,c);else{let K=N.getLlmCallLabel(M),A=a[r]??`iter-${r}-action`;t=P.addDynamicLlmNode(t,A,E,K,"phase-execution",r),t=this.enrichHistoricalNode(t,E,l,c),a[r]=E}}else{let E=N.getLlmCallPhaseId(M);if(E){h++;let j=`llm-dyn-${h}`,K=N.getLlmCallLabel(M),A=s[E]??E;t=P.addDynamicLlmNode(t,A,j,K,E,null),t=this.enrichHistoricalNode(t,j,l,c),s[E]=j}}}continue}if(r>=0){let T=N.mapMonitoringEventToIterationNodeId(l,r);T&&(t=this.enrichHistoricalNode(t,T,l,c))}}if(n===v.runFlowComplete)for(let l of t.nodes)l.state===x.pending&&(t=this.setNodeState(t,l.id,x.completed));this.graphLayout_$.set(this.recalculateEdgePaths(t))}enrichHistoricalNode(e,t,n,r){let s=e.nodes.findIndex(h=>h.id===t);if(s<0)return e;let a=[...e.nodes];return a[s]=w(I({},a[s]),{state:n.status==="error"?x.error:x.completed,monitoringEvent:n,data:w(I(I({},a[s].data),r),{durationMs:n.durationMs})}),w(I({},e),{nodes:a})}applyStateTransitions(e){let t=this.graphLayout_$();if(!t)return;let n="";for(let r of e)t=this.setNodeState(t,r.nodeId,r.state),r.state===x.active&&(n=r.nodeId);this.activeNodeId_$.set(n),this.graphLayout_$.set(t)}setNodeState(e,t,n){let r=e.nodes.findIndex(a=>a.id===t);if(r<0)return e;let s=[...e.nodes];return s[r]=w(I({},s[r]),{state:n}),w(I({},e),{nodes:s})}markAllIterationNodesCompleted(){let e=this.graphLayout_$();if(!e)return;let t=e;for(let n of e.nodes)n.iterationIndex!=null&&n.state!==x.error&&(t=this.setNodeState(t,n.id,x.completed));this.graphLayout_$.set(t)}recalculateEdgePaths(e){let t=e.edges.map(n=>{let r=e.nodes.find(a=>a.id===n.sourceNodeId),s=e.nodes.find(a=>a.id===n.targetNodeId);return!r||!s?n:w(I({},n),{pathD:P.computeEdgePath(r,s,n.category)})});return w(I({},e),{edges:t})}resetState(){this.graphLayout_$.set(null),this.activeNodeId_$.set(""),this.selectedNodeId_$.set(""),this.currentIterationIndex=-1,this.lastAppliedPhase="",this.isLoading_$.set(!1),this.dynamicNodeCounter=0,this.phaseRightColumnLast={},this.iterationColumnLast={}}disposeSubscriptions(){this.monitoringSubscription&&(this.monitoringSubscription.unsubscribe(),this.monitoringSubscription=null)}static toRecord(e){return typeof e!="object"||e==null?{}:JSON.parse(JSON.stringify(e))}static \u0275fac=function(t){return new(t||i)};static \u0275prov=xe({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})();var ot=["appSesGraphNodeSvg",""];function rt(i,o){if(i&1&&(H(),p(0,"text",1),m(1),d()),i&2){let e=C();Y("x",10)("y",e.node().height/2+1),u(),L(e.icon_$())}}function at(i,o){if(i&1&&(H(),p(0,"text",3),m(1),d()),i&2){let e=C();Y("x",e.node().width-10)("y",12)("fill",e.node().state==="error"?"#ef4444":"#22c55e"),u(),L(e.stateIcon_$())}}function st(i,o){if(i&1&&(H(),p(0,"text",4),m(1),d()),i&2){let e=C();Y("x",e.node().width-8)("y",e.node().height-8),u(),_e("",e.durationMs_$(),"ms")}}var $e=class i{node=F.required();isHighlighted=F(!1);isSelected=F(!1);nodeClicked=ne();fillColor_$=g(()=>{let o=this.node();return o.state===x.pending?"#262626":i.CATEGORY_FILL_MAP[o.category]??"#262626"});strokeColor_$=g(()=>{let o=this.node();return o.state===x.error?"#ef4444":o.state===x.pending?"#525252":i.CATEGORY_STROKE_MAP[o.category]??"#737373"});strokeDashArray_$=g(()=>this.node().state===x.pending?"6 3":"none");textColor_$=g(()=>this.node().state===x.pending?"#737373":"#e5e5e5");opacity_$=g(()=>this.node().state===x.pending?.5:1);borderRadius_$=g(()=>this.node().category===f.action?16:8);icon_$=g(()=>{let o=this.node().category;return i.CATEGORY_ICON_MAP[o]??""});stateIcon_$=g(()=>{let o=this.node().state;return o===x.completed?"\u2713":o===x.error?"\u2715":""});animationClass_$=g(()=>this.node().state===x.active||this.isHighlighted()?"ses-graph-node--active":this.isSelected()?"ses-graph-node--selected":"");durationMs_$=g(()=>this.node().data.durationMs??0);handleClick(){this.nodeClicked.emit(this.node().id)}static CATEGORY_FILL_MAP={[f.phase]:"#1a1a2e",[f.milestone]:"#052e16",[f.llmCall]:"#1e1033",[f.toolCall]:"#2e2a05",[f.toolError]:"#2e1505",[f.loopIteration]:"#0a1628",[f.action]:"#1a1a2e",[f.error]:"#2e0505"};static CATEGORY_STROKE_MAP={[f.phase]:"#525252",[f.milestone]:"#22c55e",[f.llmCall]:"#a855f7",[f.toolCall]:"#eab308",[f.toolError]:"#f97316",[f.loopIteration]:"#3b82f6",[f.action]:"#3b82f6",[f.error]:"#ef4444"};static CATEGORY_ICON_MAP={[f.milestone]:"\u26A1",[f.llmCall]:"\u{1F9E0}",[f.toolCall]:"\u{1F527}",[f.toolError]:"\u26A0\uFE0F",[f.error]:"\u274C"};static \u0275fac=function(e){return new(e||i)};static \u0275cmp=ae({type:i,selectors:[["","appSesGraphNodeSvg",""]],inputs:{node:[1,"node"],isHighlighted:[1,"isHighlighted"],isSelected:[1,"isSelected"]},outputs:{nodeClicked:"nodeClicked"},standalone:!0,features:[le],attrs:ot,decls:7,vars:21,consts:[[2,"cursor","pointer",3,"click"],["dominant-baseline","central","text-anchor","start","font-size","14"],["dominant-baseline","central"],["text-anchor","end","dominant-baseline","central","font-size","11","font-weight","700"],["text-anchor","end","dominant-baseline","auto","fill","#737373","font-size","9"]],template:function(e,t){e&1&&(H(),p(0,"g",0),B("click",function(){return t.handleClick()}),W(1,"rect"),D(2,rt,2,3,":svg:text",1),p(3,"text",2),m(4),d(),D(5,at,2,4,":svg:text",3)(6,st,2,3,":svg:text",4),d()),e&2&&(se(t.animationClass_$()),Y("transform","translate("+t.node().x+","+t.node().y+")")("opacity",t.opacity_$()),u(),Y("width",t.node().width)("height",t.node().height)("rx",t.borderRadius_$())("fill",t.fillColor_$())("stroke",t.strokeColor_$())("stroke-width",t.isSelected()?2.5:1.5)("stroke-dasharray",t.strokeDashArray_$()),u(),S(t.icon_$()?2:-1),u(),Y("x",t.icon_$()?30:t.node().width/2)("y",t.node().height/2+1)("text-anchor",t.icon_$()?"start":"middle")("fill",t.textColor_$())("font-size",t.node().category==="phase"||t.node().category==="milestone"?14:12)("font-weight",t.node().category==="phase"||t.node().category==="milestone"?600:400),u(),L(t.node().label),u(),S(t.stateIcon_$()?5:-1),u(),S(t.durationMs_$()?6:-1))},dependencies:[de],encapsulation:2})};function lt(i,o){if(i&1&&(p(0,"div",7)(1,"span",8),m(2,"Phase"),d(),p(3,"span",9),m(4),d()()),i&2){let e=C();u(4),L(e.node().phase)}}function dt(i,o){if(i&1&&(p(0,"div",7)(1,"span",8),m(2,"Step"),d(),p(3,"span",9),m(4),d()()),i&2){let e=C();u(4),L(e.stepLabel_$())}}function ct(i,o){if(i&1&&(p(0,"div",7)(1,"span",8),m(2,"Duration"),d(),p(3,"span",9),m(4),d()()),i&2){let e=C();u(4),L(e.durationLabel_$())}}function pt(i,o){if(i&1&&(p(0,"div",7)(1,"span",8),m(2,"Tool"),d(),p(3,"span",12),m(4),d()()),i&2){let e=C();u(4),L(e.toolId_$())}}function ht(i,o){if(i&1&&(p(0,"div",10)(1,"span",13),m(2,"Intent"),d(),p(3,"span",14),m(4),d()()),i&2){let e=C();u(4),L(e.intent_$())}}function ut(i,o){if(i&1&&(p(0,"div",7)(1,"span",8),m(2,"Iteration"),d(),p(3,"span",15),m(4),d()()),i&2){let e=C();u(4),_e("#",e.node().iterationIndex,"")}}function mt(i,o){if(i&1&&(p(0,"span",13),m(1," In: "),p(2,"span",9),m(3),d()()),i&2){let e=C(2);u(3),L(e.inputSize_$())}}function _t(i,o){if(i&1&&(p(0,"span",13),m(1," Out: "),p(2,"span",9),m(3),d()()),i&2){let e=C(2);u(3),L(e.outputSize_$())}}function ft(i,o){if(i&1&&(p(0,"div",11),D(1,mt,4,1,"span",13)(2,_t,4,1,"span",13),d()),i&2){let e=C();u(),S(e.inputSize_$()>0?1:-1),u(),S(e.outputSize_$()>0?2:-1)}}function gt(i,o){if(i&1&&(p(0,"div",7)(1,"span",8),m(2,"Provider"),d(),p(3,"span",26),m(4),d()()),i&2){let e=C(3);u(4),L(e.usedProvider_$())}}function xt(i,o){if(i&1&&(p(0,"div",7)(1,"span",8),m(2,"Model"),d(),p(3,"span",26),m(4),d()()),i&2){let e=C(3);u(4),L(e.usedModel_$())}}function yt(i,o){if(i&1&&(p(0,"span",13),m(1," Cost: "),p(2,"span",27),m(3),d()()),i&2){let e=C(4);u(3),L(e.costUsd_$())}}function St(i,o){if(i&1&&(p(0,"div",25)(1,"span",13),m(2," Tokens: "),p(3,"span",9),m(4),d()(),D(5,yt,4,1,"span",13),d()),i&2){let e=C(3);u(4),L(e.tokenInfo_$().total),u(),S(e.costUsd_$()?5:-1)}}function Ct(i,o){if(i&1&&(p(0,"div",16)(1,"div",23),m(2,"Used"),d(),p(3,"div",24),D(4,gt,5,1,"div",7)(5,xt,5,1,"div",7)(6,St,6,2,"div",25),d()()),i&2){let e=C(2);u(4),S(e.usedProvider_$()?4:-1),u(),S(e.usedModel_$()?5:-1),u(),S(e.tokenInfo_$()?6:-1)}}function vt(i,o){if(i&1){let e=ie();p(0,"button",28),B("click",function(){R(e);let n=C(2);return z(n.handleClearOverride())}),m(1," Clear "),d()}}function It(i,o){i&1&&(p(0,"div",21),m(1," Session override active "),d())}function Et(i,o){if(i&1&&(p(0,"div",22)(1,"div",29),m(2,"Global default"),d(),p(3,"div",30),m(4),d()()),i&2){let e=C(2);u(4),ze(" ",e.globalDefault_$().provider," / ",e.globalDefault_$().model," ")}}function Nt(i,o){if(i&1){let e=ie();D(0,Ct,7,3,"div",16),p(1,"div",16)(2,"div",17)(3,"div",18),m(4),d(),D(5,vt,2,0,"button",19),d(),p(6,"app-s-registry-provider-model-select",20),B("modelChange",function(n){R(e);let r=C();return z(r.handleModelChange(n))}),d(),D(7,It,2,0,"div",21),d(),D(8,Et,5,2,"div",22)}if(i&2){let e=C();S(e.usedProvider_$()||e.usedModel_$()?0:-1),u(4),_e(" Override: ",e.callTypeLabel_$()," "),u(),S(e.hasSessionOverride_$()?5:-1),u(),me("selectedProvider",e.selectedProvider_$())("selectedModel",e.selectedModel_$()),u(),S(e.hasSessionOverride_$()?7:-1),u(),S(e.globalDefault_$()?8:-1)}}var Ke=(()=>{class i{graph_DS=Z(Ze);session_DS=Z(Ce);registrySsot_CS=Z(Be);node=F.required();closed=ne();stateLabel_$=g(()=>({pending:"Pending",active:"Active",completed:"Completed",error:"Error"})[this.node().state]??this.node().state);durationLabel_$=g(()=>{let e=this.node().data.durationMs;return!e||e<=0?"":e<1e3?`${Math.round(e)}ms`:`${(e/1e3).toFixed(1)}s`});toolId_$=g(()=>{let e=this.node().data,t=e.toolId??e.tool;return typeof t=="string"?t:""});intent_$=g(()=>{let e=this.node().data.intent;return typeof e=="string"?e:""});stepLabel_$=g(()=>{let e=this.node().data.step;return typeof e!="string"||e.length===0?"":ve.formatStepId(e)});inputSize_$=g(()=>{let e=this.node().monitoringEvent;return e?e.inputSize??0:0});outputSize_$=g(()=>{let e=this.node().monitoringEvent;return e?e.outputSize??0:0});stateColorClass_$=g(()=>({pending:"text-neutral-500",active:"text-cyan-400",completed:"text-green-400",error:"text-red-400"})[this.node().state]??"text-neutral-400");isLlmCall_$=g(()=>this.node().category===f.llmCall);callType_$=g(()=>{let e=this.node().data?.callType;return typeof e=="string"?e:""});callTypeLabel_$=g(()=>{let e=this.callType_$();return Ye[e]??e});usedProvider_$=g(()=>{let e=this.node().data?.provider;return typeof e=="string"?e:""});usedModel_$=g(()=>{let e=this.node().data?.model;return typeof e=="string"?e:""});sessionOverride_$=g(()=>{let e=this.callType_$();if(!e)return null;let t=this.graph_DS.graphSessionId_$();if(!t)return null;let r=this.session_DS.sessionInfoMap_$().get(t);if(!r)return null;let s=r.llmCallTypeOverrides;if(!s)return null;let a=s[e];if(typeof a!="object"||!a)return null;let h=a,l=h.provider,c=h.model;return typeof l=="string"&&typeof c=="string"?{provider:l,model:c}:null});globalDefault_$=g(()=>{let e=this.callType_$();if(!e)return null;let t=this.graph_DS.graphSessionId_$(),r=this.session_DS.sessionInfoMap_$().get(t);if(!r)return null;let s=r.globalCallTypeDefaults;if(!s)return null;let a=s[e];if(typeof a!="object"||!a)return null;let h=a,l=h.provider,c=h.model;return typeof l=="string"&&typeof c=="string"?{provider:l,model:c}:null});selectedProvider_$=g(()=>this.sessionOverride_$()?.provider??"");selectedModel_$=g(()=>this.sessionOverride_$()?.model??"");hasSessionOverride_$=g(()=>this.sessionOverride_$()!==null);tokenInfo_$=g(()=>{let e=this.node().data,t=e.promptTokens,n=e.completionTokens,r=e.totalTokens;return typeof r!="number"||r<=0?null:{prompt:typeof t=="number"?t:0,completion:typeof n=="number"?n:0,total:r}});costUsd_$=g(()=>{let e=this.node().data?.costUsd;return typeof e!="number"||e<=0?"":`$${e.toFixed(4)}`});handleClose(){this.closed.emit()}handleProviderChange(e){}handleModelChange(e){let t=this.callType_$(),n=this.graph_DS.graphSessionId_$();if(!t||!n||!e)return;let s=this.registrySsot_CS.enabledLlmModels_$().find(a=>a.modelName===e);s&&this.applySessionOverride(n,t,s.provider,s.modelName)}handleClearOverride(){let e=this.callType_$(),t=this.graph_DS.graphSessionId_$();!e||!t||this.clearSessionOverride(t,e)}applySessionOverride(e,t,n,r){let h=this.session_DS.sessionInfoMap_$().get(e)?.llmCallTypeOverrides??{},l=w(I({},h),{[t]:{provider:n,model:r}});this.session_DS.updateSession({sessionId:e,updates:{llmCallTypeOverrides:l}}).then(()=>{this.session_DS.loadSessionInfo(e)})}clearSessionOverride(e,t){let s=this.session_DS.sessionInfoMap_$().get(e)?.llmCallTypeOverrides??{},a=I({},s);Reflect.deleteProperty(a,t);let h=Object.keys(a).length>0;this.session_DS.updateSession({sessionId:e,updates:{llmCallTypeOverrides:h?a:null}}).then(()=>{this.session_DS.loadSessionInfo(e)})}static \u0275fac=function(t){return new(t||i)};static \u0275cmp=ae({type:i,selectors:[["app-ses-graph-node-detail"]],inputs:{node:[1,"node"]},outputs:{closed:"closed"},standalone:!0,features:[le],decls:26,vars:13,consts:[[1,"w-80","max-h-[28rem]","overflow-y-auto","rounded-lg","border","border-neonCyan/30","bg-neutral-900/95","shadow-lg","backdrop-blur-sm","p-3"],[1,"flex","items-start","justify-between","gap-2","mb-2"],[1,"text-sm","font-semibold","text-neutral-200","leading-tight"],["title","Bez\xE1r\xE1s","aria-label","Bez\xE1r\xE1s",1,"p-1","min-h-[28px]","min-w-[28px]","flex","items-center","justify-center","rounded","text-neutral-400","hover:text-neutral-200","hover:bg-neutral-700","transition-colors","shrink-0",3,"click"],["viewBox","0 0 24 24","fill","none","stroke","currentColor","stroke-width","2","stroke-linecap","round","stroke-linejoin","round",1,"w-3.5","h-3.5"],["d","M18 6L6 18M6 6l12 12"],[1,"space-y-1.5","text-xs"],[1,"flex","items-center","gap-2"],[1,"text-neutral-500","w-16","shrink-0"],[1,"text-neutral-300"],[1,"flex","flex-col","gap-0.5"],[1,"flex","items-center","gap-3","pt-1","border-t","border-neutral-800"],[1,"text-yellow-300","font-mono","text-[11px]"],[1,"text-neutral-500"],[1,"text-neutral-300","text-[11px]","leading-tight","break-words"],[1,"text-blue-400"],[1,"mt-3","pt-2","border-t","border-neutral-700"],[1,"flex","items-center","justify-between","mb-1.5"],[1,"text-[10px]","text-neutral-500","uppercase","tracking-wider"],[1,"text-[10px]","text-red-400","hover:text-red-300","transition-colors"],["registryKind","llm","providerLabel","Provider","modelLabel","Model",3,"modelChange","selectedProvider","selectedModel"],[1,"mt-1.5","text-[10px]","text-purple-400"],[1,"mt-2","pt-1.5","border-t","border-neutral-800"],[1,"text-[10px]","text-neutral-500","uppercase","tracking-wider","mb-1.5"],[1,"space-y-1","text-xs"],[1,"flex","items-center","gap-3"],[1,"text-purple-300","font-mono","text-[11px]"],[1,"text-green-400"],[1,"text-[10px]","text-red-400","hover:text-red-300","transition-colors",3,"click"],[1,"text-[10px]","text-neutral-500","uppercase","tracking-wider","mb-1"],[1,"text-[11px]","text-neutral-400","font-mono"]],template:function(t,n){t&1&&(p(0,"div",0)(1,"div",1)(2,"h3",2),m(3),d(),p(4,"button",3),B("click",function(){return n.handleClose()}),H(),p(5,"svg",4),W(6,"path",5),d()()(),ye(),p(7,"div",6)(8,"div",7)(9,"span",8),m(10,"State"),d(),p(11,"span"),m(12),d()(),p(13,"div",7)(14,"span",8),m(15,"Type"),d(),p(16,"span",9),m(17),d()(),D(18,lt,5,1,"div",7)(19,dt,5,1,"div",7)(20,ct,5,1,"div",7)(21,pt,5,1,"div",7)(22,ht,5,1,"div",10)(23,ut,5,1,"div",7)(24,ft,3,2,"div",11),d(),D(25,Nt,9,7),d()),t&2&&(u(3),L(n.node().label),u(8),se(n.stateColorClass_$()+" font-medium"),u(),L(n.stateLabel_$()),u(5),L(n.node().category),u(),S(n.node().phase?18:-1),u(),S(n.stepLabel_$()?19:-1),u(),S(n.durationLabel_$()?20:-1),u(),S(n.toolId_$()?21:-1),u(),S(n.intent_$()?22:-1),u(),S(n.node().iterationIndex!==null?23:-1),u(),S(n.inputSize_$()>0||n.outputSize_$()>0?24:-1),u(),S(n.isLlmCall_$()&&n.callType_$()?25:-1))},dependencies:[de,Fe],encapsulation:2})}return i})();var $t=["graphSvg"],Qe=(i,o)=>o.id;function bt(i,o){i&1&&(p(0,"span",7),m(1,"Loading trace..."),d())}function Lt(i,o){if(i&1&&(H(),W(0,"rect",16)),i&2){let e=o;Y("x",e.x)("y",e.y)("width",e.width)("height",e.height)}}function wt(i,o){if(i&1&&(H(),W(0,"path",17)),i&2){let e=o.$implicit;Y("d",e.pathD)("stroke",e.strokeColor)("stroke-dasharray",e.strokeDashArray)("marker-end",e.markerEnd)}}function Tt(i,o){if(i&1){let e=ie();H(),p(0,"g",20),B("nodeClicked",function(n){R(e);let r=C();return z(r.handleNodeClick(n))}),d()}if(i&2){let e=o.$implicit,t=C();me("node",e)("isHighlighted",t.activeNodeId()===e.id)("isSelected",t.selectedNodeId()===e.id)}}function Mt(i,o){if(i&1){let e=ie();p(0,"app-ses-graph-node-detail",21),B("closed",function(){R(e);let n=C();return z(n.handleDetailClose())}),d()}i&2&&me("node",o)}var Gn=(()=>{class i{svgRef;layout=F(null);activeNodeId=F("");selectedNodeId=F("");isLoading=F(!1);nodeClicked=ne();detailClosed=ne();viewBox_$=V({x:0,y:0,width:800,height:600});viewBoxStr_$=g(()=>{let e=this.viewBox_$();return`${e.x} ${e.y} ${e.width} ${e.height}`});isFollowActive_$=V(!0);isPanning=!1;panStartX=0;panStartY=0;panStartViewBoxX=0;panStartViewBoxY=0;nodes_$=g(()=>this.layout()?.nodes??[]);edges_$=g(()=>this.layout()?.edges??[]);loopBounds_$=g(()=>this.layout()?.loopContainerBounds??null);selectedNode_$=g(()=>{let e=this.selectedNodeId();return e?this.nodes_$().find(t=>t.id===e)??null:null});constructor(){Se(()=>{let e=this.layout();e&&this.viewBox_$.set(I({},e.viewBox))},{allowSignalWrites:!0})}handleNodeClick(e){this.nodeClicked.emit(e)}handleDetailClose(){this.detailClosed.emit()}handlePointerDown(e){if(e.button!==0)return;this.isPanning=!0,this.panStartX=e.clientX,this.panStartY=e.clientY;let t=this.viewBox_$();this.panStartViewBoxX=t.x,this.panStartViewBoxY=t.y,this.svgRef&&this.svgRef.nativeElement.setPointerCapture(e.pointerId)}handlePointerMove(e){if(!this.isPanning||!this.svgRef)return;let t=this.svgRef.nativeElement,n=this.viewBox_$(),r=n.width/t.clientWidth,s=n.height/t.clientHeight,a=(e.clientX-this.panStartX)*r,h=(e.clientY-this.panStartY)*s;this.viewBox_$.set(w(I({},n),{x:this.panStartViewBoxX-a,y:this.panStartViewBoxY-h}))}handlePointerUp(){this.isPanning=!1}handleWheel(e){if(e.preventDefault(),!this.svgRef)return;let t=this.svgRef.nativeElement,n=this.viewBox_$(),r=e.deltaY>0?1.1:.9,s=t.getBoundingClientRect(),a=(e.clientX-s.left)/s.width,h=(e.clientY-s.top)/s.height,l=n.width*r,c=n.height*r;if(l<200||l>5e3)return;let _=n.x+(n.width-l)*a,y=n.y+(n.height-c)*h;this.viewBox_$.set({x:_,y,width:l,height:c})}handleFitToView(){let e=this.nodes_$();if(e.length===0)return;let t=P.recalculateViewBox(e,48);this.viewBox_$.set(t)}handleToggleFollowActive(){this.isFollowActive_$.update(e=>!e)}static \u0275fac=function(t){return new(t||i)};static \u0275cmp=ae({type:i,selectors:[["app-ses-graph-view"]],viewQuery:function(t,n){if(t&1&&Ge($t,5),t&2){let r;Oe(r=Re())&&(n.svgRef=r.first)}},inputs:{layout:[1,"layout"],activeNodeId:[1,"activeNodeId"],selectedNodeId:[1,"selectedNodeId"],isLoading:[1,"isLoading"]},outputs:{nodeClicked:"nodeClicked",detailClosed:"detailClosed"},standalone:!0,features:[le],decls:25,vars:6,consts:[["graphSvg",""],[1,"flex","flex-col","h-full","w-full","overflow-hidden"],[1,"flex","items-center","gap-2","px-3","py-2","border-b","border-neutral-800","shrink-0","bg-neutral-900/80"],["title","Fit to view",1,"px-2","py-1","text-xs","border","rounded","transition-colors","border-neutral-700","text-neutral-400","hover:text-neutral-200","hover:border-neutral-500",3,"click"],["viewBox","0 0 24 24","fill","none","stroke","currentColor","stroke-width","2","stroke-linecap","round","stroke-linejoin","round",1,"w-3.5","h-3.5","inline-block","mr-1"],["d","M15 3h6v6M9 21H3v-6M21 3l-7 7M3 21l7-7"],["title","Follow active node",1,"px-2","py-1","text-xs","border","rounded","transition-colors",3,"click"],[1,"text-xs","text-neutral-500","ml-auto"],[1,"flex-1","min-h-0","relative"],["preserveAspectRatio","xMidYMid meet",1,"ses-graph-svg",3,"pointerdown","pointermove","pointerup","pointerleave","wheel"],["id","ses-arrow-seq","markerWidth","8","markerHeight","6","refX","8","refY","3","orient","auto","markerUnits","strokeWidth"],["d","M 0 0 L 8 3 L 0 6 Z","fill","#525252"],["id","ses-arrow-loop","markerWidth","8","markerHeight","6","refX","8","refY","3","orient","auto","markerUnits","strokeWidth"],["d","M 0 0 L 8 3 L 0 6 Z","fill","#3b82f6"],["id","ses-arrow-error","markerWidth","8","markerHeight","6","refX","8","refY","3","orient","auto","markerUnits","strokeWidth"],["d","M 0 0 L 8 3 L 0 6 Z","fill","#f97316"],["rx","6","fill","#0f172a","stroke","#1e3a5f","stroke-width","1","stroke-dasharray","4 2","opacity","0.5"],["stroke-width","1.5","fill","none"],["appSesGraphNodeSvg","",3,"node","isHighlighted","isSelected"],[1,"absolute","top-2","right-2","z-10",3,"node"],["appSesGraphNodeSvg","",3,"nodeClicked","node","isHighlighted","isSelected"],[1,"absolute","top-2","right-2","z-10",3,"closed","node"]],template:function(t,n){if(t&1){let r=ie();p(0,"div",1)(1,"div",2)(2,"button",3),B("click",function(){return R(r),z(n.handleFitToView())}),H(),p(3,"svg",4),W(4,"path",5),d(),m(5," Fit "),d(),ye(),p(6,"button",6),B("click",function(){return R(r),z(n.handleToggleFollowActive())}),m(7," Follow "),d(),D(8,bt,2,0,"span",7),d(),p(9,"div",8),H(),p(10,"svg",9,0),B("pointerdown",function(a){return R(r),z(n.handlePointerDown(a))})("pointermove",function(a){return R(r),z(n.handlePointerMove(a))})("pointerup",function(){return R(r),z(n.handlePointerUp())})("pointerleave",function(){return R(r),z(n.handlePointerUp())})("wheel",function(a){return R(r),z(n.handleWheel(a))}),p(12,"defs")(13,"marker",10),W(14,"path",11),d(),p(15,"marker",12),W(16,"path",13),d(),p(17,"marker",14),W(18,"path",15),d()(),D(19,Lt,1,4,":svg:rect",16),Le(20,wt,1,4,":svg:path",17,Qe),Le(22,Tt,1,3,":svg:g",18,Qe),d(),D(24,Mt,1,1,"app-ses-graph-node-detail",19),d()()}if(t&2){let r,s;u(6),se(n.isFollowActive_$()?"border-neonCyan/50 text-neonCyan bg-neonCyan/10":"border-neutral-700 text-neutral-400 hover:text-neutral-200 hover:border-neutral-500"),u(2),S(n.isLoading()?8:-1),u(2),Y("viewBox",n.viewBoxStr_$()),u(9),S((r=n.loopBounds_$())?19:-1,r),u(),we(n.edges_$()),u(2),we(n.nodes_$()),u(2),S((s=n.selectedNode_$())?24:-1,s)}},dependencies:[de,$e,Ke],styles:[`@charset "UTF-8";@keyframes _ngcontent-%COMP%_ses-graph-node-pulse{0%,to{filter:drop-shadow(0 0 4px var(--ses-graph-pulse-color, #22d3ee))}50%{filter:drop-shadow(0 0 12px var(--ses-graph-pulse-color, #22d3ee))}}[_nghost-%COMP%]{display:block;width:100%;height:100%;position:relative}.ses-graph-svg[_ngcontent-%COMP%]{width:100%;height:100%;background:#0a0a0a;-webkit-user-select:none;user-select:none} .ses-graph-node--active{animation:_ngcontent-%COMP%_ses-graph-node-pulse 1.5s ease-in-out infinite} .ses-graph-node--active rect{stroke-width:2.5} .ses-graph-node--selected{filter:drop-shadow(0 0 6px rgba(34,211,238,.4))}
1
+ import{c as Ce}from"./chunk-4LUVD2AP.js";import{b as Ye}from"./chunk-COVCHZOZ.js";import{a as v}from"./chunk-UFBTR2BG.js";import{h as Be,i as Fe}from"./chunk-VPWEWXFD.js";import{I as Ve}from"./chunk-BV6QDXRW.js";import{Aa as Oe,Ba as Re,C as Z,D as ae,Fa as m,Ga as L,Ha as _e,Ia as ze,J as R,K as z,L as H,M as ye,P as Pe,T as ne,Ta as le,U as F,Z as u,a as I,aa as V,b as w,da as D,fa as Y,ga as me,hb as g,ja as se,jb as Se,k as ke,la as S,oa as Le,p as be,pa as we,qa as p,ra as d,sa as W,ua as ie,ub as de,va as B,wa as C,xb as He,y as xe,za as Ge}from"./chunk-TBMJSIBB.js";var ve=class i{static getEmoji(o){let e=o.data??{},t=typeof e.step=="string"?e.step:"";return t==="run-initialization"?"\u{1F680}":t==="run-flow-complete"?"\u{1F3AF}":t==="tool-error-retry"?"\u26A0\uFE0F\u{1F9E0}":t.includes("tool-error")||t.includes("error-recovery")?"\u{1F527}\u274C":t.includes("agentic-loop-iteration")?"":o.eventType==="tool-call"||typeof e.toolId=="string"?"\u{1F527}":o.eventType==="llm-call"||typeof e.callType=="string"?"\u{1F9E0}":o.eventType==="error"?"\u26A0\uFE0F":""}static getBubbleClasses(o){let e=o.data??{},t=typeof e.step=="string"?e.step:"";return t==="run-initialization"||t==="run-flow-complete"?"bg-green-500/10 text-green-300 border border-green-500/50":t==="tool-error-retry"||t.includes("tool-error")||t.includes("error-recovery")?"bg-orange-500/10 text-orange-300 border border-orange-500/50":o.eventType==="error"||t.includes("circuit-breaker")?"bg-red-500/10 text-red-300 border border-red-500/50":t.includes("agentic-loop")?"bg-blue-500/10 text-blue-300 border border-blue-500/50":o.eventType==="tool-call"||typeof e.toolId=="string"?"bg-yellow-500/10 text-yellow-300 border border-yellow-500/50":o.eventType==="llm-call"||typeof e.callType=="string"?"bg-purple-500/10 text-purple-300 border border-purple-500/50":"bg-neutral-700 text-neutral-200 border border-neonCyan"}static getStepLabel(o){let e=o.data??{},t=e.step,n=e.toolId;if(typeof t=="string"&&t.length>0)return i.formatStepId(t);if(o.eventType==="tool-call"&&typeof n=="string"&&n.length>0)return`Eszk\xF6z: ${n}`;if(o.eventType==="llm-call"){let r=e.callType;return typeof r=="string"?`LLM: ${i.formatStepId(r)}`:"LLM h\xEDv\xE1s"}if(o.eventType==="error"){let r=e.message;return typeof r=="string"&&r.length>0?`Hiba: ${r.substring(0,40)}${r.length>40?"\u2026":""}`:"Hiba"}return o.eventType==="compacting"?typeof t=="string"&&t.length>0?i.formatStepId(t):"Compacting":i.formatEventTypeFallback(o.eventType)}static formatStepId(o){return o.split("-").map(e=>e.length>0?e.charAt(0).toUpperCase()+e.slice(1).toLowerCase():e).join(" ")}static getDotClasses(o){let e=o.data??{},t=typeof e.step=="string"?e.step:"";return t==="run-initialization"||t==="run-flow-complete"?"bg-green-400":t==="tool-error-retry"||t.includes("tool-error")||t.includes("error-recovery")?"bg-orange-400":o.eventType==="error"||t.includes("circuit-breaker")?"bg-red-400":t.includes("agentic-loop")?"bg-blue-400":o.eventType==="tool-call"||typeof e.toolId=="string"?"bg-yellow-400":o.eventType==="llm-call"||typeof e.callType=="string"?"bg-purple-400":"bg-neutral-400"}static formatEventTypeFallback(o){return{step:"L\xE9p\xE9s","tool-call":"Eszk\xF6zh\xEDv\xE1s","context-update":"Kontextus friss\xEDt\xE9s",compacting:"Compacting","llm-call":"LLM h\xEDv\xE1s","session-event":"Session event",error:"Hiba"}[o]??o}};var x=function(i){return i.pending="pending",i.active="active",i.completed="completed",i.error="error",i}(x||{});var tt={[v.runInitialization]:"milestone-init",[v.analyze]:"phase-analyze",[v.analyzeResult]:"llm-analyze",[v.assemble]:"phase-assemble",[v.execution]:"phase-execution",[v.executionStart]:"phase-execution",[v.finalization]:"phase-finalization",[v.llmRunFinalization]:"llm-finalization",[v.postFinalization]:"phase-finalization",[v.runFlowComplete]:"milestone-complete"},nt=["milestone-init","phase-analyze","llm-analyze","phase-assemble","phase-execution","phase-finalization","llm-finalization","milestone-complete"],N=class i{static mapPhaseToNodeId(o){return tt[o]??null}static computeStateTransitions(o){let e=i.mapPhaseToNodeId(o);if(!e)return[];let t=[],n=!1;for(let r of nt)r===e?(t.push({nodeId:r,state:x.active}),n=!0):n||t.push({nodeId:r,state:x.completed});return t}static extractIterationData(o){let e=o.action;if(typeof e!="string")return null;let t=o.tool,n=typeof t=="string"?t:"",r=o.intent,s=typeof r=="string"?r:"",a=o.iterationCount;return{actionType:e,tool:n,intent:s,iterationIndex:typeof a=="number"?a:0}}static mapMonitoringEventToIterationNodeId(o,e){let t=o.data??{},n=t.step,r=typeof n=="string"?n:"",s=`iter-${e}`;if(o.eventType==="llm-call"){let a=t.callType;if(a==="agentic-loop")return`${s}-llm-decision`;if(a==="tool-description")return`${s}-tool-desc`;if(a==="tool-error-retry")return`${s}-tool-error-retry`;if(a==="tool-result-chunking")return`${s}-tool-chunking`;if(a==="goal-state-update")return`${s}-goal-update`}return o.eventType==="tool-call"?`${s}-tool-call`:o.eventType==="error"||r.includes("tool-error")?`${s}-tool-call`:null}static isTerminalPhase(o){return o===v.runFlowComplete}static SKELETON_LLM_NODE_MAP={analyze:"llm-analyze","run-finalization":"llm-finalization"};static LLM_CALL_PHASE_MAP={analyze:"phase-analyze","subanalyze-run-tasks":"phase-analyze","instant-reply":"phase-execution","run-finalization":"phase-finalization","chat-history-compacting":"phase-execution","execution-history-compacting":"phase-execution","soul-compacting":"phase-execution","context-compacting":"phase-execution","message-interceptor":"phase-execution"};static ITERATION_LLM_CALL_TYPES=new Set(["agentic-loop","tool-description","tool-error-retry","tool-result-chunking","goal-state-update"]);static LLM_CALL_LABEL_MAP={analyze:"LLM: Analyze","subanalyze-run-tasks":"LLM: Subanalyze","instant-reply":"LLM: Instant Reply","agentic-loop":"LLM Decision","tool-description":"Tool Description","tool-error-retry":"LLM: Error Retry","run-finalization":"LLM: Summary","chat-history-compacting":"LLM: Compact Chat","execution-history-compacting":"LLM: Compact Exec","soul-compacting":"LLM: Compact Soul","context-compacting":"LLM: Compact Ctx","tool-result-chunking":"LLM: Chunking","goal-state-update":"LLM: Goal Update","message-interceptor":"LLM: Msg Intercept"};static getPreCreatedSkeletonNodeId(o){return i.SKELETON_LLM_NODE_MAP[o]??null}static getLlmCallPhaseId(o){return i.LLM_CALL_PHASE_MAP[o]??null}static isIterationLlmCall(o){return i.ITERATION_LLM_CALL_TYPES.has(o)}static getLlmCallLabel(o){return i.LLM_CALL_LABEL_MAP[o]??`LLM: ${o}`}};var k=function(i){return i.sequential="sequential",i.loopEntry="loop-entry",i.errorRetry="error-retry",i}(k||{});var f=function(i){return i.phase="phase",i.milestone="milestone",i.llmCall="llm-call",i.toolCall="tool-call",i.toolError="tool-error",i.loopIteration="loop-iteration",i.action="action",i.error="error",i}(f||{});var je="milestone-init",Ee="phase-analyze",it="llm-analyze",Me="phase-assemble",ee="phase-execution",he="phase-finalization",Ae="llm-finalization",De="milestone-complete",P=class i{static buildSkeletonLayout(){let o=48+220/2,e=48,t=[],n=[],r=i.createNode({id:je,category:f.milestone,label:"Initialization",phase:v.runInitialization,x:o-200/2,y:e,width:200,height:48});t.push(r),e+=84;let s=i.createNode({id:Ee,category:f.phase,label:"Analyze",phase:v.analyze,x:o-220/2,y:e,width:220,height:60});t.push(s);let a=i.createNode({id:it,category:f.llmCall,label:"LLM: Analyze",phase:v.analyzeResult,x:o+220/2+28,y:e+16/2,width:160,height:44,parentId:Ee});t.push(a),n.push(i.createEdge(je,Ee,k.sequential)),e+=96;let h=i.createNode({id:Me,category:f.phase,label:"Assemble",phase:v.assemble,x:o-220/2,y:e,width:220,height:60});t.push(h),n.push(i.createEdge(Ee,Me,k.sequential)),e+=96;let l=i.createNode({id:ee,category:f.phase,label:"Execution",phase:v.execution,x:o-220/2,y:e,width:220,height:60});t.push(l),n.push(i.createEdge(Me,ee,k.sequential)),e+=96;let c=i.createNode({id:he,category:f.phase,label:"Finalization",phase:v.finalization,x:o-220/2,y:e,width:220,height:60});t.push(c);let _=i.createNode({id:Ae,category:f.llmCall,label:"LLM: Summary",phase:v.llmRunFinalization,x:o+220/2+28,y:e+16/2,width:160,height:44,parentId:he});t.push(_),n.push(i.createEdge(ee,he,k.sequential)),e+=96;let y=i.createNode({id:De,category:f.milestone,label:"Flow Complete",phase:v.runFlowComplete,x:o-200/2,y:e,width:200,height:48});t.push(y),n.push(i.createEdge(he,De,k.sequential));let T=i.recalculateViewBox(t,48);return{nodes:t,edges:n,viewBox:T,loopContainerBounds:null}}static addIterationColumn(o,e,t,n){let r=o.nodes.map(b=>I({},b)),s=[...o.edges],a=r.find(b=>b.id===ee);if(!a)return o;let h=a.x+20+e*208,l=a.y+60+20,c=`iter-${e}`,_=l,y=[],T=i.createNode({id:`${c}-llm-decision`,category:f.llmCall,label:"LLM Decision",phase:v.llmAgenticLoop,x:h,y:_,width:160,height:44,parentId:ee,iterationIndex:e});y.push(T),_+=68;let M=i.formatActionLabel(t),O=i.createNode({id:`${c}-action`,category:f.action,label:M,phase:v.agenticLoopIteration,x:h+20/2,y:_,width:140,height:32,parentId:ee,iterationIndex:e,data:n});if(y.push(O),_+=56,t==="tool-select"){let b=i.createNode({id:`${c}-tool-desc`,category:f.llmCall,label:"Tool Description",phase:v.llmToolDescription,x:h,y:_,width:160,height:44,parentId:ee,iterationIndex:e});y.push(b),_+=68;let q=n.tool,Q=typeof q=="string"?q:"tool",te=i.createNode({id:`${c}-tool-call`,category:f.toolCall,label:Q,phase:null,x:h,y:_,width:160,height:44,parentId:ee,iterationIndex:e,data:n});y.push(te),_+=68}for(let b=0;b<y.length-1;b++)s.push(i.createEdge(y[b].id,y[b+1].id,k.sequential));r.push(...y);let E=20*2+(e+1)*180+e*28,j=60+20*2+(_-l);a.width=Math.max(a.width,E),a.height=Math.max(a.height,j);let K=a.y+a.height,A=[he,Ae,De],ue=K+36;for(let b of A){let q=r.find(Q=>Q.id===b);if(q){if(b===Ae){let Q=r.find(te=>te.id===he);Q&&(q.y=Q.y+16/2);continue}q.y=ue,ue+=q.height+36}}let ge={x:a.x,y:a.y+60,width:a.width,height:a.height-60},J=r,Je=s.map(b=>{let q=J.find(te=>te.id===b.sourceNodeId),Q=J.find(te=>te.id===b.targetNodeId);return!q||!Q?b:w(I({},b),{pathD:i.computeEdgePath(q,Q,b.category)})}),et=i.recalculateViewBox(J,48);return{nodes:J,edges:Je,viewBox:et,loopContainerBounds:ge}}static computeEdgePath(o,e,t){let n=o.x+o.width/2,r=o.y+o.height,s=e.x+e.width/2,a=e.y;if(Math.abs(n-s)<20)return`M ${n} ${r} L ${s} ${a}`;let h=o.x+o.width,l=o.y+o.height/2,c=e.x,_=e.y+e.height/2;if(e.parentId===o.id)return`M ${h} ${l} L ${c} ${_}`;let y=r+(a-r)/2;return`M ${n} ${r} L ${n} ${y} L ${s} ${y} L ${s} ${a}`}static recalculateViewBox(o,e){if(o.length===0)return{x:0,y:0,width:600,height:400};let t=1/0,n=1/0,r=-1/0,s=-1/0;for(let a of o)t=Math.min(t,a.x),n=Math.min(n,a.y),r=Math.max(r,a.x+a.width),s=Math.max(s,a.y+a.height);return{x:t-e,y:n-e,width:r-t+e*2,height:s-n+e*2}}static addDynamicLlmNode(o,e,t,n,r,s){let a=o.nodes.map(A=>I({},A)),h=[...o.edges],l=a.find(A=>A.id===e);if(!l)return o;let c,_;l.category===f.phase||l.category===f.milestone?(c=l.x+l.width+28,_=l.y+(l.height-44)/2):(c=l.x,_=l.y+l.height+24);let T=i.createNode({id:t,category:f.llmCall,label:n,phase:null,x:c,y:_,width:160,height:44,parentId:r,iterationIndex:s??void 0});a.push(T),h.push(i.createEdge(e,t,k.sequential));let M=T.y+T.height;s!=null?i.expandExecutionContainer(a,M):i.shiftDownstreamIfOverlap(a,r,M);let O=o.loopContainerBounds,E=a.find(A=>A.id==="phase-execution");E&&E.height>60&&(O={x:E.x,y:E.y+60,width:E.width,height:E.height-60});let j=h.map(A=>{let ue=a.find(J=>J.id===A.sourceNodeId),ge=a.find(J=>J.id===A.targetNodeId);return!ue||!ge?A:w(I({},A),{pathD:i.computeEdgePath(ue,ge,A.category)})}),K=i.recalculateViewBox(a,48);return{nodes:a,edges:j,viewBox:K,loopContainerBounds:O}}static expandExecutionContainer(o,e){let t=o.find(l=>l.id==="phase-execution");if(!t)return;let n=t.y+60+20,r=60+20*2+(e+24-n);if(r<=t.height)return;t.height=r;let s=t.y+t.height,a=["phase-finalization","llm-finalization","milestone-complete"],h=s+36;for(let l of a){let c=o.find(_=>_.id===l);if(c){if(l==="llm-finalization"){let _=o.find(y=>y.id==="phase-finalization");_&&(c.y=_.y+16/2);continue}c.y<h&&(c.y=h),h=c.y+c.height+36}}for(let l of o)if(l.parentId==="phase-finalization"&&l.id!=="llm-finalization"&&l.category===f.llmCall){let c=o.find(_=>_.id==="phase-finalization");c&&(l.y=Math.max(l.y,c.y))}}static shiftDownstreamIfOverlap(o,e,t){let n=["milestone-init","phase-analyze","phase-assemble","phase-execution","phase-finalization","milestone-complete"],r=n.indexOf(e);if(r<0||r>=n.length-1)return;let s=n[r+1],a=o.find(_=>_.id===s);if(!a||t+36<=a.y)return;let h=t+36-a.y,l=new Set;for(let _ of o)_.parentId===e&&_.category===f.llmCall&&l.add(_.id);let c=a.y;for(let _ of o)_.y>=c&&!l.has(_.id)&&(_.y+=h)}static createNode(o){return{id:o.id,category:o.category,state:x.pending,label:o.label,phase:o.phase,x:o.x,y:o.y,width:o.width,height:o.height,data:o.data??{},iterationIndex:o.iterationIndex??null,parentId:o.parentId??null,monitoringEvent:null}}static createEdge(o,e,t){let n=t===k.errorRetry?"#f97316":t===k.loopEntry?"#3b82f6":"#525252",r=t===k.loopEntry?"8 4":t===k.errorRetry?"6 3":"none",s=t===k.errorRetry?"url(#ses-arrow-error)":t===k.loopEntry?"url(#ses-arrow-loop)":"url(#ses-arrow-seq)";return{id:`edge-${o}-${e}`,category:t,sourceNodeId:o,targetNodeId:e,pathD:"",strokeColor:n,strokeDashArray:r,markerEnd:s}}static formatActionLabel(o){return{"tool-select":"Tool Select","tool-group-open":"Tool Group","context-handling":"Context","loop-debrief":"Debrief",result:"Result"}[o]??o}};var qe=(()=>{class i{baseUrl=`${Ve.api.baseUrl}/session`;http=Z(He);getEvents(e){let t=encodeURIComponent(e.trim());return be(this.http.get(`${this.baseUrl}/${t}/events`))}getRunTrace(e){let t=e.sessionId.trim(),n=encodeURIComponent(e.runId.trim());return be(this.http.get(`${this.baseUrl}/${encodeURIComponent(t)}/runs/${n}/trace`))}static \u0275fac=function(t){return new(t||i)};static \u0275prov=xe({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})();var Ze=(()=>{class i{session_DS=Z(Ce);monitoring_AS=Z(qe);destroyRef=Z(Pe);graphLayout_$=V(null);activeNodeId_$=V("");selectedNodeId_$=V("");isLive_$=V(!1);isGraphOpen_$=V(!1);graphSessionId_$=V("");graphRunId_$=V("");isLoading_$=V(!1);currentIterationIndex=-1;monitoringSubscription=null;lastAppliedPhase="";phaseRightColumnLast={};iterationColumnLast={};dynamicNodeCounter=0;constructor(){Se(()=>{let e=this.session_DS.agentEvents_$();!this.isGraphOpen_$()||!this.isLive_$()||this.applyAgentEvent(e)},{allowSignalWrites:!0}),this.destroyRef.onDestroy(()=>{this.disposeSubscriptions()})}openGraphForRun(e,t,n){this.disposeSubscriptions(),this.resetState(),this.graphSessionId_$.set(e),this.graphRunId_$.set(t),this.isLive_$.set(n),this.isGraphOpen_$.set(!0),n?this.initLiveGraph():this.loadHistoricalGraph(e,t)}closeGraph(){this.disposeSubscriptions(),this.isGraphOpen_$.set(!1),this.selectedNodeId_$.set("")}selectNode(e){let t=this.selectedNodeId_$();this.selectedNodeId_$.set(t===e?"":e)}clearSelection(){this.selectedNodeId_$.set("")}initLiveGraph(){let e=P.buildSkeletonLayout(),t=this.recalculateEdgePaths(e);this.graphLayout_$.set(t),this.phaseRightColumnLast={"phase-analyze":"llm-analyze","phase-finalization":"llm-finalization"},this.iterationColumnLast={},this.monitoringSubscription=this.session_DS.monitoringEvent_S.subscribe(n=>{n.sessionId===this.graphSessionId_$()&&this.applyMonitoringEvent(n.event)})}applyAgentEvent(e){let t=e.phase;if(typeof t!="string"||t.length===0||t===this.lastAppliedPhase)return;if(this.lastAppliedPhase=t,t===v.agenticLoopIteration){let r=N.extractIterationData(e);r&&this.addIteration(r);return}let n=N.computeStateTransitions(t);n.length!==0&&(this.applyStateTransitions(n),N.isTerminalPhase(t)&&this.markAllIterationNodesCompleted())}addIteration(e){let t=this.graphLayout_$();if(!t)return;this.currentIterationIndex=e.iterationIndex,this.markPreviousIterationCompleted(e.iterationIndex);let n=P.addIterationColumn(t,e.iterationIndex,e.actionType,{tool:e.tool,intent:e.intent}),r=e.actionType==="tool-select"?`iter-${e.iterationIndex}-tool-call`:`iter-${e.iterationIndex}-action`;this.iterationColumnLast[e.iterationIndex]=r;let s=`iter-${e.iterationIndex}-llm-decision`,a=this.setNodeState(n,s,x.active);this.activeNodeId_$.set(s),this.graphLayout_$.set(this.recalculateEdgePaths(a))}markPreviousIterationCompleted(e){if(e<=0)return;let t=this.graphLayout_$();if(!t)return;let n=`iter-${e-1}`,r=t;for(let s of t.nodes)s.id.startsWith(n)&&s.state!==x.error&&(r=this.setNodeState(r,s.id,x.completed));this.graphLayout_$.set(r)}applyMonitoringEvent(e){let t=this.graphLayout_$();if(!t)return;let n=typeof e.eventType=="string"?e.eventType:"",r=typeof e.status=="string"?e.status:"",s=i.toRecord(e.data),a=typeof e.durationMs=="number"?e.durationMs:0,h=typeof e.inputSize=="number"?e.inputSize:0,l=typeof e.outputSize=="number"?e.outputSize:0,c={eventType:n,timestamp:new Date,data:s,durationMs:a,status:r,sessionId:this.graphSessionId_$(),runId:this.graphRunId_$(),inputSize:h,outputSize:l};if(n==="llm-call"){this.handleLlmCallMonitoringEvent(c,t);return}if(this.currentIterationIndex<0)return;let _=N.mapMonitoringEventToIterationNodeId(c,this.currentIterationIndex);if(!_)return;let y=this.enrichNodeWithMonitoringEvent(t,_,c);y&&this.graphLayout_$.set(y)}handleLlmCallMonitoringEvent(e,t){let n=e.data?.callType,r=typeof n=="string"?n:"";if(!r)return;let s=N.getPreCreatedSkeletonNodeId(r);if(s){let h=this.enrichNodeWithMonitoringEvent(t,s,e);h&&this.graphLayout_$.set(h);return}if(N.isIterationLlmCall(r)&&this.currentIterationIndex>=0){let h=N.mapMonitoringEventToIterationNodeId(e,this.currentIterationIndex);if(h){if(t.nodes.findIndex(c=>c.id===h)>=0){let c=this.enrichNodeWithMonitoringEvent(t,h,e);c&&this.graphLayout_$.set(c)}else this.createDynamicIterationLlmNode(t,r,h,e);return}}let a=N.getLlmCallPhaseId(r);a&&this.createDynamicSkeletonLlmNode(t,r,a,e)}enrichNodeWithMonitoringEvent(e,t,n){let r=e.nodes.findIndex(_=>_.id===t);if(r<0)return null;let s=n.data??{},a=n.status==="error",h=n.durationMs??0,l=a?x.error:h>0?x.completed:x.active,c=[...e.nodes];return c[r]=w(I({},c[r]),{state:l,monitoringEvent:n,data:w(I(I({},c[r].data),s),{durationMs:h})}),this.activeNodeId_$.set(l===x.active?t:""),w(I({},e),{nodes:c})}createDynamicSkeletonLlmNode(e,t,n,r){this.dynamicNodeCounter++;let s=`llm-dyn-${this.dynamicNodeCounter}`,a=N.getLlmCallLabel(t),h=this.phaseRightColumnLast[n]??n,l=P.addDynamicLlmNode(e,h,s,a,n,null);this.phaseRightColumnLast[n]=s;let c=this.enrichNodeWithMonitoringEvent(l,s,r);this.graphLayout_$.set(c??l)}createDynamicIterationLlmNode(e,t,n,r){let s=N.getLlmCallLabel(t),a=this.iterationColumnLast[this.currentIterationIndex]??`iter-${this.currentIterationIndex}-action`,h=P.addDynamicLlmNode(e,a,n,s,"phase-execution",this.currentIterationIndex);this.iterationColumnLast[this.currentIterationIndex]=n;let l=this.enrichNodeWithMonitoringEvent(h,n,r);this.graphLayout_$.set(l??h)}loadHistoricalGraph(e,t){return ke(this,null,function*(){this.isLoading_$.set(!0);try{let n=yield this.monitoring_AS.getRunTrace({sessionId:e,runId:t});this.buildHistoricalGraph(n.trace)}catch{let n=P.buildSkeletonLayout();this.graphLayout_$.set(this.recalculateEdgePaths(n))}finally{this.isLoading_$.set(!1)}})}buildHistoricalGraph(e){let t=P.buildSkeletonLayout();t=this.recalculateEdgePaths(t);let n="",r=-1,s={"phase-analyze":"llm-analyze","phase-finalization":"llm-finalization"},a={},h=0;for(let l of e){let c=l.data??{},_=c.step,y=typeof _=="string"?_:"";if(y.length>0&&N.mapPhaseToNodeId(y)&&y!==n){n=y;let M=N.computeStateTransitions(y);for(let O of M)t=this.setNodeState(t,O.nodeId,O.state)}if(y==="agentic-loop-iteration"||y.includes("agentic-loop")){let T=c.action,M=typeof T=="string"?T:"",O=c.tool,E=typeof O=="string"?O:"";if(M.length>0){r++,t=P.addIterationColumn(t,r,M,{tool:E});let j=M==="tool-select"?`iter-${r}-tool-call`:`iter-${r}-action`;a[r]=j}}if(l.eventType==="llm-call"){let T=c.callType,M=typeof T=="string"?T:"";if(M){let O=N.getPreCreatedSkeletonNodeId(M);if(O)t=this.enrichHistoricalNode(t,O,l,c);else if(N.isIterationLlmCall(M)&&r>=0){let E=N.mapMonitoringEventToIterationNodeId(l,r);if(E)if(t.nodes.findIndex(K=>K.id===E)>=0)t=this.enrichHistoricalNode(t,E,l,c);else{let K=N.getLlmCallLabel(M),A=a[r]??`iter-${r}-action`;t=P.addDynamicLlmNode(t,A,E,K,"phase-execution",r),t=this.enrichHistoricalNode(t,E,l,c),a[r]=E}}else{let E=N.getLlmCallPhaseId(M);if(E){h++;let j=`llm-dyn-${h}`,K=N.getLlmCallLabel(M),A=s[E]??E;t=P.addDynamicLlmNode(t,A,j,K,E,null),t=this.enrichHistoricalNode(t,j,l,c),s[E]=j}}}continue}if(r>=0){let T=N.mapMonitoringEventToIterationNodeId(l,r);T&&(t=this.enrichHistoricalNode(t,T,l,c))}}if(n===v.runFlowComplete)for(let l of t.nodes)l.state===x.pending&&(t=this.setNodeState(t,l.id,x.completed));this.graphLayout_$.set(this.recalculateEdgePaths(t))}enrichHistoricalNode(e,t,n,r){let s=e.nodes.findIndex(h=>h.id===t);if(s<0)return e;let a=[...e.nodes];return a[s]=w(I({},a[s]),{state:n.status==="error"?x.error:x.completed,monitoringEvent:n,data:w(I(I({},a[s].data),r),{durationMs:n.durationMs})}),w(I({},e),{nodes:a})}applyStateTransitions(e){let t=this.graphLayout_$();if(!t)return;let n="";for(let r of e)t=this.setNodeState(t,r.nodeId,r.state),r.state===x.active&&(n=r.nodeId);this.activeNodeId_$.set(n),this.graphLayout_$.set(t)}setNodeState(e,t,n){let r=e.nodes.findIndex(a=>a.id===t);if(r<0)return e;let s=[...e.nodes];return s[r]=w(I({},s[r]),{state:n}),w(I({},e),{nodes:s})}markAllIterationNodesCompleted(){let e=this.graphLayout_$();if(!e)return;let t=e;for(let n of e.nodes)n.iterationIndex!=null&&n.state!==x.error&&(t=this.setNodeState(t,n.id,x.completed));this.graphLayout_$.set(t)}recalculateEdgePaths(e){let t=e.edges.map(n=>{let r=e.nodes.find(a=>a.id===n.sourceNodeId),s=e.nodes.find(a=>a.id===n.targetNodeId);return!r||!s?n:w(I({},n),{pathD:P.computeEdgePath(r,s,n.category)})});return w(I({},e),{edges:t})}resetState(){this.graphLayout_$.set(null),this.activeNodeId_$.set(""),this.selectedNodeId_$.set(""),this.currentIterationIndex=-1,this.lastAppliedPhase="",this.isLoading_$.set(!1),this.dynamicNodeCounter=0,this.phaseRightColumnLast={},this.iterationColumnLast={}}disposeSubscriptions(){this.monitoringSubscription&&(this.monitoringSubscription.unsubscribe(),this.monitoringSubscription=null)}static toRecord(e){return typeof e!="object"||e==null?{}:JSON.parse(JSON.stringify(e))}static \u0275fac=function(t){return new(t||i)};static \u0275prov=xe({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})();var ot=["appSesGraphNodeSvg",""];function rt(i,o){if(i&1&&(H(),p(0,"text",1),m(1),d()),i&2){let e=C();Y("x",10)("y",e.node().height/2+1),u(),L(e.icon_$())}}function at(i,o){if(i&1&&(H(),p(0,"text",3),m(1),d()),i&2){let e=C();Y("x",e.node().width-10)("y",12)("fill",e.node().state==="error"?"#ef4444":"#22c55e"),u(),L(e.stateIcon_$())}}function st(i,o){if(i&1&&(H(),p(0,"text",4),m(1),d()),i&2){let e=C();Y("x",e.node().width-8)("y",e.node().height-8),u(),_e("",e.durationMs_$(),"ms")}}var $e=class i{node=F.required();isHighlighted=F(!1);isSelected=F(!1);nodeClicked=ne();fillColor_$=g(()=>{let o=this.node();return o.state===x.pending?"#262626":i.CATEGORY_FILL_MAP[o.category]??"#262626"});strokeColor_$=g(()=>{let o=this.node();return o.state===x.error?"#ef4444":o.state===x.pending?"#525252":i.CATEGORY_STROKE_MAP[o.category]??"#737373"});strokeDashArray_$=g(()=>this.node().state===x.pending?"6 3":"none");textColor_$=g(()=>this.node().state===x.pending?"#737373":"#e5e5e5");opacity_$=g(()=>this.node().state===x.pending?.5:1);borderRadius_$=g(()=>this.node().category===f.action?16:8);icon_$=g(()=>{let o=this.node().category;return i.CATEGORY_ICON_MAP[o]??""});stateIcon_$=g(()=>{let o=this.node().state;return o===x.completed?"\u2713":o===x.error?"\u2715":""});animationClass_$=g(()=>this.node().state===x.active||this.isHighlighted()?"ses-graph-node--active":this.isSelected()?"ses-graph-node--selected":"");durationMs_$=g(()=>this.node().data.durationMs??0);handleClick(){this.nodeClicked.emit(this.node().id)}static CATEGORY_FILL_MAP={[f.phase]:"#1a1a2e",[f.milestone]:"#052e16",[f.llmCall]:"#1e1033",[f.toolCall]:"#2e2a05",[f.toolError]:"#2e1505",[f.loopIteration]:"#0a1628",[f.action]:"#1a1a2e",[f.error]:"#2e0505"};static CATEGORY_STROKE_MAP={[f.phase]:"#525252",[f.milestone]:"#22c55e",[f.llmCall]:"#a855f7",[f.toolCall]:"#eab308",[f.toolError]:"#f97316",[f.loopIteration]:"#3b82f6",[f.action]:"#3b82f6",[f.error]:"#ef4444"};static CATEGORY_ICON_MAP={[f.milestone]:"\u26A1",[f.llmCall]:"\u{1F9E0}",[f.toolCall]:"\u{1F527}",[f.toolError]:"\u26A0\uFE0F",[f.error]:"\u274C"};static \u0275fac=function(e){return new(e||i)};static \u0275cmp=ae({type:i,selectors:[["","appSesGraphNodeSvg",""]],inputs:{node:[1,"node"],isHighlighted:[1,"isHighlighted"],isSelected:[1,"isSelected"]},outputs:{nodeClicked:"nodeClicked"},standalone:!0,features:[le],attrs:ot,decls:7,vars:21,consts:[[2,"cursor","pointer",3,"click"],["dominant-baseline","central","text-anchor","start","font-size","14"],["dominant-baseline","central"],["text-anchor","end","dominant-baseline","central","font-size","11","font-weight","700"],["text-anchor","end","dominant-baseline","auto","fill","#737373","font-size","9"]],template:function(e,t){e&1&&(H(),p(0,"g",0),B("click",function(){return t.handleClick()}),W(1,"rect"),D(2,rt,2,3,":svg:text",1),p(3,"text",2),m(4),d(),D(5,at,2,4,":svg:text",3)(6,st,2,3,":svg:text",4),d()),e&2&&(se(t.animationClass_$()),Y("transform","translate("+t.node().x+","+t.node().y+")")("opacity",t.opacity_$()),u(),Y("width",t.node().width)("height",t.node().height)("rx",t.borderRadius_$())("fill",t.fillColor_$())("stroke",t.strokeColor_$())("stroke-width",t.isSelected()?2.5:1.5)("stroke-dasharray",t.strokeDashArray_$()),u(),S(t.icon_$()?2:-1),u(),Y("x",t.icon_$()?30:t.node().width/2)("y",t.node().height/2+1)("text-anchor",t.icon_$()?"start":"middle")("fill",t.textColor_$())("font-size",t.node().category==="phase"||t.node().category==="milestone"?14:12)("font-weight",t.node().category==="phase"||t.node().category==="milestone"?600:400),u(),L(t.node().label),u(),S(t.stateIcon_$()?5:-1),u(),S(t.durationMs_$()?6:-1))},dependencies:[de],encapsulation:2})};function lt(i,o){if(i&1&&(p(0,"div",7)(1,"span",8),m(2,"Phase"),d(),p(3,"span",9),m(4),d()()),i&2){let e=C();u(4),L(e.node().phase)}}function dt(i,o){if(i&1&&(p(0,"div",7)(1,"span",8),m(2,"Step"),d(),p(3,"span",9),m(4),d()()),i&2){let e=C();u(4),L(e.stepLabel_$())}}function ct(i,o){if(i&1&&(p(0,"div",7)(1,"span",8),m(2,"Duration"),d(),p(3,"span",9),m(4),d()()),i&2){let e=C();u(4),L(e.durationLabel_$())}}function pt(i,o){if(i&1&&(p(0,"div",7)(1,"span",8),m(2,"Tool"),d(),p(3,"span",12),m(4),d()()),i&2){let e=C();u(4),L(e.toolId_$())}}function ht(i,o){if(i&1&&(p(0,"div",10)(1,"span",13),m(2,"Intent"),d(),p(3,"span",14),m(4),d()()),i&2){let e=C();u(4),L(e.intent_$())}}function ut(i,o){if(i&1&&(p(0,"div",7)(1,"span",8),m(2,"Iteration"),d(),p(3,"span",15),m(4),d()()),i&2){let e=C();u(4),_e("#",e.node().iterationIndex,"")}}function mt(i,o){if(i&1&&(p(0,"span",13),m(1," In: "),p(2,"span",9),m(3),d()()),i&2){let e=C(2);u(3),L(e.inputSize_$())}}function _t(i,o){if(i&1&&(p(0,"span",13),m(1," Out: "),p(2,"span",9),m(3),d()()),i&2){let e=C(2);u(3),L(e.outputSize_$())}}function ft(i,o){if(i&1&&(p(0,"div",11),D(1,mt,4,1,"span",13)(2,_t,4,1,"span",13),d()),i&2){let e=C();u(),S(e.inputSize_$()>0?1:-1),u(),S(e.outputSize_$()>0?2:-1)}}function gt(i,o){if(i&1&&(p(0,"div",7)(1,"span",8),m(2,"Provider"),d(),p(3,"span",26),m(4),d()()),i&2){let e=C(3);u(4),L(e.usedProvider_$())}}function xt(i,o){if(i&1&&(p(0,"div",7)(1,"span",8),m(2,"Model"),d(),p(3,"span",26),m(4),d()()),i&2){let e=C(3);u(4),L(e.usedModel_$())}}function yt(i,o){if(i&1&&(p(0,"span",13),m(1," Cost: "),p(2,"span",27),m(3),d()()),i&2){let e=C(4);u(3),L(e.costUsd_$())}}function St(i,o){if(i&1&&(p(0,"div",25)(1,"span",13),m(2," Tokens: "),p(3,"span",9),m(4),d()(),D(5,yt,4,1,"span",13),d()),i&2){let e=C(3);u(4),L(e.tokenInfo_$().total),u(),S(e.costUsd_$()?5:-1)}}function Ct(i,o){if(i&1&&(p(0,"div",16)(1,"div",23),m(2,"Used"),d(),p(3,"div",24),D(4,gt,5,1,"div",7)(5,xt,5,1,"div",7)(6,St,6,2,"div",25),d()()),i&2){let e=C(2);u(4),S(e.usedProvider_$()?4:-1),u(),S(e.usedModel_$()?5:-1),u(),S(e.tokenInfo_$()?6:-1)}}function vt(i,o){if(i&1){let e=ie();p(0,"button",28),B("click",function(){R(e);let n=C(2);return z(n.handleClearOverride())}),m(1," Clear "),d()}}function It(i,o){i&1&&(p(0,"div",21),m(1," Session override active "),d())}function Et(i,o){if(i&1&&(p(0,"div",22)(1,"div",29),m(2,"Global default"),d(),p(3,"div",30),m(4),d()()),i&2){let e=C(2);u(4),ze(" ",e.globalDefault_$().provider," / ",e.globalDefault_$().model," ")}}function Nt(i,o){if(i&1){let e=ie();D(0,Ct,7,3,"div",16),p(1,"div",16)(2,"div",17)(3,"div",18),m(4),d(),D(5,vt,2,0,"button",19),d(),p(6,"app-s-registry-provider-model-select",20),B("modelChange",function(n){R(e);let r=C();return z(r.handleModelChange(n))}),d(),D(7,It,2,0,"div",21),d(),D(8,Et,5,2,"div",22)}if(i&2){let e=C();S(e.usedProvider_$()||e.usedModel_$()?0:-1),u(4),_e(" Override: ",e.callTypeLabel_$()," "),u(),S(e.hasSessionOverride_$()?5:-1),u(),me("selectedProvider",e.selectedProvider_$())("selectedModel",e.selectedModel_$()),u(),S(e.hasSessionOverride_$()?7:-1),u(),S(e.globalDefault_$()?8:-1)}}var Ke=(()=>{class i{graph_DS=Z(Ze);session_DS=Z(Ce);registrySsot_CS=Z(Be);node=F.required();closed=ne();stateLabel_$=g(()=>({pending:"Pending",active:"Active",completed:"Completed",error:"Error"})[this.node().state]??this.node().state);durationLabel_$=g(()=>{let e=this.node().data.durationMs;return!e||e<=0?"":e<1e3?`${Math.round(e)}ms`:`${(e/1e3).toFixed(1)}s`});toolId_$=g(()=>{let e=this.node().data,t=e.toolId??e.tool;return typeof t=="string"?t:""});intent_$=g(()=>{let e=this.node().data.intent;return typeof e=="string"?e:""});stepLabel_$=g(()=>{let e=this.node().data.step;return typeof e!="string"||e.length===0?"":ve.formatStepId(e)});inputSize_$=g(()=>{let e=this.node().monitoringEvent;return e?e.inputSize??0:0});outputSize_$=g(()=>{let e=this.node().monitoringEvent;return e?e.outputSize??0:0});stateColorClass_$=g(()=>({pending:"text-neutral-500",active:"text-cyan-400",completed:"text-green-400",error:"text-red-400"})[this.node().state]??"text-neutral-400");isLlmCall_$=g(()=>this.node().category===f.llmCall);callType_$=g(()=>{let e=this.node().data?.callType;return typeof e=="string"?e:""});callTypeLabel_$=g(()=>{let e=this.callType_$();return Ye[e]??e});usedProvider_$=g(()=>{let e=this.node().data?.provider;return typeof e=="string"?e:""});usedModel_$=g(()=>{let e=this.node().data?.model;return typeof e=="string"?e:""});sessionOverride_$=g(()=>{let e=this.callType_$();if(!e)return null;let t=this.graph_DS.graphSessionId_$();if(!t)return null;let r=this.session_DS.sessionInfoMap_$().get(t);if(!r)return null;let s=r.llmCallTypeOverrides;if(!s)return null;let a=s[e];if(typeof a!="object"||!a)return null;let h=a,l=h.provider,c=h.model;return typeof l=="string"&&typeof c=="string"?{provider:l,model:c}:null});globalDefault_$=g(()=>{let e=this.callType_$();if(!e)return null;let t=this.graph_DS.graphSessionId_$(),r=this.session_DS.sessionInfoMap_$().get(t);if(!r)return null;let s=r.globalCallTypeDefaults;if(!s)return null;let a=s[e];if(typeof a!="object"||!a)return null;let h=a,l=h.provider,c=h.model;return typeof l=="string"&&typeof c=="string"?{provider:l,model:c}:null});selectedProvider_$=g(()=>this.sessionOverride_$()?.provider??"");selectedModel_$=g(()=>this.sessionOverride_$()?.model??"");hasSessionOverride_$=g(()=>this.sessionOverride_$()!==null);tokenInfo_$=g(()=>{let e=this.node().data,t=e.promptTokens,n=e.completionTokens,r=e.totalTokens;return typeof r!="number"||r<=0?null:{prompt:typeof t=="number"?t:0,completion:typeof n=="number"?n:0,total:r}});costUsd_$=g(()=>{let e=this.node().data?.costUsd;return typeof e!="number"||e<=0?"":`$${e.toFixed(4)}`});handleClose(){this.closed.emit()}handleProviderChange(e){}handleModelChange(e){let t=this.callType_$(),n=this.graph_DS.graphSessionId_$();if(!t||!n||!e)return;let s=this.registrySsot_CS.enabledLlmModels_$().find(a=>a.modelName===e);s&&this.applySessionOverride(n,t,s.provider,s.modelName)}handleClearOverride(){let e=this.callType_$(),t=this.graph_DS.graphSessionId_$();!e||!t||this.clearSessionOverride(t,e)}applySessionOverride(e,t,n,r){let h=this.session_DS.sessionInfoMap_$().get(e)?.llmCallTypeOverrides??{},l=w(I({},h),{[t]:{provider:n,model:r}});this.session_DS.updateSession({sessionId:e,updates:{llmCallTypeOverrides:l}}).then(()=>{this.session_DS.loadSessionInfo(e)})}clearSessionOverride(e,t){let s=this.session_DS.sessionInfoMap_$().get(e)?.llmCallTypeOverrides??{},a=I({},s);Reflect.deleteProperty(a,t);let h=Object.keys(a).length>0;this.session_DS.updateSession({sessionId:e,updates:{llmCallTypeOverrides:h?a:null}}).then(()=>{this.session_DS.loadSessionInfo(e)})}static \u0275fac=function(t){return new(t||i)};static \u0275cmp=ae({type:i,selectors:[["app-ses-graph-node-detail"]],inputs:{node:[1,"node"]},outputs:{closed:"closed"},standalone:!0,features:[le],decls:26,vars:13,consts:[[1,"w-80","max-h-[28rem]","overflow-y-auto","rounded-lg","border","border-neonCyan/30","bg-neutral-900/95","shadow-lg","backdrop-blur-sm","p-3"],[1,"flex","items-start","justify-between","gap-2","mb-2"],[1,"text-sm","font-semibold","text-neutral-200","leading-tight"],["title","Bez\xE1r\xE1s","aria-label","Bez\xE1r\xE1s",1,"p-1","min-h-[28px]","min-w-[28px]","flex","items-center","justify-center","rounded","text-neutral-400","hover:text-neutral-200","hover:bg-neutral-700","transition-colors","shrink-0",3,"click"],["viewBox","0 0 24 24","fill","none","stroke","currentColor","stroke-width","2","stroke-linecap","round","stroke-linejoin","round",1,"w-3.5","h-3.5"],["d","M18 6L6 18M6 6l12 12"],[1,"space-y-1.5","text-xs"],[1,"flex","items-center","gap-2"],[1,"text-neutral-500","w-16","shrink-0"],[1,"text-neutral-300"],[1,"flex","flex-col","gap-0.5"],[1,"flex","items-center","gap-3","pt-1","border-t","border-neutral-800"],[1,"text-yellow-300","font-mono","text-[11px]"],[1,"text-neutral-500"],[1,"text-neutral-300","text-[11px]","leading-tight","break-words"],[1,"text-blue-400"],[1,"mt-3","pt-2","border-t","border-neutral-700"],[1,"flex","items-center","justify-between","mb-1.5"],[1,"text-[10px]","text-neutral-500","uppercase","tracking-wider"],[1,"text-[10px]","text-red-400","hover:text-red-300","transition-colors"],["registryKind","llm","providerLabel","Provider","modelLabel","Model",3,"modelChange","selectedProvider","selectedModel"],[1,"mt-1.5","text-[10px]","text-purple-400"],[1,"mt-2","pt-1.5","border-t","border-neutral-800"],[1,"text-[10px]","text-neutral-500","uppercase","tracking-wider","mb-1.5"],[1,"space-y-1","text-xs"],[1,"flex","items-center","gap-3"],[1,"text-purple-300","font-mono","text-[11px]"],[1,"text-green-400"],[1,"text-[10px]","text-red-400","hover:text-red-300","transition-colors",3,"click"],[1,"text-[10px]","text-neutral-500","uppercase","tracking-wider","mb-1"],[1,"text-[11px]","text-neutral-400","font-mono"]],template:function(t,n){t&1&&(p(0,"div",0)(1,"div",1)(2,"h3",2),m(3),d(),p(4,"button",3),B("click",function(){return n.handleClose()}),H(),p(5,"svg",4),W(6,"path",5),d()()(),ye(),p(7,"div",6)(8,"div",7)(9,"span",8),m(10,"State"),d(),p(11,"span"),m(12),d()(),p(13,"div",7)(14,"span",8),m(15,"Type"),d(),p(16,"span",9),m(17),d()(),D(18,lt,5,1,"div",7)(19,dt,5,1,"div",7)(20,ct,5,1,"div",7)(21,pt,5,1,"div",7)(22,ht,5,1,"div",10)(23,ut,5,1,"div",7)(24,ft,3,2,"div",11),d(),D(25,Nt,9,7),d()),t&2&&(u(3),L(n.node().label),u(8),se(n.stateColorClass_$()+" font-medium"),u(),L(n.stateLabel_$()),u(5),L(n.node().category),u(),S(n.node().phase?18:-1),u(),S(n.stepLabel_$()?19:-1),u(),S(n.durationLabel_$()?20:-1),u(),S(n.toolId_$()?21:-1),u(),S(n.intent_$()?22:-1),u(),S(n.node().iterationIndex!==null?23:-1),u(),S(n.inputSize_$()>0||n.outputSize_$()>0?24:-1),u(),S(n.isLlmCall_$()&&n.callType_$()?25:-1))},dependencies:[de,Fe],encapsulation:2})}return i})();var $t=["graphSvg"],Qe=(i,o)=>o.id;function bt(i,o){i&1&&(p(0,"span",7),m(1,"Loading trace..."),d())}function Lt(i,o){if(i&1&&(H(),W(0,"rect",16)),i&2){let e=o;Y("x",e.x)("y",e.y)("width",e.width)("height",e.height)}}function wt(i,o){if(i&1&&(H(),W(0,"path",17)),i&2){let e=o.$implicit;Y("d",e.pathD)("stroke",e.strokeColor)("stroke-dasharray",e.strokeDashArray)("marker-end",e.markerEnd)}}function Tt(i,o){if(i&1){let e=ie();H(),p(0,"g",20),B("nodeClicked",function(n){R(e);let r=C();return z(r.handleNodeClick(n))}),d()}if(i&2){let e=o.$implicit,t=C();me("node",e)("isHighlighted",t.activeNodeId()===e.id)("isSelected",t.selectedNodeId()===e.id)}}function Mt(i,o){if(i&1){let e=ie();p(0,"app-ses-graph-node-detail",21),B("closed",function(){R(e);let n=C();return z(n.handleDetailClose())}),d()}i&2&&me("node",o)}var Gn=(()=>{class i{svgRef;layout=F(null);activeNodeId=F("");selectedNodeId=F("");isLoading=F(!1);nodeClicked=ne();detailClosed=ne();viewBox_$=V({x:0,y:0,width:800,height:600});viewBoxStr_$=g(()=>{let e=this.viewBox_$();return`${e.x} ${e.y} ${e.width} ${e.height}`});isFollowActive_$=V(!0);isPanning=!1;panStartX=0;panStartY=0;panStartViewBoxX=0;panStartViewBoxY=0;nodes_$=g(()=>this.layout()?.nodes??[]);edges_$=g(()=>this.layout()?.edges??[]);loopBounds_$=g(()=>this.layout()?.loopContainerBounds??null);selectedNode_$=g(()=>{let e=this.selectedNodeId();return e?this.nodes_$().find(t=>t.id===e)??null:null});constructor(){Se(()=>{let e=this.layout();e&&this.viewBox_$.set(I({},e.viewBox))},{allowSignalWrites:!0})}handleNodeClick(e){this.nodeClicked.emit(e)}handleDetailClose(){this.detailClosed.emit()}handlePointerDown(e){if(e.button!==0)return;this.isPanning=!0,this.panStartX=e.clientX,this.panStartY=e.clientY;let t=this.viewBox_$();this.panStartViewBoxX=t.x,this.panStartViewBoxY=t.y,this.svgRef&&this.svgRef.nativeElement.setPointerCapture(e.pointerId)}handlePointerMove(e){if(!this.isPanning||!this.svgRef)return;let t=this.svgRef.nativeElement,n=this.viewBox_$(),r=n.width/t.clientWidth,s=n.height/t.clientHeight,a=(e.clientX-this.panStartX)*r,h=(e.clientY-this.panStartY)*s;this.viewBox_$.set(w(I({},n),{x:this.panStartViewBoxX-a,y:this.panStartViewBoxY-h}))}handlePointerUp(){this.isPanning=!1}handleWheel(e){if(e.preventDefault(),!this.svgRef)return;let t=this.svgRef.nativeElement,n=this.viewBox_$(),r=e.deltaY>0?1.1:.9,s=t.getBoundingClientRect(),a=(e.clientX-s.left)/s.width,h=(e.clientY-s.top)/s.height,l=n.width*r,c=n.height*r;if(l<200||l>5e3)return;let _=n.x+(n.width-l)*a,y=n.y+(n.height-c)*h;this.viewBox_$.set({x:_,y,width:l,height:c})}handleFitToView(){let e=this.nodes_$();if(e.length===0)return;let t=P.recalculateViewBox(e,48);this.viewBox_$.set(t)}handleToggleFollowActive(){this.isFollowActive_$.update(e=>!e)}static \u0275fac=function(t){return new(t||i)};static \u0275cmp=ae({type:i,selectors:[["app-ses-graph-view"]],viewQuery:function(t,n){if(t&1&&Ge($t,5),t&2){let r;Oe(r=Re())&&(n.svgRef=r.first)}},inputs:{layout:[1,"layout"],activeNodeId:[1,"activeNodeId"],selectedNodeId:[1,"selectedNodeId"],isLoading:[1,"isLoading"]},outputs:{nodeClicked:"nodeClicked",detailClosed:"detailClosed"},standalone:!0,features:[le],decls:25,vars:6,consts:[["graphSvg",""],[1,"flex","flex-col","h-full","w-full","overflow-hidden"],[1,"flex","items-center","gap-2","px-3","py-2","border-b","border-neutral-800","shrink-0","bg-neutral-900/80"],["title","Fit to view",1,"px-2","py-1","text-xs","border","rounded","transition-colors","border-neutral-700","text-neutral-400","hover:text-neutral-200","hover:border-neutral-500",3,"click"],["viewBox","0 0 24 24","fill","none","stroke","currentColor","stroke-width","2","stroke-linecap","round","stroke-linejoin","round",1,"w-3.5","h-3.5","inline-block","mr-1"],["d","M15 3h6v6M9 21H3v-6M21 3l-7 7M3 21l7-7"],["title","Follow active node",1,"px-2","py-1","text-xs","border","rounded","transition-colors",3,"click"],[1,"text-xs","text-neutral-500","ml-auto"],[1,"flex-1","min-h-0","relative"],["preserveAspectRatio","xMidYMid meet",1,"ses-graph-svg",3,"pointerdown","pointermove","pointerup","pointerleave","wheel"],["id","ses-arrow-seq","markerWidth","8","markerHeight","6","refX","8","refY","3","orient","auto","markerUnits","strokeWidth"],["d","M 0 0 L 8 3 L 0 6 Z","fill","#525252"],["id","ses-arrow-loop","markerWidth","8","markerHeight","6","refX","8","refY","3","orient","auto","markerUnits","strokeWidth"],["d","M 0 0 L 8 3 L 0 6 Z","fill","#3b82f6"],["id","ses-arrow-error","markerWidth","8","markerHeight","6","refX","8","refY","3","orient","auto","markerUnits","strokeWidth"],["d","M 0 0 L 8 3 L 0 6 Z","fill","#f97316"],["rx","6","fill","#0f172a","stroke","#1e3a5f","stroke-width","1","stroke-dasharray","4 2","opacity","0.5"],["stroke-width","1.5","fill","none"],["appSesGraphNodeSvg","",3,"node","isHighlighted","isSelected"],[1,"absolute","top-2","right-2","z-10",3,"node"],["appSesGraphNodeSvg","",3,"nodeClicked","node","isHighlighted","isSelected"],[1,"absolute","top-2","right-2","z-10",3,"closed","node"]],template:function(t,n){if(t&1){let r=ie();p(0,"div",1)(1,"div",2)(2,"button",3),B("click",function(){return R(r),z(n.handleFitToView())}),H(),p(3,"svg",4),W(4,"path",5),d(),m(5," Fit "),d(),ye(),p(6,"button",6),B("click",function(){return R(r),z(n.handleToggleFollowActive())}),m(7," Follow "),d(),D(8,bt,2,0,"span",7),d(),p(9,"div",8),H(),p(10,"svg",9,0),B("pointerdown",function(a){return R(r),z(n.handlePointerDown(a))})("pointermove",function(a){return R(r),z(n.handlePointerMove(a))})("pointerup",function(){return R(r),z(n.handlePointerUp())})("pointerleave",function(){return R(r),z(n.handlePointerUp())})("wheel",function(a){return R(r),z(n.handleWheel(a))}),p(12,"defs")(13,"marker",10),W(14,"path",11),d(),p(15,"marker",12),W(16,"path",13),d(),p(17,"marker",14),W(18,"path",15),d()(),D(19,Lt,1,4,":svg:rect",16),Le(20,wt,1,4,":svg:path",17,Qe),Le(22,Tt,1,3,":svg:g",18,Qe),d(),D(24,Mt,1,1,"app-ses-graph-node-detail",19),d()()}if(t&2){let r,s;u(6),se(n.isFollowActive_$()?"border-neonCyan/50 text-neonCyan bg-neonCyan/10":"border-neutral-700 text-neutral-400 hover:text-neutral-200 hover:border-neutral-500"),u(2),S(n.isLoading()?8:-1),u(2),Y("viewBox",n.viewBoxStr_$()),u(9),S((r=n.loopBounds_$())?19:-1,r),u(),we(n.edges_$()),u(2),we(n.nodes_$()),u(2),S((s=n.selectedNode_$())?24:-1,s)}},dependencies:[de,$e,Ke],styles:[`@charset "UTF-8";@keyframes _ngcontent-%COMP%_ses-graph-node-pulse{0%,to{filter:drop-shadow(0 0 4px var(--ses-graph-pulse-color, #22d3ee))}50%{filter:drop-shadow(0 0 12px var(--ses-graph-pulse-color, #22d3ee))}}[_nghost-%COMP%]{display:block;width:100%;height:100%;position:relative}.ses-graph-svg[_ngcontent-%COMP%]{width:100%;height:100%;background:#0a0a0a;-webkit-user-select:none;user-select:none} .ses-graph-node--active{animation:_ngcontent-%COMP%_ses-graph-node-pulse 1.5s ease-in-out infinite} .ses-graph-node--active rect{stroke-width:2.5} .ses-graph-node--selected{filter:drop-shadow(0 0 6px rgba(34,211,238,.4))}
2
2
  /*# sourceMappingURL=ses-graph-view.component-5NATWVIS.css.map */`]})}return i})();export{qe as a,ve as b,x as c,k as d,f as e,P as f,Ze as g,Gn as h};
3
- //# sourceMappingURL=chunk-246ZTR5O.js.map
3
+ //# sourceMappingURL=chunk-KIRC3TOF.js.map
@@ -1,4 +1,4 @@
1
- import{a as G}from"./chunk-S7RPTNLO.js";import{a as K}from"./chunk-KOF3QQI6.js";import{e as F}from"./chunk-LRT6KDL6.js";import{h as f,j as U}from"./chunk-XBIXPQFJ.js";import{I as D,p as H}from"./chunk-37AFYV4M.js";import{C as _,R as L,a as w,aa as p,b as $,d as k,h as O,k as h,p as d,vb as g,xb as P,y as M}from"./chunk-TBMJSIBB.js";var C=O(H());var I=(()=>{class l{static GATEWAY_CHAT_MESSAGE_TIMESTAMP_FIELD_NAMES=["timestamp","createdAt","updatedAt","ts","time","sentAt","messageTimestamp","created_at","updated_at","lastMessageAt","last_message_at","startedAt","started_at","lastActivityAt","last_activity_at"];static GATEWAY_SESSION_LAST_ACTIVITY_FIELD_NAMES=["lastActivityAt","updatedAt","lastMessageAt","updated_at","last_activity_at","last_message_at","startedAt","started_at","createdAt","created_at"];static GATEWAY_SESSION_STARTED_FIELD_NAMES=["startedAt","started_at","createdAt","created_at"];static GATEWAY_OUTPUT_ONLY_TIMESTAMP_FIELD_NAMES=["lastMessageAt","last_message_at","lastOutputAt","last_output_at"];static extractTimestamp(t,s){for(let e of s){let n=t[e];if(typeof n=="string"&&n)return n;if(typeof n=="number"&&n>0){let o=n<1e12?n*1e3:n;return new Date(o).toISOString()}}}}return l})();var E=class l{static buildGatewaySessionsFetch(y){let t=y.response._firstSessionKeys,s=Array.isArray(t)?t:[],e=Array.isArray(y.response.sessions)?y.response.sessions:[],n=e.map(i=>l.mapRawSessionToListItem({raw:i,gatewayUrl:y.response.gatewayUrl}));return{listItems:l.sortListItemsByLastActivityDesc({items:n}),rawSessions:e,gatewayUrl:y.response.gatewayUrl,source:y.response.source,instanceId:y.response.instanceId,firstSessionKeys:s}}static mapRawSessionToListItem(y){let t=y.raw;return{sessionId:typeof t.key=="string"?t.key:typeof t.sessionId=="string"?t.sessionId:typeof t.id=="string"?t.id:String(t.key??t.sessionId??t.id??""),label:typeof t.label=="string"?t.label:typeof t.name=="string"?t.name:typeof t.title=="string"?t.title:void 0,workspacePath:typeof t.workspacePath=="string"?t.workspacePath:typeof t.cwd=="string"?t.cwd:"",status:typeof t.status=="string"?t.status:"unknown",statusMessage:typeof t.statusMessage=="string"?t.statusMessage:void 0,gatewayUrl:y.gatewayUrl,openclawAgentName:typeof t.agentName=="string"?t.agentName:typeof t.agent=="string"?t.agent:void 0,promptCount:typeof t.promptCount=="number"?t.promptCount:typeof t.messageCount=="number"?t.messageCount:0,toolCallCount:typeof t.toolCallCount=="number"?t.toolCallCount:0,lastActivityAt:I.extractTimestamp(t,I.GATEWAY_SESSION_LAST_ACTIVITY_FIELD_NAMES),startedAt:I.extractTimestamp(t,I.GATEWAY_SESSION_STARTED_FIELD_NAMES),lastPrompt:typeof t.lastPrompt=="string"?t.lastPrompt:void 0,mode:typeof t.mode=="string"?t.mode:void 0,reasoningEffort:typeof t.reasoningEffort=="string"?t.reasoningEffort:typeof t.thinking=="string"?t.thinking:void 0,isArchived:typeof t.isArchived=="boolean"?t.isArchived:!1}}static sortListItemsByLastActivityDesc(y){return[...y.items].sort((t,s)=>{let e=t.lastActivityAt?new Date(t.lastActivityAt).getTime():0;return(s.lastActivityAt?new Date(s.lastActivityAt).getTime():0)-e})}};var N=(()=>{class l{baseUrl=`${D.api.baseUrl}/oc-session`;http=_(P);peiContext_DS=_(K);withCcapId(t){let s=this.peiContext_DS.activeCcapId_$();return s?t.set("ccapId",s):t}createSession(t){let s=this.withCcapId(new g);return d(this.http.post(this.baseUrl,t,{params:s}))}listSessions(t){let s=this.withCcapId(new g);return t?.status&&(s=s.set("status",t.status)),t?.workspacePath&&(s=s.set("workspacePath",t.workspacePath)),t?.gatewayUrl&&(s=s.set("gatewayUrl",t.gatewayUrl)),t?.includeArchived&&(s=s.set("includeArchived","1")),t?.limit!=null&&(s=s.set("limit",String(t.limit))),t?.offset!=null&&(s=s.set("offset",String(t.offset))),d(this.http.get(this.baseUrl,{params:s}))}listGatewaySessions(t){let s=new g().set("instanceId",t.instanceId);return d(this.http.get(`${this.baseUrl}/gateway-sessions`,{params:s}))}getGatewaySessionHistory(t){let s=new g().set("instanceId",t.instanceId);return d(this.http.get(`${this.baseUrl}/gateway-sessions/${t.sessionId}/history`,{params:s}))}sendGatewayPrompt(t){return d(this.http.post(`${this.baseUrl}/gateway-sessions/${t.sessionId}/send`,{instanceId:t.instanceId,content:t.content,agentName:t.agentName}))}abortGatewaySession(t){return d(this.http.post(`${this.baseUrl}/gateway-sessions/${t.sessionId}/abort`,{instanceId:t.instanceId}))}deleteGatewaySession(t){let s=new g().set("instanceId",t.instanceId);return d(this.http.delete(`${this.baseUrl}/gateway-sessions/${t.sessionId}`,{params:s}))}getSession(t){let s=this.withCcapId(new g);return d(this.http.get(`${this.baseUrl}/${t.sessionId}`,{params:s}))}sendPrompt(t){let s=this.withCcapId(new g);return d(this.http.post(`${this.baseUrl}/${t.sessionId}/prompt`,{content:t.content},{params:s}))}reconnectSession(t){let s=this.withCcapId(new g);return d(this.http.post(`${this.baseUrl}/${t.sessionId}/reconnect`,{},{params:s}))}stopExecution(t){let s=this.withCcapId(new g);return d(this.http.post(`${this.baseUrl}/${t.sessionId}/stop-execution`,{},{params:s}))}terminateSession(t){let s=this.withCcapId(new g);return d(this.http.post(`${this.baseUrl}/${t.sessionId}/terminate`,{},{params:s}))}updateSessionConfig(t){let o=t,{sessionId:s}=o,e=k(o,["sessionId"]),n=this.withCcapId(new g);return d(this.http.patch(`${this.baseUrl}/${s}/config`,e,{params:n}))}setSessionArchived(t){let s=this.withCcapId(new g);return d(this.http.patch(`${this.baseUrl}/${t.sessionId}/archive`,{isArchived:t.isArchived},{params:s}))}getSessionEvents(t){let s=this.withCcapId(new g);return t.eventType&&(s=s.set("eventType",t.eventType)),t.since&&(s=s.set("since",t.since)),t.sinceSequence!=null&&(s=s.set("sinceSequence",String(t.sinceSequence))),t.limit!=null&&(s=s.set("limit",String(t.limit))),t.offset!=null&&(s=s.set("offset",String(t.offset))),t.latest&&(s=s.set("latest","1")),d(this.http.get(`${this.baseUrl}/${t.sessionId}/events`,{params:s}))}getSessionEventStreamUrl(t){let s=`${this.baseUrl}/${t.sessionId}/events/stream`,e=this.peiContext_DS.activeCcapId_$();return e?`${s}?ccapId=${encodeURIComponent(e)}`:s}static \u0275fac=function(s){return new(s||l)};static \u0275prov=M({token:l,factory:l.\u0275fac,providedIn:"root"})}return l})();var lt=(()=>{class l{sessions_$=p([]);sessionsLoading_$=p(!1);sessionsLoadError_$=p(null);selectedSession_$=p(null);selectedSessionLoading_$=p(!1);selectedSessionEvents_$=p([]);consoleMessages_$=p([]);assembledMessages_$=p([]);lastStatusUpdate_$=p(null);sessionUsage_$=p({inputTokens:0,outputTokens:0,costUsd:0});activeSessionId_$=p("");activeInstanceId_$=p("");gatewayFilter_$=p(null);extSessionMsg_AS=_(G);ocSession_AS=_(N);globalError_CS=_(U);socket_CS=_(F);ngZone=_(L);eventSubscription=null;reconnectSubscription=null;lastKnownEventSequence=-1;chatPollHandle=null;detailPollHandle=null;lastPolledHistoryFingerprint="";constructor(){this.eventSubscription=this.socket_CS.event$.subscribe(t=>{this.handleSocketEvent(t)}),this.reconnectSubscription=this.socket_CS.connected$.subscribe(t=>{if(t){let s=this.activeSessionId_$();s&&(this.socket_CS.emit("oc-session:subscribe",{sessionId:s}),this.loadAssembledMessages({sessionId:s}).catch(()=>{})),this.backfillMissedEvents()}})}ngOnDestroy(){this.stopChatPolling(),this.eventSubscription&&(this.eventSubscription.unsubscribe(),this.eventSubscription=null),this.reconnectSubscription&&(this.reconnectSubscription.unsubscribe(),this.reconnectSubscription=null)}setGatewayFilter(t){this.gatewayFilter_$.set(t),this.loadSessions().catch(()=>{})}setGatewayFilterOnly(t){this.gatewayFilter_$.set(t)}loadSessions(t){return h(this,null,function*(){this.sessionsLoading_$.set(!0),this.sessionsLoadError_$.set(null);try{let e=[...(yield this.ocSession_AS.listSessions({status:t?.status,workspacePath:t?.workspacePath,gatewayUrl:this.gatewayFilter_$()??void 0,includeArchived:t?.includeArchived})).sessions].sort((n,o)=>{let i=n.lastActivityAt?new Date(n.lastActivityAt).getTime():0;return(o.lastActivityAt?new Date(o.lastActivityAt).getTime():0)-i});this.sessions_$.set(e)}catch(s){this.sessionsLoadError_$.set(s),this.pushConsoleMessage({type:"error",text:`Load sessions failed: ${f.getErrorMessageForDisplay(s)}`})}finally{this.sessionsLoading_$.set(!1)}})}fetchGatewaySessionsForInstance(t){return h(this,null,function*(){let s=yield this.ocSession_AS.listGatewaySessions({instanceId:t.instanceId});return E.buildGatewaySessionsFetch({response:s})})}loadGatewaySessions(t){return h(this,null,function*(){this.sessionsLoading_$.set(!0),this.sessionsLoadError_$.set(null);try{let s=yield this.fetchGatewaySessionsForInstance({instanceId:t.instanceId});!s.listItems.length&&s.rawSessions.length>0&&this.pushConsoleMessage({type:"error",text:`Gateway returned ${s.rawSessions.length} sessions but mapping produced 0.
1
+ import{a as G}from"./chunk-ZDABQIBP.js";import{a as K}from"./chunk-6JO7UKOI.js";import{e as F}from"./chunk-WAVRMTHA.js";import{h as f,j as U}from"./chunk-HRA33EDX.js";import{I as D,p as H}from"./chunk-BV6QDXRW.js";import{C as _,R as L,a as w,aa as p,b as $,d as k,h as O,k as h,p as d,vb as g,xb as P,y as M}from"./chunk-TBMJSIBB.js";var C=O(H());var I=(()=>{class l{static GATEWAY_CHAT_MESSAGE_TIMESTAMP_FIELD_NAMES=["timestamp","createdAt","updatedAt","ts","time","sentAt","messageTimestamp","created_at","updated_at","lastMessageAt","last_message_at","startedAt","started_at","lastActivityAt","last_activity_at"];static GATEWAY_SESSION_LAST_ACTIVITY_FIELD_NAMES=["lastActivityAt","updatedAt","lastMessageAt","updated_at","last_activity_at","last_message_at","startedAt","started_at","createdAt","created_at"];static GATEWAY_SESSION_STARTED_FIELD_NAMES=["startedAt","started_at","createdAt","created_at"];static GATEWAY_OUTPUT_ONLY_TIMESTAMP_FIELD_NAMES=["lastMessageAt","last_message_at","lastOutputAt","last_output_at"];static extractTimestamp(t,s){for(let e of s){let n=t[e];if(typeof n=="string"&&n)return n;if(typeof n=="number"&&n>0){let o=n<1e12?n*1e3:n;return new Date(o).toISOString()}}}}return l})();var E=class l{static buildGatewaySessionsFetch(y){let t=y.response._firstSessionKeys,s=Array.isArray(t)?t:[],e=Array.isArray(y.response.sessions)?y.response.sessions:[],n=e.map(i=>l.mapRawSessionToListItem({raw:i,gatewayUrl:y.response.gatewayUrl}));return{listItems:l.sortListItemsByLastActivityDesc({items:n}),rawSessions:e,gatewayUrl:y.response.gatewayUrl,source:y.response.source,instanceId:y.response.instanceId,firstSessionKeys:s}}static mapRawSessionToListItem(y){let t=y.raw;return{sessionId:typeof t.key=="string"?t.key:typeof t.sessionId=="string"?t.sessionId:typeof t.id=="string"?t.id:String(t.key??t.sessionId??t.id??""),label:typeof t.label=="string"?t.label:typeof t.name=="string"?t.name:typeof t.title=="string"?t.title:void 0,workspacePath:typeof t.workspacePath=="string"?t.workspacePath:typeof t.cwd=="string"?t.cwd:"",status:typeof t.status=="string"?t.status:"unknown",statusMessage:typeof t.statusMessage=="string"?t.statusMessage:void 0,gatewayUrl:y.gatewayUrl,openclawAgentName:typeof t.agentName=="string"?t.agentName:typeof t.agent=="string"?t.agent:void 0,promptCount:typeof t.promptCount=="number"?t.promptCount:typeof t.messageCount=="number"?t.messageCount:0,toolCallCount:typeof t.toolCallCount=="number"?t.toolCallCount:0,lastActivityAt:I.extractTimestamp(t,I.GATEWAY_SESSION_LAST_ACTIVITY_FIELD_NAMES),startedAt:I.extractTimestamp(t,I.GATEWAY_SESSION_STARTED_FIELD_NAMES),lastPrompt:typeof t.lastPrompt=="string"?t.lastPrompt:void 0,mode:typeof t.mode=="string"?t.mode:void 0,reasoningEffort:typeof t.reasoningEffort=="string"?t.reasoningEffort:typeof t.thinking=="string"?t.thinking:void 0,isArchived:typeof t.isArchived=="boolean"?t.isArchived:!1}}static sortListItemsByLastActivityDesc(y){return[...y.items].sort((t,s)=>{let e=t.lastActivityAt?new Date(t.lastActivityAt).getTime():0;return(s.lastActivityAt?new Date(s.lastActivityAt).getTime():0)-e})}};var N=(()=>{class l{baseUrl=`${D.api.baseUrl}/oc-session`;http=_(P);peiContext_DS=_(K);withCcapId(t){let s=this.peiContext_DS.activeCcapId_$();return s?t.set("ccapId",s):t}createSession(t){let s=this.withCcapId(new g);return d(this.http.post(this.baseUrl,t,{params:s}))}listSessions(t){let s=this.withCcapId(new g);return t?.status&&(s=s.set("status",t.status)),t?.workspacePath&&(s=s.set("workspacePath",t.workspacePath)),t?.gatewayUrl&&(s=s.set("gatewayUrl",t.gatewayUrl)),t?.includeArchived&&(s=s.set("includeArchived","1")),t?.limit!=null&&(s=s.set("limit",String(t.limit))),t?.offset!=null&&(s=s.set("offset",String(t.offset))),d(this.http.get(this.baseUrl,{params:s}))}listGatewaySessions(t){let s=new g().set("instanceId",t.instanceId);return d(this.http.get(`${this.baseUrl}/gateway-sessions`,{params:s}))}getGatewaySessionHistory(t){let s=new g().set("instanceId",t.instanceId);return d(this.http.get(`${this.baseUrl}/gateway-sessions/${t.sessionId}/history`,{params:s}))}sendGatewayPrompt(t){return d(this.http.post(`${this.baseUrl}/gateway-sessions/${t.sessionId}/send`,{instanceId:t.instanceId,content:t.content,agentName:t.agentName}))}abortGatewaySession(t){return d(this.http.post(`${this.baseUrl}/gateway-sessions/${t.sessionId}/abort`,{instanceId:t.instanceId}))}deleteGatewaySession(t){let s=new g().set("instanceId",t.instanceId);return d(this.http.delete(`${this.baseUrl}/gateway-sessions/${t.sessionId}`,{params:s}))}getSession(t){let s=this.withCcapId(new g);return d(this.http.get(`${this.baseUrl}/${t.sessionId}`,{params:s}))}sendPrompt(t){let s=this.withCcapId(new g);return d(this.http.post(`${this.baseUrl}/${t.sessionId}/prompt`,{content:t.content},{params:s}))}reconnectSession(t){let s=this.withCcapId(new g);return d(this.http.post(`${this.baseUrl}/${t.sessionId}/reconnect`,{},{params:s}))}stopExecution(t){let s=this.withCcapId(new g);return d(this.http.post(`${this.baseUrl}/${t.sessionId}/stop-execution`,{},{params:s}))}terminateSession(t){let s=this.withCcapId(new g);return d(this.http.post(`${this.baseUrl}/${t.sessionId}/terminate`,{},{params:s}))}updateSessionConfig(t){let o=t,{sessionId:s}=o,e=k(o,["sessionId"]),n=this.withCcapId(new g);return d(this.http.patch(`${this.baseUrl}/${s}/config`,e,{params:n}))}setSessionArchived(t){let s=this.withCcapId(new g);return d(this.http.patch(`${this.baseUrl}/${t.sessionId}/archive`,{isArchived:t.isArchived},{params:s}))}getSessionEvents(t){let s=this.withCcapId(new g);return t.eventType&&(s=s.set("eventType",t.eventType)),t.since&&(s=s.set("since",t.since)),t.sinceSequence!=null&&(s=s.set("sinceSequence",String(t.sinceSequence))),t.limit!=null&&(s=s.set("limit",String(t.limit))),t.offset!=null&&(s=s.set("offset",String(t.offset))),t.latest&&(s=s.set("latest","1")),d(this.http.get(`${this.baseUrl}/${t.sessionId}/events`,{params:s}))}getSessionEventStreamUrl(t){let s=`${this.baseUrl}/${t.sessionId}/events/stream`,e=this.peiContext_DS.activeCcapId_$();return e?`${s}?ccapId=${encodeURIComponent(e)}`:s}static \u0275fac=function(s){return new(s||l)};static \u0275prov=M({token:l,factory:l.\u0275fac,providedIn:"root"})}return l})();var lt=(()=>{class l{sessions_$=p([]);sessionsLoading_$=p(!1);sessionsLoadError_$=p(null);selectedSession_$=p(null);selectedSessionLoading_$=p(!1);selectedSessionEvents_$=p([]);consoleMessages_$=p([]);assembledMessages_$=p([]);lastStatusUpdate_$=p(null);sessionUsage_$=p({inputTokens:0,outputTokens:0,costUsd:0});activeSessionId_$=p("");activeInstanceId_$=p("");gatewayFilter_$=p(null);extSessionMsg_AS=_(G);ocSession_AS=_(N);globalError_CS=_(U);socket_CS=_(F);ngZone=_(L);eventSubscription=null;reconnectSubscription=null;lastKnownEventSequence=-1;chatPollHandle=null;detailPollHandle=null;lastPolledHistoryFingerprint="";constructor(){this.eventSubscription=this.socket_CS.event$.subscribe(t=>{this.handleSocketEvent(t)}),this.reconnectSubscription=this.socket_CS.connected$.subscribe(t=>{if(t){let s=this.activeSessionId_$();s&&(this.socket_CS.emit("oc-session:subscribe",{sessionId:s}),this.loadAssembledMessages({sessionId:s}).catch(()=>{})),this.backfillMissedEvents()}})}ngOnDestroy(){this.stopChatPolling(),this.eventSubscription&&(this.eventSubscription.unsubscribe(),this.eventSubscription=null),this.reconnectSubscription&&(this.reconnectSubscription.unsubscribe(),this.reconnectSubscription=null)}setGatewayFilter(t){this.gatewayFilter_$.set(t),this.loadSessions().catch(()=>{})}setGatewayFilterOnly(t){this.gatewayFilter_$.set(t)}loadSessions(t){return h(this,null,function*(){this.sessionsLoading_$.set(!0),this.sessionsLoadError_$.set(null);try{let e=[...(yield this.ocSession_AS.listSessions({status:t?.status,workspacePath:t?.workspacePath,gatewayUrl:this.gatewayFilter_$()??void 0,includeArchived:t?.includeArchived})).sessions].sort((n,o)=>{let i=n.lastActivityAt?new Date(n.lastActivityAt).getTime():0;return(o.lastActivityAt?new Date(o.lastActivityAt).getTime():0)-i});this.sessions_$.set(e)}catch(s){this.sessionsLoadError_$.set(s),this.pushConsoleMessage({type:"error",text:`Load sessions failed: ${f.getErrorMessageForDisplay(s)}`})}finally{this.sessionsLoading_$.set(!1)}})}fetchGatewaySessionsForInstance(t){return h(this,null,function*(){let s=yield this.ocSession_AS.listGatewaySessions({instanceId:t.instanceId});return E.buildGatewaySessionsFetch({response:s})})}loadGatewaySessions(t){return h(this,null,function*(){this.sessionsLoading_$.set(!0),this.sessionsLoadError_$.set(null);try{let s=yield this.fetchGatewaySessionsForInstance({instanceId:t.instanceId});!s.listItems.length&&s.rawSessions.length>0&&this.pushConsoleMessage({type:"error",text:`Gateway returned ${s.rawSessions.length} sessions but mapping produced 0.
2
2
  First session keys: ${s.firstSessionKeys.join(", ")}`}),this.sessions_$.set(s.listItems)}catch(s){this.sessionsLoadError_$.set(s),this.pushConsoleMessage({type:"error",text:`Load gateway sessions failed: ${f.getErrorMessageForDisplay(s)}`})}finally{this.sessionsLoading_$.set(!1)}})}loadSessionDetail(t){return h(this,null,function*(){let s=t.isSilent===!0;s||this.selectedSessionLoading_$.set(!0);try{let e=yield this.ocSession_AS.getSession({sessionId:t.sessionId});this.selectedSession_$.set(e),this.loadAssembledMessages({sessionId:t.sessionId}).catch(()=>{})}catch(e){if(!s){this.selectedSession_$.set(null);let n=e instanceof Error?e.message:"Failed to load session details";this.pushConsoleMessage({type:"error",text:`Load session failed: ${n}`})}}finally{s||this.selectedSessionLoading_$.set(!1)}})}loadGatewaySessionHistory(t){return h(this,null,function*(){this.selectedSessionLoading_$.set(!0),this.consoleMessages_$.set([]);try{let s=yield this.ocSession_AS.getGatewaySessionHistory({sessionId:t.sessionId,instanceId:t.instanceId}),e=s,n=Array.isArray(e._rawKeys)?e._rawKeys:[],o=Array.isArray(s.history)?s.history:[],i=this.parseGatewayHistory(o),a=typeof e.messageCount=="number"?e.messageCount:0,r=Array.isArray(e._firstMessageKeys)?e._firstMessageKeys:[];i.length?this.consoleMessages_$.set(i):a>0?this.consoleMessages_$.set([{listKey:this.allocateConsoleListKey(),type:"error",text:`Gateway session has ${a} messages, but mapping failed.
3
3
  Message keys: ${r.join(", ")||"unknown"}
4
4
  Gateway response keys: ${n.join(", ")||"none"}`,timestamp:new Date().toISOString()}]):this.consoleMessages_$.set([{listKey:this.allocateConsoleListKey(),type:"info",text:"Gateway session loaded \u2014 session has no messages yet.",timestamp:new Date().toISOString()}]),this.selectedSession_$.set({session:{sessionId:t.sessionId,workspacePath:"",status:"unknown",promptCount:0,toolCallCount:0,isArchived:!1},runtime:{isLive:!1,runtimeStatus:null,outputBufferLength:0}}),this.lastPolledHistoryFingerprint=this.computeGatewayHistoryFingerprint(o),this.startChatPolling()}catch(s){this.selectedSession_$.set(null),this.pushConsoleMessage({type:"error",text:`Load gateway session history failed: ${f.getErrorMessageForDisplay(s)}`})}finally{this.selectedSessionLoading_$.set(!1)}})}loadSessionEvents(t){return h(this,null,function*(){try{let s=yield this.ocSession_AS.getSessionEvents({sessionId:t.sessionId,eventType:t.eventType,limit:t.limit??500,latest:!0});this.selectedSessionEvents_$.set(s.events),this.updateLastKnownSequence(s.events);for(let e of s.events)this.pushConsoleMessageFromEvent(e)}catch(s){this.selectedSessionEvents_$.set([]),this.pushConsoleMessage({type:"error",text:`Load events failed: ${f.getErrorMessageForDisplay(s)}`})}})}createSession(t){return h(this,null,function*(){try{let s=yield this.ocSession_AS.createSession(t),e=String(s.session.sessionId||"");return yield this.loadSessions(),e}catch(s){throw this.pushConsoleMessage({type:"error",text:`Create session failed: ${f.getErrorMessageForDisplay(s)}`}),s}})}sendPrompt(t){return h(this,null,function*(){this.pushConsoleMessage({type:"prompt",text:t.content});try{let s=this.activeInstanceId_$();s?yield this.ocSession_AS.sendGatewayPrompt({sessionId:t.sessionId,instanceId:s,content:t.content}):yield this.ocSession_AS.sendPrompt(t)}catch(s){throw this.pushConsoleMessage({type:"error",text:`Send failed: ${f.getErrorMessageForDisplay(s)}`}),s}})}reconnectSession(t){return h(this,null,function*(){try{yield this.ocSession_AS.reconnectSession(t),yield this.loadSessions()}catch(s){throw this.pushConsoleMessage({type:"error",text:`Reconnect failed: ${f.getErrorMessageForDisplay(s)}`}),s}})}stopExecution(t){return h(this,null,function*(){try{yield this.ocSession_AS.stopExecution(t)}catch(s){throw this.pushConsoleMessage({type:"error",text:`Stop execution failed: ${f.getErrorMessageForDisplay(s)}`}),s}})}terminateSession(t){return h(this,null,function*(){try{yield this.ocSession_AS.terminateSession(t),yield this.loadSessions()}catch(s){throw this.pushConsoleMessage({type:"error",text:`Terminate failed: ${f.getErrorMessageForDisplay(s)}`}),s}})}setSessionArchived(t){return h(this,null,function*(){try{yield this.ocSession_AS.setSessionArchived(t),yield this.loadSessions()}catch(s){throw this.pushConsoleMessage({type:"error",text:`Archive failed: ${f.getErrorMessageForDisplay(s)}`}),s}})}updateSessionConfig(t){return h(this,null,function*(){try{yield this.ocSession_AS.updateSessionConfig(t);let s=this.selectedSession_$();if(s?.session.sessionId===t.sessionId){let e=w({},s.session);t.mode!=null&&(e.mode=t.mode),t.reasoningEffort!=null&&(e.reasoningEffort=t.reasoningEffort),t.openclawAgentName!=null&&(e.openclawAgentName=t.openclawAgentName),this.selectedSession_$.set($(w({},s),{session:e}))}}catch(s){throw this.pushConsoleMessage({type:"error",text:`Config update failed: ${f.getErrorMessageForDisplay(s)}`}),s}})}setActiveSessionId(t){let s=this.activeSessionId_$();s&&s!==t&&this.socket_CS.emit("oc-session:unsubscribe",{sessionId:s}),this.activeSessionId_$.set(t),t&&this.socket_CS.emit("oc-session:subscribe",{sessionId:t})}clearLiveOutput(){this.stopChatPolling(),this.consoleMessages_$.set([]),this.sessionUsage_$.set({inputTokens:0,outputTokens:0,costUsd:0}),this.lastKnownEventSequence=-1}allocateConsoleListKey(){return globalThis.crypto.randomUUID()}pushConsoleMessage(t){let s=t.type==="assistant"||t.type==="prompt"?t.text.trim():t.text,e={listKey:t.listKey??this.allocateConsoleListKey(),type:t.type,text:s,timestamp:t.timestamp??new Date().toISOString(),expandableContent:t.expandableContent,rawData:t.rawData},n=this.consoleMessages_$();this.consoleMessages_$.set([...n,e])}static CHAT_POLL_INTERVAL_MS=5*C.second;static DETAIL_POLL_INTERVAL_MS=10*C.second;startChatPolling(){this.stopChatPolling(),this.chatPollHandle=setInterval(()=>{this.pollChatHistory()},l.CHAT_POLL_INTERVAL_MS),this.detailPollHandle=setInterval(()=>{let t=this.activeSessionId_$();t&&this.loadSessionDetail({sessionId:t,isSilent:!0})},l.DETAIL_POLL_INTERVAL_MS)}stopChatPolling(){this.chatPollHandle&&(clearInterval(this.chatPollHandle),this.chatPollHandle=null),this.detailPollHandle&&(clearInterval(this.detailPollHandle),this.detailPollHandle=null),this.lastPolledHistoryFingerprint=""}computeGatewayHistoryFingerprint(t){let s=t.length;if(!s)return"0";let e=t[s-1],n=typeof e.id=="string"?e.id:typeof e.messageId=="string"?e.messageId:"",o=l.extractGatewayChatMessageTimestamp(e),i=this.extractTextFromMessage(e),a=400,r=i.length>a?i.slice(0,a):i;return`${s}${n}${o}${r}`}pollChatHistory(){return h(this,null,function*(){let t=this.activeSessionId_$(),s=this.activeInstanceId_$();if(!(!t||!s))try{let e=yield this.ocSession_AS.getGatewaySessionHistory({sessionId:t,instanceId:s}),n=Array.isArray(e.history)?e.history:[],o=this.computeGatewayHistoryFingerprint(n);if(o===this.lastPolledHistoryFingerprint)return;this.lastPolledHistoryFingerprint=o;let i=this.parseGatewayHistory(n);this.ngZone.run(()=>{this.consoleMessages_$.set(i)})}catch{}})}parseGatewayHistory(t){let s=[],e=new Map,n=[];for(let i of t){let a=i.content;if(Array.isArray(a))for(let r of a){let u=typeof r.type=="string"?r.type:"";if(u==="tool_use"||u==="toolCall"){let S=typeof r.id=="string"?r.id:"";S&&n.push(S)}if(u==="tool_result"){let S=typeof r.tool_use_id=="string"?r.tool_use_id:"";S&&e.set(S,this.extractTextFromContentBlock(r))}}}let o=0;for(let i of t){let a=typeof i.role=="string"?i.role:"";if(a==="toolResult"||a==="tool_result"){let r=this.extractTextFromMessage(i);o<n.length&&(e.set(n[o],r),o++)}}for(let i of t){let a=typeof i.role=="string"?i.role:"unknown",r=i.content,u=l.extractGatewayChatMessageTimestamp(i);if(a==="toolResult"||a==="tool_result")continue;if(typeof r=="string"){s.push({listKey:this.allocateConsoleListKey(),type:a==="user"||a==="human"?"prompt":a==="assistant"?"assistant":"info",text:r,timestamp:u,rawData:i});continue}if(Array.isArray(r)){for(let c of r){let v=typeof c.type=="string"?c.type:"";if(v==="text")s.push({listKey:this.allocateConsoleListKey(),type:a==="user"||a==="human"?"prompt":"assistant",text:typeof c.text=="string"?c.text:"",timestamp:u,rawData:{_block:c,_message:{role:a,timestamp:u,contentBlockCount:r.length}}});else if(v==="tool_use"||v==="toolCall"){let b=typeof c.name=="string"?c.name:"unknown tool",T=typeof c.id=="string"?c.id:"",m=c.input??c.arguments,A=e.get(T);s.push({listKey:this.allocateConsoleListKey(),type:"tool",text:`${b}
@@ -6,4 +6,4 @@ ${JSON.stringify(m,null,2)}`,timestamp:u,expandableContent:A,rawData:{_block:c,_
6
6
  `):A=JSON.stringify(c,null,2),s.push({listKey:this.allocateConsoleListKey(),type:"tool-result",text:A,timestamp:u,rawData:{_block:c}})}}else v==="thinking"?s.push({listKey:this.allocateConsoleListKey(),type:"info",text:typeof c.thinking=="string"?c.thinking:JSON.stringify(c,null,2),timestamp:u,rawData:{_block:c}}):s.push({listKey:this.allocateConsoleListKey(),type:"info",text:JSON.stringify(c,null,2),timestamp:u,rawData:{_block:c}})}continue}let S=typeof i.text=="string"?i.text:typeof i.message=="string"?i.message:JSON.stringify(i,null,2);s.push({listKey:this.allocateConsoleListKey(),type:a==="user"||a==="human"?"prompt":a==="assistant"?"assistant":a==="tool"||a==="tool_result"||a==="tool_use"?"tool":"info",text:S,timestamp:u,rawData:i})}return s}backfillMissedEvents(){return h(this,null,function*(){let t=this.activeSessionId_$();if(!(!t||this.lastKnownEventSequence<0))try{let e=(yield this.ocSession_AS.getSessionEvents({sessionId:t,sinceSequence:this.lastKnownEventSequence})).events;if(!e.length)return;this.ngZone.run(()=>{let n=this.selectedSessionEvents_$();this.selectedSessionEvents_$.set([...n,...e]);for(let o of e)this.pushConsoleMessageFromEvent(o);this.updateLastKnownSequence(e)})}catch(s){C.DyFM_Log.warn("CCAP_OcSession_DS | backfill failed",s)}})}updateLastKnownSequence(t){for(let s of t)s.sequence>this.lastKnownEventSequence&&(this.lastKnownEventSequence=s.sequence)}handleSocketEvent(t){let s=t.event,e=t.payload;try{this.ngZone.run(()=>{switch(s){case"oc-session:status":this.handleStatusUpdate(e);break;case"oc-session:output":this.handleOutputChunk(e);break;case"oc-session:event":this.handleSessionEvent(e);break;case"oc-session:list-update":this.handleListUpdate(e);break;case"ext-session-msg:message":this.handleAssembledMessage(e);break;case"ext-session-msg:update":this.handleAssembledMessageUpdate(e);break}})}catch(n){C.DyFM_Log.error(`CCAP_OcSession_DS | socket event error | event: ${s}`,n)}}handleStatusUpdate(t){let s=t.sessionId??"",e=t.status??"",n=t.statusMessage;this.lastStatusUpdate_$.set({sessionId:s,status:e,statusMessage:n});let i=this.sessions_$().map(r=>r.sessionId===s?$(w({},r),{status:e,statusMessage:n}):r);this.sessions_$.set(i);let a=this.selectedSession_$();if(a?.session.sessionId===s){let r=e==="running"||e==="waiting-input";this.selectedSession_$.set($(w({},a),{session:$(w({},a.session),{status:e,statusMessage:n}),runtime:$(w({},a.runtime),{isLive:r,runtimeStatus:e})}))}if(e==="errored"){let r=n?`OC Session error (${s}): ${n}`:`OC Session error (${s}): session entered errored state`;this.globalError_CS.showError(new Error(r),"oc-session-status")}}handleOutputChunk(t){let s=t.sessionId??"";if(s&&s!==this.activeSessionId_$())return;let e=t.content??"",n=t.type??"response";e&&this.pushConsoleMessage({type:n==="error"?"error":"assistant",text:e})}handleSessionEvent(t){let s=t.sessionId??"";if(s&&s!==this.activeSessionId_$())return;let e=t.event??{},n={sessionId:s,eventType:e.eventType??"",timestamp:e.timestamp??"",data:e.data??{},sequence:e.sequence??0};if(n.sequence<=this.lastKnownEventSequence)return;this.lastKnownEventSequence=n.sequence;let o=this.selectedSessionEvents_$();this.selectedSessionEvents_$.set([...o,n]),this.pushConsoleMessageFromEvent(n)}handleListUpdate(t){this.loadSessions().catch(()=>{})}extractTextFromContentBlock(t){let s=t.content;return typeof s=="string"?s:Array.isArray(s)?s.map(e=>typeof e.text=="string"?e.text:JSON.stringify(e,null,2)).join(`
7
7
  `):typeof t.text=="string"?t.text:JSON.stringify(t,null,2)}extractTextFromMessage(t){let s=t.content;return typeof s=="string"?s:Array.isArray(s)?s.map(e=>typeof e.text=="string"?e.text:JSON.stringify(e,null,2)).join(`
8
8
  `):JSON.stringify(t,null,2)}pushConsoleMessageFromEvent(t){let s=t.data;switch(t.eventType){case"response-chunk":{let e=typeof s.content=="string"?s.content:"";e&&this.pushConsoleMessage({type:"assistant",text:e});break}case"response-complete":{let e=s.usage;if(e&&typeof e=="object"){let n=e,o=this.sessionUsage_$();this.sessionUsage_$.set({inputTokens:o.inputTokens+(typeof n.inputTokens=="number"?n.inputTokens:0),outputTokens:o.outputTokens+(typeof n.outputTokens=="number"?n.outputTokens:0),costUsd:o.costUsd+(typeof n.costUsd=="number"?n.costUsd:0)})}break}case"tool-call-start":{let e=typeof s.name=="string"?s.name:"unknown",n=s.input,o=n?this.summarizeToolInput(n):"",i=o?`${e}: ${o}`:e;this.pushConsoleMessage({type:"tool",text:i,rawData:s});break}case"tool-call-end":{let e=s.content??s.output,n=typeof e=="string"?e:JSON.stringify(e??{});this.pushConsoleMessage({type:"tool-result",text:n.length>200?n.substring(0,200)+"\u2026":n,expandableContent:n.length>200?n:void 0,rawData:s});break}case"error":{let e=s.message??s.content;typeof e=="string"&&e&&this.pushConsoleMessage({type:"error",text:e});break}case"connection-change":{let e=typeof s.state=="string"?s.state:"";e&&this.pushConsoleMessage({type:"info",text:`Gateway connection: ${e}`,rawData:s});break}default:break}}summarizeToolInput(t){if(typeof t=="string")return t.length>80?t.substring(0,80)+"\u2026":t;if(typeof t=="object"&&t!==null){let s=JSON.stringify(t);return s.length>80?s.substring(0,80)+"\u2026":s}return""}static extractGatewayChatMessageTimestamp(t){return I.extractTimestamp(t,I.GATEWAY_CHAT_MESSAGE_TIMESTAMP_FIELD_NAMES)??""}loadAssembledMessages(t){return h(this,null,function*(){try{let s=yield this.extSessionMsg_AS.getMessages({sessionId:t.sessionId,latest:!0});this.assembledMessages_$.set(s.messages)}catch(s){C.DyFM_Log.error(`CCAP_OcSession_DS | loadAssembledMessages failed | sessionId: ${t.sessionId}`,s)}})}handleAssembledMessage(t){let s=typeof t.sessionId=="string"?t.sessionId:"";if(!s||s!==this.activeSessionId_$())return;let e=t.message;if(!e||typeof e!="object")return;let n=e,o=this.assembledMessages_$();this.assembledMessages_$.set([...o,n])}handleAssembledMessageUpdate(t){let s=typeof t.sessionId=="string"?t.sessionId:"";if(!s||s!==this.activeSessionId_$())return;let e=typeof t.messageKey=="string"?t.messageKey:"";if(!e)return;let n=t.update;if(!n||typeof n!="object")return;let o=n,i=this.assembledMessages_$(),a=i.findIndex(S=>S.messageKey===e);if(a<0)return;let r=w({},i[a]);typeof o.bodyText=="string"&&(r.bodyText=o.bodyText),o.toolResult!==void 0&&(r.toolResult=o.toolResult),typeof o.toolStatus=="string"&&(r.toolStatus=o.toolStatus),o.headerStatusDot!==void 0&&(r.headerStatusDot=typeof o.headerStatusDot=="string"?o.headerStatusDot:void 0);let u=[...i];u[a]=r,this.assembledMessages_$.set(u)}static \u0275fac=function(s){return new(s||l)};static \u0275prov=M({token:l,factory:l.\u0275fac,providedIn:"root"})}return l})();export{I as a,lt as b};
9
- //# sourceMappingURL=chunk-DDRFKBEB.js.map
9
+ //# sourceMappingURL=chunk-M2VDKALL.js.map
@@ -1,2 +1,2 @@
1
- import{I as p}from"./chunk-37AFYV4M.js";import{C as l,G as h,aa as a,hb as b,k as i,p as o,xb as d,y as n}from"./chunk-TBMJSIBB.js";var g=(()=>{class r{http=l(d);baseUrl=`${p.api.baseUrl}/sch`;listJobs(){return o(this.http.get(`${this.baseUrl}/jobs`))}getJob(e){return o(this.http.get(`${this.baseUrl}/jobs/${e}`))}createJob(e){return o(this.http.post(`${this.baseUrl}/jobs`,e))}updateJob(e,t){return o(this.http.patch(`${this.baseUrl}/jobs/${e}`,t))}deleteJob(e){return o(this.http.delete(`${this.baseUrl}/jobs/${e}`))}enableJob(e){return o(this.http.post(`${this.baseUrl}/jobs/${e}/enable`,{}))}disableJob(e){return o(this.http.post(`${this.baseUrl}/jobs/${e}/disable`,{}))}pauseJob(e){return o(this.http.post(`${this.baseUrl}/jobs/${e}/pause`,{}))}resumeJob(e){return o(this.http.post(`${this.baseUrl}/jobs/${e}/resume`,{}))}triggerNow(e){let t=[];e.bypass&&t.push("bypass=true"),e.forcePolicy&&t.push(`forcePolicy=${encodeURIComponent(e.forcePolicy)}`),e.dryRun&&t.push("dryRun=true");let s=t.length?`?${t.join("&")}`:"";return o(this.http.post(`${this.baseUrl}/jobs/${e.jobId}/trigger-now${s}`,{reason:e.reason}))}listExecutions(e){let t=[];e.jobId&&t.push(`jobId=${encodeURIComponent(e.jobId)}`),e.status&&t.push(`status=${encodeURIComponent(e.status)}`),e.targetSessionId&&t.push(`targetSessionId=${encodeURIComponent(e.targetSessionId)}`),e.from&&t.push(`from=${encodeURIComponent(e.from)}`),e.to&&t.push(`to=${encodeURIComponent(e.to)}`);let s=t.length?`?${t.join("&")}`:"";return o(this.http.get(`${this.baseUrl}/executions${s}`))}getExecution(e){return o(this.http.get(`${this.baseUrl}/executions/${e}`))}getDefaults(){return o(this.http.get(`${this.baseUrl}/defaults`))}applyDefaults(){return o(this.http.post(`${this.baseUrl}/defaults/apply`,{}))}static \u0275fac=function(t){return new(t||r)};static \u0275prov=n({token:r,factory:r.\u0275fac,providedIn:"root"})}return r})();var F=(()=>{class r{jobs_AS=l(g);jobs_$=a([]);recentExecutions_$=a(new Map);isLoading_$=a(!1);errorMessage_$=a(null);scheduledSessionIds_$=b(()=>{let e=new Set;for(let t of this.jobs_$()){if(t.enabled===!1)continue;let s=t.target?.payload?.sessionId?.trim();s&&e.add(s)}return e});loadAll(){return i(this,null,function*(){this.isLoading_$.set(!0),this.errorMessage_$.set(null);try{let t=(yield this.jobs_AS.listJobs()).jobs??[];this.jobs_$.set(t),this.loadRecentExecutionsForJobs(t)}catch(e){this.errorMessage_$.set(e?.message??"Failed to load scheduler jobs")}finally{this.isLoading_$.set(!1)}})}loadRecentExecutionsForJobs(e){return i(this,null,function*(){let t=new Map;try{let $=(yield this.jobs_AS.listExecutions({})).executions??[];for(let j of e){let c=j._id??"";if(!c)continue;let y=$.filter(u=>u.jobId===c).sort((u,m)=>(m.scheduledAt??"").localeCompare(u.scheduledAt??"")).slice(0,10);t.set(c,y)}}catch{}this.recentExecutions_$.set(t)})}getJob(e){return i(this,null,function*(){try{return(yield this.jobs_AS.getJob(e)).job}catch(t){return this.errorMessage_$.set(t?.message??"Failed to load job"),null}})}create(e){return i(this,null,function*(){try{let t=yield this.jobs_AS.createJob(e);return yield this.loadAll(),t.job}catch(t){return this.errorMessage_$.set(t?.message??"Failed to create job"),null}})}update(e,t){return i(this,null,function*(){try{let s=yield this.jobs_AS.updateJob(e,t);return yield this.loadAll(),s.job}catch(s){return this.errorMessage_$.set(s?.message??"Failed to update job"),null}})}remove(e){return i(this,null,function*(){try{let t=yield this.jobs_AS.deleteJob(e);return yield this.loadAll(),t.deleted}catch(t){return this.errorMessage_$.set(t?.message??"Failed to delete job"),!1}})}toggleEnabled(e,t){return i(this,null,function*(){try{t?yield this.jobs_AS.enableJob(e):yield this.jobs_AS.disableJob(e),yield this.loadAll()}catch(s){this.errorMessage_$.set(s?.message??"Failed to toggle enabled state")}})}togglePaused(e,t){return i(this,null,function*(){try{t?yield this.jobs_AS.pauseJob(e):yield this.jobs_AS.resumeJob(e),yield this.loadAll()}catch(s){this.errorMessage_$.set(s?.message??"Failed to toggle paused state")}})}triggerNow(e){return i(this,null,function*(){try{return(yield this.jobs_AS.triggerNow(e)).triggered}catch(t){return this.errorMessage_$.set(t?.message??"Failed to trigger job"),!1}})}listExecutions(e){return i(this,null,function*(){try{return(yield this.jobs_AS.listExecutions({jobId:e.jobId})).executions??[]}catch(t){return this.errorMessage_$.set(t?.message??"Failed to load executions"),[]}})}getDefaults(){return i(this,null,function*(){try{return(yield this.jobs_AS.getDefaults()).defaults}catch(e){return this.errorMessage_$.set(e?.message??"Failed to load defaults"),null}})}static \u0275fac=function(t){return new(t||r)};static \u0275prov=n({token:r,factory:r.\u0275fac,providedIn:"root"})}return r})();var E=(()=>{class r{transform(e){if(!e||!e.preset)return"\u2014";let t=e.preset,s=e.intervalValue;if(s===void 0||!isFinite(s))return t;switch(t){case"every-n-minutes":return`every ${s} minutes`;case"every-n-hours":return`every ${s} hours`;case"every-n-days":return`every ${s} days`;case"windowed-interval":return`every ${s} min (window)`;default:return t}}static \u0275fac=function(t){return new(t||r)};static \u0275pipe=h({name:"schSchedulePresetLabel",type:r,pure:!0,standalone:!0})}return r})();export{F as a,E as b};
2
- //# sourceMappingURL=chunk-XWEW3BLS.js.map
1
+ import{I as p}from"./chunk-BV6QDXRW.js";import{C as l,G as h,aa as a,hb as b,k as i,p as o,xb as d,y as n}from"./chunk-TBMJSIBB.js";var g=(()=>{class r{http=l(d);baseUrl=`${p.api.baseUrl}/sch`;listJobs(){return o(this.http.get(`${this.baseUrl}/jobs`))}getJob(e){return o(this.http.get(`${this.baseUrl}/jobs/${e}`))}createJob(e){return o(this.http.post(`${this.baseUrl}/jobs`,e))}updateJob(e,t){return o(this.http.patch(`${this.baseUrl}/jobs/${e}`,t))}deleteJob(e){return o(this.http.delete(`${this.baseUrl}/jobs/${e}`))}enableJob(e){return o(this.http.post(`${this.baseUrl}/jobs/${e}/enable`,{}))}disableJob(e){return o(this.http.post(`${this.baseUrl}/jobs/${e}/disable`,{}))}pauseJob(e){return o(this.http.post(`${this.baseUrl}/jobs/${e}/pause`,{}))}resumeJob(e){return o(this.http.post(`${this.baseUrl}/jobs/${e}/resume`,{}))}triggerNow(e){let t=[];e.bypass&&t.push("bypass=true"),e.forcePolicy&&t.push(`forcePolicy=${encodeURIComponent(e.forcePolicy)}`),e.dryRun&&t.push("dryRun=true");let s=t.length?`?${t.join("&")}`:"";return o(this.http.post(`${this.baseUrl}/jobs/${e.jobId}/trigger-now${s}`,{reason:e.reason}))}listExecutions(e){let t=[];e.jobId&&t.push(`jobId=${encodeURIComponent(e.jobId)}`),e.status&&t.push(`status=${encodeURIComponent(e.status)}`),e.targetSessionId&&t.push(`targetSessionId=${encodeURIComponent(e.targetSessionId)}`),e.from&&t.push(`from=${encodeURIComponent(e.from)}`),e.to&&t.push(`to=${encodeURIComponent(e.to)}`);let s=t.length?`?${t.join("&")}`:"";return o(this.http.get(`${this.baseUrl}/executions${s}`))}getExecution(e){return o(this.http.get(`${this.baseUrl}/executions/${e}`))}getDefaults(){return o(this.http.get(`${this.baseUrl}/defaults`))}applyDefaults(){return o(this.http.post(`${this.baseUrl}/defaults/apply`,{}))}static \u0275fac=function(t){return new(t||r)};static \u0275prov=n({token:r,factory:r.\u0275fac,providedIn:"root"})}return r})();var F=(()=>{class r{jobs_AS=l(g);jobs_$=a([]);recentExecutions_$=a(new Map);isLoading_$=a(!1);errorMessage_$=a(null);scheduledSessionIds_$=b(()=>{let e=new Set;for(let t of this.jobs_$()){if(t.enabled===!1)continue;let s=t.target?.payload?.sessionId?.trim();s&&e.add(s)}return e});loadAll(){return i(this,null,function*(){this.isLoading_$.set(!0),this.errorMessage_$.set(null);try{let t=(yield this.jobs_AS.listJobs()).jobs??[];this.jobs_$.set(t),this.loadRecentExecutionsForJobs(t)}catch(e){this.errorMessage_$.set(e?.message??"Failed to load scheduler jobs")}finally{this.isLoading_$.set(!1)}})}loadRecentExecutionsForJobs(e){return i(this,null,function*(){let t=new Map;try{let $=(yield this.jobs_AS.listExecutions({})).executions??[];for(let j of e){let c=j._id??"";if(!c)continue;let y=$.filter(u=>u.jobId===c).sort((u,m)=>(m.scheduledAt??"").localeCompare(u.scheduledAt??"")).slice(0,10);t.set(c,y)}}catch{}this.recentExecutions_$.set(t)})}getJob(e){return i(this,null,function*(){try{return(yield this.jobs_AS.getJob(e)).job}catch(t){return this.errorMessage_$.set(t?.message??"Failed to load job"),null}})}create(e){return i(this,null,function*(){try{let t=yield this.jobs_AS.createJob(e);return yield this.loadAll(),t.job}catch(t){return this.errorMessage_$.set(t?.message??"Failed to create job"),null}})}update(e,t){return i(this,null,function*(){try{let s=yield this.jobs_AS.updateJob(e,t);return yield this.loadAll(),s.job}catch(s){return this.errorMessage_$.set(s?.message??"Failed to update job"),null}})}remove(e){return i(this,null,function*(){try{let t=yield this.jobs_AS.deleteJob(e);return yield this.loadAll(),t.deleted}catch(t){return this.errorMessage_$.set(t?.message??"Failed to delete job"),!1}})}toggleEnabled(e,t){return i(this,null,function*(){try{t?yield this.jobs_AS.enableJob(e):yield this.jobs_AS.disableJob(e),yield this.loadAll()}catch(s){this.errorMessage_$.set(s?.message??"Failed to toggle enabled state")}})}togglePaused(e,t){return i(this,null,function*(){try{t?yield this.jobs_AS.pauseJob(e):yield this.jobs_AS.resumeJob(e),yield this.loadAll()}catch(s){this.errorMessage_$.set(s?.message??"Failed to toggle paused state")}})}triggerNow(e){return i(this,null,function*(){try{return(yield this.jobs_AS.triggerNow(e)).triggered}catch(t){return this.errorMessage_$.set(t?.message??"Failed to trigger job"),!1}})}listExecutions(e){return i(this,null,function*(){try{return(yield this.jobs_AS.listExecutions({jobId:e.jobId})).executions??[]}catch(t){return this.errorMessage_$.set(t?.message??"Failed to load executions"),[]}})}getDefaults(){return i(this,null,function*(){try{return(yield this.jobs_AS.getDefaults()).defaults}catch(e){return this.errorMessage_$.set(e?.message??"Failed to load defaults"),null}})}static \u0275fac=function(t){return new(t||r)};static \u0275prov=n({token:r,factory:r.\u0275fac,providedIn:"root"})}return r})();var E=(()=>{class r{transform(e){if(!e||!e.preset)return"\u2014";let t=e.preset,s=e.intervalValue;if(s===void 0||!isFinite(s))return t;switch(t){case"every-n-minutes":return`every ${s} minutes`;case"every-n-hours":return`every ${s} hours`;case"every-n-days":return`every ${s} days`;case"windowed-interval":return`every ${s} min (window)`;default:return t}}static \u0275fac=function(t){return new(t||r)};static \u0275pipe=h({name:"schSchedulePresetLabel",type:r,pure:!0,standalone:!0})}return r})();export{F as a,E as b};
2
+ //# sourceMappingURL=chunk-MYK7GACV.js.map
@@ -1,4 +1,4 @@
1
- import{c as Tl}from"./chunk-LRT6KDL6.js";import{a as he,b as _e,c as Ol,e as $a,h as Xa,j as Il,k as zo,l as Wo,m as Yo,o as Fl,p as vt}from"./chunk-37AFYV4M.js";import{F as Va,a as j,b as Z,c as Ka,f,h as ge,i as fe,k as Se}from"./chunk-TBMJSIBB.js";var Ht=f(Je=>{"use strict";Object.defineProperty(Je,"__esModule",{value:!0});Je.DyNM_allButtonNewBorderRadius=Je.DyNM_ButtonNewBorderRadius=void 0;var qo=function(e){return e.full="full",e.rounded="rounded",e.smallRadius="smallRadius",e.square="square",e}(qo||(Je.DyNM_ButtonNewBorderRadius=qo={}));Je.DyNM_allButtonNewBorderRadius=Object.values(qo)});var Ut=f(Qe=>{"use strict";Object.defineProperty(Qe,"__esModule",{value:!0});Qe.DyNM_allButtonNewSizes=Qe.DyNM_ButtonNewSize=void 0;var Zo=function(e){return e.xs="xs",e.small="small",e.medium="medium",e.large="large",e.xl="xl",e}(Zo||(Qe.DyNM_ButtonNewSize=Zo={}));Qe.DyNM_allButtonNewSizes=Object.values(Zo)});var Kt=f(et=>{"use strict";Object.defineProperty(et,"__esModule",{value:!0});et.DyNM_allButtonNewStyleTypes=et.DyNM_ButtonNewStyleType=void 0;var Jo=function(e){return e.filled="filled",e.stroked="stroked",e.outstanding="outstanding",e.tonal="tonal",e.backgroundless="backgroundless",e}(Jo||(et.DyNM_ButtonNewStyleType=Jo={}));et.DyNM_allButtonNewStyleTypes=Object.values(Jo)});var St=f(tt=>{"use strict";Object.defineProperty(tt,"__esModule",{value:!0});tt.DyNM_allMaterialColors=tt.DyNM_MaterialColor=void 0;var Qo=function(e){return e.primary="primary",e.accent="accent",e.warn="warn",e.none="",e}(Qo||(tt.DyNM_MaterialColor=Qo={}));tt.DyNM_allMaterialColors=Object.values(Qo)});var ti=f(nt=>{"use strict";Object.defineProperty(nt,"__esModule",{value:!0});nt.DyNM_allButtonNewIconStyleTypes=nt.DyNM_ButtonNewIconStyleType=void 0;var ei=function(e){return e.rounded="rounded",e.outlined="outlined",e}(ei||(nt.DyNM_ButtonNewIconStyleType=ei={}));nt.DyNM_allButtonNewIconStyleTypes=Object.values(ei)});var oi=f(Vt=>{"use strict";Object.defineProperty(Vt,"__esModule",{value:!0});Vt.DyNM_ButtonNewStyle_Settings=void 0;var kl=Ht(),ja=ti(),Ll=Ut(),Gl=Kt(),Hl=St(),ni=class{size=Ll.DyNM_ButtonNewSize.medium;color=Hl.DyNM_MaterialColor.primary;styleType=Gl.DyNM_ButtonNewStyleType.filled;borderRadius=kl.DyNM_ButtonNewBorderRadius.smallRadius;isIconButton;iconFill;iconStyle=ja.DyNM_ButtonNewIconStyleType.rounded;constructor(t){t&&Object.assign(this,t),this.isIconButton&&!this.iconStyle&&(this.iconStyle=ja.DyNM_ButtonNewIconStyleType.rounded)}};Vt.DyNM_ButtonNewStyle_Settings=ni});var Wa=f($t=>{"use strict";Object.defineProperty($t,"__esModule",{value:!0});$t.DyNM_ButtonNewStyleSettingsPresets=void 0;var Le=Ht(),z=Ut(),Q=Kt(),za=St(),K=oi();$t.DyNM_ButtonNewStyleSettingsPresets={xs:new K.DyNM_ButtonNewStyle_Settings({size:z.DyNM_ButtonNewSize.xs}),xsIcon:new K.DyNM_ButtonNewStyle_Settings({size:z.DyNM_ButtonNewSize.xs,isIconButton:!0}),xsRounded:new K.DyNM_ButtonNewStyle_Settings({size:z.DyNM_ButtonNewSize.xs,borderRadius:Le.DyNM_ButtonNewBorderRadius.rounded}),xsStroked:new K.DyNM_ButtonNewStyle_Settings({size:z.DyNM_ButtonNewSize.xs,styleType:Q.DyNM_ButtonNewStyleType.stroked}),xsStrokedIcon:new K.DyNM_ButtonNewStyle_Settings({size:z.DyNM_ButtonNewSize.xs,styleType:Q.DyNM_ButtonNewStyleType.stroked,isIconButton:!0}),xsBackgroundlessIcon:new K.DyNM_ButtonNewStyle_Settings({size:z.DyNM_ButtonNewSize.xs,styleType:Q.DyNM_ButtonNewStyleType.backgroundless,isIconButton:!0}),xsRoundedTonal:new K.DyNM_ButtonNewStyle_Settings({size:z.DyNM_ButtonNewSize.xs,borderRadius:Le.DyNM_ButtonNewBorderRadius.rounded,styleType:Q.DyNM_ButtonNewStyleType.tonal}),small:new K.DyNM_ButtonNewStyle_Settings({size:z.DyNM_ButtonNewSize.small}),smallIcon:new K.DyNM_ButtonNewStyle_Settings({isIconButton:!0,size:z.DyNM_ButtonNewSize.small}),smallStrokedIcon:new K.DyNM_ButtonNewStyle_Settings({styleType:Q.DyNM_ButtonNewStyleType.stroked,isIconButton:!0,size:z.DyNM_ButtonNewSize.small}),smallTonalIcon:new K.DyNM_ButtonNewStyle_Settings({styleType:Q.DyNM_ButtonNewStyleType.tonal,isIconButton:!0,size:z.DyNM_ButtonNewSize.small}),smallRounded:new K.DyNM_ButtonNewStyle_Settings({borderRadius:Le.DyNM_ButtonNewBorderRadius.rounded,size:z.DyNM_ButtonNewSize.small}),smallStroked:new K.DyNM_ButtonNewStyle_Settings({styleType:Q.DyNM_ButtonNewStyleType.stroked,size:z.DyNM_ButtonNewSize.small}),smallTonal:new K.DyNM_ButtonNewStyle_Settings({styleType:Q.DyNM_ButtonNewStyleType.tonal,size:z.DyNM_ButtonNewSize.small}),smallRoundedTonal:new K.DyNM_ButtonNewStyle_Settings({borderRadius:Le.DyNM_ButtonNewBorderRadius.rounded,styleType:Q.DyNM_ButtonNewStyleType.tonal,size:z.DyNM_ButtonNewSize.small}),smallStrokedRounded:new K.DyNM_ButtonNewStyle_Settings({styleType:Q.DyNM_ButtonNewStyleType.stroked,borderRadius:Le.DyNM_ButtonNewBorderRadius.rounded,size:z.DyNM_ButtonNewSize.small}),smallBackgroundless:new K.DyNM_ButtonNewStyle_Settings({styleType:Q.DyNM_ButtonNewStyleType.backgroundless,size:z.DyNM_ButtonNewSize.small}),icon:new K.DyNM_ButtonNewStyle_Settings({isIconButton:!0}),backgroundlessSmallIconUnset:new K.DyNM_ButtonNewStyle_Settings({styleType:Q.DyNM_ButtonNewStyleType.backgroundless,isIconButton:!0,size:z.DyNM_ButtonNewSize.small,color:""}),backgroundlessIconUnset:new K.DyNM_ButtonNewStyle_Settings({styleType:Q.DyNM_ButtonNewStyleType.backgroundless,isIconButton:!0,color:""}),smallBackgroundlessIcon:new K.DyNM_ButtonNewStyle_Settings({styleType:Q.DyNM_ButtonNewStyleType.backgroundless,isIconButton:!0,size:z.DyNM_ButtonNewSize.small}),strokedIcon:new K.DyNM_ButtonNewStyle_Settings({styleType:Q.DyNM_ButtonNewStyleType.stroked,isIconButton:!0}),backgroundlessIcon:new K.DyNM_ButtonNewStyle_Settings({styleType:Q.DyNM_ButtonNewStyleType.backgroundless,isIconButton:!0}),accent:new K.DyNM_ButtonNewStyle_Settings({color:za.DyNM_MaterialColor.accent}),strokedAccent:new K.DyNM_ButtonNewStyle_Settings({styleType:Q.DyNM_ButtonNewStyleType.stroked,color:za.DyNM_MaterialColor.accent}),stroked:new K.DyNM_ButtonNewStyle_Settings({styleType:Q.DyNM_ButtonNewStyleType.stroked}),round:new K.DyNM_ButtonNewStyle_Settings({borderRadius:Le.DyNM_ButtonNewBorderRadius.rounded}),strokedRound:new K.DyNM_ButtonNewStyle_Settings({styleType:Q.DyNM_ButtonNewStyleType.stroked,borderRadius:Le.DyNM_ButtonNewBorderRadius.rounded}),large:new K.DyNM_ButtonNewStyle_Settings({size:z.DyNM_ButtonNewSize.large}),largeStroked:new K.DyNM_ButtonNewStyle_Settings({styleType:Q.DyNM_ButtonNewStyleType.stroked,size:z.DyNM_ButtonNewSize.large}),largeStrokedRound:new K.DyNM_ButtonNewStyle_Settings({styleType:Q.DyNM_ButtonNewStyleType.stroked,borderRadius:Le.DyNM_ButtonNewBorderRadius.rounded,size:z.DyNM_ButtonNewSize.large}),largeTonal:new K.DyNM_ButtonNewStyle_Settings({styleType:Q.DyNM_ButtonNewStyleType.tonal,size:z.DyNM_ButtonNewSize.large}),largeIcon:new K.DyNM_ButtonNewStyle_Settings({isIconButton:!0,size:z.DyNM_ButtonNewSize.large}),largeStrokedIcon:new K.DyNM_ButtonNewStyle_Settings({styleType:Q.DyNM_ButtonNewStyleType.stroked,isIconButton:!0,size:z.DyNM_ButtonNewSize.large}),xl:new K.DyNM_ButtonNewStyle_Settings({size:z.DyNM_ButtonNewSize.xl}),xlIcon:new K.DyNM_ButtonNewStyle_Settings({size:z.DyNM_ButtonNewSize.xl,isIconButton:!0})}});var ii=f(Xt=>{"use strict";Object.defineProperty(Xt,"__esModule",{value:!0});Xt.DyNM_Container_Type=void 0;var Ya=function(e){return e.card="card",e.accordion="accordion",e.dynamo="dynamo",e.dynamoSmall="dynamo-small",e.none="none",e}(Ya||(Xt.DyNM_Container_Type=Ya={}))});var ai=f(jt=>{"use strict";Object.defineProperty(jt,"__esModule",{value:!0});jt.DyNM_FieldAppearance=void 0;var qa=function(e){return e.fill="fill",e.outline="outline",e}(qa||(jt.DyNM_FieldAppearance=qa={}))});var si=f(zt=>{"use strict";Object.defineProperty(zt,"__esModule",{value:!0});zt.DyNM_Storage_Type=void 0;var Za=function(e){return e.session="session",e.local="local",e.none="",e}(Za||(zt.DyNM_Storage_Type=Za={}))});var Qa=f(Wt=>{"use strict";Object.defineProperty(Wt,"__esModule",{value:!0});Wt.DyNM_global_settings=void 0;var Ul=ii(),Kl=ai(),Ja=si();Wt.DyNM_global_settings={fieldAppearance:Kl.DyNM_FieldAppearance.outline,baseUrl:"/api",usageEndpoints:{startSession:"/usage/new-session",updateUsage:"/usage/update/{sessionId}",closeSession:"/usage/close-session/{sessionId}",getUsageData:"/usage/get/all"},alwaysLookForFieldAdder:!1,fieldErrorMessages:{required:"This field is required",email:"This is not a valid email format",mask:"This is not a valid format"},defaultStorage:Ja.DyNM_Storage_Type.session,storageEncryptionKey:"DEFAULT_DyFM_ENCRYPTION_KEY_CHANGE_THIS_XXXXXXX00000009999999999",defaultFormStorage:Ja.DyNM_Storage_Type.session,defaultFormContainerType:Ul.DyNM_Container_Type.none,formMessages:{required:"There are required fields to set!",invalid:"The form is not set correctly",submitSuccess:"Save was successful!",submitFailed:"Saving data has failed!"},questionDefaultOptions:{a:"No",b:"Yes"},fieldTooltipShowDelay:300,snackBarHideLabel:"Hide",log_settings:{api_calls:!0,messagesCS_debug:!1}}});var ri=f(Yt=>{"use strict";Object.defineProperty(Yt,"__esModule",{value:!0});Yt.DyNM_Button_Type=void 0;var es=function(e){return e.default="default",e.big="big",e.stroked="stroked",e.bigStroked="big-stroked",e.small="small",e.smallStroked="small-stroked",e.round="round",e.strokedRound="stroked-round",e.bigStrokedRound="big-stroked-round",e.block="block",e.bigBlock="big-block",e.strokedBlock="stroked-block",e.bigStrokedBlock="big-stroked-block",e.outstanding="outstanding",e.icon="icon",e.iconSmall="icon-small",e.iconBig="icon-big",e.iconStroked="icon-stroked",e.iconSmallStroked="icon-small-stroked",e.iconBigStroked="icon-big-stroked",e.iconOutstanding="icon-outstanding",e}(es||(Yt.DyNM_Button_Type=es={}))});var ns=f(qt=>{"use strict";Object.defineProperty(qt,"__esModule",{value:!0});qt.DyNM_CheckboxLabelPosition=void 0;var ts=function(e){return e.before="before",e.after="after",e}(ts||(qt.DyNM_CheckboxLabelPosition=ts={}))});var is=f(Zt=>{"use strict";Object.defineProperty(Zt,"__esModule",{value:!0});Zt.DyNM_Field_Type=void 0;var os=function(e){return e.spacer="spacer",e.checkbox="checkbox",e.toggle="toggle",e.text="text",e.textList="textList",e.password="password",e.textarea="textarea",e.richtextarea="richtextarea",e.number="number",e.numberRange="numberRange",e.slider="slider",e.sliderRange="sliderRange",e.select="select",e.multiselect="multiselect",e.chipSelect="chipSelect",e.chipMultiselect="chipMultiselect",e.radioSelect="radioSelect",e.date="date",e.dateRange="dateRange",e.dateTime="dateTime",e.dateTimeRange="dateTimeRange",e.file="file",e.files="files",e.picture="picture",e.pictures="pictures",e.fieldAdder="fieldAdder",e.multifield="multifield",e}(os||(Zt.DyNM_Field_Type=os={}))});var ss=f(Jt=>{"use strict";Object.defineProperty(Jt,"__esModule",{value:!0});Jt.DyNM_File_Type=void 0;var as=function(e){return e.arrayBuffer="arrayBuffer",e.binaryString="binaryString",e.dataUrl="dataUrl",e.text="text",e.blob="blob",e.file="file",e}(as||(Jt.DyNM_File_Type=as={}))});var ds=f(Qt=>{"use strict";Object.defineProperty(Qt,"__esModule",{value:!0});Qt.DyNM_FormAccess=void 0;var rs=function(e){return e.readOnly="read-only",e.writeOnly="write-only",e.readNWrite="read-n-write",e}(rs||(Qt.DyNM_FormAccess=rs={}))});var ls=f(en=>{"use strict";Object.defineProperty(en,"__esModule",{value:!0});en.DyNM_FormResetData=void 0;var cs=function(e){return e.null="null",e.empty="empty",e.default="deafult",e.dataHandler="data-handler",e.init="init",e.stored="stored",e}(cs||(en.DyNM_FormResetData=cs={}))});var us=f(tn=>{"use strict";Object.defineProperty(tn,"__esModule",{value:!0});tn.DyNM_FormStoreOn=void 0;var ms=function(e){return e.close="close",e.change="change",e}(ms||(tn.DyNM_FormStoreOn=ms={}))});var ci=f(ot=>{"use strict";Object.defineProperty(ot,"__esModule",{value:!0});ot.DyNM_allMaterialTooltipPositions=ot.DyNM_MaterialTooltipPosition=void 0;var di=function(e){return e.above="above",e.below="below",e.before="before",e.after="after",e.left="left",e.right="right",e}(di||(ot.DyNM_MaterialTooltipPosition=di={}));ot.DyNM_allMaterialTooltipPositions=Object.values(di)});var gs=f(nn=>{"use strict";Object.defineProperty(nn,"__esModule",{value:!0});nn.DyNM_PreconfiguredField_Type=void 0;var ps=function(e){return e.email="email",e.phone="phone",e}(ps||(nn.DyNM_PreconfiguredField_Type=ps={}))});var hs=f(on=>{"use strict";Object.defineProperty(on,"__esModule",{value:!0});on.DyNM_Validator_Type=void 0;var fs=function(e){return e.requiredCheckbox="requiredCheckbox",e}(fs||(on.DyNM_Validator_Type=fs={}))});var ys=f(it=>{"use strict";Object.defineProperty(it,"__esModule",{value:!0});it.DyNM_FXLayoutAlignPerDir=it.DyNM_FXLayoutAlignLayDir=void 0;var _s=function(e){return e.none="none",e.start="start",e.center="center",e.end="end",e.spaceAround="space-around",e.spaceBetween="space-between",e}(_s||(it.DyNM_FXLayoutAlignLayDir=_s={})),Cs=function(e){return e.none="none",e.start="start",e.center="center",e.end="end",e.stretch="stretch",e}(Cs||(it.DyNM_FXLayoutAlignPerDir=Cs={}))});var bs=f(an=>{"use strict";Object.defineProperty(an,"__esModule",{value:!0});an.DyNM_FXLayout=void 0;var xs=function(e){return e.row="row",e.column="column",e}(xs||(an.DyNM_FXLayout=xs={}))});var Ss=f(sn=>{"use strict";Object.defineProperty(sn,"__esModule",{value:!0});sn.DyNM_HTMLInput_Type=void 0;var vs=function(e){return e.button="button",e.checkbox="checkbox",e.color="color",e.date="date",e.datetimeLocal="datetime-local",e.email="email",e.file="file",e.hidden="hidden",e.image="image",e.month="month",e.number="number",e.password="password",e.radio="radio",e.range="range",e.reset="reset",e.search="search",e.submit="submit",e.tel="tel",e.text="text",e.time="time",e.url="url",e.week="week",e}(vs||(sn.DyNM_HTMLInput_Type=vs={}))});var mi=f(rn=>{"use strict";Object.defineProperty(rn,"__esModule",{value:!0});rn.DyNM_Button_Params=void 0;var Vl=vt(),Y=ri(),$l=St(),Xl=ci(),jl=Xl.DyNM_MaterialTooltipPosition.above,zl=250,li=class{id;label;color=$l.DyNM_MaterialColor.primary;icon;description;descriptionPosition;descriptionDelay;type;disabled;dontRoute;routerLink;routerLinkQueryParams;iconAfter;buttonType;class;contentClass;classOnActive;contentClassOnActive;customClass;customContentClass;customClassOnActive;customContentClassOnActive;onClickEvents=[];useDisablerWhileEventsInProgress;constructor(t){t&&Object.assign(this,t),this.type||(this.icon&&!this.label?this.type=Y.DyNM_Button_Type.icon:this.type=Y.DyNM_Button_Type.default),this.id||(this.id=`${this.label}-${this.type}-${this.color}-button`),(this.description||this.type.includes("icon")&&this.label)&&(this.descriptionPosition||(this.descriptionPosition=jl),this.descriptionDelay||(this.descriptionDelay=zl)),this.class=Wl(this.type,this.color)+(this.customClass??""),this.contentClass=ql(this.type,this.customContentClass)+(this.customContentClass??""),(this.customClassOnActive||this.routerLink)&&(this.classOnActive=Yl(this.type,this.color)+(this.customClassOnActive??""),this.contentClassOnActive=this.customContentClassOnActive??"")}executeEvents(t){return Se(this,null,function*(){yield Vl.DyFM_Array.asyncForEach(this.onClickEvents,n=>Se(this,null,function*(){yield n(t)}))})}};rn.DyNM_Button_Params=li;function Wl(e,t,n=!0){let o="";switch(n?(o+="disabled:bg-neutral-800 ",o+="disabled:hover:bg-neutral-600 ",o+="disabled:text-neutral-600 ",o+="disabled:hover:text-neutral-900 "):(o+="disabled:bg-neutral-200 ",o+="disabled:hover:bg-neutral-400 ",o+="disabled:text-neutral-400 ",o+="disabled:hover:text-neutral-100 "),o+="disabled:cursor-not-allowed ",e){case Y.DyNM_Button_Type.default:case Y.DyNM_Button_Type.stroked:o+="rounded-xl ";break;case Y.DyNM_Button_Type.small:case Y.DyNM_Button_Type.smallStroked:o+="rounded-md ";break;case Y.DyNM_Button_Type.big:case Y.DyNM_Button_Type.bigStroked:o+="rounded-2xl ";break}return e.includes("stroked")?(e.includes("big")?o+="border-4 ":o+="border-2 ",o+=`border-${t}-500 `,o+=`text-${t}-500 `,n?(o+=`hover:bg-${t}-950 `,o+="disabled:border-neutral-600 "):(o+=`hover:bg-${t}-50 `,o+="disabled:border-neutral-400 ")):(o+=`bg-${t}-500 `,o+=`text-${t}C-500 `,n?(o+=`hover:bg-${t}-300 `,o+=`hover:text-${t}C-300 `):(o+=`hover:bg-${t}-700 `,o+=`hover:text-${t}C-700 `)),e.includes("round")&&(o+="rounded-full "),e.includes("icon")?o+="rounded-full ":o+="w-full ",e.includes("outstanding")&&(o+="outstanding ",o.includes("rounded-full")||(o+="rounded-full ")),o}function Yl(e,t,n=!0){let o=" ";return e.includes("stroked")?n?o+=`bg-${t}-950 `:o+=`bg-${t}-50 `:n?(o+=`bg-${t}-300 `,o+=`text-${t}C-300 `):(o+=`bg-${t}-700 `,o+=`text-${t}C-700 `),o}function ql(e,t){let n="flex ";switch(t?.includes("items-")||(n+="items-center "),t?.includes("justify-")||(n+="justify-center "),e.includes("icon")||(e.includes("big")?n+="text-2xl ":n+="text-md "),e.includes("icon")||(e.includes("small")?n+="mx-2 ":n+="mx-5 "),e){case Y.DyNM_Button_Type.default:case Y.DyNM_Button_Type.block:n+="my-3 ";break;case Y.DyNM_Button_Type.stroked:case Y.DyNM_Button_Type.strokedBlock:n+="my-2.5 ";break;case Y.DyNM_Button_Type.big:case Y.DyNM_Button_Type.bigBlock:case Y.DyNM_Button_Type.bigStroked:case Y.DyNM_Button_Type.bigStrokedBlock:n+="my-3 ";break;case Y.DyNM_Button_Type.round:n+="my-3 ";break;case Y.DyNM_Button_Type.strokedRound:n+="my-2.5 ";break;case Y.DyNM_Button_Type.outstanding:n+="my-3 ";break;case Y.DyNM_Button_Type.icon:n+="p-2 ",n+="text-2xl ";break;case Y.DyNM_Button_Type.iconStroked:n+="p-1.5 ",n+="text-2xl ";break;case Y.DyNM_Button_Type.iconSmall:case Y.DyNM_Button_Type.iconSmallStroked:n+="p-1 ",n+="text-lg ";break;case Y.DyNM_Button_Type.iconBig:n+="p-4 ",n+="text-4xl ";break;case Y.DyNM_Button_Type.iconBigStroked:n+="p-3 ",n+="text-4xl ";break;case Y.DyNM_Button_Type.iconOutstanding:n+="p-2.5 ";break}return n}});var Ms=f(dn=>{"use strict";Object.defineProperty(dn,"__esModule",{value:!0});dn.DyNM_DataHandler=void 0;var at=vt(),ui=class e{name;get data(){return this.data_$()}lastLoadedBy;get;set;getPostProcesses=[];noId;waitsOnLoad=[];dependentDataHandlers=[];loopSafetyCollection=[];loopSafetyTimeout=at.second;loopSafety=10;debugLog;constructor(t,n){try{t.name||(t.name="Unnamed DataHandler "+ +new Date,at.DyFM_Log.warn(`DYNAMO DH.constructor (${this.name}) WARN:
1
+ import{c as Tl}from"./chunk-WAVRMTHA.js";import{a as he,b as _e,c as Ol,e as $a,h as Xa,j as Il,k as zo,l as Wo,m as Yo,o as Fl,p as vt}from"./chunk-BV6QDXRW.js";import{F as Va,a as j,b as Z,c as Ka,f,h as ge,i as fe,k as Se}from"./chunk-TBMJSIBB.js";var Ht=f(Je=>{"use strict";Object.defineProperty(Je,"__esModule",{value:!0});Je.DyNM_allButtonNewBorderRadius=Je.DyNM_ButtonNewBorderRadius=void 0;var qo=function(e){return e.full="full",e.rounded="rounded",e.smallRadius="smallRadius",e.square="square",e}(qo||(Je.DyNM_ButtonNewBorderRadius=qo={}));Je.DyNM_allButtonNewBorderRadius=Object.values(qo)});var Ut=f(Qe=>{"use strict";Object.defineProperty(Qe,"__esModule",{value:!0});Qe.DyNM_allButtonNewSizes=Qe.DyNM_ButtonNewSize=void 0;var Zo=function(e){return e.xs="xs",e.small="small",e.medium="medium",e.large="large",e.xl="xl",e}(Zo||(Qe.DyNM_ButtonNewSize=Zo={}));Qe.DyNM_allButtonNewSizes=Object.values(Zo)});var Kt=f(et=>{"use strict";Object.defineProperty(et,"__esModule",{value:!0});et.DyNM_allButtonNewStyleTypes=et.DyNM_ButtonNewStyleType=void 0;var Jo=function(e){return e.filled="filled",e.stroked="stroked",e.outstanding="outstanding",e.tonal="tonal",e.backgroundless="backgroundless",e}(Jo||(et.DyNM_ButtonNewStyleType=Jo={}));et.DyNM_allButtonNewStyleTypes=Object.values(Jo)});var St=f(tt=>{"use strict";Object.defineProperty(tt,"__esModule",{value:!0});tt.DyNM_allMaterialColors=tt.DyNM_MaterialColor=void 0;var Qo=function(e){return e.primary="primary",e.accent="accent",e.warn="warn",e.none="",e}(Qo||(tt.DyNM_MaterialColor=Qo={}));tt.DyNM_allMaterialColors=Object.values(Qo)});var ti=f(nt=>{"use strict";Object.defineProperty(nt,"__esModule",{value:!0});nt.DyNM_allButtonNewIconStyleTypes=nt.DyNM_ButtonNewIconStyleType=void 0;var ei=function(e){return e.rounded="rounded",e.outlined="outlined",e}(ei||(nt.DyNM_ButtonNewIconStyleType=ei={}));nt.DyNM_allButtonNewIconStyleTypes=Object.values(ei)});var oi=f(Vt=>{"use strict";Object.defineProperty(Vt,"__esModule",{value:!0});Vt.DyNM_ButtonNewStyle_Settings=void 0;var kl=Ht(),ja=ti(),Ll=Ut(),Gl=Kt(),Hl=St(),ni=class{size=Ll.DyNM_ButtonNewSize.medium;color=Hl.DyNM_MaterialColor.primary;styleType=Gl.DyNM_ButtonNewStyleType.filled;borderRadius=kl.DyNM_ButtonNewBorderRadius.smallRadius;isIconButton;iconFill;iconStyle=ja.DyNM_ButtonNewIconStyleType.rounded;constructor(t){t&&Object.assign(this,t),this.isIconButton&&!this.iconStyle&&(this.iconStyle=ja.DyNM_ButtonNewIconStyleType.rounded)}};Vt.DyNM_ButtonNewStyle_Settings=ni});var Wa=f($t=>{"use strict";Object.defineProperty($t,"__esModule",{value:!0});$t.DyNM_ButtonNewStyleSettingsPresets=void 0;var Le=Ht(),z=Ut(),Q=Kt(),za=St(),K=oi();$t.DyNM_ButtonNewStyleSettingsPresets={xs:new K.DyNM_ButtonNewStyle_Settings({size:z.DyNM_ButtonNewSize.xs}),xsIcon:new K.DyNM_ButtonNewStyle_Settings({size:z.DyNM_ButtonNewSize.xs,isIconButton:!0}),xsRounded:new K.DyNM_ButtonNewStyle_Settings({size:z.DyNM_ButtonNewSize.xs,borderRadius:Le.DyNM_ButtonNewBorderRadius.rounded}),xsStroked:new K.DyNM_ButtonNewStyle_Settings({size:z.DyNM_ButtonNewSize.xs,styleType:Q.DyNM_ButtonNewStyleType.stroked}),xsStrokedIcon:new K.DyNM_ButtonNewStyle_Settings({size:z.DyNM_ButtonNewSize.xs,styleType:Q.DyNM_ButtonNewStyleType.stroked,isIconButton:!0}),xsBackgroundlessIcon:new K.DyNM_ButtonNewStyle_Settings({size:z.DyNM_ButtonNewSize.xs,styleType:Q.DyNM_ButtonNewStyleType.backgroundless,isIconButton:!0}),xsRoundedTonal:new K.DyNM_ButtonNewStyle_Settings({size:z.DyNM_ButtonNewSize.xs,borderRadius:Le.DyNM_ButtonNewBorderRadius.rounded,styleType:Q.DyNM_ButtonNewStyleType.tonal}),small:new K.DyNM_ButtonNewStyle_Settings({size:z.DyNM_ButtonNewSize.small}),smallIcon:new K.DyNM_ButtonNewStyle_Settings({isIconButton:!0,size:z.DyNM_ButtonNewSize.small}),smallStrokedIcon:new K.DyNM_ButtonNewStyle_Settings({styleType:Q.DyNM_ButtonNewStyleType.stroked,isIconButton:!0,size:z.DyNM_ButtonNewSize.small}),smallTonalIcon:new K.DyNM_ButtonNewStyle_Settings({styleType:Q.DyNM_ButtonNewStyleType.tonal,isIconButton:!0,size:z.DyNM_ButtonNewSize.small}),smallRounded:new K.DyNM_ButtonNewStyle_Settings({borderRadius:Le.DyNM_ButtonNewBorderRadius.rounded,size:z.DyNM_ButtonNewSize.small}),smallStroked:new K.DyNM_ButtonNewStyle_Settings({styleType:Q.DyNM_ButtonNewStyleType.stroked,size:z.DyNM_ButtonNewSize.small}),smallTonal:new K.DyNM_ButtonNewStyle_Settings({styleType:Q.DyNM_ButtonNewStyleType.tonal,size:z.DyNM_ButtonNewSize.small}),smallRoundedTonal:new K.DyNM_ButtonNewStyle_Settings({borderRadius:Le.DyNM_ButtonNewBorderRadius.rounded,styleType:Q.DyNM_ButtonNewStyleType.tonal,size:z.DyNM_ButtonNewSize.small}),smallStrokedRounded:new K.DyNM_ButtonNewStyle_Settings({styleType:Q.DyNM_ButtonNewStyleType.stroked,borderRadius:Le.DyNM_ButtonNewBorderRadius.rounded,size:z.DyNM_ButtonNewSize.small}),smallBackgroundless:new K.DyNM_ButtonNewStyle_Settings({styleType:Q.DyNM_ButtonNewStyleType.backgroundless,size:z.DyNM_ButtonNewSize.small}),icon:new K.DyNM_ButtonNewStyle_Settings({isIconButton:!0}),backgroundlessSmallIconUnset:new K.DyNM_ButtonNewStyle_Settings({styleType:Q.DyNM_ButtonNewStyleType.backgroundless,isIconButton:!0,size:z.DyNM_ButtonNewSize.small,color:""}),backgroundlessIconUnset:new K.DyNM_ButtonNewStyle_Settings({styleType:Q.DyNM_ButtonNewStyleType.backgroundless,isIconButton:!0,color:""}),smallBackgroundlessIcon:new K.DyNM_ButtonNewStyle_Settings({styleType:Q.DyNM_ButtonNewStyleType.backgroundless,isIconButton:!0,size:z.DyNM_ButtonNewSize.small}),strokedIcon:new K.DyNM_ButtonNewStyle_Settings({styleType:Q.DyNM_ButtonNewStyleType.stroked,isIconButton:!0}),backgroundlessIcon:new K.DyNM_ButtonNewStyle_Settings({styleType:Q.DyNM_ButtonNewStyleType.backgroundless,isIconButton:!0}),accent:new K.DyNM_ButtonNewStyle_Settings({color:za.DyNM_MaterialColor.accent}),strokedAccent:new K.DyNM_ButtonNewStyle_Settings({styleType:Q.DyNM_ButtonNewStyleType.stroked,color:za.DyNM_MaterialColor.accent}),stroked:new K.DyNM_ButtonNewStyle_Settings({styleType:Q.DyNM_ButtonNewStyleType.stroked}),round:new K.DyNM_ButtonNewStyle_Settings({borderRadius:Le.DyNM_ButtonNewBorderRadius.rounded}),strokedRound:new K.DyNM_ButtonNewStyle_Settings({styleType:Q.DyNM_ButtonNewStyleType.stroked,borderRadius:Le.DyNM_ButtonNewBorderRadius.rounded}),large:new K.DyNM_ButtonNewStyle_Settings({size:z.DyNM_ButtonNewSize.large}),largeStroked:new K.DyNM_ButtonNewStyle_Settings({styleType:Q.DyNM_ButtonNewStyleType.stroked,size:z.DyNM_ButtonNewSize.large}),largeStrokedRound:new K.DyNM_ButtonNewStyle_Settings({styleType:Q.DyNM_ButtonNewStyleType.stroked,borderRadius:Le.DyNM_ButtonNewBorderRadius.rounded,size:z.DyNM_ButtonNewSize.large}),largeTonal:new K.DyNM_ButtonNewStyle_Settings({styleType:Q.DyNM_ButtonNewStyleType.tonal,size:z.DyNM_ButtonNewSize.large}),largeIcon:new K.DyNM_ButtonNewStyle_Settings({isIconButton:!0,size:z.DyNM_ButtonNewSize.large}),largeStrokedIcon:new K.DyNM_ButtonNewStyle_Settings({styleType:Q.DyNM_ButtonNewStyleType.stroked,isIconButton:!0,size:z.DyNM_ButtonNewSize.large}),xl:new K.DyNM_ButtonNewStyle_Settings({size:z.DyNM_ButtonNewSize.xl}),xlIcon:new K.DyNM_ButtonNewStyle_Settings({size:z.DyNM_ButtonNewSize.xl,isIconButton:!0})}});var ii=f(Xt=>{"use strict";Object.defineProperty(Xt,"__esModule",{value:!0});Xt.DyNM_Container_Type=void 0;var Ya=function(e){return e.card="card",e.accordion="accordion",e.dynamo="dynamo",e.dynamoSmall="dynamo-small",e.none="none",e}(Ya||(Xt.DyNM_Container_Type=Ya={}))});var ai=f(jt=>{"use strict";Object.defineProperty(jt,"__esModule",{value:!0});jt.DyNM_FieldAppearance=void 0;var qa=function(e){return e.fill="fill",e.outline="outline",e}(qa||(jt.DyNM_FieldAppearance=qa={}))});var si=f(zt=>{"use strict";Object.defineProperty(zt,"__esModule",{value:!0});zt.DyNM_Storage_Type=void 0;var Za=function(e){return e.session="session",e.local="local",e.none="",e}(Za||(zt.DyNM_Storage_Type=Za={}))});var Qa=f(Wt=>{"use strict";Object.defineProperty(Wt,"__esModule",{value:!0});Wt.DyNM_global_settings=void 0;var Ul=ii(),Kl=ai(),Ja=si();Wt.DyNM_global_settings={fieldAppearance:Kl.DyNM_FieldAppearance.outline,baseUrl:"/api",usageEndpoints:{startSession:"/usage/new-session",updateUsage:"/usage/update/{sessionId}",closeSession:"/usage/close-session/{sessionId}",getUsageData:"/usage/get/all"},alwaysLookForFieldAdder:!1,fieldErrorMessages:{required:"This field is required",email:"This is not a valid email format",mask:"This is not a valid format"},defaultStorage:Ja.DyNM_Storage_Type.session,storageEncryptionKey:"DEFAULT_DyFM_ENCRYPTION_KEY_CHANGE_THIS_XXXXXXX00000009999999999",defaultFormStorage:Ja.DyNM_Storage_Type.session,defaultFormContainerType:Ul.DyNM_Container_Type.none,formMessages:{required:"There are required fields to set!",invalid:"The form is not set correctly",submitSuccess:"Save was successful!",submitFailed:"Saving data has failed!"},questionDefaultOptions:{a:"No",b:"Yes"},fieldTooltipShowDelay:300,snackBarHideLabel:"Hide",log_settings:{api_calls:!0,messagesCS_debug:!1}}});var ri=f(Yt=>{"use strict";Object.defineProperty(Yt,"__esModule",{value:!0});Yt.DyNM_Button_Type=void 0;var es=function(e){return e.default="default",e.big="big",e.stroked="stroked",e.bigStroked="big-stroked",e.small="small",e.smallStroked="small-stroked",e.round="round",e.strokedRound="stroked-round",e.bigStrokedRound="big-stroked-round",e.block="block",e.bigBlock="big-block",e.strokedBlock="stroked-block",e.bigStrokedBlock="big-stroked-block",e.outstanding="outstanding",e.icon="icon",e.iconSmall="icon-small",e.iconBig="icon-big",e.iconStroked="icon-stroked",e.iconSmallStroked="icon-small-stroked",e.iconBigStroked="icon-big-stroked",e.iconOutstanding="icon-outstanding",e}(es||(Yt.DyNM_Button_Type=es={}))});var ns=f(qt=>{"use strict";Object.defineProperty(qt,"__esModule",{value:!0});qt.DyNM_CheckboxLabelPosition=void 0;var ts=function(e){return e.before="before",e.after="after",e}(ts||(qt.DyNM_CheckboxLabelPosition=ts={}))});var is=f(Zt=>{"use strict";Object.defineProperty(Zt,"__esModule",{value:!0});Zt.DyNM_Field_Type=void 0;var os=function(e){return e.spacer="spacer",e.checkbox="checkbox",e.toggle="toggle",e.text="text",e.textList="textList",e.password="password",e.textarea="textarea",e.richtextarea="richtextarea",e.number="number",e.numberRange="numberRange",e.slider="slider",e.sliderRange="sliderRange",e.select="select",e.multiselect="multiselect",e.chipSelect="chipSelect",e.chipMultiselect="chipMultiselect",e.radioSelect="radioSelect",e.date="date",e.dateRange="dateRange",e.dateTime="dateTime",e.dateTimeRange="dateTimeRange",e.file="file",e.files="files",e.picture="picture",e.pictures="pictures",e.fieldAdder="fieldAdder",e.multifield="multifield",e}(os||(Zt.DyNM_Field_Type=os={}))});var ss=f(Jt=>{"use strict";Object.defineProperty(Jt,"__esModule",{value:!0});Jt.DyNM_File_Type=void 0;var as=function(e){return e.arrayBuffer="arrayBuffer",e.binaryString="binaryString",e.dataUrl="dataUrl",e.text="text",e.blob="blob",e.file="file",e}(as||(Jt.DyNM_File_Type=as={}))});var ds=f(Qt=>{"use strict";Object.defineProperty(Qt,"__esModule",{value:!0});Qt.DyNM_FormAccess=void 0;var rs=function(e){return e.readOnly="read-only",e.writeOnly="write-only",e.readNWrite="read-n-write",e}(rs||(Qt.DyNM_FormAccess=rs={}))});var ls=f(en=>{"use strict";Object.defineProperty(en,"__esModule",{value:!0});en.DyNM_FormResetData=void 0;var cs=function(e){return e.null="null",e.empty="empty",e.default="deafult",e.dataHandler="data-handler",e.init="init",e.stored="stored",e}(cs||(en.DyNM_FormResetData=cs={}))});var us=f(tn=>{"use strict";Object.defineProperty(tn,"__esModule",{value:!0});tn.DyNM_FormStoreOn=void 0;var ms=function(e){return e.close="close",e.change="change",e}(ms||(tn.DyNM_FormStoreOn=ms={}))});var ci=f(ot=>{"use strict";Object.defineProperty(ot,"__esModule",{value:!0});ot.DyNM_allMaterialTooltipPositions=ot.DyNM_MaterialTooltipPosition=void 0;var di=function(e){return e.above="above",e.below="below",e.before="before",e.after="after",e.left="left",e.right="right",e}(di||(ot.DyNM_MaterialTooltipPosition=di={}));ot.DyNM_allMaterialTooltipPositions=Object.values(di)});var gs=f(nn=>{"use strict";Object.defineProperty(nn,"__esModule",{value:!0});nn.DyNM_PreconfiguredField_Type=void 0;var ps=function(e){return e.email="email",e.phone="phone",e}(ps||(nn.DyNM_PreconfiguredField_Type=ps={}))});var hs=f(on=>{"use strict";Object.defineProperty(on,"__esModule",{value:!0});on.DyNM_Validator_Type=void 0;var fs=function(e){return e.requiredCheckbox="requiredCheckbox",e}(fs||(on.DyNM_Validator_Type=fs={}))});var ys=f(it=>{"use strict";Object.defineProperty(it,"__esModule",{value:!0});it.DyNM_FXLayoutAlignPerDir=it.DyNM_FXLayoutAlignLayDir=void 0;var _s=function(e){return e.none="none",e.start="start",e.center="center",e.end="end",e.spaceAround="space-around",e.spaceBetween="space-between",e}(_s||(it.DyNM_FXLayoutAlignLayDir=_s={})),Cs=function(e){return e.none="none",e.start="start",e.center="center",e.end="end",e.stretch="stretch",e}(Cs||(it.DyNM_FXLayoutAlignPerDir=Cs={}))});var bs=f(an=>{"use strict";Object.defineProperty(an,"__esModule",{value:!0});an.DyNM_FXLayout=void 0;var xs=function(e){return e.row="row",e.column="column",e}(xs||(an.DyNM_FXLayout=xs={}))});var Ss=f(sn=>{"use strict";Object.defineProperty(sn,"__esModule",{value:!0});sn.DyNM_HTMLInput_Type=void 0;var vs=function(e){return e.button="button",e.checkbox="checkbox",e.color="color",e.date="date",e.datetimeLocal="datetime-local",e.email="email",e.file="file",e.hidden="hidden",e.image="image",e.month="month",e.number="number",e.password="password",e.radio="radio",e.range="range",e.reset="reset",e.search="search",e.submit="submit",e.tel="tel",e.text="text",e.time="time",e.url="url",e.week="week",e}(vs||(sn.DyNM_HTMLInput_Type=vs={}))});var mi=f(rn=>{"use strict";Object.defineProperty(rn,"__esModule",{value:!0});rn.DyNM_Button_Params=void 0;var Vl=vt(),Y=ri(),$l=St(),Xl=ci(),jl=Xl.DyNM_MaterialTooltipPosition.above,zl=250,li=class{id;label;color=$l.DyNM_MaterialColor.primary;icon;description;descriptionPosition;descriptionDelay;type;disabled;dontRoute;routerLink;routerLinkQueryParams;iconAfter;buttonType;class;contentClass;classOnActive;contentClassOnActive;customClass;customContentClass;customClassOnActive;customContentClassOnActive;onClickEvents=[];useDisablerWhileEventsInProgress;constructor(t){t&&Object.assign(this,t),this.type||(this.icon&&!this.label?this.type=Y.DyNM_Button_Type.icon:this.type=Y.DyNM_Button_Type.default),this.id||(this.id=`${this.label}-${this.type}-${this.color}-button`),(this.description||this.type.includes("icon")&&this.label)&&(this.descriptionPosition||(this.descriptionPosition=jl),this.descriptionDelay||(this.descriptionDelay=zl)),this.class=Wl(this.type,this.color)+(this.customClass??""),this.contentClass=ql(this.type,this.customContentClass)+(this.customContentClass??""),(this.customClassOnActive||this.routerLink)&&(this.classOnActive=Yl(this.type,this.color)+(this.customClassOnActive??""),this.contentClassOnActive=this.customContentClassOnActive??"")}executeEvents(t){return Se(this,null,function*(){yield Vl.DyFM_Array.asyncForEach(this.onClickEvents,n=>Se(this,null,function*(){yield n(t)}))})}};rn.DyNM_Button_Params=li;function Wl(e,t,n=!0){let o="";switch(n?(o+="disabled:bg-neutral-800 ",o+="disabled:hover:bg-neutral-600 ",o+="disabled:text-neutral-600 ",o+="disabled:hover:text-neutral-900 "):(o+="disabled:bg-neutral-200 ",o+="disabled:hover:bg-neutral-400 ",o+="disabled:text-neutral-400 ",o+="disabled:hover:text-neutral-100 "),o+="disabled:cursor-not-allowed ",e){case Y.DyNM_Button_Type.default:case Y.DyNM_Button_Type.stroked:o+="rounded-xl ";break;case Y.DyNM_Button_Type.small:case Y.DyNM_Button_Type.smallStroked:o+="rounded-md ";break;case Y.DyNM_Button_Type.big:case Y.DyNM_Button_Type.bigStroked:o+="rounded-2xl ";break}return e.includes("stroked")?(e.includes("big")?o+="border-4 ":o+="border-2 ",o+=`border-${t}-500 `,o+=`text-${t}-500 `,n?(o+=`hover:bg-${t}-950 `,o+="disabled:border-neutral-600 "):(o+=`hover:bg-${t}-50 `,o+="disabled:border-neutral-400 ")):(o+=`bg-${t}-500 `,o+=`text-${t}C-500 `,n?(o+=`hover:bg-${t}-300 `,o+=`hover:text-${t}C-300 `):(o+=`hover:bg-${t}-700 `,o+=`hover:text-${t}C-700 `)),e.includes("round")&&(o+="rounded-full "),e.includes("icon")?o+="rounded-full ":o+="w-full ",e.includes("outstanding")&&(o+="outstanding ",o.includes("rounded-full")||(o+="rounded-full ")),o}function Yl(e,t,n=!0){let o=" ";return e.includes("stroked")?n?o+=`bg-${t}-950 `:o+=`bg-${t}-50 `:n?(o+=`bg-${t}-300 `,o+=`text-${t}C-300 `):(o+=`bg-${t}-700 `,o+=`text-${t}C-700 `),o}function ql(e,t){let n="flex ";switch(t?.includes("items-")||(n+="items-center "),t?.includes("justify-")||(n+="justify-center "),e.includes("icon")||(e.includes("big")?n+="text-2xl ":n+="text-md "),e.includes("icon")||(e.includes("small")?n+="mx-2 ":n+="mx-5 "),e){case Y.DyNM_Button_Type.default:case Y.DyNM_Button_Type.block:n+="my-3 ";break;case Y.DyNM_Button_Type.stroked:case Y.DyNM_Button_Type.strokedBlock:n+="my-2.5 ";break;case Y.DyNM_Button_Type.big:case Y.DyNM_Button_Type.bigBlock:case Y.DyNM_Button_Type.bigStroked:case Y.DyNM_Button_Type.bigStrokedBlock:n+="my-3 ";break;case Y.DyNM_Button_Type.round:n+="my-3 ";break;case Y.DyNM_Button_Type.strokedRound:n+="my-2.5 ";break;case Y.DyNM_Button_Type.outstanding:n+="my-3 ";break;case Y.DyNM_Button_Type.icon:n+="p-2 ",n+="text-2xl ";break;case Y.DyNM_Button_Type.iconStroked:n+="p-1.5 ",n+="text-2xl ";break;case Y.DyNM_Button_Type.iconSmall:case Y.DyNM_Button_Type.iconSmallStroked:n+="p-1 ",n+="text-lg ";break;case Y.DyNM_Button_Type.iconBig:n+="p-4 ",n+="text-4xl ";break;case Y.DyNM_Button_Type.iconBigStroked:n+="p-3 ",n+="text-4xl ";break;case Y.DyNM_Button_Type.iconOutstanding:n+="p-2.5 ";break}return n}});var Ms=f(dn=>{"use strict";Object.defineProperty(dn,"__esModule",{value:!0});dn.DyNM_DataHandler=void 0;var at=vt(),ui=class e{name;get data(){return this.data_$()}lastLoadedBy;get;set;getPostProcesses=[];noId;waitsOnLoad=[];dependentDataHandlers=[];loopSafetyCollection=[];loopSafetyTimeout=at.second;loopSafety=10;debugLog;constructor(t,n){try{t.name||(t.name="Unnamed DataHandler "+ +new Date,at.DyFM_Log.warn(`DYNAMO DH.constructor (${this.name}) WARN:
2
2
  Name is not set!`,`
3
3
 
4
4
  `,new Error)),this.name=t.name,this.debugLog=t?.debugLog,t.loopSafety===void 0?t.loopSafety=10:this.loopSafety=t.loopSafety,t.get&&(this.get=t.get),t.set&&(this.set=t.set),this.noId=!!t.noId,n||(t.dependencyDataHandler&&this.addDependencyDataHandler(t.dependencyDataHandler,!0),t.dependentDataHandlers&&this.addDependentDataHandlers(t.dependentDataHandlers,!0)),t.getPostProcess&&this.getPostProcesses.push(t.getPostProcess)}catch(o){at.DyFM_Log.error(`Error creating DyNM_DataHandler (${t.name}):`,o)}}addDependencyDataHandler(t,n){try{if(!t)throw new Error(`DYNAMO DH.addDependencyDataHandler (${this.name}) ERROR:
@@ -112,4 +112,4 @@ This usually indicates:
112
112
  2) Invalid encryption key,
113
113
  3) Serialization failure.`),g}}return e})();so.DyFM_Crypto=H0});var ld=f(ea=>{"use strict";Object.defineProperty(ea,"__esModule",{value:!0});var U0=(_e(),fe(he));U0.__exportStar(cd(),ea)});var Ie=f(ro=>{"use strict";Object.defineProperty(ro,"__esModule",{value:!0});ro.DyFM_AI_Provider=void 0;var md=function(e){return e.OpenAI="open-ai",e.Anthropic="anthropic",e.Google="google",e.LocalAI="local-ai",e.FdpAI="fdp-ai",e}(md||(ro.DyFM_AI_Provider=md={}))});var ud=f(co=>{"use strict";Object.defineProperty(co,"__esModule",{value:!0});co.DyFM_AI_ModelRef_Util=void 0;var K0=Ie(),ta=class e{static separator=":";static validProviders=new Set(Object.values(K0.DyFM_AI_Provider));static create(t,n){return`${t}${e.separator}${n}`}static parse(t){let n=t.indexOf(e.separator);if(n<0)throw new Error(`Ervenytelen modelRef formatum: "${t}" -- hianyzik a "${e.separator}" elvlaszto`);let o=t.substring(0,n),g=t.substring(n+1);if(!e.validProviders.has(o))throw new Error(`Ismeretlen AI provider: "${o}" a modelRef-ben: "${t}"`);if(!g)throw new Error(`Ures modell azonosito a modelRef-ben: "${t}"`);return{provider:o,model:g}}static getProvider(t){return e.parse(t).provider}static getModel(t){return e.parse(t).model}static isValid(t){if(!t)return!1;let n=t.indexOf(e.separator);if(n<0)return!1;let o=t.substring(0,n),g=t.substring(n+1);return e.validProviders.has(o)&&!!g}};co.DyFM_AI_ModelRef_Util=ta});var gd=f(lo=>{"use strict";Object.defineProperty(lo,"__esModule",{value:!0});lo.DyFM_AI_ModelType=void 0;var pd=function(e){return e.LLM="llm",e.Embedding="embedding",e.Chat="chat",e}(pd||(lo.DyFM_AI_ModelType=pd={}))});var hd=f(mo=>{"use strict";Object.defineProperty(mo,"__esModule",{value:!0});mo.DyFM_AI_MessageRole=void 0;var fd=function(e){return e.system="system",e.user="user",e.assistant="assistant",e}(fd||(mo.DyFM_AI_MessageRole=fd={}))});var Rt=f(uo=>{"use strict";Object.defineProperty(uo,"__esModule",{value:!0});uo.DyFM_AI_CallSettings=void 0;var na=class{systemPrompt="";useModel;project;debugLog;temperature=0;maxTokens=2e3;topP=.75;frequencyPenalty=0;presencePenalty=0;constructor(t){t&&Object.assign(this,t)}};uo.DyFM_AI_CallSettings=na});var Cd=f(_d=>{"use strict";Object.defineProperty(_d,"__esModule",{value:!0})});var xd=f(yd=>{"use strict";Object.defineProperty(yd,"__esModule",{value:!0})});var vd=f(bd=>{"use strict";Object.defineProperty(bd,"__esModule",{value:!0})});var Md=f(Sd=>{"use strict";Object.defineProperty(Sd,"__esModule",{value:!0})});var Ad=f(Dd=>{"use strict";Object.defineProperty(Dd,"__esModule",{value:!0})});var Bd=f(Rd=>{"use strict";Object.defineProperty(Rd,"__esModule",{value:!0})});var Nd=f(Ed=>{"use strict";Object.defineProperty(Ed,"__esModule",{value:!0})});var Bt=f(po=>{"use strict";Object.defineProperty(po,"__esModule",{value:!0});po.DyFM_AI_Settings=void 0;var oa=class{provider;config;defaultSettings;constructor(t){t&&Object.assign(this,t)}};po.DyFM_AI_Settings=oa});var Et=f(go=>{"use strict";Object.defineProperty(go,"__esModule",{value:!0});go.DyFM_AI_UserProviderConfig=void 0;var ia=class{provider;encryptedApiKey;keySuffix;isActive;label;lastTestedAt;lastUsedAt;selectedModels;constructor(t){t&&Object.assign(this,t)}};go.DyFM_AI_UserProviderConfig=ia});var wd=f(de=>{"use strict";Object.defineProperty(de,"__esModule",{value:!0});var Ce=(_e(),fe(he));Ce.__exportStar(ud(),de);Ce.__exportStar(Ie(),de);Ce.__exportStar(gd(),de);Ce.__exportStar(hd(),de);Ce.__exportStar(Rt(),de);Ce.__exportStar(Cd(),de);Ce.__exportStar(xd(),de);Ce.__exportStar(vd(),de);Ce.__exportStar(Md(),de);Ce.__exportStar(Ad(),de);Ce.__exportStar(Bd(),de);Ce.__exportStar(Nd(),de);Ce.__exportStar(Bt(),de);Ce.__exportStar(Et(),de)});var fo=f(dt=>{"use strict";Object.defineProperty(dt,"__esModule",{value:!0});dt.DyFM_OAI_allEmbeddingModels=dt.DyFM_OAI_Model=void 0;var Nt=function(e){return e.gpt5="gpt-5",e.gpt51="gpt-5.1",e.gpt5_mini="gpt-5-mini",e.gpt5_nano="gpt-5-nano",e.gpt5_chatLatest="gpt-5-chat-latest",e.gpt51_chatLatest="gpt-5.1-chat-latest",e.gpt5_codex="gpt-5-codex",e.gpt51_codex="gpt-5.1-codex",e.gpt4o="gpt-4o",e.gpt4o_20240806="gpt-4o-2024-08-06",e.gpt4o_20240513="gpt-4o-2024-05-13",e.gpt4o_mini="gpt-4o-mini",e.gpt4o_mini20240718="gpt-4o-mini-2024-07-18",e.textEmbedding_3Small="text-embedding-3-small",e.textEmbedding_3Large="text-embedding-3-large",e.textEmbedding_ada002="text-embedding-ada-002",e}(Nt||(dt.DyFM_OAI_Model=Nt={}));dt.DyFM_OAI_allEmbeddingModels=[Nt.textEmbedding_3Small,Nt.textEmbedding_3Large,Nt.textEmbedding_ada002]});var Pd=f(ho=>{"use strict";Object.defineProperty(ho,"__esModule",{value:!0});ho.DyFM_OAI_EmbeddingModelDimensions=void 0;var aa=fo();ho.DyFM_OAI_EmbeddingModelDimensions={[aa.DyFM_OAI_Model.textEmbedding_3Small]:1536,[aa.DyFM_OAI_Model.textEmbedding_3Large]:3072,[aa.DyFM_OAI_Model.textEmbedding_ada002]:1536}});var ra=f(_o=>{"use strict";Object.defineProperty(_o,"__esModule",{value:!0});_o.DyFM_OAI_CallSettings=void 0;var V0=Rt(),$0=fo(),sa=class extends V0.DyFM_AI_CallSettings{useModel=$0.DyFM_OAI_Model.gpt4o;constructor(t){super(t),t&&Object.assign(this,t)}};_o.DyFM_OAI_CallSettings=sa});var Id=f(Od=>{"use strict";Object.defineProperty(Od,"__esModule",{value:!0})});var Td=f(Fd=>{"use strict";Object.defineProperty(Fd,"__esModule",{value:!0})});var kd=f(Co=>{"use strict";Object.defineProperty(Co,"__esModule",{value:!0});Co.DyFM_OAI_Settings=void 0;var X0=Bt(),j0=Ie(),z0=ra(),da=class extends X0.DyFM_AI_Settings{provider=j0.DyFM_AI_Provider.OpenAI;defaultSettings=new z0.DyFM_OAI_CallSettings;config={};constructor(t){super(t),t&&Object.assign(this,t)}};Co.DyFM_OAI_Settings=da});var Ld=f(yo=>{"use strict";Object.defineProperty(yo,"__esModule",{value:!0});yo.DyFM_OAI_UserProviderConfig=void 0;var W0=Et(),Y0=Ie(),ca=class extends W0.DyFM_AI_UserProviderConfig{provider=Y0.DyFM_AI_Provider.OpenAI;organization;project;constructor(t){super(t),t&&Object.assign(this,t)}};yo.DyFM_OAI_UserProviderConfig=ca});var Gd=f(Fe=>{"use strict";Object.defineProperty(Fe,"__esModule",{value:!0});var Ve=(_e(),fe(he));Ve.__exportStar(Pd(),Fe);Ve.__exportStar(fo(),Fe);Ve.__exportStar(ra(),Fe);Ve.__exportStar(Id(),Fe);Ve.__exportStar(Td(),Fe);Ve.__exportStar(kd(),Fe);Ve.__exportStar(Ld(),Fe)});var la=f(xo=>{"use strict";Object.defineProperty(xo,"__esModule",{value:!0});xo.DyFM_AAI_Model=void 0;var Hd=function(e){return e.claude_3_5_sonnet_latest="claude-3-5-sonnet-latest",e.claude_3_5_sonnet_20241022="claude-3-5-sonnet-20241022",e.claude_3_5_haiku_latest="claude-3-5-haiku-latest",e.claude_3_opus_latest="claude-3-opus-latest",e.claude_3_sonnet_latest="claude-3-sonnet-latest",e.claude_3_haiku_latest="claude-3-haiku-latest",e}(Hd||(xo.DyFM_AAI_Model=Hd={}))});var Kd=f(Ud=>{"use strict";Object.defineProperty(Ud,"__esModule",{value:!0})});var ua=f(bo=>{"use strict";Object.defineProperty(bo,"__esModule",{value:!0});bo.DyFM_AAI_CallSettings=void 0;var q0=Rt(),Z0=la(),ma=class extends q0.DyFM_AI_CallSettings{useModel=Z0.DyFM_AAI_Model.claude_3_5_sonnet_latest;constructor(t){super(t),t&&Object.assign(this,t)}};bo.DyFM_AAI_CallSettings=ma});var Vd=f(vo=>{"use strict";Object.defineProperty(vo,"__esModule",{value:!0});vo.DyFM_AAI_Settings=void 0;var J0=Bt(),Q0=Ie(),em=ua(),pa=class extends J0.DyFM_AI_Settings{provider=Q0.DyFM_AI_Provider.Anthropic;defaultSettings=new em.DyFM_AAI_CallSettings;config={};constructor(t){super(t),t&&Object.assign(this,t)}};vo.DyFM_AAI_Settings=pa});var $d=f(So=>{"use strict";Object.defineProperty(So,"__esModule",{value:!0});So.DyFM_AAI_UserProviderConfig=void 0;var tm=Et(),nm=Ie(),ga=class extends tm.DyFM_AI_UserProviderConfig{provider=nm.DyFM_AI_Provider.Anthropic;baseURL;constructor(t){super(t),t&&Object.assign(this,t)}};So.DyFM_AAI_UserProviderConfig=ga});var Xd=f($e=>{"use strict";Object.defineProperty($e,"__esModule",{value:!0});var wt=(_e(),fe(he));wt.__exportStar(la(),$e);wt.__exportStar(Kd(),$e);wt.__exportStar(ua(),$e);wt.__exportStar(Vd(),$e);wt.__exportStar($d(),$e)});var fa=f(Mo=>{"use strict";Object.defineProperty(Mo,"__esModule",{value:!0});Mo.DyFM_FdpAI_Model=void 0;var jd=function(e){return e.fdpBase1="fdp-base-1",e}(jd||(Mo.DyFM_FdpAI_Model=jd={}))});var Wd=f(zd=>{"use strict";Object.defineProperty(zd,"__esModule",{value:!0})});var _a=f(Do=>{"use strict";Object.defineProperty(Do,"__esModule",{value:!0});Do.DyFM_FdpAI_CallSettings=void 0;var om=Rt(),im=fa(),ha=class extends om.DyFM_AI_CallSettings{useModel=im.DyFM_FdpAI_Model.fdpBase1;constructor(t){super(t),t&&Object.assign(this,t)}};Do.DyFM_FdpAI_CallSettings=ha});var Yd=f(Ao=>{"use strict";Object.defineProperty(Ao,"__esModule",{value:!0});Ao.DyFM_FdpAI_Settings=void 0;var am=Bt(),sm=Ie(),rm=_a(),Ca=class extends am.DyFM_AI_Settings{provider=sm.DyFM_AI_Provider.FdpAI;defaultSettings=new rm.DyFM_FdpAI_CallSettings;config={};constructor(t){super(t),t&&Object.assign(this,t)}};Ao.DyFM_FdpAI_Settings=Ca});var qd=f(Ro=>{"use strict";Object.defineProperty(Ro,"__esModule",{value:!0});Ro.DyFM_FdpAI_UserProviderConfig=void 0;var dm=Et(),cm=Ie(),ya=class extends dm.DyFM_AI_UserProviderConfig{provider=cm.DyFM_AI_Provider.FdpAI;baseURL;constructor(t){super(t),t&&Object.assign(this,t)}};Ro.DyFM_FdpAI_UserProviderConfig=ya});var Zd=f(Xe=>{"use strict";Object.defineProperty(Xe,"__esModule",{value:!0});var Pt=(_e(),fe(he));Pt.__exportStar(fa(),Xe);Pt.__exportStar(Wd(),Xe);Pt.__exportStar(_a(),Xe);Pt.__exportStar(Yd(),Xe);Pt.__exportStar(qd(),Xe)});var Qd=f(Bo=>{"use strict";Object.defineProperty(Bo,"__esModule",{value:!0});Bo.DyFM_Msg_Type=void 0;var Jd=function(e){return e.text="text",e.userToUser="user-to-user",e.userToAi="user-to-ai",e.aiToUser="ai-to-user",e.system="system",e.agentProcess="agent-process",e}(Jd||(Bo.DyFM_Msg_Type=Jd={}))});var tc=f(Eo=>{"use strict";Object.defineProperty(Eo,"__esModule",{value:!0});Eo.DyFM_Msg_Status=void 0;var ec=function(e){return e.draft="draft",e.sending="sending",e.sent="sent",e.delivered="delivered",e.read="read",e.failed="failed",e.deleted="deleted",e}(ec||(Eo.DyFM_Msg_Status=ec={}))});var oc=f(No=>{"use strict";Object.defineProperty(No,"__esModule",{value:!0});No.DyFM_Msg_DeliveryStatus=void 0;var nc=function(e){return e.pending="pending",e.delivered="delivered",e.failed="failed",e.read="read",e}(nc||(No.DyFM_Msg_DeliveryStatus=nc={}))});var ac=f(wo=>{"use strict";Object.defineProperty(wo,"__esModule",{value:!0});wo.DyFM_Msg_ConversationType=void 0;var ic=function(e){return e.direct="direct",e.group="group",e.assistantChat="assistant-chat",e.agentProcess="agent-process",e.channel="channel",e}(ic||(wo.DyFM_Msg_ConversationType=ic={}))});var rc=f(Po=>{"use strict";Object.defineProperty(Po,"__esModule",{value:!0});Po.DyFM_Msg_ParticipantRole=void 0;var sc=function(e){return e.owner="owner",e.admin="admin",e.member="member",e.assistant="assistant",e.agent="agent",e}(sc||(Po.DyFM_Msg_ParticipantRole=sc={}))});var cc=f(Oo=>{"use strict";Object.defineProperty(Oo,"__esModule",{value:!0});Oo.DyFM_Msg_Provider_Type=void 0;var dc=function(e){return e.discord="discord",e.slack="slack",e.teams="teams",e.dynamo="dynamo",e.custom="custom",e}(dc||(Oo.DyFM_Msg_Provider_Type=dc={}))});var mc=f(Io=>{"use strict";Object.defineProperty(Io,"__esModule",{value:!0});Io.DyFM_Msg_AttachmentType=void 0;var lc=function(e){return e.image="image",e.video="video",e.audio="audio",e.document="document",e.archive="archive",e.code="code",e.file="file",e}(lc||(Io.DyFM_Msg_AttachmentType=lc={}))});var pc=f(Fo=>{"use strict";Object.defineProperty(Fo,"__esModule",{value:!0});Fo.DyFM_Msg_EventKey=void 0;var uc=function(e){return e.messageSent="msg:message-sent",e.messageUpdated="msg:message-updated",e.messageDeleted="msg:message-deleted",e.messageDelivered="msg:message-delivered",e.messageRead="msg:message-read",e.conversationCreated="msg:conversation-created",e.conversationUpdated="msg:conversation-updated",e.conversationDeleted="msg:conversation-deleted",e.participantAdded="msg:participant-added",e.participantRemoved="msg:participant-removed",e.typingStart="msg:typing-start",e.typingStop="msg:typing-stop",e.reactionAdded="msg:reaction-added",e.reactionRemoved="msg:reaction-removed",e.agentStepAdded="msg:agent-step-added",e.agentProcessComplete="msg:agent-process-complete",e}(uc||(Fo.DyFM_Msg_EventKey=uc={}))});var gc=f(ct=>{"use strict";Object.defineProperty(ct,"__esModule",{value:!0});ct.DyFM_msgMessage_dataParams=ct.DyFM_Msg_Message=void 0;var lm=zo(),mm=Yo(),xa=class extends lm.DyFM_Metadata{conversationId;content;type;status;senderId;senderName;senderDisplayName;recipientIds;parentMessageId;threadId;threadInfo;attachments;mentions;reactions;aiProvider;aiModel;isAIGenerated;systemPrompt;agentProcessSteps;platformSource;platformMessageId;platformChannelId;sentAt;deliveredAt;readAt;editedAt;constructor(t){super(t),t&&Object.assign(this,t)}};ct.DyFM_Msg_Message=xa;ct.DyFM_msgMessage_dataParams=new mm.DyFM_DataModel_Params({dataName:"msg_message",properties:{conversationId:{key:"conversationId",type:"string",required:!0,index:!0},content:{key:"content",type:"string",required:!0},type:{key:"type",type:"string",required:!0},status:{key:"status",type:"string",required:!0,index:!0},senderId:{key:"senderId",type:"string",required:!0,index:!0},senderName:{key:"senderName",type:"string"},senderDisplayName:{key:"senderDisplayName",type:"string"},recipientIds:{key:"recipientIds",type:"string[]"},parentMessageId:{key:"parentMessageId",type:"string",index:!0},threadId:{key:"threadId",type:"string",index:!0},threadInfo:{key:"threadInfo",type:"object"},attachments:{key:"attachments",type:"object[]"},mentions:{key:"mentions",type:"object[]"},reactions:{key:"reactions",type:"object[]"},aiProvider:{key:"aiProvider",type:"string"},aiModel:{key:"aiModel",type:"string"},isAIGenerated:{key:"isAIGenerated",type:"boolean"},systemPrompt:{key:"systemPrompt",type:"string"},agentProcessSteps:{key:"agentProcessSteps",type:"object[]"},platformSource:{key:"platformSource",type:"string"},platformMessageId:{key:"platformMessageId",type:"string",index:!0},platformChannelId:{key:"platformChannelId",type:"string",index:!0},sentAt:{key:"sentAt",type:"Date",index:!0},deliveredAt:{key:"deliveredAt",type:"Date"},readAt:{key:"readAt",type:"Date"},editedAt:{key:"editedAt",type:"Date"}}})});var fc=f(lt=>{"use strict";Object.defineProperty(lt,"__esModule",{value:!0});lt.DyFM_msgConversation_dataParams=lt.DyFM_Msg_Conversation=void 0;var um=zo(),pm=Yo(),ba=class extends um.DyFM_Metadata{title;type;participants;lastMessageId;lastMessageAt;lastMessagePreview;isArchived;isMuted;isPinned;platformSource;platformChannelId;platformChannelName;aiProvider;aiModel;systemPrompt;messageCount;unreadCount;constructor(t){super(t),t&&Object.assign(this,t)}};lt.DyFM_Msg_Conversation=ba;lt.DyFM_msgConversation_dataParams=new pm.DyFM_DataModel_Params({dataName:"msg_conversation",properties:{title:{key:"title",type:"string"},type:{key:"type",type:"string",required:!0,index:!0},participants:{key:"participants",type:"DyFM_Msg_Participant[]",required:!0,subObjectParams:{userId:{key:"userId",type:"string"},role:{key:"role",type:"string"},joinedAt:{key:"joinedAt",type:"Date"}}},lastMessageId:{key:"lastMessageId",type:"string"},lastMessageAt:{key:"lastMessageAt",type:"Date",index:!0},lastMessagePreview:{key:"lastMessagePreview",type:"string"},isArchived:{key:"isArchived",type:"boolean"},isMuted:{key:"isMuted",type:"boolean"},isPinned:{key:"isPinned",type:"boolean"},platformSource:{key:"platformSource",type:"string",index:!0},platformChannelId:{key:"platformChannelId",type:"string",index:!0},platformChannelName:{key:"platformChannelName",type:"string"},aiProvider:{key:"aiProvider",type:"string"},aiModel:{key:"aiModel",type:"string"},systemPrompt:{key:"systemPrompt",type:"string"},messageCount:{key:"messageCount",type:"number"},unreadCount:{key:"unreadCount",type:"number"}}})});var _c=f(hc=>{"use strict";Object.defineProperty(hc,"__esModule",{value:!0})});var yc=f(Cc=>{"use strict";Object.defineProperty(Cc,"__esModule",{value:!0})});var bc=f(xc=>{"use strict";Object.defineProperty(xc,"__esModule",{value:!0})});var Sc=f(vc=>{"use strict";Object.defineProperty(vc,"__esModule",{value:!0})});var Dc=f(Mc=>{"use strict";Object.defineProperty(Mc,"__esModule",{value:!0})});var Ac=f(mt=>{"use strict";Object.defineProperty(mt,"__esModule",{value:!0});mt.DyFM_msgModule_settings=mt.DyFM_MsgRoute=void 0;var se=function(e){return e.getConversations="getConversations",e.getConversation="getConversation",e.createConversation="createConversation",e.updateConversation="updateConversation",e.deleteConversation="deleteConversation",e.getMessages="getMessages",e.sendMessage="sendMessage",e.editMessage="editMessage",e.deleteMessage="deleteMessage",e.markAsRead="markAsRead",e.addReaction="addReaction",e.removeReaction="removeReaction",e.addParticipant="addParticipant",e.removeParticipant="removeParticipant",e.getAgentProcess="getAgentProcess",e}(se||(mt.DyFM_MsgRoute=se={}));mt.DyFM_msgModule_settings={mainRoute:"/messaging",endPoints:{[se.getConversations]:"/conversations",[se.getConversation]:"/conversations/:conversationId",[se.createConversation]:"/conversations/create",[se.updateConversation]:"/conversations/:conversationId",[se.deleteConversation]:"/conversations/:conversationId",[se.getMessages]:"/conversations/:conversationId/messages",[se.sendMessage]:"/conversations/:conversationId/messages/send",[se.editMessage]:"/messages/:messageId/edit",[se.deleteMessage]:"/messages/:messageId",[se.markAsRead]:"/messages/mark-read",[se.addReaction]:"/messages/:messageId/reactions",[se.removeReaction]:"/messages/:messageId/reactions/:emoji",[se.addParticipant]:"/conversations/:conversationId/participants",[se.removeParticipant]:"/conversations/:conversationId/participants/:userId",[se.getAgentProcess]:"/messages/:messageId/agent-process"}}});var Rc=f(ae=>{"use strict";Object.defineProperty(ae,"__esModule",{value:!0});var ce=(_e(),fe(he));ce.__exportStar(Qd(),ae);ce.__exportStar(tc(),ae);ce.__exportStar(oc(),ae);ce.__exportStar(ac(),ae);ce.__exportStar(rc(),ae);ce.__exportStar(cc(),ae);ce.__exportStar(mc(),ae);ce.__exportStar(pc(),ae);ce.__exportStar(gc(),ae);ce.__exportStar(fc(),ae);ce.__exportStar(_c(),ae);ce.__exportStar(yc(),ae);ce.__exportStar(bc(),ae);ce.__exportStar(Sc(),ae);ce.__exportStar(Dc(),ae);ce.__exportStar(Ac(),ae)});var Ec=f(To=>{"use strict";Object.defineProperty(To,"__esModule",{value:!0});To.DyFM_Agt_ProcessStepType=void 0;var Bc=function(e){return e.collectContext="collect-context",e.analyze="analyze",e.reason="reason",e.plan="plan",e.toolUse="tool-use",e.retrieve="retrieve",e.generate="generate",e.validate="validate",e.error="error",e.complete="complete",e}(Bc||(To.DyFM_Agt_ProcessStepType=Bc={}))});var wc=f(ko=>{"use strict";Object.defineProperty(ko,"__esModule",{value:!0});ko.DyFM_Agt_ToolStatus=void 0;var Nc=function(e){return e.pending="pending",e.running="running",e.success="success",e.failed="failed",e.cancelled="cancelled",e.timeout="timeout",e}(Nc||(ko.DyFM_Agt_ToolStatus=Nc={}))});var Oc=f(Pc=>{"use strict";Object.defineProperty(Pc,"__esModule",{value:!0})});var Fc=f(Ic=>{"use strict";Object.defineProperty(Ic,"__esModule",{value:!0})});var kc=f(Tc=>{"use strict";Object.defineProperty(Tc,"__esModule",{value:!0})});var Lc=f(je=>{"use strict";Object.defineProperty(je,"__esModule",{value:!0});var Ot=(_e(),fe(he));Ot.__exportStar(Ec(),je);Ot.__exportStar(wc(),je);Ot.__exportStar(Oc(),je);Ot.__exportStar(Fc(),je);Ot.__exportStar(kc(),je)});var Gc=f(te=>{"use strict";Object.defineProperty(te,"__esModule",{value:!0});te.DyFM_fullTestRoute=te.DyFM_testModule_settings=te.DyFM_TestRoute=void 0;var me=function(e){return e.testGet="test-get",e.testPost="test-post",e.testPut="test-put",e.testPatch="test-patch",e.testDelete="test-delete",e.getServerStatus="get-server-status",e}(me||(te.DyFM_TestRoute=me={}));te.DyFM_testModule_settings={mainRoute:"/test",endPoints:j({},Object.fromEntries(Object.values(me).map(e=>[e,`/${e}`])))};te.DyFM_fullTestRoute={[me.testGet]:te.DyFM_testModule_settings.mainRoute+te.DyFM_testModule_settings.endPoints[me.testGet],[me.testPost]:te.DyFM_testModule_settings.mainRoute+te.DyFM_testModule_settings.endPoints[me.testPost],[me.testPut]:te.DyFM_testModule_settings.mainRoute+te.DyFM_testModule_settings.endPoints[me.testPut],[me.testPatch]:te.DyFM_testModule_settings.mainRoute+te.DyFM_testModule_settings.endPoints[me.testPatch],[me.testDelete]:te.DyFM_testModule_settings.mainRoute+te.DyFM_testModule_settings.endPoints[me.testDelete],[me.getServerStatus]:te.DyFM_testModule_settings.mainRoute+te.DyFM_testModule_settings.endPoints[me.getServerStatus]}});var Hc=f(va=>{"use strict";Object.defineProperty(va,"__esModule",{value:!0});var gm=(_e(),fe(he));gm.__exportStar(Gc(),va)});var Uc=f(pt=>{"use strict";Object.defineProperty(pt,"__esModule",{value:!0});pt.DyFM_usageModule_settings=pt.DyFM_UsageRoute=void 0;var ut=function(e){return e.newSession="newSession",e.closeSession="closeSession",e.updateUsage="updateUsage",e.getUsageData="getUsageData",e}(ut||(pt.DyFM_UsageRoute=ut={}));pt.DyFM_usageModule_settings={mainRoute:"/usage",endPoints:{[ut.newSession]:"/new-session",[ut.closeSession]:"/close-session/:sessionId",[ut.updateUsage]:"/update/:sessionId",[ut.getUsageData]:"/get/:range"}}});var Kc=f(gt=>{"use strict";Object.defineProperty(gt,"__esModule",{value:!0});gt.DyFM_usageSession_dataParams=gt.DyFM_UsageSession=void 0;var fm=Yo(),hm=zo(),Sa=class extends hm.DyFM_Metadata{date;sessionStart;sessionEnd;address;issuer;locationData;usageData=[];totalSessionTime;loggedInAs;constructor(t){super(t),t&&(!t.date&&t.sessionStart&&(t.date=t.sessionStart.toISOString().substring(0,10)),Object.assign(this,t))}};gt.DyFM_UsageSession=Sa;gt.DyFM_usageSession_dataParams=new fm.DyFM_DataModel_Params({dataName:"usage_session",properties:{date:{key:"date",type:"string",required:!0,index:!0},sessionStart:{key:"sessionStart",type:"Date",required:!0,index:!0},sessionEnd:{key:"sessionEnd",type:"Date"},address:{key:"address",type:"string"},issuer:{key:"issuer",type:"string"},locationData:{key:"locationData",type:"IpApiLocation"},usageData:{key:"usageData",type:"UsageData[]"},totalSessionTime:{key:"totalSessionTime",type:"number"},loggedInAs:{key:"loggedInAs",type:"string"}}})});var Vc=f(Lo=>{"use strict";Object.defineProperty(Lo,"__esModule",{value:!0});Lo.DyFM_UsageData=void 0;var Ma=class{page;opened;timeSpentOnPage;actions=[];constructor(t){t&&Object.assign(this,t)}};Lo.DyFM_UsageData=Ma});var $c=f(Go=>{"use strict";Object.defineProperty(Go,"__esModule",{value:!0});Go.DyFM_DailyUsageData=void 0;var Da=class{date;totalVisitTime=0;averageVisitTime=0;visitorsHun=0;visitorsElse=0;visitations=[];constructor(t){t&&Object.assign(this,t)}};Go.DyFM_DailyUsageData=Da});var Xc=f(Ho=>{"use strict";Object.defineProperty(Ho,"__esModule",{value:!0});Ho.DyFM_UsageAction=void 0;var Aa=class{action;time;constructor(t){t&&Object.assign(this,t)}};Ho.DyFM_UsageAction=Aa});var jc=f(ze=>{"use strict";Object.defineProperty(ze,"__esModule",{value:!0});var It=(_e(),fe(he));It.__exportStar(Uc(),ze);It.__exportStar(Kc(),ze);It.__exportStar(Vc(),ze);It.__exportStar($c(),ze);It.__exportStar(Xc(),ze)});var Wc=f(Uo=>{"use strict";Object.defineProperty(Uo,"__esModule",{value:!0});Uo.DyFM_Region=void 0;var zc=function(e){return e.europe="Europe",e.asia="Asia",e.africa="Africa",e.oceania="Oceania",e.americas="Americas",e}(zc||(Uo.DyFM_Region=zc={}))});var qc=f(Ko=>{"use strict";Object.defineProperty(Ko,"__esModule",{value:!0});Ko.DyFM_SubRegion=void 0;var Yc=function(e){return e.northernEurope="Northern Europe",e.southernEurope="Southern Europe",e.westernEurope="Western Europe",e.easternEurope="Eastern Europe",e.northernAfrica="Northern Africa",e.subSaharanAfrica="Sub-Saharan Africa",e.northernAmerica="Northern America",e.latinAmericaAndTheCaribbean="Latin America and the Caribbean",e.southEasternAsia="South-eastern Asia",e.easternAsia="Eastern Asia",e.southernAsia="Southern Asia",e.westernAsia="Western Asia",e.centralAsia="Central Asia",e.australiaAndNewZealand="Australia and New Zealand",e.melanesia="Melanesia",e.micronesia="Micronesia",e.polynesia="Polynesia",e}(Yc||(Ko.DyFM_SubRegion=Yc={}))});var Jc=f(Vo=>{"use strict";Object.defineProperty(Vo,"__esModule",{value:!0});Vo.DyFM_SubdivisionRegionType=void 0;var Zc=function(e){return e[e.parish=0]="parish",e[e.emirate=1]="emirate",e[e.province=2]="province",e[e.dependency=3]="dependency",e[e.county=4]="county",e[e.city=5]="city",e[e.region=6]="region",e[e.state=7]="state",e[e.territory=8]="territory",e[e.autonomousRepublic=9]="autonomousRepublic",e[e.municipate=10]="municipate",e[e.rayon=11]="rayon",e[e.division=12]="division",e[e.district=13]="district",e[e.governorate=14]="governorate",e[e.department=15]="department",e[e.specialMunicipality=16]="specialMunicipality",e[e.federalDistrict=17]="federalDistrict",e[e.island=18]="island",e[e.town=19]="town",e[e.oblast=20]="oblast",e[e.commune=21]="commune",e[e.prefecture=22]="prefecture",e[e.economicPrefecture=23]="economicPrefecture",e[e.canton=24]="canton",e[e.autonomousRegion=25]="autonomousRegion",e[e.specialAdministrativeRegion=26]="specialAdministrativeRegion",e[e.capitalDistrict=27]="capitalDistrict",e[e.geographicalRegion=28]="geographicalRegion",e[e.capitalCity=29]="capitalCity",e[e.ruralMunicipality=30]="ruralMunicipality",e[e.urbanMunicipality=31]="urbanMunicipality",e[e.autonomousCommunity=32]="autonomousCommunity",e[e.autonomousCity=33]="autonomousCity",e[e.administration=34]="administration",e[e.regionalState=35]="regionalState",e[e.metropolitanRegion=36]="metropolitanRegion",e[e.overseasCollectivity=37]="overseasCollectivity",e}(Zc||(Vo.DyFM_SubdivisionRegionType=Zc={}))});var Qc=f($o=>{"use strict";Object.defineProperty($o,"__esModule",{value:!0});$o.DyFM_Location=void 0;var _m=Wo(),Ft=Il(),Ra=class{static getDistanceInKilometres(t,n){let g=Ft.DyFM_Trigonometry.angleToRadians(t.latitude),s=Ft.DyFM_Trigonometry.angleToRadians(n.latitude),C=Ft.DyFM_Trigonometry.angleToRadians(n.latitude-t.latitude),i=Ft.DyFM_Trigonometry.angleToRadians(n.longitude-t.longitude),l=Math.sin(C/2)*Math.sin(C/2)+Math.cos(g)*Math.cos(s)*Math.sin(i/2)*Math.sin(i/2);return 6371*(2*Math.atan2(Math.sqrt(l),Math.sqrt(1-l)))}static getLocationDegByKilometers(t,n,o){if(t==="latitude")return n/110.574;if(o)return n/(Math.cos(Ft.DyFM_Trigonometry.angleToRadians(o))*111.32);throw new _m.DyFM_Error({status:417,errorCode:"FSM-DSS-505",addECToUserMsg:!0,message:`When using getLocationDegByKilometers for longitude, you need to give latitude! (latiOrLong: ${t}, distanceInKm: ${n}, latitude: ${o})`,userMessage:"We encountered an uncought BackEnd Error, please contact the responsible development team."})}};$o.DyFM_Location=Ra});var tl=f(el=>{"use strict";Object.defineProperty(el,"__esModule",{value:!0})});var ol=f(nl=>{"use strict";Object.defineProperty(nl,"__esModule",{value:!0})});var al=f(il=>{"use strict";Object.defineProperty(il,"__esModule",{value:!0})});var rl=f(sl=>{"use strict";Object.defineProperty(sl,"__esModule",{value:!0})});var cl=f(dl=>{"use strict";Object.defineProperty(dl,"__esModule",{value:!0})});var ml=f(ll=>{"use strict";Object.defineProperty(ll,"__esModule",{value:!0})});var pl=f(ul=>{"use strict";Object.defineProperty(ul,"__esModule",{value:!0})});var gl=f(le=>{"use strict";Object.defineProperty(le,"__esModule",{value:!0});var ye=(_e(),fe(he));ye.__exportStar(Wc(),le);ye.__exportStar(qc(),le);ye.__exportStar(Jc(),le);ye.__exportStar(Ni(),le);ye.__exportStar(hn(),le);ye.__exportStar(Qc(),le);ye.__exportStar(gn(),le);ye.__exportStar(tl(),le);ye.__exportStar(ol(),le);ye.__exportStar(al(),le);ye.__exportStar(rl(),le);ye.__exportStar(cl(),le);ye.__exportStar(ml(),le);ye.__exportStar(pl(),le)});var re=ge(vt(),1);var F=ge(Ls(),1),ue=ge(Js(),1);var Cm=ge(ld(),1);var _l=ge(wd(),1),ym=ge(Gd(),1),xm=ge(Xd(),1),bm=ge(Zd(),1),We=ge(Rc(),1),Ba=ge(Tl(),1),vm=ge(Lc(),1),Cl=ge(Hc(),1),Ea=ge(jc(),1),yl=ge(gl(),1);var Af=(()=>{class e{subscriptions=[];markedSubscriptions={};polls=[];markedPolls={};ngOnDestroy(){this.subscriptions.forEach(n=>n.unsubscribe());for(let n in this.markedSubscriptions)this.markedSubscriptions[n]?.unsubscribe();this.polls.forEach(n=>n.stop());for(let n in this.markedPolls)this.markedPolls[n]?.stop()}addSubscription(n){this.subscriptions.push(n)}addSubscriptions(n){this.subscriptions.push(...n)}addMarkedSubscription(n,o){this.markedSubscriptions[n]?.unsubscribe(),this.markedSubscriptions[n]=o}addMarkedSubscriptions(n){for(let o in n)this.markedSubscriptions[o]?.unsubscribe(),this.markedSubscriptions[o]=n[o]}removeMarkedSubscription(n){this.markedSubscriptions[n]?.unsubscribe(),this.markedSubscriptions[n]=null}removeMarkedSubscriptions(n){n.forEach(o=>this.removeMarkedSubscription(o))}addNewPoll(n){this.polls.push(n)}addNewMarkedPoll(n,o){this.markedPolls[n]?.stop(),this.markedPolls[n]=o}removeMarkedPoll(n){this.markedPolls[n]?.stop(),this.markedPolls[n]=null}static \u0275fac=function(o){return new(o||e)};static \u0275dir=Va({type:e})}return e})(),Tt=function(e){return e.info="info",e.success="success",e.warning="warning",e.error="error",e}(Tt||{});var Rf={[Tt.error]:{icon:"error",iconClass:"text-red-500",backgroundClass:"bg-red-50"},[Tt.info]:{icon:"info",iconClass:"text-blue-500",backgroundClass:"bg-blue-50"},[Tt.success]:{icon:"check_circle",iconClass:"text-green-500",backgroundClass:"bg-green-50"},[Tt.warning]:{icon:"warning",iconClass:"text-orange-500",backgroundClass:"bg-orange-50"}};var Sm="17.09",Bf=Sm.split(".")[0];var fl=class{static defaultDescriptionPosition=F.DyNM_MaterialTooltipPosition.above;static defaultDescriptionDelay=300;static definedButtonClasses={};static definedButtonContentClasses={};static getButtonStyleName(t){return[t.color,t.styleType,t.size,t.borderRadius,t.isIconButton?"icon":"",t.iconStyle,t.iconFill?"icon-fill":""].filter(o=>!!o).join("-")}static getButtonClasses(t){let n=this.getButtonStyleName(t);if(this.definedButtonClasses[n])return this.definedButtonClasses[n];{let o=this.assembleButtonClasses(t);return this.definedButtonClasses[n]=o,o}}static getButtonContentClasses(t){let n=this.getButtonStyleName(t);if(this.definedButtonContentClasses[n])return this.definedButtonContentClasses[n];{let o=this.assembleButtonContentClasses(t);return this.definedButtonContentClasses[n]=o,o}}static assembleButtonClasses(t){let n=[];return n.push(this.getButtonStyleName(t)),n.push(...this.getDefaultButtonClasses(t)),n.push("disabled:cursor-not-allowed"),n.push(...this.getColoringButtonClasses(t)),n.push(...this.getBorderRadiusClasses(t)),t.isIconButton||n.push("w-full"),n}static assembleButtonContentClasses(t){let n=["flex","items-center","justify-center"];return n.push(this.getButtonStyleName(t)),n.push(...this.getTextSizeButtonContentClasses(t)),t.iconFill&&n.push("dynamo-icon-fill"),t.isIconButton?n.push(...this.getIconMarginButtonContentClasses(t)):n.push(...this.getMarginButtonContentClasses(t)),n}static getDefaultButtonClasses(t){return t.styleType&&!(t.isIconButton||t.iconStyle!==F.DyNM_ButtonNewIconStyleType.outlined)&&![F.DyNM_ButtonNewStyleType.stroked,F.DyNM_ButtonNewStyleType.backgroundless].includes(t.styleType)?["disabled:bg-neutral-400/50","disabled:text-neutral-600","disabled:hover:bg-neutral-700/50","disabled:hover:text-neutral-200","dark:disabled:bg-neutral-600/50","dark:disabled:text-neutral-200","dark:disabled:hover:bg-neutral-600"]:[]}static getColoringButtonClasses(t){let n=[];switch(t.styleType){case F.DyNM_ButtonNewStyleType.stroked:return n.push("border-2",`border-${t.color}-500`,`text-${t.color}-500`,`hover:bg-${t.color}-500/10`,"disabled:border-neutral-500","disabled:bg-neutral-500/10","disabled:text-neutral-500","disabled:hover:bg-neutral-500/25"),F.DyNM_allMaterialColors.includes(t.color)||n.push(`dark:border-${t.color}-200`,`dark:text-${t.color}-200`,`dark:hover:bg-${t.color}-200`,`dark:hover:text-${t.color}C-200`,"dark:disabled:border-neutral-600"),n;case F.DyNM_ButtonNewStyleType.backgroundless:return n.push(`text-${t.color}-500`,`hover:bg-${t.color?t.color:"neutral"}-500/10`,"disabled:text-neutral-600","disabled:hover:bg-neutral-500/10"),F.DyNM_allMaterialColors.includes(t.color)||n.push(`dark:border-${t.color}-200`,`dark:text-${t.color}-200`,`dark:hover:bg-${t.color}-200`,`dark:hover:text-${t.color}C-200`),n;case F.DyNM_ButtonNewStyleType.tonal:return n.push(`text-${t.color}-600`,`dark:text-${t.color}-300`,`bg-${t.color}-100`,`dark:bg-${t.color}-800`,`hover:bg-${t.color}-200`,`dark:hover:bg-${t.color}-900`),F.DyNM_allMaterialColors.includes(t.color)||n.push(`dark:bg-${t.color}-200/50`,`dark:text-${t.color}C-500`),n;case F.DyNM_ButtonNewStyleType.filled:return[`bg-${t.color}-500`,`text-${t.color}C-500`,`hover:bg-${t.color}-700`,"disabled:bg-neutral-600","disabled:hover:bg-neutral-500/10"];default:return[]}}static getBorderRadiusClasses(t){if(t.isIconButton)return["rounded-full"];switch(t.borderRadius){case F.DyNM_ButtonNewBorderRadius.square:return["rounded-none"];case F.DyNM_ButtonNewBorderRadius.full:return["rounded-full"];case F.DyNM_ButtonNewBorderRadius.rounded:return["rounded-full"];default:switch(t.size){case F.DyNM_ButtonNewSize.xs:return["rounded-sm"];case F.DyNM_ButtonNewSize.small:return["rounded-lg"];case F.DyNM_ButtonNewSize.medium:return["rounded-2xl"];case F.DyNM_ButtonNewSize.large:return["rounded-3xl"];case F.DyNM_ButtonNewSize.xl:return["rounded-4xl"];default:return console.warn("CustomButtonSettingsModel: no border radius set. Default is rounded-lg."),["rounded-2xl"]}}}static getTextSizeButtonContentClasses(t){switch(t.size){case F.DyNM_ButtonNewSize.xs:return["text-xs"];case F.DyNM_ButtonNewSize.small:return["text-sm"];case F.DyNM_ButtonNewSize.medium:return["text-base"];case F.DyNM_ButtonNewSize.large:return["text-lg"];case F.DyNM_ButtonNewSize.xl:return["text-2xl"];default:return["text-base"]}}static getIconMarginButtonContentClasses(t){switch(t.size){case F.DyNM_ButtonNewSize.xs:return["m-0"];case F.DyNM_ButtonNewSize.small:return["m-0.5"];case F.DyNM_ButtonNewSize.medium:return["m-1"];case F.DyNM_ButtonNewSize.large:return["m-1.5"];case F.DyNM_ButtonNewSize.xl:return["m-2"];default:switch(t.styleType){case F.DyNM_ButtonNewStyleType.stroked:return["m-0.5"];case F.DyNM_ButtonNewStyleType.backgroundless:return["m-1.5"];default:return["m-1"]}}}static getMarginButtonContentClasses(t){switch(t.size){case F.DyNM_ButtonNewSize.xs:return t.styleType===F.DyNM_ButtonNewStyleType.stroked?["my-0","mx-2"]:["my-0.5","mx-2"];case F.DyNM_ButtonNewSize.small:return t.styleType===F.DyNM_ButtonNewStyleType.stroked?["my-1.5","mx-4"]:["my-2","mx-4"];case F.DyNM_ButtonNewSize.medium:return t.styleType===F.DyNM_ButtonNewStyleType.stroked?["my-3","mx-6"]:["my-3.5","mx-6"];case F.DyNM_ButtonNewSize.large:case F.DyNM_ButtonNewSize.xl:return t.styleType===F.DyNM_ButtonNewStyleType.stroked?["my-3.5","mx-7"]:["my-4","mx-7"];default:return console.warn("CustomButtonSettingsModel: no size set. Default is medium."),t.styleType===F.DyNM_ButtonNewStyleType.stroked?["my-3","mx-6"]:["my-3.5","mx-6"]}}static iconButtonSettingsValidation(t){t.style_$().isIconButton&&(t.label&&!t.description&&t.description!==null&&(t.description=t.label,console.warn(`CustomButtonSettingsModel: icon button has no description, but label is set. The label is set as description. Please set description for the icon button.
114
114
  (${t.id})`)),t.icon||console.error(`CustomButtonSettingsModel: icon button has no icon set. Please set icon. (${t.id})`))}};var hl=class{static phoneCodeOptions=yl.DyFM_Regions?.phoneCodes.map(t=>{let n=t.code.includes("-")?t.code.split("-")[0]:t.code;return new F.DyNM_Select(`${t.country} (+${n})`,n)})};export{Af as a};
115
- //# sourceMappingURL=chunk-44PBXW6P.js.map
115
+ //# sourceMappingURL=chunk-NVDOMHCP.js.map