@datalayer/agent-runtimes 1.5.100 → 1.5.102

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 (320) hide show
  1. package/dist-embed/chunks/{AgentDetails-Bi0s0fAV.js → AgentDetails-BNjN_hIA.js} +1 -1
  2. package/dist-embed/chunks/{AgentDetailsDialog-DcHJB-46.js → AgentDetailsDialog-CDFTzqHt.js} +1 -1
  3. package/dist-embed/chunks/{AgentInspector-BoLztEWM.js → AgentInspector-CgyzKeHG.js} +1 -1
  4. package/dist-embed/chunks/{AgentInspectorDialog-BQbJv6BQ.js → AgentInspectorDialog-Cf8jT6kR.js} +1 -1
  5. package/dist-embed/chunks/{CellSidebarExtension-I1K60vh4.js → CellSidebarExtension-9Xkl4nS1.js} +8 -8
  6. package/dist-embed/chunks/{ChatView-CS0QVQQ5.js → ChatView-CfutdVuV.js} +4 -4
  7. package/dist-embed/chunks/{ContextPie-BlO8HMfv.js → ContextPie-CjoAkxWM.js} +1 -1
  8. package/dist-embed/chunks/{DeckComponent-pNpyII0x.js → DeckComponent-LPAk473I.js} +31 -31
  9. package/dist-embed/chunks/{DocumentView-DH3V3gQj.js → DocumentView-CSX_hWLV.js} +1 -1
  10. package/dist-embed/chunks/{EphemeralDocument-MgLvMU4F.js → EphemeralDocument-BqDLSVvb.js} +1 -1
  11. package/dist-embed/chunks/{EphemeralNotebook-DRNUs2CY.js → EphemeralNotebook-C3e2FrSq.js} +2 -2
  12. package/dist-embed/chunks/{ExcalidrawComponent-CFCkypGk.js → ExcalidrawComponent-DIz2Hp3F.js} +1 -1
  13. package/dist-embed/chunks/{ExcalidrawModal-Cb2Vho79.js → ExcalidrawModal-Bz4nrIlA.js} +1 -1
  14. package/dist-embed/chunks/{JupyterLexicalExtension-IRPTy6fp.js → JupyterLexicalExtension-Cq2BuRs0.js} +9 -9
  15. package/dist-embed/chunks/{KernelVariables-DKDFwfHn.js → KernelVariables-BmWOn-n_.js} +3 -3
  16. package/dist-embed/chunks/{LexicalToolRegistry-DSuihTus.js → LexicalToolRegistry-Cx7dBNnA.js} +4 -4
  17. package/dist-embed/chunks/{NotebookSkeleton-D1ewE63E.js → NotebookSkeleton-D-wj2esi.js} +1 -1
  18. package/dist-embed/chunks/{NotebookToolSurfaces-B04CoSFo.js → NotebookToolSurfaces-Ch-7Pk_I.js} +1 -1
  19. package/dist-embed/chunks/{NotebookToolbar-Ddg2JwS8.js → NotebookToolbar-C6VvAn4V.js} +1 -1
  20. package/dist-embed/chunks/{NotebookView-D-Lsg7D7.js → NotebookView-yvVgAED6.js} +1 -1
  21. package/dist-embed/chunks/{Output-nrXVDS-d.js → Output-DF1wzbCD.js} +1 -1
  22. package/dist-embed/chunks/{SandboxDetailsDialog-DMKJZFoP.js → SandboxDetailsDialog-Bue8qhTm.js} +1 -1
  23. package/dist-embed/chunks/{SchemaForm-DZ0DKlG1.js → SchemaForm-DdqxkcGg.js} +1 -1
  24. package/dist-embed/chunks/{SheetTabs-D6IAdDy0.js → SheetTabs-DbMfhfKN.js} +3 -3
  25. package/dist-embed/chunks/{SpreadsheetPreviewView-Dl3kr0Bb.js → SpreadsheetPreviewView-SNF7bdWe.js} +1 -1
  26. package/dist-embed/chunks/{SpreadsheetView-nspmk7vr.js → SpreadsheetView-Do58cpUN.js} +1 -1
  27. package/dist-embed/chunks/{Toolbar-BDrBbL69.js → Toolbar-CalSw9_B.js} +1 -1
  28. package/dist-embed/chunks/{WidgetVariableView-DQbR4tlr.js → WidgetVariableView-BEQqawKT.js} +1 -1
  29. package/dist-embed/chunks/{YouTubePlugin-Vcoo9cJt.js → YouTubePlugin-aO-jWjdh.js} +1 -1
  30. package/dist-embed/chunks/{abnfDiagram-VCTEODGH-BnR307LJ.js → abnfDiagram-VCTEODGH-Cviduj-e.js} +1 -1
  31. package/dist-embed/chunks/{abnfDiagram-VCTEODGH-DMM-4z2i.js → abnfDiagram-VCTEODGH-DRYUPXKp.js} +1 -1
  32. package/dist-embed/chunks/{abnfDiagram-VCTEODGH-CVbtYf4Z.js → abnfDiagram-VCTEODGH-uQbfcTeh.js} +1 -1
  33. package/dist-embed/chunks/{ar-SA-G6X2FPQ2-BSgmpt5-.js → ar-SA-G6X2FPQ2-DZ6ta9d0.js} +1 -1
  34. package/dist-embed/chunks/{architectureDiagram-5GKGNRK7-Dtz5vgdG.js → architectureDiagram-5GKGNRK7-BbVwTk8b.js} +1 -1
  35. package/dist-embed/chunks/{architectureDiagram-5GKGNRK7-Bt2FCLqZ.js → architectureDiagram-5GKGNRK7-CFyAMJIx.js} +1 -1
  36. package/dist-embed/chunks/{architectureDiagram-5GKGNRK7-ZkhoS04q.js → architectureDiagram-5GKGNRK7-DeCj6zMe.js} +1 -1
  37. package/dist-embed/chunks/{az-AZ-76LH7QW2-DdJYOut1.js → az-AZ-76LH7QW2-By3wlF01.js} +1 -1
  38. package/dist-embed/chunks/{bg-BG-XCXSNQG7-CqyLLUxV.js → bg-BG-XCXSNQG7-B7QcVEVY.js} +1 -1
  39. package/dist-embed/chunks/{blockDiagram-868be97b-Coa_jxC5.js → blockDiagram-868be97b-CfRaagn_.js} +1 -1
  40. package/dist-embed/chunks/{blockDiagram-I7D4REHJ-G6aFEbTM.js → blockDiagram-I7D4REHJ-BjRmv4QH.js} +1 -1
  41. package/dist-embed/chunks/{blockDiagram-I7D4REHJ-DQ8iRsgf.js → blockDiagram-I7D4REHJ-SufaJtAi.js} +1 -1
  42. package/dist-embed/chunks/{blockDiagram-I7D4REHJ-DXMyZCA-.js → blockDiagram-I7D4REHJ-kguVnun5.js} +1 -1
  43. package/dist-embed/chunks/{bn-BD-2XOGV67Q-DkvkFbHE.js → bn-BD-2XOGV67Q-TxN1ubr7.js} +1 -1
  44. package/dist-embed/chunks/{c4Diagram-3f4bdde3-DrlpIJhH.js → c4Diagram-3f4bdde3-FyOk3LSs.js} +1 -1
  45. package/dist-embed/chunks/{c4Diagram-7LVT6UL2-Cb_4lbrT.js → c4Diagram-7LVT6UL2-Cf2_xw9_.js} +1 -1
  46. package/dist-embed/chunks/{c4Diagram-7LVT6UL2-cpEH7bse.js → c4Diagram-7LVT6UL2-D3Vjz3Z8.js} +1 -1
  47. package/dist-embed/chunks/{c4Diagram-7LVT6UL2-BGIfXVGs.js → c4Diagram-7LVT6UL2-SgQrn2PO.js} +1 -1
  48. package/dist-embed/chunks/{ca-ES-6MX7JW3Y-BGbo8RKg.js → ca-ES-6MX7JW3Y-Dqf9cvaK.js} +1 -1
  49. package/dist-embed/chunks/{celltoolbartracker-Cw0z7did.js → celltoolbartracker-Dk_FdlQk.js} +1 -1
  50. package/dist-embed/chunks/{chunk-2Q5K7J3B-hFGnBugV.js → chunk-2Q5K7J3B-BJrhmygH.js} +1 -1
  51. package/dist-embed/chunks/{chunk-2Q5K7J3B-n5Wh4T7i.js → chunk-2Q5K7J3B-DBdUm--2.js} +1 -1
  52. package/dist-embed/chunks/{chunk-2Q5K7J3B-Wncj3lvJ.js → chunk-2Q5K7J3B-DuPgZFdB.js} +1 -1
  53. package/dist-embed/chunks/{chunk-5VM5RSS4-1iG33qxM.js → chunk-5VM5RSS4-B-UBqvd2.js} +1 -1
  54. package/dist-embed/chunks/{chunk-5VM5RSS4-BPZ17Fvc.js → chunk-5VM5RSS4-C1Bpa3VF.js} +1 -1
  55. package/dist-embed/chunks/{chunk-5VM5RSS4-C0qOJhaZ.js → chunk-5VM5RSS4-nQugzoqo.js} +1 -1
  56. package/dist-embed/chunks/{chunk-F27PBJKO-BZvchzhT.js → chunk-F27PBJKO-D3zJwrkg.js} +1 -1
  57. package/dist-embed/chunks/{chunk-F27PBJKO-gaxXTTyt.js → chunk-F27PBJKO-DYiXXgT1.js} +1 -1
  58. package/dist-embed/chunks/{chunk-F27PBJKO-FQuOLMts.js → chunk-F27PBJKO-MI-KHY-9.js} +1 -1
  59. package/dist-embed/chunks/{chunk-IMKFNOWR-D6WqThtx.js → chunk-IMKFNOWR-BbylDqs_.js} +1 -1
  60. package/dist-embed/chunks/{chunk-IMKFNOWR-Ce8Jl1Cu.js → chunk-IMKFNOWR-DJk_fAZn.js} +1 -1
  61. package/dist-embed/chunks/{chunk-IMKFNOWR-Ah6SL0XE.js → chunk-IMKFNOWR-i4q8sDDB.js} +1 -1
  62. package/dist-embed/chunks/{chunk-JWPE2WC7-DjfDnLXf.js → chunk-JWPE2WC7-8ggfUh7n.js} +1 -1
  63. package/dist-embed/chunks/{chunk-JWPE2WC7-BiLuWg0V.js → chunk-JWPE2WC7-BSzyfwPR.js} +1 -1
  64. package/dist-embed/chunks/{chunk-JWPE2WC7-WEMpWwN6.js → chunk-JWPE2WC7-D1PH2kGj.js} +1 -1
  65. package/dist-embed/chunks/{chunk-POPQ4Y6H-D1zcv3TO.js → chunk-POPQ4Y6H-CKubmyGa.js} +1 -1
  66. package/dist-embed/chunks/{chunk-POPQ4Y6H-Ci1ORfKB.js → chunk-POPQ4Y6H-DhZnEisk.js} +1 -1
  67. package/dist-embed/chunks/{chunk-POPQ4Y6H-DGo-c1gA.js → chunk-POPQ4Y6H-pegurE5S.js} +1 -1
  68. package/dist-embed/chunks/{chunk-SVP7TREG-Dw-r79VX.js → chunk-SVP7TREG-BF112NUO.js} +1 -1
  69. package/dist-embed/chunks/{chunk-SVP7TREG-Dp25klfn.js → chunk-SVP7TREG-CoZRhamu.js} +1 -1
  70. package/dist-embed/chunks/{chunk-SVP7TREG-BNbFIqtk.js → chunk-SVP7TREG-D5yRz6xm.js} +1 -1
  71. package/dist-embed/chunks/{chunk-TICWLB2K-mR6tLG7x.js → chunk-TICWLB2K-Bs5ffYyR.js} +1 -1
  72. package/dist-embed/chunks/{chunk-TICWLB2K-BGlpRZHG.js → chunk-TICWLB2K-XF3ekUig.js} +1 -1
  73. package/dist-embed/chunks/{chunk-TICWLB2K-Cdu1LH0d.js → chunk-TICWLB2K-v9-jDBp6.js} +1 -1
  74. package/dist-embed/chunks/{chunk-XXDRQBXY-THCdSzRs.js → chunk-XXDRQBXY-D9b9c_ic.js} +1 -1
  75. package/dist-embed/chunks/{chunk-XXDRQBXY-Frt_zuHl.js → chunk-XXDRQBXY-D_FJqGi2.js} +1 -1
  76. package/dist-embed/chunks/{chunk-XXDRQBXY-Qb6D0SQd.js → chunk-XXDRQBXY-l6VvHymR.js} +1 -1
  77. package/dist-embed/chunks/{classDiagram-ZZMXUADV-DVQyGWdi.js → classDiagram-ZZMXUADV-2t4a-wcA.js} +1 -1
  78. package/dist-embed/chunks/{classDiagram-ZZMXUADV-MmqdRe8H.js → classDiagram-ZZMXUADV-9WVRK_2x.js} +1 -1
  79. package/dist-embed/chunks/{classDiagram-ZZMXUADV-DQkKVwjv.js → classDiagram-ZZMXUADV-Dh5wgyac.js} +1 -1
  80. package/dist-embed/chunks/{classDiagram-f62afe4f-D5_ocBdB.js → classDiagram-f62afe4f-CaiUEXWA.js} +1 -1
  81. package/dist-embed/chunks/{classDiagram-v2-604399ef-DW4EPvpW.js → classDiagram-v2-604399ef-CZz_cEb3.js} +1 -1
  82. package/dist-embed/chunks/{classDiagram-v2-VYDZK3BY-DVQyGWdi.js → classDiagram-v2-VYDZK3BY-2t4a-wcA.js} +1 -1
  83. package/dist-embed/chunks/{classDiagram-v2-VYDZK3BY-MmqdRe8H.js → classDiagram-v2-VYDZK3BY-9WVRK_2x.js} +1 -1
  84. package/dist-embed/chunks/{classDiagram-v2-VYDZK3BY-DQkKVwjv.js → classDiagram-v2-VYDZK3BY-Dh5wgyac.js} +1 -1
  85. package/dist-embed/chunks/{code-block-IT6T5CEO-JFor4YAD.js → code-block-IT6T5CEO-FSD2IMlq.js} +1 -1
  86. package/dist-embed/chunks/{component-C8C1Quml.js → component-Cl7a1YGX.js} +1 -1
  87. package/dist-embed/chunks/{cose-bilkent-JH36ORCC-C_tMYGtf.js → cose-bilkent-JH36ORCC-CYdr15Qb.js} +1 -1
  88. package/dist-embed/chunks/{cose-bilkent-JH36ORCC-BQyw1y1U.js → cose-bilkent-JH36ORCC-D7xkFMi4.js} +1 -1
  89. package/dist-embed/chunks/{cose-bilkent-JH36ORCC-CsAENBdP.js → cose-bilkent-JH36ORCC-DyL8-f5N.js} +1 -1
  90. package/dist-embed/chunks/{createText-aed3d8b3-CMnWQblC.js → createText-aed3d8b3-Dw977TwJ.js} +1 -1
  91. package/dist-embed/chunks/{cs-CZ-2BRQDIVT-CDANWU11.js → cs-CZ-2BRQDIVT-CwlCWt4T.js} +1 -1
  92. package/dist-embed/chunks/{cynefinDiagram-5FMLGOSQ-6YzZCz6x.js → cynefinDiagram-5FMLGOSQ-B-cEXnFH.js} +1 -1
  93. package/dist-embed/chunks/{cynefinDiagram-5FMLGOSQ-DIkKdCg7.js → cynefinDiagram-5FMLGOSQ-DkFOdRYH.js} +1 -1
  94. package/dist-embed/chunks/{cynefinDiagram-5FMLGOSQ-Cq4XKqVa.js → cynefinDiagram-5FMLGOSQ-wHBoNo7j.js} +1 -1
  95. package/dist-embed/chunks/{da-DK-5WZEPLOC-DwmgcOxN.js → da-DK-5WZEPLOC-BYQLzbDz.js} +1 -1
  96. package/dist-embed/chunks/{dagre-GXQ25YYZ-CPco-SxY.js → dagre-GXQ25YYZ-BiceTC0E.js} +1 -1
  97. package/dist-embed/chunks/{dagre-GXQ25YYZ-n9sjDOqg.js → dagre-GXQ25YYZ-Bj78I_3y.js} +1 -1
  98. package/dist-embed/chunks/{dagre-GXQ25YYZ-BkueS0KV.js → dagre-GXQ25YYZ-BvxZGlAG.js} +1 -1
  99. package/dist-embed/chunks/{de-DE-XR44H4JA-l2943EP0.js → de-DE-XR44H4JA-CdWGWxSf.js} +1 -1
  100. package/dist-embed/chunks/{diagram-S7CK7UJ4-CrcfBLvv.js → diagram-S7CK7UJ4-Cmb9Ykqm.js} +1 -1
  101. package/dist-embed/chunks/{diagram-S7CK7UJ4-jZdRq6wu.js → diagram-S7CK7UJ4-DMHeQr8F.js} +1 -1
  102. package/dist-embed/chunks/{diagram-S7CK7UJ4-DYtNkxjk.js → diagram-S7CK7UJ4-a4FArSaJ.js} +1 -1
  103. package/dist-embed/chunks/{diagram-UQ7AKVKN-CAYDX7Bd.js → diagram-UQ7AKVKN-2cPTLkSD.js} +1 -1
  104. package/dist-embed/chunks/{diagram-UQ7AKVKN-BdRY39AK.js → diagram-UQ7AKVKN-CSMVfm7b.js} +1 -1
  105. package/dist-embed/chunks/{diagram-UQ7AKVKN-B9ZTK0Te.js → diagram-UQ7AKVKN-C_jt0u6D.js} +1 -1
  106. package/dist-embed/chunks/{diagram-VSXAHHWV-CcaaK20P.js → diagram-VSXAHHWV-BsxdgIBU.js} +1 -1
  107. package/dist-embed/chunks/{diagram-VSXAHHWV-CxMii8H2.js → diagram-VSXAHHWV-BzwWsSpj.js} +1 -1
  108. package/dist-embed/chunks/{diagram-VSXAHHWV-Dt-I1eKY.js → diagram-VSXAHHWV-D3lurhxI.js} +1 -1
  109. package/dist-embed/chunks/{diagram-VX7I27RA-DwX1uaCx.js → diagram-VX7I27RA-BJ2YQn5K.js} +1 -1
  110. package/dist-embed/chunks/{diagram-VX7I27RA-DcbG7Tne.js → diagram-VX7I27RA-DA1J99rY.js} +1 -1
  111. package/dist-embed/chunks/{diagram-VX7I27RA-D8bhlh3r.js → diagram-VX7I27RA-Dm3pOzxq.js} +1 -1
  112. package/dist-embed/chunks/{diagram-Z3DM3KII-fyF7IFt-.js → diagram-Z3DM3KII-C5sZC4ig.js} +1 -1
  113. package/dist-embed/chunks/{diagram-Z3DM3KII-CeM42DVq.js → diagram-Z3DM3KII-CVmSZjIo.js} +1 -1
  114. package/dist-embed/chunks/{diagram-Z3DM3KII-C9dar5bS.js → diagram-Z3DM3KII-DVQwJUFe.js} +1 -1
  115. package/dist-embed/chunks/{ebnfDiagram-PWID7BFC-Df0coz-U.js → ebnfDiagram-PWID7BFC-DwtRvYrD.js} +1 -1
  116. package/dist-embed/chunks/{ebnfDiagram-PWID7BFC-B0F4iy5P.js → ebnfDiagram-PWID7BFC-Qmmh9DWc.js} +1 -1
  117. package/dist-embed/chunks/{ebnfDiagram-PWID7BFC-COj5ulCD.js → ebnfDiagram-PWID7BFC-YwFzQxr5.js} +1 -1
  118. package/dist-embed/chunks/{edges-b2856ca0-ZiofUaoz.js → edges-b2856ca0-Cn0ZKu5E.js} +1 -1
  119. package/dist-embed/chunks/{el-GR-BZB4AONW-Csfuo4E5.js → el-GR-BZB4AONW-TO3tEZdB.js} +1 -1
  120. package/dist-embed/chunks/{erDiagram-5d81789a-RepZY3NM.js → erDiagram-5d81789a-D3blvZNR.js} +1 -1
  121. package/dist-embed/chunks/{erDiagram-RLTQ6QDP-BulLtxKT.js → erDiagram-RLTQ6QDP-BvRjMgFJ.js} +1 -1
  122. package/dist-embed/chunks/{erDiagram-RLTQ6QDP-B5eHyTSb.js → erDiagram-RLTQ6QDP-HUP46o_S.js} +1 -1
  123. package/dist-embed/chunks/{erDiagram-RLTQ6QDP-CdBi4-uF.js → erDiagram-RLTQ6QDP-pCbnjfMk.js} +1 -1
  124. package/dist-embed/chunks/{es-ES-U4NZUMDT-Barmg8lW.js → es-ES-U4NZUMDT-BKZIANpq.js} +1 -1
  125. package/dist-embed/chunks/{eu-ES-A7QVB2H4-bSfPMjGm.js → eu-ES-A7QVB2H4-vz5ecl6y.js} +1 -1
  126. package/dist-embed/chunks/{fa-IR-HGAKTJCU-9wWNbyPp.js → fa-IR-HGAKTJCU-Dmmoro5p.js} +1 -1
  127. package/dist-embed/chunks/{fi-FI-Z5N7JZ37-BwYpCx0e.js → fi-FI-Z5N7JZ37-4bWurBmp.js} +1 -1
  128. package/dist-embed/chunks/{flowDb-185abca5-DjN9NKb1.js → flowDb-185abca5-DzeO696Q.js} +1 -1
  129. package/dist-embed/chunks/{flowDiagram-1629c991-BvOM7G2N.js → flowDiagram-1629c991-BCS_QkN2.js} +1 -1
  130. package/dist-embed/chunks/{flowDiagram-HODETNUW-BCEPp4ad.js → flowDiagram-HODETNUW-7NyW99NE.js} +1 -1
  131. package/dist-embed/chunks/{flowDiagram-HODETNUW-3KNlQIm_.js → flowDiagram-HODETNUW-C7KqgwLg.js} +1 -1
  132. package/dist-embed/chunks/{flowDiagram-HODETNUW-CXD13cZH.js → flowDiagram-HODETNUW-CObZVANE.js} +1 -1
  133. package/dist-embed/chunks/{flowDiagram-v2-1d953310-DhnQn8Nr.js → flowDiagram-v2-1d953310-5ThB3y9b.js} +1 -1
  134. package/dist-embed/chunks/{flowchart-elk-definition-6df44142-BqgdASPv.js → flowchart-elk-definition-6df44142-72x8aEiK.js} +1 -1
  135. package/dist-embed/chunks/{fr-FR-RHASNOE6-BDJ0uslp.js → fr-FR-RHASNOE6-QYoMYddl.js} +1 -1
  136. package/dist-embed/chunks/{ganttDiagram-3b0b3873-qKAuWTsd.js → ganttDiagram-3b0b3873-BsGIi6q0.js} +1 -1
  137. package/dist-embed/chunks/{ganttDiagram-EL5Y4UJY-CI7N1FH6.js → ganttDiagram-EL5Y4UJY-Bmj6A7sI.js} +1 -1
  138. package/dist-embed/chunks/{ganttDiagram-EL5Y4UJY-Dk94wE3f.js → ganttDiagram-EL5Y4UJY-Cm2jOWpZ.js} +1 -1
  139. package/dist-embed/chunks/{ganttDiagram-EL5Y4UJY-dHpetUk-.js → ganttDiagram-EL5Y4UJY-QZMrDtOa.js} +1 -1
  140. package/dist-embed/chunks/{gitGraphDiagram-WWUBYQGX-BODb2uT3.js → gitGraphDiagram-WWUBYQGX-1XlTL5m_.js} +1 -1
  141. package/dist-embed/chunks/{gitGraphDiagram-WWUBYQGX-D57Klnd8.js → gitGraphDiagram-WWUBYQGX-APR1d-tc.js} +1 -1
  142. package/dist-embed/chunks/{gitGraphDiagram-WWUBYQGX-2qOrIdt0.js → gitGraphDiagram-WWUBYQGX-BAP8EKLt.js} +1 -1
  143. package/dist-embed/chunks/{gitGraphDiagram-f01e8bc2-CB6fU3iE.js → gitGraphDiagram-f01e8bc2-C5glz__6.js} +1 -1
  144. package/dist-embed/chunks/{gl-ES-HMX3MZ6V-Jphst371.js → gl-ES-HMX3MZ6V-CuWi9MKI.js} +1 -1
  145. package/dist-embed/chunks/{he-IL-6SHJWFNN-Dq3r101K.js → he-IL-6SHJWFNN-CZ7rDY29.js} +1 -1
  146. package/dist-embed/chunks/{hi-IN-IWLTKZ5I-8B89dnMh.js → hi-IN-IWLTKZ5I-BOtn2GYM.js} +1 -1
  147. package/dist-embed/chunks/{hu-HU-A5ZG7DT2-CW5VclQQ.js → hu-HU-A5ZG7DT2-Da2fd7BW.js} +1 -1
  148. package/dist-embed/chunks/{id-ID-SAP4L64H-glKtNYpe.js → id-ID-SAP4L64H-DygGPsGR.js} +1 -1
  149. package/dist-embed/chunks/{index-9bae90f3-CNczxBwD.js → index-9bae90f3-C6Xh0qGL.js} +1 -1
  150. package/dist-embed/chunks/{index-CZGjZxFf.js → index-B40K_78l.js} +1 -1
  151. package/dist-embed/chunks/{index-DPr4u5vQ.js → index-B6ISkj2i.js} +2 -2
  152. package/dist-embed/chunks/{index-BM2hYh8Q.js → index-BF1314TG.js} +1 -1
  153. package/dist-embed/chunks/{index-BDTquNK1.js → index-BYQPOTc8.js} +1 -1
  154. package/dist-embed/chunks/{index-xmcTHVsH.js → index-BeA4XI1t.js} +1 -1
  155. package/dist-embed/chunks/{index-kIY4bTgE.js → index-Ben6aEe6.js} +1 -1
  156. package/dist-embed/chunks/{index-B5qB2n6R.js → index-C4gfDIqr.js} +1 -1
  157. package/dist-embed/chunks/{index-B5Ar2C76.js → index-CA38jh_p.js} +1 -1
  158. package/dist-embed/chunks/{index-CgItmZMM.js → index-CDGGINfN.js} +6 -6
  159. package/dist-embed/chunks/{index-B6pSvSsm.js → index-CF9HUHN8.js} +1 -1
  160. package/dist-embed/chunks/{index-zYmeKXxb.js → index-CFSUTqDN.js} +1 -1
  161. package/dist-embed/chunks/{index-w0c9DMN0.js → index-CIJSTpqW.js} +1 -1
  162. package/dist-embed/chunks/{index-B1hVcCeL.js → index-CMna4RvT.js} +1 -1
  163. package/dist-embed/chunks/{index-H4p_UVsf.js → index-CXEjqez2.js} +3 -3
  164. package/dist-embed/chunks/{index-BEHCLH59.js → index-CbC1En_Z.js} +1 -1
  165. package/dist-embed/chunks/{index-CnIHrGr-.js → index-Clrbkk70.js} +1 -1
  166. package/dist-embed/chunks/{index-DIaoQxKH.js → index-D4a8E78-.js} +1 -1
  167. package/dist-embed/chunks/{index-BFH1nmiJ.js → index-D7tggxpZ.js} +1 -1
  168. package/dist-embed/chunks/{index-C66Vbs6F.js → index-D99YJ2MP.js} +1 -1
  169. package/dist-embed/chunks/{index-DKiNGAN5.js → index-DCBV5Hy0.js} +1 -1
  170. package/dist-embed/chunks/{index-Bq90Fbc4.js → index-DDgcbci7.js} +1 -1
  171. package/dist-embed/chunks/{index-BHHOSjZo.js → index-DIoOWi0w.js} +2 -2
  172. package/dist-embed/chunks/{index-CYUvojfN.js → index-DK_juJTN.js} +2 -2
  173. package/dist-embed/chunks/{index-BgxqJ9_L.js → index-DOI3H9VM.js} +1 -1
  174. package/dist-embed/chunks/{index-DtDFBOl9.js → index-DS7lfBW6.js} +1 -1
  175. package/dist-embed/chunks/{index-CTr6-SsV.js → index-DUtVEK_h.js} +1 -1
  176. package/dist-embed/chunks/{index-CYAoF-g4.js → index-DcQTeOGT.js} +1 -1
  177. package/dist-embed/chunks/{index-BWuVbZWH.js → index-DrXZebZS.js} +1 -1
  178. package/dist-embed/chunks/{index-D3C4W1e1.js → index-Dw3RE4d5.js} +1 -1
  179. package/dist-embed/chunks/{index-DckpK9sw.js → index-DwA3K69t.js} +1 -1
  180. package/dist-embed/chunks/{index-nOhqCuwU.js → index-ErZ9_T3y.js} +4 -4
  181. package/dist-embed/chunks/{index-CtOE7MGN.js → index-Gy_uosvT.js} +1 -1
  182. package/dist-embed/chunks/{index-BW_-m6b-.js → index-JdNcf3Gc.js} +1 -1
  183. package/dist-embed/chunks/{index-BuNU8ABo.js → index-MUnyaGR7.js} +1 -1
  184. package/dist-embed/chunks/{index-CkFaHglB.js → index-e62XL6B3.js} +4 -4
  185. package/dist-embed/chunks/{index-23xUfUK3.js → index-fi_KzQoZ.js} +1 -1
  186. package/dist-embed/chunks/{index.esm-CWcjqNjR.js → index.esm-B3EUlnks.js} +1 -1
  187. package/dist-embed/chunks/{index.esm-BLDeC6q1.js → index.esm-D5xkumnx.js} +1 -1
  188. package/dist-embed/chunks/{infoDiagram-27XIBGKW-CF4qMRpl.js → infoDiagram-27XIBGKW-BRFvlR5E.js} +1 -1
  189. package/dist-embed/chunks/{infoDiagram-27XIBGKW-wn3LxC14.js → infoDiagram-27XIBGKW-D2VjYulT.js} +1 -1
  190. package/dist-embed/chunks/{infoDiagram-27XIBGKW-drOzO4SB.js → infoDiagram-27XIBGKW-mC-wx4e9.js} +1 -1
  191. package/dist-embed/chunks/{infoDiagram-a29d40f1-REMs6KOr.js → infoDiagram-a29d40f1-C84ltR9z.js} +1 -1
  192. package/dist-embed/chunks/isEqual-DjmHhd-b.js +1 -0
  193. package/dist-embed/chunks/{ishikawaDiagram-5VMMS53U-atVe3g88.js → ishikawaDiagram-5VMMS53U-19vfXaSu.js} +1 -1
  194. package/dist-embed/chunks/{ishikawaDiagram-5VMMS53U-g9P7XeQ7.js → ishikawaDiagram-5VMMS53U-BKwHxl_c.js} +1 -1
  195. package/dist-embed/chunks/{ishikawaDiagram-5VMMS53U-ykVOWtHE.js → ishikawaDiagram-5VMMS53U-DxmD4pNL.js} +1 -1
  196. package/dist-embed/chunks/{it-IT-JPQ66NNP-B-ahG0CB.js → it-IT-JPQ66NNP-C61ct2vR.js} +1 -1
  197. package/dist-embed/chunks/{ja-JP-DBVTYXUO-5JyLIwOs.js → ja-JP-DBVTYXUO-DsuHLQzd.js} +1 -1
  198. package/dist-embed/chunks/{journeyDiagram-3NMN7TZE-BMXUCxse.js → journeyDiagram-3NMN7TZE-BtJM0rtE.js} +1 -1
  199. package/dist-embed/chunks/{journeyDiagram-3NMN7TZE-Bjti-927.js → journeyDiagram-3NMN7TZE-CRrrfAmB.js} +1 -1
  200. package/dist-embed/chunks/{journeyDiagram-3NMN7TZE-DUyUItoc.js → journeyDiagram-3NMN7TZE-D8vrwew7.js} +1 -1
  201. package/dist-embed/chunks/{journeyDiagram-95396277-B9L_UQQW.js → journeyDiagram-95396277-91Yn8aB5.js} +1 -1
  202. package/dist-embed/chunks/{kaa-6HZHGXH3-BIVYWYQP.js → kaa-6HZHGXH3-DXk4Goog.js} +1 -1
  203. package/dist-embed/chunks/{kab-KAB-ZGHBKWFO-DVL8cRgk.js → kab-KAB-ZGHBKWFO-lymWJChw.js} +1 -1
  204. package/dist-embed/chunks/{kanban-definition-UXKFOSKX-CmWGlZ0H.js → kanban-definition-UXKFOSKX-BD4YKCh4.js} +1 -1
  205. package/dist-embed/chunks/{kanban-definition-UXKFOSKX-ClVtSIhc.js → kanban-definition-UXKFOSKX-BI3EeL_e.js} +1 -1
  206. package/dist-embed/chunks/{kanban-definition-UXKFOSKX-BcbVekZs.js → kanban-definition-UXKFOSKX-DFA9oGiU.js} +1 -1
  207. package/dist-embed/chunks/{kk-KZ-P5N5QNE5-KOEMwerS.js → kk-KZ-P5N5QNE5-BVNL23_r.js} +1 -1
  208. package/dist-embed/chunks/{km-KH-HSX4SM5Z-CDH3ezLN.js → km-KH-HSX4SM5Z-C__pm6qQ.js} +1 -1
  209. package/dist-embed/chunks/{ko-KR-MTYHY66A-Bmb-D285.js → ko-KR-MTYHY66A-D5yQS5Y4.js} +1 -1
  210. package/dist-embed/chunks/{ku-TR-6OUDTVRD-BuhkTBbp.js → ku-TR-6OUDTVRD-OIGj43yE.js} +1 -1
  211. package/dist-embed/chunks/{layout-CIqBEWvO.js → layout-C3jdOWbU.js} +1 -1
  212. package/dist-embed/chunks/{layout-DAiowMz2.js → layout-DWmuzni9.js} +1 -1
  213. package/dist-embed/chunks/{layout-LTmWPIeE.js → layout-Dj_zgK51.js} +1 -1
  214. package/dist-embed/chunks/{lexicalHooks-CKdIdyZ8.js → lexicalHooks-DWzaOuko.js} +1 -1
  215. package/dist-embed/chunks/{lt-LT-XHIRWOB4-584bUjqP.js → lt-LT-XHIRWOB4-UGZ71aBo.js} +1 -1
  216. package/dist-embed/chunks/{lv-LV-5QDEKY6T-CkTBsD-R.js → lv-LV-5QDEKY6T-LRIHo0NC.js} +1 -1
  217. package/dist-embed/chunks/{mermaid.core-RXtCLUM0.js → mermaid.core-DF6jaPnW.js} +5 -5
  218. package/dist-embed/chunks/{mermaid.core-CIytoWBO.js → mermaid.core-DIIwHAlX.js} +3 -3
  219. package/dist-embed/chunks/{mindmap-definition-YA3MSWOX-B11GPGu3.js → mindmap-definition-YA3MSWOX-3bvIJFMV.js} +1 -1
  220. package/dist-embed/chunks/{mindmap-definition-YA3MSWOX-CGIHCY64.js → mindmap-definition-YA3MSWOX-D6u4H_xO.js} +1 -1
  221. package/dist-embed/chunks/{mindmap-definition-YA3MSWOX-MoPLOrcw.js → mindmap-definition-YA3MSWOX-fBVFRUCw.js} +1 -1
  222. package/dist-embed/chunks/{mindmap-definition-e4c1d938-D_grZmp7.js → mindmap-definition-e4c1d938-DbYGQCf5.js} +1 -1
  223. package/dist-embed/chunks/{mr-IN-CRQNXWMA-0Xba6kSJ.js → mr-IN-CRQNXWMA-BXO8TJMv.js} +1 -1
  224. package/dist-embed/chunks/{my-MM-5M5IBNSE-B09FZKSd.js → my-MM-5M5IBNSE-CRUW8B_2.js} +1 -1
  225. package/dist-embed/chunks/{nb-NO-T6EIAALU-BpCjfVUo.js → nb-NO-T6EIAALU-UnDxFcwr.js} +1 -1
  226. package/dist-embed/chunks/{nl-NL-IS3SIHDZ-IMA72Wj7.js → nl-NL-IS3SIHDZ-CdTeVF3c.js} +1 -1
  227. package/dist-embed/chunks/{nn-NO-6E72VCQL-BvFt5eEP.js → nn-NO-6E72VCQL-nLVDeuAb.js} +1 -1
  228. package/dist-embed/chunks/{oc-FR-POXYY2M6-QMGUoXMd.js → oc-FR-POXYY2M6-CGDfJA5K.js} +1 -1
  229. package/dist-embed/chunks/{pa-IN-N4M65BXN-a8dOum4D.js → pa-IN-N4M65BXN-h3gZ9Ic4.js} +1 -1
  230. package/dist-embed/chunks/{pegDiagram-XKGWAZYB-CXd1v4RS.js → pegDiagram-XKGWAZYB-CtWh5AAX.js} +1 -1
  231. package/dist-embed/chunks/{pegDiagram-XKGWAZYB-DkCI0q8Y.js → pegDiagram-XKGWAZYB-D0zyGRR2.js} +1 -1
  232. package/dist-embed/chunks/{pegDiagram-XKGWAZYB-DTT8e_Vu.js → pegDiagram-XKGWAZYB-fy3EphLc.js} +1 -1
  233. package/dist-embed/chunks/{percentages-BXMCSKIN-Ck3DaSng.js → percentages-BXMCSKIN-BQMwWCQD.js} +6 -6
  234. package/dist-embed/chunks/{pica-io9rFAcX.js → pica-BXDmzrU-.js} +1 -1
  235. package/dist-embed/chunks/{pieDiagram-E7YTZNPT-B4P8wCma.js → pieDiagram-E7YTZNPT-BsWWB93l.js} +1 -1
  236. package/dist-embed/chunks/{pieDiagram-E7YTZNPT-2Glo3MKw.js → pieDiagram-E7YTZNPT-CArVdetR.js} +1 -1
  237. package/dist-embed/chunks/{pieDiagram-E7YTZNPT-D6zxicZn.js → pieDiagram-E7YTZNPT-DNxhxWw6.js} +1 -1
  238. package/dist-embed/chunks/{pieDiagram-c941bede-Cqi77jMu.js → pieDiagram-c941bede-Cj4FBN3j.js} +1 -1
  239. package/dist-embed/chunks/{pl-PL-T2D74RX3-BS06UMKK.js → pl-PL-T2D74RX3-D83IXMGV.js} +1 -1
  240. package/dist-embed/chunks/{plugin-DE0vZ9p3.js → plugin-DyUbOay7.js} +1 -1
  241. package/dist-embed/chunks/{plugin-ihQPqJPB.js → plugin-OsRnWXOJ.js} +1 -1
  242. package/dist-embed/chunks/portable-BKg3lLaO.js +1 -0
  243. package/dist-embed/chunks/{pt-BR-5N22H2LF-BIO1KViR.js → pt-BR-5N22H2LF-C-tCCB23.js} +1 -1
  244. package/dist-embed/chunks/{pt-PT-UZXXM6DQ-BZuZ9OiO.js → pt-PT-UZXXM6DQ-BfalAAyJ.js} +1 -1
  245. package/dist-embed/chunks/{quadrantDiagram-AXDQQJYC-C_CEGa46.js → quadrantDiagram-AXDQQJYC-299UcZFW.js} +1 -1
  246. package/dist-embed/chunks/{quadrantDiagram-AXDQQJYC-DSBKUuiq.js → quadrantDiagram-AXDQQJYC-Be4yYxRi.js} +1 -1
  247. package/dist-embed/chunks/{quadrantDiagram-AXDQQJYC-xiPOrF1K.js → quadrantDiagram-AXDQQJYC-DWfnlrHL.js} +1 -1
  248. package/dist-embed/chunks/{quadrantDiagram-cf8b8fe0-BMOuDGDF.js → quadrantDiagram-cf8b8fe0-qh1uZ5v_.js} +1 -1
  249. package/dist-embed/chunks/{railroadDiagram-O6MQD6OU-CSD5KLnV.js → railroadDiagram-O6MQD6OU-C9HR2VRW.js} +1 -1
  250. package/dist-embed/chunks/{railroadDiagram-O6MQD6OU-DjTUEumb.js → railroadDiagram-O6MQD6OU-COJ52k8E.js} +1 -1
  251. package/dist-embed/chunks/{railroadDiagram-O6MQD6OU-BgrbSE40.js → railroadDiagram-O6MQD6OU-DPlEOlHJ.js} +1 -1
  252. package/dist-embed/chunks/{renderer-BU04-DkJ.js → renderer-VW8Zgoi-.js} +1 -1
  253. package/dist-embed/chunks/{requirementDiagram-53bda41b-DKlphVxw.js → requirementDiagram-53bda41b-C_KZy5Fe.js} +1 -1
  254. package/dist-embed/chunks/{requirementDiagram-BXWQKSXE-DMdw9yP9.js → requirementDiagram-BXWQKSXE-2dtqnxe5.js} +1 -1
  255. package/dist-embed/chunks/{requirementDiagram-BXWQKSXE-CnRk1roG.js → requirementDiagram-BXWQKSXE-BSUw2gn-.js} +1 -1
  256. package/dist-embed/chunks/{requirementDiagram-BXWQKSXE-BXaCAhpq.js → requirementDiagram-BXWQKSXE-BxFFoRpi.js} +1 -1
  257. package/dist-embed/chunks/{ro-RO-JPDTUUEW-Cr8vd9Pv.js → ro-RO-JPDTUUEW-BE1v-gpB.js} +1 -1
  258. package/dist-embed/chunks/{ru-RU-B4JR7IUQ-Dht1kDyT.js → ru-RU-B4JR7IUQ-CVNYAGNj.js} +1 -1
  259. package/dist-embed/chunks/{sankeyDiagram-P5KCCOFB-BS7hu1AF.js → sankeyDiagram-P5KCCOFB-2w9aAGeM.js} +1 -1
  260. package/dist-embed/chunks/{sankeyDiagram-P5KCCOFB-okgEVTpa.js → sankeyDiagram-P5KCCOFB-BWZcxo3B.js} +1 -1
  261. package/dist-embed/chunks/{sankeyDiagram-P5KCCOFB-CzrCH920.js → sankeyDiagram-P5KCCOFB-CatGDvVZ.js} +1 -1
  262. package/dist-embed/chunks/{sankeyDiagram-c3ef121a-Dg6SbJjG.js → sankeyDiagram-c3ef121a-B6bWzn2q.js} +1 -1
  263. package/dist-embed/chunks/{sequenceDiagram-82a5b84f-DE09oDEu.js → sequenceDiagram-82a5b84f-CaIr2bxU.js} +1 -1
  264. package/dist-embed/chunks/{sequenceDiagram-WJ2MYXX4-C7v6HXxx.js → sequenceDiagram-WJ2MYXX4-B67pBo6k.js} +1 -1
  265. package/dist-embed/chunks/{sequenceDiagram-WJ2MYXX4-CtR3Mxli.js → sequenceDiagram-WJ2MYXX4-CBRqz17v.js} +1 -1
  266. package/dist-embed/chunks/{sequenceDiagram-WJ2MYXX4-Bb3A79mo.js → sequenceDiagram-WJ2MYXX4-DlhUecfS.js} +1 -1
  267. package/dist-embed/chunks/{sessions-CnTFUfGi.js → sessions-Dlwi03ae.js} +1 -1
  268. package/dist-embed/chunks/{si-LK-N5RQ5JYF-B2xq7Zbi.js → si-LK-N5RQ5JYF-DUuCNsO5.js} +1 -1
  269. package/dist-embed/chunks/{sizeCapture-INFHLROL-CU32UBMk.js → sizeCapture-INFHLROL-BEjCofob.js} +1 -1
  270. package/dist-embed/chunks/{sizeCapture-INFHLROL-TdDsBg4W.js → sizeCapture-INFHLROL-DMtgrDCy.js} +1 -1
  271. package/dist-embed/chunks/{sizeCapture-INFHLROL-D5hzqzwD.js → sizeCapture-INFHLROL-fPkZXPlY.js} +1 -1
  272. package/dist-embed/chunks/{sk-SK-C5VTKIMK-Sw5YFSH1.js → sk-SK-C5VTKIMK-CnlsIkzl.js} +1 -1
  273. package/dist-embed/chunks/{sl-SI-NN7IZMDC-DZin2Uyg.js → sl-SI-NN7IZMDC-BUxNatf_.js} +1 -1
  274. package/dist-embed/chunks/{stateDiagram-43e79a5f-uKY_K58g.js → stateDiagram-43e79a5f-C9c4jD1w.js} +1 -1
  275. package/dist-embed/chunks/{stateDiagram-D77RDMKH-mOMKyP5U.js → stateDiagram-D77RDMKH-BwBOxQvl.js} +1 -1
  276. package/dist-embed/chunks/{stateDiagram-D77RDMKH-Cd_HasWU.js → stateDiagram-D77RDMKH-C3hsuLFV.js} +1 -1
  277. package/dist-embed/chunks/{stateDiagram-D77RDMKH-CY5udAKA.js → stateDiagram-D77RDMKH-dWsBlue-.js} +1 -1
  278. package/dist-embed/chunks/{stateDiagram-v2-2041ed4f-Cz97TKZ0.js → stateDiagram-v2-2041ed4f-CcvTvP8J.js} +1 -1
  279. package/dist-embed/chunks/{stateDiagram-v2-MP3YSRHH-BJVCwCLk.js → stateDiagram-v2-MP3YSRHH-BynTEikt.js} +1 -1
  280. package/dist-embed/chunks/{stateDiagram-v2-MP3YSRHH-2ASMATIX.js → stateDiagram-v2-MP3YSRHH-CRNCbzUu.js} +1 -1
  281. package/dist-embed/chunks/{stateDiagram-v2-MP3YSRHH-hXyOMGYK.js → stateDiagram-v2-MP3YSRHH-yYUm25Cg.js} +1 -1
  282. package/dist-embed/chunks/{styles-455b33cd-QxOIl59n.js → styles-455b33cd-DTnW81zt.js} +1 -1
  283. package/dist-embed/chunks/{styles-f932cba9-CRW7ybKl.js → styles-f932cba9-DvbsLPZ9.js} +1 -1
  284. package/dist-embed/chunks/{styles-fcc2142b-lNkMjC8Z.js → styles-fcc2142b-DS8IKMau.js} +1 -1
  285. package/dist-embed/chunks/{subset-shared.chunk-C8kMR6Ea.js → subset-shared.chunk-CTwDOb0-.js} +1 -1
  286. package/dist-embed/chunks/{subset-worker.chunk-BeXpWPn3.js → subset-worker.chunk-CY8G1DYa.js} +1 -1
  287. package/dist-embed/chunks/{sv-SE-XGPEYMSR-XX8MI0nA.js → sv-SE-XGPEYMSR-cyuprKcs.js} +1 -1
  288. package/dist-embed/chunks/{svgDrawCommon-148a3cd9-DrX92bA5.js → svgDrawCommon-148a3cd9-BxghTVdH.js} +1 -1
  289. package/dist-embed/chunks/{swimlanes-42K2YHIH-BUwYYg5o.js → swimlanes-42K2YHIH-CGEWUgMO.js} +1 -1
  290. package/dist-embed/chunks/{swimlanes-42K2YHIH-0MJvexik.js → swimlanes-42K2YHIH-DY5rybP3.js} +1 -1
  291. package/dist-embed/chunks/{swimlanes-42K2YHIH-CmWAxVZ_.js → swimlanes-42K2YHIH-DiRx3T6S.js} +1 -1
  292. package/dist-embed/chunks/{swimlanesDiagram-VR7AAH4N-BuFLmgBx.js → swimlanesDiagram-VR7AAH4N-BmSxUdGr.js} +1 -1
  293. package/dist-embed/chunks/{swimlanesDiagram-VR7AAH4N-DwTgKjIi.js → swimlanesDiagram-VR7AAH4N-BmTIqylO.js} +1 -1
  294. package/dist-embed/chunks/{swimlanesDiagram-VR7AAH4N-vzU4YzHa.js → swimlanesDiagram-VR7AAH4N-Dmom79F0.js} +1 -1
  295. package/dist-embed/chunks/{ta-IN-2NMHFXQM-Cm2c3FMf.js → ta-IN-2NMHFXQM-Byh0RKP5.js} +1 -1
  296. package/dist-embed/chunks/{th-TH-HPSO5L25-DD76ndfY.js → th-TH-HPSO5L25-C8zeMDt2.js} +1 -1
  297. package/dist-embed/chunks/{timeline-definition-24CTP7MA-DxAxZYKP.js → timeline-definition-24CTP7MA-4T6yq6Xl.js} +1 -1
  298. package/dist-embed/chunks/{timeline-definition-24CTP7MA-SfVzoC7E.js → timeline-definition-24CTP7MA-CbdMtllQ.js} +1 -1
  299. package/dist-embed/chunks/{timeline-definition-24CTP7MA-a0E0wu89.js → timeline-definition-24CTP7MA-D_rwkEbI.js} +1 -1
  300. package/dist-embed/chunks/{timeline-definition-7545f45a-CqsiZe-C.js → timeline-definition-7545f45a-BV1QYS8b.js} +1 -1
  301. package/dist-embed/chunks/{tr-TR-DEFEU3FU-CkX69g80.js → tr-TR-DEFEU3FU-CnqB5qYp.js} +1 -1
  302. package/dist-embed/chunks/{uk-UA-QMV73CPH-DILlpWB0.js → uk-UA-QMV73CPH-T0hbDiAg.js} +1 -1
  303. package/dist-embed/chunks/{vennDiagram-4TSXK5OY-C8SwZKm-.js → vennDiagram-4TSXK5OY-Bvimw16k.js} +1 -1
  304. package/dist-embed/chunks/{vennDiagram-4TSXK5OY-BDOrQK88.js → vennDiagram-4TSXK5OY-CBXnZEfU.js} +1 -1
  305. package/dist-embed/chunks/{vennDiagram-4TSXK5OY-BxUbBn7b.js → vennDiagram-4TSXK5OY-CYAyZJWP.js} +1 -1
  306. package/dist-embed/chunks/{vi-VN-M7AON7JQ-D0REMGYG.js → vi-VN-M7AON7JQ-BbVJrx8R.js} +1 -1
  307. package/dist-embed/chunks/{wardleyDiagram-VM6X3IG4-BZssbJ10.js → wardleyDiagram-VM6X3IG4-B9iqutw0.js} +1 -1
  308. package/dist-embed/chunks/{wardleyDiagram-VM6X3IG4-DY5BAim8.js → wardleyDiagram-VM6X3IG4-CkqyRdUt.js} +1 -1
  309. package/dist-embed/chunks/{wardleyDiagram-VM6X3IG4-DQI20vwb.js → wardleyDiagram-VM6X3IG4-k_2iCVDr.js} +1 -1
  310. package/dist-embed/chunks/{xychartDiagram-3f383b91-DnD8gcm_.js → xychartDiagram-3f383b91-L3ZS62LU.js} +1 -1
  311. package/dist-embed/chunks/{xychartDiagram-S5SC5T6Z-DfsjHT0Y.js → xychartDiagram-S5SC5T6Z--E3rc8E6.js} +1 -1
  312. package/dist-embed/chunks/{xychartDiagram-S5SC5T6Z-BO4MDqrK.js → xychartDiagram-S5SC5T6Z-COkEQpnW.js} +1 -1
  313. package/dist-embed/chunks/{xychartDiagram-S5SC5T6Z-CDXKKZoM.js → xychartDiagram-S5SC5T6Z-DufzH9GE.js} +1 -1
  314. package/dist-embed/chunks/{zh-CN-LNUGB5OW-BmSYUWcq.js → zh-CN-LNUGB5OW-B2XCvd4u.js} +1 -1
  315. package/dist-embed/chunks/{zh-HK-E62DVLB3-BqISOUKV.js → zh-HK-E62DVLB3-D8xk7wby.js} +1 -1
  316. package/dist-embed/chunks/{zh-TW-RAJ6MFWO-DACyIjvO.js → zh-TW-RAJ6MFWO-fBqMZFIZ.js} +1 -1
  317. package/dist-embed/datalayer-app-main.js +59 -26
  318. package/package.json +1 -1
  319. package/dist-embed/chunks/isEqual-zPmcQAke.js +0 -1
  320. package/dist-embed/chunks/portable-DeuNvN1G.js +0 -1
