"use strict";(self.webpackChunkihighlight=self.webpackChunkihighlight||[]).push([[509],{509:(e,o,s)=>{s.r(o),s.d(o,{default:()=>d});var t=s(256),l=s(933);const r="jp-ilambda-Anchor",d={id:"ihighlight:plugin",description:"A jupyter lab/notebook front-end extensionsion for highlighting cells based on execution status",autoStart:!0,requires:[l.INotebookTracker],activate:async(e,o,s)=>{var d;console.log("ihighlight is activated!"),(d=document.createElement("div")).innerHTML="<a href='https://www.lambda.joburg' target='_blank'><img src='https://lambda.joburg/assets/images/index/logo/lambda_logo.svg'></a>";const i=new t.Widget({node:d});i.addClass(r),e.shell.add(i,"top",{rank:1e3});let n=document.getElementsByClassName(r);if(console.log(n),n.length>=2)for(let e=1;e<n.length;e++)n[e].remove();l.NotebookActions.executionScheduled.connect(((e,o)=>{var s,t,l;const{cell:r}=o;if("code"===r.model.type){let e=r.editorWidget;if(null===(s=r.inputArea)||void 0===s||s.promptNode.classList.remove("prompt-node-success"),null===(t=r.inputArea)||void 0===t||t.promptNode.classList.remove("prompt-node-error"),null==e||e.removeClass("editor-success"),null==e||e.removeClass("editor-error"),""!==r.model.sharedModel.source){let o=null===(l=r.inputArea)||void 0===l?void 0:l.promptNode;null==o||o.classList.add("prompt-node-scheduled"),null==e||e.addClass("editor-scheduled")}}})),l.NotebookActions.executed.connect(((e,o)=>{var s,t,l,r,d;const{cell:i}=o,{success:n}=o;if("code"==i.model.type){let e=i.editorWidget;null===(s=i.inputArea)||void 0===s||s.promptNode.classList.remove("prompt-node-error"),null===(t=i.inputArea)||void 0===t||t.promptNode.classList.remove("prompt-node-success"),null===(l=i.inputArea)||void 0===l||l.promptNode.classList.remove("prompt-node-scheduled"),null==e||e.removeClass("editor-error"),null==e||e.removeClass("editor-scheduled"),null==e||e.removeClass("editor-success"),n?""!==i.model.sharedModel.source&&(null===(r=i.inputArea)||void 0===r||r.promptNode.classList.add("prompt-node-success"),null==e||e.addClass("editor-success")):(null===(d=i.inputArea)||void 0===d||d.promptNode.classList.add("prompt-node-error"),null==e||e.addClass("editor-error"))}}))}}}}]);