@datalayer/agent-runtimes 1.6.98 → 1.6.99

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 (357) hide show
  1. package/dist-embed/chunks/{AgentDetails-CqMfY8zN.js → AgentDetails-Dc-zAfsd.js} +1 -1
  2. package/dist-embed/chunks/{AgentDetailsDialog-lxnKA_dF.js → AgentDetailsDialog-D2ezFFlA.js} +1 -1
  3. package/dist-embed/chunks/{CellSidebarExtension-CrdbRLaE.js → CellSidebarExtension-umk7yQhN.js} +1 -1
  4. package/dist-embed/chunks/ChatView-BDvwDtXF.js +32 -0
  5. package/dist-embed/chunks/{CollapsiblePlugin-CnG1qA1e.js → CollapsiblePlugin-7P9eK3oU.js} +1 -1
  6. package/dist-embed/chunks/{ContextPie-DAZz2yzl.js → ContextPie-DaHEeHxd.js} +1 -1
  7. package/dist-embed/chunks/{DeckComponent-qAMqKLzs.js → DeckComponent-DQ2W1Fj7.js} +1 -1
  8. package/dist-embed/chunks/{DeckRenderer-DQmjQ_vE.js → DeckRenderer-BdATImsV.js} +2 -2
  9. package/dist-embed/chunks/{DeckStage-LDi6nZOg.js → DeckStage-BaIwK7uO.js} +2 -2
  10. package/dist-embed/chunks/{DiagramView-CpCoC99y.js → DiagramView-CUf_ij9A.js} +1 -1
  11. package/dist-embed/chunks/{DocumentView-B-lWAJgm.js → DocumentView-BXE42g3H.js} +1 -1
  12. package/dist-embed/chunks/{DrawingStage-DEeTWKLT.js → DrawingStage-B9AOjEPj.js} +1 -1
  13. package/dist-embed/chunks/{EphemeralDocument-CZNRDs_b.js → EphemeralDocument-BlvZagtH.js} +1 -1
  14. package/dist-embed/chunks/{EphemeralNotebook-BDutT9GQ.js → EphemeralNotebook-gz0sG8Hk.js} +1 -1
  15. package/dist-embed/chunks/{ExcalidrawComponent-CmJy7bb4.js → ExcalidrawComponent-Bc1UIgcH.js} +1 -1
  16. package/dist-embed/chunks/{ExcalidrawModal-D_DmAro7.js → ExcalidrawModal-Cp4Da2nV.js} +1 -1
  17. package/dist-embed/chunks/{FormulaBar-f9U7lupQ.js → FormulaBar-BUs-n7Zc.js} +1 -1
  18. package/dist-embed/chunks/{JupyterLexicalExtension-DpGAnn7v.js → JupyterLexicalExtension-Be8mweC6.js} +9 -9
  19. package/dist-embed/chunks/{KernelVariables-BIWju6rZ.js → KernelVariables-xXzfdk5t.js} +1 -1
  20. package/dist-embed/chunks/{LexicalToolRegistry-BqxU1w4N.js → LexicalToolRegistry-DI_iHg04.js} +1 -1
  21. package/dist-embed/chunks/{NotebookToolSurfaces-CqU9CVCl.js → NotebookToolSurfaces-BmBGWX9x.js} +1 -1
  22. package/dist-embed/chunks/{NotebookView-CpOBHIut.js → NotebookView-D4hr5dD7.js} +1 -1
  23. package/dist-embed/chunks/{Output-DLpf2Of9.js → Output-WQnm0VN5.js} +6 -6
  24. package/dist-embed/chunks/{SandboxDetailsDialog-yUjpxBdw.js → SandboxDetailsDialog-DujTXXdD.js} +1 -1
  25. package/dist-embed/chunks/SchemaForm-CL6wJsI5.js +1 -0
  26. package/dist-embed/chunks/{SheetStage-gUVhALxR.js → SheetStage-BCq1DaET.js} +1 -1
  27. package/dist-embed/chunks/{SheetTabs-sx_-jWyq.js → SheetTabs-BZP7_RGB.js} +1 -1
  28. package/dist-embed/chunks/SignInIcon-D1-wo8qx.js +1 -0
  29. package/dist-embed/chunks/{SpreadsheetPreviewView-C9LaI5mp.js → SpreadsheetPreviewView-D_LLvpPF.js} +1 -1
  30. package/dist-embed/chunks/{SpreadsheetView-FfnOGHeU.js → SpreadsheetView-BT4Rr56c.js} +1 -1
  31. package/dist-embed/chunks/{WidgetVariableView-CKcw-pPX.js → WidgetVariableView-DAz5YxtA.js} +1 -1
  32. package/dist-embed/chunks/{YouTubePlugin-DUDVTb3B.js → YouTubePlugin-DgTStKvk.js} +1 -1
  33. package/dist-embed/chunks/{abnfDiagram-VCTEODGH-BM2pAacI.js → abnfDiagram-VCTEODGH-B5LqqmCZ.js} +1 -1
  34. package/dist-embed/chunks/{abnfDiagram-VCTEODGH-B0MQRzNo.js → abnfDiagram-VCTEODGH-BsJXEg6b.js} +1 -1
  35. package/dist-embed/chunks/{abnfDiagram-VCTEODGH-fcR8gNdJ.js → abnfDiagram-VCTEODGH-DP066SC3.js} +1 -1
  36. package/dist-embed/chunks/{ar-SA-G6X2FPQ2-BfVZMCow.js → ar-SA-G6X2FPQ2-DwPbQVyE.js} +1 -1
  37. package/dist-embed/chunks/{architectureDiagram-5GKGNRK7-CnP0s6uJ.js → architectureDiagram-5GKGNRK7-C7914IyO.js} +1 -1
  38. package/dist-embed/chunks/{architectureDiagram-5GKGNRK7-GZ5981UE.js → architectureDiagram-5GKGNRK7-CAe4xseh.js} +1 -1
  39. package/dist-embed/chunks/{architectureDiagram-5GKGNRK7-Cpu0tfD1.js → architectureDiagram-5GKGNRK7-O1s7O7KE.js} +1 -1
  40. package/dist-embed/chunks/{az-AZ-76LH7QW2-BeD9jzcd.js → az-AZ-76LH7QW2-CnpysEBO.js} +1 -1
  41. package/dist-embed/chunks/{bg-BG-XCXSNQG7-VUraF-a0.js → bg-BG-XCXSNQG7-DJUiP_6F.js} +1 -1
  42. package/dist-embed/chunks/{blockDiagram-868be97b-BK7odeOZ.js → blockDiagram-868be97b-DNJtOmrO.js} +1 -1
  43. package/dist-embed/chunks/{blockDiagram-I7D4REHJ-BMQSOcOL.js → blockDiagram-I7D4REHJ-BDRQoIKI.js} +1 -1
  44. package/dist-embed/chunks/{blockDiagram-I7D4REHJ-CZlh2u1A.js → blockDiagram-I7D4REHJ-BO6TccV1.js} +1 -1
  45. package/dist-embed/chunks/{blockDiagram-I7D4REHJ-DiBWN476.js → blockDiagram-I7D4REHJ-BWNVQ7Gz.js} +1 -1
  46. package/dist-embed/chunks/{bn-BD-2XOGV67Q-DjghL9Ba.js → bn-BD-2XOGV67Q-VQD-Kmco.js} +1 -1
  47. package/dist-embed/chunks/{c4Diagram-3f4bdde3-CMf0cOcM.js → c4Diagram-3f4bdde3-Cj02FLSR.js} +1 -1
  48. package/dist-embed/chunks/{c4Diagram-7LVT6UL2-plU3oizm.js → c4Diagram-7LVT6UL2-BPMcidFW.js} +1 -1
  49. package/dist-embed/chunks/{c4Diagram-7LVT6UL2-BYPUXI1P.js → c4Diagram-7LVT6UL2-CoSh2wjn.js} +1 -1
  50. package/dist-embed/chunks/{c4Diagram-7LVT6UL2-qmYneJtb.js → c4Diagram-7LVT6UL2-yq3lLpw3.js} +1 -1
  51. package/dist-embed/chunks/{ca-ES-6MX7JW3Y-J6FuV-ut.js → ca-ES-6MX7JW3Y-W4esLUmK.js} +1 -1
  52. package/dist-embed/chunks/{celltoolbartracker-0MFBHjtq.js → celltoolbartracker-CxRPC2_P.js} +1 -1
  53. package/dist-embed/chunks/{chunk-2Q5K7J3B-B5DIEbuU.js → chunk-2Q5K7J3B-BM6msVjQ.js} +1 -1
  54. package/dist-embed/chunks/{chunk-2Q5K7J3B-Cj3jAIkT.js → chunk-2Q5K7J3B-ClmjTuJ8.js} +1 -1
  55. package/dist-embed/chunks/{chunk-2Q5K7J3B-BfCPaxeK.js → chunk-2Q5K7J3B-Q4yuTBzL.js} +1 -1
  56. package/dist-embed/chunks/{chunk-5VM5RSS4-DYeTGvz7.js → chunk-5VM5RSS4-BcDuf73d.js} +1 -1
  57. package/dist-embed/chunks/{chunk-5VM5RSS4-g3id5Hpo.js → chunk-5VM5RSS4-daB-wV3g.js} +1 -1
  58. package/dist-embed/chunks/{chunk-5VM5RSS4-BZGDG9GF.js → chunk-5VM5RSS4-g3qUjK0w.js} +1 -1
  59. package/dist-embed/chunks/{chunk-F27PBJKO-DvclqQhV.js → chunk-F27PBJKO-BVFLgw2h.js} +1 -1
  60. package/dist-embed/chunks/{chunk-F27PBJKO-kACIRR-8.js → chunk-F27PBJKO-Bh4vuDL9.js} +1 -1
  61. package/dist-embed/chunks/{chunk-F27PBJKO-S3msebgW.js → chunk-F27PBJKO-CeF8R-xY.js} +1 -1
  62. package/dist-embed/chunks/{chunk-IMKFNOWR-DjIARM3y.js → chunk-IMKFNOWR-D0xfV4fA.js} +1 -1
  63. package/dist-embed/chunks/{chunk-IMKFNOWR-SiS0o9FR.js → chunk-IMKFNOWR-DihmSer8.js} +1 -1
  64. package/dist-embed/chunks/{chunk-IMKFNOWR-Ch7v5XHt.js → chunk-IMKFNOWR-JVdSvsGK.js} +1 -1
  65. package/dist-embed/chunks/{chunk-JWPE2WC7-BwLKeh91.js → chunk-JWPE2WC7-B9R3G9XV.js} +1 -1
  66. package/dist-embed/chunks/{chunk-JWPE2WC7-CVacxpin.js → chunk-JWPE2WC7-R5kOKFCi.js} +1 -1
  67. package/dist-embed/chunks/{chunk-JWPE2WC7-M6oulZhu.js → chunk-JWPE2WC7-xLeWlifS.js} +1 -1
  68. package/dist-embed/chunks/{chunk-POPQ4Y6H-DacAiEUG.js → chunk-POPQ4Y6H-BDTkHmFN.js} +1 -1
  69. package/dist-embed/chunks/{chunk-POPQ4Y6H-BCHaCocF.js → chunk-POPQ4Y6H-BWThom3B.js} +1 -1
  70. package/dist-embed/chunks/{chunk-POPQ4Y6H-DicNgh7k.js → chunk-POPQ4Y6H-DH11l_UL.js} +1 -1
  71. package/dist-embed/chunks/{chunk-SVP7TREG-COLBrDOd.js → chunk-SVP7TREG-B5krxfJG.js} +1 -1
  72. package/dist-embed/chunks/{chunk-SVP7TREG-Cit7UeF2.js → chunk-SVP7TREG-BIf35xVD.js} +1 -1
  73. package/dist-embed/chunks/{chunk-SVP7TREG-3X_ReA6d.js → chunk-SVP7TREG-gPNw7vXg.js} +1 -1
  74. package/dist-embed/chunks/{chunk-TICWLB2K-DfGZ1S46.js → chunk-TICWLB2K-BhQI0S0U.js} +1 -1
  75. package/dist-embed/chunks/{chunk-TICWLB2K-C4D-h9t1.js → chunk-TICWLB2K-BnmW9-rq.js} +1 -1
  76. package/dist-embed/chunks/{chunk-TICWLB2K-TaUeWpZb.js → chunk-TICWLB2K-ZniMXeAW.js} +1 -1
  77. package/dist-embed/chunks/{chunk-XXDRQBXY-Bo_XDdf-.js → chunk-XXDRQBXY-B0pMdS4i.js} +1 -1
  78. package/dist-embed/chunks/{chunk-XXDRQBXY-Bz5lFaJG.js → chunk-XXDRQBXY-CGxfHk6Z.js} +1 -1
  79. package/dist-embed/chunks/{chunk-XXDRQBXY-B6fuzLc9.js → chunk-XXDRQBXY-CTBVYOwD.js} +1 -1
  80. package/dist-embed/chunks/{classDiagram-ZZMXUADV-DDZ5U8jk.js → classDiagram-ZZMXUADV-BVgpaw2k.js} +1 -1
  81. package/dist-embed/chunks/{classDiagram-ZZMXUADV-orzU8a0Z.js → classDiagram-ZZMXUADV-DZ_oaj8W.js} +1 -1
  82. package/dist-embed/chunks/{classDiagram-ZZMXUADV-DpQTfwXC.js → classDiagram-ZZMXUADV-Pn2VInwp.js} +1 -1
  83. package/dist-embed/chunks/{classDiagram-f62afe4f-CNI3U8Mt.js → classDiagram-f62afe4f-CbG4T64Y.js} +1 -1
  84. package/dist-embed/chunks/{classDiagram-v2-604399ef-CLQHn0oB.js → classDiagram-v2-604399ef-BY9qCJgc.js} +1 -1
  85. package/dist-embed/chunks/{classDiagram-v2-VYDZK3BY-DDZ5U8jk.js → classDiagram-v2-VYDZK3BY-BVgpaw2k.js} +1 -1
  86. package/dist-embed/chunks/{classDiagram-v2-VYDZK3BY-orzU8a0Z.js → classDiagram-v2-VYDZK3BY-DZ_oaj8W.js} +1 -1
  87. package/dist-embed/chunks/{classDiagram-v2-VYDZK3BY-DpQTfwXC.js → classDiagram-v2-VYDZK3BY-Pn2VInwp.js} +1 -1
  88. package/dist-embed/chunks/{code-block-IT6T5CEO-DjmCcA6a.js → code-block-IT6T5CEO-BH-xK8dt.js} +1 -1
  89. package/dist-embed/chunks/{component-B62XEB_I.js → component-CHAmQtQO.js} +1 -1
  90. package/dist-embed/chunks/{core-CsMGn5rr.js → core-B-25xtEy.js} +1 -1
  91. package/dist-embed/chunks/{cose-bilkent-JH36ORCC-B_IELYPJ.js → cose-bilkent-JH36ORCC--dQRyne0.js} +1 -1
  92. package/dist-embed/chunks/{cose-bilkent-JH36ORCC-CE9lt3OO.js → cose-bilkent-JH36ORCC-CCswhHys.js} +1 -1
  93. package/dist-embed/chunks/{cose-bilkent-JH36ORCC-CJiHk5L4.js → cose-bilkent-JH36ORCC-CzSbL0t-.js} +1 -1
  94. package/dist-embed/chunks/{createText-aed3d8b3-DTAS6DfQ.js → createText-aed3d8b3-C0l5-4ze.js} +1 -1
  95. package/dist-embed/chunks/{cs-CZ-2BRQDIVT-BJRVSuxc.js → cs-CZ-2BRQDIVT-BRaMX0Yn.js} +1 -1
  96. package/dist-embed/chunks/{cynefinDiagram-5FMLGOSQ-CyHkNAUC.js → cynefinDiagram-5FMLGOSQ-CCuKYj0g.js} +1 -1
  97. package/dist-embed/chunks/{cynefinDiagram-5FMLGOSQ-B2073FgP.js → cynefinDiagram-5FMLGOSQ-Dv0bdW3s.js} +1 -1
  98. package/dist-embed/chunks/{cynefinDiagram-5FMLGOSQ-HsJLw9Ow.js → cynefinDiagram-5FMLGOSQ-ULiO5ngX.js} +1 -1
  99. package/dist-embed/chunks/{da-DK-5WZEPLOC-DmvpQmCz.js → da-DK-5WZEPLOC-CHJSd-hL.js} +1 -1
  100. package/dist-embed/chunks/{dagre-GXQ25YYZ-DzmuuJ_r.js → dagre-GXQ25YYZ-BiEdL9_Y.js} +1 -1
  101. package/dist-embed/chunks/{dagre-GXQ25YYZ-R_lzFrVl.js → dagre-GXQ25YYZ-CQKZfFLy.js} +1 -1
  102. package/dist-embed/chunks/{dagre-GXQ25YYZ-BkxHUUfX.js → dagre-GXQ25YYZ-CbxhqH-l.js} +1 -1
  103. package/dist-embed/chunks/{de-DE-XR44H4JA-aRPZsjh8.js → de-DE-XR44H4JA-CtNUHnP5.js} +1 -1
  104. package/dist-embed/chunks/{diagram-S7CK7UJ4-1KpTTJPB.js → diagram-S7CK7UJ4-4cZ1l0Md.js} +1 -1
  105. package/dist-embed/chunks/{diagram-S7CK7UJ4-BANHWGqU.js → diagram-S7CK7UJ4-BbDaT9be.js} +1 -1
  106. package/dist-embed/chunks/{diagram-S7CK7UJ4-DsEYZOqE.js → diagram-S7CK7UJ4-C_K2XQ68.js} +1 -1
  107. package/dist-embed/chunks/{diagram-UQ7AKVKN-BadWwEqS.js → diagram-UQ7AKVKN-BQGMd5WO.js} +1 -1
  108. package/dist-embed/chunks/{diagram-UQ7AKVKN-B-SbMZjY.js → diagram-UQ7AKVKN-DHkyqRGv.js} +1 -1
  109. package/dist-embed/chunks/{diagram-UQ7AKVKN-E5q5_JWL.js → diagram-UQ7AKVKN-NwCsVCGT.js} +1 -1
  110. package/dist-embed/chunks/{diagram-VSXAHHWV-D_7x_Ody.js → diagram-VSXAHHWV-BOaVUYmv.js} +1 -1
  111. package/dist-embed/chunks/{diagram-VSXAHHWV-BsdL7E17.js → diagram-VSXAHHWV-BRZfKN3x.js} +1 -1
  112. package/dist-embed/chunks/{diagram-VSXAHHWV-B-ZTas3h.js → diagram-VSXAHHWV-C5Iv2HbC.js} +1 -1
  113. package/dist-embed/chunks/{diagram-VX7I27RA-BGyPrgPC.js → diagram-VX7I27RA-BRnBP8ma.js} +1 -1
  114. package/dist-embed/chunks/{diagram-VX7I27RA-C_1S9aIm.js → diagram-VX7I27RA-BYCgrvUs.js} +1 -1
  115. package/dist-embed/chunks/{diagram-VX7I27RA-CNSwTKHP.js → diagram-VX7I27RA-CRBBlvv5.js} +1 -1
  116. package/dist-embed/chunks/{diagram-Z3DM3KII-B5t8N8ZT.js → diagram-Z3DM3KII-B3LW49_k.js} +1 -1
  117. package/dist-embed/chunks/{diagram-Z3DM3KII-C2gtrmQ9.js → diagram-Z3DM3KII-CiCUrtKW.js} +1 -1
  118. package/dist-embed/chunks/{diagram-Z3DM3KII-yVDxeysg.js → diagram-Z3DM3KII-CsjIQRhO.js} +1 -1
  119. package/dist-embed/chunks/dist-BwO-MYZO.js +1 -0
  120. package/dist-embed/chunks/{ebnfDiagram-PWID7BFC-C7dUKFPT.js → ebnfDiagram-PWID7BFC-BaIi5Hrd.js} +1 -1
  121. package/dist-embed/chunks/{ebnfDiagram-PWID7BFC-LCa7gn5F.js → ebnfDiagram-PWID7BFC-CCJeM8Fw.js} +1 -1
  122. package/dist-embed/chunks/{ebnfDiagram-PWID7BFC-BgfF1EZn.js → ebnfDiagram-PWID7BFC-CopkaDiT.js} +1 -1
  123. package/dist-embed/chunks/{edges-b2856ca0-J2ON9YC7.js → edges-b2856ca0-C1lOjQnE.js} +1 -1
  124. package/dist-embed/chunks/{el-GR-BZB4AONW-BBpO4fOL.js → el-GR-BZB4AONW-BdA68ZvY.js} +1 -1
  125. package/dist-embed/chunks/{erDiagram-5d81789a-BM5rHLzM.js → erDiagram-5d81789a-Dj3mpdgC.js} +1 -1
  126. package/dist-embed/chunks/{erDiagram-RLTQ6QDP-CX1vL7D6.js → erDiagram-RLTQ6QDP-BB3sojlA.js} +1 -1
  127. package/dist-embed/chunks/{erDiagram-RLTQ6QDP-C35O3IA_.js → erDiagram-RLTQ6QDP-BtFCDuhD.js} +1 -1
  128. package/dist-embed/chunks/{erDiagram-RLTQ6QDP-BguBlD55.js → erDiagram-RLTQ6QDP-CWSWn-p1.js} +1 -1
  129. package/dist-embed/chunks/{es-ES-U4NZUMDT-CyrQHwAL.js → es-ES-U4NZUMDT-O5foFWNy.js} +1 -1
  130. package/dist-embed/chunks/{esm-BaC41XaP.js → esm-Bx0lRTDo.js} +1 -1
  131. package/dist-embed/chunks/{esm-DNtiNaWu.js → esm-Som5GXlh.js} +1 -1
  132. package/dist-embed/chunks/{eu-ES-A7QVB2H4-BJG9zHud.js → eu-ES-A7QVB2H4-DF43uSd5.js} +1 -1
  133. package/dist-embed/chunks/{fa-IR-HGAKTJCU-BOnLqEaQ.js → fa-IR-HGAKTJCU-CodiokGb.js} +1 -1
  134. package/dist-embed/chunks/{fi-FI-Z5N7JZ37-DdQTDw9O.js → fi-FI-Z5N7JZ37-C5RZVPNW.js} +1 -1
  135. package/dist-embed/chunks/{flowDb-185abca5-CLfj2Qv7.js → flowDb-185abca5-C-wCaq68.js} +1 -1
  136. package/dist-embed/chunks/{flowDiagram-1629c991-DjfIfqQ2.js → flowDiagram-1629c991-B0BqMZGm.js} +1 -1
  137. package/dist-embed/chunks/{flowDiagram-HODETNUW-DEVM2ZrI.js → flowDiagram-HODETNUW-l4GLkuOH.js} +1 -1
  138. package/dist-embed/chunks/{flowDiagram-HODETNUW-Cuv1YfzK.js → flowDiagram-HODETNUW-ncSEoBU5.js} +1 -1
  139. package/dist-embed/chunks/{flowDiagram-HODETNUW-CmpkqsRJ.js → flowDiagram-HODETNUW-uoDrwD7v.js} +1 -1
  140. package/dist-embed/chunks/{flowDiagram-v2-1d953310-4wSPcojK.js → flowDiagram-v2-1d953310-CbX1zFAU.js} +1 -1
  141. package/dist-embed/chunks/{flowchart-elk-definition-6df44142-Cb0xBerO.js → flowchart-elk-definition-6df44142-NO6Qs2xn.js} +1 -1
  142. package/dist-embed/chunks/{fr-FR-RHASNOE6-DQXpQs87.js → fr-FR-RHASNOE6-BecaN4ln.js} +1 -1
  143. package/dist-embed/chunks/{ganttDiagram-3b0b3873-DI6DrFsY.js → ganttDiagram-3b0b3873-DJda4k6s.js} +1 -1
  144. package/dist-embed/chunks/{ganttDiagram-EL5Y4UJY-DdKCj2ex.js → ganttDiagram-EL5Y4UJY-BNMzBAYm.js} +1 -1
  145. package/dist-embed/chunks/{ganttDiagram-EL5Y4UJY-CSmChevD.js → ganttDiagram-EL5Y4UJY-CyZOoQUx.js} +1 -1
  146. package/dist-embed/chunks/{ganttDiagram-EL5Y4UJY-drl1C7t5.js → ganttDiagram-EL5Y4UJY-D0pMMDIC.js} +1 -1
  147. package/dist-embed/chunks/{gitGraphDiagram-WWUBYQGX-gYDVDk5C.js → gitGraphDiagram-WWUBYQGX-BbxTXier.js} +1 -1
  148. package/dist-embed/chunks/{gitGraphDiagram-WWUBYQGX-PLhOfVTI.js → gitGraphDiagram-WWUBYQGX-DtiOT-6M.js} +1 -1
  149. package/dist-embed/chunks/{gitGraphDiagram-WWUBYQGX-Dna0JScG.js → gitGraphDiagram-WWUBYQGX-pM-0eEXc.js} +1 -1
  150. package/dist-embed/chunks/{gitGraphDiagram-f01e8bc2-BmE4UKm_.js → gitGraphDiagram-f01e8bc2-BY4Avza4.js} +1 -1
  151. package/dist-embed/chunks/{gl-ES-HMX3MZ6V-DzfCce3N.js → gl-ES-HMX3MZ6V-v7rlIuX_.js} +1 -1
  152. package/dist-embed/chunks/{he-IL-6SHJWFNN-DRlcBbb7.js → he-IL-6SHJWFNN-CPDVuLW6.js} +1 -1
  153. package/dist-embed/chunks/{hi-IN-IWLTKZ5I-BrerMuM3.js → hi-IN-IWLTKZ5I-cv7JPHhI.js} +1 -1
  154. package/dist-embed/chunks/{hu-HU-A5ZG7DT2-DFTsPGh6.js → hu-HU-A5ZG7DT2-sIqhErzy.js} +1 -1
  155. package/dist-embed/chunks/{id-ID-SAP4L64H-D0pKFdUL.js → id-ID-SAP4L64H-Bih05s5Z.js} +1 -1
  156. package/dist-embed/chunks/{index-9bae90f3-Cc18qrXw.js → index-9bae90f3-B-h6Bmpj.js} +1 -1
  157. package/dist-embed/chunks/{index-46VEGuyz.js → index-B5fl-cx7.js} +2 -2
  158. package/dist-embed/chunks/{index-BQEWUnIX.js → index-B9DnJYjS.js} +1 -1
  159. package/dist-embed/chunks/{index-BzdaTJ02.js → index-BEkzae0W.js} +4 -4
  160. package/dist-embed/chunks/{index-B5W7CVUY.js → index-DE0JwlLw.js} +1 -1
  161. package/dist-embed/chunks/{index-BXY2kJ1z.js → index-Dm-b78og.js} +1 -1
  162. package/dist-embed/chunks/{index-CBWGYoQM.js → index-Dqc2hT2k.js} +1 -1
  163. package/dist-embed/chunks/{index-C-4crJTg.js → index-dBBA442C.js} +4 -4
  164. package/dist-embed/chunks/{index-h8lXpqtD.js → index-npitmnIA.js} +1 -1
  165. package/dist-embed/chunks/{index-CET7bv5d.js → index-qZXZK5qd.js} +1 -1
  166. package/dist-embed/chunks/index.esm-9neflYIr.js +1 -0
  167. package/dist-embed/chunks/{index.esm-fF--io5D.js → index.esm-shCygvgu.js} +1 -1
  168. package/dist-embed/chunks/{infoDiagram-27XIBGKW-DlOi-VkF.js → infoDiagram-27XIBGKW-BQ_FpbVx.js} +1 -1
  169. package/dist-embed/chunks/{infoDiagram-27XIBGKW-BZLQcxTA.js → infoDiagram-27XIBGKW-BekHLcSS.js} +1 -1
  170. package/dist-embed/chunks/{infoDiagram-27XIBGKW-Ir7z7vae.js → infoDiagram-27XIBGKW-CHWrtYbt.js} +1 -1
  171. package/dist-embed/chunks/{infoDiagram-a29d40f1-B_50LXsh.js → infoDiagram-a29d40f1-rAu-MoIO.js} +1 -1
  172. package/dist-embed/chunks/{ishikawaDiagram-5VMMS53U-CmchLGEY.js → ishikawaDiagram-5VMMS53U-Cmb7AWZG.js} +1 -1
  173. package/dist-embed/chunks/{ishikawaDiagram-5VMMS53U-CUxqPwbA.js → ishikawaDiagram-5VMMS53U-Cn4-zUna.js} +1 -1
  174. package/dist-embed/chunks/{ishikawaDiagram-5VMMS53U-Erx01g7S.js → ishikawaDiagram-5VMMS53U-Uk09zgQy.js} +1 -1
  175. package/dist-embed/chunks/{it-IT-JPQ66NNP-CbZLqWAE.js → it-IT-JPQ66NNP-C7yi7ISV.js} +1 -1
  176. package/dist-embed/chunks/{ja-JP-DBVTYXUO-9xZnJjLg.js → ja-JP-DBVTYXUO-DfPIxAGi.js} +1 -1
  177. package/dist-embed/chunks/{journeyDiagram-3NMN7TZE-BRe0KiaN.js → journeyDiagram-3NMN7TZE-BuYQDwkV.js} +1 -1
  178. package/dist-embed/chunks/{journeyDiagram-3NMN7TZE-C9s2og1s.js → journeyDiagram-3NMN7TZE-D86e9Y03.js} +1 -1
  179. package/dist-embed/chunks/{journeyDiagram-3NMN7TZE-B6PqY62p.js → journeyDiagram-3NMN7TZE-DlZ7DnFk.js} +1 -1
  180. package/dist-embed/chunks/{journeyDiagram-95396277-BsoN0fKG.js → journeyDiagram-95396277-C2env92y.js} +1 -1
  181. package/dist-embed/chunks/{kaa-6HZHGXH3-CO2r0Hb-.js → kaa-6HZHGXH3-DtvfFgz6.js} +1 -1
  182. package/dist-embed/chunks/{kab-KAB-ZGHBKWFO-0WoWjCrc.js → kab-KAB-ZGHBKWFO-Cs_P0J-0.js} +1 -1
  183. package/dist-embed/chunks/{kanban-definition-UXKFOSKX-CKIjAYbp.js → kanban-definition-UXKFOSKX-BgGOEpcs.js} +1 -1
  184. package/dist-embed/chunks/{kanban-definition-UXKFOSKX-B6PDcRlF.js → kanban-definition-UXKFOSKX-DBTVO8S2.js} +1 -1
  185. package/dist-embed/chunks/{kanban-definition-UXKFOSKX-BO0-y3yZ.js → kanban-definition-UXKFOSKX-jcrnmXSL.js} +1 -1
  186. package/dist-embed/chunks/{kk-KZ-P5N5QNE5-DFQE1uuw.js → kk-KZ-P5N5QNE5-DX02WIig.js} +1 -1
  187. package/dist-embed/chunks/{km-KH-HSX4SM5Z-D0Bja56Q.js → km-KH-HSX4SM5Z-C4yS0alE.js} +1 -1
  188. package/dist-embed/chunks/{ko-KR-MTYHY66A-C6MeQrMU.js → ko-KR-MTYHY66A-5P-CxGKE.js} +1 -1
  189. package/dist-embed/chunks/{ku-TR-6OUDTVRD-CweepkXr.js → ku-TR-6OUDTVRD-B_CF--jS.js} +1 -1
  190. package/dist-embed/chunks/{layout-Bz98EP0E.js → layout-BzuSIVA6.js} +1 -1
  191. package/dist-embed/chunks/{layout-DPmNjViN.js → layout-DrQTHWcp.js} +1 -1
  192. package/dist-embed/chunks/{layout-mk0FGxVc.js → layout-ke1SehnF.js} +1 -1
  193. package/dist-embed/chunks/{lexicalHooks-Cj3BNPDC.js → lexicalHooks-mjCdxurM.js} +1 -1
  194. package/dist-embed/chunks/{lib-f60SfhfM.js → lib-77hal096.js} +1 -1
  195. package/dist-embed/chunks/{lib-tR3XRdBe.js → lib-BF0qLKx4.js} +1 -1
  196. package/dist-embed/chunks/{lib-0j0dfH8p.js → lib-BHN4er3T.js} +1 -1
  197. package/dist-embed/chunks/{lib-D8Ksfd49.js → lib-BL0Z7ZLN.js} +1 -1
  198. package/dist-embed/chunks/{lib-ku1U2GxE.js → lib-BbQRs6gq.js} +1 -1
  199. package/dist-embed/chunks/{lib-BItrfBU4.js → lib-BqYnt3B4.js} +1 -1
  200. package/dist-embed/chunks/{lib-DCBCbRKN.js → lib-C0IoKYd5.js} +1 -1
  201. package/dist-embed/chunks/{lib-DzVf9ZJD.js → lib-CSLo_71d.js} +1 -1
  202. package/dist-embed/chunks/{lib-CkKgTevD.js → lib-Clh_AUFx.js} +1 -1
  203. package/dist-embed/chunks/{lib-BmoHRaAo.js → lib-Cz1lLXyg.js} +1 -1
  204. package/dist-embed/chunks/{lib-Hgl-pfON.js → lib-DDBKY5pq.js} +1 -1
  205. package/dist-embed/chunks/{lib-B62N3zGB.js → lib-DJP5gvFi.js} +1 -1
  206. package/dist-embed/chunks/{lib-COg_k5cY.js → lib-DMTtt1wk.js} +1 -1
  207. package/dist-embed/chunks/{lib-DpZphKNm.js → lib-Jm05d6GV.js} +1 -1
  208. package/dist-embed/chunks/{lib-w650Gz0V.js → lib-KpC079PC.js} +1 -1
  209. package/dist-embed/chunks/{lib-CjicD0Pj.js → lib-WVhM2LQX.js} +1 -1
  210. package/dist-embed/chunks/{lib-BnAfx9wF.js → lib-_bLHZImL.js} +1 -1
  211. package/dist-embed/chunks/{lib-B01oDNlH.js → lib-jZS8hOW4.js} +1 -1
  212. package/dist-embed/chunks/{lib-CY6QUCzq.js → lib-q3E3Gmmk.js} +1 -1
  213. package/dist-embed/chunks/{lib-C-8NAvI1.js → lib-tF-FByVb.js} +1 -1
  214. package/dist-embed/chunks/{lt-LT-XHIRWOB4-DrPOBOia.js → lt-LT-XHIRWOB4-BDdaHp0_.js} +1 -1
  215. package/dist-embed/chunks/{lv-LV-5QDEKY6T-BlGiDUA0.js → lv-LV-5QDEKY6T-C4eEADZC.js} +1 -1
  216. package/dist-embed/chunks/{mermaid.core-BiF8MSuv.js → mermaid.core-Do9KSWkx.js} +5 -5
  217. package/dist-embed/chunks/{mermaid.core-1p09QPXM.js → mermaid.core-ImjaHcFN.js} +3 -3
  218. package/dist-embed/chunks/{mindmap-definition-YA3MSWOX-CEFrcqEk.js → mindmap-definition-YA3MSWOX-DQ5gBAUm.js} +1 -1
  219. package/dist-embed/chunks/{mindmap-definition-YA3MSWOX-DpAy5heR.js → mindmap-definition-YA3MSWOX-DhjXREA8.js} +1 -1
  220. package/dist-embed/chunks/{mindmap-definition-YA3MSWOX-t1pDKjS3.js → mindmap-definition-YA3MSWOX-DqaQ8KOs.js} +1 -1
  221. package/dist-embed/chunks/{mindmap-definition-e4c1d938-DcepOwKv.js → mindmap-definition-e4c1d938-DoEOORm1.js} +1 -1
  222. package/dist-embed/chunks/{model-jLDiOPpQ.js → model-DUnnBi6P.js} +1 -1
  223. package/dist-embed/chunks/{mr-IN-CRQNXWMA-BWEVprKf.js → mr-IN-CRQNXWMA-BWxvnaHu.js} +1 -1
  224. package/dist-embed/chunks/{my-MM-5M5IBNSE-BBxutJOz.js → my-MM-5M5IBNSE-CLLGJ71z.js} +1 -1
  225. package/dist-embed/chunks/{nb-NO-T6EIAALU-DJnrKa7W.js → nb-NO-T6EIAALU-CXXHz47F.js} +1 -1
  226. package/dist-embed/chunks/{nl-NL-IS3SIHDZ-DQfv4h3e.js → nl-NL-IS3SIHDZ-DgvIFG1o.js} +1 -1
  227. package/dist-embed/chunks/{nn-NO-6E72VCQL-DiGj9RA6.js → nn-NO-6E72VCQL-CF-xs2ZW.js} +1 -1
  228. package/dist-embed/chunks/{oc-FR-POXYY2M6-WJRn50ji.js → oc-FR-POXYY2M6-Blnuf5JR.js} +1 -1
  229. package/dist-embed/chunks/{pa-IN-N4M65BXN-U7QCzNgm.js → pa-IN-N4M65BXN--oZas2yq.js} +1 -1
  230. package/dist-embed/chunks/{pegDiagram-XKGWAZYB-iE6rBtXO.js → pegDiagram-XKGWAZYB-B7vltnXv.js} +1 -1
  231. package/dist-embed/chunks/{pegDiagram-XKGWAZYB-BlYwAwEo.js → pegDiagram-XKGWAZYB-D4e6HBvn.js} +1 -1
  232. package/dist-embed/chunks/{pegDiagram-XKGWAZYB-CudwiD3O.js → pegDiagram-XKGWAZYB-LNTV4YzJ.js} +1 -1
  233. package/dist-embed/chunks/{percentages-BXMCSKIN-DhE6_GLO.js → percentages-BXMCSKIN-MAjQwr8F.js} +5 -5
  234. package/dist-embed/chunks/{pieDiagram-E7YTZNPT-CIawCiDR.js → pieDiagram-E7YTZNPT-BL6tcixN.js} +1 -1
  235. package/dist-embed/chunks/{pieDiagram-E7YTZNPT-Cy6Wueqp.js → pieDiagram-E7YTZNPT-DgV4Cy2T.js} +1 -1
  236. package/dist-embed/chunks/{pieDiagram-E7YTZNPT-DkhDYj7K.js → pieDiagram-E7YTZNPT-a4twxVx-.js} +1 -1
  237. package/dist-embed/chunks/{pieDiagram-c941bede-Ds-rlqjJ.js → pieDiagram-c941bede-C1NXxH3p.js} +1 -1
  238. package/dist-embed/chunks/{pl-PL-T2D74RX3-D5hzyBxL.js → pl-PL-T2D74RX3-CW7khEw8.js} +1 -1
  239. package/dist-embed/chunks/{plugin-BqLEv-U0.js → plugin-U4XZBswA.js} +1 -1
  240. package/dist-embed/chunks/{pt-BR-5N22H2LF-CAs1Vbwd.js → pt-BR-5N22H2LF-CBLbqrvY.js} +1 -1
  241. package/dist-embed/chunks/{pt-PT-UZXXM6DQ-f3BuGnIL.js → pt-PT-UZXXM6DQ-Boh5oA32.js} +1 -1
  242. package/dist-embed/chunks/{quadrantDiagram-AXDQQJYC-1ViFLfLW.js → quadrantDiagram-AXDQQJYC-BTBfnkpT.js} +1 -1
  243. package/dist-embed/chunks/{quadrantDiagram-AXDQQJYC-B30POsrM.js → quadrantDiagram-AXDQQJYC-CXiKbUwz.js} +1 -1
  244. package/dist-embed/chunks/{quadrantDiagram-AXDQQJYC-CqArYUyr.js → quadrantDiagram-AXDQQJYC-Dy9EnqX6.js} +1 -1
  245. package/dist-embed/chunks/{quadrantDiagram-cf8b8fe0-QoN4fcns.js → quadrantDiagram-cf8b8fe0-BmuQ4zSn.js} +1 -1
  246. package/dist-embed/chunks/{railroadDiagram-O6MQD6OU-BelGMNLe.js → railroadDiagram-O6MQD6OU-BZgQtORC.js} +1 -1
  247. package/dist-embed/chunks/{railroadDiagram-O6MQD6OU-nWQg4Zha.js → railroadDiagram-O6MQD6OU-D4ziu6ro.js} +1 -1
  248. package/dist-embed/chunks/{railroadDiagram-O6MQD6OU-BKrSAEIz.js → railroadDiagram-O6MQD6OU-DZJxMT9e.js} +1 -1
  249. package/dist-embed/chunks/{renderer-NdtLW87o.js → renderer-DTpEU9RO.js} +1 -1
  250. package/dist-embed/chunks/{requirementDiagram-53bda41b-DRQpj1S7.js → requirementDiagram-53bda41b-CZFqw_aX.js} +1 -1
  251. package/dist-embed/chunks/{requirementDiagram-BXWQKSXE-C-ZNAzIA.js → requirementDiagram-BXWQKSXE-By8LT77q.js} +1 -1
  252. package/dist-embed/chunks/{requirementDiagram-BXWQKSXE-BsKIaNx-.js → requirementDiagram-BXWQKSXE-Dk3nxAMd.js} +1 -1
  253. package/dist-embed/chunks/{requirementDiagram-BXWQKSXE-Dj_84sJE.js → requirementDiagram-BXWQKSXE-Dx1y_rw2.js} +1 -1
  254. package/dist-embed/chunks/{ro-RO-JPDTUUEW-Ck6Pl6T-.js → ro-RO-JPDTUUEW-QpHkCZjx.js} +1 -1
  255. package/dist-embed/chunks/{ru-RU-B4JR7IUQ-B5ZFvbSm.js → ru-RU-B4JR7IUQ-C8-ztNrr.js} +1 -1
  256. package/dist-embed/chunks/{sankeyDiagram-P5KCCOFB-BwrjNR9f.js → sankeyDiagram-P5KCCOFB-BARe0eo5.js} +1 -1
  257. package/dist-embed/chunks/{sankeyDiagram-P5KCCOFB-DNcJ8lTV.js → sankeyDiagram-P5KCCOFB-D3-EpmdU.js} +1 -1
  258. package/dist-embed/chunks/{sankeyDiagram-P5KCCOFB-CvESkMt0.js → sankeyDiagram-P5KCCOFB-DJG8GtNG.js} +1 -1
  259. package/dist-embed/chunks/{sankeyDiagram-c3ef121a-NSdOSIUQ.js → sankeyDiagram-c3ef121a-DzTFYWVL.js} +1 -1
  260. package/dist-embed/chunks/{sequenceDiagram-82a5b84f-Cxc06-S6.js → sequenceDiagram-82a5b84f-B0hIjr4n.js} +1 -1
  261. package/dist-embed/chunks/{sequenceDiagram-WJ2MYXX4-vrbMF2lh.js → sequenceDiagram-WJ2MYXX4-BcB5M_uE.js} +1 -1
  262. package/dist-embed/chunks/{sequenceDiagram-WJ2MYXX4-DYkcZR01.js → sequenceDiagram-WJ2MYXX4-CggwqzCL.js} +1 -1
  263. package/dist-embed/chunks/{sequenceDiagram-WJ2MYXX4-CdKf7EXa.js → sequenceDiagram-WJ2MYXX4-DD0JtyHN.js} +1 -1
  264. package/dist-embed/chunks/{sheet-BFp5lgzm.js → sheet-BQ9MLxvm.js} +1 -1
  265. package/dist-embed/chunks/{si-LK-N5RQ5JYF-turarKuZ.js → si-LK-N5RQ5JYF-hqqq2gYS.js} +1 -1
  266. package/dist-embed/chunks/{sizeCapture-INFHLROL-B05-5pAF.js → sizeCapture-INFHLROL-BMuUFBVt.js} +1 -1
  267. package/dist-embed/chunks/{sizeCapture-INFHLROL-DBDGASUh.js → sizeCapture-INFHLROL-CpGgMlRe.js} +1 -1
  268. package/dist-embed/chunks/{sizeCapture-INFHLROL-BTK449Mq.js → sizeCapture-INFHLROL-DwbRJ4BV.js} +1 -1
  269. package/dist-embed/chunks/{sk-SK-C5VTKIMK-B61Eejyh.js → sk-SK-C5VTKIMK-Cwov2m-p.js} +1 -1
  270. package/dist-embed/chunks/{sl-SI-NN7IZMDC-Vmd7HFee.js → sl-SI-NN7IZMDC-BRxVCDIe.js} +1 -1
  271. package/dist-embed/chunks/{state-B-9Ja93T.js → state-OwYcN40e.js} +1 -1
  272. package/dist-embed/chunks/{stateDiagram-43e79a5f-BNfT8BMf.js → stateDiagram-43e79a5f-Bu9kA3H-.js} +1 -1
  273. package/dist-embed/chunks/{stateDiagram-D77RDMKH-B4P4foWm.js → stateDiagram-D77RDMKH-CC58EPeY.js} +1 -1
  274. package/dist-embed/chunks/{stateDiagram-D77RDMKH-DGy5pPcJ.js → stateDiagram-D77RDMKH-Cs4wIyOq.js} +1 -1
  275. package/dist-embed/chunks/{stateDiagram-D77RDMKH-cX1LxuDW.js → stateDiagram-D77RDMKH-vD5bWUvd.js} +1 -1
  276. package/dist-embed/chunks/{stateDiagram-v2-2041ed4f-DT_Cb2bL.js → stateDiagram-v2-2041ed4f-Od7A0mbg.js} +1 -1
  277. package/dist-embed/chunks/{stateDiagram-v2-MP3YSRHH-CoF-m0JB.js → stateDiagram-v2-MP3YSRHH-DXfM0lWD.js} +1 -1
  278. package/dist-embed/chunks/{stateDiagram-v2-MP3YSRHH-BSxDwfLM.js → stateDiagram-v2-MP3YSRHH-DwPQ0Ue3.js} +1 -1
  279. package/dist-embed/chunks/{stateDiagram-v2-MP3YSRHH-GuE-uLPq.js → stateDiagram-v2-MP3YSRHH-l7s3F_nn.js} +1 -1
  280. package/dist-embed/chunks/{styles-455b33cd-Cp1Ujuo8.js → styles-455b33cd-Ds_FotAH.js} +1 -1
  281. package/dist-embed/chunks/{styles-f932cba9-CxoS5hwQ.js → styles-f932cba9-D0_uYfjw.js} +1 -1
  282. package/dist-embed/chunks/{styles-fcc2142b-ByLmqETE.js → styles-fcc2142b-Btmp_yd-.js} +1 -1
  283. package/dist-embed/chunks/{subset-shared.chunk-BsVAPxIg.js → subset-shared.chunk-Bwn3uV7D.js} +1 -1
  284. package/dist-embed/chunks/{subset-worker.chunk-BS8PIaQX.js → subset-worker.chunk-sLZsYGAm.js} +1 -1
  285. package/dist-embed/chunks/{substates-CeUNAPt2.js → substates-CRCFGJkO.js} +1 -1
  286. package/dist-embed/chunks/{sv-SE-XGPEYMSR-C9lMr16n.js → sv-SE-XGPEYMSR-CFTcXTPe.js} +1 -1
  287. package/dist-embed/chunks/{svgDrawCommon-148a3cd9-BHhr6lti.js → svgDrawCommon-148a3cd9-BzG9z3G2.js} +1 -1
  288. package/dist-embed/chunks/{swimlanes-42K2YHIH-DQJZa-xA.js → swimlanes-42K2YHIH-CXcSAQkI.js} +1 -1
  289. package/dist-embed/chunks/{swimlanes-42K2YHIH-RHIIyMRW.js → swimlanes-42K2YHIH-CbKvXXpE.js} +1 -1
  290. package/dist-embed/chunks/{swimlanes-42K2YHIH-DKdFBGRm.js → swimlanes-42K2YHIH-Cn91OzZh.js} +1 -1
  291. package/dist-embed/chunks/{swimlanesDiagram-VR7AAH4N-qQpIxgus.js → swimlanesDiagram-VR7AAH4N-BDYem9Qf.js} +1 -1
  292. package/dist-embed/chunks/{swimlanesDiagram-VR7AAH4N-DPhzMK19.js → swimlanesDiagram-VR7AAH4N-C0oAnnos.js} +1 -1
  293. package/dist-embed/chunks/{swimlanesDiagram-VR7AAH4N-rV-EK234.js → swimlanesDiagram-VR7AAH4N-KVXFaw6h.js} +1 -1
  294. package/dist-embed/chunks/{ta-IN-2NMHFXQM-DDvtKbYb.js → ta-IN-2NMHFXQM-DOxRBGkF.js} +1 -1
  295. package/dist-embed/chunks/{th-TH-HPSO5L25-Cuk9i9q1.js → th-TH-HPSO5L25-B66DJGUH.js} +1 -1
  296. package/dist-embed/chunks/{timeline-definition-24CTP7MA-BYQXqujM.js → timeline-definition-24CTP7MA-BdFFNT8A.js} +1 -1
  297. package/dist-embed/chunks/{timeline-definition-24CTP7MA-CNJYLQV3.js → timeline-definition-24CTP7MA-BwHa8bSq.js} +1 -1
  298. package/dist-embed/chunks/{timeline-definition-24CTP7MA-B0VfyyC9.js → timeline-definition-24CTP7MA-pOvrvUiT.js} +1 -1
  299. package/dist-embed/chunks/{timeline-definition-7545f45a-B6u65RjP.js → timeline-definition-7545f45a-mktOQHwE.js} +1 -1
  300. package/dist-embed/chunks/{tr-TR-DEFEU3FU-Dt5AbXXF.js → tr-TR-DEFEU3FU-4T2eEq6g.js} +1 -1
  301. package/dist-embed/chunks/{uk-UA-QMV73CPH-CqxkvO2g.js → uk-UA-QMV73CPH-DzInGHdV.js} +1 -1
  302. package/dist-embed/chunks/{vennDiagram-4TSXK5OY-ERcpoENM.js → vennDiagram-4TSXK5OY-DgP7uC-E.js} +1 -1
  303. package/dist-embed/chunks/{vennDiagram-4TSXK5OY-8GPjZ_rY.js → vennDiagram-4TSXK5OY-DpQuXqxB.js} +1 -1
  304. package/dist-embed/chunks/{vennDiagram-4TSXK5OY-BC0uMGWS.js → vennDiagram-4TSXK5OY-DxCQybxm.js} +1 -1
  305. package/dist-embed/chunks/{vi-VN-M7AON7JQ-CZtlZzss.js → vi-VN-M7AON7JQ-DqvR1smN.js} +1 -1
  306. package/dist-embed/chunks/{wardleyDiagram-VM6X3IG4-DMJNYu8Y.js → wardleyDiagram-VM6X3IG4-1jMcvi60.js} +1 -1
  307. package/dist-embed/chunks/{wardleyDiagram-VM6X3IG4-Bubuc1xO.js → wardleyDiagram-VM6X3IG4-Dyv0LxbD.js} +1 -1
  308. package/dist-embed/chunks/{wardleyDiagram-VM6X3IG4-DdRbpzRB.js → wardleyDiagram-VM6X3IG4-MyP5nqZ4.js} +1 -1
  309. package/dist-embed/chunks/workbook-5qhwFc45.js +1 -0
  310. package/dist-embed/chunks/{write-D-y9_9sL.js → write-DKnalcKH.js} +1 -1
  311. package/dist-embed/chunks/{xychartDiagram-3f383b91-CEkYRds9.js → xychartDiagram-3f383b91-CH6jxwtm.js} +1 -1
  312. package/dist-embed/chunks/{xychartDiagram-S5SC5T6Z-iG96dorC.js → xychartDiagram-S5SC5T6Z-CepDAfxw.js} +1 -1
  313. package/dist-embed/chunks/{xychartDiagram-S5SC5T6Z-DKWKSC-B.js → xychartDiagram-S5SC5T6Z-FNQJ78h8.js} +1 -1
  314. package/dist-embed/chunks/{xychartDiagram-S5SC5T6Z-C0WCXM2P.js → xychartDiagram-S5SC5T6Z-euDlXTya.js} +1 -1
  315. package/dist-embed/chunks/{zh-CN-LNUGB5OW-6_SDF9o2.js → zh-CN-LNUGB5OW-iQ1ZrxBq.js} +1 -1
  316. package/dist-embed/chunks/{zh-HK-E62DVLB3-em8dd9Nl.js → zh-HK-E62DVLB3-BjSHLy4a.js} +1 -1
  317. package/dist-embed/chunks/{zh-TW-RAJ6MFWO-BCzbAoXj.js → zh-TW-RAJ6MFWO-CqMWwcSn.js} +1 -1
  318. package/dist-embed/datalayer-app-main.js +62 -62
  319. package/lib/apps/agentUiPlugins.d.ts +7 -0
  320. package/lib/apps/agentUiPlugins.js +20 -0
  321. package/lib/apps/apps/AppRenderer.d.ts +1 -1
  322. package/lib/apps/apps/AppRenderer.js +22 -13
  323. package/lib/apps/core/index.d.ts +7 -0
  324. package/lib/apps/core/index.js +7 -0
  325. package/lib/apps/embed/AppEmbed.d.ts +3 -3
  326. package/lib/apps/embed/LoopEmbed.js +2 -0
  327. package/lib/apps/embed/embedConfig.d.ts +1 -1
  328. package/lib/apps/embed/embedConfig.js +1 -1
  329. package/lib/apps/plugins/chat/ChatView.js +11 -5
  330. package/lib/apps/plugins/chat/index.d.ts +6 -5
  331. package/lib/apps/plugins/limited-preview/LimitedPreviewIndicator.d.ts +31 -0
  332. package/lib/apps/plugins/limited-preview/LimitedPreviewIndicator.js +70 -0
  333. package/lib/apps/plugins/limited-preview/index.d.ts +37 -0
  334. package/lib/apps/plugins/limited-preview/index.js +53 -0
  335. package/lib/apps/plugins/limited-preview/preview.d.ts +101 -0
  336. package/lib/apps/plugins/limited-preview/preview.js +188 -0
  337. package/lib/apps/presets.d.ts +16 -0
  338. package/lib/apps/presets.js +18 -1
  339. package/lib/chat/anonymous/AnonymousChat.d.ts +8 -19
  340. package/lib/chat/anonymous/AnonymousChat.js +11 -43
  341. package/lib/chat/anonymous/anonymousMode.d.ts +8 -13
  342. package/lib/chat/anonymous/anonymousMode.js +0 -6
  343. package/lib/chat/index.d.ts +1 -1
  344. package/lib/chat/index.js +1 -1
  345. package/lib/chat/prompt/InputPrompt.d.ts +8 -1
  346. package/lib/chat/prompt/InputPrompt.js +8 -3
  347. package/lib/chat/prompt/stack.d.ts +9 -0
  348. package/lib/chat/prompt/stack.js +8 -4
  349. package/lib/specs/apps.js +0 -40
  350. package/package.json +1 -1
  351. package/scripts/codegen/generate_apps.py +4 -1
  352. package/dist-embed/chunks/ChatView-B9oVgZ72.js +0 -32
  353. package/dist-embed/chunks/SchemaForm-N0hu4z_p.js +0 -1
  354. package/dist-embed/chunks/SignInIcon-XIbntAUw.js +0 -1
  355. package/dist-embed/chunks/dist-BOLa5oLF.js +0 -1
  356. package/dist-embed/chunks/index.esm-DwyYEnhk.js +0 -1
  357. package/dist-embed/chunks/workbook-BQLbQvZ-.js +0 -1
