@futdevpro/ccap 1.1.2995 → 1.1.3002

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 (177) hide show
  1. package/client-dist/{agent-instances.module-Y2KBMNCK.js → agent-instances.module-VLGX2Z7Z.js} +2 -2
  2. package/client-dist/{ca.module-THNXAPI2.js → ca.module-FMCAOMOB.js} +2 -2
  3. package/client-dist/{cc-usage-dashboard.component-XQTSJYNO.js → cc-usage-dashboard.component-D6CNJHB5.js} +2 -2
  4. package/client-dist/{cc.module-SBU4LUC2.js → cc.module-T3NJWMZ5.js} +2 -2
  5. package/client-dist/{chunk-C7CAW6PK.js → chunk-2IYGO6RM.js} +2 -2
  6. package/client-dist/{chunk-VUVGA3PU.js → chunk-2ZTUWDCN.js} +2 -2
  7. package/client-dist/{chunk-54JIUO7K.js → chunk-36LPXL3M.js} +2 -2
  8. package/client-dist/{chunk-CL5GKNF3.js → chunk-3JQ2UHMM.js} +2 -2
  9. package/client-dist/{chunk-GUJJP3HP.js → chunk-3LPBF4AU.js} +2 -2
  10. package/client-dist/{chunk-OPKRH2ZF.js → chunk-3SYXOECP.js} +2 -2
  11. package/client-dist/{chunk-CSNFLERX.js → chunk-4AVVQGND.js} +2 -2
  12. package/client-dist/{chunk-UWRJP62D.js → chunk-5DUG67IY.js} +2 -2
  13. package/client-dist/{chunk-TUOCYFPY.js → chunk-5HYEA5IO.js} +2 -2
  14. package/client-dist/{chunk-YULSJ6Q7.js → chunk-6227S2CN.js} +2 -2
  15. package/client-dist/{chunk-LR3E2GDS.js → chunk-64K7CP3A.js} +2 -2
  16. package/client-dist/{chunk-4YCGUCIE.js → chunk-7MZ4N75F.js} +2 -2
  17. package/client-dist/{chunk-IDWKG7BQ.js → chunk-7SCYMYZG.js} +2 -2
  18. package/client-dist/{chunk-SQFFII5G.js → chunk-7VUQTBJ2.js} +2 -2
  19. package/client-dist/{chunk-WS5IPV7J.js → chunk-7YT7BGBD.js} +2 -2
  20. package/client-dist/{chunk-WPK3COA5.js → chunk-A3RMSX34.js} +2 -2
  21. package/client-dist/{chunk-IBAMIAIM.js → chunk-AQD6DEHR.js} +2 -2
  22. package/client-dist/{chunk-HB7GOR7P.js → chunk-CN76LOPU.js} +2 -2
  23. package/client-dist/{chunk-2JZ3QUN7.js → chunk-DB44BUNE.js} +3 -3
  24. package/client-dist/{chunk-2JZ3QUN7.js.map → chunk-DB44BUNE.js.map} +2 -2
  25. package/client-dist/{chunk-4EQNFMWU.js → chunk-DPXSAO23.js} +2 -2
  26. package/client-dist/{chunk-Z2O72EKW.js → chunk-E6DWNZNG.js} +2 -2
  27. package/client-dist/{chunk-OTEHKHH6.js → chunk-EGZ2ZMS3.js} +2 -2
  28. package/client-dist/{chunk-3BN32RX3.js → chunk-FID2RUXN.js} +2 -2
  29. package/client-dist/{chunk-OF2Q6Y2J.js → chunk-FOL6X3TR.js} +2 -2
  30. package/client-dist/{chunk-P47C3DF2.js → chunk-GNWPRBF5.js} +2 -2
  31. package/client-dist/{chunk-54KKC54L.js → chunk-I4V3JDZC.js} +2 -2
  32. package/client-dist/{chunk-X3XME6YM.js → chunk-IGWJMU5B.js} +2 -2
  33. package/client-dist/{chunk-AJATGXNX.js → chunk-IUCQWZ34.js} +2 -2
  34. package/client-dist/{chunk-BLA4WJEG.js → chunk-JLF2BDJU.js} +2 -2
  35. package/client-dist/{chunk-YFVC52RF.js → chunk-KHVPVWG7.js} +2 -2
  36. package/client-dist/{chunk-KD7WNBCA.js → chunk-NCOPOED7.js} +2 -2
  37. package/client-dist/{chunk-UVND3MT4.js → chunk-O6IRGFCX.js} +2 -2
  38. package/client-dist/{chunk-73ZQF6FQ.js → chunk-OVU6SA42.js} +2 -2
  39. package/client-dist/{chunk-TIFSV5V7.js → chunk-OXEKAYMY.js} +2 -2
  40. package/client-dist/{chunk-BZVOKLVZ.js → chunk-P7Z33WJF.js} +2 -2
  41. package/client-dist/{chunk-3F4AEMEH.js → chunk-PTS77H25.js} +2 -2
  42. package/client-dist/{chunk-JDJZC55L.js → chunk-PVLRUWUC.js} +2 -2
  43. package/client-dist/{chunk-Q6DP4BK2.js → chunk-QXIUTGNM.js} +2 -2
  44. package/client-dist/{chunk-Y5E6NMMF.js → chunk-S46BSLUB.js} +2 -2
  45. package/client-dist/{chunk-MKV4EKJ3.js → chunk-SAC7F2CB.js} +2 -2
  46. package/client-dist/{chunk-HL5RGNNL.js → chunk-SBJAWWHF.js} +2 -2
  47. package/client-dist/{chunk-ASRYRN2I.js → chunk-SJ6KKDJT.js} +2 -2
  48. package/client-dist/{chunk-PXOCZHXA.js → chunk-SJTW4HLQ.js} +2 -2
  49. package/client-dist/{chunk-LGMUHF7N.js → chunk-TIJCR5DW.js} +2 -2
  50. package/client-dist/{chunk-LGMUHF7N.js.map → chunk-TIJCR5DW.js.map} +1 -1
  51. package/client-dist/{chunk-G5G7ZRTT.js → chunk-TNGH7PJP.js} +2 -2
  52. package/client-dist/{chunk-VS2SOEHH.js → chunk-VQSRIIPK.js} +2 -2
  53. package/client-dist/{chunk-IES67WDC.js → chunk-W3HNVMKS.js} +2 -2
  54. package/client-dist/{chunk-SSVNU5XX.js → chunk-W7OH67K2.js} +2 -2
  55. package/client-dist/{chunk-YBDAZFC6.js → chunk-WNQYZI4D.js} +2 -2
  56. package/client-dist/{chunk-XD65U2AA.js → chunk-XKS3GVP3.js} +2 -2
  57. package/client-dist/{chunk-VBPR247V.js → chunk-YWW2VAZR.js} +2 -2
  58. package/client-dist/{chunk-2L25BDDH.js → chunk-ZLCRMQAK.js} +2 -2
  59. package/client-dist/{chunk-KJJKC27U.js → chunk-ZPE6HI3H.js} +2 -2
  60. package/client-dist/{chunk-WFP5T7CK.js → chunk-ZW4M7CJ2.js} +2 -2
  61. package/client-dist/{chunk-ACH3Z3TA.js → chunk-ZZ7RWOLH.js} +2 -2
  62. package/client-dist/{chunk-VRLA24M4.js → chunk-ZZRTMXBT.js} +2 -2
  63. package/client-dist/{consultant.module-Z5HEVFX6.js → consultant.module-J2JDO2WS.js} +2 -2
  64. package/client-dist/{crd.module-V47NZMPB.js → crd.module-SCW4OTC2.js} +2 -2
  65. package/client-dist/{dashboard.module-CTYD32XL.js → dashboard.module-F55QGGVH.js} +2 -2
  66. package/client-dist/{do.module-CXAUW7J5.js → do.module-7FRBSMAA.js} +2 -2
  67. package/client-dist/{document-library.module-BWG5WRSR.js → document-library.module-B6VXHRG7.js} +2 -2
  68. package/client-dist/{embedding-eval.module-UW3ATVS4.js → embedding-eval.module-NPC3TEIO.js} +2 -2
  69. package/client-dist/{embedding-registry.module-EUHSKBTW.js → embedding-registry.module-LIVVEPZY.js} +2 -2
  70. package/client-dist/{err.module-TVAU67PY.js → err.module-YOIHNORT.js} +2 -2
  71. package/client-dist/{feedback.module-QMTGBHSW.js → feedback.module-V5KVPNYZ.js} +2 -2
  72. package/client-dist/{host-runtime-mcp.module-MGFIHPEU.js → host-runtime-mcp.module-PHWXY4PV.js} +2 -2
  73. package/client-dist/index.html +1 -1
  74. package/client-dist/{live-dev-pipeline.module-234JPLHL.js → live-dev-pipeline.module-NGFZQDD3.js} +2 -2
  75. package/client-dist/{logs.module-AJKP66C3.js → logs.module-U22RMCHY.js} +2 -2
  76. package/client-dist/{main-RCR3UPER.js → main-E47XWCXH.js} +3 -3
  77. package/client-dist/{master-control-remote-poc.module-MJHRVAJV.js → master-control-remote-poc.module-EBA63OMO.js} +2 -2
  78. package/client-dist/{mobile-app.module-BGY5OBR4.js → mobile-app.module-SRY6NVNR.js} +2 -2
  79. package/client-dist/{model-registry.module-7QY63GF2.js → model-registry.module-UTATZZJR.js} +2 -2
  80. package/client-dist/{oc.module-DCGI6UB3.js → oc.module-SVMLBM6T.js} +2 -2
  81. package/client-dist/{orc.module-BGIHVCKN.js → orc.module-MKANMSGC.js} +2 -2
  82. package/client-dist/{project-management.module-75PSVWLM.js → project-management.module-4LL5UVW5.js} +2 -2
  83. package/client-dist/project-source-routed.module-DSUCIWHV.js +2 -0
  84. package/client-dist/{scheduler.module-4CBGNYNZ.js → scheduler.module-COHLY6ZF.js} +2 -2
  85. package/client-dist/{session.module-BBRWFWYW.js → session.module-JQCXS6ZJ.js} +2 -2
  86. package/client-dist/{set.module-JXC6IB4D.js → set.module-PUU5N4MJ.js} +2 -2
  87. package/client-dist/{setup.module-VWNDXFJR.js → setup.module-HPV5JS3I.js} +2 -2
  88. package/client-dist/{terminals.module-SJJ5FS3B.js → terminals.module-VIWV443T.js} +2 -2
  89. package/client-dist/{voice-notes-poc.module-H5JKVBK7.js → voice-notes-poc.module-ZNRSQ6XH.js} +2 -2
  90. package/client-dist/{wfs.module-IR6D4R6Q.js → wfs.module-CIG5GOVA.js} +2 -2
  91. package/package.json +1 -1
  92. package/client-dist/project-source-routed.module-UK5YELZX.js +0 -2
  93. /package/client-dist/{agent-instances.module-Y2KBMNCK.js.map → agent-instances.module-VLGX2Z7Z.js.map} +0 -0
  94. /package/client-dist/{ca.module-THNXAPI2.js.map → ca.module-FMCAOMOB.js.map} +0 -0
  95. /package/client-dist/{cc-usage-dashboard.component-XQTSJYNO.js.map → cc-usage-dashboard.component-D6CNJHB5.js.map} +0 -0
  96. /package/client-dist/{cc.module-SBU4LUC2.js.map → cc.module-T3NJWMZ5.js.map} +0 -0
  97. /package/client-dist/{chunk-C7CAW6PK.js.map → chunk-2IYGO6RM.js.map} +0 -0
  98. /package/client-dist/{chunk-VUVGA3PU.js.map → chunk-2ZTUWDCN.js.map} +0 -0
  99. /package/client-dist/{chunk-54JIUO7K.js.map → chunk-36LPXL3M.js.map} +0 -0
  100. /package/client-dist/{chunk-CL5GKNF3.js.map → chunk-3JQ2UHMM.js.map} +0 -0
  101. /package/client-dist/{chunk-GUJJP3HP.js.map → chunk-3LPBF4AU.js.map} +0 -0
  102. /package/client-dist/{chunk-OPKRH2ZF.js.map → chunk-3SYXOECP.js.map} +0 -0
  103. /package/client-dist/{chunk-CSNFLERX.js.map → chunk-4AVVQGND.js.map} +0 -0
  104. /package/client-dist/{chunk-UWRJP62D.js.map → chunk-5DUG67IY.js.map} +0 -0
  105. /package/client-dist/{chunk-TUOCYFPY.js.map → chunk-5HYEA5IO.js.map} +0 -0
  106. /package/client-dist/{chunk-YULSJ6Q7.js.map → chunk-6227S2CN.js.map} +0 -0
  107. /package/client-dist/{chunk-LR3E2GDS.js.map → chunk-64K7CP3A.js.map} +0 -0
  108. /package/client-dist/{chunk-4YCGUCIE.js.map → chunk-7MZ4N75F.js.map} +0 -0
  109. /package/client-dist/{chunk-IDWKG7BQ.js.map → chunk-7SCYMYZG.js.map} +0 -0
  110. /package/client-dist/{chunk-SQFFII5G.js.map → chunk-7VUQTBJ2.js.map} +0 -0
  111. /package/client-dist/{chunk-WS5IPV7J.js.map → chunk-7YT7BGBD.js.map} +0 -0
  112. /package/client-dist/{chunk-WPK3COA5.js.map → chunk-A3RMSX34.js.map} +0 -0
  113. /package/client-dist/{chunk-IBAMIAIM.js.map → chunk-AQD6DEHR.js.map} +0 -0
  114. /package/client-dist/{chunk-HB7GOR7P.js.map → chunk-CN76LOPU.js.map} +0 -0
  115. /package/client-dist/{chunk-4EQNFMWU.js.map → chunk-DPXSAO23.js.map} +0 -0
  116. /package/client-dist/{chunk-Z2O72EKW.js.map → chunk-E6DWNZNG.js.map} +0 -0
  117. /package/client-dist/{chunk-OTEHKHH6.js.map → chunk-EGZ2ZMS3.js.map} +0 -0
  118. /package/client-dist/{chunk-3BN32RX3.js.map → chunk-FID2RUXN.js.map} +0 -0
  119. /package/client-dist/{chunk-OF2Q6Y2J.js.map → chunk-FOL6X3TR.js.map} +0 -0
  120. /package/client-dist/{chunk-P47C3DF2.js.map → chunk-GNWPRBF5.js.map} +0 -0
  121. /package/client-dist/{chunk-54KKC54L.js.map → chunk-I4V3JDZC.js.map} +0 -0
  122. /package/client-dist/{chunk-X3XME6YM.js.map → chunk-IGWJMU5B.js.map} +0 -0
  123. /package/client-dist/{chunk-AJATGXNX.js.map → chunk-IUCQWZ34.js.map} +0 -0
  124. /package/client-dist/{chunk-BLA4WJEG.js.map → chunk-JLF2BDJU.js.map} +0 -0
  125. /package/client-dist/{chunk-YFVC52RF.js.map → chunk-KHVPVWG7.js.map} +0 -0
  126. /package/client-dist/{chunk-KD7WNBCA.js.map → chunk-NCOPOED7.js.map} +0 -0
  127. /package/client-dist/{chunk-UVND3MT4.js.map → chunk-O6IRGFCX.js.map} +0 -0
  128. /package/client-dist/{chunk-73ZQF6FQ.js.map → chunk-OVU6SA42.js.map} +0 -0
  129. /package/client-dist/{chunk-TIFSV5V7.js.map → chunk-OXEKAYMY.js.map} +0 -0
  130. /package/client-dist/{chunk-BZVOKLVZ.js.map → chunk-P7Z33WJF.js.map} +0 -0
  131. /package/client-dist/{chunk-3F4AEMEH.js.map → chunk-PTS77H25.js.map} +0 -0
  132. /package/client-dist/{chunk-JDJZC55L.js.map → chunk-PVLRUWUC.js.map} +0 -0
  133. /package/client-dist/{chunk-Q6DP4BK2.js.map → chunk-QXIUTGNM.js.map} +0 -0
  134. /package/client-dist/{chunk-Y5E6NMMF.js.map → chunk-S46BSLUB.js.map} +0 -0
  135. /package/client-dist/{chunk-MKV4EKJ3.js.map → chunk-SAC7F2CB.js.map} +0 -0
  136. /package/client-dist/{chunk-HL5RGNNL.js.map → chunk-SBJAWWHF.js.map} +0 -0
  137. /package/client-dist/{chunk-ASRYRN2I.js.map → chunk-SJ6KKDJT.js.map} +0 -0
  138. /package/client-dist/{chunk-PXOCZHXA.js.map → chunk-SJTW4HLQ.js.map} +0 -0
  139. /package/client-dist/{chunk-G5G7ZRTT.js.map → chunk-TNGH7PJP.js.map} +0 -0
  140. /package/client-dist/{chunk-VS2SOEHH.js.map → chunk-VQSRIIPK.js.map} +0 -0
  141. /package/client-dist/{chunk-IES67WDC.js.map → chunk-W3HNVMKS.js.map} +0 -0
  142. /package/client-dist/{chunk-SSVNU5XX.js.map → chunk-W7OH67K2.js.map} +0 -0
  143. /package/client-dist/{chunk-YBDAZFC6.js.map → chunk-WNQYZI4D.js.map} +0 -0
  144. /package/client-dist/{chunk-XD65U2AA.js.map → chunk-XKS3GVP3.js.map} +0 -0
  145. /package/client-dist/{chunk-VBPR247V.js.map → chunk-YWW2VAZR.js.map} +0 -0
  146. /package/client-dist/{chunk-2L25BDDH.js.map → chunk-ZLCRMQAK.js.map} +0 -0
  147. /package/client-dist/{chunk-KJJKC27U.js.map → chunk-ZPE6HI3H.js.map} +0 -0
  148. /package/client-dist/{chunk-WFP5T7CK.js.map → chunk-ZW4M7CJ2.js.map} +0 -0
  149. /package/client-dist/{chunk-ACH3Z3TA.js.map → chunk-ZZ7RWOLH.js.map} +0 -0
  150. /package/client-dist/{chunk-VRLA24M4.js.map → chunk-ZZRTMXBT.js.map} +0 -0
  151. /package/client-dist/{consultant.module-Z5HEVFX6.js.map → consultant.module-J2JDO2WS.js.map} +0 -0
  152. /package/client-dist/{crd.module-V47NZMPB.js.map → crd.module-SCW4OTC2.js.map} +0 -0
  153. /package/client-dist/{dashboard.module-CTYD32XL.js.map → dashboard.module-F55QGGVH.js.map} +0 -0
  154. /package/client-dist/{do.module-CXAUW7J5.js.map → do.module-7FRBSMAA.js.map} +0 -0
  155. /package/client-dist/{document-library.module-BWG5WRSR.js.map → document-library.module-B6VXHRG7.js.map} +0 -0
  156. /package/client-dist/{embedding-eval.module-UW3ATVS4.js.map → embedding-eval.module-NPC3TEIO.js.map} +0 -0
  157. /package/client-dist/{embedding-registry.module-EUHSKBTW.js.map → embedding-registry.module-LIVVEPZY.js.map} +0 -0
  158. /package/client-dist/{err.module-TVAU67PY.js.map → err.module-YOIHNORT.js.map} +0 -0
  159. /package/client-dist/{feedback.module-QMTGBHSW.js.map → feedback.module-V5KVPNYZ.js.map} +0 -0
  160. /package/client-dist/{host-runtime-mcp.module-MGFIHPEU.js.map → host-runtime-mcp.module-PHWXY4PV.js.map} +0 -0
  161. /package/client-dist/{live-dev-pipeline.module-234JPLHL.js.map → live-dev-pipeline.module-NGFZQDD3.js.map} +0 -0
  162. /package/client-dist/{logs.module-AJKP66C3.js.map → logs.module-U22RMCHY.js.map} +0 -0
  163. /package/client-dist/{main-RCR3UPER.js.map → main-E47XWCXH.js.map} +0 -0
  164. /package/client-dist/{master-control-remote-poc.module-MJHRVAJV.js.map → master-control-remote-poc.module-EBA63OMO.js.map} +0 -0
  165. /package/client-dist/{mobile-app.module-BGY5OBR4.js.map → mobile-app.module-SRY6NVNR.js.map} +0 -0
  166. /package/client-dist/{model-registry.module-7QY63GF2.js.map → model-registry.module-UTATZZJR.js.map} +0 -0
  167. /package/client-dist/{oc.module-DCGI6UB3.js.map → oc.module-SVMLBM6T.js.map} +0 -0
  168. /package/client-dist/{orc.module-BGIHVCKN.js.map → orc.module-MKANMSGC.js.map} +0 -0
  169. /package/client-dist/{project-management.module-75PSVWLM.js.map → project-management.module-4LL5UVW5.js.map} +0 -0
  170. /package/client-dist/{project-source-routed.module-UK5YELZX.js.map → project-source-routed.module-DSUCIWHV.js.map} +0 -0
  171. /package/client-dist/{scheduler.module-4CBGNYNZ.js.map → scheduler.module-COHLY6ZF.js.map} +0 -0
  172. /package/client-dist/{session.module-BBRWFWYW.js.map → session.module-JQCXS6ZJ.js.map} +0 -0
  173. /package/client-dist/{set.module-JXC6IB4D.js.map → set.module-PUU5N4MJ.js.map} +0 -0
  174. /package/client-dist/{setup.module-VWNDXFJR.js.map → setup.module-HPV5JS3I.js.map} +0 -0
  175. /package/client-dist/{terminals.module-SJJ5FS3B.js.map → terminals.module-VIWV443T.js.map} +0 -0
  176. /package/client-dist/{voice-notes-poc.module-H5JKVBK7.js.map → voice-notes-poc.module-ZNRSQ6XH.js.map} +0 -0
  177. /package/client-dist/{wfs.module-IR6D4R6Q.js.map → wfs.module-CIG5GOVA.js.map} +0 -0
