@futdevpro/ccap 1.1.3484 → 1.1.3487

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 (185) hide show
  1. package/client-dist/{agent-instances.module-D7RJTPRC.js → agent-instances.module-BO4LKLQQ.js} +2 -2
  2. package/client-dist/{ca.module-RYKC6IWU.js → ca.module-MID6BKYY.js} +2 -2
  3. package/client-dist/{cc-usage-dashboard.component-IXEMZ77V.js → cc-usage-dashboard.component-UKJFNKJ2.js} +2 -2
  4. package/client-dist/{cc.module-7EF5WURP.js → cc.module-4HVDFOJ3.js} +2 -2
  5. package/client-dist/{chunk-GIYQHVN5.js → chunk-2OG2PFVS.js} +2 -2
  6. package/client-dist/{chunk-S2UMXH55.js → chunk-2R6U2YA4.js} +2 -2
  7. package/client-dist/{chunk-4A73IKZO.js → chunk-2RNHUXSQ.js} +2 -2
  8. package/client-dist/{chunk-MVLW5RNU.js → chunk-2ZTYN6HF.js} +2 -2
  9. package/client-dist/{chunk-UUURJZEI.js → chunk-34I4QVOE.js} +2 -2
  10. package/client-dist/{chunk-PNWWMCCP.js → chunk-3CTX4PXD.js} +2 -2
  11. package/client-dist/{chunk-Z6VV75GU.js → chunk-3Q2PIGHL.js} +2 -2
  12. package/client-dist/{chunk-5FLNBKFE.js → chunk-3XPR232S.js} +2 -2
  13. package/client-dist/{chunk-6D4WARJL.js → chunk-5KIWHHMS.js} +2 -2
  14. package/client-dist/{chunk-3ZK5TW4M.js → chunk-6QGYA3ZI.js} +2 -2
  15. package/client-dist/{chunk-STWIPXA2.js → chunk-6T2HUAKW.js} +2 -2
  16. package/client-dist/{chunk-XE2CW4NR.js → chunk-736XXCVH.js} +2 -2
  17. package/client-dist/{chunk-S35GBXEO.js → chunk-76QIXYL5.js} +2 -2
  18. package/client-dist/{chunk-D75W4VWL.js → chunk-7CWGX62N.js} +2 -2
  19. package/client-dist/{chunk-LL62RXZE.js → chunk-7FT4T3TD.js} +2 -2
  20. package/client-dist/{chunk-W5KZYNUE.js → chunk-7KD3JGWI.js} +2 -2
  21. package/client-dist/{chunk-LFCKRDAD.js → chunk-BI3LPPOU.js} +2 -2
  22. package/client-dist/{chunk-4SC4K2I5.js → chunk-BWKMFT5J.js} +2 -2
  23. package/client-dist/{chunk-NOSWYECO.js → chunk-BZ42EFVI.js} +2 -2
  24. package/client-dist/{chunk-KAJ2ZVPR.js → chunk-C2GDTAAC.js} +2 -2
  25. package/client-dist/{chunk-GW2W62LL.js → chunk-CD22LK3J.js} +2 -2
  26. package/client-dist/{chunk-LQ5T2FCA.js → chunk-CF6WYIFU.js} +2 -2
  27. package/client-dist/{chunk-L4PH3U6G.js → chunk-DFAF7ZFC.js} +2 -2
  28. package/client-dist/{chunk-3NZZUTER.js → chunk-E2AXJGCQ.js} +2 -2
  29. package/client-dist/{chunk-EF4MPFDG.js → chunk-E6RQE37C.js} +2 -2
  30. package/client-dist/{chunk-FL5XDHWK.js → chunk-F257AOLY.js} +2 -2
  31. package/client-dist/{chunk-4T2ICGD2.js → chunk-FVHXSYZN.js} +2 -2
  32. package/client-dist/{chunk-6E56PUJD.js → chunk-FXHQVXMP.js} +2 -2
  33. package/client-dist/{chunk-UE3DNYAU.js → chunk-FZ7QLXAM.js} +2 -2
  34. package/client-dist/{chunk-ZCLK26TJ.js → chunk-GI44ZCER.js} +2 -2
  35. package/client-dist/{chunk-7E5JTMIW.js → chunk-GJM7BWK7.js} +2 -2
  36. package/client-dist/{chunk-TIR3TOIO.js → chunk-GQXA4TTI.js} +2 -2
  37. package/client-dist/{chunk-VJ3SBMIN.js → chunk-HNEMADKK.js} +2 -2
  38. package/client-dist/{chunk-NVEZXG24.js → chunk-IMRBDQFC.js} +2 -2
  39. package/client-dist/{chunk-EOUILZMS.js → chunk-L4VBVDJL.js} +2 -2
  40. package/client-dist/{chunk-7B2G3W7Z.js → chunk-LAW3UFWL.js} +2 -2
  41. package/client-dist/{chunk-ZDPGLBKU.js → chunk-LH7XJOQK.js} +2 -2
  42. package/client-dist/{chunk-6XTMCS2Q.js → chunk-LINL65XW.js} +2 -2
  43. package/client-dist/{chunk-RUIYE6HI.js → chunk-LQUSJKYW.js} +2 -2
  44. package/client-dist/{chunk-27F7T3ST.js → chunk-MJNZ5WS7.js} +2 -2
  45. package/client-dist/{chunk-ZP6XVN6M.js → chunk-PW6V6TT5.js} +2 -2
  46. package/client-dist/{chunk-USGT3QKB.js → chunk-QFTQ4E2R.js} +2 -2
  47. package/client-dist/{chunk-7575R2YP.js → chunk-QO6PPMHC.js} +2 -2
  48. package/client-dist/{chunk-7575R2YP.js.map → chunk-QO6PPMHC.js.map} +1 -1
  49. package/client-dist/{chunk-5GKHGLNK.js → chunk-QPPLYBNQ.js} +2 -2
  50. package/client-dist/{chunk-CZMGKB37.js → chunk-QYNZU46C.js} +2 -2
  51. package/client-dist/{chunk-AL25VM54.js → chunk-T2ILBCEX.js} +2 -2
  52. package/client-dist/{chunk-4UTP4ETE.js → chunk-THAFJ7EC.js} +2 -2
  53. package/client-dist/{chunk-OFLGW6HC.js → chunk-UD3BYLMZ.js} +2 -2
  54. package/client-dist/{chunk-NFJPCMCV.js → chunk-UECCN6WJ.js} +2 -2
  55. package/client-dist/{chunk-SMYRKLUO.js → chunk-WIMRBOZH.js} +2 -2
  56. package/client-dist/{chunk-5FNFNSN5.js → chunk-WR2BE4SH.js} +2 -2
  57. package/client-dist/{chunk-LFRYJUDI.js → chunk-WX5K6XX6.js} +2 -2
  58. package/client-dist/{chunk-FA7M3UPO.js → chunk-WYYWJN2Q.js} +2 -2
  59. package/client-dist/{chunk-BTJ3PLVS.js → chunk-XORHZRDK.js} +2 -2
  60. package/client-dist/{chunk-2G73JFLB.js → chunk-YAQEWXCQ.js} +2 -2
  61. package/client-dist/{chunk-43BJEUOZ.js → chunk-YYPINPB6.js} +2 -2
  62. package/client-dist/{chunk-OQJGSREU.js → chunk-Z4FJZ3ZL.js} +2 -2
  63. package/client-dist/{consultant.module-5KCF2AUQ.js → consultant.module-KPSBJFEA.js} +2 -2
  64. package/client-dist/{crd.module-T7RQICT5.js → crd.module-S7H3Q76Q.js} +2 -2
  65. package/client-dist/{dashboard.module-Q22Z5QXM.js → dashboard.module-JOVXAW3J.js} +2 -2
  66. package/client-dist/{do.module-KYJJNMCK.js → do.module-37IIESOK.js} +2 -2
  67. package/client-dist/{document-library.module-7YHI7SCN.js → document-library.module-6RGNFIQC.js} +2 -2
  68. package/client-dist/{embedding-eval.module-PVWJF4SO.js → embedding-eval.module-LRLHGZAI.js} +2 -2
  69. package/client-dist/{embedding-registry.module-NVG7MRSJ.js → embedding-registry.module-Y46Z65ER.js} +2 -2
  70. package/client-dist/{err.module-62LOXN3N.js → err.module-U2MB6JTM.js} +2 -2
  71. package/client-dist/{feedback.module-BOAUIOFN.js → feedback.module-FJUALQPY.js} +2 -2
  72. package/client-dist/{host-runtime-mcp.module-Q5HWFPO3.js → host-runtime-mcp.module-DXTPBTAT.js} +2 -2
  73. package/client-dist/index.html +1 -1
  74. package/client-dist/{live-dev-pipeline.module-TM7AXE4U.js → live-dev-pipeline.module-HBYDB2QZ.js} +2 -2
  75. package/client-dist/{logs.module-DQA4FEPV.js → logs.module-6BSFOEGR.js} +2 -2
  76. package/client-dist/{main-C5IAWINJ.js → main-EKBFK4W3.js} +3 -3
  77. package/client-dist/{master-control-remote-poc.module-GFN2ZTDJ.js → master-control-remote-poc.module-2GGTBLD7.js} +2 -2
  78. package/client-dist/{mobile-app.module-E5MXIZAX.js → mobile-app.module-JCHGSCOT.js} +2 -2
  79. package/client-dist/{model-registry.module-T4M5G5YV.js → model-registry.module-TY4OLKGQ.js} +2 -2
  80. package/client-dist/{oc.module-2UU666WA.js → oc.module-TFMQHNYH.js} +2 -2
  81. package/client-dist/{orc.module-2IN4FKTH.js → orc.module-T4BSQMWI.js} +2 -2
  82. package/client-dist/{project-management.module-DLPWHZ56.js → project-management.module-NGG65TXN.js} +2 -2
  83. package/client-dist/project-source-routed.module-MPZWLMKW.js +2 -0
  84. package/client-dist/{scheduler.module-ELKW6PSK.js → scheduler.module-JHJVRTVI.js} +2 -2
  85. package/client-dist/{session.module-FSP3EEJM.js → session.module-5FXLU5BI.js} +2 -2
  86. package/client-dist/{set.module-ZXTUJHBG.js → set.module-HX2U4ZH4.js} +2 -2
  87. package/client-dist/{setup.module-5XX47UAL.js → setup.module-E27UNV37.js} +2 -2
  88. package/client-dist/{terminals.module-CFGHUPEL.js → terminals.module-MKQ23GT2.js} +2 -2
  89. package/client-dist/{voice-notes-poc.module-IGTRHZ7B.js → voice-notes-poc.module-PG4YKKAZ.js} +2 -2
  90. package/client-dist/{wfs.module-KWXN33ZB.js → wfs.module-PIKWGMN6.js} +2 -2
  91. package/package.json +1 -1
  92. package/server/build/src/_modules/external-sessions/_modules/claude-code/_collections/utils/cc-stream-parser.util.d.ts +8 -0
  93. package/server/build/src/_modules/external-sessions/_modules/claude-code/_collections/utils/cc-stream-parser.util.d.ts.map +1 -1
  94. package/server/build/src/_modules/external-sessions/_modules/claude-code/_collections/utils/cc-stream-parser.util.js +14 -2
  95. package/server/build/src/_modules/external-sessions/_modules/claude-code/_collections/utils/cc-stream-parser.util.js.map +1 -1
  96. package/server/build/src/_modules/external-sessions/_modules/claude-code/_collections/utils/cc-stream-parser.util.spec.js +19 -21
  97. package/server/build/src/_modules/external-sessions/_modules/claude-code/_collections/utils/cc-stream-parser.util.spec.js.map +1 -1
  98. package/client-dist/project-source-routed.module-22OCJ65V.js +0 -2
  99. /package/client-dist/{agent-instances.module-D7RJTPRC.js.map → agent-instances.module-BO4LKLQQ.js.map} +0 -0
  100. /package/client-dist/{ca.module-RYKC6IWU.js.map → ca.module-MID6BKYY.js.map} +0 -0
  101. /package/client-dist/{cc-usage-dashboard.component-IXEMZ77V.js.map → cc-usage-dashboard.component-UKJFNKJ2.js.map} +0 -0
  102. /package/client-dist/{cc.module-7EF5WURP.js.map → cc.module-4HVDFOJ3.js.map} +0 -0
  103. /package/client-dist/{chunk-GIYQHVN5.js.map → chunk-2OG2PFVS.js.map} +0 -0
  104. /package/client-dist/{chunk-S2UMXH55.js.map → chunk-2R6U2YA4.js.map} +0 -0
  105. /package/client-dist/{chunk-4A73IKZO.js.map → chunk-2RNHUXSQ.js.map} +0 -0
  106. /package/client-dist/{chunk-MVLW5RNU.js.map → chunk-2ZTYN6HF.js.map} +0 -0
  107. /package/client-dist/{chunk-UUURJZEI.js.map → chunk-34I4QVOE.js.map} +0 -0
  108. /package/client-dist/{chunk-PNWWMCCP.js.map → chunk-3CTX4PXD.js.map} +0 -0
  109. /package/client-dist/{chunk-Z6VV75GU.js.map → chunk-3Q2PIGHL.js.map} +0 -0
  110. /package/client-dist/{chunk-5FLNBKFE.js.map → chunk-3XPR232S.js.map} +0 -0
  111. /package/client-dist/{chunk-6D4WARJL.js.map → chunk-5KIWHHMS.js.map} +0 -0
  112. /package/client-dist/{chunk-3ZK5TW4M.js.map → chunk-6QGYA3ZI.js.map} +0 -0
  113. /package/client-dist/{chunk-STWIPXA2.js.map → chunk-6T2HUAKW.js.map} +0 -0
  114. /package/client-dist/{chunk-XE2CW4NR.js.map → chunk-736XXCVH.js.map} +0 -0
  115. /package/client-dist/{chunk-S35GBXEO.js.map → chunk-76QIXYL5.js.map} +0 -0
  116. /package/client-dist/{chunk-D75W4VWL.js.map → chunk-7CWGX62N.js.map} +0 -0
  117. /package/client-dist/{chunk-LL62RXZE.js.map → chunk-7FT4T3TD.js.map} +0 -0
  118. /package/client-dist/{chunk-W5KZYNUE.js.map → chunk-7KD3JGWI.js.map} +0 -0
  119. /package/client-dist/{chunk-LFCKRDAD.js.map → chunk-BI3LPPOU.js.map} +0 -0
  120. /package/client-dist/{chunk-4SC4K2I5.js.map → chunk-BWKMFT5J.js.map} +0 -0
  121. /package/client-dist/{chunk-NOSWYECO.js.map → chunk-BZ42EFVI.js.map} +0 -0
  122. /package/client-dist/{chunk-KAJ2ZVPR.js.map → chunk-C2GDTAAC.js.map} +0 -0
  123. /package/client-dist/{chunk-GW2W62LL.js.map → chunk-CD22LK3J.js.map} +0 -0
  124. /package/client-dist/{chunk-LQ5T2FCA.js.map → chunk-CF6WYIFU.js.map} +0 -0
  125. /package/client-dist/{chunk-L4PH3U6G.js.map → chunk-DFAF7ZFC.js.map} +0 -0
  126. /package/client-dist/{chunk-3NZZUTER.js.map → chunk-E2AXJGCQ.js.map} +0 -0
  127. /package/client-dist/{chunk-EF4MPFDG.js.map → chunk-E6RQE37C.js.map} +0 -0
  128. /package/client-dist/{chunk-FL5XDHWK.js.map → chunk-F257AOLY.js.map} +0 -0
  129. /package/client-dist/{chunk-4T2ICGD2.js.map → chunk-FVHXSYZN.js.map} +0 -0
  130. /package/client-dist/{chunk-6E56PUJD.js.map → chunk-FXHQVXMP.js.map} +0 -0
  131. /package/client-dist/{chunk-UE3DNYAU.js.map → chunk-FZ7QLXAM.js.map} +0 -0
  132. /package/client-dist/{chunk-ZCLK26TJ.js.map → chunk-GI44ZCER.js.map} +0 -0
  133. /package/client-dist/{chunk-7E5JTMIW.js.map → chunk-GJM7BWK7.js.map} +0 -0
  134. /package/client-dist/{chunk-TIR3TOIO.js.map → chunk-GQXA4TTI.js.map} +0 -0
  135. /package/client-dist/{chunk-VJ3SBMIN.js.map → chunk-HNEMADKK.js.map} +0 -0
  136. /package/client-dist/{chunk-NVEZXG24.js.map → chunk-IMRBDQFC.js.map} +0 -0
  137. /package/client-dist/{chunk-EOUILZMS.js.map → chunk-L4VBVDJL.js.map} +0 -0
  138. /package/client-dist/{chunk-7B2G3W7Z.js.map → chunk-LAW3UFWL.js.map} +0 -0
  139. /package/client-dist/{chunk-ZDPGLBKU.js.map → chunk-LH7XJOQK.js.map} +0 -0
  140. /package/client-dist/{chunk-6XTMCS2Q.js.map → chunk-LINL65XW.js.map} +0 -0
  141. /package/client-dist/{chunk-RUIYE6HI.js.map → chunk-LQUSJKYW.js.map} +0 -0
  142. /package/client-dist/{chunk-27F7T3ST.js.map → chunk-MJNZ5WS7.js.map} +0 -0
  143. /package/client-dist/{chunk-ZP6XVN6M.js.map → chunk-PW6V6TT5.js.map} +0 -0
  144. /package/client-dist/{chunk-USGT3QKB.js.map → chunk-QFTQ4E2R.js.map} +0 -0
  145. /package/client-dist/{chunk-5GKHGLNK.js.map → chunk-QPPLYBNQ.js.map} +0 -0
  146. /package/client-dist/{chunk-CZMGKB37.js.map → chunk-QYNZU46C.js.map} +0 -0
  147. /package/client-dist/{chunk-AL25VM54.js.map → chunk-T2ILBCEX.js.map} +0 -0
  148. /package/client-dist/{chunk-4UTP4ETE.js.map → chunk-THAFJ7EC.js.map} +0 -0
  149. /package/client-dist/{chunk-OFLGW6HC.js.map → chunk-UD3BYLMZ.js.map} +0 -0
  150. /package/client-dist/{chunk-NFJPCMCV.js.map → chunk-UECCN6WJ.js.map} +0 -0
  151. /package/client-dist/{chunk-SMYRKLUO.js.map → chunk-WIMRBOZH.js.map} +0 -0
  152. /package/client-dist/{chunk-5FNFNSN5.js.map → chunk-WR2BE4SH.js.map} +0 -0
  153. /package/client-dist/{chunk-LFRYJUDI.js.map → chunk-WX5K6XX6.js.map} +0 -0
  154. /package/client-dist/{chunk-FA7M3UPO.js.map → chunk-WYYWJN2Q.js.map} +0 -0
  155. /package/client-dist/{chunk-BTJ3PLVS.js.map → chunk-XORHZRDK.js.map} +0 -0
  156. /package/client-dist/{chunk-2G73JFLB.js.map → chunk-YAQEWXCQ.js.map} +0 -0
  157. /package/client-dist/{chunk-43BJEUOZ.js.map → chunk-YYPINPB6.js.map} +0 -0
  158. /package/client-dist/{chunk-OQJGSREU.js.map → chunk-Z4FJZ3ZL.js.map} +0 -0
  159. /package/client-dist/{consultant.module-5KCF2AUQ.js.map → consultant.module-KPSBJFEA.js.map} +0 -0
  160. /package/client-dist/{crd.module-T7RQICT5.js.map → crd.module-S7H3Q76Q.js.map} +0 -0
  161. /package/client-dist/{dashboard.module-Q22Z5QXM.js.map → dashboard.module-JOVXAW3J.js.map} +0 -0
  162. /package/client-dist/{do.module-KYJJNMCK.js.map → do.module-37IIESOK.js.map} +0 -0
  163. /package/client-dist/{document-library.module-7YHI7SCN.js.map → document-library.module-6RGNFIQC.js.map} +0 -0
  164. /package/client-dist/{embedding-eval.module-PVWJF4SO.js.map → embedding-eval.module-LRLHGZAI.js.map} +0 -0
  165. /package/client-dist/{embedding-registry.module-NVG7MRSJ.js.map → embedding-registry.module-Y46Z65ER.js.map} +0 -0
  166. /package/client-dist/{err.module-62LOXN3N.js.map → err.module-U2MB6JTM.js.map} +0 -0
  167. /package/client-dist/{feedback.module-BOAUIOFN.js.map → feedback.module-FJUALQPY.js.map} +0 -0
  168. /package/client-dist/{host-runtime-mcp.module-Q5HWFPO3.js.map → host-runtime-mcp.module-DXTPBTAT.js.map} +0 -0
  169. /package/client-dist/{live-dev-pipeline.module-TM7AXE4U.js.map → live-dev-pipeline.module-HBYDB2QZ.js.map} +0 -0
  170. /package/client-dist/{logs.module-DQA4FEPV.js.map → logs.module-6BSFOEGR.js.map} +0 -0
  171. /package/client-dist/{main-C5IAWINJ.js.map → main-EKBFK4W3.js.map} +0 -0
  172. /package/client-dist/{master-control-remote-poc.module-GFN2ZTDJ.js.map → master-control-remote-poc.module-2GGTBLD7.js.map} +0 -0
  173. /package/client-dist/{mobile-app.module-E5MXIZAX.js.map → mobile-app.module-JCHGSCOT.js.map} +0 -0
  174. /package/client-dist/{model-registry.module-T4M5G5YV.js.map → model-registry.module-TY4OLKGQ.js.map} +0 -0
  175. /package/client-dist/{oc.module-2UU666WA.js.map → oc.module-TFMQHNYH.js.map} +0 -0
  176. /package/client-dist/{orc.module-2IN4FKTH.js.map → orc.module-T4BSQMWI.js.map} +0 -0
  177. /package/client-dist/{project-management.module-DLPWHZ56.js.map → project-management.module-NGG65TXN.js.map} +0 -0
  178. /package/client-dist/{project-source-routed.module-22OCJ65V.js.map → project-source-routed.module-MPZWLMKW.js.map} +0 -0
  179. /package/client-dist/{scheduler.module-ELKW6PSK.js.map → scheduler.module-JHJVRTVI.js.map} +0 -0
  180. /package/client-dist/{session.module-FSP3EEJM.js.map → session.module-5FXLU5BI.js.map} +0 -0
  181. /package/client-dist/{set.module-ZXTUJHBG.js.map → set.module-HX2U4ZH4.js.map} +0 -0
  182. /package/client-dist/{setup.module-5XX47UAL.js.map → setup.module-E27UNV37.js.map} +0 -0
  183. /package/client-dist/{terminals.module-CFGHUPEL.js.map → terminals.module-MKQ23GT2.js.map} +0 -0
  184. /package/client-dist/{voice-notes-poc.module-IGTRHZ7B.js.map → voice-notes-poc.module-PG4YKKAZ.js.map} +0 -0
  185. /package/client-dist/{wfs.module-KWXN33ZB.js.map → wfs.module-PIKWGMN6.js.map} +0 -0