@@ -1 +1 @@
1
- import{aS as v,aT as h,aL as k}from"../datalayer-app-main.js";import{I as g,a as y,b as L}from"./index-46VEGuyz.js";import{I as b}from"./tokens-BXLnKVER.js";import{a as R}from"./index-h8lXpqtD.js";import{R as _}from"./index-CBWGYoQM.js";import"./Output-DLpf2Of9.js";import"./index-B5W7CVUY.js";import"./hoverbox-CStlKQWE.js";import"./dist-N90VI44_.js";import"./index-Cz10oMGc.js";import"./RestartIcon-DvpOf5Mf.js";import"./CellSidebarExtension-CrdbRLaE.js";import"./NotebookSkeleton-DHQ--KEB.js";import"./Avatar-B0TcOj_b.js";import"./renderer-NdtLW87o.js";import"./SquareIcon-Dy3l3VdH.js";import"./FileDirectoryOpenFillIcon-Db8fP24q.js";import"./url-4_0MnaFQ.js";/* empty css *//* empty css */import"./style-DdAxk_bj.js";/* empty css */import"./style-Cj1gzCjo.js";/* empty css */import"./style-rkw8dR9f.js";import"./style-GHJFdtIz.js";import"./style-ZSIOeMoX.js";import"./style-iVfD6mFL.js";import"./style-DA-Ya7rp.js";import"./style-D3tvWcFO.js";import"./style-BOqStzF9.js";import"./style-ADLQJ-E9.js";import"./style-DgglluaK.js";import"./ArrowLeftIcon-sX3iNMG1.js";import"./SkubbleIcon-CAaVh_BE.js";import"./usePrimerThemeBridge-BfoXa7hP.js";import"./index-C644crfL.js";import"./KernelVariables-BIWju6rZ.js";import"./index-CavxlEgY.js";import"./SortAscIcon-CmH04s3F.js";import"./SortDescIcon-Qif6E10I.js";import"./NotebookToolbar-C1fpK-Vi.js";import"./RepoPushIcon-BtXQRhLa.js";import"./sessions-W_hhenw6.js";import"./tokens-DcXbsdvP.js";import"./drivecontents-BSbQpH52.js";import"./kernel-Cn-ejD4i.js";import"./dayjs.min-u3zuoSR8.js";import"./isEqual-BxgGIFfN.js";import"./d3-color-Jd8hXty2.js";var a;(function(t){t.handleLink="rendermime:handle-local-link"})(a||(a={}));const be={id:"@jupyterlab/rendermime-extension:plugin",description:"Provides the render mime registry.",optional:[b,y,R,L,v],provides:g,activate:I,autoStart:!0},f="debugger:open-source";function I(t,n,p,s,l,i){const d=(i??h).load("jupyterlab");return n&&t.commands.addCommand(a.handleLink,{label:d.__("Handle Local Link"),execute:e=>{const r=e.path,o=e.id,m=e.scope||"server";if(r){if(m==="kernel"){if(!t.commands.hasCommand(f)){console.warn("Cannot open kernel file: debugger sources provider not available");return}return t.commands.execute(f,{path:r})}return n.services.contents.get(r,{content:!1}).then(()=>{const u=n.registry.defaultRenderedWidgetFactory(r),c=n.openOrReveal(r,u.name);c&&o&&c.setFragment(o)})}},describedBy:{args:{type:"object",properties:{path:{type:"string",description:d.__("The file path to open")},id:{type:"string",description:d.__("Fragment identifier to navigate to")},scope:{type:"string",enum:["kernel","server"],description:d.__("Scope of the file location")}},required:["path"]}}}),new _({initialFactories:k,trustHandler:{markTrusted:e=>{t.commandLinker.markTrusted(e)},unmarkTrusted:e=>{t.commandLinker.unmarkTrusted(e)}},linkHandler:n?{handleLink:(e,r,o)=>{e.tagName==="A"&&e.hasAttribute("download")||e.addEventListener("click",m=>{m.preventDefault(),t.commands.execute(a.handleLink,{path:r,id:o})})},handlePath:(e,r,o,m)=>{e.addEventListener("click",u=>{u.preventDefault(),t.commands.execute(a.handleLink,{path:r,id:m,scope:o})})}}:void 0,latexTypesetter:p??void 0,markdownParser:l??void 0,translator:i??void 0,sanitizer:s??void 0})}export{be as default};
1
+ import{aS as v,aT as h,aL as k}from"../datalayer-app-main.js";import{I as g,a as y,b as L}from"./index-B5fl-cx7.js";import{I as b}from"./tokens-BXLnKVER.js";import{a as R}from"./index-npitmnIA.js";import{R as _}from"./index-Dqc2hT2k.js";import"./Output-WQnm0VN5.js";import"./index-DE0JwlLw.js";import"./hoverbox-CStlKQWE.js";import"./dist-N90VI44_.js";import"./index-Cz10oMGc.js";import"./RestartIcon-DvpOf5Mf.js";import"./CellSidebarExtension-umk7yQhN.js";import"./NotebookSkeleton-DHQ--KEB.js";import"./Avatar-B0TcOj_b.js";import"./renderer-DTpEU9RO.js";import"./SquareIcon-Dy3l3VdH.js";import"./FileDirectoryOpenFillIcon-Db8fP24q.js";import"./url-4_0MnaFQ.js";/* empty css *//* empty css */import"./style-DdAxk_bj.js";/* empty css */import"./style-Cj1gzCjo.js";/* empty css */import"./style-rkw8dR9f.js";import"./style-GHJFdtIz.js";import"./style-ZSIOeMoX.js";import"./style-iVfD6mFL.js";import"./style-DA-Ya7rp.js";import"./style-D3tvWcFO.js";import"./style-BOqStzF9.js";import"./style-ADLQJ-E9.js";import"./style-DgglluaK.js";import"./ArrowLeftIcon-sX3iNMG1.js";import"./SkubbleIcon-CAaVh_BE.js";import"./usePrimerThemeBridge-BfoXa7hP.js";import"./index-C644crfL.js";import"./KernelVariables-xXzfdk5t.js";import"./index-CavxlEgY.js";import"./SortAscIcon-CmH04s3F.js";import"./SortDescIcon-Qif6E10I.js";import"./NotebookToolbar-C1fpK-Vi.js";import"./RepoPushIcon-BtXQRhLa.js";import"./sessions-W_hhenw6.js";import"./tokens-DcXbsdvP.js";import"./drivecontents-BSbQpH52.js";import"./kernel-Cn-ejD4i.js";import"./dayjs.min-u3zuoSR8.js";import"./isEqual-BxgGIFfN.js";import"./d3-color-Jd8hXty2.js";var a;(function(t){t.handleLink="rendermime:handle-local-link"})(a||(a={}));const be={id:"@jupyterlab/rendermime-extension:plugin",description:"Provides the render mime registry.",optional:[b,y,R,L,v],provides:g,activate:I,autoStart:!0},f="debugger:open-source";function I(t,n,p,s,l,i){const d=(i??h).load("jupyterlab");return n&&t.commands.addCommand(a.handleLink,{label:d.__("Handle Local Link"),execute:e=>{const r=e.path,o=e.id,m=e.scope||"server";if(r){if(m==="kernel"){if(!t.commands.hasCommand(f)){console.warn("Cannot open kernel file: debugger sources provider not available");return}return t.commands.execute(f,{path:r})}return n.services.contents.get(r,{content:!1}).then(()=>{const u=n.registry.defaultRenderedWidgetFactory(r),c=n.openOrReveal(r,u.name);c&&o&&c.setFragment(o)})}},describedBy:{args:{type:"object",properties:{path:{type:"string",description:d.__("The file path to open")},id:{type:"string",description:d.__("Fragment identifier to navigate to")},scope:{type:"string",enum:["kernel","server"],description:d.__("Scope of the file location")}},required:["path"]}}}),new _({initialFactories:k,trustHandler:{markTrusted:e=>{t.commandLinker.markTrusted(e)},unmarkTrusted:e=>{t.commandLinker.unmarkTrusted(e)}},linkHandler:n?{handleLink:(e,r,o)=>{e.tagName==="A"&&e.hasAttribute("download")||e.addEventListener("click",m=>{m.preventDefault(),t.commands.execute(a.handleLink,{path:r,id:o})})},handlePath:(e,r,o,m)=>{e.addEventListener("click",u=>{u.preventDefault(),t.commands.execute(a.handleLink,{path:r,id:m,scope:o})})}}:void 0,latexTypesetter:p??void 0,markdownParser:l??void 0,translator:i??void 0,sanitizer:s??void 0})}export{be as default};
@@ -1 +1 @@
1
- import{aT as P,am as I,aO as E,aS as R,cL as A,cM as B,aQ as j,cD as M}from"../datalayer-app-main.js";import{b as N}from"./index-h8lXpqtD.js";import{I as V}from"./tokens-CGj56w43.js";import{I as W}from"./tokens-Bq_eiXUV.js";import{c as k}from"./index-46VEGuyz.js";import"./hoverbox-CStlKQWE.js";import"./Output-DLpf2Of9.js";import"./index-B5W7CVUY.js";import"./index-CBWGYoQM.js";import"./dayjs.min-u3zuoSR8.js";import"./isEqual-BxgGIFfN.js";import"./d3-color-Jd8hXty2.js";import"./dist-N90VI44_.js";import"./index-Cz10oMGc.js";import"./RestartIcon-DvpOf5Mf.js";import"./CellSidebarExtension-CrdbRLaE.js";import"./NotebookSkeleton-DHQ--KEB.js";import"./Avatar-B0TcOj_b.js";import"./renderer-NdtLW87o.js";import"./SquareIcon-Dy3l3VdH.js";import"./FileDirectoryOpenFillIcon-Db8fP24q.js";import"./url-4_0MnaFQ.js";/* empty css *//* empty css */import"./style-DdAxk_bj.js";/* empty css */import"./style-Cj1gzCjo.js";/* empty css */import"./style-rkw8dR9f.js";import"./style-GHJFdtIz.js";import"./style-ZSIOeMoX.js";import"./style-iVfD6mFL.js";import"./style-DA-Ya7rp.js";import"./style-D3tvWcFO.js";import"./style-BOqStzF9.js";import"./style-ADLQJ-E9.js";import"./style-DgglluaK.js";import"./ArrowLeftIcon-sX3iNMG1.js";import"./SkubbleIcon-CAaVh_BE.js";import"./usePrimerThemeBridge-BfoXa7hP.js";import"./index-C644crfL.js";import"./KernelVariables-BIWju6rZ.js";import"./index-CavxlEgY.js";import"./SortAscIcon-CmH04s3F.js";import"./SortDescIcon-Qif6E10I.js";import"./NotebookToolbar-C1fpK-Vi.js";import"./RepoPushIcon-BtXQRhLa.js";import"./sessions-W_hhenw6.js";import"./tokens-DcXbsdvP.js";import"./drivecontents-BSbQpH52.js";import"./kernel-Cn-ejD4i.js";class D{constructor(n=P){this.translator=n,this._changed=new I(this),this._providerMap=new Map}add(n,c){return this._providerMap.set(n,c),this._changed.emit(),new E(()=>{this._providerMap.delete(n),this._changed.emit()})}getProvider(n){for(const c of this._providerMap.values())if(c.isApplicable(n))return c.createNew(n,this.translator)}hasProvider(n){for(const c of this._providerMap.values())if(c.isApplicable(n))return!0;return!1}get changed(){return this._changed}}const v="jp-mod-searchable",S="jp-mod-search-active",_="--jp-documentsearch-content-header";var o;(function(t){t.search="documentsearch:start",t.searchAndReplace="documentsearch:startWithReplace",t.findNext="documentsearch:highlightNext",t.findPrevious="documentsearch:highlightPrevious",t.end="documentsearch:end",t.toggleSearchInSelection="documentsearch:toggleSearchInSelection"})(o||(o={}));const L={id:"@jupyterlab/documentsearch-extension:labShellWidgetListener",description:"Active search on valid document",requires:[k,W],autoStart:!0,activate:(t,n,c)=>{const h=s=>{s&&(c.hasProvider(s)?s.addClass(v):s.removeClass(v))};c.changed.connect(()=>h(n.activeWidget)),n.activeChanged.connect((s,d)=>{const u=d.oldValue;u&&u.removeClass(v),h(d.newValue)})}};class F{constructor(n){this._commandRegistry=n,this._cache=this._buildCache(),this._commandRegistry.keyBindingChanged.connect(this._rebuildCache,this)}get next(){return this._cache.next}get previous(){return this._cache.previous}get toggleSearchInSelection(){return this._cache.toggleSearchInSelection}_rebuildCache(){this._cache=this._buildCache()}_buildCache(){const n=this._commandRegistry.keyBindings.find(s=>s.command===o.findNext),c=this._commandRegistry.keyBindings.find(s=>s.command===o.findPrevious),h=this._commandRegistry.keyBindings.find(s=>s.command===o.toggleSearchInSelection);return{next:n,previous:c,toggleSearchInSelection:h}}dispose(){this._commandRegistry.keyBindingChanged.disconnect(this._rebuildCache,this)}}const T={id:"@jupyterlab/documentsearch-extension:plugin",description:"Provides the document search registry.",provides:W,requires:[R],optional:[N,V],autoStart:!0,activate:(t,n,c,h)=>{var s;const d=n.load("jupyterlab");let u=500,y="never";const p=new D(n),l=new Map;if(h){const e=h.load(T.id),r=i=>{u=i.get("searchDebounceTime").composite,y=i.get("autoSearchInSelection").composite};Promise.all([e,t.restored]).then(([i])=>{r(i),i.changed.connect(a=>{r(a)})}).catch(i=>{console.error(i.message)})}const b=()=>{const e=t.shell.currentWidget;return e?p.hasProvider(e):!1},x=e=>{if(!e)return;const r=e.id;let i=l.get(r);if(!i){const a=p.getProvider(e);if(!a)return;const m=new A(a,u),C=new F(t.commands),g=new B(m,n,C);l.set(r,g),[o.findNext,o.findPrevious,o.end,o.toggleSearchInSelection].forEach(f=>{t.commands.notifyCommandChanged(f)}),g.closed.connect(()=>{e.isDisposed||(e.activate(),e.removeClass(S))}),g.disposed.connect(()=>{e.isDisposed||(e.activate(),e.removeClass(S)),l.delete(r),[o.findNext,o.findPrevious,o.end,o.toggleSearchInSelection].forEach(f=>{t.commands.notifyCommandChanged(f)})}),e.disposed.connect(()=>{g.dispose(),m.dispose(),a.dispose(),C.dispose()}),i=g}return i.isAttached||(j.attach(i,e.node),e.addClass(S),e instanceof M&&(e.contentHeader.node.style.setProperty("anchor-name",_),e.node.style.setProperty("anchor-scope",_),i.node.style.top=`anchor(${_} bottom)`),i.model.searchExpression&&i.model.refresh()),i};return t.commands.addCommand(o.search,{label:d.__("Find…"),isEnabled:b,describedBy:{args:{type:"object",properties:{searchText:{type:"string",description:d.__("The text to search for")}}}},execute:async e=>{const r=x(t.shell.currentWidget);if(r){const i=e.searchText;i?r.setSearchText(i):r.setSearchText(r.model.suggestedInitialQuery);const a=r.model.selectionState;let m=!1;switch(y){case"multiple-selected":m=a==="multiple";break;case"any-selected":m=a==="multiple"||a==="single";break}m&&await r.model.setFilter("selection",!0),r.focusSearchInput()}}}),t.commands.addCommand(o.searchAndReplace,{label:d.__("Find and Replace…"),isEnabled:b,describedBy:{args:{type:"object",properties:{searchText:{type:"string",description:d.__("The text to search for")},replaceText:{type:"string",description:d.__("The text to replace with")}}}},execute:e=>{const r=x(t.shell.currentWidget);if(r){const i=e.searchText;i?r.setSearchText(i):r.setSearchText(r.model.suggestedInitialQuery);const a=e.replaceText;a&&r.setReplaceText(a),r.showReplace(),r.focusSearchInput()}}}),t.commands.addCommand(o.findNext,{label:d.__("Find Next"),isEnabled:()=>!!t.shell.currentWidget&&l.has(t.shell.currentWidget.id),describedBy:{args:{type:"object",properties:{}}},execute:async()=>{var e;const r=t.shell.currentWidget;r&&await((e=l.get(r.id))===null||e===void 0?void 0:e.model.highlightNext())}}),t.commands.addCommand(o.findPrevious,{label:d.__("Find Previous"),isEnabled:()=>!!t.shell.currentWidget&&l.has(t.shell.currentWidget.id),describedBy:{args:{type:"object",properties:{}}},execute:async()=>{var e;const r=t.shell.currentWidget;r&&await((e=l.get(r.id))===null||e===void 0?void 0:e.model.highlightPrevious())}}),t.commands.addCommand(o.end,{label:d.__("End Search"),isEnabled:()=>!!t.shell.currentWidget&&l.has(t.shell.currentWidget.id),describedBy:{args:{type:"object",properties:{}}},execute:async()=>{var e;const r=t.shell.currentWidget;r&&((e=l.get(r.id))===null||e===void 0||e.close())}}),t.commands.addCommand(o.toggleSearchInSelection,{label:d.__("Search in Selection"),isEnabled:()=>!!t.shell.currentWidget&&l.has(t.shell.currentWidget.id)&&"selection"in l.get(t.shell.currentWidget.id).model.filtersDefinition,describedBy:{args:{type:"object",properties:{}}},execute:async()=>{var e;const r=t.shell.currentWidget;if(!r)return;const i=(e=l.get(r.id))===null||e===void 0?void 0:e.model;if(!i)return;const a=i.filters.selection;return i.setFilter("selection",!a)}}),(s=t.shell.currentChanged)===null||s===void 0||s.connect(()=>{Object.values(o).forEach(e=>{t.commands.notifyCommandChanged(e)})}),c&&[o.search,o.searchAndReplace,o.findNext,o.findPrevious,o.end,o.toggleSearchInSelection].forEach(e=>{c.addItem({command:e,category:d.__("Main Area")})}),p}},De=[T,L];export{De as default};
1
+ import{aT as P,am as I,aO as E,aS as R,cL as A,cM as B,aQ as j,cD as M}from"../datalayer-app-main.js";import{b as N}from"./index-npitmnIA.js";import{I as V}from"./tokens-CGj56w43.js";import{I as W}from"./tokens-Bq_eiXUV.js";import{c as k}from"./index-B5fl-cx7.js";import"./hoverbox-CStlKQWE.js";import"./Output-WQnm0VN5.js";import"./index-DE0JwlLw.js";import"./index-Dqc2hT2k.js";import"./dayjs.min-u3zuoSR8.js";import"./isEqual-BxgGIFfN.js";import"./d3-color-Jd8hXty2.js";import"./dist-N90VI44_.js";import"./index-Cz10oMGc.js";import"./RestartIcon-DvpOf5Mf.js";import"./CellSidebarExtension-umk7yQhN.js";import"./NotebookSkeleton-DHQ--KEB.js";import"./Avatar-B0TcOj_b.js";import"./renderer-DTpEU9RO.js";import"./SquareIcon-Dy3l3VdH.js";import"./FileDirectoryOpenFillIcon-Db8fP24q.js";import"./url-4_0MnaFQ.js";/* empty css *//* empty css */import"./style-DdAxk_bj.js";/* empty css */import"./style-Cj1gzCjo.js";/* empty css */import"./style-rkw8dR9f.js";import"./style-GHJFdtIz.js";import"./style-ZSIOeMoX.js";import"./style-iVfD6mFL.js";import"./style-DA-Ya7rp.js";import"./style-D3tvWcFO.js";import"./style-BOqStzF9.js";import"./style-ADLQJ-E9.js";import"./style-DgglluaK.js";import"./ArrowLeftIcon-sX3iNMG1.js";import"./SkubbleIcon-CAaVh_BE.js";import"./usePrimerThemeBridge-BfoXa7hP.js";import"./index-C644crfL.js";import"./KernelVariables-xXzfdk5t.js";import"./index-CavxlEgY.js";import"./SortAscIcon-CmH04s3F.js";import"./SortDescIcon-Qif6E10I.js";import"./NotebookToolbar-C1fpK-Vi.js";import"./RepoPushIcon-BtXQRhLa.js";import"./sessions-W_hhenw6.js";import"./tokens-DcXbsdvP.js";import"./drivecontents-BSbQpH52.js";import"./kernel-Cn-ejD4i.js";class D{constructor(n=P){this.translator=n,this._changed=new I(this),this._providerMap=new Map}add(n,c){return this._providerMap.set(n,c),this._changed.emit(),new E(()=>{this._providerMap.delete(n),this._changed.emit()})}getProvider(n){for(const c of this._providerMap.values())if(c.isApplicable(n))return c.createNew(n,this.translator)}hasProvider(n){for(const c of this._providerMap.values())if(c.isApplicable(n))return!0;return!1}get changed(){return this._changed}}const v="jp-mod-searchable",S="jp-mod-search-active",_="--jp-documentsearch-content-header";var o;(function(t){t.search="documentsearch:start",t.searchAndReplace="documentsearch:startWithReplace",t.findNext="documentsearch:highlightNext",t.findPrevious="documentsearch:highlightPrevious",t.end="documentsearch:end",t.toggleSearchInSelection="documentsearch:toggleSearchInSelection"})(o||(o={}));const L={id:"@jupyterlab/documentsearch-extension:labShellWidgetListener",description:"Active search on valid document",requires:[k,W],autoStart:!0,activate:(t,n,c)=>{const h=s=>{s&&(c.hasProvider(s)?s.addClass(v):s.removeClass(v))};c.changed.connect(()=>h(n.activeWidget)),n.activeChanged.connect((s,d)=>{const u=d.oldValue;u&&u.removeClass(v),h(d.newValue)})}};class F{constructor(n){this._commandRegistry=n,this._cache=this._buildCache(),this._commandRegistry.keyBindingChanged.connect(this._rebuildCache,this)}get next(){return this._cache.next}get previous(){return this._cache.previous}get toggleSearchInSelection(){return this._cache.toggleSearchInSelection}_rebuildCache(){this._cache=this._buildCache()}_buildCache(){const n=this._commandRegistry.keyBindings.find(s=>s.command===o.findNext),c=this._commandRegistry.keyBindings.find(s=>s.command===o.findPrevious),h=this._commandRegistry.keyBindings.find(s=>s.command===o.toggleSearchInSelection);return{next:n,previous:c,toggleSearchInSelection:h}}dispose(){this._commandRegistry.keyBindingChanged.disconnect(this._rebuildCache,this)}}const T={id:"@jupyterlab/documentsearch-extension:plugin",description:"Provides the document search registry.",provides:W,requires:[R],optional:[N,V],autoStart:!0,activate:(t,n,c,h)=>{var s;const d=n.load("jupyterlab");let u=500,y="never";const p=new D(n),l=new Map;if(h){const e=h.load(T.id),r=i=>{u=i.get("searchDebounceTime").composite,y=i.get("autoSearchInSelection").composite};Promise.all([e,t.restored]).then(([i])=>{r(i),i.changed.connect(a=>{r(a)})}).catch(i=>{console.error(i.message)})}const b=()=>{const e=t.shell.currentWidget;return e?p.hasProvider(e):!1},x=e=>{if(!e)return;const r=e.id;let i=l.get(r);if(!i){const a=p.getProvider(e);if(!a)return;const m=new A(a,u),C=new F(t.commands),g=new B(m,n,C);l.set(r,g),[o.findNext,o.findPrevious,o.end,o.toggleSearchInSelection].forEach(f=>{t.commands.notifyCommandChanged(f)}),g.closed.connect(()=>{e.isDisposed||(e.activate(),e.removeClass(S))}),g.disposed.connect(()=>{e.isDisposed||(e.activate(),e.removeClass(S)),l.delete(r),[o.findNext,o.findPrevious,o.end,o.toggleSearchInSelection].forEach(f=>{t.commands.notifyCommandChanged(f)})}),e.disposed.connect(()=>{g.dispose(),m.dispose(),a.dispose(),C.dispose()}),i=g}return i.isAttached||(j.attach(i,e.node),e.addClass(S),e instanceof M&&(e.contentHeader.node.style.setProperty("anchor-name",_),e.node.style.setProperty("anchor-scope",_),i.node.style.top=`anchor(${_} bottom)`),i.model.searchExpression&&i.model.refresh()),i};return t.commands.addCommand(o.search,{label:d.__("Find…"),isEnabled:b,describedBy:{args:{type:"object",properties:{searchText:{type:"string",description:d.__("The text to search for")}}}},execute:async e=>{const r=x(t.shell.currentWidget);if(r){const i=e.searchText;i?r.setSearchText(i):r.setSearchText(r.model.suggestedInitialQuery);const a=r.model.selectionState;let m=!1;switch(y){case"multiple-selected":m=a==="multiple";break;case"any-selected":m=a==="multiple"||a==="single";break}m&&await r.model.setFilter("selection",!0),r.focusSearchInput()}}}),t.commands.addCommand(o.searchAndReplace,{label:d.__("Find and Replace…"),isEnabled:b,describedBy:{args:{type:"object",properties:{searchText:{type:"string",description:d.__("The text to search for")},replaceText:{type:"string",description:d.__("The text to replace with")}}}},execute:e=>{const r=x(t.shell.currentWidget);if(r){const i=e.searchText;i?r.setSearchText(i):r.setSearchText(r.model.suggestedInitialQuery);const a=e.replaceText;a&&r.setReplaceText(a),r.showReplace(),r.focusSearchInput()}}}),t.commands.addCommand(o.findNext,{label:d.__("Find Next"),isEnabled:()=>!!t.shell.currentWidget&&l.has(t.shell.currentWidget.id),describedBy:{args:{type:"object",properties:{}}},execute:async()=>{var e;const r=t.shell.currentWidget;r&&await((e=l.get(r.id))===null||e===void 0?void 0:e.model.highlightNext())}}),t.commands.addCommand(o.findPrevious,{label:d.__("Find Previous"),isEnabled:()=>!!t.shell.currentWidget&&l.has(t.shell.currentWidget.id),describedBy:{args:{type:"object",properties:{}}},execute:async()=>{var e;const r=t.shell.currentWidget;r&&await((e=l.get(r.id))===null||e===void 0?void 0:e.model.highlightPrevious())}}),t.commands.addCommand(o.end,{label:d.__("End Search"),isEnabled:()=>!!t.shell.currentWidget&&l.has(t.shell.currentWidget.id),describedBy:{args:{type:"object",properties:{}}},execute:async()=>{var e;const r=t.shell.currentWidget;r&&((e=l.get(r.id))===null||e===void 0||e.close())}}),t.commands.addCommand(o.toggleSearchInSelection,{label:d.__("Search in Selection"),isEnabled:()=>!!t.shell.currentWidget&&l.has(t.shell.currentWidget.id)&&"selection"in l.get(t.shell.currentWidget.id).model.filtersDefinition,describedBy:{args:{type:"object",properties:{}}},execute:async()=>{var e;const r=t.shell.currentWidget;if(!r)return;const i=(e=l.get(r.id))===null||e===void 0?void 0:e.model;if(!i)return;const a=i.filters.selection;return i.setFilter("selection",!a)}}),(s=t.shell.currentChanged)===null||s===void 0||s.connect(()=>{Object.values(o).forEach(e=>{t.commands.notifyCommandChanged(e)})}),c&&[o.search,o.searchAndReplace,o.findNext,o.findPrevious,o.end,o.toggleSearchInSelection].forEach(e=>{c.addItem({command:e,category:d.__("Main Area")})}),p}},De=[T,L];export{De as default};
@@ -1,4 +1,4 @@
1
- import{aQ as Ve,gx as Ue,eh as Ke,g2 as $e,aM as ye,bw as qe,gy as ee,gz as He,cD as Ie,gA as Qe,cv as Ee,aN as De,aT as D,J as ue,cr as Ne,gB as Ye,gC as Xe,eg as Ge,ef as Je,_ as Ze,gD as et,gE as tt,gF as ot,cq as q,e6 as Te,cw as nt,e5 as Me,gG as it,gH as rt,e2 as at,dY as he,d_ as dt,e3 as st,gI as lt,dP as fe,cE as We,aS as ne,eI as Le,ek as ct,eQ as ut,aW as pt,eY as gt,dV as Se,gJ as mt}from"../datalayer-app-main.js";import{I as Pe,b as Be,a as ht}from"./token-BglqkSlO.js";import{T as Ae,I as ft,b as yt,g as vt,a as _t}from"./index-h8lXpqtD.js";import{I as Fe}from"./tokens-BUuPwJ9U.js";import{p as bt,c as Ct,f as wt,b as xt,q as Tt,M as Mt}from"./index-46VEGuyz.js";import{s as je}from"./hover-Du-rt4Qn.js";import{I as ve}from"./tokens-CGj56w43.js";import{I as St}from"./tokens-CcUJmvEV.js";import{I as kt}from"./tokens-DLcOlp5q.js";import{I as It}from"./tokens-Dj3mshtL.js";import{a as Et}from"./tokens-DQMPCAHQ.js";import{I as Nt}from"./index-B5W7CVUY.js";import{W as Wt,V as Lt,I as Pt,a as Bt,b as At,c as Ft}from"./document-D8R9MB2-.js";import{I as jt}from"./tokens-Bq_eiXUV.js";import{g as ke}from"./kernelfilestypes-D2B-sFfi.js";import{T as Ot,a as _e}from"./model-UAl84z_g.js";import"./hoverbox-CStlKQWE.js";import"./Output-DLpf2Of9.js";import"./index-CBWGYoQM.js";import"./dayjs.min-u3zuoSR8.js";import"./isEqual-BxgGIFfN.js";import"./d3-color-Jd8hXty2.js";import"./dist-N90VI44_.js";import"./index-Cz10oMGc.js";import"./RestartIcon-DvpOf5Mf.js";import"./CellSidebarExtension-CrdbRLaE.js";import"./NotebookSkeleton-DHQ--KEB.js";import"./Avatar-B0TcOj_b.js";import"./renderer-NdtLW87o.js";import"./SquareIcon-Dy3l3VdH.js";import"./FileDirectoryOpenFillIcon-Db8fP24q.js";import"./url-4_0MnaFQ.js";/* empty css *//* empty css */import"./style-DdAxk_bj.js";/* empty css */import"./style-Cj1gzCjo.js";/* empty css */import"./style-rkw8dR9f.js";import"./style-GHJFdtIz.js";import"./style-ZSIOeMoX.js";import"./style-iVfD6mFL.js";import"./style-DA-Ya7rp.js";import"./style-D3tvWcFO.js";import"./style-BOqStzF9.js";import"./style-ADLQJ-E9.js";import"./style-DgglluaK.js";import"./ArrowLeftIcon-sX3iNMG1.js";import"./SkubbleIcon-CAaVh_BE.js";import"./usePrimerThemeBridge-BfoXa7hP.js";import"./index-C644crfL.js";import"./KernelVariables-BIWju6rZ.js";import"./index-CavxlEgY.js";import"./SortAscIcon-CmH04s3F.js";import"./SortDescIcon-Qif6E10I.js";import"./NotebookToolbar-C1fpK-Vi.js";import"./RepoPushIcon-BtXQRhLa.js";import"./sessions-W_hhenw6.js";import"./tokens-DcXbsdvP.js";import"./drivecontents-BSbQpH52.js";import"./kernel-Cn-ejD4i.js";class be extends Ve{constructor(o){var d;super(),this.model=o.model;const u=new Ue({factory:o.factory,model:this.model,editorOptions:{...o.editorOptions,config:{...(d=o.editorOptions)===null||d===void 0?void 0:d.config,readOnly:!0}}});this.editor=u.editor,(this.layout=new Ke).addWidget(u)}static createCodeViewer(o){const{content:d,mimeType:u,...m}=o,h=new $e.Model({mimeType:u});h.sharedModel.setSource(d);const f=new be({...m,model:h});return f.disposed.connect(()=>{h.dispose()}),f}get content(){return this.model.sharedModel.getSource()}get mimeType(){return this.model.mimeType}}const zt=new ye("@jupyterlab/console:IConsoleTracker",`A widget tracker for code consoles.
1
+ import{aQ as Ve,gx as Ue,eh as Ke,g2 as $e,aM as ye,bw as qe,gy as ee,gz as He,cD as Ie,gA as Qe,cv as Ee,aN as De,aT as D,J as ue,cr as Ne,gB as Ye,gC as Xe,eg as Ge,ef as Je,_ as Ze,gD as et,gE as tt,gF as ot,cq as q,e6 as Te,cw as nt,e5 as Me,gG as it,gH as rt,e2 as at,dY as he,d_ as dt,e3 as st,gI as lt,dP as fe,cE as We,aS as ne,eI as Le,ek as ct,eQ as ut,aW as pt,eY as gt,dV as Se,gJ as mt}from"../datalayer-app-main.js";import{I as Pe,b as Be,a as ht}from"./token-BglqkSlO.js";import{T as Ae,I as ft,b as yt,g as vt,a as _t}from"./index-npitmnIA.js";import{I as Fe}from"./tokens-BUuPwJ9U.js";import{p as bt,c as Ct,f as wt,b as xt,q as Tt,M as Mt}from"./index-B5fl-cx7.js";import{s as je}from"./hover-Du-rt4Qn.js";import{I as ve}from"./tokens-CGj56w43.js";import{I as St}from"./tokens-CcUJmvEV.js";import{I as kt}from"./tokens-DLcOlp5q.js";import{I as It}from"./tokens-Dj3mshtL.js";import{a as Et}from"./tokens-DQMPCAHQ.js";import{I as Nt}from"./index-DE0JwlLw.js";import{W as Wt,V as Lt,I as Pt,a as Bt,b as At,c as Ft}from"./document-D8R9MB2-.js";import{I as jt}from"./tokens-Bq_eiXUV.js";import{g as ke}from"./kernelfilestypes-D2B-sFfi.js";import{T as Ot,a as _e}from"./model-UAl84z_g.js";import"./hoverbox-CStlKQWE.js";import"./Output-WQnm0VN5.js";import"./index-Dqc2hT2k.js";import"./dayjs.min-u3zuoSR8.js";import"./isEqual-BxgGIFfN.js";import"./d3-color-Jd8hXty2.js";import"./dist-N90VI44_.js";import"./index-Cz10oMGc.js";import"./RestartIcon-DvpOf5Mf.js";import"./CellSidebarExtension-umk7yQhN.js";import"./NotebookSkeleton-DHQ--KEB.js";import"./Avatar-B0TcOj_b.js";import"./renderer-DTpEU9RO.js";import"./SquareIcon-Dy3l3VdH.js";import"./FileDirectoryOpenFillIcon-Db8fP24q.js";import"./url-4_0MnaFQ.js";/* empty css *//* empty css */import"./style-DdAxk_bj.js";/* empty css */import"./style-Cj1gzCjo.js";/* empty css */import"./style-rkw8dR9f.js";import"./style-GHJFdtIz.js";import"./style-ZSIOeMoX.js";import"./style-iVfD6mFL.js";import"./style-DA-Ya7rp.js";import"./style-D3tvWcFO.js";import"./style-BOqStzF9.js";import"./style-ADLQJ-E9.js";import"./style-DgglluaK.js";import"./ArrowLeftIcon-sX3iNMG1.js";import"./SkubbleIcon-CAaVh_BE.js";import"./usePrimerThemeBridge-BfoXa7hP.js";import"./index-C644crfL.js";import"./KernelVariables-xXzfdk5t.js";import"./index-CavxlEgY.js";import"./SortAscIcon-CmH04s3F.js";import"./SortDescIcon-Qif6E10I.js";import"./NotebookToolbar-C1fpK-Vi.js";import"./RepoPushIcon-BtXQRhLa.js";import"./sessions-W_hhenw6.js";import"./tokens-DcXbsdvP.js";import"./drivecontents-BSbQpH52.js";import"./kernel-Cn-ejD4i.js";class be extends Ve{constructor(o){var d;super(),this.model=o.model;const u=new Ue({factory:o.factory,model:this.model,editorOptions:{...o.editorOptions,config:{...(d=o.editorOptions)===null||d===void 0?void 0:d.config,readOnly:!0}}});this.editor=u.editor,(this.layout=new Ke).addWidget(u)}static createCodeViewer(o){const{content:d,mimeType:u,...m}=o,h=new $e.Model({mimeType:u});h.sharedModel.setSource(d);const f=new be({...m,model:h});return f.disposed.connect(()=>{h.dispose()}),f}get content(){return this.model.sharedModel.getSource()}get mimeType(){return this.model.mimeType}}const zt=new ye("@jupyterlab/console:IConsoleTracker",`A widget tracker for code consoles.
2
2
  Use this if you want to be able to iterate over and interact with code consoles
3
3
  created by the application.`);class Rt extends Wt{constructor(o,d){const{docRegistry:u,...m}=d;super(o,m),this._readyDelegate=new qe,this.editor=o.content,this._docRegistry=u,this._virtualEditor=Object.freeze({getEditor:()=>this.editor.editor,ready:()=>Promise.resolve(this.editor.editor),reveal:()=>Promise.resolve(this.editor.editor)}),Promise.all([this.editor.context.ready,this.connectionManager.ready]).then(async()=>{await this.initOnceReady(),this._readyDelegate.resolve(),this._editorAdded.emit({editor:this._virtualEditor})}).catch(console.error)}get ready(){return this._readyDelegate.promise}get documentPath(){return this.widget.context.path}get mimeType(){var o;const d=this.editor.model.mimeType,u=Array.isArray(d)?(o=d[0])!==null&&o!==void 0?o:ee.defaultMimeType:d,m=this.editor.context.contentsModel;return u!=ee.defaultMimeType?u:m?this._docRegistry.getFileTypeForModel(m).mimeTypes[0]:u}get languageFileExtension(){let o=this.documentPath.split(".");return o[o.length-1]}get ceEditor(){return this.editor.editor}get activeEditor(){return this._virtualEditor}get wrapperElement(){return this.widget.node}get path(){return this.widget.context.path}get editors(){var o,d;return[{ceEditor:this._virtualEditor,type:"code",value:(d=(o=this.editor)===null||o===void 0?void 0:o.model.sharedModel.getSource())!==null&&d!==void 0?d:""}]}dispose(){this.isDisposed||(this._editorRemoved.emit({editor:this._virtualEditor}),this.editor.model.mimeTypeChanged.disconnect(this.reloadConnection),super.dispose())}createVirtualDocument(){return new Lt({language:this.language,foreignCodeExtractors:this.options.foreignCodeExtractorsManager,path:this.documentPath,fileExtension:this.languageFileExtension,standalone:!0,hasLspSupportedFile:!0})}getEditorIndexAt(o){return 0}getEditorIndex(o){return 0}getEditorWrapper(o){return this.wrapperElement}async initOnceReady(){this.initVirtual(),await this.connectDocument(this.virtualDocument,!1),this.editor.model.mimeTypeChanged.connect(this.reloadConnection,this)}}class Ce extends He{constructor(o){super(),this.widget=o,this._searchActive=!1}get isReadOnly(){return this.editor.getOption("readOnly")}get replaceOptionsSupport(){return{preserveCase:!0}}get editor(){return this.widget.content.editor}get model(){return this.widget.content.model}async startQuery(o,d){this._searchActive=!0,await super.startQuery(o,d),await this.highlightNext(!0,{from:"selection-start",scroll:!1,select:!1})}async endQuery(){this._searchActive=!1,await super.endQuery()}async onSharedModelChanged(o,d){if(this._searchActive)return super.onSharedModelChanged(o,d)}static createNew(o,d){return new Ce(o)}static isApplicable(o){return o instanceof Ie&&o.content instanceof bt&&o.content.editor instanceof Qe}getInitialQuery(){const o=this.editor;return o.state.sliceDoc(o.state.selection.main.from,o.state.selection.main.to)}}function Vt(r){return ue.createElement(Ae,{role:"button","aria-haspopup":!0,tabIndex:0,source:r.language,onClick:r.handleClick,onKeyDown:o=>{(o.key==="Enter"||o.key===" ")&&r.handleClick()}})}class te extends Ee{constructor(o){var d;super(new te.Model(o.languages)),this._handleClick=()=>{const m=new De({commands:this._commands}),h="fileeditor:change-language";this._popup&&this._popup.dispose(),this.model.languages.getLanguages().sort((f,y)=>{var w,M;const x=(w=f.displayName)!==null&&w!==void 0?w:f.name,I=(M=y.displayName)!==null&&M!==void 0?M:y.name;return x.localeCompare(I)}).forEach(f=>{var y;if(f.name.toLowerCase().indexOf("brainf")===0)return;const w={name:f.name,displayName:(y=f.displayName)!==null&&y!==void 0?y:f.name};m.addItem({command:h,args:w})}),this._popup=je({body:m,anchor:this,align:"left"})},this._popup=null,this._commands=o.commands,this.translator=(d=o.translator)!==null&&d!==void 0?d:D;const u=this.translator.load("jupyterlab");this.addClass("jp-mod-highlighted"),this.title.caption=u.__("Change text editor syntax highlighting")}render(){return this.model?ue.createElement(Vt,{language:this.model.language,handleClick:this._handleClick}):null}}(function(r){class o extends Ne{constructor(u){super(),this.languages=u,this._onMIMETypeChange=(m,h)=>{var f;const y=this._language,w=this.languages.findByMIME(h.newValue);this._language=(f=w?.name)!==null&&f!==void 0?f:ee.defaultMimeType,this._triggerChange(y,this._language)},this._language="",this._editor=null}get language(){return this._language}get editor(){return this._editor}set editor(u){var m;const h=this._editor;h!==null&&h.model.mimeTypeChanged.disconnect(this._onMIMETypeChange);const f=this._language;if(this._editor=u,this._editor===null)this._language="";else{const y=this.languages.findByMIME(this._editor.model.mimeType);this._language=(m=y?.name)!==null&&m!==void 0?m:ee.defaultMimeType,this._editor.model.mimeTypeChanged.connect(this._onMIMETypeChange)}this._triggerChange(f,this._language)}_triggerChange(u,m){u!==m&&this.stateChanged.emit(void 0)}}r.Model=o})(te||(te={}));function Ut(r){const d=(r.translator||D).load("jupyterlab"),u=typeof r.tabSpace=="number"?d.__("Spaces"):d.__("Tab Indent");return ue.createElement(Ae,{role:"button","aria-haspopup":!0,tabIndex:0,onClick:r.handleClick,onKeyDown:m=>{(m.key==="Enter"||m.key===" ")&&r.handleClick()},source:typeof r.tabSpace=="number"?`${u}: ${r.tabSpace}`:u,title:d.__("Change the indentation…")})}class oe extends Ee{constructor(o){super(new oe.Model),this._popup=null,this._menu=o.menu,this.translator=o.translator||D,this.addClass("jp-mod-highlighted")}render(){var o;if(!((o=this.model)===null||o===void 0)&&o.indentUnit){const d=this.model.indentUnit==="Tab"?null:parseInt(this.model.indentUnit,10);return ue.createElement(Ut,{tabSpace:d,handleClick:()=>this._handleClick(),translator:this.translator})}else return null}_handleClick(){const o=this._menu;this._popup&&this._popup.dispose(),o.aboutToClose.connect(this._menuClosed,this),this._popup=je({body:o,anchor:this,align:"right"}),o.update()}_menuClosed(){this.removeClass("jp-mod-clicked")}}(function(r){class o extends Ne{get indentUnit(){return this._indentUnit}set indentUnit(u){u!==this._indentUnit&&(this._indentUnit=u,this.stateChanged.emit())}}r.Model=o})(oe||(oe={}));class we extends Ot{createNew(o,d){const u=super.createNew(o,d),m=(h,f)=>{f&&o.content.editor.setCursorPosition({line:f.line,column:0})};return u.activeHeadingChanged.connect(m),o.disposed.connect(()=>{u.activeHeadingChanged.disconnect(m)}),u}}const Kt={part:1,chapter:1,section:1,subsection:2,subsubsection:3,paragraph:4,subparagraph:5},$t=/^\s*\\(section|subsection|subsubsection)\{(.+)\}/;class qt extends _e{get documentType(){return"latex"}get supportedOptions(){return["maximalDepth","numberHeaders"]}getHeadings(){if(!this.isActive)return Promise.resolve(null);const o=this.widget.content.model.sharedModel.getSource().split(`
4
4
  `),d=new Array;let u=d.length;const m=new Array;for(let h=0;h<o.length;h++){const f=o[h].match($t);if(f){const y=Kt[f[1]];if(y<=this.configuration.maximalDepth){const w=Ye(y,u,d,{...this.configuration,baseNumbering:1,numberingH1:!0});u=y,m.push({text:f[2],prefix:w,level:y,line:h})}}}return Promise.resolve(m)}}class Ht extends we{isApplicable(o){var d,u;if(super.isApplicable(o)){let h=(u=(d=o.content)===null||d===void 0?void 0:d.model)===null||u===void 0?void 0:u.mimeType;return h&&(h==="text/x-latex"||h==="text/x-stex")}return!1}_createNew(o,d){return new qt(o,d)}}class Qt extends _e{constructor(o,d,u=null){super(o,d),this.widget=o,this.parser=u}get documentType(){return"markdown"}async getHeadings(){if(!this.isActive)return Promise.resolve(null);const o=this.widget.content.model.sharedModel.getSource();return Ge(await Je(o,this.parser),{...this.configuration,numberHeaders:!1})}}class Dt extends we{constructor(o,d=null){super(o),this.parser=d}isApplicable(o){var d,u;if(super.isApplicable(o)){let h=(u=(d=o.content)===null||d===void 0?void 0:d.model)===null||u===void 0?void 0:u.mimeType;return h&&Xe(h)}return!1}_createNew(o,d){return new Qt(o,d,this.parser)}}let Z;try{Z=new RegExp("^\\s*(class |def |async def |from |import )","d")}catch{Z=new RegExp("^\\s*(class |def |async def |from |import )")}class Yt extends _e{get documentType(){return"python"}async getHeadings(){if(!this.isActive)return Promise.resolve(null);const o=this.widget.content.model.sharedModel.getSource().split(`
@@ -1,4 +1,4 @@
1
- import{d as V}from"./LexicalToolRegistry-BqxU1w4N.js";import{D as Vl,a as Yl,b as Gl,e as Zl,c as Kl,g as Ql,i as ec,f as tc,l as nc,h as sc,j as oc,k as rc,m as ic,n as ac,r as lc,o as cc,p as uc,q as dc,s as pc,t as fc,v as mc,w as gc,x as hc,y as bc,z as yc,u as xc}from"./LexicalToolRegistry-BqxU1w4N.js";import{_ as qt,E as Mn,G as Dn,H as Bn,K as me,M as Wt,O as ot,P as rt,Q as jn,R as Fn,S as Xt,U as Un,V as Jt,W as zn,X as Hn,Y as Vt,Z as Yt,a0 as qn,a1 as Wn,a2 as Xn,a3 as Jn,C as Gt,a4 as Vn,a5 as Zt,a6 as Yn,a7 as Gn,a8 as Ce,a9 as Q,aa as Kt,ab as it,ac as xe,ad as at,ae as Re,af as Zn,ag as Be,ah as Ve,ai as lt,aj as Kn,ak as Ye,al as Qn,am as es,an as ts,ao as Ge,ap as Qt,aq as en,ar as tn,as as Ie,at as ns,au as ss,av as nn,aw as os,ax as Pe,$ as rs,b as is,a as as,c as ls,ay as sn,az as Y,aA as cs,aB as us,aC as Ze,aD as ds,aE as ps,aF as fs,aG as ms,aH as ct,aI as gs,aJ as hs,aK as bs,aL as ys,aM as xs,aN as Es,aO as Oe,aP as Ke,aQ as bt,aR as yt,aS as Ts,aT as Cs,aU as vs,aV as ws,aW as Ss,aX as Ls,aY as _s,aZ as ks,a_ as As,l as on,a$ as Ns,b0 as $s,b1 as Rs,b2 as Is,b3 as Ps,b4 as Os,b5 as Ue,b6 as Ms,b7 as Ds,b8 as Bs,b9 as js,ba as Fs,bb as rn,bc as an,bd as ln,be as cn,k as Us,T as zs,L as Hs,y as qs,m as Ws,n as Xs,D as Js,o as Vs,p as Ys,q as Gs,s as Zs,v as Ks,bf as Qs,u as eo,F as to,w as no,x as so,bg as oo,bh as ro}from"./JupyterLexicalExtension-DpGAnn7v.js";import{bi as Tc,bj as Cc,bk as vc,bl as wc,bm as Sc,bn as Lc,bo as _c,bp as kc,bq as Ac,br as Nc,bs as $c,bt as Rc,bu as Ic,bv as Pc,d as Oc,e as Mc,bw as Dc,bx as Bc,j as jc,by as Fc,B as Uc,bz as zc,bA as Hc,bB as qc,bC as Wc,bD as Xc,bE as Jc,bF as Vc,bG as Yc,bH as Gc,bI as Zc,bJ as Kc,bK as Qc,bL as eu,bM as tu,bN as nu,bO as su,bP as ou,f as ru,bQ as iu,g as au,bR as lu,bS as cu,bT as uu,bU as du,bV as pu,t as fu,bW as mu,bX as gu,bY as hu,bZ as bu,b_ as yu,b$ as xu,c0 as Eu,c1 as Tu,c2 as Cu,c3 as vu,c4 as wu,c5 as Su,c6 as Lu,c7 as _u,c8 as ku,c9 as Au,ca as Nu,cb as $u,cc as Ru,cd as Iu,ce as Pu,cf as Ou,cg as Mu,ch as Du,ci as Bu,cj as ju,I as Fu,ck as Uu,cl as zu,cm as Hu,cn as qu,co as Wu,cp as Xu,cq as Ju,cr as Vu,cs as Yu,ct as Gu,cu as Zu,cv as Ku,h as Qu,A as ed,cw as td,cx as nd,cy as sd,cz as od,cA as rd,cB as id,cC as ad,cD as ld,cE as cd,cF as ud,cG as dd,J as pd,cH as fd,cI as md,cJ as gd,cK as hd,cL as bd,cM as yd,cN as xd,cO as Ed,cP as Td,cQ as Cd,cR as vd,cS as wd,cT as Sd,cU as Ld,cV as _d,cW as kd,cX as Ad,cY as Nd,cZ as $d,c_ as Rd,c$ as Id,d0 as Pd,d1 as Od,d2 as Md,d3 as Dd,d4 as Bd,d5 as jd,d6 as Fd,d7 as Ud,d8 as zd,d9 as Hd,da as qd,db as Wd,dc as Xd,dd as Jd,de as Vd,df as Yd,dg as Gd,dh as Zd,di as Kd,dj as Qd,dk as ep,dl as tp,dm as np,dn as sp,dp as op,dq as rp,dr as ip,ds as ap,dt as lp,du as cp,dv as up,dw as dp,dx as pp,dy as fp,dz as mp,dA as gp,dB as hp,dC as bp,dD as yp,dE as xp,dF as Ep,dG as Tp,dH as Cp,dI as vp,dJ as wp,dK as Sp,dL as Lp,dM as _p,dN as kp,dO as Ap,dP as Np,dQ as $p,dR as Rp,dS as Ip,dT as Pp,dU as Op,dV as Mp,dW as Dp,dX as Bp,dY as jp,dZ as Fp,d_ as Up,d$ as zp,e0 as Hp,e1 as qp,e2 as Wp,e3 as Xp,e4 as Jp,e5 as Vp,e6 as Yp,e7 as Gp,e8 as Zp,e9 as Kp,ea as Qp,eb as ef,ec as tf,ed as nf,ee as sf,ef as of,eg as rf,eh as af,ei as lf,ej as cf,ek as uf,el as df,em as pf,en as ff,eo as mf,ep as gf,eq as hf,er as bf,es as yf,et as xf,eu as Ef,ev as Tf,ew as Cf,ex as vf,ey as wf,ez as Sf,eA as Lf,eB as _f,eC as kf,eD as Af,eE as Nf,eF as $f,eG as Rf,eH as If,eI as Pf,eJ as Of,eK as Mf,eL as Df,eM as Bf,eN as jf,eO as Ff,eP as Uf,eQ as zf,eR as Hf,eS as qf,eT as Wf,eU as Xf,eV as Jf,eW as Vf,eX as Yf,r as Gf,eY as Zf,eZ as Kf,e_ as Qf,e$ as em,i as tm,f0 as nm,f1 as sm,f2 as om,f3 as rm,f4 as im,f5 as am,f6 as lm,f7 as cm,f8 as um,f9 as dm,fa as pm,fb as fm,fc as mm,fd as gm,fe as hm,ff as bm,fg as ym,fh as xm,fi as Em,fj as Tm,fk as Cm,fl as vm,fm as wm,fn as Sm,fo as Lm,fp as _m,fq as km,fr as Am,fs as Nm,ft as $m,fu as Rm,fv as Im}from"./JupyterLexicalExtension-DpGAnn7v.js";import{mq as io,r as m,j as h,ba as ao,b4 as lo,B as co,be as ee,mr as F,ms as ae,mt as un,mu as fe,mv as z,mw as uo,mx as po,my as fo,mz as mo,mA as j,bd as ce,mB as Ee,mC as ut,mD as go,mE as ho,mF as bo,mG as yo,mH as dn,mI as xo,mJ as Eo,mK as To,mL as Co,mM as vo,mN as wo,bc as So,an as M,ck as ve,mO as Lo,mP as se,mQ as X,mR as ye,mS as _o,mT as ko,mU as Ao,cl as No,mV as le,cn as pn,mW as fn,mX as mn,bH as gn,mY as pe,mZ as $o,m_ as Ro,aF as ie,a9 as Io,I as Le,fn as hn,z as Po,y as Oo,aH as Mo,W as Do,m$ as Bo,n0 as jo,aG as ze,n1 as Fo,n2 as xt,fN as Uo,fx as zo,T as Ho,n3 as Et,n4 as qo,n5 as Wo,n6 as Xo,n7 as Tt,n8 as Jo,n9 as Vo,b5 as Yo,b6 as Go,b0 as Zo,bb as Ko}from"../datalayer-app-main.js";import{CollapsiblePlugin as Om}from"./CollapsiblePlugin-CnG1qA1e.js";import{u as Qo,N as Ct}from"./usePrimerThemeBridge-BfoXa7hP.js";import{u as er}from"./Output-DLpf2Of9.js";import{T as tr}from"./ThemeContext-D9ztCaU3.js";import{a as Dm,u as Bm}from"./ThemeContext-D9ztCaU3.js";import{YouTubePlugin as Fm}from"./YouTubePlugin-DUDVTb3B.js";import"./NotebookSkeleton-DHQ--KEB.js";import"./Avatar-B0TcOj_b.js";import"./url-4_0MnaFQ.js";import"./isObject-CeOzAI2h.js";import"./toNumber-DUdf79Nr.js";import"./isSymbol-DfwdEMHq.js";import"./StrikethroughIcon-CbiEuPT-.js";import"./TypographyIcon-CCkcdj7U.js";import"./ArrowUpIcon-y5enrVH9.js";import"./floating-ui.react-dom-Bcd0th1j.js";import"./SortDescIcon-Qif6E10I.js";import"./VideoIcon-BTOb9gRv.js";import"./PrismCss-C5fDCsu9.js";import"./index-h8lXpqtD.js";import"./hoverbox-CStlKQWE.js";import"./index-B5W7CVUY.js";import"./index-CBWGYoQM.js";import"./dayjs.min-u3zuoSR8.js";import"./isEqual-BxgGIFfN.js";import"./d3-color-Jd8hXty2.js";import"./dist-N90VI44_.js";import"./index-Cz10oMGc.js";import"./RestartIcon-DvpOf5Mf.js";class nr{registry;_debug;constructor(t,n=!1){this.registry=t,this._debug=n}calculateIndent(t){const n=this.registry.getConfigOrDefault(t.language),s=this.getLeadingWhitespaceCount(t.currentLine);let o=s,r=!1,i=!1,l;for(const a of n.indentTriggers)if(this.matchesIndentRule(t.currentLine,a)){o=s+a.indentAmount,r=!0,l=a.name;break}if(!r){for(const a of n.dedentTriggers)if(this.matchesDedentRule(t.currentLine,a)){i=!0,l=a.name;break}}if(n.customRules){for(const a of n.customRules)if(a.condition(t.currentLine,t)){o=a.apply(o,t);break}}return o=Math.max(0,o),{spaces:o,shouldIndent:r,shouldDedent:i,triggeredRule:l}}getTabString(t){const n=this.registry.getConfigOrDefault(t);return n.useTabs?" ":" ".repeat(n.tabSize)}getTabSize(t){return this.registry.getConfigOrDefault(t).tabSize}calculateOutdent(t,n){const s=this.registry.getConfigOrDefault(n),o=t-s.tabSize;return Math.max(0,o)}getLeadingWhitespaceCount(t){const n=t.match(/^[\t ]*/);if(!n)return 0;const s=n[0];let o=0;for(const r of s)r===" "?o+=4:o+=1;return o}getLeadingWhitespace(t){const n=t.match(/^[\t ]*/);return n?n[0]:""}matchesIndentRule(t,n){switch(n.context){case"line-end":return n.pattern.test(t);case"line-start":return n.pattern.test(t);case"anywhere":return n.pattern.test(t);default:return!1}}matchesDedentRule(t,n){switch(n.context){case"line-start":return n.pattern.test(t);case"anywhere":return n.pattern.test(t);default:return!1}}normalizeIndentation(t,n){const s=this.registry.getConfigOrDefault(n);if(s.useTabs){const o=this.getLeadingWhitespace(t),r=o.length,i=Math.floor(r/s.tabSize),l=r%s.tabSize;return" ".repeat(i)+" ".repeat(l)+t.substring(o.length)}else{const o=this.getLeadingWhitespace(t);return o.replace(/\t/g," ".repeat(s.tabSize)).concat(t.substring(o.length))}}}const sr={language:"python",tabSize:4,useTabs:!1,indentTriggers:[{name:"colon-indent",pattern:/:\s*(#.*)?$/,context:"line-end",indentAmount:4},{name:"continuation-backslash",pattern:/\\\s*(#.*)?$/,context:"line-end",indentAmount:4},{name:"open-bracket",pattern:/[[({]\s*$/,context:"line-end",indentAmount:4}],dedentTriggers:[{name:"flow-control-keywords",pattern:/^\s*(return|break|continue|pass)(\s|$)/,context:"line-start",dedentAmount:4},{name:"raise-keyword",pattern:/^\s*raise(\s|$)/,context:"line-start",dedentAmount:4}],customRules:[{name:"close-bracket-dedent",condition:e=>/^\s*[\])}]/.test(e),apply:e=>Math.max(0,e-4)}]},bn={language:"javascript",tabSize:2,useTabs:!1,indentTriggers:[{name:"open-brace",pattern:/\{\s*(\/\/.*)?$/,context:"line-end",indentAmount:2},{name:"open-bracket",pattern:/\[\s*(\/\/.*)?$/,context:"line-end",indentAmount:2},{name:"open-paren",pattern:/\(\s*(\/\/.*)?$/,context:"line-end",indentAmount:2},{name:"arrow-function",pattern:/=>\s*(\/\/.*)?$/,context:"line-end",indentAmount:2},{name:"ternary-operator",pattern:/\?\s*(\/\/.*)?$/,context:"line-end",indentAmount:2}],dedentTriggers:[{name:"return-statement",pattern:/^\s*return(\s|;)/,context:"line-start",dedentAmount:2},{name:"break-continue",pattern:/^\s*(break|continue)(\s|;)/,context:"line-start",dedentAmount:2},{name:"throw-statement",pattern:/^\s*throw(\s|;)/,context:"line-start",dedentAmount:2}],customRules:[{name:"close-brace-dedent",condition:e=>/^\s*}/.test(e),apply:e=>Math.max(0,e-2)},{name:"close-bracket-dedent",condition:e=>/^\s*\]/.test(e),apply:e=>Math.max(0,e-2)},{name:"close-paren-dedent",condition:e=>/^\s*\)/.test(e),apply:e=>Math.max(0,e-2)},{name:"case-label",condition:e=>/^\s*(case\s+.*:|default:)/.test(e),apply:(e,t)=>e}]},or={...bn,language:"typescript"};class rr{configs;options;constructor(t={}){this.configs=new Map,this.options={defaultLanguage:"python",fallbackTabSize:4,debug:!1,...t},this.registerDefaultLanguages(),t.customConfigs&&t.customConfigs.forEach(n=>this.registerLanguage(n))}registerDefaultLanguages(){this.registerLanguage(sr),this.registerLanguage(bn),this.registerLanguage(or),this.registerAlias("py","python"),this.registerAlias("js","javascript"),this.registerAlias("ts","typescript"),this.registerAlias("jsx","javascript"),this.registerAlias("tsx","typescript")}registerLanguage(t){if(this.configs.has(t.language)){this.options.debug&&console.warn(`[LanguageIndentRegistry] Language '${t.language}' already registered. Use updateConfig() to modify.`);return}this.configs.set(t.language,t)}registerAlias(t,n){const s=this.configs.get(n);s&&this.configs.set(t,s)}getConfig(t){if(!t)return this.getConfig(this.options.defaultLanguage);const n=t.toLowerCase().trim();return this.configs.get(n)}getConfigOrDefault(t){const n=this.getConfig(t);if(n)return n;const s=this.getConfig(this.options.defaultLanguage);return s?(this.options.debug&&console.warn(`[LanguageIndentRegistry] Language '${t}' not found, using default: ${this.options.defaultLanguage}`),s):(this.options.debug&&console.error(`[LanguageIndentRegistry] No config found for '${t}' and default '${this.options.defaultLanguage}' missing!`),this.createFallbackConfig(t||"unknown"))}createFallbackConfig(t){return{language:t,tabSize:this.options.fallbackTabSize||4,useTabs:this.options.preserveTabs||!1,indentTriggers:[],dedentTriggers:[]}}hasLanguage(t){if(!t)return!1;const n=t.toLowerCase().trim();return this.configs.has(n)}updateConfig(t,n){const s=t.toLowerCase().trim(),o=this.configs.get(s);if(!o)return this.options.debug&&console.warn(`[LanguageIndentRegistry] Cannot update '${t}' - not registered`),!1;const r={...o,...n,language:o.language};return this.configs.set(s,r),!0}getRegisteredLanguages(){return Array.from(this.configs.keys())}clear(){this.configs.clear()}reset(){this.clear(),this.registerDefaultLanguages()}}const ir="[Deleted Comment]",Qe=e=>e.uid===e.thread_uid,yn=e=>e.anchor?.mark_id??e.uid,ar=(e,t)=>e.created_at!==t.created_at?e.created_at<t.created_at?-1:1:e.uid<t.uid?-1:e.uid>t.uid?1:0,He=(e,t)=>e!==void 0&&e.updated_at>t.updated_at?e:t,vt=e=>{const{uid:t,handle:n,name:s,agent_uid:o}=e.author;return t?{kind:"user",uid:t,handle:n??null,name:s??null,...o?{agentUid:o}:{}}:Bn(s||n)},lr=e=>({type:"comment",id:e.uid,author:Dn(vt(e)),authorPrincipal:vt(e),content:e.deleted?ir:e.body,deleted:e.deleted,...e.mentions&&e.mentions.length>0?{mentions:e.mentions}:{},timeStamp:Date.parse(e.created_at)});function cr(e){const t=[...e].sort(ar),n=new Map;for(const s of t)Qe(s)||n.set(s.thread_uid,[...n.get(s.thread_uid)??[],s]);return t.filter(s=>Qe(s)&&!s.deleted&&s.status==="open").map(s=>({type:"thread",id:yn(s),quote:s.quote??"",assignee:s.assignee??null,comments:[s,...n.get(s.uid)??[]].map(lr)}))}const wt=e=>e&&e.length>0?{mentions:e}:{};class dl{searchPeople;assignThread;_editor;_backend;_options;_listeners=new Set;_heardDuringReads=new Set;_records=new Map;_comments=[];constructor(t,n,s={}){this._editor=t,this._backend=n,this._options=s;const{searchPeople:o,assign:r}=n;o&&(this.searchPeople=i=>o.call(n,i).catch(l=>{throw this._options.onError?.(l),l})),r&&(this.assignThread=(i,l)=>this._write(()=>r.call(n,this._threadRecord(i).uid,l?.uid??null)))}connect(){const t=this._backend.subscribe({comment:n=>this._heard(n),ready:()=>{this.refresh()}});return this.refresh(),t}async refresh(){const t=new Map;this._heardDuringReads.add(t);try{const n=await this._backend.list(),s=new Map(n.map(o=>[o.uid,o]));for(const[o,r]of t)s.set(o,He(s.get(o),r));this._records=s,this._changed()}catch(n){this._options.onError?.(n)}finally{this._heardDuringReads.delete(t)}}getComments(){return this._comments}addComment(t,n){if(t.type==="thread"){const s=t.id,o=t.comments[0];this._write(()=>this._backend.create({body:o?.content??"",anchor:{mark_id:s},quote:t.quote,...wt(o?.mentions)}),()=>this._unmark(s))}else n!==void 0?this._write(()=>this._backend.create({body:t.content,thread_uid:this._threadRecord(n).uid,...wt(t.mentions)})):this._options.onError?.(new Error("A comment is written in a thread."))}deleteComment(t){this._write(()=>this._backend.delete(t.id))}deleteThread(t){this._write(()=>this._backend.delete(this._threadRecord(t).uid))}resolveThread(t){this._write(()=>this._backend.resolve(this._threadRecord(t).uid))}registerOnChange(t){return this._listeners.add(t),()=>{this._listeners.delete(t)}}_write(t,n){Promise.resolve().then(t).then(s=>this._heard(s),s=>{n?.(),this._options.onError?.(s)})}_threadRecord(t){for(const n of this._records.values())if(Qe(n)&&yn(n)===t.id)return n;throw new Error(`The thread ${t.id} is not one the store read.`)}_heard(t){for(const n of this._heardDuringReads)n.set(t.uid,He(n.get(t.uid),t));this._records.set(t.uid,He(this._records.get(t.uid),t)),this._changed()}_changed(){this._comments=cr(this._records.values());for(const t of this._listeners)t()}_unmark(t){this._editor.update(()=>{for(const{node:n}of io())qt(n)&&n.getIDs().includes(t)&&(n.deleteID(t),n.getIDs().length===0&&Mn(n))})}}const dt=m.createContext(void 0);function ur(){const e=m.useContext(dt);if(!e)throw new Error("useContext must be inside a Provider with a value");return e}const dr=dt.Provider,pl=dt.Consumer,fl=({children:e})=>{const[t,n]=m.useState();return h.jsx(dr,{value:{editor:t,setEditor:n},children:e})};function ml(e){const{useStore:t,children:n}=e,{colorMode:s,resolvedMode:o,themeConfig:r,themeBackground:i,lexicalTheme:l}=Qo(t);return h.jsx(ao,{colorMode:s,theme:r.primerTheme,themeStyles:r.themeStyles,children:h.jsx(lo,{colormode:o,backgroundColor:i,useBaseStyles:!1,children:h.jsx(co,{sx:{"& .editor-shell":{backgroundColor:i,borderRadius:2},"& .editor-container":{backgroundColor:i},"& .editor-inner":{backgroundColor:i},"& .editor-input":{backgroundColor:i},'& [role="toolbar"][aria-label="Editor toolbar"]':{backgroundColor:i}},children:h.jsx(tr.Provider,{value:{theme:l},children:n})})})})}const pr={"\\":"\\textbackslash{}","{":"\\{","}":"\\}",$:"\\$","&":"\\&","#":"\\#","^":"\\^{}",_:"\\_","%":"\\%","~":"\\~{}"};function K(e){return e.replace(/[\\{}$&#^_%~]/g,t=>pr[t]??t)}function pt(e,t,n="{",s="}"){let o=0;for(let r=t;r<e.length;r++){const i=e[r];if(i==="\\"){r++;continue}if(i===n)o++;else if(i===s&&(o--,o===0))return r}return-1}function W(e,t){let n=t;for(;n<e.length&&(e[n]===" "||e[n]===`
1
+ import{d as V}from"./LexicalToolRegistry-DI_iHg04.js";import{D as Vl,a as Yl,b as Gl,e as Zl,c as Kl,g as Ql,i as ec,f as tc,l as nc,h as sc,j as oc,k as rc,m as ic,n as ac,r as lc,o as cc,p as uc,q as dc,s as pc,t as fc,v as mc,w as gc,x as hc,y as bc,z as yc,u as xc}from"./LexicalToolRegistry-DI_iHg04.js";import{_ as qt,E as Mn,G as Dn,H as Bn,K as me,M as Wt,O as ot,P as rt,Q as jn,R as Fn,S as Xt,U as Un,V as Jt,W as zn,X as Hn,Y as Vt,Z as Yt,a0 as qn,a1 as Wn,a2 as Xn,a3 as Jn,C as Gt,a4 as Vn,a5 as Zt,a6 as Yn,a7 as Gn,a8 as Ce,a9 as Q,aa as Kt,ab as it,ac as xe,ad as at,ae as Re,af as Zn,ag as Be,ah as Ve,ai as lt,aj as Kn,ak as Ye,al as Qn,am as es,an as ts,ao as Ge,ap as Qt,aq as en,ar as tn,as as Ie,at as ns,au as ss,av as nn,aw as os,ax as Pe,$ as rs,b as is,a as as,c as ls,ay as sn,az as Y,aA as cs,aB as us,aC as Ze,aD as ds,aE as ps,aF as fs,aG as ms,aH as ct,aI as gs,aJ as hs,aK as bs,aL as ys,aM as xs,aN as Es,aO as Oe,aP as Ke,aQ as bt,aR as yt,aS as Ts,aT as Cs,aU as vs,aV as ws,aW as Ss,aX as Ls,aY as _s,aZ as ks,a_ as As,l as on,a$ as Ns,b0 as $s,b1 as Rs,b2 as Is,b3 as Ps,b4 as Os,b5 as Ue,b6 as Ms,b7 as Ds,b8 as Bs,b9 as js,ba as Fs,bb as rn,bc as an,bd as ln,be as cn,k as Us,T as zs,L as Hs,y as qs,m as Ws,n as Xs,D as Js,o as Vs,p as Ys,q as Gs,s as Zs,v as Ks,bf as Qs,u as eo,F as to,w as no,x as so,bg as oo,bh as ro}from"./JupyterLexicalExtension-Be8mweC6.js";import{bi as Tc,bj as Cc,bk as vc,bl as wc,bm as Sc,bn as Lc,bo as _c,bp as kc,bq as Ac,br as Nc,bs as $c,bt as Rc,bu as Ic,bv as Pc,d as Oc,e as Mc,bw as Dc,bx as Bc,j as jc,by as Fc,B as Uc,bz as zc,bA as Hc,bB as qc,bC as Wc,bD as Xc,bE as Jc,bF as Vc,bG as Yc,bH as Gc,bI as Zc,bJ as Kc,bK as Qc,bL as eu,bM as tu,bN as nu,bO as su,bP as ou,f as ru,bQ as iu,g as au,bR as lu,bS as cu,bT as uu,bU as du,bV as pu,t as fu,bW as mu,bX as gu,bY as hu,bZ as bu,b_ as yu,b$ as xu,c0 as Eu,c1 as Tu,c2 as Cu,c3 as vu,c4 as wu,c5 as Su,c6 as Lu,c7 as _u,c8 as ku,c9 as Au,ca as Nu,cb as $u,cc as Ru,cd as Iu,ce as Pu,cf as Ou,cg as Mu,ch as Du,ci as Bu,cj as ju,I as Fu,ck as Uu,cl as zu,cm as Hu,cn as qu,co as Wu,cp as Xu,cq as Ju,cr as Vu,cs as Yu,ct as Gu,cu as Zu,cv as Ku,h as Qu,A as ed,cw as td,cx as nd,cy as sd,cz as od,cA as rd,cB as id,cC as ad,cD as ld,cE as cd,cF as ud,cG as dd,J as pd,cH as fd,cI as md,cJ as gd,cK as hd,cL as bd,cM as yd,cN as xd,cO as Ed,cP as Td,cQ as Cd,cR as vd,cS as wd,cT as Sd,cU as Ld,cV as _d,cW as kd,cX as Ad,cY as Nd,cZ as $d,c_ as Rd,c$ as Id,d0 as Pd,d1 as Od,d2 as Md,d3 as Dd,d4 as Bd,d5 as jd,d6 as Fd,d7 as Ud,d8 as zd,d9 as Hd,da as qd,db as Wd,dc as Xd,dd as Jd,de as Vd,df as Yd,dg as Gd,dh as Zd,di as Kd,dj as Qd,dk as ep,dl as tp,dm as np,dn as sp,dp as op,dq as rp,dr as ip,ds as ap,dt as lp,du as cp,dv as up,dw as dp,dx as pp,dy as fp,dz as mp,dA as gp,dB as hp,dC as bp,dD as yp,dE as xp,dF as Ep,dG as Tp,dH as Cp,dI as vp,dJ as wp,dK as Sp,dL as Lp,dM as _p,dN as kp,dO as Ap,dP as Np,dQ as $p,dR as Rp,dS as Ip,dT as Pp,dU as Op,dV as Mp,dW as Dp,dX as Bp,dY as jp,dZ as Fp,d_ as Up,d$ as zp,e0 as Hp,e1 as qp,e2 as Wp,e3 as Xp,e4 as Jp,e5 as Vp,e6 as Yp,e7 as Gp,e8 as Zp,e9 as Kp,ea as Qp,eb as ef,ec as tf,ed as nf,ee as sf,ef as of,eg as rf,eh as af,ei as lf,ej as cf,ek as uf,el as df,em as pf,en as ff,eo as mf,ep as gf,eq as hf,er as bf,es as yf,et as xf,eu as Ef,ev as Tf,ew as Cf,ex as vf,ey as wf,ez as Sf,eA as Lf,eB as _f,eC as kf,eD as Af,eE as Nf,eF as $f,eG as Rf,eH as If,eI as Pf,eJ as Of,eK as Mf,eL as Df,eM as Bf,eN as jf,eO as Ff,eP as Uf,eQ as zf,eR as Hf,eS as qf,eT as Wf,eU as Xf,eV as Jf,eW as Vf,eX as Yf,r as Gf,eY as Zf,eZ as Kf,e_ as Qf,e$ as em,i as tm,f0 as nm,f1 as sm,f2 as om,f3 as rm,f4 as im,f5 as am,f6 as lm,f7 as cm,f8 as um,f9 as dm,fa as pm,fb as fm,fc as mm,fd as gm,fe as hm,ff as bm,fg as ym,fh as xm,fi as Em,fj as Tm,fk as Cm,fl as vm,fm as wm,fn as Sm,fo as Lm,fp as _m,fq as km,fr as Am,fs as Nm,ft as $m,fu as Rm,fv as Im}from"./JupyterLexicalExtension-Be8mweC6.js";import{mp as io,r as m,j as h,ba as ao,b4 as lo,B as co,be as ee,mq as F,mr as ae,ms as un,mt as fe,mu as z,mv as uo,mw as po,mx as fo,my as mo,mz as j,bd as ce,mA as Ee,mB as ut,mC as go,mD as ho,mE as bo,mF as yo,mG as dn,mH as xo,mI as Eo,mJ as To,mK as Co,mL as vo,mM as wo,bc as So,an as M,ck as ve,mN as Lo,mO as se,mP as X,mQ as ye,mR as _o,mS as ko,mT as Ao,cl as No,mU as le,cn as pn,mV as fn,mW as mn,bH as gn,mX as pe,mY as $o,mZ as Ro,aF as ie,a9 as Io,I as Le,fn as hn,z as Po,y as Oo,aH as Mo,W as Do,m_ as Bo,m$ as jo,aG as ze,n0 as Fo,n1 as xt,fN as Uo,fx as zo,T as Ho,n2 as Et,n3 as qo,n4 as Wo,n5 as Xo,n6 as Tt,n7 as Jo,n8 as Vo,b5 as Yo,b6 as Go,b0 as Zo,bb as Ko}from"../datalayer-app-main.js";import{CollapsiblePlugin as Om}from"./CollapsiblePlugin-7P9eK3oU.js";import{u as Qo,N as Ct}from"./usePrimerThemeBridge-BfoXa7hP.js";import{u as er}from"./Output-WQnm0VN5.js";import{T as tr}from"./ThemeContext-D9ztCaU3.js";import{a as Dm,u as Bm}from"./ThemeContext-D9ztCaU3.js";import{YouTubePlugin as Fm}from"./YouTubePlugin-DgTStKvk.js";import"./NotebookSkeleton-DHQ--KEB.js";import"./Avatar-B0TcOj_b.js";import"./url-4_0MnaFQ.js";import"./isObject-CeOzAI2h.js";import"./toNumber-DUdf79Nr.js";import"./isSymbol-DfwdEMHq.js";import"./StrikethroughIcon-CbiEuPT-.js";import"./TypographyIcon-CCkcdj7U.js";import"./ArrowUpIcon-y5enrVH9.js";import"./floating-ui.react-dom-Bcd0th1j.js";import"./SortDescIcon-Qif6E10I.js";import"./VideoIcon-BTOb9gRv.js";import"./PrismCss-C5fDCsu9.js";import"./index-npitmnIA.js";import"./hoverbox-CStlKQWE.js";import"./index-DE0JwlLw.js";import"./index-Dqc2hT2k.js";import"./dayjs.min-u3zuoSR8.js";import"./isEqual-BxgGIFfN.js";import"./d3-color-Jd8hXty2.js";import"./dist-N90VI44_.js";import"./index-Cz10oMGc.js";import"./RestartIcon-DvpOf5Mf.js";class nr{registry;_debug;constructor(t,n=!1){this.registry=t,this._debug=n}calculateIndent(t){const n=this.registry.getConfigOrDefault(t.language),s=this.getLeadingWhitespaceCount(t.currentLine);let o=s,r=!1,i=!1,l;for(const a of n.indentTriggers)if(this.matchesIndentRule(t.currentLine,a)){o=s+a.indentAmount,r=!0,l=a.name;break}if(!r){for(const a of n.dedentTriggers)if(this.matchesDedentRule(t.currentLine,a)){i=!0,l=a.name;break}}if(n.customRules){for(const a of n.customRules)if(a.condition(t.currentLine,t)){o=a.apply(o,t);break}}return o=Math.max(0,o),{spaces:o,shouldIndent:r,shouldDedent:i,triggeredRule:l}}getTabString(t){const n=this.registry.getConfigOrDefault(t);return n.useTabs?" ":" ".repeat(n.tabSize)}getTabSize(t){return this.registry.getConfigOrDefault(t).tabSize}calculateOutdent(t,n){const s=this.registry.getConfigOrDefault(n),o=t-s.tabSize;return Math.max(0,o)}getLeadingWhitespaceCount(t){const n=t.match(/^[\t ]*/);if(!n)return 0;const s=n[0];let o=0;for(const r of s)r===" "?o+=4:o+=1;return o}getLeadingWhitespace(t){const n=t.match(/^[\t ]*/);return n?n[0]:""}matchesIndentRule(t,n){switch(n.context){case"line-end":return n.pattern.test(t);case"line-start":return n.pattern.test(t);case"anywhere":return n.pattern.test(t);default:return!1}}matchesDedentRule(t,n){switch(n.context){case"line-start":return n.pattern.test(t);case"anywhere":return n.pattern.test(t);default:return!1}}normalizeIndentation(t,n){const s=this.registry.getConfigOrDefault(n);if(s.useTabs){const o=this.getLeadingWhitespace(t),r=o.length,i=Math.floor(r/s.tabSize),l=r%s.tabSize;return" ".repeat(i)+" ".repeat(l)+t.substring(o.length)}else{const o=this.getLeadingWhitespace(t);return o.replace(/\t/g," ".repeat(s.tabSize)).concat(t.substring(o.length))}}}const sr={language:"python",tabSize:4,useTabs:!1,indentTriggers:[{name:"colon-indent",pattern:/:\s*(#.*)?$/,context:"line-end",indentAmount:4},{name:"continuation-backslash",pattern:/\\\s*(#.*)?$/,context:"line-end",indentAmount:4},{name:"open-bracket",pattern:/[[({]\s*$/,context:"line-end",indentAmount:4}],dedentTriggers:[{name:"flow-control-keywords",pattern:/^\s*(return|break|continue|pass)(\s|$)/,context:"line-start",dedentAmount:4},{name:"raise-keyword",pattern:/^\s*raise(\s|$)/,context:"line-start",dedentAmount:4}],customRules:[{name:"close-bracket-dedent",condition:e=>/^\s*[\])}]/.test(e),apply:e=>Math.max(0,e-4)}]},bn={language:"javascript",tabSize:2,useTabs:!1,indentTriggers:[{name:"open-brace",pattern:/\{\s*(\/\/.*)?$/,context:"line-end",indentAmount:2},{name:"open-bracket",pattern:/\[\s*(\/\/.*)?$/,context:"line-end",indentAmount:2},{name:"open-paren",pattern:/\(\s*(\/\/.*)?$/,context:"line-end",indentAmount:2},{name:"arrow-function",pattern:/=>\s*(\/\/.*)?$/,context:"line-end",indentAmount:2},{name:"ternary-operator",pattern:/\?\s*(\/\/.*)?$/,context:"line-end",indentAmount:2}],dedentTriggers:[{name:"return-statement",pattern:/^\s*return(\s|;)/,context:"line-start",dedentAmount:2},{name:"break-continue",pattern:/^\s*(break|continue)(\s|;)/,context:"line-start",dedentAmount:2},{name:"throw-statement",pattern:/^\s*throw(\s|;)/,context:"line-start",dedentAmount:2}],customRules:[{name:"close-brace-dedent",condition:e=>/^\s*}/.test(e),apply:e=>Math.max(0,e-2)},{name:"close-bracket-dedent",condition:e=>/^\s*\]/.test(e),apply:e=>Math.max(0,e-2)},{name:"close-paren-dedent",condition:e=>/^\s*\)/.test(e),apply:e=>Math.max(0,e-2)},{name:"case-label",condition:e=>/^\s*(case\s+.*:|default:)/.test(e),apply:(e,t)=>e}]},or={...bn,language:"typescript"};class rr{configs;options;constructor(t={}){this.configs=new Map,this.options={defaultLanguage:"python",fallbackTabSize:4,debug:!1,...t},this.registerDefaultLanguages(),t.customConfigs&&t.customConfigs.forEach(n=>this.registerLanguage(n))}registerDefaultLanguages(){this.registerLanguage(sr),this.registerLanguage(bn),this.registerLanguage(or),this.registerAlias("py","python"),this.registerAlias("js","javascript"),this.registerAlias("ts","typescript"),this.registerAlias("jsx","javascript"),this.registerAlias("tsx","typescript")}registerLanguage(t){if(this.configs.has(t.language)){this.options.debug&&console.warn(`[LanguageIndentRegistry] Language '${t.language}' already registered. Use updateConfig() to modify.`);return}this.configs.set(t.language,t)}registerAlias(t,n){const s=this.configs.get(n);s&&this.configs.set(t,s)}getConfig(t){if(!t)return this.getConfig(this.options.defaultLanguage);const n=t.toLowerCase().trim();return this.configs.get(n)}getConfigOrDefault(t){const n=this.getConfig(t);if(n)return n;const s=this.getConfig(this.options.defaultLanguage);return s?(this.options.debug&&console.warn(`[LanguageIndentRegistry] Language '${t}' not found, using default: ${this.options.defaultLanguage}`),s):(this.options.debug&&console.error(`[LanguageIndentRegistry] No config found for '${t}' and default '${this.options.defaultLanguage}' missing!`),this.createFallbackConfig(t||"unknown"))}createFallbackConfig(t){return{language:t,tabSize:this.options.fallbackTabSize||4,useTabs:this.options.preserveTabs||!1,indentTriggers:[],dedentTriggers:[]}}hasLanguage(t){if(!t)return!1;const n=t.toLowerCase().trim();return this.configs.has(n)}updateConfig(t,n){const s=t.toLowerCase().trim(),o=this.configs.get(s);if(!o)return this.options.debug&&console.warn(`[LanguageIndentRegistry] Cannot update '${t}' - not registered`),!1;const r={...o,...n,language:o.language};return this.configs.set(s,r),!0}getRegisteredLanguages(){return Array.from(this.configs.keys())}clear(){this.configs.clear()}reset(){this.clear(),this.registerDefaultLanguages()}}const ir="[Deleted Comment]",Qe=e=>e.uid===e.thread_uid,yn=e=>e.anchor?.mark_id??e.uid,ar=(e,t)=>e.created_at!==t.created_at?e.created_at<t.created_at?-1:1:e.uid<t.uid?-1:e.uid>t.uid?1:0,He=(e,t)=>e!==void 0&&e.updated_at>t.updated_at?e:t,vt=e=>{const{uid:t,handle:n,name:s,agent_uid:o}=e.author;return t?{kind:"user",uid:t,handle:n??null,name:s??null,...o?{agentUid:o}:{}}:Bn(s||n)},lr=e=>({type:"comment",id:e.uid,author:Dn(vt(e)),authorPrincipal:vt(e),content:e.deleted?ir:e.body,deleted:e.deleted,...e.mentions&&e.mentions.length>0?{mentions:e.mentions}:{},timeStamp:Date.parse(e.created_at)});function cr(e){const t=[...e].sort(ar),n=new Map;for(const s of t)Qe(s)||n.set(s.thread_uid,[...n.get(s.thread_uid)??[],s]);return t.filter(s=>Qe(s)&&!s.deleted&&s.status==="open").map(s=>({type:"thread",id:yn(s),quote:s.quote??"",assignee:s.assignee??null,comments:[s,...n.get(s.uid)??[]].map(lr)}))}const wt=e=>e&&e.length>0?{mentions:e}:{};class dl{searchPeople;assignThread;_editor;_backend;_options;_listeners=new Set;_heardDuringReads=new Set;_records=new Map;_comments=[];constructor(t,n,s={}){this._editor=t,this._backend=n,this._options=s;const{searchPeople:o,assign:r}=n;o&&(this.searchPeople=i=>o.call(n,i).catch(l=>{throw this._options.onError?.(l),l})),r&&(this.assignThread=(i,l)=>this._write(()=>r.call(n,this._threadRecord(i).uid,l?.uid??null)))}connect(){const t=this._backend.subscribe({comment:n=>this._heard(n),ready:()=>{this.refresh()}});return this.refresh(),t}async refresh(){const t=new Map;this._heardDuringReads.add(t);try{const n=await this._backend.list(),s=new Map(n.map(o=>[o.uid,o]));for(const[o,r]of t)s.set(o,He(s.get(o),r));this._records=s,this._changed()}catch(n){this._options.onError?.(n)}finally{this._heardDuringReads.delete(t)}}getComments(){return this._comments}addComment(t,n){if(t.type==="thread"){const s=t.id,o=t.comments[0];this._write(()=>this._backend.create({body:o?.content??"",anchor:{mark_id:s},quote:t.quote,...wt(o?.mentions)}),()=>this._unmark(s))}else n!==void 0?this._write(()=>this._backend.create({body:t.content,thread_uid:this._threadRecord(n).uid,...wt(t.mentions)})):this._options.onError?.(new Error("A comment is written in a thread."))}deleteComment(t){this._write(()=>this._backend.delete(t.id))}deleteThread(t){this._write(()=>this._backend.delete(this._threadRecord(t).uid))}resolveThread(t){this._write(()=>this._backend.resolve(this._threadRecord(t).uid))}registerOnChange(t){return this._listeners.add(t),()=>{this._listeners.delete(t)}}_write(t,n){Promise.resolve().then(t).then(s=>this._heard(s),s=>{n?.(),this._options.onError?.(s)})}_threadRecord(t){for(const n of this._records.values())if(Qe(n)&&yn(n)===t.id)return n;throw new Error(`The thread ${t.id} is not one the store read.`)}_heard(t){for(const n of this._heardDuringReads)n.set(t.uid,He(n.get(t.uid),t));this._records.set(t.uid,He(this._records.get(t.uid),t)),this._changed()}_changed(){this._comments=cr(this._records.values());for(const t of this._listeners)t()}_unmark(t){this._editor.update(()=>{for(const{node:n}of io())qt(n)&&n.getIDs().includes(t)&&(n.deleteID(t),n.getIDs().length===0&&Mn(n))})}}const dt=m.createContext(void 0);function ur(){const e=m.useContext(dt);if(!e)throw new Error("useContext must be inside a Provider with a value");return e}const dr=dt.Provider,pl=dt.Consumer,fl=({children:e})=>{const[t,n]=m.useState();return h.jsx(dr,{value:{editor:t,setEditor:n},children:e})};function ml(e){const{useStore:t,children:n}=e,{colorMode:s,resolvedMode:o,themeConfig:r,themeBackground:i,lexicalTheme:l}=Qo(t);return h.jsx(ao,{colorMode:s,theme:r.primerTheme,themeStyles:r.themeStyles,children:h.jsx(lo,{colormode:o,backgroundColor:i,useBaseStyles:!1,children:h.jsx(co,{sx:{"& .editor-shell":{backgroundColor:i,borderRadius:2},"& .editor-container":{backgroundColor:i},"& .editor-inner":{backgroundColor:i},"& .editor-input":{backgroundColor:i},'& [role="toolbar"][aria-label="Editor toolbar"]':{backgroundColor:i}},children:h.jsx(tr.Provider,{value:{theme:l},children:n})})})})}const pr={"\\":"\\textbackslash{}","{":"\\{","}":"\\}",$:"\\$","&":"\\&","#":"\\#","^":"\\^{}",_:"\\_","%":"\\%","~":"\\~{}"};function K(e){return e.replace(/[\\{}$&#^_%~]/g,t=>pr[t]??t)}function pt(e,t,n="{",s="}"){let o=0;for(let r=t;r<e.length;r++){const i=e[r];if(i==="\\"){r++;continue}if(i===n)o++;else if(i===s&&(o--,o===0))return r}return-1}function W(e,t){let n=t;for(;n<e.length&&(e[n]===" "||e[n]===`
2
2
  `);)n++;if(e[n]!=="{")return null;const s=pt(e,n);return s===-1?null:{value:e.slice(n+1,s),end:s+1}}function ne(e,t){let n=t;for(;n<e.length&&e[n]===" ";)n++;if(e[n]!=="[")return null;const s=pt(e,n,"[","]");return s===-1?null:{value:e.slice(n+1,s),end:s+1}}function xn(e){return e.split(`
3
3
  `).map(t=>{for(let n=0;n<t.length;n++){if(t[n]==="\\"){n++;continue}if(t[n]==="%")return t.slice(0,n)}return t}).join(`
4
4
  `)}function En(e,t){if(!e)return null;const n=new RegExp(`(?:^|,)\\s*${t}\\s*=\\s*([^,]+)`).exec(e);return n?n[1].trim():null}function oe(e,t,n){const s=[];let o=t;for(let r=0;r<n;r++){const i=W(e,o);if(!i)break;s.push(i.value),o=i.end}return{values:s,end:o}}function fr(e){const t=e.indexOf("\\begin{document}");if(t===-1)return{body:e,preamble:""};const n=t+16,s=e.lastIndexOf("\\end{document}");return{body:s===-1?e.slice(n):e.slice(n,s),preamble:e.slice(0,t)}}function Tn(e){return e.charAt(0).toUpperCase()+e.slice(1)}const mr=new Set(["book","report","memoir","scrbook","scrreprt","amsbook","thesis","mitthesis","phdthesis","bookest"]);function Cn(e,t){return mr.has((e??"").toLowerCase())||t!==void 0&&/(?<!\\)\\chapter\b/.test(t)}const gr={h1:"section",h2:"subsection",h3:"subsubsection",h4:"paragraph",h5:"subparagraph",h6:"subparagraph"},hr={h1:"chapter",h2:"section",h3:"subsection",h4:"subsubsection",h5:"paragraph",h6:"subparagraph"},br={part:"h1",chapter:"h1",section:"h1",subsection:"h2",subsubsection:"h3",paragraph:"h4",subparagraph:"h5"},yr={part:"h1",chapter:"h1",section:"h2",subsection:"h3",subsubsection:"h4",paragraph:"h5",subparagraph:"h6"};function xr(e){return e?{js:"JavaScript",javascript:"JavaScript",ts:"TypeScript",typescript:"TypeScript",py:"Python",python:"Python",sh:"bash",bash:"bash",r:"R",sql:"SQL",c:"C",cpp:"C++",java:"Java",html:"HTML",xml:"XML",json:"JSON",markdown:"Markdown",md:"Markdown"}[e.toLowerCase()]??e:null}function ft(e){return e.replace(/^\n/,"").replace(/\n[ \t]*$/,"")}function Er(e){if(uo(e))return St(e.text);if(po(e)||fo(e)){const t=e.data["text/plain"];return t===void 0?null:St(t)}return mo(e)?e.traceback.join(`
@@ -1,2 +1,2 @@
1
- import{ec as M,ed as F,ee as P,ef as S,eg as I,aM as O,aQ as A,bw as W,am as E,aT as q,eh as H,cq as T,aK as j,cz as D,ei as B,ej as V,ek as L,aS as N,el as z,dV as U}from"../datalayer-app-main.js";import{f as Y,I as $}from"./index-46VEGuyz.js";import{I as G}from"./tokens-CGj56w43.js";import{a as K,C as R}from"./index-h8lXpqtD.js";import{T as Q,a as J}from"./model-UAl84z_g.js";import"./Output-DLpf2Of9.js";import"./index-B5W7CVUY.js";import"./hoverbox-CStlKQWE.js";import"./index-CBWGYoQM.js";import"./dayjs.min-u3zuoSR8.js";import"./isEqual-BxgGIFfN.js";import"./d3-color-Jd8hXty2.js";import"./dist-N90VI44_.js";import"./index-Cz10oMGc.js";import"./RestartIcon-DvpOf5Mf.js";import"./CellSidebarExtension-CrdbRLaE.js";import"./NotebookSkeleton-DHQ--KEB.js";import"./Avatar-B0TcOj_b.js";import"./renderer-NdtLW87o.js";import"./SquareIcon-Dy3l3VdH.js";import"./FileDirectoryOpenFillIcon-Db8fP24q.js";import"./url-4_0MnaFQ.js";/* empty css *//* empty css */import"./style-DdAxk_bj.js";/* empty css */import"./style-Cj1gzCjo.js";/* empty css */import"./style-rkw8dR9f.js";import"./style-GHJFdtIz.js";import"./style-ZSIOeMoX.js";import"./style-iVfD6mFL.js";import"./style-DA-Ya7rp.js";import"./style-D3tvWcFO.js";import"./style-BOqStzF9.js";import"./style-ADLQJ-E9.js";import"./style-DgglluaK.js";import"./ArrowLeftIcon-sX3iNMG1.js";import"./SkubbleIcon-CAaVh_BE.js";import"./usePrimerThemeBridge-BfoXa7hP.js";import"./index-C644crfL.js";import"./KernelVariables-BIWju6rZ.js";import"./index-CavxlEgY.js";import"./SortAscIcon-CmH04s3F.js";import"./SortDescIcon-Qif6E10I.js";import"./NotebookToolbar-C1fpK-Vi.js";import"./RepoPushIcon-BtXQRhLa.js";import"./sessions-W_hhenw6.js";import"./tokens-DcXbsdvP.js";import"./drivecontents-BSbQpH52.js";import"./kernel-Cn-ejD4i.js";class X extends J{constructor(e,r,t){super(e,t),this.parser=r}get documentType(){return"markdown-viewer"}get isAlwaysActive(){return!0}get supportedOptions(){return["maximalDepth","numberingH1","numberHeaders"]}async getHeadings(){const e=this.widget.context.model.toString(),r=await S(e,this.parser),t=I(r,{...this.configuration,baseNumbering:1});return Promise.resolve(t)}}class Z extends Q{constructor(e,r,t){super(e),this.parser=r,this.sanitizer=t}_createNew(e,r){const t=new X(e,this.parser,r);let o=new WeakMap;const p=(c,m)=>{if(m){const a=o.get(m);if(a){const h=e.content.node.getBoundingClientRect(),l=a.getBoundingClientRect();(l.top>h.bottom||l.bottom<h.top)&&a.scrollIntoView({block:"center"})}else console.warn("Heading element not found for heading",m,"in widget",e)}},s=()=>{this.parser&&(M(e.content.node),o=new WeakMap,t.headings.forEach(async c=>{var m,a;const h=await F(this.parser,c.raw,c.level,this.sanitizer);if(!h)return;const l=(m=this.sanitizer.allowNamedProperties)!==null&&m!==void 0&&m?"id":"data-jupyter-id",w=`h${c.level}[${l}="${CSS.escape(h)}"]`;o.set(c,P(e.content.node,w,(a=c.prefix)!==null&&a!==void 0?a:""))}))};return e.content.ready.then(()=>{s(),e.content.rendered.connect(s),t.activeHeadingChanged.connect(p),t.headingsChanged.connect(s),e.disposed.connect(()=>{e.content.rendered.disconnect(s),t.activeHeadingChanged.disconnect(p),t.headingsChanged.disconnect(s)})}),t}}const ee=new O("@jupyterlab/markdownviewer:IMarkdownViewerTracker",`A widget tracker for markdown
1
+ import{ec as M,ed as F,ee as P,ef as S,eg as I,aM as O,aQ as A,bw as W,am as E,aT as q,eh as H,cq as T,aK as j,cz as D,ei as B,ej as V,ek as L,aS as N,el as z,dV as U}from"../datalayer-app-main.js";import{f as Y,I as $}from"./index-B5fl-cx7.js";import{I as G}from"./tokens-CGj56w43.js";import{a as K,C as R}from"./index-npitmnIA.js";import{T as Q,a as J}from"./model-UAl84z_g.js";import"./Output-WQnm0VN5.js";import"./index-DE0JwlLw.js";import"./hoverbox-CStlKQWE.js";import"./index-Dqc2hT2k.js";import"./dayjs.min-u3zuoSR8.js";import"./isEqual-BxgGIFfN.js";import"./d3-color-Jd8hXty2.js";import"./dist-N90VI44_.js";import"./index-Cz10oMGc.js";import"./RestartIcon-DvpOf5Mf.js";import"./CellSidebarExtension-umk7yQhN.js";import"./NotebookSkeleton-DHQ--KEB.js";import"./Avatar-B0TcOj_b.js";import"./renderer-DTpEU9RO.js";import"./SquareIcon-Dy3l3VdH.js";import"./FileDirectoryOpenFillIcon-Db8fP24q.js";import"./url-4_0MnaFQ.js";/* empty css *//* empty css */import"./style-DdAxk_bj.js";/* empty css */import"./style-Cj1gzCjo.js";/* empty css */import"./style-rkw8dR9f.js";import"./style-GHJFdtIz.js";import"./style-ZSIOeMoX.js";import"./style-iVfD6mFL.js";import"./style-DA-Ya7rp.js";import"./style-D3tvWcFO.js";import"./style-BOqStzF9.js";import"./style-ADLQJ-E9.js";import"./style-DgglluaK.js";import"./ArrowLeftIcon-sX3iNMG1.js";import"./SkubbleIcon-CAaVh_BE.js";import"./usePrimerThemeBridge-BfoXa7hP.js";import"./index-C644crfL.js";import"./KernelVariables-xXzfdk5t.js";import"./index-CavxlEgY.js";import"./SortAscIcon-CmH04s3F.js";import"./SortDescIcon-Qif6E10I.js";import"./NotebookToolbar-C1fpK-Vi.js";import"./RepoPushIcon-BtXQRhLa.js";import"./sessions-W_hhenw6.js";import"./tokens-DcXbsdvP.js";import"./drivecontents-BSbQpH52.js";import"./kernel-Cn-ejD4i.js";class X extends J{constructor(e,r,t){super(e,t),this.parser=r}get documentType(){return"markdown-viewer"}get isAlwaysActive(){return!0}get supportedOptions(){return["maximalDepth","numberingH1","numberHeaders"]}async getHeadings(){const e=this.widget.context.model.toString(),r=await S(e,this.parser),t=I(r,{...this.configuration,baseNumbering:1});return Promise.resolve(t)}}class Z extends Q{constructor(e,r,t){super(e),this.parser=r,this.sanitizer=t}_createNew(e,r){const t=new X(e,this.parser,r);let o=new WeakMap;const p=(c,m)=>{if(m){const a=o.get(m);if(a){const h=e.content.node.getBoundingClientRect(),l=a.getBoundingClientRect();(l.top>h.bottom||l.bottom<h.top)&&a.scrollIntoView({block:"center"})}else console.warn("Heading element not found for heading",m,"in widget",e)}},s=()=>{this.parser&&(M(e.content.node),o=new WeakMap,t.headings.forEach(async c=>{var m,a;const h=await F(this.parser,c.raw,c.level,this.sanitizer);if(!h)return;const l=(m=this.sanitizer.allowNamedProperties)!==null&&m!==void 0&&m?"id":"data-jupyter-id",w=`h${c.level}[${l}="${CSS.escape(h)}"]`;o.set(c,P(e.content.node,w,(a=c.prefix)!==null&&a!==void 0?a:""))}))};return e.content.ready.then(()=>{s(),e.content.rendered.connect(s),t.activeHeadingChanged.connect(p),t.headingsChanged.connect(s),e.disposed.connect(()=>{e.content.rendered.disconnect(s),t.activeHeadingChanged.disconnect(p),t.headingsChanged.disconnect(s)})}),t}}const ee=new O("@jupyterlab/markdownviewer:IMarkdownViewerTracker",`A widget tracker for markdown
2
2
  document viewers. Use this if you want to iterate over and interact with rendered markdown documents.`),te="jp-MarkdownViewer",C="text/markdown";class f extends A{constructor(e){super(),this._config={...f.defaultConfig},this._fragment="",this._ready=new W,this._renderPending=!1,this._isRendering=!1,this._renderRequested=!1,this._rendered=new E(this),this.context=e.context,this.translator=e.translator||q,this._trans=this.translator.load("jupyterlab"),this.renderer=e.renderer,this.node.tabIndex=0,this.addClass(te),(this.layout=new H).addWidget(this.renderer),this.context.ready.then(async()=>{await this._render(),this._monitor=new T.ActivityMonitor({signal:this.context.model.contentChanged,timeout:this._config.renderTimeout}),this._monitor.activityStopped.connect(this._requestRender,this),this.context.model.contentChanged.connect(this._onContentChanged,this),this._ready.resolve(void 0)})}get ready(){return this._ready.promise}get rendered(){return this._rendered}setFragment(e){this._fragment=e,this._requestRender()}setOption(e,r){if(this._config[e]===r)return;this._config[e]=r;const{style:t}=this.renderer.node;switch(e){case"fontFamily":t.setProperty("font-family",r);break;case"fontSize":t.setProperty("font-size",r?r+"px":null);break;case"hideFrontMatter":this._requestRender();break;case"lineHeight":t.setProperty("line-height",r?r.toString():null);break;case"lineWidth":{const o=r?`calc(50% - ${r/2}ch)`:null;t.setProperty("padding-left",o),t.setProperty("padding-right",o);break}case"renderTimeout":this._monitor&&(this._monitor.timeout=r);break}}dispose(){this.isDisposed||(this._monitor&&this._monitor.dispose(),this._monitor=null,super.dispose())}onUpdateRequest(e){this._renderPending&&this.context.isReady&&!this.isDisposed&&(this._renderPending=!1,this._render())}onActivateRequest(e){this.node.focus()}_requestRender(){this._renderPending=!0,this.update()}_onContentChanged(){this._renderPending=!0}async _render(){if(this.isDisposed)return;if(this._isRendering){this._renderRequested=!0;return}this._renderPending=!1,this._renderRequested=!1;const{context:e}=this,{model:r}=e,t=r.toString(),o={};o[C]=this._config.hideFrontMatter?y.removeFrontMatter(t):t;const p=new j({data:o,metadata:{fragment:this._fragment}});this._fragment="";try{if(this._isRendering=!0,await this.renderer.renderModel(p),this._isRendering=!1,this._renderRequested)return this._render();this._rendered.emit()}catch(s){requestAnimationFrame(()=>{this.dispose()}),D(this._trans.__("Renderer Failure: %1",e.path),s)}}}(function(d){d.defaultConfig={fontFamily:null,fontSize:null,lineHeight:null,lineWidth:null,hideFrontMatter:!0,renderTimeout:1e3}})(f||(f={}));class re extends V{setFragment(e){this.content.setFragment(e)}}class ne extends B{constructor(e){super(y.createRegistryOptions(e)),this._fileType=e.primaryFileType,this._rendermime=e.rendermime}createNewWidget(e){var r,t,o,p,s;const m=this._rendermime.clone({resolver:e.urlResolver}).createRenderer(C),a=new f({context:e,renderer:m});return a.title.icon=(r=this._fileType)===null||r===void 0?void 0:r.icon,a.title.iconClass=(o=(t=this._fileType)===null||t===void 0?void 0:t.iconClass)!==null&&o!==void 0?o:"",a.title.iconLabel=(s=(p=this._fileType)===null||p===void 0?void 0:p.iconLabel)!==null&&s!==void 0?s:"",a.title.caption=this.label,new re({content:a,context:e})}}var y;(function(d){function e(t){return{...t,readOnly:!0}}d.createRegistryOptions=e;function r(t){const o=/^---\n[\s\S]*?\n(?:---|\.\.\.)\n/,p=t.match(o);if(!p)return t;const{length:s}=p[0];return t.slice(s)}d.removeFrontMatter=r})(y||(y={}));var g;(function(d){d.markdownPreview="markdownviewer:open",d.markdownEditor="markdownviewer:edit",d.trust="markdownviewer:trust"})(g||(g={}));const v="Markdown Preview",ie={activate:oe,id:"@jupyterlab/markdownviewer-extension:plugin",description:"Adds markdown file viewer and provides its tracker.",provides:ee,requires:[$,N],optional:[Y,G,L,K],autoStart:!0};function oe(d,e,r,t,o,p,s){const c=r.load("jupyterlab"),{commands:m,docRegistry:a}=d;e.addFactory(z);const h="markdownviewer-widget",l=new U({namespace:h});let w={...f.defaultConfig};function k(i){Object.keys(w).forEach(n=>{var u;i.setOption(n,(u=w[n])!==null&&u!==void 0?u:null)})}if(o){const i=n=>{w=n.composite,l.forEach(u=>{k(u.content)})};o.load(ie.id).then(n=>{n.changed.connect(()=>{i(n)}),i(n)}).catch(n=>{console.error(n.message)})}const b=new ne({rendermime:e,name:v,label:c.__("Markdown Preview"),primaryFileType:a.getFileType("markdown"),fileTypes:["markdown"],defaultRendered:["markdown"]});return b.widgetCreated.connect((i,n)=>{n.context.pathChanged.connect(()=>{l.save(n)}),k(n.content),n.content.node.setAttribute("data-trust-command",g.trust),l.add(n)}),a.addWidgetFactory(b),t&&t.restore(l,{command:"docmanager:open",args:i=>({path:i.context.path,factory:v}),name:i=>i.context.path}),m.addCommand(g.markdownPreview,{label:c.__("Markdown Preview"),execute:i=>{const n=i.path;if(typeof n=="string")return m.execute("docmanager:open",{path:n,factory:v,options:i.options})},describedBy:{args:{type:"object",properties:{path:{type:"string",description:c.__("The path to the markdown file to preview")},options:{type:"object",description:c.__("Options for opening the preview")}},required:["path"]}}}),m.addCommand(g.markdownEditor,{execute:()=>{const i=l.currentWidget;if(!i)return;const n=i.context.path;return m.execute("docmanager:open",{path:n,factory:"Editor",options:{mode:"split-right"}})},isVisible:()=>{const i=l.currentWidget;return i&&T.PathExt.extname(i.context.path)===".md"||!1},label:c.__("Show Markdown Editor"),describedBy:{args:{type:"object",properties:{}}}}),m.addCommand(g.trust,{label:c.__("Trust Markdown Preview"),execute:i=>{var n;const u=i[R.TRUST_BOUNDARY_ID_ARG],_=typeof u=="string"?(n=l.find(x=>x.content.node.id===u))!==null&&n!==void 0?n:null:l.currentWidget;return _&&!_.isDisposed?(_.content.node.classList.add("jp-mod-trusted"),d.commandLinker.markTrusted(_.content.node),{trusted:!0}):{trusted:!1}},describedBy:{args:{type:"object",properties:{[R.TRUST_BOUNDARY_ID_ARG]:{type:"string",description:c.__("The Markdown preview trust boundary ID")}}}}}),p&&p.add(new Z(l,e.markdownParser,s??e.sanitizer)),l}export{ie as default};
@@ -1,4 +1,4 @@
1
- import{am as R,aV as I,aQ as O,g2 as M,r as n,e0 as w,ct as b,g3 as q,eV as F,g4 as H,g5 as J,aP as U,g6 as k,er as x,e8 as W,g7 as z,g8 as $,cB as Q,J as P,aS as V,eI as G,aT as Y,dS as X,dP as Z}from"../datalayer-app-main.js";import{H as tt}from"./htmlselect-FCh4qyXz.js";import{o as et}from"./index-46VEGuyz.js";import{a as st}from"./tokens-DQMPCAHQ.js";import{I as ot}from"./tokens-CGj56w43.js";import"./Output-DLpf2Of9.js";import"./index-h8lXpqtD.js";import"./hoverbox-CStlKQWE.js";import"./index-B5W7CVUY.js";import"./index-CBWGYoQM.js";import"./dayjs.min-u3zuoSR8.js";import"./isEqual-BxgGIFfN.js";import"./d3-color-Jd8hXty2.js";import"./dist-N90VI44_.js";import"./index-Cz10oMGc.js";import"./RestartIcon-DvpOf5Mf.js";import"./CellSidebarExtension-CrdbRLaE.js";import"./NotebookSkeleton-DHQ--KEB.js";import"./Avatar-B0TcOj_b.js";import"./renderer-NdtLW87o.js";import"./SquareIcon-Dy3l3VdH.js";import"./FileDirectoryOpenFillIcon-Db8fP24q.js";import"./url-4_0MnaFQ.js";/* empty css *//* empty css */import"./style-DdAxk_bj.js";/* empty css */import"./style-Cj1gzCjo.js";/* empty css */import"./style-rkw8dR9f.js";import"./style-GHJFdtIz.js";import"./style-ZSIOeMoX.js";import"./style-iVfD6mFL.js";import"./style-DA-Ya7rp.js";import"./style-D3tvWcFO.js";import"./style-BOqStzF9.js";import"./style-ADLQJ-E9.js";import"./style-DgglluaK.js";import"./ArrowLeftIcon-sX3iNMG1.js";import"./SkubbleIcon-CAaVh_BE.js";import"./usePrimerThemeBridge-BfoXa7hP.js";import"./index-C644crfL.js";import"./KernelVariables-BIWju6rZ.js";import"./index-CavxlEgY.js";import"./SortAscIcon-CmH04s3F.js";import"./SortDescIcon-Qif6E10I.js";import"./NotebookToolbar-C1fpK-Vi.js";import"./RepoPushIcon-BtXQRhLa.js";import"./sessions-W_hhenw6.js";import"./tokens-DcXbsdvP.js";import"./drivecontents-BSbQpH52.js";import"./kernel-Cn-ejD4i.js";class it{constructor(e){this.reset=()=>{this._shortcut={id:"new shortcut",command:"",keybindings:[],selector:"body",category:"",args:{}},this._changed.emit()},this.addKeybinding=async(t,o)=>{this._shortcut.keybindings.push({keys:o,isDefault:!1}),this._changed.emit()},this.replaceKeybinding=async(t,o,s)=>{if(s=s.filter(i=>i!==""),!s.length)return this.deleteKeybinding(t,o);const r=this._shortcut.keybindings.findIndex(i=>i.keys===o.keys);r>-1?this._shortcut.keybindings[r]={keys:s,isDefault:!1}:this.addKeybinding(t,s),this._changed.emit()},this.deleteKeybinding=async(t,o)=>{const s=this._shortcut.keybindings.findIndex(r=>r.keys===o.keys);s>-1&&(this._shortcut.keybindings.splice(s,1),this._changed.emit())},this.resetKeybindings=async t=>{this._shortcut={...this._shortcut,keybindings:[]},this._changed.emit()},this.setCustomOptions=async(t,o)=>(this._shortcut={...this._shortcut,selector:o.selector,args:o.args},this._changed.emit(),!0),this.updateCommand=(t,o)=>{this._shortcut={...this._shortcut,command:t,category:o},this._changed.emit()},this._changed=new R(this),this._shortcut={id:"new shortcut",command:"",keybindings:[],selector:"body",category:"",args:{}},this.findConflictsFor=e.findConflictsFor,this.showSelectors=e.showSelectors,this.external=e.external}get shortcut(){return this._shortcut}get changed(){return this._changed}}class rt extends I{constructor(e){const{shortcut:t,translator:o,editorFactory:s}=e,r=o.load("jupyterlab"),i=new nt(t,o,s,()=>this._checkValidation(),e.readOnly),a=[];e.readOnly?a.push(I.cancelButton({label:r.__("OK")})):(a.push(I.cancelButton({label:r.__("Cancel")})),a.push(I.okButton({label:r.__("Apply")}))),super({title:e.readOnly?r.__("Shortcut Options"):r.__("Custom Shortcut Options"),body:i,buttons:a})}_evtKeydown(e){if(e.key==="Enter"){const t=this.node.querySelector(".jp-JSONEditor"),o=document.activeElement;if(t instanceof HTMLElement&&o instanceof HTMLElement&&t.contains(o)){e.stopPropagation();return}}super._evtKeydown(e)}}class nt extends O{constructor(e,t,o,s,r){var i,a;super();const c=t.load("jupyterlab");this.addClass("jp-Shortcuts-CustomOptionsDialogBody");const g=document.createElement("div");g.className="jp-Shortcuts-CustomOptionDialog-container";const p=document.createElement("label");p.textContent=c.__("Selector:"),p.className="jp-Dialog-label",this._selectorInput=document.createElement("input"),this._selectorInput.type="text",this._selectorInput.disabled=r??!1,this._selectorInput.value=e.selector,this._selectorInput.className="jp-mod-styled",g.appendChild(p),g.appendChild(this._selectorInput);const f=document.createElement("label");if(f.textContent=c.__("Arguments:"),f.className="jp-Dialog-label",g.appendChild(f),r){const d=document.createElement("pre");d.textContent=JSON.stringify((i=e.args)!==null&&i!==void 0?i:{},void 0,2),g.appendChild(d)}else this._editorWidget=new at((a=e.args)!==null&&a!==void 0?a:{},o,s),g.appendChild(this._editorWidget.node);this.node.appendChild(g)}getValue(){var e,t;const o=(t=(e=this._editorWidget)===null||e===void 0?void 0:e.getJSON())!==null&&t!==void 0?t:"{}";let s;try{s=JSON.parse(o)}catch(r){console.error(`Invalid JSON in arguments: ${r instanceof Error?r.message:String(r)}`),s={}}return{selector:this._selectorInput.value,args:s}}dispose(){var e;(e=this._editorWidget)===null||e===void 0||e.dispose(),super.dispose()}}class at extends O{constructor(e,t,o){super(),this._validateJSON=()=>{try{const a=this._editor.model.sharedModel.getSource();JSON.parse(a),this.node.classList.remove("jp-mod-error")}catch{this.node.classList.add("jp-mod-error")}this._checkValidation()},this.addClass("jp-JSONEditor"),this._checkValidation=o;const s=document.createElement("div");s.className="jp-JSONEditor-host";const r=new M.Model({mimeType:"application/json"}),i=JSON.stringify(e,null,2);r.sharedModel.setSource(i),this._editor=t({host:s,model:r,config:{readOnly:!1}}),this.node.appendChild(s),this._editor.model.sharedModel.changed.connect(this._validateJSON,this)}getJSON(){return this._editor.model.sharedModel.getSource()}dispose(){this._editor.model.sharedModel.changed.disconnect(this._validateJSON,this),this._editor.dispose(),super.dispose()}}const D="jp-Shortcuts-ConflictContainer";class A extends n.Component{constructor(e){super(e),this.handleSubmit=async()=>{this._isReplacingExistingKeybinding?this.state.selected?this.props.toggleInput():await this._updateShortcut():(await this._updateShortcut(),this.props.toggleInput())},this._updateShortcut=async()=>{const t=[...this.state.keys,this.state.currentChain];this.setState({keys:t}),this.props.keybinding?await this.props.replaceKeybinding(this.props.shortcut,this.props.keybinding,t):await this.props.addKeybinding(this.props.shortcut,t)},this._handleOverwrite=async(t,o)=>{const s=o.map(w.normalizeKeystroke);for(const r of t){const i=r.keybindings.filter(a=>b.deepEqual(a.keys,s)||s.some(c=>b.deepEqual(a.keys,[c])))[0];if(!i){console.error(`Conflicting binding could not be found for ${r} using keys ${o}`);continue}await this.props.deleteKeybinding(r,i)}await this._updateShortcut()},this.parseChaining=(t,o,s,r,i)=>{let a=q.keyForKeydownEvent(t.nativeEvent);const c=["Shift","Control","Alt","Meta","Ctrl","Accel"];if(t.key==="Backspace")s="",o="",r=[],i="",this.setState({value:o,userInput:s,keys:r,currentChain:i});else if(t.key!=="CapsLock"){const g=s.substr(s.lastIndexOf(" ")+1,s.length).trim();c.lastIndexOf(g)===-1&&g!=""?(s=s+",",r.push(i),i="",t.ctrlKey&&t.key!="Control"&&(s=(s+" Ctrl").trim(),i=(i+" Ctrl").trim()),t.metaKey&&t.key!="Meta"&&(s=(s+" Accel").trim(),i=(i+" Accel").trim()),t.altKey&&t.key!="Alt"&&(s=(s+" Alt").trim(),i=(i+" Alt").trim()),t.shiftKey&&t.key!="Shift"&&(s=(s+" Shift").trim(),i=(i+" Shift").trim()),c.lastIndexOf(t.key)===-1?(s=(s+" "+a).trim(),i=(i+" "+a).trim()):t.key==="Meta"?(s=(s+" Accel").trim(),i=(i+" Accel").trim()):t.key==="Control"?(s=(s+" Ctrl").trim(),i=(i+" Ctrl").trim()):t.key==="Shift"?(s=(s+" Shift").trim(),i=(i+" Shift").trim()):t.key==="Alt"?(s=(s+" Alt").trim(),i=(i+" Alt").trim()):(s=(s+" "+t.key).trim(),i=(i+" "+t.key).trim())):t.key==="Control"?(s=(s+" Ctrl").trim(),i=(i+" Ctrl").trim()):t.key==="Meta"?(s=(s+" Accel").trim(),i=(i+" Accel").trim()):t.key==="Shift"?(s=(s+" Shift").trim(),i=(i+" Shift").trim()):t.key==="Alt"?(s=(s+" Alt").trim(),i=(i+" Alt").trim()):(s=(s+" "+a).trim(),i=(i+" "+a).trim())}return this.setState({keys:r,currentChain:i}),[s,r,i]},this.checkNonFunctional=()=>{const t=["Ctrl","Alt","Accel","Shift"],o=this.state.currentChain.split(" "),s=o[o.length-1];return this.setState({isFunctional:t.indexOf(s)===-1}),t.indexOf(s)!==-1},this.checkShortcutAvailability=(t,o,s)=>{const r=this.props.findConflictsFor([...o,s],this.props.shortcut.selector),i=t===""||r.length===0;return!i&&r.length===1&&r[0].id===this.props.shortcut.id&&this._isReplacingExistingKeybinding?(this.setState({isAvailable:!0}),[]):(this.setState({isAvailable:i}),r)},this.handleInput=t=>{t.preventDefault(),this.setState({selected:!1});const o=this.parseChaining(t,this.state.value,this.state.userInput,this.state.keys,this.state.currentChain),s=o[0],r=o[1],i=o[2],a=this.props.toSymbols(s);let c=this.checkShortcutAvailability(s,r,i);this.setState({value:a,userInput:s,keys:r,currentChain:i},()=>{this.checkNonFunctional(),this._emitConflicts(c)})},this._handleBlur=t=>{var o,s;!((o=this._ref.current)===null||o===void 0)&&o.contains(t.relatedTarget)||!((s=t.relatedTarget)===null||s===void 0)&&s.closest(`.${D}`)||this.props.toggleInput()},this._ref=n.createRef(),this.state={value:this.props.placeholder,userInput:"",isAvailable:!0,isFunctional:this._isReplacingExistingKeybinding,keys:[],currentChain:"",selected:!0}}get _isReplacingExistingKeybinding(){return!!this.props.keybinding}_emitConflicts(e){const t=[...this.state.keys,this.state.currentChain];this.props.displayConflicts({conflictsWith:e,keys:this.state.keys,overwrite:async()=>{this.setState({isAvailable:!0}),await this._handleOverwrite(e,t),this.props.toggleInput()},cancel:()=>{this.props.toggleInput()}})}render(){const e=this.props.translator.load("jupyterlab");let t="jp-Shortcuts-Input";return this.state.isAvailable||(t+=" jp-mod-unavailable-Input"),n.createElement("div",{className:this.props.displayInput?this._isReplacingExistingKeybinding?"jp-Shortcuts-InputBox":"jp-Shortcuts-InputBox jp-Shortcuts-InputBoxNew":"jp-mod-hidden",ref:this._ref,onBlur:this._handleBlur},n.createElement("div",{tabIndex:0,className:t,onKeyDown:this.handleInput,ref:o=>o&&o.focus(),"data-lm-suppress-shortcuts":"true"},n.createElement("p",{className:this.state.selected&&this._isReplacingExistingKeybinding?"jp-Shortcuts-InputText jp-mod-selected-InputText":this.state.value===""?"jp-Shortcuts-InputText jp-mod-waiting-InputText":"jp-Shortcuts-InputText"},this.state.value===""?e.__("press keys"):this.state.value)),n.createElement("button",{className:this.state.isFunctional?this.state.isAvailable?"jp-Shortcuts-Submit":"jp-Shortcuts-Submit jp-mod-conflict-Submit":"jp-Shortcuts-Submit jp-mod-defunc-Submit",disabled:!this.state.isAvailable||!this.state.isFunctional,onClick:this.handleSubmit,tabIndex:0},this.state.isAvailable?n.createElement(F.react,null):n.createElement(H.react,null)))}}var C;(function(l){l.editBinding="shortcuts:edit-keybinding",l.addBinding="shortcuts:add-keybinding",l.deleteBinding="shortcuts:delete-keybinding",l.toggleSelectors="shortcuts:toggle-selectors",l.resetAll="shortcuts:reset-all"})(C||(C={}));var E;(function(l){l[l.Label=0]="Label",l[l.Category=1]="Category",l[l.Split=2]="Split",l[l.Default=3]="Default"})(E||(E={}));class j extends Map{constructor(e){var t,o,s,r;super();const{settings:i,commandRegistry:a,allCommands:c}=e;if(c)for(const g of a.listCommands()){const p={command:g,selector:"body"},f=this._computeTargetId(p),d=p.command.split(":"),m=(t=a.label(p.command,p.args))!==null&&t!==void 0?t:d.length>1?d[1]:void 0,u=d[0],y={...p,id:f,keybindings:[],category:u,label:m,args:{}};this.set(f,y)}else if(i){const g=(o=i.user.shortcuts)!==null&&o!==void 0?o:[],p=new Set(g.map(this._computeKeybindingId.bind(this))),f=(s=i.composite.shortcuts)!==null&&s!==void 0?s:[],d=i.default("shortcuts").map(m=>this._computeTargetId(m));for(const m of f){const u=this._computeTargetId(m),y=this._computeKeybindingId(m),h={keys:w.normalizeKeys(m),isDefault:!p.has(y),...m.preventDefault===void 0?{}:{preventDefault:m.preventDefault}},S=this.get(u);if(S)S.keybindings.push(h);else{const _=m.command.split(":"),K=(r=a.label(m.command,m.args))!==null&&r!==void 0?r:_.length>1?_[1]:void 0,B=_[0];this.set(u,{id:u,selector:m.selector,command:m.command,category:B,label:K,args:m.args,keybindings:[h],userDefined:!d.includes(u)})}}}}findConflictsFor(e,t){const o=new lt({registry:this}),s=e.map(w.normalizeKeystroke);let r=o.findConflicts(s,t);if(r.length!==0)return r;for(const i of s)if(r=o.findConflicts([i],t),r.length!==0)return r;return[]}_computeTargetId(e){var t;return e.command+"_"+e.selector+"_"+JSON.stringify((t=e.args)!==null&&t!==void 0?t:{})}_computeKeybindingId(e){var t;return[e.command,e.selector,JSON.stringify((t=e.args)!==null&&t!==void 0?t:{}),w.normalizeKeys(e).join(" ")].join("_")}}class lt{constructor(e){var t;const o=new Map;for(const s of e.registry.values())for(const r of s.keybindings){const i=this._keybindingHash(r.keys,s.selector),a=(t=o.get(i))!==null&&t!==void 0?t:[];a.push(s),o.set(i,a)}this._keybindingsMap=o}findConflicts(e,t){var o;const s=this._keybindingHash(e,t);return(o=this._keybindingsMap.get(s))!==null&&o!==void 0?o:[]}_keybindingHash(e,t){return e.join(" ")+"_"+t}}(function(l){function e(s){return s.replace(/\s+/g,"").toLowerCase()}function t(s,r){var i;const a=s.category.toLowerCase(),c=((i=s.label)!==null&&i!==void 0?i:"").toLowerCase(),g=`${a} ${c}`;let p=1/0,f=null;const d=/\b\w/g;for(;;){const S=d.exec(g);if(!S)break;const _=J.matchSumOfDeltas(g,r,S.index);if(!_)break;_&&_.score<=p&&(p=_.score,f=_.indices)}if(!f||p===1/0)return null;const m=a.length+1,u=U.lowerBound(f,m,(S,_)=>S-_),y=f.slice(0,u),h=f.slice(u);for(let S=0,_=h.length;S<_;++S)h[S]-=m;return y.length===0?{matchType:E.Label,categoryIndices:null,labelIndices:h,score:p,item:s}:h.length===0?{matchType:E.Category,categoryIndices:y,labelIndices:null,score:p,item:s}:{matchType:E.Split,categoryIndices:y,labelIndices:h,score:p,item:s}}function o(s,r){r=e(r);let i=[];for(const a of s.values()){if(!r){i.push({matchType:E.Default,categoryIndices:null,labelIndices:null,score:0,item:a});continue}let c=t(a,r);c&&i.push(c)}return i}l.matchItems=o})(j||(j={}));const ct={Ctrl:"⌃",Alt:"⌥",Shift:"⇧",Accel:"⌘",Cmd:"⌘"};class L extends n.Component{constructor(e){super(e),this.toggleInputNew=()=>{this.setState({displayNewInput:!this.state.displayNewInput,conflicts:new Map})},this.toSymbols=t=>k.IS_MAC?t.split(" ").map(o=>{var s;return(s=ct[o])!==null&&s!==void 0?s:o}).join(" "):t.split(" ").map(o=>o==="Accel"?"Ctrl":o).join(" "),this._trans=this.props.external.translator.load("jupyterlab"),this.state={displayNewInput:!1,displayReplaceInput:Object.freeze({}),conflicts:new Map}}componentDidMount(){this.props.external.actionRequested.connect(this._onActionRequested,this)}componentWillUnmount(){this.props.external.actionRequested.disconnect(this._onActionRequested,this)}async _onActionRequested(e,t){if(!("shortcutId"in t&&t.shortcutId!==this.props.shortcut.id)){if(t.request==="add-keybinding")return this.toggleInputNew();if(t.request==="edit-keybinding"&&this.toggleInputReplaceMethod(t.keybinding),t.request==="delete-keybinding"){const o=this.props.shortcut,s=o.keybindings[t.keybinding];this.props.deleteKeybinding(o,s).catch(console.error)}}}getCategoryCell(){return n.createElement("div",{className:"jp-Shortcuts-Cell"},this.props.shortcut.category)}getLabelCell(){var e;if(this.props.newShortcutUtils){const t=this._getFilteredCommands();return n.createElement("div",{className:"jp-Shortcuts-Cell"},n.createElement(tt,{value:this.props.shortcut.command,options:[{value:"",label:this._trans.__("Select a command")},...t.map(o=>({value:o.command,label:`${o.category}: ${o.label}`}))],onChange:o=>{var s,r,i;const a=t.find(c=>c.command===o.target.value);(s=this.props.newShortcutUtils)===null||s===void 0||s.updateCommand((r=a?.command)!==null&&r!==void 0?r:"",(i=a?.category)!==null&&i!==void 0?i:"")}}))}else return n.createElement("div",{className:"jp-Shortcuts-Cell"},n.createElement("div",{className:"jp-label"},(e=this.props.shortcut.label)!==null&&e!==void 0?e:this._trans.__("(Command label missing)")))}getResetShortCutLink(){return n.createElement("a",{className:"jp-Shortcuts-Reset",onClick:()=>this.props.resetKeybindings(this.props.shortcut)},this.props.shortcut.userDefined?this._trans.__("Delete"):this._trans.__("Reset"))}getSourceCell(){var e;const t=this.props.shortcut.keybindings.every(r=>r.isDefault),o=this.props.shortcut.userDefined||!!this.props.newShortcutUtils,s=o?this._trans.__("Custom options"):this._trans.__("Show options");return n.createElement("div",{className:"jp-Shortcuts-Cell"},!this.props.newShortcutUtils&&n.createElement("div",{className:"jp-Shortcuts-SourceCell"},t?this._trans.__("Default"):this._trans.__("Custom")),t?"":this.getResetShortCutLink(),this.props.external.editorFactory&&n.createElement(x,{className:"jp-mod-styled jp-mod-reject jp-Shortcuts-CustomOptions",onClick:async()=>{if(!this.props.external.editorFactory){console.error("Cannot build the custom options form");return}const i=await new rt({shortcut:this.props.shortcut,translator:this.props.external.translator,editorFactory:this.props.external.editorFactory,readOnly:!o}).launch();i.button.accept&&o&&i.value&&await this.props.setCustomOptions(this.props.shortcut,i.value)},title:s,"aria-label":s,appearance:"neutral"},o?n.createElement(W.react,{tag:null}):n.createElement(z.react,{tag:null})),!!this.props.newShortcutUtils&&n.createElement(n.Fragment,null,n.createElement(x,{className:"jp-mod-styled jp-mod-accept jp-Shortcuts-SaveNew",onClick:(e=this.props.newShortcutUtils)===null||e===void 0?void 0:e.saveShortcut,title:this._trans.__("Save shortcut"),"aria-label":this._trans.__("Save shortcut"),appearance:"neutral",disabled:!this.props.shortcut.command||!this.props.shortcut.keybindings.length||this.props.shortcut.keybindings.every(r=>!r.keys||r.keys.length===0)},n.createElement(F.react,{tag:null}))))}getOptionalSelectorCell(){return this.props.showSelectors?n.createElement("div",{className:"jp-Shortcuts-Cell"},n.createElement("div",{className:"jp-selector"},this.props.shortcut.selector)):null}getClassNameForShortCuts(e){const t=["jp-Shortcuts-ShortcutCell"];switch(e.length){case 1:t.push("jp-Shortcuts-SingleCell");break;case 0:t.push("jp-Shortcuts-EmptyCell");break}return t.join(" ")}toggleInputReplaceMethod(e){const t=this.state.displayReplaceInput[e];this.setState({displayReplaceInput:{...this.state.displayReplaceInput,[e]:!t},conflicts:new Map})}getDisplayReplaceInput(e){return this.state.displayReplaceInput[e]}getOrDisplayIfNeeded(e){const t=["jp-Shortcuts-Or"];return(e||this.state.displayNewInput)&&t.push("jp-Shortcuts-Or-Forced"),n.createElement("div",{className:t.join(" ")},this._trans.__("or"))}getShortCutAsInput(e,t){return n.createElement(A,{addKeybinding:this.props.addKeybinding,replaceKeybinding:this.props.replaceKeybinding,deleteKeybinding:this.props.deleteKeybinding,findConflictsFor:this.props.findConflictsFor,toggleInput:()=>this.toggleInputReplaceMethod(t),shortcut:this.props.shortcut,keybinding:e,displayConflicts:o=>{const s=new Map(this.state.conflicts);s.set(e,o),this.setState({conflicts:s})},toSymbols:this.toSymbols,displayInput:this.getDisplayReplaceInput(t),placeholder:this.toSymbols(e.keys.join(", ")),translator:this.props.external.translator})}getShortCutForDisplayOnly(e){return e.keys.map((t,o)=>n.createElement("div",{className:"jp-Shortcuts-ShortcutKeysContainer",key:o},n.createElement("div",{className:"jp-Shortcuts-ShortcutKeys"},this.toSymbols(t).split(" ").map((s,r,i)=>n.createElement(n.Fragment,{key:`${o}-${s}-${r}`},n.createElement("span",{className:"jp-ContextualShortcut-Key"},s),r+1<i.length?" + ":null))),o+1<e.keys.length?n.createElement("div",{className:"jp-Shortcuts-Comma"},","):null))}isLocationBeingEdited(e){return this.state.displayReplaceInput[e]}getDivForKey(e,t,o){return n.createElement("div",{className:"jp-Shortcuts-ShortcutContainer",key:this.props.shortcut.id+"_"+e,"data-keybinding":e,"data-shortcut":this.props.shortcut.id,onClick:()=>this.toggleInputReplaceMethod(e)},this.isLocationBeingEdited(e)?this.getShortCutAsInput(t,e):this.getShortCutForDisplayOnly(t),!(e===this._nonEmptyBindings.length-1&&Object.values(this.state.displayReplaceInput).some(Boolean))&&this.getOrDisplayIfNeeded(e<this._nonEmptyBindings.length-1))}getAddLink(){return n.createElement("a",{className:this.state.displayNewInput?"":"jp-Shortcuts-Plus",onClick:()=>{this.toggleInputNew()}},this._trans.__("Add"))}getInputBoxWhenToggled(){return this.state.displayNewInput?n.createElement(A,{addKeybinding:this.props.addKeybinding,replaceKeybinding:this.props.replaceKeybinding,deleteKeybinding:this.props.deleteKeybinding,findConflictsFor:this.props.findConflictsFor,toggleInput:this.toggleInputNew,shortcut:this.props.shortcut,displayConflicts:e=>{const t=new Map(this.state.conflicts);t.set(null,e),this.setState({conflicts:t})},toSymbols:this.toSymbols,displayInput:this.state.displayNewInput,placeholder:"",translator:this.props.external.translator}):n.createElement("div",null)}getShortCutsCell(e){return n.createElement("div",{className:"jp-Shortcuts-Cell"},n.createElement("div",{className:this.getClassNameForShortCuts(e)},e.map((t,o)=>this.getDivForKey(o,t,e)),e.length>=1&&!this.state.displayNewInput&&!Object.values(this.state.displayReplaceInput).some(Boolean)&&this.getAddLink(),e.length===0&&!this.state.displayNewInput&&this.getAddLink(),this.getInputBoxWhenToggled()))}getConflicts(){const e=[...this.state.conflicts.values()].filter(t=>t.conflictsWith.length!==0);return e.length===0?n.createElement(n.Fragment,null):n.createElement("div",{className:"jp-Shortcuts-Row jp-Shortcuts-RowWithConflict"},n.createElement("div",{className:D},e.map(t=>{const o=t.keys.join(" ")+"_"+t.conflictsWith.map(s=>s.id).join("");return n.createElement("div",{className:"jp-Shortcuts-Conflict",key:o},n.createElement("div",{className:"jp-Shortcuts-ErrorMessage"},this._trans.__("Shortcut already in use by %1. Overwrite it?",t.conflictsWith.map(s=>{var r;return(r=s.label)!==null&&r!==void 0?r:s.command}).join(", "))),n.createElement("div",{className:"jp-Shortcuts-ErrorButton"},n.createElement("button",{className:"jp-Button jp-mod-reject jp-mod-styled",onClick:()=>{this._clearConflict(t),t.cancel()}},this._trans.__("Cancel")),n.createElement("button",{className:"jp-Button jp-mod-warn jp-mod-styled",onClick:()=>{this._clearConflict(t),t.overwrite()}},this._trans.__("Overwrite"))))})))}_clearConflict(e){const t=new Map,o=this._conflictId(e);for(const[s,r]of this.state.conflicts.entries())this._conflictId(r)!==o&&t.set(s,r);this.setState({conflicts:t})}_conflictId(e){return e.keys.join(" ")+"_"+e.conflictsWith.map(t=>t.id).join("")}_getFilteredCommands(){var e,t;const o=new j({commandRegistry:this.props.external.commandRegistry,allCommands:!0}),s=j.matchItems(o,(t=(e=this.props.newShortcutUtils)===null||e===void 0?void 0:e.searchQuery)!==null&&t!==void 0?t:"").map(r=>r.item).filter(r=>!r.command.startsWith("__internal:"));return s.sort((r,i)=>{var a,c;const g=r.category,p=i.category,f=g.localeCompare(p);if(f)return f;{const d=(a=r.label)!==null&&a!==void 0?a:"",m=(c=i.label)!==null&&c!==void 0?c:"";return d.localeCompare(m)}}),s}get _nonEmptyBindings(){return this.props.shortcut.keybindings.filter(e=>e.keys.filter(t=>t!="").length!==0)}render(){return n.createElement(n.Fragment,null,n.createElement("div",{className:`jp-Shortcuts-Row${this.props.newShortcutUtils?" jp-Shortcuts-Row-newShortcut":""}`,"data-shortcut":this.props.shortcut.id},this.getCategoryCell(),this.getLabelCell(),this.getShortCutsCell(this._nonEmptyBindings),this.getSourceCell(),this.getOptionalSelectorCell()),this.getConflicts())}}const dt=115;class ht extends n.Component{render(){return n.createElement("div",{className:"jp-Shortcuts-ShortcutListContainer",style:{height:`${this.props.height-dt}px`},id:"shortcutListContainer"},n.createElement("div",{className:"jp-Shortcuts-ShortcutList"},this.props.shortcuts.map(e=>n.createElement(L,{key:e.id,addKeybinding:this.props.addKeybinding,replaceKeybinding:this.props.replaceKeybinding,deleteKeybinding:this.props.deleteKeybinding,resetKeybindings:this.props.resetKeybindings,findConflictsFor:this.props.findConflictsFor,setCustomOptions:this.props.setCustomOptions,shortcut:e,showSelectors:this.props.showSelectors,external:this.props.external}))))}}class ut extends n.Component{render(){return n.createElement("div",{className:this.props.title.toLowerCase()===this.props.active?"jp-Shortcuts-Header jp-Shortcuts-CurrentHeader":"jp-Shortcuts-Header",onClick:()=>this.props.updateSort(this.props.columnId)},this.props.title,n.createElement($.react,{className:"jp-Shortcuts-SortButton jp-ShortcutTitleItem-sortButton"}))}}function pt(l){const e=l.translator.load("jupyterlab");return n.createElement("div",{className:"jp-Shortcuts-AdvancedOptions"},n.createElement("a",{className:"jp-Shortcuts-AdvancedOptionsLink",onClick:()=>l.toggleSelectors()},l.showSelectors?e.__("Hide Selectors"):e.__("Show Selectors")),n.createElement("a",{className:"jp-Shortcuts-AdvancedOptionsLink",onClick:()=>l.resetShortcuts()},e.__("Reset All")),n.createElement(x,{className:"jp-mod-styled jp-mod-accept jp-Shortcuts-AdvancedOptionsButton",onClick:l.toggleAddCommandRow,title:e.__("Tool for adding shortcuts"),"aria-label":e.__("Tool for adding shortcuts")},n.createElement(Q.react,{tag:"span",elementSize:"xlarge",elementPosition:"center"})))}class mt extends n.Component{constructor(e){super(e)}getShortCutTitleItem(e,t){return n.createElement("div",{className:"jp-Shortcuts-Cell"},n.createElement(ut,{title:e,updateSort:this.props.updateSort,active:this.props.currentSort,columnId:t}))}render(){const e=this.props.translator.load("jupyterlab");return n.createElement("div",{className:"jp-Shortcuts-Top"},n.createElement("div",{className:"jp-Shortcuts-TopNav"},n.createElement(et,{"aria-label":e.__("Search shortcuts"),updateFilter:(t,o)=>this.props.updateSearchQuery(o??""),placeholder:e.__("Search…"),useFuzzyFilter:!1}),n.createElement(pt,{toggleSelectors:this.props.toggleSelectors,showSelectors:this.props.showSelectors,resetShortcuts:this.props.resetShortcuts,toggleAddCommandRow:this.props.toggleAddCommandRow,translator:this.props.translator})),n.createElement("div",{className:"jp-Shortcuts-HeaderRowContainer"},n.createElement("div",{className:"jp-Shortcuts-HeaderRow"},this.getShortCutTitleItem(e.__("Category"),"category"),this.getShortCutTitleItem(e.__("Command"),"command"),n.createElement("div",{className:"jp-Shortcuts-Cell"},n.createElement("div",{className:"title-div"},e.__("Shortcut"))),this.getShortCutTitleItem(e.__("Source"),"source"),this.props.showSelectors&&this.getShortCutTitleItem(e.__("Selectors"),"selector"))))}}class gt extends n.Component{constructor(e){super(e),this.updateSearchQuery=t=>{this.setState({searchQuery:t},()=>{const o=this.state.shortcutRegistry;this.setState({filteredShortcutList:this._searchFilterShortcuts(o)},()=>{this.sortShortcuts()})})},this.resetShortcuts=async()=>{await(await this.props.external.getSettings()).set("shortcuts",[]),await this._refreshShortcutList()},this.resetKeybindings=async t=>{await this._setKeybinding(t,[])},this.replaceKeybinding=async(t,o,s)=>this._setKeybinding(t,s,o),this.deleteKeybinding=async(t,o)=>{await this._setKeybinding(t,[],o)},this.addKeybinding=async(t,o)=>{await this._setKeybinding(t,o)},this.setCustomOptions=async(t,o)=>{var s;const r=await this.props.external.getSettings(),i=(s=r.user.shortcuts)!==null&&s!==void 0?s:[],a=i.filter(c=>{var g,p;return c.command===t.command&&c.selector===t.selector&&b.deepEqual((g=c.args)!==null&&g!==void 0?g:{},(p=t.args)!==null&&p!==void 0?p:{})});return a.length?(a.forEach(c=>{c.selector=o.selector,c.args=o.args}),await r.set("shortcuts",i),await this._refreshShortcutList(),!0):(console.error("Error writing the custom options: target not found"),!1)},this.toggleSelectors=()=>{this.setState({showSelectors:!this.state.showSelectors})},this.toggleAddCommandRow=async()=>{this.setState({showAddCommand:!this.state.showAddCommand})},this.updateSort=t=>{t!==this.state.currentSort&&this.setState({currentSort:t},this.sortShortcuts)},this.saveNewShortcut=async()=>{const t={...this.state.newShortcut,args:void 0};for(let s of t.keybindings)await this.addKeybinding(t,s.keys);await this.setCustomOptions(t,{selector:t.selector,args:this.state.newShortcut.args})&&(this._newShortcutItem.reset(),this.toggleAddCommandRow())},this._newShortcutItem=new it({showSelectors:!1,findConflictsFor:(t,o)=>this.state.shortcutRegistry?this.state.shortcutRegistry.findConflictsFor(t,o):(console.error("Cannot search for keybinding conflicts at this time: registry is not ready"),[]),external:this.props.external}),this.state={shortcutRegistry:null,filteredShortcutList:new Array,shortcutsFetched:!1,searchQuery:"",showSelectors:!1,currentSort:"category",showAddCommand:!1,newShortcut:this._newShortcutItem.shortcut},this._newShortcutItem.changed.connect(()=>{this.setState({newShortcut:{...this._newShortcutItem.shortcut}})})}componentDidMount(){this.props.external.actionRequested.connect(this._onActionRequested,this),this._refreshShortcutList()}componentWillUnmount(){this.props.external.actionRequested.disconnect(this._onActionRequested,this)}async _onActionRequested(e,t){if(t.request==="toggle-selectors")return this.toggleSelectors();t.request==="reset-all"&&await this.resetShortcuts()}async _refreshShortcutList(){const e=await this.props.external.getSettings(),t=new j({commandRegistry:this.props.external.commandRegistry,settings:e});this.setState({shortcutRegistry:t,filteredShortcutList:this._searchFilterShortcuts(t),shortcutsFetched:!0},()=>{this.sortShortcuts()})}_searchFilterShortcuts(e){return e?j.matchItems(e,this.state.searchQuery).map(o=>o.item):[]}async _setKeybinding(e,t,o){var s,r,i,a,c;t.length===1&&t[0]==""&&(t=[]);const g=t.map(w.normalizeKeystroke),p=await this.props.external.getSettings(),f=(s=p.user.shortcuts)!==null&&s!==void 0?s:[],d=[];let m=!1;for(let u of f)if(u.command===e.command&&u.selector===e.selector&&b.deepEqual((r=u.args)!==null&&r!==void 0?r:{},(i=e.args)!==null&&i!==void 0?i:{})&&o&&b.deepEqual(o.keys,w.normalizeKeys(u))){const y=o.isDefault&&b.deepEqual(o.keys,g);t.length!==0&&!y&&d.push(this._setShortcutKeys(u,t)),m=!0}else{if(u.command===e.command&&u.selector===e.selector&&b.deepEqual((a=u.args)!==null&&a!==void 0?a:{},(c=e.args)!==null&&c!==void 0?c:{})&&!o&&t.length===0)continue;d.push(u)}if(!m){const u=!o||!b.deepEqual(o.keys,g);o&&o.isDefault&&u&&d.push(this._shortcutFromTarget(e,o.keys,{disabled:!0,preventDefault:o.preventDefault})),t.length!==0&&u&&d.push(this._shortcutFromTarget(e,t,{preventDefault:o?.preventDefault}))}await p.set("shortcuts",d),await this._refreshShortcutList()}_setShortcutKeys(e,t){const o=this._platformKeys(e);return{...e,[o]:t}}_shortcutFromTarget(e,t,o={}){const s={command:e.command,selector:e.selector,keys:t};return e.args&&!b.deepEqual(e.args,{})&&(s.args=e.args),o.disabled&&(s.disabled=!0),o.preventDefault!==void 0&&(s.preventDefault=o.preventDefault),s}_platformKeys(e){return k.IS_WIN&&e.winKeys?"winKeys":k.IS_MAC&&e.macKeys?"macKeys":!k.IS_WIN&&!k.IS_MAC&&e.linuxKeys?"linuxKeys":"keys"}sortShortcuts(){const e=this.state.filteredShortcutList;let t=this.state.currentSort;t==="command"&&(t="label");const o=s=>{var r;return t==="source"?s.keybindings.every(i=>i.isDefault)?"default":"other":(r=s[t])!==null&&r!==void 0?r:""};e.sort((s,r)=>{var i,a;const c=o(s),g=o(r),p=c.localeCompare(g);if(p)return p;{const f=(i=s.label)!==null&&i!==void 0?i:"",d=(a=r.label)!==null&&a!==void 0?a:"";return f.localeCompare(d)}}),this.setState({filteredShortcutList:e})}render(){return this.state.shortcutsFetched?n.createElement("div",{className:"jp-Shortcuts-ShortcutUI",id:"jp-shortcutui"},n.createElement(mt,{updateSearchQuery:this.updateSearchQuery,resetShortcuts:this.resetShortcuts,toggleSelectors:this.toggleSelectors,showSelectors:this.state.showSelectors,updateSort:this.updateSort,currentSort:this.state.currentSort,toggleAddCommandRow:this.toggleAddCommandRow,width:this.props.width,translator:this.props.external.translator}),this.state.showAddCommand&&n.createElement(L,{...this._newShortcutItem,shortcut:this.state.newShortcut,newShortcutUtils:{searchQuery:this.state.searchQuery,updateCommand:this._newShortcutItem.updateCommand,saveShortcut:this.saveNewShortcut}}),n.createElement(ht,{shortcuts:this.state.filteredShortcutList,resetKeybindings:this.resetKeybindings,addKeybinding:this.addKeybinding,replaceKeybinding:this.replaceKeybinding,deleteKeybinding:this.deleteKeybinding,setCustomOptions:this.setCustomOptions,showSelectors:this.state.showSelectors,findConflictsFor:(e,t)=>this.state.shortcutRegistry?this.state.shortcutRegistry.findConflictsFor(e,t):(console.error("Cannot search for keybinding conflicts at this time: registry is not ready"),[]),height:this.props.height,external:this.props.external})):null}}const yt=l=>P.createElement(gt,{external:l.external,height:1e3,width:1e3}),T="@jupyterlab/shortcuts-extension:shortcuts";function ft(l,e,t,o,s){return{translator:t,getSettings:()=>l.load(T,!0),commandRegistry:e.commands,actionRequested:o,editorFactory:s}}const v={id:T,description:"Adds the keyboard shortcuts editor.",requires:[ot],optional:[V,st,G],activate:async(l,e,t,o,s)=>{const r=t??Y,i=r.load("jupyterlab"),{commands:a}=l;let c,g,p={};if(o){const d=new R({}),m=h=>h.dataset.shortcut!==void 0;l.commands.addCommand(C.editBinding,{label:i.__("Edit Keybinding"),caption:i.__("Edit existing keybinding"),describedBy:{args:{type:"object",properties:{}}},execute:()=>{const h=l.contextMenuHitTest(m),S=h?.dataset.keybinding,_=h?.dataset.shortcut;if(!_||!S)return console.log("Missing shortcut id/keybinding information");d.emit({request:"edit-keybinding",keybinding:parseInt(S,10),shortcutId:_})}}),l.commands.addCommand(C.deleteBinding,{label:i.__("Delete Keybinding"),caption:i.__("Delete chosen keybinding"),describedBy:{args:{type:"object",properties:{}}},execute:()=>{const h=l.contextMenuHitTest(m),S=h?.dataset.keybinding,_=h?.dataset.shortcut;if(!_||!S)return console.log("Missing shortcut id/keybinding information");d.emit({request:"delete-keybinding",keybinding:parseInt(S,10),shortcutId:_})}}),l.commands.addCommand(C.addBinding,{label:i.__("Add Keybinding"),caption:i.__("Add new keybinding for existing shortcut target"),describedBy:{args:{type:"object",properties:{}}},execute:()=>{const h=l.contextMenuHitTest(m),S=h?.dataset.shortcut;if(!S)return console.log("Missing shortcut id to add keybinding to");d.emit({request:"add-keybinding",shortcutId:S})}}),a.addCommand(C.toggleSelectors,{label:i.__("Toggle Selectors"),caption:i.__("Toggle command selectors"),describedBy:{args:{type:"object",properties:{}}},execute:()=>{d.emit({request:"toggle-selectors"})}}),a.addCommand(C.resetAll,{label:i.__("Reset All"),caption:i.__("Reset all shortcuts"),describedBy:{args:{type:"object",properties:{}}},execute:()=>{d.emit({request:"reset-all"})}});const u=s?h=>s.factoryService.newInlineEditor(h):void 0,y={fieldRenderer:h=>yt({external:ft(e,l,r,d,u),...h})};o.addRenderer(`${v.id}.shortcuts`,y)}function f(d){const m=l.commands.listCommands().join(`
1
+ import{am as R,aV as I,aQ as O,g2 as M,r as n,e0 as w,ct as b,g3 as q,eV as F,g4 as H,g5 as J,aP as U,g6 as k,er as x,e8 as W,g7 as z,g8 as $,cB as Q,J as P,aS as V,eI as G,aT as Y,dS as X,dP as Z}from"../datalayer-app-main.js";import{H as tt}from"./htmlselect-FCh4qyXz.js";import{o as et}from"./index-B5fl-cx7.js";import{a as st}from"./tokens-DQMPCAHQ.js";import{I as ot}from"./tokens-CGj56w43.js";import"./Output-WQnm0VN5.js";import"./index-npitmnIA.js";import"./hoverbox-CStlKQWE.js";import"./index-DE0JwlLw.js";import"./index-Dqc2hT2k.js";import"./dayjs.min-u3zuoSR8.js";import"./isEqual-BxgGIFfN.js";import"./d3-color-Jd8hXty2.js";import"./dist-N90VI44_.js";import"./index-Cz10oMGc.js";import"./RestartIcon-DvpOf5Mf.js";import"./CellSidebarExtension-umk7yQhN.js";import"./NotebookSkeleton-DHQ--KEB.js";import"./Avatar-B0TcOj_b.js";import"./renderer-DTpEU9RO.js";import"./SquareIcon-Dy3l3VdH.js";import"./FileDirectoryOpenFillIcon-Db8fP24q.js";import"./url-4_0MnaFQ.js";/* empty css *//* empty css */import"./style-DdAxk_bj.js";/* empty css */import"./style-Cj1gzCjo.js";/* empty css */import"./style-rkw8dR9f.js";import"./style-GHJFdtIz.js";import"./style-ZSIOeMoX.js";import"./style-iVfD6mFL.js";import"./style-DA-Ya7rp.js";import"./style-D3tvWcFO.js";import"./style-BOqStzF9.js";import"./style-ADLQJ-E9.js";import"./style-DgglluaK.js";import"./ArrowLeftIcon-sX3iNMG1.js";import"./SkubbleIcon-CAaVh_BE.js";import"./usePrimerThemeBridge-BfoXa7hP.js";import"./index-C644crfL.js";import"./KernelVariables-xXzfdk5t.js";import"./index-CavxlEgY.js";import"./SortAscIcon-CmH04s3F.js";import"./SortDescIcon-Qif6E10I.js";import"./NotebookToolbar-C1fpK-Vi.js";import"./RepoPushIcon-BtXQRhLa.js";import"./sessions-W_hhenw6.js";import"./tokens-DcXbsdvP.js";import"./drivecontents-BSbQpH52.js";import"./kernel-Cn-ejD4i.js";class it{constructor(e){this.reset=()=>{this._shortcut={id:"new shortcut",command:"",keybindings:[],selector:"body",category:"",args:{}},this._changed.emit()},this.addKeybinding=async(t,o)=>{this._shortcut.keybindings.push({keys:o,isDefault:!1}),this._changed.emit()},this.replaceKeybinding=async(t,o,s)=>{if(s=s.filter(i=>i!==""),!s.length)return this.deleteKeybinding(t,o);const r=this._shortcut.keybindings.findIndex(i=>i.keys===o.keys);r>-1?this._shortcut.keybindings[r]={keys:s,isDefault:!1}:this.addKeybinding(t,s),this._changed.emit()},this.deleteKeybinding=async(t,o)=>{const s=this._shortcut.keybindings.findIndex(r=>r.keys===o.keys);s>-1&&(this._shortcut.keybindings.splice(s,1),this._changed.emit())},this.resetKeybindings=async t=>{this._shortcut={...this._shortcut,keybindings:[]},this._changed.emit()},this.setCustomOptions=async(t,o)=>(this._shortcut={...this._shortcut,selector:o.selector,args:o.args},this._changed.emit(),!0),this.updateCommand=(t,o)=>{this._shortcut={...this._shortcut,command:t,category:o},this._changed.emit()},this._changed=new R(this),this._shortcut={id:"new shortcut",command:"",keybindings:[],selector:"body",category:"",args:{}},this.findConflictsFor=e.findConflictsFor,this.showSelectors=e.showSelectors,this.external=e.external}get shortcut(){return this._shortcut}get changed(){return this._changed}}class rt extends I{constructor(e){const{shortcut:t,translator:o,editorFactory:s}=e,r=o.load("jupyterlab"),i=new nt(t,o,s,()=>this._checkValidation(),e.readOnly),a=[];e.readOnly?a.push(I.cancelButton({label:r.__("OK")})):(a.push(I.cancelButton({label:r.__("Cancel")})),a.push(I.okButton({label:r.__("Apply")}))),super({title:e.readOnly?r.__("Shortcut Options"):r.__("Custom Shortcut Options"),body:i,buttons:a})}_evtKeydown(e){if(e.key==="Enter"){const t=this.node.querySelector(".jp-JSONEditor"),o=document.activeElement;if(t instanceof HTMLElement&&o instanceof HTMLElement&&t.contains(o)){e.stopPropagation();return}}super._evtKeydown(e)}}class nt extends O{constructor(e,t,o,s,r){var i,a;super();const c=t.load("jupyterlab");this.addClass("jp-Shortcuts-CustomOptionsDialogBody");const g=document.createElement("div");g.className="jp-Shortcuts-CustomOptionDialog-container";const p=document.createElement("label");p.textContent=c.__("Selector:"),p.className="jp-Dialog-label",this._selectorInput=document.createElement("input"),this._selectorInput.type="text",this._selectorInput.disabled=r??!1,this._selectorInput.value=e.selector,this._selectorInput.className="jp-mod-styled",g.appendChild(p),g.appendChild(this._selectorInput);const f=document.createElement("label");if(f.textContent=c.__("Arguments:"),f.className="jp-Dialog-label",g.appendChild(f),r){const d=document.createElement("pre");d.textContent=JSON.stringify((i=e.args)!==null&&i!==void 0?i:{},void 0,2),g.appendChild(d)}else this._editorWidget=new at((a=e.args)!==null&&a!==void 0?a:{},o,s),g.appendChild(this._editorWidget.node);this.node.appendChild(g)}getValue(){var e,t;const o=(t=(e=this._editorWidget)===null||e===void 0?void 0:e.getJSON())!==null&&t!==void 0?t:"{}";let s;try{s=JSON.parse(o)}catch(r){console.error(`Invalid JSON in arguments: ${r instanceof Error?r.message:String(r)}`),s={}}return{selector:this._selectorInput.value,args:s}}dispose(){var e;(e=this._editorWidget)===null||e===void 0||e.dispose(),super.dispose()}}class at extends O{constructor(e,t,o){super(),this._validateJSON=()=>{try{const a=this._editor.model.sharedModel.getSource();JSON.parse(a),this.node.classList.remove("jp-mod-error")}catch{this.node.classList.add("jp-mod-error")}this._checkValidation()},this.addClass("jp-JSONEditor"),this._checkValidation=o;const s=document.createElement("div");s.className="jp-JSONEditor-host";const r=new M.Model({mimeType:"application/json"}),i=JSON.stringify(e,null,2);r.sharedModel.setSource(i),this._editor=t({host:s,model:r,config:{readOnly:!1}}),this.node.appendChild(s),this._editor.model.sharedModel.changed.connect(this._validateJSON,this)}getJSON(){return this._editor.model.sharedModel.getSource()}dispose(){this._editor.model.sharedModel.changed.disconnect(this._validateJSON,this),this._editor.dispose(),super.dispose()}}const D="jp-Shortcuts-ConflictContainer";class A extends n.Component{constructor(e){super(e),this.handleSubmit=async()=>{this._isReplacingExistingKeybinding?this.state.selected?this.props.toggleInput():await this._updateShortcut():(await this._updateShortcut(),this.props.toggleInput())},this._updateShortcut=async()=>{const t=[...this.state.keys,this.state.currentChain];this.setState({keys:t}),this.props.keybinding?await this.props.replaceKeybinding(this.props.shortcut,this.props.keybinding,t):await this.props.addKeybinding(this.props.shortcut,t)},this._handleOverwrite=async(t,o)=>{const s=o.map(w.normalizeKeystroke);for(const r of t){const i=r.keybindings.filter(a=>b.deepEqual(a.keys,s)||s.some(c=>b.deepEqual(a.keys,[c])))[0];if(!i){console.error(`Conflicting binding could not be found for ${r} using keys ${o}`);continue}await this.props.deleteKeybinding(r,i)}await this._updateShortcut()},this.parseChaining=(t,o,s,r,i)=>{let a=q.keyForKeydownEvent(t.nativeEvent);const c=["Shift","Control","Alt","Meta","Ctrl","Accel"];if(t.key==="Backspace")s="",o="",r=[],i="",this.setState({value:o,userInput:s,keys:r,currentChain:i});else if(t.key!=="CapsLock"){const g=s.substr(s.lastIndexOf(" ")+1,s.length).trim();c.lastIndexOf(g)===-1&&g!=""?(s=s+",",r.push(i),i="",t.ctrlKey&&t.key!="Control"&&(s=(s+" Ctrl").trim(),i=(i+" Ctrl").trim()),t.metaKey&&t.key!="Meta"&&(s=(s+" Accel").trim(),i=(i+" Accel").trim()),t.altKey&&t.key!="Alt"&&(s=(s+" Alt").trim(),i=(i+" Alt").trim()),t.shiftKey&&t.key!="Shift"&&(s=(s+" Shift").trim(),i=(i+" Shift").trim()),c.lastIndexOf(t.key)===-1?(s=(s+" "+a).trim(),i=(i+" "+a).trim()):t.key==="Meta"?(s=(s+" Accel").trim(),i=(i+" Accel").trim()):t.key==="Control"?(s=(s+" Ctrl").trim(),i=(i+" Ctrl").trim()):t.key==="Shift"?(s=(s+" Shift").trim(),i=(i+" Shift").trim()):t.key==="Alt"?(s=(s+" Alt").trim(),i=(i+" Alt").trim()):(s=(s+" "+t.key).trim(),i=(i+" "+t.key).trim())):t.key==="Control"?(s=(s+" Ctrl").trim(),i=(i+" Ctrl").trim()):t.key==="Meta"?(s=(s+" Accel").trim(),i=(i+" Accel").trim()):t.key==="Shift"?(s=(s+" Shift").trim(),i=(i+" Shift").trim()):t.key==="Alt"?(s=(s+" Alt").trim(),i=(i+" Alt").trim()):(s=(s+" "+a).trim(),i=(i+" "+a).trim())}return this.setState({keys:r,currentChain:i}),[s,r,i]},this.checkNonFunctional=()=>{const t=["Ctrl","Alt","Accel","Shift"],o=this.state.currentChain.split(" "),s=o[o.length-1];return this.setState({isFunctional:t.indexOf(s)===-1}),t.indexOf(s)!==-1},this.checkShortcutAvailability=(t,o,s)=>{const r=this.props.findConflictsFor([...o,s],this.props.shortcut.selector),i=t===""||r.length===0;return!i&&r.length===1&&r[0].id===this.props.shortcut.id&&this._isReplacingExistingKeybinding?(this.setState({isAvailable:!0}),[]):(this.setState({isAvailable:i}),r)},this.handleInput=t=>{t.preventDefault(),this.setState({selected:!1});const o=this.parseChaining(t,this.state.value,this.state.userInput,this.state.keys,this.state.currentChain),s=o[0],r=o[1],i=o[2],a=this.props.toSymbols(s);let c=this.checkShortcutAvailability(s,r,i);this.setState({value:a,userInput:s,keys:r,currentChain:i},()=>{this.checkNonFunctional(),this._emitConflicts(c)})},this._handleBlur=t=>{var o,s;!((o=this._ref.current)===null||o===void 0)&&o.contains(t.relatedTarget)||!((s=t.relatedTarget)===null||s===void 0)&&s.closest(`.${D}`)||this.props.toggleInput()},this._ref=n.createRef(),this.state={value:this.props.placeholder,userInput:"",isAvailable:!0,isFunctional:this._isReplacingExistingKeybinding,keys:[],currentChain:"",selected:!0}}get _isReplacingExistingKeybinding(){return!!this.props.keybinding}_emitConflicts(e){const t=[...this.state.keys,this.state.currentChain];this.props.displayConflicts({conflictsWith:e,keys:this.state.keys,overwrite:async()=>{this.setState({isAvailable:!0}),await this._handleOverwrite(e,t),this.props.toggleInput()},cancel:()=>{this.props.toggleInput()}})}render(){const e=this.props.translator.load("jupyterlab");let t="jp-Shortcuts-Input";return this.state.isAvailable||(t+=" jp-mod-unavailable-Input"),n.createElement("div",{className:this.props.displayInput?this._isReplacingExistingKeybinding?"jp-Shortcuts-InputBox":"jp-Shortcuts-InputBox jp-Shortcuts-InputBoxNew":"jp-mod-hidden",ref:this._ref,onBlur:this._handleBlur},n.createElement("div",{tabIndex:0,className:t,onKeyDown:this.handleInput,ref:o=>o&&o.focus(),"data-lm-suppress-shortcuts":"true"},n.createElement("p",{className:this.state.selected&&this._isReplacingExistingKeybinding?"jp-Shortcuts-InputText jp-mod-selected-InputText":this.state.value===""?"jp-Shortcuts-InputText jp-mod-waiting-InputText":"jp-Shortcuts-InputText"},this.state.value===""?e.__("press keys"):this.state.value)),n.createElement("button",{className:this.state.isFunctional?this.state.isAvailable?"jp-Shortcuts-Submit":"jp-Shortcuts-Submit jp-mod-conflict-Submit":"jp-Shortcuts-Submit jp-mod-defunc-Submit",disabled:!this.state.isAvailable||!this.state.isFunctional,onClick:this.handleSubmit,tabIndex:0},this.state.isAvailable?n.createElement(F.react,null):n.createElement(H.react,null)))}}var C;(function(l){l.editBinding="shortcuts:edit-keybinding",l.addBinding="shortcuts:add-keybinding",l.deleteBinding="shortcuts:delete-keybinding",l.toggleSelectors="shortcuts:toggle-selectors",l.resetAll="shortcuts:reset-all"})(C||(C={}));var E;(function(l){l[l.Label=0]="Label",l[l.Category=1]="Category",l[l.Split=2]="Split",l[l.Default=3]="Default"})(E||(E={}));class j extends Map{constructor(e){var t,o,s,r;super();const{settings:i,commandRegistry:a,allCommands:c}=e;if(c)for(const g of a.listCommands()){const p={command:g,selector:"body"},f=this._computeTargetId(p),d=p.command.split(":"),m=(t=a.label(p.command,p.args))!==null&&t!==void 0?t:d.length>1?d[1]:void 0,u=d[0],y={...p,id:f,keybindings:[],category:u,label:m,args:{}};this.set(f,y)}else if(i){const g=(o=i.user.shortcuts)!==null&&o!==void 0?o:[],p=new Set(g.map(this._computeKeybindingId.bind(this))),f=(s=i.composite.shortcuts)!==null&&s!==void 0?s:[],d=i.default("shortcuts").map(m=>this._computeTargetId(m));for(const m of f){const u=this._computeTargetId(m),y=this._computeKeybindingId(m),h={keys:w.normalizeKeys(m),isDefault:!p.has(y),...m.preventDefault===void 0?{}:{preventDefault:m.preventDefault}},S=this.get(u);if(S)S.keybindings.push(h);else{const _=m.command.split(":"),K=(r=a.label(m.command,m.args))!==null&&r!==void 0?r:_.length>1?_[1]:void 0,B=_[0];this.set(u,{id:u,selector:m.selector,command:m.command,category:B,label:K,args:m.args,keybindings:[h],userDefined:!d.includes(u)})}}}}findConflictsFor(e,t){const o=new lt({registry:this}),s=e.map(w.normalizeKeystroke);let r=o.findConflicts(s,t);if(r.length!==0)return r;for(const i of s)if(r=o.findConflicts([i],t),r.length!==0)return r;return[]}_computeTargetId(e){var t;return e.command+"_"+e.selector+"_"+JSON.stringify((t=e.args)!==null&&t!==void 0?t:{})}_computeKeybindingId(e){var t;return[e.command,e.selector,JSON.stringify((t=e.args)!==null&&t!==void 0?t:{}),w.normalizeKeys(e).join(" ")].join("_")}}class lt{constructor(e){var t;const o=new Map;for(const s of e.registry.values())for(const r of s.keybindings){const i=this._keybindingHash(r.keys,s.selector),a=(t=o.get(i))!==null&&t!==void 0?t:[];a.push(s),o.set(i,a)}this._keybindingsMap=o}findConflicts(e,t){var o;const s=this._keybindingHash(e,t);return(o=this._keybindingsMap.get(s))!==null&&o!==void 0?o:[]}_keybindingHash(e,t){return e.join(" ")+"_"+t}}(function(l){function e(s){return s.replace(/\s+/g,"").toLowerCase()}function t(s,r){var i;const a=s.category.toLowerCase(),c=((i=s.label)!==null&&i!==void 0?i:"").toLowerCase(),g=`${a} ${c}`;let p=1/0,f=null;const d=/\b\w/g;for(;;){const S=d.exec(g);if(!S)break;const _=J.matchSumOfDeltas(g,r,S.index);if(!_)break;_&&_.score<=p&&(p=_.score,f=_.indices)}if(!f||p===1/0)return null;const m=a.length+1,u=U.lowerBound(f,m,(S,_)=>S-_),y=f.slice(0,u),h=f.slice(u);for(let S=0,_=h.length;S<_;++S)h[S]-=m;return y.length===0?{matchType:E.Label,categoryIndices:null,labelIndices:h,score:p,item:s}:h.length===0?{matchType:E.Category,categoryIndices:y,labelIndices:null,score:p,item:s}:{matchType:E.Split,categoryIndices:y,labelIndices:h,score:p,item:s}}function o(s,r){r=e(r);let i=[];for(const a of s.values()){if(!r){i.push({matchType:E.Default,categoryIndices:null,labelIndices:null,score:0,item:a});continue}let c=t(a,r);c&&i.push(c)}return i}l.matchItems=o})(j||(j={}));const ct={Ctrl:"⌃",Alt:"⌥",Shift:"⇧",Accel:"⌘",Cmd:"⌘"};class L extends n.Component{constructor(e){super(e),this.toggleInputNew=()=>{this.setState({displayNewInput:!this.state.displayNewInput,conflicts:new Map})},this.toSymbols=t=>k.IS_MAC?t.split(" ").map(o=>{var s;return(s=ct[o])!==null&&s!==void 0?s:o}).join(" "):t.split(" ").map(o=>o==="Accel"?"Ctrl":o).join(" "),this._trans=this.props.external.translator.load("jupyterlab"),this.state={displayNewInput:!1,displayReplaceInput:Object.freeze({}),conflicts:new Map}}componentDidMount(){this.props.external.actionRequested.connect(this._onActionRequested,this)}componentWillUnmount(){this.props.external.actionRequested.disconnect(this._onActionRequested,this)}async _onActionRequested(e,t){if(!("shortcutId"in t&&t.shortcutId!==this.props.shortcut.id)){if(t.request==="add-keybinding")return this.toggleInputNew();if(t.request==="edit-keybinding"&&this.toggleInputReplaceMethod(t.keybinding),t.request==="delete-keybinding"){const o=this.props.shortcut,s=o.keybindings[t.keybinding];this.props.deleteKeybinding(o,s).catch(console.error)}}}getCategoryCell(){return n.createElement("div",{className:"jp-Shortcuts-Cell"},this.props.shortcut.category)}getLabelCell(){var e;if(this.props.newShortcutUtils){const t=this._getFilteredCommands();return n.createElement("div",{className:"jp-Shortcuts-Cell"},n.createElement(tt,{value:this.props.shortcut.command,options:[{value:"",label:this._trans.__("Select a command")},...t.map(o=>({value:o.command,label:`${o.category}: ${o.label}`}))],onChange:o=>{var s,r,i;const a=t.find(c=>c.command===o.target.value);(s=this.props.newShortcutUtils)===null||s===void 0||s.updateCommand((r=a?.command)!==null&&r!==void 0?r:"",(i=a?.category)!==null&&i!==void 0?i:"")}}))}else return n.createElement("div",{className:"jp-Shortcuts-Cell"},n.createElement("div",{className:"jp-label"},(e=this.props.shortcut.label)!==null&&e!==void 0?e:this._trans.__("(Command label missing)")))}getResetShortCutLink(){return n.createElement("a",{className:"jp-Shortcuts-Reset",onClick:()=>this.props.resetKeybindings(this.props.shortcut)},this.props.shortcut.userDefined?this._trans.__("Delete"):this._trans.__("Reset"))}getSourceCell(){var e;const t=this.props.shortcut.keybindings.every(r=>r.isDefault),o=this.props.shortcut.userDefined||!!this.props.newShortcutUtils,s=o?this._trans.__("Custom options"):this._trans.__("Show options");return n.createElement("div",{className:"jp-Shortcuts-Cell"},!this.props.newShortcutUtils&&n.createElement("div",{className:"jp-Shortcuts-SourceCell"},t?this._trans.__("Default"):this._trans.__("Custom")),t?"":this.getResetShortCutLink(),this.props.external.editorFactory&&n.createElement(x,{className:"jp-mod-styled jp-mod-reject jp-Shortcuts-CustomOptions",onClick:async()=>{if(!this.props.external.editorFactory){console.error("Cannot build the custom options form");return}const i=await new rt({shortcut:this.props.shortcut,translator:this.props.external.translator,editorFactory:this.props.external.editorFactory,readOnly:!o}).launch();i.button.accept&&o&&i.value&&await this.props.setCustomOptions(this.props.shortcut,i.value)},title:s,"aria-label":s,appearance:"neutral"},o?n.createElement(W.react,{tag:null}):n.createElement(z.react,{tag:null})),!!this.props.newShortcutUtils&&n.createElement(n.Fragment,null,n.createElement(x,{className:"jp-mod-styled jp-mod-accept jp-Shortcuts-SaveNew",onClick:(e=this.props.newShortcutUtils)===null||e===void 0?void 0:e.saveShortcut,title:this._trans.__("Save shortcut"),"aria-label":this._trans.__("Save shortcut"),appearance:"neutral",disabled:!this.props.shortcut.command||!this.props.shortcut.keybindings.length||this.props.shortcut.keybindings.every(r=>!r.keys||r.keys.length===0)},n.createElement(F.react,{tag:null}))))}getOptionalSelectorCell(){return this.props.showSelectors?n.createElement("div",{className:"jp-Shortcuts-Cell"},n.createElement("div",{className:"jp-selector"},this.props.shortcut.selector)):null}getClassNameForShortCuts(e){const t=["jp-Shortcuts-ShortcutCell"];switch(e.length){case 1:t.push("jp-Shortcuts-SingleCell");break;case 0:t.push("jp-Shortcuts-EmptyCell");break}return t.join(" ")}toggleInputReplaceMethod(e){const t=this.state.displayReplaceInput[e];this.setState({displayReplaceInput:{...this.state.displayReplaceInput,[e]:!t},conflicts:new Map})}getDisplayReplaceInput(e){return this.state.displayReplaceInput[e]}getOrDisplayIfNeeded(e){const t=["jp-Shortcuts-Or"];return(e||this.state.displayNewInput)&&t.push("jp-Shortcuts-Or-Forced"),n.createElement("div",{className:t.join(" ")},this._trans.__("or"))}getShortCutAsInput(e,t){return n.createElement(A,{addKeybinding:this.props.addKeybinding,replaceKeybinding:this.props.replaceKeybinding,deleteKeybinding:this.props.deleteKeybinding,findConflictsFor:this.props.findConflictsFor,toggleInput:()=>this.toggleInputReplaceMethod(t),shortcut:this.props.shortcut,keybinding:e,displayConflicts:o=>{const s=new Map(this.state.conflicts);s.set(e,o),this.setState({conflicts:s})},toSymbols:this.toSymbols,displayInput:this.getDisplayReplaceInput(t),placeholder:this.toSymbols(e.keys.join(", ")),translator:this.props.external.translator})}getShortCutForDisplayOnly(e){return e.keys.map((t,o)=>n.createElement("div",{className:"jp-Shortcuts-ShortcutKeysContainer",key:o},n.createElement("div",{className:"jp-Shortcuts-ShortcutKeys"},this.toSymbols(t).split(" ").map((s,r,i)=>n.createElement(n.Fragment,{key:`${o}-${s}-${r}`},n.createElement("span",{className:"jp-ContextualShortcut-Key"},s),r+1<i.length?" + ":null))),o+1<e.keys.length?n.createElement("div",{className:"jp-Shortcuts-Comma"},","):null))}isLocationBeingEdited(e){return this.state.displayReplaceInput[e]}getDivForKey(e,t,o){return n.createElement("div",{className:"jp-Shortcuts-ShortcutContainer",key:this.props.shortcut.id+"_"+e,"data-keybinding":e,"data-shortcut":this.props.shortcut.id,onClick:()=>this.toggleInputReplaceMethod(e)},this.isLocationBeingEdited(e)?this.getShortCutAsInput(t,e):this.getShortCutForDisplayOnly(t),!(e===this._nonEmptyBindings.length-1&&Object.values(this.state.displayReplaceInput).some(Boolean))&&this.getOrDisplayIfNeeded(e<this._nonEmptyBindings.length-1))}getAddLink(){return n.createElement("a",{className:this.state.displayNewInput?"":"jp-Shortcuts-Plus",onClick:()=>{this.toggleInputNew()}},this._trans.__("Add"))}getInputBoxWhenToggled(){return this.state.displayNewInput?n.createElement(A,{addKeybinding:this.props.addKeybinding,replaceKeybinding:this.props.replaceKeybinding,deleteKeybinding:this.props.deleteKeybinding,findConflictsFor:this.props.findConflictsFor,toggleInput:this.toggleInputNew,shortcut:this.props.shortcut,displayConflicts:e=>{const t=new Map(this.state.conflicts);t.set(null,e),this.setState({conflicts:t})},toSymbols:this.toSymbols,displayInput:this.state.displayNewInput,placeholder:"",translator:this.props.external.translator}):n.createElement("div",null)}getShortCutsCell(e){return n.createElement("div",{className:"jp-Shortcuts-Cell"},n.createElement("div",{className:this.getClassNameForShortCuts(e)},e.map((t,o)=>this.getDivForKey(o,t,e)),e.length>=1&&!this.state.displayNewInput&&!Object.values(this.state.displayReplaceInput).some(Boolean)&&this.getAddLink(),e.length===0&&!this.state.displayNewInput&&this.getAddLink(),this.getInputBoxWhenToggled()))}getConflicts(){const e=[...this.state.conflicts.values()].filter(t=>t.conflictsWith.length!==0);return e.length===0?n.createElement(n.Fragment,null):n.createElement("div",{className:"jp-Shortcuts-Row jp-Shortcuts-RowWithConflict"},n.createElement("div",{className:D},e.map(t=>{const o=t.keys.join(" ")+"_"+t.conflictsWith.map(s=>s.id).join("");return n.createElement("div",{className:"jp-Shortcuts-Conflict",key:o},n.createElement("div",{className:"jp-Shortcuts-ErrorMessage"},this._trans.__("Shortcut already in use by %1. Overwrite it?",t.conflictsWith.map(s=>{var r;return(r=s.label)!==null&&r!==void 0?r:s.command}).join(", "))),n.createElement("div",{className:"jp-Shortcuts-ErrorButton"},n.createElement("button",{className:"jp-Button jp-mod-reject jp-mod-styled",onClick:()=>{this._clearConflict(t),t.cancel()}},this._trans.__("Cancel")),n.createElement("button",{className:"jp-Button jp-mod-warn jp-mod-styled",onClick:()=>{this._clearConflict(t),t.overwrite()}},this._trans.__("Overwrite"))))})))}_clearConflict(e){const t=new Map,o=this._conflictId(e);for(const[s,r]of this.state.conflicts.entries())this._conflictId(r)!==o&&t.set(s,r);this.setState({conflicts:t})}_conflictId(e){return e.keys.join(" ")+"_"+e.conflictsWith.map(t=>t.id).join("")}_getFilteredCommands(){var e,t;const o=new j({commandRegistry:this.props.external.commandRegistry,allCommands:!0}),s=j.matchItems(o,(t=(e=this.props.newShortcutUtils)===null||e===void 0?void 0:e.searchQuery)!==null&&t!==void 0?t:"").map(r=>r.item).filter(r=>!r.command.startsWith("__internal:"));return s.sort((r,i)=>{var a,c;const g=r.category,p=i.category,f=g.localeCompare(p);if(f)return f;{const d=(a=r.label)!==null&&a!==void 0?a:"",m=(c=i.label)!==null&&c!==void 0?c:"";return d.localeCompare(m)}}),s}get _nonEmptyBindings(){return this.props.shortcut.keybindings.filter(e=>e.keys.filter(t=>t!="").length!==0)}render(){return n.createElement(n.Fragment,null,n.createElement("div",{className:`jp-Shortcuts-Row${this.props.newShortcutUtils?" jp-Shortcuts-Row-newShortcut":""}`,"data-shortcut":this.props.shortcut.id},this.getCategoryCell(),this.getLabelCell(),this.getShortCutsCell(this._nonEmptyBindings),this.getSourceCell(),this.getOptionalSelectorCell()),this.getConflicts())}}const dt=115;class ht extends n.Component{render(){return n.createElement("div",{className:"jp-Shortcuts-ShortcutListContainer",style:{height:`${this.props.height-dt}px`},id:"shortcutListContainer"},n.createElement("div",{className:"jp-Shortcuts-ShortcutList"},this.props.shortcuts.map(e=>n.createElement(L,{key:e.id,addKeybinding:this.props.addKeybinding,replaceKeybinding:this.props.replaceKeybinding,deleteKeybinding:this.props.deleteKeybinding,resetKeybindings:this.props.resetKeybindings,findConflictsFor:this.props.findConflictsFor,setCustomOptions:this.props.setCustomOptions,shortcut:e,showSelectors:this.props.showSelectors,external:this.props.external}))))}}class ut extends n.Component{render(){return n.createElement("div",{className:this.props.title.toLowerCase()===this.props.active?"jp-Shortcuts-Header jp-Shortcuts-CurrentHeader":"jp-Shortcuts-Header",onClick:()=>this.props.updateSort(this.props.columnId)},this.props.title,n.createElement($.react,{className:"jp-Shortcuts-SortButton jp-ShortcutTitleItem-sortButton"}))}}function pt(l){const e=l.translator.load("jupyterlab");return n.createElement("div",{className:"jp-Shortcuts-AdvancedOptions"},n.createElement("a",{className:"jp-Shortcuts-AdvancedOptionsLink",onClick:()=>l.toggleSelectors()},l.showSelectors?e.__("Hide Selectors"):e.__("Show Selectors")),n.createElement("a",{className:"jp-Shortcuts-AdvancedOptionsLink",onClick:()=>l.resetShortcuts()},e.__("Reset All")),n.createElement(x,{className:"jp-mod-styled jp-mod-accept jp-Shortcuts-AdvancedOptionsButton",onClick:l.toggleAddCommandRow,title:e.__("Tool for adding shortcuts"),"aria-label":e.__("Tool for adding shortcuts")},n.createElement(Q.react,{tag:"span",elementSize:"xlarge",elementPosition:"center"})))}class mt extends n.Component{constructor(e){super(e)}getShortCutTitleItem(e,t){return n.createElement("div",{className:"jp-Shortcuts-Cell"},n.createElement(ut,{title:e,updateSort:this.props.updateSort,active:this.props.currentSort,columnId:t}))}render(){const e=this.props.translator.load("jupyterlab");return n.createElement("div",{className:"jp-Shortcuts-Top"},n.createElement("div",{className:"jp-Shortcuts-TopNav"},n.createElement(et,{"aria-label":e.__("Search shortcuts"),updateFilter:(t,o)=>this.props.updateSearchQuery(o??""),placeholder:e.__("Search…"),useFuzzyFilter:!1}),n.createElement(pt,{toggleSelectors:this.props.toggleSelectors,showSelectors:this.props.showSelectors,resetShortcuts:this.props.resetShortcuts,toggleAddCommandRow:this.props.toggleAddCommandRow,translator:this.props.translator})),n.createElement("div",{className:"jp-Shortcuts-HeaderRowContainer"},n.createElement("div",{className:"jp-Shortcuts-HeaderRow"},this.getShortCutTitleItem(e.__("Category"),"category"),this.getShortCutTitleItem(e.__("Command"),"command"),n.createElement("div",{className:"jp-Shortcuts-Cell"},n.createElement("div",{className:"title-div"},e.__("Shortcut"))),this.getShortCutTitleItem(e.__("Source"),"source"),this.props.showSelectors&&this.getShortCutTitleItem(e.__("Selectors"),"selector"))))}}class gt extends n.Component{constructor(e){super(e),this.updateSearchQuery=t=>{this.setState({searchQuery:t},()=>{const o=this.state.shortcutRegistry;this.setState({filteredShortcutList:this._searchFilterShortcuts(o)},()=>{this.sortShortcuts()})})},this.resetShortcuts=async()=>{await(await this.props.external.getSettings()).set("shortcuts",[]),await this._refreshShortcutList()},this.resetKeybindings=async t=>{await this._setKeybinding(t,[])},this.replaceKeybinding=async(t,o,s)=>this._setKeybinding(t,s,o),this.deleteKeybinding=async(t,o)=>{await this._setKeybinding(t,[],o)},this.addKeybinding=async(t,o)=>{await this._setKeybinding(t,o)},this.setCustomOptions=async(t,o)=>{var s;const r=await this.props.external.getSettings(),i=(s=r.user.shortcuts)!==null&&s!==void 0?s:[],a=i.filter(c=>{var g,p;return c.command===t.command&&c.selector===t.selector&&b.deepEqual((g=c.args)!==null&&g!==void 0?g:{},(p=t.args)!==null&&p!==void 0?p:{})});return a.length?(a.forEach(c=>{c.selector=o.selector,c.args=o.args}),await r.set("shortcuts",i),await this._refreshShortcutList(),!0):(console.error("Error writing the custom options: target not found"),!1)},this.toggleSelectors=()=>{this.setState({showSelectors:!this.state.showSelectors})},this.toggleAddCommandRow=async()=>{this.setState({showAddCommand:!this.state.showAddCommand})},this.updateSort=t=>{t!==this.state.currentSort&&this.setState({currentSort:t},this.sortShortcuts)},this.saveNewShortcut=async()=>{const t={...this.state.newShortcut,args:void 0};for(let s of t.keybindings)await this.addKeybinding(t,s.keys);await this.setCustomOptions(t,{selector:t.selector,args:this.state.newShortcut.args})&&(this._newShortcutItem.reset(),this.toggleAddCommandRow())},this._newShortcutItem=new it({showSelectors:!1,findConflictsFor:(t,o)=>this.state.shortcutRegistry?this.state.shortcutRegistry.findConflictsFor(t,o):(console.error("Cannot search for keybinding conflicts at this time: registry is not ready"),[]),external:this.props.external}),this.state={shortcutRegistry:null,filteredShortcutList:new Array,shortcutsFetched:!1,searchQuery:"",showSelectors:!1,currentSort:"category",showAddCommand:!1,newShortcut:this._newShortcutItem.shortcut},this._newShortcutItem.changed.connect(()=>{this.setState({newShortcut:{...this._newShortcutItem.shortcut}})})}componentDidMount(){this.props.external.actionRequested.connect(this._onActionRequested,this),this._refreshShortcutList()}componentWillUnmount(){this.props.external.actionRequested.disconnect(this._onActionRequested,this)}async _onActionRequested(e,t){if(t.request==="toggle-selectors")return this.toggleSelectors();t.request==="reset-all"&&await this.resetShortcuts()}async _refreshShortcutList(){const e=await this.props.external.getSettings(),t=new j({commandRegistry:this.props.external.commandRegistry,settings:e});this.setState({shortcutRegistry:t,filteredShortcutList:this._searchFilterShortcuts(t),shortcutsFetched:!0},()=>{this.sortShortcuts()})}_searchFilterShortcuts(e){return e?j.matchItems(e,this.state.searchQuery).map(o=>o.item):[]}async _setKeybinding(e,t,o){var s,r,i,a,c;t.length===1&&t[0]==""&&(t=[]);const g=t.map(w.normalizeKeystroke),p=await this.props.external.getSettings(),f=(s=p.user.shortcuts)!==null&&s!==void 0?s:[],d=[];let m=!1;for(let u of f)if(u.command===e.command&&u.selector===e.selector&&b.deepEqual((r=u.args)!==null&&r!==void 0?r:{},(i=e.args)!==null&&i!==void 0?i:{})&&o&&b.deepEqual(o.keys,w.normalizeKeys(u))){const y=o.isDefault&&b.deepEqual(o.keys,g);t.length!==0&&!y&&d.push(this._setShortcutKeys(u,t)),m=!0}else{if(u.command===e.command&&u.selector===e.selector&&b.deepEqual((a=u.args)!==null&&a!==void 0?a:{},(c=e.args)!==null&&c!==void 0?c:{})&&!o&&t.length===0)continue;d.push(u)}if(!m){const u=!o||!b.deepEqual(o.keys,g);o&&o.isDefault&&u&&d.push(this._shortcutFromTarget(e,o.keys,{disabled:!0,preventDefault:o.preventDefault})),t.length!==0&&u&&d.push(this._shortcutFromTarget(e,t,{preventDefault:o?.preventDefault}))}await p.set("shortcuts",d),await this._refreshShortcutList()}_setShortcutKeys(e,t){const o=this._platformKeys(e);return{...e,[o]:t}}_shortcutFromTarget(e,t,o={}){const s={command:e.command,selector:e.selector,keys:t};return e.args&&!b.deepEqual(e.args,{})&&(s.args=e.args),o.disabled&&(s.disabled=!0),o.preventDefault!==void 0&&(s.preventDefault=o.preventDefault),s}_platformKeys(e){return k.IS_WIN&&e.winKeys?"winKeys":k.IS_MAC&&e.macKeys?"macKeys":!k.IS_WIN&&!k.IS_MAC&&e.linuxKeys?"linuxKeys":"keys"}sortShortcuts(){const e=this.state.filteredShortcutList;let t=this.state.currentSort;t==="command"&&(t="label");const o=s=>{var r;return t==="source"?s.keybindings.every(i=>i.isDefault)?"default":"other":(r=s[t])!==null&&r!==void 0?r:""};e.sort((s,r)=>{var i,a;const c=o(s),g=o(r),p=c.localeCompare(g);if(p)return p;{const f=(i=s.label)!==null&&i!==void 0?i:"",d=(a=r.label)!==null&&a!==void 0?a:"";return f.localeCompare(d)}}),this.setState({filteredShortcutList:e})}render(){return this.state.shortcutsFetched?n.createElement("div",{className:"jp-Shortcuts-ShortcutUI",id:"jp-shortcutui"},n.createElement(mt,{updateSearchQuery:this.updateSearchQuery,resetShortcuts:this.resetShortcuts,toggleSelectors:this.toggleSelectors,showSelectors:this.state.showSelectors,updateSort:this.updateSort,currentSort:this.state.currentSort,toggleAddCommandRow:this.toggleAddCommandRow,width:this.props.width,translator:this.props.external.translator}),this.state.showAddCommand&&n.createElement(L,{...this._newShortcutItem,shortcut:this.state.newShortcut,newShortcutUtils:{searchQuery:this.state.searchQuery,updateCommand:this._newShortcutItem.updateCommand,saveShortcut:this.saveNewShortcut}}),n.createElement(ht,{shortcuts:this.state.filteredShortcutList,resetKeybindings:this.resetKeybindings,addKeybinding:this.addKeybinding,replaceKeybinding:this.replaceKeybinding,deleteKeybinding:this.deleteKeybinding,setCustomOptions:this.setCustomOptions,showSelectors:this.state.showSelectors,findConflictsFor:(e,t)=>this.state.shortcutRegistry?this.state.shortcutRegistry.findConflictsFor(e,t):(console.error("Cannot search for keybinding conflicts at this time: registry is not ready"),[]),height:this.props.height,external:this.props.external})):null}}const yt=l=>P.createElement(gt,{external:l.external,height:1e3,width:1e3}),T="@jupyterlab/shortcuts-extension:shortcuts";function ft(l,e,t,o,s){return{translator:t,getSettings:()=>l.load(T,!0),commandRegistry:e.commands,actionRequested:o,editorFactory:s}}const v={id:T,description:"Adds the keyboard shortcuts editor.",requires:[ot],optional:[V,st,G],activate:async(l,e,t,o,s)=>{const r=t??Y,i=r.load("jupyterlab"),{commands:a}=l;let c,g,p={};if(o){const d=new R({}),m=h=>h.dataset.shortcut!==void 0;l.commands.addCommand(C.editBinding,{label:i.__("Edit Keybinding"),caption:i.__("Edit existing keybinding"),describedBy:{args:{type:"object",properties:{}}},execute:()=>{const h=l.contextMenuHitTest(m),S=h?.dataset.keybinding,_=h?.dataset.shortcut;if(!_||!S)return console.log("Missing shortcut id/keybinding information");d.emit({request:"edit-keybinding",keybinding:parseInt(S,10),shortcutId:_})}}),l.commands.addCommand(C.deleteBinding,{label:i.__("Delete Keybinding"),caption:i.__("Delete chosen keybinding"),describedBy:{args:{type:"object",properties:{}}},execute:()=>{const h=l.contextMenuHitTest(m),S=h?.dataset.keybinding,_=h?.dataset.shortcut;if(!_||!S)return console.log("Missing shortcut id/keybinding information");d.emit({request:"delete-keybinding",keybinding:parseInt(S,10),shortcutId:_})}}),l.commands.addCommand(C.addBinding,{label:i.__("Add Keybinding"),caption:i.__("Add new keybinding for existing shortcut target"),describedBy:{args:{type:"object",properties:{}}},execute:()=>{const h=l.contextMenuHitTest(m),S=h?.dataset.shortcut;if(!S)return console.log("Missing shortcut id to add keybinding to");d.emit({request:"add-keybinding",shortcutId:S})}}),a.addCommand(C.toggleSelectors,{label:i.__("Toggle Selectors"),caption:i.__("Toggle command selectors"),describedBy:{args:{type:"object",properties:{}}},execute:()=>{d.emit({request:"toggle-selectors"})}}),a.addCommand(C.resetAll,{label:i.__("Reset All"),caption:i.__("Reset all shortcuts"),describedBy:{args:{type:"object",properties:{}}},execute:()=>{d.emit({request:"reset-all"})}});const u=s?h=>s.factoryService.newInlineEditor(h):void 0,y={fieldRenderer:h=>yt({external:ft(e,l,r,d,u),...h})};o.addRenderer(`${v.id}.shortcuts`,y)}function f(d){const m=l.commands.listCommands().join(`
2
2
  `);g||(g=b.deepCopy(d.properties.shortcuts.default)),p={},d.properties.shortcuts.default=Object.keys(e.plugins).map(u=>{const y=e.plugins[u].schema["jupyter.lab.shortcuts"]||[];return p[u]=y,y}).concat([g]).reduce((u,y)=>k.IS_MAC?u.concat(y):u.concat(y.filter(h=>!h.keys.some(S=>{const{cmd:_}=w.parseKeystroke(S);return _}))),[]).sort((u,y)=>u.command.localeCompare(y.command)),d.properties.shortcuts.description=i.__(`Note: To disable a system default shortcut,
3
3
  copy it to User Preferences and add the
4
4
  "disabled" key, for example:
@@ -1,4 +1,4 @@
1
- import{aU as J,aV as R,aT as U,aM as pe,am as me,cq as C,aO as G,bw as ee,aS as I,aY as ge,dN as fe,aW as be,dO as ve,r as k,cz as Z,a_ as ye,cE as O,ct as q,dP as he,dQ as _e,aQ as we,dR as xe,dS as S}from"../datalayer-app-main.js";import{I as Te,S as Be}from"./index-0IRcrdE0.js";import{I as V}from"./tokens-CGj56w43.js";import{I as Pe,b as te,d as Ee,M as Q}from"./index-h8lXpqtD.js";import{I as je}from"./treepathupdater-BCGeUI1k.js";import{d as Me,e as K,J as H,c as N,f as oe,g as ie,h as $,i as Ce,L as ne,j as Le}from"./index-46VEGuyz.js";import{R as Ae}from"./menu-BBLExIAN.js";import"./hoverbox-CStlKQWE.js";import"./Output-DLpf2Of9.js";import"./index-B5W7CVUY.js";import"./index-CBWGYoQM.js";import"./dayjs.min-u3zuoSR8.js";import"./isEqual-BxgGIFfN.js";import"./d3-color-Jd8hXty2.js";import"./dist-N90VI44_.js";import"./index-Cz10oMGc.js";import"./RestartIcon-DvpOf5Mf.js";import"./CellSidebarExtension-CrdbRLaE.js";import"./NotebookSkeleton-DHQ--KEB.js";import"./Avatar-B0TcOj_b.js";import"./renderer-NdtLW87o.js";import"./SquareIcon-Dy3l3VdH.js";import"./FileDirectoryOpenFillIcon-Db8fP24q.js";import"./url-4_0MnaFQ.js";/* empty css *//* empty css */import"./style-DdAxk_bj.js";/* empty css */import"./style-Cj1gzCjo.js";/* empty css */import"./style-rkw8dR9f.js";import"./style-GHJFdtIz.js";import"./style-ZSIOeMoX.js";import"./style-iVfD6mFL.js";import"./style-DA-Ya7rp.js";import"./style-D3tvWcFO.js";import"./style-BOqStzF9.js";import"./style-ADLQJ-E9.js";import"./style-DgglluaK.js";import"./ArrowLeftIcon-sX3iNMG1.js";import"./SkubbleIcon-CAaVh_BE.js";import"./usePrimerThemeBridge-BfoXa7hP.js";import"./index-C644crfL.js";import"./KernelVariables-BIWju6rZ.js";import"./index-CavxlEgY.js";import"./SortAscIcon-CmH04s3F.js";import"./SortDescIcon-Qif6E10I.js";import"./NotebookToolbar-C1fpK-Vi.js";import"./RepoPushIcon-BtXQRhLa.js";import"./sessions-W_hhenw6.js";import"./tokens-DcXbsdvP.js";import"./drivecontents-BSbQpH52.js";import"./kernel-Cn-ejD4i.js";const Ie=async function(i,m,d){d=d||U;const t=d.load("jupyterlab"),u=t.__("Server Connection Error"),r=t.__(`A connection to the Jupyter server could not be established.
1
+ import{aU as J,aV as R,aT as U,aM as pe,am as me,cq as C,aO as G,bw as ee,aS as I,aY as ge,dN as fe,aW as be,dO as ve,r as k,cz as Z,a_ as ye,cE as O,ct as q,dP as he,dQ as _e,aQ as we,dR as xe,dS as S}from"../datalayer-app-main.js";import{I as Te,S as Be}from"./index-0IRcrdE0.js";import{I as V}from"./tokens-CGj56w43.js";import{I as Pe,b as te,d as Ee,M as Q}from"./index-npitmnIA.js";import{I as je}from"./treepathupdater-BCGeUI1k.js";import{d as Me,e as K,J as H,c as N,f as oe,g as ie,h as $,i as Ce,L as ne,j as Le}from"./index-B5fl-cx7.js";import{R as Ae}from"./menu-BBLExIAN.js";import"./hoverbox-CStlKQWE.js";import"./Output-WQnm0VN5.js";import"./index-DE0JwlLw.js";import"./index-Dqc2hT2k.js";import"./dayjs.min-u3zuoSR8.js";import"./isEqual-BxgGIFfN.js";import"./d3-color-Jd8hXty2.js";import"./dist-N90VI44_.js";import"./index-Cz10oMGc.js";import"./RestartIcon-DvpOf5Mf.js";import"./CellSidebarExtension-umk7yQhN.js";import"./NotebookSkeleton-DHQ--KEB.js";import"./Avatar-B0TcOj_b.js";import"./renderer-DTpEU9RO.js";import"./SquareIcon-Dy3l3VdH.js";import"./FileDirectoryOpenFillIcon-Db8fP24q.js";import"./url-4_0MnaFQ.js";/* empty css *//* empty css */import"./style-DdAxk_bj.js";/* empty css */import"./style-Cj1gzCjo.js";/* empty css */import"./style-rkw8dR9f.js";import"./style-GHJFdtIz.js";import"./style-ZSIOeMoX.js";import"./style-iVfD6mFL.js";import"./style-DA-Ya7rp.js";import"./style-D3tvWcFO.js";import"./style-BOqStzF9.js";import"./style-ADLQJ-E9.js";import"./style-DgglluaK.js";import"./ArrowLeftIcon-sX3iNMG1.js";import"./SkubbleIcon-CAaVh_BE.js";import"./usePrimerThemeBridge-BfoXa7hP.js";import"./index-C644crfL.js";import"./KernelVariables-xXzfdk5t.js";import"./index-CavxlEgY.js";import"./SortAscIcon-CmH04s3F.js";import"./SortDescIcon-Qif6E10I.js";import"./NotebookToolbar-C1fpK-Vi.js";import"./RepoPushIcon-BtXQRhLa.js";import"./sessions-W_hhenw6.js";import"./tokens-DcXbsdvP.js";import"./drivecontents-BSbQpH52.js";import"./kernel-Cn-ejD4i.js";const Ie=async function(i,m,d){d=d||U;const t=d.load("jupyterlab"),u=t.__("Server Connection Error"),r=t.__(`A connection to the Jupyter server could not be established.
2
2
  JupyterLab will continue trying to reconnect.
3
3
  Check your network connection or Jupyter server configuration.
4
4
  `);if(!F.displayConnectionLost)return;if(F.serverConnectionLost){await F.serverConnectionLost;return}const n=J({title:u,body:r,checkbox:{label:t.__("Do not show this message again in this session."),caption:t.__("If checked, you will not see a dialog informing you about an issue with server connection in this session.")},buttons:[R.cancelButton({label:t.__("Close")})]}).then(f=>{f.isChecked&&(F.displayConnectionLost=!1)}).catch(f=>{console.error("An error occurred while showing the dialog: ",f)}).finally(()=>{F.serverConnectionLost=void 0});F.serverConnectionLost=n};var F;(function(i){i.displayConnectionLost=!0})(F||(F={}));class Re{constructor(m){this.stop=new pe("@jupyterlab/application:Router#stop"),this._routed=new me(this),this._rules=new Map,this.base=m.base,this.commands=m.commands}get current(){var m,d;const{base:t}=this,u=C.URLExt.parse(window.location.href),{search:r,hash:n}=u,f=(d=(m=u.pathname)===null||m===void 0?void 0:m.replace(t,"/"))!==null&&d!==void 0?d:"",a=f+r+n;return{hash:n,path:f,request:a,search:r}}get routed(){return this._routed}navigate(m,d={}){const{base:t}=this,{history:u}=window,{hard:r}=d,n=document.location.href,f=m&&m.indexOf(t)===0?m:C.URLExt.join(t,m);if(f===n)return r?this.reload():void 0;if(u.pushState({},"",f),r)return this.reload();d.skipRouting||requestAnimationFrame(()=>{this.route()})}register(m){var d;const{command:t,pattern:u}=m,r=(d=m.rank)!==null&&d!==void 0?d:100,n=this._rules;return n.set(u,{command:t,rank:r}),new G(()=>{n.delete(u)})}reload(){window.location.reload()}route(){const{commands:m,current:d,stop:t}=this,{request:u}=d,r=this._routed,n=this._rules,f=[];n.forEach((b,p)=>{u?.match(p)&&f.push(b)});const a=f.sort((b,p)=>p.rank-b.rank),w=new ee,h=async()=>{if(!a.length){r.emit(d),w.resolve(void 0);return}const{command:b}=a.pop();try{const p=this.current.request;await m.execute(b,d)===t&&(a.length=0,console.debug(`Routing ${p} was short-circuited by ${b}`))}catch(p){console.warn(`Routing ${u} to ${b} failed`,p)}h()};return h(),w.promise}}const We="TopBar",re={id:"@jupyterlab/application-extension:top-bar",description:"Adds a toolbar to the top area (next to the main menu bar).",autoStart:!0,requires:[V,Pe],optional:[I],activate:(i,m,d,t)=>{const u=(t??U).load("jupyterlab"),r=new ge;r.id="jp-top-bar",r.node.setAttribute("aria-label",u.__("Topbar toolbar")),fe(r,be(d,m,We,re.id,t??U),r),i.shell.add(r,"top",{rank:900})}},X=100;var l;(function(i){i.activateNextTab="application:activate-next-tab",i.activatePreviousTab="application:activate-previous-tab",i.activateNextTabBar="application:activate-next-tab-bar",i.activatePreviousTabBar="application:activate-previous-tab-bar",i.close="application:close",i.closeOtherTabs="application:close-other-tabs",i.closeRightTabs="application:close-right-tabs",i.closeAll="application:close-all",i.setActivityBarPosition="application:set-activity-bar-position",i.moveWidget="application:move-widget",i.setMode="application:set-mode",i.showPropertyPanel="property-inspector:show-panel",i.resetLayout="application:reset-layout",i.toggleContextMenu="application:toggle-context-menu",i.toggleHeader="application:toggle-header",i.toggleMode="application:toggle-mode",i.toggleLeftArea="application:toggle-left-area",i.toggleRightArea="application:toggle-right-area",i.toggleDownArea="application:toggle-down-area",i.toggleSideTabBar="application:toggle-side-tabbar",i.toggleSidebarWidget="application:toggle-sidebar-widget",i.togglePresentationMode="application:toggle-presentation-mode",i.toggleFullscreenMode="application:toggle-fullscreen-mode",i.tree="router:tree",i.switchSidebar="sidebar:switch",i.splitTab="application:split-tab",i.zoomInWidget="application:zoom-in-widget",i.zoomOutWidget="application:zoom-out-widget",i.resetWidgetZoom="application:reset-widget-zoom"})(l||(l={}));const ke=.5,qe=3,Fe={id:"@jupyterlab/application-extension:commands",description:"Adds commands related to the shell.",autoStart:!0,requires:[I,V],optional:[N,te],activate:(i,m,d,t,u)=>{var r;const{commands:n,shell:f}=i,a=m.load("jupyterlab"),w=a.__("Main Area");n.addCommand(Ce.contextMenu,{label:a.__("Shift+Right Click for Browser Menu"),describedBy:{args:{type:"object",properties:{}}},isEnabled:()=>!1,execute:()=>{}});const h=o=>{var e;if(t)for(const s of["main","left","right","down"]){const v=O(t.widgets(s),E=>E.id===o);if(v)return v}return(e=O(f.widgets("main"),s=>s.id===o))!==null&&e!==void 0?e:null},b=()=>{const o=v=>!!v.dataset.id,e=i.contextMenuHitTest(o);if(!e)return f.currentWidget;const s=e.dataset.id;return s?h(s):null},p=o=>{o.forEach(e=>e.close())},c=(o,e)=>{if(o.type==="tab-area")return o.widgets.includes(e)?o:null;if(o.type==="split-area")for(const s of o.children){const v=c(s,e);if(v)return v}return null},g=o=>{var e;const s=t?.saveLayout(),v=s?.mainArea;if(!v||C.PageConfig.getOption("mode")!=="multiple-document")return null;const E=(e=v.dock)===null||e===void 0?void 0:e.main;return E?c(E,o):null},_=o=>{const{id:e}=o,s=g(o),v=s?s.widgets||[]:[],E=v.findIndex(A=>A.id===e);return E<0?[]:v.slice(E+1)},M=o=>{let e;if(o!="left"&&o!="right")throw Error(`Unsupported sidebar: ${o}`);if(o==="left")e=document.querySelector(".lm-TabBar-tab.lm-mod-current");else{const v=document.querySelectorAll(".lm-TabBar-tab.lm-mod-current");e=v[v.length-1]}const s=e?.getAttribute("data-id");return s?s?.toString():""},W=()=>{var o;return(o=f.currentWidget)!==null&&o!==void 0?o:null};function z(o){const e=y(o);e&&e.style.removeProperty("zoom")}function y(o){const e=o.node;let s=e.querySelector(".jp-zoom-target");return s||(e.classList.add("jp-zoom-target"),e)}function x(o,e){const s=y(o);if(!s)return;const v=Number(s.style.zoom||1),E=Math.min(qe,Math.max(ke,v+e));s.style.zoom=String(E)}function T(o){o&&o.focus()}if(n.addCommand(l.close,{label:()=>a.__("Close Tab"),describedBy:{args:{type:"object",properties:{}}},isEnabled:()=>{const o=b();return!!o&&o.title.closable},execute:()=>{const o=b();o&&o.close()}}),n.addCommand(l.closeOtherTabs,{label:()=>a.__("Close All Other Tabs"),describedBy:{args:{type:"object",properties:{}}},isEnabled:()=>ye(f.widgets("main"),(o,e)=>e===1),execute:()=>{const o=b();if(!o)return;const{id:e}=o;for(const s of f.widgets("main"))s.id!==e&&s.close()}}),n.addCommand(l.closeRightTabs,{label:()=>a.__("Close Tabs to Right"),describedBy:{args:{type:"object",properties:{}}},isEnabled:()=>!!b()&&_(b()).length>0,execute:()=>{const o=b();o&&p(_(o))}}),n.addCommand(l.zoomInWidget,{label:a.__("Zoom In Active Widget"),describedBy:{args:{type:"object",properties:{}}},execute:()=>{const o=W();o&&x(o,.1)}}),n.addCommand(l.zoomOutWidget,{label:a.__("Zoom Out Active Widget"),describedBy:{args:{type:"object",properties:{}}},execute:()=>{const o=W();o&&x(o,-.1)}}),n.addCommand(l.resetWidgetZoom,{label:a.__("Reset Widget Zoom"),describedBy:{args:{type:"object",properties:{}}},execute:()=>{const o=W();o&&z(o)}}),(r=f.currentChanged)===null||r===void 0||r.connect(()=>{[l.close,l.closeOtherTabs,l.closeRightTabs].forEach(o=>n.notifyCommandChanged(o))}),t){n.addCommand(l.activateNextTab,{label:a.__("Activate Next Tab"),describedBy:{args:{type:"object",properties:{}}},execute:()=>{t.activateNextTab()}}),n.addCommand(l.activatePreviousTab,{label:a.__("Activate Previous Tab"),describedBy:{args:{type:"object",properties:{}}},execute:()=>{t.activatePreviousTab()}}),n.addCommand(l.activateNextTabBar,{label:a.__("Activate Next Tab Bar"),describedBy:{args:{type:"object",properties:{}}},execute:()=>{t.activateNextTabBar()}}),n.addCommand(l.activatePreviousTabBar,{label:a.__("Activate Previous Tab Bar"),describedBy:{args:{type:"object",properties:{}}},execute:()=>{t.activatePreviousTabBar()}}),n.addCommand(l.closeAll,{label:a.__("Close All Tabs"),describedBy:{args:{type:"object",properties:{}}},execute:()=>{t.closeAll()}}),n.addCommand(l.toggleHeader,{label:a.__("Show Header"),describedBy:{args:{type:"object",properties:{}}},execute:()=>{t.mode==="single-document"&&t.toggleTopInSimpleModeVisibility()},isToggled:()=>t.isTopInSimpleModeVisible(),isVisible:()=>t.mode==="single-document"}),n.addCommand(l.toggleLeftArea,{label:a.__("Show Left Sidebar"),describedBy:{args:{type:"object",properties:{}}},execute:()=>{t.leftCollapsed?t.expandLeft():(t.collapseLeft(),t.currentWidget&&t.activateById(t.currentWidget.id))},isToggled:()=>!t.leftCollapsed,isEnabled:()=>!t.isEmpty("left")}),n.addCommand(l.toggleRightArea,{label:a.__("Show Right Sidebar"),describedBy:{args:{type:"object",properties:{}}},execute:()=>{t.rightCollapsed?t.expandRight():(t.collapseRight(),t.currentWidget&&t.activateById(t.currentWidget.id))},isToggled:()=>!t.rightCollapsed,isEnabled:()=>!t.isEmpty("right")}),n.addCommand(l.toggleDownArea,{label:a.__("Show Down Area"),describedBy:{args:{type:"object",properties:{}}},execute:()=>{t.downCollapsed?t.expandDown():(t.collapseDown(),t.currentWidget&&t.activateById(t.currentWidget.id))},isToggled:()=>!t.downCollapsed,isEnabled:()=>!t.isEmpty("down")}),n.addCommand(l.toggleSidebarWidget,{label:e=>e===void 0||e.side===void 0||e.index===void 0?a.__("Toggle Sidebar Element"):e.side==="right"?a.__("Toggle Element %1 in Right Sidebar",parseInt(e.index,10)+1):a.__("Toggle Element %1 in Left Sidebar",parseInt(e.index,10)+1),describedBy:{args:{type:"object",properties:{side:{type:"string",enum:["left","right"],description:a.__("The sidebar side")},index:{type:["string","number"],description:a.__("The index of the sidebar widget")}},required:["side","index"]}},execute:e=>{const s=parseInt(e.index,10);if(e.side!="left"&&e.side!="right")throw Error(`Unsupported sidebar: ${e.side}`);const v=Array.from(t.widgets(e.side));if(s>=v.length)return;const E=v[s].id,A=document.querySelector("[data-id='"+E+"']");M(e.side)===E?(e.side=="left"&&(t.collapseLeft(),T(A)),e.side=="right"&&(t.collapseRight(),T(A))):(t.activateById(E),T(A))}}),n.addCommand(l.toggleSideTabBar,{label:e=>e.side==="right"?a.__("Show Right Activity Bar"):a.__("Show Left Activity Bar"),describedBy:{args:{type:"object",properties:{side:{type:"string",enum:["left","right"],description:a.__("The sidebar side")}},required:["side"]}},execute:e=>{e.side==="right"?t.toggleSideTabBarVisibility("right"):t.toggleSideTabBarVisibility("left")},isToggled:e=>e.side==="right"?t.isSideTabBarVisible("right"):t.isSideTabBarVisible("left"),isEnabled:e=>e.side==="right"?!t.isEmpty("right"):!t.isEmpty("left")}),n.addCommand(l.togglePresentationMode,{label:()=>a.__("Presentation Mode"),describedBy:{args:{type:"object",properties:{}}},execute:()=>{t.presentationMode=!t.presentationMode},isToggled:()=>t.presentationMode,isVisible:()=>!0}),n.addCommand(l.toggleFullscreenMode,{label:a.__("Fullscreen Mode"),describedBy:{args:{type:"object",properties:{}}},execute:()=>{document.fullscreenElement===null||document.fullscreenElement===void 0?document.documentElement.requestFullscreen().catch(e=>{console.error("Failed to enter fullscreen mode.",e)}):document.fullscreenElement!==null&&document.exitFullscreen().catch(e=>{console.error("Failed to exit fullscreen mode.",e)})},isToggled:()=>document.fullscreenElement!==null}),n.addCommand(l.setMode,{label:e=>e.mode?a.__("Set %1 mode.",e.mode):a.__("Set the layout `mode`."),caption:a.__('The layout `mode` can be "single-document" or "multiple-document".'),describedBy:{args:{type:"object",properties:{mode:{type:"string",enum:["single-document","multiple-document"],description:a.__("The layout mode")}},required:["mode"]}},isVisible:e=>{const s=e.mode;return s==="single-document"||s==="multiple-document"},execute:e=>{const s=e.mode;if(s==="single-document"||s==="multiple-document"){t.mode=s;return}throw new Error(`Unsupported application shell mode: ${s}`)}}),n.addCommand(l.toggleMode,{label:a.__("Simple Interface"),describedBy:{args:{type:"object",properties:{}}},isToggled:()=>t.mode==="single-document",execute:()=>{const e=t.mode==="multiple-document"?{mode:"single-document"}:{mode:"multiple-document"};return n.execute(l.setMode,e)}}),n.addCommand(l.resetLayout,{label:a.__("Reset Default Layout"),describedBy:{args:{type:"object",properties:{}}},execute:()=>{t.presentationMode&&n.execute(l.togglePresentationMode).catch(e=>{console.error("Failed to undo presentation mode.",e)}),(document.fullscreenElement!==null||document.fullscreenElement!==void 0)&&n.execute(l.toggleFullscreenMode).catch(e=>{console.error("Failed to exit fullscreen mode.",e)}),t.mode==="single-document"&&!t.isTopInSimpleModeVisible()&&n.execute(l.toggleHeader).catch(e=>{console.error("Failed to display title header.",e)}),["left","right"].forEach(e=>{!t.isSideTabBarVisible(e)&&!t.isEmpty(e)&&n.execute(l.toggleSideTabBar,{side:e}).catch(s=>{console.error(`Failed to show ${e} activity bar.`,s)})})}});const o=()=>{var e;const s=A=>A.classList.contains("lm-TabBar-tab")&&!!A.dataset.id,v=i.contextMenuHitTest(s);if(!v)return null;const E=v.dataset.id;return E&&(e=O(t.widgets("main"),A=>A.id===E))!==null&&e!==void 0?e:null};n.addCommand(l.splitTab,{label:e=>{const s=e?.direction;return s?{left:a.__("Left"),right:a.__("Right"),top:a.__("Up"),bottom:a.__("Down")}[s]:a.__("Split Tab")},caption:a.__("Split the current tab"),describedBy:{args:{type:"object",properties:{direction:{type:"string",enum:["left","right","top","bottom"],description:a.__("The direction to split the tab")},id:{type:"string",description:a.__("The widget ID to split. Defaults to the context menu target.")}},required:["direction"]}},isEnabled:()=>{const e=o();if(!e||!(t instanceof ne))return!1;const s=t.getMainAreaTabBar(e);return s?s.titles.length>1:!1},execute:e=>{const s=e?.direction;let v=e?.id?O(t.widgets("main"),E=>E.id===e?.id):null;v||(v=o()),v&&s&&t.moveTab(v,s)}})}u&&([l.activateNextTab,l.activatePreviousTab,l.activateNextTabBar,l.activatePreviousTabBar,l.close,l.closeAll,l.closeOtherTabs,l.closeRightTabs,l.toggleHeader,l.toggleLeftArea,l.toggleRightArea,l.toggleDownArea,l.togglePresentationMode,l.toggleFullscreenMode,l.toggleMode,l.resetLayout,l.zoomInWidget,l.zoomOutWidget,l.resetWidgetZoom].forEach(o=>u.addItem({command:o,category:w})),["right","left"].forEach(o=>{u.addItem({command:l.toggleSideTabBar,category:w,args:{side:o}})}));function L(o){const e=o.target;if(!e)return null;const s=e.closest(".lm-Widget");if(!s)return null;for(const v of f.widgets("main"))if(v.node.contains(s))return v;return null}let B=!1,P="side";d.load("@jupyterlab/application-extension:shell").then(o=>{B=o.get("zoomOnWheel").composite,P=o.get("activityBarPosition").composite,o.changed.connect(()=>{B=o.get("zoomOnWheel").composite;const e=o.get("activityBarPosition").composite;e!==P&&(P=e,n.notifyCommandChanged(l.setActivityBarPosition))}),n.addCommand(l.setActivityBarPosition,{label:e=>{const s=e.position,v=s==="side"?a.__("Side"):s==="top"?a.__("Top"):s==="bottom"?a.__("Bottom"):"";return v?e.isPalette?a.__("Activity Bar Position: %1",v):v:a.__("Set Activity Bar Position")},caption:a.__("Position of the side activity bars (side, top, or bottom)."),describedBy:{args:{type:"object",properties:{position:{type:"string",oneOf:[{const:"side",title:a.__("Side")},{const:"top",title:a.__("Top")},{const:"bottom",title:a.__("Bottom")}],description:a.__("The activity bar position")},isPalette:{type:"boolean",description:a.__("Whether the command is being called from the palette")}},required:["position"]}},isToggled:e=>e.position===P,execute:e=>{const s=e.position;if(s!=="side"&&s!=="top"&&s!=="bottom")throw new Error(`Unsupported activity bar position: ${s}`);return o.set("activityBarPosition",s)}}),u&&["side","top","bottom"].forEach(e=>{u.addItem({command:l.setActivityBarPosition,category:w,args:{position:e,isPalette:!0}})})}).catch(o=>{console.error("Failed to load shell settings.",o)});let j=!1;window.addEventListener("keydown",o=>{o.key==="Control"&&(j=!0)}),window.addEventListener("keyup",o=>{o.key==="Control"&&(j=!1)}),window.addEventListener("blur",()=>{j=!1}),window.addEventListener("wheel",o=>{if(!B||!o.ctrlKey||!j)return;const e=L(o);if(!e)return;o.preventDefault();const s=o.deltaY<0?.1:-.1;x(e,s)},{passive:!1,capture:!0})}},ae={id:"@jupyterlab/application-extension:main",description:"Initializes the application and provides the URL tree path handler.",requires:[K,Ee,I,H.ITreeResolver],optional:[Me],provides:je,activate:(i,m,d,t,u,r)=>{const n=t.load("jupyterlab");if(!(i instanceof $))throw new Error(`${ae.id} must be activated in JupyterLab.`);let f="",a="";function w(c){u.paths.then(()=>{if(a=c,!f){const g=C.PageConfig.getUrl({treePath:c}),_=C.URLExt.parse(g).pathname;m.navigate(_,{skipRouting:!0}),C.PageConfig.setOption("treePath",c)}})}const h=d.name;if(console.debug(`Starting application in workspace: "${h}"`),i.registerPluginErrors.length!==0){const c=k.createElement("pre",null,i.registerPluginErrors.map(g=>g.message).join(`
@@ -1,2 +1,2 @@
1
- import{cG as w,cH as I,cI as g,cJ as B,cK as b,aS as P,aV as v,aU as M}from"../datalayer-app-main.js";import{J as C,c as E}from"./index-46VEGuyz.js";import{I as L}from"./tokens-CGj56w43.js";import{I as N}from"./tokens-Dj3mshtL.js";import{b as A}from"./index-h8lXpqtD.js";import"./Output-DLpf2Of9.js";import"./index-B5W7CVUY.js";import"./hoverbox-CStlKQWE.js";import"./index-CBWGYoQM.js";import"./dayjs.min-u3zuoSR8.js";import"./isEqual-BxgGIFfN.js";import"./d3-color-Jd8hXty2.js";import"./dist-N90VI44_.js";import"./index-Cz10oMGc.js";import"./RestartIcon-DvpOf5Mf.js";import"./CellSidebarExtension-CrdbRLaE.js";import"./NotebookSkeleton-DHQ--KEB.js";import"./Avatar-B0TcOj_b.js";import"./renderer-NdtLW87o.js";import"./SquareIcon-Dy3l3VdH.js";import"./FileDirectoryOpenFillIcon-Db8fP24q.js";import"./url-4_0MnaFQ.js";/* empty css *//* empty css */import"./style-DdAxk_bj.js";/* empty css */import"./style-Cj1gzCjo.js";/* empty css */import"./style-rkw8dR9f.js";import"./style-GHJFdtIz.js";import"./style-ZSIOeMoX.js";import"./style-iVfD6mFL.js";import"./style-DA-Ya7rp.js";import"./style-D3tvWcFO.js";import"./style-BOqStzF9.js";import"./style-ADLQJ-E9.js";import"./style-DgglluaK.js";import"./ArrowLeftIcon-sX3iNMG1.js";import"./SkubbleIcon-CAaVh_BE.js";import"./usePrimerThemeBridge-BfoXa7hP.js";import"./index-C644crfL.js";import"./KernelVariables-BIWju6rZ.js";import"./index-CavxlEgY.js";import"./SortAscIcon-CmH04s3F.js";import"./SortDescIcon-Qif6E10I.js";import"./NotebookToolbar-C1fpK-Vi.js";import"./RepoPushIcon-BtXQRhLa.js";import"./sessions-W_hhenw6.js";import"./tokens-DcXbsdvP.js";import"./drivecontents-BSbQpH52.js";import"./kernel-Cn-ejD4i.js";class T{constructor(t="",e,n,a){this._domainData={},this._translationBundles={},this._connector=a??new w(t,n),this._stringsPrefix=e||"",this._englishBundle=new I({stringsPrefix:this._stringsPrefix}),this._currentLocale=g}get languageCode(){return this._currentLocale}async fetch(t){var e,n,a,o;this._languageData=await this._connector.fetch({language:t});let i;if(this._languageData&&t==="default")try{for(const s of Object.values((e=this._languageData.data)!==null&&e!==void 0?e:{})){i=s[""].language;break}}catch{}this._currentLocale=(t!=="default"?t:i??g).replace("_","-"),this._domainData=(a=(n=this._languageData)===null||n===void 0?void 0:n.data)!==null&&a!==void 0?a:{};const r=(o=this._languageData)===null||o===void 0?void 0:o.message;r&&this._currentLocale!==g&&console.warn(r)}load(t){if(this._domainData){if(this._currentLocale==g)return this._englishBundle;if(t=B(t),!(t in this._translationBundles)){let e=new I({domain:t,locale:this._currentLocale,stringsPrefix:this._stringsPrefix});if(t in this._domainData){const n=this._domainData[t][""],a={...this._domainData[t],"":{...n,pluralForms:n.plural_forms}};e.loadJSON(a,t)}this._translationBundles[t]=e}return this._translationBundles[t]}else return this._englishBundle}}const y="@jupyterlab/translation-extension:plugin",$={id:"@jupyterlab/translation-extension:translator-connector",description:"Provides the application translation connector.",autoStart:!0,requires:[C.IPaths],provides:b,activate:(m,t)=>{const e=t.urls.translations,n=m.serviceManager.serverSettings;return new w(e,n)}},G={id:"@jupyterlab/translation-extension:translator",description:"Provides the application translation object.",autoStart:!0,requires:[C.IPaths,L],optional:[E,b],provides:P,activate:async(m,t,e,n,a)=>{const o=await e.load(y),i=o.get("locale").composite;let r=o.get("stringsPrefix").composite;r=o.get("displayStringsPrefix").composite?r:"";const c=m.serviceManager.serverSettings,l=new T(t.urls.translations,r,c,a??void 0);return await l.fetch(i),document.documentElement.lang=l.languageCode,n&&(n.translator=l),v.translator=l,l}},J={id:y,description:"Adds translation commands and settings.",requires:[L,P,b],optional:[N,A],autoStart:!0,activate:(m,t,e,n,a,o)=>{var i;const r=e.load("jupyterlab"),{commands:s}=m,c=a?(i=a.settingsMenu.items.find(u=>{var p;return u.type==="submenu"&&((p=u.submenu)===null||p===void 0?void 0:p.id)==="jp-mainmenu-settings-language"}))===null||i===void 0?void 0:i.submenu:null,l="jupyterlab-translation:install-languages";s.addCommand(l,{label:r.__("Install more languages…"),caption:r.__("Search for language packs in the Extension Manager"),isEnabled:()=>s.hasCommand("extensionmanager:show-panel")&&s.isVisible("extensionmanager:show-panel"),execute:()=>s.execute("extensionmanager:show-panel",{query:"jupyterlab-language-pack"}),describedBy:{args:{type:"object",properties:{}}}}),o&&o.addItem({category:r.__("Display Languages"),command:l}),n.fetch().then(u=>{const p=e.languageCode.replace("-","_");for(const d in u.data){const x=u.data[d],D=x.displayName,S=x.nativeName,h=p===d,_=h?`${D}`:`${D} - ${S}`,f=`jupyterlab-translation:${d}`;s.addCommand(f,{label:_,caption:r.__("Change interface language to %1",_),isEnabled:()=>!h,isToggled:()=>h,execute:async()=>{if((await M({title:r.__("Change interface language?"),body:r.__("After changing the interface language to %1, you will need to reload JupyterLab to see the changes.",_),buttons:[v.cancelButton(),v.okButton({label:r.__("Change and reload")})]})).button.accept)try{await t.set(y,"locale",d),window.location.reload()}catch(j){console.error(`Failed to update language locale to ${d}`,j)}},describedBy:{args:{type:"object",properties:{}}}}),c&&c.addItem({command:f,args:{}}),o&&o.addItem({category:r.__("Display Languages"),command:f})}}).catch(u=>{console.error(`Available locales errored!
1
+ import{cG as w,cH as I,cI as g,cJ as B,cK as b,aS as P,aV as v,aU as M}from"../datalayer-app-main.js";import{J as C,c as E}from"./index-B5fl-cx7.js";import{I as L}from"./tokens-CGj56w43.js";import{I as N}from"./tokens-Dj3mshtL.js";import{b as A}from"./index-npitmnIA.js";import"./Output-WQnm0VN5.js";import"./index-DE0JwlLw.js";import"./hoverbox-CStlKQWE.js";import"./index-Dqc2hT2k.js";import"./dayjs.min-u3zuoSR8.js";import"./isEqual-BxgGIFfN.js";import"./d3-color-Jd8hXty2.js";import"./dist-N90VI44_.js";import"./index-Cz10oMGc.js";import"./RestartIcon-DvpOf5Mf.js";import"./CellSidebarExtension-umk7yQhN.js";import"./NotebookSkeleton-DHQ--KEB.js";import"./Avatar-B0TcOj_b.js";import"./renderer-DTpEU9RO.js";import"./SquareIcon-Dy3l3VdH.js";import"./FileDirectoryOpenFillIcon-Db8fP24q.js";import"./url-4_0MnaFQ.js";/* empty css *//* empty css */import"./style-DdAxk_bj.js";/* empty css */import"./style-Cj1gzCjo.js";/* empty css */import"./style-rkw8dR9f.js";import"./style-GHJFdtIz.js";import"./style-ZSIOeMoX.js";import"./style-iVfD6mFL.js";import"./style-DA-Ya7rp.js";import"./style-D3tvWcFO.js";import"./style-BOqStzF9.js";import"./style-ADLQJ-E9.js";import"./style-DgglluaK.js";import"./ArrowLeftIcon-sX3iNMG1.js";import"./SkubbleIcon-CAaVh_BE.js";import"./usePrimerThemeBridge-BfoXa7hP.js";import"./index-C644crfL.js";import"./KernelVariables-xXzfdk5t.js";import"./index-CavxlEgY.js";import"./SortAscIcon-CmH04s3F.js";import"./SortDescIcon-Qif6E10I.js";import"./NotebookToolbar-C1fpK-Vi.js";import"./RepoPushIcon-BtXQRhLa.js";import"./sessions-W_hhenw6.js";import"./tokens-DcXbsdvP.js";import"./drivecontents-BSbQpH52.js";import"./kernel-Cn-ejD4i.js";class T{constructor(t="",e,n,a){this._domainData={},this._translationBundles={},this._connector=a??new w(t,n),this._stringsPrefix=e||"",this._englishBundle=new I({stringsPrefix:this._stringsPrefix}),this._currentLocale=g}get languageCode(){return this._currentLocale}async fetch(t){var e,n,a,o;this._languageData=await this._connector.fetch({language:t});let i;if(this._languageData&&t==="default")try{for(const s of Object.values((e=this._languageData.data)!==null&&e!==void 0?e:{})){i=s[""].language;break}}catch{}this._currentLocale=(t!=="default"?t:i??g).replace("_","-"),this._domainData=(a=(n=this._languageData)===null||n===void 0?void 0:n.data)!==null&&a!==void 0?a:{};const r=(o=this._languageData)===null||o===void 0?void 0:o.message;r&&this._currentLocale!==g&&console.warn(r)}load(t){if(this._domainData){if(this._currentLocale==g)return this._englishBundle;if(t=B(t),!(t in this._translationBundles)){let e=new I({domain:t,locale:this._currentLocale,stringsPrefix:this._stringsPrefix});if(t in this._domainData){const n=this._domainData[t][""],a={...this._domainData[t],"":{...n,pluralForms:n.plural_forms}};e.loadJSON(a,t)}this._translationBundles[t]=e}return this._translationBundles[t]}else return this._englishBundle}}const y="@jupyterlab/translation-extension:plugin",$={id:"@jupyterlab/translation-extension:translator-connector",description:"Provides the application translation connector.",autoStart:!0,requires:[C.IPaths],provides:b,activate:(m,t)=>{const e=t.urls.translations,n=m.serviceManager.serverSettings;return new w(e,n)}},G={id:"@jupyterlab/translation-extension:translator",description:"Provides the application translation object.",autoStart:!0,requires:[C.IPaths,L],optional:[E,b],provides:P,activate:async(m,t,e,n,a)=>{const o=await e.load(y),i=o.get("locale").composite;let r=o.get("stringsPrefix").composite;r=o.get("displayStringsPrefix").composite?r:"";const c=m.serviceManager.serverSettings,l=new T(t.urls.translations,r,c,a??void 0);return await l.fetch(i),document.documentElement.lang=l.languageCode,n&&(n.translator=l),v.translator=l,l}},J={id:y,description:"Adds translation commands and settings.",requires:[L,P,b],optional:[N,A],autoStart:!0,activate:(m,t,e,n,a,o)=>{var i;const r=e.load("jupyterlab"),{commands:s}=m,c=a?(i=a.settingsMenu.items.find(u=>{var p;return u.type==="submenu"&&((p=u.submenu)===null||p===void 0?void 0:p.id)==="jp-mainmenu-settings-language"}))===null||i===void 0?void 0:i.submenu:null,l="jupyterlab-translation:install-languages";s.addCommand(l,{label:r.__("Install more languages…"),caption:r.__("Search for language packs in the Extension Manager"),isEnabled:()=>s.hasCommand("extensionmanager:show-panel")&&s.isVisible("extensionmanager:show-panel"),execute:()=>s.execute("extensionmanager:show-panel",{query:"jupyterlab-language-pack"}),describedBy:{args:{type:"object",properties:{}}}}),o&&o.addItem({category:r.__("Display Languages"),command:l}),n.fetch().then(u=>{const p=e.languageCode.replace("-","_");for(const d in u.data){const x=u.data[d],D=x.displayName,S=x.nativeName,h=p===d,_=h?`${D}`:`${D} - ${S}`,f=`jupyterlab-translation:${d}`;s.addCommand(f,{label:_,caption:r.__("Change interface language to %1",_),isEnabled:()=>!h,isToggled:()=>h,execute:async()=>{if((await M({title:r.__("Change interface language?"),body:r.__("After changing the interface language to %1, you will need to reload JupyterLab to see the changes.",_),buttons:[v.cancelButton(),v.okButton({label:r.__("Change and reload")})]})).button.accept)try{await t.set(y,"locale",d),window.location.reload()}catch(j){console.error(`Failed to update language locale to ${d}`,j)}},describedBy:{args:{type:"object",properties:{}}}}),c&&c.addItem({command:f,args:{}}),o&&o.addItem({category:r.__("Display Languages"),command:f})}}).catch(u=>{console.error(`Available locales errored!
2
2
  ${u}`)}).finally(()=>{c&&(c.items.length>0&&c.addItem({type:"separator"}),c.addItem({command:l,args:{}}))})}},Gt=[$,G,J];export{Gt as default};