@@ -1,2 +1,2 @@
1
- import{a as R,b as z,c as Ce}from"./chunk-HB7GOR7P.js";import{c as ge}from"./chunk-SQFFII5G.js";import{a as xe}from"./chunk-FLAJXIYW.js";import{b as le,c as se,f as de,i as ce,n as ue,o as _e,p as me,v as pe}from"./chunk-EO4DNTT4.js";import{a as K}from"./chunk-5UPNU54P.js";import{j as fe}from"./chunk-2L25BDDH.js";import{C as q,D as Y,Fa as d,Ga as $,Ha as L,Ia as ie,J as f,Ja as oe,K as x,Ka as re,L as A,M as I,Ma as N,Na as W,Oa as O,Q as j,Ta as ae,U as H,Y as ee,Z as l,aa as p,da as C,fa as V,ga as y,ha as G,hb as v,ia as F,k as P,la as g,ma as te,na as ne,oa as B,pa as D,qa as o,ra as r,sa as S,ua as T,va as m,wa as c,y as X}from"./chunk-TBMJSIBB.js";var he="ccap-voiceInput:autoSendAfterVoice",be=(()=>{class n{autoSendAfterVoice_$=p(n.readAutoSendAfterVoiceFromStorage());setAutoSendAfterVoice(e){this.autoSendAfterVoice_$.set(e),K.writeString(he,String(e))}static readAutoSendAfterVoiceFromStorage(){return K.readString(he)==="true"}static \u0275fac=function(t){return new(t||n)};static \u0275prov=X({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})();var k=function(n){return n.equal="equal",n.removed="removed",n.added="added",n}(k||{});var U=class n{static tokenize(s){let e=s;if(e.length===0)return[];let t=e.split(/(\s+)/),i=[];for(let a=0;a<t.length;a++){let u=t[a];u.length>0&&i.push(u)}return i}static mergeAndAssignIds(s){if(s.length===0)return[];let e=[];for(let i=0;i<s.length;i++){let a=s[i],u=e[e.length-1];u!==void 0&&u.kind===a.kind?u.text=u.text+a.text:e.push({kind:a.kind,text:a.text})}let t=[];for(let i=0;i<e.length;i++){let a=e[i];t.push({id:i,kind:a.kind,text:a.text})}return t}static buildWordDiff(s,e){let t=n.tokenize(s),i=n.tokenize(e),a=t.length,u=i.length,_=[];for(let h=0;h<=a;h++){let E=[];for(let Q=0;Q<=u;Q++)E.push(0);_.push(E)}for(let h=1;h<=a;h++)for(let E=1;E<=u;E++)if(t[h-1]===i[E-1])_[h][E]=_[h-1][E-1]+1;else{let Q=_[h-1][E],Z=_[h][E-1];_[h][E]=Q>Z?Q:Z}let w=[],b=a,M=u;for(;b>0||M>0;)b>0&&M>0&&t[b-1]===i[M-1]?(w.push({kind:k.equal,text:t[b-1]}),b-=1,M-=1):M>0&&(b===0||_[b][M-1]>=_[b-1][M])?(w.push({kind:k.added,text:i[M-1]}),M-=1):b>0&&(w.push({kind:k.removed,text:t[b-1]}),b-=1);let J=[];for(let h=w.length-1;h>=0;h--)J.push(w[h]);return n.mergeAndAssignIds(J)}};var Se=(n,s)=>s.value,Ee=(n,s)=>s.id;function ye(n,s){n&1&&S(0,"span",25)}function $e(n,s){if(n&1&&(o(0,"div",28),S(1,"div",33)(2,"div",34),r()),n&2){let e=c(3);l(),G("height",e.volumePercent_$(),"%")}}function we(n,s){if(n&1&&(o(0,"div",26),C(1,$e,3,2,"div",28),A(),o(2,"svg",29),S(3,"path",30)(4,"path",31)(5,"line",32),r()()),n&2){let e=c(2);l(),g(e.isRecordActive_$()?1:-1)}}function Me(n,s){n&1&&(o(0,"p",27)(1,"span",35),d(2,"\u26A0"),r(),d(3),r()),n&2&&(V("aria-live","polite"),l(3),L("",s," "))}function Ae(n,s){if(n&1){let e=T();o(0,"div",0)(1,"div",15)(2,"button",16),m("click",function(i){return f(e),c().toggleSettings(),x(i.stopPropagation())}),A(),o(3,"svg",17),S(4,"path",18)(5,"path",19),r()(),I(),o(6,"button",20),m("click",function(i){return f(e),c().toggleInfo(),x(i.stopPropagation())}),A(),o(7,"svg",17),S(8,"circle",21)(9,"path",22)(10,"path",23),r()()(),I(),o(11,"button",24),m("click",function(){f(e);let i=c();return x(i.toggleRecord())}),C(12,ye,1,0,"span",25)(13,we,6,1,"div",26),r(),C(14,Me,4,2,"p",27),r()}if(n&2){let e,t=c();l(6),F("border-neonDefault",!t.lastQaTextWasModified_$())("text-neonCyan",!t.lastQaTextWasModified_$())("hover:border-neonCyan",!t.lastQaTextWasModified_$())("hover:shadow-neon-glow-cyan",!t.lastQaTextWasModified_$())("focus:ring-neonCyan",!t.lastQaTextWasModified_$())("border-neonAmber",t.lastQaTextWasModified_$())("text-neonAmber",t.lastQaTextWasModified_$())("shadow-neon-glow-orange",t.lastQaTextWasModified_$())("hover:border-neonAmber",t.lastQaTextWasModified_$())("hover:shadow-neon-glow-orange",t.lastQaTextWasModified_$())("focus:ring-neonAmber",t.lastQaTextWasModified_$()),V("aria-label",t.lastQaTextWasModified_$()?"Utols\xF3 QA eredm\xE9ny \u2014 a sz\xF6veg m\xF3dosult":"Utols\xF3 QA eredm\xE9ny")("title",t.lastQaTextWasModified_$()?"Utols\xF3 QA eredm\xE9ny \u2014 a sz\xF6veg m\xF3dosult (r\xE9szletek)":"Utols\xF3 QA eredm\xE9ny"),l(5),F("border-neonCyan",t.isRecordActive_$()||t.busy_$())("shadow-neon-glow-cyan",t.isRecordActive_$()||t.busy_$())("animate-pulse",t.isRecording_$()),y("disabled",t.mediaUnavailable_$()!==null),V("aria-label",t.recordButtonAriaLabel_$())("title",t.recordButtonTitle_$()),l(),g(t.busy_$()&&!t.isRecordActive_$()?12:13),l(2),g((e=t.mediaUnavailable_$())?14:-1,e)}}function Te(n,s){n&1&&S(0,"span",25)}function Pe(n,s){if(n&1&&(o(0,"div",28),S(1,"div",33)(2,"div",34),r()),n&2){let e=c(3);l(),G("height",e.volumePercent_$(),"%")}}function Ve(n,s){if(n&1&&(o(0,"div",26),C(1,Pe,3,2,"div",28),A(),o(2,"svg",29),S(3,"path",30)(4,"path",31)(5,"line",32),r()()),n&2){let e=c(2);l(),g(e.isRecordActive_$()?1:-1)}}function ke(n,s){n&1&&(o(0,"p",39)(1,"span",35),d(2,"\u26A0"),r(),d(3),r()),n&2&&(V("aria-live","polite"),l(3),L("",s," "))}function Re(n,s){if(n&1){let e=T();o(0,"div",36)(1,"button",24),m("click",function(){f(e);let i=c();return x(i.toggleRecord())}),C(2,Te,1,0,"span",25)(3,Ve,6,1,"div",26),r(),o(4,"button",37),m("click",function(i){return f(e),c().toggleSettings(),x(i.stopPropagation())}),A(),o(5,"svg",17),S(6,"path",18)(7,"path",19),r()(),I(),o(8,"button",38),m("click",function(i){return f(e),c().toggleInfo(),x(i.stopPropagation())}),A(),o(9,"svg",17),S(10,"circle",21)(11,"path",22)(12,"path",23),r()()(),C(13,ke,4,2,"p",39)}if(n&2){let e,t=c();l(),F("border-neonCyan",t.isRecordActive_$()||t.busy_$())("shadow-neon-glow-cyan",t.isRecordActive_$()||t.busy_$())("animate-pulse",t.isRecording_$()),y("disabled",t.mediaUnavailable_$()!==null),V("aria-label",t.recordButtonAriaLabel_$())("title",t.recordButtonTitle_$()),l(),g(t.busy_$()&&!t.isRecordActive_$()?2:3),l(6),F("border-neonDefault",!t.lastQaTextWasModified_$())("text-neonCyan",!t.lastQaTextWasModified_$())("hover:border-neonCyan",!t.lastQaTextWasModified_$())("hover:shadow-neon-glow-cyan",!t.lastQaTextWasModified_$())("focus:ring-neonCyan",!t.lastQaTextWasModified_$())("border-neonAmber",t.lastQaTextWasModified_$())("text-neonAmber",t.lastQaTextWasModified_$())("shadow-neon-glow-orange",t.lastQaTextWasModified_$())("hover:border-neonAmber",t.lastQaTextWasModified_$())("hover:shadow-neon-glow-orange",t.lastQaTextWasModified_$())("focus:ring-neonAmber",t.lastQaTextWasModified_$()),V("aria-label",t.lastQaTextWasModified_$()?"Utols\xF3 QA eredm\xE9ny \u2014 a sz\xF6veg m\xF3dosult":"Utols\xF3 QA eredm\xE9ny")("title",t.lastQaTextWasModified_$()?"Utols\xF3 QA eredm\xE9ny \u2014 a sz\xF6veg m\xF3dosult (r\xE9szletek)":"Utols\xF3 QA eredm\xE9ny"),l(5),g((e=t.mediaUnavailable_$())?13:-1,e)}}function Qe(n,s){if(n&1&&(o(0,"p",45),d(1),r()),n&2){let e=c(2);l(),re(" Override: ",e.qaProviderDisplayLabel_$()," / ",e.qaModelName||"\u2014"," (glob\xE1l: ",e.defaultLlmProviderDisplayLabel_$()||"\u2014"," / ",e.defaultLlmModel_$()||"\u2014","). ")}}function qe(n,s){if(n&1&&(o(0,"p",45),d(1),r()),n&2){let e=c(2);l(),ie(" Nincs be\xE1ll\xEDtva \u2013 haszn\xE1lt: ",e.defaultLlmProviderDisplayLabel_$()||"\u2014"," / ",e.defaultLlmModel_$()||"\u2014"," (glob\xE1l). ")}}function Fe(n,s){if(n&1&&(o(0,"option",49),d(1),r()),n&2){let e=s.$implicit;y("value",e.value),l(),$(e.label)}}function Be(n,s){if(n&1&&(o(0,"option",49),d(1),r()),n&2){let e=s.$implicit;y("value",e),l(),$(e)}}function De(n,s){if(n&1){let e=T();o(0,"select",59),O("ngModelChange",function(i){f(e);let a=c(2);return W(a.qaModelName,i)||(a.qaModelName=i),x(i)}),o(1,"option",48),d(2,"\u2014 default \u2014"),r(),B(3,Be,2,2,"option",49,ne),r()}if(n&2){let e=c(2);N("ngModel",e.qaModelName),l(3),D(e.qaModelsForProvider_$())}}function Le(n,s){if(n&1){let e=T();o(0,"input",60),O("ngModelChange",function(i){f(e);let a=c(2);return W(a.qaModelName,i)||(a.qaModelName=i),x(i)}),r()}if(n&2){let e=c(2);N("ngModel",e.qaModelName)}}function Ne(n,s){if(n&1&&(o(0,"p",52),d(1),r()),n&2){let e=c(2);l(),$(e.qaModelsListFetchError_$())}}function We(n,s){if(n&1){let e=T();o(0,"div",15)(1,"input",61),m("input",function(i){let a=f(e).$index,u=c(2);return x(u.updateConfusionFrom(a,i.target.value))}),r(),o(2,"span",62),d(3,"\u2192"),r(),o(4,"input",63),m("input",function(i){let a=f(e).$index,u=c(2);return x(u.updateConfusionTo(a,i.target.value))}),r(),o(5,"button",64),m("click",function(){let i=f(e).$index,a=c(2);return x(a.removeConfusionEntry(i))}),o(6,"span",65),d(7,"T\xF6rl\xE9s"),r(),A(),o(8,"svg",66),S(9,"path",67),r()()()}if(n&2){let e=s.$implicit;l(),y("value",e.from),l(3),y("value",e.to)}}function Oe(n,s){if(n&1){let e=T();o(0,"div",8)(1,"div",40)(2,"p",41),d(3,"System prompt (LLM-nek)"),r(),o(4,"p",42),d(5),r()(),o(6,"div",40)(7,"p",41),d(8," User prompt sablon (ide f\u0171z\u0151dik be a felv\xE9tel adata) "),r(),o(9,"p",43),d(10),r(),o(11,"p",44),d(12),r()(),o(13,"div",40)(14,"p",41),d(15,"STT QA provider \xE9s modell"),r(),C(16,Qe,2,4,"p",45)(17,qe,2,2,"p",45),o(18,"div",46)(19,"select",47),O("ngModelChange",function(i){f(e);let a=c();return W(a.qaProviderName,i)||(a.qaProviderName=i),x(i)}),m("ngModelChange",function(){f(e);let i=c();return x(i.onQaProviderChange())}),o(20,"option",48),d(21,"\u2014 default \u2014"),r(),B(22,Fe,2,2,"option",49,Se),r(),C(24,De,5,1,"select",50)(25,Le,1,1,"input",51),r(),C(26,Ne,2,1,"p",52),r(),o(27,"div",53)(28,"p",54),d(29," Tipikus el\xEDr\xE1sok / tip\xF3k (confusion map) \u2013 ezekre jav\xEDt a QA "),r(),o(30,"div",55),B(31,We,10,2,"div",15,te),r(),o(33,"div",56)(34,"button",57),m("click",function(){f(e);let i=c();return x(i.addConfusionEntry())}),d(35," + Sor hozz\xE1ad\xE1sa "),r(),o(36,"button",58),m("click",function(){f(e);let i=c();return x(i.saveQaSettings())}),d(37),r()()()()}if(n&2){let e=s,t=c();l(5),$(e.systemPrompt),l(5),L(" ",e.userPromptTemplate," "),l(2),oe(" Placeholderek: ","{{TRANSCRIPT}}"," = nyers sz\xF6veg, ","{{NOTE_CONTEXT}}"," = jegyzet, ","{{CONFUSION_MAP}}"," = az al\xE1bbi el\xEDr\xE1s lista JSON-ban. "),l(4),g(t.qaProviderName.trim()?16:17),l(3),N("ngModel",t.qaProviderName),l(3),D(t.llmProviderSelectOptions_$()),l(2),g(t.qaShowModelSelect_$()?24:25),l(2),g(t.qaModelsListFetchError_$().trim()?26:-1),l(5),D(t.confusionMapList_$()),l(5),y("disabled",t.qaSettingsSaving_$()),l(),L(" ",t.qaSettingsSaving_$()?"Ment\xE9s\u2026":"QA be\xE1ll\xEDt\xE1sok ment\xE9se"," ")}}function Ie(n,s){n&1&&(o(0,"p",9),d(1,"QA be\xE1ll\xEDt\xE1sok bet\xF6lt\xE9se\u2026"),r())}function ze(n,s){if(n&1){let e=T();o(0,"p",68),d(1," A QA be\xE1ll\xEDt\xE1sok bet\xF6lt\xE9se sikertelen. "),r(),o(2,"button",69),m("click",function(){f(e);let i=c();return x(i.loadQaSettings())}),d(3," \xDAjra bet\xF6lt\xE9s "),r()}}function Ue(n,s){if(n&1&&(o(0,"span",78),d(1),r()),n&2){let e=c().$implicit;l(),$(e.text)}}function je(n,s){if(n&1&&(o(0,"span",79),d(1),r()),n&2){let e=c().$implicit;l(),$(e.text)}}function He(n,s){if(n&1&&(o(0,"span",80),d(1),r()),n&2){let e=c().$implicit;l(),$(e.text)}}function Ge(n,s){if(n&1&&C(0,Ue,2,1,"span",78)(1,je,2,1,"span",79)(2,He,2,1,"span",80),n&2){let e=s.$implicit,t=c(3);g(e.kind===t.SttQaDiffKind.equal?0:e.kind===t.SttQaDiffKind.removed?1:2)}}function Ke(n,s){if(n&1&&(o(0,"div",70)(1,"p",75),d(2," V\xE1ltoz\xE1sok (kiemelve) "),r(),o(3,"p",76),B(4,Ge,3,1,null,null,Ee),r(),o(6,"p",77),d(7," \xC1th\xFAzva: nyers STT; kiemelve: jav\xEDtott sz\xF6veg. Al\xE1bb a teljes k\xE9t v\xE1ltozat. "),r()()),n&2){let e=c(2);l(4),D(e.lastQaWordDiffSegments_$())}}function Je(n,s){if(n&1&&(o(0,"p",74),d(1,"Magyar\xE1zat:"),r(),o(2,"p",81),d(3),r()),n&2){let e=c();l(3),$(e.explanation)}}function Ze(n,s){if(n&1&&(o(0,"div",13),C(1,Ke,8,0,"div",70),o(2,"p",71),d(3,"Volt m\xF3dos\xEDt\xE1s: igen."),r(),o(4,"p",72),d(5,"Eredeti (nyers STT):"),r(),o(6,"p",73),d(7),r(),o(8,"p",74),d(9,"Jav\xEDtott:"),r(),o(10,"p",73),d(11),r(),C(12,Je,4,1),r()),n&2){let e=s,t=c();l(),g(t.lastQaWordDiffSegments_$().length>0?1:-1),l(6),$(e.original),l(4),$(e.corrected),l(),g(e.explanation?12:-1)}}function Xe(n,s){n&1&&(o(0,"p",14),d(1," M\xE9g nem volt STT QA jav\xEDt\xE1s. "),r())}var vt=(()=>{class n{globalError_CS=q(fe);soundRecorder_CS=q(Ce);voiceSttQaUi_DS=q(ge);voiceInputUi_DS=q(be);qaEnabled=H(void 0);compactLayout=H(!1);transcriptReady=new j;transcriptSegmentReady=new j;busy_$=p(!1);pendingTranscriptionCount=0;emitChain=Promise.resolve();volume_$=p(0);isQaEnabledFromSettings_$=p(!1);settingsOpen_$=p(!1);qaSettings_$=p(null);confusionMapList_$=p([]);qaSettingsSaving_$=p(!1);qaSettingsLoading_$=p(!1);settingsQaEnabled=!1;qaProviderName="";qaModelName="";llmProviderSelectOptions_$=p([]);qaModelsForProvider_$=p([]);qaModelsListFetchError_$=p("");lastQaTransformation_$=p(null);infoOpen_$=p(!1);mediaUnavailable_$=p(null);defaultLlmProvider_$=p("");defaultLlmModel_$=p("");volumePercent_$=v(()=>Math.min(100,this.volume_$()*250));qaShowModelSelect_$=v(()=>this.qaModelsForProvider_$().length>0);lastQaTextWasModified_$=v(()=>{let e=this.lastQaTransformation_$();return e===null?!1:e.original!==e.corrected});lastQaWordDiffSegments_$=v(()=>{let e=this.lastQaTransformation_$();return e===null||e.original===e.corrected?[]:U.buildWordDiff(e.original,e.corrected)});SttQaDiffKind=k;defaultLlmProviderDisplayLabel_$=v(()=>{let e=this.llmProviderSelectOptions_$(),t=this.defaultLlmProvider_$().trim();return t.length?e.find(a=>a.value===t)?.label??t:""});qaProviderDisplayLabel_$=v(()=>{let e=this.qaProviderName.trim();return e.length?this.llmProviderSelectOptions_$().find(a=>a.value===e)?.label??e:""});ngOnInit(){let e=z.getMediaRecordingAvailability();if(!e.supported&&e.reason){let t=e.reason;this.mediaUnavailable_$.set(z.getMediaUnavailableMessage(t)),this.globalError_CS.reportErrorOnly({message:z.getMediaUnavailableReportMessage(t),source:"ccap-voice-record-button"})}this.soundRecorder_CS.setOnChunk((t,i)=>{this.onChunk(t,i)}),this.soundRecorder_CS.setOnVolume(t=>{this.volume_$.set(t)}),this.soundRecorder_CS.setOnError(t=>{this.globalError_CS.showError(t,"ccap-voice-record-button")})}ngOnDestroy(){this.soundRecorder_CS.stopListening()}toggleRecord(){return P(this,null,function*(){if(this.mediaUnavailable_$()!==null)return;if(this.soundRecorder_CS.state_$()===R.stopped){this.qaEnabled()===void 0&&(yield this.loadQaEnabledOnce());try{yield this.soundRecorder_CS.startListening()}catch(t){this.globalError_CS.showError(t,"ccap-voice-record-button")}}else this.soundRecorder_CS.stopListening()})}loadQaEnabledOnce(){return P(this,null,function*(){this.isQaEnabledFromSettings_$.set(yield this.voiceSttQaUi_DS.fetchQaEnabledFlag())})}handleAutoSendAfterVoiceChange(e){this.voiceInputUi_DS.setAutoSendAfterVoice(e)}toggleSettings(){this.settingsOpen_$.update(e=>!e),this.settingsOpen_$()&&this.loadQaSettings()}toggleInfo(){this.infoOpen_$.update(e=>!e)}loadQaSettings(){return P(this,null,function*(){this.qaSettingsLoading_$.set(!0);try{let e=yield this.voiceSttQaUi_DS.loadSttQaSettingsPanelState(),t=e.qa;this.qaSettings_$.set(t),this.confusionMapList_$.set([...t.confusionMap??[]]),this.settingsQaEnabled=t.qaEnabled===!0,this.isQaEnabledFromSettings_$.set(t.qaEnabled===!0),this.qaProviderName=t.providerName??"",this.qaModelName=t.modelName??"",this.llmProviderSelectOptions_$.set(e.llmProviderSelectOptions),this.defaultLlmProvider_$.set(e.defaultLlmProvider),this.defaultLlmModel_$.set(e.defaultLlmModel),this.qaModelsForProvider_$.set(e.qaModelsForProvider),this.qaModelsListFetchError_$.set(e.qaModelsListFetchError)}catch(e){this.globalError_CS.showError(e,"ccap-voice-record-button"),this.qaSettings_$.set(null),this.confusionMapList_$.set([]),this.llmProviderSelectOptions_$.set([]),this.qaModelsListFetchError_$.set(""),this.qaModelsForProvider_$.set([])}finally{this.qaSettingsLoading_$.set(!1)}})}loadQaModelsForProvider(e){return P(this,null,function*(){let t=yield this.voiceSttQaUi_DS.fetchLlmModelsListForSttQa(e);this.qaModelsForProvider_$.set(t.models),this.qaModelsListFetchError_$.set(t.errorMessage)})}onQaProviderChange(){this.loadQaModelsForProvider(this.qaProviderName),this.qaModelName=""}addConfusionEntry(){this.confusionMapList_$.update(e=>[...e,{from:"",to:""}])}removeConfusionEntry(e){this.confusionMapList_$.update(t=>t.filter((i,a)=>a!==e))}updateConfusionFrom(e,t){this.confusionMapList_$.update(i=>{let a=[...i];return a[e]&&(a[e]={from:t,to:a[e].to}),a})}updateConfusionTo(e,t){this.confusionMapList_$.update(i=>{let a=[...i];return a[e]&&(a[e]={from:a[e].from,to:t}),a})}saveQaSettings(){return P(this,null,function*(){this.qaSettingsSaving_$.set(!0);try{let e=this.voiceSttQaUi_DS.normalizeConfusionMapEntries(this.confusionMapList_$());yield this.voiceSttQaUi_DS.saveVoiceNotesQaSettings({confusionMap:e,providerName:this.qaProviderName.trim()||void 0,modelName:this.qaModelName.trim()||void 0,qaEnabled:this.settingsQaEnabled}),this.confusionMapList_$.set([...e]),this.isQaEnabledFromSettings_$.set(this.settingsQaEnabled);let t=this.qaSettings_$();t!==null&&this.qaSettings_$.set({systemPrompt:t.systemPrompt,userPromptTemplate:t.userPromptTemplate,confusionMap:e,providerName:this.qaProviderName.trim()||"",modelName:this.qaModelName.trim()||"",qaEnabled:this.settingsQaEnabled})}catch(e){this.globalError_CS.showError(e,"ccap-voice-record-button")}finally{this.qaSettingsSaving_$.set(!1)}})}onEscape(){this.settingsOpen_$()&&this.settingsOpen_$.set(!1),this.infoOpen_$()&&this.infoOpen_$.set(!1)}effectiveQaEnabled_$=v(()=>this.qaEnabled()!==void 0?this.qaEnabled():this.isQaEnabledFromSettings_$());onChunk(e,t){return P(this,null,function*(){this.pendingTranscriptionCount++,this.busy_$.set(!0);let i=this.emitChain,a=()=>{};this.emitChain=new Promise(u=>{a=u});try{let u=yield this.voiceSttQaUi_DS.transcribeVoiceChunk({blob:e,mimeType:t.mimeType,filename:t.filename,qaEnabled:this.effectiveQaEnabled_$(),noteContext:"",skipClassification:!0});if(yield i,u.ok===!1){this.transcriptSegmentReady.emit({text:"",isFinal:t.isFinal});return}let _=u;if(_.qaFailed===!0){let b=_.qaFailureMessage?.trim()??"";b.length>0&&this.globalError_CS.showError(new Error(b),"voice-stt-qa")}let w=_.correctedTranscript!=null&&_.correctedTranscript.trim().length>0?_.correctedTranscript.trim():(_.transcript??"").trim();_.usedQa===!0&&(_.transcript??"").trim().length>0&&(_.correctedTranscript??"").trim().length>0&&this.lastQaTransformation_$.set({original:(_.transcript??"").trim(),corrected:(_.correctedTranscript??"").trim(),explanation:(_.qaExplanation??"").trim()||void 0,input:_.qaInput}),w&&(this.transcriptReady.emit(w),this.transcriptSegmentReady.emit({text:w,isFinal:t.isFinal}))}catch(u){this.globalError_CS.showError(u,"ccap-voice-record-button")}finally{a(),this.pendingTranscriptionCount--,this.pendingTranscriptionCount<=0&&(this.pendingTranscriptionCount=0,this.busy_$.set(!1))}})}recordStateLabel_$=v(()=>this.soundRecorder_CS.state_$()===R.stopped?"Felv\xE9tel":"Stop");isRecordActive_$=v(()=>{let e=this.soundRecorder_CS.state_$();return e===R.standby||e===R.running});isRecording_$=v(()=>this.soundRecorder_CS.state_$()===R.running);recordButtonAriaLabel_$=v(()=>{let e=this.mediaUnavailable_$();return e||(this.isRecordActive_$()?"Stop":this.busy_$()?"\xDAj felv\xE9tel (feldolgoz\xE1s folyamatban)":"Felv\xE9tel")});recordButtonTitle_$=v(()=>{let e=this.mediaUnavailable_$();return e||(this.isRecordActive_$()?"Stop":this.busy_$()?"\xDAj felv\xE9tel \u2014 el\u0151z\u0151 feldolgoz\xE1s folyamatban":"Felv\xE9tel")});static \u0275fac=function(t){return new(t||n)};static \u0275cmp=Y({type:n,selectors:[["app-ccap-voice-record-button"]],hostBindings:function(t,i){t&1&&m("keydown.escape",function(){return i.onEscape()},!1,ee)},inputs:{qaEnabled:[1,"qaEnabled"],compactLayout:[1,"compactLayout"]},outputs:{transcriptReady:"transcriptReady",transcriptSegmentReady:"transcriptSegmentReady"},standalone:!0,features:[ae],decls:25,vars:14,consts:[[1,"flex","flex-col","items-center","gap-1"],[3,"closed","isOpen","title","maxWidth","zIndex","bodyFlexColumn"],[1,"flex","flex-col","flex-1","min-h-0","w-full","overflow-y-auto","overflow-x-hidden","overscroll-y-contain"],[1,"flex","flex-col","gap-2","shrink-0"],[1,"flex","items-center","gap-2","cursor-pointer","select-none"],["type","checkbox","name","settingsQaEnabled",3,"ngModelChange","ngModel"],[1,"text-sm","text-neutral-300"],["type","checkbox","name","autoSendAfterVoice",3,"ngModelChange","ngModel"],[1,"mt-3","pt-3","border-t","border-neonDefault","flex","flex-col","gap-3","shrink-0"],[1,"mt-3","pt-3","border-t","border-neonDefault","text-xs","text-neutral-400"],["modal-footer","",1,"shrink-0","px-4","py-3","border-t","border-neonDefault"],["type","button",1,"w-full","px-3","py-1.5","text-sm","border","border-neonCyan","rounded","text-neutral-300","hover:shadow-neon-glow-cyan","transition-colors",3,"click"],[3,"closed","isOpen","title","maxWidth","zIndex"],[1,"space-y-2","text-sm"],[1,"text-xs","text-neutral-500"],[1,"flex","items-center","gap-2"],["type","button","aria-label","Be\xE1ll\xEDt\xE1sok","title","Be\xE1ll\xEDt\xE1sok",1,"w-5","h-5","rounded-full","flex","items-center","justify-center","bg-neutral-900","border-2","border-neonDefault","text-neonCyan","hover:border-neonCyan","hover:shadow-neon-glow-cyan","transition-all","duration-200","focus:outline-none","focus:ring-2","focus:ring-neonCyan","focus:ring-offset-2","focus:ring-offset-neutral-900",3,"click"],["viewBox","0 0 24 24","fill","none","stroke","currentColor","stroke-width","2","stroke-linecap","round","stroke-linejoin","round","aria-hidden","true",1,"w-2.5","h-2.5","shrink-0"],["d","M12 15a3 3 0 1 0 0-6 3 3 0 0 0 0 6Z"],["d","M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 0 1 0 2.83 2 2 0 0 1-2.83 0l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 0 1-2 2 2 2 0 0 1-2-2v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 0 1-2.83 0 2 2 0 0 1 0-2.83l.06-.06a1.65 1.65 0 0 0 .33-1.82 1.65 1.65 0 0 0-1.51-1H3a2 2 0 0 1-2-2 2 2 0 0 1 2-2h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 0 1 0-2.83 2 2 0 0 1 2.83 0l.06.06a1.65 1.65 0 0 0 1.82.33H9a1.65 1.65 0 0 0 1-1.51V3a2 2 0 0 1 2-2 2 2 0 0 1 2 2v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 0 1 2.83 0 2 2 0 0 1 0 2.83l-.06.06a1.65 1.65 0 0 0-.33 1.82V9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 0 1 2 2 2 2 0 0 1-2 2h-.09a1.65 1.65 0 0 0-1.51 1z"],["type","button",1,"w-5","h-5","rounded-full","flex","items-center","justify-center","bg-neutral-900","border-2","transition-all","duration-200","focus:outline-none","focus:ring-2","focus:ring-offset-2","focus:ring-offset-neutral-900",3,"click"],["cx","12","cy","12","r","10"],["d","M12 16v-4"],["d","M12 8h.01"],["type","button",1,"flex","items-center","justify-center","min-w-[44px]","min-h-[44px]","w-10","h-10","rounded-full","shrink-0","bg-neutral-900","border-2","text-white","transition-all","duration-200","disabled:opacity-50","border-neonDefault","hover:border-neonCyan","hover:shadow-neon-glow-cyan","focus:outline-none","focus:ring-2","focus:ring-neonCyan","focus:ring-offset-2","focus:ring-offset-neutral-900",3,"click","disabled"],["aria-hidden","true",1,"inline-block","w-5","h-5","shrink-0","animate-spin","rounded-full","border-2","border-neonCyan/40","border-t-neonCyan"],[1,"flex","flex-col","items-center","gap-0.5","shrink-0"],[1,"text-[11px]","text-amber-300","leading-tight","max-w-[180px]","text-center"],["aria-hidden","true",1,"relative","w-2","h-6","rounded-sm","bg-neutral-800","overflow-hidden"],["viewBox","0 0 24 24","fill","none","stroke","currentColor","stroke-width","2","stroke-linecap","round","stroke-linejoin","round","aria-hidden","true",1,"w-5","h-5","shrink-0","text-neonCyan"],["d","M12 2a3 3 0 0 1 3 3v7a3 3 0 0 1-6 0V5a3 3 0 0 1 3-3Z"],["d","M19 10v2a7 7 0 0 1-14 0v-2"],["x1","12","y1","19","x2","12","y2","22"],[1,"absolute","inset-x-0","bottom-0","bg-neonCyan","transition-[height]","duration-75"],[1,"absolute","inset-x-0","h-0.5","bg-neonAmber","rounded-sm","z-10",2,"bottom","5%"],["aria-hidden","true",1,"mr-1"],[1,"relative","inline-flex"],["type","button","aria-label","Be\xE1ll\xEDt\xE1sok","title","Be\xE1ll\xEDt\xE1sok",1,"absolute","right-full","mr-4","top-1/2","-translate-y-1/2","w-5","h-5","rounded-full","flex","items-center","justify-center","bg-neutral-900","border-2","border-neonDefault","text-neonCyan","hover:border-neonCyan","hover:shadow-neon-glow-cyan","transition-all","duration-200","focus:outline-none","focus:ring-2","focus:ring-neonCyan","focus:ring-offset-2","focus:ring-offset-neutral-900",3,"click"],["type","button",1,"absolute","left-full","ml-4","top-1/2","-translate-y-1/2","w-5","h-5","rounded-full","flex","items-center","justify-center","bg-neutral-900","border-2","transition-all","duration-200","focus:outline-none","focus:ring-2","focus:ring-offset-2","focus:ring-offset-neutral-900",3,"click"],[1,"text-[11px]","text-amber-300","leading-tight","max-w-[240px]","mt-1"],[1,"shrink-0"],[1,"text-xs","font-medium","text-neutral-400","mb-1"],[1,"text-xs","text-neutral-300","whitespace-pre-wrap","break-words"],[1,"text-xs","text-neutral-300","whitespace-pre-wrap","break-words","font-mono"],[1,"text-[10px]","text-neonAmber","mt-1"],[1,"text-[10px]","text-neutral-500","mb-1"],[1,"flex","flex-wrap","gap-2","items-center"],["name","qaProviderName",1,"px-2","py-1","text-xs","bg-neutral-800","border","border-neonDefault","rounded","text-neutral-200","min-w-[120px]",3,"ngModelChange","ngModel"],["value",""],[3,"value"],["name","qaModelName",1,"px-2","py-1","text-xs","bg-neutral-800","border","border-neonDefault","rounded","text-neutral-200","min-w-[140px]",3,"ngModel"],["type","text","name","qaModelNameText","placeholder","Modell id (lista nem el\xE9rhet\u0151 ehhez a providerhez)",1,"px-2","py-1","text-xs","bg-neutral-800","border","border-neonDefault","rounded","text-neutral-200","min-w-[140px]","font-mono",3,"ngModel"],[1,"text-[10px]","text-amber-300/90","mt-1"],[1,"flex","flex-col","shrink-0"],[1,"text-xs","font-medium","text-neutral-400","mb-1","shrink-0"],[1,"space-y-1.5","rounded","border","border-neonDefault/50","bg-neutral-800/20","p-2"],[1,"flex","flex-wrap","gap-2","items-center","shrink-0","mt-2"],["type","button",1,"px-2","py-1","text-xs","border","border-neonDefault","rounded","text-neutral-400","hover:border-neonCyan","hover:text-neonCyan","transition-colors",3,"click"],["type","button",1,"px-2","py-1","text-xs","border","border-neonCyan","rounded","text-neonCyan","hover:shadow-neon-glow-cyan","disabled:opacity-50","transition-colors",3,"click","disabled"],["name","qaModelName",1,"px-2","py-1","text-xs","bg-neutral-800","border","border-neonDefault","rounded","text-neutral-200","min-w-[140px]",3,"ngModelChange","ngModel"],["type","text","name","qaModelNameText","placeholder","Modell id (lista nem el\xE9rhet\u0151 ehhez a providerhez)",1,"px-2","py-1","text-xs","bg-neutral-800","border","border-neonDefault","rounded","text-neutral-200","min-w-[140px]","font-mono",3,"ngModelChange","ngModel"],["type","text","placeholder","El\xEDr\xE1s / f\xE9lrehall\xE1s",1,"flex-1","min-w-0","px-2","py-1","text-xs","bg-neutral-800","border","border-neonDefault","rounded","text-neutral-200","placeholder-neutral-500",3,"input","value"],[1,"text-neutral-500","shrink-0"],["type","text","placeholder","Helyes forma",1,"flex-1","min-w-0","px-2","py-1","text-xs","bg-neutral-800","border","border-neonDefault","rounded","text-neutral-200","placeholder-neutral-500",3,"input","value"],["type","button","aria-label","Sor t\xF6rl\xE9se","title","Sor t\xF6rl\xE9se",1,"shrink-0","p-1","text-neutral-500","hover:text-neonRed","transition-colors",3,"click"],[1,"sr-only"],["viewBox","0 0 24 24","fill","none","stroke","currentColor","stroke-width","2",1,"w-3.5","h-3.5"],["d","M18 6L6 18M6 6l12 12"],[1,"mt-3","pt-3","border-t","border-neonDefault","text-xs","text-neutral-500"],["type","button",1,"mt-1.5","px-2","py-1","text-xs","border","border-neonDefault","rounded","text-neutral-400","hover:border-neonCyan","hover:text-neonCyan","transition-colors",3,"click"],[1,"rounded-md","border","border-neonAmber/45","bg-neutral-950/95","p-2.5","mb-1"],[1,"font-medium","text-neonAmber"],[1,"text-neutral-400","text-xs"],[1,"text-neutral-200","break-words"],[1,"text-neutral-400","text-xs","mt-2"],[1,"text-[10px]","font-semibold","uppercase","tracking-wide","text-neonAmber/90","mb-1.5"],[1,"text-xs","leading-relaxed","whitespace-pre-wrap","break-words"],[1,"text-[10px]","text-neutral-500","mt-1.5","leading-snug"],[1,"text-neutral-300"],[1,"mx-0.5","inline","rounded","px-0.5","text-red-300/95","line-through","decoration-red-400/85","bg-red-950/50","border","border-red-900/45"],[1,"mx-0.5","inline","rounded","px-0.5","text-neonAmber","bg-amber-950/55","border","border-neonAmber/50","shadow-[0_0_10px_rgb(251_191_36/0.28)]"],[1,"text-neutral-300","break-words"]],template:function(t,i){if(t&1&&(C(0,Ae,15,35,"div",0)(1,Re,14,35),o(2,"app-s-modal",1),m("closed",function(){return i.settingsOpen_$.set(!1)}),o(3,"div",2)(4,"div",3)(5,"label",4)(6,"input",5),O("ngModelChange",function(u){return W(i.settingsQaEnabled,u)||(i.settingsQaEnabled=u),u}),r(),o(7,"span",6),d(8,"STT QA"),r()(),o(9,"label",4)(10,"input",7),m("ngModelChange",function(u){return i.handleAutoSendAfterVoiceChange(u)}),r(),o(11,"span",6),d(12,"Send immediately after voice (Mimik-style)"),r()()(),C(13,Oe,38,11,"div",8)(14,Ie,2,0,"p",9)(15,ze,4,0),r(),o(16,"div",10)(17,"button",11),m("click",function(){return i.settingsOpen_$.set(!1)}),d(18," Bez\xE1r\xE1s "),r()()(),o(19,"app-s-modal",12),m("closed",function(){return i.infoOpen_$.set(!1)}),C(20,Ze,13,4,"div",13)(21,Xe,2,0,"p",14),o(22,"div",10)(23,"button",11),m("click",function(){return i.infoOpen_$.set(!1)}),d(24," Bez\xE1r\xE1s "),r()()()),t&2){let a,u;g(i.compactLayout()?0:1),l(2),y("isOpen",i.settingsOpen_$())("title","Voice Input be\xE1ll\xEDt\xE1sok")("maxWidth","lg")("zIndex","40")("bodyFlexColumn",!0),l(4),N("ngModel",i.settingsQaEnabled),l(4),y("ngModel",i.voiceInputUi_DS.autoSendAfterVoice_$()),l(3),g((a=i.qaSettings_$())?13:i.qaSettingsLoading_$()?14:15,a),l(6),y("isOpen",i.infoOpen_$())("title","Utols\xF3 QA eredm\xE9ny")("maxWidth","md")("zIndex","40"),l(),g((u=i.lastQaTransformation_$())?20:21,u)}},dependencies:[pe,_e,me,se,le,ue,de,ce,xe],encapsulation:2})}return n})();export{be as a,vt as b};
2
- //# sourceMappingURL=chunk-LR3E2GDS.js.map
1
+ import{a as R,b as z,c as Ce}from"./chunk-CN76LOPU.js";import{c as ge}from"./chunk-7VUQTBJ2.js";import{a as xe}from"./chunk-FLAJXIYW.js";import{b as le,c as se,f as de,i as ce,n as ue,o as _e,p as me,v as pe}from"./chunk-EO4DNTT4.js";import{a as K}from"./chunk-5UPNU54P.js";import{j as fe}from"./chunk-ZLCRMQAK.js";import{C as q,D as Y,Fa as d,Ga as $,Ha as L,Ia as ie,J as f,Ja as oe,K as x,Ka as re,L as A,M as I,Ma as N,Na as W,Oa as O,Q as j,Ta as ae,U as H,Y as ee,Z as l,aa as p,da as C,fa as V,ga as y,ha as G,hb as v,ia as F,k as P,la as g,ma as te,na as ne,oa as B,pa as D,qa as o,ra as r,sa as S,ua as T,va as m,wa as c,y as X}from"./chunk-TBMJSIBB.js";var he="ccap-voiceInput:autoSendAfterVoice",be=(()=>{class n{autoSendAfterVoice_$=p(n.readAutoSendAfterVoiceFromStorage());setAutoSendAfterVoice(e){this.autoSendAfterVoice_$.set(e),K.writeString(he,String(e))}static readAutoSendAfterVoiceFromStorage(){return K.readString(he)==="true"}static \u0275fac=function(t){return new(t||n)};static \u0275prov=X({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})();var k=function(n){return n.equal="equal",n.removed="removed",n.added="added",n}(k||{});var U=class n{static tokenize(s){let e=s;if(e.length===0)return[];let t=e.split(/(\s+)/),i=[];for(let a=0;a<t.length;a++){let u=t[a];u.length>0&&i.push(u)}return i}static mergeAndAssignIds(s){if(s.length===0)return[];let e=[];for(let i=0;i<s.length;i++){let a=s[i],u=e[e.length-1];u!==void 0&&u.kind===a.kind?u.text=u.text+a.text:e.push({kind:a.kind,text:a.text})}let t=[];for(let i=0;i<e.length;i++){let a=e[i];t.push({id:i,kind:a.kind,text:a.text})}return t}static buildWordDiff(s,e){let t=n.tokenize(s),i=n.tokenize(e),a=t.length,u=i.length,_=[];for(let h=0;h<=a;h++){let E=[];for(let Q=0;Q<=u;Q++)E.push(0);_.push(E)}for(let h=1;h<=a;h++)for(let E=1;E<=u;E++)if(t[h-1]===i[E-1])_[h][E]=_[h-1][E-1]+1;else{let Q=_[h-1][E],Z=_[h][E-1];_[h][E]=Q>Z?Q:Z}let w=[],b=a,M=u;for(;b>0||M>0;)b>0&&M>0&&t[b-1]===i[M-1]?(w.push({kind:k.equal,text:t[b-1]}),b-=1,M-=1):M>0&&(b===0||_[b][M-1]>=_[b-1][M])?(w.push({kind:k.added,text:i[M-1]}),M-=1):b>0&&(w.push({kind:k.removed,text:t[b-1]}),b-=1);let J=[];for(let h=w.length-1;h>=0;h--)J.push(w[h]);return n.mergeAndAssignIds(J)}};var Se=(n,s)=>s.value,Ee=(n,s)=>s.id;function ye(n,s){n&1&&S(0,"span",25)}function $e(n,s){if(n&1&&(o(0,"div",28),S(1,"div",33)(2,"div",34),r()),n&2){let e=c(3);l(),G("height",e.volumePercent_$(),"%")}}function we(n,s){if(n&1&&(o(0,"div",26),C(1,$e,3,2,"div",28),A(),o(2,"svg",29),S(3,"path",30)(4,"path",31)(5,"line",32),r()()),n&2){let e=c(2);l(),g(e.isRecordActive_$()?1:-1)}}function Me(n,s){n&1&&(o(0,"p",27)(1,"span",35),d(2,"\u26A0"),r(),d(3),r()),n&2&&(V("aria-live","polite"),l(3),L("",s," "))}function Ae(n,s){if(n&1){let e=T();o(0,"div",0)(1,"div",15)(2,"button",16),m("click",function(i){return f(e),c().toggleSettings(),x(i.stopPropagation())}),A(),o(3,"svg",17),S(4,"path",18)(5,"path",19),r()(),I(),o(6,"button",20),m("click",function(i){return f(e),c().toggleInfo(),x(i.stopPropagation())}),A(),o(7,"svg",17),S(8,"circle",21)(9,"path",22)(10,"path",23),r()()(),I(),o(11,"button",24),m("click",function(){f(e);let i=c();return x(i.toggleRecord())}),C(12,ye,1,0,"span",25)(13,we,6,1,"div",26),r(),C(14,Me,4,2,"p",27),r()}if(n&2){let e,t=c();l(6),F("border-neonDefault",!t.lastQaTextWasModified_$())("text-neonCyan",!t.lastQaTextWasModified_$())("hover:border-neonCyan",!t.lastQaTextWasModified_$())("hover:shadow-neon-glow-cyan",!t.lastQaTextWasModified_$())("focus:ring-neonCyan",!t.lastQaTextWasModified_$())("border-neonAmber",t.lastQaTextWasModified_$())("text-neonAmber",t.lastQaTextWasModified_$())("shadow-neon-glow-orange",t.lastQaTextWasModified_$())("hover:border-neonAmber",t.lastQaTextWasModified_$())("hover:shadow-neon-glow-orange",t.lastQaTextWasModified_$())("focus:ring-neonAmber",t.lastQaTextWasModified_$()),V("aria-label",t.lastQaTextWasModified_$()?"Utols\xF3 QA eredm\xE9ny \u2014 a sz\xF6veg m\xF3dosult":"Utols\xF3 QA eredm\xE9ny")("title",t.lastQaTextWasModified_$()?"Utols\xF3 QA eredm\xE9ny \u2014 a sz\xF6veg m\xF3dosult (r\xE9szletek)":"Utols\xF3 QA eredm\xE9ny"),l(5),F("border-neonCyan",t.isRecordActive_$()||t.busy_$())("shadow-neon-glow-cyan",t.isRecordActive_$()||t.busy_$())("animate-pulse",t.isRecording_$()),y("disabled",t.mediaUnavailable_$()!==null),V("aria-label",t.recordButtonAriaLabel_$())("title",t.recordButtonTitle_$()),l(),g(t.busy_$()&&!t.isRecordActive_$()?12:13),l(2),g((e=t.mediaUnavailable_$())?14:-1,e)}}function Te(n,s){n&1&&S(0,"span",25)}function Pe(n,s){if(n&1&&(o(0,"div",28),S(1,"div",33)(2,"div",34),r()),n&2){let e=c(3);l(),G("height",e.volumePercent_$(),"%")}}function Ve(n,s){if(n&1&&(o(0,"div",26),C(1,Pe,3,2,"div",28),A(),o(2,"svg",29),S(3,"path",30)(4,"path",31)(5,"line",32),r()()),n&2){let e=c(2);l(),g(e.isRecordActive_$()?1:-1)}}function ke(n,s){n&1&&(o(0,"p",39)(1,"span",35),d(2,"\u26A0"),r(),d(3),r()),n&2&&(V("aria-live","polite"),l(3),L("",s," "))}function Re(n,s){if(n&1){let e=T();o(0,"div",36)(1,"button",24),m("click",function(){f(e);let i=c();return x(i.toggleRecord())}),C(2,Te,1,0,"span",25)(3,Ve,6,1,"div",26),r(),o(4,"button",37),m("click",function(i){return f(e),c().toggleSettings(),x(i.stopPropagation())}),A(),o(5,"svg",17),S(6,"path",18)(7,"path",19),r()(),I(),o(8,"button",38),m("click",function(i){return f(e),c().toggleInfo(),x(i.stopPropagation())}),A(),o(9,"svg",17),S(10,"circle",21)(11,"path",22)(12,"path",23),r()()(),C(13,ke,4,2,"p",39)}if(n&2){let e,t=c();l(),F("border-neonCyan",t.isRecordActive_$()||t.busy_$())("shadow-neon-glow-cyan",t.isRecordActive_$()||t.busy_$())("animate-pulse",t.isRecording_$()),y("disabled",t.mediaUnavailable_$()!==null),V("aria-label",t.recordButtonAriaLabel_$())("title",t.recordButtonTitle_$()),l(),g(t.busy_$()&&!t.isRecordActive_$()?2:3),l(6),F("border-neonDefault",!t.lastQaTextWasModified_$())("text-neonCyan",!t.lastQaTextWasModified_$())("hover:border-neonCyan",!t.lastQaTextWasModified_$())("hover:shadow-neon-glow-cyan",!t.lastQaTextWasModified_$())("focus:ring-neonCyan",!t.lastQaTextWasModified_$())("border-neonAmber",t.lastQaTextWasModified_$())("text-neonAmber",t.lastQaTextWasModified_$())("shadow-neon-glow-orange",t.lastQaTextWasModified_$())("hover:border-neonAmber",t.lastQaTextWasModified_$())("hover:shadow-neon-glow-orange",t.lastQaTextWasModified_$())("focus:ring-neonAmber",t.lastQaTextWasModified_$()),V("aria-label",t.lastQaTextWasModified_$()?"Utols\xF3 QA eredm\xE9ny \u2014 a sz\xF6veg m\xF3dosult":"Utols\xF3 QA eredm\xE9ny")("title",t.lastQaTextWasModified_$()?"Utols\xF3 QA eredm\xE9ny \u2014 a sz\xF6veg m\xF3dosult (r\xE9szletek)":"Utols\xF3 QA eredm\xE9ny"),l(5),g((e=t.mediaUnavailable_$())?13:-1,e)}}function Qe(n,s){if(n&1&&(o(0,"p",45),d(1),r()),n&2){let e=c(2);l(),re(" Override: ",e.qaProviderDisplayLabel_$()," / ",e.qaModelName||"\u2014"," (glob\xE1l: ",e.defaultLlmProviderDisplayLabel_$()||"\u2014"," / ",e.defaultLlmModel_$()||"\u2014","). ")}}function qe(n,s){if(n&1&&(o(0,"p",45),d(1),r()),n&2){let e=c(2);l(),ie(" Nincs be\xE1ll\xEDtva \u2013 haszn\xE1lt: ",e.defaultLlmProviderDisplayLabel_$()||"\u2014"," / ",e.defaultLlmModel_$()||"\u2014"," (glob\xE1l). ")}}function Fe(n,s){if(n&1&&(o(0,"option",49),d(1),r()),n&2){let e=s.$implicit;y("value",e.value),l(),$(e.label)}}function Be(n,s){if(n&1&&(o(0,"option",49),d(1),r()),n&2){let e=s.$implicit;y("value",e),l(),$(e)}}function De(n,s){if(n&1){let e=T();o(0,"select",59),O("ngModelChange",function(i){f(e);let a=c(2);return W(a.qaModelName,i)||(a.qaModelName=i),x(i)}),o(1,"option",48),d(2,"\u2014 default \u2014"),r(),B(3,Be,2,2,"option",49,ne),r()}if(n&2){let e=c(2);N("ngModel",e.qaModelName),l(3),D(e.qaModelsForProvider_$())}}function Le(n,s){if(n&1){let e=T();o(0,"input",60),O("ngModelChange",function(i){f(e);let a=c(2);return W(a.qaModelName,i)||(a.qaModelName=i),x(i)}),r()}if(n&2){let e=c(2);N("ngModel",e.qaModelName)}}function Ne(n,s){if(n&1&&(o(0,"p",52),d(1),r()),n&2){let e=c(2);l(),$(e.qaModelsListFetchError_$())}}function We(n,s){if(n&1){let e=T();o(0,"div",15)(1,"input",61),m("input",function(i){let a=f(e).$index,u=c(2);return x(u.updateConfusionFrom(a,i.target.value))}),r(),o(2,"span",62),d(3,"\u2192"),r(),o(4,"input",63),m("input",function(i){let a=f(e).$index,u=c(2);return x(u.updateConfusionTo(a,i.target.value))}),r(),o(5,"button",64),m("click",function(){let i=f(e).$index,a=c(2);return x(a.removeConfusionEntry(i))}),o(6,"span",65),d(7,"T\xF6rl\xE9s"),r(),A(),o(8,"svg",66),S(9,"path",67),r()()()}if(n&2){let e=s.$implicit;l(),y("value",e.from),l(3),y("value",e.to)}}function Oe(n,s){if(n&1){let e=T();o(0,"div",8)(1,"div",40)(2,"p",41),d(3,"System prompt (LLM-nek)"),r(),o(4,"p",42),d(5),r()(),o(6,"div",40)(7,"p",41),d(8," User prompt sablon (ide f\u0171z\u0151dik be a felv\xE9tel adata) "),r(),o(9,"p",43),d(10),r(),o(11,"p",44),d(12),r()(),o(13,"div",40)(14,"p",41),d(15,"STT QA provider \xE9s modell"),r(),C(16,Qe,2,4,"p",45)(17,qe,2,2,"p",45),o(18,"div",46)(19,"select",47),O("ngModelChange",function(i){f(e);let a=c();return W(a.qaProviderName,i)||(a.qaProviderName=i),x(i)}),m("ngModelChange",function(){f(e);let i=c();return x(i.onQaProviderChange())}),o(20,"option",48),d(21,"\u2014 default \u2014"),r(),B(22,Fe,2,2,"option",49,Se),r(),C(24,De,5,1,"select",50)(25,Le,1,1,"input",51),r(),C(26,Ne,2,1,"p",52),r(),o(27,"div",53)(28,"p",54),d(29," Tipikus el\xEDr\xE1sok / tip\xF3k (confusion map) \u2013 ezekre jav\xEDt a QA "),r(),o(30,"div",55),B(31,We,10,2,"div",15,te),r(),o(33,"div",56)(34,"button",57),m("click",function(){f(e);let i=c();return x(i.addConfusionEntry())}),d(35," + Sor hozz\xE1ad\xE1sa "),r(),o(36,"button",58),m("click",function(){f(e);let i=c();return x(i.saveQaSettings())}),d(37),r()()()()}if(n&2){let e=s,t=c();l(5),$(e.systemPrompt),l(5),L(" ",e.userPromptTemplate," "),l(2),oe(" Placeholderek: ","{{TRANSCRIPT}}"," = nyers sz\xF6veg, ","{{NOTE_CONTEXT}}"," = jegyzet, ","{{CONFUSION_MAP}}"," = az al\xE1bbi el\xEDr\xE1s lista JSON-ban. "),l(4),g(t.qaProviderName.trim()?16:17),l(3),N("ngModel",t.qaProviderName),l(3),D(t.llmProviderSelectOptions_$()),l(2),g(t.qaShowModelSelect_$()?24:25),l(2),g(t.qaModelsListFetchError_$().trim()?26:-1),l(5),D(t.confusionMapList_$()),l(5),y("disabled",t.qaSettingsSaving_$()),l(),L(" ",t.qaSettingsSaving_$()?"Ment\xE9s\u2026":"QA be\xE1ll\xEDt\xE1sok ment\xE9se"," ")}}function Ie(n,s){n&1&&(o(0,"p",9),d(1,"QA be\xE1ll\xEDt\xE1sok bet\xF6lt\xE9se\u2026"),r())}function ze(n,s){if(n&1){let e=T();o(0,"p",68),d(1," A QA be\xE1ll\xEDt\xE1sok bet\xF6lt\xE9se sikertelen. "),r(),o(2,"button",69),m("click",function(){f(e);let i=c();return x(i.loadQaSettings())}),d(3," \xDAjra bet\xF6lt\xE9s "),r()}}function Ue(n,s){if(n&1&&(o(0,"span",78),d(1),r()),n&2){let e=c().$implicit;l(),$(e.text)}}function je(n,s){if(n&1&&(o(0,"span",79),d(1),r()),n&2){let e=c().$implicit;l(),$(e.text)}}function He(n,s){if(n&1&&(o(0,"span",80),d(1),r()),n&2){let e=c().$implicit;l(),$(e.text)}}function Ge(n,s){if(n&1&&C(0,Ue,2,1,"span",78)(1,je,2,1,"span",79)(2,He,2,1,"span",80),n&2){let e=s.$implicit,t=c(3);g(e.kind===t.SttQaDiffKind.equal?0:e.kind===t.SttQaDiffKind.removed?1:2)}}function Ke(n,s){if(n&1&&(o(0,"div",70)(1,"p",75),d(2," V\xE1ltoz\xE1sok (kiemelve) "),r(),o(3,"p",76),B(4,Ge,3,1,null,null,Ee),r(),o(6,"p",77),d(7," \xC1th\xFAzva: nyers STT; kiemelve: jav\xEDtott sz\xF6veg. Al\xE1bb a teljes k\xE9t v\xE1ltozat. "),r()()),n&2){let e=c(2);l(4),D(e.lastQaWordDiffSegments_$())}}function Je(n,s){if(n&1&&(o(0,"p",74),d(1,"Magyar\xE1zat:"),r(),o(2,"p",81),d(3),r()),n&2){let e=c();l(3),$(e.explanation)}}function Ze(n,s){if(n&1&&(o(0,"div",13),C(1,Ke,8,0,"div",70),o(2,"p",71),d(3,"Volt m\xF3dos\xEDt\xE1s: igen."),r(),o(4,"p",72),d(5,"Eredeti (nyers STT):"),r(),o(6,"p",73),d(7),r(),o(8,"p",74),d(9,"Jav\xEDtott:"),r(),o(10,"p",73),d(11),r(),C(12,Je,4,1),r()),n&2){let e=s,t=c();l(),g(t.lastQaWordDiffSegments_$().length>0?1:-1),l(6),$(e.original),l(4),$(e.corrected),l(),g(e.explanation?12:-1)}}function Xe(n,s){n&1&&(o(0,"p",14),d(1," M\xE9g nem volt STT QA jav\xEDt\xE1s. "),r())}var vt=(()=>{class n{globalError_CS=q(fe);soundRecorder_CS=q(Ce);voiceSttQaUi_DS=q(ge);voiceInputUi_DS=q(be);qaEnabled=H(void 0);compactLayout=H(!1);transcriptReady=new j;transcriptSegmentReady=new j;busy_$=p(!1);pendingTranscriptionCount=0;emitChain=Promise.resolve();volume_$=p(0);isQaEnabledFromSettings_$=p(!1);settingsOpen_$=p(!1);qaSettings_$=p(null);confusionMapList_$=p([]);qaSettingsSaving_$=p(!1);qaSettingsLoading_$=p(!1);settingsQaEnabled=!1;qaProviderName="";qaModelName="";llmProviderSelectOptions_$=p([]);qaModelsForProvider_$=p([]);qaModelsListFetchError_$=p("");lastQaTransformation_$=p(null);infoOpen_$=p(!1);mediaUnavailable_$=p(null);defaultLlmProvider_$=p("");defaultLlmModel_$=p("");volumePercent_$=v(()=>Math.min(100,this.volume_$()*250));qaShowModelSelect_$=v(()=>this.qaModelsForProvider_$().length>0);lastQaTextWasModified_$=v(()=>{let e=this.lastQaTransformation_$();return e===null?!1:e.original!==e.corrected});lastQaWordDiffSegments_$=v(()=>{let e=this.lastQaTransformation_$();return e===null||e.original===e.corrected?[]:U.buildWordDiff(e.original,e.corrected)});SttQaDiffKind=k;defaultLlmProviderDisplayLabel_$=v(()=>{let e=this.llmProviderSelectOptions_$(),t=this.defaultLlmProvider_$().trim();return t.length?e.find(a=>a.value===t)?.label??t:""});qaProviderDisplayLabel_$=v(()=>{let e=this.qaProviderName.trim();return e.length?this.llmProviderSelectOptions_$().find(a=>a.value===e)?.label??e:""});ngOnInit(){let e=z.getMediaRecordingAvailability();if(!e.supported&&e.reason){let t=e.reason;this.mediaUnavailable_$.set(z.getMediaUnavailableMessage(t)),this.globalError_CS.reportErrorOnly({message:z.getMediaUnavailableReportMessage(t),source:"ccap-voice-record-button"})}this.soundRecorder_CS.setOnChunk((t,i)=>{this.onChunk(t,i)}),this.soundRecorder_CS.setOnVolume(t=>{this.volume_$.set(t)}),this.soundRecorder_CS.setOnError(t=>{this.globalError_CS.showError(t,"ccap-voice-record-button")})}ngOnDestroy(){this.soundRecorder_CS.stopListening()}toggleRecord(){return P(this,null,function*(){if(this.mediaUnavailable_$()!==null)return;if(this.soundRecorder_CS.state_$()===R.stopped){this.qaEnabled()===void 0&&(yield this.loadQaEnabledOnce());try{yield this.soundRecorder_CS.startListening()}catch(t){this.globalError_CS.showError(t,"ccap-voice-record-button")}}else this.soundRecorder_CS.stopListening()})}loadQaEnabledOnce(){return P(this,null,function*(){this.isQaEnabledFromSettings_$.set(yield this.voiceSttQaUi_DS.fetchQaEnabledFlag())})}handleAutoSendAfterVoiceChange(e){this.voiceInputUi_DS.setAutoSendAfterVoice(e)}toggleSettings(){this.settingsOpen_$.update(e=>!e),this.settingsOpen_$()&&this.loadQaSettings()}toggleInfo(){this.infoOpen_$.update(e=>!e)}loadQaSettings(){return P(this,null,function*(){this.qaSettingsLoading_$.set(!0);try{let e=yield this.voiceSttQaUi_DS.loadSttQaSettingsPanelState(),t=e.qa;this.qaSettings_$.set(t),this.confusionMapList_$.set([...t.confusionMap??[]]),this.settingsQaEnabled=t.qaEnabled===!0,this.isQaEnabledFromSettings_$.set(t.qaEnabled===!0),this.qaProviderName=t.providerName??"",this.qaModelName=t.modelName??"",this.llmProviderSelectOptions_$.set(e.llmProviderSelectOptions),this.defaultLlmProvider_$.set(e.defaultLlmProvider),this.defaultLlmModel_$.set(e.defaultLlmModel),this.qaModelsForProvider_$.set(e.qaModelsForProvider),this.qaModelsListFetchError_$.set(e.qaModelsListFetchError)}catch(e){this.globalError_CS.showError(e,"ccap-voice-record-button"),this.qaSettings_$.set(null),this.confusionMapList_$.set([]),this.llmProviderSelectOptions_$.set([]),this.qaModelsListFetchError_$.set(""),this.qaModelsForProvider_$.set([])}finally{this.qaSettingsLoading_$.set(!1)}})}loadQaModelsForProvider(e){return P(this,null,function*(){let t=yield this.voiceSttQaUi_DS.fetchLlmModelsListForSttQa(e);this.qaModelsForProvider_$.set(t.models),this.qaModelsListFetchError_$.set(t.errorMessage)})}onQaProviderChange(){this.loadQaModelsForProvider(this.qaProviderName),this.qaModelName=""}addConfusionEntry(){this.confusionMapList_$.update(e=>[...e,{from:"",to:""}])}removeConfusionEntry(e){this.confusionMapList_$.update(t=>t.filter((i,a)=>a!==e))}updateConfusionFrom(e,t){this.confusionMapList_$.update(i=>{let a=[...i];return a[e]&&(a[e]={from:t,to:a[e].to}),a})}updateConfusionTo(e,t){this.confusionMapList_$.update(i=>{let a=[...i];return a[e]&&(a[e]={from:a[e].from,to:t}),a})}saveQaSettings(){return P(this,null,function*(){this.qaSettingsSaving_$.set(!0);try{let e=this.voiceSttQaUi_DS.normalizeConfusionMapEntries(this.confusionMapList_$());yield this.voiceSttQaUi_DS.saveVoiceNotesQaSettings({confusionMap:e,providerName:this.qaProviderName.trim()||void 0,modelName:this.qaModelName.trim()||void 0,qaEnabled:this.settingsQaEnabled}),this.confusionMapList_$.set([...e]),this.isQaEnabledFromSettings_$.set(this.settingsQaEnabled);let t=this.qaSettings_$();t!==null&&this.qaSettings_$.set({systemPrompt:t.systemPrompt,userPromptTemplate:t.userPromptTemplate,confusionMap:e,providerName:this.qaProviderName.trim()||"",modelName:this.qaModelName.trim()||"",qaEnabled:this.settingsQaEnabled})}catch(e){this.globalError_CS.showError(e,"ccap-voice-record-button")}finally{this.qaSettingsSaving_$.set(!1)}})}onEscape(){this.settingsOpen_$()&&this.settingsOpen_$.set(!1),this.infoOpen_$()&&this.infoOpen_$.set(!1)}effectiveQaEnabled_$=v(()=>this.qaEnabled()!==void 0?this.qaEnabled():this.isQaEnabledFromSettings_$());onChunk(e,t){return P(this,null,function*(){this.pendingTranscriptionCount++,this.busy_$.set(!0);let i=this.emitChain,a=()=>{};this.emitChain=new Promise(u=>{a=u});try{let u=yield this.voiceSttQaUi_DS.transcribeVoiceChunk({blob:e,mimeType:t.mimeType,filename:t.filename,qaEnabled:this.effectiveQaEnabled_$(),noteContext:"",skipClassification:!0});if(yield i,u.ok===!1){this.transcriptSegmentReady.emit({text:"",isFinal:t.isFinal});return}let _=u;if(_.qaFailed===!0){let b=_.qaFailureMessage?.trim()??"";b.length>0&&this.globalError_CS.showError(new Error(b),"voice-stt-qa")}let w=_.correctedTranscript!=null&&_.correctedTranscript.trim().length>0?_.correctedTranscript.trim():(_.transcript??"").trim();_.usedQa===!0&&(_.transcript??"").trim().length>0&&(_.correctedTranscript??"").trim().length>0&&this.lastQaTransformation_$.set({original:(_.transcript??"").trim(),corrected:(_.correctedTranscript??"").trim(),explanation:(_.qaExplanation??"").trim()||void 0,input:_.qaInput}),w&&(this.transcriptReady.emit(w),this.transcriptSegmentReady.emit({text:w,isFinal:t.isFinal}))}catch(u){this.globalError_CS.showError(u,"ccap-voice-record-button")}finally{a(),this.pendingTranscriptionCount--,this.pendingTranscriptionCount<=0&&(this.pendingTranscriptionCount=0,this.busy_$.set(!1))}})}recordStateLabel_$=v(()=>this.soundRecorder_CS.state_$()===R.stopped?"Felv\xE9tel":"Stop");isRecordActive_$=v(()=>{let e=this.soundRecorder_CS.state_$();return e===R.standby||e===R.running});isRecording_$=v(()=>this.soundRecorder_CS.state_$()===R.running);recordButtonAriaLabel_$=v(()=>{let e=this.mediaUnavailable_$();return e||(this.isRecordActive_$()?"Stop":this.busy_$()?"\xDAj felv\xE9tel (feldolgoz\xE1s folyamatban)":"Felv\xE9tel")});recordButtonTitle_$=v(()=>{let e=this.mediaUnavailable_$();return e||(this.isRecordActive_$()?"Stop":this.busy_$()?"\xDAj felv\xE9tel \u2014 el\u0151z\u0151 feldolgoz\xE1s folyamatban":"Felv\xE9tel")});static \u0275fac=function(t){return new(t||n)};static \u0275cmp=Y({type:n,selectors:[["app-ccap-voice-record-button"]],hostBindings:function(t,i){t&1&&m("keydown.escape",function(){return i.onEscape()},!1,ee)},inputs:{qaEnabled:[1,"qaEnabled"],compactLayout:[1,"compactLayout"]},outputs:{transcriptReady:"transcriptReady",transcriptSegmentReady:"transcriptSegmentReady"},standalone:!0,features:[ae],decls:25,vars:14,consts:[[1,"flex","flex-col","items-center","gap-1"],[3,"closed","isOpen","title","maxWidth","zIndex","bodyFlexColumn"],[1,"flex","flex-col","flex-1","min-h-0","w-full","overflow-y-auto","overflow-x-hidden","overscroll-y-contain"],[1,"flex","flex-col","gap-2","shrink-0"],[1,"flex","items-center","gap-2","cursor-pointer","select-none"],["type","checkbox","name","settingsQaEnabled",3,"ngModelChange","ngModel"],[1,"text-sm","text-neutral-300"],["type","checkbox","name","autoSendAfterVoice",3,"ngModelChange","ngModel"],[1,"mt-3","pt-3","border-t","border-neonDefault","flex","flex-col","gap-3","shrink-0"],[1,"mt-3","pt-3","border-t","border-neonDefault","text-xs","text-neutral-400"],["modal-footer","",1,"shrink-0","px-4","py-3","border-t","border-neonDefault"],["type","button",1,"w-full","px-3","py-1.5","text-sm","border","border-neonCyan","rounded","text-neutral-300","hover:shadow-neon-glow-cyan","transition-colors",3,"click"],[3,"closed","isOpen","title","maxWidth","zIndex"],[1,"space-y-2","text-sm"],[1,"text-xs","text-neutral-500"],[1,"flex","items-center","gap-2"],["type","button","aria-label","Be\xE1ll\xEDt\xE1sok","title","Be\xE1ll\xEDt\xE1sok",1,"w-5","h-5","rounded-full","flex","items-center","justify-center","bg-neutral-900","border-2","border-neonDefault","text-neonCyan","hover:border-neonCyan","hover:shadow-neon-glow-cyan","transition-all","duration-200","focus:outline-none","focus:ring-2","focus:ring-neonCyan","focus:ring-offset-2","focus:ring-offset-neutral-900",3,"click"],["viewBox","0 0 24 24","fill","none","stroke","currentColor","stroke-width","2","stroke-linecap","round","stroke-linejoin","round","aria-hidden","true",1,"w-2.5","h-2.5","shrink-0"],["d","M12 15a3 3 0 1 0 0-6 3 3 0 0 0 0 6Z"],["d","M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 0 1 0 2.83 2 2 0 0 1-2.83 0l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 0 1-2 2 2 2 0 0 1-2-2v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 0 1-2.83 0 2 2 0 0 1 0-2.83l.06-.06a1.65 1.65 0 0 0 .33-1.82 1.65 1.65 0 0 0-1.51-1H3a2 2 0 0 1-2-2 2 2 0 0 1 2-2h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 0 1 0-2.83 2 2 0 0 1 2.83 0l.06.06a1.65 1.65 0 0 0 1.82.33H9a1.65 1.65 0 0 0 1-1.51V3a2 2 0 0 1 2-2 2 2 0 0 1 2 2v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 0 1 2.83 0 2 2 0 0 1 0 2.83l-.06.06a1.65 1.65 0 0 0-.33 1.82V9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 0 1 2 2 2 2 0 0 1-2 2h-.09a1.65 1.65 0 0 0-1.51 1z"],["type","button",1,"w-5","h-5","rounded-full","flex","items-center","justify-center","bg-neutral-900","border-2","transition-all","duration-200","focus:outline-none","focus:ring-2","focus:ring-offset-2","focus:ring-offset-neutral-900",3,"click"],["cx","12","cy","12","r","10"],["d","M12 16v-4"],["d","M12 8h.01"],["type","button",1,"flex","items-center","justify-center","min-w-[44px]","min-h-[44px]","w-10","h-10","rounded-full","shrink-0","bg-neutral-900","border-2","text-white","transition-all","duration-200","disabled:opacity-50","border-neonDefault","hover:border-neonCyan","hover:shadow-neon-glow-cyan","focus:outline-none","focus:ring-2","focus:ring-neonCyan","focus:ring-offset-2","focus:ring-offset-neutral-900",3,"click","disabled"],["aria-hidden","true",1,"inline-block","w-5","h-5","shrink-0","animate-spin","rounded-full","border-2","border-neonCyan/40","border-t-neonCyan"],[1,"flex","flex-col","items-center","gap-0.5","shrink-0"],[1,"text-[11px]","text-amber-300","leading-tight","max-w-[180px]","text-center"],["aria-hidden","true",1,"relative","w-2","h-6","rounded-sm","bg-neutral-800","overflow-hidden"],["viewBox","0 0 24 24","fill","none","stroke","currentColor","stroke-width","2","stroke-linecap","round","stroke-linejoin","round","aria-hidden","true",1,"w-5","h-5","shrink-0","text-neonCyan"],["d","M12 2a3 3 0 0 1 3 3v7a3 3 0 0 1-6 0V5a3 3 0 0 1 3-3Z"],["d","M19 10v2a7 7 0 0 1-14 0v-2"],["x1","12","y1","19","x2","12","y2","22"],[1,"absolute","inset-x-0","bottom-0","bg-neonCyan","transition-[height]","duration-75"],[1,"absolute","inset-x-0","h-0.5","bg-neonAmber","rounded-sm","z-10",2,"bottom","5%"],["aria-hidden","true",1,"mr-1"],[1,"relative","inline-flex"],["type","button","aria-label","Be\xE1ll\xEDt\xE1sok","title","Be\xE1ll\xEDt\xE1sok",1,"absolute","right-full","mr-4","top-1/2","-translate-y-1/2","w-5","h-5","rounded-full","flex","items-center","justify-center","bg-neutral-900","border-2","border-neonDefault","text-neonCyan","hover:border-neonCyan","hover:shadow-neon-glow-cyan","transition-all","duration-200","focus:outline-none","focus:ring-2","focus:ring-neonCyan","focus:ring-offset-2","focus:ring-offset-neutral-900",3,"click"],["type","button",1,"absolute","left-full","ml-4","top-1/2","-translate-y-1/2","w-5","h-5","rounded-full","flex","items-center","justify-center","bg-neutral-900","border-2","transition-all","duration-200","focus:outline-none","focus:ring-2","focus:ring-offset-2","focus:ring-offset-neutral-900",3,"click"],[1,"text-[11px]","text-amber-300","leading-tight","max-w-[240px]","mt-1"],[1,"shrink-0"],[1,"text-xs","font-medium","text-neutral-400","mb-1"],[1,"text-xs","text-neutral-300","whitespace-pre-wrap","break-words"],[1,"text-xs","text-neutral-300","whitespace-pre-wrap","break-words","font-mono"],[1,"text-[10px]","text-neonAmber","mt-1"],[1,"text-[10px]","text-neutral-500","mb-1"],[1,"flex","flex-wrap","gap-2","items-center"],["name","qaProviderName",1,"px-2","py-1","text-xs","bg-neutral-800","border","border-neonDefault","rounded","text-neutral-200","min-w-[120px]",3,"ngModelChange","ngModel"],["value",""],[3,"value"],["name","qaModelName",1,"px-2","py-1","text-xs","bg-neutral-800","border","border-neonDefault","rounded","text-neutral-200","min-w-[140px]",3,"ngModel"],["type","text","name","qaModelNameText","placeholder","Modell id (lista nem el\xE9rhet\u0151 ehhez a providerhez)",1,"px-2","py-1","text-xs","bg-neutral-800","border","border-neonDefault","rounded","text-neutral-200","min-w-[140px]","font-mono",3,"ngModel"],[1,"text-[10px]","text-amber-300/90","mt-1"],[1,"flex","flex-col","shrink-0"],[1,"text-xs","font-medium","text-neutral-400","mb-1","shrink-0"],[1,"space-y-1.5","rounded","border","border-neonDefault/50","bg-neutral-800/20","p-2"],[1,"flex","flex-wrap","gap-2","items-center","shrink-0","mt-2"],["type","button",1,"px-2","py-1","text-xs","border","border-neonDefault","rounded","text-neutral-400","hover:border-neonCyan","hover:text-neonCyan","transition-colors",3,"click"],["type","button",1,"px-2","py-1","text-xs","border","border-neonCyan","rounded","text-neonCyan","hover:shadow-neon-glow-cyan","disabled:opacity-50","transition-colors",3,"click","disabled"],["name","qaModelName",1,"px-2","py-1","text-xs","bg-neutral-800","border","border-neonDefault","rounded","text-neutral-200","min-w-[140px]",3,"ngModelChange","ngModel"],["type","text","name","qaModelNameText","placeholder","Modell id (lista nem el\xE9rhet\u0151 ehhez a providerhez)",1,"px-2","py-1","text-xs","bg-neutral-800","border","border-neonDefault","rounded","text-neutral-200","min-w-[140px]","font-mono",3,"ngModelChange","ngModel"],["type","text","placeholder","El\xEDr\xE1s / f\xE9lrehall\xE1s",1,"flex-1","min-w-0","px-2","py-1","text-xs","bg-neutral-800","border","border-neonDefault","rounded","text-neutral-200","placeholder-neutral-500",3,"input","value"],[1,"text-neutral-500","shrink-0"],["type","text","placeholder","Helyes forma",1,"flex-1","min-w-0","px-2","py-1","text-xs","bg-neutral-800","border","border-neonDefault","rounded","text-neutral-200","placeholder-neutral-500",3,"input","value"],["type","button","aria-label","Sor t\xF6rl\xE9se","title","Sor t\xF6rl\xE9se",1,"shrink-0","p-1","text-neutral-500","hover:text-neonRed","transition-colors",3,"click"],[1,"sr-only"],["viewBox","0 0 24 24","fill","none","stroke","currentColor","stroke-width","2",1,"w-3.5","h-3.5"],["d","M18 6L6 18M6 6l12 12"],[1,"mt-3","pt-3","border-t","border-neonDefault","text-xs","text-neutral-500"],["type","button",1,"mt-1.5","px-2","py-1","text-xs","border","border-neonDefault","rounded","text-neutral-400","hover:border-neonCyan","hover:text-neonCyan","transition-colors",3,"click"],[1,"rounded-md","border","border-neonAmber/45","bg-neutral-950/95","p-2.5","mb-1"],[1,"font-medium","text-neonAmber"],[1,"text-neutral-400","text-xs"],[1,"text-neutral-200","break-words"],[1,"text-neutral-400","text-xs","mt-2"],[1,"text-[10px]","font-semibold","uppercase","tracking-wide","text-neonAmber/90","mb-1.5"],[1,"text-xs","leading-relaxed","whitespace-pre-wrap","break-words"],[1,"text-[10px]","text-neutral-500","mt-1.5","leading-snug"],[1,"text-neutral-300"],[1,"mx-0.5","inline","rounded","px-0.5","text-red-300/95","line-through","decoration-red-400/85","bg-red-950/50","border","border-red-900/45"],[1,"mx-0.5","inline","rounded","px-0.5","text-neonAmber","bg-amber-950/55","border","border-neonAmber/50","shadow-[0_0_10px_rgb(251_191_36/0.28)]"],[1,"text-neutral-300","break-words"]],template:function(t,i){if(t&1&&(C(0,Ae,15,35,"div",0)(1,Re,14,35),o(2,"app-s-modal",1),m("closed",function(){return i.settingsOpen_$.set(!1)}),o(3,"div",2)(4,"div",3)(5,"label",4)(6,"input",5),O("ngModelChange",function(u){return W(i.settingsQaEnabled,u)||(i.settingsQaEnabled=u),u}),r(),o(7,"span",6),d(8,"STT QA"),r()(),o(9,"label",4)(10,"input",7),m("ngModelChange",function(u){return i.handleAutoSendAfterVoiceChange(u)}),r(),o(11,"span",6),d(12,"Send immediately after voice (Mimik-style)"),r()()(),C(13,Oe,38,11,"div",8)(14,Ie,2,0,"p",9)(15,ze,4,0),r(),o(16,"div",10)(17,"button",11),m("click",function(){return i.settingsOpen_$.set(!1)}),d(18," Bez\xE1r\xE1s "),r()()(),o(19,"app-s-modal",12),m("closed",function(){return i.infoOpen_$.set(!1)}),C(20,Ze,13,4,"div",13)(21,Xe,2,0,"p",14),o(22,"div",10)(23,"button",11),m("click",function(){return i.infoOpen_$.set(!1)}),d(24," Bez\xE1r\xE1s "),r()()()),t&2){let a,u;g(i.compactLayout()?0:1),l(2),y("isOpen",i.settingsOpen_$())("title","Voice Input be\xE1ll\xEDt\xE1sok")("maxWidth","lg")("zIndex","40")("bodyFlexColumn",!0),l(4),N("ngModel",i.settingsQaEnabled),l(4),y("ngModel",i.voiceInputUi_DS.autoSendAfterVoice_$()),l(3),g((a=i.qaSettings_$())?13:i.qaSettingsLoading_$()?14:15,a),l(6),y("isOpen",i.infoOpen_$())("title","Utols\xF3 QA eredm\xE9ny")("maxWidth","md")("zIndex","40"),l(),g((u=i.lastQaTransformation_$())?20:21,u)}},dependencies:[pe,_e,me,se,le,ue,de,ce,xe],encapsulation:2})}return n})();export{be as a,vt as b};
2
+ //# sourceMappingURL=chunk-64K7CP3A.js.map
@@ -1,2 +1,2 @@
1
- import{I as d}from"./chunk-LGMUHF7N.js";import{C as o,p as n,xb as l,y as s}from"./chunk-TBMJSIBB.js";var p=(()=>{class r{baseUrl=`${d.api.baseUrl}/model-registry`;http=o(l);getList(e){let t=new URLSearchParams;e?.provider!==void 0&&e.provider.trim()!==""&&t.set("provider",e.provider.trim()),e?.modelName!==void 0&&e.modelName.trim()!==""&&t.set("modelName",e.modelName.trim()),e?.enabled===!0?t.set("enabled","true"):e?.enabled===!1&&t.set("enabled","false"),e?.inactiveProviderOnly===!0&&t.set("inactiveProviderOnly","true");let i=t.toString(),u=`${this.baseUrl}/list${i!==""?`?${i}`:""}`;return n(this.http.get(u))}sync(){return n(this.http.post(`${this.baseUrl}/sync`,{}))}setEnabled(e,t){return n(this.http.patch(`${this.baseUrl}/patch/${encodeURIComponent(e)}`,{enabled:t}))}patchEntry(e,t){let i={};return t.enabled!==void 0&&(i.enabled=t.enabled),t.reasoningLevelForTest!==void 0&&(i.reasoningLevelForTest=t.reasoningLevelForTest),t.capabilities!==void 0&&(i.capabilities=t.capabilities),n(this.http.patch(`${this.baseUrl}/patch/${encodeURIComponent(e)}`,i))}bulkSetEnabled(e,t){return n(this.http.patch(`${this.baseUrl}/bulk-enabled`,{ids:e,enabled:t}))}deleteEntry(e){return n(this.http.delete(`${this.baseUrl}/entry/${encodeURIComponent(e)}`))}deleteEntries(e){return n(this.http.post(`${this.baseUrl}/delete-entries`,{ids:e}))}getTestResults(e){let t=new URLSearchParams;e.provider&&t.set("provider",e.provider),e.model&&t.set("model",e.model),e.limit!==void 0&&t.set("limit",String(e.limit)),e.reasoningLevel!==void 0&&e.reasoningLevel.trim()!==""&&t.set("reasoningLevel",e.reasoningLevel.trim());let i=t.toString();return n(this.http.get(`${this.baseUrl}/test-results${i?`?${i}`:""}`))}getPrompts(){return n(this.http.get(`${this.baseUrl}/prompts`))}startTestRun(e,t){let i={modelIds:e};return t!==void 0&&t.length>0&&(i.promptIds=t),n(this.http.post(`${this.baseUrl}/test-run`,i))}getTestRunStatus(e){return n(this.http.get(`${this.baseUrl}/test-run/${e}`))}static \u0275fac=function(t){return new(t||r)};static \u0275prov=s({token:r,factory:r.\u0275fac,providedIn:"root"})}return r})();export{p as a};
2
- //# sourceMappingURL=chunk-4YCGUCIE.js.map
1
+ import{I as d}from"./chunk-TIJCR5DW.js";import{C as o,p as n,xb as l,y as s}from"./chunk-TBMJSIBB.js";var p=(()=>{class r{baseUrl=`${d.api.baseUrl}/model-registry`;http=o(l);getList(e){let t=new URLSearchParams;e?.provider!==void 0&&e.provider.trim()!==""&&t.set("provider",e.provider.trim()),e?.modelName!==void 0&&e.modelName.trim()!==""&&t.set("modelName",e.modelName.trim()),e?.enabled===!0?t.set("enabled","true"):e?.enabled===!1&&t.set("enabled","false"),e?.inactiveProviderOnly===!0&&t.set("inactiveProviderOnly","true");let i=t.toString(),u=`${this.baseUrl}/list${i!==""?`?${i}`:""}`;return n(this.http.get(u))}sync(){return n(this.http.post(`${this.baseUrl}/sync`,{}))}setEnabled(e,t){return n(this.http.patch(`${this.baseUrl}/patch/${encodeURIComponent(e)}`,{enabled:t}))}patchEntry(e,t){let i={};return t.enabled!==void 0&&(i.enabled=t.enabled),t.reasoningLevelForTest!==void 0&&(i.reasoningLevelForTest=t.reasoningLevelForTest),t.capabilities!==void 0&&(i.capabilities=t.capabilities),n(this.http.patch(`${this.baseUrl}/patch/${encodeURIComponent(e)}`,i))}bulkSetEnabled(e,t){return n(this.http.patch(`${this.baseUrl}/bulk-enabled`,{ids:e,enabled:t}))}deleteEntry(e){return n(this.http.delete(`${this.baseUrl}/entry/${encodeURIComponent(e)}`))}deleteEntries(e){return n(this.http.post(`${this.baseUrl}/delete-entries`,{ids:e}))}getTestResults(e){let t=new URLSearchParams;e.provider&&t.set("provider",e.provider),e.model&&t.set("model",e.model),e.limit!==void 0&&t.set("limit",String(e.limit)),e.reasoningLevel!==void 0&&e.reasoningLevel.trim()!==""&&t.set("reasoningLevel",e.reasoningLevel.trim());let i=t.toString();return n(this.http.get(`${this.baseUrl}/test-results${i?`?${i}`:""}`))}getPrompts(){return n(this.http.get(`${this.baseUrl}/prompts`))}startTestRun(e,t){let i={modelIds:e};return t!==void 0&&t.length>0&&(i.promptIds=t),n(this.http.post(`${this.baseUrl}/test-run`,i))}getTestRunStatus(e){return n(this.http.get(`${this.baseUrl}/test-run/${e}`))}static \u0275fac=function(t){return new(t||r)};static \u0275prov=s({token:r,factory:r.\u0275fac,providedIn:"root"})}return r})();export{p as a};
2
+ //# sourceMappingURL=chunk-7MZ4N75F.js.map
@@ -1,2 +1,2 @@
1
- import{a as r}from"./chunk-Y5E6NMMF.js";import{G as i}from"./chunk-TBMJSIBB.js";var p=(()=>{class e{transform(t){return r.formatRelativeTime(t)}static \u0275fac=function(a){return new(a||e)};static \u0275pipe=i({name:"ccapRelativeTime",type:e,pure:!0,standalone:!0})}return e})();export{p as a};
2
- //# sourceMappingURL=chunk-IDWKG7BQ.js.map
1
+ import{a as r}from"./chunk-S46BSLUB.js";import{G as i}from"./chunk-TBMJSIBB.js";var p=(()=>{class e{transform(t){return r.formatRelativeTime(t)}static \u0275fac=function(a){return new(a||e)};static \u0275pipe=i({name:"ccapRelativeTime",type:e,pure:!0,standalone:!0})}return e})();export{p as a};
2
+ //# sourceMappingURL=chunk-7SCYMYZG.js.map
@@ -1,2 +1,2 @@
1
- import{a as k}from"./chunk-Q6DP4BK2.js";import{a as C}from"./chunk-V3VQWJQL.js";import{I as U,L as P,t as A}from"./chunk-LGMUHF7N.js";import{C as h,k as m,p as a,xb as M,y as b}from"./chunk-TBMJSIBB.js";var y=class{static readLlmCloudBucketsFromSectionResponse(n){return{anthropicLlm:v(n.anthropicSettings,{includeBaseUrl:!1}),googleLlm:v(n.googleSettings,{includeBaseUrl:!1}),deepseekLlm:v(n.deepseekSettings,{includeBaseUrl:!1}),fdpaiLlm:v(n.fdpaiSettings,{includeBaseUrl:!0})}}};function v(s,n){if(s==null||typeof s!="object"||Array.isArray(s))return{enabled:!1,defaultModel:"",baseUrl:"",apiKey:"",apiKeyMasked:""};let e=Reflect.get(s,"defaultModel"),o=Reflect.get(s,"apiKeyMasked"),i=Reflect.get(s,"baseUrl");return{enabled:Reflect.get(s,"enabled")===!0,defaultModel:typeof e=="string"?e:"",baseUrl:n.includeBaseUrl&&typeof i=="string"?i:"",apiKey:"",apiKeyMasked:typeof o=="string"?o:""}}var L=class{static parseLlmSettingsSectionForUi(n){let e=n.openAiSettings,o=!1,i="gpt-4o";if(e!=null&&typeof e=="object"&&!Array.isArray(e)){o=Reflect.get(e,"enabled")===!0;let t=Reflect.get(e,"defaultModel");typeof t=="string"&&(i=t)}let c=(Array.isArray(n.localAiSettings)?n.localAiSettings:[]).filter(t=>t!=null&&typeof t=="object"&&!Array.isArray(t)).map(t=>{let g=typeof t.key=="string"?t.key.trim():"";if(!g.length)return null;let S=typeof t.name=="string"?t.name:"",$=k.build({localAiKey:g}),T=S.trim().length>0?S.trim():"Local AI",_=t.enabled!==!1;return{id:$,baseUrl:(typeof t.baseUrl=="string"?t.baseUrl:"").trim(),model:(typeof t.defaultModel=="string"?t.defaultModel:"").trim(),label:T,enabled:_}}).filter(t=>t!=null),d=y.readLlmCloudBucketsFromSectionResponse(n),l=[];o&&l.push("open-ai"),d.anthropicLlm.enabled&&l.push("anthropic"),d.googleLlm.enabled&&l.push("google"),d.deepseekLlm.enabled&&l.push("deepseek"),d.fdpaiLlm.enabled&&l.push("fdp-ai");for(let t of c)t.enabled&&l.push(t.id);l.length===0&&l.push("open-ai");let F=c.map(t=>({id:t.id,label:t.label})),V=l.map(t=>({value:t,label:C.resolve(t,F)})),p=typeof n.defaultLlmProvider=="string"?n.defaultLlmProvider:"open-ai",u="";if(p==="open-ai")u=i;else if(p==="anthropic")u=d.anthropicLlm.defaultModel;else if(p==="google")u=d.googleLlm.defaultModel;else if(p==="deepseek")u=d.deepseekLlm.defaultModel;else if(p==="fdp-ai")u=d.fdpaiLlm.defaultModel;else{let t=c.find(g=>g.id===p);t&&(u=t.model)}return{enabledLlmProviderIds:l,llmProviderSelectOptions:V,defaultLlmProvider:p.trim(),defaultLlmModel:u.trim()}}};var I=(()=>{class s{baseUrl=`${U.api.baseUrl}/voice`;http=h(M);fetchVoiceNotesPoc(){return a(this.http.get(`${this.baseUrl}/poc/get-notes`))}fetchVoiceNotesQaSettings(){return a(this.http.get(`${this.baseUrl}/notes/qa-settings`))}saveVoiceNotesQaSettings(e){return a(this.http.put(`${this.baseUrl}/notes/qa-settings`,e,{headers:{"Content-Type":"application/json"}}))}saveVoiceNotesPoc(e){return a(this.http.put(`${this.baseUrl}/notes/poc`,e))}transcribeVoiceChunk(e){let o={qa:e.qaEnabled===!0?"1":"0",skip_classification:e.skipClassification!==!1?"true":"false"};e.confidenceThreshold!==void 0&&(o.confidence_threshold=String(e.confidenceThreshold)),e.noteContext!==void 0&&(o.note_context=e.noteContext);let i=Object.keys(o).map(c=>`${encodeURIComponent(c)}=${encodeURIComponent(o[c])}`).join("&"),f=`${this.baseUrl}/notes/transcribe${i?`?${i}`:""}`,r={"Content-Type":e.mimeType,Filename:e.filename};return a(this.http.post(f,e.blob,{headers:r}))}generateTtsSpeechBlob(e){return a(this.http.post(`${this.baseUrl}/tts/speech`,{input:e.text},{responseType:"blob"}))}getTtsMessageAudioUrl(e){let o=typeof e=="string"?e.trim():"";return o?`${this.baseUrl}/tts/message-audio/${encodeURIComponent(o)}`:""}getOrCreateTtsMessageAudio(e){return a(this.http.post(`${this.baseUrl}/tts/message-audio`,{sessionId:e.sessionId,role:e.role,content:e.content,timestamp:e.timestamp},{responseType:"blob",headers:{"Content-Type":"application/json"}}))}getVoiceSettings(){return a(this.http.get(`${this.baseUrl}/settings`))}saveTtsProvider(e){return a(this.http.post(`${this.baseUrl}/settings/tts-provider`,{provider:e}))}saveElevenLabsKey(e){return a(this.http.post(`${this.baseUrl}/settings/elevenlabs-key`,{apiKey:e}))}testElevenLabsApiKey(){return a(this.http.post(`${this.baseUrl}/settings/test-elevenlabs-key`,{}))}saveVoiceConfig(e){return a(this.http.post(`${this.baseUrl}/settings/voice-config`,{elevenLabsModelId:e.elevenLabsModelId,elevenLabsVoiceId:e.elevenLabsVoiceId}))}static \u0275fac=function(o){return new(o||s)};static \u0275prov=b({token:s,factory:s.\u0275fac,providedIn:"root"})}return s})();var Y=(()=>{class s{voice_AS=h(I);settings_AS=h(P);fetchQaEnabledFlag(){return m(this,null,function*(){try{return(yield this.voice_AS.fetchVoiceNotesQaSettings()).qaEnabled===!0}catch{return!1}})}loadSttQaSettingsPanelState(){return m(this,null,function*(){let e=yield this.voice_AS.fetchVoiceNotesQaSettings(),o=yield this.settings_AS.getSection(A.llmProviders),i=L.parseLlmSettingsSectionForUi(o),f=(e.providerName??"").trim(),r=[],c="";if(f.length>0){let d=yield this.fetchLlmModelsListForSttQa(f);r=[...d.models],c=d.errorMessage;let l=(e.modelName??"").trim();l.length>0&&!r.includes(l)&&(r=[l,...r])}return{qa:e,llmProviderSelectOptions:i.llmProviderSelectOptions,defaultLlmProvider:i.defaultLlmProvider,defaultLlmModel:i.defaultLlmModel,qaModelsForProvider:r,qaModelsListFetchError:c}})}fetchLlmModelsListForSttQa(e){return m(this,null,function*(){let o=e.trim();if(!o.length)return{models:[],errorMessage:""};try{let i=yield this.settings_AS.postListLlmModels({providerId:o}),f=i.models??[],r=typeof i.error=="string"?i.error.trim():"",c=i.success===!1;return f.length>0?{models:f,errorMessage:c?r.length>0?r:"Model list request failed.":""}:c?{models:[],errorMessage:r.length>0?r:"Model list request failed."}:{models:[],errorMessage:r}}catch(i){let f=i instanceof Error?i.message:String(i);return{models:[],errorMessage:f}}})}fetchLlmModelIdsForProvider(e){return m(this,null,function*(){return(yield this.fetchLlmModelsListForSttQa(e)).models})}normalizeConfusionMapEntries(e){return e.map(o=>({from:String(o.from).trim(),to:String(o.to).trim()})).filter(o=>o.from.length>0||o.to.length>0)}saveVoiceNotesQaSettings(e){return m(this,null,function*(){yield this.voice_AS.saveVoiceNotesQaSettings(e)})}fetchVoiceNotesPoc(){return this.voice_AS.fetchVoiceNotesPoc()}saveVoiceNotesPoc(e){return this.voice_AS.saveVoiceNotesPoc(e)}transcribeVoiceChunk(e){return this.voice_AS.transcribeVoiceChunk(e)}getTtsMessageAudioUrl(e){return this.voice_AS.getTtsMessageAudioUrl(e)}getOrCreateTtsMessageAudio(e){return this.voice_AS.getOrCreateTtsMessageAudio(e)}static \u0275fac=function(o){return new(o||s)};static \u0275prov=b({token:s,factory:s.\u0275fac,providedIn:"root"})}return s})();export{y as a,I as b,Y as c};
2
- //# sourceMappingURL=chunk-SQFFII5G.js.map
1
+ import{a as k}from"./chunk-QXIUTGNM.js";import{a as C}from"./chunk-V3VQWJQL.js";import{I as U,L as P,t as A}from"./chunk-TIJCR5DW.js";import{C as h,k as m,p as a,xb as M,y as b}from"./chunk-TBMJSIBB.js";var y=class{static readLlmCloudBucketsFromSectionResponse(n){return{anthropicLlm:v(n.anthropicSettings,{includeBaseUrl:!1}),googleLlm:v(n.googleSettings,{includeBaseUrl:!1}),deepseekLlm:v(n.deepseekSettings,{includeBaseUrl:!1}),fdpaiLlm:v(n.fdpaiSettings,{includeBaseUrl:!0})}}};function v(s,n){if(s==null||typeof s!="object"||Array.isArray(s))return{enabled:!1,defaultModel:"",baseUrl:"",apiKey:"",apiKeyMasked:""};let e=Reflect.get(s,"defaultModel"),o=Reflect.get(s,"apiKeyMasked"),i=Reflect.get(s,"baseUrl");return{enabled:Reflect.get(s,"enabled")===!0,defaultModel:typeof e=="string"?e:"",baseUrl:n.includeBaseUrl&&typeof i=="string"?i:"",apiKey:"",apiKeyMasked:typeof o=="string"?o:""}}var L=class{static parseLlmSettingsSectionForUi(n){let e=n.openAiSettings,o=!1,i="gpt-4o";if(e!=null&&typeof e=="object"&&!Array.isArray(e)){o=Reflect.get(e,"enabled")===!0;let t=Reflect.get(e,"defaultModel");typeof t=="string"&&(i=t)}let c=(Array.isArray(n.localAiSettings)?n.localAiSettings:[]).filter(t=>t!=null&&typeof t=="object"&&!Array.isArray(t)).map(t=>{let g=typeof t.key=="string"?t.key.trim():"";if(!g.length)return null;let S=typeof t.name=="string"?t.name:"",$=k.build({localAiKey:g}),T=S.trim().length>0?S.trim():"Local AI",_=t.enabled!==!1;return{id:$,baseUrl:(typeof t.baseUrl=="string"?t.baseUrl:"").trim(),model:(typeof t.defaultModel=="string"?t.defaultModel:"").trim(),label:T,enabled:_}}).filter(t=>t!=null),d=y.readLlmCloudBucketsFromSectionResponse(n),l=[];o&&l.push("open-ai"),d.anthropicLlm.enabled&&l.push("anthropic"),d.googleLlm.enabled&&l.push("google"),d.deepseekLlm.enabled&&l.push("deepseek"),d.fdpaiLlm.enabled&&l.push("fdp-ai");for(let t of c)t.enabled&&l.push(t.id);l.length===0&&l.push("open-ai");let F=c.map(t=>({id:t.id,label:t.label})),V=l.map(t=>({value:t,label:C.resolve(t,F)})),p=typeof n.defaultLlmProvider=="string"?n.defaultLlmProvider:"open-ai",u="";if(p==="open-ai")u=i;else if(p==="anthropic")u=d.anthropicLlm.defaultModel;else if(p==="google")u=d.googleLlm.defaultModel;else if(p==="deepseek")u=d.deepseekLlm.defaultModel;else if(p==="fdp-ai")u=d.fdpaiLlm.defaultModel;else{let t=c.find(g=>g.id===p);t&&(u=t.model)}return{enabledLlmProviderIds:l,llmProviderSelectOptions:V,defaultLlmProvider:p.trim(),defaultLlmModel:u.trim()}}};var I=(()=>{class s{baseUrl=`${U.api.baseUrl}/voice`;http=h(M);fetchVoiceNotesPoc(){return a(this.http.get(`${this.baseUrl}/poc/get-notes`))}fetchVoiceNotesQaSettings(){return a(this.http.get(`${this.baseUrl}/notes/qa-settings`))}saveVoiceNotesQaSettings(e){return a(this.http.put(`${this.baseUrl}/notes/qa-settings`,e,{headers:{"Content-Type":"application/json"}}))}saveVoiceNotesPoc(e){return a(this.http.put(`${this.baseUrl}/notes/poc`,e))}transcribeVoiceChunk(e){let o={qa:e.qaEnabled===!0?"1":"0",skip_classification:e.skipClassification!==!1?"true":"false"};e.confidenceThreshold!==void 0&&(o.confidence_threshold=String(e.confidenceThreshold)),e.noteContext!==void 0&&(o.note_context=e.noteContext);let i=Object.keys(o).map(c=>`${encodeURIComponent(c)}=${encodeURIComponent(o[c])}`).join("&"),f=`${this.baseUrl}/notes/transcribe${i?`?${i}`:""}`,r={"Content-Type":e.mimeType,Filename:e.filename};return a(this.http.post(f,e.blob,{headers:r}))}generateTtsSpeechBlob(e){return a(this.http.post(`${this.baseUrl}/tts/speech`,{input:e.text},{responseType:"blob"}))}getTtsMessageAudioUrl(e){let o=typeof e=="string"?e.trim():"";return o?`${this.baseUrl}/tts/message-audio/${encodeURIComponent(o)}`:""}getOrCreateTtsMessageAudio(e){return a(this.http.post(`${this.baseUrl}/tts/message-audio`,{sessionId:e.sessionId,role:e.role,content:e.content,timestamp:e.timestamp},{responseType:"blob",headers:{"Content-Type":"application/json"}}))}getVoiceSettings(){return a(this.http.get(`${this.baseUrl}/settings`))}saveTtsProvider(e){return a(this.http.post(`${this.baseUrl}/settings/tts-provider`,{provider:e}))}saveElevenLabsKey(e){return a(this.http.post(`${this.baseUrl}/settings/elevenlabs-key`,{apiKey:e}))}testElevenLabsApiKey(){return a(this.http.post(`${this.baseUrl}/settings/test-elevenlabs-key`,{}))}saveVoiceConfig(e){return a(this.http.post(`${this.baseUrl}/settings/voice-config`,{elevenLabsModelId:e.elevenLabsModelId,elevenLabsVoiceId:e.elevenLabsVoiceId}))}static \u0275fac=function(o){return new(o||s)};static \u0275prov=b({token:s,factory:s.\u0275fac,providedIn:"root"})}return s})();var Y=(()=>{class s{voice_AS=h(I);settings_AS=h(P);fetchQaEnabledFlag(){return m(this,null,function*(){try{return(yield this.voice_AS.fetchVoiceNotesQaSettings()).qaEnabled===!0}catch{return!1}})}loadSttQaSettingsPanelState(){return m(this,null,function*(){let e=yield this.voice_AS.fetchVoiceNotesQaSettings(),o=yield this.settings_AS.getSection(A.llmProviders),i=L.parseLlmSettingsSectionForUi(o),f=(e.providerName??"").trim(),r=[],c="";if(f.length>0){let d=yield this.fetchLlmModelsListForSttQa(f);r=[...d.models],c=d.errorMessage;let l=(e.modelName??"").trim();l.length>0&&!r.includes(l)&&(r=[l,...r])}return{qa:e,llmProviderSelectOptions:i.llmProviderSelectOptions,defaultLlmProvider:i.defaultLlmProvider,defaultLlmModel:i.defaultLlmModel,qaModelsForProvider:r,qaModelsListFetchError:c}})}fetchLlmModelsListForSttQa(e){return m(this,null,function*(){let o=e.trim();if(!o.length)return{models:[],errorMessage:""};try{let i=yield this.settings_AS.postListLlmModels({providerId:o}),f=i.models??[],r=typeof i.error=="string"?i.error.trim():"",c=i.success===!1;return f.length>0?{models:f,errorMessage:c?r.length>0?r:"Model list request failed.":""}:c?{models:[],errorMessage:r.length>0?r:"Model list request failed."}:{models:[],errorMessage:r}}catch(i){let f=i instanceof Error?i.message:String(i);return{models:[],errorMessage:f}}})}fetchLlmModelIdsForProvider(e){return m(this,null,function*(){return(yield this.fetchLlmModelsListForSttQa(e)).models})}normalizeConfusionMapEntries(e){return e.map(o=>({from:String(o.from).trim(),to:String(o.to).trim()})).filter(o=>o.from.length>0||o.to.length>0)}saveVoiceNotesQaSettings(e){return m(this,null,function*(){yield this.voice_AS.saveVoiceNotesQaSettings(e)})}fetchVoiceNotesPoc(){return this.voice_AS.fetchVoiceNotesPoc()}saveVoiceNotesPoc(e){return this.voice_AS.saveVoiceNotesPoc(e)}transcribeVoiceChunk(e){return this.voice_AS.transcribeVoiceChunk(e)}getTtsMessageAudioUrl(e){return this.voice_AS.getTtsMessageAudioUrl(e)}getOrCreateTtsMessageAudio(e){return this.voice_AS.getOrCreateTtsMessageAudio(e)}static \u0275fac=function(o){return new(o||s)};static \u0275prov=b({token:s,factory:s.\u0275fac,providedIn:"root"})}return s})();export{y as a,I as b,Y as c};
2
+ //# sourceMappingURL=chunk-7VUQTBJ2.js.map
@@ -1,2 +1,2 @@
1
- import{I as o}from"./chunk-LGMUHF7N.js";import{C as s,p as r,xb as a,y as n}from"./chunk-TBMJSIBB.js";var h=(()=>{class e{baseUrl=`${o.api.baseUrl}/oci-instance-data`;http=s(a);listInstances(){return r(this.http.get(`${this.baseUrl}/list`))}getByInstanceId(t){return r(this.http.get(`${this.baseUrl}/by-id/${t}`))}patchVisuals(t){let i={};return t.label!==void 0&&(i.label=t.label),t.darkOfficeVisuals!==void 0&&(i.darkOfficeVisuals=t.darkOfficeVisuals),r(this.http.patch(`${this.baseUrl}/by-id/${t.instanceId}`,i))}static \u0275fac=function(i){return new(i||e)};static \u0275prov=n({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();export{h as a};
2
- //# sourceMappingURL=chunk-WS5IPV7J.js.map
1
+ import{I as o}from"./chunk-TIJCR5DW.js";import{C as s,p as r,xb as a,y as n}from"./chunk-TBMJSIBB.js";var h=(()=>{class e{baseUrl=`${o.api.baseUrl}/oci-instance-data`;http=s(a);listInstances(){return r(this.http.get(`${this.baseUrl}/list`))}getByInstanceId(t){return r(this.http.get(`${this.baseUrl}/by-id/${t}`))}patchVisuals(t){let i={};return t.label!==void 0&&(i.label=t.label),t.darkOfficeVisuals!==void 0&&(i.darkOfficeVisuals=t.darkOfficeVisuals),r(this.http.patch(`${this.baseUrl}/by-id/${t.instanceId}`,i))}static \u0275fac=function(i){return new(i||e)};static \u0275prov=n({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();export{h as a};
2
+ //# sourceMappingURL=chunk-7YT7BGBD.js.map
@@ -1,2 +1,2 @@
1
- import{k as F}from"./chunk-P47C3DF2.js";import{D as h,Fa as _,Ga as C,Ha as T,J as x,K as u,T as E,Ta as L,U as l,Ua as k,Z as a,da as c,ga as S,la as d,ma as f,oa as v,pa as g,qa as o,ra as r,sa as p,ua as y,ub as R,va as b,wa as i,xa as M,ya as w}from"./chunk-TBMJSIBB.js";var I=["*","*"],D=()=>[];function j(t,n){if(t&1){let e=y();o(0,"div",2)(1,"button",3),b("click",function(){x(e);let m=i(3);return u(m.handleRetry())}),_(2," \xDAjrapr\xF3b\xE1l\xE1s "),r()()}}function V(t,n){if(t&1&&(o(0,"div"),p(1,"app-ccap-error-display",1),c(2,j,3,0,"div",2),r()),t&2){let e=i(2);a(),S("error",e.error())("sourceLabelOverride",e.errorSourceLabel()),a(),d(e.showRetry()?2:-1)}}function A(t,n){t&1&&(o(0,"div",6),p(1,"div",9)(2,"div",10),r())}function P(t,n){if(t&1&&(o(0,"div",4),v(1,A,3,0,"div",6,f),o(3,"div",7),p(4,"span",8),_(5),r()()),t&2){let e=i(3);a(),g(k(1,D).constructor(e.skeletonRows())),a(4),T(" ",e.loadingMessage()," ")}}function B(t,n){if(t&1&&(o(0,"p",5),_(1),r()),t&2){let e=i(3);a(),C(e.loadingMessage())}}function O(t,n){if(t&1&&c(0,P,6,2,"div",4)(1,B,2,1,"p",5),t&2){let e=i(2);d(e.showSkeleton()?0:1)}}function N(t,n){if(t&1&&(o(0,"p",0),_(1),r()),t&2){let e=i(2);a(),C(e.emptyMessage())}}function q(t,n){t&1&&w(0)}function z(t,n){if(t&1&&c(0,V,3,3,"div")(1,O,2,1)(2,N,2,1,"p",0)(3,q,1,0),t&2){let e=i();d(e.error()?0:e.isLoading()?1:e.isEmpty()?2:3)}}function G(t,n){t&1&&(o(0,"div",6),p(1,"div",9)(2,"div",10),r())}function H(t,n){if(t&1&&(o(0,"div",4),v(1,G,3,0,"div",6,f),o(3,"div",7),p(4,"span",8),_(5),r()()),t&2){let e=i(3);a(),g(k(1,D).constructor(e.skeletonRows())),a(4),T(" ",e.loadingMessage()," ")}}function J(t,n){if(t&1&&(o(0,"p",5),_(1),r()),t&2){let e=i(3);a(),C(e.loadingMessage())}}function K(t,n){if(t&1&&c(0,H,6,2,"div",4)(1,J,2,1,"p",5),t&2){let e=i(2);d(e.showSkeleton()?0:1)}}function Q(t,n){if(t&1){let e=y();o(0,"div",2)(1,"button",3),b("click",function(){x(e);let m=i(3);return u(m.handleRetry())}),_(2," \xDAjrapr\xF3b\xE1l\xE1s "),r()()}}function U(t,n){if(t&1&&(o(0,"div"),p(1,"app-ccap-error-display",1),c(2,Q,3,0,"div",2),r()),t&2){let e=i(2);a(),S("error",e.error())("sourceLabelOverride",e.errorSourceLabel()),a(),d(e.showRetry()?2:-1)}}function W(t,n){if(t&1&&(o(0,"p",0),_(1),r()),t&2){let e=i(2);a(),C(e.emptyMessage())}}function X(t,n){t&1&&w(0,1)}function Y(t,n){if(t&1&&c(0,K,2,1)(1,U,3,3,"div")(2,W,2,1,"p",0)(3,X,1,0),t&2){let e=i();d(e.isLoading()?0:e.error()?1:e.isEmpty()?2:3)}}var ot=(()=>{class t{isLoading=l(!1);error=l(null);isEmpty=l(!1);errorSourceLabel=l("");emptyMessage=l("Nincs megjelen\xEDthet\u0151 elem.");loadingMessage=l("Bet\xF6lt\xE9s\u2026");skeletonRows=l(2);showSkeleton=l(!1);showRetry=l(!0);errorTakesPrecedence=l(!1);retry=E();handleRetry(){this.retry.emit()}static \u0275fac=function(s){return new(s||t)};static \u0275cmp=h({type:t,selectors:[["app-s-content-state"]],hostAttrs:[1,"block"],inputs:{isLoading:[1,"isLoading"],error:[1,"error"],isEmpty:[1,"isEmpty"],errorSourceLabel:[1,"errorSourceLabel"],emptyMessage:[1,"emptyMessage"],loadingMessage:[1,"loadingMessage"],skeletonRows:[1,"skeletonRows"],showSkeleton:[1,"showSkeleton"],showRetry:[1,"showRetry"],errorTakesPrecedence:[1,"errorTakesPrecedence"]},outputs:{retry:"retry"},standalone:!0,features:[L],ngContentSelectors:I,decls:2,vars:1,consts:[[1,"text-neutral-500","py-4"],[1,"mb-3","block",3,"error","sourceLabelOverride"],[1,"text-center"],["type","button",1,"mt-1","px-3","py-1.5","text-sm","border","border-neonCyan","rounded-md","bg-transparent","text-neutral-200","hover:bg-neutral-800","hover:shadow-neon-glow-cyan","transition-colors",3,"click"],[1,"flex","flex-col","gap-2","py-4"],[1,"text-neutral-400"],[1,"px-4","py-3","border","border-neonDefault","rounded-lg","animate-pulse"],[1,"flex","items-center","gap-2","text-neutral-500","text-sm"],[1,"inline-block","w-2","h-2","rounded-full","bg-ccapAccent","animate-pulse"],[1,"h-4","w-3/4","bg-neutral-600","rounded","mb-2"],[1,"h-3","w-1/2","bg-neutral-700","rounded"]],template:function(s,m){s&1&&(M(I),c(0,z,4,1)(1,Y,4,1)),s&2&&d(m.errorTakesPrecedence()?0:1)},dependencies:[R,F],encapsulation:2})}return t})();export{ot as a};
2
- //# sourceMappingURL=chunk-WPK3COA5.js.map
1
+ import{k as F}from"./chunk-GNWPRBF5.js";import{D as h,Fa as _,Ga as C,Ha as T,J as x,K as u,T as E,Ta as L,U as l,Ua as k,Z as a,da as c,ga as S,la as d,ma as f,oa as v,pa as g,qa as o,ra as r,sa as p,ua as y,ub as R,va as b,wa as i,xa as M,ya as w}from"./chunk-TBMJSIBB.js";var I=["*","*"],D=()=>[];function j(t,n){if(t&1){let e=y();o(0,"div",2)(1,"button",3),b("click",function(){x(e);let m=i(3);return u(m.handleRetry())}),_(2," \xDAjrapr\xF3b\xE1l\xE1s "),r()()}}function V(t,n){if(t&1&&(o(0,"div"),p(1,"app-ccap-error-display",1),c(2,j,3,0,"div",2),r()),t&2){let e=i(2);a(),S("error",e.error())("sourceLabelOverride",e.errorSourceLabel()),a(),d(e.showRetry()?2:-1)}}function A(t,n){t&1&&(o(0,"div",6),p(1,"div",9)(2,"div",10),r())}function P(t,n){if(t&1&&(o(0,"div",4),v(1,A,3,0,"div",6,f),o(3,"div",7),p(4,"span",8),_(5),r()()),t&2){let e=i(3);a(),g(k(1,D).constructor(e.skeletonRows())),a(4),T(" ",e.loadingMessage()," ")}}function B(t,n){if(t&1&&(o(0,"p",5),_(1),r()),t&2){let e=i(3);a(),C(e.loadingMessage())}}function O(t,n){if(t&1&&c(0,P,6,2,"div",4)(1,B,2,1,"p",5),t&2){let e=i(2);d(e.showSkeleton()?0:1)}}function N(t,n){if(t&1&&(o(0,"p",0),_(1),r()),t&2){let e=i(2);a(),C(e.emptyMessage())}}function q(t,n){t&1&&w(0)}function z(t,n){if(t&1&&c(0,V,3,3,"div")(1,O,2,1)(2,N,2,1,"p",0)(3,q,1,0),t&2){let e=i();d(e.error()?0:e.isLoading()?1:e.isEmpty()?2:3)}}function G(t,n){t&1&&(o(0,"div",6),p(1,"div",9)(2,"div",10),r())}function H(t,n){if(t&1&&(o(0,"div",4),v(1,G,3,0,"div",6,f),o(3,"div",7),p(4,"span",8),_(5),r()()),t&2){let e=i(3);a(),g(k(1,D).constructor(e.skeletonRows())),a(4),T(" ",e.loadingMessage()," ")}}function J(t,n){if(t&1&&(o(0,"p",5),_(1),r()),t&2){let e=i(3);a(),C(e.loadingMessage())}}function K(t,n){if(t&1&&c(0,H,6,2,"div",4)(1,J,2,1,"p",5),t&2){let e=i(2);d(e.showSkeleton()?0:1)}}function Q(t,n){if(t&1){let e=y();o(0,"div",2)(1,"button",3),b("click",function(){x(e);let m=i(3);return u(m.handleRetry())}),_(2," \xDAjrapr\xF3b\xE1l\xE1s "),r()()}}function U(t,n){if(t&1&&(o(0,"div"),p(1,"app-ccap-error-display",1),c(2,Q,3,0,"div",2),r()),t&2){let e=i(2);a(),S("error",e.error())("sourceLabelOverride",e.errorSourceLabel()),a(),d(e.showRetry()?2:-1)}}function W(t,n){if(t&1&&(o(0,"p",0),_(1),r()),t&2){let e=i(2);a(),C(e.emptyMessage())}}function X(t,n){t&1&&w(0,1)}function Y(t,n){if(t&1&&c(0,K,2,1)(1,U,3,3,"div")(2,W,2,1,"p",0)(3,X,1,0),t&2){let e=i();d(e.isLoading()?0:e.error()?1:e.isEmpty()?2:3)}}var ot=(()=>{class t{isLoading=l(!1);error=l(null);isEmpty=l(!1);errorSourceLabel=l("");emptyMessage=l("Nincs megjelen\xEDthet\u0151 elem.");loadingMessage=l("Bet\xF6lt\xE9s\u2026");skeletonRows=l(2);showSkeleton=l(!1);showRetry=l(!0);errorTakesPrecedence=l(!1);retry=E();handleRetry(){this.retry.emit()}static \u0275fac=function(s){return new(s||t)};static \u0275cmp=h({type:t,selectors:[["app-s-content-state"]],hostAttrs:[1,"block"],inputs:{isLoading:[1,"isLoading"],error:[1,"error"],isEmpty:[1,"isEmpty"],errorSourceLabel:[1,"errorSourceLabel"],emptyMessage:[1,"emptyMessage"],loadingMessage:[1,"loadingMessage"],skeletonRows:[1,"skeletonRows"],showSkeleton:[1,"showSkeleton"],showRetry:[1,"showRetry"],errorTakesPrecedence:[1,"errorTakesPrecedence"]},outputs:{retry:"retry"},standalone:!0,features:[L],ngContentSelectors:I,decls:2,vars:1,consts:[[1,"text-neutral-500","py-4"],[1,"mb-3","block",3,"error","sourceLabelOverride"],[1,"text-center"],["type","button",1,"mt-1","px-3","py-1.5","text-sm","border","border-neonCyan","rounded-md","bg-transparent","text-neutral-200","hover:bg-neutral-800","hover:shadow-neon-glow-cyan","transition-colors",3,"click"],[1,"flex","flex-col","gap-2","py-4"],[1,"text-neutral-400"],[1,"px-4","py-3","border","border-neonDefault","rounded-lg","animate-pulse"],[1,"flex","items-center","gap-2","text-neutral-500","text-sm"],[1,"inline-block","w-2","h-2","rounded-full","bg-ccapAccent","animate-pulse"],[1,"h-4","w-3/4","bg-neutral-600","rounded","mb-2"],[1,"h-3","w-1/2","bg-neutral-700","rounded"]],template:function(s,m){s&1&&(M(I),c(0,z,4,1)(1,Y,4,1)),s&2&&d(m.errorTakesPrecedence()?0:1)},dependencies:[R,F],encapsulation:2})}return t})();export{ot as a};
2
+ //# sourceMappingURL=chunk-A3RMSX34.js.map
@@ -1,2 +1,2 @@
1
- import{a as S}from"./chunk-C7CAW6PK.js";import{I as m}from"./chunk-LGMUHF7N.js";import{C as l,d,p as i,vb as r,xb as I,y as f}from"./chunk-TBMJSIBB.js";var P=(()=>{class n{baseUrl=`${m.api.baseUrl}/cc-session`;http=l(I);peiContext_DS=l(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 i(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))),i(this.http.get(this.baseUrl,{params:e}))}getSession(t){let e=this.withCcapId(new r);return i(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 i(this.http.post(`${this.baseUrl}/${t.sessionId}/prompt`,e,{params:s}))}resumeSession(t){let e=this.withCcapId(new r);return i(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 i(this.http.post(`${this.baseUrl}/${t.sessionId}/fork`,e,{params:s}))}stopExecution(t){let e=this.withCcapId(new r);return i(this.http.post(`${this.baseUrl}/${t.sessionId}/stop-execution`,{},{params:e}))}terminateSession(t){let e=this.withCcapId(new r);return i(this.http.post(`${this.baseUrl}/${t.sessionId}/terminate`,{},{params:e}))}restartRunner(t){let e=this.withCcapId(new r);return i(this.http.post(`${this.baseUrl}/${t.sessionId}/runner-restart`,{},{params:e}))}updateSessionConfig(t){let a=t,{sessionId:e}=a,s=d(a,["sessionId"]),o=this.withCcapId(new r);return i(this.http.patch(`${this.baseUrl}/${e}/config`,s,{params:o}))}setSessionArchived(t){let e=this.withCcapId(new r);return i(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")),i(this.http.get(`${this.baseUrl}/${t.sessionId}/events`,{params:e}))}getRateLimitState(t){let e=new r;return i(this.http.get(`${this.baseUrl}/rate-limit-state/${encodeURIComponent(t.ccapId)}`,{params:e}))}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||n)};static \u0275prov=f({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})();var C=(()=>{class n{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=n.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=n.mapStatus(s.lastObservedStatus),p=n.readObservedAtIso(s.observedAt);return{status:h,resetsAt:c,rateLimitType:s.rateLimitType??"",utilization:o,surpassedThreshold:n.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=n.readObservedAtMs(o.observedAt);return n.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 n})();export{P as a,C as b};
2
- //# sourceMappingURL=chunk-IBAMIAIM.js.map
1
+ import{a as S}from"./chunk-2IYGO6RM.js";import{I as m}from"./chunk-TIJCR5DW.js";import{C as l,d,p as i,vb as r,xb as I,y as f}from"./chunk-TBMJSIBB.js";var P=(()=>{class n{baseUrl=`${m.api.baseUrl}/cc-session`;http=l(I);peiContext_DS=l(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 i(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))),i(this.http.get(this.baseUrl,{params:e}))}getSession(t){let e=this.withCcapId(new r);return i(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 i(this.http.post(`${this.baseUrl}/${t.sessionId}/prompt`,e,{params:s}))}resumeSession(t){let e=this.withCcapId(new r);return i(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 i(this.http.post(`${this.baseUrl}/${t.sessionId}/fork`,e,{params:s}))}stopExecution(t){let e=this.withCcapId(new r);return i(this.http.post(`${this.baseUrl}/${t.sessionId}/stop-execution`,{},{params:e}))}terminateSession(t){let e=this.withCcapId(new r);return i(this.http.post(`${this.baseUrl}/${t.sessionId}/terminate`,{},{params:e}))}restartRunner(t){let e=this.withCcapId(new r);return i(this.http.post(`${this.baseUrl}/${t.sessionId}/runner-restart`,{},{params:e}))}updateSessionConfig(t){let a=t,{sessionId:e}=a,s=d(a,["sessionId"]),o=this.withCcapId(new r);return i(this.http.patch(`${this.baseUrl}/${e}/config`,s,{params:o}))}setSessionArchived(t){let e=this.withCcapId(new r);return i(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")),i(this.http.get(`${this.baseUrl}/${t.sessionId}/events`,{params:e}))}getRateLimitState(t){let e=new r;return i(this.http.get(`${this.baseUrl}/rate-limit-state/${encodeURIComponent(t.ccapId)}`,{params:e}))}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||n)};static \u0275prov=f({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})();var C=(()=>{class n{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=n.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=n.mapStatus(s.lastObservedStatus),p=n.readObservedAtIso(s.observedAt);return{status:h,resetsAt:c,rateLimitType:s.rateLimitType??"",utilization:o,surpassedThreshold:n.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=n.readObservedAtMs(o.observedAt);return n.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 n})();export{P as a,C as b};
2
+ //# sourceMappingURL=chunk-AQD6DEHR.js.map
@@ -1,2 +1,2 @@
1
- import{p as C}from"./chunk-LGMUHF7N.js";import{aa as f,h as p,k as h,y as m}from"./chunk-TBMJSIBB.js";var a=function(o){return o.stopped="stopped",o.standby="standby",o.running="running",o}(a||{});var k={navigator_unavailable:"A hangfelv\xE9tel nem el\xE9rhet\u0151: a b\xF6ng\xE9sz\u0151 k\xF6rnyezet nem t\xE1mogatja a navigator API-t.",media_devices_unavailable:"A hangfelv\xE9tel nem el\xE9rhet\u0151: a b\xF6ng\xE9sz\u0151 ezen az oldalon nem ad hozz\xE1f\xE9r\xE9st a mikrofonhoz.",secure_context_required:"A hangfelv\xE9tel ezen az oldalon nem el\xE9rhet\u0151: a b\xF6ng\xE9sz\u0151 csak biztons\xE1gos kapcsolatban (HTTPS vagy localhost) enged\xE9lyezi a mikrofont."},v={media_devices_unavailable:"A mikrofonhoz haszn\xE1ld az alkalmaz\xE1st HTTPS c\xEDmen (pl. https://localhost:39051) vagy localhost-on.",secure_context_required:"A mikrofonhoz haszn\xE1ld az alkalmaz\xE1st HTTPS c\xEDmen (pl. https://localhost:39051) vagy localhost-on."},d=class{static wrapGetUserMediaError(s){if(s instanceof Error&&"code"in s&&typeof s.code=="string"&&s.code.startsWith("CCAP_"))return s;let e=s instanceof DOMException||s instanceof Error?s.name:"UnknownError",t,i;switch(e){case"NotAllowedError":t="CCAP_MIC_PERMISSION_DENIED",i="Microphone access denied by user or browser policy";break;case"NotFoundError":t="CCAP_MIC_NOT_FOUND",i="No microphone device found on this device";break;case"NotReadableError":t="CCAP_MIC_NOT_READABLE",i="Microphone hardware error or device already in use by another application";break;case"OverconstrainedError":t="CCAP_MIC_OVERCONSTRAINED",i="Microphone does not support the requested audio constraints";break;case"AbortError":t="CCAP_MIC_ABORTED",i="Microphone access request was aborted by the system";break;case"SecurityError":t="CCAP_MIC_SECURITY_ERROR",i="Microphone access blocked by document security policy (Permissions-Policy / iframe)";break;default:t="CCAP_MIC_UNKNOWN_ERROR",i=`getUserMedia failed with ${e}`;break}let n=new Error(i);return n.code=t,n.cause=s,n}static getGetUserMediaErrorMessage(s){switch(s instanceof DOMException||s instanceof Error?s.name:""){case"NotAllowedError":return"A mikrofon haszn\xE1lata nem enged\xE9lyezett: a b\xF6ng\xE9sz\u0151 vagy a felhaszn\xE1l\xF3 megtagadta a hozz\xE1f\xE9r\xE9st.";case"NotFoundError":return"Nem tal\xE1lhat\xF3 mikrofon ezen az eszk\xF6z\xF6n.";case"NotReadableError":return"A mikrofon nem olvashat\xF3: hardverhiba vagy egy m\xE1sik alkalmaz\xE1s haszn\xE1lja.";case"OverconstrainedError":return"A mikrofon nem t\xE1mogatja a k\xE9rt audio be\xE1ll\xEDt\xE1sokat.";case"AbortError":return"A mikrofon-hozz\xE1f\xE9r\xE9si k\xE9r\xE9s megszakadt.";case"SecurityError":return"A mikrofon-hozz\xE1f\xE9r\xE9st a biztons\xE1gi szab\xE1lyzat (Permissions-Policy / iframe) blokkolta.";default:return"A mikrofon el\xE9r\xE9se sikertelen (ismeretlen hiba)."}}static getGetUserMediaErrorHint(s){switch(s instanceof DOMException||s instanceof Error?s.name:""){case"NotAllowedError":return"Enged\xE9lyezd a mikrofont a b\xF6ng\xE9sz\u0151 c\xEDmsor\xE1ban (lakat ikon \u2192 Mikrofon \u2192 Enged\xE9lyez\xE9s), majd pr\xF3b\xE1ld \xFAjra. Androidon: Be\xE1ll\xEDt\xE1sok \u2192 Alkalmaz\xE1sok \u2192 Chrome \u2192 Enged\xE9lyek \u2192 Mikrofon.";case"NotReadableError":return"Z\xE1rd be a mikrofont haszn\xE1l\xF3 m\xE1sik alkalmaz\xE1st (pl. vide\xF3h\xEDv\xE1s, diktafon), majd pr\xF3b\xE1ld \xFAjra.";case"SecurityError":return'Ha az alkalmaz\xE1s iframe-ben fut, az iframe-nek "allow=microphone" attrib\xFAtumra van sz\xFCks\xE9ge.';default:return""}}static getMediaRecordingAvailability(){return typeof navigator>"u"?{supported:!1,reason:"navigator_unavailable"}:typeof window<"u"&&window.isSecureContext===!1?{supported:!1,reason:"secure_context_required"}:navigator.mediaDevices==null?{supported:!1,reason:"media_devices_unavailable"}:{supported:!0}}static getMediaUnavailableReportMessage(s){return`Media recording not available (reason: ${s}). Use HTTPS or localhost for microphone access.`}static getMediaUnavailableHint(s){return v[s]??""}static getMediaUnavailableMessage(s){return k[s]??"A hangfelv\xE9tel nem el\xE9rhet\u0151 ezen az oldalon."}};var r=p(C());var A=["audio/webm;codecs=opus","audio/webm","audio/ogg;codecs=opus","audio/ogg","audio/mp4"],z=(()=>{class o{volumeGate=.05;silenceTimeLimitMs=5*r.second;timesliceMs=5*r.second;segmentMaxChunks=6;segmentSoftFlushMinChunks=4;getUserMediaTimeoutMs=15*r.second;state_$=f(a.stopped);mediaStream=null;mediaRecorder=null;audioContext=null;analyser=null;audioSourceNode=null;volumeAnimationId=null;chunkIndex=0;chunks=[];isRestartingForFlush=!1;selectedMime="";onChunkCb=null;onVolumeCb=null;onErrorCb=null;deviceChangeHandler=null;silenceStartTime=null;setOnChunk(e){this.onChunkCb=e}setOnVolume(e){this.onVolumeCb=e}setOnError(e){this.onErrorCb=e}selectMime(){for(let e of A)if(MediaRecorder.isTypeSupported(e))return e;return"audio/webm"}getExtension(){return this.selectedMime.startsWith("audio/webm")?"webm":this.selectedMime.startsWith("audio/ogg")?"ogg":this.selectedMime.startsWith("audio/mp4")?"mp4":"webm"}startListening(){return h(this,null,function*(){if(this.state_$()===a.stopped)try{let e=d.getMediaRecordingAvailability();if(!e.supported){let n=`Media recording not available (reason: ${e.reason??"unknown"})`,l=new Error(n);throw l.code="CCAP_MEDIA_NOT_AVAILABLE",l}let t=null;try{let n=navigator.mediaDevices.getUserMedia({audio:{echoCancellation:!0,noiseSuppression:!0,autoGainControl:!0,channelCount:1}}),l=new Promise((c,g)=>{t=setTimeout(()=>{let u=new Error(`getUserMedia timed out after ${this.getUserMediaTimeoutMs}ms`);u.code="CCAP_MIC_TIMEOUT",g(u)},this.getUserMediaTimeoutMs)});this.mediaStream=yield Promise.race([n,l])}catch(n){throw d.wrapGetUserMediaError(n)}finally{t!==null&&clearTimeout(t)}let i=this.mediaStream.getAudioTracks()[0];i&&(r.DyFM_Log.info("[CCAP] mic track settings",i.getSettings()),i.onended=()=>{r.DyFM_Log.info("[CCAP] mic track ended unexpectedly"),this.stopListening(),this.onErrorCb?.(new Error("Microphone track ended unexpectedly (device disconnected?)"))}),this.registerDeviceChangeListener(),this.selectedMime=this.selectMime(),this.startVolumeLoop(),this.state_$.set(a.standby)}catch(e){throw this.state_$.set(a.stopped),e}})}stopListening(){let e=this.state_$()===a.running;e&&this.stopCapture(!0),this.stopVolumeLoop(),e||this.stopMediaRecorder(),this.silenceStartTime=null,this.unregisterDeviceChangeListener(),this.mediaStream&&(this.mediaStream.getTracks().forEach(t=>t.stop()),this.mediaStream=null),this.state_$.set(a.stopped)}startCapture(){return h(this,null,function*(){try{if(this.mediaStream==null&&(yield this.startListening()),this.mediaStream==null)return;this.silenceStartTime=null,this.chunks=[],this.createAndStartRecorder(),this.state_$.set(a.running)}catch(e){this.stopVolumeLoop(),this.state_$.set(a.stopped),this.onErrorCb?.(e)}})}stopCapture(e=!1,t=!1){if(this.isRestartingForFlush=!1,!(this.mediaRecorder==null||this.state_$()!==a.running)){try{this.mediaRecorder.stop()}catch(i){r.DyFM_Log.info("[CCAP] mediaRecorder.stop() failed (likely already inactive)",i),this.mediaRecorder=null,this.flushChunksAsSegment(e),this.state_$.set(this.mediaStream?a.standby:a.stopped);return}if(t){this.mediaRecorder=null,this.flushChunksAsSegment(e),this.state_$.set(this.mediaStream?a.standby:a.stopped);return}this.mediaRecorder.onstop=()=>{this.mediaRecorder=null,this.flushChunksAsSegment(e),this.state_$.set(this.mediaStream?a.standby:a.stopped)}}}createAndStartRecorder(){this.mediaStream&&(this.mediaRecorder=new MediaRecorder(this.mediaStream,{mimeType:this.selectedMime,audioBitsPerSecond:128e3}),this.mediaRecorder.ondataavailable=e=>{if(e.data.size>0&&this.chunks.push(e.data),this.state_$()!==a.running||this.isRestartingForFlush)return;let t=this.chunks.length>=this.segmentMaxChunks,i=this.chunks.length>=this.segmentSoftFlushMinChunks&&this.silenceStartTime!==null;(t||i)&&this.restartRecorderForFlush()},this.mediaRecorder.start(this.timesliceMs))}restartRecorderForFlush(){if(!(!this.mediaRecorder||this.mediaRecorder.state==="inactive")){this.isRestartingForFlush=!0,this.silenceStartTime=null,r.DyFM_Log.info("[CCAP] restartRecorderForFlush: stopping current recorder for mid-recording flush"),this.mediaRecorder.onstop=()=>{this.isRestartingForFlush=!1,this.mediaRecorder=null;let e=this.chunks.length;if(this.flushChunksAsSegment(!1),r.DyFM_Log.info(`[CCAP] restartRecorderForFlush: flushed ${e} chunks as segment`),this.state_$()!==a.running||!this.mediaStream){r.DyFM_Log.info("[CCAP] restartRecorderForFlush: not restarting (state changed or no stream)");return}this.createAndStartRecorder(),r.DyFM_Log.info("[CCAP] restartRecorderForFlush: new recorder started for next segment")};try{this.mediaRecorder.stop()}catch{this.isRestartingForFlush=!1,this.mediaRecorder=null,this.flushChunksAsSegment(!1)}}}flushChunksAsSegment(e){if(this.chunks.length===0)return;let t=new Blob(this.chunks,{type:this.selectedMime}),i={mimeType:this.selectedMime,filename:`audio-${Date.now()}.${this.getExtension()}`,chunkIndex:this.chunkIndex++,isFinal:e};this.chunks=[],this.onChunkCb?.(t,i)}startVolumeLoop(){if(this.mediaStream==null||this.onVolumeCb==null)return;this.audioContext=new AudioContext,this.audioContext.state==="suspended"&&this.audioContext.resume().catch(()=>{}),this.audioContext.onstatechange=()=>{let i=this.audioContext?.state??"unknown";r.DyFM_Log.info("[CCAP] AudioContext state changed:",i),i==="suspended"&&this.state_$()!==a.stopped&&this.audioContext?.resume().catch(()=>{})},this.audioSourceNode=this.audioContext.createMediaStreamSource(this.mediaStream),this.analyser=this.audioContext.createAnalyser(),this.analyser.fftSize=2048,this.analyser.smoothingTimeConstant=.8,this.audioSourceNode.connect(this.analyser);let e=new Float32Array(this.analyser.fftSize),t=()=>{if(this.analyser==null||this.onVolumeCb==null)return;this.analyser.getFloatTimeDomainData(e);let i=0;for(let c=0;c<e.length;c++)i+=Math.abs(e[c]);let n=i/e.length;this.onVolumeCb(n);let l=this.state_$();if(l===a.standby&&n>=this.volumeGate){this.startCapture(),this.volumeAnimationId=requestAnimationFrame(t);return}l===a.running&&!this.isRestartingForFlush&&(n<this.volumeGate?this.silenceStartTime===null?this.silenceStartTime=Date.now():Date.now()-this.silenceStartTime>=this.silenceTimeLimitMs&&(this.stopCapture(),this.silenceStartTime=null):this.silenceStartTime=null),this.volumeAnimationId=requestAnimationFrame(t)};t()}stopVolumeLoop(){this.volumeAnimationId!=null&&(cancelAnimationFrame(this.volumeAnimationId),this.volumeAnimationId=null),this.audioSourceNode=null,this.audioContext!=null&&(this.audioContext.onstatechange=null,this.audioContext.close().catch(()=>{}),this.audioContext=null),this.analyser=null}stopMediaRecorder(){if(this.mediaRecorder!=null&&this.mediaRecorder.state!=="inactive"){try{this.mediaRecorder.stop()}catch{}this.mediaRecorder=null}this.chunks=[],this.isRestartingForFlush=!1}registerDeviceChangeListener(){try{this.deviceChangeHandler=()=>{r.DyFM_Log.info("[CCAP] media device change detected")},navigator.mediaDevices.addEventListener("devicechange",this.deviceChangeHandler)}catch{this.deviceChangeHandler=null}}unregisterDeviceChangeListener(){if(this.deviceChangeHandler){try{navigator.mediaDevices.removeEventListener("devicechange",this.deviceChangeHandler)}catch{}this.deviceChangeHandler=null}}static \u0275fac=function(t){return new(t||o)};static \u0275prov=m({token:o,factory:o.\u0275fac,providedIn:"root"})}return o})();export{a,d as b,z as c};
2
- //# sourceMappingURL=chunk-HB7GOR7P.js.map
1
+ import{p as C}from"./chunk-TIJCR5DW.js";import{aa as f,h as p,k as h,y as m}from"./chunk-TBMJSIBB.js";var a=function(o){return o.stopped="stopped",o.standby="standby",o.running="running",o}(a||{});var k={navigator_unavailable:"A hangfelv\xE9tel nem el\xE9rhet\u0151: a b\xF6ng\xE9sz\u0151 k\xF6rnyezet nem t\xE1mogatja a navigator API-t.",media_devices_unavailable:"A hangfelv\xE9tel nem el\xE9rhet\u0151: a b\xF6ng\xE9sz\u0151 ezen az oldalon nem ad hozz\xE1f\xE9r\xE9st a mikrofonhoz.",secure_context_required:"A hangfelv\xE9tel ezen az oldalon nem el\xE9rhet\u0151: a b\xF6ng\xE9sz\u0151 csak biztons\xE1gos kapcsolatban (HTTPS vagy localhost) enged\xE9lyezi a mikrofont."},v={media_devices_unavailable:"A mikrofonhoz haszn\xE1ld az alkalmaz\xE1st HTTPS c\xEDmen (pl. https://localhost:39051) vagy localhost-on.",secure_context_required:"A mikrofonhoz haszn\xE1ld az alkalmaz\xE1st HTTPS c\xEDmen (pl. https://localhost:39051) vagy localhost-on."},d=class{static wrapGetUserMediaError(s){if(s instanceof Error&&"code"in s&&typeof s.code=="string"&&s.code.startsWith("CCAP_"))return s;let e=s instanceof DOMException||s instanceof Error?s.name:"UnknownError",t,i;switch(e){case"NotAllowedError":t="CCAP_MIC_PERMISSION_DENIED",i="Microphone access denied by user or browser policy";break;case"NotFoundError":t="CCAP_MIC_NOT_FOUND",i="No microphone device found on this device";break;case"NotReadableError":t="CCAP_MIC_NOT_READABLE",i="Microphone hardware error or device already in use by another application";break;case"OverconstrainedError":t="CCAP_MIC_OVERCONSTRAINED",i="Microphone does not support the requested audio constraints";break;case"AbortError":t="CCAP_MIC_ABORTED",i="Microphone access request was aborted by the system";break;case"SecurityError":t="CCAP_MIC_SECURITY_ERROR",i="Microphone access blocked by document security policy (Permissions-Policy / iframe)";break;default:t="CCAP_MIC_UNKNOWN_ERROR",i=`getUserMedia failed with ${e}`;break}let n=new Error(i);return n.code=t,n.cause=s,n}static getGetUserMediaErrorMessage(s){switch(s instanceof DOMException||s instanceof Error?s.name:""){case"NotAllowedError":return"A mikrofon haszn\xE1lata nem enged\xE9lyezett: a b\xF6ng\xE9sz\u0151 vagy a felhaszn\xE1l\xF3 megtagadta a hozz\xE1f\xE9r\xE9st.";case"NotFoundError":return"Nem tal\xE1lhat\xF3 mikrofon ezen az eszk\xF6z\xF6n.";case"NotReadableError":return"A mikrofon nem olvashat\xF3: hardverhiba vagy egy m\xE1sik alkalmaz\xE1s haszn\xE1lja.";case"OverconstrainedError":return"A mikrofon nem t\xE1mogatja a k\xE9rt audio be\xE1ll\xEDt\xE1sokat.";case"AbortError":return"A mikrofon-hozz\xE1f\xE9r\xE9si k\xE9r\xE9s megszakadt.";case"SecurityError":return"A mikrofon-hozz\xE1f\xE9r\xE9st a biztons\xE1gi szab\xE1lyzat (Permissions-Policy / iframe) blokkolta.";default:return"A mikrofon el\xE9r\xE9se sikertelen (ismeretlen hiba)."}}static getGetUserMediaErrorHint(s){switch(s instanceof DOMException||s instanceof Error?s.name:""){case"NotAllowedError":return"Enged\xE9lyezd a mikrofont a b\xF6ng\xE9sz\u0151 c\xEDmsor\xE1ban (lakat ikon \u2192 Mikrofon \u2192 Enged\xE9lyez\xE9s), majd pr\xF3b\xE1ld \xFAjra. Androidon: Be\xE1ll\xEDt\xE1sok \u2192 Alkalmaz\xE1sok \u2192 Chrome \u2192 Enged\xE9lyek \u2192 Mikrofon.";case"NotReadableError":return"Z\xE1rd be a mikrofont haszn\xE1l\xF3 m\xE1sik alkalmaz\xE1st (pl. vide\xF3h\xEDv\xE1s, diktafon), majd pr\xF3b\xE1ld \xFAjra.";case"SecurityError":return'Ha az alkalmaz\xE1s iframe-ben fut, az iframe-nek "allow=microphone" attrib\xFAtumra van sz\xFCks\xE9ge.';default:return""}}static getMediaRecordingAvailability(){return typeof navigator>"u"?{supported:!1,reason:"navigator_unavailable"}:typeof window<"u"&&window.isSecureContext===!1?{supported:!1,reason:"secure_context_required"}:navigator.mediaDevices==null?{supported:!1,reason:"media_devices_unavailable"}:{supported:!0}}static getMediaUnavailableReportMessage(s){return`Media recording not available (reason: ${s}). Use HTTPS or localhost for microphone access.`}static getMediaUnavailableHint(s){return v[s]??""}static getMediaUnavailableMessage(s){return k[s]??"A hangfelv\xE9tel nem el\xE9rhet\u0151 ezen az oldalon."}};var r=p(C());var A=["audio/webm;codecs=opus","audio/webm","audio/ogg;codecs=opus","audio/ogg","audio/mp4"],z=(()=>{class o{volumeGate=.05;silenceTimeLimitMs=5*r.second;timesliceMs=5*r.second;segmentMaxChunks=6;segmentSoftFlushMinChunks=4;getUserMediaTimeoutMs=15*r.second;state_$=f(a.stopped);mediaStream=null;mediaRecorder=null;audioContext=null;analyser=null;audioSourceNode=null;volumeAnimationId=null;chunkIndex=0;chunks=[];isRestartingForFlush=!1;selectedMime="";onChunkCb=null;onVolumeCb=null;onErrorCb=null;deviceChangeHandler=null;silenceStartTime=null;setOnChunk(e){this.onChunkCb=e}setOnVolume(e){this.onVolumeCb=e}setOnError(e){this.onErrorCb=e}selectMime(){for(let e of A)if(MediaRecorder.isTypeSupported(e))return e;return"audio/webm"}getExtension(){return this.selectedMime.startsWith("audio/webm")?"webm":this.selectedMime.startsWith("audio/ogg")?"ogg":this.selectedMime.startsWith("audio/mp4")?"mp4":"webm"}startListening(){return h(this,null,function*(){if(this.state_$()===a.stopped)try{let e=d.getMediaRecordingAvailability();if(!e.supported){let n=`Media recording not available (reason: ${e.reason??"unknown"})`,l=new Error(n);throw l.code="CCAP_MEDIA_NOT_AVAILABLE",l}let t=null;try{let n=navigator.mediaDevices.getUserMedia({audio:{echoCancellation:!0,noiseSuppression:!0,autoGainControl:!0,channelCount:1}}),l=new Promise((c,g)=>{t=setTimeout(()=>{let u=new Error(`getUserMedia timed out after ${this.getUserMediaTimeoutMs}ms`);u.code="CCAP_MIC_TIMEOUT",g(u)},this.getUserMediaTimeoutMs)});this.mediaStream=yield Promise.race([n,l])}catch(n){throw d.wrapGetUserMediaError(n)}finally{t!==null&&clearTimeout(t)}let i=this.mediaStream.getAudioTracks()[0];i&&(r.DyFM_Log.info("[CCAP] mic track settings",i.getSettings()),i.onended=()=>{r.DyFM_Log.info("[CCAP] mic track ended unexpectedly"),this.stopListening(),this.onErrorCb?.(new Error("Microphone track ended unexpectedly (device disconnected?)"))}),this.registerDeviceChangeListener(),this.selectedMime=this.selectMime(),this.startVolumeLoop(),this.state_$.set(a.standby)}catch(e){throw this.state_$.set(a.stopped),e}})}stopListening(){let e=this.state_$()===a.running;e&&this.stopCapture(!0),this.stopVolumeLoop(),e||this.stopMediaRecorder(),this.silenceStartTime=null,this.unregisterDeviceChangeListener(),this.mediaStream&&(this.mediaStream.getTracks().forEach(t=>t.stop()),this.mediaStream=null),this.state_$.set(a.stopped)}startCapture(){return h(this,null,function*(){try{if(this.mediaStream==null&&(yield this.startListening()),this.mediaStream==null)return;this.silenceStartTime=null,this.chunks=[],this.createAndStartRecorder(),this.state_$.set(a.running)}catch(e){this.stopVolumeLoop(),this.state_$.set(a.stopped),this.onErrorCb?.(e)}})}stopCapture(e=!1,t=!1){if(this.isRestartingForFlush=!1,!(this.mediaRecorder==null||this.state_$()!==a.running)){try{this.mediaRecorder.stop()}catch(i){r.DyFM_Log.info("[CCAP] mediaRecorder.stop() failed (likely already inactive)",i),this.mediaRecorder=null,this.flushChunksAsSegment(e),this.state_$.set(this.mediaStream?a.standby:a.stopped);return}if(t){this.mediaRecorder=null,this.flushChunksAsSegment(e),this.state_$.set(this.mediaStream?a.standby:a.stopped);return}this.mediaRecorder.onstop=()=>{this.mediaRecorder=null,this.flushChunksAsSegment(e),this.state_$.set(this.mediaStream?a.standby:a.stopped)}}}createAndStartRecorder(){this.mediaStream&&(this.mediaRecorder=new MediaRecorder(this.mediaStream,{mimeType:this.selectedMime,audioBitsPerSecond:128e3}),this.mediaRecorder.ondataavailable=e=>{if(e.data.size>0&&this.chunks.push(e.data),this.state_$()!==a.running||this.isRestartingForFlush)return;let t=this.chunks.length>=this.segmentMaxChunks,i=this.chunks.length>=this.segmentSoftFlushMinChunks&&this.silenceStartTime!==null;(t||i)&&this.restartRecorderForFlush()},this.mediaRecorder.start(this.timesliceMs))}restartRecorderForFlush(){if(!(!this.mediaRecorder||this.mediaRecorder.state==="inactive")){this.isRestartingForFlush=!0,this.silenceStartTime=null,r.DyFM_Log.info("[CCAP] restartRecorderForFlush: stopping current recorder for mid-recording flush"),this.mediaRecorder.onstop=()=>{this.isRestartingForFlush=!1,this.mediaRecorder=null;let e=this.chunks.length;if(this.flushChunksAsSegment(!1),r.DyFM_Log.info(`[CCAP] restartRecorderForFlush: flushed ${e} chunks as segment`),this.state_$()!==a.running||!this.mediaStream){r.DyFM_Log.info("[CCAP] restartRecorderForFlush: not restarting (state changed or no stream)");return}this.createAndStartRecorder(),r.DyFM_Log.info("[CCAP] restartRecorderForFlush: new recorder started for next segment")};try{this.mediaRecorder.stop()}catch{this.isRestartingForFlush=!1,this.mediaRecorder=null,this.flushChunksAsSegment(!1)}}}flushChunksAsSegment(e){if(this.chunks.length===0)return;let t=new Blob(this.chunks,{type:this.selectedMime}),i={mimeType:this.selectedMime,filename:`audio-${Date.now()}.${this.getExtension()}`,chunkIndex:this.chunkIndex++,isFinal:e};this.chunks=[],this.onChunkCb?.(t,i)}startVolumeLoop(){if(this.mediaStream==null||this.onVolumeCb==null)return;this.audioContext=new AudioContext,this.audioContext.state==="suspended"&&this.audioContext.resume().catch(()=>{}),this.audioContext.onstatechange=()=>{let i=this.audioContext?.state??"unknown";r.DyFM_Log.info("[CCAP] AudioContext state changed:",i),i==="suspended"&&this.state_$()!==a.stopped&&this.audioContext?.resume().catch(()=>{})},this.audioSourceNode=this.audioContext.createMediaStreamSource(this.mediaStream),this.analyser=this.audioContext.createAnalyser(),this.analyser.fftSize=2048,this.analyser.smoothingTimeConstant=.8,this.audioSourceNode.connect(this.analyser);let e=new Float32Array(this.analyser.fftSize),t=()=>{if(this.analyser==null||this.onVolumeCb==null)return;this.analyser.getFloatTimeDomainData(e);let i=0;for(let c=0;c<e.length;c++)i+=Math.abs(e[c]);let n=i/e.length;this.onVolumeCb(n);let l=this.state_$();if(l===a.standby&&n>=this.volumeGate){this.startCapture(),this.volumeAnimationId=requestAnimationFrame(t);return}l===a.running&&!this.isRestartingForFlush&&(n<this.volumeGate?this.silenceStartTime===null?this.silenceStartTime=Date.now():Date.now()-this.silenceStartTime>=this.silenceTimeLimitMs&&(this.stopCapture(),this.silenceStartTime=null):this.silenceStartTime=null),this.volumeAnimationId=requestAnimationFrame(t)};t()}stopVolumeLoop(){this.volumeAnimationId!=null&&(cancelAnimationFrame(this.volumeAnimationId),this.volumeAnimationId=null),this.audioSourceNode=null,this.audioContext!=null&&(this.audioContext.onstatechange=null,this.audioContext.close().catch(()=>{}),this.audioContext=null),this.analyser=null}stopMediaRecorder(){if(this.mediaRecorder!=null&&this.mediaRecorder.state!=="inactive"){try{this.mediaRecorder.stop()}catch{}this.mediaRecorder=null}this.chunks=[],this.isRestartingForFlush=!1}registerDeviceChangeListener(){try{this.deviceChangeHandler=()=>{r.DyFM_Log.info("[CCAP] media device change detected")},navigator.mediaDevices.addEventListener("devicechange",this.deviceChangeHandler)}catch{this.deviceChangeHandler=null}}unregisterDeviceChangeListener(){if(this.deviceChangeHandler){try{navigator.mediaDevices.removeEventListener("devicechange",this.deviceChangeHandler)}catch{}this.deviceChangeHandler=null}}static \u0275fac=function(t){return new(t||o)};static \u0275prov=m({token:o,factory:o.\u0275fac,providedIn:"root"})}return o})();export{a,d as b,z as c};
2
+ //# sourceMappingURL=chunk-CN76LOPU.js.map