@@ -1,4 +1,4 @@
1
- import{a6 as B,fa as Gs,r as s,j as t,gC as Ys,gD as Js,ck as qn,B as g,H as xt,T as z,v as q,dq as Jt,fq as nn,gE as se,dj as bt,y as qs,gF as Qs,gG as Zs,f0 as Xs,gH as eo,b1 as to,gI as no,gJ as so,gK as oo,gL as ao,gM as io,gN as ro,eU as ls,eS as lo,eV as sn,gO as co,gP as uo,gQ as fo,gR as po,gS as cs,gT as ds,gU as mo,L as ho,gV as go,e4 as qt,I as us,bs as st,D as fs,gW as Qn,gX as xo,gY as bo,E as vo,bk as So,gZ as yo,g_ as Co,g$ as wo,h0 as jo,h1 as ko,h2 as To,a1 as Qt,h3 as Ro,h4 as Io,h5 as Eo,h6 as Ao,h7 as Po,h8 as Uo,h9 as $o,ha as Mo,hb as Oo,hc as Lo,hd as Fo,he as zo,hf as _o,hg as No,hh as Bo,hi as Vo,hj as Ho,hk as Do,hl as Wo,hm as Ko,hn as ot,ho as Go,hp as Yo,hq as Jo,hr as qo,hs as Zn,ht as Qo,hu as Ne,hv as Zo,hw as Xo,bl as vt,hx as ea,hy as ta,hz as Xn,hA as na,hB as sa,hC as oa,hD as aa,fy as ia,hE as Zt,hF as Ae,hG as ra,hH as la,hI as ca,hJ as es,hK as da,hL as ts,hM as ua,hN as fa,hO as pa,hP as ma,hQ as ha,hR as ga,hS as xa,hT as ba,hU as va,hV as Sa,hW as St,hX as ya,hY as Ca,hZ as wa,h_ as ja,h$ as ka,i0 as ns,i1 as Ta,i2 as Ra,i3 as Ia,i4 as on,i5 as Ea,i6 as Aa,fg as Xt,i7 as Pa,i8 as Ua}from"../datalayer-app-main.js";import{S as $a,E as Ma,a as Oa}from"./SignInIcon-XIbntAUw.js";import{F as La,a as Fa,b as za}from"./LinkedInGreyIcon-BoWXE-HS.js";import{K as _a}from"./KebabHorizontalIcon-D6AY8pIS.js";function ps(){const n=B(Gs);return s.useMemo(()=>n.map(o=>o.value),[n])}const en={github:{name:"github",oauth2CallbackServerRoute:"jupyter_iam/oauth2/callback",oauth2CallbackUIRoute:"/iam/oauth2/github/callback"},google:{name:"google",oauth2CallbackServerRoute:"jupyter_iam/oauth2/callback",oauth2CallbackUIRoute:"/iam/oauth2/google/callback"},linkedin:{name:"linkedin",oauth2CallbackServerRoute:"jupyter_iam/oauth2/callback",oauth2CallbackUIRoute:"/iam/oauth2/linkedin/callback"}},ss=()=>{if(typeof document>"u")return"";const n=document.getElementById("datalayer-config-data");if(!n?.textContent)return"";try{const o=JSON.parse(n.textContent);return String(o?.iamUrl||"").replace(/\/$/,"")}catch{return""}},Na=(n,o="Unable to start social sign-in.")=>{if(n instanceof Error&&n.message)return n.message;if(typeof n=="string"&&n.trim())return n;if(n&&typeof n=="object"&&"message"in n){const r=n.message;if(typeof r=="string"&&r.trim())return r}return o},Ba=eo`
1
+ import{a6 as B,fb as Gs,r as s,j as t,gD as Ys,gE as Js,ck as qn,B as g,H as xt,T as z,v as q,dr as Jt,fr as nn,gF as se,dk as bt,y as qs,gG as Qs,gH as Zs,f1 as Xs,gI as eo,b1 as to,gJ as no,gK as so,gL as oo,gM as ao,gN as io,gO as ro,eV as ls,eT as lo,eW as sn,gP as co,gQ as uo,gR as fo,gS as po,gT as cs,gU as ds,gV as mo,L as ho,gW as go,e5 as qt,I as us,bs as st,D as fs,gX as Qn,gY as xo,gZ as bo,E as vo,bk as So,g_ as yo,g$ as wo,h0 as Co,h1 as jo,h2 as ko,h3 as To,a1 as Qt,h4 as Ro,h5 as Io,h6 as Eo,h7 as Ao,h8 as Po,h9 as Uo,ha as $o,hb as Mo,hc as Oo,hd as Lo,he as Fo,hf as zo,hg as _o,hh as No,hi as Bo,hj as Vo,hk as Ho,hl as Do,hm as Wo,hn as Ko,ho as ot,hp as Go,hq as Yo,hr as Jo,hs as qo,ht as Zn,hu as Qo,hv as Ne,hw as Zo,hx as Xo,bl as vt,hy as ea,hz as ta,hA as Xn,hB as na,hC as sa,hD as oa,hE as aa,fz as ia,hF as Zt,hG as Ae,hH as ra,hI as la,hJ as ca,hK as es,hL as da,hM as ts,hN as ua,hO as fa,hP as pa,hQ as ma,hR as ha,hS as ga,hT as xa,hU as ba,hV as va,hW as Sa,hX as St,hY as ya,hZ as wa,h_ as Ca,h$ as ja,i0 as ka,i1 as ns,i2 as Ta,i3 as Ra,i4 as Ia,i5 as on,i6 as Ea,i7 as Aa,fh as Xt,i8 as Pa,i9 as Ua}from"../datalayer-app-main.js";import{S as $a,E as Ma,a as Oa}from"./SignInIcon-XIbntAUw.js";import{F as La,a as Fa,b as za}from"./LinkedInGreyIcon-BoWXE-HS.js";import{K as _a}from"./KebabHorizontalIcon-D6AY8pIS.js";function ps(){const n=B(Gs);return s.useMemo(()=>n.map(o=>o.value),[n])}const en={github:{name:"github",oauth2CallbackServerRoute:"jupyter_iam/oauth2/callback",oauth2CallbackUIRoute:"/iam/oauth2/github/callback"},google:{name:"google",oauth2CallbackServerRoute:"jupyter_iam/oauth2/callback",oauth2CallbackUIRoute:"/iam/oauth2/google/callback"},linkedin:{name:"linkedin",oauth2CallbackServerRoute:"jupyter_iam/oauth2/callback",oauth2CallbackUIRoute:"/iam/oauth2/linkedin/callback"}},ss=()=>{if(typeof document>"u")return"";const n=document.getElementById("datalayer-config-data");if(!n?.textContent)return"";try{const o=JSON.parse(n.textContent);return String(o?.iamUrl||"").replace(/\/$/,"")}catch{return""}},Na=(n,o="Unable to start social sign-in.")=>{if(n instanceof Error&&n.message)return n.message;if(typeof n=="string"&&n.trim())return n;if(n&&typeof n=="object"&&"message"in n){const r=n.message;if(typeof r=="string"&&r.trim())return r}return o},Ba=eo`
2
2
  .signin-input-theme-scope input:-webkit-autofill,