@@ -1,4 +1,4 @@
1
- import{b as mi,c as hi,d as Te}from"./chunk-LQ5T2FCA.js";import{c as Tt}from"./chunk-UUURJZEI.js";import{a as fi}from"./chunk-OFLGW6HC.js";import{a as di}from"./chunk-MVLW5RNU.js";import{a as gi}from"./chunk-EOUILZMS.js";import{f as si,i as ai,n as li,o as ci,p as pi,v as ui}from"./chunk-EO4DNTT4.js";import{a as sn}from"./chunk-5UPNU54P.js";import{j as Et}from"./chunk-6E56PUJD.js";import{p as on}from"./chunk-7575R2YP.js";import{$a as Y,C as se,Cb as vt,D as Ve,Fa as g,G as ei,Ga as T,Ha as tn,Hb as ri,Ia as nn,J as P,K as O,Kb as oi,L as ae,M as Qe,T as Xe,Ta as Ge,U as fe,Ua as rn,W as yt,X as wt,Z as d,_ as ti,a as oe,aa as G,ab as Q,b as Ue,da as A,fa as Re,ga as M,h as en,hb as w,ja as W,jb as ii,k as D,la as k,na as St,oa as ve,pa as Ee,qa as c,ra as p,sa as v,ua as F,ub as je,va as z,wa as _,xa as ni,y as He,ya as et}from"./chunk-TBMJSIBB.js";var{entries:vi,setPrototypeOf:_i,isFrozen:fr,getPrototypeOf:gr,getOwnPropertyDescriptor:_r}=Object,{freeze:te,seal:ce,create:Rt}=Object,{apply:mn,construct:hn}=typeof Reflect<"u"&&Reflect;te||(te=function(n){return n});ce||(ce=function(n){return n});mn||(mn=function(n,e){for(var r=arguments.length,i=new Array(r>2?r-2:0),o=2;o<r;o++)i[o-2]=arguments[o];return n.apply(e,i)});hn||(hn=function(n){for(var e=arguments.length,r=new Array(e>1?e-1:0),i=1;i<e;i++)r[i-1]=arguments[i];return new n(...r)});var At=ne(Array.prototype.forEach),xr=ne(Array.prototype.lastIndexOf),xi=ne(Array.prototype.pop),tt=ne(Array.prototype.push),br=ne(Array.prototype.splice),$t=ne(String.prototype.toLowerCase),an=ne(String.prototype.toString),ln=ne(String.prototype.match),nt=ne(String.prototype.replace),Cr=ne(String.prototype.indexOf),kr=ne(String.prototype.trim),le=ne(Object.prototype.hasOwnProperty),ee=ne(RegExp.prototype.test),it=yr(TypeError);function ne(t){return function(n){n instanceof RegExp&&(n.lastIndex=0);for(var e=arguments.length,r=new Array(e>1?e-1:0),i=1;i<e;i++)r[i-1]=arguments[i];return mn(t,n,r)}}function yr(t){return function(){for(var n=arguments.length,e=new Array(n),r=0;r<n;r++)e[r]=arguments[r];return hn(t,e)}}function E(t,n){let e=arguments.length>2&&arguments[2]!==void 0?arguments[2]:$t;_i&&_i(t,null);let r=n.length;for(;r--;){let i=n[r];if(typeof i=="string"){let o=e(i);o!==i&&(fr(n)||(n[r]=o),i=o)}t[i]=!0}return t}function wr(t){for(let n=0;n<t.length;n++)le(t,n)||(t[n]=null);return t}function ge(t){let n=Rt(null);for(let[e,r]of vi(t))le(t,e)&&(Array.isArray(r)?n[e]=wr(r):r&&typeof r=="object"&&r.constructor===Object?n[e]=ge(r):n[e]=r);return n}function rt(t,n){for(;t!==null;){let r=_r(t,n);if(r){if(r.get)return ne(r.get);if(typeof r.value=="function")return ne(r.value)}t=gr(t)}function e(){return null}return e}var bi=te(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","search","section","select","shadow","slot","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),cn=te(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","enterkeyhint","exportparts","filter","font","g","glyph","glyphref","hkern","image","inputmode","line","lineargradient","marker","mask","metadata","mpath","part","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),pn=te(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),Sr=te(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),un=te(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),vr=te(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),Ci=te(["#text"]),ki=te(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","exportparts","face","for","headers","height","hidden","high","href","hreflang","id","inert","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","part","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","slot","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns","slot"]),dn=te(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","mask-type","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),yi=te(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),Mt=te(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),Er=ce(/\{\{[\w\W]*|[\w\W]*\}\}/gm),Tr=ce(/<%[\w\W]*|[\w\W]*%>/gm),Ar=ce(/\$\{[\w\W]*/gm),Mr=ce(/^data-[\-\w.\u00B7-\uFFFF]+$/),Rr=ce(/^aria-[\-\w]+$/),Ei=ce(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),$r=ce(/^(?:\w+script|data):/i),Lr=ce(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),Ti=ce(/^html$/i),Ir=ce(/^[a-z][.\w]*(-[.\w]+)+$/i),wi=Object.freeze({__proto__:null,ARIA_ATTR:Rr,ATTR_WHITESPACE:Lr,CUSTOM_ELEMENT:Ir,DATA_ATTR:Mr,DOCTYPE_NAME:Ti,ERB_EXPR:Tr,IS_ALLOWED_URI:Ei,IS_SCRIPT_OR_DATA:$r,MUSTACHE_EXPR:Er,TMPLIT_EXPR:Ar}),ot={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,progressingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},Br=function(){return typeof window>"u"?null:window},Dr=function(n,e){if(typeof n!="object"||typeof n.createPolicy!="function")return null;let r=null,i="data-tt-policy-suffix";e&&e.hasAttribute(i)&&(r=e.getAttribute(i));let o="dompurify"+(r?"#"+r:"");try{return n.createPolicy(o,{createHTML(s){return s},createScriptURL(s){return s}})}catch{return console.warn("TrustedTypes policy "+o+" could not be created."),null}},Si=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};function Ai(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Br(),n=b=>Ai(b);if(n.version="3.3.3",n.removed=[],!t||!t.document||t.document.nodeType!==ot.document||!t.Element)return n.isSupported=!1,n;let{document:e}=t,r=e,i=r.currentScript,{DocumentFragment:o,HTMLTemplateElement:s,Node:u,Element:l,NodeFilter:h,NamedNodeMap:m=t.NamedNodeMap||t.MozNamedAttrMap,HTMLFormElement:C,DOMParser:S,trustedTypes:I}=t,L=l.prototype,pe=rt(L,"cloneNode"),ut=rt(L,"remove"),dt=rt(L,"nextSibling"),mt=rt(L,"childNodes"),Be=rt(L,"parentNode");if(typeof s=="function"){let b=e.createElement("template");b.content&&b.content.ownerDocument&&(e=b.content.ownerDocument)}let q,be="",{implementation:Ce,createNodeIterator:Xi,createDocumentFragment:er,getElementsByTagName:tr}=e,{importNode:nr}=r,X=Si();n.isSupported=typeof vi=="function"&&typeof Be=="function"&&Ce&&Ce.createHTMLDocument!==void 0;let{MUSTACHE_EXPR:Ft,ERB_EXPR:Ut,TMPLIT_EXPR:Ht,DATA_ATTR:ir,ARIA_ATTR:rr,IS_SCRIPT_OR_DATA:or,ATTR_WHITESPACE:Rn,CUSTOM_ELEMENT:sr}=wi,{IS_ALLOWED_URI:$n}=wi,j=null,Ln=E({},[...bi,...cn,...pn,...un,...Ci]),K=null,In=E({},[...ki,...dn,...yi,...Mt]),U=Object.seal(Rt(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),Je=null,ht=null,Se=Object.seal(Rt(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}})),Bn=!0,Vt=!0,Dn=!1,Pn=!0,De=!1,ft=!0,Ae=!1,Gt=!1,jt=!1,Pe=!1,gt=!1,_t=!1,On=!0,zn=!1,ar="user-content-",Wt=!0,Ze=!1,Oe={},me=null,qt=E({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]),Nn=null,Fn=E({},["audio","video","img","source","image","track"]),Kt=null,Un=E({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),xt="http://www.w3.org/1998/Math/MathML",bt="http://www.w3.org/2000/svg",ke="http://www.w3.org/1999/xhtml",ze=ke,Jt=!1,Zt=null,lr=E({},[xt,bt,ke],an),Ct=E({},["mi","mo","mn","ms","mtext"]),kt=E({},["annotation-xml"]),cr=E({},["title","style","font","a","script"]),Ye=null,pr=["application/xhtml+xml","text/html"],ur="text/html",V=null,Ne=null,dr=e.createElement("form"),Hn=function(a){return a instanceof RegExp||a instanceof Function},Yt=function(){let a=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(Ne&&Ne===a)){if((!a||typeof a!="object")&&(a={}),a=ge(a),Ye=pr.indexOf(a.PARSER_MEDIA_TYPE)===-1?ur:a.PARSER_MEDIA_TYPE,V=Ye==="application/xhtml+xml"?an:$t,j=le(a,"ALLOWED_TAGS")?E({},a.ALLOWED_TAGS,V):Ln,K=le(a,"ALLOWED_ATTR")?E({},a.ALLOWED_ATTR,V):In,Zt=le(a,"ALLOWED_NAMESPACES")?E({},a.ALLOWED_NAMESPACES,an):lr,Kt=le(a,"ADD_URI_SAFE_ATTR")?E(ge(Un),a.ADD_URI_SAFE_ATTR,V):Un,Nn=le(a,"ADD_DATA_URI_TAGS")?E(ge(Fn),a.ADD_DATA_URI_TAGS,V):Fn,me=le(a,"FORBID_CONTENTS")?E({},a.FORBID_CONTENTS,V):qt,Je=le(a,"FORBID_TAGS")?E({},a.FORBID_TAGS,V):ge({}),ht=le(a,"FORBID_ATTR")?E({},a.FORBID_ATTR,V):ge({}),Oe=le(a,"USE_PROFILES")?a.USE_PROFILES:!1,Bn=a.ALLOW_ARIA_ATTR!==!1,Vt=a.ALLOW_DATA_ATTR!==!1,Dn=a.ALLOW_UNKNOWN_PROTOCOLS||!1,Pn=a.ALLOW_SELF_CLOSE_IN_ATTR!==!1,De=a.SAFE_FOR_TEMPLATES||!1,ft=a.SAFE_FOR_XML!==!1,Ae=a.WHOLE_DOCUMENT||!1,Pe=a.RETURN_DOM||!1,gt=a.RETURN_DOM_FRAGMENT||!1,_t=a.RETURN_TRUSTED_TYPE||!1,jt=a.FORCE_BODY||!1,On=a.SANITIZE_DOM!==!1,zn=a.SANITIZE_NAMED_PROPS||!1,Wt=a.KEEP_CONTENT!==!1,Ze=a.IN_PLACE||!1,$n=a.ALLOWED_URI_REGEXP||Ei,ze=a.NAMESPACE||ke,Ct=a.MATHML_TEXT_INTEGRATION_POINTS||Ct,kt=a.HTML_INTEGRATION_POINTS||kt,U=a.CUSTOM_ELEMENT_HANDLING||{},a.CUSTOM_ELEMENT_HANDLING&&Hn(a.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(U.tagNameCheck=a.CUSTOM_ELEMENT_HANDLING.tagNameCheck),a.CUSTOM_ELEMENT_HANDLING&&Hn(a.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(U.attributeNameCheck=a.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),a.CUSTOM_ELEMENT_HANDLING&&typeof a.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(U.allowCustomizedBuiltInElements=a.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),De&&(Vt=!1),gt&&(Pe=!0),Oe&&(j=E({},Ci),K=Rt(null),Oe.html===!0&&(E(j,bi),E(K,ki)),Oe.svg===!0&&(E(j,cn),E(K,dn),E(K,Mt)),Oe.svgFilters===!0&&(E(j,pn),E(K,dn),E(K,Mt)),Oe.mathMl===!0&&(E(j,un),E(K,yi),E(K,Mt))),le(a,"ADD_TAGS")||(Se.tagCheck=null),le(a,"ADD_ATTR")||(Se.attributeCheck=null),a.ADD_TAGS&&(typeof a.ADD_TAGS=="function"?Se.tagCheck=a.ADD_TAGS:(j===Ln&&(j=ge(j)),E(j,a.ADD_TAGS,V))),a.ADD_ATTR&&(typeof a.ADD_ATTR=="function"?Se.attributeCheck=a.ADD_ATTR:(K===In&&(K=ge(K)),E(K,a.ADD_ATTR,V))),a.ADD_URI_SAFE_ATTR&&E(Kt,a.ADD_URI_SAFE_ATTR,V),a.FORBID_CONTENTS&&(me===qt&&(me=ge(me)),E(me,a.FORBID_CONTENTS,V)),a.ADD_FORBID_CONTENTS&&(me===qt&&(me=ge(me)),E(me,a.ADD_FORBID_CONTENTS,V)),Wt&&(j["#text"]=!0),Ae&&E(j,["html","head","body"]),j.table&&(E(j,["tbody"]),delete Je.tbody),a.TRUSTED_TYPES_POLICY){if(typeof a.TRUSTED_TYPES_POLICY.createHTML!="function")throw it('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof a.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw it('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');q=a.TRUSTED_TYPES_POLICY,be=q.createHTML("")}else q===void 0&&(q=Dr(I,i)),q!==null&&typeof be=="string"&&(be=q.createHTML(""));te&&te(a),Ne=a}},Vn=E({},[...cn,...pn,...Sr]),Gn=E({},[...un,...vr]),mr=function(a){let f=Be(a);(!f||!f.tagName)&&(f={namespaceURI:ze,tagName:"template"});let x=$t(a.tagName),B=$t(f.tagName);return Zt[a.namespaceURI]?a.namespaceURI===bt?f.namespaceURI===ke?x==="svg":f.namespaceURI===xt?x==="svg"&&(B==="annotation-xml"||Ct[B]):!!Vn[x]:a.namespaceURI===xt?f.namespaceURI===ke?x==="math":f.namespaceURI===bt?x==="math"&&kt[B]:!!Gn[x]:a.namespaceURI===ke?f.namespaceURI===bt&&!kt[B]||f.namespaceURI===xt&&!Ct[B]?!1:!Gn[x]&&(cr[x]||!Vn[x]):!!(Ye==="application/xhtml+xml"&&Zt[a.namespaceURI]):!1},he=function(a){tt(n.removed,{element:a});try{Be(a).removeChild(a)}catch{ut(a)}},Me=function(a,f){try{tt(n.removed,{attribute:f.getAttributeNode(a),from:f})}catch{tt(n.removed,{attribute:null,from:f})}if(f.removeAttribute(a),a==="is")if(Pe||gt)try{he(f)}catch{}else try{f.setAttribute(a,"")}catch{}},jn=function(a){let f=null,x=null;if(jt)a="<remove></remove>"+a;else{let H=ln(a,/^[\r\n\t ]+/);x=H&&H[0]}Ye==="application/xhtml+xml"&&ze===ke&&(a='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+a+"</body></html>");let B=q?q.createHTML(a):a;if(ze===ke)try{f=new S().parseFromString(B,Ye)}catch{}if(!f||!f.documentElement){f=Ce.createDocument(ze,"template",null);try{f.documentElement.innerHTML=Jt?be:B}catch{}}let Z=f.body||f.documentElement;return a&&x&&Z.insertBefore(e.createTextNode(x),Z.childNodes[0]||null),ze===ke?tr.call(f,Ae?"html":"body")[0]:Ae?f.documentElement:Z},Wn=function(a){return Xi.call(a.ownerDocument||a,a,h.SHOW_ELEMENT|h.SHOW_COMMENT|h.SHOW_TEXT|h.SHOW_PROCESSING_INSTRUCTION|h.SHOW_CDATA_SECTION,null)},Qt=function(a){return a instanceof C&&(typeof a.nodeName!="string"||typeof a.textContent!="string"||typeof a.removeChild!="function"||!(a.attributes instanceof m)||typeof a.removeAttribute!="function"||typeof a.setAttribute!="function"||typeof a.namespaceURI!="string"||typeof a.insertBefore!="function"||typeof a.hasChildNodes!="function")},qn=function(a){return typeof u=="function"&&a instanceof u};function ye(b,a,f){At(b,x=>{x.call(n,a,f,Ne)})}let Kn=function(a){let f=null;if(ye(X.beforeSanitizeElements,a,null),Qt(a))return he(a),!0;let x=V(a.nodeName);if(ye(X.uponSanitizeElement,a,{tagName:x,allowedTags:j}),ft&&a.hasChildNodes()&&!qn(a.firstElementChild)&&ee(/<[/\w!]/g,a.innerHTML)&&ee(/<[/\w!]/g,a.textContent)||a.nodeType===ot.progressingInstruction||ft&&a.nodeType===ot.comment&&ee(/<[/\w]/g,a.data))return he(a),!0;if(!(Se.tagCheck instanceof Function&&Se.tagCheck(x))&&(!j[x]||Je[x])){if(!Je[x]&&Zn(x)&&(U.tagNameCheck instanceof RegExp&&ee(U.tagNameCheck,x)||U.tagNameCheck instanceof Function&&U.tagNameCheck(x)))return!1;if(Wt&&!me[x]){let B=Be(a)||a.parentNode,Z=mt(a)||a.childNodes;if(Z&&B){let H=Z.length;for(let re=H-1;re>=0;--re){let we=pe(Z[re],!0);we.__removalCount=(a.__removalCount||0)+1,B.insertBefore(we,dt(a))}}}return he(a),!0}return a instanceof l&&!mr(a)||(x==="noscript"||x==="noembed"||x==="noframes")&&ee(/<\/no(script|embed|frames)/i,a.innerHTML)?(he(a),!0):(De&&a.nodeType===ot.text&&(f=a.textContent,At([Ft,Ut,Ht],B=>{f=nt(f,B," ")}),a.textContent!==f&&(tt(n.removed,{element:a.cloneNode()}),a.textContent=f)),ye(X.afterSanitizeElements,a,null),!1)},Jn=function(a,f,x){if(ht[f]||On&&(f==="id"||f==="name")&&(x in e||x in dr))return!1;if(!(Vt&&!ht[f]&&ee(ir,f))){if(!(Bn&&ee(rr,f))){if(!(Se.attributeCheck instanceof Function&&Se.attributeCheck(f,a))){if(!K[f]||ht[f]){if(!(Zn(a)&&(U.tagNameCheck instanceof RegExp&&ee(U.tagNameCheck,a)||U.tagNameCheck instanceof Function&&U.tagNameCheck(a))&&(U.attributeNameCheck instanceof RegExp&&ee(U.attributeNameCheck,f)||U.attributeNameCheck instanceof Function&&U.attributeNameCheck(f,a))||f==="is"&&U.allowCustomizedBuiltInElements&&(U.tagNameCheck instanceof RegExp&&ee(U.tagNameCheck,x)||U.tagNameCheck instanceof Function&&U.tagNameCheck(x))))return!1}else if(!Kt[f]){if(!ee($n,nt(x,Rn,""))){if(!((f==="src"||f==="xlink:href"||f==="href")&&a!=="script"&&Cr(x,"data:")===0&&Nn[a])){if(!(Dn&&!ee(or,nt(x,Rn,"")))){if(x)return!1}}}}}}}return!0},Zn=function(a){return a!=="annotation-xml"&&ln(a,sr)},Yn=function(a){ye(X.beforeSanitizeAttributes,a,null);let{attributes:f}=a;if(!f||Qt(a))return;let x={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:K,forceKeepAttr:void 0},B=f.length;for(;B--;){let Z=f[B],{name:H,namespaceURI:re,value:we}=Z,Fe=V(H),Xt=we,J=H==="value"?Xt:kr(Xt);if(x.attrName=Fe,x.attrValue=J,x.keepAttr=!0,x.forceKeepAttr=void 0,ye(X.uponSanitizeAttribute,a,x),J=x.attrValue,zn&&(Fe==="id"||Fe==="name")&&(Me(H,a),J=ar+J),ft&&ee(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,J)){Me(H,a);continue}if(Fe==="attributename"&&ln(J,"href")){Me(H,a);continue}if(x.forceKeepAttr)continue;if(!x.keepAttr){Me(H,a);continue}if(!Pn&&ee(/\/>/i,J)){Me(H,a);continue}De&&At([Ft,Ut,Ht],Xn=>{J=nt(J,Xn," ")});let Qn=V(a.nodeName);if(!Jn(Qn,Fe,J)){Me(H,a);continue}if(q&&typeof I=="object"&&typeof I.getAttributeType=="function"&&!re)switch(I.getAttributeType(Qn,Fe)){case"TrustedHTML":{J=q.createHTML(J);break}case"TrustedScriptURL":{J=q.createScriptURL(J);break}}if(J!==Xt)try{re?a.setAttributeNS(re,H,J):a.setAttribute(H,J),Qt(a)?he(a):xi(n.removed)}catch{Me(H,a)}}ye(X.afterSanitizeAttributes,a,null)},hr=function b(a){let f=null,x=Wn(a);for(ye(X.beforeSanitizeShadowDOM,a,null);f=x.nextNode();)ye(X.uponSanitizeShadowNode,f,null),Kn(f),Yn(f),f.content instanceof o&&b(f.content);ye(X.afterSanitizeShadowDOM,a,null)};return n.sanitize=function(b){let a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},f=null,x=null,B=null,Z=null;if(Jt=!b,Jt&&(b="<!-->"),typeof b!="string"&&!qn(b))if(typeof b.toString=="function"){if(b=b.toString(),typeof b!="string")throw it("dirty is not a string, aborting")}else throw it("toString is not a function");if(!n.isSupported)return b;if(Gt||Yt(a),n.removed=[],typeof b=="string"&&(Ze=!1),Ze){if(b.nodeName){let we=V(b.nodeName);if(!j[we]||Je[we])throw it("root node is forbidden and cannot be sanitized in-place")}}else if(b instanceof u)f=jn("<!---->"),x=f.ownerDocument.importNode(b,!0),x.nodeType===ot.element&&x.nodeName==="BODY"||x.nodeName==="HTML"?f=x:f.appendChild(x);else{if(!Pe&&!De&&!Ae&&b.indexOf("<")===-1)return q&&_t?q.createHTML(b):b;if(f=jn(b),!f)return Pe?null:_t?be:""}f&&jt&&he(f.firstChild);let H=Wn(Ze?b:f);for(;B=H.nextNode();)Kn(B),Yn(B),B.content instanceof o&&hr(B.content);if(Ze)return b;if(Pe){if(gt)for(Z=er.call(f.ownerDocument);f.firstChild;)Z.appendChild(f.firstChild);else Z=f;return(K.shadowroot||K.shadowrootmode)&&(Z=nr.call(r,Z,!0)),Z}let re=Ae?f.outerHTML:f.innerHTML;return Ae&&j["!doctype"]&&f.ownerDocument&&f.ownerDocument.doctype&&f.ownerDocument.doctype.name&&ee(Ti,f.ownerDocument.doctype.name)&&(re="<!DOCTYPE "+f.ownerDocument.doctype.name+`>
1
+ import{b as mi,c as hi,d as Te}from"./chunk-CF6WYIFU.js";import{c as Tt}from"./chunk-34I4QVOE.js";import{a as fi}from"./chunk-UD3BYLMZ.js";import{a as di}from"./chunk-2ZTYN6HF.js";import{a as gi}from"./chunk-L4VBVDJL.js";import{f as si,i as ai,n as li,o as ci,p as pi,v as ui}from"./chunk-EO4DNTT4.js";import{a as sn}from"./chunk-5UPNU54P.js";import{j as Et}from"./chunk-FXHQVXMP.js";import{p as on}from"./chunk-QO6PPMHC.js";import{$a as Y,C as se,Cb as vt,D as Ve,Fa as g,G as ei,Ga as T,Ha as tn,Hb as ri,Ia as nn,J as P,K as O,Kb as oi,L as ae,M as Qe,T as Xe,Ta as Ge,U as fe,Ua as rn,W as yt,X as wt,Z as d,_ as ti,a as oe,aa as G,ab as Q,b as Ue,da as A,fa as Re,ga as M,h as en,hb as w,ja as W,jb as ii,k as D,la as k,na as St,oa as ve,pa as Ee,qa as c,ra as p,sa as v,ua as F,ub as je,va as z,wa as _,xa as ni,y as He,ya as et}from"./chunk-TBMJSIBB.js";var{entries:vi,setPrototypeOf:_i,isFrozen:fr,getPrototypeOf:gr,getOwnPropertyDescriptor:_r}=Object,{freeze:te,seal:ce,create:Rt}=Object,{apply:mn,construct:hn}=typeof Reflect<"u"&&Reflect;te||(te=function(n){return n});ce||(ce=function(n){return n});mn||(mn=function(n,e){for(var r=arguments.length,i=new Array(r>2?r-2:0),o=2;o<r;o++)i[o-2]=arguments[o];return n.apply(e,i)});hn||(hn=function(n){for(var e=arguments.length,r=new Array(e>1?e-1:0),i=1;i<e;i++)r[i-1]=arguments[i];return new n(...r)});var At=ne(Array.prototype.forEach),xr=ne(Array.prototype.lastIndexOf),xi=ne(Array.prototype.pop),tt=ne(Array.prototype.push),br=ne(Array.prototype.splice),$t=ne(String.prototype.toLowerCase),an=ne(String.prototype.toString),ln=ne(String.prototype.match),nt=ne(String.prototype.replace),Cr=ne(String.prototype.indexOf),kr=ne(String.prototype.trim),le=ne(Object.prototype.hasOwnProperty),ee=ne(RegExp.prototype.test),it=yr(TypeError);function ne(t){return function(n){n instanceof RegExp&&(n.lastIndex=0);for(var e=arguments.length,r=new Array(e>1?e-1:0),i=1;i<e;i++)r[i-1]=arguments[i];return mn(t,n,r)}}function yr(t){return function(){for(var n=arguments.length,e=new Array(n),r=0;r<n;r++)e[r]=arguments[r];return hn(t,e)}}function E(t,n){let e=arguments.length>2&&arguments[2]!==void 0?arguments[2]:$t;_i&&_i(t,null);let r=n.length;for(;r--;){let i=n[r];if(typeof i=="string"){let o=e(i);o!==i&&(fr(n)||(n[r]=o),i=o)}t[i]=!0}return t}function wr(t){for(let n=0;n<t.length;n++)le(t,n)||(t[n]=null);return t}function ge(t){let n=Rt(null);for(let[e,r]of vi(t))le(t,e)&&(Array.isArray(r)?n[e]=wr(r):r&&typeof r=="object"&&r.constructor===Object?n[e]=ge(r):n[e]=r);return n}function rt(t,n){for(;t!==null;){let r=_r(t,n);if(r){if(r.get)return ne(r.get);if(typeof r.value=="function")return ne(r.value)}t=gr(t)}function e(){return null}return e}var bi=te(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","search","section","select","shadow","slot","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),cn=te(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","enterkeyhint","exportparts","filter","font","g","glyph","glyphref","hkern","image","inputmode","line","lineargradient","marker","mask","metadata","mpath","part","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),pn=te(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),Sr=te(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),un=te(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),vr=te(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),Ci=te(["#text"]),ki=te(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","exportparts","face","for","headers","height","hidden","high","href","hreflang","id","inert","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","part","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","slot","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns","slot"]),dn=te(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","mask-type","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),yi=te(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),Mt=te(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),Er=ce(/\{\{[\w\W]*|[\w\W]*\}\}/gm),Tr=ce(/<%[\w\W]*|[\w\W]*%>/gm),Ar=ce(/\$\{[\w\W]*/gm),Mr=ce(/^data-[\-\w.\u00B7-\uFFFF]+$/),Rr=ce(/^aria-[\-\w]+$/),Ei=ce(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),$r=ce(/^(?:\w+script|data):/i),Lr=ce(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),Ti=ce(/^html$/i),Ir=ce(/^[a-z][.\w]*(-[.\w]+)+$/i),wi=Object.freeze({__proto__:null,ARIA_ATTR:Rr,ATTR_WHITESPACE:Lr,CUSTOM_ELEMENT:Ir,DATA_ATTR:Mr,DOCTYPE_NAME:Ti,ERB_EXPR:Tr,IS_ALLOWED_URI:Ei,IS_SCRIPT_OR_DATA:$r,MUSTACHE_EXPR:Er,TMPLIT_EXPR:Ar}),ot={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,progressingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},Br=function(){return typeof window>"u"?null:window},Dr=function(n,e){if(typeof n!="object"||typeof n.createPolicy!="function")return null;let r=null,i="data-tt-policy-suffix";e&&e.hasAttribute(i)&&(r=e.getAttribute(i));let o="dompurify"+(r?"#"+r:"");try{return n.createPolicy(o,{createHTML(s){return s},createScriptURL(s){return s}})}catch{return console.warn("TrustedTypes policy "+o+" could not be created."),null}},Si=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};function Ai(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Br(),n=b=>Ai(b);if(n.version="3.3.3",n.removed=[],!t||!t.document||t.document.nodeType!==ot.document||!t.Element)return n.isSupported=!1,n;let{document:e}=t,r=e,i=r.currentScript,{DocumentFragment:o,HTMLTemplateElement:s,Node:u,Element:l,NodeFilter:h,NamedNodeMap:m=t.NamedNodeMap||t.MozNamedAttrMap,HTMLFormElement:C,DOMParser:S,trustedTypes:I}=t,L=l.prototype,pe=rt(L,"cloneNode"),ut=rt(L,"remove"),dt=rt(L,"nextSibling"),mt=rt(L,"childNodes"),Be=rt(L,"parentNode");if(typeof s=="function"){let b=e.createElement("template");b.content&&b.content.ownerDocument&&(e=b.content.ownerDocument)}let q,be="",{implementation:Ce,createNodeIterator:Xi,createDocumentFragment:er,getElementsByTagName:tr}=e,{importNode:nr}=r,X=Si();n.isSupported=typeof vi=="function"&&typeof Be=="function"&&Ce&&Ce.createHTMLDocument!==void 0;let{MUSTACHE_EXPR:Ft,ERB_EXPR:Ut,TMPLIT_EXPR:Ht,DATA_ATTR:ir,ARIA_ATTR:rr,IS_SCRIPT_OR_DATA:or,ATTR_WHITESPACE:Rn,CUSTOM_ELEMENT:sr}=wi,{IS_ALLOWED_URI:$n}=wi,j=null,Ln=E({},[...bi,...cn,...pn,...un,...Ci]),K=null,In=E({},[...ki,...dn,...yi,...Mt]),U=Object.seal(Rt(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),Je=null,ht=null,Se=Object.seal(Rt(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}})),Bn=!0,Vt=!0,Dn=!1,Pn=!0,De=!1,ft=!0,Ae=!1,Gt=!1,jt=!1,Pe=!1,gt=!1,_t=!1,On=!0,zn=!1,ar="user-content-",Wt=!0,Ze=!1,Oe={},me=null,qt=E({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]),Nn=null,Fn=E({},["audio","video","img","source","image","track"]),Kt=null,Un=E({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),xt="http://www.w3.org/1998/Math/MathML",bt="http://www.w3.org/2000/svg",ke="http://www.w3.org/1999/xhtml",ze=ke,Jt=!1,Zt=null,lr=E({},[xt,bt,ke],an),Ct=E({},["mi","mo","mn","ms","mtext"]),kt=E({},["annotation-xml"]),cr=E({},["title","style","font","a","script"]),Ye=null,pr=["application/xhtml+xml","text/html"],ur="text/html",V=null,Ne=null,dr=e.createElement("form"),Hn=function(a){return a instanceof RegExp||a instanceof Function},Yt=function(){let a=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(Ne&&Ne===a)){if((!a||typeof a!="object")&&(a={}),a=ge(a),Ye=pr.indexOf(a.PARSER_MEDIA_TYPE)===-1?ur:a.PARSER_MEDIA_TYPE,V=Ye==="application/xhtml+xml"?an:$t,j=le(a,"ALLOWED_TAGS")?E({},a.ALLOWED_TAGS,V):Ln,K=le(a,"ALLOWED_ATTR")?E({},a.ALLOWED_ATTR,V):In,Zt=le(a,"ALLOWED_NAMESPACES")?E({},a.ALLOWED_NAMESPACES,an):lr,Kt=le(a,"ADD_URI_SAFE_ATTR")?E(ge(Un),a.ADD_URI_SAFE_ATTR,V):Un,Nn=le(a,"ADD_DATA_URI_TAGS")?E(ge(Fn),a.ADD_DATA_URI_TAGS,V):Fn,me=le(a,"FORBID_CONTENTS")?E({},a.FORBID_CONTENTS,V):qt,Je=le(a,"FORBID_TAGS")?E({},a.FORBID_TAGS,V):ge({}),ht=le(a,"FORBID_ATTR")?E({},a.FORBID_ATTR,V):ge({}),Oe=le(a,"USE_PROFILES")?a.USE_PROFILES:!1,Bn=a.ALLOW_ARIA_ATTR!==!1,Vt=a.ALLOW_DATA_ATTR!==!1,Dn=a.ALLOW_UNKNOWN_PROTOCOLS||!1,Pn=a.ALLOW_SELF_CLOSE_IN_ATTR!==!1,De=a.SAFE_FOR_TEMPLATES||!1,ft=a.SAFE_FOR_XML!==!1,Ae=a.WHOLE_DOCUMENT||!1,Pe=a.RETURN_DOM||!1,gt=a.RETURN_DOM_FRAGMENT||!1,_t=a.RETURN_TRUSTED_TYPE||!1,jt=a.FORCE_BODY||!1,On=a.SANITIZE_DOM!==!1,zn=a.SANITIZE_NAMED_PROPS||!1,Wt=a.KEEP_CONTENT!==!1,Ze=a.IN_PLACE||!1,$n=a.ALLOWED_URI_REGEXP||Ei,ze=a.NAMESPACE||ke,Ct=a.MATHML_TEXT_INTEGRATION_POINTS||Ct,kt=a.HTML_INTEGRATION_POINTS||kt,U=a.CUSTOM_ELEMENT_HANDLING||{},a.CUSTOM_ELEMENT_HANDLING&&Hn(a.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(U.tagNameCheck=a.CUSTOM_ELEMENT_HANDLING.tagNameCheck),a.CUSTOM_ELEMENT_HANDLING&&Hn(a.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(U.attributeNameCheck=a.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),a.CUSTOM_ELEMENT_HANDLING&&typeof a.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(U.allowCustomizedBuiltInElements=a.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),De&&(Vt=!1),gt&&(Pe=!0),Oe&&(j=E({},Ci),K=Rt(null),Oe.html===!0&&(E(j,bi),E(K,ki)),Oe.svg===!0&&(E(j,cn),E(K,dn),E(K,Mt)),Oe.svgFilters===!0&&(E(j,pn),E(K,dn),E(K,Mt)),Oe.mathMl===!0&&(E(j,un),E(K,yi),E(K,Mt))),le(a,"ADD_TAGS")||(Se.tagCheck=null),le(a,"ADD_ATTR")||(Se.attributeCheck=null),a.ADD_TAGS&&(typeof a.ADD_TAGS=="function"?Se.tagCheck=a.ADD_TAGS:(j===Ln&&(j=ge(j)),E(j,a.ADD_TAGS,V))),a.ADD_ATTR&&(typeof a.ADD_ATTR=="function"?Se.attributeCheck=a.ADD_ATTR:(K===In&&(K=ge(K)),E(K,a.ADD_ATTR,V))),a.ADD_URI_SAFE_ATTR&&E(Kt,a.ADD_URI_SAFE_ATTR,V),a.FORBID_CONTENTS&&(me===qt&&(me=ge(me)),E(me,a.FORBID_CONTENTS,V)),a.ADD_FORBID_CONTENTS&&(me===qt&&(me=ge(me)),E(me,a.ADD_FORBID_CONTENTS,V)),Wt&&(j["#text"]=!0),Ae&&E(j,["html","head","body"]),j.table&&(E(j,["tbody"]),delete Je.tbody),a.TRUSTED_TYPES_POLICY){if(typeof a.TRUSTED_TYPES_POLICY.createHTML!="function")throw it('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof a.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw it('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');q=a.TRUSTED_TYPES_POLICY,be=q.createHTML("")}else q===void 0&&(q=Dr(I,i)),q!==null&&typeof be=="string"&&(be=q.createHTML(""));te&&te(a),Ne=a}},Vn=E({},[...cn,...pn,...Sr]),Gn=E({},[...un,...vr]),mr=function(a){let f=Be(a);(!f||!f.tagName)&&(f={namespaceURI:ze,tagName:"template"});let x=$t(a.tagName),B=$t(f.tagName);return Zt[a.namespaceURI]?a.namespaceURI===bt?f.namespaceURI===ke?x==="svg":f.namespaceURI===xt?x==="svg"&&(B==="annotation-xml"||Ct[B]):!!Vn[x]:a.namespaceURI===xt?f.namespaceURI===ke?x==="math":f.namespaceURI===bt?x==="math"&&kt[B]:!!Gn[x]:a.namespaceURI===ke?f.namespaceURI===bt&&!kt[B]||f.namespaceURI===xt&&!Ct[B]?!1:!Gn[x]&&(cr[x]||!Vn[x]):!!(Ye==="application/xhtml+xml"&&Zt[a.namespaceURI]):!1},he=function(a){tt(n.removed,{element:a});try{Be(a).removeChild(a)}catch{ut(a)}},Me=function(a,f){try{tt(n.removed,{attribute:f.getAttributeNode(a),from:f})}catch{tt(n.removed,{attribute:null,from:f})}if(f.removeAttribute(a),a==="is")if(Pe||gt)try{he(f)}catch{}else try{f.setAttribute(a,"")}catch{}},jn=function(a){let f=null,x=null;if(jt)a="<remove></remove>"+a;else{let H=ln(a,/^[\r\n\t ]+/);x=H&&H[0]}Ye==="application/xhtml+xml"&&ze===ke&&(a='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+a+"</body></html>");let B=q?q.createHTML(a):a;if(ze===ke)try{f=new S().parseFromString(B,Ye)}catch{}if(!f||!f.documentElement){f=Ce.createDocument(ze,"template",null);try{f.documentElement.innerHTML=Jt?be:B}catch{}}let Z=f.body||f.documentElement;return a&&x&&Z.insertBefore(e.createTextNode(x),Z.childNodes[0]||null),ze===ke?tr.call(f,Ae?"html":"body")[0]:Ae?f.documentElement:Z},Wn=function(a){return Xi.call(a.ownerDocument||a,a,h.SHOW_ELEMENT|h.SHOW_COMMENT|h.SHOW_TEXT|h.SHOW_PROCESSING_INSTRUCTION|h.SHOW_CDATA_SECTION,null)},Qt=function(a){return a instanceof C&&(typeof a.nodeName!="string"||typeof a.textContent!="string"||typeof a.removeChild!="function"||!(a.attributes instanceof m)||typeof a.removeAttribute!="function"||typeof a.setAttribute!="function"||typeof a.namespaceURI!="string"||typeof a.insertBefore!="function"||typeof a.hasChildNodes!="function")},qn=function(a){return typeof u=="function"&&a instanceof u};function ye(b,a,f){At(b,x=>{x.call(n,a,f,Ne)})}let Kn=function(a){let f=null;if(ye(X.beforeSanitizeElements,a,null),Qt(a))return he(a),!0;let x=V(a.nodeName);if(ye(X.uponSanitizeElement,a,{tagName:x,allowedTags:j}),ft&&a.hasChildNodes()&&!qn(a.firstElementChild)&&ee(/<[/\w!]/g,a.innerHTML)&&ee(/<[/\w!]/g,a.textContent)||a.nodeType===ot.progressingInstruction||ft&&a.nodeType===ot.comment&&ee(/<[/\w]/g,a.data))return he(a),!0;if(!(Se.tagCheck instanceof Function&&Se.tagCheck(x))&&(!j[x]||Je[x])){if(!Je[x]&&Zn(x)&&(U.tagNameCheck instanceof RegExp&&ee(U.tagNameCheck,x)||U.tagNameCheck instanceof Function&&U.tagNameCheck(x)))return!1;if(Wt&&!me[x]){let B=Be(a)||a.parentNode,Z=mt(a)||a.childNodes;if(Z&&B){let H=Z.length;for(let re=H-1;re>=0;--re){let we=pe(Z[re],!0);we.__removalCount=(a.__removalCount||0)+1,B.insertBefore(we,dt(a))}}}return he(a),!0}return a instanceof l&&!mr(a)||(x==="noscript"||x==="noembed"||x==="noframes")&&ee(/<\/no(script|embed|frames)/i,a.innerHTML)?(he(a),!0):(De&&a.nodeType===ot.text&&(f=a.textContent,At([Ft,Ut,Ht],B=>{f=nt(f,B," ")}),a.textContent!==f&&(tt(n.removed,{element:a.cloneNode()}),a.textContent=f)),ye(X.afterSanitizeElements,a,null),!1)},Jn=function(a,f,x){if(ht[f]||On&&(f==="id"||f==="name")&&(x in e||x in dr))return!1;if(!(Vt&&!ht[f]&&ee(ir,f))){if(!(Bn&&ee(rr,f))){if(!(Se.attributeCheck instanceof Function&&Se.attributeCheck(f,a))){if(!K[f]||ht[f]){if(!(Zn(a)&&(U.tagNameCheck instanceof RegExp&&ee(U.tagNameCheck,a)||U.tagNameCheck instanceof Function&&U.tagNameCheck(a))&&(U.attributeNameCheck instanceof RegExp&&ee(U.attributeNameCheck,f)||U.attributeNameCheck instanceof Function&&U.attributeNameCheck(f,a))||f==="is"&&U.allowCustomizedBuiltInElements&&(U.tagNameCheck instanceof RegExp&&ee(U.tagNameCheck,x)||U.tagNameCheck instanceof Function&&U.tagNameCheck(x))))return!1}else if(!Kt[f]){if(!ee($n,nt(x,Rn,""))){if(!((f==="src"||f==="xlink:href"||f==="href")&&a!=="script"&&Cr(x,"data:")===0&&Nn[a])){if(!(Dn&&!ee(or,nt(x,Rn,"")))){if(x)return!1}}}}}}}return!0},Zn=function(a){return a!=="annotation-xml"&&ln(a,sr)},Yn=function(a){ye(X.beforeSanitizeAttributes,a,null);let{attributes:f}=a;if(!f||Qt(a))return;let x={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:K,forceKeepAttr:void 0},B=f.length;for(;B--;){let Z=f[B],{name:H,namespaceURI:re,value:we}=Z,Fe=V(H),Xt=we,J=H==="value"?Xt:kr(Xt);if(x.attrName=Fe,x.attrValue=J,x.keepAttr=!0,x.forceKeepAttr=void 0,ye(X.uponSanitizeAttribute,a,x),J=x.attrValue,zn&&(Fe==="id"||Fe==="name")&&(Me(H,a),J=ar+J),ft&&ee(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,J)){Me(H,a);continue}if(Fe==="attributename"&&ln(J,"href")){Me(H,a);continue}if(x.forceKeepAttr)continue;if(!x.keepAttr){Me(H,a);continue}if(!Pn&&ee(/\/>/i,J)){Me(H,a);continue}De&&At([Ft,Ut,Ht],Xn=>{J=nt(J,Xn," ")});let Qn=V(a.nodeName);if(!Jn(Qn,Fe,J)){Me(H,a);continue}if(q&&typeof I=="object"&&typeof I.getAttributeType=="function"&&!re)switch(I.getAttributeType(Qn,Fe)){case"TrustedHTML":{J=q.createHTML(J);break}case"TrustedScriptURL":{J=q.createScriptURL(J);break}}if(J!==Xt)try{re?a.setAttributeNS(re,H,J):a.setAttribute(H,J),Qt(a)?he(a):xi(n.removed)}catch{Me(H,a)}}ye(X.afterSanitizeAttributes,a,null)},hr=function b(a){let f=null,x=Wn(a);for(ye(X.beforeSanitizeShadowDOM,a,null);f=x.nextNode();)ye(X.uponSanitizeShadowNode,f,null),Kn(f),Yn(f),f.content instanceof o&&b(f.content);ye(X.afterSanitizeShadowDOM,a,null)};return n.sanitize=function(b){let a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},f=null,x=null,B=null,Z=null;if(Jt=!b,Jt&&(b="<!-->"),typeof b!="string"&&!qn(b))if(typeof b.toString=="function"){if(b=b.toString(),typeof b!="string")throw it("dirty is not a string, aborting")}else throw it("toString is not a function");if(!n.isSupported)return b;if(Gt||Yt(a),n.removed=[],typeof b=="string"&&(Ze=!1),Ze){if(b.nodeName){let we=V(b.nodeName);if(!j[we]||Je[we])throw it("root node is forbidden and cannot be sanitized in-place")}}else if(b instanceof u)f=jn("<!---->"),x=f.ownerDocument.importNode(b,!0),x.nodeType===ot.element&&x.nodeName==="BODY"||x.nodeName==="HTML"?f=x:f.appendChild(x);else{if(!Pe&&!De&&!Ae&&b.indexOf("<")===-1)return q&&_t?q.createHTML(b):b;if(f=jn(b),!f)return Pe?null:_t?be:""}f&&jt&&he(f.firstChild);let H=Wn(Ze?b:f);for(;B=H.nextNode();)Kn(B),Yn(B),B.content instanceof o&&hr(B.content);if(Ze)return b;if(Pe){if(gt)for(Z=er.call(f.ownerDocument);f.firstChild;)Z.appendChild(f.firstChild);else Z=f;return(K.shadowroot||K.shadowrootmode)&&(Z=nr.call(r,Z,!0)),Z}let re=Ae?f.outerHTML:f.innerHTML;return Ae&&j["!doctype"]&&f.ownerDocument&&f.ownerDocument.doctype&&f.ownerDocument.doctype.name&&ee(Ti,f.ownerDocument.doctype.name)&&(re="<!DOCTYPE "+f.ownerDocument.doctype.name+`>
2
2
  `+re),De&&At([Ft,Ut,Ht],we=>{re=nt(re,we," ")}),q&&_t?q.createHTML(re):re},n.setConfig=function(){let b=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Yt(b),Gt=!0},n.clearConfig=function(){Ne=null,Gt=!1},n.isValidAttribute=function(b,a,f){Ne||Yt({});let x=V(b),B=V(a);return Jn(x,B,f)},n.addHook=function(b,a){typeof a=="function"&&tt(X[b],a)},n.removeHook=function(b,a){if(a!==void 0){let f=xr(X[b],a);return f===-1?void 0:br(X[b],f,1)[0]}return xi(X[b])},n.removeHooks=function(b){X[b]=[]},n.removeAllHooks=function(){X=Si()},n}var Mi=Ai();function xn(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var Ie=xn();function Pi(t){Ie=t}var $e={exec:()=>null};function R(t,n=""){let e=typeof t=="string"?t:t.source,r={replace:(i,o)=>{let s=typeof o=="string"?o:o.source;return s=s.replace(ie.caret,"$1"),e=e.replace(i,s),r},getRegex:()=>new RegExp(e,n)};return r}var Pr=(()=>{try{return!!new RegExp("(?<=1)(?<!1)")}catch{return!1}})(),ie={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] +\S/,listReplaceTask:/^\[[ xX]\] +/,listTaskCheckbox:/\[[ xX]\]/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:t=>new RegExp(`^( {0,3}${t})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}#`),htmlBeginRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}<(?:[a-z].*>|!--)`,"i"),blockquoteBeginRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}>`)},Or=/^(?:[ \t]*(?:\n|$))+/,zr=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,Nr=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,ct=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,Fr=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,bn=/ {0,3}(?:[*+-]|\d{1,9}[.)])/,Oi=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,zi=R(Oi).replace(/bull/g,bn).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),Ur=R(Oi).replace(/bull/g,bn).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),Cn=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,Hr=/^[^\n]+/,kn=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,Vr=R(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",kn).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),Gr=R(/^(bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,bn).getRegex(),Pt="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",yn=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,jr=R("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",yn).replace("tag",Pt).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),Ni=R(Cn).replace("hr",ct).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Pt).getRegex(),Wr=R(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",Ni).getRegex(),wn={blockquote:Wr,code:zr,def:Vr,fences:Nr,heading:Fr,hr:ct,html:jr,lheading:zi,list:Gr,newline:Or,paragraph:Ni,table:$e,text:Hr},Ri=R("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",ct).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Pt).getRegex(),qr=Ue(oe({},wn),{lheading:Ur,table:Ri,paragraph:R(Cn).replace("hr",ct).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",Ri).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Pt).getRegex()}),Kr=Ue(oe({},wn),{html:R(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",yn).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:$e,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:R(Cn).replace("hr",ct).replace("heading",` *#{1,6} *[^
3
3
  ]`).replace("lheading",zi).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()}),Jr=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,Zr=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,Fi=/^( {2,}|\\)\n(?!\s*$)/,Yr=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,We=/[\p{P}\p{S}]/u,Ot=/[\s\p{P}\p{S}]/u,Sn=/[^\s\p{P}\p{S}]/u,Qr=R(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,Ot).getRegex(),Ui=/(?!~)[\p{P}\p{S}]/u,Xr=/(?!~)[\s\p{P}\p{S}]/u,eo=/(?:[^\s\p{P}\p{S}]|~)/u,to=R(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",Pr?"(?<!`)()":"(^^|[^`])").replace("code",/(?<b>`+)[^`]+\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),Hi=/^(?:\*+(?:((?!\*)punct)|([^\s*]))?)|^_+(?:((?!_)punct)|([^\s_]))?/,no=R(Hi,"u").replace(/punct/g,We).getRegex(),io=R(Hi,"u").replace(/punct/g,Ui).getRegex(),Vi="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",ro=R(Vi,"gu").replace(/notPunctSpace/g,Sn).replace(/punctSpace/g,Ot).replace(/punct/g,We).getRegex(),oo=R(Vi,"gu").replace(/notPunctSpace/g,eo).replace(/punctSpace/g,Xr).replace(/punct/g,Ui).getRegex(),so=R("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,Sn).replace(/punctSpace/g,Ot).replace(/punct/g,We).getRegex(),ao=R(/^~~?(?:((?!~)punct)|[^\s~])/,"u").replace(/punct/g,We).getRegex(),lo="^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)",co=R(lo,"gu").replace(/notPunctSpace/g,Sn).replace(/punctSpace/g,Ot).replace(/punct/g,We).getRegex(),po=R(/\\(punct)/,"gu").replace(/punct/g,We).getRegex(),uo=R(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),mo=R(yn).replace("(?:-->|$)","-->").getRegex(),ho=R("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",mo).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),It=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\])|[^\[\]\\`])*?/,fo=R(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]+(?:\n[ \t]*)?|\n[ \t]*)(title))?\s*\)/).replace("label",It).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),Gi=R(/^!?\[(label)\]\[(ref)\]/).replace("label",It).replace("ref",kn).getRegex(),ji=R(/^!?\[(ref)\](?:\[\])?/).replace("ref",kn).getRegex(),go=R("reflink|nolink(?!\\()","g").replace("reflink",Gi).replace("nolink",ji).getRegex(),$i=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,vn={_backpedal:$e,anyPunctuation:po,autolink:uo,blockSkip:to,br:Fi,code:Zr,del:$e,delLDelim:$e,delRDelim:$e,emStrongLDelim:no,emStrongRDelimAst:ro,emStrongRDelimUnd:so,escape:Jr,link:fo,nolink:ji,punctuation:Qr,reflink:Gi,reflinkSearch:go,tag:ho,text:Yr,url:$e},_o=Ue(oe({},vn),{link:R(/^!?\[(label)\]\((.*?)\)/).replace("label",It).getRegex(),reflink:R(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",It).getRegex()}),fn=Ue(oe({},vn),{emStrongRDelimAst:oo,emStrongLDelim:io,delLDelim:ao,delRDelim:co,url:R(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol",$i).replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/,text:R(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol",$i).getRegex()}),xo=Ue(oe({},fn),{br:R(Fi).replace("{2,}","*").getRegex(),text:R(fn.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()}),Lt={normal:wn,gfm:qr,pedantic:Kr},st={normal:vn,gfm:fn,breaks:xo,pedantic:_o},bo={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},Li=t=>bo[t];function _e(t,n){if(n){if(ie.escapeTest.test(t))return t.replace(ie.escapeReplace,Li)}else if(ie.escapeTestNoEncode.test(t))return t.replace(ie.escapeReplaceNoEncode,Li);return t}function Ii(t){try{t=encodeURI(t).replace(ie.percentDecode,"%")}catch{return null}return t}function Bi(t,n){let e=t.replace(ie.findPipe,(o,s,u)=>{let l=!1,h=s;for(;--h>=0&&u[h]==="\\";)l=!l;return l?"|":" |"}),r=e.split(ie.splitPipe),i=0;if(r[0].trim()||r.shift(),r.length>0&&!r.at(-1)?.trim()&&r.pop(),n)if(r.length>n)r.splice(n);else for(;r.length<n;)r.push("");for(;i<r.length;i++)r[i]=r[i].trim().replace(ie.slashPipe,"|");return r}function at(t,n,e){let r=t.length;if(r===0)return"";let i=0;for(;i<r;){let o=t.charAt(r-i-1);if(o===n&&!e)i++;else if(o!==n&&e)i++;else break}return t.slice(0,r-i)}function Co(t,n){if(t.indexOf(n[1])===-1)return-1;let e=0;for(let r=0;r<t.length;r++)if(t[r]==="\\")r++;else if(t[r]===n[0])e++;else if(t[r]===n[1]&&(e--,e<0))return r;return e>0?-2:-1}function ko(t,n=0){let e=n,r="";for(let i of t)if(i===" "){let o=4-e%4;r+=" ".repeat(o),e+=o}else r+=i,e++;return r}function Di(t,n,e,r,i){let o=n.href,s=n.title||null,u=t[1].replace(i.other.outputLinkReplace,"$1");r.state.inLink=!0;let l={type:t[0].charAt(0)==="!"?"image":"link",raw:e,href:o,title:s,text:u,tokens:r.inlineTokens(u)};return r.state.inLink=!1,l}function yo(t,n,e){let r=t.match(e.other.indentCodeCompensation);if(r===null)return n;let i=r[1];return n.split(`
4
4
  `).map(o=>{let s=o.match(e.other.beginningSpace);if(s===null)return o;let[u]=s;return u.length>=i.length?o.slice(i.length):o}).join(`
@@ -70,4 +70,4 @@ Please report this to https://github.com/markedjs/marked.`,t){let r="<p>An error
70
70
  `).slice(1).join(`
71
71
  `).trim();return Te.looksLikeJson(i)?Te.formatJson(i):i});typeLabel_$=w(()=>{switch(this.view().kind){case y.userPrompt:return"User";case y.assistant:return"Assistant";case y.tool:return"Tool Call";case y.toolResult:return"Tool Result";case y.error:return"Error";case y.info:return"Info";case y.status:return"Status";case y.thinking:return"Thinking";case y.runIntent:return"Run intent";case y.iteration:return"Iteration";case y.statusUpdate:return"Status update";case y.raw:return"Raw";case y.result:return"Result";case y.toolGroup:return"Tool group";case y.subAgentGroup:return"Sub-agent";default:return String(this.view().kind)}});kindEnum=y;tts_$=w(()=>this.view().tts??null);ttsLoading_$=G(!1);showTtsButton_$=w(()=>{let e=this.tts_$();return e!==null&&!e.hasTtsAudio&&e.content.trim().length>0});autoReadEffect=ii(()=>{if(this.isAutoPlayFired||this.view().kind!==y.assistant)return;let e=this.tts_$();!e||e.hasTtsAudio||e.content.trim().length===0||this.ttsLoading_$()||Nt.shouldAutoPlay(e.sessionId,e.timestampIso)&&(this.isAutoPlayFired=!0,this.handleTtsPlayClick())});ttsAudioUrl_$=w(()=>{let e=this.tts_$();if(!e||!e.hasTtsAudio)return null;let r=this.voiceSttQaUi_DS.getTtsMessageAudioUrl(e.messageKey);return r.length>0?r:null});handleTtsPlayClick(){return D(this,null,function*(){let e=this.tts_$();if(!(!e||this.ttsLoading_$())){this.ttsLoading_$.set(!0);try{(yield this.voiceTts_CS.playMessage({messageKey:e.messageKey,sessionId:e.sessionId,role:e.role,content:e.content,timestampIso:e.timestampIso,isUserGesture:!0}))&&this.ttsCached.emit(e.messageKey)}finally{this.ttsLoading_$.set(!1)}}})}handleToggleExpand(){this.isExpanded_$.update(e=>!e)}handleToggleAssistantBodyExpand(){this.isAssistantBodyExpanded_$.update(e=>!e)}handleToggleRawInfo(){this.isRawInfoOpen_$.update(e=>!e)}handleImageClick(e){window.open(e,"_blank")}handleAssistantMdClick(e){return D(this,null,function*(){yield Tn.handleCodeCopyClick(e,r=>this.globalError_CS.copyToClipboard(r))})}static \u0275fac=function(r){return new(r||t)};static \u0275cmp=Ve({type:t,selectors:[["app-s-agent-console-message-bubble"]],inputs:{view:[1,"view"]},outputs:{ttsCached:"ttsCached"},standalone:!0,features:[Ge],decls:10,vars:2,consts:[[1,"rounded","border","px-2.5","py-1","text-xs","overflow-hidden",3,"class"],[1,"group/msg","rounded-lg","border","px-2","py-1","text-xs","sm:px-3","sm:py-1.5","sm:text-sm","overflow-hidden",3,"class"],[1,"flex","justify-center","mb-1","group/msg"],[1,"rounded","border","px-2.5","py-1.5","text-xs","overflow-hidden",3,"class"],[1,"bg-orange-500/5","border","border-orange-500/15","rounded-lg","overflow-hidden"],[1,"border","border-indigo-500/20","rounded-lg","overflow-hidden","bg-indigo-500/3"],[1,"fixed","inset-0","z-50","flex","items-center","justify-center","bg-black/70","p-4"],[1,"rounded","border","px-2.5","py-1","text-xs","overflow-hidden"],[1,"flex","items-center","gap-2","cursor-pointer","select-none",3,"click"],["title","Tool call failed",1,"w-1.5","h-1.5","rounded-full","bg-red-500","shrink-0"],[1,"text-orange-400","font-semibold","text-[11px]"],[1,"text-[10px]","text-neutral-400","select-none",3,"title"],[1,"flex-1"],[1,"text-neutral-600","text-[10px]"],["type","button","title","Raw details",3,"class"],["buttonTitle","Copy tool call","size","sm",3,"content"],[1,"text-[10px]","text-red-500/60","font-medium"],[1,"text-[10px]","text-green-500/60","font-medium"],["type","button","title","Raw details",3,"click"],["viewBox","0 0 24 24","fill","none","stroke","currentColor","stroke-width","2","stroke-linecap","round","stroke-linejoin","round","aria-hidden","true"],["cx","12","cy","12","r","10"],["d","M12 16v-4"],["d","M12 8h.01"],[1,"mt-1.5","border-t","border-orange-500/10","pt-1.5"],[1,"mt-1.5","border-t","border-green-500/10","pt-1.5"],[1,"text-[9px]","text-neutral-600","uppercase","tracking-wider","mb-0.5"],[1,"text-[11px]","leading-relaxed","overflow-x-auto","whitespace-pre-wrap","break-words","font-mono","text-orange-300/80","max-h-[300px]","overflow-y-auto"],[1,"text-[11px]","leading-relaxed","font-mono","text-green-400/80","max-h-[300px]","overflow-y-auto","overflow-x-auto","break-words",3,"innerHTML"],[1,"text-[11px]","leading-relaxed","font-mono","text-green-400/80","max-h-[300px]","overflow-y-auto","whitespace-pre-wrap","break-words",3,"innerHTML"],[1,"mt-1","flex","justify-end"],["buttonTitle","Copy result","size","sm",3,"content"],[1,"text-[11px]","leading-relaxed","overflow-x-auto","whitespace-pre-wrap","break-words","font-mono","text-green-400/80","max-h-[300px]","overflow-y-auto"],[1,"mt-1.5","border-t","border-red-500/15","pt-1.5"],[1,"text-[11px]","leading-relaxed","overflow-x-auto","whitespace-pre-wrap","break-words","font-mono","text-red-400/90","max-h-[300px]","overflow-y-auto"],[1,"group/msg","rounded-lg","border","px-2","py-1","text-xs","sm:px-3","sm:py-1.5","sm:text-sm","overflow-hidden"],[1,"flex","items-center","gap-1","mb-px"],[1,"font-bold","text-[10px]","text-neonGreen/60","uppercase"],[1,"flex","items-center","gap-0.5"],["buttonTitle","Copy prompt","size","sm",3,"content"],["type","button","title","Felolvas\xE1s (TTS)",3,"disabled","class"],[1,"flex","flex-wrap","gap-2","mb-1.5"],[1,"leading-snug","sm:leading-normal","whitespace-pre-wrap","break-words","text-neutral-100"],["controls","","aria-label","\xDCzenet felolvas\xE1sa",1,"max-w-full","h-8","min-w-[200px]","mt-1.5",3,"src"],["type","button","title","Felolvas\xE1s (TTS)",3,"click","disabled"],[1,"inline-block","w-3.5","h-3.5","shrink-0","animate-spin","rounded-full","border-2","border-blue-400/40","border-t-blue-400"],["viewBox","0 0 24 24","fill","none","stroke","currentColor","stroke-width","2","stroke-linecap","round","stroke-linejoin","round","aria-hidden","true",1,"w-3.5","h-3.5","shrink-0"],["points","11 5 6 9 2 9 2 15 6 15 11 19 11 5"],["d","M15.54 8.46a5 5 0 0 1 0 7.07"],["alt","Attached image",1,"max-w-[200px]","max-h-[200px]","rounded","border","border-neonDefault/30","object-contain","cursor-pointer",3,"src"],["alt","Attached image",1,"max-w-[200px]","max-h-[200px]","rounded","border","border-neonDefault/30","object-contain","cursor-pointer",3,"click","src"],[1,"font-bold","text-[10px]","text-neonCyan/60","uppercase"],["buttonTitle","Copy message","size","sm",3,"content"],[1,"text-xs","leading-snug","sm:leading-normal","overflow-x-auto","whitespace-pre-wrap","break-words","font-mono","text-neutral-100"],["type","button",1,"mt-1","text-[10px]","text-ccapAccent","hover:text-ccapAccent/80","transition-colors"],[1,"inline-block","w-3.5","h-3.5","shrink-0","animate-spin","rounded-full","border-2","border-neutral-400/40","border-t-neutral-300"],[1,"ccap-assistant-md","leading-snug","sm:leading-normal","break-words","text-neutral-100","min-w-0",3,"innerHTML"],[1,"ccap-assistant-md","leading-snug","sm:leading-normal","break-words","text-neutral-100","min-w-0",3,"click","innerHTML"],["type","button",1,"mt-1","text-[10px]","text-ccapAccent","hover:text-ccapAccent/80","transition-colors",3,"click"],[1,"inline-flex","items-center","gap-1.5","bg-teal-500/6","border","border-teal-500/15","rounded-full","px-3","py-0.5","max-w-[85%]","min-w-0"],["viewBox","0 0 16 16","fill","none","stroke","currentColor","stroke-width","2",1,"w-3","h-3","text-teal-400/70","shrink-0","animate-spin"],["d","M8 2a6 6 0 0 1 6 6","stroke-linecap","round"],[1,"text-[10px]","text-teal-300/70","truncate","min-w-0"],[1,"text-[8px]","text-teal-400/40","shrink-0"],["type","button",1,"shrink-0","w-3.5","h-3.5","rounded-full","bg-teal-500/15","flex","items-center","justify-center","cursor-pointer","hover:bg-teal-500/30"],["type","button",1,"shrink-0","w-3.5","h-3.5","rounded-full","bg-teal-500/15","flex","items-center","justify-center","cursor-pointer","hover:bg-teal-500/30",3,"click"],[1,"text-[7px]","text-teal-300/60","font-bold","leading-none"],[1,"rounded","border","px-2.5","py-1.5","text-xs","overflow-hidden"],[1,"flex","items-center","gap-1.5","mb-0.5"],["title","Error",1,"w-1.5","h-1.5","rounded-full","bg-red-500","shrink-0"],[1,"font-semibold","text-[10px]","text-red-400","uppercase","tracking-wider"],["buttonTitle","Copy error","size","sm",3,"content"],[1,"leading-relaxed","whitespace-pre-wrap","break-words","text-red-400"],[1,"font-semibold","text-[10px]","text-orange-300/70","uppercase","tracking-wider"],[1,"mt-1","text-[11px]","leading-relaxed","overflow-x-auto","whitespace-pre-wrap","break-words","font-mono","text-orange-300/70","max-h-[300px]","overflow-y-auto"],[1,"flex","items-center","gap-1.5","px-2.5","py-1","cursor-pointer","select-none","hover:bg-orange-500/8","transition-colors","list-none","[&::-webkit-details-marker]:hidden"],[1,"text-[11px]","text-orange-300/90","font-medium"],["viewBox","0 0 12 12","fill","none",1,"w-3","h-3","text-orange-400/50","transition-transform","[[open]>&]:rotate-90"],["d","M4.5 2.5l4 3.5-4 3.5","stroke","currentColor","stroke-width","1.5","stroke-linecap","round","stroke-linejoin","round"],[1,"px-2","pb-1.5","pt-0.5","space-y-0.5"],[3,"view"],[3,"ttsCached","view"],[1,"flex","items-center","gap-1.5","px-2.5","py-1.5","cursor-pointer","select-none","hover:bg-indigo-500/8","transition-colors","list-none","[&::-webkit-details-marker]:hidden"],["viewBox","0 0 16 16","fill","none","stroke","currentColor","stroke-width","1.5","stroke-linecap","round","stroke-linejoin","round",1,"w-3.5","h-3.5","text-indigo-400","shrink-0"],["x","3","y","5","width","10","height","8","rx","2"],["cx","6","cy","9","r","1"],["cx","10","cy","9","r","1"],["d","M8 2v3"],["d","M6 2h4"],[1,"text-[10px]","text-indigo-400/60","font-medium","uppercase","tracking-wider","shrink-0"],[1,"text-[11px]","text-indigo-300/90","font-medium","truncate"],[1,"text-[9px]","text-indigo-400/40","shrink-0"],["viewBox","0 0 12 12","fill","none",1,"w-3","h-3","text-indigo-400/40","shrink-0","transition-transform","[[open]>&]:rotate-90"],[1,"px-2","pb-2","pt-1","space-y-0.5","border-t","border-indigo-500/10"],[1,"font-semibold","text-[10px]","uppercase","tracking-wider"],[1,"text-[9px]","text-neutral-500"],["buttonTitle","Copy","size","sm",3,"content"],[1,"mt-1","text-[11px]","leading-relaxed","overflow-x-auto","whitespace-pre-wrap","break-words","font-mono",3,"class"],[1,"mt-1","leading-relaxed","whitespace-pre-wrap","break-words",3,"class"],[1,"mt-1","text-[11px]","leading-relaxed","overflow-x-auto","whitespace-pre-wrap","break-words","font-mono"],[1,"mt-1","leading-relaxed","whitespace-pre-wrap","break-words"],[1,"fixed","inset-0","z-50","flex","items-center","justify-center","bg-black/70","p-4",3,"click"],[1,"bg-neutral-900","border","border-neutral-700","rounded-lg","shadow-2xl","w-full","max-w-2xl","max-h-[80vh]","flex","flex-col",2,"max-height","80dvh",3,"click"],[1,"flex","items-center","gap-2","px-4","py-2","border-b","border-neutral-700","shrink-0"],[1,"text-xs","font-semibold","text-neutral-300"],[1,"text-[10px]","text-neutral-400",3,"title"],["buttonTitle","Copy raw JSON","size","sm",3,"content"],["type","button",1,"text-neutral-500","hover:text-neutral-300","text-sm","transition-colors","px-1",3,"click"],[1,"flex-1","overflow-auto","p-4","space-y-4"],[1,"text-[9px]","text-neutral-500","uppercase","tracking-wide","mb-1"],[1,"text-[11px]","leading-relaxed","whitespace-pre-wrap","break-words","overflow-x-auto","font-mono","text-neutral-300"],[1,"mb-3","last:mb-0"],[1,"text-[8px]","text-neutral-600","mb-0.5"]],template:function(r,i){if(r&1&&A(0,Fo,16,15,"div",0)(1,Jo,17,14,"div",1)(2,cs,17,14,"div",1)(3,ds,8,3,"div",2)(4,fs,14,11,"div",3)(5,bs,14,12,"div",0)(6,ks,10,2,"details",4)(7,Ss,20,3,"details",5)(8,$s,15,16,"div",0)(9,Ps,17,11,"div",6),r&2){let o,s;k((o=i.view().kind)===i.kindEnum.tool?0:o===i.kindEnum.userPrompt?1:o===i.kindEnum.assistant?2:o===i.kindEnum.statusUpdate?3:o===i.kindEnum.error?4:o===i.kindEnum.toolResult?5:o===i.kindEnum.toolGroup?6:o===i.kindEnum.subAgentGroup?7:8),d(9),k((s=i.isRawInfoOpen_$()&&i.rawOverlayBundle_$())?9:-1,s)}},dependencies:()=>[t,je,mi,Ji,hi,fi],styles:[`@charset "UTF-8";
72
72
  /*# sourceMappingURL=s-agent-console-message-bubble.component-QJSDQEWX.css.map */`]})}return t})();var Os=[[["","sChatColumnHeader",""]],[["","sChatColumnScroll",""]],[["","sChatColumnOverlay",""]],[["","sChatColumnComposer",""]]],zs=["[sChatColumnHeader]","[sChatColumnScroll]","[sChatColumnOverlay]","[sChatColumnComposer]"],rl=(()=>{class t{static \u0275fac=function(r){return new(r||t)};static \u0275cmp=Ve({type:t,selectors:[["app-s-session-chat-column-layout"]],hostAttrs:[1,"flex","flex-col","flex-1","min-h-0","overflow-hidden","w-full","min-w-0"],standalone:!0,features:[Ge],ngContentSelectors:zs,decls:8,vars:0,consts:[[1,"min-w-0","shrink-0"],[1,"relative","min-h-0","min-w-0","flex-1","flex","flex-col"],[1,"min-h-0","min-w-0","flex-1","overflow-y-auto","overflow-x-hidden"]],template:function(r,i){r&1&&(ni(Os),c(0,"div",0),et(1),p(),c(2,"div",1)(3,"div",2),et(4,1),p(),et(5,2),p(),c(6,"div",0),et(7,3),p())},dependencies:[je],encapsulation:2})}return t})();var Mn=en(on());var Qi=(()=>{class t{mrg_AS=se(di);erg_AS=se(gi);llmEntries_$=G([]);llmLoading_$=G(!1);llmLoadError_$=G(null);isLlmLoaded=!1;llmLoadPromise=null;embeddingEntries_$=G([]);embeddingLoading_$=G(!1);embeddingLoadError_$=G(null);isEmbeddingLoaded=!1;embeddingLoadPromise=null;enabledLlmModels_$=w(()=>this.llmEntries_$().filter(e=>e.enabled));enabledLlmProviders_$=w(()=>{let e=new Map;for(let r of this.enabledLlmModels_$())e.has(r.provider)||e.set(r.provider,t.llmProviderLabel(r.provider));return[...e.entries()].map(([r,i])=>({value:r,label:i}))});isLlmEmpty_$=w(()=>this.isLlmLoaded&&!this.llmLoading_$()&&this.enabledLlmModels_$().length===0);enabledEmbeddingModels_$=w(()=>this.embeddingEntries_$().filter(e=>e.enabled===!0));enabledEmbeddingProviders_$=w(()=>{let e=new Map;for(let r of this.enabledEmbeddingModels_$()){let i=r.embeddingBackend??"";i&&!e.has(i)&&e.set(i,t.embeddingBackendLabel(i))}return[...e.entries()].map(([r,i])=>({value:r,label:i}))});isEmbeddingEmpty_$=w(()=>this.isEmbeddingLoaded&&!this.embeddingLoading_$()&&this.enabledEmbeddingModels_$().length===0);ensureLoaded(e){return D(this,null,function*(){if(e==="llm"){if(this.isLlmLoaded&&!this.llmLoading_$())return;if(this.llmLoadPromise)return this.llmLoadPromise;this.llmLoadPromise=this.fetchLlm();try{yield this.llmLoadPromise}finally{this.llmLoadPromise=null}return}if(!(this.isEmbeddingLoaded&&!this.embeddingLoading_$())){if(this.embeddingLoadPromise)return this.embeddingLoadPromise;this.embeddingLoadPromise=this.fetchEmbedding();try{yield this.embeddingLoadPromise}finally{this.embeddingLoadPromise=null}}})}refresh(e){return D(this,null,function*(){e==="llm"?(this.isLlmLoaded=!1,yield this.fetchLlm()):(this.isEmbeddingLoaded=!1,yield this.fetchEmbedding())})}invalidate(e){e==="llm"?this.isLlmLoaded=!1:this.isEmbeddingLoaded=!1}getModelsForProvider(e,r){return e==="llm"?this.enabledLlmModels_$().filter(i=>i.provider===r).map(i=>i.modelName):this.enabledEmbeddingModels_$().filter(i=>i.embeddingBackend===r).map(i=>i.modelId??"")}fetchLlm(){return D(this,null,function*(){this.llmLoading_$.set(!0),this.llmLoadError_$.set(null);try{let e=yield this.mrg_AS.getList({enabled:!0});this.llmEntries_$.set(e.list),this.isLlmLoaded=!0}catch(e){this.llmLoadError_$.set(e),Mn.DyFM_Error.logSimple("AIS_RegistrySsot_ControlService | fetchLlm failed",e)}finally{this.llmLoading_$.set(!1)}})}fetchEmbedding(){return D(this,null,function*(){this.embeddingLoading_$.set(!0),this.embeddingLoadError_$.set(null);try{let e=yield this.erg_AS.getList({enabled:!0});this.embeddingEntries_$.set(e.list),this.isEmbeddingLoaded=!0}catch(e){this.embeddingLoadError_$.set(e),Mn.DyFM_Error.logSimple("AIS_RegistrySsot_ControlService | fetchEmbedding failed",e)}finally{this.embeddingLoading_$.set(!1)}})}static llmProviderLabel(e){return{"open-ai":"OpenAI",anthropic:"Anthropic",google:"Google",deepseek:"DeepSeek","fdp-ai":"FDPAI"}[e]??e}static embeddingBackendLabel(e){return{ollama:"Ollama","open-ai-compatible":"OpenAI-kompatibilis","open-ai-official":"OpenAI hivatalos","custom-http":"Custom HTTP"}[e]??e}static \u0275fac=function(r){return new(r||t)};static \u0275prov=He({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();var Ns=(t,n)=>n.value;function Fs(t,n){t&1&&(c(0,"div",0),v(1,"span",3),c(2,"span"),g(3,"Registry bet\xF6lt\xE9se\u2026"),p()())}function Us(t,n){if(t&1&&(c(0,"p",4),g(1,"Nincs enged\xE9lyezett modell a registry-ben."),p(),c(2,"p"),g(3," Menj a "),c(4,"a",5),g(5,"Model Registry"),p(),g(6," oldalra, futtass "),c(7,"strong"),g(8,"Sync"),p(),g(9,"-et, majd az "),c(10,"code",6),g(11,"enabled"),p(),g(12," kapcsol\xF3val enged\xE9lyezz legal\xE1bb egy modellt. "),p()),t&2){let e=_(2);d(4),M("routerLink",e.registryRoute_$())}}function Hs(t,n){if(t&1&&(c(0,"p",4),g(1,"Nincs enged\xE9lyezett embedding modell."),p(),c(2,"p"),g(3," Menj az "),c(4,"a",5),g(5,"Embedding Registry"),p(),g(6," oldalra, futtass "),c(7,"strong"),g(8,"Sync"),p(),g(9,"-et, majd az "),c(10,"code",6),g(11,"enabled"),p(),g(12," kapcsol\xF3val enged\xE9lyezz legal\xE1bb egy modellt. "),p()),t&2){let e=_(2);d(4),M("routerLink",e.registryRoute_$())}}function Vs(t,n){if(t&1&&(c(0,"div",1),A(1,Us,13,1)(2,Hs,13,1),p()),t&2){let e=_();d(),k(e.registryKind()==="llm"?1:2)}}function Gs(t,n){if(t&1&&(c(0,"option",11),g(1),p()),t&2){let e=n.$implicit;M("value",e.value),d(),T(e.label)}}function js(t,n){if(t&1){let e=F();c(0,"div",7)(1,"label",8),g(2),p(),c(3,"select",9),z("ngModelChange",function(i){P(e);let o=_(2);return O(o.handleProviderChange(i))}),c(4,"option",10),g(5,"\u2014 V\xE1lassz \u2014"),p(),ve(6,Gs,2,2,"option",11,Ns),p()()}if(t&2){let e=_(2);d(2),T(e.providerLabel()),d(),M("ngModel",e.selectedProvider())("disabled",e.disabled()),d(3),Ee(e.providerOptions_$())}}function Ws(t,n){if(t&1&&(c(0,"option",11),g(1),p()),t&2){let e=n.$implicit;M("value",e),d(),T(e)}}function qs(t,n){t&1&&(c(0,"span",12),g(1,"A kiv\xE1lasztott providernek nincs enged\xE9lyezett modellje."),p())}function Ks(t,n){if(t&1){let e=F();c(0,"div",2),A(1,js,8,3,"div",7),c(2,"div",7)(3,"label",8),g(4),p(),c(5,"select",9),z("ngModelChange",function(i){P(e);let o=_();return O(o.handleModelChange(i))}),c(6,"option",10),g(7,"\u2014 V\xE1lassz modellt \u2014"),p(),ve(8,Ws,2,2,"option",11,St),p(),A(10,qs,2,0,"span",12),p()()}if(t&2){let e=_();d(),k(e.showProviderSelect_$()?1:-1),d(3),T(e.modelLabel()),d(),M("ngModel",e.selectedModel())("disabled",e.disabled()||e.modelOptions_$().length===0),d(3),Ee(e.modelOptions_$()),d(2),k(e.modelOptions_$().length===0&&(e.selectedProvider()||e.providerFilter())?10:-1)}}var Cl=(()=>{class t{registrySsot_CS=se(Qi);registryKind=fe.required();selectedProvider=fe("");selectedModel=fe("");providerLabel=fe("Provider");modelLabel=fe("Modell");disabled=fe(!1);providerFilter=fe(void 0);providerChange=Xe();modelChange=Xe();isEmpty_$=w(()=>this.registryKind()==="llm"?this.registrySsot_CS.isLlmEmpty_$():this.registrySsot_CS.isEmbeddingEmpty_$());isLoading_$=w(()=>this.registryKind()==="llm"?this.registrySsot_CS.llmLoading_$():this.registrySsot_CS.embeddingLoading_$());providerOptions_$=w(()=>this.registryKind()==="llm"?this.registrySsot_CS.enabledLlmProviders_$():this.registrySsot_CS.enabledEmbeddingProviders_$());modelOptions_$=w(()=>{let e=this.providerFilter()??this.selectedProvider();return e?this.registrySsot_CS.getModelsForProvider(this.registryKind(),e):[]});registryRoute_$=w(()=>this.registryKind()==="llm"?"/model-registry":"/embedding-registry");showProviderSelect_$=w(()=>this.providerFilter()===void 0);ngOnInit(){this.registrySsot_CS.ensureLoaded(this.registryKind())}handleProviderChange(e){this.providerChange.emit(e)}handleModelChange(e){this.modelChange.emit(e)}static \u0275fac=function(r){return new(r||t)};static \u0275cmp=Ve({type:t,selectors:[["app-s-registry-provider-model-select"]],inputs:{registryKind:[1,"registryKind"],selectedProvider:[1,"selectedProvider"],selectedModel:[1,"selectedModel"],providerLabel:[1,"providerLabel"],modelLabel:[1,"modelLabel"],disabled:[1,"disabled"],providerFilter:[1,"providerFilter"]},outputs:{providerChange:"providerChange",modelChange:"modelChange"},standalone:!0,features:[Ge],decls:3,vars:3,consts:[[1,"flex","items-center","gap-2","text-sm","text-zinc-400","py-1"],[1,"bg-red-900/30","border","border-red-600","rounded","px-3","py-2","text-sm","text-red-300","space-y-1"],[1,"flex","flex-col","gap-2"],[1,"animate-spin","inline-block","w-4","h-4","border-2","border-zinc-500","border-t-transparent","rounded-full"],[1,"font-semibold"],[1,"underline","text-blue-400","hover:text-blue-300",3,"routerLink"],[1,"text-xs","bg-zinc-800","px-1","rounded"],[1,"flex","flex-col","gap-1"],[1,"text-xs","text-zinc-400","uppercase","tracking-wide"],[1,"bg-zinc-800","border","border-zinc-600","rounded","px-2","py-1","text-sm","text-zinc-100",3,"ngModelChange","ngModel","disabled"],["value",""],[3,"value"],[1,"text-xs","text-zinc-500"]],template:function(r,i){r&1&&A(0,Fs,4,0,"div",0)(1,Vs,3,1,"div",1)(2,Ks,11,5,"div",2),r&2&&(k(i.isLoading_$()?0:-1),d(),k(i.isEmpty_$()&&!i.isLoading_$()?1:-1),d(),k(!i.isEmpty_$()&&!i.isLoading_$()?2:-1))},dependencies:[je,ui,ci,pi,li,si,ai,oi,ri],encapsulation:2})}return t})();export{Tn as a,y as b,Ke as c,Nt as d,Ji as e,el as f,rl as g,Qi as h,Cl as i};
73
- //# sourceMappingURL=chunk-6XTMCS2Q.js.map
73
+ //# sourceMappingURL=chunk-LINL65XW.js.map
@@ -1,2 +1,2 @@
1
- import{b as c}from"./chunk-7E5JTMIW.js";import{I as d,p as h}from"./chunk-7575R2YP.js";import{C as l,aa as o,h as u,k as r,y as s}from"./chunk-TBMJSIBB.js";var e=function(t){return t.idle="idle",t.downloading="downloading",t.installing="installing",t.completed="completed",t.failed="failed",t}(e||{});var p=u(h());function m(){return typeof window.Capacitor<"u"&&window.Capacitor.isNativePlatform?.()===!0}function w(){let a=window.Capacitor?.Plugins?.AppUpdater;return a||null}var y=(()=>{class t{versionCheck_CS=l(c);downloadUrl=d.api.baseUrl+"/mobile/download";phase_$=o(e.idle);lastError_$=o("");startUpdate(){return r(this,null,function*(){let n=this.phase_$();if(!(n===e.downloading||n===e.installing)){this.lastError_$.set(""),this.phase_$.set(e.downloading);try{let i=w();if(i){this.phase_$.set(e.installing),yield i.downloadAndInstall({downloadUrl:this.downloadUrl}),this.phase_$.set(e.completed);return}this.openInSystemBrowser(this.downloadUrl),this.phase_$.set(e.completed)}catch(i){let f=i instanceof Error?i.message:String(i);this.lastError_$.set(f),this.phase_$.set(e.failed),p.DyFM_Error.logSimple("CCAP_MobileAppUpdater | startUpdate failed",i)}}})}autoUpdateIfAvailable(){return r(this,null,function*(){m()&&(yield this.versionCheck_CS.checkNow(),this.versionCheck_CS.updateAvailable_$()&&(yield this.startUpdate()))})}openInSystemBrowser(n){window.open(n,"_system")}static \u0275fac=function(i){return new(i||t)};static \u0275prov=s({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();export{e as a,y as b};
2
- //# sourceMappingURL=chunk-RUIYE6HI.js.map
1
+ import{b as c}from"./chunk-GJM7BWK7.js";import{I as d,p as h}from"./chunk-QO6PPMHC.js";import{C as l,aa as o,h as u,k as r,y as s}from"./chunk-TBMJSIBB.js";var e=function(t){return t.idle="idle",t.downloading="downloading",t.installing="installing",t.completed="completed",t.failed="failed",t}(e||{});var p=u(h());function m(){return typeof window.Capacitor<"u"&&window.Capacitor.isNativePlatform?.()===!0}function w(){let a=window.Capacitor?.Plugins?.AppUpdater;return a||null}var y=(()=>{class t{versionCheck_CS=l(c);downloadUrl=d.api.baseUrl+"/mobile/download";phase_$=o(e.idle);lastError_$=o("");startUpdate(){return r(this,null,function*(){let n=this.phase_$();if(!(n===e.downloading||n===e.installing)){this.lastError_$.set(""),this.phase_$.set(e.downloading);try{let i=w();if(i){this.phase_$.set(e.installing),yield i.downloadAndInstall({downloadUrl:this.downloadUrl}),this.phase_$.set(e.completed);return}this.openInSystemBrowser(this.downloadUrl),this.phase_$.set(e.completed)}catch(i){let f=i instanceof Error?i.message:String(i);this.lastError_$.set(f),this.phase_$.set(e.failed),p.DyFM_Error.logSimple("CCAP_MobileAppUpdater | startUpdate failed",i)}}})}autoUpdateIfAvailable(){return r(this,null,function*(){m()&&(yield this.versionCheck_CS.checkNow(),this.versionCheck_CS.updateAvailable_$()&&(yield this.startUpdate()))})}openInSystemBrowser(n){window.open(n,"_system")}static \u0275fac=function(i){return new(i||t)};static \u0275prov=s({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();export{e as a,y as b};
2
+ //# sourceMappingURL=chunk-LQUSJKYW.js.map
@@ -1,2 +1,2 @@
1
- import{a as S}from"./chunk-4A73IKZO.js";import{I as m}from"./chunk-7575R2YP.js";import{C as d,d as l,p as n,vb as r,xb as I,y as f}from"./chunk-TBMJSIBB.js";var P=(()=>{class i{baseUrl=`${m.api.baseUrl}/cc-session`;http=d(I);peiContext_DS=d(S);currentCcapId(){return this.peiContext_DS.activeCcapId_$()}withCcapId(t){let e=this.currentCcapId();return e?t.set("ccapId",e):t}createSession(t){let e=this.withCcapId(new r);return n(this.http.post(this.baseUrl,t,{params:e}))}listSessions(t){let e=this.withCcapId(new r);return t?.status&&(e=e.set("status",t.status)),t?.workspacePath&&(e=e.set("workspacePath",t.workspacePath)),t?.includeArchived&&(e=e.set("includeArchived","1")),t?.limit!=null&&(e=e.set("limit",String(t.limit))),t?.offset!=null&&(e=e.set("offset",String(t.offset))),n(this.http.get(this.baseUrl,{params:e}))}getSession(t){let e=this.withCcapId(new r);return n(this.http.get(`${this.baseUrl}/${t.sessionId}`,{params:e}))}sendPrompt(t){let e={content:t.content};t.attachments?.length&&(e.attachments=t.attachments);let s=this.withCcapId(new r);return n(this.http.post(`${this.baseUrl}/${t.sessionId}/prompt`,e,{params:s}))}resumeSession(t){let e=this.withCcapId(new r);return n(this.http.post(`${this.baseUrl}/${t.sessionId}/resume`,{},{params:e}))}forkSession(t){let e={};t.label&&(e.label=t.label);let s=this.withCcapId(new r);return n(this.http.post(`${this.baseUrl}/${t.sessionId}/fork`,e,{params:s}))}stopExecution(t){let e=this.withCcapId(new r);return n(this.http.post(`${this.baseUrl}/${t.sessionId}/stop-execution`,{},{params:e}))}terminateSession(t){let e=this.withCcapId(new r);return n(this.http.post(`${this.baseUrl}/${t.sessionId}/terminate`,{},{params:e}))}restartRunner(t){let e=this.withCcapId(new r);return n(this.http.post(`${this.baseUrl}/${t.sessionId}/runner-restart`,{},{params:e}))}updateSessionConfig(t){let a=t,{sessionId:e}=a,s=l(a,["sessionId"]),o=this.withCcapId(new r);return n(this.http.patch(`${this.baseUrl}/${e}/config`,s,{params:o}))}setSessionArchived(t){let e=this.withCcapId(new r);return n(this.http.patch(`${this.baseUrl}/${t.sessionId}/archive`,{isArchived:t.isArchived},{params:e}))}getSessionEvents(t){let e=this.withCcapId(new r);return t.eventType&&(e=e.set("eventType",t.eventType)),t.since&&(e=e.set("since",t.since)),t.sinceSequence!=null&&(e=e.set("sinceSequence",String(t.sinceSequence))),t.limit!=null&&(e=e.set("limit",String(t.limit))),t.offset!=null&&(e=e.set("offset",String(t.offset))),t.latest&&(e=e.set("latest","1")),n(this.http.get(`${this.baseUrl}/${t.sessionId}/events`,{params:e}))}getRateLimitState(t){let e=new r;return n(this.http.get(`${this.baseUrl}/rate-limit-state/${encodeURIComponent(t.ccapId)}`,{params:e}))}getDiagnostic(t){return n(this.http.get(`${this.baseUrl}/${encodeURIComponent(t.sessionId)}/diagnostic`))}getSessionEventStreamUrl(t){let e=`${this.baseUrl}/${t.sessionId}/events/stream`,s=this.currentCcapId();return s?`${e}?ccapId=${encodeURIComponent(s)}`:e}static \u0275fac=function(e){return new(e||i)};static \u0275prov=f({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})();var y=(()=>{class i{static DEFAULT_SURPASSED_THRESHOLD=.8;static mapServerItemsToClientInfo(t){if(!t||!Array.isArray(t)||t.length===0)return null;let e=t.filter(u=>typeof u?.rateLimitType=="string"&&u.rateLimitType.length>0);if(e.length===0)return null;let s=i.pickMostRelevantItem(e),o=typeof s.utilization=="number"?Math.max(0,Math.min(1,s.utilization)):0,a=typeof s.resetsAtMs=="number"&&s.resetsAtMs>0?s.resetsAtMs:0,c=a>0?Math.floor(a/1e3):0,h=i.mapStatus(s.lastObservedStatus),p=i.readObservedAtIso(s.observedAt);return{status:h,resetsAt:c,rateLimitType:s.rateLimitType??"",utilization:o,surpassedThreshold:i.DEFAULT_SURPASSED_THRESHOLD,isUsingOverage:!1,receivedAt:p}}static pickMostRelevantItem(t){let e=o=>o==="reached"?2:o==="approaching"?1:0;return[...t].sort((o,a)=>{let c=e(a.lastObservedStatus)-e(o.lastObservedStatus);if(c!==0)return c;let h=(a.utilization??0)-(o.utilization??0);if(Math.abs(h)>1e-4)return h>0?1:-1;let p=i.readObservedAtMs(o.observedAt);return i.readObservedAtMs(a.observedAt)-p})[0]}static mapStatus(t){return t==="reached"?"limited":t==="approaching"?"allowed_warning":"allowed"}static readObservedAtMs(t){if(!t)return 0;if(t instanceof Date)return t.getTime();let e=Date.parse(t);return isNaN(e)?0:e}static readObservedAtIso(t){if(!t)return new Date().toISOString();if(t instanceof Date)return t.toISOString();let e=Date.parse(t);return isNaN(e)?new Date().toISOString():new Date(e).toISOString()}}return i})();export{P as a,y as b};
2
- //# sourceMappingURL=chunk-27F7T3ST.js.map
1
+ import{a as S}from"./chunk-2RNHUXSQ.js";import{I as m}from"./chunk-QO6PPMHC.js";import{C as d,d as l,p as n,vb as r,xb as I,y as f}from"./chunk-TBMJSIBB.js";var P=(()=>{class i{baseUrl=`${m.api.baseUrl}/cc-session`;http=d(I);peiContext_DS=d(S);currentCcapId(){return this.peiContext_DS.activeCcapId_$()}withCcapId(t){let e=this.currentCcapId();return e?t.set("ccapId",e):t}createSession(t){let e=this.withCcapId(new r);return n(this.http.post(this.baseUrl,t,{params:e}))}listSessions(t){let e=this.withCcapId(new r);return t?.status&&(e=e.set("status",t.status)),t?.workspacePath&&(e=e.set("workspacePath",t.workspacePath)),t?.includeArchived&&(e=e.set("includeArchived","1")),t?.limit!=null&&(e=e.set("limit",String(t.limit))),t?.offset!=null&&(e=e.set("offset",String(t.offset))),n(this.http.get(this.baseUrl,{params:e}))}getSession(t){let e=this.withCcapId(new r);return n(this.http.get(`${this.baseUrl}/${t.sessionId}`,{params:e}))}sendPrompt(t){let e={content:t.content};t.attachments?.length&&(e.attachments=t.attachments);let s=this.withCcapId(new r);return n(this.http.post(`${this.baseUrl}/${t.sessionId}/prompt`,e,{params:s}))}resumeSession(t){let e=this.withCcapId(new r);return n(this.http.post(`${this.baseUrl}/${t.sessionId}/resume`,{},{params:e}))}forkSession(t){let e={};t.label&&(e.label=t.label);let s=this.withCcapId(new r);return n(this.http.post(`${this.baseUrl}/${t.sessionId}/fork`,e,{params:s}))}stopExecution(t){let e=this.withCcapId(new r);return n(this.http.post(`${this.baseUrl}/${t.sessionId}/stop-execution`,{},{params:e}))}terminateSession(t){let e=this.withCcapId(new r);return n(this.http.post(`${this.baseUrl}/${t.sessionId}/terminate`,{},{params:e}))}restartRunner(t){let e=this.withCcapId(new r);return n(this.http.post(`${this.baseUrl}/${t.sessionId}/runner-restart`,{},{params:e}))}updateSessionConfig(t){let a=t,{sessionId:e}=a,s=l(a,["sessionId"]),o=this.withCcapId(new r);return n(this.http.patch(`${this.baseUrl}/${e}/config`,s,{params:o}))}setSessionArchived(t){let e=this.withCcapId(new r);return n(this.http.patch(`${this.baseUrl}/${t.sessionId}/archive`,{isArchived:t.isArchived},{params:e}))}getSessionEvents(t){let e=this.withCcapId(new r);return t.eventType&&(e=e.set("eventType",t.eventType)),t.since&&(e=e.set("since",t.since)),t.sinceSequence!=null&&(e=e.set("sinceSequence",String(t.sinceSequence))),t.limit!=null&&(e=e.set("limit",String(t.limit))),t.offset!=null&&(e=e.set("offset",String(t.offset))),t.latest&&(e=e.set("latest","1")),n(this.http.get(`${this.baseUrl}/${t.sessionId}/events`,{params:e}))}getRateLimitState(t){let e=new r;return n(this.http.get(`${this.baseUrl}/rate-limit-state/${encodeURIComponent(t.ccapId)}`,{params:e}))}getDiagnostic(t){return n(this.http.get(`${this.baseUrl}/${encodeURIComponent(t.sessionId)}/diagnostic`))}getSessionEventStreamUrl(t){let e=`${this.baseUrl}/${t.sessionId}/events/stream`,s=this.currentCcapId();return s?`${e}?ccapId=${encodeURIComponent(s)}`:e}static \u0275fac=function(e){return new(e||i)};static \u0275prov=f({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})();var y=(()=>{class i{static DEFAULT_SURPASSED_THRESHOLD=.8;static mapServerItemsToClientInfo(t){if(!t||!Array.isArray(t)||t.length===0)return null;let e=t.filter(u=>typeof u?.rateLimitType=="string"&&u.rateLimitType.length>0);if(e.length===0)return null;let s=i.pickMostRelevantItem(e),o=typeof s.utilization=="number"?Math.max(0,Math.min(1,s.utilization)):0,a=typeof s.resetsAtMs=="number"&&s.resetsAtMs>0?s.resetsAtMs:0,c=a>0?Math.floor(a/1e3):0,h=i.mapStatus(s.lastObservedStatus),p=i.readObservedAtIso(s.observedAt);return{status:h,resetsAt:c,rateLimitType:s.rateLimitType??"",utilization:o,surpassedThreshold:i.DEFAULT_SURPASSED_THRESHOLD,isUsingOverage:!1,receivedAt:p}}static pickMostRelevantItem(t){let e=o=>o==="reached"?2:o==="approaching"?1:0;return[...t].sort((o,a)=>{let c=e(a.lastObservedStatus)-e(o.lastObservedStatus);if(c!==0)return c;let h=(a.utilization??0)-(o.utilization??0);if(Math.abs(h)>1e-4)return h>0?1:-1;let p=i.readObservedAtMs(o.observedAt);return i.readObservedAtMs(a.observedAt)-p})[0]}static mapStatus(t){return t==="reached"?"limited":t==="approaching"?"allowed_warning":"allowed"}static readObservedAtMs(t){if(!t)return 0;if(t instanceof Date)return t.getTime();let e=Date.parse(t);return isNaN(e)?0:e}static readObservedAtIso(t){if(!t)return new Date().toISOString();if(t instanceof Date)return t.toISOString();let e=Date.parse(t);return isNaN(e)?new Date().toISOString():new Date(e).toISOString()}}return i})();export{P as a,y as b};
2
+ //# sourceMappingURL=chunk-MJNZ5WS7.js.map
@@ -1,8 +1,8 @@
1
- import{a as O}from"./chunk-OQJGSREU.js";import{a as q}from"./chunk-4A73IKZO.js";import{d as F}from"./chunk-LQ5T2FCA.js";import{e as D}from"./chunk-L4PH3U6G.js";import{h as A,j as k}from"./chunk-6E56PUJD.js";import{I as R,p as j}from"./chunk-7575R2YP.js";import{C as I,R as P,a as S,aa as m,b,h as U,k as f,p as y,vb as g,xb as K,y as E}from"./chunk-TBMJSIBB.js";var M=class{static compareMirrorEventsAsc(i,e){let t=(i.sequence??0)-(e.sequence??0);if(t!==0)return t;let s=typeof i.timestamp=="string"?i.timestamp:"",n=typeof e.timestamp=="string"?e.timestamp:"",o=s.localeCompare(n);if(o!==0)return o;let r=typeof i.eventType=="string"?i.eventType:"",a=typeof e.eventType=="string"?e.eventType:"";return r.localeCompare(a)}};var C=class c{static messageIdsCompatibleForStreamMerge(i,e){let t=(i??"").trim(),s=(e??"").trim();return t.length>0&&s.length>0?t===s:!0}static parseStreamChunkFromMirrorData(i){let e=i.update;if(e===null||typeof e!="object"||Array.isArray(e))return null;let t=c.toPlainRecord(e),s=t.sessionUpdate,n=null;if(s==="agent_message_chunk"&&(n="agent"),s==="user_message_chunk"&&(n="user"),s==="agent_thought_chunk"&&(n="thought"),n===null)return null;let o=t.content;if(o===null||typeof o!="object"||Array.isArray(o))return null;let a=c.toPlainRecord(o).text;if(typeof a!="string"||!a.length)return null;let l=t.messageId,d=typeof l=="string"&&l.length>0?l:void 0;return{role:n,text:a,messageId:d}}static canMergeConsoleTailWithChunk(i){let e=i.prev;if(e.streamTextRole===void 0||e.streamTextRole!==i.parsed.role)return!1;let t=e.streamMessageId,s=i.parsed.messageId;if(!c.messageIdsCompatibleForStreamMerge(t,s))return!1;let n=i.ev.sequence??0,o=e.streamLastSequence??0;return!(n<=o)}static canMergeMirrorChunkEvents(i,e,t){let s=c.parseStreamChunkFromMirrorData(i.data??{});if(s===null||s.role!==t.role)return!1;let n=s.messageId,o=t.messageId;if(!c.messageIdsCompatibleForStreamMerge(n,o))return!1;let r=i.sequence??0;return!((e.sequence??0)<=r)}static foldEventsToTimelineRows(i){let e=[];for(let t of i){let s=c.parseStreamChunkFromMirrorData(t.data??{});if(s!==null){let n=e.length>0?e[e.length-1]:void 0,o=n!==void 0&&n.events.length>0?n.events[n.events.length-1]:void 0;if(n!==void 0&&o!==void 0&&c.canMergeMirrorChunkEvents(o,t,s)){let r=[...n.events,t];e[e.length-1]={rowKey:c.mergedTimelineRowKey(r),events:r}}else e.push({rowKey:`evt-${String(t.sequence??0)}`,events:[t]})}else e.push({rowKey:`evt-${String(t.sequence??0)}`,events:[t]})}return e}static mergedTimelineRowKey(i){if(!i.length)return"evt-empty";let e=i[0].sequence??0,t=i[i.length-1].sequence??0;return`merged-chunk-${String(e)}-${String(t)}`}static toPlainRecord(i){let e={};for(let t of Object.keys(i))e[t]=Reflect.get(i,t);return e}};var v=U(j());var x=class c{static prettyStringifyUnknown(i){try{let e=c.expandEmbeddedJsonStrings(i);return JSON.stringify(e,null,2)}catch{return i==null?String(i):typeof i=="object"?"[Object stringify failed]":String(i)}}static expandEmbeddedJsonStrings(i){if(i==null)return i;if(typeof i=="string"){let t=i;if(!F.looksLikeJson(t))return t;try{let s=JSON.parse(t.trim());return c.expandEmbeddedJsonStrings(s)}catch{return t}}if(typeof i!="object")return i;if(Array.isArray(i))return i.map(t=>c.expandEmbeddedJsonStrings(t));let e={};for(let t of Object.keys(i)){let s=Reflect.get(i,t);e[t]=c.expandEmbeddedJsonStrings(s)}return e}};var T=class c{static buildFromMirrorEvent(i){let e=i.sequence??0,t=i.data!==void 0?i.data:{},s=typeof i.eventType=="string"?i.eventType:"";return s==="prompt-sent"?c.buildPromptSentBrief(e,t):s==="ca-session-update"?c.buildCaSessionUpdateBrief(e,t):c.buildGenericBrief(s,e,t)}static extractSessionUpdateKind(i){let e=i.update;if(e===null||typeof e!="object"||Array.isArray(e))return;let s=c.toPlainRecord(e).sessionUpdate;return typeof s=="string"&&s.length?s:void 0}static buildPromptSentBrief(i,e){let t=e.content;return typeof t!="string"||!t.length?null:{listKey:`mirror-prompt-${String(i)}`,consoleType:"prompt",bodyText:t,mirrorEventType:"prompt-sent",useRawBubbleKind:!1,rawData:e}}static buildCaSessionUpdateBrief(i,e){let t=C.parseStreamChunkFromMirrorData(e);if(t!==null){let n=c.extractSessionUpdateKind(e),o=t.role==="thought";return{listKey:`mirror-chunk-${String(i)}`,consoleType:o?"thinking":"assistant",bodyText:t.text,mirrorEventType:"ca-session-update",briefSubtype:n,useRawBubbleKind:!1,rawData:e,isStreamingTextChunk:!0,streamTextRole:t.role,streamMessageId:t.messageId}}let s=x.prettyStringifyUnknown(e);return{listKey:`mirror-ca-session-update-${String(i)}`,consoleType:"info",bodyText:s,mirrorEventType:"ca-session-update",useRawBubbleKind:!0,rawData:e}}static buildGenericBrief(i,e,t){let s=c.safeListKeySegment(i),n={eventType:i.length?i:"unknown",sequence:e,data:t},o=x.prettyStringifyUnknown(n);return{listKey:`mirror-${s}-${String(e)}`,consoleType:"info",bodyText:o,mirrorEventType:i.length?i:"unknown",useRawBubbleKind:!0,rawData:t}}static safeListKeySegment(i){let e=i.replace(/[^a-zA-Z0-9_-]+/g,"_").replace(/^_+|_+$/g,"");return e.length?e:"event"}static toPlainRecord(i){let e={};for(let t of Object.keys(i))e[t]=Reflect.get(i,t);return e}};var u=class c{static listKeyStart(i){return`ca-tc-${i}-start`}static listKeyProgress(i){return`ca-tc-${i}-progress`}static listKeyResult(i){return`ca-tc-${i}-result`}static listKeyError(i){return`ca-tc-${i}-error`}static tryParseStableListKey(i){let e="ca-tc-";if(!i.startsWith(e))return null;let t=[{suffix:"-progress",role:"progress"},{suffix:"-start",role:"start"},{suffix:"-result",role:"result"},{suffix:"-error",role:"error"}];for(let s of t){if(!i.endsWith(s.suffix))continue;let n=i.slice(e.length,i.length-s.suffix.length);return n.length?{toolCallId:n,role:s.role}:null}return null}static tryParseMirrorData(i){let e=i.update;if(e===null||typeof e!="object"||Array.isArray(e))return null;let t=c.toPlainRecord(e),s=t.sessionUpdate;if(s!=="tool_call"&&s!=="tool_call_update")return null;let n=t.toolCallId;if(typeof n!="string"||!n.trim().length)return null;let o=t.status,r=typeof o=="string"?o:"",a=t.title,l=typeof a=="string"&&a.trim().length?a.trim():void 0,d=t.kind,h=typeof d=="string"&&d.trim().length?d.trim():void 0,p=t.rawOutput,_=t.rawInput,w=t.content,$=t.locations;return{sessionUpdate:s,toolCallId:n.trim(),status:r,title:l,toolKind:h,rawOutput:p!==void 0?p:void 0,rawInput:_!==void 0?_:void 0,content:Array.isArray(w)&&w.length?w:void 0,locations:Array.isArray($)&&$.length?$:void 0}}static hasRawOutputError(i){if(i===null||typeof i!="object"||Array.isArray(i))return!1;let e=c.toPlainRecord(i);return Object.prototype.hasOwnProperty.call(e,"error")}static summarizeRawOutputError(i){if(i===null||typeof i!="object"||Array.isArray(i))return"Tool call failed";let t=c.toPlainRecord(i).error;if(typeof t=="string"&&t.trim().length)return t.trim();try{return JSON.stringify(i)}catch{return"Tool call failed"}}static summarizeRawOutputSuccess(i){if(i===void 0)return"Completed";try{let e=JSON.stringify(i),t=400;return e.length>t?`${e.substring(0,t)}\u2026`:e}catch{return"Completed"}}static formatRawInput(i){if(i==null)return"";try{return JSON.stringify(i,null,2)}catch{return String(i)}}static formatLocations(i){if(!i?.length)return"";let e=[];for(let t of i){if(t===null||typeof t!="object"||Array.isArray(t))continue;let s=c.toPlainRecord(t),n=s.path;if(typeof n!="string"||!n.length)continue;let o=s.line,r=typeof o=="number"?`:${o}`:"";e.push(`${n}${r}`)}return e.join(`
1
+ import{a as O}from"./chunk-Z4FJZ3ZL.js";import{a as q}from"./chunk-2RNHUXSQ.js";import{d as F}from"./chunk-CF6WYIFU.js";import{e as D}from"./chunk-DFAF7ZFC.js";import{h as A,j as k}from"./chunk-FXHQVXMP.js";import{I as R,p as j}from"./chunk-QO6PPMHC.js";import{C as I,R as P,a as S,aa as m,b,h as U,k as f,p as y,vb as g,xb as K,y as E}from"./chunk-TBMJSIBB.js";var M=class{static compareMirrorEventsAsc(i,e){let t=(i.sequence??0)-(e.sequence??0);if(t!==0)return t;let s=typeof i.timestamp=="string"?i.timestamp:"",n=typeof e.timestamp=="string"?e.timestamp:"",o=s.localeCompare(n);if(o!==0)return o;let r=typeof i.eventType=="string"?i.eventType:"",a=typeof e.eventType=="string"?e.eventType:"";return r.localeCompare(a)}};var C=class c{static messageIdsCompatibleForStreamMerge(i,e){let t=(i??"").trim(),s=(e??"").trim();return t.length>0&&s.length>0?t===s:!0}static parseStreamChunkFromMirrorData(i){let e=i.update;if(e===null||typeof e!="object"||Array.isArray(e))return null;let t=c.toPlainRecord(e),s=t.sessionUpdate,n=null;if(s==="agent_message_chunk"&&(n="agent"),s==="user_message_chunk"&&(n="user"),s==="agent_thought_chunk"&&(n="thought"),n===null)return null;let o=t.content;if(o===null||typeof o!="object"||Array.isArray(o))return null;let a=c.toPlainRecord(o).text;if(typeof a!="string"||!a.length)return null;let l=t.messageId,d=typeof l=="string"&&l.length>0?l:void 0;return{role:n,text:a,messageId:d}}static canMergeConsoleTailWithChunk(i){let e=i.prev;if(e.streamTextRole===void 0||e.streamTextRole!==i.parsed.role)return!1;let t=e.streamMessageId,s=i.parsed.messageId;if(!c.messageIdsCompatibleForStreamMerge(t,s))return!1;let n=i.ev.sequence??0,o=e.streamLastSequence??0;return!(n<=o)}static canMergeMirrorChunkEvents(i,e,t){let s=c.parseStreamChunkFromMirrorData(i.data??{});if(s===null||s.role!==t.role)return!1;let n=s.messageId,o=t.messageId;if(!c.messageIdsCompatibleForStreamMerge(n,o))return!1;let r=i.sequence??0;return!((e.sequence??0)<=r)}static foldEventsToTimelineRows(i){let e=[];for(let t of i){let s=c.parseStreamChunkFromMirrorData(t.data??{});if(s!==null){let n=e.length>0?e[e.length-1]:void 0,o=n!==void 0&&n.events.length>0?n.events[n.events.length-1]:void 0;if(n!==void 0&&o!==void 0&&c.canMergeMirrorChunkEvents(o,t,s)){let r=[...n.events,t];e[e.length-1]={rowKey:c.mergedTimelineRowKey(r),events:r}}else e.push({rowKey:`evt-${String(t.sequence??0)}`,events:[t]})}else e.push({rowKey:`evt-${String(t.sequence??0)}`,events:[t]})}return e}static mergedTimelineRowKey(i){if(!i.length)return"evt-empty";let e=i[0].sequence??0,t=i[i.length-1].sequence??0;return`merged-chunk-${String(e)}-${String(t)}`}static toPlainRecord(i){let e={};for(let t of Object.keys(i))e[t]=Reflect.get(i,t);return e}};var v=U(j());var x=class c{static prettyStringifyUnknown(i){try{let e=c.expandEmbeddedJsonStrings(i);return JSON.stringify(e,null,2)}catch{return i==null?String(i):typeof i=="object"?"[Object stringify failed]":String(i)}}static expandEmbeddedJsonStrings(i){if(i==null)return i;if(typeof i=="string"){let t=i;if(!F.looksLikeJson(t))return t;try{let s=JSON.parse(t.trim());return c.expandEmbeddedJsonStrings(s)}catch{return t}}if(typeof i!="object")return i;if(Array.isArray(i))return i.map(t=>c.expandEmbeddedJsonStrings(t));let e={};for(let t of Object.keys(i)){let s=Reflect.get(i,t);e[t]=c.expandEmbeddedJsonStrings(s)}return e}};var T=class c{static buildFromMirrorEvent(i){let e=i.sequence??0,t=i.data!==void 0?i.data:{},s=typeof i.eventType=="string"?i.eventType:"";return s==="prompt-sent"?c.buildPromptSentBrief(e,t):s==="ca-session-update"?c.buildCaSessionUpdateBrief(e,t):c.buildGenericBrief(s,e,t)}static extractSessionUpdateKind(i){let e=i.update;if(e===null||typeof e!="object"||Array.isArray(e))return;let s=c.toPlainRecord(e).sessionUpdate;return typeof s=="string"&&s.length?s:void 0}static buildPromptSentBrief(i,e){let t=e.content;return typeof t!="string"||!t.length?null:{listKey:`mirror-prompt-${String(i)}`,consoleType:"prompt",bodyText:t,mirrorEventType:"prompt-sent",useRawBubbleKind:!1,rawData:e}}static buildCaSessionUpdateBrief(i,e){let t=C.parseStreamChunkFromMirrorData(e);if(t!==null){let n=c.extractSessionUpdateKind(e),o=t.role==="thought";return{listKey:`mirror-chunk-${String(i)}`,consoleType:o?"thinking":"assistant",bodyText:t.text,mirrorEventType:"ca-session-update",briefSubtype:n,useRawBubbleKind:!1,rawData:e,isStreamingTextChunk:!0,streamTextRole:t.role,streamMessageId:t.messageId}}let s=x.prettyStringifyUnknown(e);return{listKey:`mirror-ca-session-update-${String(i)}`,consoleType:"info",bodyText:s,mirrorEventType:"ca-session-update",useRawBubbleKind:!0,rawData:e}}static buildGenericBrief(i,e,t){let s=c.safeListKeySegment(i),n={eventType:i.length?i:"unknown",sequence:e,data:t},o=x.prettyStringifyUnknown(n);return{listKey:`mirror-${s}-${String(e)}`,consoleType:"info",bodyText:o,mirrorEventType:i.length?i:"unknown",useRawBubbleKind:!0,rawData:t}}static safeListKeySegment(i){let e=i.replace(/[^a-zA-Z0-9_-]+/g,"_").replace(/^_+|_+$/g,"");return e.length?e:"event"}static toPlainRecord(i){let e={};for(let t of Object.keys(i))e[t]=Reflect.get(i,t);return e}};var u=class c{static listKeyStart(i){return`ca-tc-${i}-start`}static listKeyProgress(i){return`ca-tc-${i}-progress`}static listKeyResult(i){return`ca-tc-${i}-result`}static listKeyError(i){return`ca-tc-${i}-error`}static tryParseStableListKey(i){let e="ca-tc-";if(!i.startsWith(e))return null;let t=[{suffix:"-progress",role:"progress"},{suffix:"-start",role:"start"},{suffix:"-result",role:"result"},{suffix:"-error",role:"error"}];for(let s of t){if(!i.endsWith(s.suffix))continue;let n=i.slice(e.length,i.length-s.suffix.length);return n.length?{toolCallId:n,role:s.role}:null}return null}static tryParseMirrorData(i){let e=i.update;if(e===null||typeof e!="object"||Array.isArray(e))return null;let t=c.toPlainRecord(e),s=t.sessionUpdate;if(s!=="tool_call"&&s!=="tool_call_update")return null;let n=t.toolCallId;if(typeof n!="string"||!n.trim().length)return null;let o=t.status,r=typeof o=="string"?o:"",a=t.title,l=typeof a=="string"&&a.trim().length?a.trim():void 0,d=t.kind,h=typeof d=="string"&&d.trim().length?d.trim():void 0,p=t.rawOutput,_=t.rawInput,w=t.content,$=t.locations;return{sessionUpdate:s,toolCallId:n.trim(),status:r,title:l,toolKind:h,rawOutput:p!==void 0?p:void 0,rawInput:_!==void 0?_:void 0,content:Array.isArray(w)&&w.length?w:void 0,locations:Array.isArray($)&&$.length?$:void 0}}static hasRawOutputError(i){if(i===null||typeof i!="object"||Array.isArray(i))return!1;let e=c.toPlainRecord(i);return Object.prototype.hasOwnProperty.call(e,"error")}static summarizeRawOutputError(i){if(i===null||typeof i!="object"||Array.isArray(i))return"Tool call failed";let t=c.toPlainRecord(i).error;if(typeof t=="string"&&t.trim().length)return t.trim();try{return JSON.stringify(i)}catch{return"Tool call failed"}}static summarizeRawOutputSuccess(i){if(i===void 0)return"Completed";try{let e=JSON.stringify(i),t=400;return e.length>t?`${e.substring(0,t)}\u2026`:e}catch{return"Completed"}}static formatRawInput(i){if(i==null)return"";try{return JSON.stringify(i,null,2)}catch{return String(i)}}static formatLocations(i){if(!i?.length)return"";let e=[];for(let t of i){if(t===null||typeof t!="object"||Array.isArray(t))continue;let s=c.toPlainRecord(t),n=s.path;if(typeof n!="string"||!n.length)continue;let o=s.line,r=typeof o=="number"?`:${o}`:"";e.push(`${n}${r}`)}return e.join(`
2
2
  `)}static formatContent(i){if(!i?.length)return"";let e=[];for(let t of i){if(t===null||typeof t!="object"||Array.isArray(t))continue;let s=c.toPlainRecord(t),n=s.type;if(n==="diff"){let o=s.path,r=s.oldText,a=s.newText,d=[`--- ${typeof o=="string"?o:"(unknown)"}`];typeof r=="string"&&r.length&&d.push(`- ${r.substring(0,500)}${r.length>500?"\u2026":""}`),typeof a=="string"&&a.length&&d.push(`+ ${a.substring(0,500)}${a.length>500?"\u2026":""}`),e.push(d.join(`
3
3
  `))}else if(n==="terminal")try{e.push(`[terminal] ${JSON.stringify(s,null,2)}`)}catch{e.push("[terminal output]")}else if(n==="content"){let o=s.parts;if(Array.isArray(o)){for(let r of o)if(r!==null&&typeof r=="object"&&!Array.isArray(r)){let a=c.toPlainRecord(r);typeof a.text=="string"&&e.push(a.text)}}}}return e.join(`
4
4
 
5
5
  `)}static toPlainRecord(i){let e={};for(let t of Object.keys(i))e[t]=Reflect.get(i,t);return e}};var L=(()=>{class c{baseUrl=`${R.api.baseUrl}/ca-session`;http=I(K);peiContext_DS=I(q);withCcapId(e){let t=this.peiContext_DS.activeCcapId_$();return t?e.set("ccapId",t):e}createSession(e){let t=this.withCcapId(new g);return y(this.http.post(this.baseUrl,e,{params:t}))}listSessions(e){let t=this.withCcapId(new g);return e?.status&&(t=t.set("status",e.status)),e?.workspacePath&&(t=t.set("workspacePath",e.workspacePath)),e?.includeArchived&&(t=t.set("includeArchived","1")),y(this.http.get(this.baseUrl,{params:t}))}syncFromAgent(e){let t=this.withCcapId(new g);return y(this.http.post(`${this.baseUrl}/sync`,{cwd:e?.cwd},{params:t}))}getSession(e){let t=this.withCcapId(new g);return y(this.http.get(`${this.baseUrl}/${e}`,{params:t}))}sendPrompt(e){let t=this.withCcapId(new g);return y(this.http.post(`${this.baseUrl}/${e.sessionId}/prompt`,{content:e.content},{params:t}))}stopExecution(e){let t=this.withCcapId(new g);return y(this.http.post(`${this.baseUrl}/${e}/stop-execution`,{},{params:t}))}terminateSession(e){let t=this.withCcapId(new g);return y(this.http.post(`${this.baseUrl}/${e}/terminate`,{},{params:t}))}setSessionArchived(e){let t=this.withCcapId(new g);return y(this.http.patch(`${this.baseUrl}/${e.sessionId}/archive`,{isArchived:e.isArchived},{params:t}))}getSessionEvents(e){let t=this.withCcapId(new g);return e.sinceSequence!=null&&(t=t.set("sinceSequence",String(e.sinceSequence))),e.limit!=null&&(t=t.set("limit",String(e.limit))),y(this.http.get(`${this.baseUrl}/${e.sessionId}/events`,{params:t}))}hydrateSession(e){return y(this.http.post(`${this.baseUrl}/${e.sessionId}/hydrate`,{force:e.force===!0},{params:this.withCcapId(new g)}))}static \u0275fac=function(t){return new(t||c)};static \u0275prov=E({token:c,factory:c.\u0275fac,providedIn:"root"})}return c})();var fe=(()=>{class c{sessions_$=m([]);sessionsLoading_$=m(!1);sessionsLoadError_$=m(null);selectedSession_$=m(null);selectedSessionLoading_$=m(!1);selectedSessionEvents_$=m([]);sessionEventsHasMore_$=m(!1);mirrorRuntime_$=m(null);consoleMessages_$=m([]);assembledMessages_$=m([]);assembledMessagesHasMore_$=m(!1);isLoadingOlderMessages_$=m(!1);lastStatusUpdate_$=m(null);activeSessionId_$=m("");sessionDetailError_$=m(null);caSession_AS=I(L);extSessionMsg_AS=I(O);globalError_CS=I(k);socket_CS=I(D);ngZone=I(P);eventSubscription=null;reconnectSubscription=null;lastKnownEventSequence=-1;openSessionPollTimer=null;openSessionPollTargetId="";pendingOptimisticPrompts=[];sessionEventsNextSince=null;constructor(){this.eventSubscription=this.socket_CS.event$.subscribe(e=>{this.handleSocketEvent(e)}),this.reconnectSubscription=this.socket_CS.connected$.subscribe(e=>{if(e){let t=this.activeSessionId_$();t&&(this.socket_CS.emit("ca-session:subscribe",{sessionId:t}),this.loadAssembledMessages({sessionId:t}).catch(()=>{}))}})}ngOnDestroy(){this.stopOpenSessionPolling(),this.eventSubscription?.unsubscribe(),this.reconnectSubscription?.unsubscribe()}loadSessions(e){return f(this,null,function*(){this.sessionsLoading_$.set(!0),this.sessionsLoadError_$.set(null);try{let t=yield this.caSession_AS.listSessions({includeArchived:e?.includeArchived}),s=t.sessions,o=(Array.isArray(s)?s:[]).map(_=>this.mapSessionRecord(this.toRecord(_)));this.sessions_$.set(o);let r=t.mirrorRuntime,a=this.toRecord(r),l=a.isAcpConnected,d=a.loadSessionSupported,h=a.isTerminalMode,p=a.isTerminalRunnerConnected;typeof l=="boolean"&&typeof d=="boolean"?this.mirrorRuntime_$.set({isAcpConnected:l,loadSessionSupported:d,isTerminalMode:h===!0,isTerminalRunnerConnected:p===!0}):this.mirrorRuntime_$.set(null)}catch(t){this.sessionsLoadError_$.set(t),this.globalError_CS.showError(t,"ca-session-list")}finally{this.sessionsLoading_$.set(!1)}})}syncFromAgent(e){return f(this,null,function*(){try{yield this.caSession_AS.syncFromAgent({cwd:e?.cwd}),yield this.loadSessions()}catch(t){throw this.globalError_CS.showError(t,"ca-session-sync"),t}})}loadSessionDetail(e){return f(this,null,function*(){this.sessionDetailError_$.set(null),this.selectedSessionLoading_$.set(!0);try{let s=(yield this.caSession_AS.getSession(e.sessionId)).session;this.selectedSession_$.set(this.mapSessionRecord(s)),this.sessionEventsNextSince=null,this.sessionEventsHasMore_$.set(!1);let n=yield this.caSession_AS.getSessionEvents({sessionId:e.sessionId,limit:200}),o=n.events.map(a=>({sessionId:typeof a.sessionId=="string"?a.sessionId:e.sessionId,eventType:typeof a.eventType=="string"?a.eventType:"",timestamp:typeof a.timestamp=="string"?a.timestamp:"",data:this.asRecord(a.data),sequence:typeof a.sequence=="number"?a.sequence:0}));this.selectedSessionEvents_$.set(o),this.sessionEventsHasMore_$.set(n.hasMore===!0);let r=n.nextSinceSequence;return this.sessionEventsNextSince=typeof r=="number"?r:null,this.lastKnownEventSequence=Math.max(-1,...this.selectedSessionEvents_$().map(a=>a.sequence??0)),this.seedConsoleFromMirrorEvents(o),this.loadAssembledMessages({sessionId:e.sessionId}).catch(()=>{}),!0}catch(t){return this.sessionDetailError_$.set(t),this.selectedSession_$.set(null),this.selectedSessionEvents_$.set([]),this.globalError_CS.showError(t,"ca-session-detail"),!1}finally{this.selectedSessionLoading_$.set(!1)}})}loadMoreSessionEvents(e){return f(this,null,function*(){let t=this.sessionEventsNextSince;if(t!=null)try{let s=yield this.caSession_AS.getSessionEvents({sessionId:e.sessionId,sinceSequence:t,limit:200}),n=s.events.map(a=>({sessionId:typeof a.sessionId=="string"?a.sessionId:e.sessionId,eventType:typeof a.eventType=="string"?a.eventType:"",timestamp:typeof a.timestamp=="string"?a.timestamp:"",data:this.asRecord(a.data),sequence:typeof a.sequence=="number"?a.sequence:0})),o=[...this.selectedSessionEvents_$(),...n];o.sort(M.compareMirrorEventsAsc),this.selectedSessionEvents_$.set(o),this.sessionEventsHasMore_$.set(s.hasMore===!0);let r=s.nextSinceSequence;this.sessionEventsNextSince=typeof r=="number"?r:null,this.lastKnownEventSequence=Math.max(this.lastKnownEventSequence,...n.map(a=>a.sequence??0))}catch(s){this.globalError_CS.showError(s,"ca-session-events-page")}})}hydrateFromAgent(e){return f(this,null,function*(){try{yield this.caSession_AS.hydrateSession({sessionId:e.sessionId,force:e.force})}catch(s){throw this.globalError_CS.showError(s,"ca-session-hydrate"),s}if(!(yield this.loadSessionDetail({sessionId:e.sessionId}))){let s=this.sessionDetailError_$();throw s instanceof Error?s:new Error("CA session detail reload after hydrate failed")}})}setActiveSessionId(e){let t=this.activeSessionId_$();t&&t!==e&&this.socket_CS.emit("ca-session:unsubscribe",{sessionId:t}),this.activeSessionId_$.set(e),e&&this.socket_CS.emit("ca-session:subscribe",{sessionId:e})}clearLiveOutput(){this.consoleMessages_$.set([]),this.lastKnownEventSequence=-1,this.pendingOptimisticPrompts.length=0}createSession(e){return f(this,null,function*(){try{let t=yield this.caSession_AS.createSession({workspacePath:e.workspacePath,label:e.label}),n=this.toRecord(t.session).sessionId,o=typeof n=="string"?n:"";return yield this.loadSessions(),o}catch(t){throw t}})}sendPrompt(e){return f(this,null,function*(){let t=`optimistic-prompt-${globalThis.crypto.randomUUID()}`;this.pendingOptimisticPrompts.push({listKey:t,text:e.content}),this.pushConsoleMessage({listKey:t,type:"prompt",text:e.content});try{yield this.caSession_AS.sendPrompt(e)}catch(s){let n=this.pendingOptimisticPrompts.findIndex(o=>o.listKey===t);throw n>=0&&this.pendingOptimisticPrompts.splice(n,1),this.pushConsoleMessage({type:"error",text:A.getErrorMessageForDisplay(s)}),this.globalError_CS.showError(s,"ca-session-prompt"),s}})}stopExecution(e){return f(this,null,function*(){try{yield this.caSession_AS.stopExecution(e)}catch(t){throw this.globalError_CS.showError(t,"ca-session-stop-execution"),t}})}terminateSession(e){return f(this,null,function*(){try{yield this.caSession_AS.terminateSession(e),yield this.loadSessions()}catch(t){throw this.globalError_CS.showError(t,"ca-session-terminate"),t}})}setSessionArchived(e){return f(this,null,function*(){try{let t=yield this.caSession_AS.setSessionArchived(e);yield this.loadSessions(),this.selectedSession_$()?.sessionId===e.sessionId&&t.session!==null&&typeof t.session=="object"&&this.selectedSession_$.set(this.mapSessionRecord(this.toRecord(t.session)))}catch(t){throw this.globalError_CS.showError(t,"ca-session-archive"),t}})}startOpenSessionPolling(e){if(this.stopOpenSessionPolling(),!e)return;this.openSessionPollTargetId=e;let t=10*v.second;this.openSessionPollTimer=globalThis.setInterval(()=>{this.runOpenSessionPollTick(e)},t)}stopOpenSessionPolling(){this.openSessionPollTimer!==null&&(globalThis.clearInterval(this.openSessionPollTimer),this.openSessionPollTimer=null),this.openSessionPollTargetId=""}pushConsoleMessage(e){let t=this.materializeConsoleLineFromPushParams({listKey:e.listKey,type:e.type,text:e.text,timestamp:e.timestamp??new Date().toISOString(),rawData:e.rawData,mirrorEventType:e.mirrorEventType,briefSubtype:e.briefSubtype,useRawBubbleKind:e.useRawBubbleKind,streamTextRole:e.streamTextRole,streamLastSequence:e.streamLastSequence,streamMessageId:e.streamMessageId,streamPartData:e.streamPartData,toolDisplayName:e.toolDisplayName,isToolCallFailedIndicator:e.isToolCallFailedIndicator}),s=this.consoleMessages_$();this.consoleMessages_$.set([...s,t])}appendConsoleMirrorEventOne(e){if(e.eventType==="ca-session-update"){let o=u.tryParseMirrorData(e.data??{});if(o!==null&&this.applyToolCallMirrorEventToLiveConsole({ev:e,parsed:o}))return}let t=T.buildFromMirrorEvent(e);if(t===null||(e.eventType==="prompt-sent"&&t.consoleType==="prompt"&&this.removePendingOptimisticPromptBubbleIfTextMatchesMirror(t.bodyText),this.consoleMessages_$().some(o=>o.listKey===t.listKey))||t.isStreamingTextChunk===!0&&this.tryMergeStreamingMirrorChunkIntoConsole({ev:e,brief:t}))return;let n=typeof e.timestamp=="string"&&e.timestamp.length?e.timestamp:new Date().toISOString();this.pushConsoleMessage(this.buildConsolePushParamsFromBrief({ev:e,brief:t,timestampIso:n}))}tryMergeStreamingMirrorChunkIntoConsole(e){let t=this.consoleMessages_$();if(t.length===0)return!1;let s=t[t.length-1],n=C.parseStreamChunkFromMirrorData(e.ev.data??{});if(n===null||!C.canMergeConsoleTailWithChunk({prev:s,ev:e.ev,parsed:n}))return!1;let o=s.streamPartData!==void 0?[...s.streamPartData]:[];o.push(e.ev.data??{});let r=e.brief.streamMessageId,a=r!==void 0&&r.trim().length>0?r.trim():s.streamMessageId,l=b(S({},s),{text:s.text+e.brief.bodyText,streamLastSequence:e.ev.sequence??s.streamLastSequence,streamMessageId:a,streamPartData:o,rawData:{streamMerged:!0,partCount:o.length,lastChunkSequence:e.ev.sequence,chunkSnapshots:o}}),d=[...t];return d[d.length-1]=l,this.consoleMessages_$.set(d),!0}buildConsolePushParamsFromBrief(e){let t=e.brief;return t.isStreamingTextChunk===!0?{listKey:t.listKey,type:t.consoleType,text:t.bodyText,timestamp:e.timestampIso,rawData:t.rawData,mirrorEventType:t.mirrorEventType,briefSubtype:t.briefSubtype,useRawBubbleKind:t.useRawBubbleKind,streamTextRole:t.streamTextRole,streamLastSequence:e.ev.sequence,streamMessageId:t.streamMessageId,streamPartData:[e.ev.data??{}]}:{listKey:t.listKey,type:t.consoleType,text:t.bodyText,timestamp:e.timestampIso,rawData:t.rawData,mirrorEventType:t.mirrorEventType,briefSubtype:t.briefSubtype,useRawBubbleKind:t.useRawBubbleKind}}buildFoldedConsoleMessagesFromMirrorEvents(e){let t=[];for(let s of e){if(this.tryFoldToolCallMirrorEventIntoOut(t,s))continue;let o=T.buildFromMirrorEvent(s);if(o===null)continue;let r=typeof s.timestamp=="string"&&s.timestamp.length?s.timestamp:new Date().toISOString();if(o.isStreamingTextChunk===!0){let a=C.parseStreamChunkFromMirrorData(s.data??{});if(a===null)continue;let l=t.length>0?t[t.length-1]:void 0;if(l!==void 0&&C.canMergeConsoleTailWithChunk({prev:l,ev:s,parsed:a})){let d=l.streamPartData!==void 0?[...l.streamPartData]:[];d.push(s.data??{});let h=o.streamMessageId,p=h!==void 0&&h.trim().length>0?h.trim():l.streamMessageId;t[t.length-1]=b(S({},l),{text:l.text+o.bodyText,streamLastSequence:s.sequence??l.streamLastSequence,streamMessageId:p,streamPartData:d,rawData:{streamMerged:!0,partCount:d.length,lastChunkSequence:s.sequence,chunkSnapshots:d}})}else t.push(this.materializeConsoleLineFromPushParams(this.buildConsolePushParamsFromBrief({ev:s,brief:o,timestampIso:r})))}else t.push(this.materializeConsoleLineFromPushParams(this.buildConsolePushParamsFromBrief({ev:s,brief:o,timestampIso:r})))}return t}materializeConsoleLineFromPushParams(e){return{listKey:e.listKey??globalThis.crypto.randomUUID(),type:e.type,text:e.text,timestamp:e.timestamp,rawData:e.rawData,mirrorEventType:e.mirrorEventType,briefSubtype:e.briefSubtype,useRawBubbleKind:e.useRawBubbleKind,streamTextRole:e.streamTextRole,streamLastSequence:e.streamLastSequence,streamMessageId:e.streamMessageId,streamPartData:e.streamPartData,toolDisplayName:e.toolDisplayName,isToolCallFailedIndicator:e.isToolCallFailedIndicator}}applyToolCallMirrorEventToLiveConsole(e){let t=e.parsed,s=t.toolCallId,n=typeof e.ev.timestamp=="string"&&e.ev.timestamp.length?e.ev.timestamp:new Date().toISOString(),o=e.ev.data??{};if(t.sessionUpdate==="tool_call"){let r=u.listKeyStart(s);if(this.consoleMessages_$().some(h=>h.listKey===r))return!0;let l=c.toolCallDisplayName(t),d=c.buildToolCallBodyText({displayName:l,parsed:t});return this.pushConsoleMessage({listKey:r,type:"tool",text:d,timestamp:n,rawData:o,mirrorEventType:"ca-session-update",briefSubtype:"tool_call",toolDisplayName:l}),!0}if(t.sessionUpdate==="tool_call_update"&&t.status==="in_progress"){t.rawInput!==void 0&&this.patchLiveToolCallStartInput({toolCallId:s,parsed:t});let r=u.listKeyProgress(s),a="in_progress",l=this.consoleMessages_$(),d=l.findIndex(p=>p.listKey===r),h=this.materializeConsoleLineFromPushParams({listKey:r,type:"status-update",text:a,timestamp:n,rawData:o,mirrorEventType:"ca-session-update",briefSubtype:"tool_call_update"});if(d>=0){let p=[...l];p[d]=h,this.consoleMessages_$.set(p)}else this.consoleMessages_$.set([...l,h]);return!0}if(t.sessionUpdate==="tool_call_update"&&t.status==="completed"){if(u.hasRawOutputError(t.rawOutput)){let d=u.listKeyError(s);if(!this.consoleMessages_$().some(p=>p.listKey===d)){let p=u.summarizeRawOutputError(t.rawOutput);this.pushConsoleMessage({listKey:d,type:"error",text:p,timestamp:n,rawData:o,mirrorEventType:"ca-session-update",briefSubtype:"tool_call_update"}),this.patchLiveConsoleToolCallStartFailed({toolCallId:s})}return!0}let a=u.listKeyResult(s);if(!this.consoleMessages_$().some(d=>d.listKey===a)){let d=u.summarizeRawOutputSuccess(t.rawOutput);this.pushConsoleMessage({listKey:a,type:"tool-result",text:d,timestamp:n,rawData:o,mirrorEventType:"ca-session-update",briefSubtype:"tool_call_update"})}return!0}return!1}tryFoldToolCallMirrorEventIntoOut(e,t){if(t.eventType!=="ca-session-update")return!1;let s=u.tryParseMirrorData(t.data??{});if(s===null)return!1;let n=typeof t.timestamp=="string"&&t.timestamp.length?t.timestamp:new Date().toISOString(),o=t.data??{};if(s.sessionUpdate==="tool_call"){let r=u.listKeyStart(s.toolCallId);if(!e.some(l=>l.listKey===r)){let l=c.toolCallDisplayName(s),d=c.buildToolCallBodyText({displayName:l,parsed:s});e.push(this.materializeConsoleLineFromPushParams({listKey:r,type:"tool",text:d,timestamp:n,rawData:o,mirrorEventType:"ca-session-update",briefSubtype:"tool_call",toolDisplayName:l}))}return!0}if(s.sessionUpdate==="tool_call_update"&&s.status==="in_progress"){s.rawInput!==void 0&&c.patchOutArrayToolCallStartInput(e,s);let r=u.listKeyProgress(s.toolCallId),a=this.materializeConsoleLineFromPushParams({listKey:r,type:"status-update",text:"in_progress",timestamp:n,rawData:o,mirrorEventType:"ca-session-update",briefSubtype:"tool_call_update"}),l=e.findIndex(d=>d.listKey===r);return l>=0?e[l]=a:e.push(a),!0}if(s.sessionUpdate==="tool_call_update"&&s.status==="completed"){if(u.hasRawOutputError(s.rawOutput)){let d=u.listKeyError(s.toolCallId);if(!e.some(p=>p.listKey===d)){let p=u.summarizeRawOutputError(s.rawOutput);e.push(this.materializeConsoleLineFromPushParams({listKey:d,type:"error",text:p,timestamp:n,rawData:o,mirrorEventType:"ca-session-update",briefSubtype:"tool_call_update"})),c.patchOutArrayToolCallStartFailed(e,s.toolCallId)}return!0}let a=u.listKeyResult(s.toolCallId);if(!e.some(d=>d.listKey===a)){let d=u.summarizeRawOutputSuccess(s.rawOutput);e.push(this.materializeConsoleLineFromPushParams({listKey:a,type:"tool-result",text:d,timestamp:n,rawData:o,mirrorEventType:"ca-session-update",briefSubtype:"tool_call_update"}))}return!0}return!1}patchLiveToolCallStartInput(e){let t=u.listKeyStart(e.toolCallId),s=this.consoleMessages_$(),n=s.findIndex(l=>l.listKey===t);if(n<0)return;let o=s[n].toolDisplayName??"Tool call",r=c.buildToolCallBodyText({displayName:o,parsed:e.parsed}),a=[...s];a[n]=b(S({},a[n]),{text:r}),this.consoleMessages_$.set(a)}patchLiveConsoleToolCallStartFailed(e){let t=u.listKeyStart(e.toolCallId),s=this.consoleMessages_$(),n=s.findIndex(r=>r.listKey===t);if(n<0)return;let o=[...s];o[n]=b(S({},o[n]),{isToolCallFailedIndicator:!0}),this.consoleMessages_$.set(o)}static patchOutArrayToolCallStartFailed(e,t){let s=u.listKeyStart(t),n=e.findIndex(o=>o.listKey===s);n<0||(e[n]=b(S({},e[n]),{isToolCallFailedIndicator:!0}))}static patchOutArrayToolCallStartInput(e,t){let s=u.listKeyStart(t.toolCallId),n=e.findIndex(a=>a.listKey===s);if(n<0)return;let o=e[n].toolDisplayName??"Tool call",r=c.buildToolCallBodyText({displayName:o,parsed:t});e[n]=b(S({},e[n]),{text:r})}static toolCallDisplayName(e){return e.title!==void 0&&e.title.length?e.title:e.toolKind!==void 0&&e.toolKind.length?e.toolKind:"Tool call"}static buildToolCallBodyText(e){let t=[e.displayName],s=u.formatRawInput(e.parsed.rawInput);s.length&&t.push(s);let n=u.formatLocations(e.parsed.locations);return n.length&&t.push(`[locations]
6
6
  ${n}`),t.join(`
7
7
  `)}runOpenSessionPollTick(e){return f(this,null,function*(){if(!(e!==this.activeSessionId_$()||e!==this.openSessionPollTargetId))try{let t=yield this.caSession_AS.getSession(e);this.ngZone.run(()=>{e===this.activeSessionId_$()&&this.selectedSession_$.set(this.mapSessionRecord(this.toRecord(t.session)))});let s=this.lastKnownEventSequence,o=(yield this.caSession_AS.getSessionEvents({sessionId:e,sinceSequence:s>=0?s:void 0,limit:200})).events.map(r=>({sessionId:typeof r.sessionId=="string"?r.sessionId:e,eventType:typeof r.eventType=="string"?r.eventType:"",timestamp:typeof r.timestamp=="string"?r.timestamp:"",data:this.asRecord(r.data),sequence:typeof r.sequence=="number"?r.sequence:0}));if(!o.length)return;this.ngZone.run(()=>{if(e!==this.activeSessionId_$())return;let r=new Map;for(let l of this.selectedSessionEvents_$())r.set(l.sequence??0,l);for(let l of o)r.set(l.sequence??0,l);let a=[...r.values()].sort(M.compareMirrorEventsAsc);this.selectedSessionEvents_$.set(a);for(let l of o)(l.sequence??0)>s&&this.appendConsoleMirrorEventOne(l);this.lastKnownEventSequence=Math.max(s,...o.map(l=>l.sequence??0))})}catch{}})}handleSocketEvent(e){let t=e.event,s=e.payload;try{this.ngZone.run(()=>{switch(t){case"ca-session:status":this.handleStatusUpdate(s);break;case"ca-session:output":this.handleOutputChunk(s);break;case"ca-session:event":this.handleSessionEvent(s);break;case"ca-session:list-update":this.loadSessions().catch(()=>{});break;case"ext-session-msg:message":this.handleAssembledMessage(s);break;case"ext-session-msg:update":this.handleAssembledMessageUpdate(s);break;default:break}})}catch(n){v.DyFM_Log.error(`CCAP_CaSession_DS | socket error | ${t}`,n)}}handleStatusUpdate(e){let t=typeof e.sessionId=="string"?e.sessionId:"",s=typeof e.status=="string"?e.status:"",n=typeof e.statusMessage=="string"?e.statusMessage:void 0;this.lastStatusUpdate_$.set({sessionId:t,status:s,statusMessage:n});let o=this.sessions_$();this.sessions_$.set(o.map(a=>a.sessionId===t?b(S({},a),{status:s,statusMessage:n}):a));let r=this.selectedSession_$();r?.sessionId===t&&this.selectedSession_$.set(b(S({},r),{status:s,statusMessage:n})),s==="errored"&&this.globalError_CS.showError(new Error(n?`CA session error: ${n}`:"CA session errored"),"ca-session-status")}handleOutputChunk(e){let t=typeof e.sessionId=="string"?e.sessionId:"";if(t&&t!==this.activeSessionId_$())return;let s=typeof e.content=="string"?e.content:"",n=typeof e.type=="string"?e.type:"response";if(s){let o={};for(let r of Object.keys(e))o[r]=Reflect.get(e,r);this.pushConsoleMessage({type:n==="error"?"error":"assistant",text:s,rawData:o,mirrorEventType:"ca-session:output"})}}handleSessionEvent(e){let t=typeof e.sessionId=="string"?e.sessionId:"";if(t&&t!==this.activeSessionId_$())return;let s=this.asRecord(e.event),n=typeof s.sequence=="number"?s.sequence:0;if(n<=this.lastKnownEventSequence)return;this.lastKnownEventSequence=n;let o=s.timestamp,r={sessionId:t,eventType:typeof s.eventType=="string"?s.eventType:"",timestamp:typeof o=="string"&&o.length?o:new Date().toISOString(),data:this.asRecord(s.data),sequence:n},a=this.selectedSessionEvents_$();this.selectedSessionEvents_$.set([...a,r]),this.appendConsoleMirrorEventOne(r)}seedConsoleFromMirrorEvents(e){this.pendingOptimisticPrompts.length=0;let t=[...e].sort(M.compareMirrorEventsAsc);this.consoleMessages_$.set(this.buildFoldedConsoleMessagesFromMirrorEvents(t))}removePendingOptimisticPromptBubbleIfTextMatchesMirror(e){let t=this.pendingOptimisticPrompts.findIndex(o=>o.text===e||o.text.trim()===e.trim());if(t<0)return;let s=this.pendingOptimisticPrompts[t];this.pendingOptimisticPrompts.splice(t,1);let n=this.consoleMessages_$().filter(o=>o.listKey!==s.listKey);this.consoleMessages_$.set(n)}mapSessionRecord(e){return{sessionId:typeof e.sessionId=="string"?e.sessionId:void 0,acpSessionId:typeof e.acpSessionId=="string"?e.acpSessionId:void 0,label:typeof e.label=="string"?e.label:void 0,workspacePath:typeof e.workspacePath=="string"?e.workspacePath:void 0,status:typeof e.status=="string"?e.status:void 0,statusMessage:typeof e.statusMessage=="string"?e.statusMessage:void 0,promptCount:typeof e.promptCount=="number"?e.promptCount:void 0,lastPrompt:typeof e.lastPrompt=="string"?e.lastPrompt:void 0,lastActivityAt:typeof e.lastActivityAt=="string"?e.lastActivityAt:void 0,isArchived:e.isArchived===!0,parentSessionId:typeof e.parentSessionId=="string"?e.parentSessionId:void 0,lastSyncAt:typeof e.lastSyncAt=="string"?e.lastSyncAt:void 0,lastSyncError:typeof e.lastSyncError=="string"?e.lastSyncError:void 0,agentInfoName:typeof e.agentInfoName=="string"?e.agentInfoName:void 0,agentInfoVersion:typeof e.agentInfoVersion=="string"?e.agentInfoVersion:void 0,isAcpConnected:typeof e.isAcpConnected=="boolean"?e.isAcpConnected:void 0,loadSessionSupported:typeof e.loadSessionSupported=="boolean"?e.loadSessionSupported:void 0,isTerminalMode:typeof e.isTerminalMode=="boolean"?e.isTerminalMode:void 0,isTerminalRunnerConnected:typeof e.isTerminalRunnerConnected=="boolean"?e.isTerminalRunnerConnected:void 0}}asRecord(e){return this.toRecord(e)}toRecord(e){if(e!==null&&typeof e=="object"&&!Array.isArray(e)){let t={};for(let s of Object.keys(e))t[s]=Reflect.get(e,s);return t}return{}}loadAssembledMessages(e){return f(this,null,function*(){try{let t=yield this.extSessionMsg_AS.getMessages({sessionId:e.sessionId,latest:!0});this.assembledMessages_$.set(t.messages),this.assembledMessagesHasMore_$.set(t.hasMore===!0)}catch(t){v.DyFM_Log.error(`CCAP_CaSession_DS | loadAssembledMessages failed | sessionId: ${e.sessionId}`,t)}})}loadOlderAssembledMessages(e){return f(this,null,function*(){if(this.isLoadingOlderMessages_$()||!this.assembledMessagesHasMore_$())return;let t=this.assembledMessages_$();if(!t.length)return;let s=t.reduce((n,o)=>(o.sequence??0)<n?o.sequence??0:n,t[0].sequence??0);this.isLoadingOlderMessages_$.set(!0);try{let n=yield this.extSessionMsg_AS.getMessages({sessionId:e.sessionId,beforeSequence:s,limit:e.limit??50});n.messages.length&&this.assembledMessages_$.set([...n.messages,...t]),this.assembledMessagesHasMore_$.set(n.hasMore===!0)}catch(n){v.DyFM_Log.error(`CCAP_CaSession_DS | loadOlderAssembledMessages failed | sessionId: ${e.sessionId}`,n)}finally{this.isLoadingOlderMessages_$.set(!1)}})}handleAssembledMessage(e){let t=typeof e.sessionId=="string"?e.sessionId:"";if(!t||t!==this.activeSessionId_$())return;let s=e.message;if(!s||typeof s!="object")return;let n=s,o=this.assembledMessages_$();this.assembledMessages_$.set([...o,n])}handleAssembledMessageUpdate(e){let t=typeof e.sessionId=="string"?e.sessionId:"";if(!t||t!==this.activeSessionId_$())return;let s=typeof e.messageKey=="string"?e.messageKey:"";if(!s)return;let n=e.update;if(!n||typeof n!="object")return;let o=n,r=this.assembledMessages_$(),a=r.findIndex(h=>h.messageKey===s);if(a<0)return;let l=S({},r[a]);typeof o.bodyText=="string"&&(l.bodyText=o.bodyText),o.toolResult!==void 0&&(l.toolResult=o.toolResult),typeof o.toolStatus=="string"&&(l.toolStatus=o.toolStatus),o.headerStatusDot!==void 0&&(l.headerStatusDot=typeof o.headerStatusDot=="string"?o.headerStatusDot:void 0);let d=[...r];d[a]=l,this.assembledMessages_$.set(d)}static \u0275fac=function(t){return new(t||c)};static \u0275prov=E({token:c,factory:c.\u0275fac,providedIn:"root"})}return c})();export{M as a,C as b,x as c,u as d,fe as e};
8
- //# sourceMappingURL=chunk-ZP6XVN6M.js.map
8
+ //# sourceMappingURL=chunk-PW6V6TT5.js.map
@@ -1,2 +1,2 @@
1
- import{a as p}from"./chunk-BTJ3PLVS.js";import{p as m}from"./chunk-7575R2YP.js";import{G as i,h as s}from"./chunk-TBMJSIBB.js";var l=(()=>{class r{transform(n){return p.getDurationBand(n)}static \u0275fac=function(t){return new(t||r)};static \u0275pipe=i({name:"ccapDurationBand",type:r,pure:!0,standalone:!0})}return r})();var f=s(m()),a=f.second,u=60*a,c=60*u,o=class{static formatGenerationTimeMs(e){if(e==null||typeof e!="number"||Number.isNaN(e))return"\u2013";if(e<a)return`${Math.round(e)} ms`;if(e<u){let t=e/a;return t>=10||t%1===0?`${Math.round(t)} s`:`${t.toFixed(1)} s`}if(e<c){let t=e/u;return t>=10||t%1===0?`${Math.round(t)} min`:`${t.toFixed(1)} min`}let n=e/c;return n>=10||n%1===0?`${Math.round(n)} h`:`${n.toFixed(1)} h`}};var $=(()=>{class r{transform(n){return o.formatGenerationTimeMs(n)}static \u0275fac=function(t){return new(t||r)};static \u0275pipe=i({name:"ccapGenerationTime",type:r,pure:!0,standalone:!0})}return r})();export{l as a,$ as b};
2
- //# sourceMappingURL=chunk-USGT3QKB.js.map
1
+ import{a as p}from"./chunk-XORHZRDK.js";import{p as m}from"./chunk-QO6PPMHC.js";import{G as i,h as s}from"./chunk-TBMJSIBB.js";var l=(()=>{class r{transform(n){return p.getDurationBand(n)}static \u0275fac=function(t){return new(t||r)};static \u0275pipe=i({name:"ccapDurationBand",type:r,pure:!0,standalone:!0})}return r})();var f=s(m()),a=f.second,u=60*a,c=60*u,o=class{static formatGenerationTimeMs(e){if(e==null||typeof e!="number"||Number.isNaN(e))return"\u2013";if(e<a)return`${Math.round(e)} ms`;if(e<u){let t=e/a;return t>=10||t%1===0?`${Math.round(t)} s`:`${t.toFixed(1)} s`}if(e<c){let t=e/u;return t>=10||t%1===0?`${Math.round(t)} min`:`${t.toFixed(1)} min`}let n=e/c;return n>=10||n%1===0?`${Math.round(n)} h`:`${n.toFixed(1)} h`}};var $=(()=>{class r{transform(n){return o.formatGenerationTimeMs(n)}static \u0275fac=function(t){return new(t||r)};static \u0275pipe=i({name:"ccapGenerationTime",type:r,pure:!0,standalone:!0})}return r})();export{l as a,$ as b};
2
+ //# sourceMappingURL=chunk-QFTQ4E2R.js.map
@@ -208,5 +208,5 @@ stackLocation: ${this.stackLocation}
208
208
  DynamoPoll: "${this.name}" pollDo was UNSUCCESSFUL`,error:r})})})),this.running=!0}catch(r){throw new ru.DyFM_Error({message:`DYNAMO ERROR:
209
209
  DynamoPoll: startPoll was UNSUCCESSFUL`,error:r})}})}restartPoll(e){try{e?this.startPoll(e):this.startPoll(this.args)}catch(r){throw new ru.DyFM_Error({message:`DYNAMO ERROR:
210
210
  DynamoPoll: restartPoll was UNSUCCESSFUL`,error:r})}}stop(){this.poll.unsubscribe(),this.running=!1}end(e){this.poll.unsubscribe(),this.pollEnd?.(e),this.running=!1}};tu.DyFM_Poll=Jc});var ly=f(nu=>{"use strict";Object.defineProperty(nu,"__esModule",{value:!0});nu.DyFM_RangeValue=void 0;var Gc=class t{isRange=!0;from;to;constructor(e,r){if(e?.isRange){this.from=e.from,this.to=e.to;return}else this.from=e,this.to=r??e}constructed(){return!0}newValues(e){this.from=e.from,this.to=e.to}addRange(e){this.from+=e.from,this.to+=e.to}subtractRange(e){this.from-=e.from,this.to-=e.to}multiplyRange(e){this.from*=e.from,this.to*=e.to}divideRange(e){this.from/=e.from,this.to/=e.to}add(e){this.from+=e,this.to+=e}subtract(e){this.from-=e,this.to-=e}multiply(e){this.from*=e,this.to*=e}divide(e){this.from/=e,this.to/=e}clone(){return new t(this.from,this.to)}applyTransform(e){return new t(e(this.from),e(this.to))}toString=this.stringify;stringify(e=!0,r=!0){return r&&this.from===this.to?`${this.from}`:e?`${this.from} - ${this.to}`:`${this.from}-${this.to}`}static reType(e){return new t(e.from,e.to)}static addRange(e,r){return new t(e.from+r.from,e.to+r.to)}static subtractRange(e,r){return new t(e.from-r.from,e.to-r.to)}static multiplyRange(e,r){return new t(e.from*r.from,e.to*r.to)}static divideRange(e,r){return new t(e.from/r.from,e.to/r.to)}static add(e,r){return new t(e.from+r,e.to+r)}static subtract(e,r){return new t(e.from-r,e.to-r)}static multiply(e,r){return new t(e.from*r,e.to*r)}static divide(e,r){return new t(e.from/r,e.to/r)}static isInRange(e,r){return r.from<=e&&e<=r.to}};nu.DyFM_RangeValue=Gc});var fy=f(Ot=>{"use strict";Object.defineProperty(Ot,"__esModule",{value:!0});Ot.DyFM_serverStatus_dataParams=Ot.DyFM_ServerStatus=void 0;var Uk=iu(),Tk=kr(),Hc=class extends Tk.DyFM_Metadata{status;systemName;systemShortCode;clientVersionOk;latestClientVersion;latestClientVersionNumeric;serverVersion;serverNumericVersion;uptime;serverMessage;memoryUsage;cpuUsage;serverConnections;constructor(e){super(e),e&&Object.assign(this,e)}};Ot.DyFM_ServerStatus=Hc;Ot.DyFM_serverStatus_dataParams=new Uk.DyFM_DataModel_Params({dataName:"server_status",properties:{status:{type:"string"},systemName:{type:"string"},systemShortCode:{type:"string"},clientVersionOk:{type:"boolean"},latestClientVersion:{type:"string"},latestClientVersionNumeric:{type:"number"},serverVersion:{type:"string"},serverNumericVersion:{type:"number"},uptime:{type:"number"},serverMessage:{type:"string"},memoryUsage:{type:"object"},cpuUsage:{type:"object"},serverConnections:{type:"object"}}})});var vy=f(ur=>{"use strict";Object.defineProperty(ur,"__esModule",{value:!0});ur.DyFM_API_Input_Type=ur.DyFM_ServerRoute_SettingsBase=ur.DyFM_Endpoint_SettingsBase=void 0;var Wk=Fr(),ou=class{name;type;endpoint;pathParamKeys=[];constructor(e){if(!e.endpoint)throw new Error(`endpoint not setted up for this endpoint (${e.name??(0,Wk.DyFM_getConstructionStackLocation)()})`);e.endpoint.includes("{")&&(console.warn(`using {param} brackets in endpoint definitions will be deprecated...
211
- use :param instead ({pathParam} --> :pathParam) (${e.name})`),e.endpoint=e.endpoint.replace(/{/g,":").replace(/}/g,"")),Object.assign(this,e),this.pathParamKeys=this.endpoint.split("/").filter(r=>r.startsWith(":")).map(r=>r.replace(":",""))}};ur.DyFM_Endpoint_SettingsBase=ou;var Zc=class extends ou{preProcesses;tasks;simpleTask;constructor(e){super(e),Object.assign(this,e)}};ur.DyFM_ServerRoute_SettingsBase=Zc;var dy=function(t){return t.body="body",t.queryParams="queryParams",t}(dy||(ur.DyFM_API_Input_Type=dy={}))});var hy=f(xe=>{"use strict";Object.defineProperty(xe,"__esModule",{value:!0});xe.DyFM_errors_dataParams=xe.DyFM_Errors=xe.DyFM_errorsFlag=void 0;var Bk=Ds(),Vk=kr();xe.DyFM_errorsFlag="DyFM-ERRORS-OBJECT";var Kc=class extends Vk.DyFM_Metadata{flag=xe.DyFM_errorsFlag;source;issuer;username;versions=[];localTime;region;message;exception;exceptionObj;stackTrace=[];error;count=1;d_error;additionalContent;level;priority;duplications=[];constructor(e){super(e),e&&Object.assign(this,e)}};xe.DyFM_Errors=Kc;xe.DyFM_errors_dataParams=new Bk.DyFM_DataModel_Params({dataName:"errors",properties:{flag:{type:"string"},issuer:{type:"string"},username:{type:"string"},versions:{type:"string[]"},localTime:{type:"string"},region:{type:"string"},message:{type:"string"},exception:{type:"string"},exceptionObj:{type:"any"},stackTrace:{type:"string[]"},error:{type:"any"},count:{type:"number"},d_error:{type:"DyFM_Error"},additionalContent:{type:"any"},level:{type:"DyFM_ErrorLevel"},priority:{type:"number"},duplications:{type:"DyNTS_Error[]"}}})});var yy=f(py=>{"use strict";Object.defineProperty(py,"__esModule",{value:!0})});var my=f(_y=>{"use strict";Object.defineProperty(_y,"__esModule",{value:!0})});var gy=f(by=>{"use strict";Object.defineProperty(by,"__esModule",{value:!0})});var Sy=f(Oy=>{"use strict";Object.defineProperty(Oy,"__esModule",{value:!0})});var qy=f(wy=>{"use strict";Object.defineProperty(wy,"__esModule",{value:!0})});var jy=f(My=>{"use strict";Object.defineProperty(My,"__esModule",{value:!0})});var Ay=f(Py=>{"use strict";Object.defineProperty(Py,"__esModule",{value:!0})});var Ey=f(Fy=>{"use strict";Object.defineProperty(Fy,"__esModule",{value:!0})});var Dy=f(xy=>{"use strict";Object.defineProperty(xy,"__esModule",{value:!0})});var Iy=f(ky=>{"use strict";Object.defineProperty(ky,"__esModule",{value:!0})});var Cy=f(Ly=>{"use strict";Object.defineProperty(Ly,"__esModule",{value:!0})});var Ny=f(Ry=>{"use strict";Object.defineProperty(Ry,"__esModule",{value:!0})});var Uy=f($y=>{"use strict";Object.defineProperty($y,"__esModule",{value:!0})});var Wy=f(au=>{"use strict";Object.defineProperty(au,"__esModule",{value:!0});au.DyFM_SpecialSearch_Type=void 0;var Ty=function(t){return t.stringListSearchAny="stringListSearchAny",t.stringListSearch="stringListSearch",t.stringListSearchOrdered="stringListSearchOrdered",t}(Ty||(au.DyFM_SpecialSearch_Type=Ty={}))});var Vy=f(By=>{"use strict";Object.defineProperty(By,"__esModule",{value:!0})});var iu=f(O=>{"use strict";Object.defineProperty(O,"__esModule",{value:!0});var S=(hu(),tl(vu));S.__exportStar(pu(),O);S.__exportStar(yu(),O);S.__exportStar(Al(),O);S.__exportStar(Fl(),O);S.__exportStar(wt(),O);S.__exportStar(El(),O);S.__exportStar(Fu(),O);S.__exportStar(Il(),O);S.__exportStar(Du(),O);S.__exportStar(he(),O);S.__exportStar(Ll(),O);S.__exportStar(bn(),O);S.__exportStar(Fr(),O);S.__exportStar(Ru(),O);S.__exportStar(Lu(),O);S.__exportStar(ju(),O);S.__exportStar(Cl(),O);S.__exportStar(Uu(),O);S.__exportStar(vf(),O);S.__exportStar(pf(),O);S.__exportStar(Mt(),O);S.__exportStar(yf(),O);S.__exportStar(ds(),O);S.__exportStar(hs(),O);S.__exportStar(_f(),O);S.__exportStar(mf(),O);S.__exportStar(bf(),O);S.__exportStar(jt(),O);S.__exportStar(ms(),O);S.__exportStar(gf(),O);S.__exportStar(gs(),O);S.__exportStar(qt(),O);S.__exportStar(wf(),O);S.__exportStar(jf(),O);S.__exportStar(Af(),O);S.__exportStar(Ef(),O);S.__exportStar(Ou(),O);S.__exportStar(gu(),O);S.__exportStar(Su(),O);S.__exportStar(Ds(),O);S.__exportStar(ws(),O);S.__exportStar(Bn(),O);S.__exportStar(cy(),O);S.__exportStar(ly(),O);S.__exportStar(fy(),O);S.__exportStar(vy(),O);S.__exportStar(Fs(),O);S.__exportStar(Ms(),O);S.__exportStar(Ps(),O);S.__exportStar(hy(),O);S.__exportStar(kr(),O);S.__exportStar(yy(),O);S.__exportStar(my(),O);S.__exportStar(gy(),O);S.__exportStar(Sy(),O);S.__exportStar(qy(),O);S.__exportStar(jy(),O);S.__exportStar(Ay(),O);S.__exportStar(Ey(),O);S.__exportStar(Dy(),O);S.__exportStar(Iy(),O);S.__exportStar(Cy(),O);S.__exportStar(Ny(),O);S.__exportStar(Uy(),O);S.__exportStar(Wy(),O);S.__exportStar(Vy(),O)});var zy="1.1.3484";var Yy={baseUrl:"MISSING",api:{baseUrl:"MISSING"},production:!1,version:zy};var zk=function(t){return t.openAi="open-ai",t.anthropic="anthropic",t.google="google",t.deepseek="deepseek",t.fdpAi="fdp-ai",t.customLocalAi="custom-local-ai",t}(zk||{});var Yk=function(t){return t.openAi="open-ai",t.localAi="local-ai",t.routing="routing",t}(Yk||{});var Jk=function(t){return t.discord="discord",t.signal="signal",t.teams="teams",t.routing="routing",t}(Jk||{});var uu=function(t){return t.vaultKey="vault-key",t.instanceRegistry="instance-registry",t.general="general",t.llmProviders="llm-providers",t.messageProviders="message-providers",t.modelTesting="model-testing",t.discordAccess="discord-access",t.voice="voice",t.visuals="visuals",t.soul="soul",t.mcp="mcp",t.cliTools="cli-tools",t.secretVault="secret-vault",t.agentEmail="agent-email",t.embedding="embedding",t.rag="rag",t.developer="developer",t.agentRuntime="agent-runtime",t.agentCronJobs="agent-cron-jobs",t.scheduler="scheduler",t.github="github",t.openclawRegistry="openclaw-registry",t.deviceIdentity="device-identity",t.consultant="consultant",t.caAgent="ca-agent",t.darkOfficeLayout="dark-office-layout",t.cluster="cluster",t}(uu||{});var Gk=function(t){return t.openAi="open-ai",t.leonardo="leonardo",t.fdpai="fdpai",t.routing="routing",t}(Gk||{});var Hk=function(t){return t.elevenLabs="elevenlabs",t.fdpai="fdpai",t.routing="routing",t}(Hk||{});var Zk=function(t){return t.pending="pending",t.running="running",t.completed="completed",t.failed="failed",t}(Zk||{});var Kk=function(t){return t.apiKey="api-key",t.credentials="credentials",t}(Kk||{});var Qk=function(t){return t.req="req",t.bug="bug",t.feature="feature",t.improvement="improvement",t.task="task",t.question="question",t.research="research",t}(Qk||{});var Xk=function(t){return t.low="low",t.medium="medium",t.high="high",t.urgent="urgent",t}(Xk||{});var eI=function(t){return t.todo="todo",t.backlog="backlog",t.bugs="bugs",t.changelog="changelog",t.userInput="user-input",t.status="status",t.testErrorReports="test-error-reports",t}(eI||{});var rI=function(t){return t.update="update",t.remove="remove",t}(rI||{});var tI=function(t){return t.e2e="e2e",t.serverUnit="server-unit",t.clientUnit="client-unit",t.cli="cli",t}(tI||{});var nI=function(t){return t.instant="instant",t.agenticAny="agentic-any",t.ask="ask",t.plan="plan",t}(nI||{});var iI=function(t){return t.full="full",t.askOnly="ask-only",t.planOnly="plan-only",t}(iI||{});var oI=function(t){return t.draft="draft",t.promotedUserInput="promoted-user-input",t.promotedBug="promoted-bug",t.discarded="discarded",t}(oI||{});var aI=function(t){return t.userInput="user-input",t.bugReport="bug-report",t.unspecified="unspecified",t}(aI||{});var uI=function(t){return t.easy="easy",t.medium="medium",t.hard="hard",t.komplex="komplex",t}(uI||{});var Qc="mongodb://200.33.0.101:29017";var sI="A k\xE9r\xE9s nem jutott el a szerverig, vagy nem \xE9rkezett v\xE1lasz. Lehets\xE9ges okok: a szerver nem fut vagy m\xE1s porton hallgat, h\xE1l\xF3zati hiba, a kliens megszak\xEDtotta a k\xE9r\xE9st, vagy m\xE1s origin eset\xE9n CORS blokkolja. Ellen\u0151rizd, hogy a szerver fut-e \xE9s a megadott c\xEDm/port helyes.",cI="Szerver 500-as hiba. A v\xE1lasz body \xFCres vagy nem el\xE9rhet\u0151.",su=class t{static isLikelyHtmlErrorPage(e){let r=e.trim();if(!r.startsWith("<"))return!1;let n=r.toLowerCase();return n.includes("<!doctype")||n.includes("<html")||n.includes("<title>")||n.includes("cannot get")||n.includes("cannot post")||n.includes("cannot put")||n.includes("cannot delete")}static getMessageForHtmlHttpErrorBody(e){let r="R\xE9szletek: szerver log vagy DevTools Network tab.";return e===404?`Az endpoint nem tal\xE1lhat\xF3 (HTTP ${e}). Ellen\u0151rizd az API base URL-t \xE9s a szerver route-okat. `+r:`A szerver HTML error oldalt adott vissza (nem JSON API v\xE1lasz), HTTP ${e}. ${r}`}static getHttpErrorMessage(e,r){if(e.status===0)return sI;let n=r!=null&&typeof r=="string"&&r.trim().length>0?r:null;return n==null&&typeof e.error=="string"&&e.error.trim().length>0&&(n=e.error),n!=null&&t.isLikelyHtmlErrorPage(n)?t.getMessageForHtmlHttpErrorBody(e.status):e.status===500&&!(n!=null&&typeof n=="string"&&n.trim().length>0)?cI:n??e.message??e.statusText??`HTTP ${e.status}`}};var Jy=(()=>{class t{settingsBaseUrl=`${Yy.api.baseUrl}/settings`;http=en(ol);getDefaultWorkspace(){return R(this.http.get(`${this.settingsBaseUrl}/default-workspace`))}getSection(r){return R(this.http.get(`${this.settingsBaseUrl}/get-section/${r}`))}getRequiredWarningsSummary(){return R(this.http.get(`${this.settingsBaseUrl}/required-warnings-summary`))}saveSection(r,n){return R(this.http.patch(`${this.settingsBaseUrl}/save-section/${r}`,n))}postProviderAccessAllow(r){return R(this.http.post(`${this.settingsBaseUrl}/provider-access/allow`,r))}getSoulStatus(){return R(this.http.get(`${this.settingsBaseUrl}/soul-status`))}getSoulContent(){return R(this.http.get(`${this.settingsBaseUrl}/soul-content`))}postGenerateSoul(r){return R(this.http.post(`${this.settingsBaseUrl}/generate-soul`,r))}postTestLlmProvider(r){return R(this.http.post(`${this.settingsBaseUrl}/test-llm-provider`,r))}postListLlmModels(r){return R(this.http.post(`${this.settingsBaseUrl}/list-llm-models`,r))}postListEmbeddingModels(r){return R(this.http.post(`${this.settingsBaseUrl}/list-embedding-models`,r))}postTestMessagingProvider(r){return R(this.http.post(`${this.settingsBaseUrl}/test-messaging-provider`,r))}postMcpSync(r){return R(this.http.post(`${this.settingsBaseUrl}/mcp-sync`,r))}postCliHelpProbe(r){return R(this.http.post(`${this.settingsBaseUrl}/cli-help-probe`,r))}postCliHelpSuggest(r){return R(this.http.post(`${this.settingsBaseUrl}/cli-help-suggest`,r))}postTestAgentEmail(){return R(this.http.post(`${this.settingsBaseUrl}/test-agent-email`,{}))}testOpenclawConnection(r){return R(this.http.post(`${this.settingsBaseUrl}/test-openclaw-connection`,r))}pairOpenclawInstance(r){return R(this.http.post(`${this.settingsBaseUrl}/openclaw-registry/${r.instanceId}/pair`,{}))}getClusterDiagnostics(){return R(this.http.get(`${this.settingsBaseUrl}/cluster/diagnostics`))}postClusterReBootstrap(){return R(this.http.post(`${this.settingsBaseUrl}/cluster/re-bootstrap`,{}))}postClusterReconnectWs(){return R(this.http.post(`${this.settingsBaseUrl}/cluster/reconnect-ws`,{}))}postClusterReconnectPeer(r){let n=encodeURIComponent(r);return R(this.http.post(`${this.settingsBaseUrl}/cluster/reconnect-ws/${n}`,{}))}static \u0275fac=function(n){return new(n||t)};static \u0275prov=Xt({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();var Gy=rl(iu());var Xc=rl(iu());var cu=class{_master;get master(){return this._master}setupMaster(e){this._master=e}};var lu=class t extends cu{settings_AS=en(Jy);loading_$=ke(!1);loadError_$=ke(null);saving_$=ke(!1);saveError_$=ke(null);load(){return U(this,null,function*(){this.loading_$.set(!0),this.loadError_$.set(null);try{yield this.doLoad()}catch(e){Xc.DyFM_Error.logSimple(`${this.constructor.name} | Failed to load section`,e);let r=t.getErrorMessage(e);this.loadError_$.set(r)}finally{this.loading_$.set(!1)}})}save(){return U(this,null,function*(){this.saving_$.set(!0),this.saveError_$.set(null);try{let e=this.buildSaveBody(),r=yield this.doSave(e);return r.success?yield this.load():this.saveError_$.set(r.error??"Ment\xE9s sikertelen."),r}catch(e){Xc.DyFM_Error.logSimple(`${this.constructor.name} | Failed to save section`,e);let r=t.getErrorMessage(e);return this.saveError_$.set(r),{success:!1,error:r}}finally{this.saving_$.set(!1)}})}doSave(e){return U(this,null,function*(){return this.settings_AS.saveSection(this.getSectionId(),e)})}static getErrorMessage(e){if(e instanceof il){let r=e.error,n=null;if(r!==null&&typeof r=="object"){let i=r;typeof i.error=="string"?n=i.error:i.error!=null?n=String(i.error):typeof i.message=="string"&&(n=i.message);let o=i.errorCode,a=typeof o=="string"&&o.trim().length>0?o.trim():void 0;a!==void 0&&(n!=null&&n.trim().length>0?n=`${a}: ${n}`:n=a)}else typeof r=="string"&&(n=r);return su.getHttpErrorMessage(e,n)}return e instanceof Error?e.message||"M\u0171velet sikertelen.":String(e)||"M\u0171velet sikertelen."}};var X4=(()=>{class t extends lu{defaultWorkspacePath_$=ke("");section_$=ke({form:{mongodbUri:Qc,useOpenClawPath:!1,defaultPathOverride:"",autoStartWithSystem:!1,useLiveContext:!0,reportSocketConnectionErrorsToErrorList:!1,agenticLoopDebriefEnabled:!1,mobileAutoUpdateEnabled:!1,serverAutoUpdateEnabled:!1,serverAutoUpdateCheckInterval:"daily",ccSessionRunnerGracePeriodSec:null,ccSessionRunnerIdleTimeoutSec:null,ccSessionAutoArchiveScanIntervalSec:null,ccSessionAutoArchiveAgeDays:null,ccSessionAutoArchiveCountThreshold:null},runtime:{}});updateForm(r){this.section_$.update(n=>Sr(oe({},n),{form:oe(oe({},n.form),r)}))}setSection(r){this.section_$.set(r)}updateGeneralForm(r){this.updateForm(r),this.master?.bumpDigest()}getSectionId(){return uu.general}getSection_$(){return this.section_$}loadDefaultWorkspacePath(){return U(this,null,function*(){try{let r=yield this.settings_AS.getDefaultWorkspace();this.defaultWorkspacePath_$.set(r.workspacePath?.trim()??"")}catch(r){Gy.DyFM_Error.logSimple("CCAP_SettingsGeneral_DS | loadDefaultWorkspacePath failed",r),this.defaultWorkspacePath_$.set("")}})}doLoad(){return U(this,null,function*(){let r=yield this.settings_AS.getSection(uu.general);this.setSection({form:{mongodbUri:typeof r.mongodbUri=="string"?r.mongodbUri:Qc,useOpenClawPath:typeof r.useOpenClawPath=="boolean"?r.useOpenClawPath:!1,defaultPathOverride:typeof r.defaultPathOverride=="string"?r.defaultPathOverride:"",autoStartWithSystem:typeof r.autoStartWithSystem=="boolean"?r.autoStartWithSystem:!1,useLiveContext:typeof r.useLiveContext=="boolean"?r.useLiveContext:!0,reportSocketConnectionErrorsToErrorList:typeof r.reportSocketConnectionErrorsToErrorList=="boolean"?r.reportSocketConnectionErrorsToErrorList:!1,agenticLoopDebriefEnabled:typeof r.agenticLoopDebriefEnabled=="boolean"?r.agenticLoopDebriefEnabled:!1,mobileAutoUpdateEnabled:typeof r.mobileAutoUpdateEnabled=="boolean"?r.mobileAutoUpdateEnabled:!1,serverAutoUpdateEnabled:typeof r.serverAutoUpdateEnabled=="boolean"?r.serverAutoUpdateEnabled:!1,serverAutoUpdateCheckInterval:r.serverAutoUpdateCheckInterval==="daily"?"daily":r.serverAutoUpdateCheckInterval==="weekly"?"weekly":"daily",ccSessionRunnerGracePeriodSec:typeof r.ccSessionRunnerGracePeriodSec=="number"&&r.ccSessionRunnerGracePeriodSec>0?r.ccSessionRunnerGracePeriodSec:null,ccSessionRunnerIdleTimeoutSec:typeof r.ccSessionRunnerIdleTimeoutSec=="number"&&r.ccSessionRunnerIdleTimeoutSec>0?r.ccSessionRunnerIdleTimeoutSec:null,ccSessionAutoArchiveScanIntervalSec:typeof r.ccSessionAutoArchiveScanIntervalSec=="number"&&r.ccSessionAutoArchiveScanIntervalSec>0?r.ccSessionAutoArchiveScanIntervalSec:null,ccSessionAutoArchiveAgeDays:typeof r.ccSessionAutoArchiveAgeDays=="number"&&r.ccSessionAutoArchiveAgeDays>0?r.ccSessionAutoArchiveAgeDays:null,ccSessionAutoArchiveCountThreshold:typeof r.ccSessionAutoArchiveCountThreshold=="number"&&r.ccSessionAutoArchiveCountThreshold>0?r.ccSessionAutoArchiveCountThreshold:null},runtime:{}})})}buildSaveBody(){let r=this.section_$().form;return{mongodbUri:r.mongodbUri,useOpenClawPath:r.useOpenClawPath,defaultPathOverride:r.defaultPathOverride,autoStartWithSystem:r.autoStartWithSystem,useLiveContext:r.useLiveContext,reportSocketConnectionErrorsToErrorList:r.reportSocketConnectionErrorsToErrorList,agenticLoopDebriefEnabled:r.agenticLoopDebriefEnabled,mobileAutoUpdateEnabled:r.mobileAutoUpdateEnabled,serverAutoUpdateEnabled:r.serverAutoUpdateEnabled,serverAutoUpdateCheckInterval:r.serverAutoUpdateCheckInterval,ccSessionRunnerGracePeriodSec:r.ccSessionRunnerGracePeriodSec??void 0,ccSessionRunnerIdleTimeoutSec:r.ccSessionRunnerIdleTimeoutSec??void 0,ccSessionAutoArchiveScanIntervalSec:r.ccSessionAutoArchiveScanIntervalSec??void 0,ccSessionAutoArchiveAgeDays:r.ccSessionAutoArchiveAgeDays??void 0,ccSessionAutoArchiveCountThreshold:r.ccSessionAutoArchiveCountThreshold??void 0}}static \u0275fac=(()=>{let r;return function(i){return(r||(r=nl(t)))(i||t)}})();static \u0275prov=Xt({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();export{vu as a,hu as b,Al as c,wt as d,he as e,El as f,Fu as g,bn as h,Fr as i,ds as j,kr as k,Bn as l,Ds as m,uy as n,ly as o,iu as p,zk as q,Yk as r,Jk as s,uu as t,Gk as u,Hk as v,Zk as w,Kk as x,Qk as y,oI as z,aI as A,uI as B,Xk as C,eI as D,rI as E,tI as F,nI as G,iI as H,Yy as I,Qc as J,su as K,Jy as L,lu as M,X4 as N};
212
- //# sourceMappingURL=chunk-7575R2YP.js.map
211
+ use :param instead ({pathParam} --> :pathParam) (${e.name})`),e.endpoint=e.endpoint.replace(/{/g,":").replace(/}/g,"")),Object.assign(this,e),this.pathParamKeys=this.endpoint.split("/").filter(r=>r.startsWith(":")).map(r=>r.replace(":",""))}};ur.DyFM_Endpoint_SettingsBase=ou;var Zc=class extends ou{preProcesses;tasks;simpleTask;constructor(e){super(e),Object.assign(this,e)}};ur.DyFM_ServerRoute_SettingsBase=Zc;var dy=function(t){return t.body="body",t.queryParams="queryParams",t}(dy||(ur.DyFM_API_Input_Type=dy={}))});var hy=f(xe=>{"use strict";Object.defineProperty(xe,"__esModule",{value:!0});xe.DyFM_errors_dataParams=xe.DyFM_Errors=xe.DyFM_errorsFlag=void 0;var Bk=Ds(),Vk=kr();xe.DyFM_errorsFlag="DyFM-ERRORS-OBJECT";var Kc=class extends Vk.DyFM_Metadata{flag=xe.DyFM_errorsFlag;source;issuer;username;versions=[];localTime;region;message;exception;exceptionObj;stackTrace=[];error;count=1;d_error;additionalContent;level;priority;duplications=[];constructor(e){super(e),e&&Object.assign(this,e)}};xe.DyFM_Errors=Kc;xe.DyFM_errors_dataParams=new Bk.DyFM_DataModel_Params({dataName:"errors",properties:{flag:{type:"string"},issuer:{type:"string"},username:{type:"string"},versions:{type:"string[]"},localTime:{type:"string"},region:{type:"string"},message:{type:"string"},exception:{type:"string"},exceptionObj:{type:"any"},stackTrace:{type:"string[]"},error:{type:"any"},count:{type:"number"},d_error:{type:"DyFM_Error"},additionalContent:{type:"any"},level:{type:"DyFM_ErrorLevel"},priority:{type:"number"},duplications:{type:"DyNTS_Error[]"}}})});var yy=f(py=>{"use strict";Object.defineProperty(py,"__esModule",{value:!0})});var my=f(_y=>{"use strict";Object.defineProperty(_y,"__esModule",{value:!0})});var gy=f(by=>{"use strict";Object.defineProperty(by,"__esModule",{value:!0})});var Sy=f(Oy=>{"use strict";Object.defineProperty(Oy,"__esModule",{value:!0})});var qy=f(wy=>{"use strict";Object.defineProperty(wy,"__esModule",{value:!0})});var jy=f(My=>{"use strict";Object.defineProperty(My,"__esModule",{value:!0})});var Ay=f(Py=>{"use strict";Object.defineProperty(Py,"__esModule",{value:!0})});var Ey=f(Fy=>{"use strict";Object.defineProperty(Fy,"__esModule",{value:!0})});var Dy=f(xy=>{"use strict";Object.defineProperty(xy,"__esModule",{value:!0})});var Iy=f(ky=>{"use strict";Object.defineProperty(ky,"__esModule",{value:!0})});var Cy=f(Ly=>{"use strict";Object.defineProperty(Ly,"__esModule",{value:!0})});var Ny=f(Ry=>{"use strict";Object.defineProperty(Ry,"__esModule",{value:!0})});var Uy=f($y=>{"use strict";Object.defineProperty($y,"__esModule",{value:!0})});var Wy=f(au=>{"use strict";Object.defineProperty(au,"__esModule",{value:!0});au.DyFM_SpecialSearch_Type=void 0;var Ty=function(t){return t.stringListSearchAny="stringListSearchAny",t.stringListSearch="stringListSearch",t.stringListSearchOrdered="stringListSearchOrdered",t}(Ty||(au.DyFM_SpecialSearch_Type=Ty={}))});var Vy=f(By=>{"use strict";Object.defineProperty(By,"__esModule",{value:!0})});var iu=f(O=>{"use strict";Object.defineProperty(O,"__esModule",{value:!0});var S=(hu(),tl(vu));S.__exportStar(pu(),O);S.__exportStar(yu(),O);S.__exportStar(Al(),O);S.__exportStar(Fl(),O);S.__exportStar(wt(),O);S.__exportStar(El(),O);S.__exportStar(Fu(),O);S.__exportStar(Il(),O);S.__exportStar(Du(),O);S.__exportStar(he(),O);S.__exportStar(Ll(),O);S.__exportStar(bn(),O);S.__exportStar(Fr(),O);S.__exportStar(Ru(),O);S.__exportStar(Lu(),O);S.__exportStar(ju(),O);S.__exportStar(Cl(),O);S.__exportStar(Uu(),O);S.__exportStar(vf(),O);S.__exportStar(pf(),O);S.__exportStar(Mt(),O);S.__exportStar(yf(),O);S.__exportStar(ds(),O);S.__exportStar(hs(),O);S.__exportStar(_f(),O);S.__exportStar(mf(),O);S.__exportStar(bf(),O);S.__exportStar(jt(),O);S.__exportStar(ms(),O);S.__exportStar(gf(),O);S.__exportStar(gs(),O);S.__exportStar(qt(),O);S.__exportStar(wf(),O);S.__exportStar(jf(),O);S.__exportStar(Af(),O);S.__exportStar(Ef(),O);S.__exportStar(Ou(),O);S.__exportStar(gu(),O);S.__exportStar(Su(),O);S.__exportStar(Ds(),O);S.__exportStar(ws(),O);S.__exportStar(Bn(),O);S.__exportStar(cy(),O);S.__exportStar(ly(),O);S.__exportStar(fy(),O);S.__exportStar(vy(),O);S.__exportStar(Fs(),O);S.__exportStar(Ms(),O);S.__exportStar(Ps(),O);S.__exportStar(hy(),O);S.__exportStar(kr(),O);S.__exportStar(yy(),O);S.__exportStar(my(),O);S.__exportStar(gy(),O);S.__exportStar(Sy(),O);S.__exportStar(qy(),O);S.__exportStar(jy(),O);S.__exportStar(Ay(),O);S.__exportStar(Ey(),O);S.__exportStar(Dy(),O);S.__exportStar(Iy(),O);S.__exportStar(Cy(),O);S.__exportStar(Ny(),O);S.__exportStar(Uy(),O);S.__exportStar(Wy(),O);S.__exportStar(Vy(),O)});var zy="1.1.3487";var Yy={baseUrl:"MISSING",api:{baseUrl:"MISSING"},production:!1,version:zy};var zk=function(t){return t.openAi="open-ai",t.anthropic="anthropic",t.google="google",t.deepseek="deepseek",t.fdpAi="fdp-ai",t.customLocalAi="custom-local-ai",t}(zk||{});var Yk=function(t){return t.openAi="open-ai",t.localAi="local-ai",t.routing="routing",t}(Yk||{});var Jk=function(t){return t.discord="discord",t.signal="signal",t.teams="teams",t.routing="routing",t}(Jk||{});var uu=function(t){return t.vaultKey="vault-key",t.instanceRegistry="instance-registry",t.general="general",t.llmProviders="llm-providers",t.messageProviders="message-providers",t.modelTesting="model-testing",t.discordAccess="discord-access",t.voice="voice",t.visuals="visuals",t.soul="soul",t.mcp="mcp",t.cliTools="cli-tools",t.secretVault="secret-vault",t.agentEmail="agent-email",t.embedding="embedding",t.rag="rag",t.developer="developer",t.agentRuntime="agent-runtime",t.agentCronJobs="agent-cron-jobs",t.scheduler="scheduler",t.github="github",t.openclawRegistry="openclaw-registry",t.deviceIdentity="device-identity",t.consultant="consultant",t.caAgent="ca-agent",t.darkOfficeLayout="dark-office-layout",t.cluster="cluster",t}(uu||{});var Gk=function(t){return t.openAi="open-ai",t.leonardo="leonardo",t.fdpai="fdpai",t.routing="routing",t}(Gk||{});var Hk=function(t){return t.elevenLabs="elevenlabs",t.fdpai="fdpai",t.routing="routing",t}(Hk||{});var Zk=function(t){return t.pending="pending",t.running="running",t.completed="completed",t.failed="failed",t}(Zk||{});var Kk=function(t){return t.apiKey="api-key",t.credentials="credentials",t}(Kk||{});var Qk=function(t){return t.req="req",t.bug="bug",t.feature="feature",t.improvement="improvement",t.task="task",t.question="question",t.research="research",t}(Qk||{});var Xk=function(t){return t.low="low",t.medium="medium",t.high="high",t.urgent="urgent",t}(Xk||{});var eI=function(t){return t.todo="todo",t.backlog="backlog",t.bugs="bugs",t.changelog="changelog",t.userInput="user-input",t.status="status",t.testErrorReports="test-error-reports",t}(eI||{});var rI=function(t){return t.update="update",t.remove="remove",t}(rI||{});var tI=function(t){return t.e2e="e2e",t.serverUnit="server-unit",t.clientUnit="client-unit",t.cli="cli",t}(tI||{});var nI=function(t){return t.instant="instant",t.agenticAny="agentic-any",t.ask="ask",t.plan="plan",t}(nI||{});var iI=function(t){return t.full="full",t.askOnly="ask-only",t.planOnly="plan-only",t}(iI||{});var oI=function(t){return t.draft="draft",t.promotedUserInput="promoted-user-input",t.promotedBug="promoted-bug",t.discarded="discarded",t}(oI||{});var aI=function(t){return t.userInput="user-input",t.bugReport="bug-report",t.unspecified="unspecified",t}(aI||{});var uI=function(t){return t.easy="easy",t.medium="medium",t.hard="hard",t.komplex="komplex",t}(uI||{});var Qc="mongodb://200.33.0.101:29017";var sI="A k\xE9r\xE9s nem jutott el a szerverig, vagy nem \xE9rkezett v\xE1lasz. Lehets\xE9ges okok: a szerver nem fut vagy m\xE1s porton hallgat, h\xE1l\xF3zati hiba, a kliens megszak\xEDtotta a k\xE9r\xE9st, vagy m\xE1s origin eset\xE9n CORS blokkolja. Ellen\u0151rizd, hogy a szerver fut-e \xE9s a megadott c\xEDm/port helyes.",cI="Szerver 500-as hiba. A v\xE1lasz body \xFCres vagy nem el\xE9rhet\u0151.",su=class t{static isLikelyHtmlErrorPage(e){let r=e.trim();if(!r.startsWith("<"))return!1;let n=r.toLowerCase();return n.includes("<!doctype")||n.includes("<html")||n.includes("<title>")||n.includes("cannot get")||n.includes("cannot post")||n.includes("cannot put")||n.includes("cannot delete")}static getMessageForHtmlHttpErrorBody(e){let r="R\xE9szletek: szerver log vagy DevTools Network tab.";return e===404?`Az endpoint nem tal\xE1lhat\xF3 (HTTP ${e}). Ellen\u0151rizd az API base URL-t \xE9s a szerver route-okat. `+r:`A szerver HTML error oldalt adott vissza (nem JSON API v\xE1lasz), HTTP ${e}. ${r}`}static getHttpErrorMessage(e,r){if(e.status===0)return sI;let n=r!=null&&typeof r=="string"&&r.trim().length>0?r:null;return n==null&&typeof e.error=="string"&&e.error.trim().length>0&&(n=e.error),n!=null&&t.isLikelyHtmlErrorPage(n)?t.getMessageForHtmlHttpErrorBody(e.status):e.status===500&&!(n!=null&&typeof n=="string"&&n.trim().length>0)?cI:n??e.message??e.statusText??`HTTP ${e.status}`}};var Jy=(()=>{class t{settingsBaseUrl=`${Yy.api.baseUrl}/settings`;http=en(ol);getDefaultWorkspace(){return R(this.http.get(`${this.settingsBaseUrl}/default-workspace`))}getSection(r){return R(this.http.get(`${this.settingsBaseUrl}/get-section/${r}`))}getRequiredWarningsSummary(){return R(this.http.get(`${this.settingsBaseUrl}/required-warnings-summary`))}saveSection(r,n){return R(this.http.patch(`${this.settingsBaseUrl}/save-section/${r}`,n))}postProviderAccessAllow(r){return R(this.http.post(`${this.settingsBaseUrl}/provider-access/allow`,r))}getSoulStatus(){return R(this.http.get(`${this.settingsBaseUrl}/soul-status`))}getSoulContent(){return R(this.http.get(`${this.settingsBaseUrl}/soul-content`))}postGenerateSoul(r){return R(this.http.post(`${this.settingsBaseUrl}/generate-soul`,r))}postTestLlmProvider(r){return R(this.http.post(`${this.settingsBaseUrl}/test-llm-provider`,r))}postListLlmModels(r){return R(this.http.post(`${this.settingsBaseUrl}/list-llm-models`,r))}postListEmbeddingModels(r){return R(this.http.post(`${this.settingsBaseUrl}/list-embedding-models`,r))}postTestMessagingProvider(r){return R(this.http.post(`${this.settingsBaseUrl}/test-messaging-provider`,r))}postMcpSync(r){return R(this.http.post(`${this.settingsBaseUrl}/mcp-sync`,r))}postCliHelpProbe(r){return R(this.http.post(`${this.settingsBaseUrl}/cli-help-probe`,r))}postCliHelpSuggest(r){return R(this.http.post(`${this.settingsBaseUrl}/cli-help-suggest`,r))}postTestAgentEmail(){return R(this.http.post(`${this.settingsBaseUrl}/test-agent-email`,{}))}testOpenclawConnection(r){return R(this.http.post(`${this.settingsBaseUrl}/test-openclaw-connection`,r))}pairOpenclawInstance(r){return R(this.http.post(`${this.settingsBaseUrl}/openclaw-registry/${r.instanceId}/pair`,{}))}getClusterDiagnostics(){return R(this.http.get(`${this.settingsBaseUrl}/cluster/diagnostics`))}postClusterReBootstrap(){return R(this.http.post(`${this.settingsBaseUrl}/cluster/re-bootstrap`,{}))}postClusterReconnectWs(){return R(this.http.post(`${this.settingsBaseUrl}/cluster/reconnect-ws`,{}))}postClusterReconnectPeer(r){let n=encodeURIComponent(r);return R(this.http.post(`${this.settingsBaseUrl}/cluster/reconnect-ws/${n}`,{}))}static \u0275fac=function(n){return new(n||t)};static \u0275prov=Xt({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();var Gy=rl(iu());var Xc=rl(iu());var cu=class{_master;get master(){return this._master}setupMaster(e){this._master=e}};var lu=class t extends cu{settings_AS=en(Jy);loading_$=ke(!1);loadError_$=ke(null);saving_$=ke(!1);saveError_$=ke(null);load(){return U(this,null,function*(){this.loading_$.set(!0),this.loadError_$.set(null);try{yield this.doLoad()}catch(e){Xc.DyFM_Error.logSimple(`${this.constructor.name} | Failed to load section`,e);let r=t.getErrorMessage(e);this.loadError_$.set(r)}finally{this.loading_$.set(!1)}})}save(){return U(this,null,function*(){this.saving_$.set(!0),this.saveError_$.set(null);try{let e=this.buildSaveBody(),r=yield this.doSave(e);return r.success?yield this.load():this.saveError_$.set(r.error??"Ment\xE9s sikertelen."),r}catch(e){Xc.DyFM_Error.logSimple(`${this.constructor.name} | Failed to save section`,e);let r=t.getErrorMessage(e);return this.saveError_$.set(r),{success:!1,error:r}}finally{this.saving_$.set(!1)}})}doSave(e){return U(this,null,function*(){return this.settings_AS.saveSection(this.getSectionId(),e)})}static getErrorMessage(e){if(e instanceof il){let r=e.error,n=null;if(r!==null&&typeof r=="object"){let i=r;typeof i.error=="string"?n=i.error:i.error!=null?n=String(i.error):typeof i.message=="string"&&(n=i.message);let o=i.errorCode,a=typeof o=="string"&&o.trim().length>0?o.trim():void 0;a!==void 0&&(n!=null&&n.trim().length>0?n=`${a}: ${n}`:n=a)}else typeof r=="string"&&(n=r);return su.getHttpErrorMessage(e,n)}return e instanceof Error?e.message||"M\u0171velet sikertelen.":String(e)||"M\u0171velet sikertelen."}};var X4=(()=>{class t extends lu{defaultWorkspacePath_$=ke("");section_$=ke({form:{mongodbUri:Qc,useOpenClawPath:!1,defaultPathOverride:"",autoStartWithSystem:!1,useLiveContext:!0,reportSocketConnectionErrorsToErrorList:!1,agenticLoopDebriefEnabled:!1,mobileAutoUpdateEnabled:!1,serverAutoUpdateEnabled:!1,serverAutoUpdateCheckInterval:"daily",ccSessionRunnerGracePeriodSec:null,ccSessionRunnerIdleTimeoutSec:null,ccSessionAutoArchiveScanIntervalSec:null,ccSessionAutoArchiveAgeDays:null,ccSessionAutoArchiveCountThreshold:null},runtime:{}});updateForm(r){this.section_$.update(n=>Sr(oe({},n),{form:oe(oe({},n.form),r)}))}setSection(r){this.section_$.set(r)}updateGeneralForm(r){this.updateForm(r),this.master?.bumpDigest()}getSectionId(){return uu.general}getSection_$(){return this.section_$}loadDefaultWorkspacePath(){return U(this,null,function*(){try{let r=yield this.settings_AS.getDefaultWorkspace();this.defaultWorkspacePath_$.set(r.workspacePath?.trim()??"")}catch(r){Gy.DyFM_Error.logSimple("CCAP_SettingsGeneral_DS | loadDefaultWorkspacePath failed",r),this.defaultWorkspacePath_$.set("")}})}doLoad(){return U(this,null,function*(){let r=yield this.settings_AS.getSection(uu.general);this.setSection({form:{mongodbUri:typeof r.mongodbUri=="string"?r.mongodbUri:Qc,useOpenClawPath:typeof r.useOpenClawPath=="boolean"?r.useOpenClawPath:!1,defaultPathOverride:typeof r.defaultPathOverride=="string"?r.defaultPathOverride:"",autoStartWithSystem:typeof r.autoStartWithSystem=="boolean"?r.autoStartWithSystem:!1,useLiveContext:typeof r.useLiveContext=="boolean"?r.useLiveContext:!0,reportSocketConnectionErrorsToErrorList:typeof r.reportSocketConnectionErrorsToErrorList=="boolean"?r.reportSocketConnectionErrorsToErrorList:!1,agenticLoopDebriefEnabled:typeof r.agenticLoopDebriefEnabled=="boolean"?r.agenticLoopDebriefEnabled:!1,mobileAutoUpdateEnabled:typeof r.mobileAutoUpdateEnabled=="boolean"?r.mobileAutoUpdateEnabled:!1,serverAutoUpdateEnabled:typeof r.serverAutoUpdateEnabled=="boolean"?r.serverAutoUpdateEnabled:!1,serverAutoUpdateCheckInterval:r.serverAutoUpdateCheckInterval==="daily"?"daily":r.serverAutoUpdateCheckInterval==="weekly"?"weekly":"daily",ccSessionRunnerGracePeriodSec:typeof r.ccSessionRunnerGracePeriodSec=="number"&&r.ccSessionRunnerGracePeriodSec>0?r.ccSessionRunnerGracePeriodSec:null,ccSessionRunnerIdleTimeoutSec:typeof r.ccSessionRunnerIdleTimeoutSec=="number"&&r.ccSessionRunnerIdleTimeoutSec>0?r.ccSessionRunnerIdleTimeoutSec:null,ccSessionAutoArchiveScanIntervalSec:typeof r.ccSessionAutoArchiveScanIntervalSec=="number"&&r.ccSessionAutoArchiveScanIntervalSec>0?r.ccSessionAutoArchiveScanIntervalSec:null,ccSessionAutoArchiveAgeDays:typeof r.ccSessionAutoArchiveAgeDays=="number"&&r.ccSessionAutoArchiveAgeDays>0?r.ccSessionAutoArchiveAgeDays:null,ccSessionAutoArchiveCountThreshold:typeof r.ccSessionAutoArchiveCountThreshold=="number"&&r.ccSessionAutoArchiveCountThreshold>0?r.ccSessionAutoArchiveCountThreshold:null},runtime:{}})})}buildSaveBody(){let r=this.section_$().form;return{mongodbUri:r.mongodbUri,useOpenClawPath:r.useOpenClawPath,defaultPathOverride:r.defaultPathOverride,autoStartWithSystem:r.autoStartWithSystem,useLiveContext:r.useLiveContext,reportSocketConnectionErrorsToErrorList:r.reportSocketConnectionErrorsToErrorList,agenticLoopDebriefEnabled:r.agenticLoopDebriefEnabled,mobileAutoUpdateEnabled:r.mobileAutoUpdateEnabled,serverAutoUpdateEnabled:r.serverAutoUpdateEnabled,serverAutoUpdateCheckInterval:r.serverAutoUpdateCheckInterval,ccSessionRunnerGracePeriodSec:r.ccSessionRunnerGracePeriodSec??void 0,ccSessionRunnerIdleTimeoutSec:r.ccSessionRunnerIdleTimeoutSec??void 0,ccSessionAutoArchiveScanIntervalSec:r.ccSessionAutoArchiveScanIntervalSec??void 0,ccSessionAutoArchiveAgeDays:r.ccSessionAutoArchiveAgeDays??void 0,ccSessionAutoArchiveCountThreshold:r.ccSessionAutoArchiveCountThreshold??void 0}}static \u0275fac=(()=>{let r;return function(i){return(r||(r=nl(t)))(i||t)}})();static \u0275prov=Xt({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();export{vu as a,hu as b,Al as c,wt as d,he as e,El as f,Fu as g,bn as h,Fr as i,ds as j,kr as k,Bn as l,Ds as m,uy as n,ly as o,iu as p,zk as q,Yk as r,Jk as s,uu as t,Gk as u,Hk as v,Zk as w,Kk as x,Qk as y,oI as z,aI as A,uI as B,Xk as C,eI as D,rI as E,tI as F,nI as G,iI as H,Yy as I,Qc as J,su as K,Jy as L,lu as M,X4 as N};
212
+ //# sourceMappingURL=chunk-QO6PPMHC.js.map