@marimo-team/frontend 0.24.1-dev59 → 0.24.1-dev60

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 (113) hide show
  1. package/dist/assets/{CellStatus-D6_pLs0B.js → CellStatus-DeTZJKkI.js} +1 -1
  2. package/dist/assets/{ConnectedDataExplorerComponent-DZnvpjue.js → ConnectedDataExplorerComponent-CsYDGDdB.js} +1 -1
  3. package/dist/assets/{JsonOutput-D0JlHn1Z.js → JsonOutput-CucHb-Xd.js} +11 -11
  4. package/dist/assets/{MarimoErrorOutput-CYOWXi9k.js → MarimoErrorOutput-9BDdSrft.js} +2 -2
  5. package/dist/assets/{RenderHTML-qnAqp9Q0.js → RenderHTML-9AmE10az.js} +1 -1
  6. package/dist/assets/{RunButton-BDkLTxbY.js → RunButton-B1OO4yPE.js} +1 -1
  7. package/dist/assets/{merge-DxlVKwwO.js → _baseMerge-DLqSVasz.js} +1 -1
  8. package/dist/assets/{add-cell-with-ai-DVGZNNUv.js → add-cell-with-ai-B382kx-8.js} +8 -8
  9. package/dist/assets/{add-connection-dialog-CnRoNzHS.js → add-connection-dialog-CCgzVaXE.js} +1 -1
  10. package/dist/assets/{agent-panel-BTY3oeHD.js → agent-panel-tC3KSuFA.js} +1 -1
  11. package/dist/assets/ai-model-dropdown-BwTphSMd.js +3 -0
  12. package/dist/assets/{app-config-button-CB6s4qUy.js → app-config-button-C3LicTtk.js} +1 -1
  13. package/dist/assets/{blob-Dza7uUlT.js → blob-EfjbJ__b.js} +1 -1
  14. package/dist/assets/{cell-editor-D3YsOG7a.js → cell-editor-CR6poe2J.js} +7 -7
  15. package/dist/assets/{cell-link-DqJmxVu3.js → cell-link-q2lv7md_.js} +1 -1
  16. package/dist/assets/{cells-DfJw5iuV.js → cells-v0dAmt79.js} +18 -18
  17. package/dist/assets/{chat-display-NTNQQyoE.js → chat-display-C-KzQ4Sl.js} +1 -1
  18. package/dist/assets/{chat-panel-Bow0QKrA.js → chat-panel-BM8a5kkg.js} +3 -3
  19. package/dist/assets/{chat-ui-Cg69zAqt.js → chat-ui-B10QUDuE.js} +1 -1
  20. package/dist/assets/{chunk-5RXB4S5H-DHd0BPMu.js → chunk-5RXB4S5H-CUU6y4KG.js} +1 -1
  21. package/dist/assets/{chunk-GF5L2VYU-DidcU72l.js → chunk-GF5L2VYU-sioILS_d.js} +1 -1
  22. package/dist/assets/{chunk-J7OUQ5F2-BYO9AUEf.js → chunk-J7OUQ5F2-CO4p8tJJ.js} +2 -2
  23. package/dist/assets/{chunk-JQJVKLGR-BO9dy1YE.js → chunk-JQJVKLGR-BVs0Ec6r.js} +1 -1
  24. package/dist/assets/{classDiagram-JCYQIIEL-DXciwtwD.js → classDiagram-JCYQIIEL-DoI0wWRt.js} +1 -1
  25. package/dist/assets/{classDiagram-v2-OCEON4UE-DXciwtwD.js → classDiagram-v2-OCEON4UE-DoI0wWRt.js} +1 -1
  26. package/dist/assets/{column-preview-BdNXfBsJ.js → column-preview-DahZx7i3.js} +1 -1
  27. package/dist/assets/command-palette-DLDqpso1.js +1 -0
  28. package/dist/assets/{common-D_BAMDHd.js → common-C-hdr6As.js} +1 -1
  29. package/dist/assets/{components-D3x9DfK0.js → components-Cnt-rCdC.js} +1 -1
  30. package/dist/assets/{components-DwH_Yb1N.js → components-ib4asSo7.js} +1 -1
  31. package/dist/assets/config-Cl3eMWxb.js +1 -0
  32. package/dist/assets/{config-CUBl5qBg.js → config-DaNyNpZL.js} +1 -1
  33. package/dist/assets/dagre-B79OegKz.js +1 -0
  34. package/dist/assets/{dagre-VZM6K2ZE-Bztx5p0h.js → dagre-VZM6K2ZE-Bp1Dxcme.js} +1 -1
  35. package/dist/assets/{datasource-B9lSU_L0.js → datasource-Bq9EwG3Q.js} +1 -1
  36. package/dist/assets/{dependency-graph-panel-3-8ygeBR.js → dependency-graph-panel-DLgUYv2G.js} +1 -1
  37. package/dist/assets/{documentation-panel-BzJcTCN3.js → documentation-panel-BIqV8dCY.js} +1 -1
  38. package/dist/assets/{download-4OuOU5F0.js → download-D-WORhyV.js} +1 -1
  39. package/dist/assets/{edit-page-ds4edlkF.js → edit-page-rjLWDywQ.js} +6 -6
  40. package/dist/assets/{erDiagram-JOGREHBK-D7AqNG0H.js → erDiagram-JOGREHBK-L1YPulwW.js} +1 -1
  41. package/dist/assets/{error-entries-BCuZmxgk.js → error-entries-DOcZqCs5.js} +1 -1
  42. package/dist/assets/{error-panel-Dk-wFymb.js → error-panel-xPtHRph4.js} +1 -1
  43. package/dist/assets/{file-explorer-panel-Bprnrp3k.js → file-explorer-panel-YhKO1Kb8.js} +1 -1
  44. package/dist/assets/{file-icons-BnE-lUIr.js → file-icons-BI3Xijjz.js} +1 -1
  45. package/dist/assets/{file-name-input-B-KJyr-U.js → file-name-input-B0v9VVzS.js} +1 -1
  46. package/dist/assets/{floating-outline-BebYvSvL.js → floating-outline-fI7KiW7l.js} +1 -1
  47. package/dist/assets/{flowDiagram-UKHOOZJN-uIR0bHjt.js → flowDiagram-UKHOOZJN-dULvoGtY.js} +1 -1
  48. package/dist/assets/{glide-data-editor-BQNVc0zc.js → glide-data-editor-CSrQxrfb.js} +1 -1
  49. package/dist/assets/{home-page-zNwFmOPQ.js → home-page-BMzFHuuq.js} +1 -1
  50. package/dist/assets/{index-B36dhEV6.js → index-B2a_xizI.js} +8 -8
  51. package/dist/assets/{kiosk-mode-B2WU6CYc.js → kiosk-mode-CjT3sqy8.js} +1 -1
  52. package/dist/assets/{layout-iNJ-1JI2.js → layout-Dqce0OL2.js} +5 -5
  53. package/dist/assets/{logs-panel-CXu4QQwD.js → logs-panel-BlKmgk9O.js} +1 -1
  54. package/dist/assets/{markdown-renderer-BUBFaUWx.js → markdown-renderer-BHFj8yJ6.js} +1 -1
  55. package/dist/assets/{mermaid-CwvTqKGz.js → mermaid-BmbD1i8H.js} +3 -3
  56. package/dist/assets/{mindmap-definition-FAOFIHXS-DhzRwTNz.js → mindmap-definition-FAOFIHXS-aLgvJUwH.js} +1 -1
  57. package/dist/assets/{name-cell-input-DbRrAlCe.js → name-cell-input-9y9cdffD.js} +1 -1
  58. package/dist/assets/{outline-panel-16ugwsMh.js → outline-panel-BkyU6F0r.js} +1 -1
  59. package/dist/assets/{packages-panel-8OASpr5S.js → packages-panel-DGuBWpad.js} +1 -1
  60. package/dist/assets/{pair-with-agent-modal-CBIL9_6g.js → pair-with-agent-modal-TbFSfxnC.js} +1 -1
  61. package/dist/assets/{panel-accordion-state-786YBa3I.js → panel-accordion-state-C2vAFKpP.js} +1 -1
  62. package/dist/assets/panels-ZCSZ8vcg.js +4 -0
  63. package/dist/assets/{process-output-NwNkpkfY.js → process-output-DmEilKB6.js} +1 -1
  64. package/dist/assets/{readonly-code-display-Ce9Vb5Wf.js → readonly-code-display-2N0THiJK.js} +1 -1
  65. package/dist/assets/{readonly-python-code-CQd3Bopx.js → readonly-python-code-DyB_sdtx.js} +1 -1
  66. package/dist/assets/{renderShortcut-D9XYVNe3.js → renderShortcut-CS4ccH3x.js} +1 -1
  67. package/dist/assets/{requirementDiagram-LRYGKXZP-DcON47aG.js → requirementDiagram-LRYGKXZP-BOaR1V0o.js} +1 -1
  68. package/dist/assets/{reveal-component-C4pF9OE7.js → reveal-component-DmwU8_uO.js} +3 -3
  69. package/dist/assets/{run-page-Bo57bjbp.js → run-page-C-fKIihG.js} +1 -1
  70. package/dist/assets/{scratchpad-panel-vBIq9BfA.js → scratchpad-panel-D_0HEFCV.js} +1 -1
  71. package/dist/assets/{session-panel-BdXUO63q.js → session-panel-BAqFjL9-.js} +1 -1
  72. package/dist/assets/{skeleton-B5iAa5n_.js → skeleton-BUOlBrWg.js} +1 -1
  73. package/dist/assets/{snippets-panel-BI6SMTkf.js → snippets-panel-C4dcsNOG.js} +1 -1
  74. package/dist/assets/{state-DmlDv6kf.js → state-C8pDImyF.js} +3 -3
  75. package/dist/assets/{state-CZxxcsV7.js → state-Du63Xg9M.js} +1 -1
  76. package/dist/assets/{stateDiagram-OKZ733FA-CdIMP-aE.js → stateDiagram-OKZ733FA-BZg2y6qd.js} +1 -1
  77. package/dist/assets/{stateDiagram-v2-UEYNNEHI-DaZnzLJO.js → stateDiagram-v2-UEYNNEHI-C1g5a4e0.js} +1 -1
  78. package/dist/assets/{swimlanesDiagram-ULZ7WXOC-DHUJK_QJ.js → swimlanesDiagram-ULZ7WXOC-Cbwe8OlR.js} +1 -1
  79. package/dist/assets/{switch-CBR-ykv3.js → switch-27TbonxF.js} +1 -1
  80. package/dist/assets/{terminal-OC_FnEas.js → terminal-DOqqA9Ha.js} +1 -1
  81. package/dist/assets/{tracing-Bs9V1VRy.js → tracing-DPTkPFxO.js} +1 -1
  82. package/dist/assets/tracing-panel-3SQN2w-o.js +2 -0
  83. package/dist/assets/{tree-actions-A2eVufTn.js → tree-actions-Bn9POqng.js} +1 -1
  84. package/dist/assets/{useAddCell-BBv-60Hs.js → useAddCell-DtdPi8nq.js} +1 -1
  85. package/dist/assets/{useBoolean-DfDMEVCI.js → useBoolean-DWBCpKfT.js} +1 -1
  86. package/dist/assets/{useCellActionButton-DgA6C9_m.js → useCellActionButton-BS300A54.js} +1 -1
  87. package/dist/assets/{useDeleteCell-CqYCNkza.js → useDeleteCell-Ha8ut0yy.js} +1 -1
  88. package/dist/assets/{useDependencyPanelTab-DhGw5Y2R.js → useDependencyPanelTab-DsrUeu8t.js} +1 -1
  89. package/dist/assets/useNotebookActions-DdgIE9oe.js +10 -0
  90. package/dist/assets/{useRunCells-BwYUZxV6.js → useRunCells-CIALOcRX.js} +1 -1
  91. package/dist/assets/{useSplitCell-D0ws6n0g.js → useSplitCell-dEuZjk85.js} +1 -1
  92. package/dist/assets/{useTheme-BRnykVDX.js → useTheme-D3zvxdF3.js} +1 -1
  93. package/dist/assets/utils-CUZQNAWJ.js +1 -0
  94. package/dist/assets/{vega-component-CzgE5HEs.js → vega-component-DCOCpf2B.js} +1 -1
  95. package/dist/index.html +29 -29
  96. package/package.json +1 -1
  97. package/src/components/ai/__tests__/ai-utils.test.ts +64 -66
  98. package/src/components/ai/ai-model-dropdown.tsx +5 -1
  99. package/src/components/ai/ai-utils.ts +37 -21
  100. package/src/components/app-config/ai-config.tsx +86 -24
  101. package/src/components/app-config/user-config-form.tsx +2 -3
  102. package/src/core/ai/config.ts +2 -3
  103. package/src/core/config/__tests__/config-schema.test.ts +31 -0
  104. package/src/core/config/config-schema.ts +1 -0
  105. package/src/core/config/config.ts +15 -2
  106. package/dist/assets/ai-model-dropdown-D2q0Cm0R.js +0 -3
  107. package/dist/assets/command-palette-QFmIvDcT.js +0 -1
  108. package/dist/assets/config-DcB2swfZ.js +0 -1
  109. package/dist/assets/dagre-Bv00Sosz.js +0 -1
  110. package/dist/assets/panels-BbkuRtEi.js +0 -4
  111. package/dist/assets/tracing-panel-CMnYFlDr.js +0 -2
  112. package/dist/assets/useNotebookActions-DGuDG0Px.js +0 -10
  113. package/dist/assets/utils-R_pHe-RB.js +0 -1
@@ -1 +1 @@
1
- import{a as e}from"./rolldown-runtime-B0Z9INg1.js";import{a as t,f as n,r}from"./useEvent-xfs0Sn4r.js";import{t as i}from"./react-CBDbhulC.js";import{$n as a,Zi as o}from"./cells-DfJw5iuV.js";import{t as s}from"./compiler-runtime-CYIjoINj.js";import{i as c}from"./switch-CBR-ykv3.js";import{t as l}from"./cn-ldLVeaqm.js";import{t as u}from"./jsx-runtime-B74pBk57.js";import{t as d}from"./tooltip-D7dq6bnc.js";import{r as f,t as p}from"./button-BMBznEru.js";import{V as m,X as h,_ as g,a as _,st as v}from"./dist-PIe1xcZo.js";import{f as y}from"./dist-B97dKQGP.js";import{t as b}from"./createLucideIcon-B7HeEoG2.js";import{t as x}from"./copy-BMXKNElG.js";import{t as S}from"./eye-off-CFuPxa9F.js";import{t as C}from"./plus-C4J9gIE1.js";import{a as w}from"./dist-DCc0VfiO.js";import{t as T}from"./use-toast-DpWHUGuF.js";import{r as E}from"./useTheme-BRnykVDX.js";import{n as D}from"./copy-Cg05mM3C.js";import{t as O}from"./esm-Dw0vvSg2.js";import{t as k}from"./useAddCell-BBv-60Hs.js";var A=()=>r.get(c),j=()=>{let e=document.querySelector(`marimo-code`);if(!e)return;let t=e.innerHTML;return decodeURIComponent(t).trim()},M=b(`lock`,[[`rect`,{width:`18`,height:`11`,x:`3`,y:`11`,rx:`2`,ry:`2`,key:`1w4ew1`}],[`path`,{d:`M7 11V7a5 5 0 0 1 10 0v4`,key:`fwvmzm`}]]),N=n({isInstantiated:!1,error:null});function P(){return t(N,e=>e.isInstantiated)}var F=e(i(),1),I=s(),L=({variant:e,settings:t,styles:n})=>{let r=v.theme({"&":{backgroundColor:t.background,color:t.foreground},".cm-content":{caretColor:t.caret},".cm-cursor, .cm-dropCursor":{borderLeftColor:t.caret},"&.cm-focused .cm-selectionBackgroundm .cm-selectionBackground, .cm-content ::selection":{backgroundColor:t.selection},".cm-activeLine":{backgroundColor:t.lineHighlight},".cm-gutters":{backgroundColor:t.gutterBackground,color:t.gutterForeground},".cm-activeLineGutter":{backgroundColor:t.lineHighlight}},{dark:e===`dark`}),i=_.define(n);return[r,m(i)]};L({variant:`dark`,settings:{background:`#200020`,foreground:`#D0D0FF`,caret:`#7070FF`,selection:`#80000080`,gutterBackground:`#200020`,gutterForeground:`#C080C0`,lineHighlight:`#80000040`},styles:[{tag:h.comment,color:`#404080`},{tag:[h.string,h.regexp],color:`#999999`},{tag:h.number,color:`#7090B0`},{tag:[h.bool,h.null],color:`#8080A0`},{tag:[h.punctuation,h.derefOperator],color:`#805080`},{tag:h.keyword,color:`#60B0FF`},{tag:h.definitionKeyword,color:`#B0FFF0`},{tag:h.moduleKeyword,color:`#60B0FF`},{tag:h.operator,color:`#A0A0FF`},{tag:[h.variableName,h.self],color:`#008080`},{tag:h.operatorKeyword,color:`#A0A0FF`},{tag:h.controlKeyword,color:`#80A0FF`},{tag:h.className,color:`#70E080`},{tag:[h.function(h.propertyName),h.propertyName],color:`#50A0A0`},{tag:h.tagName,color:`#009090`},{tag:h.modifier,color:`#B0FFF0`},{tag:[h.squareBracket,h.attributeName],color:`#D0D0FF`}]}),L({variant:`light`,settings:{background:`#fcfcfc`,foreground:`#5c6166`,caret:`#ffaa33`,selection:`#036dd626`,gutterBackground:`#fcfcfc`,gutterForeground:`#8a919966`,lineHighlight:`#8a91991a`},styles:[{tag:h.comment,color:`#787b8099`},{tag:h.string,color:`#86b300`},{tag:h.regexp,color:`#4cbf99`},{tag:[h.number,h.bool,h.null],color:`#ffaa33`},{tag:h.variableName,color:`#5c6166`},{tag:[h.definitionKeyword,h.modifier],color:`#fa8d3e`},{tag:[h.keyword,h.special(h.brace)],color:`#fa8d3e`},{tag:h.operator,color:`#ed9366`},{tag:h.separator,color:`#5c6166b3`},{tag:h.punctuation,color:`#5c6166`},{tag:[h.definition(h.propertyName),h.function(h.variableName)],color:`#f2ae49`},{tag:[h.className,h.definition(h.typeName)],color:`#22a4e6`},{tag:[h.tagName,h.typeName,h.self,h.labelName],color:`#55b4d4`},{tag:h.angleBracket,color:`#55b4d480`},{tag:h.attributeName,color:`#f2ae49`}]}),L({variant:`dark`,settings:{background:`#15191EFA`,foreground:`#EEF2F7`,caret:`#C4C4C4`,selection:`#90B2D557`,gutterBackground:`#15191EFA`,gutterForeground:`#aaaaaa95`,lineHighlight:`#57575712`},styles:[{tag:h.comment,color:`#6E6E6E`},{tag:[h.string,h.regexp,h.special(h.brace)],color:`#5C81B3`},{tag:h.number,color:`#C1E1B8`},{tag:h.bool,color:`#53667D`},{tag:[h.definitionKeyword,h.modifier,h.function(h.propertyName)],color:`#A3D295`,fontWeight:`bold`},{tag:[h.keyword,h.moduleKeyword,h.operatorKeyword,h.operator],color:`#697A8E`,fontWeight:`bold`},{tag:[h.variableName,h.attributeName],color:`#708E67`},{tag:[h.function(h.variableName),h.definition(h.propertyName),h.derefOperator],color:`#fff`},{tag:h.tagName,color:`#A3D295`}]}),L({variant:`dark`,settings:{background:`#2e241d`,foreground:`#BAAE9E`,caret:`#A7A7A7`,selection:`#DDF0FF33`,gutterBackground:`#28211C`,gutterForeground:`#BAAE9E90`,lineHighlight:`#FFFFFF08`},styles:[{tag:h.comment,color:`#666666`},{tag:[h.string,h.special(h.brace)],color:`#54BE0D`},{tag:h.regexp,color:`#E9C062`},{tag:h.number,color:`#CF6A4C`},{tag:[h.keyword,h.operator],color:`#5EA6EA`},{tag:h.variableName,color:`#7587A6`},{tag:[h.definitionKeyword,h.modifier],color:`#F9EE98`},{tag:[h.propertyName,h.function(h.variableName)],color:`#937121`},{tag:[h.typeName,h.angleBracket,h.tagName],color:`#9B859D`}]}),L({variant:`dark`,settings:{background:`#3b2627`,foreground:`#E6E1C4`,caret:`#E6E1C4`,selection:`#16120E`,gutterBackground:`#3b2627`,gutterForeground:`#E6E1C490`,lineHighlight:`#1F1611`},styles:[{tag:h.comment,color:`#6B4E32`},{tag:[h.keyword,h.operator,h.derefOperator],color:`#EF5D32`},{tag:h.className,color:`#EFAC32`,fontWeight:`bold`},{tag:[h.typeName,h.propertyName,h.function(h.variableName),h.definition(h.variableName)],color:`#EFAC32`},{tag:h.definition(h.typeName),color:`#EFAC32`,fontWeight:`bold`},{tag:h.labelName,color:`#EFAC32`,fontWeight:`bold`},{tag:[h.number,h.bool],color:`#6C99BB`},{tag:[h.variableName,h.self],color:`#7DAF9C`},{tag:[h.string,h.special(h.brace),h.regexp],color:`#D9D762`},{tag:[h.angleBracket,h.tagName,h.attributeName],color:`#EFCB43`}]}),L({variant:`dark`,settings:{background:`#000205`,foreground:`#FFFFFF`,caret:`#E60065`,selection:`#E60C6559`,gutterBackground:`#000205`,gutterForeground:`#ffffff90`,lineHighlight:`#4DD7FC1A`},styles:[{tag:h.comment,color:`#404040`},{tag:[h.string,h.special(h.brace),h.regexp],color:`#00D8FF`},{tag:h.number,color:`#E62286`},{tag:[h.variableName,h.attributeName,h.self],color:`#E62286`,fontWeight:`bold`},{tag:h.function(h.variableName),color:`#fff`,fontWeight:`bold`}]}),L({variant:`light`,settings:{background:`#fff`,foreground:`#000`,caret:`#000`,selection:`#BDD5FC`,gutterBackground:`#fff`,gutterForeground:`#00000070`,lineHighlight:`#FFFBD1`},styles:[{tag:h.comment,color:`#BCC8BA`},{tag:[h.string,h.special(h.brace),h.regexp],color:`#5D90CD`},{tag:[h.number,h.bool,h.null],color:`#46A609`},{tag:h.keyword,color:`#AF956F`},{tag:[h.definitionKeyword,h.modifier],color:`#C52727`},{tag:[h.angleBracket,h.tagName,h.attributeName],color:`#606060`},{tag:h.self,color:`#000`}]}),L({variant:`dark`,settings:{background:`#00254b`,foreground:`#FFFFFF`,caret:`#FFFFFF`,selection:`#B36539BF`,gutterBackground:`#00254b`,gutterForeground:`#FFFFFF70`,lineHighlight:`#00000059`},styles:[{tag:h.comment,color:`#0088FF`},{tag:h.string,color:`#3AD900`},{tag:h.regexp,color:`#80FFC2`},{tag:[h.number,h.bool,h.null],color:`#FF628C`},{tag:[h.definitionKeyword,h.modifier],color:`#FFEE80`},{tag:h.variableName,color:`#CCCCCC`},{tag:h.self,color:`#FF80E1`},{tag:[h.className,h.definition(h.propertyName),h.function(h.variableName),h.definition(h.typeName),h.labelName],color:`#FFDD00`},{tag:[h.keyword,h.operator],color:`#FF9D00`},{tag:[h.propertyName,h.typeName],color:`#80FFBB`},{tag:h.special(h.brace),color:`#EDEF7D`},{tag:h.attributeName,color:`#9EFFFF`},{tag:h.derefOperator,color:`#fff`}]}),L({variant:`dark`,settings:{background:`#060521`,foreground:`#E0E0E0`,caret:`#FFFFFFA6`,selection:`#122BBB`,gutterBackground:`#060521`,gutterForeground:`#E0E0E090`,lineHighlight:`#FFFFFF0F`},styles:[{tag:h.comment,color:`#AEAEAE`},{tag:[h.string,h.special(h.brace),h.regexp],color:`#8DFF8E`},{tag:[h.className,h.definition(h.propertyName),h.function(h.variableName),h.function(h.definition(h.variableName)),h.definition(h.typeName)],color:`#A3EBFF`},{tag:[h.number,h.bool,h.null],color:`#62E9BD`},{tag:[h.keyword,h.operator],color:`#2BF1DC`},{tag:[h.definitionKeyword,h.modifier],color:`#F8FBB1`},{tag:[h.variableName,h.self],color:`#B683CA`},{tag:[h.angleBracket,h.tagName,h.typeName,h.propertyName],color:`#60A4F1`},{tag:h.derefOperator,color:`#E0E0E0`},{tag:h.attributeName,color:`#7BACCA`}]}),L({variant:`dark`,settings:{background:`#2d2f3f`,foreground:`#f8f8f2`,caret:`#f8f8f0`,selection:`#44475a`,gutterBackground:`#282a36`,gutterForeground:`rgb(144, 145, 148)`,lineHighlight:`#44475a`},styles:[{tag:h.comment,color:`#6272a4`},{tag:[h.string,h.special(h.brace)],color:`#f1fa8c`},{tag:[h.number,h.self,h.bool,h.null],color:`#bd93f9`},{tag:[h.keyword,h.operator],color:`#ff79c6`},{tag:[h.definitionKeyword,h.typeName],color:`#8be9fd`},{tag:h.definition(h.typeName),color:`#f8f8f2`},{tag:[h.className,h.definition(h.propertyName),h.function(h.variableName),h.attributeName],color:`#50fa7b`}]}),L({variant:`light`,settings:{background:`#FFFFFF`,foreground:`#000000`,caret:`#000000`,selection:`#80C7FF`,gutterBackground:`#FFFFFF`,gutterForeground:`#00000070`,lineHighlight:`#C1E2F8`},styles:[{tag:h.comment,color:`#AAAAAA`},{tag:[h.keyword,h.operator,h.typeName,h.tagName,h.propertyName],color:`#2F6F9F`,fontWeight:`bold`},{tag:[h.attributeName,h.definition(h.propertyName)],color:`#4F9FD0`},{tag:[h.className,h.string,h.special(h.brace)],color:`#CF4F5F`},{tag:h.number,color:`#CF4F5F`,fontWeight:`bold`},{tag:h.variableName,fontWeight:`bold`}]}),L({variant:`light`,settings:{background:`#f2f1f8`,foreground:`#0c006b`,caret:`#5c49e9`,selection:`#d5d1f2`,gutterBackground:`#f2f1f8`,gutterForeground:`#0c006b70`,lineHighlight:`#e1def3`},styles:[{tag:h.comment,color:`#9995b7`},{tag:h.keyword,color:`#ff5792`,fontWeight:`bold`},{tag:[h.definitionKeyword,h.modifier],color:`#ff5792`},{tag:[h.className,h.tagName,h.definition(h.typeName)],color:`#0094f0`},{tag:[h.number,h.bool,h.null,h.special(h.brace)],color:`#5842ff`},{tag:[h.definition(h.propertyName),h.function(h.variableName)],color:`#0095a8`},{tag:h.typeName,color:`#b3694d`},{tag:[h.propertyName,h.variableName],color:`#fa8900`},{tag:h.operator,color:`#ff5792`},{tag:h.self,color:`#e64100`},{tag:[h.string,h.regexp],color:`#00b368`},{tag:[h.paren,h.bracket],color:`#0431fa`},{tag:h.labelName,color:`#00bdd6`},{tag:h.attributeName,color:`#e64100`},{tag:h.angleBracket,color:`#9995b7`}]}),L({variant:`light`,settings:{background:`#faf4ed`,foreground:`#575279`,caret:`#575279`,selection:`#6e6a8614`,gutterBackground:`#faf4ed`,gutterForeground:`#57527970`,lineHighlight:`#6e6a860d`},styles:[{tag:h.comment,color:`#9893a5`},{tag:[h.bool,h.null],color:`#286983`},{tag:h.number,color:`#d7827e`},{tag:h.className,color:`#d7827e`},{tag:[h.angleBracket,h.tagName,h.typeName],color:`#56949f`},{tag:h.attributeName,color:`#907aa9`},{tag:h.punctuation,color:`#797593`},{tag:[h.keyword,h.modifier],color:`#286983`},{tag:[h.string,h.regexp],color:`#ea9d34`},{tag:h.variableName,color:`#d7827e`}]}),L({variant:`light`,settings:{background:`#FFFFFF`,foreground:`#000000`,caret:`#000000`,selection:`#FFFD0054`,gutterBackground:`#FFFFFF`,gutterForeground:`#00000070`,lineHighlight:`#00000008`},styles:[{tag:h.comment,color:`#CFCFCF`},{tag:[h.number,h.bool,h.null],color:`#E66C29`},{tag:[h.className,h.definition(h.propertyName),h.function(h.variableName),h.labelName,h.definition(h.typeName)],color:`#2EB43B`},{tag:h.keyword,color:`#D8B229`},{tag:h.operator,color:`#4EA44E`,fontWeight:`bold`},{tag:[h.definitionKeyword,h.modifier],color:`#925A47`},{tag:h.string,color:`#704D3D`},{tag:h.typeName,color:`#2F8996`},{tag:[h.variableName,h.propertyName],color:`#77ACB0`},{tag:h.self,color:`#77ACB0`,fontWeight:`bold`},{tag:h.regexp,color:`#E3965E`},{tag:[h.tagName,h.angleBracket],color:`#BAA827`},{tag:h.attributeName,color:`#B06520`},{tag:h.derefOperator,color:`#000`}]}),L({variant:`light`,settings:{background:`#fef7e5`,foreground:`#586E75`,caret:`#000000`,selection:`#073642`,gutterBackground:`#fef7e5`,gutterForeground:`#586E7580`,lineHighlight:`#EEE8D5`},styles:[{tag:h.comment,color:`#93A1A1`},{tag:h.string,color:`#2AA198`},{tag:h.regexp,color:`#D30102`},{tag:h.number,color:`#D33682`},{tag:h.variableName,color:`#268BD2`},{tag:[h.keyword,h.operator,h.punctuation],color:`#859900`},{tag:[h.definitionKeyword,h.modifier],color:`#073642`,fontWeight:`bold`},{tag:[h.className,h.self,h.definition(h.propertyName)],color:`#268BD2`},{tag:h.function(h.variableName),color:`#268BD2`},{tag:[h.bool,h.null],color:`#B58900`},{tag:h.tagName,color:`#268BD2`,fontWeight:`bold`},{tag:h.angleBracket,color:`#93A1A1`},{tag:h.attributeName,color:`#93A1A1`},{tag:h.typeName,color:`#859900`}]}),L({variant:`light`,settings:{background:`#FFFFFF`,foreground:`#4D4D4C`,caret:`#AEAFAD`,selection:`#D6D6D6`,gutterBackground:`#FFFFFF`,gutterForeground:`#4D4D4C80`,lineHighlight:`#EFEFEF`},styles:[{tag:h.comment,color:`#8E908C`},{tag:[h.variableName,h.self,h.propertyName,h.attributeName,h.regexp],color:`#C82829`},{tag:[h.number,h.bool,h.null],color:`#F5871F`},{tag:[h.className,h.typeName,h.definition(h.typeName)],color:`#C99E00`},{tag:[h.string,h.special(h.brace)],color:`#718C00`},{tag:h.operator,color:`#3E999F`},{tag:[h.definition(h.propertyName),h.function(h.variableName)],color:`#4271AE`},{tag:h.keyword,color:`#8959A8`},{tag:h.derefOperator,color:`#4D4D4C`}]});var R=[L({variant:`dark`,settings:{background:`var(--cm-background)`,foreground:`#abb2bf`,caret:`#528bff`,selection:`var(--cm-selection-background)`,lineHighlight:`#2c313c`,gutterBackground:`var(--color-background)`,gutterForeground:`var(--gray-10)`},styles:[{tag:h.comment,color:`var(--cm-comment)`},{tag:h.variableName,color:`#abb2bf`},{tag:[h.string,h.special(h.brace)],color:`#98c379`},{tag:h.number,color:`#d19a66`},{tag:h.bool,color:`#d19a66`},{tag:h.null,color:`#d19a66`},{tag:h.keyword,color:`#c678dd`,fontWeight:500},{tag:h.className,color:`#61afef`},{tag:h.definition(h.typeName),color:`#61afef`},{tag:h.typeName,color:`#56b6c2`},{tag:h.angleBracket,color:`#abb2bf`},{tag:h.tagName,color:`#e06c75`},{tag:h.attributeName,color:`#d19a66`},{tag:h.operator,color:`#56b6c2`,fontWeight:500},{tag:[h.function(h.variableName)],color:`#61afef`},{tag:[h.propertyName],color:`#e5c07b`}]}),v.theme({"&":{"--cm-selection-background":`var(--cm-selection-background-dark)`},".mo-cm-reactive-reference":{fontWeight:`400`,color:`var(--cm-reactive-reference-color-dark)`,borderBottom:`2px solid var(--cm-reactive-reference-border-color)`},".mo-cm-reactive-reference-hover":{cursor:`pointer`}})],z=[L({variant:`light`,settings:{background:`#ffffff`,foreground:`#000000`,caret:`#000000`,selection:`var(--cm-selection-background)`,lineHighlight:`#cceeff44`,gutterBackground:`var(--color-background)`,gutterForeground:`var(--gray-10)`},styles:[{tag:h.comment,color:`var(--cm-comment)`},{tag:h.variableName,color:`#000000`},{tag:[h.string,h.special(h.brace)],color:`#a11`},{tag:h.number,color:`#164`},{tag:h.bool,color:`#219`},{tag:h.null,color:`#219`},{tag:h.keyword,color:`#708`,fontWeight:500},{tag:h.className,color:`#00f`},{tag:h.definition(h.typeName),color:`#00f`},{tag:h.typeName,color:`#085`},{tag:h.angleBracket,color:`#000000`},{tag:h.tagName,color:`#170`},{tag:h.attributeName,color:`#00c`},{tag:h.operator,color:`#a2f`,fontWeight:500},{tag:[h.function(h.variableName)],color:`#00c`},{tag:[h.propertyName],color:`#05a`}]}),v.theme({"&":{"--cm-selection-background":`var(--cm-selection-background-light)`},".mo-cm-reactive-reference":{fontWeight:`400`,color:`var(--cm-reactive-reference-color-light)`,borderBottom:`2px solid var(--cm-reactive-reference-border-color)`},".mo-cm-reactive-reference-hover":{cursor:`pointer`}})],B=u(),V=[a(),v.lineWrapping],H=[y(),v.lineWrapping],U=[w(),v.lineWrapping];function W(e){switch(e){case`sql`:return H;case`markdown`:return U;default:return V}}var G=(0,F.memo)(e=>{let t=(0,I.c)(39),{theme:n}=E(),r,i,a,o,s,c,u,d;t[0]===e?(r=t[1],i=t[2],a=t[3],o=t[4],s=t[5],c=t[6],u=t[7],d=t[8]):({code:i,className:r,initiallyHideCode:a,showHideCode:c,showCopyCode:u,insertNewCell:o,language:d,...s}=e,t[0]=e,t[1]=r,t[2]=i,t[3]=a,t[4]=o,t[5]=s,t[6]=c,t[7]=u,t[8]=d);let f=c===void 0||c,p=u===void 0||u,h=d===void 0?`python`:d,[_,v]=(0,F.useState)(!!a),y=n===`dark`?R:z,b;t[9]===Symbol.for(`react.memo_cache_sentinel`)?(b=m(g,{fallback:!0}),t[9]=b):b=t[9];let x;t[10]!==h||t[11]!==y?(x=[y,b,...W(h)],t[10]=h,t[11]=y,t[12]=x):x=t[12];let S=x,C;t[13]===r?C=t[14]:(C=l(`relative hover-actions-parent w-full overflow-hidden pb-1`,r),t[13]=r,t[14]=C);let w;t[15]!==i||t[16]!==p?(w=p&&(0,B.jsx)(K,{text:i}),t[15]=i,t[16]=p,t[17]=w):w=t[17];let T;t[18]!==i||t[19]!==o?(T=o&&(0,B.jsx)(J,{code:i}),t[18]=i,t[19]=o,t[20]=T):T=t[20];let D;t[21]!==_||t[22]!==f?(D=f&&(0,B.jsx)(q,{hidden:_,onClick:()=>v(Y)}),t[21]=_,t[22]=f,t[23]=D):D=t[23];let k;t[24]!==w||t[25]!==T||t[26]!==D?(k=(0,B.jsxs)(`div`,{className:`absolute top-0 right-0 my-1 mx-2 z-10 hover-action flex gap-2`,children:[w,T,D]}),t[24]=w,t[25]=T,t[26]=D,t[27]=k):k=t[27];let A=_&&`opacity-20 h-8 overflow-hidden`,j;t[28]===A?j=t[29]:(j=l(`cm`,A),t[28]=A,t[29]=j);let M;t[30]!==i||t[31]!==S||t[32]!==s||t[33]!==j?(M=(0,B.jsx)(O,{...s,className:j,theme:`none`,height:`100%`,editable:!1,extensions:S,value:i,readOnly:!0}),t[30]=i,t[31]=S,t[32]=s,t[33]=j,t[34]=M):M=t[34];let N;return t[35]!==k||t[36]!==M||t[37]!==C?(N=(0,B.jsxs)(`div`,{className:C,children:[k,M]}),t[35]=k,t[36]=M,t[37]=C,t[38]=N):N=t[38],N});G.displayName=`ReadonlyCode`;var K=e=>{let t=(0,I.c)(5),n;t[0]===e.text?n=t[1]:(n=f.stopPropagation(async()=>{await D(e.text),T({title:`Copied to clipboard`})}),t[0]=e.text,t[1]=n);let r=n,i;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(i=(0,B.jsx)(x,{size:14,strokeWidth:1.5}),t[2]=i):i=t[2];let a;return t[3]===r?a=t[4]:(a=(0,B.jsx)(d,{content:`Copy code`,usePortal:!1,children:(0,B.jsx)(p,{onClick:r,size:`xs`,className:`py-0`,variant:`secondary`,"aria-label":`Copy code`,children:i})}),t[3]=r,t[4]=a),a},q=e=>{let t=(0,I.c)(9),n=e.hidden?`Show code`:`Hide code`,r=e.hidden?`Show code`:`Hide code`,i;t[0]===e.hidden?i=t[1]:(i=e.hidden?(0,B.jsx)(o,{size:14,strokeWidth:1.5}):(0,B.jsx)(S,{size:14,strokeWidth:1.5}),t[0]=e.hidden,t[1]=i);let a;t[2]!==e.onClick||t[3]!==r||t[4]!==i?(a=(0,B.jsx)(p,{onClick:e.onClick,"aria-label":r,size:`xs`,className:`py-0`,variant:`secondary`,children:i}),t[2]=e.onClick,t[3]=r,t[4]=i,t[5]=a):a=t[5];let s;return t[6]!==n||t[7]!==a?(s=(0,B.jsx)(d,{content:n,usePortal:!1,children:a}),t[6]=n,t[7]=a,t[8]=s):s=t[8],s},J=e=>{let t=(0,I.c)(6),n=k(),r;t[0]!==n||t[1]!==e.code?(r=()=>{n(e.code)},t[0]=n,t[1]=e.code,t[2]=r):r=t[2];let i=r,a;t[3]===Symbol.for(`react.memo_cache_sentinel`)?(a=(0,B.jsx)(C,{size:14,strokeWidth:1.5}),t[3]=a):a=t[3];let o;return t[4]===i?o=t[5]:(o=(0,B.jsx)(d,{content:`Add code to notebook`,usePortal:!1,children:(0,B.jsx)(p,{onClick:i,size:`xs`,className:`py-0`,variant:`secondary`,"aria-label":`Add code to notebook`,children:a})}),t[4]=i,t[5]=o),o};function Y(e){return!e}export{P as a,A as c,N as i,z as n,M as o,R as r,j as s,G as t};
1
+ import{a as e}from"./rolldown-runtime-B0Z9INg1.js";import{a as t,f as n,r}from"./useEvent-xfs0Sn4r.js";import{t as i}from"./react-CBDbhulC.js";import{$n as a,Zi as o}from"./cells-v0dAmt79.js";import{t as s}from"./compiler-runtime-CYIjoINj.js";import{i as c}from"./switch-27TbonxF.js";import{t as l}from"./cn-ldLVeaqm.js";import{t as u}from"./jsx-runtime-B74pBk57.js";import{t as d}from"./tooltip-D7dq6bnc.js";import{r as f,t as p}from"./button-BMBznEru.js";import{V as m,X as h,_ as g,a as _,st as v}from"./dist-PIe1xcZo.js";import{f as y}from"./dist-B97dKQGP.js";import{t as b}from"./createLucideIcon-B7HeEoG2.js";import{t as x}from"./copy-BMXKNElG.js";import{t as S}from"./eye-off-CFuPxa9F.js";import{t as C}from"./plus-C4J9gIE1.js";import{a as w}from"./dist-DCc0VfiO.js";import{t as T}from"./use-toast-DpWHUGuF.js";import{r as E}from"./useTheme-D3zvxdF3.js";import{n as D}from"./copy-Cg05mM3C.js";import{t as O}from"./esm-Dw0vvSg2.js";import{t as k}from"./useAddCell-DtdPi8nq.js";var A=()=>r.get(c),j=()=>{let e=document.querySelector(`marimo-code`);if(!e)return;let t=e.innerHTML;return decodeURIComponent(t).trim()},M=b(`lock`,[[`rect`,{width:`18`,height:`11`,x:`3`,y:`11`,rx:`2`,ry:`2`,key:`1w4ew1`}],[`path`,{d:`M7 11V7a5 5 0 0 1 10 0v4`,key:`fwvmzm`}]]),N=n({isInstantiated:!1,error:null});function P(){return t(N,e=>e.isInstantiated)}var F=e(i(),1),I=s(),L=({variant:e,settings:t,styles:n})=>{let r=v.theme({"&":{backgroundColor:t.background,color:t.foreground},".cm-content":{caretColor:t.caret},".cm-cursor, .cm-dropCursor":{borderLeftColor:t.caret},"&.cm-focused .cm-selectionBackgroundm .cm-selectionBackground, .cm-content ::selection":{backgroundColor:t.selection},".cm-activeLine":{backgroundColor:t.lineHighlight},".cm-gutters":{backgroundColor:t.gutterBackground,color:t.gutterForeground},".cm-activeLineGutter":{backgroundColor:t.lineHighlight}},{dark:e===`dark`}),i=_.define(n);return[r,m(i)]};L({variant:`dark`,settings:{background:`#200020`,foreground:`#D0D0FF`,caret:`#7070FF`,selection:`#80000080`,gutterBackground:`#200020`,gutterForeground:`#C080C0`,lineHighlight:`#80000040`},styles:[{tag:h.comment,color:`#404080`},{tag:[h.string,h.regexp],color:`#999999`},{tag:h.number,color:`#7090B0`},{tag:[h.bool,h.null],color:`#8080A0`},{tag:[h.punctuation,h.derefOperator],color:`#805080`},{tag:h.keyword,color:`#60B0FF`},{tag:h.definitionKeyword,color:`#B0FFF0`},{tag:h.moduleKeyword,color:`#60B0FF`},{tag:h.operator,color:`#A0A0FF`},{tag:[h.variableName,h.self],color:`#008080`},{tag:h.operatorKeyword,color:`#A0A0FF`},{tag:h.controlKeyword,color:`#80A0FF`},{tag:h.className,color:`#70E080`},{tag:[h.function(h.propertyName),h.propertyName],color:`#50A0A0`},{tag:h.tagName,color:`#009090`},{tag:h.modifier,color:`#B0FFF0`},{tag:[h.squareBracket,h.attributeName],color:`#D0D0FF`}]}),L({variant:`light`,settings:{background:`#fcfcfc`,foreground:`#5c6166`,caret:`#ffaa33`,selection:`#036dd626`,gutterBackground:`#fcfcfc`,gutterForeground:`#8a919966`,lineHighlight:`#8a91991a`},styles:[{tag:h.comment,color:`#787b8099`},{tag:h.string,color:`#86b300`},{tag:h.regexp,color:`#4cbf99`},{tag:[h.number,h.bool,h.null],color:`#ffaa33`},{tag:h.variableName,color:`#5c6166`},{tag:[h.definitionKeyword,h.modifier],color:`#fa8d3e`},{tag:[h.keyword,h.special(h.brace)],color:`#fa8d3e`},{tag:h.operator,color:`#ed9366`},{tag:h.separator,color:`#5c6166b3`},{tag:h.punctuation,color:`#5c6166`},{tag:[h.definition(h.propertyName),h.function(h.variableName)],color:`#f2ae49`},{tag:[h.className,h.definition(h.typeName)],color:`#22a4e6`},{tag:[h.tagName,h.typeName,h.self,h.labelName],color:`#55b4d4`},{tag:h.angleBracket,color:`#55b4d480`},{tag:h.attributeName,color:`#f2ae49`}]}),L({variant:`dark`,settings:{background:`#15191EFA`,foreground:`#EEF2F7`,caret:`#C4C4C4`,selection:`#90B2D557`,gutterBackground:`#15191EFA`,gutterForeground:`#aaaaaa95`,lineHighlight:`#57575712`},styles:[{tag:h.comment,color:`#6E6E6E`},{tag:[h.string,h.regexp,h.special(h.brace)],color:`#5C81B3`},{tag:h.number,color:`#C1E1B8`},{tag:h.bool,color:`#53667D`},{tag:[h.definitionKeyword,h.modifier,h.function(h.propertyName)],color:`#A3D295`,fontWeight:`bold`},{tag:[h.keyword,h.moduleKeyword,h.operatorKeyword,h.operator],color:`#697A8E`,fontWeight:`bold`},{tag:[h.variableName,h.attributeName],color:`#708E67`},{tag:[h.function(h.variableName),h.definition(h.propertyName),h.derefOperator],color:`#fff`},{tag:h.tagName,color:`#A3D295`}]}),L({variant:`dark`,settings:{background:`#2e241d`,foreground:`#BAAE9E`,caret:`#A7A7A7`,selection:`#DDF0FF33`,gutterBackground:`#28211C`,gutterForeground:`#BAAE9E90`,lineHighlight:`#FFFFFF08`},styles:[{tag:h.comment,color:`#666666`},{tag:[h.string,h.special(h.brace)],color:`#54BE0D`},{tag:h.regexp,color:`#E9C062`},{tag:h.number,color:`#CF6A4C`},{tag:[h.keyword,h.operator],color:`#5EA6EA`},{tag:h.variableName,color:`#7587A6`},{tag:[h.definitionKeyword,h.modifier],color:`#F9EE98`},{tag:[h.propertyName,h.function(h.variableName)],color:`#937121`},{tag:[h.typeName,h.angleBracket,h.tagName],color:`#9B859D`}]}),L({variant:`dark`,settings:{background:`#3b2627`,foreground:`#E6E1C4`,caret:`#E6E1C4`,selection:`#16120E`,gutterBackground:`#3b2627`,gutterForeground:`#E6E1C490`,lineHighlight:`#1F1611`},styles:[{tag:h.comment,color:`#6B4E32`},{tag:[h.keyword,h.operator,h.derefOperator],color:`#EF5D32`},{tag:h.className,color:`#EFAC32`,fontWeight:`bold`},{tag:[h.typeName,h.propertyName,h.function(h.variableName),h.definition(h.variableName)],color:`#EFAC32`},{tag:h.definition(h.typeName),color:`#EFAC32`,fontWeight:`bold`},{tag:h.labelName,color:`#EFAC32`,fontWeight:`bold`},{tag:[h.number,h.bool],color:`#6C99BB`},{tag:[h.variableName,h.self],color:`#7DAF9C`},{tag:[h.string,h.special(h.brace),h.regexp],color:`#D9D762`},{tag:[h.angleBracket,h.tagName,h.attributeName],color:`#EFCB43`}]}),L({variant:`dark`,settings:{background:`#000205`,foreground:`#FFFFFF`,caret:`#E60065`,selection:`#E60C6559`,gutterBackground:`#000205`,gutterForeground:`#ffffff90`,lineHighlight:`#4DD7FC1A`},styles:[{tag:h.comment,color:`#404040`},{tag:[h.string,h.special(h.brace),h.regexp],color:`#00D8FF`},{tag:h.number,color:`#E62286`},{tag:[h.variableName,h.attributeName,h.self],color:`#E62286`,fontWeight:`bold`},{tag:h.function(h.variableName),color:`#fff`,fontWeight:`bold`}]}),L({variant:`light`,settings:{background:`#fff`,foreground:`#000`,caret:`#000`,selection:`#BDD5FC`,gutterBackground:`#fff`,gutterForeground:`#00000070`,lineHighlight:`#FFFBD1`},styles:[{tag:h.comment,color:`#BCC8BA`},{tag:[h.string,h.special(h.brace),h.regexp],color:`#5D90CD`},{tag:[h.number,h.bool,h.null],color:`#46A609`},{tag:h.keyword,color:`#AF956F`},{tag:[h.definitionKeyword,h.modifier],color:`#C52727`},{tag:[h.angleBracket,h.tagName,h.attributeName],color:`#606060`},{tag:h.self,color:`#000`}]}),L({variant:`dark`,settings:{background:`#00254b`,foreground:`#FFFFFF`,caret:`#FFFFFF`,selection:`#B36539BF`,gutterBackground:`#00254b`,gutterForeground:`#FFFFFF70`,lineHighlight:`#00000059`},styles:[{tag:h.comment,color:`#0088FF`},{tag:h.string,color:`#3AD900`},{tag:h.regexp,color:`#80FFC2`},{tag:[h.number,h.bool,h.null],color:`#FF628C`},{tag:[h.definitionKeyword,h.modifier],color:`#FFEE80`},{tag:h.variableName,color:`#CCCCCC`},{tag:h.self,color:`#FF80E1`},{tag:[h.className,h.definition(h.propertyName),h.function(h.variableName),h.definition(h.typeName),h.labelName],color:`#FFDD00`},{tag:[h.keyword,h.operator],color:`#FF9D00`},{tag:[h.propertyName,h.typeName],color:`#80FFBB`},{tag:h.special(h.brace),color:`#EDEF7D`},{tag:h.attributeName,color:`#9EFFFF`},{tag:h.derefOperator,color:`#fff`}]}),L({variant:`dark`,settings:{background:`#060521`,foreground:`#E0E0E0`,caret:`#FFFFFFA6`,selection:`#122BBB`,gutterBackground:`#060521`,gutterForeground:`#E0E0E090`,lineHighlight:`#FFFFFF0F`},styles:[{tag:h.comment,color:`#AEAEAE`},{tag:[h.string,h.special(h.brace),h.regexp],color:`#8DFF8E`},{tag:[h.className,h.definition(h.propertyName),h.function(h.variableName),h.function(h.definition(h.variableName)),h.definition(h.typeName)],color:`#A3EBFF`},{tag:[h.number,h.bool,h.null],color:`#62E9BD`},{tag:[h.keyword,h.operator],color:`#2BF1DC`},{tag:[h.definitionKeyword,h.modifier],color:`#F8FBB1`},{tag:[h.variableName,h.self],color:`#B683CA`},{tag:[h.angleBracket,h.tagName,h.typeName,h.propertyName],color:`#60A4F1`},{tag:h.derefOperator,color:`#E0E0E0`},{tag:h.attributeName,color:`#7BACCA`}]}),L({variant:`dark`,settings:{background:`#2d2f3f`,foreground:`#f8f8f2`,caret:`#f8f8f0`,selection:`#44475a`,gutterBackground:`#282a36`,gutterForeground:`rgb(144, 145, 148)`,lineHighlight:`#44475a`},styles:[{tag:h.comment,color:`#6272a4`},{tag:[h.string,h.special(h.brace)],color:`#f1fa8c`},{tag:[h.number,h.self,h.bool,h.null],color:`#bd93f9`},{tag:[h.keyword,h.operator],color:`#ff79c6`},{tag:[h.definitionKeyword,h.typeName],color:`#8be9fd`},{tag:h.definition(h.typeName),color:`#f8f8f2`},{tag:[h.className,h.definition(h.propertyName),h.function(h.variableName),h.attributeName],color:`#50fa7b`}]}),L({variant:`light`,settings:{background:`#FFFFFF`,foreground:`#000000`,caret:`#000000`,selection:`#80C7FF`,gutterBackground:`#FFFFFF`,gutterForeground:`#00000070`,lineHighlight:`#C1E2F8`},styles:[{tag:h.comment,color:`#AAAAAA`},{tag:[h.keyword,h.operator,h.typeName,h.tagName,h.propertyName],color:`#2F6F9F`,fontWeight:`bold`},{tag:[h.attributeName,h.definition(h.propertyName)],color:`#4F9FD0`},{tag:[h.className,h.string,h.special(h.brace)],color:`#CF4F5F`},{tag:h.number,color:`#CF4F5F`,fontWeight:`bold`},{tag:h.variableName,fontWeight:`bold`}]}),L({variant:`light`,settings:{background:`#f2f1f8`,foreground:`#0c006b`,caret:`#5c49e9`,selection:`#d5d1f2`,gutterBackground:`#f2f1f8`,gutterForeground:`#0c006b70`,lineHighlight:`#e1def3`},styles:[{tag:h.comment,color:`#9995b7`},{tag:h.keyword,color:`#ff5792`,fontWeight:`bold`},{tag:[h.definitionKeyword,h.modifier],color:`#ff5792`},{tag:[h.className,h.tagName,h.definition(h.typeName)],color:`#0094f0`},{tag:[h.number,h.bool,h.null,h.special(h.brace)],color:`#5842ff`},{tag:[h.definition(h.propertyName),h.function(h.variableName)],color:`#0095a8`},{tag:h.typeName,color:`#b3694d`},{tag:[h.propertyName,h.variableName],color:`#fa8900`},{tag:h.operator,color:`#ff5792`},{tag:h.self,color:`#e64100`},{tag:[h.string,h.regexp],color:`#00b368`},{tag:[h.paren,h.bracket],color:`#0431fa`},{tag:h.labelName,color:`#00bdd6`},{tag:h.attributeName,color:`#e64100`},{tag:h.angleBracket,color:`#9995b7`}]}),L({variant:`light`,settings:{background:`#faf4ed`,foreground:`#575279`,caret:`#575279`,selection:`#6e6a8614`,gutterBackground:`#faf4ed`,gutterForeground:`#57527970`,lineHighlight:`#6e6a860d`},styles:[{tag:h.comment,color:`#9893a5`},{tag:[h.bool,h.null],color:`#286983`},{tag:h.number,color:`#d7827e`},{tag:h.className,color:`#d7827e`},{tag:[h.angleBracket,h.tagName,h.typeName],color:`#56949f`},{tag:h.attributeName,color:`#907aa9`},{tag:h.punctuation,color:`#797593`},{tag:[h.keyword,h.modifier],color:`#286983`},{tag:[h.string,h.regexp],color:`#ea9d34`},{tag:h.variableName,color:`#d7827e`}]}),L({variant:`light`,settings:{background:`#FFFFFF`,foreground:`#000000`,caret:`#000000`,selection:`#FFFD0054`,gutterBackground:`#FFFFFF`,gutterForeground:`#00000070`,lineHighlight:`#00000008`},styles:[{tag:h.comment,color:`#CFCFCF`},{tag:[h.number,h.bool,h.null],color:`#E66C29`},{tag:[h.className,h.definition(h.propertyName),h.function(h.variableName),h.labelName,h.definition(h.typeName)],color:`#2EB43B`},{tag:h.keyword,color:`#D8B229`},{tag:h.operator,color:`#4EA44E`,fontWeight:`bold`},{tag:[h.definitionKeyword,h.modifier],color:`#925A47`},{tag:h.string,color:`#704D3D`},{tag:h.typeName,color:`#2F8996`},{tag:[h.variableName,h.propertyName],color:`#77ACB0`},{tag:h.self,color:`#77ACB0`,fontWeight:`bold`},{tag:h.regexp,color:`#E3965E`},{tag:[h.tagName,h.angleBracket],color:`#BAA827`},{tag:h.attributeName,color:`#B06520`},{tag:h.derefOperator,color:`#000`}]}),L({variant:`light`,settings:{background:`#fef7e5`,foreground:`#586E75`,caret:`#000000`,selection:`#073642`,gutterBackground:`#fef7e5`,gutterForeground:`#586E7580`,lineHighlight:`#EEE8D5`},styles:[{tag:h.comment,color:`#93A1A1`},{tag:h.string,color:`#2AA198`},{tag:h.regexp,color:`#D30102`},{tag:h.number,color:`#D33682`},{tag:h.variableName,color:`#268BD2`},{tag:[h.keyword,h.operator,h.punctuation],color:`#859900`},{tag:[h.definitionKeyword,h.modifier],color:`#073642`,fontWeight:`bold`},{tag:[h.className,h.self,h.definition(h.propertyName)],color:`#268BD2`},{tag:h.function(h.variableName),color:`#268BD2`},{tag:[h.bool,h.null],color:`#B58900`},{tag:h.tagName,color:`#268BD2`,fontWeight:`bold`},{tag:h.angleBracket,color:`#93A1A1`},{tag:h.attributeName,color:`#93A1A1`},{tag:h.typeName,color:`#859900`}]}),L({variant:`light`,settings:{background:`#FFFFFF`,foreground:`#4D4D4C`,caret:`#AEAFAD`,selection:`#D6D6D6`,gutterBackground:`#FFFFFF`,gutterForeground:`#4D4D4C80`,lineHighlight:`#EFEFEF`},styles:[{tag:h.comment,color:`#8E908C`},{tag:[h.variableName,h.self,h.propertyName,h.attributeName,h.regexp],color:`#C82829`},{tag:[h.number,h.bool,h.null],color:`#F5871F`},{tag:[h.className,h.typeName,h.definition(h.typeName)],color:`#C99E00`},{tag:[h.string,h.special(h.brace)],color:`#718C00`},{tag:h.operator,color:`#3E999F`},{tag:[h.definition(h.propertyName),h.function(h.variableName)],color:`#4271AE`},{tag:h.keyword,color:`#8959A8`},{tag:h.derefOperator,color:`#4D4D4C`}]});var R=[L({variant:`dark`,settings:{background:`var(--cm-background)`,foreground:`#abb2bf`,caret:`#528bff`,selection:`var(--cm-selection-background)`,lineHighlight:`#2c313c`,gutterBackground:`var(--color-background)`,gutterForeground:`var(--gray-10)`},styles:[{tag:h.comment,color:`var(--cm-comment)`},{tag:h.variableName,color:`#abb2bf`},{tag:[h.string,h.special(h.brace)],color:`#98c379`},{tag:h.number,color:`#d19a66`},{tag:h.bool,color:`#d19a66`},{tag:h.null,color:`#d19a66`},{tag:h.keyword,color:`#c678dd`,fontWeight:500},{tag:h.className,color:`#61afef`},{tag:h.definition(h.typeName),color:`#61afef`},{tag:h.typeName,color:`#56b6c2`},{tag:h.angleBracket,color:`#abb2bf`},{tag:h.tagName,color:`#e06c75`},{tag:h.attributeName,color:`#d19a66`},{tag:h.operator,color:`#56b6c2`,fontWeight:500},{tag:[h.function(h.variableName)],color:`#61afef`},{tag:[h.propertyName],color:`#e5c07b`}]}),v.theme({"&":{"--cm-selection-background":`var(--cm-selection-background-dark)`},".mo-cm-reactive-reference":{fontWeight:`400`,color:`var(--cm-reactive-reference-color-dark)`,borderBottom:`2px solid var(--cm-reactive-reference-border-color)`},".mo-cm-reactive-reference-hover":{cursor:`pointer`}})],z=[L({variant:`light`,settings:{background:`#ffffff`,foreground:`#000000`,caret:`#000000`,selection:`var(--cm-selection-background)`,lineHighlight:`#cceeff44`,gutterBackground:`var(--color-background)`,gutterForeground:`var(--gray-10)`},styles:[{tag:h.comment,color:`var(--cm-comment)`},{tag:h.variableName,color:`#000000`},{tag:[h.string,h.special(h.brace)],color:`#a11`},{tag:h.number,color:`#164`},{tag:h.bool,color:`#219`},{tag:h.null,color:`#219`},{tag:h.keyword,color:`#708`,fontWeight:500},{tag:h.className,color:`#00f`},{tag:h.definition(h.typeName),color:`#00f`},{tag:h.typeName,color:`#085`},{tag:h.angleBracket,color:`#000000`},{tag:h.tagName,color:`#170`},{tag:h.attributeName,color:`#00c`},{tag:h.operator,color:`#a2f`,fontWeight:500},{tag:[h.function(h.variableName)],color:`#00c`},{tag:[h.propertyName],color:`#05a`}]}),v.theme({"&":{"--cm-selection-background":`var(--cm-selection-background-light)`},".mo-cm-reactive-reference":{fontWeight:`400`,color:`var(--cm-reactive-reference-color-light)`,borderBottom:`2px solid var(--cm-reactive-reference-border-color)`},".mo-cm-reactive-reference-hover":{cursor:`pointer`}})],B=u(),V=[a(),v.lineWrapping],H=[y(),v.lineWrapping],U=[w(),v.lineWrapping];function W(e){switch(e){case`sql`:return H;case`markdown`:return U;default:return V}}var G=(0,F.memo)(e=>{let t=(0,I.c)(39),{theme:n}=E(),r,i,a,o,s,c,u,d;t[0]===e?(r=t[1],i=t[2],a=t[3],o=t[4],s=t[5],c=t[6],u=t[7],d=t[8]):({code:i,className:r,initiallyHideCode:a,showHideCode:c,showCopyCode:u,insertNewCell:o,language:d,...s}=e,t[0]=e,t[1]=r,t[2]=i,t[3]=a,t[4]=o,t[5]=s,t[6]=c,t[7]=u,t[8]=d);let f=c===void 0||c,p=u===void 0||u,h=d===void 0?`python`:d,[_,v]=(0,F.useState)(!!a),y=n===`dark`?R:z,b;t[9]===Symbol.for(`react.memo_cache_sentinel`)?(b=m(g,{fallback:!0}),t[9]=b):b=t[9];let x;t[10]!==h||t[11]!==y?(x=[y,b,...W(h)],t[10]=h,t[11]=y,t[12]=x):x=t[12];let S=x,C;t[13]===r?C=t[14]:(C=l(`relative hover-actions-parent w-full overflow-hidden pb-1`,r),t[13]=r,t[14]=C);let w;t[15]!==i||t[16]!==p?(w=p&&(0,B.jsx)(K,{text:i}),t[15]=i,t[16]=p,t[17]=w):w=t[17];let T;t[18]!==i||t[19]!==o?(T=o&&(0,B.jsx)(J,{code:i}),t[18]=i,t[19]=o,t[20]=T):T=t[20];let D;t[21]!==_||t[22]!==f?(D=f&&(0,B.jsx)(q,{hidden:_,onClick:()=>v(Y)}),t[21]=_,t[22]=f,t[23]=D):D=t[23];let k;t[24]!==w||t[25]!==T||t[26]!==D?(k=(0,B.jsxs)(`div`,{className:`absolute top-0 right-0 my-1 mx-2 z-10 hover-action flex gap-2`,children:[w,T,D]}),t[24]=w,t[25]=T,t[26]=D,t[27]=k):k=t[27];let A=_&&`opacity-20 h-8 overflow-hidden`,j;t[28]===A?j=t[29]:(j=l(`cm`,A),t[28]=A,t[29]=j);let M;t[30]!==i||t[31]!==S||t[32]!==s||t[33]!==j?(M=(0,B.jsx)(O,{...s,className:j,theme:`none`,height:`100%`,editable:!1,extensions:S,value:i,readOnly:!0}),t[30]=i,t[31]=S,t[32]=s,t[33]=j,t[34]=M):M=t[34];let N;return t[35]!==k||t[36]!==M||t[37]!==C?(N=(0,B.jsxs)(`div`,{className:C,children:[k,M]}),t[35]=k,t[36]=M,t[37]=C,t[38]=N):N=t[38],N});G.displayName=`ReadonlyCode`;var K=e=>{let t=(0,I.c)(5),n;t[0]===e.text?n=t[1]:(n=f.stopPropagation(async()=>{await D(e.text),T({title:`Copied to clipboard`})}),t[0]=e.text,t[1]=n);let r=n,i;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(i=(0,B.jsx)(x,{size:14,strokeWidth:1.5}),t[2]=i):i=t[2];let a;return t[3]===r?a=t[4]:(a=(0,B.jsx)(d,{content:`Copy code`,usePortal:!1,children:(0,B.jsx)(p,{onClick:r,size:`xs`,className:`py-0`,variant:`secondary`,"aria-label":`Copy code`,children:i})}),t[3]=r,t[4]=a),a},q=e=>{let t=(0,I.c)(9),n=e.hidden?`Show code`:`Hide code`,r=e.hidden?`Show code`:`Hide code`,i;t[0]===e.hidden?i=t[1]:(i=e.hidden?(0,B.jsx)(o,{size:14,strokeWidth:1.5}):(0,B.jsx)(S,{size:14,strokeWidth:1.5}),t[0]=e.hidden,t[1]=i);let a;t[2]!==e.onClick||t[3]!==r||t[4]!==i?(a=(0,B.jsx)(p,{onClick:e.onClick,"aria-label":r,size:`xs`,className:`py-0`,variant:`secondary`,children:i}),t[2]=e.onClick,t[3]=r,t[4]=i,t[5]=a):a=t[5];let s;return t[6]!==n||t[7]!==a?(s=(0,B.jsx)(d,{content:n,usePortal:!1,children:a}),t[6]=n,t[7]=a,t[8]=s):s=t[8],s},J=e=>{let t=(0,I.c)(6),n=k(),r;t[0]!==n||t[1]!==e.code?(r=()=>{n(e.code)},t[0]=n,t[1]=e.code,t[2]=r):r=t[2];let i=r,a;t[3]===Symbol.for(`react.memo_cache_sentinel`)?(a=(0,B.jsx)(C,{size:14,strokeWidth:1.5}),t[3]=a):a=t[3];let o;return t[4]===i?o=t[5]:(o=(0,B.jsx)(d,{content:`Add code to notebook`,usePortal:!1,children:(0,B.jsx)(p,{onClick:i,size:`xs`,className:`py-0`,variant:`secondary`,"aria-label":`Add code to notebook`,children:a})}),t[4]=i,t[5]=o),o};function Y(e){return!e}export{P as a,A as c,N as i,z as n,M as o,R as r,j as s,G as t};
@@ -1 +1 @@
1
- import{l as e}from"./useEvent-xfs0Sn4r.js";import{t}from"./compiler-runtime-CYIjoINj.js";import{f as n,s as r}from"./useEventListener-D27Dii_l.js";import{g as i}from"./utils-R_pHe-RB.js";import{t as a}from"./cn-ldLVeaqm.js";import{t as o}from"./jsx-runtime-B74pBk57.js";import{l as s}from"./dropdown-menu-CqNabM1f.js";import{t as c}from"./tooltip-D7dq6bnc.js";import{t as l}from"./kbd-Cwh96ZBE.js";var u=t(),d=o();function f(e,t=!0){return(0,d.jsx)(p,{shortcut:e,includeName:t})}var p=t=>{let n=(0,u.c)(11),{shortcut:r,includeName:a}=t,o=a===void 0||a,s=e(i),c;n[0]!==s||n[1]!==r?(c=s.getHotkey(r),n[0]=s,n[1]=r,n[2]=c):c=n[2];let l=c,f;n[3]!==l.name||n[4]!==o?(f=o&&(0,d.jsx)(`span`,{className:`mr-2`,children:l.name}),n[3]=l.name,n[4]=o,n[5]=f):f=n[5];let p;n[6]===l.key?p=n[7]:(p=(0,d.jsx)(m,{shortcut:l.key}),n[6]=l.key,n[7]=p);let h;return n[8]!==f||n[9]!==p?(h=(0,d.jsxs)(`span`,{className:`inline-flex`,children:[f,p]}),n[8]=f,n[9]=p,n[10]=h):h=n[10],h},m=e=>{let t=(0,u.c)(10),{shortcut:n,className:i}=e;if(n===r||n===``){let e;return t[0]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,d.jsx)(`span`,{}),t[0]=e):e=t[0],e}let o,s;if(t[1]!==i||t[2]!==n){let e=n.split(`-`);t[5]===i?o=t[6]:(o=a(`flex gap-1`,i),t[5]=i,t[6]=o),s=e.map(v).map(x),t[1]=i,t[2]=n,t[3]=o,t[4]=s}else o=t[3],s=t[4];let c;return t[7]!==o||t[8]!==s?(c=(0,d.jsx)(`div`,{className:o,children:s}),t[7]=o,t[8]=s,t[9]=c):c=t[9],c};function h(e){return(0,d.jsx)(g,{shortcut:e})}var g=t=>{let n=(0,u.c)(6),{className:r,shortcut:a}=t,o=e(i),s;n[0]!==o||n[1]!==a?(s=o.getHotkey(a),n[0]=o,n[1]=a,n[2]=s):s=n[2];let c=s,l;return n[3]!==r||n[4]!==c.key?(l=(0,d.jsx)(_,{shortcut:c.key,className:r}),n[3]=r,n[4]=c.key,n[5]=l):l=n[5],l},_=e=>{let t=(0,u.c)(12),{shortcut:n,className:i}=e;if(n===r||n===``){let e;return t[0]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,d.jsx)(`span`,{}),t[0]=e):e=t[0],e}let o,c,l;if(t[1]!==i||t[2]!==n){let e=n.split(`-`);o=s,t[6]===i?c=t[7]:(c=a(`flex gap-1 items-center`,i),t[6]=i,t[7]=c),l=e.map(v).map(S),t[1]=i,t[2]=n,t[3]=o,t[4]=c,t[5]=l}else o=t[3],c=t[4],l=t[5];let f;return t[8]!==o||t[9]!==c||t[10]!==l?(f=(0,d.jsx)(o,{className:c,children:l}),t[8]=o,t[9]=c,t[10]=l,t[11]=f):f=t[11],f};function v(e){let t=n()?`mac`:`default`,r=e.toLowerCase(),i=y[e.toLowerCase()];if(i){let e=i.symbols[t]||i.symbols.default;return[i.label,e]}return[r]}var y={ctrl:{symbols:{mac:`⌃`,default:`Ctrl`},label:`Control`},control:{symbols:{mac:`⌃`,default:`Ctrl`},label:`Control`},shift:{symbols:{mac:`⇧`,default:`Shift`},label:`Shift`},alt:{symbols:{mac:`⌥`,default:`Alt`},label:`Alt/Option`},escape:{symbols:{mac:`⎋`,default:`Esc`},label:`Escape`},arrowup:{symbols:{default:`↑`},label:`Arrow Up`},arrowdown:{symbols:{default:`↓`},label:`Arrow Down`},arrowleft:{symbols:{default:`←`},label:`Arrow Left`},arrowright:{symbols:{default:`→`},label:`Arrow Right`},backspace:{symbols:{mac:`⌫`,default:`⟵`},label:`Backspace`},tab:{symbols:{mac:`⇥`,default:`⭾`},label:`Tab`},capslock:{symbols:{default:`⇪`},label:`Caps Lock`},fn:{symbols:{default:`Fn`},label:`Fn`},cmd:{symbols:{mac:`⌘`,windows:`⊞ Win`,default:`Command`},label:`Command`},insert:{symbols:{default:`Ins`},label:`Insert`},delete:{symbols:{mac:`⌦`,default:`Del`},label:`Delete`},home:{symbols:{mac:`↖`,default:`Home`},label:`Home`},end:{symbols:{mac:`↘`,default:`End`},label:`End`},mod:{symbols:{mac:`⌘`,windows:`⊞ Win`,default:`Ctrl`},label:`Control`}};function b(e){return e.charAt(0).toUpperCase()+e.slice(1)}function x(e){let[t,n]=e;return n?(0,d.jsx)(c,{asChild:!1,tabIndex:-1,content:t,delayDuration:300,children:(0,d.jsx)(l,{children:n},t)},t):(0,d.jsx)(l,{children:b(t)},t)}function S(e){let[t,n]=e;return n?(0,d.jsx)(c,{content:t,delayDuration:300,tabIndex:-1,children:(0,d.jsx)(`span`,{children:n},t)},t):(0,d.jsx)(`span`,{children:b(t)},t)}export{f as a,h as i,_ as n,g as r,m as t};
1
+ import{l as e}from"./useEvent-xfs0Sn4r.js";import{t}from"./compiler-runtime-CYIjoINj.js";import{g as n}from"./utils-CUZQNAWJ.js";import{f as r,s as i}from"./useEventListener-D27Dii_l.js";import{t as a}from"./cn-ldLVeaqm.js";import{t as o}from"./jsx-runtime-B74pBk57.js";import{l as s}from"./dropdown-menu-CqNabM1f.js";import{t as c}from"./tooltip-D7dq6bnc.js";import{t as l}from"./kbd-Cwh96ZBE.js";var u=t(),d=o();function f(e,t=!0){return(0,d.jsx)(p,{shortcut:e,includeName:t})}var p=t=>{let r=(0,u.c)(11),{shortcut:i,includeName:a}=t,o=a===void 0||a,s=e(n),c;r[0]!==s||r[1]!==i?(c=s.getHotkey(i),r[0]=s,r[1]=i,r[2]=c):c=r[2];let l=c,f;r[3]!==l.name||r[4]!==o?(f=o&&(0,d.jsx)(`span`,{className:`mr-2`,children:l.name}),r[3]=l.name,r[4]=o,r[5]=f):f=r[5];let p;r[6]===l.key?p=r[7]:(p=(0,d.jsx)(m,{shortcut:l.key}),r[6]=l.key,r[7]=p);let h;return r[8]!==f||r[9]!==p?(h=(0,d.jsxs)(`span`,{className:`inline-flex`,children:[f,p]}),r[8]=f,r[9]=p,r[10]=h):h=r[10],h},m=e=>{let t=(0,u.c)(10),{shortcut:n,className:r}=e;if(n===i||n===``){let e;return t[0]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,d.jsx)(`span`,{}),t[0]=e):e=t[0],e}let o,s;if(t[1]!==r||t[2]!==n){let e=n.split(`-`);t[5]===r?o=t[6]:(o=a(`flex gap-1`,r),t[5]=r,t[6]=o),s=e.map(v).map(x),t[1]=r,t[2]=n,t[3]=o,t[4]=s}else o=t[3],s=t[4];let c;return t[7]!==o||t[8]!==s?(c=(0,d.jsx)(`div`,{className:o,children:s}),t[7]=o,t[8]=s,t[9]=c):c=t[9],c};function h(e){return(0,d.jsx)(g,{shortcut:e})}var g=t=>{let r=(0,u.c)(6),{className:i,shortcut:a}=t,o=e(n),s;r[0]!==o||r[1]!==a?(s=o.getHotkey(a),r[0]=o,r[1]=a,r[2]=s):s=r[2];let c=s,l;return r[3]!==i||r[4]!==c.key?(l=(0,d.jsx)(_,{shortcut:c.key,className:i}),r[3]=i,r[4]=c.key,r[5]=l):l=r[5],l},_=e=>{let t=(0,u.c)(12),{shortcut:n,className:r}=e;if(n===i||n===``){let e;return t[0]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,d.jsx)(`span`,{}),t[0]=e):e=t[0],e}let o,c,l;if(t[1]!==r||t[2]!==n){let e=n.split(`-`);o=s,t[6]===r?c=t[7]:(c=a(`flex gap-1 items-center`,r),t[6]=r,t[7]=c),l=e.map(v).map(S),t[1]=r,t[2]=n,t[3]=o,t[4]=c,t[5]=l}else o=t[3],c=t[4],l=t[5];let f;return t[8]!==o||t[9]!==c||t[10]!==l?(f=(0,d.jsx)(o,{className:c,children:l}),t[8]=o,t[9]=c,t[10]=l,t[11]=f):f=t[11],f};function v(e){let t=r()?`mac`:`default`,n=e.toLowerCase(),i=y[e.toLowerCase()];if(i){let e=i.symbols[t]||i.symbols.default;return[i.label,e]}return[n]}var y={ctrl:{symbols:{mac:`⌃`,default:`Ctrl`},label:`Control`},control:{symbols:{mac:`⌃`,default:`Ctrl`},label:`Control`},shift:{symbols:{mac:`⇧`,default:`Shift`},label:`Shift`},alt:{symbols:{mac:`⌥`,default:`Alt`},label:`Alt/Option`},escape:{symbols:{mac:`⎋`,default:`Esc`},label:`Escape`},arrowup:{symbols:{default:`↑`},label:`Arrow Up`},arrowdown:{symbols:{default:`↓`},label:`Arrow Down`},arrowleft:{symbols:{default:`←`},label:`Arrow Left`},arrowright:{symbols:{default:`→`},label:`Arrow Right`},backspace:{symbols:{mac:`⌫`,default:`⟵`},label:`Backspace`},tab:{symbols:{mac:`⇥`,default:`⭾`},label:`Tab`},capslock:{symbols:{default:`⇪`},label:`Caps Lock`},fn:{symbols:{default:`Fn`},label:`Fn`},cmd:{symbols:{mac:`⌘`,windows:`⊞ Win`,default:`Command`},label:`Command`},insert:{symbols:{default:`Ins`},label:`Insert`},delete:{symbols:{mac:`⌦`,default:`Del`},label:`Delete`},home:{symbols:{mac:`↖`,default:`Home`},label:`Home`},end:{symbols:{mac:`↘`,default:`End`},label:`End`},mod:{symbols:{mac:`⌘`,windows:`⊞ Win`,default:`Ctrl`},label:`Control`}};function b(e){return e.charAt(0).toUpperCase()+e.slice(1)}function x(e){let[t,n]=e;return n?(0,d.jsx)(c,{asChild:!1,tabIndex:-1,content:t,delayDuration:300,children:(0,d.jsx)(l,{children:n},t)},t):(0,d.jsx)(l,{children:b(t)},t)}function S(e){let[t,n]=e;return n?(0,d.jsx)(c,{content:t,delayDuration:300,tabIndex:-1,children:(0,d.jsx)(`span`,{children:n},t)},t):(0,d.jsx)(`span`,{children:b(t)},t)}export{f as a,h as i,_ as n,g as r,m as t};
@@ -1,4 +1,4 @@
1
- import{g as e}from"./chunk-NSK5VX7P-CF0xJC4h.js";import{n as t,t as n}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{t as r}from"./src-CAQsWNvA.js";import{H as i,K as a,U as o,a as s,b as c,v as l,w as u,x as d,y as f}from"./chunk-I66GZJ75-mACCwHgj.js";import"./chunk-W5SLKNZC-ASg9U-2L.js";import"./chunk-UBXNYLIW-DoU728rU.js";import"./chunk-4I5QYGJK-CRhC3ilJ.js";import"./chunk-WRU74C26-CWPrh85f.js";import"./chunk-QR6OTTB3-Bo5GoXIC.js";import"./chunk-7BUUIJ7U-Bb538aSH.js";import"./chunk-7Z6QIM7H-D1BVG1pf.js";import{r as p,t as m}from"./chunk-J7OUQ5F2-BYO9AUEf.js";import{t as h}from"./chunk-XXDRQBXY-Cf4IbxEQ.js";import{t as g}from"./chunk-KBJHAD2P-DQlXdMhe.js";var _=(function(){var e=t(function(e,t,n,r){for(n||={},r=e.length;r--;n[e[r]]=t);return n},`o`),n=[1,3],r=[1,4],i=[1,5],a=[1,6],o=[5,6,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,77,89,90],s=[1,22],c=[2,7],l=[1,26],u=[1,27],d=[1,28],f=[1,29],p=[1,33],m=[1,34],h=[1,35],g=[1,36],_=[1,37],v=[1,38],y=[1,24],b=[1,31],x=[1,32],S=[1,30],C=[1,39],w=[1,40],T=[5,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,77,89,90],E=[1,61],D=[89,90],O=[5,8,9,11,13,21,22,23,24,27,29,41,42,43,44,45,46,54,61,63,72,74,75,76,77,80,81,82,83,84,85,86,87,88,89,90],k=[27,29],ee=[1,70],A=[1,71],te=[1,72],ne=[1,73],re=[1,74],ie=[1,75],ae=[1,76],j=[1,83],M=[1,80],N=[1,84],P=[1,85],F=[1,86],I=[1,87],L=[1,88],R=[1,89],z=[1,90],B=[1,91],V=[1,92],oe=[5,8,9,11,13,21,22,23,24,27,41,42,43,44,45,46,54,72,74,75,76,77,80,81,82,83,84,85,86,87,88,89,90],H=[63,64],se=[1,101],ce=[5,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,76,77,89,90],U=[5,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,75,76,77,80,81,82,83,84,85,86,87,88,89,90],W=[1,110],G=[1,106],K=[1,107],q=[1,108],J=[1,109],Y=[1,111],X=[1,116],Z=[1,117],Q=[1,114],$=[1,115],le={trace:t(function(){},`trace`),yy:{},symbols_:{error:2,start:3,directive:4,NEWLINE:5,RD:6,diagram:7,EOF:8,acc_title:9,acc_title_value:10,acc_descr:11,acc_descr_value:12,acc_descr_multiline_value:13,requirementDef:14,elementDef:15,relationshipDef:16,direction:17,styleStatement:18,classDefStatement:19,classStatement:20,direction_tb:21,direction_bt:22,direction_rl:23,direction_lr:24,requirementType:25,requirementName:26,STRUCT_START:27,requirementBody:28,STYLE_SEPARATOR:29,idList:30,ID:31,COLONSEP:32,id:33,TEXT:34,text:35,RISK:36,riskLevel:37,VERIFYMTHD:38,verifyType:39,STRUCT_STOP:40,REQUIREMENT:41,FUNCTIONAL_REQUIREMENT:42,INTERFACE_REQUIREMENT:43,PERFORMANCE_REQUIREMENT:44,PHYSICAL_REQUIREMENT:45,DESIGN_CONSTRAINT:46,LOW_RISK:47,MED_RISK:48,HIGH_RISK:49,VERIFY_ANALYSIS:50,VERIFY_DEMONSTRATION:51,VERIFY_INSPECTION:52,VERIFY_TEST:53,ELEMENT:54,elementName:55,elementBody:56,TYPE:57,type:58,DOCREF:59,ref:60,END_ARROW_L:61,relationship:62,LINE:63,END_ARROW_R:64,CONTAINS:65,COPIES:66,DERIVES:67,SATISFIES:68,VERIFIES:69,REFINES:70,TRACES:71,CLASSDEF:72,stylesOpt:73,CLASS:74,ALPHA:75,COMMA:76,STYLE:77,style:78,styleComponent:79,NUM:80,COLON:81,UNIT:82,SPACE:83,BRKT:84,PCT:85,MINUS:86,LABEL:87,SEMICOLON:88,unqString:89,qString:90,$accept:0,$end:1},terminals_:{2:`error`,5:`NEWLINE`,6:`RD`,8:`EOF`,9:`acc_title`,10:`acc_title_value`,11:`acc_descr`,12:`acc_descr_value`,13:`acc_descr_multiline_value`,21:`direction_tb`,22:`direction_bt`,23:`direction_rl`,24:`direction_lr`,27:`STRUCT_START`,29:`STYLE_SEPARATOR`,31:`ID`,32:`COLONSEP`,34:`TEXT`,36:`RISK`,38:`VERIFYMTHD`,40:`STRUCT_STOP`,41:`REQUIREMENT`,42:`FUNCTIONAL_REQUIREMENT`,43:`INTERFACE_REQUIREMENT`,44:`PERFORMANCE_REQUIREMENT`,45:`PHYSICAL_REQUIREMENT`,46:`DESIGN_CONSTRAINT`,47:`LOW_RISK`,48:`MED_RISK`,49:`HIGH_RISK`,50:`VERIFY_ANALYSIS`,51:`VERIFY_DEMONSTRATION`,52:`VERIFY_INSPECTION`,53:`VERIFY_TEST`,54:`ELEMENT`,57:`TYPE`,59:`DOCREF`,61:`END_ARROW_L`,63:`LINE`,64:`END_ARROW_R`,65:`CONTAINS`,66:`COPIES`,67:`DERIVES`,68:`SATISFIES`,69:`VERIFIES`,70:`REFINES`,71:`TRACES`,72:`CLASSDEF`,74:`CLASS`,75:`ALPHA`,76:`COMMA`,77:`STYLE`,80:`NUM`,81:`COLON`,82:`UNIT`,83:`SPACE`,84:`BRKT`,85:`PCT`,86:`MINUS`,87:`LABEL`,88:`SEMICOLON`,89:`unqString`,90:`qString`},productions_:[0,[3,3],[3,2],[3,4],[4,2],[4,2],[4,1],[7,0],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[17,1],[17,1],[17,1],[17,1],[14,5],[14,7],[28,5],[28,5],[28,5],[28,5],[28,2],[28,1],[25,1],[25,1],[25,1],[25,1],[25,1],[25,1],[37,1],[37,1],[37,1],[39,1],[39,1],[39,1],[39,1],[15,5],[15,7],[56,5],[56,5],[56,2],[56,1],[16,5],[16,5],[62,1],[62,1],[62,1],[62,1],[62,1],[62,1],[62,1],[19,3],[20,3],[20,3],[30,1],[30,3],[30,1],[30,3],[18,3],[73,1],[73,3],[78,1],[78,2],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[26,1],[26,1],[33,1],[33,1],[35,1],[35,1],[55,1],[55,1],[58,1],[58,1],[60,1],[60,1]],performAction:t(function(e,t,n,r,i,a,o){var s=a.length-1;switch(i){case 4:this.$=a[s].trim(),r.setAccTitle(this.$);break;case 5:case 6:this.$=a[s].trim(),r.setAccDescription(this.$);break;case 7:this.$=[];break;case 17:r.setDirection(`TB`);break;case 18:r.setDirection(`BT`);break;case 19:r.setDirection(`RL`);break;case 20:r.setDirection(`LR`);break;case 21:r.addRequirement(a[s-3],a[s-4]);break;case 22:r.addRequirement(a[s-5],a[s-6]),r.setClass([a[s-5]],a[s-3]);break;case 23:r.setNewReqId(a[s-2]);break;case 24:r.setNewReqText(a[s-2]);break;case 25:r.setNewReqRisk(a[s-2]);break;case 26:r.setNewReqVerifyMethod(a[s-2]);break;case 29:this.$=r.RequirementType.REQUIREMENT;break;case 30:this.$=r.RequirementType.FUNCTIONAL_REQUIREMENT;break;case 31:this.$=r.RequirementType.INTERFACE_REQUIREMENT;break;case 32:this.$=r.RequirementType.PERFORMANCE_REQUIREMENT;break;case 33:this.$=r.RequirementType.PHYSICAL_REQUIREMENT;break;case 34:this.$=r.RequirementType.DESIGN_CONSTRAINT;break;case 35:this.$=r.RiskLevel.LOW_RISK;break;case 36:this.$=r.RiskLevel.MED_RISK;break;case 37:this.$=r.RiskLevel.HIGH_RISK;break;case 38:this.$=r.VerifyType.VERIFY_ANALYSIS;break;case 39:this.$=r.VerifyType.VERIFY_DEMONSTRATION;break;case 40:this.$=r.VerifyType.VERIFY_INSPECTION;break;case 41:this.$=r.VerifyType.VERIFY_TEST;break;case 42:r.addElement(a[s-3]);break;case 43:r.addElement(a[s-5]),r.setClass([a[s-5]],a[s-3]);break;case 44:r.setNewElementType(a[s-2]);break;case 45:r.setNewElementDocRef(a[s-2]);break;case 48:r.addRelationship(a[s-2],a[s],a[s-4]);break;case 49:r.addRelationship(a[s-2],a[s-4],a[s]);break;case 50:this.$=r.Relationships.CONTAINS;break;case 51:this.$=r.Relationships.COPIES;break;case 52:this.$=r.Relationships.DERIVES;break;case 53:this.$=r.Relationships.SATISFIES;break;case 54:this.$=r.Relationships.VERIFIES;break;case 55:this.$=r.Relationships.REFINES;break;case 56:this.$=r.Relationships.TRACES;break;case 57:this.$=a[s-2],r.defineClass(a[s-1],a[s]);break;case 58:r.setClass(a[s-1],a[s]);break;case 59:r.setClass([a[s-2]],a[s]);break;case 60:case 62:this.$=[a[s]];break;case 61:case 63:this.$=a[s-2].concat([a[s]]);break;case 64:this.$=a[s-2],r.setCssStyle(a[s-1],a[s]);break;case 65:this.$=[a[s]];break;case 66:a[s-2].push(a[s]),this.$=a[s-2];break;case 68:this.$=a[s-1]+a[s]}},`anonymous`),table:[{3:1,4:2,6:n,9:r,11:i,13:a},{1:[3]},{3:8,4:2,5:[1,7],6:n,9:r,11:i,13:a},{5:[1,9]},{10:[1,10]},{12:[1,11]},e(o,[2,6]),{3:12,4:2,6:n,9:r,11:i,13:a},{1:[2,2]},{4:17,5:s,7:13,8:c,9:r,11:i,13:a,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:l,22:u,23:d,24:f,25:23,33:25,41:p,42:m,43:h,44:g,45:_,46:v,54:y,72:b,74:x,77:S,89:C,90:w},e(o,[2,4]),e(o,[2,5]),{1:[2,1]},{8:[1,41]},{4:17,5:s,7:42,8:c,9:r,11:i,13:a,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:l,22:u,23:d,24:f,25:23,33:25,41:p,42:m,43:h,44:g,45:_,46:v,54:y,72:b,74:x,77:S,89:C,90:w},{4:17,5:s,7:43,8:c,9:r,11:i,13:a,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:l,22:u,23:d,24:f,25:23,33:25,41:p,42:m,43:h,44:g,45:_,46:v,54:y,72:b,74:x,77:S,89:C,90:w},{4:17,5:s,7:44,8:c,9:r,11:i,13:a,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:l,22:u,23:d,24:f,25:23,33:25,41:p,42:m,43:h,44:g,45:_,46:v,54:y,72:b,74:x,77:S,89:C,90:w},{4:17,5:s,7:45,8:c,9:r,11:i,13:a,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:l,22:u,23:d,24:f,25:23,33:25,41:p,42:m,43:h,44:g,45:_,46:v,54:y,72:b,74:x,77:S,89:C,90:w},{4:17,5:s,7:46,8:c,9:r,11:i,13:a,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:l,22:u,23:d,24:f,25:23,33:25,41:p,42:m,43:h,44:g,45:_,46:v,54:y,72:b,74:x,77:S,89:C,90:w},{4:17,5:s,7:47,8:c,9:r,11:i,13:a,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:l,22:u,23:d,24:f,25:23,33:25,41:p,42:m,43:h,44:g,45:_,46:v,54:y,72:b,74:x,77:S,89:C,90:w},{4:17,5:s,7:48,8:c,9:r,11:i,13:a,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:l,22:u,23:d,24:f,25:23,33:25,41:p,42:m,43:h,44:g,45:_,46:v,54:y,72:b,74:x,77:S,89:C,90:w},{4:17,5:s,7:49,8:c,9:r,11:i,13:a,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:l,22:u,23:d,24:f,25:23,33:25,41:p,42:m,43:h,44:g,45:_,46:v,54:y,72:b,74:x,77:S,89:C,90:w},{4:17,5:s,7:50,8:c,9:r,11:i,13:a,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:l,22:u,23:d,24:f,25:23,33:25,41:p,42:m,43:h,44:g,45:_,46:v,54:y,72:b,74:x,77:S,89:C,90:w},{26:51,89:[1,52],90:[1,53]},{55:54,89:[1,55],90:[1,56]},{29:[1,59],61:[1,57],63:[1,58]},e(T,[2,17]),e(T,[2,18]),e(T,[2,19]),e(T,[2,20]),{30:60,33:62,75:E,89:C,90:w},{30:63,33:62,75:E,89:C,90:w},{30:64,33:62,75:E,89:C,90:w},e(D,[2,29]),e(D,[2,30]),e(D,[2,31]),e(D,[2,32]),e(D,[2,33]),e(D,[2,34]),e(O,[2,81]),e(O,[2,82]),{1:[2,3]},{8:[2,8]},{8:[2,9]},{8:[2,10]},{8:[2,11]},{8:[2,12]},{8:[2,13]},{8:[2,14]},{8:[2,15]},{8:[2,16]},{27:[1,65],29:[1,66]},e(k,[2,79]),e(k,[2,80]),{27:[1,67],29:[1,68]},e(k,[2,85]),e(k,[2,86]),{62:69,65:ee,66:A,67:te,68:ne,69:re,70:ie,71:ae},{62:77,65:ee,66:A,67:te,68:ne,69:re,70:ie,71:ae},{30:78,33:62,75:E,89:C,90:w},{73:79,75:j,76:M,78:81,79:82,80:N,81:P,82:F,83:I,84:L,85:R,86:z,87:B,88:V},e(oe,[2,60]),e(oe,[2,62]),{73:93,75:j,76:M,78:81,79:82,80:N,81:P,82:F,83:I,84:L,85:R,86:z,87:B,88:V},{30:94,33:62,75:E,76:M,89:C,90:w},{5:[1,95]},{30:96,33:62,75:E,89:C,90:w},{5:[1,97]},{30:98,33:62,75:E,89:C,90:w},{63:[1,99]},e(H,[2,50]),e(H,[2,51]),e(H,[2,52]),e(H,[2,53]),e(H,[2,54]),e(H,[2,55]),e(H,[2,56]),{64:[1,100]},e(T,[2,59],{76:M}),e(T,[2,64],{76:se}),{33:103,75:[1,102],89:C,90:w},e(ce,[2,65],{79:104,75:j,80:N,81:P,82:F,83:I,84:L,85:R,86:z,87:B,88:V}),e(U,[2,67]),e(U,[2,69]),e(U,[2,70]),e(U,[2,71]),e(U,[2,72]),e(U,[2,73]),e(U,[2,74]),e(U,[2,75]),e(U,[2,76]),e(U,[2,77]),e(U,[2,78]),e(T,[2,57],{76:se}),e(T,[2,58],{76:M}),{5:W,28:105,31:G,34:K,36:q,38:J,40:Y},{27:[1,112],76:M},{5:X,40:Z,56:113,57:Q,59:$},{27:[1,118],76:M},{33:119,89:C,90:w},{33:120,89:C,90:w},{75:j,78:121,79:82,80:N,81:P,82:F,83:I,84:L,85:R,86:z,87:B,88:V},e(oe,[2,61]),e(oe,[2,63]),e(U,[2,68]),e(T,[2,21]),{32:[1,122]},{32:[1,123]},{32:[1,124]},{32:[1,125]},{5:W,28:126,31:G,34:K,36:q,38:J,40:Y},e(T,[2,28]),{5:[1,127]},e(T,[2,42]),{32:[1,128]},{32:[1,129]},{5:X,40:Z,56:130,57:Q,59:$},e(T,[2,47]),{5:[1,131]},e(T,[2,48]),e(T,[2,49]),e(ce,[2,66],{79:104,75:j,80:N,81:P,82:F,83:I,84:L,85:R,86:z,87:B,88:V}),{33:132,89:C,90:w},{35:133,89:[1,134],90:[1,135]},{37:136,47:[1,137],48:[1,138],49:[1,139]},{39:140,50:[1,141],51:[1,142],52:[1,143],53:[1,144]},e(T,[2,27]),{5:W,28:145,31:G,34:K,36:q,38:J,40:Y},{58:146,89:[1,147],90:[1,148]},{60:149,89:[1,150],90:[1,151]},e(T,[2,46]),{5:X,40:Z,56:152,57:Q,59:$},{5:[1,153]},{5:[1,154]},{5:[2,83]},{5:[2,84]},{5:[1,155]},{5:[2,35]},{5:[2,36]},{5:[2,37]},{5:[1,156]},{5:[2,38]},{5:[2,39]},{5:[2,40]},{5:[2,41]},e(T,[2,22]),{5:[1,157]},{5:[2,87]},{5:[2,88]},{5:[1,158]},{5:[2,89]},{5:[2,90]},e(T,[2,43]),{5:W,28:159,31:G,34:K,36:q,38:J,40:Y},{5:W,28:160,31:G,34:K,36:q,38:J,40:Y},{5:W,28:161,31:G,34:K,36:q,38:J,40:Y},{5:W,28:162,31:G,34:K,36:q,38:J,40:Y},{5:X,40:Z,56:163,57:Q,59:$},{5:X,40:Z,56:164,57:Q,59:$},e(T,[2,23]),e(T,[2,24]),e(T,[2,25]),e(T,[2,26]),e(T,[2,44]),e(T,[2,45])],defaultActions:{8:[2,2],12:[2,1],41:[2,3],42:[2,8],43:[2,9],44:[2,10],45:[2,11],46:[2,12],47:[2,13],48:[2,14],49:[2,15],50:[2,16],134:[2,83],135:[2,84],137:[2,35],138:[2,36],139:[2,37],141:[2,38],142:[2,39],143:[2,40],144:[2,41],147:[2,87],148:[2,88],150:[2,89],151:[2,90]},parseError:t(function(e,t){if(t.recoverable)this.trace(e);else{var n=Error(e);throw n.hash=t,n}},`parseError`),parse:t(function(e){var n=this,r=[0],i=[],a=[null],o=[],s=this.table,c=``,l=0,u=0,d=0,f=2,p=1,m=o.slice.call(arguments,1),h=Object.create(this.lexer),g={yy:{}};for(var _ in this.yy)Object.prototype.hasOwnProperty.call(this.yy,_)&&(g.yy[_]=this.yy[_]);h.setInput(e,g.yy),g.yy.lexer=h,g.yy.parser=this,h.yylloc===void 0&&(h.yylloc={});var v=h.yylloc;o.push(v);var y=h.options&&h.options.ranges;this.parseError=typeof g.yy.parseError==`function`?g.yy.parseError:Object.getPrototypeOf(this).parseError;function b(e){r.length-=2*e,a.length-=e,o.length-=e}t(b,`popStack`);function x(){var e=i.pop()||h.lex()||p;return typeof e!=`number`&&(e instanceof Array&&(i=e,e=i.pop()),e=n.symbols_[e]||e),e}t(x,`lex`);for(var S,C,w,T,E,D={},O,k,ee,A;;){if(w=r[r.length-1],this.defaultActions[w]?T=this.defaultActions[w]:(S??=x(),T=s[w]&&s[w][S]),T===void 0||!T.length||!T[0]){var te=``;for(O in A=[],s[w])this.terminals_[O]&&O>f&&A.push(`'`+this.terminals_[O]+`'`);te=h.showPosition?`Parse error on line `+(l+1)+`:
1
+ import{g as e}from"./chunk-NSK5VX7P-CF0xJC4h.js";import{n as t,t as n}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{t as r}from"./src-CAQsWNvA.js";import{H as i,K as a,U as o,a as s,b as c,v as l,w as u,x as d,y as f}from"./chunk-I66GZJ75-mACCwHgj.js";import"./chunk-W5SLKNZC-ASg9U-2L.js";import"./chunk-UBXNYLIW-DoU728rU.js";import"./chunk-4I5QYGJK-CRhC3ilJ.js";import"./chunk-WRU74C26-CWPrh85f.js";import"./chunk-QR6OTTB3-Bo5GoXIC.js";import"./chunk-7BUUIJ7U-Bb538aSH.js";import"./chunk-7Z6QIM7H-D1BVG1pf.js";import{r as p,t as m}from"./chunk-J7OUQ5F2-CO4p8tJJ.js";import{t as h}from"./chunk-XXDRQBXY-Cf4IbxEQ.js";import{t as g}from"./chunk-KBJHAD2P-DQlXdMhe.js";var _=(function(){var e=t(function(e,t,n,r){for(n||={},r=e.length;r--;n[e[r]]=t);return n},`o`),n=[1,3],r=[1,4],i=[1,5],a=[1,6],o=[5,6,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,77,89,90],s=[1,22],c=[2,7],l=[1,26],u=[1,27],d=[1,28],f=[1,29],p=[1,33],m=[1,34],h=[1,35],g=[1,36],_=[1,37],v=[1,38],y=[1,24],b=[1,31],x=[1,32],S=[1,30],C=[1,39],w=[1,40],T=[5,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,77,89,90],E=[1,61],D=[89,90],O=[5,8,9,11,13,21,22,23,24,27,29,41,42,43,44,45,46,54,61,63,72,74,75,76,77,80,81,82,83,84,85,86,87,88,89,90],k=[27,29],ee=[1,70],A=[1,71],te=[1,72],ne=[1,73],re=[1,74],ie=[1,75],ae=[1,76],j=[1,83],M=[1,80],N=[1,84],P=[1,85],F=[1,86],I=[1,87],L=[1,88],R=[1,89],z=[1,90],B=[1,91],V=[1,92],oe=[5,8,9,11,13,21,22,23,24,27,41,42,43,44,45,46,54,72,74,75,76,77,80,81,82,83,84,85,86,87,88,89,90],H=[63,64],se=[1,101],ce=[5,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,76,77,89,90],U=[5,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,75,76,77,80,81,82,83,84,85,86,87,88,89,90],W=[1,110],G=[1,106],K=[1,107],q=[1,108],J=[1,109],Y=[1,111],X=[1,116],Z=[1,117],Q=[1,114],$=[1,115],le={trace:t(function(){},`trace`),yy:{},symbols_:{error:2,start:3,directive:4,NEWLINE:5,RD:6,diagram:7,EOF:8,acc_title:9,acc_title_value:10,acc_descr:11,acc_descr_value:12,acc_descr_multiline_value:13,requirementDef:14,elementDef:15,relationshipDef:16,direction:17,styleStatement:18,classDefStatement:19,classStatement:20,direction_tb:21,direction_bt:22,direction_rl:23,direction_lr:24,requirementType:25,requirementName:26,STRUCT_START:27,requirementBody:28,STYLE_SEPARATOR:29,idList:30,ID:31,COLONSEP:32,id:33,TEXT:34,text:35,RISK:36,riskLevel:37,VERIFYMTHD:38,verifyType:39,STRUCT_STOP:40,REQUIREMENT:41,FUNCTIONAL_REQUIREMENT:42,INTERFACE_REQUIREMENT:43,PERFORMANCE_REQUIREMENT:44,PHYSICAL_REQUIREMENT:45,DESIGN_CONSTRAINT:46,LOW_RISK:47,MED_RISK:48,HIGH_RISK:49,VERIFY_ANALYSIS:50,VERIFY_DEMONSTRATION:51,VERIFY_INSPECTION:52,VERIFY_TEST:53,ELEMENT:54,elementName:55,elementBody:56,TYPE:57,type:58,DOCREF:59,ref:60,END_ARROW_L:61,relationship:62,LINE:63,END_ARROW_R:64,CONTAINS:65,COPIES:66,DERIVES:67,SATISFIES:68,VERIFIES:69,REFINES:70,TRACES:71,CLASSDEF:72,stylesOpt:73,CLASS:74,ALPHA:75,COMMA:76,STYLE:77,style:78,styleComponent:79,NUM:80,COLON:81,UNIT:82,SPACE:83,BRKT:84,PCT:85,MINUS:86,LABEL:87,SEMICOLON:88,unqString:89,qString:90,$accept:0,$end:1},terminals_:{2:`error`,5:`NEWLINE`,6:`RD`,8:`EOF`,9:`acc_title`,10:`acc_title_value`,11:`acc_descr`,12:`acc_descr_value`,13:`acc_descr_multiline_value`,21:`direction_tb`,22:`direction_bt`,23:`direction_rl`,24:`direction_lr`,27:`STRUCT_START`,29:`STYLE_SEPARATOR`,31:`ID`,32:`COLONSEP`,34:`TEXT`,36:`RISK`,38:`VERIFYMTHD`,40:`STRUCT_STOP`,41:`REQUIREMENT`,42:`FUNCTIONAL_REQUIREMENT`,43:`INTERFACE_REQUIREMENT`,44:`PERFORMANCE_REQUIREMENT`,45:`PHYSICAL_REQUIREMENT`,46:`DESIGN_CONSTRAINT`,47:`LOW_RISK`,48:`MED_RISK`,49:`HIGH_RISK`,50:`VERIFY_ANALYSIS`,51:`VERIFY_DEMONSTRATION`,52:`VERIFY_INSPECTION`,53:`VERIFY_TEST`,54:`ELEMENT`,57:`TYPE`,59:`DOCREF`,61:`END_ARROW_L`,63:`LINE`,64:`END_ARROW_R`,65:`CONTAINS`,66:`COPIES`,67:`DERIVES`,68:`SATISFIES`,69:`VERIFIES`,70:`REFINES`,71:`TRACES`,72:`CLASSDEF`,74:`CLASS`,75:`ALPHA`,76:`COMMA`,77:`STYLE`,80:`NUM`,81:`COLON`,82:`UNIT`,83:`SPACE`,84:`BRKT`,85:`PCT`,86:`MINUS`,87:`LABEL`,88:`SEMICOLON`,89:`unqString`,90:`qString`},productions_:[0,[3,3],[3,2],[3,4],[4,2],[4,2],[4,1],[7,0],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[17,1],[17,1],[17,1],[17,1],[14,5],[14,7],[28,5],[28,5],[28,5],[28,5],[28,2],[28,1],[25,1],[25,1],[25,1],[25,1],[25,1],[25,1],[37,1],[37,1],[37,1],[39,1],[39,1],[39,1],[39,1],[15,5],[15,7],[56,5],[56,5],[56,2],[56,1],[16,5],[16,5],[62,1],[62,1],[62,1],[62,1],[62,1],[62,1],[62,1],[19,3],[20,3],[20,3],[30,1],[30,3],[30,1],[30,3],[18,3],[73,1],[73,3],[78,1],[78,2],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[26,1],[26,1],[33,1],[33,1],[35,1],[35,1],[55,1],[55,1],[58,1],[58,1],[60,1],[60,1]],performAction:t(function(e,t,n,r,i,a,o){var s=a.length-1;switch(i){case 4:this.$=a[s].trim(),r.setAccTitle(this.$);break;case 5:case 6:this.$=a[s].trim(),r.setAccDescription(this.$);break;case 7:this.$=[];break;case 17:r.setDirection(`TB`);break;case 18:r.setDirection(`BT`);break;case 19:r.setDirection(`RL`);break;case 20:r.setDirection(`LR`);break;case 21:r.addRequirement(a[s-3],a[s-4]);break;case 22:r.addRequirement(a[s-5],a[s-6]),r.setClass([a[s-5]],a[s-3]);break;case 23:r.setNewReqId(a[s-2]);break;case 24:r.setNewReqText(a[s-2]);break;case 25:r.setNewReqRisk(a[s-2]);break;case 26:r.setNewReqVerifyMethod(a[s-2]);break;case 29:this.$=r.RequirementType.REQUIREMENT;break;case 30:this.$=r.RequirementType.FUNCTIONAL_REQUIREMENT;break;case 31:this.$=r.RequirementType.INTERFACE_REQUIREMENT;break;case 32:this.$=r.RequirementType.PERFORMANCE_REQUIREMENT;break;case 33:this.$=r.RequirementType.PHYSICAL_REQUIREMENT;break;case 34:this.$=r.RequirementType.DESIGN_CONSTRAINT;break;case 35:this.$=r.RiskLevel.LOW_RISK;break;case 36:this.$=r.RiskLevel.MED_RISK;break;case 37:this.$=r.RiskLevel.HIGH_RISK;break;case 38:this.$=r.VerifyType.VERIFY_ANALYSIS;break;case 39:this.$=r.VerifyType.VERIFY_DEMONSTRATION;break;case 40:this.$=r.VerifyType.VERIFY_INSPECTION;break;case 41:this.$=r.VerifyType.VERIFY_TEST;break;case 42:r.addElement(a[s-3]);break;case 43:r.addElement(a[s-5]),r.setClass([a[s-5]],a[s-3]);break;case 44:r.setNewElementType(a[s-2]);break;case 45:r.setNewElementDocRef(a[s-2]);break;case 48:r.addRelationship(a[s-2],a[s],a[s-4]);break;case 49:r.addRelationship(a[s-2],a[s-4],a[s]);break;case 50:this.$=r.Relationships.CONTAINS;break;case 51:this.$=r.Relationships.COPIES;break;case 52:this.$=r.Relationships.DERIVES;break;case 53:this.$=r.Relationships.SATISFIES;break;case 54:this.$=r.Relationships.VERIFIES;break;case 55:this.$=r.Relationships.REFINES;break;case 56:this.$=r.Relationships.TRACES;break;case 57:this.$=a[s-2],r.defineClass(a[s-1],a[s]);break;case 58:r.setClass(a[s-1],a[s]);break;case 59:r.setClass([a[s-2]],a[s]);break;case 60:case 62:this.$=[a[s]];break;case 61:case 63:this.$=a[s-2].concat([a[s]]);break;case 64:this.$=a[s-2],r.setCssStyle(a[s-1],a[s]);break;case 65:this.$=[a[s]];break;case 66:a[s-2].push(a[s]),this.$=a[s-2];break;case 68:this.$=a[s-1]+a[s]}},`anonymous`),table:[{3:1,4:2,6:n,9:r,11:i,13:a},{1:[3]},{3:8,4:2,5:[1,7],6:n,9:r,11:i,13:a},{5:[1,9]},{10:[1,10]},{12:[1,11]},e(o,[2,6]),{3:12,4:2,6:n,9:r,11:i,13:a},{1:[2,2]},{4:17,5:s,7:13,8:c,9:r,11:i,13:a,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:l,22:u,23:d,24:f,25:23,33:25,41:p,42:m,43:h,44:g,45:_,46:v,54:y,72:b,74:x,77:S,89:C,90:w},e(o,[2,4]),e(o,[2,5]),{1:[2,1]},{8:[1,41]},{4:17,5:s,7:42,8:c,9:r,11:i,13:a,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:l,22:u,23:d,24:f,25:23,33:25,41:p,42:m,43:h,44:g,45:_,46:v,54:y,72:b,74:x,77:S,89:C,90:w},{4:17,5:s,7:43,8:c,9:r,11:i,13:a,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:l,22:u,23:d,24:f,25:23,33:25,41:p,42:m,43:h,44:g,45:_,46:v,54:y,72:b,74:x,77:S,89:C,90:w},{4:17,5:s,7:44,8:c,9:r,11:i,13:a,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:l,22:u,23:d,24:f,25:23,33:25,41:p,42:m,43:h,44:g,45:_,46:v,54:y,72:b,74:x,77:S,89:C,90:w},{4:17,5:s,7:45,8:c,9:r,11:i,13:a,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:l,22:u,23:d,24:f,25:23,33:25,41:p,42:m,43:h,44:g,45:_,46:v,54:y,72:b,74:x,77:S,89:C,90:w},{4:17,5:s,7:46,8:c,9:r,11:i,13:a,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:l,22:u,23:d,24:f,25:23,33:25,41:p,42:m,43:h,44:g,45:_,46:v,54:y,72:b,74:x,77:S,89:C,90:w},{4:17,5:s,7:47,8:c,9:r,11:i,13:a,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:l,22:u,23:d,24:f,25:23,33:25,41:p,42:m,43:h,44:g,45:_,46:v,54:y,72:b,74:x,77:S,89:C,90:w},{4:17,5:s,7:48,8:c,9:r,11:i,13:a,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:l,22:u,23:d,24:f,25:23,33:25,41:p,42:m,43:h,44:g,45:_,46:v,54:y,72:b,74:x,77:S,89:C,90:w},{4:17,5:s,7:49,8:c,9:r,11:i,13:a,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:l,22:u,23:d,24:f,25:23,33:25,41:p,42:m,43:h,44:g,45:_,46:v,54:y,72:b,74:x,77:S,89:C,90:w},{4:17,5:s,7:50,8:c,9:r,11:i,13:a,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:l,22:u,23:d,24:f,25:23,33:25,41:p,42:m,43:h,44:g,45:_,46:v,54:y,72:b,74:x,77:S,89:C,90:w},{26:51,89:[1,52],90:[1,53]},{55:54,89:[1,55],90:[1,56]},{29:[1,59],61:[1,57],63:[1,58]},e(T,[2,17]),e(T,[2,18]),e(T,[2,19]),e(T,[2,20]),{30:60,33:62,75:E,89:C,90:w},{30:63,33:62,75:E,89:C,90:w},{30:64,33:62,75:E,89:C,90:w},e(D,[2,29]),e(D,[2,30]),e(D,[2,31]),e(D,[2,32]),e(D,[2,33]),e(D,[2,34]),e(O,[2,81]),e(O,[2,82]),{1:[2,3]},{8:[2,8]},{8:[2,9]},{8:[2,10]},{8:[2,11]},{8:[2,12]},{8:[2,13]},{8:[2,14]},{8:[2,15]},{8:[2,16]},{27:[1,65],29:[1,66]},e(k,[2,79]),e(k,[2,80]),{27:[1,67],29:[1,68]},e(k,[2,85]),e(k,[2,86]),{62:69,65:ee,66:A,67:te,68:ne,69:re,70:ie,71:ae},{62:77,65:ee,66:A,67:te,68:ne,69:re,70:ie,71:ae},{30:78,33:62,75:E,89:C,90:w},{73:79,75:j,76:M,78:81,79:82,80:N,81:P,82:F,83:I,84:L,85:R,86:z,87:B,88:V},e(oe,[2,60]),e(oe,[2,62]),{73:93,75:j,76:M,78:81,79:82,80:N,81:P,82:F,83:I,84:L,85:R,86:z,87:B,88:V},{30:94,33:62,75:E,76:M,89:C,90:w},{5:[1,95]},{30:96,33:62,75:E,89:C,90:w},{5:[1,97]},{30:98,33:62,75:E,89:C,90:w},{63:[1,99]},e(H,[2,50]),e(H,[2,51]),e(H,[2,52]),e(H,[2,53]),e(H,[2,54]),e(H,[2,55]),e(H,[2,56]),{64:[1,100]},e(T,[2,59],{76:M}),e(T,[2,64],{76:se}),{33:103,75:[1,102],89:C,90:w},e(ce,[2,65],{79:104,75:j,80:N,81:P,82:F,83:I,84:L,85:R,86:z,87:B,88:V}),e(U,[2,67]),e(U,[2,69]),e(U,[2,70]),e(U,[2,71]),e(U,[2,72]),e(U,[2,73]),e(U,[2,74]),e(U,[2,75]),e(U,[2,76]),e(U,[2,77]),e(U,[2,78]),e(T,[2,57],{76:se}),e(T,[2,58],{76:M}),{5:W,28:105,31:G,34:K,36:q,38:J,40:Y},{27:[1,112],76:M},{5:X,40:Z,56:113,57:Q,59:$},{27:[1,118],76:M},{33:119,89:C,90:w},{33:120,89:C,90:w},{75:j,78:121,79:82,80:N,81:P,82:F,83:I,84:L,85:R,86:z,87:B,88:V},e(oe,[2,61]),e(oe,[2,63]),e(U,[2,68]),e(T,[2,21]),{32:[1,122]},{32:[1,123]},{32:[1,124]},{32:[1,125]},{5:W,28:126,31:G,34:K,36:q,38:J,40:Y},e(T,[2,28]),{5:[1,127]},e(T,[2,42]),{32:[1,128]},{32:[1,129]},{5:X,40:Z,56:130,57:Q,59:$},e(T,[2,47]),{5:[1,131]},e(T,[2,48]),e(T,[2,49]),e(ce,[2,66],{79:104,75:j,80:N,81:P,82:F,83:I,84:L,85:R,86:z,87:B,88:V}),{33:132,89:C,90:w},{35:133,89:[1,134],90:[1,135]},{37:136,47:[1,137],48:[1,138],49:[1,139]},{39:140,50:[1,141],51:[1,142],52:[1,143],53:[1,144]},e(T,[2,27]),{5:W,28:145,31:G,34:K,36:q,38:J,40:Y},{58:146,89:[1,147],90:[1,148]},{60:149,89:[1,150],90:[1,151]},e(T,[2,46]),{5:X,40:Z,56:152,57:Q,59:$},{5:[1,153]},{5:[1,154]},{5:[2,83]},{5:[2,84]},{5:[1,155]},{5:[2,35]},{5:[2,36]},{5:[2,37]},{5:[1,156]},{5:[2,38]},{5:[2,39]},{5:[2,40]},{5:[2,41]},e(T,[2,22]),{5:[1,157]},{5:[2,87]},{5:[2,88]},{5:[1,158]},{5:[2,89]},{5:[2,90]},e(T,[2,43]),{5:W,28:159,31:G,34:K,36:q,38:J,40:Y},{5:W,28:160,31:G,34:K,36:q,38:J,40:Y},{5:W,28:161,31:G,34:K,36:q,38:J,40:Y},{5:W,28:162,31:G,34:K,36:q,38:J,40:Y},{5:X,40:Z,56:163,57:Q,59:$},{5:X,40:Z,56:164,57:Q,59:$},e(T,[2,23]),e(T,[2,24]),e(T,[2,25]),e(T,[2,26]),e(T,[2,44]),e(T,[2,45])],defaultActions:{8:[2,2],12:[2,1],41:[2,3],42:[2,8],43:[2,9],44:[2,10],45:[2,11],46:[2,12],47:[2,13],48:[2,14],49:[2,15],50:[2,16],134:[2,83],135:[2,84],137:[2,35],138:[2,36],139:[2,37],141:[2,38],142:[2,39],143:[2,40],144:[2,41],147:[2,87],148:[2,88],150:[2,89],151:[2,90]},parseError:t(function(e,t){if(t.recoverable)this.trace(e);else{var n=Error(e);throw n.hash=t,n}},`parseError`),parse:t(function(e){var n=this,r=[0],i=[],a=[null],o=[],s=this.table,c=``,l=0,u=0,d=0,f=2,p=1,m=o.slice.call(arguments,1),h=Object.create(this.lexer),g={yy:{}};for(var _ in this.yy)Object.prototype.hasOwnProperty.call(this.yy,_)&&(g.yy[_]=this.yy[_]);h.setInput(e,g.yy),g.yy.lexer=h,g.yy.parser=this,h.yylloc===void 0&&(h.yylloc={});var v=h.yylloc;o.push(v);var y=h.options&&h.options.ranges;this.parseError=typeof g.yy.parseError==`function`?g.yy.parseError:Object.getPrototypeOf(this).parseError;function b(e){r.length-=2*e,a.length-=e,o.length-=e}t(b,`popStack`);function x(){var e=i.pop()||h.lex()||p;return typeof e!=`number`&&(e instanceof Array&&(i=e,e=i.pop()),e=n.symbols_[e]||e),e}t(x,`lex`);for(var S,C,w,T,E,D={},O,k,ee,A;;){if(w=r[r.length-1],this.defaultActions[w]?T=this.defaultActions[w]:(S??=x(),T=s[w]&&s[w][S]),T===void 0||!T.length||!T[0]){var te=``;for(O in A=[],s[w])this.terminals_[O]&&O>f&&A.push(`'`+this.terminals_[O]+`'`);te=h.showPosition?`Parse error on line `+(l+1)+`:
2
2
  `+h.showPosition()+`
3
3
  Expecting `+A.join(`, `)+`, got '`+(this.terminals_[S]||S)+`'`:`Parse error on line `+(l+1)+`: Unexpected `+(S==p?`end of input`:`'`+(this.terminals_[S]||S)+`'`),this.parseError(te,{text:h.match,token:this.terminals_[S]||S,line:h.yylineno,loc:v,expected:A})}if(T[0]instanceof Array&&T.length>1)throw Error(`Parse Error: multiple actions possible at state: `+w+`, token: `+S);switch(T[0]){case 1:r.push(S),a.push(h.yytext),o.push(h.yylloc),r.push(T[1]),S=null,C?(S=C,C=null):(u=h.yyleng,c=h.yytext,l=h.yylineno,v=h.yylloc,d>0&&d--);break;case 2:if(k=this.productions_[T[1]][1],D.$=a[a.length-k],D._$={first_line:o[o.length-(k||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(k||1)].first_column,last_column:o[o.length-1].last_column},y&&(D._$.range=[o[o.length-(k||1)].range[0],o[o.length-1].range[1]]),E=this.performAction.apply(D,[c,u,l,g.yy,T[1],a,o].concat(m)),E!==void 0)return E;k&&(r=r.slice(0,-1*k*2),a=a.slice(0,-1*k),o=o.slice(0,-1*k)),r.push(this.productions_[T[1]][0]),a.push(D.$),o.push(D._$),ee=s[r[r.length-2]][r[r.length-1]],r.push(ee);break;case 3:return!0}}return!0},`parse`)};le.lexer=(function(){return{EOF:1,parseError:t(function(e,t){if(this.yy.parser)this.yy.parser.parseError(e,t);else throw Error(e)},`parseError`),setInput:t(function(e,t){return this.yy=t||this.yy||{},this._input=e,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match=``,this.conditionStack=[`INITIAL`],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},`setInput`),input:t(function(){var e=this._input[0];return this.yytext+=e,this.yyleng++,this.offset++,this.match+=e,this.matched+=e,e.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),e},`input`),unput:t(function(e){var t=e.length,n=e.split(/(?:\r\n?|\n)/g);this._input=e+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-t),this.offset-=t;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-t},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-t]),this.yyleng=this.yytext.length,this},`unput`),more:t(function(){return this._more=!0,this},`more`),reject:t(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError(`Lexical error on line `+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
4
4
  `+this.showPosition(),{text:``,token:null,line:this.yylineno});return this},`reject`),less:t(function(e){this.unput(this.match.slice(e))},`less`),pastInput:t(function(){var e=this.matched.substr(0,this.matched.length-this.match.length);return(e.length>20?`...`:``)+e.substr(-20).replace(/\n/g,``)},`pastInput`),upcomingInput:t(function(){var e=this.match;return e.length<20&&(e+=this._input.substr(0,20-e.length)),(e.substr(0,20)+(e.length>20?`...`:``)).replace(/\n/g,``)},`upcomingInput`),showPosition:t(function(){var e=this.pastInput(),t=Array(e.length+1).join(`-`);return e+this.upcomingInput()+`
@@ -1,4 +1,4 @@
1
- import{a as e}from"./rolldown-runtime-B0Z9INg1.js";import{l as t,t as n}from"./useEvent-xfs0Sn4r.js";import{t as r}from"./react-CBDbhulC.js";import{E as i,Na as a,Pa as o,Ra as s,Wt as c,st as l}from"./cells-DfJw5iuV.js";import{t as u}from"./compiler-runtime-CYIjoINj.js";import{g as d,t as f}from"./useEventListener-D27Dii_l.js";import{T as p,c as m,t as h}from"./utils-R_pHe-RB.js";import{O as g,v as _}from"./config-CUBl5qBg.js";import{t as v}from"./readonly-python-code-CQd3Bopx.js";import{t as y}from"./cn-ldLVeaqm.js";import{t as b}from"./jsx-runtime-B74pBk57.js";import{n as x}from"./fullscreen-0EEPR7uc.js";import{Nt as S}from"./JsonOutput-D0JlHn1Z.js";import{t as C}from"./tooltip-D7dq6bnc.js";import{r as w,t as T}from"./button-BMBznEru.js";import{t as E}from"./createLucideIcon-B7HeEoG2.js";import{g as D,h as O,l as k,u as A}from"./layout-iNJ-1JI2.js";import{a as j}from"./useNumberFormatter-DHJ9s6Vk.js";import{t as M}from"./code-CF0HKE9K.js";import{t as N}from"./eye-off-CFuPxa9F.js";import{n as ee,t as P}from"./cell-editor-D3YsOG7a.js";import{n as F,t as te}from"./RunButton-BDkLTxbY.js";import{r as ne}from"./useTheme-BRnykVDX.js";import{n as I}from"./useDebounce-Dulm61-t.js";import{t as re}from"./CellStatus-D6_pLs0B.js";import{i as ie}from"./useRunCells-BwYUZxV6.js";import{n as ae,r as oe,t as se}from"./react-resizable-panels.browser.esm-BSRAHC4P.js";import{t as ce}from"./readonly-code-display-Ce9Vb5Wf.js";/* empty css */var le=E(`sticky-note`,[[`path`,{d:`M21 9a2.4 2.4 0 0 0-.706-1.706l-3.588-3.588A2.4 2.4 0 0 0 15 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2z`,key:`1dfntj`}],[`path`,{d:`M15 3v5a1 1 0 0 0 1 1h5`,key:`6s6qgf`}]]),L=e(r(),1),R=u(),z=Object.defineProperty,ue=Object.defineProperties,de=Object.getOwnPropertyDescriptors,fe=Object.getOwnPropertySymbols,pe=Object.prototype.hasOwnProperty,me=Object.prototype.propertyIsEnumerable,he=(e,t,n)=>t in e?z(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,B=(e,t)=>{for(var n in t||={})pe.call(t,n)&&he(e,n,t[n]);if(fe)for(var n of fe(t))me.call(t,n)&&he(e,n,t[n]);return e},V=(e,t)=>ue(e,de(t)),ge=(e,t,n)=>he(e,typeof t==`symbol`?t:t+``,n),_e=(e,t,n)=>new Promise((r,i)=>{var a=e=>{try{s(n.next(e))}catch(e){i(e)}},o=e=>{try{s(n.throw(e))}catch(e){i(e)}},s=e=>e.done?r(e.value):Promise.resolve(e.value).then(a,o);s((n=n.apply(e,t)).next())}),ve=(e,t)=>{for(let n in t)e[n]=t[n];return e},H=(e,t)=>Array.from(e.querySelectorAll(t)),ye=(e,t,n)=>{n?e.classList.add(t):e.classList.remove(t)},be=e=>{if(typeof e==`string`){if(e===`null`)return null;if(e===`true`)return!0;if(e===`false`)return!1;if(e.match(/^-?[\d\.]+$/))return parseFloat(e)}return e},U=(e,t)=>{e.style.transform=t},xe=(e,t)=>{let n=e.matches||e.matchesSelector||e.msMatchesSelector;return!!(n&&n.call(e,t))},W=(e,t)=>{if(e&&typeof e.closest==`function`)return e.closest(t);for(;e;){if(xe(e,t))return e;e=e.parentElement}return null},Se=e=>{e||=document.documentElement;let t=e.requestFullscreen||e.webkitRequestFullscreen||e.webkitRequestFullScreen||e.mozRequestFullScreen||e.msRequestFullscreen;t&&t.apply(e)},Ce=(e,t,n,r=``)=>{let i=e.querySelectorAll(`.`+n);for(let t=0;t<i.length;t++){let n=i[t];if(n.parentNode===e)return n}let a=document.createElement(t);return a.className=n,a.innerHTML=r,e.appendChild(a),a},G=e=>{let t=document.createElement(`style`);return e&&e.length>0&&t.appendChild(document.createTextNode(e)),document.head.appendChild(t),t},we=()=>{let e={};location.search.replace(/[A-Z0-9]+?=([\w\.%-]*)/gi,t=>{let n=t.split(`=`).shift(),r=t.split(`=`).pop();return n&&r!==void 0&&(e[n]=r),t});for(let t in e){let n=e[t];e[t]=be(unescape(n))}return e.dependencies!==void 0&&delete e.dependencies,e},Te=(e,t=0)=>{if(e){let n,r=e.style.height;return e.style.height=`0px`,e.parentElement&&(e.parentElement.style.height=`auto`),n=t-(e.parentElement?.offsetHeight||0),e.style.height=r+`px`,e.parentElement&&e.parentElement.style.removeProperty(`height`),n}return t},Ee={mp4:`video/mp4`,m4a:`video/mp4`,ogv:`video/ogg`,mpeg:`video/mpeg`,webm:`video/webm`},De=(e=``)=>{let t=e.split(`.`).pop();return t?Ee[t]:void 0},Oe=(e=``)=>encodeURI(e).replace(/%5B/g,`[`).replace(/%5D/g,`]`).replace(/[!'()*]/g,e=>`%${e.charCodeAt(0).toString(16).toUpperCase()}`),ke=navigator.userAgent,Ae=/(iphone|ipod|ipad|android)/gi.test(ke)||navigator.platform===`MacIntel`&&navigator.maxTouchPoints>1,je=/android/gi.test(ke),Me=(function(e){if(e){var t=function(e){return[].slice.call(e)},n=0,r=1,i=2,a=3,o=[],s=null,c=`requestAnimationFrame`in e?function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{sync:!1};e.cancelAnimationFrame(s);var n=function(){return u(o.filter((function(e){return e.dirty&&e.active})))};if(t.sync)return n();s=e.requestAnimationFrame(n)}:function(){},l=function(e){return function(t){o.forEach((function(t){return t.dirty=e})),c(t)}},u=function(e){e.filter((function(e){return!e.styleComputed})).forEach((function(e){e.styleComputed=m(e)})),e.filter(h).forEach(g);var t=e.filter(p);t.forEach(f),t.forEach((function(e){g(e),d(e)})),t.forEach(_)},d=function(e){return e.dirty=n},f=function(e){e.availableWidth=e.element.parentNode.clientWidth,e.currentWidth=e.element.scrollWidth,e.previousFontSize=e.currentFontSize,e.currentFontSize=Math.min(Math.max(e.minSize,e.availableWidth/e.currentWidth*e.previousFontSize),e.maxSize),e.whiteSpace=e.multiLine&&e.currentFontSize===e.minSize?`normal`:`nowrap`},p=function(e){return e.dirty!==i||e.dirty===i&&e.element.parentNode.clientWidth!==e.availableWidth},m=function(t){var n=e.getComputedStyle(t.element,null);return t.currentFontSize=parseFloat(n.getPropertyValue(`font-size`)),t.display=n.getPropertyValue(`display`),t.whiteSpace=n.getPropertyValue(`white-space`),!0},h=function(e){var t=!1;return!e.preStyleTestCompleted&&(/inline-/.test(e.display)||(t=!0,e.display=`inline-block`),e.whiteSpace!==`nowrap`&&(t=!0,e.whiteSpace=`nowrap`),e.preStyleTestCompleted=!0,t)},g=function(e){e.element.style.whiteSpace=e.whiteSpace,e.element.style.display=e.display,e.element.style.fontSize=e.currentFontSize+`px`},_=function(e){e.element.dispatchEvent(new CustomEvent(`fit`,{detail:{oldValue:e.previousFontSize,newValue:e.currentFontSize,scaleFactor:e.currentFontSize/e.previousFontSize}}))},v=function(e,t){return function(n){e.dirty=t,e.active&&c(n)}},y=function(e){return function(){o=o.filter((function(t){return t.element!==e.element})),e.observeMutations&&e.observer.disconnect(),e.element.style.whiteSpace=e.originalStyle.whiteSpace,e.element.style.display=e.originalStyle.display,e.element.style.fontSize=e.originalStyle.fontSize}},b=function(e){return function(){e.active||(e.active=!0,c())}},x=function(e){return function(){return e.active=!1}},S=function(e){e.observeMutations&&(e.observer=new MutationObserver(v(e,r)),e.observer.observe(e.element,e.observeMutations))},C={minSize:16,maxSize:512,multiLine:!0,observeMutations:`MutationObserver`in e&&{subtree:!0,childList:!0,characterData:!0}},w=null,T=function(){e.clearTimeout(w),w=e.setTimeout(l(i),O.observeWindowDelay)},E=[`resize`,`orientationchange`];return Object.defineProperty(O,"observeWindow",{set:function(t){var n=`${t?`add`:`remove`}EventListener`;E.forEach((function(t){e[n](t,T)}))}}),O.observeWindow=!0,O.observeWindowDelay=100,O.fitAll=l(a),O}function D(e,t){var n=Object.assign({},C,t),r=e.map((function(e){var t=Object.assign({},n,{element:e,active:!0});return(function(e){e.originalStyle={whiteSpace:e.element.style.whiteSpace,display:e.element.style.display,fontSize:e.element.style.fontSize},S(e),e.newbie=!0,e.dirty=!0,o.push(e)})(t),{element:e,fit:v(t,a),unfreeze:b(t),freeze:x(t),unsubscribe:y(t)}}));return c(),r}function O(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return typeof e==`string`?D(t(document.querySelectorAll(e)),n):D([e],n)[0]}})(typeof window>`u`?null:window),Ne=class{constructor(e){ge(this,`allowedToPlayAudio`,null),this.Reveal=e,this.startEmbeddedMedia=this.startEmbeddedMedia.bind(this),this.startEmbeddedIframe=this.startEmbeddedIframe.bind(this),this.preventIframeAutoFocus=this.preventIframeAutoFocus.bind(this),this.ensureMobileMediaPlaying=this.ensureMobileMediaPlaying.bind(this),this.failedAudioPlaybackTargets=new Set,this.failedVideoPlaybackTargets=new Set,this.failedMutedVideoPlaybackTargets=new Set,this.renderMediaPlayButton()}renderMediaPlayButton(){this.mediaPlayButton=document.createElement(`button`),this.mediaPlayButton.className=`r-overlay-button r-media-play-button`,this.mediaPlayButton.addEventListener(`click`,()=>{this.resetTemporarilyMutedMedia(),new Set([...this.failedAudioPlaybackTargets,...this.failedVideoPlaybackTargets,...this.failedMutedVideoPlaybackTargets]).forEach(e=>{this.startEmbeddedMedia({target:e})}),this.clearMediaPlaybackErrors()})}shouldPreload(e){if(this.Reveal.isScrollView())return!0;let t=this.Reveal.getConfig().preloadIframes;return typeof t!=`boolean`&&(t=e.hasAttribute(`data-preload`)),t}load(e,t={}){let n=this.Reveal.getConfig().display;if(n.includes(`!important`)){let t=n.replace(/\s*!important\s*$/,``).trim();e.style.setProperty(`display`,t,`important`)}else e.style.display=n;H(e,`img[data-src], video[data-src], audio[data-src], iframe[data-src]`).forEach(e=>{let t=e.tagName===`IFRAME`;(!t||this.shouldPreload(e))&&(e.setAttribute(`src`,e.getAttribute(`data-src`)),e.setAttribute(`data-lazy-loaded`,``),e.removeAttribute(`data-src`),t&&e.addEventListener(`load`,this.preventIframeAutoFocus))}),H(e,`video, audio`).forEach(e=>{let t=0;H(e,`source[data-src]`).forEach(e=>{e.setAttribute(`src`,e.getAttribute(`data-src`)),e.removeAttribute(`data-src`),e.setAttribute(`data-lazy-loaded`,``),t+=1}),Ae&&e.tagName===`VIDEO`&&e.setAttribute(`playsinline`,``),t>0&&e.load()});let r=e.slideBackgroundElement;if(r){r.style.display=`block`;let n=e.slideBackgroundContentElement,i=e.getAttribute(`data-background-iframe`);if(r.hasAttribute(`data-loaded`)===!1){r.setAttribute(`data-loaded`,`true`);let a=e.getAttribute(`data-background-image`),o=e.getAttribute(`data-background-video`),s=e.hasAttribute(`data-background-video-loop`),c=e.hasAttribute(`data-background-video-muted`);if(a)/^data:/.test(a.trim())?n.style.backgroundImage=`url(${a.trim()})`:n.style.backgroundImage=a.split(`,`).map(e=>`url(${Oe(decodeURI(e.trim()))})`).join(`,`);else if(o){let e=document.createElement(`video`);s&&e.setAttribute(`loop`,``),(c||this.Reveal.isSpeakerNotes())&&(e.muted=!0),Ae&&e.setAttribute(`playsinline`,``),o.split(`,`).forEach(t=>{let n=document.createElement(`source`);n.setAttribute(`src`,t);let r=De(t);r&&n.setAttribute(`type`,r),e.appendChild(n)}),n.appendChild(e)}else if(i&&t.excludeIframes!==!0){let e=document.createElement(`iframe`);e.setAttribute(`allowfullscreen`,``),e.setAttribute(`mozallowfullscreen`,``),e.setAttribute(`webkitallowfullscreen`,``),e.setAttribute(`allow`,`autoplay`),e.setAttribute(`data-src`,i),e.style.width=`100%`,e.style.height=`100%`,e.style.maxHeight=`100%`,e.style.maxWidth=`100%`,n.appendChild(e)}}let a=n.querySelector(`iframe[data-src]`);a&&this.shouldPreload(r)&&!/autoplay=(1|true|yes)/gi.test(i)&&a.getAttribute(`src`)!==i&&a.setAttribute(`src`,i)}this.layout(e)}layout(e){Array.from(e.querySelectorAll(`.r-fit-text`)).forEach(e=>{Me(e,{minSize:24,maxSize:this.Reveal.getConfig().height*.8,observeMutations:!1,observeWindow:!1})})}unload(e){e.style.display=`none`;let t=this.Reveal.getSlideBackground(e);t&&(t.style.display=`none`,H(t,`iframe[src]`).forEach(e=>{e.removeAttribute(`src`)})),H(e,`video[data-lazy-loaded][src], audio[data-lazy-loaded][src], iframe[data-lazy-loaded][src]`).forEach(e=>{e.setAttribute(`data-src`,e.getAttribute(`src`)),e.removeAttribute(`src`)}),H(e,`video[data-lazy-loaded] source[src], audio source[src]`).forEach(e=>{e.setAttribute(`data-src`,e.getAttribute(`src`)),e.removeAttribute(`src`)})}formatEmbeddedContent(){let e=(e,t,n)=>{H(this.Reveal.getSlidesElement(),`iframe[`+e+`*="`+t+`"]`).forEach(t=>{let r=t.getAttribute(e);r&&r.indexOf(n)===-1&&t.setAttribute(e,r+(/\?/.test(r)?`&`:`?`)+n)})};e(`src`,`youtube.com/embed/`,`enablejsapi=1`),e(`data-src`,`youtube.com/embed/`,`enablejsapi=1`),e(`src`,`player.vimeo.com/`,`api=1`),e(`data-src`,`player.vimeo.com/`,`api=1`)}startEmbeddedContent(e){if(e){let t=this.Reveal.isSpeakerNotes();H(e,`img[src$=".gif"]`).forEach(e=>{e.setAttribute(`src`,e.getAttribute(`src`))}),H(e,`video, audio`).forEach(e=>{if(W(e,`.fragment`)&&!W(e,`.fragment.visible`))return;let n=this.Reveal.getConfig().autoPlayMedia;if(typeof n!=`boolean`&&(n=e.hasAttribute(`data-autoplay`)||!!W(e,`.slide-background`)),n&&typeof e.play==`function`){if(t&&!e.muted)return;e.readyState>1?this.startEmbeddedMedia({target:e}):Ae?(e.addEventListener(`canplay`,this.ensureMobileMediaPlaying),this.playMediaElement(e)):(e.removeEventListener(`loadeddata`,this.startEmbeddedMedia),e.addEventListener(`loadeddata`,this.startEmbeddedMedia))}}),t||(H(e,`iframe[src]`).forEach(e=>{W(e,`.fragment`)&&!W(e,`.fragment.visible`)||this.startEmbeddedIframe({target:e})}),H(e,`iframe[data-src]`).forEach(e=>{W(e,`.fragment`)&&!W(e,`.fragment.visible`)||e.getAttribute(`src`)!==e.getAttribute(`data-src`)&&(e.removeEventListener(`load`,this.startEmbeddedIframe),e.addEventListener(`load`,this.startEmbeddedIframe),e.setAttribute(`src`,e.getAttribute(`data-src`)))}))}}ensureMobileMediaPlaying(e){let t=e.target;typeof t.getVideoPlaybackQuality==`function`&&setTimeout(()=>{let e=t.paused===!1,n=t.getVideoPlaybackQuality().totalVideoFrames;e&&n===0&&(t.load(),t.play())},1e3)}startEmbeddedMedia(e){let t=!!W(e.target,`html`),n=!!W(e.target,`.present`);t&&n&&(e.target.paused||e.target.ended)&&(e.target.currentTime=0,this.playMediaElement(e.target)),e.target.removeEventListener(`loadeddata`,this.startEmbeddedMedia)}playMediaElement(e){let t=e.play();t&&typeof t.catch==`function`&&t.then(()=>{e.muted||(this.allowedToPlayAudio=!0)}).catch(t=>{if(t.name===`NotAllowedError`){if(this.allowedToPlayAudio=!1,e.tagName===`VIDEO`){this.onVideoPlaybackNotAllowed(e);let t=!!W(e,`html`),n=!!W(e,`.present`),r=e.muted;t&&n&&!r&&(e.setAttribute(`data-muted-by-reveal`,`true`),e.muted=!0,e.play().catch(()=>{this.onMutedVideoPlaybackNotAllowed(e)}))}else e.tagName===`AUDIO`&&this.onAudioPlaybackNotAllowed(e)}})}startEmbeddedIframe(e){let t=e.target;if(this.preventIframeAutoFocus(e),t&&t.contentWindow){let n=!!W(e.target,`html`),r=!!W(e.target,`.present`);if(n&&r){let e=this.Reveal.getConfig().autoPlayMedia;typeof e!=`boolean`&&(e=t.hasAttribute(`data-autoplay`)||!!W(t,`.slide-background`)),/youtube\.com\/embed\//.test(t.getAttribute(`src`))&&e?t.contentWindow.postMessage(`{"event":"command","func":"playVideo","args":""}`,`*`):/player\.vimeo\.com\//.test(t.getAttribute(`src`))&&e?t.contentWindow.postMessage(`{"method":"play"}`,`*`):t.contentWindow.postMessage(`slide:start`,`*`)}}}stopEmbeddedContent(e,t={}){t=ve({unloadIframes:!0},t),e&&e.parentNode&&(H(e,`video, audio`).forEach(e=>{!e.hasAttribute(`data-ignore`)&&typeof e.pause==`function`&&(e.setAttribute(`data-paused-by-reveal`,``),e.pause(),Ae&&e.removeEventListener(`canplay`,this.ensureMobileMediaPlaying))}),H(e,`iframe`).forEach(e=>{e.contentWindow&&e.contentWindow.postMessage(`slide:stop`,`*`),e.removeEventListener(`load`,this.preventIframeAutoFocus),e.removeEventListener(`load`,this.startEmbeddedIframe)}),H(e,`iframe[src*="youtube.com/embed/"]`).forEach(e=>{!e.hasAttribute(`data-ignore`)&&e.contentWindow&&typeof e.contentWindow.postMessage==`function`&&e.contentWindow.postMessage(`{"event":"command","func":"pauseVideo","args":""}`,`*`)}),H(e,`iframe[src*="player.vimeo.com/"]`).forEach(e=>{!e.hasAttribute(`data-ignore`)&&e.contentWindow&&typeof e.contentWindow.postMessage==`function`&&e.contentWindow.postMessage(`{"method":"pause"}`,`*`)}),t.unloadIframes===!0&&H(e,`iframe[data-src]`).forEach(e=>{e.setAttribute(`src`,`about:blank`),e.removeAttribute(`src`)}))}isAllowedToPlayAudio(){return this.allowedToPlayAudio}showPlayOrUnmuteButton(){let e=this.failedAudioPlaybackTargets.size,t=this.failedVideoPlaybackTargets.size,n=this.failedMutedVideoPlaybackTargets.size,r=`Play media`;n>0?r=`Play video`:t>0?r=`Unmute video`:e>0&&(r=`Play audio`),this.mediaPlayButton.textContent=r,this.Reveal.getRevealElement().appendChild(this.mediaPlayButton)}onAudioPlaybackNotAllowed(e){this.failedAudioPlaybackTargets.add(e),this.showPlayOrUnmuteButton(e)}onVideoPlaybackNotAllowed(e){this.failedVideoPlaybackTargets.add(e),this.showPlayOrUnmuteButton()}onMutedVideoPlaybackNotAllowed(e){this.failedMutedVideoPlaybackTargets.add(e),this.showPlayOrUnmuteButton()}resetTemporarilyMutedMedia(){new Set([...this.failedAudioPlaybackTargets,...this.failedVideoPlaybackTargets,...this.failedMutedVideoPlaybackTargets]).forEach(e=>{e.hasAttribute(`data-muted-by-reveal`)&&(e.muted=!1,e.removeAttribute(`data-muted-by-reveal`))})}clearMediaPlaybackErrors(){this.resetTemporarilyMutedMedia(),this.failedAudioPlaybackTargets.clear(),this.failedVideoPlaybackTargets.clear(),this.failedMutedVideoPlaybackTargets.clear(),this.mediaPlayButton.remove()}preventIframeAutoFocus(e){let t=e.target;if(t&&this.Reveal.getConfig().preventIframeAutoFocus){let e=0,n=()=>{document.activeElement===t?document.activeElement.blur():e<1e3&&(e+=100,setTimeout(n,100))};setTimeout(n,100)}}afterSlideChanged(){this.clearMediaPlaybackErrors()}},Pe=`.slides section`,Fe=`.slides>section`,Ie=`.slides>section.present>section`,Le=`.backgrounds>.slide-background`,Re=/registerPlugin|registerKeyboardShortcut|addKeyBinding|addEventListener|showPreview/,ze=`h.v`,Be=`h/v`,Ve=`c`,He=`c/t`,Ue=class{constructor(e){this.Reveal=e}render(){this.element=document.createElement(`div`),this.element.className=`slide-number`,this.Reveal.getRevealElement().appendChild(this.element)}configure(e,t){let n=`none`;e.slideNumber&&!this.Reveal.isPrintView()&&(e.showSlideNumber===`all`||e.showSlideNumber===`speaker`&&this.Reveal.isSpeakerNotes())&&(n=`block`),this.element.style.display=n}update(){this.Reveal.getConfig().slideNumber&&this.element&&(this.element.innerHTML=this.getSlideNumber())}getSlideNumber(e=this.Reveal.getCurrentSlide()){let t=this.Reveal.getConfig(),n,r=ze;if(typeof t.slideNumber==`function`)n=t.slideNumber(e);else{typeof t.slideNumber==`string`&&(r=t.slideNumber),!/c/.test(r)&&this.Reveal.getHorizontalSlides().length===1&&(r=Ve);let i=e&&e.dataset.visibility===`uncounted`?0:1;switch(n=[],r){case Ve:n.push(this.Reveal.getSlidePastCount(e)+i);break;case He:n.push(this.Reveal.getSlidePastCount(e)+i,`/`,this.Reveal.getTotalSlides());break;default:let t=this.Reveal.getIndices(e);n.push(t.h+i);let a=r===Be?`/`:`.`;this.Reveal.isVerticalSlide(e)&&n.push(a,t.v+1)}}let i=`#`+this.Reveal.location.getHash(e);return this.formatNumber(n[0],n[1],n[2],i)}formatNumber(e,t,n,r=`#`+this.Reveal.location.getHash()){return typeof n==`number`&&!isNaN(n)?`<a href="${r}">
1
+ import{a as e}from"./rolldown-runtime-B0Z9INg1.js";import{l as t,t as n}from"./useEvent-xfs0Sn4r.js";import{t as r}from"./react-CBDbhulC.js";import{E as i,Na as a,Pa as o,Ra as s,Wt as c,st as l}from"./cells-v0dAmt79.js";import{t as u}from"./compiler-runtime-CYIjoINj.js";import{E as d,c as f,t as p}from"./utils-CUZQNAWJ.js";import{g as m,t as h}from"./useEventListener-D27Dii_l.js";import{O as g,v as _}from"./config-DaNyNpZL.js";import{t as v}from"./readonly-python-code-DyB_sdtx.js";import{t as y}from"./cn-ldLVeaqm.js";import{t as b}from"./jsx-runtime-B74pBk57.js";import{n as x}from"./fullscreen-0EEPR7uc.js";import{Nt as S}from"./JsonOutput-CucHb-Xd.js";import{t as C}from"./tooltip-D7dq6bnc.js";import{r as w,t as T}from"./button-BMBznEru.js";import{t as E}from"./createLucideIcon-B7HeEoG2.js";import{g as D,h as O,l as k,u as A}from"./layout-Dqce0OL2.js";import{a as j}from"./useNumberFormatter-DHJ9s6Vk.js";import{t as M}from"./code-CF0HKE9K.js";import{t as N}from"./eye-off-CFuPxa9F.js";import{n as ee,t as P}from"./cell-editor-CR6poe2J.js";import{n as F,t as te}from"./RunButton-B1OO4yPE.js";import{r as ne}from"./useTheme-D3zvxdF3.js";import{n as I}from"./useDebounce-Dulm61-t.js";import{t as re}from"./CellStatus-DeTZJKkI.js";import{i as ie}from"./useRunCells-CIALOcRX.js";import{n as ae,r as oe,t as se}from"./react-resizable-panels.browser.esm-BSRAHC4P.js";import{t as ce}from"./readonly-code-display-2N0THiJK.js";/* empty css */var le=E(`sticky-note`,[[`path`,{d:`M21 9a2.4 2.4 0 0 0-.706-1.706l-3.588-3.588A2.4 2.4 0 0 0 15 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2z`,key:`1dfntj`}],[`path`,{d:`M15 3v5a1 1 0 0 0 1 1h5`,key:`6s6qgf`}]]),L=e(r(),1),R=u(),z=Object.defineProperty,ue=Object.defineProperties,de=Object.getOwnPropertyDescriptors,fe=Object.getOwnPropertySymbols,pe=Object.prototype.hasOwnProperty,me=Object.prototype.propertyIsEnumerable,he=(e,t,n)=>t in e?z(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,B=(e,t)=>{for(var n in t||={})pe.call(t,n)&&he(e,n,t[n]);if(fe)for(var n of fe(t))me.call(t,n)&&he(e,n,t[n]);return e},V=(e,t)=>ue(e,de(t)),ge=(e,t,n)=>he(e,typeof t==`symbol`?t:t+``,n),_e=(e,t,n)=>new Promise((r,i)=>{var a=e=>{try{s(n.next(e))}catch(e){i(e)}},o=e=>{try{s(n.throw(e))}catch(e){i(e)}},s=e=>e.done?r(e.value):Promise.resolve(e.value).then(a,o);s((n=n.apply(e,t)).next())}),ve=(e,t)=>{for(let n in t)e[n]=t[n];return e},H=(e,t)=>Array.from(e.querySelectorAll(t)),ye=(e,t,n)=>{n?e.classList.add(t):e.classList.remove(t)},be=e=>{if(typeof e==`string`){if(e===`null`)return null;if(e===`true`)return!0;if(e===`false`)return!1;if(e.match(/^-?[\d\.]+$/))return parseFloat(e)}return e},U=(e,t)=>{e.style.transform=t},xe=(e,t)=>{let n=e.matches||e.matchesSelector||e.msMatchesSelector;return!!(n&&n.call(e,t))},W=(e,t)=>{if(e&&typeof e.closest==`function`)return e.closest(t);for(;e;){if(xe(e,t))return e;e=e.parentElement}return null},Se=e=>{e||=document.documentElement;let t=e.requestFullscreen||e.webkitRequestFullscreen||e.webkitRequestFullScreen||e.mozRequestFullScreen||e.msRequestFullscreen;t&&t.apply(e)},Ce=(e,t,n,r=``)=>{let i=e.querySelectorAll(`.`+n);for(let t=0;t<i.length;t++){let n=i[t];if(n.parentNode===e)return n}let a=document.createElement(t);return a.className=n,a.innerHTML=r,e.appendChild(a),a},G=e=>{let t=document.createElement(`style`);return e&&e.length>0&&t.appendChild(document.createTextNode(e)),document.head.appendChild(t),t},we=()=>{let e={};location.search.replace(/[A-Z0-9]+?=([\w\.%-]*)/gi,t=>{let n=t.split(`=`).shift(),r=t.split(`=`).pop();return n&&r!==void 0&&(e[n]=r),t});for(let t in e){let n=e[t];e[t]=be(unescape(n))}return e.dependencies!==void 0&&delete e.dependencies,e},Te=(e,t=0)=>{if(e){let n,r=e.style.height;return e.style.height=`0px`,e.parentElement&&(e.parentElement.style.height=`auto`),n=t-(e.parentElement?.offsetHeight||0),e.style.height=r+`px`,e.parentElement&&e.parentElement.style.removeProperty(`height`),n}return t},Ee={mp4:`video/mp4`,m4a:`video/mp4`,ogv:`video/ogg`,mpeg:`video/mpeg`,webm:`video/webm`},De=(e=``)=>{let t=e.split(`.`).pop();return t?Ee[t]:void 0},Oe=(e=``)=>encodeURI(e).replace(/%5B/g,`[`).replace(/%5D/g,`]`).replace(/[!'()*]/g,e=>`%${e.charCodeAt(0).toString(16).toUpperCase()}`),ke=navigator.userAgent,Ae=/(iphone|ipod|ipad|android)/gi.test(ke)||navigator.platform===`MacIntel`&&navigator.maxTouchPoints>1,je=/android/gi.test(ke),Me=(function(e){if(e){var t=function(e){return[].slice.call(e)},n=0,r=1,i=2,a=3,o=[],s=null,c=`requestAnimationFrame`in e?function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{sync:!1};e.cancelAnimationFrame(s);var n=function(){return u(o.filter((function(e){return e.dirty&&e.active})))};if(t.sync)return n();s=e.requestAnimationFrame(n)}:function(){},l=function(e){return function(t){o.forEach((function(t){return t.dirty=e})),c(t)}},u=function(e){e.filter((function(e){return!e.styleComputed})).forEach((function(e){e.styleComputed=m(e)})),e.filter(h).forEach(g);var t=e.filter(p);t.forEach(f),t.forEach((function(e){g(e),d(e)})),t.forEach(_)},d=function(e){return e.dirty=n},f=function(e){e.availableWidth=e.element.parentNode.clientWidth,e.currentWidth=e.element.scrollWidth,e.previousFontSize=e.currentFontSize,e.currentFontSize=Math.min(Math.max(e.minSize,e.availableWidth/e.currentWidth*e.previousFontSize),e.maxSize),e.whiteSpace=e.multiLine&&e.currentFontSize===e.minSize?`normal`:`nowrap`},p=function(e){return e.dirty!==i||e.dirty===i&&e.element.parentNode.clientWidth!==e.availableWidth},m=function(t){var n=e.getComputedStyle(t.element,null);return t.currentFontSize=parseFloat(n.getPropertyValue(`font-size`)),t.display=n.getPropertyValue(`display`),t.whiteSpace=n.getPropertyValue(`white-space`),!0},h=function(e){var t=!1;return!e.preStyleTestCompleted&&(/inline-/.test(e.display)||(t=!0,e.display=`inline-block`),e.whiteSpace!==`nowrap`&&(t=!0,e.whiteSpace=`nowrap`),e.preStyleTestCompleted=!0,t)},g=function(e){e.element.style.whiteSpace=e.whiteSpace,e.element.style.display=e.display,e.element.style.fontSize=e.currentFontSize+`px`},_=function(e){e.element.dispatchEvent(new CustomEvent(`fit`,{detail:{oldValue:e.previousFontSize,newValue:e.currentFontSize,scaleFactor:e.currentFontSize/e.previousFontSize}}))},v=function(e,t){return function(n){e.dirty=t,e.active&&c(n)}},y=function(e){return function(){o=o.filter((function(t){return t.element!==e.element})),e.observeMutations&&e.observer.disconnect(),e.element.style.whiteSpace=e.originalStyle.whiteSpace,e.element.style.display=e.originalStyle.display,e.element.style.fontSize=e.originalStyle.fontSize}},b=function(e){return function(){e.active||(e.active=!0,c())}},x=function(e){return function(){return e.active=!1}},S=function(e){e.observeMutations&&(e.observer=new MutationObserver(v(e,r)),e.observer.observe(e.element,e.observeMutations))},C={minSize:16,maxSize:512,multiLine:!0,observeMutations:`MutationObserver`in e&&{subtree:!0,childList:!0,characterData:!0}},w=null,T=function(){e.clearTimeout(w),w=e.setTimeout(l(i),O.observeWindowDelay)},E=[`resize`,`orientationchange`];return Object.defineProperty(O,"observeWindow",{set:function(t){var n=`${t?`add`:`remove`}EventListener`;E.forEach((function(t){e[n](t,T)}))}}),O.observeWindow=!0,O.observeWindowDelay=100,O.fitAll=l(a),O}function D(e,t){var n=Object.assign({},C,t),r=e.map((function(e){var t=Object.assign({},n,{element:e,active:!0});return(function(e){e.originalStyle={whiteSpace:e.element.style.whiteSpace,display:e.element.style.display,fontSize:e.element.style.fontSize},S(e),e.newbie=!0,e.dirty=!0,o.push(e)})(t),{element:e,fit:v(t,a),unfreeze:b(t),freeze:x(t),unsubscribe:y(t)}}));return c(),r}function O(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return typeof e==`string`?D(t(document.querySelectorAll(e)),n):D([e],n)[0]}})(typeof window>`u`?null:window),Ne=class{constructor(e){ge(this,`allowedToPlayAudio`,null),this.Reveal=e,this.startEmbeddedMedia=this.startEmbeddedMedia.bind(this),this.startEmbeddedIframe=this.startEmbeddedIframe.bind(this),this.preventIframeAutoFocus=this.preventIframeAutoFocus.bind(this),this.ensureMobileMediaPlaying=this.ensureMobileMediaPlaying.bind(this),this.failedAudioPlaybackTargets=new Set,this.failedVideoPlaybackTargets=new Set,this.failedMutedVideoPlaybackTargets=new Set,this.renderMediaPlayButton()}renderMediaPlayButton(){this.mediaPlayButton=document.createElement(`button`),this.mediaPlayButton.className=`r-overlay-button r-media-play-button`,this.mediaPlayButton.addEventListener(`click`,()=>{this.resetTemporarilyMutedMedia(),new Set([...this.failedAudioPlaybackTargets,...this.failedVideoPlaybackTargets,...this.failedMutedVideoPlaybackTargets]).forEach(e=>{this.startEmbeddedMedia({target:e})}),this.clearMediaPlaybackErrors()})}shouldPreload(e){if(this.Reveal.isScrollView())return!0;let t=this.Reveal.getConfig().preloadIframes;return typeof t!=`boolean`&&(t=e.hasAttribute(`data-preload`)),t}load(e,t={}){let n=this.Reveal.getConfig().display;if(n.includes(`!important`)){let t=n.replace(/\s*!important\s*$/,``).trim();e.style.setProperty(`display`,t,`important`)}else e.style.display=n;H(e,`img[data-src], video[data-src], audio[data-src], iframe[data-src]`).forEach(e=>{let t=e.tagName===`IFRAME`;(!t||this.shouldPreload(e))&&(e.setAttribute(`src`,e.getAttribute(`data-src`)),e.setAttribute(`data-lazy-loaded`,``),e.removeAttribute(`data-src`),t&&e.addEventListener(`load`,this.preventIframeAutoFocus))}),H(e,`video, audio`).forEach(e=>{let t=0;H(e,`source[data-src]`).forEach(e=>{e.setAttribute(`src`,e.getAttribute(`data-src`)),e.removeAttribute(`data-src`),e.setAttribute(`data-lazy-loaded`,``),t+=1}),Ae&&e.tagName===`VIDEO`&&e.setAttribute(`playsinline`,``),t>0&&e.load()});let r=e.slideBackgroundElement;if(r){r.style.display=`block`;let n=e.slideBackgroundContentElement,i=e.getAttribute(`data-background-iframe`);if(r.hasAttribute(`data-loaded`)===!1){r.setAttribute(`data-loaded`,`true`);let a=e.getAttribute(`data-background-image`),o=e.getAttribute(`data-background-video`),s=e.hasAttribute(`data-background-video-loop`),c=e.hasAttribute(`data-background-video-muted`);if(a)/^data:/.test(a.trim())?n.style.backgroundImage=`url(${a.trim()})`:n.style.backgroundImage=a.split(`,`).map(e=>`url(${Oe(decodeURI(e.trim()))})`).join(`,`);else if(o){let e=document.createElement(`video`);s&&e.setAttribute(`loop`,``),(c||this.Reveal.isSpeakerNotes())&&(e.muted=!0),Ae&&e.setAttribute(`playsinline`,``),o.split(`,`).forEach(t=>{let n=document.createElement(`source`);n.setAttribute(`src`,t);let r=De(t);r&&n.setAttribute(`type`,r),e.appendChild(n)}),n.appendChild(e)}else if(i&&t.excludeIframes!==!0){let e=document.createElement(`iframe`);e.setAttribute(`allowfullscreen`,``),e.setAttribute(`mozallowfullscreen`,``),e.setAttribute(`webkitallowfullscreen`,``),e.setAttribute(`allow`,`autoplay`),e.setAttribute(`data-src`,i),e.style.width=`100%`,e.style.height=`100%`,e.style.maxHeight=`100%`,e.style.maxWidth=`100%`,n.appendChild(e)}}let a=n.querySelector(`iframe[data-src]`);a&&this.shouldPreload(r)&&!/autoplay=(1|true|yes)/gi.test(i)&&a.getAttribute(`src`)!==i&&a.setAttribute(`src`,i)}this.layout(e)}layout(e){Array.from(e.querySelectorAll(`.r-fit-text`)).forEach(e=>{Me(e,{minSize:24,maxSize:this.Reveal.getConfig().height*.8,observeMutations:!1,observeWindow:!1})})}unload(e){e.style.display=`none`;let t=this.Reveal.getSlideBackground(e);t&&(t.style.display=`none`,H(t,`iframe[src]`).forEach(e=>{e.removeAttribute(`src`)})),H(e,`video[data-lazy-loaded][src], audio[data-lazy-loaded][src], iframe[data-lazy-loaded][src]`).forEach(e=>{e.setAttribute(`data-src`,e.getAttribute(`src`)),e.removeAttribute(`src`)}),H(e,`video[data-lazy-loaded] source[src], audio source[src]`).forEach(e=>{e.setAttribute(`data-src`,e.getAttribute(`src`)),e.removeAttribute(`src`)})}formatEmbeddedContent(){let e=(e,t,n)=>{H(this.Reveal.getSlidesElement(),`iframe[`+e+`*="`+t+`"]`).forEach(t=>{let r=t.getAttribute(e);r&&r.indexOf(n)===-1&&t.setAttribute(e,r+(/\?/.test(r)?`&`:`?`)+n)})};e(`src`,`youtube.com/embed/`,`enablejsapi=1`),e(`data-src`,`youtube.com/embed/`,`enablejsapi=1`),e(`src`,`player.vimeo.com/`,`api=1`),e(`data-src`,`player.vimeo.com/`,`api=1`)}startEmbeddedContent(e){if(e){let t=this.Reveal.isSpeakerNotes();H(e,`img[src$=".gif"]`).forEach(e=>{e.setAttribute(`src`,e.getAttribute(`src`))}),H(e,`video, audio`).forEach(e=>{if(W(e,`.fragment`)&&!W(e,`.fragment.visible`))return;let n=this.Reveal.getConfig().autoPlayMedia;if(typeof n!=`boolean`&&(n=e.hasAttribute(`data-autoplay`)||!!W(e,`.slide-background`)),n&&typeof e.play==`function`){if(t&&!e.muted)return;e.readyState>1?this.startEmbeddedMedia({target:e}):Ae?(e.addEventListener(`canplay`,this.ensureMobileMediaPlaying),this.playMediaElement(e)):(e.removeEventListener(`loadeddata`,this.startEmbeddedMedia),e.addEventListener(`loadeddata`,this.startEmbeddedMedia))}}),t||(H(e,`iframe[src]`).forEach(e=>{W(e,`.fragment`)&&!W(e,`.fragment.visible`)||this.startEmbeddedIframe({target:e})}),H(e,`iframe[data-src]`).forEach(e=>{W(e,`.fragment`)&&!W(e,`.fragment.visible`)||e.getAttribute(`src`)!==e.getAttribute(`data-src`)&&(e.removeEventListener(`load`,this.startEmbeddedIframe),e.addEventListener(`load`,this.startEmbeddedIframe),e.setAttribute(`src`,e.getAttribute(`data-src`)))}))}}ensureMobileMediaPlaying(e){let t=e.target;typeof t.getVideoPlaybackQuality==`function`&&setTimeout(()=>{let e=t.paused===!1,n=t.getVideoPlaybackQuality().totalVideoFrames;e&&n===0&&(t.load(),t.play())},1e3)}startEmbeddedMedia(e){let t=!!W(e.target,`html`),n=!!W(e.target,`.present`);t&&n&&(e.target.paused||e.target.ended)&&(e.target.currentTime=0,this.playMediaElement(e.target)),e.target.removeEventListener(`loadeddata`,this.startEmbeddedMedia)}playMediaElement(e){let t=e.play();t&&typeof t.catch==`function`&&t.then(()=>{e.muted||(this.allowedToPlayAudio=!0)}).catch(t=>{if(t.name===`NotAllowedError`){if(this.allowedToPlayAudio=!1,e.tagName===`VIDEO`){this.onVideoPlaybackNotAllowed(e);let t=!!W(e,`html`),n=!!W(e,`.present`),r=e.muted;t&&n&&!r&&(e.setAttribute(`data-muted-by-reveal`,`true`),e.muted=!0,e.play().catch(()=>{this.onMutedVideoPlaybackNotAllowed(e)}))}else e.tagName===`AUDIO`&&this.onAudioPlaybackNotAllowed(e)}})}startEmbeddedIframe(e){let t=e.target;if(this.preventIframeAutoFocus(e),t&&t.contentWindow){let n=!!W(e.target,`html`),r=!!W(e.target,`.present`);if(n&&r){let e=this.Reveal.getConfig().autoPlayMedia;typeof e!=`boolean`&&(e=t.hasAttribute(`data-autoplay`)||!!W(t,`.slide-background`)),/youtube\.com\/embed\//.test(t.getAttribute(`src`))&&e?t.contentWindow.postMessage(`{"event":"command","func":"playVideo","args":""}`,`*`):/player\.vimeo\.com\//.test(t.getAttribute(`src`))&&e?t.contentWindow.postMessage(`{"method":"play"}`,`*`):t.contentWindow.postMessage(`slide:start`,`*`)}}}stopEmbeddedContent(e,t={}){t=ve({unloadIframes:!0},t),e&&e.parentNode&&(H(e,`video, audio`).forEach(e=>{!e.hasAttribute(`data-ignore`)&&typeof e.pause==`function`&&(e.setAttribute(`data-paused-by-reveal`,``),e.pause(),Ae&&e.removeEventListener(`canplay`,this.ensureMobileMediaPlaying))}),H(e,`iframe`).forEach(e=>{e.contentWindow&&e.contentWindow.postMessage(`slide:stop`,`*`),e.removeEventListener(`load`,this.preventIframeAutoFocus),e.removeEventListener(`load`,this.startEmbeddedIframe)}),H(e,`iframe[src*="youtube.com/embed/"]`).forEach(e=>{!e.hasAttribute(`data-ignore`)&&e.contentWindow&&typeof e.contentWindow.postMessage==`function`&&e.contentWindow.postMessage(`{"event":"command","func":"pauseVideo","args":""}`,`*`)}),H(e,`iframe[src*="player.vimeo.com/"]`).forEach(e=>{!e.hasAttribute(`data-ignore`)&&e.contentWindow&&typeof e.contentWindow.postMessage==`function`&&e.contentWindow.postMessage(`{"method":"pause"}`,`*`)}),t.unloadIframes===!0&&H(e,`iframe[data-src]`).forEach(e=>{e.setAttribute(`src`,`about:blank`),e.removeAttribute(`src`)}))}isAllowedToPlayAudio(){return this.allowedToPlayAudio}showPlayOrUnmuteButton(){let e=this.failedAudioPlaybackTargets.size,t=this.failedVideoPlaybackTargets.size,n=this.failedMutedVideoPlaybackTargets.size,r=`Play media`;n>0?r=`Play video`:t>0?r=`Unmute video`:e>0&&(r=`Play audio`),this.mediaPlayButton.textContent=r,this.Reveal.getRevealElement().appendChild(this.mediaPlayButton)}onAudioPlaybackNotAllowed(e){this.failedAudioPlaybackTargets.add(e),this.showPlayOrUnmuteButton(e)}onVideoPlaybackNotAllowed(e){this.failedVideoPlaybackTargets.add(e),this.showPlayOrUnmuteButton()}onMutedVideoPlaybackNotAllowed(e){this.failedMutedVideoPlaybackTargets.add(e),this.showPlayOrUnmuteButton()}resetTemporarilyMutedMedia(){new Set([...this.failedAudioPlaybackTargets,...this.failedVideoPlaybackTargets,...this.failedMutedVideoPlaybackTargets]).forEach(e=>{e.hasAttribute(`data-muted-by-reveal`)&&(e.muted=!1,e.removeAttribute(`data-muted-by-reveal`))})}clearMediaPlaybackErrors(){this.resetTemporarilyMutedMedia(),this.failedAudioPlaybackTargets.clear(),this.failedVideoPlaybackTargets.clear(),this.failedMutedVideoPlaybackTargets.clear(),this.mediaPlayButton.remove()}preventIframeAutoFocus(e){let t=e.target;if(t&&this.Reveal.getConfig().preventIframeAutoFocus){let e=0,n=()=>{document.activeElement===t?document.activeElement.blur():e<1e3&&(e+=100,setTimeout(n,100))};setTimeout(n,100)}}afterSlideChanged(){this.clearMediaPlaybackErrors()}},Pe=`.slides section`,Fe=`.slides>section`,Ie=`.slides>section.present>section`,Le=`.backgrounds>.slide-background`,Re=/registerPlugin|registerKeyboardShortcut|addKeyBinding|addEventListener|showPreview/,ze=`h.v`,Be=`h/v`,Ve=`c`,He=`c/t`,Ue=class{constructor(e){this.Reveal=e}render(){this.element=document.createElement(`div`),this.element.className=`slide-number`,this.Reveal.getRevealElement().appendChild(this.element)}configure(e,t){let n=`none`;e.slideNumber&&!this.Reveal.isPrintView()&&(e.showSlideNumber===`all`||e.showSlideNumber===`speaker`&&this.Reveal.isSpeakerNotes())&&(n=`block`),this.element.style.display=n}update(){this.Reveal.getConfig().slideNumber&&this.element&&(this.element.innerHTML=this.getSlideNumber())}getSlideNumber(e=this.Reveal.getCurrentSlide()){let t=this.Reveal.getConfig(),n,r=ze;if(typeof t.slideNumber==`function`)n=t.slideNumber(e);else{typeof t.slideNumber==`string`&&(r=t.slideNumber),!/c/.test(r)&&this.Reveal.getHorizontalSlides().length===1&&(r=Ve);let i=e&&e.dataset.visibility===`uncounted`?0:1;switch(n=[],r){case Ve:n.push(this.Reveal.getSlidePastCount(e)+i);break;case He:n.push(this.Reveal.getSlidePastCount(e)+i,`/`,this.Reveal.getTotalSlides());break;default:let t=this.Reveal.getIndices(e);n.push(t.h+i);let a=r===Be?`/`:`.`;this.Reveal.isVerticalSlide(e)&&n.push(a,t.v+1)}}let i=`#`+this.Reveal.location.getHash(e);return this.formatNumber(n[0],n[1],n[2],i)}formatNumber(e,t,n,r=`#`+this.Reveal.location.getHash()){return typeof n==`number`&&!isNaN(n)?`<a href="${r}">
2
2
  <span class="slide-number-a">${e}</span>
3
3
  <span class="slide-number-delimiter">${t}</span>
4
4
  <span class="slide-number-b">${n}</span>
@@ -88,7 +88,7 @@ ${this.parser.parse(e)}</blockquote>
88
88
  ${e}</tr>
89
89
  `}tablecell(e){let t=this.parser.parseInline(e.tokens),n=e.header?`th`:`td`;return(e.align?`<${n} align="${e.align}">`:`<${n}>`)+t+`</${n}>
90
90
  `}strong({tokens:e}){return`<strong>${this.parser.parseInline(e)}</strong>`}em({tokens:e}){return`<em>${this.parser.parseInline(e)}</em>`}codespan({text:e}){return`<code>${Yn(e,!0)}</code>`}br(e){return`<br>`}del({tokens:e}){return`<del>${this.parser.parseInline(e)}</del>`}link({href:e,title:t,tokens:n}){let r=this.parser.parseInline(n),i=Xn(e);if(i===null)return r;e=i;let a=`<a href="`+e+`"`;return t&&(a+=` title="`+Yn(t)+`"`),a+=`>`+r+`</a>`,a}image({href:e,title:t,text:n,tokens:r}){r&&(n=this.parser.parseInline(r,this.parser.textRenderer));let i=Xn(e);if(i===null)return Yn(n);e=i;let a=`<img src="${e}" alt="${Yn(n)}"`;return t&&(a+=` title="${Yn(t)}"`),a+=`>`,a}text(e){return`tokens`in e&&e.tokens?this.parser.parseInline(e.tokens):`escaped`in e&&e.escaped?e.text:Yn(e.text)}},or=class{strong({text:e}){return e}em({text:e}){return e}codespan({text:e}){return e}del({text:e}){return e}html({text:e}){return e}text({text:e}){return e}link({text:e}){return``+e}image({text:e}){return``+e}br(){return``}checkbox({raw:e}){return e}},sr=class e{options;renderer;textRenderer;constructor(e){this.options=e||Lt,this.options.renderer=this.options.renderer||new ar,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new or}static parse(t,n){return new e(n).parse(t)}static parseInline(t,n){return new e(n).parseInline(t)}parse(e){this.renderer.parser=this;let t=``;for(let n=0;n<e.length;n++){let r=e[n];if(this.options.extensions?.renderers?.[r.type]){let e=r,n=this.options.extensions.renderers[e.type].call({parser:this},e);if(n!==!1||![`space`,`hr`,`heading`,`code`,`table`,`blockquote`,`list`,`html`,`def`,`paragraph`,`text`].includes(e.type)){t+=n||``;continue}}let i=r;switch(i.type){case`space`:t+=this.renderer.space(i);break;case`hr`:t+=this.renderer.hr(i);break;case`heading`:t+=this.renderer.heading(i);break;case`code`:t+=this.renderer.code(i);break;case`table`:t+=this.renderer.table(i);break;case`blockquote`:t+=this.renderer.blockquote(i);break;case`list`:t+=this.renderer.list(i);break;case`checkbox`:t+=this.renderer.checkbox(i);break;case`html`:t+=this.renderer.html(i);break;case`def`:t+=this.renderer.def(i);break;case`paragraph`:t+=this.renderer.paragraph(i);break;case`text`:t+=this.renderer.text(i);break;default:{let e=`Token with "`+i.type+`" type was not found.`;if(this.options.silent)return console.error(e),``;throw Error(e)}}}return t}parseInline(e,t=this.renderer){this.renderer.parser=this;let n=``;for(let r=0;r<e.length;r++){let i=e[r];if(this.options.extensions?.renderers?.[i.type]){let e=this.options.extensions.renderers[i.type].call({parser:this},i);if(e!==!1||![`escape`,`html`,`link`,`image`,`strong`,`em`,`codespan`,`br`,`del`,`text`].includes(i.type)){n+=e||``;continue}}let a=i;switch(a.type){case`escape`:n+=t.text(a);break;case`html`:n+=t.html(a);break;case`link`:n+=t.link(a);break;case`image`:n+=t.image(a);break;case`checkbox`:n+=t.checkbox(a);break;case`strong`:n+=t.strong(a);break;case`em`:n+=t.em(a);break;case`codespan`:n+=t.codespan(a);break;case`br`:n+=t.br(a);break;case`del`:n+=t.del(a);break;case`text`:n+=t.text(a);break;default:{let e=`Token with "`+a.type+`" type was not found.`;if(this.options.silent)return console.error(e),``;throw Error(e)}}}return n}},cr=class{options;block;constructor(e){this.options=e||Lt}static passThroughHooks=new Set([`preprocess`,`postprocess`,`processAllTokens`,`emStrongMask`]);static passThroughHooksRespectAsync=new Set([`preprocess`,`postprocess`,`processAllTokens`]);preprocess(e){return e}postprocess(e){return e}processAllTokens(e){return e}emStrongMask(e){return e}provideLexer(){return this.block?ir.lex:ir.lexInline}provideParser(){return this.block?sr.parse:sr.parseInline}},lr=new class{defaults=It();options=this.setOptions;parse=this.parseMarkdown(!0);parseInline=this.parseMarkdown(!1);Parser=sr;Renderer=ar;TextRenderer=or;Lexer=ir;Tokenizer=rr;Hooks=cr;constructor(...e){this.use(...e)}walkTokens(e,t){let n=[];for(let r of e)switch(n=n.concat(t.call(this,r)),r.type){case`table`:{let e=r;for(let r of e.header)n=n.concat(this.walkTokens(r.tokens,t));for(let r of e.rows)for(let e of r)n=n.concat(this.walkTokens(e.tokens,t));break}case`list`:{let e=r;n=n.concat(this.walkTokens(e.items,t));break}default:{let e=r;this.defaults.extensions?.childTokens?.[e.type]?this.defaults.extensions.childTokens[e.type].forEach(r=>{let i=e[r].flat(1/0);n=n.concat(this.walkTokens(i,t))}):e.tokens&&(n=n.concat(this.walkTokens(e.tokens,t)))}}return n}use(...e){let t=this.defaults.extensions||{renderers:{},childTokens:{}};return e.forEach(e=>{let n={...e};if(n.async=this.defaults.async||n.async||!1,e.extensions&&(e.extensions.forEach(e=>{if(!e.name)throw Error(`extension name required`);if(`renderer`in e){let n=t.renderers[e.name];n?t.renderers[e.name]=function(...t){let r=e.renderer.apply(this,t);return r===!1&&(r=n.apply(this,t)),r}:t.renderers[e.name]=e.renderer}if(`tokenizer`in e){if(!e.level||e.level!==`block`&&e.level!==`inline`)throw Error(`extension level must be 'block' or 'inline'`);let n=t[e.level];n?n.unshift(e.tokenizer):t[e.level]=[e.tokenizer],e.start&&(e.level===`block`?t.startBlock?t.startBlock.push(e.start):t.startBlock=[e.start]:e.level===`inline`&&(t.startInline?t.startInline.push(e.start):t.startInline=[e.start]))}`childTokens`in e&&e.childTokens&&(t.childTokens[e.name]=e.childTokens)}),n.extensions=t),e.renderer){let t=this.defaults.renderer||new ar(this.defaults);for(let n in e.renderer){if(!(n in t))throw Error(`renderer '${n}' does not exist`);if([`options`,`parser`].includes(n))continue;let r=n,i=e.renderer[r],a=t[r];t[r]=(...e)=>{let n=i.apply(t,e);return n===!1&&(n=a.apply(t,e)),n||``}}n.renderer=t}if(e.tokenizer){let t=this.defaults.tokenizer||new rr(this.defaults);for(let n in e.tokenizer){if(!(n in t))throw Error(`tokenizer '${n}' does not exist`);if([`options`,`rules`,`lexer`].includes(n))continue;let r=n,i=e.tokenizer[r],a=t[r];t[r]=(...e)=>{let n=i.apply(t,e);return n===!1&&(n=a.apply(t,e)),n}}n.tokenizer=t}if(e.hooks){let t=this.defaults.hooks||new cr;for(let n in e.hooks){if(!(n in t))throw Error(`hook '${n}' does not exist`);if([`options`,`block`].includes(n))continue;let r=n,i=e.hooks[r],a=t[r];t[r]=cr.passThroughHooks.has(n)?e=>{if(this.defaults.async&&cr.passThroughHooksRespectAsync.has(n))return(async()=>{let n=await i.call(t,e);return a.call(t,n)})();let r=i.call(t,e);return a.call(t,r)}:(...e)=>{if(this.defaults.async)return(async()=>{let n=await i.apply(t,e);return n===!1&&(n=await a.apply(t,e)),n})();let n=i.apply(t,e);return n===!1&&(n=a.apply(t,e)),n}}n.hooks=t}if(e.walkTokens){let t=this.defaults.walkTokens,r=e.walkTokens;n.walkTokens=function(e){let n=[];return n.push(r.call(this,e)),t&&(n=n.concat(t.call(this,e))),n}}this.defaults={...this.defaults,...n}}),this}setOptions(e){return this.defaults={...this.defaults,...e},this}lexer(e,t){return ir.lex(e,t??this.defaults)}parser(e,t){return sr.parse(e,t??this.defaults)}parseMarkdown(e){return(t,n)=>{let r={...n},i={...this.defaults,...r},a=this.onError(!!i.silent,!!i.async);if(this.defaults.async===!0&&r.async===!1)return a(Error(`marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise.`));if(typeof t>`u`||t===null)return a(Error(`marked(): input parameter is undefined or null`));if(typeof t!=`string`)return a(Error(`marked(): input parameter is of type `+Object.prototype.toString.call(t)+`, string expected`));if(i.hooks&&(i.hooks.options=i,i.hooks.block=e),i.async)return(async()=>{let n=i.hooks?await i.hooks.preprocess(t):t,r=await(i.hooks?await i.hooks.provideLexer():e?ir.lex:ir.lexInline)(n,i),a=i.hooks?await i.hooks.processAllTokens(r):r;i.walkTokens&&await Promise.all(this.walkTokens(a,i.walkTokens));let o=await(i.hooks?await i.hooks.provideParser():e?sr.parse:sr.parseInline)(a,i);return i.hooks?await i.hooks.postprocess(o):o})().catch(a);try{i.hooks&&(t=i.hooks.preprocess(t));let n=(i.hooks?i.hooks.provideLexer():e?ir.lex:ir.lexInline)(t,i);i.hooks&&(n=i.hooks.processAllTokens(n)),i.walkTokens&&this.walkTokens(n,i.walkTokens);let r=(i.hooks?i.hooks.provideParser():e?sr.parse:sr.parseInline)(n,i);return i.hooks&&(r=i.hooks.postprocess(r)),r}catch(e){return a(e)}}}onError(e,t){return n=>{if(n.message+=`
91
- Please report this to https://github.com/markedjs/marked.`,e){let e=`<p>An error occurred:</p><pre>`+Yn(n.message+``,!0)+`</pre>`;return t?Promise.resolve(e):e}if(t)return Promise.reject(n);throw n}}};function X(e,t){return lr.parse(e,t)}X.options=X.setOptions=function(e){return lr.setOptions(e),X.defaults=lr.defaults,Rt(X.defaults),X},X.getDefaults=It,X.defaults=Lt,X.use=function(...e){return lr.use(...e),X.defaults=lr.defaults,Rt(X.defaults),X},X.walkTokens=function(e,t){return lr.walkTokens(e,t)},X.parseInline=lr.parseInline,X.Parser=sr,X.parser=sr.parse,X.Renderer=ar,X.TextRenderer=or,X.Lexer=ir,X.lexer=ir.lex,X.Tokenizer=rr,X.Hooks=cr,X.parse=X,X.options,X.setOptions,X.use,X.walkTokens,X.parseInline,sr.parse,ir.lex;function ur(...e){return e.filter(Boolean).join(` `)}function dr(e,t){return e?t?{...e,...t}:e:t}function fr({animation:e,index:t,as:n,asChild:r,className:i,style:a,children:o}){let s=ur(`fragment`,e,i);if(r){let e;try{e=L.Children.only(o)}catch{throw Error(`Fragment with asChild expects exactly one React element child.`)}if(!(0,L.isValidElement)(e)||e.type===L.Fragment)throw Error(`Fragment with asChild expects exactly one non-Fragment React element child.`);let n={className:ur(e.props.className,s),style:dr(e.props.style,a)};return t!==void 0&&(n[`data-fragment-index`]=t),(0,L.cloneElement)(e,n)}return(0,q.jsx)(n??`span`,{className:s,style:a,"data-fragment-index":t,children:o})}var pr=8,mr=1;function hr(e){let{scrollHeight:t,clientHeight:n,scrollTop:r}=e;return t>n+mr&&r<=pr}function gr(e){let t=e.querySelector(`.fragment:not(.visible)`);return t?t.getBoundingClientRect().top-e.getBoundingClientRect().top+e.scrollTop:e.scrollHeight}function _r(e,t){let n=(0,R.c)(4),[r,i]=(0,L.useState)(!1),a,o;return n[0]!==t||n[1]!==e?(a=()=>{let n=e.current,r=t.current;if(!n||!r)return;let a=0,o=()=>{cancelAnimationFrame(a),a=requestAnimationFrame(()=>{i(hr({scrollHeight:gr(n),clientHeight:n.clientHeight,scrollTop:n.scrollTop}))})};o();let s=new ResizeObserver(o);s.observe(n),s.observe(r);let c=r.querySelector(`.fragment`)?new MutationObserver(o):null;return c?.observe(r,{subtree:!0,attributes:!0,attributeFilter:[`class`]}),n.addEventListener(`scroll`,o,{passive:!0}),()=>{cancelAnimationFrame(a),s.disconnect(),c?.disconnect(),n.removeEventListener(`scroll`,o)}},o=[e,t],n[0]=t,n[1]=e,n[2]=a,n[3]=o):(a=n[2],o=n[3]),(0,L.useEffect)(a,o),r}var vr=e=>{let t=(0,R.c)(6),{className:n}=e,r;t[0]===n?r=t[1]:(r=y(`pointer-events-none absolute inset-x-0 bottom-0 z-10 flex flex-col items-center`,`animate-in fade-in-0 duration-200`,n),t[0]=n,t[1]=r);let i;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(i=(0,q.jsx)(`div`,{className:`h-16 w-full bg-linear-to-t from-background via-background/80 to-transparent`}),t[2]=i):i=t[2];let a;t[3]===Symbol.for(`react.memo_cache_sentinel`)?(a=(0,q.jsxs)(`div`,{className:`absolute bottom-3 flex items-center gap-1 rounded-full border border-border/60 bg-background/90 px-2.5 py-1 text-xs text-muted-foreground shadow-sm backdrop-blur-sm`,children:[(0,q.jsx)(j,{className:`h-3.5 w-3.5`}),(0,q.jsx)(`span`,{children:`Scroll for more`})]}),t[3]=a):a=t[3];let o;return t[4]===r?o=t[5]:(o=(0,q.jsxs)(`div`,{className:r,"data-testid":`slide-scroll-hint`,"aria-hidden":!0,children:[i,a]}),t[4]=r,t[5]=o),o},yr=e=>{let t=(0,R.c)(10),{children:n,className:r}=e,i=(0,L.useRef)(null),a=(0,L.useRef)(null),o=_r(i,a),s;t[0]===r?s=t[1]:(s=y(`relative h-full w-full`,r),t[0]=r,t[1]=s);let c;t[2]===n?c=t[3]:(c=(0,q.jsx)(`div`,{ref:i,className:`h-full w-full overflow-auto`,"data-testid":`slide-scroll-container`,children:(0,q.jsx)(`div`,{ref:a,className:`flex w-full min-h-full`,children:n})}),t[2]=n,t[3]=c);let l;t[4]===o?l=t[5]:(l=o&&(0,q.jsx)(vr,{}),t[4]=o,t[5]=l);let u;return t[6]!==s||t[7]!==c||t[8]!==l?(u=(0,q.jsxs)(`div`,{className:s,children:[c,l]}),t[6]=s,t[7]=c,t[8]=l,t[9]=u):u=t[9],u};function br({cells:e,getType:t}){let n=[],r=null,i=null,a=()=>{let e={subslides:[]};return n.push(e),r=e,i=null,e},o=()=>{let e=r??a(),t={blocks:[]};return e.subslides.push(t),i=t,t},s=e=>{let t=i??o(),n={isFragment:e,cells:[]};return t.blocks.push(n),n};for(let n of e)switch(t(n)){case`skip`:break;case`slide`:a(),o(),s(!1).cells.push(n);break;case`sub-slide`:o(),s(!1).cells.push(n);break;case`fragment`:s(!0).cells.push(n)}return{stacks:n}}function xr({composition:e,cells:t,getId:n}){let r=new Map,i=new Map,a=new Map;for(let[e,r]of t.entries())a.set(n(r),e);return e.stacks.forEach((e,t)=>{e.subslides.forEach((e,o)=>{let s;for(let t of e.blocks){if(t.isFragment)break;let e=t.cells.at(-1);e&&(s=n(e))}if(s===void 0){let t=e.blocks[0]?.cells[0];t&&(s=n(t))}if(s!==void 0){let e=a.get(s);e!=null&&i.set(`${t},${o},-1`,e)}let c=-1;for(let s of e.blocks)if(s.isFragment){c++;for(let e of s.cells)r.set(n(e),{h:t,v:o,f:c});let e=s.cells.at(-1);if(e){let r=a.get(n(e));r!=null&&i.set(`${t},${o},${c}`,r)}}else for(let e of s.cells)r.set(n(e),{h:t,v:o,f:-1})})}),{cellToTarget:r,targetToCellIndex:i}}function Sr(e,t){let{h:n,v:r,f:i}=t;return e.get(`${n},${r},${i}`)??e.get(`${n},${r},-1`)}function Cr({start:e,stop:t,step:n,cells:r,cellToTarget:i,getId:a}){for(let o=e;o!==t;o+=n){let e=i.get(a(r[o]));if(e)return e}}function wr({activeIndex:e,cells:t,cellToTarget:n,getId:r}){if(e==null)return;let i=t[e];return i?n.get(r(i))||(Cr({start:e-1,stop:-1,step:-1,cells:t,cellToTarget:n,getId:r})??Cr({start:e+1,stop:t.length,step:1,cells:t,cellToTarget:n,getId:r})):void 0}function Tr(e,t){let n={h:t.h,v:t.v,f:t.f>=0?t.f:-1};return e.h===n.h&&e.v===n.v&&e.f===n.f?null:n}var Er=({cell:e})=>{let[r]=p(),{theme:u}=ne(),d=ie(e.id),f=t(_),h=i(),g=t(m),v=(0,L.useRef)(null),b=(0,L.useRef)(null),[x,S]=(0,L.useState)(),C=n(()=>{c({autoInstantiate:g,createNewCell:h.createNewCell})}),w=n(()=>void 0),T=r.display.cell_output,E=e.output!=null,O=s({executionTime:e.runElapsedTimeMs??e.lastExecutionTime,status:e.status,errored:e.errored,interrupted:e.interrupted,stopped:e.stopped}),A=a({edited:e.edited,interrupted:e.interrupted,staleInputs:e.staleInputs,disabled:e.config.disabled,status:e.status}),j=y(`marimo-cell`,`hover-actions-parent`,`interactive`,o({needsRun:A,errored:e.errored,stopped:e.stopped,disabled:e.config.disabled,status:e.status})),M=(0,q.jsx)(D,{cellId:e.id,status:e.status,output:e.output,stale:l(e,!1)}),N=(0,q.jsxs)(`div`,{className:`absolute top-1 right-2 z-10 flex items-center gap-1.5`,children:[(0,q.jsx)(re,{editing:!0,status:e.status,disabled:e.config.disabled??!1,staleInputs:e.staleInputs,edited:e.edited,interrupted:e.interrupted,elapsedTime:e.runElapsedTimeMs??e.lastExecutionTime,runStartTimestamp:e.runStartTimestamp,lastRunStartTimestamp:e.lastRunStartTimestamp,uninstantiated:O}),(0,q.jsx)(ee,{code:e.code,editorView:v.current,currentLanguageAdapter:x,onAfterToggle:C,className:`flex items-center gap-1`}),(0,q.jsxs)(`div`,{className:`flex items-center shadow-none gap-1`,children:[(0,q.jsx)(te,{edited:e.edited,status:e.status,needsRun:A,connectionState:f.state,config:e.config,onClick:d}),(0,q.jsx)(F,{status:e.status,connectionState:f.state})]})]}),I=(0,q.jsxs)(`div`,{tabIndex:-1,className:j,...k(e.id,e.name),children:[(0,q.jsx)(P,{theme:u,showPlaceholder:!1,id:e.id,code:e.code,config:e.config,status:e.status,serializedEditorState:e.serializedEditorState,runCell:d,setEditorView:e=>{v.current=e},userConfig:r,editorViewRef:v,editorViewParentRef:b,hasOutput:E,showHiddenCode:w,languageAdapter:x,setLanguageAdapter:S,showLanguageToggles:!1,inlineAiTooltip:!1,outputArea:T,tooltipParentSelector:`.reveal-viewport`}),N]});return(0,q.jsxs)(q.Fragment,{children:[T===`above`&&M,I,T===`below`&&M]})},Dr=e=>{let t=(0,R.c)(22),{cell:n}=e,[r]=p(),i=r.display.cell_output,a;t[0]===n.code?a=t[1]:(a=ce(n.code),t[0]=n.code,t[1]=a);let o=a,s=n.id,c=n.status,u=n.output,d;t[2]===n?d=t[3]:(d=l(n,!1),t[2]=n,t[3]=d);let f;t[4]!==n.id||t[5]!==n.output||t[6]!==n.status||t[7]!==d?(f=(0,q.jsx)(D,{cellId:s,status:c,output:u,stale:d}),t[4]=n.id,t[5]=n.output,t[6]=n.status,t[7]=d,t[8]=f):f=t[8];let m=f,h;t[9]!==n.id||t[10]!==n.name?(h=k(n.id,n.name),t[9]=n.id,t[10]=n.name,t[11]=h):h=t[11];let g;t[12]!==o.code||t[13]!==o.language?(g=(0,q.jsx)(v,{code:o.code,language:o.language,showHideCode:!1}),t[12]=o.code,t[13]=o.language,t[14]=g):g=t[14];let _;t[15]!==h||t[16]!==g?(_=(0,q.jsx)(`div`,{className:`marimo-cell`,...h,children:g}),t[15]=h,t[16]=g,t[17]=_):_=t[17];let y=_,b=i===`above`&&m,x=i===`below`&&m,S;return t[18]!==y||t[19]!==b||t[20]!==x?(S=(0,q.jsxs)(q.Fragment,{children:[b,y,x]}),t[18]=y,t[19]=b,t[20]=x,t[21]=S):S=t[21],S},Or=300,kr=e=>{let t=(0,R.c)(25),{layout:r,setLayout:i,cellId:a,className:o}=e,s=a?r.cells.get(a)?.speakerNotes??``:``,[c,l]=(0,L.useState)(s),u=(0,L.useRef)(!1),d;t[0]!==r||t[1]!==i?(d=(e,t)=>{u.current=!1;let n=r.cells.get(e);if((n?.speakerNotes??``)===t)return;let a=new Map(r.cells);a.set(e,{...n,speakerNotes:t}),i({...r,cells:a})},t[0]=r,t[1]=i,t[2]=d):d=t[2];let f=n(d),p=I(f,Or),m=(0,L.useRef)(a),h,g;t[3]!==a||t[4]!==c||t[5]!==s||t[6]!==p?(h=()=>{if(m.current!==a){p.flush(),u.current=!1,l(s),m.current=a;return}!u.current&&s!==c&&l(s)},g=[a,s,c,p],t[3]=a,t[4]=c,t[5]=s,t[6]=p,t[7]=h,t[8]=g):(h=t[7],g=t[8]),(0,L.useEffect)(h,g);let _,v;t[9]===p?(_=t[10],v=t[11]):(_=()=>()=>{p.flush()},v=[p],t[9]=p,t[10]=_,t[11]=v),(0,L.useEffect)(_,v);let b;t[12]!==a||t[13]!==p?(b=e=>{l(e),a&&(u.current=!0,p(a,e))},t[12]=a,t[13]=p,t[14]=b):b=t[14];let x=b,S;t[15]===o?S=t[16]:(S=y(`h-full min-h-0 flex flex-col bg-muted/40 dark:bg-muted/20 border-t`,o),t[15]=o,t[16]=S);let C;t[17]===Symbol.for(`react.memo_cache_sentinel`)?(C=(0,q.jsxs)(`header`,{className:`flex items-center gap-1.5 px-3 h-8 shrink-0 text-xs font-medium uppercase tracking-wide text-muted-foreground`,children:[(0,q.jsx)(le,{className:`h-3.5 w-3.5`}),(0,q.jsx)(`span`,{children:`Speaker notes`})]}),t[17]=C):C=t[17];let T;t[18]!==a||t[19]!==c||t[20]!==x?(T=(0,q.jsx)(`div`,{className:`flex-1 min-h-0 p-2`,children:a?(0,q.jsx)(`textarea`,{value:c,onChange:e=>x(e.target.value),onClick:w.stopPropagation(),placeholder:`Add notes for this slide. Visible to you in speaker view (press S during presentation).`,className:y(`h-full w-full resize-none rounded-sm border border-input/25 bg-background`,`px-3 py-2 text-sm leading-relaxed text-foreground placeholder:text-muted-foreground`,`ring-offset-background focus-visible:outline-hidden focus-visible:ring-1 focus-visible:ring-ring focus-visible:border-accent`),"aria-label":`Speaker notes for the current slide`}):(0,q.jsx)(`div`,{className:`h-full flex items-center justify-center text-xs text-muted-foreground`,children:`Select a slide to add notes.`})}),t[18]=a,t[19]=c,t[20]=x,t[21]=T):T=t[21];let E;return t[22]!==S||t[23]!==T?(E=(0,q.jsxs)(`section`,{className:S,"aria-label":`Speaker notes`,onKeyDown:Ar,children:[C,T]}),t[22]=S,t[23]=T,t[24]=E):E=t[24],E};function Ar(e){return e.stopPropagation()}var jr=`
91
+ Please report this to https://github.com/markedjs/marked.`,e){let e=`<p>An error occurred:</p><pre>`+Yn(n.message+``,!0)+`</pre>`;return t?Promise.resolve(e):e}if(t)return Promise.reject(n);throw n}}};function X(e,t){return lr.parse(e,t)}X.options=X.setOptions=function(e){return lr.setOptions(e),X.defaults=lr.defaults,Rt(X.defaults),X},X.getDefaults=It,X.defaults=Lt,X.use=function(...e){return lr.use(...e),X.defaults=lr.defaults,Rt(X.defaults),X},X.walkTokens=function(e,t){return lr.walkTokens(e,t)},X.parseInline=lr.parseInline,X.Parser=sr,X.parser=sr.parse,X.Renderer=ar,X.TextRenderer=or,X.Lexer=ir,X.lexer=ir.lex,X.Tokenizer=rr,X.Hooks=cr,X.parse=X,X.options,X.setOptions,X.use,X.walkTokens,X.parseInline,sr.parse,ir.lex;function ur(...e){return e.filter(Boolean).join(` `)}function dr(e,t){return e?t?{...e,...t}:e:t}function fr({animation:e,index:t,as:n,asChild:r,className:i,style:a,children:o}){let s=ur(`fragment`,e,i);if(r){let e;try{e=L.Children.only(o)}catch{throw Error(`Fragment with asChild expects exactly one React element child.`)}if(!(0,L.isValidElement)(e)||e.type===L.Fragment)throw Error(`Fragment with asChild expects exactly one non-Fragment React element child.`);let n={className:ur(e.props.className,s),style:dr(e.props.style,a)};return t!==void 0&&(n[`data-fragment-index`]=t),(0,L.cloneElement)(e,n)}return(0,q.jsx)(n??`span`,{className:s,style:a,"data-fragment-index":t,children:o})}var pr=8,mr=1;function hr(e){let{scrollHeight:t,clientHeight:n,scrollTop:r}=e;return t>n+mr&&r<=pr}function gr(e){let t=e.querySelector(`.fragment:not(.visible)`);return t?t.getBoundingClientRect().top-e.getBoundingClientRect().top+e.scrollTop:e.scrollHeight}function _r(e,t){let n=(0,R.c)(4),[r,i]=(0,L.useState)(!1),a,o;return n[0]!==t||n[1]!==e?(a=()=>{let n=e.current,r=t.current;if(!n||!r)return;let a=0,o=()=>{cancelAnimationFrame(a),a=requestAnimationFrame(()=>{i(hr({scrollHeight:gr(n),clientHeight:n.clientHeight,scrollTop:n.scrollTop}))})};o();let s=new ResizeObserver(o);s.observe(n),s.observe(r);let c=r.querySelector(`.fragment`)?new MutationObserver(o):null;return c?.observe(r,{subtree:!0,attributes:!0,attributeFilter:[`class`]}),n.addEventListener(`scroll`,o,{passive:!0}),()=>{cancelAnimationFrame(a),s.disconnect(),c?.disconnect(),n.removeEventListener(`scroll`,o)}},o=[e,t],n[0]=t,n[1]=e,n[2]=a,n[3]=o):(a=n[2],o=n[3]),(0,L.useEffect)(a,o),r}var vr=e=>{let t=(0,R.c)(6),{className:n}=e,r;t[0]===n?r=t[1]:(r=y(`pointer-events-none absolute inset-x-0 bottom-0 z-10 flex flex-col items-center`,`animate-in fade-in-0 duration-200`,n),t[0]=n,t[1]=r);let i;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(i=(0,q.jsx)(`div`,{className:`h-16 w-full bg-linear-to-t from-background via-background/80 to-transparent`}),t[2]=i):i=t[2];let a;t[3]===Symbol.for(`react.memo_cache_sentinel`)?(a=(0,q.jsxs)(`div`,{className:`absolute bottom-3 flex items-center gap-1 rounded-full border border-border/60 bg-background/90 px-2.5 py-1 text-xs text-muted-foreground shadow-sm backdrop-blur-sm`,children:[(0,q.jsx)(j,{className:`h-3.5 w-3.5`}),(0,q.jsx)(`span`,{children:`Scroll for more`})]}),t[3]=a):a=t[3];let o;return t[4]===r?o=t[5]:(o=(0,q.jsxs)(`div`,{className:r,"data-testid":`slide-scroll-hint`,"aria-hidden":!0,children:[i,a]}),t[4]=r,t[5]=o),o},yr=e=>{let t=(0,R.c)(10),{children:n,className:r}=e,i=(0,L.useRef)(null),a=(0,L.useRef)(null),o=_r(i,a),s;t[0]===r?s=t[1]:(s=y(`relative h-full w-full`,r),t[0]=r,t[1]=s);let c;t[2]===n?c=t[3]:(c=(0,q.jsx)(`div`,{ref:i,className:`h-full w-full overflow-auto`,"data-testid":`slide-scroll-container`,children:(0,q.jsx)(`div`,{ref:a,className:`flex w-full min-h-full`,children:n})}),t[2]=n,t[3]=c);let l;t[4]===o?l=t[5]:(l=o&&(0,q.jsx)(vr,{}),t[4]=o,t[5]=l);let u;return t[6]!==s||t[7]!==c||t[8]!==l?(u=(0,q.jsxs)(`div`,{className:s,children:[c,l]}),t[6]=s,t[7]=c,t[8]=l,t[9]=u):u=t[9],u};function br({cells:e,getType:t}){let n=[],r=null,i=null,a=()=>{let e={subslides:[]};return n.push(e),r=e,i=null,e},o=()=>{let e=r??a(),t={blocks:[]};return e.subslides.push(t),i=t,t},s=e=>{let t=i??o(),n={isFragment:e,cells:[]};return t.blocks.push(n),n};for(let n of e)switch(t(n)){case`skip`:break;case`slide`:a(),o(),s(!1).cells.push(n);break;case`sub-slide`:o(),s(!1).cells.push(n);break;case`fragment`:s(!0).cells.push(n)}return{stacks:n}}function xr({composition:e,cells:t,getId:n}){let r=new Map,i=new Map,a=new Map;for(let[e,r]of t.entries())a.set(n(r),e);return e.stacks.forEach((e,t)=>{e.subslides.forEach((e,o)=>{let s;for(let t of e.blocks){if(t.isFragment)break;let e=t.cells.at(-1);e&&(s=n(e))}if(s===void 0){let t=e.blocks[0]?.cells[0];t&&(s=n(t))}if(s!==void 0){let e=a.get(s);e!=null&&i.set(`${t},${o},-1`,e)}let c=-1;for(let s of e.blocks)if(s.isFragment){c++;for(let e of s.cells)r.set(n(e),{h:t,v:o,f:c});let e=s.cells.at(-1);if(e){let r=a.get(n(e));r!=null&&i.set(`${t},${o},${c}`,r)}}else for(let e of s.cells)r.set(n(e),{h:t,v:o,f:-1})})}),{cellToTarget:r,targetToCellIndex:i}}function Sr(e,t){let{h:n,v:r,f:i}=t;return e.get(`${n},${r},${i}`)??e.get(`${n},${r},-1`)}function Cr({start:e,stop:t,step:n,cells:r,cellToTarget:i,getId:a}){for(let o=e;o!==t;o+=n){let e=i.get(a(r[o]));if(e)return e}}function wr({activeIndex:e,cells:t,cellToTarget:n,getId:r}){if(e==null)return;let i=t[e];return i?n.get(r(i))||(Cr({start:e-1,stop:-1,step:-1,cells:t,cellToTarget:n,getId:r})??Cr({start:e+1,stop:t.length,step:1,cells:t,cellToTarget:n,getId:r})):void 0}function Tr(e,t){let n={h:t.h,v:t.v,f:t.f>=0?t.f:-1};return e.h===n.h&&e.v===n.v&&e.f===n.f?null:n}var Er=({cell:e})=>{let[r]=d(),{theme:u}=ne(),p=ie(e.id),m=t(_),h=i(),g=t(f),v=(0,L.useRef)(null),b=(0,L.useRef)(null),[x,S]=(0,L.useState)(),C=n(()=>{c({autoInstantiate:g,createNewCell:h.createNewCell})}),w=n(()=>void 0),T=r.display.cell_output,E=e.output!=null,O=s({executionTime:e.runElapsedTimeMs??e.lastExecutionTime,status:e.status,errored:e.errored,interrupted:e.interrupted,stopped:e.stopped}),A=a({edited:e.edited,interrupted:e.interrupted,staleInputs:e.staleInputs,disabled:e.config.disabled,status:e.status}),j=y(`marimo-cell`,`hover-actions-parent`,`interactive`,o({needsRun:A,errored:e.errored,stopped:e.stopped,disabled:e.config.disabled,status:e.status})),M=(0,q.jsx)(D,{cellId:e.id,status:e.status,output:e.output,stale:l(e,!1)}),N=(0,q.jsxs)(`div`,{className:`absolute top-1 right-2 z-10 flex items-center gap-1.5`,children:[(0,q.jsx)(re,{editing:!0,status:e.status,disabled:e.config.disabled??!1,staleInputs:e.staleInputs,edited:e.edited,interrupted:e.interrupted,elapsedTime:e.runElapsedTimeMs??e.lastExecutionTime,runStartTimestamp:e.runStartTimestamp,lastRunStartTimestamp:e.lastRunStartTimestamp,uninstantiated:O}),(0,q.jsx)(ee,{code:e.code,editorView:v.current,currentLanguageAdapter:x,onAfterToggle:C,className:`flex items-center gap-1`}),(0,q.jsxs)(`div`,{className:`flex items-center shadow-none gap-1`,children:[(0,q.jsx)(te,{edited:e.edited,status:e.status,needsRun:A,connectionState:m.state,config:e.config,onClick:p}),(0,q.jsx)(F,{status:e.status,connectionState:m.state})]})]}),I=(0,q.jsxs)(`div`,{tabIndex:-1,className:j,...k(e.id,e.name),children:[(0,q.jsx)(P,{theme:u,showPlaceholder:!1,id:e.id,code:e.code,config:e.config,status:e.status,serializedEditorState:e.serializedEditorState,runCell:p,setEditorView:e=>{v.current=e},userConfig:r,editorViewRef:v,editorViewParentRef:b,hasOutput:E,showHiddenCode:w,languageAdapter:x,setLanguageAdapter:S,showLanguageToggles:!1,inlineAiTooltip:!1,outputArea:T,tooltipParentSelector:`.reveal-viewport`}),N]});return(0,q.jsxs)(q.Fragment,{children:[T===`above`&&M,I,T===`below`&&M]})},Dr=e=>{let t=(0,R.c)(22),{cell:n}=e,[r]=d(),i=r.display.cell_output,a;t[0]===n.code?a=t[1]:(a=ce(n.code),t[0]=n.code,t[1]=a);let o=a,s=n.id,c=n.status,u=n.output,f;t[2]===n?f=t[3]:(f=l(n,!1),t[2]=n,t[3]=f);let p;t[4]!==n.id||t[5]!==n.output||t[6]!==n.status||t[7]!==f?(p=(0,q.jsx)(D,{cellId:s,status:c,output:u,stale:f}),t[4]=n.id,t[5]=n.output,t[6]=n.status,t[7]=f,t[8]=p):p=t[8];let m=p,h;t[9]!==n.id||t[10]!==n.name?(h=k(n.id,n.name),t[9]=n.id,t[10]=n.name,t[11]=h):h=t[11];let g;t[12]!==o.code||t[13]!==o.language?(g=(0,q.jsx)(v,{code:o.code,language:o.language,showHideCode:!1}),t[12]=o.code,t[13]=o.language,t[14]=g):g=t[14];let _;t[15]!==h||t[16]!==g?(_=(0,q.jsx)(`div`,{className:`marimo-cell`,...h,children:g}),t[15]=h,t[16]=g,t[17]=_):_=t[17];let y=_,b=i===`above`&&m,x=i===`below`&&m,S;return t[18]!==y||t[19]!==b||t[20]!==x?(S=(0,q.jsxs)(q.Fragment,{children:[b,y,x]}),t[18]=y,t[19]=b,t[20]=x,t[21]=S):S=t[21],S},Or=300,kr=e=>{let t=(0,R.c)(25),{layout:r,setLayout:i,cellId:a,className:o}=e,s=a?r.cells.get(a)?.speakerNotes??``:``,[c,l]=(0,L.useState)(s),u=(0,L.useRef)(!1),d;t[0]!==r||t[1]!==i?(d=(e,t)=>{u.current=!1;let n=r.cells.get(e);if((n?.speakerNotes??``)===t)return;let a=new Map(r.cells);a.set(e,{...n,speakerNotes:t}),i({...r,cells:a})},t[0]=r,t[1]=i,t[2]=d):d=t[2];let f=n(d),p=I(f,Or),m=(0,L.useRef)(a),h,g;t[3]!==a||t[4]!==c||t[5]!==s||t[6]!==p?(h=()=>{if(m.current!==a){p.flush(),u.current=!1,l(s),m.current=a;return}!u.current&&s!==c&&l(s)},g=[a,s,c,p],t[3]=a,t[4]=c,t[5]=s,t[6]=p,t[7]=h,t[8]=g):(h=t[7],g=t[8]),(0,L.useEffect)(h,g);let _,v;t[9]===p?(_=t[10],v=t[11]):(_=()=>()=>{p.flush()},v=[p],t[9]=p,t[10]=_,t[11]=v),(0,L.useEffect)(_,v);let b;t[12]!==a||t[13]!==p?(b=e=>{l(e),a&&(u.current=!0,p(a,e))},t[12]=a,t[13]=p,t[14]=b):b=t[14];let x=b,S;t[15]===o?S=t[16]:(S=y(`h-full min-h-0 flex flex-col bg-muted/40 dark:bg-muted/20 border-t`,o),t[15]=o,t[16]=S);let C;t[17]===Symbol.for(`react.memo_cache_sentinel`)?(C=(0,q.jsxs)(`header`,{className:`flex items-center gap-1.5 px-3 h-8 shrink-0 text-xs font-medium uppercase tracking-wide text-muted-foreground`,children:[(0,q.jsx)(le,{className:`h-3.5 w-3.5`}),(0,q.jsx)(`span`,{children:`Speaker notes`})]}),t[17]=C):C=t[17];let T;t[18]!==a||t[19]!==c||t[20]!==x?(T=(0,q.jsx)(`div`,{className:`flex-1 min-h-0 p-2`,children:a?(0,q.jsx)(`textarea`,{value:c,onChange:e=>x(e.target.value),onClick:w.stopPropagation(),placeholder:`Add notes for this slide. Visible to you in speaker view (press S during presentation).`,className:y(`h-full w-full resize-none rounded-sm border border-input/25 bg-background`,`px-3 py-2 text-sm leading-relaxed text-foreground placeholder:text-muted-foreground`,`ring-offset-background focus-visible:outline-hidden focus-visible:ring-1 focus-visible:ring-ring focus-visible:border-accent`),"aria-label":`Speaker notes for the current slide`}):(0,q.jsx)(`div`,{className:`h-full flex items-center justify-center text-xs text-muted-foreground`,children:`Select a slide to add notes.`})}),t[18]=a,t[19]=c,t[20]=x,t[21]=T):T=t[21];let E;return t[22]!==S||t[23]!==T?(E=(0,q.jsxs)(`section`,{className:S,"aria-label":`Speaker notes`,onKeyDown:Ar,children:[C,T]}),t[22]=S,t[23]=T,t[24]=E):E=t[24],E};function Ar(e){return e.stopPropagation()}var jr=`
92
92
 
93
93
  ---
94
94
 
@@ -1066,4 +1066,4 @@ ${e}</tr>
1066
1066
  `}strong({tokens:e}){return`<strong>${this.parser.parseInline(e)}</strong>`}em({tokens:e}){return`<em>${this.parser.parseInline(e)}</em>`}codespan({text:e}){return`<code>${Xi(e,!0)}</code>`}br(e){return`<br>`}del({tokens:e}){return`<del>${this.parser.parseInline(e)}</del>`}link({href:e,title:t,tokens:n}){let r=this.parser.parseInline(n),i=Zi(e);if(i===null)return r;e=i;let a=`<a href="`+e+`"`;return t&&(a+=` title="`+Xi(t)+`"`),a+=`>`+r+`</a>`,a}image({href:e,title:t,text:n,tokens:r}){r&&(n=this.parser.parseInline(r,this.parser.textRenderer));let i=Zi(e);if(i===null)return Xi(n);e=i;let a=`<img src="${e}" alt="${Xi(n)}"`;return t&&(a+=` title="${Xi(t)}"`),a+=`>`,a}text(e){return`tokens`in e&&e.tokens?this.parser.parseInline(e.tokens):`escaped`in e&&e.escaped?e.text:Xi(e.text)}},sa=class{strong({text:e}){return e}em({text:e}){return e}codespan({text:e}){return e}del({text:e}){return e}html({text:e}){return e}text({text:e}){return e}link({text:e}){return``+e}image({text:e}){return``+e}br(){return``}checkbox({raw:e}){return e}},ca=class e{options;renderer;textRenderer;constructor(e){this.options=e||Ir,this.options.renderer=this.options.renderer||new oa,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new sa}static parse(t,n){return new e(n).parse(t)}static parseInline(t,n){return new e(n).parseInline(t)}parse(e){let t=``;for(let n=0;n<e.length;n++){let r=e[n];if(this.options.extensions?.renderers?.[r.type]){let e=r,n=this.options.extensions.renderers[e.type].call({parser:this},e);if(n!==!1||![`space`,`hr`,`heading`,`code`,`table`,`blockquote`,`list`,`html`,`def`,`paragraph`,`text`].includes(e.type)){t+=n||``;continue}}let i=r;switch(i.type){case`space`:t+=this.renderer.space(i);break;case`hr`:t+=this.renderer.hr(i);break;case`heading`:t+=this.renderer.heading(i);break;case`code`:t+=this.renderer.code(i);break;case`table`:t+=this.renderer.table(i);break;case`blockquote`:t+=this.renderer.blockquote(i);break;case`list`:t+=this.renderer.list(i);break;case`checkbox`:t+=this.renderer.checkbox(i);break;case`html`:t+=this.renderer.html(i);break;case`def`:t+=this.renderer.def(i);break;case`paragraph`:t+=this.renderer.paragraph(i);break;case`text`:t+=this.renderer.text(i);break;default:{let e=`Token with "`+i.type+`" type was not found.`;if(this.options.silent)return console.error(e),``;throw Error(e)}}}return t}parseInline(e,t=this.renderer){let n=``;for(let r=0;r<e.length;r++){let i=e[r];if(this.options.extensions?.renderers?.[i.type]){let e=this.options.extensions.renderers[i.type].call({parser:this},i);if(e!==!1||![`escape`,`html`,`link`,`image`,`strong`,`em`,`codespan`,`br`,`del`,`text`].includes(i.type)){n+=e||``;continue}}let a=i;switch(a.type){case`escape`:n+=t.text(a);break;case`html`:n+=t.html(a);break;case`link`:n+=t.link(a);break;case`image`:n+=t.image(a);break;case`checkbox`:n+=t.checkbox(a);break;case`strong`:n+=t.strong(a);break;case`em`:n+=t.em(a);break;case`codespan`:n+=t.codespan(a);break;case`br`:n+=t.br(a);break;case`del`:n+=t.del(a);break;case`text`:n+=t.text(a);break;default:{let e=`Token with "`+a.type+`" type was not found.`;if(this.options.silent)return console.error(e),``;throw Error(e)}}}return n}},la=class{options;block;constructor(e){this.options=e||Ir}static passThroughHooks=new Set([`preprocess`,`postprocess`,`processAllTokens`,`emStrongMask`]);static passThroughHooksRespectAsync=new Set([`preprocess`,`postprocess`,`processAllTokens`]);preprocess(e){return e}postprocess(e){return e}processAllTokens(e){return e}emStrongMask(e){return e}provideLexer(){return this.block?aa.lex:aa.lexInline}provideParser(){return this.block?ca.parse:ca.parseInline}},ua=new class{defaults=Fr();options=this.setOptions;parse=this.parseMarkdown(!0);parseInline=this.parseMarkdown(!1);Parser=ca;Renderer=oa;TextRenderer=sa;Lexer=aa;Tokenizer=ia;Hooks=la;constructor(...e){this.use(...e)}walkTokens(e,t){let n=[];for(let r of e)switch(n=n.concat(t.call(this,r)),r.type){case`table`:{let e=r;for(let r of e.header)n=n.concat(this.walkTokens(r.tokens,t));for(let r of e.rows)for(let e of r)n=n.concat(this.walkTokens(e.tokens,t));break}case`list`:{let e=r;n=n.concat(this.walkTokens(e.items,t));break}default:{let e=r;this.defaults.extensions?.childTokens?.[e.type]?this.defaults.extensions.childTokens[e.type].forEach(r=>{let i=e[r].flat(1/0);n=n.concat(this.walkTokens(i,t))}):e.tokens&&(n=n.concat(this.walkTokens(e.tokens,t)))}}return n}use(...e){let t=this.defaults.extensions||{renderers:{},childTokens:{}};return e.forEach(e=>{let n={...e};if(n.async=this.defaults.async||n.async||!1,e.extensions&&(e.extensions.forEach(e=>{if(!e.name)throw Error(`extension name required`);if(`renderer`in e){let n=t.renderers[e.name];n?t.renderers[e.name]=function(...t){let r=e.renderer.apply(this,t);return r===!1&&(r=n.apply(this,t)),r}:t.renderers[e.name]=e.renderer}if(`tokenizer`in e){if(!e.level||e.level!==`block`&&e.level!==`inline`)throw Error(`extension level must be 'block' or 'inline'`);let n=t[e.level];n?n.unshift(e.tokenizer):t[e.level]=[e.tokenizer],e.start&&(e.level===`block`?t.startBlock?t.startBlock.push(e.start):t.startBlock=[e.start]:e.level===`inline`&&(t.startInline?t.startInline.push(e.start):t.startInline=[e.start]))}`childTokens`in e&&e.childTokens&&(t.childTokens[e.name]=e.childTokens)}),n.extensions=t),e.renderer){let t=this.defaults.renderer||new oa(this.defaults);for(let n in e.renderer){if(!(n in t))throw Error(`renderer '${n}' does not exist`);if([`options`,`parser`].includes(n))continue;let r=n,i=e.renderer[r],a=t[r];t[r]=(...e)=>{let n=i.apply(t,e);return n===!1&&(n=a.apply(t,e)),n||``}}n.renderer=t}if(e.tokenizer){let t=this.defaults.tokenizer||new ia(this.defaults);for(let n in e.tokenizer){if(!(n in t))throw Error(`tokenizer '${n}' does not exist`);if([`options`,`rules`,`lexer`].includes(n))continue;let r=n,i=e.tokenizer[r],a=t[r];t[r]=(...e)=>{let n=i.apply(t,e);return n===!1&&(n=a.apply(t,e)),n}}n.tokenizer=t}if(e.hooks){let t=this.defaults.hooks||new la;for(let n in e.hooks){if(!(n in t))throw Error(`hook '${n}' does not exist`);if([`options`,`block`].includes(n))continue;let r=n,i=e.hooks[r],a=t[r];t[r]=la.passThroughHooks.has(n)?e=>{if(this.defaults.async&&la.passThroughHooksRespectAsync.has(n))return(async()=>{let n=await i.call(t,e);return a.call(t,n)})();let r=i.call(t,e);return a.call(t,r)}:(...e)=>{if(this.defaults.async)return(async()=>{let n=await i.apply(t,e);return n===!1&&(n=await a.apply(t,e)),n})();let n=i.apply(t,e);return n===!1&&(n=a.apply(t,e)),n}}n.hooks=t}if(e.walkTokens){let t=this.defaults.walkTokens,r=e.walkTokens;n.walkTokens=function(e){let n=[];return n.push(r.call(this,e)),t&&(n=n.concat(t.call(this,e))),n}}this.defaults={...this.defaults,...n}}),this}setOptions(e){return this.defaults={...this.defaults,...e},this}lexer(e,t){return aa.lex(e,t??this.defaults)}parser(e,t){return ca.parse(e,t??this.defaults)}parseMarkdown(e){return(t,n)=>{let r={...n},i={...this.defaults,...r},a=this.onError(!!i.silent,!!i.async);if(this.defaults.async===!0&&r.async===!1)return a(Error(`marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise.`));if(typeof t>`u`||t===null)return a(Error(`marked(): input parameter is undefined or null`));if(typeof t!=`string`)return a(Error(`marked(): input parameter is of type `+Object.prototype.toString.call(t)+`, string expected`));if(i.hooks&&(i.hooks.options=i,i.hooks.block=e),i.async)return(async()=>{let n=i.hooks?await i.hooks.preprocess(t):t,r=await(i.hooks?await i.hooks.provideLexer():e?aa.lex:aa.lexInline)(n,i),a=i.hooks?await i.hooks.processAllTokens(r):r;i.walkTokens&&await Promise.all(this.walkTokens(a,i.walkTokens));let o=await(i.hooks?await i.hooks.provideParser():e?ca.parse:ca.parseInline)(a,i);return i.hooks?await i.hooks.postprocess(o):o})().catch(a);try{i.hooks&&(t=i.hooks.preprocess(t));let n=(i.hooks?i.hooks.provideLexer():e?aa.lex:aa.lexInline)(t,i);i.hooks&&(n=i.hooks.processAllTokens(n)),i.walkTokens&&this.walkTokens(n,i.walkTokens);let r=(i.hooks?i.hooks.provideParser():e?ca.parse:ca.parseInline)(n,i);return i.hooks&&(r=i.hooks.postprocess(r)),r}catch(e){return a(e)}}}onError(e,t){return n=>{if(n.message+=`
1067
1067
  Please report this to https://github.com/markedjs/marked.`,e){let e=`<p>An error occurred:</p><pre>`+Xi(n.message+``,!0)+`</pre>`;return t?Promise.resolve(e):e}if(t)return Promise.reject(n);throw n}}};function $(e,t){return ua.parse(e,t)}$.options=$.setOptions=function(e){return ua.setOptions(e),$.defaults=ua.defaults,Lr($.defaults),$},$.getDefaults=Fr,$.defaults=Ir,$.use=function(...e){return ua.use(...e),$.defaults=ua.defaults,Lr($.defaults),$},$.walkTokens=function(e,t){return ua.walkTokens(e,t)},$.parseInline=ua.parseInline,$.Parser=ca,$.parser=ca.parse,$.Renderer=oa,$.TextRenderer=sa,$.Lexer=aa,$.lexer=aa.lex,$.Tokenizer=ia,$.Hooks=la,$.parse=$,$.options,$.setOptions,$.use,$.walkTokens,$.parseInline,ca.parse,aa.lex;var da=()=>{let e,t=null,n;function r(){if(t&&!t.closed)t.focus();else{if(t=window.open(`about:blank`,`reveal.js - Notes`,`width=1100,height=700`),t.marked=$,t.document.write(Pr),!t){alert(`Speaker view popup failed to open. Please make sure popups are allowed and reopen the speaker view.`);return}a()}}function i(e){t&&!t.closed?t.focus():(t=e,window.addEventListener(`message`,l),u())}function a(){let r=n.getConfig().url,i=typeof r==`string`?r:window.location.protocol+`//`+window.location.host+window.location.pathname+window.location.search;e=setInterval(function(){t.postMessage(JSON.stringify({namespace:`reveal-notes`,type:`connect`,state:n.getState(),url:i}),`*`)},500),window.addEventListener(`message`,l)}function o(e,r,i){let a=n[e].apply(n,r);t.postMessage(JSON.stringify({namespace:`reveal-notes`,type:`return`,result:a,callId:i}),`*`)}function s(e){let r=n.getCurrentSlide(),i=r.querySelectorAll(`aside.notes`),a=r.querySelector(`.current-fragment`),o={namespace:`reveal-notes`,type:`state`,notes:``,markdown:!1,whitespace:`normal`,state:n.getState()};if(r.hasAttribute(`data-notes`)&&(o.notes=r.getAttribute(`data-notes`),o.whitespace=`pre-wrap`),a){let e=a.querySelector(`aside.notes`);e?(o.notes=e.innerHTML,o.markdown=typeof e.getAttribute(`data-markdown`)==`string`,i=null):a.hasAttribute(`data-notes`)&&(o.notes=a.getAttribute(`data-notes`),o.whitespace=`pre-wrap`,i=null)}i&&i.length&&(i=Array.from(i).filter(e=>e.closest(`.fragment`)===null),o.notes=i.map(e=>e.innerHTML).join(`
1068
1068
  `),o.markdown=i[0]&&typeof i[0].getAttribute(`data-markdown`)==`string`),t.postMessage(JSON.stringify(o),`*`)}function c(e){try{return window.location.origin===e.source.location.origin}catch{return!1}}function l(t){if(c(t))try{let n=JSON.parse(t.data);n&&n.namespace===`reveal-notes`&&n.type===`connected`?(clearInterval(e),u()):n&&n.namespace===`reveal-notes`&&n.type===`call`&&o(n.methodName,n.arguments,n.callId)}catch{}}function u(){n.on(`slidechanged`,s),n.on(`fragmentshown`,s),n.on(`fragmenthidden`,s),n.on(`overviewhidden`,s),n.on(`overviewshown`,s),n.on(`paused`,s),n.on(`resumed`,s),n.on(`previewiframe`,s),n.on(`previewimage`,s),n.on(`previewvideo`,s),n.on(`closeoverlay`,s),s()}return{id:`notes`,init:function(e){n=e,/receiver/i.test(window.location.search)||(window.location.search.match(/(\?|\&)notes/gi)===null?window.addEventListener(`message`,e=>{if(!t&&typeof e.data==`string`){let t;try{t=JSON.parse(e.data)}catch{}t&&t.namespace===`reveal-notes`&&t.type===`heartbeat`&&i(e.source)}}):r(),n.addKeyBinding({keyCode:83,key:`S`,description:`Speaker notes view`},function(){r()}))},open:r}},fa=16/9;function pa(e){let t=e.getSlidesElement();if(t)for(let e of t.querySelectorAll(`section.stack[data-previous-indexv]`))e.removeAttribute(`data-previous-indexv`)}var ma=new Set([` `,`Spacebar`,`ArrowRight`,`ArrowDown`,`PageDown`]),ha=new Set([`ArrowLeft`,`ArrowUp`,`PageUp`]);function ga(e){return ma.has(e.key)?1:ha.has(e.key)?-1:0}function _a(e){let t=(0,R.c)(4),n;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(n={width:960,height:540},t[0]=n):n=t[0];let[r,i]=(0,L.useState)(n),a,o;return t[1]===e?(a=t[2],o=t[3]):(a=()=>{let t=e.current;if(!t)return;let n=new ResizeObserver(e=>{let{width:t,height:n}=e[0].contentRect;if(t<=0||n<=0)return;let r=Math.min(t,n*fa),a=r/fa;i({width:Math.round(r),height:Math.round(a)})});return n.observe(t),()=>n.disconnect()},o=[e],t[1]=e,t[2]=a,t[3]=o),(0,L.useEffect)(a,o),r}var va=e=>{let t=(0,R.c)(6),{text:n}=e,r,i;if(t[0]!==n){let e=n.split(`
1069
- `);r=`notes`,i=e.map((t,n)=>{let r=n===e.length-1;return t===`---`?(0,q.jsx)(`hr`,{},n):(0,q.jsxs)(L.Fragment,{children:[t,!r&&(0,q.jsx)(`br`,{})]},n)}),t[0]=n,t[1]=r,t[2]=i}else r=t[1],i=t[2];let a;return t[3]!==r||t[4]!==i?(a=(0,q.jsx)(`aside`,{className:r,children:i}),t[3]=r,t[4]=i,t[5]=a):a=t[5],a};function ya(e){let{cells:t,cellId:n,showCodeOverrides:r,codeToggleEnabled:i}=e;return n==null||!i?!1:(t.get(n)?.showCode??!1)||r.has(n)}function ba(e){let{cell:t,noOutputIds:n,heldEditCellId:r,slideConfigs:i}=e;return n.has(t.id)||t.id===r?`skip`:i.get(t.id)?.type??`slide`}function xa(e){let t=(0,R.c)(15),{activeCell:r,slideConfigs:i,noOutputIds:a}=e,o=r?.id??null,s;t[0]!==r||t[1]!==a?(s=r!=null&&a.has(r.id),t[0]=r,t[1]=a,t[2]=s):s=t[2];let c=s,l=r!=null&&i.get(r.id)?.type===`skip`||c,u;t[3]===o?u=t[4]:(u={activeCellId:o,cellId:null},t[3]=o,t[4]=u);let[d,f]=(0,L.useState)(u),p=d.cellId;d.activeCellId===o?c&&p!==o&&(p=o,f({activeCellId:o,cellId:p})):(p=c?o:null,f({activeCellId:o,cellId:p}));let m=!l&&o!=null&&p===o,h=m?p:null,g;t[5]===h?g=t[6]:(g={cellId:h,show:!0},t[5]=h,t[6]=g);let[_,v]=(0,L.useState)(g),y=_.show;_.cellId!==h&&(y=!0,v({cellId:h,show:!0}));let b;t[7]===Symbol.for(`react.memo_cache_sentinel`)?(b=()=>v(Sa),t[7]=b):b=t[7];let x=n(b),S=l||m?r??null:null,C;return t[8]!==h||t[9]!==y||t[10]!==m||t[11]!==c||t[12]!==S||t[13]!==x?(C={parkedPreviewCell:S,isHeldEdit:m,isNoOutputPreview:c,heldEditCellId:h,heldShowsCode:y,toggleHeldShowsCode:x},t[8]=h,t[9]=y,t[10]=m,t[11]=c,t[12]=S,t[13]=x,t[14]=C):C=t[14],C}function Sa(e){return{...e,show:!e.show}}function Ca(e){switch(e??`center`){case`top`:return{margin:`0 20px auto`};case`bottom`:return{margin:`auto 20px 0`};default:return{margin:`auto 20px`}}}var wa=e=>{let t=(0,R.c)(13),{cell:n}=e,r;t[0]!==n.id||t[1]!==n.name?(r=k(n.id,n.name),t[0]=n.id,t[1]=n.name,t[2]=r):r=t[2];let i=n.id,a=n.status,o=n.output,s;t[3]===n?s=t[4]:(s=l(n,!1),t[3]=n,t[4]=s);let c;t[5]!==n.id||t[6]!==n.output||t[7]!==n.status||t[8]!==s?(c=(0,q.jsx)(D,{cellId:i,status:a,output:o,stale:s}),t[5]=n.id,t[6]=n.output,t[7]=n.status,t[8]=s,t[9]=c):c=t[9];let u;return t[10]!==r||t[11]!==c?(u=(0,q.jsx)(`div`,{className:`flex flex-col`,...r,children:c}),t[10]=r,t[11]=c,t[12]=u):u=t[12],u},Ta=e=>{let t=(0,R.c)(24),{subslide:n,resolveShowCode:r,isEditable:i,slideConfigs:a,contentStyle:o}=e,s,c,l,u,d,f;if(t[0]!==o||t[1]!==i||t[2]!==r||t[3]!==a||t[4]!==n){let{slideLevel:e,cumulativeByBlock:p}=Nr(n,a);l=e;let m=n.blocks.some(e=>e.cells.some(e=>r(e.id)));c=Pt,s=yr,u=m?`mo-slide-content flex flex-col gap-3`:`mo-slide-content`,d=o,f=n.blocks.map((e,t)=>{let n=e.cells.map(e=>r(e.id)?i?(0,q.jsx)(Er,{cell:e},e.id):(0,q.jsx)(Dr,{cell:e},e.id):(0,q.jsx)(wa,{cell:e},e.id));if(e.isFragment){let e=p.get(t);return(0,q.jsxs)(fr,{as:`div`,children:[n,e&&(0,q.jsx)(va,{text:e})]},t)}return(0,q.jsx)(L.Fragment,{children:n},t)}),t[0]=o,t[1]=i,t[2]=r,t[3]=a,t[4]=n,t[5]=s,t[6]=c,t[7]=l,t[8]=u,t[9]=d,t[10]=f}else s=t[5],c=t[6],l=t[7],u=t[8],d=t[9],f=t[10];let p;t[11]!==u||t[12]!==d||t[13]!==f?(p=(0,q.jsx)(`div`,{className:u,style:d,children:f}),t[11]=u,t[12]=d,t[13]=f,t[14]=p):p=t[14];let m;t[15]!==s||t[16]!==p?(m=(0,q.jsx)(s,{children:p}),t[15]=s,t[16]=p,t[17]=m):m=t[17];let h;t[18]===l?h=t[19]:(h=l&&(0,q.jsx)(va,{text:l}),t[18]=l,t[19]=h);let g;return t[20]!==c||t[21]!==m||t[22]!==h?(g=(0,q.jsxs)(c,{children:[m,h]}),t[20]=c,t[21]=m,t[22]=h,t[23]=g):g=t[23],g};function Ea(e){let{isNoOutputPreview:t,isEditable:n,showCode:r}=e;return t&&n||r}var Da=e=>{let t=(0,R.c)(5),{cell:n,isNoOutputPreview:r,isEditable:i,showCode:a}=e;if(Ea({isNoOutputPreview:r,isEditable:i,showCode:a})){let e;return t[0]!==n||t[1]!==i?(e=i?(0,q.jsx)(Er,{cell:n}):(0,q.jsx)(Dr,{cell:n}),t[0]=n,t[1]=i,t[2]=e):e=t[2],e}let o;return t[3]===n?o=t[4]:(o=(0,q.jsx)(wa,{cell:n}),t[3]=n,t[4]=o),o},Oa=e=>{let r=(0,R.c)(147),{slideCells:i,layout:a,setLayout:o,noOutputIds:s,activeIndex:c,onSlideChange:l,mode:u,configWidth:d,isEditable:p}=e,m=p!==void 0&&p,_=(0,L.useRef)(null),v=(0,L.useRef)(null),{width:b,height:E}=_a(_),D=x()!=null,k=t(g),j;r[0]===k?j=r[1]:(j=k?[]:[da],r[0]=k,r[1]=j);let ee=j,[P,F]=(0,L.useState)(ka),te=A(i),ne;r[2]===te?ne=r[3]:(ne=!h()&&te,r[2]=te,r[3]=ne);let I=ne,re=c==null?void 0:i[c],ie;r[4]!==re||r[5]!==i?(ie=re??i.at(0),r[4]=re,r[5]=i,r[6]=ie):ie=r[6];let ce=ie,le;r[7]!==re||r[8]!==a.cells||r[9]!==s?(le={activeCell:re,slideConfigs:a.cells,noOutputIds:s},r[7]=re,r[8]=a.cells,r[9]=s,r[10]=le):le=r[10];let{parkedPreviewCell:z,isHeldEdit:ue,isNoOutputPreview:de,heldEditCellId:fe,heldShowsCode:pe,toggleHeldShowsCode:me}=xa(le),he;r[11]!==I||r[12]!==a.cells||r[13]!==P?(he=e=>ya({cells:a.cells,cellId:e,showCodeOverrides:P,codeToggleEnabled:I}),r[11]=I,r[12]=a.cells,r[13]=P,r[14]=he):he=r[14];let B=he,V=re?.id??ce?.id,ge;r[15]!==V||r[16]!==pe||r[17]!==ue||r[18]!==B?(ge=ue?pe:B(V),r[15]=V,r[16]=pe,r[17]=ue,r[18]=B,r[19]=ge):ge=r[19];let _e=ge,ve;r[20]!==V||r[21]!==I||r[22]!==a.cells?(ve=I&&V!=null&&(a.cells.get(V)?.showCode??!1),r[20]=V,r[21]=I,r[22]=a.cells,r[23]=ve):ve=r[23];let H=ve,ye;r[24]!==fe||r[25]!==a.cells||r[26]!==s?(ye=e=>ba({cell:e,noOutputIds:s,heldEditCellId:fe,slideConfigs:a.cells}),r[24]=fe,r[25]=a.cells,r[26]=s,r[27]=ye):ye=r[27];let be;r[28]!==i||r[29]!==ye?(be=br({cells:i,getType:ye}),r[28]=i,r[29]=ye,r[30]=be):be=r[30];let U=be,xe;r[31]!==U||r[32]!==i?(xe=xr({composition:U,cells:i,getId:Aa}),r[31]=U,r[32]=i,r[33]=xe):xe=r[33];let{cellToTarget:W,targetToCellIndex:Se}=xe,Ce=a.deck?.transition??`slide`,G=a.deck?.verticalAlign,we;r[34]===G?we=r[35]:(we=Ca(G),r[34]=G,r[35]=we);let Te=we,Ee;if(r[36]===Symbol.for(`react.memo_cache_sentinel`)){let e=new URL(window.location.href);e.searchParams.set(`kiosk`,`true`),e.searchParams.set(`show-chrome`,`false`),Ee=e.toString(),r[36]=Ee}else Ee=r[36];let De=Ee,Oe;r[37]!==Ce||r[38]!==E||r[39]!==b?(Oe={embedded:!0,width:b,height:E,center:!1,minScale:.2,maxScale:2,transition:Ce,keyboardCondition:ja,url:De,scrollActivationWidth:0},r[37]=Ce,r[38]=E,r[39]=b,r[40]=Oe):Oe=r[40];let ke=Oe,Ae;r[41]!==c||r[42]!==W||r[43]!==i?(Ae=e=>{let t=wr({activeIndex:c,cells:i,cellToTarget:W,getId:Ma}),n=t&&Tr(e.getIndices(),t);n&&(e.slide(n.h,n.v,n.f),pa(e))},r[41]=c,r[42]=W,r[43]=i,r[44]=Ae):Ae=r[44];let je=n(Ae),Me;r[45]===je?Me=r[46]:(Me=()=>{let e=v.current;e!=null&&je(e)},r[45]=je,r[46]=Me);let Ne;r[47]!==c||r[48]!==W||r[49]!==je||r[50]!==i?(Ne=[c,W,i,je],r[47]=c,r[48]=W,r[49]=je,r[50]=i,r[51]=Ne):Ne=r[51],(0,L.useEffect)(Me,Ne);let Pe;r[52]!==V||r[53]!==H||r[54]!==ue||r[55]!==me?(Pe=()=>{if(!(V==null||H)){if(ue){me();return}(0,L.startTransition)(()=>F(e=>{let t=new Set(e);return t.has(V)?t.delete(V):t.add(V),t}))}},r[52]=V,r[53]=H,r[54]=ue,r[55]=me,r[56]=Pe):Pe=r[56];let Fe=n(Pe),Ie;r[57]!==I||r[58]!==je||r[59]!==Fe?(Ie=e=>{je(e),I&&e.addKeyBinding({keyCode:67,key:`C`,description:`Toggle code editor`},Fe);let t=e.getSlidesElement()?.closest(`.reveal`);t instanceof HTMLElement&&(t.tabIndex=-1,t.focus({preventScroll:!0}))},r[57]=I,r[58]=je,r[59]=Fe,r[60]=Ie):Ie=r[60];let Le=n(Ie),Re;r[61]!==l||r[62]!==z||r[63]!==Se?(Re=()=>{if(z!=null)return;let e=v.current;if(!e)return;let t=Sr(Se,e.getIndices());t!=null&&l?.(t)},r[61]=l,r[62]=z,r[63]=Se,r[64]=Re):Re=r[64];let ze=n(Re),Be;r[65]!==c||r[66]!==l||r[67]!==z||r[68]!==i?(Be=e=>{if(!z||c==null||w.fromInput(e))return;let t=ga(e);if(t===0)return;e.preventDefault(),e.stopPropagation();let n=c+t;n<0||n>=i.length||l?.(n)},r[65]=c,r[66]=l,r[67]=z,r[68]=i,r[69]=Be):Be=r[69];let Ve=n(Be),He;r[70]===ze?He=r[71]:(He=()=>{ze()},r[70]=ze,r[71]=He);let Ue=n(He),We;r[72]===Symbol.for(`react.memo_cache_sentinel`)?(We={capture:!0},r[72]=We):We=r[72],f(document,`keydown`,Ve,We);let Ge=ue?null:de?`Hidden as there is no output`:`Skipped in presentation`,Ke;r[73]!==pe||r[74]!==ue||r[75]!==z?.id||r[76]!==B?(Ke=ue?pe:B(z?.id),r[73]=pe,r[74]=ue,r[75]=z?.id,r[76]=B,r[77]=Ke):Ke=r[77];let qe=Ke,Je;r[78]!==m||r[79]!==de||r[80]!==qe?(Je=Ea({isNoOutputPreview:de,isEditable:m,showCode:qe}),r[78]=m,r[79]=de,r[80]=qe,r[81]=Je):Je=r[81];let Ye=Je,Xe;r[82]!==E||r[83]!==b?(Xe={width:b,height:E},r[82]=E,r[83]=b,r[84]=Xe):Xe=r[84];let Ze;if(r[85]!==U.stacks||r[86]!==m||r[87]!==a.cells||r[88]!==B||r[89]!==Te){let e;r[91]!==m||r[92]!==a.cells||r[93]!==B||r[94]!==Te?(e=(e,t)=>e.subslides.length===1?(0,q.jsx)(Ta,{subslide:e.subslides[0],resolveShowCode:B,isEditable:m,slideConfigs:a.cells,contentStyle:Te},t):(0,q.jsx)(Ft,{children:e.subslides.map((e,t)=>(0,q.jsx)(Ta,{subslide:e,resolveShowCode:B,isEditable:m,slideConfigs:a.cells,contentStyle:Te},t))},t),r[91]=m,r[92]=a.cells,r[93]=B,r[94]=Te,r[95]=e):e=r[95],Ze=U.stacks.map(e),r[85]=U.stacks,r[86]=m,r[87]=a.cells,r[88]=B,r[89]=Te,r[90]=Ze}else Ze=r[90];let Qe;r[96]!==ee||r[97]!==Le||r[98]!==Ue||r[99]!==ze||r[100]!==ke||r[101]!==Ze?(Qe=(0,q.jsx)(At,{deckRef:v,className:`aspect-video w-full overflow-hidden border rounded bg-background mo-slides-theme prose-slides focus:outline-hidden focus-visible:outline-hidden`,config:ke,onReady:Le,onSlideChange:Ue,onFragmentShown:ze,onFragmentHidden:ze,plugins:ee,children:Ze}),r[96]=ee,r[97]=Le,r[98]=Ue,r[99]=ze,r[100]=ke,r[101]=Ze,r[102]=Qe):Qe=r[102];let $e;r[103]!==m||r[104]!==de||r[105]!==z||r[106]!==Ge||r[107]!==qe||r[108]!==Ye||r[109]!==Te?($e=z&&(0,q.jsxs)(`div`,{className:`absolute inset-0 z-10 border rounded bg-background flex flex-col overflow-hidden`,"aria-label":Ge??void 0,children:[Ge&&(0,q.jsxs)(`div`,{className:`flex items-center gap-1.5 px-3 py-1.5 text-xs text-muted-foreground border-b bg-muted/40`,children:[(0,q.jsx)(N,{className:`h-3.5 w-3.5`}),(0,q.jsx)(`span`,{children:Ge})]}),(0,q.jsx)(`div`,{className:`flex-1 overflow-auto flex`,children:(0,q.jsx)(`div`,{className:Ye?`mo-slide-content flex flex-col gap-3`:`mo-slide-content`,style:Te,children:(0,q.jsx)(Da,{cell:z,isNoOutputPreview:de,isEditable:m,showCode:qe})})})]},z.id),r[103]=m,r[104]=de,r[105]=z,r[106]=Ge,r[107]=qe,r[108]=Ye,r[109]=Te,r[110]=$e):$e=r[110];let et;r[111]!==_e||r[112]!==H||r[113]!==I||r[114]!==Fe?(et=I&&(0,q.jsx)(C,{content:H?`Code is always shown for this slide`:_e?`Hide code (C)`:`Show code (C)`,children:(0,q.jsx)(T,{"data-testid":`marimo-plugin-slides-toggle-code`,variant:`ghost`,size:`icon`,className:y(`text-muted-foreground h-7 w-7`,_e&&`text-foreground bg-muted`,H&&`opacity-50 cursor-not-allowed`),"aria-pressed":_e,"aria-disabled":H,"aria-label":H?`Code always shown`:_e?`Hide code`:`Show code`,onClick:Fe,children:(0,q.jsx)(M,{className:`h-4 w-4`})})}),r[111]=_e,r[112]=H,r[113]=I,r[114]=Fe,r[115]=et):et=r[115];let tt;r[116]===Symbol.for(`react.memo_cache_sentinel`)?(tt=(0,q.jsx)(C,{content:`Fullscreen (F)`,children:(0,q.jsx)(T,{"data-testid":`marimo-plugin-slides-fullscreen`,variant:`ghost`,size:`icon`,className:`text-muted-foreground h-7 w-7`,"aria-label":`Enter fullscreen`,onClick:()=>{v.current?.getViewportElement()?.requestFullscreen().catch(Na)},children:(0,q.jsx)(S,{className:`h-4 w-4`})})}),r[116]=tt):tt=r[116];let nt;r[117]===et?nt=r[118]:(nt=(0,q.jsxs)(`div`,{className:`absolute top-2 right-2 z-20 opacity-0 group-hover:opacity-70 text-muted-foreground transition-opacity`,children:[et,tt]}),r[117]=et,r[118]=nt);let rt;r[119]!==Xe||r[120]!==Qe||r[121]!==$e||r[122]!==nt?(rt=(0,q.jsx)(`div`,{ref:_,className:`h-full w-full min-w-0 flex items-center justify-center overflow-hidden`,children:(0,q.jsxs)(`div`,{className:`group relative`,style:Xe,children:[Qe,$e,nt]})}),r[119]=Xe,r[120]=Qe,r[121]=$e,r[122]=nt,r[123]=rt):rt=r[123];let it=rt;if(u===`read`){let e;return r[124]===it?e=r[125]:(e=(0,q.jsx)(`div`,{className:`flex-1 min-w-0 flex flex-row gap-3`,children:it}),r[124]=it,r[125]=e),e}let at;r[126]===it?at=r[127]:(at=(0,q.jsx)(se,{defaultSize:92,minSize:60,children:it}),r[126]=it,r[127]=at);let ot;r[128]===Symbol.for(`react.memo_cache_sentinel`)?(ot={coarse:12,fine:4},r[128]=ot):ot=r[128];let st;r[129]===D?st=r[130]:(st=(0,q.jsx)(oe,{className:`mo-slides-notes-resize`,hitAreaMargins:ot,disabled:D}),r[129]=D,r[130]=st);let ct=ce?.id,lt;r[131]!==a||r[132]!==o||r[133]!==ct?(lt=(0,q.jsx)(se,{defaultSize:10,minSize:4,collapsible:!0,collapsedSize:4,children:(0,q.jsx)(kr,{layout:a,setLayout:o,cellId:ct})}),r[131]=a,r[132]=o,r[133]=ct,r[134]=lt):lt=r[134];let ut;r[135]!==at||r[136]!==st||r[137]!==lt?(ut=(0,q.jsxs)(ae,{direction:`vertical`,autoSaveId:`marimo:slides:notes-panel`,className:`flex-1 min-w-0`,children:[at,st,lt]}),r[135]=at,r[136]=st,r[137]=lt,r[138]=ut):ut=r[138];let dt;r[139]!==ce||r[140]!==d||r[141]!==a||r[142]!==o?(dt=(0,q.jsx)(O,{configWidth:d,layout:a,setLayout:o,activeConfigCell:ce}),r[139]=ce,r[140]=d,r[141]=a,r[142]=o,r[143]=dt):dt=r[143];let ft;return r[144]!==ut||r[145]!==dt?(ft=(0,q.jsxs)(`div`,{className:`flex-1 min-w-0 flex flex-row gap-3`,children:[ut,dt]}),r[144]=ut,r[145]=dt,r[146]=ft):ft=r[146],ft};function ka(){return new Set}function Aa(e){return e.id}function ja(e){return!w.fromInput(e)}function Ma(e){return e.id}function Na(e){d.error(`Failed to request fullscreen`,e)}export{wa as CellOutputBlock,ba as deckSlideType,Oa as default,Ea as parkedRendersSource,ya as shouldShowCode,xa as useParkedPreview};
1069
+ `);r=`notes`,i=e.map((t,n)=>{let r=n===e.length-1;return t===`---`?(0,q.jsx)(`hr`,{},n):(0,q.jsxs)(L.Fragment,{children:[t,!r&&(0,q.jsx)(`br`,{})]},n)}),t[0]=n,t[1]=r,t[2]=i}else r=t[1],i=t[2];let a;return t[3]!==r||t[4]!==i?(a=(0,q.jsx)(`aside`,{className:r,children:i}),t[3]=r,t[4]=i,t[5]=a):a=t[5],a};function ya(e){let{cells:t,cellId:n,showCodeOverrides:r,codeToggleEnabled:i}=e;return n==null||!i?!1:(t.get(n)?.showCode??!1)||r.has(n)}function ba(e){let{cell:t,noOutputIds:n,heldEditCellId:r,slideConfigs:i}=e;return n.has(t.id)||t.id===r?`skip`:i.get(t.id)?.type??`slide`}function xa(e){let t=(0,R.c)(15),{activeCell:r,slideConfigs:i,noOutputIds:a}=e,o=r?.id??null,s;t[0]!==r||t[1]!==a?(s=r!=null&&a.has(r.id),t[0]=r,t[1]=a,t[2]=s):s=t[2];let c=s,l=r!=null&&i.get(r.id)?.type===`skip`||c,u;t[3]===o?u=t[4]:(u={activeCellId:o,cellId:null},t[3]=o,t[4]=u);let[d,f]=(0,L.useState)(u),p=d.cellId;d.activeCellId===o?c&&p!==o&&(p=o,f({activeCellId:o,cellId:p})):(p=c?o:null,f({activeCellId:o,cellId:p}));let m=!l&&o!=null&&p===o,h=m?p:null,g;t[5]===h?g=t[6]:(g={cellId:h,show:!0},t[5]=h,t[6]=g);let[_,v]=(0,L.useState)(g),y=_.show;_.cellId!==h&&(y=!0,v({cellId:h,show:!0}));let b;t[7]===Symbol.for(`react.memo_cache_sentinel`)?(b=()=>v(Sa),t[7]=b):b=t[7];let x=n(b),S=l||m?r??null:null,C;return t[8]!==h||t[9]!==y||t[10]!==m||t[11]!==c||t[12]!==S||t[13]!==x?(C={parkedPreviewCell:S,isHeldEdit:m,isNoOutputPreview:c,heldEditCellId:h,heldShowsCode:y,toggleHeldShowsCode:x},t[8]=h,t[9]=y,t[10]=m,t[11]=c,t[12]=S,t[13]=x,t[14]=C):C=t[14],C}function Sa(e){return{...e,show:!e.show}}function Ca(e){switch(e??`center`){case`top`:return{margin:`0 20px auto`};case`bottom`:return{margin:`auto 20px 0`};default:return{margin:`auto 20px`}}}var wa=e=>{let t=(0,R.c)(13),{cell:n}=e,r;t[0]!==n.id||t[1]!==n.name?(r=k(n.id,n.name),t[0]=n.id,t[1]=n.name,t[2]=r):r=t[2];let i=n.id,a=n.status,o=n.output,s;t[3]===n?s=t[4]:(s=l(n,!1),t[3]=n,t[4]=s);let c;t[5]!==n.id||t[6]!==n.output||t[7]!==n.status||t[8]!==s?(c=(0,q.jsx)(D,{cellId:i,status:a,output:o,stale:s}),t[5]=n.id,t[6]=n.output,t[7]=n.status,t[8]=s,t[9]=c):c=t[9];let u;return t[10]!==r||t[11]!==c?(u=(0,q.jsx)(`div`,{className:`flex flex-col`,...r,children:c}),t[10]=r,t[11]=c,t[12]=u):u=t[12],u},Ta=e=>{let t=(0,R.c)(24),{subslide:n,resolveShowCode:r,isEditable:i,slideConfigs:a,contentStyle:o}=e,s,c,l,u,d,f;if(t[0]!==o||t[1]!==i||t[2]!==r||t[3]!==a||t[4]!==n){let{slideLevel:e,cumulativeByBlock:p}=Nr(n,a);l=e;let m=n.blocks.some(e=>e.cells.some(e=>r(e.id)));c=Pt,s=yr,u=m?`mo-slide-content flex flex-col gap-3`:`mo-slide-content`,d=o,f=n.blocks.map((e,t)=>{let n=e.cells.map(e=>r(e.id)?i?(0,q.jsx)(Er,{cell:e},e.id):(0,q.jsx)(Dr,{cell:e},e.id):(0,q.jsx)(wa,{cell:e},e.id));if(e.isFragment){let e=p.get(t);return(0,q.jsxs)(fr,{as:`div`,children:[n,e&&(0,q.jsx)(va,{text:e})]},t)}return(0,q.jsx)(L.Fragment,{children:n},t)}),t[0]=o,t[1]=i,t[2]=r,t[3]=a,t[4]=n,t[5]=s,t[6]=c,t[7]=l,t[8]=u,t[9]=d,t[10]=f}else s=t[5],c=t[6],l=t[7],u=t[8],d=t[9],f=t[10];let p;t[11]!==u||t[12]!==d||t[13]!==f?(p=(0,q.jsx)(`div`,{className:u,style:d,children:f}),t[11]=u,t[12]=d,t[13]=f,t[14]=p):p=t[14];let m;t[15]!==s||t[16]!==p?(m=(0,q.jsx)(s,{children:p}),t[15]=s,t[16]=p,t[17]=m):m=t[17];let h;t[18]===l?h=t[19]:(h=l&&(0,q.jsx)(va,{text:l}),t[18]=l,t[19]=h);let g;return t[20]!==c||t[21]!==m||t[22]!==h?(g=(0,q.jsxs)(c,{children:[m,h]}),t[20]=c,t[21]=m,t[22]=h,t[23]=g):g=t[23],g};function Ea(e){let{isNoOutputPreview:t,isEditable:n,showCode:r}=e;return t&&n||r}var Da=e=>{let t=(0,R.c)(5),{cell:n,isNoOutputPreview:r,isEditable:i,showCode:a}=e;if(Ea({isNoOutputPreview:r,isEditable:i,showCode:a})){let e;return t[0]!==n||t[1]!==i?(e=i?(0,q.jsx)(Er,{cell:n}):(0,q.jsx)(Dr,{cell:n}),t[0]=n,t[1]=i,t[2]=e):e=t[2],e}let o;return t[3]===n?o=t[4]:(o=(0,q.jsx)(wa,{cell:n}),t[3]=n,t[4]=o),o},Oa=e=>{let r=(0,R.c)(147),{slideCells:i,layout:a,setLayout:o,noOutputIds:s,activeIndex:c,onSlideChange:l,mode:u,configWidth:d,isEditable:f}=e,m=f!==void 0&&f,_=(0,L.useRef)(null),v=(0,L.useRef)(null),{width:b,height:E}=_a(_),D=x()!=null,k=t(g),j;r[0]===k?j=r[1]:(j=k?[]:[da],r[0]=k,r[1]=j);let ee=j,[P,F]=(0,L.useState)(ka),te=A(i),ne;r[2]===te?ne=r[3]:(ne=!p()&&te,r[2]=te,r[3]=ne);let I=ne,re=c==null?void 0:i[c],ie;r[4]!==re||r[5]!==i?(ie=re??i.at(0),r[4]=re,r[5]=i,r[6]=ie):ie=r[6];let ce=ie,le;r[7]!==re||r[8]!==a.cells||r[9]!==s?(le={activeCell:re,slideConfigs:a.cells,noOutputIds:s},r[7]=re,r[8]=a.cells,r[9]=s,r[10]=le):le=r[10];let{parkedPreviewCell:z,isHeldEdit:ue,isNoOutputPreview:de,heldEditCellId:fe,heldShowsCode:pe,toggleHeldShowsCode:me}=xa(le),he;r[11]!==I||r[12]!==a.cells||r[13]!==P?(he=e=>ya({cells:a.cells,cellId:e,showCodeOverrides:P,codeToggleEnabled:I}),r[11]=I,r[12]=a.cells,r[13]=P,r[14]=he):he=r[14];let B=he,V=re?.id??ce?.id,ge;r[15]!==V||r[16]!==pe||r[17]!==ue||r[18]!==B?(ge=ue?pe:B(V),r[15]=V,r[16]=pe,r[17]=ue,r[18]=B,r[19]=ge):ge=r[19];let _e=ge,ve;r[20]!==V||r[21]!==I||r[22]!==a.cells?(ve=I&&V!=null&&(a.cells.get(V)?.showCode??!1),r[20]=V,r[21]=I,r[22]=a.cells,r[23]=ve):ve=r[23];let H=ve,ye;r[24]!==fe||r[25]!==a.cells||r[26]!==s?(ye=e=>ba({cell:e,noOutputIds:s,heldEditCellId:fe,slideConfigs:a.cells}),r[24]=fe,r[25]=a.cells,r[26]=s,r[27]=ye):ye=r[27];let be;r[28]!==i||r[29]!==ye?(be=br({cells:i,getType:ye}),r[28]=i,r[29]=ye,r[30]=be):be=r[30];let U=be,xe;r[31]!==U||r[32]!==i?(xe=xr({composition:U,cells:i,getId:Aa}),r[31]=U,r[32]=i,r[33]=xe):xe=r[33];let{cellToTarget:W,targetToCellIndex:Se}=xe,Ce=a.deck?.transition??`slide`,G=a.deck?.verticalAlign,we;r[34]===G?we=r[35]:(we=Ca(G),r[34]=G,r[35]=we);let Te=we,Ee;if(r[36]===Symbol.for(`react.memo_cache_sentinel`)){let e=new URL(window.location.href);e.searchParams.set(`kiosk`,`true`),e.searchParams.set(`show-chrome`,`false`),Ee=e.toString(),r[36]=Ee}else Ee=r[36];let De=Ee,Oe;r[37]!==Ce||r[38]!==E||r[39]!==b?(Oe={embedded:!0,width:b,height:E,center:!1,minScale:.2,maxScale:2,transition:Ce,keyboardCondition:ja,url:De,scrollActivationWidth:0},r[37]=Ce,r[38]=E,r[39]=b,r[40]=Oe):Oe=r[40];let ke=Oe,Ae;r[41]!==c||r[42]!==W||r[43]!==i?(Ae=e=>{let t=wr({activeIndex:c,cells:i,cellToTarget:W,getId:Ma}),n=t&&Tr(e.getIndices(),t);n&&(e.slide(n.h,n.v,n.f),pa(e))},r[41]=c,r[42]=W,r[43]=i,r[44]=Ae):Ae=r[44];let je=n(Ae),Me;r[45]===je?Me=r[46]:(Me=()=>{let e=v.current;e!=null&&je(e)},r[45]=je,r[46]=Me);let Ne;r[47]!==c||r[48]!==W||r[49]!==je||r[50]!==i?(Ne=[c,W,i,je],r[47]=c,r[48]=W,r[49]=je,r[50]=i,r[51]=Ne):Ne=r[51],(0,L.useEffect)(Me,Ne);let Pe;r[52]!==V||r[53]!==H||r[54]!==ue||r[55]!==me?(Pe=()=>{if(!(V==null||H)){if(ue){me();return}(0,L.startTransition)(()=>F(e=>{let t=new Set(e);return t.has(V)?t.delete(V):t.add(V),t}))}},r[52]=V,r[53]=H,r[54]=ue,r[55]=me,r[56]=Pe):Pe=r[56];let Fe=n(Pe),Ie;r[57]!==I||r[58]!==je||r[59]!==Fe?(Ie=e=>{je(e),I&&e.addKeyBinding({keyCode:67,key:`C`,description:`Toggle code editor`},Fe);let t=e.getSlidesElement()?.closest(`.reveal`);t instanceof HTMLElement&&(t.tabIndex=-1,t.focus({preventScroll:!0}))},r[57]=I,r[58]=je,r[59]=Fe,r[60]=Ie):Ie=r[60];let Le=n(Ie),Re;r[61]!==l||r[62]!==z||r[63]!==Se?(Re=()=>{if(z!=null)return;let e=v.current;if(!e)return;let t=Sr(Se,e.getIndices());t!=null&&l?.(t)},r[61]=l,r[62]=z,r[63]=Se,r[64]=Re):Re=r[64];let ze=n(Re),Be;r[65]!==c||r[66]!==l||r[67]!==z||r[68]!==i?(Be=e=>{if(!z||c==null||w.fromInput(e))return;let t=ga(e);if(t===0)return;e.preventDefault(),e.stopPropagation();let n=c+t;n<0||n>=i.length||l?.(n)},r[65]=c,r[66]=l,r[67]=z,r[68]=i,r[69]=Be):Be=r[69];let Ve=n(Be),He;r[70]===ze?He=r[71]:(He=()=>{ze()},r[70]=ze,r[71]=He);let Ue=n(He),We;r[72]===Symbol.for(`react.memo_cache_sentinel`)?(We={capture:!0},r[72]=We):We=r[72],h(document,`keydown`,Ve,We);let Ge=ue?null:de?`Hidden as there is no output`:`Skipped in presentation`,Ke;r[73]!==pe||r[74]!==ue||r[75]!==z?.id||r[76]!==B?(Ke=ue?pe:B(z?.id),r[73]=pe,r[74]=ue,r[75]=z?.id,r[76]=B,r[77]=Ke):Ke=r[77];let qe=Ke,Je;r[78]!==m||r[79]!==de||r[80]!==qe?(Je=Ea({isNoOutputPreview:de,isEditable:m,showCode:qe}),r[78]=m,r[79]=de,r[80]=qe,r[81]=Je):Je=r[81];let Ye=Je,Xe;r[82]!==E||r[83]!==b?(Xe={width:b,height:E},r[82]=E,r[83]=b,r[84]=Xe):Xe=r[84];let Ze;if(r[85]!==U.stacks||r[86]!==m||r[87]!==a.cells||r[88]!==B||r[89]!==Te){let e;r[91]!==m||r[92]!==a.cells||r[93]!==B||r[94]!==Te?(e=(e,t)=>e.subslides.length===1?(0,q.jsx)(Ta,{subslide:e.subslides[0],resolveShowCode:B,isEditable:m,slideConfigs:a.cells,contentStyle:Te},t):(0,q.jsx)(Ft,{children:e.subslides.map((e,t)=>(0,q.jsx)(Ta,{subslide:e,resolveShowCode:B,isEditable:m,slideConfigs:a.cells,contentStyle:Te},t))},t),r[91]=m,r[92]=a.cells,r[93]=B,r[94]=Te,r[95]=e):e=r[95],Ze=U.stacks.map(e),r[85]=U.stacks,r[86]=m,r[87]=a.cells,r[88]=B,r[89]=Te,r[90]=Ze}else Ze=r[90];let Qe;r[96]!==ee||r[97]!==Le||r[98]!==Ue||r[99]!==ze||r[100]!==ke||r[101]!==Ze?(Qe=(0,q.jsx)(At,{deckRef:v,className:`aspect-video w-full overflow-hidden border rounded bg-background mo-slides-theme prose-slides focus:outline-hidden focus-visible:outline-hidden`,config:ke,onReady:Le,onSlideChange:Ue,onFragmentShown:ze,onFragmentHidden:ze,plugins:ee,children:Ze}),r[96]=ee,r[97]=Le,r[98]=Ue,r[99]=ze,r[100]=ke,r[101]=Ze,r[102]=Qe):Qe=r[102];let $e;r[103]!==m||r[104]!==de||r[105]!==z||r[106]!==Ge||r[107]!==qe||r[108]!==Ye||r[109]!==Te?($e=z&&(0,q.jsxs)(`div`,{className:`absolute inset-0 z-10 border rounded bg-background flex flex-col overflow-hidden`,"aria-label":Ge??void 0,children:[Ge&&(0,q.jsxs)(`div`,{className:`flex items-center gap-1.5 px-3 py-1.5 text-xs text-muted-foreground border-b bg-muted/40`,children:[(0,q.jsx)(N,{className:`h-3.5 w-3.5`}),(0,q.jsx)(`span`,{children:Ge})]}),(0,q.jsx)(`div`,{className:`flex-1 overflow-auto flex`,children:(0,q.jsx)(`div`,{className:Ye?`mo-slide-content flex flex-col gap-3`:`mo-slide-content`,style:Te,children:(0,q.jsx)(Da,{cell:z,isNoOutputPreview:de,isEditable:m,showCode:qe})})})]},z.id),r[103]=m,r[104]=de,r[105]=z,r[106]=Ge,r[107]=qe,r[108]=Ye,r[109]=Te,r[110]=$e):$e=r[110];let et;r[111]!==_e||r[112]!==H||r[113]!==I||r[114]!==Fe?(et=I&&(0,q.jsx)(C,{content:H?`Code is always shown for this slide`:_e?`Hide code (C)`:`Show code (C)`,children:(0,q.jsx)(T,{"data-testid":`marimo-plugin-slides-toggle-code`,variant:`ghost`,size:`icon`,className:y(`text-muted-foreground h-7 w-7`,_e&&`text-foreground bg-muted`,H&&`opacity-50 cursor-not-allowed`),"aria-pressed":_e,"aria-disabled":H,"aria-label":H?`Code always shown`:_e?`Hide code`:`Show code`,onClick:Fe,children:(0,q.jsx)(M,{className:`h-4 w-4`})})}),r[111]=_e,r[112]=H,r[113]=I,r[114]=Fe,r[115]=et):et=r[115];let tt;r[116]===Symbol.for(`react.memo_cache_sentinel`)?(tt=(0,q.jsx)(C,{content:`Fullscreen (F)`,children:(0,q.jsx)(T,{"data-testid":`marimo-plugin-slides-fullscreen`,variant:`ghost`,size:`icon`,className:`text-muted-foreground h-7 w-7`,"aria-label":`Enter fullscreen`,onClick:()=>{v.current?.getViewportElement()?.requestFullscreen().catch(Na)},children:(0,q.jsx)(S,{className:`h-4 w-4`})})}),r[116]=tt):tt=r[116];let nt;r[117]===et?nt=r[118]:(nt=(0,q.jsxs)(`div`,{className:`absolute top-2 right-2 z-20 opacity-0 group-hover:opacity-70 text-muted-foreground transition-opacity`,children:[et,tt]}),r[117]=et,r[118]=nt);let rt;r[119]!==Xe||r[120]!==Qe||r[121]!==$e||r[122]!==nt?(rt=(0,q.jsx)(`div`,{ref:_,className:`h-full w-full min-w-0 flex items-center justify-center overflow-hidden`,children:(0,q.jsxs)(`div`,{className:`group relative`,style:Xe,children:[Qe,$e,nt]})}),r[119]=Xe,r[120]=Qe,r[121]=$e,r[122]=nt,r[123]=rt):rt=r[123];let it=rt;if(u===`read`){let e;return r[124]===it?e=r[125]:(e=(0,q.jsx)(`div`,{className:`flex-1 min-w-0 flex flex-row gap-3`,children:it}),r[124]=it,r[125]=e),e}let at;r[126]===it?at=r[127]:(at=(0,q.jsx)(se,{defaultSize:92,minSize:60,children:it}),r[126]=it,r[127]=at);let ot;r[128]===Symbol.for(`react.memo_cache_sentinel`)?(ot={coarse:12,fine:4},r[128]=ot):ot=r[128];let st;r[129]===D?st=r[130]:(st=(0,q.jsx)(oe,{className:`mo-slides-notes-resize`,hitAreaMargins:ot,disabled:D}),r[129]=D,r[130]=st);let ct=ce?.id,lt;r[131]!==a||r[132]!==o||r[133]!==ct?(lt=(0,q.jsx)(se,{defaultSize:10,minSize:4,collapsible:!0,collapsedSize:4,children:(0,q.jsx)(kr,{layout:a,setLayout:o,cellId:ct})}),r[131]=a,r[132]=o,r[133]=ct,r[134]=lt):lt=r[134];let ut;r[135]!==at||r[136]!==st||r[137]!==lt?(ut=(0,q.jsxs)(ae,{direction:`vertical`,autoSaveId:`marimo:slides:notes-panel`,className:`flex-1 min-w-0`,children:[at,st,lt]}),r[135]=at,r[136]=st,r[137]=lt,r[138]=ut):ut=r[138];let dt;r[139]!==ce||r[140]!==d||r[141]!==a||r[142]!==o?(dt=(0,q.jsx)(O,{configWidth:d,layout:a,setLayout:o,activeConfigCell:ce}),r[139]=ce,r[140]=d,r[141]=a,r[142]=o,r[143]=dt):dt=r[143];let ft;return r[144]!==ut||r[145]!==dt?(ft=(0,q.jsxs)(`div`,{className:`flex-1 min-w-0 flex flex-row gap-3`,children:[ut,dt]}),r[144]=ut,r[145]=dt,r[146]=ft):ft=r[146],ft};function ka(){return new Set}function Aa(e){return e.id}function ja(e){return!w.fromInput(e)}function Ma(e){return e.id}function Na(e){m.error(`Failed to request fullscreen`,e)}export{wa as CellOutputBlock,ba as deckSlideType,Oa as default,Ea as parkedRendersSource,ya as shouldShowCode,xa as useParkedPreview};
@@ -1 +1 @@
1
- import{a as e}from"./rolldown-runtime-B0Z9INg1.js";import{f as t,l as n}from"./useEvent-xfs0Sn4r.js";import{t as r}from"./react-CBDbhulC.js";import{E as i,b as a,h as o,mo as s}from"./cells-DfJw5iuV.js";import{t as c}from"./compiler-runtime-CYIjoINj.js";import{C as l}from"./utils-R_pHe-RB.js";import{n as u}from"./constants-BDbGiS7O.js";import{N as d,l as f,m as p,v as m}from"./config-CUBl5qBg.js";import{t as h}from"./cn-ldLVeaqm.js";import{t as g}from"./jsx-runtime-B74pBk57.js";import{N as _,Pt as v}from"./JsonOutput-D0JlHn1Z.js";import{n as y}from"./download-4OuOU5F0.js";import{n as b,t as x}from"./button-BMBznEru.js";import{r as S}from"./requests-C6_IaFh7.js";import{t as C}from"./arrow-left-DrqK6gPp.js";import{t as w}from"./copy-BMXKNElG.js";import{d as T,i as E,l as D,n as O,r as k,t as A,u as j}from"./panels-BbkuRtEi.js";import{E as M,M as N,O as P,T as ee,j as F,w as I}from"./write-secret-modal-BG_B6y1P.js";import{t as L}from"./spinner-Ck-Hgfvj.js";import{t as R}from"./use-toast-DpWHUGuF.js";import{t as z}from"./session-CEdta5_Q.js";import{n as B}from"./copy-Cg05mM3C.js";import{t as V}from"./share-C2MPy_VX.js";import{a as H}from"./cell-link-DqJmxVu3.js";import{n as U,t as W}from"./react-resizable-panels.browser.esm-BSRAHC4P.js";import{n as G,t as K}from"./marimo-icons-C3KxMV9A.js";var q=c(),J=e(r(),1),Y=g(),X=t(e=>e(o)||!p(e(m).state)),Z=e=>{let t=(0,q.c)(20),{appConfig:r}=e,{setCells:o}=i(),{sendComponentValues:s}=S(),c;t[0]===s?c=t[1]:(c=()=>(k.INSTANCE.start(s),Q),t[0]=s,t[1]=c);let l;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(l=[],t[2]=l):l=t[2],(0,J.useEffect)(c,l);let u;t[3]===Symbol.for(`react.memo_cache_sentinel`)?(u=z(),t[3]=u):u=t[3];let d;t[4]===o?d=t[5]:(d={autoInstantiate:!0,setCells:o,sessionId:u},t[4]=o,t[5]=d);let{connection:f,reconnect:p}=O(d),m=n(a),g;if(t[6]===Symbol.for(`react.memo_cache_sentinel`)){bb0:{if(typeof window>`u`){g=null;break bb0}let e=new URL(window.location.href);if(!e.searchParams.has(`file`)){g=null;break bb0}e.searchParams.delete(`file`);let t=e.searchParams.toString();g=t?`${e.pathname}?${t}`:e.pathname}t[6]=g}else g=t[6];let _=g,v;t[7]===Symbol.for(`react.memo_cache_sentinel`)?(v=_&&(0,Y.jsx)(`div`,{className:`flex items-center px-6 pt-4 sm:-mt-8`,children:(0,Y.jsxs)(`a`,{href:_,"aria-label":`Back to gallery`,className:h(b({variant:`text`,size:`sm`}),`gap-2 px-0 text-muted-foreground hover:text-foreground`),children:[(0,Y.jsx)(C,{className:`size-4`,"aria-hidden":!0}),(0,Y.jsx)(`span`,{children:`Back`})]})}),t[7]=v):v=t[7];let y;t[8]===f?y=t[9]:(y=(0,Y.jsx)(T,{connection:f,className:`sm:pt-8`,children:v}),t[8]=f,t[9]=y);let x;t[10]===Symbol.for(`react.memo_cache_sentinel`)?(x=(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsx)(L,{className:`mx-auto`}),(0,Y.jsx)(`p`,{className:`text-center text-sm text-muted-foreground mt-2`,children:`Connecting...`})]}),t[10]=x):x=t[10];let w;t[11]===r?w=t[12]:(w=(0,Y.jsx)(j,{requires:X,delay:2e3,fallback:x,children:(0,Y.jsx)(E,{appConfig:r,mode:`read`})}),t[11]=r,t[12]=w);let A;return t[13]!==r.width||t[14]!==f||t[15]!==m||t[16]!==p||t[17]!==y||t[18]!==w?(A=(0,Y.jsxs)(D,{connection:f,isRunning:m,width:r.width,onReconnect:p,children:[y,w]}),t[13]=r.width,t[14]=f,t[15]=m,t[16]=p,t[17]=y,t[18]=w,t[19]=A):A=t[19],A};function Q(){k.INSTANCE.stop()}var $=()=>{let e=(0,q.c)(3),t=n(s);if(!f()||!t)return null;let r;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(r=(0,Y.jsxs)(`span`,{children:[`Static`,` `,(0,Y.jsx)(`a`,{href:u.githubPage,target:`_blank`,className:`text-(--sky-11) font-medium underline`,children:`marimo`}),` `,`notebook - Run or edit for full interactivity`]}),e[0]=r):r=e[0];let i;return e[1]===t?i=e[2]:(i=(0,Y.jsxs)(`div`,{className:`px-4 py-2 bg-(--sky-2) border-b border-(--sky-7) text-(--sky-11) flex justify-between items-center gap-4 print:hidden text-sm`,"data-testid":`static-notebook-banner`,children:[r,(0,Y.jsx)(`span`,{className:`shrink-0`,children:(0,Y.jsx)(te,{code:t})})]}),e[1]=t,e[2]=i),i},te=e=>{let t=(0,q.c)(36),{code:n}=e,r=H()||`notebook.py`,i=r.lastIndexOf(`/`);i!==-1&&(r=r.slice(i+1));let[a]=l(),o=a.sharing?.molab!==!1,s=window.location.href,c;t[0]===n?c=t[1]:(c=V({code:n,baseUrl:`${u.molab}/new`}),t[0]=n,t[1]=c);let d=c,f;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(f=(0,Y.jsx)(N,{asChild:!0,children:(0,Y.jsx)(x,{"data-testid":`static-notebook-dialog-trigger`,variant:`outline`,size:`xs`,children:`Run or Edit`})}),t[2]=f):f=t[2];let p;t[3]===r?p=t[4]:(p=(0,Y.jsx)(F,{children:r}),t[3]=r,t[4]=p);let m;t[5]===Symbol.for(`react.memo_cache_sentinel`)?(m=(0,Y.jsxs)(`p`,{children:[`This is a static`,` `,(0,Y.jsx)(`a`,{href:u.githubPage,target:`_blank`,className:`text-(--sky-11) hover:underline font-medium`,children:`marimo`}),` `,`notebook. To run interactively:`]}),t[5]=m):m=t[5];let h;t[6]===Symbol.for(`react.memo_cache_sentinel`)?(h=(0,Y.jsx)(`br`,{}),t[6]=h):h=t[6];let g;t[7]===r?g=t[8]:(g=(0,Y.jsx)(`div`,{className:`rounded-lg p-3 border bg-(--sky-2) border-(--sky-7)`,children:(0,Y.jsxs)(`div`,{className:`font-mono text-(--sky-11) leading-relaxed`,children:[`pip install marimo`,h,`marimo edit `,r]})}),t[7]=r,t[8]=g);let _;t[9]===Symbol.for(`react.memo_cache_sentinel`)?(_=!s.endsWith(`.html`)&&(0,Y.jsxs)(`div`,{className:`rounded-lg p-3 border bg-(--sky-2) border-(--sky-7)`,children:[(0,Y.jsx)(`div`,{className:`text-sm text-(--sky-12) mb-1`,children:`Or run directly from URL:`}),(0,Y.jsxs)(`div`,{className:`font-mono text-(--sky-11) break-all`,children:[`marimo edit `,window.location.href]})]}),t[9]=_):_=t[9];let b;t[10]!==o||t[11]!==d?(b=o&&(0,Y.jsxs)(`div`,{className:`pt-3 border-t flex gap-2 items-center`,children:[(0,Y.jsx)(x,{asChild:!0,variant:`outline`,size:`xs`,className:`shrink-0`,children:(0,Y.jsxs)(`a`,{href:d,target:`_blank`,rel:`noopener noreferrer`,children:[(0,Y.jsx)(G,{size:12,strokeWidth:1.5,className:`mr-1.5 mt-px text-(--grass-11)`}),`Open in molab`]})}),(0,Y.jsxs)(`p`,{className:`text-sm text-(--sky-12)`,children:[`Run this notebook in`,` `,(0,Y.jsx)(`span`,{className:`font-semibold`,children:`molab`}),`, marimo's cloud-hosted notebook platform.`]})]}),t[10]=o,t[11]=d,t[12]=b):b=t[12];let S;t[13]!==g||t[14]!==b?(S=(0,Y.jsxs)(M,{className:`pt-3 text-left space-y-3`,children:[m,g,_,b]}),t[13]=g,t[14]=b,t[15]=S):S=t[15];let C;t[16]!==p||t[17]!==S?(C=(0,Y.jsxs)(P,{children:[p,S]}),t[16]=p,t[17]=S,t[18]=C):C=t[18];let T;t[19]===n?T=t[20]:(T=async()=>{await B(n),R({title:`Copied to clipboard`})},t[19]=n,t[20]=T);let E;t[21]===Symbol.for(`react.memo_cache_sentinel`)?(E=(0,Y.jsx)(w,{className:`w-3 h-3 mr-2`}),t[21]=E):E=t[21];let D;t[22]===T?D=t[23]:(D=(0,Y.jsxs)(x,{"data-testid":`copy-static-notebook-dialog-button`,variant:`outline`,size:`sm`,onClick:T,children:[E,`Copy code`]}),t[22]=T,t[23]=D);let O;t[24]!==n||t[25]!==r?(O=()=>{y(new Blob([n],{type:`text/plain`}),r)},t[24]=n,t[25]=r,t[26]=O):O=t[26];let k;t[27]===Symbol.for(`react.memo_cache_sentinel`)?(k=(0,Y.jsx)(v,{className:`w-3 h-3 mr-2`}),t[27]=k):k=t[27];let A;t[28]===O?A=t[29]:(A=(0,Y.jsxs)(x,{"data-testid":`download-static-notebook-dialog-button`,variant:`outline`,size:`sm`,onClick:O,children:[k,`Download`]}),t[28]=O,t[29]=A);let j;t[30]!==D||t[31]!==A?(j=(0,Y.jsxs)(`div`,{className:`flex gap-3 pt-2`,children:[D,A]}),t[30]=D,t[31]=A,t[32]=j):j=t[32];let L;return t[33]!==C||t[34]!==j?(L=(0,Y.jsxs)(I,{children:[f,(0,Y.jsxs)(ee,{children:[C,j]})]}),t[33]=C,t[34]=j,t[35]=L):L=t[35],L},ne=d()||f(),re=e=>{let t=(0,q.c)(9),n;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,Y.jsx)($,{}),t[0]=n):n=t[0];let r;t[1]===e.appConfig?r=t[2]:(r=(0,Y.jsx)(Z,{appConfig:e.appConfig}),t[1]=e.appConfig,t[2]=r);let i;t[3]===Symbol.for(`react.memo_cache_sentinel`)?(i=ne&&(0,Y.jsx)(ie,{}),t[3]=i):i=t[3];let a;t[4]===r?a=t[5]:(a=(0,Y.jsxs)(W,{children:[n,r,i]}),t[4]=r,t[5]=a);let o;t[6]===Symbol.for(`react.memo_cache_sentinel`)?(o=(0,Y.jsx)(_,{}),t[6]=o):o=t[6];let s;return t[7]===a?s=t[8]:(s=(0,Y.jsx)(A,{children:(0,Y.jsxs)(U,{direction:`horizontal`,autoSaveId:`marimo:chrome:v1:run1`,children:[a,o]})}),t[7]=a,t[8]=s),s},ie=()=>{let e=(0,q.c)(1),t;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,Y.jsx)(`div`,{className:`fixed bottom-0 right-0 z-50 print:hidden`,"data-testid":`watermark`,children:(0,Y.jsxs)(`a`,{href:u.githubPage,target:`_blank`,className:`text-sm text-(--grass-11) font-bold tracking-wide transition-colors bg-(--grass-4) hover:bg-(--grass-5) border-t border-l border-(--grass-8) px-3 py-1 rounded-tl-md flex items-center gap-2`,children:[(0,Y.jsx)(`span`,{children:`made with marimo`}),(0,Y.jsx)(K,{className:`h-4 w-auto`})]})}),e[0]=t):t=e[0],t};export{re as default};
1
+ import{a as e}from"./rolldown-runtime-B0Z9INg1.js";import{f as t,l as n}from"./useEvent-xfs0Sn4r.js";import{t as r}from"./react-CBDbhulC.js";import{E as i,b as a,h as o,mo as s}from"./cells-v0dAmt79.js";import{t as c}from"./compiler-runtime-CYIjoINj.js";import{w as l}from"./utils-CUZQNAWJ.js";import{n as u}from"./constants-BDbGiS7O.js";import{N as d,l as f,m as p,v as m}from"./config-DaNyNpZL.js";import{t as h}from"./cn-ldLVeaqm.js";import{t as g}from"./jsx-runtime-B74pBk57.js";import{N as _,Pt as v}from"./JsonOutput-CucHb-Xd.js";import{n as y}from"./download-D-WORhyV.js";import{n as b,t as x}from"./button-BMBznEru.js";import{r as S}from"./requests-C6_IaFh7.js";import{t as C}from"./arrow-left-DrqK6gPp.js";import{t as w}from"./copy-BMXKNElG.js";import{d as T,i as E,l as D,n as O,r as k,t as A,u as j}from"./panels-ZCSZ8vcg.js";import{E as M,M as N,O as P,T as ee,j as F,w as I}from"./write-secret-modal-BG_B6y1P.js";import{t as L}from"./spinner-Ck-Hgfvj.js";import{t as R}from"./use-toast-DpWHUGuF.js";import{t as z}from"./session-CEdta5_Q.js";import{n as B}from"./copy-Cg05mM3C.js";import{t as V}from"./share-C2MPy_VX.js";import{a as H}from"./cell-link-q2lv7md_.js";import{n as U,t as W}from"./react-resizable-panels.browser.esm-BSRAHC4P.js";import{n as G,t as K}from"./marimo-icons-C3KxMV9A.js";var q=c(),J=e(r(),1),Y=g(),X=t(e=>e(o)||!p(e(m).state)),Z=e=>{let t=(0,q.c)(20),{appConfig:r}=e,{setCells:o}=i(),{sendComponentValues:s}=S(),c;t[0]===s?c=t[1]:(c=()=>(k.INSTANCE.start(s),Q),t[0]=s,t[1]=c);let l;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(l=[],t[2]=l):l=t[2],(0,J.useEffect)(c,l);let u;t[3]===Symbol.for(`react.memo_cache_sentinel`)?(u=z(),t[3]=u):u=t[3];let d;t[4]===o?d=t[5]:(d={autoInstantiate:!0,setCells:o,sessionId:u},t[4]=o,t[5]=d);let{connection:f,reconnect:p}=O(d),m=n(a),g;if(t[6]===Symbol.for(`react.memo_cache_sentinel`)){bb0:{if(typeof window>`u`){g=null;break bb0}let e=new URL(window.location.href);if(!e.searchParams.has(`file`)){g=null;break bb0}e.searchParams.delete(`file`);let t=e.searchParams.toString();g=t?`${e.pathname}?${t}`:e.pathname}t[6]=g}else g=t[6];let _=g,v;t[7]===Symbol.for(`react.memo_cache_sentinel`)?(v=_&&(0,Y.jsx)(`div`,{className:`flex items-center px-6 pt-4 sm:-mt-8`,children:(0,Y.jsxs)(`a`,{href:_,"aria-label":`Back to gallery`,className:h(b({variant:`text`,size:`sm`}),`gap-2 px-0 text-muted-foreground hover:text-foreground`),children:[(0,Y.jsx)(C,{className:`size-4`,"aria-hidden":!0}),(0,Y.jsx)(`span`,{children:`Back`})]})}),t[7]=v):v=t[7];let y;t[8]===f?y=t[9]:(y=(0,Y.jsx)(T,{connection:f,className:`sm:pt-8`,children:v}),t[8]=f,t[9]=y);let x;t[10]===Symbol.for(`react.memo_cache_sentinel`)?(x=(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsx)(L,{className:`mx-auto`}),(0,Y.jsx)(`p`,{className:`text-center text-sm text-muted-foreground mt-2`,children:`Connecting...`})]}),t[10]=x):x=t[10];let w;t[11]===r?w=t[12]:(w=(0,Y.jsx)(j,{requires:X,delay:2e3,fallback:x,children:(0,Y.jsx)(E,{appConfig:r,mode:`read`})}),t[11]=r,t[12]=w);let A;return t[13]!==r.width||t[14]!==f||t[15]!==m||t[16]!==p||t[17]!==y||t[18]!==w?(A=(0,Y.jsxs)(D,{connection:f,isRunning:m,width:r.width,onReconnect:p,children:[y,w]}),t[13]=r.width,t[14]=f,t[15]=m,t[16]=p,t[17]=y,t[18]=w,t[19]=A):A=t[19],A};function Q(){k.INSTANCE.stop()}var $=()=>{let e=(0,q.c)(3),t=n(s);if(!f()||!t)return null;let r;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(r=(0,Y.jsxs)(`span`,{children:[`Static`,` `,(0,Y.jsx)(`a`,{href:u.githubPage,target:`_blank`,className:`text-(--sky-11) font-medium underline`,children:`marimo`}),` `,`notebook - Run or edit for full interactivity`]}),e[0]=r):r=e[0];let i;return e[1]===t?i=e[2]:(i=(0,Y.jsxs)(`div`,{className:`px-4 py-2 bg-(--sky-2) border-b border-(--sky-7) text-(--sky-11) flex justify-between items-center gap-4 print:hidden text-sm`,"data-testid":`static-notebook-banner`,children:[r,(0,Y.jsx)(`span`,{className:`shrink-0`,children:(0,Y.jsx)(te,{code:t})})]}),e[1]=t,e[2]=i),i},te=e=>{let t=(0,q.c)(36),{code:n}=e,r=H()||`notebook.py`,i=r.lastIndexOf(`/`);i!==-1&&(r=r.slice(i+1));let[a]=l(),o=a.sharing?.molab!==!1,s=window.location.href,c;t[0]===n?c=t[1]:(c=V({code:n,baseUrl:`${u.molab}/new`}),t[0]=n,t[1]=c);let d=c,f;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(f=(0,Y.jsx)(N,{asChild:!0,children:(0,Y.jsx)(x,{"data-testid":`static-notebook-dialog-trigger`,variant:`outline`,size:`xs`,children:`Run or Edit`})}),t[2]=f):f=t[2];let p;t[3]===r?p=t[4]:(p=(0,Y.jsx)(F,{children:r}),t[3]=r,t[4]=p);let m;t[5]===Symbol.for(`react.memo_cache_sentinel`)?(m=(0,Y.jsxs)(`p`,{children:[`This is a static`,` `,(0,Y.jsx)(`a`,{href:u.githubPage,target:`_blank`,className:`text-(--sky-11) hover:underline font-medium`,children:`marimo`}),` `,`notebook. To run interactively:`]}),t[5]=m):m=t[5];let h;t[6]===Symbol.for(`react.memo_cache_sentinel`)?(h=(0,Y.jsx)(`br`,{}),t[6]=h):h=t[6];let g;t[7]===r?g=t[8]:(g=(0,Y.jsx)(`div`,{className:`rounded-lg p-3 border bg-(--sky-2) border-(--sky-7)`,children:(0,Y.jsxs)(`div`,{className:`font-mono text-(--sky-11) leading-relaxed`,children:[`pip install marimo`,h,`marimo edit `,r]})}),t[7]=r,t[8]=g);let _;t[9]===Symbol.for(`react.memo_cache_sentinel`)?(_=!s.endsWith(`.html`)&&(0,Y.jsxs)(`div`,{className:`rounded-lg p-3 border bg-(--sky-2) border-(--sky-7)`,children:[(0,Y.jsx)(`div`,{className:`text-sm text-(--sky-12) mb-1`,children:`Or run directly from URL:`}),(0,Y.jsxs)(`div`,{className:`font-mono text-(--sky-11) break-all`,children:[`marimo edit `,window.location.href]})]}),t[9]=_):_=t[9];let b;t[10]!==o||t[11]!==d?(b=o&&(0,Y.jsxs)(`div`,{className:`pt-3 border-t flex gap-2 items-center`,children:[(0,Y.jsx)(x,{asChild:!0,variant:`outline`,size:`xs`,className:`shrink-0`,children:(0,Y.jsxs)(`a`,{href:d,target:`_blank`,rel:`noopener noreferrer`,children:[(0,Y.jsx)(G,{size:12,strokeWidth:1.5,className:`mr-1.5 mt-px text-(--grass-11)`}),`Open in molab`]})}),(0,Y.jsxs)(`p`,{className:`text-sm text-(--sky-12)`,children:[`Run this notebook in`,` `,(0,Y.jsx)(`span`,{className:`font-semibold`,children:`molab`}),`, marimo's cloud-hosted notebook platform.`]})]}),t[10]=o,t[11]=d,t[12]=b):b=t[12];let S;t[13]!==g||t[14]!==b?(S=(0,Y.jsxs)(M,{className:`pt-3 text-left space-y-3`,children:[m,g,_,b]}),t[13]=g,t[14]=b,t[15]=S):S=t[15];let C;t[16]!==p||t[17]!==S?(C=(0,Y.jsxs)(P,{children:[p,S]}),t[16]=p,t[17]=S,t[18]=C):C=t[18];let T;t[19]===n?T=t[20]:(T=async()=>{await B(n),R({title:`Copied to clipboard`})},t[19]=n,t[20]=T);let E;t[21]===Symbol.for(`react.memo_cache_sentinel`)?(E=(0,Y.jsx)(w,{className:`w-3 h-3 mr-2`}),t[21]=E):E=t[21];let D;t[22]===T?D=t[23]:(D=(0,Y.jsxs)(x,{"data-testid":`copy-static-notebook-dialog-button`,variant:`outline`,size:`sm`,onClick:T,children:[E,`Copy code`]}),t[22]=T,t[23]=D);let O;t[24]!==n||t[25]!==r?(O=()=>{y(new Blob([n],{type:`text/plain`}),r)},t[24]=n,t[25]=r,t[26]=O):O=t[26];let k;t[27]===Symbol.for(`react.memo_cache_sentinel`)?(k=(0,Y.jsx)(v,{className:`w-3 h-3 mr-2`}),t[27]=k):k=t[27];let A;t[28]===O?A=t[29]:(A=(0,Y.jsxs)(x,{"data-testid":`download-static-notebook-dialog-button`,variant:`outline`,size:`sm`,onClick:O,children:[k,`Download`]}),t[28]=O,t[29]=A);let j;t[30]!==D||t[31]!==A?(j=(0,Y.jsxs)(`div`,{className:`flex gap-3 pt-2`,children:[D,A]}),t[30]=D,t[31]=A,t[32]=j):j=t[32];let L;return t[33]!==C||t[34]!==j?(L=(0,Y.jsxs)(I,{children:[f,(0,Y.jsxs)(ee,{children:[C,j]})]}),t[33]=C,t[34]=j,t[35]=L):L=t[35],L},ne=d()||f(),re=e=>{let t=(0,q.c)(9),n;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,Y.jsx)($,{}),t[0]=n):n=t[0];let r;t[1]===e.appConfig?r=t[2]:(r=(0,Y.jsx)(Z,{appConfig:e.appConfig}),t[1]=e.appConfig,t[2]=r);let i;t[3]===Symbol.for(`react.memo_cache_sentinel`)?(i=ne&&(0,Y.jsx)(ie,{}),t[3]=i):i=t[3];let a;t[4]===r?a=t[5]:(a=(0,Y.jsxs)(W,{children:[n,r,i]}),t[4]=r,t[5]=a);let o;t[6]===Symbol.for(`react.memo_cache_sentinel`)?(o=(0,Y.jsx)(_,{}),t[6]=o):o=t[6];let s;return t[7]===a?s=t[8]:(s=(0,Y.jsx)(A,{children:(0,Y.jsxs)(U,{direction:`horizontal`,autoSaveId:`marimo:chrome:v1:run1`,children:[a,o]})}),t[7]=a,t[8]=s),s},ie=()=>{let e=(0,q.c)(1),t;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,Y.jsx)(`div`,{className:`fixed bottom-0 right-0 z-50 print:hidden`,"data-testid":`watermark`,children:(0,Y.jsxs)(`a`,{href:u.githubPage,target:`_blank`,className:`text-sm text-(--grass-11) font-bold tracking-wide transition-colors bg-(--grass-4) hover:bg-(--grass-5) border-t border-l border-(--grass-8) px-3 py-1 rounded-tl-md flex items-center gap-2`,children:[(0,Y.jsx)(`span`,{children:`made with marimo`}),(0,Y.jsx)(K,{className:`h-4 w-auto`})]})}),e[0]=t):t=e[0],t};export{re as default};
@@ -1 +1 @@
1
- import{a as e}from"./rolldown-runtime-B0Z9INg1.js";import{c as t,f as n,l as ee,t as r,u as te}from"./useEvent-xfs0Sn4r.js";import{t as i}from"./react-CBDbhulC.js";import{E as ne,F as re,Ht as ie,Mo as a,bo as o,jo as ae,ni as s}from"./cells-DfJw5iuV.js";import{t as c}from"./compiler-runtime-CYIjoINj.js";import{_ as oe}from"./useEventListener-D27Dii_l.js";import{C as se}from"./utils-R_pHe-RB.js";import{t as ce}from"./constants-BDbGiS7O.js";import{t as le}from"./cn-ldLVeaqm.js";import{t as l}from"./jsx-runtime-B74pBk57.js";import{n as ue}from"./JsonOutput-D0JlHn1Z.js";import{t as u}from"./tooltip-D7dq6bnc.js";import{t as d}from"./button-BMBznEru.js";import{r as de}from"./requests-C6_IaFh7.js";import{t as f}from"./createLucideIcon-B7HeEoG2.js";import{d as fe}from"./layout-iNJ-1JI2.js";import{n as pe,t as me}from"./LazyAnyLanguageCodeMirror-YVX2AZaI.js";import{u as he}from"./toDate-hGYJX0Ha.js";import{t as ge}from"./cell-editor-D3YsOG7a.js";import{t as _e}from"./spinner-Ck-Hgfvj.js";import{i as ve}from"./useDeleteCell-CqYCNkza.js";import{r as ye}from"./useTheme-BRnykVDX.js";import{n as be,r as xe,t as Se}from"./react-resizable-panels.browser.esm-BSRAHC4P.js";import{a as Ce}from"./renderShortcut-D9XYVNe3.js";import{n as we,r as Te}from"./panel-context-CiVjnt80.js";import{t as Ee}from"./kiosk-mode-B2WU6CYc.js";var De=f(`eraser`,[[`path`,{d:`M21 21H8a2 2 0 0 1-1.42-.587l-3.994-3.999a2 2 0 0 1 0-2.828l10-10a2 2 0 0 1 2.829 0l5.999 6a2 2 0 0 1 0 2.828L12.834 21`,key:`g5wo59`}],[`path`,{d:`m5.082 11.09 8.828 8.828`,key:`1wx5vj`}]]),Oe=f(`history`,[[`path`,{d:`M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8`,key:`1357e3`}],[`path`,{d:`M3 3v5h5`,key:`1xhq8a`}],[`path`,{d:`M12 7v5l4 2`,key:`1fdv2h`}]]),p=e(i(),1),ke=c(),m=15,h=o(`marimo:scratchpadHistory:v1`,[],s),Ae=n(!1),je=n(null,(e,t,n)=>{if(n=n.trim(),!n)return;let ee=e(h);t(h,[n,...ee.filter(e=>e!==n)].slice(0,m))}),g=l(),Me={hide_code:!1,disabled:!1},_=()=>{let e=(0,ke.c)(60),n=re(),[i]=se(),{theme:o}=ye(),s=(0,p.useRef)(null),c=ie(),{createNewCell:l,updateCellCode:f}=ne(),{sendRunScratchpad:m}=de(),_=we(),v=Te(),y=n.cellRuntime[a],b=y?.output,x=y?.status,S=y?.consoleOutputs,C=n.cellData.__scratch__?.code??``,w=te(je),[T,E]=t(Ae),D=ee(h),O;e[0]!==w||e[1]!==C||e[2]!==m?(O=()=>{m({code:C}),w(C)},e[0]=w,e[1]=C,e[2]=m,e[3]=O):O=e[3];let k=r(O),A;e[4]!==C||e[5]!==l||e[6]!==c?(A=()=>{C.trim()&&l({code:C,before:!1,cellId:c??`__end__`})},e[4]=C,e[5]=l,e[6]=c,e[7]=A):A=e[7];let j=r(A),M;e[8]!==m||e[9]!==f?(M=()=>{f({cellId:a,code:``,formattingChange:!1}),m({code:``});let e=s.current;e&&e.dispatch({changes:{from:0,to:e.state.doc.length,insert:``}})},e[8]=m,e[9]=f,e[10]=M):M=e[10];let N=r(M),P;e[11]!==E||e[12]!==f?(P=e=>{E(!1),f({cellId:a,code:e,formattingChange:!1});let t=s.current;t&&t.dispatch({changes:{from:0,to:t.state.doc.length,insert:e}})},e[11]=E,e[12]=f,e[13]=P):P=e[13];let F=r(P),[I,Ne]=(0,p.useState)(),L;e[14]!==F||e[15]!==D||e[16]!==T||e[17]!==o?(L=()=>T?(0,g.jsx)(`div`,{className:`absolute inset-0 z-100 bg-background p-3 border-none overflow-auto`,children:(0,g.jsx)(`div`,{className:`overflow-auto flex flex-col gap-3`,children:D.map((e,t)=>(0,g.jsx)(`div`,{className:`border rounded-md hover:shadow-sm cursor-pointer hover:border-input overflow-hidden`,onClick:()=>F(e),children:(0,g.jsx)(p.Suspense,{children:(0,g.jsx)(me,{language:`python`,theme:o,basicSetup:{highlightActiveLine:!1,highlightActiveLineGutter:!1},value:e.trim(),editable:!1,readOnly:!0})})},t))})}):null,e[14]=F,e[15]=D,e[16]=T,e[17]=o,e[18]=L):L=e[18];let R=L,z;e[19]!==N||e[20]!==j||e[21]!==k||e[22]!==D.length||e[23]!==T||e[24]!==E||e[25]!==x?(z=()=>(0,g.jsxs)(`div`,{className:`flex items-center shrink-0 border-b`,children:[(0,g.jsx)(u,{content:Ce(`cell.run`),children:(0,g.jsx)(d,{"data-testid":`scratchpad-run-button`,onClick:k,disabled:T,variant:`text`,size:`xs`,children:(0,g.jsx)(ve,{color:`var(--grass-11)`,size:16})})}),(0,g.jsx)(u,{content:`Clear code and outputs`,children:(0,g.jsx)(d,{disabled:T,size:`xs`,variant:`text`,onClick:N,children:(0,g.jsx)(De,{size:16})})}),(0,g.jsx)(Ee,{children:(0,g.jsx)(u,{content:`Insert code`,children:(0,g.jsx)(d,{disabled:T,size:`xs`,variant:`text`,onClick:j,children:(0,g.jsx)(pe,{size:16})})})}),(x===`running`||x===`queued`)&&(0,g.jsx)(_e,{className:`inline`,size:`small`}),(0,g.jsx)(`div`,{className:`flex-1`}),(0,g.jsx)(u,{content:`Toggle history`,children:(0,g.jsx)(d,{size:`xs`,variant:`text`,className:le(T&&`bg-(--sky-3) rounded-none`),onClick:()=>E(!T),disabled:D.length===0,children:(0,g.jsx)(Oe,{size:16})})}),(0,g.jsx)(u,{content:(0,g.jsx)(`span`,{className:`block max-w-prose`,children:`Use this scratchpad to experiment with code without restrictions on variable names. Variables defined here aren't saved to notebook memory, and the code is not saved in the notebook file.`}),children:(0,g.jsx)(d,{size:`xs`,variant:`text`,children:(0,g.jsx)(he,{size:16})})})]}),e[19]=N,e[20]=j,e[21]=k,e[22]=D.length,e[23]=T,e[24]=E,e[25]=x,e[26]=z):z=e[26];let B=z,Pe=_===`vertical`,V;e[27]===Symbol.for(`react.memo_cache_sentinel`)?(V=ae.create(a),e[27]=V):V=e[27];let H;e[28]===B?H=e[29]:(H=B(),e[28]=B,e[29]=H);let U;e[30]===Symbol.for(`react.memo_cache_sentinel`)?(U=e=>{s.current=e},e[30]=U):U=e[30];let W;e[31]!==C||e[32]!==k||e[33]!==I||e[34]!==o||e[35]!==i?(W=(0,g.jsx)(`div`,{className:`flex-1 overflow-auto`,children:(0,g.jsx)(ge,{theme:o,showPlaceholder:!1,id:a,code:C,config:Me,status:`idle`,serializedEditorState:null,runCell:k,userConfig:i,editorViewRef:s,setEditorView:U,hidden:!1,showHiddenCode:oe.NOOP,languageAdapter:I,setLanguageAdapter:Ne})}),e[31]=C,e[32]=k,e[33]=I,e[34]=o,e[35]=i,e[36]=W):W=e[36];let G;e[37]===R?G=e[38]:(G=R(),e[37]=R,e[38]=G);let K;e[39]!==G||e[40]!==H||e[41]!==W?(K=(0,g.jsx)(Se,{defaultSize:40,minSize:20,maxSize:70,children:(0,g.jsxs)(`div`,{className:`h-full flex flex-col overflow-hidden relative`,children:[H,W,G]})}),e[39]=G,e[40]=H,e[41]=W,e[42]=K):K=e[42];let q=Pe?`h-1`:`w-1`,J;e[43]===q?J=e[44]:(J=le(`bg-border hover:bg-primary/50 transition-colors`,q),e[43]=q,e[44]=J);let Y;e[45]===J?Y=e[46]:(Y=(0,g.jsx)(xe,{className:J}),e[45]=J,e[46]=Y);let X;e[47]===b?X=e[48]:(X=(0,g.jsx)(`div`,{className:`flex-1 overflow-auto`,children:(0,g.jsx)(ue,{allowExpand:!1,output:b,className:ce.outputArea,cellId:a,stale:!1,loading:!1})}),e[47]=b,e[48]=X);let Z;e[49]===S?Z=e[50]:(Z=(0,g.jsx)(`div`,{className:`overflow-auto shrink-0 max-h-[50%]`,children:(0,g.jsx)(fe,{consoleOutputs:S,className:`overflow-auto`,stale:!1,interrupted:!1,cellName:`_`,onSubmitDebugger:oe.NOOP,cellId:a,debuggerActive:!1})}),e[49]=S,e[50]=Z);let Q;e[51]!==X||e[52]!==Z?(Q=(0,g.jsx)(Se,{defaultSize:60,minSize:20,children:(0,g.jsxs)(`div`,{className:`h-full flex flex-col divide-y overflow-hidden`,children:[X,Z]})}),e[51]=X,e[52]=Z,e[53]=Q):Q=e[53];let $;return e[54]!==_||e[55]!==v||e[56]!==K||e[57]!==Y||e[58]!==Q?($=(0,g.jsx)(`div`,{className:`flex flex-col h-full overflow-hidden`,id:V,children:(0,g.jsxs)(be,{direction:_,className:`h-full`,children:[K,Y,Q]},v)}),e[54]=_,e[55]=v,e[56]=K,e[57]=Y,e[58]=Q,e[59]=$):$=e[59],$},v=()=>{let e=(0,ke.c)(1),t;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,g.jsx)(_,{}),e[0]=t):t=e[0],t};export{v as default};
1
+ import{a as e}from"./rolldown-runtime-B0Z9INg1.js";import{c as t,f as n,l as ee,t as r,u as te}from"./useEvent-xfs0Sn4r.js";import{t as i}from"./react-CBDbhulC.js";import{E as ne,F as re,Ht as ie,Mo as a,bo as o,jo as ae,ni as s}from"./cells-v0dAmt79.js";import{t as c}from"./compiler-runtime-CYIjoINj.js";import{w as oe}from"./utils-CUZQNAWJ.js";import{_ as se}from"./useEventListener-D27Dii_l.js";import{t as ce}from"./constants-BDbGiS7O.js";import{t as le}from"./cn-ldLVeaqm.js";import{t as l}from"./jsx-runtime-B74pBk57.js";import{n as ue}from"./JsonOutput-CucHb-Xd.js";import{t as u}from"./tooltip-D7dq6bnc.js";import{t as d}from"./button-BMBznEru.js";import{r as de}from"./requests-C6_IaFh7.js";import{t as f}from"./createLucideIcon-B7HeEoG2.js";import{d as fe}from"./layout-Dqce0OL2.js";import{n as pe,t as me}from"./LazyAnyLanguageCodeMirror-YVX2AZaI.js";import{u as he}from"./toDate-hGYJX0Ha.js";import{t as ge}from"./cell-editor-CR6poe2J.js";import{t as _e}from"./spinner-Ck-Hgfvj.js";import{i as ve}from"./useDeleteCell-Ha8ut0yy.js";import{r as ye}from"./useTheme-D3zvxdF3.js";import{n as be,r as xe,t as Se}from"./react-resizable-panels.browser.esm-BSRAHC4P.js";import{a as Ce}from"./renderShortcut-CS4ccH3x.js";import{n as we,r as Te}from"./panel-context-CiVjnt80.js";import{t as Ee}from"./kiosk-mode-CjT3sqy8.js";var De=f(`eraser`,[[`path`,{d:`M21 21H8a2 2 0 0 1-1.42-.587l-3.994-3.999a2 2 0 0 1 0-2.828l10-10a2 2 0 0 1 2.829 0l5.999 6a2 2 0 0 1 0 2.828L12.834 21`,key:`g5wo59`}],[`path`,{d:`m5.082 11.09 8.828 8.828`,key:`1wx5vj`}]]),Oe=f(`history`,[[`path`,{d:`M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8`,key:`1357e3`}],[`path`,{d:`M3 3v5h5`,key:`1xhq8a`}],[`path`,{d:`M12 7v5l4 2`,key:`1fdv2h`}]]),p=e(i(),1),ke=c(),m=15,h=o(`marimo:scratchpadHistory:v1`,[],s),Ae=n(!1),je=n(null,(e,t,n)=>{if(n=n.trim(),!n)return;let ee=e(h);t(h,[n,...ee.filter(e=>e!==n)].slice(0,m))}),g=l(),Me={hide_code:!1,disabled:!1},_=()=>{let e=(0,ke.c)(60),n=re(),[i]=oe(),{theme:o}=ye(),s=(0,p.useRef)(null),c=ie(),{createNewCell:l,updateCellCode:f}=ne(),{sendRunScratchpad:m}=de(),_=we(),v=Te(),y=n.cellRuntime[a],b=y?.output,x=y?.status,S=y?.consoleOutputs,C=n.cellData.__scratch__?.code??``,w=te(je),[T,E]=t(Ae),D=ee(h),O;e[0]!==w||e[1]!==C||e[2]!==m?(O=()=>{m({code:C}),w(C)},e[0]=w,e[1]=C,e[2]=m,e[3]=O):O=e[3];let k=r(O),A;e[4]!==C||e[5]!==l||e[6]!==c?(A=()=>{C.trim()&&l({code:C,before:!1,cellId:c??`__end__`})},e[4]=C,e[5]=l,e[6]=c,e[7]=A):A=e[7];let j=r(A),M;e[8]!==m||e[9]!==f?(M=()=>{f({cellId:a,code:``,formattingChange:!1}),m({code:``});let e=s.current;e&&e.dispatch({changes:{from:0,to:e.state.doc.length,insert:``}})},e[8]=m,e[9]=f,e[10]=M):M=e[10];let N=r(M),P;e[11]!==E||e[12]!==f?(P=e=>{E(!1),f({cellId:a,code:e,formattingChange:!1});let t=s.current;t&&t.dispatch({changes:{from:0,to:t.state.doc.length,insert:e}})},e[11]=E,e[12]=f,e[13]=P):P=e[13];let F=r(P),[I,Ne]=(0,p.useState)(),L;e[14]!==F||e[15]!==D||e[16]!==T||e[17]!==o?(L=()=>T?(0,g.jsx)(`div`,{className:`absolute inset-0 z-100 bg-background p-3 border-none overflow-auto`,children:(0,g.jsx)(`div`,{className:`overflow-auto flex flex-col gap-3`,children:D.map((e,t)=>(0,g.jsx)(`div`,{className:`border rounded-md hover:shadow-sm cursor-pointer hover:border-input overflow-hidden`,onClick:()=>F(e),children:(0,g.jsx)(p.Suspense,{children:(0,g.jsx)(me,{language:`python`,theme:o,basicSetup:{highlightActiveLine:!1,highlightActiveLineGutter:!1},value:e.trim(),editable:!1,readOnly:!0})})},t))})}):null,e[14]=F,e[15]=D,e[16]=T,e[17]=o,e[18]=L):L=e[18];let R=L,z;e[19]!==N||e[20]!==j||e[21]!==k||e[22]!==D.length||e[23]!==T||e[24]!==E||e[25]!==x?(z=()=>(0,g.jsxs)(`div`,{className:`flex items-center shrink-0 border-b`,children:[(0,g.jsx)(u,{content:Ce(`cell.run`),children:(0,g.jsx)(d,{"data-testid":`scratchpad-run-button`,onClick:k,disabled:T,variant:`text`,size:`xs`,children:(0,g.jsx)(ve,{color:`var(--grass-11)`,size:16})})}),(0,g.jsx)(u,{content:`Clear code and outputs`,children:(0,g.jsx)(d,{disabled:T,size:`xs`,variant:`text`,onClick:N,children:(0,g.jsx)(De,{size:16})})}),(0,g.jsx)(Ee,{children:(0,g.jsx)(u,{content:`Insert code`,children:(0,g.jsx)(d,{disabled:T,size:`xs`,variant:`text`,onClick:j,children:(0,g.jsx)(pe,{size:16})})})}),(x===`running`||x===`queued`)&&(0,g.jsx)(_e,{className:`inline`,size:`small`}),(0,g.jsx)(`div`,{className:`flex-1`}),(0,g.jsx)(u,{content:`Toggle history`,children:(0,g.jsx)(d,{size:`xs`,variant:`text`,className:le(T&&`bg-(--sky-3) rounded-none`),onClick:()=>E(!T),disabled:D.length===0,children:(0,g.jsx)(Oe,{size:16})})}),(0,g.jsx)(u,{content:(0,g.jsx)(`span`,{className:`block max-w-prose`,children:`Use this scratchpad to experiment with code without restrictions on variable names. Variables defined here aren't saved to notebook memory, and the code is not saved in the notebook file.`}),children:(0,g.jsx)(d,{size:`xs`,variant:`text`,children:(0,g.jsx)(he,{size:16})})})]}),e[19]=N,e[20]=j,e[21]=k,e[22]=D.length,e[23]=T,e[24]=E,e[25]=x,e[26]=z):z=e[26];let B=z,Pe=_===`vertical`,V;e[27]===Symbol.for(`react.memo_cache_sentinel`)?(V=ae.create(a),e[27]=V):V=e[27];let H;e[28]===B?H=e[29]:(H=B(),e[28]=B,e[29]=H);let U;e[30]===Symbol.for(`react.memo_cache_sentinel`)?(U=e=>{s.current=e},e[30]=U):U=e[30];let W;e[31]!==C||e[32]!==k||e[33]!==I||e[34]!==o||e[35]!==i?(W=(0,g.jsx)(`div`,{className:`flex-1 overflow-auto`,children:(0,g.jsx)(ge,{theme:o,showPlaceholder:!1,id:a,code:C,config:Me,status:`idle`,serializedEditorState:null,runCell:k,userConfig:i,editorViewRef:s,setEditorView:U,hidden:!1,showHiddenCode:se.NOOP,languageAdapter:I,setLanguageAdapter:Ne})}),e[31]=C,e[32]=k,e[33]=I,e[34]=o,e[35]=i,e[36]=W):W=e[36];let G;e[37]===R?G=e[38]:(G=R(),e[37]=R,e[38]=G);let K;e[39]!==G||e[40]!==H||e[41]!==W?(K=(0,g.jsx)(Se,{defaultSize:40,minSize:20,maxSize:70,children:(0,g.jsxs)(`div`,{className:`h-full flex flex-col overflow-hidden relative`,children:[H,W,G]})}),e[39]=G,e[40]=H,e[41]=W,e[42]=K):K=e[42];let q=Pe?`h-1`:`w-1`,J;e[43]===q?J=e[44]:(J=le(`bg-border hover:bg-primary/50 transition-colors`,q),e[43]=q,e[44]=J);let Y;e[45]===J?Y=e[46]:(Y=(0,g.jsx)(xe,{className:J}),e[45]=J,e[46]=Y);let X;e[47]===b?X=e[48]:(X=(0,g.jsx)(`div`,{className:`flex-1 overflow-auto`,children:(0,g.jsx)(ue,{allowExpand:!1,output:b,className:ce.outputArea,cellId:a,stale:!1,loading:!1})}),e[47]=b,e[48]=X);let Z;e[49]===S?Z=e[50]:(Z=(0,g.jsx)(`div`,{className:`overflow-auto shrink-0 max-h-[50%]`,children:(0,g.jsx)(fe,{consoleOutputs:S,className:`overflow-auto`,stale:!1,interrupted:!1,cellName:`_`,onSubmitDebugger:se.NOOP,cellId:a,debuggerActive:!1})}),e[49]=S,e[50]=Z);let Q;e[51]!==X||e[52]!==Z?(Q=(0,g.jsx)(Se,{defaultSize:60,minSize:20,children:(0,g.jsxs)(`div`,{className:`h-full flex flex-col divide-y overflow-hidden`,children:[X,Z]})}),e[51]=X,e[52]=Z,e[53]=Q):Q=e[53];let $;return e[54]!==_||e[55]!==v||e[56]!==K||e[57]!==Y||e[58]!==Q?($=(0,g.jsx)(`div`,{className:`flex flex-col h-full overflow-hidden`,id:V,children:(0,g.jsxs)(be,{direction:_,className:`h-full`,children:[K,Y,Q]},v)}),e[54]=_,e[55]=v,e[56]=K,e[57]=Y,e[58]=Q,e[59]=$):$=e[59],$},v=()=>{let e=(0,ke.c)(1),t;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,g.jsx)(_,{}),e[0]=t):t=e[0],t};export{v as default};