3
3
  .signin-input-theme-scope input:-webkit-autofill:hover,
4
4
  .signin-input-theme-scope input:-webkit-autofill:focus,
@@ -25,8 +25,8 @@ import{a6 as B,fa as Gs,r as s,j as t,gC as Ys,gD as Js,ck as qn,B as g,H as xt,
25
25
  background-color: var(--bgColor-default) !important;
26
26
  opacity: 1 !important;
27
27
  }
28
- `,Va=({onSignIn:n,onApiKeySignIn:o,loginUrl:r,name:i,title:d="Datalayer OTEL",description:p="Sign in to access the observability dashboard.",icon:v,leadingIcon:c=t.jsx(Xs,{size:24}),github:f=!1,google:x=!1,linkedin:y=!1,apiKey:u=!1,signUp:ue=!0,socialSignInNavigationTarget:O,asDoc:C=!1,fillHeight:k=!0,hideHero:_=!1,calloutTitle:xe,calloutDescription:A,passwordToggleLabel:yt="Sign in with a password",signUpTitle:Ct="Don't have an account?",signUpDescription:an="Create a free Datalayer account with your email address.",signUpLabel:be="Sign up with email",signUpHref:wt="https://datalayer.ai/signup",onSignUp:Q,forgotPasswordHref:fe="/password",forgotPasswordLabel:at="Forgot password?",showForgotPassword:oe=!0,socialButtonMarginTop:Pe=3,actionButtonMaxWidth:te=320})=>{const ve=C&&!_,w=i??(C&&d==="Datalayer OTEL"?"Datalayer Sign In":d),it=v??(C?t.jsx($a,{size:24}):c),Se=s.useMemo(()=>{if(r)return r;const m=ss();return m?`${m}/api/iam/v1/login`:"/api/iam/v1/login"},[r]),[Z,jt]=s.useState(""),[L,kt]=s.useState(""),[ye,Tt]=s.useState(!1),[Ue,Rt]=s.useState(!1),[P,$e]=s.useState(!1),[X,Be]=s.useState(!1),[Me,Ve]=s.useState(null),[K,It]=s.useState(null),[ae,Et]=s.useState(""),[He,At]=s.useState(null),[Ce,ee]=s.useState(null),{enqueueToast:we}=Ys(),[je,ke]=s.useState(!1),[pe,De]=s.useState(""),me=s.useRef(null),We=s.useCallback(m=>Js()?qn.URLExt.join(qn.PageConfig.getBaseUrl(),m.oauth2CallbackServerRoute):`${window.location.protocol}//${window.location.hostname}${window.location.port?`:${window.location.port}`:""}${m.oauth2CallbackUIRoute}`,[]),ie=s.useMemo(()=>{if(typeof window>"u")return"/";const m=`${window.location.pathname}${window.location.search}${window.location.hash}`;return m.startsWith("/")?m:"/"},[]),I=s.useCallback(async m=>{if(!X){ee(null),Ve(m.name),Be(!0);try{const U=ss(),V=new URLSearchParams({provider:m.name,callback_uri:We(m)}),H=O===void 0?void 0:String(O||"").trim(),Ge=H===void 0?ie&&ie!=="/"?ie:void 0:H&&H.startsWith("/")&&!H.startsWith("//")?H:void 0;Ge&&V.set("post_auth_redirect",Ge);const E=`${U||""}/api/iam/v1/oauth2/authz/url?${V.toString()}`,$=await fetch(E),j=await $.json(),ce=j?.autorization_url;if(!$.ok||!ce)throw new Error(j?.message||"Unable to start social sign-in.");window.location.assign(ce)}catch(U){const V=Na(U);ee(V),we(V,{variant:"error"}),Ve(null),Be(!1)}}},[We,ie,we,X,O]);s.useEffect(()=>{je&&me.current?.focus()},[je]);const re=s.useCallback(()=>{ke(!1),De("")},[]),Te=s.useCallback(()=>{!pe.trim()||!o||(o(pe.trim()),re())},[pe,o,re]),le=s.useCallback(()=>{if(Q){Q();return}window.location.assign(wt)},[Q,wt]),rt=s.useCallback(()=>{if(fe){if(fe.startsWith("http://")||fe.startsWith("https://")){window.open(fe,"_blank","noopener,noreferrer");return}window.location.assign(fe)}},[fe]),Oe=s.useCallback(async()=>{if(!(C||!Z||!L||P)){$e(!0),ee(null);try{const m=await fetch(Se,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({handle:Z,password:L})});if(!m.ok)throw new Error(`HTTP ${m.status}`);const U=await m.json();if(U.success&&U.token){const V=String(U?.user?.id||U?.user?.uid||"").trim();if(!!U?.user?.mfaUrl&&V){It(V),At(U.token),ee(null);return}n&&n(U.token,Z)}else ee(U.message||"Invalid username or password.")}catch(m){ee(m instanceof Error?m.message:String(m))}finally{$e(!1)}}},[C,Z,L,P,Se,n]),Le=s.useCallback(async()=>{if(!(C||P||!K||!ae.trim()||!He)){$e(!0),ee(null);try{const m=new URL(Se,window.location.origin),U=m.pathname.endsWith("/api/iam/v1/login")?m.href.replace(/\/api\/iam\/v1\/login$/,""):`${m.origin}`,V=await fetch(`${U}/api/iam/v1/users/${K}/mfa/validate`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({userUid:K,code:ae.trim()})}),H=await V.json();if(!V.ok||!H?.success)throw new Error(H?.message||"Failed to validate your MFA code.");n&&n(He,Z)}catch(m){const U=m instanceof Error?m.message:String(m);ee(U),we(U,{variant:"error"})}finally{$e(!1)}}},[C,we,Z,P,Se,ae,He,K,n]),G=s.useCallback(m=>{m.key==="Enter"&&(K?Le():Oe())},[K,Oe,Le]),Ke=X||P||C;return t.jsxs(g,{className:"signin-input-theme-scope",display:"flex",alignItems:_||ve||!k?"flex-start":"center",justifyContent:"center",minHeight:_||ve||!k?"auto":"100vh",bg:_?"transparent":"canvas.default",color:"fg.default",py:_?0:ve?2:4,children:[t.jsx(Ba,{}),t.jsxs(g,{width:"100%",maxWidth:440,p:0,children:[!_&&t.jsxs(t.Fragment,{children:[t.jsxs(g,{display:"flex",alignItems:"center",gap:2,mb:ve?2:3,justifyContent:"center",children:[it,t.jsx(xt,{sx:{fontSize:3},children:w})]}),t.jsx(z,{as:"p",sx:{fontSize:1,color:"fg.muted",mb:ve?2:3,textAlign:"center"},children:p})]}),(xe||A)&&t.jsxs(g,{mb:3,textAlign:"center",children:[xe&&t.jsx(xt,{as:"h3",sx:{fontSize:2,mb:1},children:xe}),A&&t.jsx(z,{sx:{color:"fg.muted",fontSize:1},children:A})]}),!K&&(f||x||y)&&t.jsxs(t.Fragment,{children:[f&&t.jsx(q,{block:!0,size:"large",leadingVisual:Me==="github"?()=>t.jsx(Jt,{size:"small"}):La,disabled:Ke,onClick:()=>I(en.github),sx:{mt:Pe,maxWidth:te,mx:"auto"},children:"Sign in with GitHub"}),x&&t.jsx(q,{block:!0,size:"large",leadingVisual:Me==="google"?()=>t.jsx(Jt,{size:"small"}):Fa,disabled:Ke,onClick:()=>I(en.google),sx:{mt:Pe,maxWidth:te,mx:"auto"},children:"Sign in with Google"}),y&&t.jsx(q,{block:!0,size:"large",leadingVisual:Me==="linkedin"?()=>t.jsx(Jt,{size:"small"}):za,disabled:Ke,onClick:()=>I(en.linkedin),sx:{mt:Pe,maxWidth:te,mx:"auto"},children:"Sign in with LinkedIn"})]}),!K&&!ye&&t.jsx(g,{mt:3,display:"flex",justifyContent:"center",children:t.jsx(q,{leadingVisual:nn,size:"large",block:!0,disabled:C||P||X,onClick:()=>Tt(!0),sx:{maxWidth:te,mx:"auto"},children:yt})}),!K&&ye&&t.jsxs(g,{mt:4,children:[t.jsxs(se,{required:!0,sx:{mb:3},children:[t.jsx(se.Label,{children:"Username"}),t.jsx(bt,{autoFocus:!0,block:!0,placeholder:"Your username",value:Z,disabled:P||C,onChange:m=>jt(m.target.value),onKeyDown:G})]}),t.jsxs(se,{required:!0,sx:{mb:3},children:[t.jsx(se.Label,{children:"Password"}),t.jsx(bt,{block:!0,placeholder:"Your password",type:Ue?"text":"password",value:L,disabled:P||C,onChange:m=>kt(m.target.value),onKeyDown:G,trailingAction:t.jsx(bt.Action,{onClick:()=>Rt(!Ue),disabled:P||C,icon:Ue?Ma:Oa,"aria-label":Ue?"Hide password":"Show password",sx:{color:"var(--fgColor-muted)"}})})]}),t.jsxs(g,{display:"flex",alignItems:"center",justifyContent:"space-between",mt:3,children:[t.jsx(q,{variant:"primary",disabled:P||C||!Z||!L,onClick:Oe,children:P?"Signing in…":"Sign In"}),oe&&t.jsx(qs,{as:"button",sx:{fontSize:1,cursor:C?"not-allowed":"pointer",background:"none",border:"none",opacity:C?.6:1},onClick:()=>{C||P||rt()},children:at})]})]}),K&&t.jsxs(t.Fragment,{children:[t.jsxs(se,{required:!0,sx:{mb:3,mt:2},children:[t.jsx(se.Label,{children:"MFA Code"}),t.jsx(bt,{autoFocus:!0,block:!0,placeholder:"Your MFA code",value:ae,disabled:P||C,onChange:m=>Et(m.target.value),onKeyDown:G})]}),t.jsx(q,{variant:"primary",block:!0,disabled:P||C||!ae.trim(),onClick:Le,sx:{maxWidth:te,mx:"auto"},children:P?"Validating…":"Validate MFA Code"})]}),Ce&&t.jsx(z,{sx:{color:"danger.fg",fontSize:1,mt:3,display:"block"},children:Ce}),ue&&t.jsxs(g,{mt:4,pt:4,textAlign:"center",borderTop:"1px solid",borderColor:"border.muted",children:[t.jsx(xt,{as:"h3",sx:{fontSize:2,mb:2},children:Ct}),t.jsx(z,{as:"p",sx:{color:"fg.muted",fontSize:1,mb:3},children:an}),t.jsx(g,{display:"flex",justifyContent:"center",children:t.jsx(q,{variant:"primary",size:"large",leadingVisual:Qs,disabled:C||P,onClick:le,children:be})})]}),u&&o&&t.jsxs(t.Fragment,{children:[t.jsxs(g,{display:"flex",alignItems:"center",gap:2,my:3,children:[t.jsx(g,{flex:1,height:"1px",bg:"border.default"}),t.jsx(z,{sx:{fontSize:0,color:"fg.muted"},children:"or"}),t.jsx(g,{flex:1,height:"1px",bg:"border.default"})]}),t.jsx(q,{block:!0,leadingVisual:nn,disabled:C||P||X,onClick:()=>ke(!0),sx:{maxWidth:te,mx:"auto"},children:"Sign in with an API Key"}),je&&t.jsx(g,{role:"dialog","aria-modal":"true","aria-labelledby":"signin-api-key-title",onKeyDown:m=>{m.key==="Escape"&&re()},onClick:re,position:"fixed",inset:0,zIndex:200,p:3,bg:"canvas.backdrop",display:"flex",alignItems:"center",justifyContent:"center",children:t.jsxs(g,{as:"form",onClick:m=>m.stopPropagation(),onSubmit:m=>{m.preventDefault(),Te()},width:"min(560px, 100%)",p:3,borderRadius:2,border:"1px solid",borderColor:"border.default",bg:"canvas.overlay",color:"fg.default",boxShadow:"shadow.large",children:[t.jsx(xt,{id:"signin-api-key-title",sx:{fontSize:2,mb:2},children:"Enter your API Key"}),t.jsxs(se,{required:!0,children:[t.jsx(se.Label,{children:"API Key"}),t.jsx(Zs,{block:!0,required:!0,autoFocus:!0,placeholder:"Paste your API key here",value:pe,onInput:m=>De(m.currentTarget.value),ref:me})]}),t.jsxs(g,{mt:3,display:"flex",justifyContent:"flex-end",gap:2,children:[t.jsx(q,{type:"button",onClick:re,children:"Cancel"}),t.jsx(q,{type:"submit",variant:"primary",disabled:!pe.trim(),children:"Authenticate"})]})]})})]})]})]})};function Ha(n){const{agentId:o,instructions:r,model:i,frontendTools:d,inference:p,subagents:v,sharing:c,onSubagentEvent:f,modeEffect:x}=n;return{type:"browser-vercel-ai",endpoint:"",agentId:o,enableConfigQuery:!1,options:{instructions:r,model:i,frontendTools:d,inference:p,subagents:v,sharing:c,onSubagentEvent:f,modeEffect:x}}}const os=to((n,o)=>({pending:void 0,suggest:(r,i)=>{const d=r.trim();d&&n({pending:{text:d,submit:i?.submit??!1,nonce:(o().pending?.nonce??0)+1}})},consume:()=>n({pending:void 0})})),Da=({state:n})=>no[n];class Wa extends Error{constructor(o,r){super(r),this.status=o,this.name="RuntimeRefusal"}status}function Ka({baseUrl:n,getAccessToken:o,fetch:r}){const i=n.replace(/\/+$/,""),d=(f={})=>{const x=o();return{...f,...x?{Authorization:`Bearer ${x}`}:{}}},p=async f=>{throw new Wa(f.status,ao(f.status,f.statusText,await io(f)))};return{json:async(f,x="GET",y)=>{const u=await r(`${i}${f}`,{method:x,headers:d({Accept:"application/json",...y===void 0?{}:{"Content-Type":"application/json"}}),...y===void 0?{}:{body:JSON.stringify(y)}});return u.ok?await u.json():p(u)},stream:async(f,x,{onEvent:y,signal:u},ue="POST")=>{const O=await r(`${i}${f}`,{method:ue,headers:d({"Content-Type":"application/json",Accept:"text/event-stream"}),body:JSON.stringify(x),signal:u});if(!O.ok)return p(O);await ro(O,y)},refused:p,headers:d,root:i,fetcher:r}}const W=n=>`/api/v1/apps/sessions/${encodeURIComponent(n)}`;function Ga(n){const{json:o,stream:r,fetcher:i,headers:d,refused:p,root:v}=Ka(n);return{serverUrl:v,accessToken:()=>n.getAccessToken(),start:(c,f)=>r("/api/v1/apps/sessions",{agent:c.agent,...c.deploymentUid?{deployment_uid:c.deploymentUid}:{},...c.appUid?{app_uid:c.appUid}:{},...c.version?{version:c.version}:{},...c.session?{session:c.session}:{},opener:c.opener},f),message:(c,f,x)=>r(`${W(c)}/messages`,{text:f},x),changeSettings:(c,f,x)=>r(`${W(c)}/settings`,{values:f},x,"PUT"),resume:(c,f,x)=>r(`${W(c)}/resume`,{agent:f},x),stop:c=>o(`${W(c)}/stop`,"POST"),end:c=>o(`${W(c)}/end`,"POST"),describe:c=>o(W(c)),described:async c=>oo(await o(W(c))),list:(c={})=>{const f=new URLSearchParams;for(const[y,u]of Object.entries(c))u!==""&&u!==void 0&&u!==!1&&f.set(y,String(u));const x=f.toString();return o(`/api/v1/apps/sessions${x?`?${x}`:""}`)},swap:(c,f)=>o(`${W(c)}/agent`,"POST",{agent:f}),clone:(c,f={})=>o(`${W(c)}/clone`,"POST",{up_to_turn:f.upToTurn??null,agent:f.agent??null,title:f.title??""}),exportFile:async(c,f="")=>{const x=await i(`${v}${W(c)}/export${f?`?format=${encodeURIComponent(f)}`:""}`,{method:"GET",headers:d()});return x.ok?x.text():p(x)},importFile:async(c,f={})=>{const x=new URLSearchParams;f.agent&&x.set("agent",f.agent),f.format&&x.set("format",f.format);const y=x.toString(),u=await i(`${v}/api/v1/apps/sessions/import${y?`?${y}`:""}`,{method:"POST",headers:d({"Content-Type":"application/x-ndjson"}),body:c});return u.ok?await u.json():p(u)},rename:(c,f)=>o(`${W(c)}/title`,"PUT",{title:f}),archive:(c,f)=>o(`${W(c)}/archived`,"PUT",{archived:f}),messages:async c=>so((await o(`${W(c)}/messages`)).messages)}}function Ya({agentName:n,sandboxStillRuns:o=!1,temporary:r=!0,onSignedIn:i,onSignUp:d}){const{configuration:p}=ls(),v=s.useCallback(c=>{lo.getState().checkIAMToken(c),i?.()},[i]);return t.jsx(g,{height:"100%",minHeight:0,overflowY:"auto",bg:"canvas.default",px:4,py:4,children:t.jsxs(g,{maxWidth:440,mx:"auto",children:[t.jsxs(g,{display:"flex",alignItems:"center",justifyContent:"center",gap:2,color:"attention.fg",mb:2,children:[t.jsx(nn,{size:20}),t.jsx(z,{sx:{fontSize:2,fontWeight:"semibold",color:"fg.default"},children:r?"This demo runs on a shared key":"Your key has expired"})]}),t.jsxs(z,{as:"p",sx:{fontSize:1,color:"fg.muted",textAlign:"center",mb:3},children:[r?`${n??"The agent"} has used the time this key allows. Sign in to point your own agent at it, use your own data, and drop the time limit.`:`${n??"The agent"} stopped because your session ran out.`,o?" Your notebook is still running in this page.":""]}),t.jsx(Va,{hideHero:!0,fillHeight:!1,calloutTitle:"Sign in to keep going",github:!0,google:!0,linkedin:!0,socialSignInNavigationTarget:typeof window>"u"?void 0:`${window.location.pathname}${window.location.search}`,loginUrl:p?.iamUrl?`${p.iamUrl}/api/iam/v1/login`:void 0,onSignIn:v,onSignUp:d})]})})}const Ja="https://r1.datalayer.run";function qa(n=!0){const{configuration:o}=ls(),r=sn(c=>c.token),i=o?.aiInferenceUrl||Ja,d=co(i,n&&!r),p=r||d.token,v=s.useMemo(()=>({inferenceUrl:i,token:p||void 0}),[i,p]);return{inference:v,needsSignIn:uo(v),anonymous:d,inferenceUrl:i}}const Qa={name:"general-purpose",description:"A capable generalist for a task none of the specialists covers: research, reasoning, drafting, checking.",instructions:"You are a capable general-purpose assistant. Carry out the task you are given completely and report the result plainly, saying what you could not do."};function as(n){const o=n?.subagents;if(!o)return[];const r=(o.subagents??[]).map(i=>{const d=i.ref?fo(i.ref):void 0;return{name:i.name,description:i.description||d?.description||i.name,instructions:i.instructions??d?.systemPrompt,model:i.model??d?.model??o.defaultModel,icon:d?.icon}});return o.includeGeneralPurpose?[...r,Qa]:r}function Za(n){return n.replace(/^datalayer_/,"").replace(/_lexical$/,"")}function Xa(n){const o=Za(n);return/^executeCodeIn(Notebook|Document)$/.test(o)||/^(read|list)[A-Z]/.test(o)}function ei(n,o){return n.filter(r=>o?.has(r.name)||Xa(r.name))}function ti(n,o){const r=i=>o&&i.value.id===`${o}-tools`?0:i.value.id==="notebook-tools"?1:2;return n.map((i,d)=>({entry:i,index:d,rank:r(i)})).sort((i,d)=>i.rank-d.rank||i.index-d.index).map(i=>i.entry)}function ni(n,o,r){if(!r||!n.endsWith("-tools"))return!1;const i=n.slice(0,-6);return o.has(i)&&i!==r}const si={type:"object",properties:{}};function oi(n,o){const r=new Set(n.toolset);return n.commands.filter(i=>r.has(i.name)).map(i=>({name:i.name,description:i.description,parameters:i.parameters??si,location:"frontend",handler:async d=>{if(!o)throw new Error(`${i.name}: the ${n.plugin??n.id} plugin is not mounted on this page.`);const p=Object.keys(d??{}).length>0?d:void 0,v=await o.executeCommand(i.command,p);return v===void 0?{ok:!0,command:i.command,argument:p}:v}}))}function ms(n,o){return n.flatMap(r=>oi(r,o))}function ai(){const n=po(),o=ps();return s.useMemo(()=>ms(o,n),[o,n])}function ii(n){const o=n?.app_instance;if(!o||typeof o!="object")return"";const r=o.deployment_uid;return typeof r=="string"?r.trim():""}function ri(n,o,r){return n||!o?n:{id:r,messages:[]}}function li(n){const o=(new URLSearchParams(n).get("session")??"").trim();if(!o)return"";if(!/^[A-Za-z0-9_-]{8,128}$/.test(o))throw new Error(`?session=${o} names no session: a session uid is 8 to 128 letters, digits, hyphens or underscores.`);return o}function ci({facts:n}){if(!n)return null;const o=mo(n);return t.jsxs(g,{display:"inline-flex",alignItems:"center",gap:2,"data-session-state":n.state,children:[t.jsx(ho,{size:"small",variant:n.state==="open"?"accent":n.state==="paused"?"attention":"secondary",children:go(n)}),o?t.jsx(z,{sx:{fontSize:0,color:"fg.muted"},"data-session-lineage":"",children:o}):null]})}function di({facts:n,turn:o,context:r}){const i=B(cs),d=ds(i,n,"turn");return!n||d.length===0||o<1?null:t.jsx(g,{display:"inline-flex",gap:1,"data-turn-actions":o,children:d.map(p=>t.jsx(q,{size:"small",variant:"invisible","data-turn-action":p.id,onClick:()=>{Promise.resolve(p.run(n,{...r,atTurn:o})).catch(v=>r.say(String(v.message??v)))},children:p.label},p.id))})}function ui({uid:n,describe:o,context:r}){const i=B(cs),[d,p]=s.useState(void 0),[v,c]=s.useState(!1),[f,x]=s.useState(""),[y,u]=s.useState(void 0),ue={...r,show:r.show??u,say:k=>{x(k),r.say(k)}},O=s.useCallback(k=>{c(k),k&&n&&o(n).then(p,()=>p(void 0))},[o,n]);if(!n||i.length===0)return null;const C=ds(i,d);return t.jsxs(t.Fragment,{children:[t.jsxs(qt,{open:v,onOpenChange:O,children:[t.jsx(qt.Anchor,{children:t.jsx(us,{icon:_a,"aria-label":"Session actions",variant:"invisible",size:"small","data-testid":"session-actions"})}),t.jsx(qt.Overlay,{width:"small",children:t.jsxs(st,{children:[C.length===0?t.jsx(st.Item,{disabled:!0,children:d?"Nothing applies to this session now.":"Reading the session…"}):C.map(k=>t.jsx(st.Item,{"data-session-action":k.id,onSelect:()=>{d&&Promise.resolve(k.run(d,ue)).catch(_=>ue.say(String(_.message??_)))},children:k.label},k.id)),f?t.jsxs(t.Fragment,{children:[t.jsx(st.Divider,{}),t.jsx(st.Item,{disabled:!0,"data-testid":"session-actions-said",children:f})]}):null]})})]}),y?t.jsx(fs,{title:y.title,onClose:()=>u(void 0),width:"large",children:t.jsx(g,{"data-session-panel":"",children:y.render()})}):null]})}const is={confirm:"Switch",cancel:"Keep it"};function fi({question:n,onPick:o}){const[r,i]=s.useState(n.options[0]?.id??""),[d,p]=s.useState("");s.useEffect(()=>{let c=!0;if(!n.says||!r){p("");return}return n.says(r).then(f=>c&&p(f),()=>c&&p("")),()=>{c=!1}},[r,n]);const v=n.options.find(c=>c.id===r);return t.jsx(fs,{title:n.title,onClose:()=>o(void 0),width:"medium",footerButtons:[{buttonType:"default",content:is.cancel,onClick:()=>o(void 0)},{buttonType:"primary",content:is.confirm,disabled:!r,onClick:()=>o(r||void 0)}],children:t.jsxs(g,{display:"grid",gap:3,"data-session-choose":"",children:[t.jsxs(se,{children:[t.jsx(se.Label,{children:n.title}),t.jsx(Qn,{value:r,onChange:c=>i(c.target.value),block:!0,children:n.options.map(c=>t.jsx(Qn.Option,{value:c.id,children:c.label},c.id))})]}),v?.description?t.jsx(z,{sx:{fontSize:1,color:"fg.muted"},children:v.description}):null,d?t.jsx(z,{as:"p",sx:{m:0,fontSize:1,fontStyle:"italic"},"data-session-choose-says":"",children:d}):null]})})}const pi="var(--theme-accent)";function hs({face:n,size:o}){return typeof n=="string"?t.jsx(xo,{emoji:n,size:o,label:""}):t.jsx(t.Fragment,{children:n})}function mi({face:n,size:o,state:r}){const i=r==="thinking"||r==="working",d=r==="paused";return t.jsxs(g,{as:"span","aria-hidden":!0,"data-presence":r,position:"relative",display:"inline-flex",alignItems:"center",justifyContent:"center",width:o+8,height:o+8,flexShrink:0,fontSize:o,lineHeight:1,children:[t.jsx(g,{as:"span",position:"absolute",inset:0,borderRadius:"50%",boxShadow:d?"none":`0 0 0 2px ${pi}`,border:d?"2px dashed":"none",borderColor:"border.default",opacity:i||r==="waiting"||d?.9:0,transition:"opacity var(--theme-motion-status, 0ms) var(--theme-motion-easing, ease)",animation:i?"loopPresenceBreath 1.8s ease-in-out infinite":"none",reducedMotion:{animation:"none"},sx:{"@keyframes loopPresenceBreath":{"0%, 100%":{transform:"scale(0.92)",opacity:.35},"50%":{transform:"scale(1.06)",opacity:.9}}}}),t.jsx(g,{as:"span",display:"inline-flex",opacity:d?.55:1,filter:d?"grayscale(0.6)":"none",transition:"opacity var(--theme-motion-status, 0ms) var(--theme-motion-easing, ease)",children:t.jsx(hs,{face:n,size:o})})]})}function hi({state:n}){return t.jsx(z,{role:"status","aria-live":"polite","data-presence-line":n,sx:{fontSize:0,color:n==="waiting"?"fg.default":"fg.muted",fontWeight:n==="waiting"?"semibold":"normal",whiteSpace:"nowrap",flexShrink:0},children:Da({state:n})})}const gi=on(void 0),xi=on(""),bi=on({}),de="",vi=1400,rs=parseInt(Pa["--loop-face-large"],10);function ki({workspace:n}){const o=bo(),r=vo(),i=s.useRef(null),d=s.useRef(void 0),{setViewControls:p}=n,v=s.useRef(n.setThread);v.current=n.setThread;const c=s.useCallback(()=>{const e=i.current?.thread();return e&&v.current?.(e),e},[]),[f,x]=s.useState(null),y=So(),u=y.getConfig(yo),ue=u?.placeholder||o.placeholder,O=u?.defaultSurface??"notebook",C=y.getConfig(Co),[k,_]=s.useState(de),xe=s.useRef(!1),A=B(wo),yt=B(jo),Ct=B(ko),be=B(To)[0]?.value,Q=Qt(be?.promptStance??gi)??be?.prompt,fe=B(Ro),at=Io(fe[0]?.value),oe=s.useRef(at);oe.current=at;const Pe=s.useRef(""),te=B(Eo),ve=s.useMemo(()=>Ao(()=>te.reduce((e,a)=>({...e,...a.value.extras.value}),{})),[te]),w=Qt(te.length>0?ve:bi),it=s.useRef(new Set),Se=Po(Ea,n),Z=!Se.allowed,jt=Z?Se.reason??"Chat is unavailable for this sandbox":void 0,[L,kt]=s.useState(!1),[ye,Tt]=s.useState(!1),[Ue,Rt]=s.useState(!1),[P,$e]=s.useState({open:!1,pendingApproval:!1}),X=Uo(L,P,u?.presence?.paused===!0),Be=u?.presence?.onPresence;s.useEffect(()=>{Be?.(X),oe.current?.setPresence(X)},[Be,X]);const Me=s.useRef(u?.presence?.onSaying);Me.current=u?.presence?.onSaying;const Ve=s.useRef({answering:!1}),K=s.useCallback(e=>{i.current=e,Tt(!!e)},[]),It=s.useCallback(e=>{const{open:a,pendingApproval:l}=$o(e);$e(Ee=>Ee.open===a&&Ee.pendingApproval===l?Ee:{open:a,pendingApproval:l});const b={saying:Oo(e),answering:Mo(e)},h=Ve.current;(h.saying?.id!==b.saying?.id||h.saying?.text!==b.saying?.text||h.answering!==b.answering)&&(Ve.current=b,Me.current?.(b));const J=oe.current;if(!J)return;J.items(e);const F=new Set(["complete","completed","done","error","failed","cancelled","canceled","rejected","denied","stopped"]),ne={insertcell:"adding a cell",updatecell:"editing a cell",runcell:"running a cell",deletecells:"removing cells",readallcells:"reading the notebook",readcell:"reading a cell",executecode:"running code",insertblock:"adding a block",updateblock:"editing a block",runblock:"running a block",readdocument:"reading the document"};let S;for(let Ee=e.length-1;Ee>=0;Ee-=1){const gt=e[Ee];if(typeof gt.toolName=="string"&&gt.toolCallId){F.has(String(gt.status).toLowerCase())||(S=gt);break}}if(!S){J.activity(void 0);return}const Ie=S.toolName.toLowerCase().replace(/^datalayer_/,"").replace(/_lexical$/,"").replace(/[^a-z]/g,""),Ks=ne[Ie]??`using ${S.toolName}`;J.activity(`${Pe.current||"The agent"} is ${Ks}…`)},[]),ae=s.useRef(w);ae.current=w;const Et=s.useCallback(e=>{Rs(e),oe.current?.usage(e),ae.current.onUsage?.(e)},[]),He=s.useCallback(e=>{kt(e),e||oe.current?.end("done")},[]),At=s.useCallback(e=>{const a=oe.current;if(!a)return;let l=-1;for(let h=e.length-1;h>=0;h-=1)if(e[h].role==="user"){l=h;break}const b=e.slice(l+1).filter(h=>h.role==="assistant").map(Lo).filter(h=>h.trim().length>0).join(`
28
+ `,Va=({onSignIn:n,onApiKeySignIn:o,loginUrl:r,name:i,title:d="Datalayer OTEL",description:p="Sign in to access the observability dashboard.",icon:v,leadingIcon:c=t.jsx(Xs,{size:24}),github:f=!1,google:x=!1,linkedin:y=!1,apiKey:u=!1,signUp:ue=!0,socialSignInNavigationTarget:O,asDoc:w=!1,fillHeight:k=!0,hideHero:_=!1,calloutTitle:xe,calloutDescription:A,passwordToggleLabel:yt="Sign in with a password",signUpTitle:wt="Don't have an account?",signUpDescription:an="Create a free Datalayer account with your email address.",signUpLabel:be="Sign up with email",signUpHref:Ct="https://datalayer.ai/signup",onSignUp:Q,forgotPasswordHref:fe="/password",forgotPasswordLabel:at="Forgot password?",showForgotPassword:oe=!0,socialButtonMarginTop:Pe=3,actionButtonMaxWidth:te=320})=>{const ve=w&&!_,C=i??(w&&d==="Datalayer OTEL"?"Datalayer Sign In":d),it=v??(w?t.jsx($a,{size:24}):c),Se=s.useMemo(()=>{if(r)return r;const m=ss();return m?`${m}/api/iam/v1/login`:"/api/iam/v1/login"},[r]),[Z,jt]=s.useState(""),[L,kt]=s.useState(""),[ye,Tt]=s.useState(!1),[Ue,Rt]=s.useState(!1),[P,$e]=s.useState(!1),[X,Be]=s.useState(!1),[Me,Ve]=s.useState(null),[K,It]=s.useState(null),[ae,Et]=s.useState(""),[He,At]=s.useState(null),[we,ee]=s.useState(null),{enqueueToast:Ce}=Ys(),[je,ke]=s.useState(!1),[pe,De]=s.useState(""),me=s.useRef(null),We=s.useCallback(m=>Js()?qn.URLExt.join(qn.PageConfig.getBaseUrl(),m.oauth2CallbackServerRoute):`${window.location.protocol}//${window.location.hostname}${window.location.port?`:${window.location.port}`:""}${m.oauth2CallbackUIRoute}`,[]),ie=s.useMemo(()=>{if(typeof window>"u")return"/";const m=`${window.location.pathname}${window.location.search}${window.location.hash}`;return m.startsWith("/")?m:"/"},[]),I=s.useCallback(async m=>{if(!X){ee(null),Ve(m.name),Be(!0);try{const U=ss(),V=new URLSearchParams({provider:m.name,callback_uri:We(m)}),H=O===void 0?void 0:String(O||"").trim(),Ge=H===void 0?ie&&ie!=="/"?ie:void 0:H&&H.startsWith("/")&&!H.startsWith("//")?H:void 0;Ge&&V.set("post_auth_redirect",Ge);const E=`${U||""}/api/iam/v1/oauth2/authz/url?${V.toString()}`,$=await fetch(E),j=await $.json(),ce=j?.autorization_url;if(!$.ok||!ce)throw new Error(j?.message||"Unable to start social sign-in.");window.location.assign(ce)}catch(U){const V=Na(U);ee(V),Ce(V,{variant:"error"}),Ve(null),Be(!1)}}},[We,ie,Ce,X,O]);s.useEffect(()=>{je&&me.current?.focus()},[je]);const re=s.useCallback(()=>{ke(!1),De("")},[]),Te=s.useCallback(()=>{!pe.trim()||!o||(o(pe.trim()),re())},[pe,o,re]),le=s.useCallback(()=>{if(Q){Q();return}window.location.assign(Ct)},[Q,Ct]),rt=s.useCallback(()=>{if(fe){if(fe.startsWith("http://")||fe.startsWith("https://")){window.open(fe,"_blank","noopener,noreferrer");return}window.location.assign(fe)}},[fe]),Oe=s.useCallback(async()=>{if(!(w||!Z||!L||P)){$e(!0),ee(null);try{const m=await fetch(Se,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({handle:Z,password:L})});if(!m.ok)throw new Error(`HTTP ${m.status}`);const U=await m.json();if(U.success&&U.token){const V=String(U?.user?.id||U?.user?.uid||"").trim();if(!!U?.user?.mfaUrl&&V){It(V),At(U.token),ee(null);return}n&&n(U.token,Z)}else ee(U.message||"Invalid username or password.")}catch(m){ee(m instanceof Error?m.message:String(m))}finally{$e(!1)}}},[w,Z,L,P,Se,n]),Le=s.useCallback(async()=>{if(!(w||P||!K||!ae.trim()||!He)){$e(!0),ee(null);try{const m=new URL(Se,window.location.origin),U=m.pathname.endsWith("/api/iam/v1/login")?m.href.replace(/\/api\/iam\/v1\/login$/,""):`${m.origin}`,V=await fetch(`${U}/api/iam/v1/users/${K}/mfa/validate`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({userUid:K,code:ae.trim()})}),H=await V.json();if(!V.ok||!H?.success)throw new Error(H?.message||"Failed to validate your MFA code.");n&&n(He,Z)}catch(m){const U=m instanceof Error?m.message:String(m);ee(U),Ce(U,{variant:"error"})}finally{$e(!1)}}},[w,Ce,Z,P,Se,ae,He,K,n]),G=s.useCallback(m=>{m.key==="Enter"&&(K?Le():Oe())},[K,Oe,Le]),Ke=X||P||w;return t.jsxs(g,{className:"signin-input-theme-scope",display:"flex",alignItems:_||ve||!k?"flex-start":"center",justifyContent:"center",minHeight:_||ve||!k?"auto":"100vh",bg:_?"transparent":"canvas.default",color:"fg.default",py:_?0:ve?2:4,children:[t.jsx(Ba,{}),t.jsxs(g,{width:"100%",maxWidth:440,p:0,children:[!_&&t.jsxs(t.Fragment,{children:[t.jsxs(g,{display:"flex",alignItems:"center",gap:2,mb:ve?2:3,justifyContent:"center",children:[it,t.jsx(xt,{sx:{fontSize:3},children:C})]}),t.jsx(z,{as:"p",sx:{fontSize:1,color:"fg.muted",mb:ve?2:3,textAlign:"center"},children:p})]}),(xe||A)&&t.jsxs(g,{mb:3,textAlign:"center",children:[xe&&t.jsx(xt,{as:"h3",sx:{fontSize:2,mb:1},children:xe}),A&&t.jsx(z,{sx:{color:"fg.muted",fontSize:1},children:A})]}),!K&&(f||x||y)&&t.jsxs(t.Fragment,{children:[f&&t.jsx(q,{block:!0,size:"large",leadingVisual:Me==="github"?()=>t.jsx(Jt,{size:"small"}):La,disabled:Ke,onClick:()=>I(en.github),sx:{mt:Pe,maxWidth:te,mx:"auto"},children:"Sign in with GitHub"}),x&&t.jsx(q,{block:!0,size:"large",leadingVisual:Me==="google"?()=>t.jsx(Jt,{size:"small"}):Fa,disabled:Ke,onClick:()=>I(en.google),sx:{mt:Pe,maxWidth:te,mx:"auto"},children:"Sign in with Google"}),y&&t.jsx(q,{block:!0,size:"large",leadingVisual:Me==="linkedin"?()=>t.jsx(Jt,{size:"small"}):za,disabled:Ke,onClick:()=>I(en.linkedin),sx:{mt:Pe,maxWidth:te,mx:"auto"},children:"Sign in with LinkedIn"})]}),!K&&!ye&&t.jsx(g,{mt:3,display:"flex",justifyContent:"center",children:t.jsx(q,{leadingVisual:nn,size:"large",block:!0,disabled:w||P||X,onClick:()=>Tt(!0),sx:{maxWidth:te,mx:"auto"},children:yt})}),!K&&ye&&t.jsxs(g,{mt:4,children:[t.jsxs(se,{required:!0,sx:{mb:3},children:[t.jsx(se.Label,{children:"Username"}),t.jsx(bt,{autoFocus:!0,block:!0,placeholder:"Your username",value:Z,disabled:P||w,onChange:m=>jt(m.target.value),onKeyDown:G})]}),t.jsxs(se,{required:!0,sx:{mb:3},children:[t.jsx(se.Label,{children:"Password"}),t.jsx(bt,{block:!0,placeholder:"Your password",type:Ue?"text":"password",value:L,disabled:P||w,onChange:m=>kt(m.target.value),onKeyDown:G,trailingAction:t.jsx(bt.Action,{onClick:()=>Rt(!Ue),disabled:P||w,icon:Ue?Ma:Oa,"aria-label":Ue?"Hide password":"Show password",sx:{color:"var(--fgColor-muted)"}})})]}),t.jsxs(g,{display:"flex",alignItems:"center",justifyContent:"space-between",mt:3,children:[t.jsx(q,{variant:"primary",disabled:P||w||!Z||!L,onClick:Oe,children:P?"Signing in…":"Sign In"}),oe&&t.jsx(qs,{as:"button",sx:{fontSize:1,cursor:w?"not-allowed":"pointer",background:"none",border:"none",opacity:w?.6:1},onClick:()=>{w||P||rt()},children:at})]})]}),K&&t.jsxs(t.Fragment,{children:[t.jsxs(se,{required:!0,sx:{mb:3,mt:2},children:[t.jsx(se.Label,{children:"MFA Code"}),t.jsx(bt,{autoFocus:!0,block:!0,placeholder:"Your MFA code",value:ae,disabled:P||w,onChange:m=>Et(m.target.value),onKeyDown:G})]}),t.jsx(q,{variant:"primary",block:!0,disabled:P||w||!ae.trim(),onClick:Le,sx:{maxWidth:te,mx:"auto"},children:P?"Validating…":"Validate MFA Code"})]}),we&&t.jsx(z,{sx:{color:"danger.fg",fontSize:1,mt:3,display:"block"},children:we}),ue&&t.jsxs(g,{mt:4,pt:4,textAlign:"center",borderTop:"1px solid",borderColor:"border.muted",children:[t.jsx(xt,{as:"h3",sx:{fontSize:2,mb:2},children:wt}),t.jsx(z,{as:"p",sx:{color:"fg.muted",fontSize:1,mb:3},children:an}),t.jsx(g,{display:"flex",justifyContent:"center",children:t.jsx(q,{variant:"primary",size:"large",leadingVisual:Qs,disabled:w||P,onClick:le,children:be})})]}),u&&o&&t.jsxs(t.Fragment,{children:[t.jsxs(g,{display:"flex",alignItems:"center",gap:2,my:3,children:[t.jsx(g,{flex:1,height:"1px",bg:"border.default"}),t.jsx(z,{sx:{fontSize:0,color:"fg.muted"},children:"or"}),t.jsx(g,{flex:1,height:"1px",bg:"border.default"})]}),t.jsx(q,{block:!0,leadingVisual:nn,disabled:w||P||X,onClick:()=>ke(!0),sx:{maxWidth:te,mx:"auto"},children:"Sign in with an API Key"}),je&&t.jsx(g,{role:"dialog","aria-modal":"true","aria-labelledby":"signin-api-key-title",onKeyDown:m=>{m.key==="Escape"&&re()},onClick:re,position:"fixed",inset:0,zIndex:200,p:3,bg:"canvas.backdrop",display:"flex",alignItems:"center",justifyContent:"center",children:t.jsxs(g,{as:"form",onClick:m=>m.stopPropagation(),onSubmit:m=>{m.preventDefault(),Te()},width:"min(560px, 100%)",p:3,borderRadius:2,border:"1px solid",borderColor:"border.default",bg:"canvas.overlay",color:"fg.default",boxShadow:"shadow.large",children:[t.jsx(xt,{id:"signin-api-key-title",sx:{fontSize:2,mb:2},children:"Enter your API Key"}),t.jsxs(se,{required:!0,children:[t.jsx(se.Label,{children:"API Key"}),t.jsx(Zs,{block:!0,required:!0,autoFocus:!0,placeholder:"Paste your API key here",value:pe,onInput:m=>De(m.currentTarget.value),ref:me})]}),t.jsxs(g,{mt:3,display:"flex",justifyContent:"flex-end",gap:2,children:[t.jsx(q,{type:"button",onClick:re,children:"Cancel"}),t.jsx(q,{type:"submit",variant:"primary",disabled:!pe.trim(),children:"Authenticate"})]})]})})]})]})]})};function Ha(n){const{agentId:o,instructions:r,model:i,frontendTools:d,inference:p,subagents:v,sharing:c,onSubagentEvent:f,modeEffect:x}=n;return{type:"browser-vercel-ai",endpoint:"",agentId:o,enableConfigQuery:!1,options:{instructions:r,model:i,frontendTools:d,inference:p,subagents:v,sharing:c,onSubagentEvent:f,modeEffect:x}}}const os=to((n,o)=>({pending:void 0,suggest:(r,i)=>{const d=r.trim();d&&n({pending:{text:d,submit:i?.submit??!1,nonce:(o().pending?.nonce??0)+1}})},consume:()=>n({pending:void 0})})),Da=({state:n})=>no[n];class Wa extends Error{constructor(o,r){super(r),this.status=o,this.name="RuntimeRefusal"}status}function Ka({baseUrl:n,getAccessToken:o,fetch:r}){const i=n.replace(/\/+$/,""),d=(f={})=>{const x=o();return{...f,...x?{Authorization:`Bearer ${x}`}:{}}},p=async f=>{throw new Wa(f.status,ao(f.status,f.statusText,await io(f)))};return{json:async(f,x="GET",y)=>{const u=await r(`${i}${f}`,{method:x,headers:d({Accept:"application/json",...y===void 0?{}:{"Content-Type":"application/json"}}),...y===void 0?{}:{body:JSON.stringify(y)}});return u.ok?await u.json():p(u)},stream:async(f,x,{onEvent:y,signal:u},ue="POST")=>{const O=await r(`${i}${f}`,{method:ue,headers:d({"Content-Type":"application/json",Accept:"text/event-stream"}),body:JSON.stringify(x),signal:u});if(!O.ok)return p(O);await ro(O,y)},refused:p,headers:d,root:i,fetcher:r}}const W=n=>`/api/v1/apps/sessions/${encodeURIComponent(n)}`;function Ga(n){const{json:o,stream:r,fetcher:i,headers:d,refused:p,root:v}=Ka(n);return{serverUrl:v,accessToken:()=>n.getAccessToken(),start:(c,f)=>r("/api/v1/apps/sessions",{agent:c.agent,...c.deploymentUid?{deployment_uid:c.deploymentUid}:{},...c.appUid?{app_uid:c.appUid}:{},...c.version?{version:c.version}:{},...c.session?{session:c.session}:{},opener:c.opener},f),message:(c,f,x)=>r(`${W(c)}/messages`,{text:f},x),changeSettings:(c,f,x)=>r(`${W(c)}/settings`,{values:f},x,"PUT"),resume:(c,f,x)=>r(`${W(c)}/resume`,{agent:f},x),stop:c=>o(`${W(c)}/stop`,"POST"),end:c=>o(`${W(c)}/end`,"POST"),describe:c=>o(W(c)),described:async c=>oo(await o(W(c))),list:(c={})=>{const f=new URLSearchParams;for(const[y,u]of Object.entries(c))u!==""&&u!==void 0&&u!==!1&&f.set(y,String(u));const x=f.toString();return o(`/api/v1/apps/sessions${x?`?${x}`:""}`)},swap:(c,f)=>o(`${W(c)}/agent`,"POST",{agent:f}),clone:(c,f={})=>o(`${W(c)}/clone`,"POST",{up_to_turn:f.upToTurn??null,agent:f.agent??null,title:f.title??""}),exportFile:async(c,f="")=>{const x=await i(`${v}${W(c)}/export${f?`?format=${encodeURIComponent(f)}`:""}`,{method:"GET",headers:d()});return x.ok?x.text():p(x)},importFile:async(c,f={})=>{const x=new URLSearchParams;f.agent&&x.set("agent",f.agent),f.format&&x.set("format",f.format);const y=x.toString(),u=await i(`${v}/api/v1/apps/sessions/import${y?`?${y}`:""}`,{method:"POST",headers:d({"Content-Type":"application/x-ndjson"}),body:c});return u.ok?await u.json():p(u)},rename:(c,f)=>o(`${W(c)}/title`,"PUT",{title:f}),archive:(c,f)=>o(`${W(c)}/archived`,"PUT",{archived:f}),messages:async c=>so((await o(`${W(c)}/messages`)).messages)}}function Ya({agentName:n,sandboxStillRuns:o=!1,temporary:r=!0,onSignedIn:i,onSignUp:d}){const{configuration:p}=ls(),v=s.useCallback(c=>{lo.getState().checkIAMToken(c),i?.()},[i]);return t.jsx(g,{height:"100%",minHeight:0,overflowY:"auto",bg:"canvas.default",px:4,py:4,children:t.jsxs(g,{maxWidth:440,mx:"auto",children:[t.jsxs(g,{display:"flex",alignItems:"center",justifyContent:"center",gap:2,color:"attention.fg",mb:2,children:[t.jsx(nn,{size:20}),t.jsx(z,{sx:{fontSize:2,fontWeight:"semibold",color:"fg.default"},children:r?"This demo runs on a shared key":"Your key has expired"})]}),t.jsxs(z,{as:"p",sx:{fontSize:1,color:"fg.muted",textAlign:"center",mb:3},children:[r?`${n??"The agent"} has used the time this key allows. Sign in to point your own agent at it, use your own data, and drop the time limit.`:`${n??"The agent"} stopped because your session ran out.`,o?" Your notebook is still running in this page.":""]}),t.jsx(Va,{hideHero:!0,fillHeight:!1,calloutTitle:"Sign in to keep going",github:!0,google:!0,linkedin:!0,socialSignInNavigationTarget:typeof window>"u"?void 0:`${window.location.pathname}${window.location.search}`,loginUrl:p?.iamUrl?`${p.iamUrl}/api/iam/v1/login`:void 0,onSignIn:v,onSignUp:d})]})})}const Ja="https://r1.datalayer.run";function qa(n=!0){const{configuration:o}=ls(),r=sn(c=>c.token),i=o?.aiInferenceUrl||Ja,d=co(i,n&&!r),p=r||d.token,v=s.useMemo(()=>({inferenceUrl:i,token:p||void 0}),[i,p]);return{inference:v,needsSignIn:uo(v),anonymous:d,inferenceUrl:i}}const Qa={name:"general-purpose",description:"A capable generalist for a task none of the specialists covers: research, reasoning, drafting, checking.",instructions:"You are a capable general-purpose assistant. Carry out the task you are given completely and report the result plainly, saying what you could not do."};function as(n){const o=n?.subagents;if(!o)return[];const r=(o.subagents??[]).map(i=>{const d=i.ref?fo(i.ref):void 0;return{name:i.name,description:i.description||d?.description||i.name,instructions:i.instructions??d?.systemPrompt,model:i.model??d?.model??o.defaultModel,icon:d?.icon}});return o.includeGeneralPurpose?[...r,Qa]:r}function Za(n){return n.replace(/^datalayer_/,"").replace(/_lexical$/,"")}function Xa(n){const o=Za(n);return/^executeCodeIn(Notebook|Document)$/.test(o)||/^(read|list)[A-Z]/.test(o)}function ei(n,o){return n.filter(r=>o?.has(r.name)||Xa(r.name))}function ti(n,o){const r=i=>o&&i.value.id===`${o}-tools`?0:i.value.id==="notebook-tools"?1:2;return n.map((i,d)=>({entry:i,index:d,rank:r(i)})).sort((i,d)=>i.rank-d.rank||i.index-d.index).map(i=>i.entry)}function ni(n,o,r){if(!r||!n.endsWith("-tools"))return!1;const i=n.slice(0,-6);return o.has(i)&&i!==r}const si={type:"object",properties:{}};function oi(n,o){const r=new Set(n.toolset);return n.commands.filter(i=>r.has(i.name)).map(i=>({name:i.name,description:i.description,parameters:i.parameters??si,location:"frontend",handler:async d=>{if(!o)throw new Error(`${i.name}: the ${n.plugin??n.id} plugin is not mounted on this page.`);const p=Object.keys(d??{}).length>0?d:void 0,v=await o.executeCommand(i.command,p);return v===void 0?{ok:!0,command:i.command,argument:p}:v}}))}function ms(n,o){return n.flatMap(r=>oi(r,o))}function ai(){const n=po(),o=ps();return s.useMemo(()=>ms(o,n),[o,n])}function ii(n){const o=n?.app_instance;if(!o||typeof o!="object")return"";const r=o.deployment_uid;return typeof r=="string"?r.trim():""}function ri(n,o,r){return n||!o?n:{id:r,messages:[]}}function li(n){const o=(new URLSearchParams(n).get("session")??"").trim();if(!o)return"";if(!/^[A-Za-z0-9_-]{8,128}$/.test(o))throw new Error(`?session=${o} names no session: a session uid is 8 to 128 letters, digits, hyphens or underscores.`);return o}function ci({facts:n}){if(!n)return null;const o=mo(n);return t.jsxs(g,{display:"inline-flex",alignItems:"center",gap:2,"data-session-state":n.state,children:[t.jsx(ho,{size:"small",variant:n.state==="open"?"accent":n.state==="paused"?"attention":"secondary",children:go(n)}),o?t.jsx(z,{sx:{fontSize:0,color:"fg.muted"},"data-session-lineage":"",children:o}):null]})}function di({facts:n,turn:o,context:r}){const i=B(cs),d=ds(i,n,"turn");return!n||d.length===0||o<1?null:t.jsx(g,{display:"inline-flex",gap:1,"data-turn-actions":o,children:d.map(p=>t.jsx(q,{size:"small",variant:"invisible","data-turn-action":p.id,onClick:()=>{Promise.resolve(p.run(n,{...r,atTurn:o})).catch(v=>r.say(String(v.message??v)))},children:p.label},p.id))})}function ui({uid:n,describe:o,context:r}){const i=B(cs),[d,p]=s.useState(void 0),[v,c]=s.useState(!1),[f,x]=s.useState(""),[y,u]=s.useState(void 0),ue={...r,show:r.show??u,say:k=>{x(k),r.say(k)}},O=s.useCallback(k=>{c(k),k&&n&&o(n).then(p,()=>p(void 0))},[o,n]);if(!n||i.length===0)return null;const w=ds(i,d);return t.jsxs(t.Fragment,{children:[t.jsxs(qt,{open:v,onOpenChange:O,children:[t.jsx(qt.Anchor,{children:t.jsx(us,{icon:_a,"aria-label":"Session actions",variant:"invisible",size:"small","data-testid":"session-actions"})}),t.jsx(qt.Overlay,{width:"small",children:t.jsxs(st,{children:[w.length===0?t.jsx(st.Item,{disabled:!0,children:d?"Nothing applies to this session now.":"Reading the session…"}):w.map(k=>t.jsx(st.Item,{"data-session-action":k.id,onSelect:()=>{d&&Promise.resolve(k.run(d,ue)).catch(_=>ue.say(String(_.message??_)))},children:k.label},k.id)),f?t.jsxs(t.Fragment,{children:[t.jsx(st.Divider,{}),t.jsx(st.Item,{disabled:!0,"data-testid":"session-actions-said",children:f})]}):null]})})]}),y?t.jsx(fs,{title:y.title,onClose:()=>u(void 0),width:"large",children:t.jsx(g,{"data-session-panel":"",children:y.render()})}):null]})}const is={confirm:"Switch",cancel:"Keep it"};function fi({question:n,onPick:o}){const[r,i]=s.useState(n.options[0]?.id??""),[d,p]=s.useState("");s.useEffect(()=>{let c=!0;if(!n.says||!r){p("");return}return n.says(r).then(f=>c&&p(f),()=>c&&p("")),()=>{c=!1}},[r,n]);const v=n.options.find(c=>c.id===r);return t.jsx(fs,{title:n.title,onClose:()=>o(void 0),width:"medium",footerButtons:[{buttonType:"default",content:is.cancel,onClick:()=>o(void 0)},{buttonType:"primary",content:is.confirm,disabled:!r,onClick:()=>o(r||void 0)}],children:t.jsxs(g,{display:"grid",gap:3,"data-session-choose":"",children:[t.jsxs(se,{children:[t.jsx(se.Label,{children:n.title}),t.jsx(Qn,{value:r,onChange:c=>i(c.target.value),block:!0,children:n.options.map(c=>t.jsx(Qn.Option,{value:c.id,children:c.label},c.id))})]}),v?.description?t.jsx(z,{sx:{fontSize:1,color:"fg.muted"},children:v.description}):null,d?t.jsx(z,{as:"p",sx:{m:0,fontSize:1,fontStyle:"italic"},"data-session-choose-says":"",children:d}):null]})})}const pi="var(--theme-accent)";function hs({face:n,size:o}){return typeof n=="string"?t.jsx(xo,{emoji:n,size:o,label:""}):t.jsx(t.Fragment,{children:n})}function mi({face:n,size:o,state:r}){const i=r==="thinking"||r==="working",d=r==="paused";return t.jsxs(g,{as:"span","aria-hidden":!0,"data-presence":r,position:"relative",display:"inline-flex",alignItems:"center",justifyContent:"center",width:o+8,height:o+8,flexShrink:0,fontSize:o,lineHeight:1,children:[t.jsx(g,{as:"span",position:"absolute",inset:0,borderRadius:"50%",boxShadow:d?"none":`0 0 0 2px ${pi}`,border:d?"2px dashed":"none",borderColor:"border.default",opacity:i||r==="waiting"||d?.9:0,transition:"opacity var(--theme-motion-status, 0ms) var(--theme-motion-easing, ease)",animation:i?"loopPresenceBreath 1.8s ease-in-out infinite":"none",reducedMotion:{animation:"none"},sx:{"@keyframes loopPresenceBreath":{"0%, 100%":{transform:"scale(0.92)",opacity:.35},"50%":{transform:"scale(1.06)",opacity:.9}}}}),t.jsx(g,{as:"span",display:"inline-flex",opacity:d?.55:1,filter:d?"grayscale(0.6)":"none",transition:"opacity var(--theme-motion-status, 0ms) var(--theme-motion-easing, ease)",children:t.jsx(hs,{face:n,size:o})})]})}function hi({state:n}){return t.jsx(z,{role:"status","aria-live":"polite","data-presence-line":n,sx:{fontSize:0,color:n==="waiting"?"fg.default":"fg.muted",fontWeight:n==="waiting"?"semibold":"normal",whiteSpace:"nowrap",flexShrink:0},children:Da({state:n})})}const gi=on(void 0),xi=on(""),bi=on({}),de="",vi=1400,rs=parseInt(Pa["--loop-face-large"],10);function ki({workspace:n}){const o=bo(),r=vo(),i=s.useRef(null),d=s.useRef(void 0),{setViewControls:p}=n,v=s.useRef(n.setThread);v.current=n.setThread;const c=s.useCallback(()=>{const e=i.current?.thread();return e&&v.current?.(e),e},[]),[f,x]=s.useState(null),y=So(),u=y.getConfig(yo),ue=u?.placeholder||o.placeholder,O=u?.defaultSurface??"notebook",w=y.getConfig(wo),[k,_]=s.useState(de),xe=s.useRef(!1),A=B(Co),yt=B(jo),wt=B(ko),be=B(To)[0]?.value,Q=Qt(be?.promptStance??gi)??be?.prompt,fe=B(Ro),at=Io(fe[0]?.value),oe=s.useRef(at);oe.current=at;const Pe=s.useRef(""),te=B(Eo),ve=s.useMemo(()=>Ao(()=>te.reduce((e,a)=>({...e,...a.value.extras.value}),{})),[te]),C=Qt(te.length>0?ve:bi),it=s.useRef(new Set),Se=Po(Ea,n),Z=!Se.allowed,jt=Z?Se.reason??"Chat is unavailable for this sandbox":void 0,[L,kt]=s.useState(!1),[ye,Tt]=s.useState(!1),[Ue,Rt]=s.useState(!1),[P,$e]=s.useState({open:!1,pendingApproval:!1}),X=Uo(L,P,u?.presence?.paused===!0),Be=u?.presence?.onPresence;s.useEffect(()=>{Be?.(X),oe.current?.setPresence(X)},[Be,X]);const Me=s.useRef(u?.presence?.onSaying);Me.current=u?.presence?.onSaying;const Ve=s.useRef({answering:!1}),K=s.useCallback(e=>{i.current=e,Tt(!!e)},[]),It=s.useCallback(e=>{const{open:a,pendingApproval:l}=$o(e);$e(Ee=>Ee.open===a&&Ee.pendingApproval===l?Ee:{open:a,pendingApproval:l});const b={saying:Oo(e),answering:Mo(e)},h=Ve.current;(h.saying?.id!==b.saying?.id||h.saying?.text!==b.saying?.text||h.answering!==b.answering)&&(Ve.current=b,Me.current?.(b));const J=oe.current;if(!J)return;J.items(e);const F=new Set(["complete","completed","done","error","failed","cancelled","canceled","rejected","denied","stopped"]),ne={insertcell:"adding a cell",updatecell:"editing a cell",runcell:"running a cell",deletecells:"removing cells",readallcells:"reading the notebook",readcell:"reading a cell",executecode:"running code",insertblock:"adding a block",updateblock:"editing a block",runblock:"running a block",readdocument:"reading the document"};let S;for(let Ee=e.length-1;Ee>=0;Ee-=1){const gt=e[Ee];if(typeof gt.toolName=="string"&&gt.toolCallId){F.has(String(gt.status).toLowerCase())||(S=gt);break}}if(!S){J.activity(void 0);return}const Ie=S.toolName.toLowerCase().replace(/^datalayer_/,"").replace(/_lexical$/,"").replace(/[^a-z]/g,""),Ks=ne[Ie]??`using ${S.toolName}`;J.activity(`${Pe.current||"The agent"} is ${Ks}…`)},[]),ae=s.useRef(C);ae.current=C;const Et=s.useCallback(e=>{Rs(e),oe.current?.usage(e),ae.current.onUsage?.(e)},[]),He=s.useCallback(e=>{kt(e),e||oe.current?.end("done")},[]),At=s.useCallback(e=>{const a=oe.current;if(!a)return;let l=-1;for(let h=e.length-1;h>=0;h-=1)if(e[h].role==="user"){l=h;break}const b=e.slice(l+1).filter(h=>h.role==="assistant").map(Lo).filter(h=>h.trim().length>0).join(`
29
29
 
