{#if lang === 'mermaid'} {#if mermaidHtml} {:else}
{code}
{/if} {:else if lang === 'vega' || lang === 'vega-lite'} {#if vegaHtml} {:else}
{code}
{/if} {:else}
{lang}
{#if ($config?.features?.enable_code_execution ?? true) && (lang.toLowerCase() === 'python' || lang.toLowerCase() === 'py' || (lang === '' && checkPythonCode(code)))} {#if executing}
{$i18n.t('Running')}
{:else if run} {/if} {/if} {#if save} {/if} {#if preview && ['html', 'svg'].includes(lang)} {/if}
{#if !collapsed} {#if edit} { saveCode(); }} onChange={(value) => { _code = value; }} /> {:else}
{@html hljs.highlightAuto(code, hljs.getLanguage(lang)?.aliases).value ||
									code}
{/if} {:else}
{$i18n.t('{{COUNT}} hidden lines', { COUNT: code.split('\n').length })}
{/if}
{#if !collapsed}
{#if executing || stdout || stderr || result || files}
{#if executing}
{$i18n.t('STDOUT/STDERR')}
{$i18n.t('Running...')}
{:else} {#if stdout || stderr}
{$i18n.t('STDOUT/STDERR')}
{stdout || stderr}
{/if} {#if result || files}
{$i18n.t('RESULT')}
{#if result}
{`${JSON.stringify(result)}`}
{/if} {#if files}
{#each files as file} {#if file.type.startsWith('image')} Output {/if} {/each}
{/if}
{/if} {/if}
{/if} {/if} {/if}