Welcome to the Live docs! Keep this little window open while you work on the notebook, and you will get documentation of everything you type!
You can also type a query above.
Still stuck? Here are some tips.
',loading:!1}),c=e=>s(m(t=>e(t)));(0,d.useEffect)(()=>{!l.loading&&(null==t||/[^\s]/.test(t))&&l.searched_query!==t&&u(t)},[t,l.loading,l.searched_query]),(0,d.useLayoutEffect)(()=>{e&&i.current&&(i.current.focus({preventScroll:!0}),i.current.select())},[e]);let u=e=>{c(t=>{t.loading=!0,t.searched_query=e}),Promise.race([(0,eO.default).Promises.delay(2e3,!1),o.send("docs",{query:e.replace(/^\?/,"")},{notebook_id:a.notebook_id}).then(t=>"⌛"!==t.message.status&&("\uD83D\uDC4D"===t.message.status?(c(n=>{n.shown_query=e,n.body=t.message.doc}),!0):void 0))]).then(()=>{c(e=>{e.loading=!1})})},p=(0,d.useMemo)(()=>(0,d.html)`<${iT} body=${eR(l.body)} sanitize_html=${r} sanitize_html_message=${!1} />`,[l.body,r]),h=!1===l.loading&&""!==l.searched_query&&l.searched_query!==l.shown_query;return(0,d.html)` +${l.shown_query}
+${n.map((n,a)=>e.line-1-t<=a&&a<=e.line-1+t?(0,d.html)`<${tk} code=${n} i=${a} frameLine=${a===e.line-1} />`:null)}+
`},tE=({code:e})=>{let t=(0,d.useRef)(null);return(0,d.useLayoutEffect)(()=>{if(t.current){let n=e.replaceAll(/([^():{},; ]*)::/g,"$1::");t.current.innerHTML=n}},[t.current,e]),(0,d.html)`Syntax error
${n.current?null:a}
`},tC=({msg:e,stacktrace:t,cell_id:n})=>{let a=(0,d.useContext)(S),r={pattern:/.?/,display:e=>(0,h.default).dropRightWhile(e.split("\n"),e=>""===e).map(e=>(0,d.html)`<${tN} value=${e} />`)},o=[{pattern:/syntax: extra token after end of expression/,display:e=>{let t=(0,d.html)`{e.preventDefault(),a.wrap_remote_cell(n,"begin")}} + >Wrap all code in a begin ... end block.`;if(!e.includes("\n\nBoundaries: "))return(0,d.html)`Multiple expressions in one cell.
+${t}
`;{let r=JSON.parse(e.split("\n\nBoundaries: ")[1]).map(e=>e-1),o=(0,d.html)`+ {e.preventDefault(),a.split_remote_cell(n,r,!0)}} + >Split this cell into ${r.length} cells, or +
`;return(0,d.html)`Multiple expressions in one cell.
+How would you like to fix it?
+Tried to reevaluate an include
call, this is not supported. You might need to restart this notebook from the main menu.
+ For a workaround, use the alternative version of include
described here:
+ GH issue 115
+
In the future, include
will be deprecated, and this will be the default.
${e}
`)},{pattern:/Cyclic references among (.*)\./,display:e=>e.split("\n").map(e=>{let t=e.match(/Cyclic references among (.*)\./);if(!t)return(0,d.html)`${e}
`;{let e=t[1].split(/, | and /).map(e=>(0,d.html)`${e}`);return(0,d.html)`Cyclic references among${" "}${t$(e)}.
`}})},{pattern:/Multiple definitions for (.*)/,display:e=>e.split("\n").map(e=>{let t=e.match(/Multiple definitions for (.*)/);if(!t)return(0,d.html)`${e}
`;{let e=t[1].replace(/\.$/,"").split(/, | and /).map(e=>(0,d.html)`{let a=document.querySelector(`pluto-cell:not([id='${n}']) span[id='${encodeURI(e)}']`);t.preventDefault(),a?.scrollIntoView()}}>${e}`);return(0,d.html)`Multiple definitions for${" "}${t$(e)}.
`}})},{pattern:/^syntax: (.*)$/,display:r.display,show_stacktrace:()=>!1},{pattern:/^\s*$/,display:()=>r.display("Error")},{pattern:/^UndefVarError: (.*) not defined/,display:e=>{let t=a.get_notebook(),r=tT(t,n),o=e.match(/UndefVarError: (.*) not defined/),i=(o?.[1]??"").replaceAll("`",""),l=Object.values(t?.cell_dependencies??{}).some(e=>Object.keys(e.downstream_cells_map).includes(i));if(0===Object.keys(r).length||!l)return(0,d.html)`${e}
`;let s=Object.keys(r).map(e=>(0,d.html)`{t.preventDefault();let n=document.querySelector(`pluto-cell[id='${r[e]}']`);n?.scrollIntoView()}}>${e}`);return(0,d.html)`Another cell defining ${t$(s)} contains errors.
`},show_stacktrace:()=>0===Object.keys(tT(a.get_notebook(),n)).length},{pattern:/^ArgumentError: Package (.*) not found in current path/,display:e=>{let t=e.match(/^ArgumentError: Package (.*) not found in current path/),n=(t?.[1]??"").replaceAll("`",""),r=a.get_notebook()?.nbpkg?.terminal_outputs?.[n];return(0,d.html)`The package ${n}.jl could not load because it failed to initialize.
+That's not nice! Things you could try:
+You might find useful information in the package installation log:
+ <${eM} value=${r} />`},show_stacktrace:()=>!1},r].find(({pattern:t})=>t.test(e))??r,[i,l]=(0,d.useState)(!1);(0,d.useEffect)(()=>{l(!1)},[e,t,n]);let s=t.findIndex(e=>null!=tp(e.file)),c=!i&&-1!=s&&sHere is what happened, the most recent locations are first:
+${t}`;case"application/vnd.pluto.tree+object":return(0,d.html)`<${tj} cell_id=${n} body=${t} persist_js_state=${a} sanitize_html=${r} />`;default:return iE({mime:e,body:t,cell_id:n,persist_js_state:a,sanitize_html:r,last_run_timestamp:null})}},tR=({on_click_more:e})=>{let[t,n]=(0,d.useState)(!1),a=(0,d.useRef)(null);return tL(a),(0,d.html)`
A new server was started - this notebook session is no longer running.
+Would you like to go back to the main menu?
+The statefile failed to download. Original error message:
+${t.toString()}
+ Launch parameters:
+${JSON.stringify(e,null,2)}
+