30
- `);a.assistant(b)},[]),Ce=s.useRef([]),ee=s.useRef(!1),we=s.useRef(void 0),je=s.useRef(void 0),ke=s.useRef(void 0),pe=B(Fo),De=s.useRef(pe);De.current=pe;const me=s.useCallback((e,a)=>{if(je.current)return je.current;const l=ke.current;ke.current=void 0;const b=zo(De.current.map(F=>F.value),l?{...a??{},voice:l}:a),h=b?.loop;if(ee.current&&h?.files&&h.files.length>0){const F=we.current;if(!F)return"A file is given to an application running on a runtime: run it on Datalayer or on your machine to give it one.";let ne;try{ne=h.files.map(S=>({file:No(String(S.name??"")),base64:_o(String(S.data_url??""))}))}catch(S){return S instanceof Error?S.message:String(S)}F.execute(Bo(ne)).then(S=>{if(!S.success){x(`The files could not be put in the sandbox: ${S.error??"it failed"}.`);return}me(`${e}
30
+ `);a.assistant(b)},[]),we=s.useRef([]),ee=s.useRef(!1),Ce=s.useRef(void 0),je=s.useRef(void 0),ke=s.useRef(void 0),pe=B(Fo),De=s.useRef(pe);De.current=pe;const me=s.useCallback((e,a)=>{if(je.current)return je.current;const l=ke.current;ke.current=void 0;const b=zo(De.current.map(F=>F.value),l?{...a??{},voice:l}:a),h=b?.loop;if(ee.current&&h?.files&&h.files.length>0){const F=Ce.current;if(!F)return"A file is given to an application running on a runtime: run it on Datalayer or on your machine to give it one.";let ne;try{ne=h.files.map(S=>({file:No(String(S.name??"")),base64:_o(String(S.data_url??""))}))}catch(S){return S instanceof Error?S.message:String(S)}F.execute(Bo(ne)).then(S=>{if(!S.success){x(`The files could not be put in the sandbox: ${S.error??"it failed"}.`);return}me(`${e}
31
31
 
32
- ${Vo(ne.map(Ie=>Ie.file))}`,{...b,loop:Object.fromEntries(Object.entries(h).filter(([Ie])=>Ie!=="files"))})});return}oe.current?.begin(e,c());const J=i.current?.send;if(!J){Ce.current.push([e,b]);return}J(e,b)},[c]);s.useEffect(()=>{p(ye?{busy:L,stop:i.current?.stop,newChat:i.current?.newChat,send:me}:null)},[L,ye,p,me]),s.useEffect(()=>()=>p(null),[p]),s.useEffect(()=>n.prompts.subscribe(me),[n.prompts,me]),s.useEffect(()=>{if(!ye||Ce.current.length===0)return;const e=Ce.current.splice(0,Ce.current.length);for(const[a,l]of e)c(),i.current?.send(a,l)},[ye,c]);const We=s.useRef(!1),ie=s.useCallback(async e=>{x(null);const a=await Ho(ae.current,e);if(a){a.sent?Xe(""):x(a.refused);return}We.current||(We.current=!0,C?.firstPromptHook?.());const l=await n.submit(e);if(!l.handled){x(l.reason??null);return}Xe(""),l.result?.content&&x(l.result.content)},[n,C?.firstPromptHook]),I=s.useMemo(()=>A.find(e=>e.value.surfaceId===k)?.value,[A,k]),re=s.useCallback(e=>{xe.current=!0,_(e)},[]);s.useEffect(()=>Do(re),[re]),s.useEffect(()=>{Wo(A.map(e=>e.value.surfaceId))},[A]),s.useEffect(()=>{Ko(k&&k!==de?k:Ua)},[k]);const Te=s.useMemo(()=>O===de||O==="none"?void 0:A.find(e=>e.value.surfaceId===O),[A,O]);s.useEffect(()=>{xe.current||!Te||ot(Te.value,n)&&_(O)},[Te,n,O]);const[le,rt]=s.useState(null),Oe=s.useRef(null),Le=u?.fullScreenTopOffset??0,{fullScreen:G,usingApi:Ke,toggle:m,topOffsetPx:U}=Go(Oe,{forceOverlay:!!Le,topOffset:Le}),[V,H]=s.useState(!1),Ge=s.useRef(!1);s.useEffect(()=>{!L||Ge.current||G||(Ge.current=!0,H(!0))},[L,G]),s.useEffect(()=>{G&&H(!1)},[G]),s.useEffect(()=>{I&&!ot(I,n)&&(rt(I.surfaceId),_(de))},[I,n]);const lt=s.useMemo(()=>{if(le)return A.find(e=>e.value.surfaceId===le)?.value;if(!xe.current&&k===de)return Te?.value},[A,le,k,Te]);s.useEffect(()=>{if(!le||k!==de)return;const e=A.find(a=>a.value.surfaceId===le);e&&ot(e.value,n)&&(rt(null),_(le))},[A,k,le,n]);const E=n.agentId?.trim()||"default",$=Yo(n.sandbox.target??"local");ee.current=$;const j=Jo(),ce=Qt(j?.selected??xi),R=j?.members.find(e=>e.id===ce),rn=B(qo)[0]?.value,Pt=rn?.specId,M=Zn(R?.specId??E)??(Pt?Zn(Pt):void 0),Ye=R?void 0:rn,ln=$&&!R?Ia(Pt,M):void 0;Pe.current=R?.name??M?.name??E;const cn=B(Qo),dn=w.hiddenOpeners,un=w.hideOpeners,Ut=w.openers,$t=s.useMemo(()=>{if(un)return[];const e=new Set(dn??[]),a=S=>e.size===0?S:S.filter(Ie=>!e.has(Ie.text));if(Ut)return a(Ut);const l=cn.flatMap(S=>S.value.suggestions);if(l.length>0)return a(l);const b=a(M?.suggestions??[]),h=a(j?.team.suggestions??[]);if(h.length===0)return b;const J=new Set(h.map(S=>S.text)),F=j?.team.name??"Team",ne=R?.name??M?.name??E;return[...h.map(S=>({...S,group:F})),...b.filter(S=>!J.has(S.text)).map(S=>({...S,group:ne}))]},[cn,j,M,R,E,dn,un,Ut]),ct=s.useMemo(()=>$t.map(e=>({title:e.summary??e.text,message:e.message??e.text,group:e.group})),[$t]),Mt=Ne(M?.icon),Y=u?.presence,gs=Ne(j?.team.icon),fn=B(Zo),dt=s.useMemo(()=>{const e=[],a=new Map,l=new Set,b=new Set(A.map(h=>h.value.surfaceId));for(const h of ti(fn,I?.surfaceId)){if(ni(h.value.id,b,I?.surfaceId))continue;let J;try{J=h.value.tools(n)}catch(F){console.warn(`[loop] frontend tools from '${h.plugin}' failed:`,F);continue}for(const F of J){const ne=a.get(F.name);if(ne){console.warn(`[loop] frontend tool '${F.name}' from '${h.plugin}' is shadowed by the one from '${ne}'.`);continue}a.set(F.name,h.plugin),e.push(F),h.value.chatView&&l.add(F.name)}}for(const h of w.frontendTools??[])a.has(h.name)||(a.set(h.name,"chat-extras"),e.push(h),l.add(h.name));return I?e:ei(e,l)},[fn,n.surfaceId,n.agentId,w.frontendTools,I?.surfaceId,A]),Ot=ai(),Je=s.useMemo(()=>{if(Ot.length===0)return dt;const e=new Set(dt.map(a=>a.name));return[...dt,...Ot.filter(a=>!e.has(a.name))]},[dt,Ot]),pn=ps(),Lt=w.agentToolBundles,xs=s.useMemo(()=>{const e=w.frontendTools??[];if(!Lt?.length)return w.frontendTools;const a=ms(pn.filter(b=>Lt.includes(b.id)),y),l=new Set(e.map(b=>b.name));return[...e,...a.filter(b=>!l.has(b.name))]},[w.frontendTools,Lt,pn,y]);we.current=$&&Je.some(e=>e.name===Xo)?y.getOutput(vt)?.sandbox:void 0;const T=ea(n.sandbox,n.serverUrl),qe=s.useMemo(()=>Ga({baseUrl:T??"",getAccessToken:()=>d.current,fetch:(e,a)=>fetch(e,a)}),[T]),mn=B(ta),bs=s.useMemo(()=>mn.filter(e=>e.value.composer).map(e=>({name:e.value.name,description:e.value.description})),[mn]),vs=s.useMemo(()=>{if(!j||!R)return as(M).map(l=>({name:l.name,description:l.description,icon:Ne(l.icon)}));const e=j.members.map(l=>({name:l.name,description:l.description,emoji:l.emoji,icon:Ne(l.icon),disabled:l.id===R.id,disabledReason:l.id===R.id?`You are already talking to ${l.name}`:void 0})),a=Xn(j.team,R.id).filter(l=>!j.members.some(b=>b.name===l.name)).map(l=>({name:l.name,description:l.description,icon:Ne(l.icon)}));return[...e,...a]},[j,R,M]),{inference:hn,anonymous:Ss}=qa($),ys=sn(e=>e.user),Ft=$&&Ss.status==="expired",gn=!ys,Qe=na();je.current=Qe.disabled?Qe.disableReason||"This conversation is closed here.":void 0;const zt=T===void 0?sa(n.sandbox,o):void 0,Ze=Z||Ft||!!ln||!!zt||Qe.disabled,xn=Ft?gn?o.demoKeyExpired:o.keyExpired:ln??zt??jt??(Qe.disabled?Qe.disableReason:void 0),[_t,Xe]=s.useState(""),[bn]=oa(),et=s.useMemo(()=>u?.voice?aa(u.voice,bn):void 0,[u?.voice,bn]),[Cs,ws]=s.useState(!1),[js,vn]=s.useState(),ut=js??Ye?.model??M?.model??n.model??"",Fe=ia(),Sn=s.useRef(Fe),yn=s.useRef(ce),Cn=s.useRef(Fe);Cn.current=Fe,s.useEffect(()=>{yn.current!==ce&&(yn.current=ce,Sn.current=Cn.current,vn(void 0))},[ce]);const ks=Fe&&Fe!==Sn.current?Fe:null,[Ts,Rs]=s.useState(),Is=ks??Ts??null,Es=Zt(Ae.inpromptMenu),wn=Zt(Ae.promptAction),jn=Zt(Ae.chatHeader),As=s.useMemo(()=>j?.members.map(e=>({id:e.id,name:e.name,description:e.description,icon:Ne(e.icon)}))??[],[j]),Re=os(e=>e.pending),[kn,Ps]=s.useState(0);s.useEffect(()=>ra(()=>Ps(e=>e+1)),[]),s.useEffect(()=>{Re&&(Xe(Re.text),os.getState().consume(),Re.submit&&ie(Re.text))},[Re]);const Tn=y.getConfig(vt)?.datalayerCreatePayload,D=!!(Ye?.createPayload?.app_spec||Tn?.app_spec),Nt=ii(Tn),Us=sn(e=>e.token),Bt=y.getConfig(vt)?.datalayerVisitors,$s=la(Bt),Ms=y.getConfig(vt)?.embedToken,he=Bt?$s.token:Ms||Us;d.current=he||void 0;const Os=s.useMemo(()=>ca(u?.voice,he||void 0),[u?.voice,he]),ge=!!(Nt||Bt);if(ge&&!D)throw new Error("A deployment’s page runs its application: its host gave no app_spec.");const[Rn]=s.useState(es),[Vt,Ls]=s.useMemo(()=>{try{return[li(typeof window>"u"?"":window.location.search),""]}catch(e){return["",e instanceof Error?e.message:String(e)]}},[]),[In,Fs]=s.useState(void 0),N=s.useMemo(()=>In??ri(u?.thread??(Vt&&D?{id:Vt,messages:[],fromRuntime:!0}:void 0),Nt,Rn),[In,u?.thread,Vt,D,Nt,Rn]),[ze,En]=s.useState(null),zs=!!(N?.fromRuntime&&ze?.given!==N.id);s.useEffect(()=>{if(!N?.fromRuntime||!D||!T)return;let e=!0;return(async()=>{let a="";for(let l=0;l<4&&e;l+=1)try{const b=await da({agentBaseUrl:T,agentId:E,uid:N.id,token:he});e&&En({given:N.id,thread:{...N,fromRuntime:!1,messages:b}});return}catch(b){a=b instanceof Error?b.message:String(b),await new Promise(h=>setTimeout(h,1500))}e&&En({given:N.id,thread:{id:es(),messages:[],onStarted:N.onStarted},said:ts.notOpened(a)})})(),()=>{e=!1}},[N?.id,N?.fromRuntime,D,T,E,he]);const Ht=N?.fromRuntime?ze?.given===N.id?ze.thread:void 0:N,ft=n.thread||Ht?.id||"",[An,Pn]=s.useState(void 0),[_s,Un]=s.useState(0);s.useEffect(()=>{if(!D||!T||!ft||L)return;let e=!0;return qe.described(ft).then(a=>e&&Pn(a),()=>e&&Pn(void 0)),()=>{e=!1}},[D,T,ft,L,_s,qe]);const[$n,Mn]=s.useState(Ls),[On,Ln]=s.useState(null),Dt=s.useRef(null),Wt=s.useRef(null),Fn=s.useRef(null),zn=s.useMemo(()=>({client:qe,say:e=>{Mn(e),Un(a=>a+1)},openThread:e=>{Fs({id:e,messages:[],fromRuntime:!0}),Un(a=>a+1)},download:(e,a,l)=>{const b=URL.createObjectURL(new Blob([a],{type:l})),h=document.createElement("a");h.href=b,h.download=e,h.click(),URL.revokeObjectURL(b)},choose:e=>new Promise(a=>{Dt.current=a,Ln(e)}),pickFile:e=>new Promise(a=>{const l=Fn.current;if(!l){a(void 0);return}Wt.current=a,l.accept=e,l.value="",l.click()})}),[qe]),Kt=s.useMemo(()=>$?Ha({agentId:R?.specId??E,instructions:ua(M,Ye?.instructions),model:ut||void 0,inference:hn,frontendTools:Je,subagents:j&&R?Xn(j.team,R.id):as(M),sharing:j?.sharing,onSubagentEvent:e=>Aa.getState().appendSubagentEvent(e),modeEffect:Ye?.modeEffect}):T!==void 0?{type:"ag-ui",endpoint:D?`${T}/api/v1/apps/agents/${encodeURIComponent(E)}/ag-ui/`:`${T}/api/v1/ag-ui/${E}/`,...D&&he?{authToken:he}:{},...D?{uiSocket:`${T.replace(/^http/,"ws")}/api/v1/apps/ui`,uiFiles:`${T}/api/v1/apps/agents/${encodeURIComponent(E)}/files`,appSessions:`${T}/api/v1/apps/sessions`,...ge?{ownRoutesOnly:!0}:{}}:{},agentId:E,configEndpoint:`${T}/api/v1/configure`,enableConfigQuery:!0}:void 0,[E,$,hn,R,Je,j,M,Ye,ut,T,D,he,ge]),pt=fa(!$,Kt?.type==="ag-ui"?Kt.configEndpoint:void 0,void 0,E),tt=pa(),mt=ma(E),[_n,Gt]=s.useState(void 0),[Ns,Bs]=s.useState(void 0);s.useEffect(()=>{if($||T===void 0)return;const e=ha(T,E,ge);if(!e){Gt([]);return}let a=!1;return fetch(e).then(l=>l.ok?l.json():null).then(l=>{a||(Gt(l?ga(l):[]),Bs(l?xa(l):void 0))}).catch(()=>{a||Gt([])}),()=>{a=!0}},[T,E,$,ge]);const Vs=s.useMemo(()=>ba(_n,()=>Object.values(va).filter(e=>e.available&&Sa(e)).map(e=>({id:e.id,name:e.name,provider:e.provider}))),[_n]),Nn=s.useMemo(()=>{const e=pt.data?.builtinTools??[],a=new Set(e.map(l=>l.name));return{runtime:e,frontend:Je.filter(l=>!a.has(l.name)).map(l=>({id:l.name,name:l.name}))}},[pt.data?.builtinTools,Je]),Bn=s.useMemo(()=>new Set((tt.data?.skills??[]).filter(e=>e.status==="enabled"||e.status==="loaded").map(e=>e.id)),[tt.data]),Hs=s.useCallback(async e=>{if(ge)throw new Error("A deployment’s chat does not switch its runtime’s model.");vn(e),!($||T===void 0)&&await fetch(`${T}/api/v1/configure/inference/provider`,{method:"PUT",headers:{"content-type":"application/json"},body:JSON.stringify({model:e})}).catch(()=>{})},[T,$,ge]),Vn=u?.promptPlacement==="bottom-chat",Ds=u?.promptPlacement==="floating",_e=u?.promptPlacement==="top",nt=u?.hidePrompt===!0||w.hidePrompt===!0,Ws={onSend:()=>{ie(_t)},input:_t,setInput:Xe,focusTrigger:Re||kn?(Re?.nonce??0)+kn:void 0,placement:Ds||Q==="floating"||Q==="floating-top"||Q==="floating-bottom"?"floating":"docked",floatingAnchor:Q==="floating-top"?"top":"bottom",isLoading:L,onStop:()=>n.viewControls.stop?.(),placeholder:xn??w.sendInstead?.says??ue,typingSuggestions:$t.map(e=>e.text),suggestions:ct,disableInputPrompt:Ze,connectionConfirmed:!Ze,interim:Cs,padding:_e||Q==="floating-top"||Q==="floating-bottom"||Q==="docked-top"?2:3,promptVariant:"lexical",autoFocus:u?.autoFocusPrompt??!0,mentionableAgents:vs,promptCommands:bs,headerContent:Es.length>0?t.jsx(St,{slot:Ae.inpromptMenu,props:{workspace:n}}):void 0,footerExtras:wn.length>0||et&&et.input!=="off"?t.jsxs(t.Fragment,{children:[wn.length>0?t.jsx(St,{slot:Ae.promptAction,props:{workspace:n}}):null,et&&et.input!=="off"?t.jsx(ya,{voice:et,input:_t,setInput:Xe,disabled:Ze,speaking:Ue,onStopSpeaking:()=>i.current?.stopSpeaking?.(),playbackLevel:()=>i.current?.voiceLevel?.()??0,running:L,onStopRun:()=>(i.current?.interrupt??i.current?.stop)?.(),onInterrupted:()=>i.current?.markInterrupted(),onInterimChange:ws,answers:!!(u?.voice?.output&&u.voice.output!=="off"&&u.voice.speechUrl),onSpoken:e=>{ke.current=e},send:(e,a)=>{ke.current=a,ie(e)}}):null]}):void 0,showAgentsMenu:!Y,showInlineAgentsMenu:!1,agents:As,selectedAgentId:ce,onSelectAgent:e=>j?.select(e),showTokenUsage:w.showTokenUsage??u?.showTokenUsage??!0,showContextRing:!0,agentUsage:Is??void 0,showModelSelector:!Y&&!ge,models:Vs,decisions:Ns,selectedModel:ut,onModelSelect:e=>{Hs(e)},showToolsMenu:!Y,availableTools:Nn.runtime,availableFrontendTools:Nn.frontend,mcpServers:pt.data?.mcpServers??[],mcpStatusData:w.mcpStatusData??void 0,showSkillsMenu:!Y,skills:tt.data?.skills??[],skillsLoading:tt.isLoading,enabledSkills:Bn,onToggleSkill:e=>Bn.has(e)?mt.disableSkill(e):mt.enableSkill(e),onToggleAllSkills:(e,a)=>e.forEach(l=>a?mt.enableSkill(l):mt.disableSkill(l)),codemodeEnabled:w.codemodeEnabled??!1,onToggleCodemode:w.onToggleCodemode,isA2AProtocol:!1,hasConfigData:!!pt.data,hasSkillsData:!!tt.data},Hn=yt[0]?.value.Component,Yt=Ct[0]?.value.Component,Dn=!u?.hideHeader&&!!Yt,ht=Hn?t.jsx(Hn,{workspace:n,composer:Ws}):null,Wn=A.length>0&&u?.showSurfaceSelector!==!1?t.jsx(Si,{surfaces:A.map(e=>e.value),active:I?.surfaceId??lt?.surfaceId??de,onChange:re,workspace:n}):null,Kn=t.jsxs(t.Fragment,{children:[A.map(e=>{const a=e.value,l=I?.surfaceId===a.surfaceId;return l||it.current.has(a.surfaceId)||ot(a,n)?(it.current.add(a.surfaceId),t.jsx(g,{sx:l?{flex:"1 1 0",minWidth:0,minHeight:0}:{position:"absolute",inset:0,visibility:"hidden",pointerEvents:"none",zIndex:-1},children:t.jsx(Ca,{load:a.load,props:{surfaceId:a.surfaceId,workspace:n},fallback:t.jsxs(tn,{children:["Loading ",a.title,"…"]}),errorFallback:h=>t.jsxs(tn,{children:[a.title," failed to load: ",h.message]})})},a.surfaceId)):null}),!I&&lt?t.jsx(g,{flex:"1 1 0",minWidth:0,minHeight:0,children:t.jsxs(tn,{children:["Starting ",lt.title,"…"]})}):null]}),Gn=t.jsx(t.Fragment,{children:t.jsxs(g,{flex:_e&&I?"0 0 34%":"1 1 0",maxWidth:_e&&I?460:void 0,minWidth:0,minHeight:0,display:"flex",flexDirection:"column",borderLeft:I?"1px solid":void 0,borderColor:"border.default",position:"relative",children:[w.errorBanner?t.jsx(g,{flexShrink:0,px:3,py:2,fontSize:1,borderBottom:"1px solid",bg:w.errorBanner.variant==="warning"?"attention.subtle":"danger.subtle",color:w.errorBanner.variant==="warning"?"attention.fg":"danger.fg",borderColor:w.errorBanner.variant==="warning"?"attention.muted":"danger.muted",children:w.errorBanner.message}):null,ze?.said&&ze.given===N?.id?t.jsx(z,{as:"p",role:"status",sx:{m:0,px:3,py:2,fontSize:1,color:"fg.muted"},children:ze.said}):null,$n?t.jsxs(g,{display:"flex",alignItems:"baseline",gap:2,px:3,py:2,fontSize:1,color:"fg.muted",role:"status","data-session-said":"",children:[t.jsx(z,{sx:{flex:1},children:$n}),t.jsx(q,{size:"small",variant:"invisible",onClick:()=>Mn(""),children:"Dismiss"})]}):null,On?t.jsx(fi,{question:On,onPick:e=>{Ln(null),Dt.current?.(e),Dt.current=null}}):null,t.jsx("input",{ref:Fn,type:"file",hidden:!0,"data-session-file":"",onChange:async e=>{const a=e.target.files?.[0],l=a?await a.text():void 0;Wt.current?.(l),Wt.current=null}}),t.jsx(g,{flex:"1 1 auto",minHeight:0,display:"flex",children:zs?t.jsx(z,{as:"p",role:"status",sx:{m:0,p:3,fontSize:1,color:"fg.muted"},children:ts.opening}):t.jsx(wa,{themeVariant:u?.themeVariant,themeOverrides:u?.themeOverrides,colorMode:u?.colorMode,thread:Ht,voice:Os,disabled:Ze,disableReason:xn,protocol:Kt,frontendTools:$?void 0:xs,initialModel:ut||void 0,title:Y?.name??R?.name??M?.name??E,description:Y?.welcome??M?.description,brandIcon:Y?.face?t.jsx(mi,{face:Y.face,size:20,state:X}):t.jsx(Mt,{size:20}),headerContent:Y&&!zt?t.jsx(hi,{state:X}):void 0,emptyState:{icon:Y?.face?t.jsx("span",{"aria-hidden":!0,style:{fontSize:rs,lineHeight:1},children:t.jsx(hs,{face:Y.face,size:rs})}):t.jsx(Mt,{size:48}),title:Y?.name??R?.name??M?.name??E,...j&&R?{sections:[{group:j.team.name,icon:t.jsx(gs,{size:48}),title:j.team.name,subtitle:j.team.description},{group:R.name,icon:t.jsx(Mt,{size:32}),title:R.name,subtitle:M?.description}]}:null},suggestions:_e||be||u?.suggestionLabels===!1?[]:ct,showHeader:Dn,headerButtons:{showNewChat:u?.headerButtons?.newChat??!1,showClear:u?.headerButtons?.clear??!1},renderHeader:Yt?e=>t.jsx(Yt,{workspace:n,header:n.chatViewModes?{...e,chatViewMode:n.chatViewModes.value,onChatViewModeChange:n.chatViewModes.onChange,offeredViewModes:n.chatViewModes.offered}:e}):void 0,showInformation:!0,headerActions:t.jsxs(g,{display:"inline-flex",alignItems:"center",gap:2,children:[n.chatHeaderActions,D&&T?t.jsxs(t.Fragment,{children:[t.jsx(ci,{facts:An}),t.jsx(ui,{uid:ft||void 0,describe:e=>qe.described(e),context:zn})]}):null,jn.length>0?t.jsx(St,{slot:Ae.chatHeader,props:{workspace:n}}):null,t.jsx(us,{icon:G?ja:ka,"aria-label":G?"Exit full screen":"Enter full screen",variant:"invisible",size:"small",onClick:()=>{H(!1),m()},sx:V?{"@keyframes dla-fullscreen-hint":{"0%, 100%":{opacity:1},"50%":{opacity:.4}},"&&":{bg:`color-mix(in srgb, ${r.primary} 16%, transparent)`,boxShadow:`inset 0 0 0 1.5px ${r.primary}`,animation:`dla-fullscreen-hint ${vi}ms ease-in-out infinite`},"@media (prefers-reduced-motion: reduce)":{"&&":{animation:"none"}}}:void 0})]}),showInput:!1,onSendReady:K,notebookToolSurfacesId:I?void 0:n.surfaceId,showTurnFooter:w.showTokenUsage??u?.showTokenUsage??!0,onContextSnapshot:Et,onLoadingChange:He,renderMessageFooter:D&&T?(e,a)=>e.role==="user"?t.jsx(di,{facts:An,turn:a.turn,context:zn}):null:void 0,onSpeakingChange:Rt,onItemsChange:At,onDisplayItemsChange:It,enableStreaming:!0},Ht?.id)}),!Dn&&jn.length>0?t.jsx(g,{hidden:!0,children:t.jsx(St,{slot:Ae.chatHeader,props:{workspace:n}})}):null,Vn&&!nt?ht:null]})}),Yn=u?.suggestionLabels!==!1&&ct.length>0?t.jsx(g,{"aria-label":o.suggestedPrompts,display:"flex",flexWrap:"wrap",gap:2,px:2,pb:"6px",children:ct.map(e=>t.jsx(g,{as:"button",type:"button",title:e.message,disabled:L||Ze,onClick:()=>{ie(e.message)},appearance:"none",font:"inherit",fontSize:0,fontWeight:"semibold",lineHeight:1.25,px:"10px",py:"5px",width:ns,flex:`0 0 ${ns}px`,borderRadius:"999px",border:"1px solid",bg:"canvas.subtle",whiteSpace:"nowrap",sx:{borderColor:"border.default",color:"fg.default",cursor:"pointer","&:hover:not(:disabled)":{borderColor:"accent.fg",color:"accent.fg"},"&:disabled":{opacity:.5,cursor:"default"}},children:t.jsx(Ta,{title:e.title,maxWidth:"100%",sx:{minWidth:0},children:e.title})},e.title))}):null,Jn=f?t.jsx(g,{flex:"0 0 auto",px:3,py:2,borderTop:"1px solid",borderColor:"border.default",bg:"canvas.subtle",fontSize:1,maxHeight:"40%",overflowY:"auto",children:f}):null;return t.jsxs(g,{ref:Oe,sx:{height:"100%",minHeight:0,display:"flex",flexDirection:"column",position:"relative",...G?{bg:"canvas.default"}:null,...G&&!Ke.current?{position:"fixed",top:U,right:0,bottom:0,left:0,height:"auto",zIndex:1e3}:null},children:[be?t.jsx(be.Component,{workspace:n,editors:Kn,hasEditor:!!I,transcript:Gn,prompt:nt?null:ht,chips:nt?null:Yn,picker:Wn,transient:Jn}):t.jsxs(t.Fragment,{children:[_e&&!nt?t.jsxs(g,{flex:"0 0 auto",borderBottom:"1px solid",borderColor:"border.default",children:[ht,Yn]}):null,Wn,t.jsxs(g,{flex:"1 1 auto",minHeight:0,display:"flex",position:"relative",children:[Kn,Gn]}),Jn,Vn||nt||_e?null:ht]}),Ft?t.jsx(g,{position:"absolute",inset:0,zIndex:5,bg:"canvas.default",display:"flex",flexDirection:"column",minHeight:0,children:t.jsx(Ya,{agentName:R?.name??M?.name,sandboxStillRuns:$,temporary:gn,onSignedIn:()=>Ra.getState().clear()})}):null]})}function Si({surfaces:n,active:o,onChange:r,workspace:i}){const d=[...n].sort((p,v)=>(p.order??100)-(v.order??100));return t.jsxs(g,{flex:"0 0 auto",display:"flex",alignItems:"center",gap:2,px:3,py:2,borderBottom:"1px solid",borderColor:"border.default",children:[t.jsx(z,{sx:{fontSize:0,color:"fg.muted"},children:"Beside the chat"}),t.jsxs(Xt,{"aria-label":"Editor beside the chat",size:"small",children:[t.jsx(Xt.Button,{selected:o===de,onClick:()=>r(de),children:"Chat"}),d.map(p=>{const v=ot(p,i),c=v?void 0:p.unavailableReason?.(i)??"Not available right now";return t.jsx(Xt.Button,{selected:o===p.surfaceId,"aria-disabled":!v,title:c??p.title,leadingIcon:p.icon,onClick:()=>{v&&r(p.surfaceId)},children:p.title},p.surfaceId)})]})]})}function tn({children:n}){return t.jsx(g,{height:"100%",display:"flex",alignItems:"center",justifyContent:"center",color:"fg.muted",fontSize:1,px:3,textAlign:"center",children:n})}export{ki as default};
32
+ ${Vo(ne.map(Ie=>Ie.file))}`,{...b,loop:Object.fromEntries(Object.entries(h).filter(([Ie])=>Ie!=="files"))})});return}oe.current?.begin(e,c());const J=i.current?.send;if(!J){we.current.push([e,b]);return}J(e,b)},[c]);s.useEffect(()=>{p(ye?{busy:L,stop:i.current?.stop,newChat:i.current?.newChat,send:me}:null)},[L,ye,p,me]),s.useEffect(()=>()=>p(null),[p]),s.useEffect(()=>n.prompts.subscribe(me),[n.prompts,me]),s.useEffect(()=>{if(!ye||we.current.length===0)return;const e=we.current.splice(0,we.current.length);for(const[a,l]of e)c(),i.current?.send(a,l)},[ye,c]);const We=s.useRef(!1),ie=s.useCallback(async e=>{x(null);const a=await Ho(ae.current,e);if(a){a.sent?Xe(""):x(a.refused);return}We.current||(We.current=!0,w?.firstPromptHook?.());const l=await n.submit(e);if(!l.handled){x(l.reason??null);return}Xe(""),l.result?.content&&x(l.result.content)},[n,w?.firstPromptHook]),I=s.useMemo(()=>A.find(e=>e.value.surfaceId===k)?.value,[A,k]),re=s.useCallback(e=>{xe.current=!0,_(e)},[]);s.useEffect(()=>Do(re),[re]),s.useEffect(()=>{Wo(A.map(e=>e.value.surfaceId))},[A]),s.useEffect(()=>{Ko(k&&k!==de?k:Ua)},[k]);const Te=s.useMemo(()=>O===de||O==="none"?void 0:A.find(e=>e.value.surfaceId===O),[A,O]);s.useEffect(()=>{xe.current||!Te||ot(Te.value,n)&&_(O)},[Te,n,O]);const[le,rt]=s.useState(null),Oe=s.useRef(null),Le=u?.fullScreenTopOffset??0,{fullScreen:G,usingApi:Ke,toggle:m,topOffsetPx:U}=Go(Oe,{forceOverlay:!!Le,topOffset:Le}),[V,H]=s.useState(!1),Ge=s.useRef(!1);s.useEffect(()=>{!L||Ge.current||G||(Ge.current=!0,H(!0))},[L,G]),s.useEffect(()=>{G&&H(!1)},[G]),s.useEffect(()=>{I&&!ot(I,n)&&(rt(I.surfaceId),_(de))},[I,n]);const lt=s.useMemo(()=>{if(le)return A.find(e=>e.value.surfaceId===le)?.value;if(!xe.current&&k===de)return Te?.value},[A,le,k,Te]);s.useEffect(()=>{if(!le||k!==de)return;const e=A.find(a=>a.value.surfaceId===le);e&&ot(e.value,n)&&(rt(null),_(le))},[A,k,le,n]);const E=n.agentId?.trim()||"default",$=Yo(n.sandbox.target??"local");ee.current=$;const j=Jo(),ce=Qt(j?.selected??xi),R=j?.members.find(e=>e.id===ce),rn=B(qo)[0]?.value,Pt=rn?.specId,M=Zn(R?.specId??E)??(Pt?Zn(Pt):void 0),Ye=R?void 0:rn,ln=$&&!R?Ia(Pt,M):void 0;Pe.current=R?.name??M?.name??E;const cn=B(Qo),dn=C.hiddenOpeners,un=C.hideOpeners,Ut=C.openers,$t=s.useMemo(()=>{if(un)return[];const e=new Set(dn??[]),a=S=>e.size===0?S:S.filter(Ie=>!e.has(Ie.text));if(Ut)return a(Ut);const l=cn.flatMap(S=>S.value.suggestions);if(l.length>0)return a(l);const b=a(M?.suggestions??[]),h=a(j?.team.suggestions??[]);if(h.length===0)return b;const J=new Set(h.map(S=>S.text)),F=j?.team.name??"Team",ne=R?.name??M?.name??E;return[...h.map(S=>({...S,group:F})),...b.filter(S=>!J.has(S.text)).map(S=>({...S,group:ne}))]},[cn,j,M,R,E,dn,un,Ut]),ct=s.useMemo(()=>$t.map(e=>({title:e.summary??e.text,message:e.message??e.text,group:e.group})),[$t]),Mt=Ne(M?.icon),Y=u?.presence,gs=Ne(j?.team.icon),fn=B(Zo),dt=s.useMemo(()=>{const e=[],a=new Map,l=new Set,b=new Set(A.map(h=>h.value.surfaceId));for(const h of ti(fn,I?.surfaceId)){if(ni(h.value.id,b,I?.surfaceId))continue;let J;try{J=h.value.tools(n)}catch(F){console.warn(`[loop] frontend tools from '${h.plugin}' failed:`,F);continue}for(const F of J){const ne=a.get(F.name);if(ne){console.warn(`[loop] frontend tool '${F.name}' from '${h.plugin}' is shadowed by the one from '${ne}'.`);continue}a.set(F.name,h.plugin),e.push(F),h.value.chatView&&l.add(F.name)}}for(const h of C.frontendTools??[])a.has(h.name)||(a.set(h.name,"chat-extras"),e.push(h),l.add(h.name));return I?e:ei(e,l)},[fn,n.surfaceId,n.agentId,C.frontendTools,I?.surfaceId,A]),Ot=ai(),Je=s.useMemo(()=>{if(Ot.length===0)return dt;const e=new Set(dt.map(a=>a.name));return[...dt,...Ot.filter(a=>!e.has(a.name))]},[dt,Ot]),pn=ps(),Lt=C.agentToolBundles,xs=s.useMemo(()=>{const e=C.frontendTools??[];if(!Lt?.length)return C.frontendTools;const a=ms(pn.filter(b=>Lt.includes(b.id)),y),l=new Set(e.map(b=>b.name));return[...e,...a.filter(b=>!l.has(b.name))]},[C.frontendTools,Lt,pn,y]);Ce.current=$&&Je.some(e=>e.name===Xo)?y.getOutput(vt)?.sandbox:void 0;const T=ea(n.sandbox,n.serverUrl),qe=s.useMemo(()=>Ga({baseUrl:T??"",getAccessToken:()=>d.current,fetch:(e,a)=>fetch(e,a)}),[T]),mn=B(ta),bs=s.useMemo(()=>mn.filter(e=>e.value.composer).map(e=>({name:e.value.name,description:e.value.description})),[mn]),vs=s.useMemo(()=>{if(!j||!R)return as(M).map(l=>({name:l.name,description:l.description,icon:Ne(l.icon)}));const e=j.members.map(l=>({name:l.name,description:l.description,emoji:l.emoji,icon:Ne(l.icon),disabled:l.id===R.id,disabledReason:l.id===R.id?`You are already talking to ${l.name}`:void 0})),a=Xn(j.team,R.id).filter(l=>!j.members.some(b=>b.name===l.name)).map(l=>({name:l.name,description:l.description,icon:Ne(l.icon)}));return[...e,...a]},[j,R,M]),{inference:hn,anonymous:Ss}=qa($),ys=sn(e=>e.user),Ft=$&&Ss.status==="expired",gn=!ys,Qe=na();je.current=Qe.disabled?Qe.disableReason||"This conversation is closed here.":void 0;const zt=T===void 0?sa(n.sandbox,o):void 0,Ze=Z||Ft||!!ln||!!zt||Qe.disabled,xn=Ft?gn?o.demoKeyExpired:o.keyExpired:ln??zt??jt??(Qe.disabled?Qe.disableReason:void 0),[_t,Xe]=s.useState(""),[bn]=oa(),et=s.useMemo(()=>u?.voice?aa(u.voice,bn):void 0,[u?.voice,bn]),[ws,Cs]=s.useState(!1),[js,vn]=s.useState(),ut=js??Ye?.model??M?.model??n.model??"",Fe=ia(),Sn=s.useRef(Fe),yn=s.useRef(ce),wn=s.useRef(Fe);wn.current=Fe,s.useEffect(()=>{yn.current!==ce&&(yn.current=ce,Sn.current=wn.current,vn(void 0))},[ce]);const ks=Fe&&Fe!==Sn.current?Fe:null,[Ts,Rs]=s.useState(),Is=ks??Ts??null,Es=Zt(Ae.inpromptMenu),Cn=Zt(Ae.promptAction),jn=Zt(Ae.chatHeader),As=s.useMemo(()=>j?.members.map(e=>({id:e.id,name:e.name,description:e.description,icon:Ne(e.icon)}))??[],[j]),Re=os(e=>e.pending),[kn,Ps]=s.useState(0);s.useEffect(()=>ra(()=>Ps(e=>e+1)),[]),s.useEffect(()=>{Re&&(Xe(Re.text),os.getState().consume(),Re.submit&&ie(Re.text))},[Re]);const Tn=y.getConfig(vt)?.datalayerCreatePayload,D=!!(Ye?.createPayload?.app_spec||Tn?.app_spec),Nt=ii(Tn),Us=sn(e=>e.token),Bt=y.getConfig(vt)?.datalayerVisitors,$s=la(Bt),Ms=y.getConfig(vt)?.embedToken,he=Bt?$s.token:Ms||Us;d.current=he||void 0;const Os=s.useMemo(()=>ca(u?.voice,he||void 0),[u?.voice,he]),ge=!!(Nt||Bt);if(ge&&!D)throw new Error("A deployment’s page runs its application: its host gave no app_spec.");const[Rn]=s.useState(es),[Vt,Ls]=s.useMemo(()=>{try{return[li(typeof window>"u"?"":window.location.search),""]}catch(e){return["",e instanceof Error?e.message:String(e)]}},[]),[In,Fs]=s.useState(void 0),N=s.useMemo(()=>In??ri(u?.thread??(Vt&&D?{id:Vt,messages:[],fromRuntime:!0}:void 0),Nt,Rn),[In,u?.thread,Vt,D,Nt,Rn]),[ze,En]=s.useState(null),zs=!!(N?.fromRuntime&&ze?.given!==N.id);s.useEffect(()=>{if(!N?.fromRuntime||!D||!T)return;let e=!0;return(async()=>{let a="";for(let l=0;l<4&&e;l+=1)try{const b=await da({agentBaseUrl:T,agentId:E,uid:N.id,token:he});e&&En({given:N.id,thread:{...N,fromRuntime:!1,messages:b}});return}catch(b){a=b instanceof Error?b.message:String(b),await new Promise(h=>setTimeout(h,1500))}e&&En({given:N.id,thread:{id:es(),messages:[],onStarted:N.onStarted},said:ts.notOpened(a)})})(),()=>{e=!1}},[N?.id,N?.fromRuntime,D,T,E,he]);const Ht=N?.fromRuntime?ze?.given===N.id?ze.thread:void 0:N,ft=n.thread||Ht?.id||"",[An,Pn]=s.useState(void 0),[_s,Un]=s.useState(0);s.useEffect(()=>{if(!D||!T||!ft||L)return;let e=!0;return qe.described(ft).then(a=>e&&Pn(a),()=>e&&Pn(void 0)),()=>{e=!1}},[D,T,ft,L,_s,qe]);const[$n,Mn]=s.useState(Ls),[On,Ln]=s.useState(null),Dt=s.useRef(null),Wt=s.useRef(null),Fn=s.useRef(null),zn=s.useMemo(()=>({client:qe,say:e=>{Mn(e),Un(a=>a+1)},openThread:e=>{Fs({id:e,messages:[],fromRuntime:!0}),Un(a=>a+1)},download:(e,a,l)=>{const b=URL.createObjectURL(new Blob([a],{type:l})),h=document.createElement("a");h.href=b,h.download=e,h.click(),URL.revokeObjectURL(b)},choose:e=>new Promise(a=>{Dt.current=a,Ln(e)}),pickFile:e=>new Promise(a=>{const l=Fn.current;if(!l){a(void 0);return}Wt.current=a,l.accept=e,l.value="",l.click()})}),[qe]),Kt=s.useMemo(()=>$?Ha({agentId:R?.specId??E,instructions:ua(M,Ye?.instructions),model:ut||void 0,inference:hn,frontendTools:Je,subagents:j&&R?Xn(j.team,R.id):as(M),sharing:j?.sharing,onSubagentEvent:e=>Aa.getState().appendSubagentEvent(e),modeEffect:Ye?.modeEffect}):T!==void 0?{type:"ag-ui",endpoint:D?`${T}/api/v1/apps/agents/${encodeURIComponent(E)}/ag-ui/`:`${T}/api/v1/ag-ui/${E}/`,...D&&he?{authToken:he}:{},...D?{uiSocket:`${T.replace(/^http/,"ws")}/api/v1/apps/ui`,uiFiles:`${T}/api/v1/apps/agents/${encodeURIComponent(E)}/files`,appSessions:`${T}/api/v1/apps/sessions`,...ge?{ownRoutesOnly:!0}:{}}:{},agentId:E,configEndpoint:`${T}/api/v1/configure`,enableConfigQuery:!0}:void 0,[E,$,hn,R,Je,j,M,Ye,ut,T,D,he,ge]),pt=fa(!$,Kt?.type==="ag-ui"?Kt.configEndpoint:void 0,void 0,E),tt=pa(),mt=ma(E),[_n,Gt]=s.useState(void 0),[Ns,Bs]=s.useState(void 0);s.useEffect(()=>{if($||T===void 0)return;const e=ha(T,E,ge);if(!e){Gt([]);return}let a=!1;return fetch(e).then(l=>l.ok?l.json():null).then(l=>{a||(Gt(l?ga(l):[]),Bs(l?xa(l):void 0))}).catch(()=>{a||Gt([])}),()=>{a=!0}},[T,E,$,ge]);const Vs=s.useMemo(()=>ba(_n,()=>Object.values(va).filter(e=>e.available&&Sa(e)).map(e=>({id:e.id,name:e.name,provider:e.provider}))),[_n]),Nn=s.useMemo(()=>{const e=pt.data?.builtinTools??[],a=new Set(e.map(l=>l.name));return{runtime:e,frontend:Je.filter(l=>!a.has(l.name)).map(l=>({id:l.name,name:l.name}))}},[pt.data?.builtinTools,Je]),Bn=s.useMemo(()=>new Set((tt.data?.skills??[]).filter(e=>e.status==="enabled"||e.status==="loaded").map(e=>e.id)),[tt.data]),Hs=s.useCallback(async e=>{if(ge)throw new Error("A deployment’s chat does not switch its runtime’s model.");vn(e),!($||T===void 0)&&await fetch(`${T}/api/v1/configure/inference/provider`,{method:"PUT",headers:{"content-type":"application/json"},body:JSON.stringify({model:e})}).catch(()=>{})},[T,$,ge]),Vn=u?.promptPlacement==="bottom-chat",Ds=u?.promptPlacement==="floating",_e=u?.promptPlacement==="top",nt=u?.hidePrompt===!0||C.hidePrompt===!0,Ws={onSend:()=>{ie(_t)},input:_t,setInput:Xe,focusTrigger:Re||kn?(Re?.nonce??0)+kn:void 0,placement:Ds||Q==="floating"||Q==="floating-top"||Q==="floating-bottom"?"floating":"docked",floatingAnchor:Q==="floating-top"?"top":"bottom",isLoading:L,onStop:()=>n.viewControls.stop?.(),placeholder:xn??C.sendInstead?.says??ue,typingSuggestions:$t.map(e=>e.text),suggestions:ct,disableInputPrompt:Ze,connectionConfirmed:!Ze,interim:ws,padding:_e||Q==="floating-top"||Q==="floating-bottom"||Q==="docked-top"?2:3,promptVariant:"lexical",autoFocus:u?.autoFocusPrompt??!0,mentionableAgents:vs,promptCommands:bs,headerContent:Es.length>0?t.jsx(St,{slot:Ae.inpromptMenu,props:{workspace:n}}):void 0,footerExtras:Cn.length>0||et&&et.input!=="off"?t.jsxs(t.Fragment,{children:[Cn.length>0?t.jsx(St,{slot:Ae.promptAction,props:{workspace:n}}):null,et&&et.input!=="off"?t.jsx(ya,{voice:et,input:_t,setInput:Xe,disabled:Ze,speaking:Ue,onStopSpeaking:()=>i.current?.stopSpeaking?.(),playbackLevel:()=>i.current?.voiceLevel?.()??0,running:L,onStopRun:()=>(i.current?.interrupt??i.current?.stop)?.(),onInterrupted:()=>i.current?.markInterrupted(),onInterimChange:Cs,answers:!!(u?.voice?.output&&u.voice.output!=="off"&&u.voice.speechUrl),onSpoken:e=>{ke.current=e},send:(e,a)=>{ke.current=a,ie(e)}}):null]}):void 0,showAgentsMenu:!Y,showInlineAgentsMenu:!1,agents:As,selectedAgentId:ce,onSelectAgent:e=>j?.select(e),showTokenUsage:C.showTokenUsage??u?.showTokenUsage??!0,showContextRing:!0,agentUsage:Is??void 0,showModelSelector:!Y&&!ge,models:Vs,decisions:Ns,selectedModel:ut,onModelSelect:e=>{Hs(e)},showToolsMenu:!Y,availableTools:Nn.runtime,availableFrontendTools:Nn.frontend,mcpServers:pt.data?.mcpServers??[],mcpStatusData:C.mcpStatusData??void 0,showSkillsMenu:!Y,skills:tt.data?.skills??[],skillsLoading:tt.isLoading,enabledSkills:Bn,onToggleSkill:e=>Bn.has(e)?mt.disableSkill(e):mt.enableSkill(e),onToggleAllSkills:(e,a)=>e.forEach(l=>a?mt.enableSkill(l):mt.disableSkill(l)),codemodeEnabled:C.codemodeEnabled??!1,onToggleCodemode:C.onToggleCodemode,isA2AProtocol:!1,hasConfigData:!!pt.data,hasSkillsData:!!tt.data},Hn=yt[0]?.value.Component,Yt=wt[0]?.value.Component,Dn=!u?.hideHeader&&!!Yt,ht=Hn?t.jsx(Hn,{workspace:n,composer:Ws}):null,Wn=A.length>0&&u?.showSurfaceSelector!==!1?t.jsx(Si,{surfaces:A.map(e=>e.value),active:I?.surfaceId??lt?.surfaceId??de,onChange:re,workspace:n}):null,Kn=t.jsxs(t.Fragment,{children:[A.map(e=>{const a=e.value,l=I?.surfaceId===a.surfaceId;return l||it.current.has(a.surfaceId)||ot(a,n)?(it.current.add(a.surfaceId),t.jsx(g,{sx:l?{flex:"1 1 0",minWidth:0,minHeight:0}:{position:"absolute",inset:0,visibility:"hidden",pointerEvents:"none",zIndex:-1},children:t.jsx(wa,{load:a.load,props:{surfaceId:a.surfaceId,workspace:n},fallback:t.jsxs(tn,{children:["Loading ",a.title,"…"]}),errorFallback:h=>t.jsxs(tn,{children:[a.title," failed to load: ",h.message]})})},a.surfaceId)):null}),!I&&lt?t.jsx(g,{flex:"1 1 0",minWidth:0,minHeight:0,children:t.jsxs(tn,{children:["Starting ",lt.title,"…"]})}):null]}),Gn=t.jsx(t.Fragment,{children:t.jsxs(g,{flex:_e&&I?"0 0 34%":"1 1 0",maxWidth:_e&&I?460:void 0,minWidth:0,minHeight:0,display:"flex",flexDirection:"column",borderLeft:I?"1px solid":void 0,borderColor:"border.default",position:"relative",children:[C.errorBanner?t.jsx(g,{flexShrink:0,px:3,py:2,fontSize:1,borderBottom:"1px solid",bg:C.errorBanner.variant==="warning"?"attention.subtle":"danger.subtle",color:C.errorBanner.variant==="warning"?"attention.fg":"danger.fg",borderColor:C.errorBanner.variant==="warning"?"attention.muted":"danger.muted",children:C.errorBanner.message}):null,ze?.said&&ze.given===N?.id?t.jsx(z,{as:"p",role:"status",sx:{m:0,px:3,py:2,fontSize:1,color:"fg.muted"},children:ze.said}):null,$n?t.jsxs(g,{display:"flex",alignItems:"baseline",gap:2,px:3,py:2,fontSize:1,color:"fg.muted",role:"status","data-session-said":"",children:[t.jsx(z,{sx:{flex:1},children:$n}),t.jsx(q,{size:"small",variant:"invisible",onClick:()=>Mn(""),children:"Dismiss"})]}):null,On?t.jsx(fi,{question:On,onPick:e=>{Ln(null),Dt.current?.(e),Dt.current=null}}):null,t.jsx("input",{ref:Fn,type:"file",hidden:!0,"data-session-file":"",onChange:async e=>{const a=e.target.files?.[0],l=a?await a.text():void 0;Wt.current?.(l),Wt.current=null}}),t.jsx(g,{flex:"1 1 auto",minHeight:0,display:"flex",children:zs?t.jsx(z,{as:"p",role:"status",sx:{m:0,p:3,fontSize:1,color:"fg.muted"},children:ts.opening}):t.jsx(Ca,{themeVariant:u?.themeVariant,themeOverrides:u?.themeOverrides,colorMode:u?.colorMode,thread:Ht,voice:Os,disabled:Ze,disableReason:xn,protocol:Kt,frontendTools:$?void 0:xs,initialModel:ut||void 0,title:Y?.name??R?.name??M?.name??E,description:Y?.welcome??M?.description,brandIcon:Y?.face?t.jsx(mi,{face:Y.face,size:20,state:X}):t.jsx(Mt,{size:20}),headerContent:Y&&!zt?t.jsx(hi,{state:X}):void 0,emptyState:{icon:Y?.face?t.jsx("span",{"aria-hidden":!0,style:{fontSize:rs,lineHeight:1},children:t.jsx(hs,{face:Y.face,size:rs})}):t.jsx(Mt,{size:48}),title:Y?.name??R?.name??M?.name??E,...j&&R?{sections:[{group:j.team.name,icon:t.jsx(gs,{size:48}),title:j.team.name,subtitle:j.team.description},{group:R.name,icon:t.jsx(Mt,{size:32}),title:R.name,subtitle:M?.description}]}:null},suggestions:_e||be||u?.suggestionLabels===!1?[]:ct,showHeader:Dn,headerButtons:{showNewChat:u?.headerButtons?.newChat??!1,showClear:u?.headerButtons?.clear??!1},renderHeader:Yt?e=>t.jsx(Yt,{workspace:n,header:n.chatViewModes?{...e,chatViewMode:n.chatViewModes.value,onChatViewModeChange:n.chatViewModes.onChange,offeredViewModes:n.chatViewModes.offered}:e}):void 0,showInformation:!0,headerActions:t.jsxs(g,{display:"inline-flex",alignItems:"center",gap:2,children:[n.chatHeaderActions,D&&T?t.jsxs(t.Fragment,{children:[t.jsx(ci,{facts:An}),t.jsx(ui,{uid:ft||void 0,describe:e=>qe.described(e),context:zn})]}):null,jn.length>0?t.jsx(St,{slot:Ae.chatHeader,props:{workspace:n}}):null,t.jsx(us,{icon:G?ja:ka,"aria-label":G?"Exit full screen":"Enter full screen",variant:"invisible",size:"small",onClick:()=>{H(!1),m()},sx:V?{"@keyframes dla-fullscreen-hint":{"0%, 100%":{opacity:1},"50%":{opacity:.4}},"&&":{bg:`color-mix(in srgb, ${r.primary} 16%, transparent)`,boxShadow:`inset 0 0 0 1.5px ${r.primary}`,animation:`dla-fullscreen-hint ${vi}ms ease-in-out infinite`},"@media (prefers-reduced-motion: reduce)":{"&&":{animation:"none"}}}:void 0})]}),showInput:!1,onSendReady:K,notebookToolSurfacesId:I?void 0:n.surfaceId,showTurnFooter:C.showTokenUsage??u?.showTokenUsage??!0,onContextSnapshot:Et,onLoadingChange:He,renderMessageFooter:D&&T?(e,a)=>e.role==="user"?t.jsx(di,{facts:An,turn:a.turn,context:zn}):null:void 0,onSpeakingChange:Rt,onItemsChange:At,onDisplayItemsChange:It,enableStreaming:!0},Ht?.id)}),!Dn&&jn.length>0?t.jsx(g,{hidden:!0,children:t.jsx(St,{slot:Ae.chatHeader,props:{workspace:n}})}):null,Vn&&!nt?ht:null]})}),Yn=u?.suggestionLabels!==!1&&ct.length>0?t.jsx(g,{"aria-label":o.suggestedPrompts,display:"flex",flexWrap:"wrap",gap:2,px:2,pb:"6px",children:ct.map(e=>t.jsx(g,{as:"button",type:"button",title:e.message,disabled:L||Ze,onClick:()=>{ie(e.message)},appearance:"none",font:"inherit",fontSize:0,fontWeight:"semibold",lineHeight:1.25,px:"10px",py:"5px",width:ns,flex:`0 0 ${ns}px`,borderRadius:"999px",border:"1px solid",bg:"canvas.subtle",whiteSpace:"nowrap",sx:{borderColor:"border.default",color:"fg.default",cursor:"pointer","&:hover:not(:disabled)":{borderColor:"accent.fg",color:"accent.fg"},"&:disabled":{opacity:.5,cursor:"default"}},children:t.jsx(Ta,{title:e.title,maxWidth:"100%",sx:{minWidth:0},children:e.title})},e.title))}):null,Jn=f?t.jsx(g,{flex:"0 0 auto",px:3,py:2,borderTop:"1px solid",borderColor:"border.default",bg:"canvas.subtle",fontSize:1,maxHeight:"40%",overflowY:"auto",children:f}):null;return t.jsxs(g,{ref:Oe,sx:{height:"100%",minHeight:0,display:"flex",flexDirection:"column",position:"relative",...G?{bg:"canvas.default"}:null,...G&&!Ke.current?{position:"fixed",top:U,right:0,bottom:0,left:0,height:"auto",zIndex:1e3}:null},children:[be?t.jsx(be.Component,{workspace:n,editors:Kn,hasEditor:!!I,transcript:Gn,prompt:nt?null:ht,chips:nt?null:Yn,picker:Wn,transient:Jn}):t.jsxs(t.Fragment,{children:[_e&&!nt?t.jsxs(g,{flex:"0 0 auto",borderBottom:"1px solid",borderColor:"border.default",children:[ht,Yn]}):null,Wn,t.jsxs(g,{flex:"1 1 auto",minHeight:0,display:"flex",position:"relative",children:[Kn,Gn]}),Jn,Vn||nt||_e?null:ht]}),Ft?t.jsx(g,{position:"absolute",inset:0,zIndex:5,bg:"canvas.default",display:"flex",flexDirection:"column",minHeight:0,children:t.jsx(Ya,{agentName:R?.name??M?.name,sandboxStillRuns:$,temporary:gn,onSignedIn:()=>Ra.getState().clear()})}):null]})}function Si({surfaces:n,active:o,onChange:r,workspace:i}){const d=[...n].sort((p,v)=>(p.order??100)-(v.order??100));return t.jsxs(g,{flex:"0 0 auto",display:"flex",alignItems:"center",gap:2,px:3,py:2,borderBottom:"1px solid",borderColor:"border.default",children:[t.jsx(z,{sx:{fontSize:0,color:"fg.muted"},children:"Beside the chat"}),t.jsxs(Xt,{"aria-label":"Editor beside the chat",size:"small",children:[t.jsx(Xt.Button,{selected:o===de,onClick:()=>r(de),children:"Chat"}),d.map(p=>{const v=ot(p,i),c=v?void 0:p.unavailableReason?.(i)??"Not available right now";return t.jsx(Xt.Button,{selected:o===p.surfaceId,"aria-disabled":!v,title:c??p.title,leadingIcon:p.icon,onClick:()=>{v&&r(p.surfaceId)},children:p.title},p.surfaceId)})]})]})}function tn({children:n}){return t.jsx(g,{height:"100%",display:"flex",alignItems:"center",justifyContent:"center",color:"fg.muted",fontSize:1,px:3,textAlign:"center",children:n})}export{ki as default};
@@ -1 +1 @@
1
- import{r as x,j as e,B as n,T as s,$ as i}from"../datalayer-app-main.js";import j from"./index-BW_-m6b-.js";import"./index-BhCoJe__.js";function F({agentUsage:o,padding:y,showContextRing:T=!1}){const[k,h]=x.useState(!1),v=x.useRef(null),c=x.useRef(null),g=!!o.turnUsage,C=!!o.sessionUsage,w=!!o.costUsage&&(o.costUsage.cumulativeCostUsd>0||o.costUsage.lastTurnCostUsd>0),m=o.sessionUsage,p=o.turnUsage,b=o.costUsage,d=t=>t<.01?`$${t.toFixed(4)}`:t<1?`$${t.toFixed(3)}`:`$${t.toFixed(2)}`,f=o.totalTokens,u=o.contextWindow,S=Math.max(0,u-f),a=u>0?f/u*100:0,r=[];if(o.distribution?.children?.length){const t={"System Prompts":"#8250df","Tool Definitions":"#bf8700","User Messages":"#16A085","Assistant Messages":"#1a7f37","Tool Usage":"#cf222e"};for(const l of o.distribution.children)r.push({name:l.name,value:l.value,color:t[l.name]||"#6e7781"})}else{o.systemPromptTokens>0&&r.push({name:"System Prompts",value:o.systemPromptTokens,color:"#8250df"}),o.toolTokens>0&&r.push({name:"Tool Definitions",value:o.toolTokens,color:"#bf8700"});const t=(o.userMessageTokens||0)+(o.assistantMessageTokens||0);t>0&&r.push({name:"Messages",value:t,color:"#16A085"});const l=(o.toolCallTokens||0)+(o.toolReturnTokens||0);l>0&&r.push({name:"Tool Results",value:l,color:"#cf222e"})}const z=a>90?"#cf222e":a>70?"#bf8700":"#16A085",W="var(--bgColor-muted, #f6f8fa)",R="var(--borderColor-default, #d1d9e0)",M={animation:!1,series:[{type:"pie",radius:[0,"90%"],center:["50%","50%"],silent:!0,label:{show:!1},labelLine:{show:!1},data:[{value:f,itemStyle:{color:z}},{value:S,itemStyle:{color:W}}]}]},P={animation:!1,series:[{type:"pie",radius:["45%","80%"],center:["50%","50%"],silent:!0,label:{show:!1},labelLine:{show:!1},itemStyle:{borderColor:"var(--bgColor-default, #ffffff)",borderWidth:1},data:[...r.map(t=>({value:t.value,itemStyle:{color:t.color}})),{value:S,itemStyle:{color:R}}]}]};return e.jsxs(n,{display:"flex",alignItems:"center",justifyContent:"flex-start",gap:2,py:1,px:y,bg:"canvas.subtle",flexWrap:"nowrap",overflow:"visible",whiteSpace:"nowrap",minWidth:0,children:[T&&e.jsxs(n,{position:"relative",flexShrink:0,onMouseEnter:()=>{c.current&&clearTimeout(c.current),c.current=setTimeout(()=>h(!0),150)},onMouseLeave:()=>{c.current&&clearTimeout(c.current),c.current=setTimeout(()=>h(!1),250)},children:[e.jsx(n,{ref:v,cursor:"pointer",width:20,height:20,display:"flex",alignItems:"center",justifyContent:"center",border:"1px solid",borderColor:"border.default",borderRadius:"50%",children:e.jsx(j,{option:M,style:{width:18,height:18},opts:{renderer:"svg"}})}),k&&e.jsxs(n,{position:"absolute",bottom:"100%",left:0,mb:1,p:3,width:260,bg:"canvas.overlay",borderRadius:2,boxShadow:"shadow.large",border:"1px solid",borderColor:"border.default",zIndex:100,children:[e.jsx(s,{sx:{fontWeight:"bold",fontSize:1,color:"fg.default",display:"block",mb:2},children:"Context"}),e.jsxs(s,{sx:{fontSize:0,color:"fg.muted",display:"block",mb:1},children:[e.jsx(s,{as:"span",sx:{fontWeight:"semibold",color:"fg.default"},children:i(f)})," / ",i(u)," tokens"]}),o.costUsage&&e.jsxs(s,{sx:{fontSize:0,color:"fg.muted",display:"block",mb:2},children:["cost ",e.jsx(s,{as:"span",sx:{fontWeight:"semibold",color:"fg.default"},children:d(o.costUsage.lastTurnCostUsd)})," turn · ",e.jsx(s,{as:"span",sx:{fontWeight:"semibold",color:"fg.default"},children:d(o.costUsage.cumulativeCostUsd)})," total"]}),e.jsxs(s,{sx:{fontSize:0,color:a>90?"danger.fg":a>70?"attention.fg":"fg.muted",fontWeight:"semibold",display:"block",mb:2},children:["• ",a.toFixed(0),"%"]}),e.jsx(n,{display:"flex",justifyContent:"center",mb:2,children:e.jsx(j,{option:P,style:{width:80,height:80},opts:{renderer:"svg"}})}),e.jsx(n,{display:"flex",flexDirection:"column",gap:1,children:r.map(t=>{const l=f>0?t.value/f*100:0;return e.jsxs(n,{display:"flex",alignItems:"center",gap:2,children:[e.jsx(n,{width:8,height:8,borderRadius:"50%",bg:t.color,flexShrink:0}),e.jsx(s,{sx:{fontSize:0,color:"fg.muted",flex:1},children:t.name}),e.jsxs(s,{sx:{fontSize:0,color:"fg.default",fontWeight:"semibold"},children:[l.toFixed(1),"%"]})]},t.name)})}),a>70&&e.jsx(s,{sx:{fontSize:0,color:"attention.fg",display:"block",mt:2,fontStyle:"italic"},children:"Quality may decline as limit nears."})]})]}),e.jsxs(s,{sx:{fontSize:0,color:"fg.muted",flexShrink:0},children:[e.jsx(s,{as:"span",sx:{fontWeight:"semibold",color:"fg.default",fontSize:0},children:i(o.totalTokens)})," / ",i(o.contextWindow)," ctx"]}),w&&e.jsxs(s,{sx:{fontSize:0,color:"fg.muted",flexShrink:0},children:["· cost ",e.jsx(s,{as:"span",sx:{fontWeight:"semibold",color:"fg.default",fontSize:0},children:d(b?.lastTurnCostUsd??0)})," turn / ",e.jsx(s,{as:"span",sx:{fontWeight:"semibold",color:"fg.default",fontSize:0},children:d(b?.cumulativeCostUsd??0)})]}),C&&e.jsxs(s,{sx:{fontSize:0,color:"fg.muted",flexShrink:0},children:["· session ",i(m?.inputTokens??0),e.jsx(s,{as:"span",sx:{color:"success.fg",fontSize:0},children:"▲"})," ",i(m?.outputTokens??0),e.jsx(s,{as:"span",sx:{color:"attention.fg",fontSize:0},children:"▼"})]}),g&&e.jsxs(s,{sx:{fontSize:0,color:"fg.muted",flexShrink:0},children:["· turn ",i(p?.inputTokens??0),e.jsx(s,{as:"span",sx:{color:"success.fg",fontSize:0},children:"▲"})," ",i(p?.outputTokens??0),e.jsx(s,{as:"span",sx:{color:"attention.fg",fontSize:0},children:"▼"})]})]})}export{F as ContextPie};
1
+ import{r as x,j as e,B as n,T as s,$ as i}from"../datalayer-app-main.js";import j from"./index-JdNcf3Gc.js";import"./index-BhCoJe__.js";function F({agentUsage:o,padding:y,showContextRing:T=!1}){const[k,h]=x.useState(!1),v=x.useRef(null),c=x.useRef(null),g=!!o.turnUsage,C=!!o.sessionUsage,w=!!o.costUsage&&(o.costUsage.cumulativeCostUsd>0||o.costUsage.lastTurnCostUsd>0),m=o.sessionUsage,p=o.turnUsage,b=o.costUsage,d=t=>t<.01?`$${t.toFixed(4)}`:t<1?`$${t.toFixed(3)}`:`$${t.toFixed(2)}`,f=o.totalTokens,u=o.contextWindow,S=Math.max(0,u-f),a=u>0?f/u*100:0,r=[];if(o.distribution?.children?.length){const t={"System Prompts":"#8250df","Tool Definitions":"#bf8700","User Messages":"#16A085","Assistant Messages":"#1a7f37","Tool Usage":"#cf222e"};for(const l of o.distribution.children)r.push({name:l.name,value:l.value,color:t[l.name]||"#6e7781"})}else{o.systemPromptTokens>0&&r.push({name:"System Prompts",value:o.systemPromptTokens,color:"#8250df"}),o.toolTokens>0&&r.push({name:"Tool Definitions",value:o.toolTokens,color:"#bf8700"});const t=(o.userMessageTokens||0)+(o.assistantMessageTokens||0);t>0&&r.push({name:"Messages",value:t,color:"#16A085"});const l=(o.toolCallTokens||0)+(o.toolReturnTokens||0);l>0&&r.push({name:"Tool Results",value:l,color:"#cf222e"})}const z=a>90?"#cf222e":a>70?"#bf8700":"#16A085",W="var(--bgColor-muted, #f6f8fa)",R="var(--borderColor-default, #d1d9e0)",M={animation:!1,series:[{type:"pie",radius:[0,"90%"],center:["50%","50%"],silent:!0,label:{show:!1},labelLine:{show:!1},data:[{value:f,itemStyle:{color:z}},{value:S,itemStyle:{color:W}}]}]},P={animation:!1,series:[{type:"pie",radius:["45%","80%"],center:["50%","50%"],silent:!0,label:{show:!1},labelLine:{show:!1},itemStyle:{borderColor:"var(--bgColor-default, #ffffff)",borderWidth:1},data:[...r.map(t=>({value:t.value,itemStyle:{color:t.color}})),{value:S,itemStyle:{color:R}}]}]};return e.jsxs(n,{display:"flex",alignItems:"center",justifyContent:"flex-start",gap:2,py:1,px:y,bg:"canvas.subtle",flexWrap:"nowrap",overflow:"visible",whiteSpace:"nowrap",minWidth:0,children:[T&&e.jsxs(n,{position:"relative",flexShrink:0,onMouseEnter:()=>{c.current&&clearTimeout(c.current),c.current=setTimeout(()=>h(!0),150)},onMouseLeave:()=>{c.current&&clearTimeout(c.current),c.current=setTimeout(()=>h(!1),250)},children:[e.jsx(n,{ref:v,cursor:"pointer",width:20,height:20,display:"flex",alignItems:"center",justifyContent:"center",border:"1px solid",borderColor:"border.default",borderRadius:"50%",children:e.jsx(j,{option:M,style:{width:18,height:18},opts:{renderer:"svg"}})}),k&&e.jsxs(n,{position:"absolute",bottom:"100%",left:0,mb:1,p:3,width:260,bg:"canvas.overlay",borderRadius:2,boxShadow:"shadow.large",border:"1px solid",borderColor:"border.default",zIndex:100,children:[e.jsx(s,{sx:{fontWeight:"bold",fontSize:1,color:"fg.default",display:"block",mb:2},children:"Context"}),e.jsxs(s,{sx:{fontSize:0,color:"fg.muted",display:"block",mb:1},children:[e.jsx(s,{as:"span",sx:{fontWeight:"semibold",color:"fg.default"},children:i(f)})," / ",i(u)," tokens"]}),o.costUsage&&e.jsxs(s,{sx:{fontSize:0,color:"fg.muted",display:"block",mb:2},children:["cost ",e.jsx(s,{as:"span",sx:{fontWeight:"semibold",color:"fg.default"},children:d(o.costUsage.lastTurnCostUsd)})," turn · ",e.jsx(s,{as:"span",sx:{fontWeight:"semibold",color:"fg.default"},children:d(o.costUsage.cumulativeCostUsd)})," total"]}),e.jsxs(s,{sx:{fontSize:0,color:a>90?"danger.fg":a>70?"attention.fg":"fg.muted",fontWeight:"semibold",display:"block",mb:2},children:["• ",a.toFixed(0),"%"]}),e.jsx(n,{display:"flex",justifyContent:"center",mb:2,children:e.jsx(j,{option:P,style:{width:80,height:80},opts:{renderer:"svg"}})}),e.jsx(n,{display:"flex",flexDirection:"column",gap:1,children:r.map(t=>{const l=f>0?t.value/f*100:0;return e.jsxs(n,{display:"flex",alignItems:"center",gap:2,children:[e.jsx(n,{width:8,height:8,borderRadius:"50%",bg:t.color,flexShrink:0}),e.jsx(s,{sx:{fontSize:0,color:"fg.muted",flex:1},children:t.name}),e.jsxs(s,{sx:{fontSize:0,color:"fg.default",fontWeight:"semibold"},children:[l.toFixed(1),"%"]})]},t.name)})}),a>70&&e.jsx(s,{sx:{fontSize:0,color:"attention.fg",display:"block",mt:2,fontStyle:"italic"},children:"Quality may decline as limit nears."})]})]}),e.jsxs(s,{sx:{fontSize:0,color:"fg.muted",flexShrink:0},children:[e.jsx(s,{as:"span",sx:{fontWeight:"semibold",color:"fg.default",fontSize:0},children:i(o.totalTokens)})," / ",i(o.contextWindow)," ctx"]}),w&&e.jsxs(s,{sx:{fontSize:0,color:"fg.muted",flexShrink:0},children:["· cost ",e.jsx(s,{as:"span",sx:{fontWeight:"semibold",color:"fg.default",fontSize:0},children:d(b?.lastTurnCostUsd??0)})," turn / ",e.jsx(s,{as:"span",sx:{fontWeight:"semibold",color:"fg.default",fontSize:0},children:d(b?.cumulativeCostUsd??0)})]}),C&&e.jsxs(s,{sx:{fontSize:0,color:"fg.muted",flexShrink:0},children:["· session ",i(m?.inputTokens??0),e.jsx(s,{as:"span",sx:{color:"success.fg",fontSize:0},children:"▲"})," ",i(m?.outputTokens??0),e.jsx(s,{as:"span",sx:{color:"attention.fg",fontSize:0},children:"▼"})]}),g&&e.jsxs(s,{sx:{fontSize:0,color:"fg.muted",flexShrink:0},children:["· turn ",i(p?.inputTokens??0),e.jsx(s,{as:"span",sx:{color:"success.fg",fontSize:0},children:"▲"})," ",i(p?.outputTokens??0),e.jsx(s,{as:"span",sx:{color:"attention.fg",fontSize:0},children:"▼"})]})]})}export{F as ContextPie};