{"size": 15504, "ext": "js", "max_stars_repo_path": "docs/lite/retro/build/5311.969010b154c6e0f52832.js", "max_stars_repo_name": "psychemedia/storynotes", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "docs/lite/retro/build/5311.969010b154c6e0f52832.js", "max_issues_repo_name": "psychemedia/storynotes", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "docs/lite/retro/build/5311.969010b154c6e0f52832.js", "max_forks_repo_name": "psychemedia/storynotes", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 7752.0, "max_line_length": 15450, "alphanum_fraction": 0.7123968008}
"use strict";(self.webpackChunk_JUPYTERLAB_CORE_OUTPUT=self.webpackChunk_JUPYTERLAB_CORE_OUTPUT||[]).push([[5311],{45311:(e,t,a)=>{a.r(t),a.d(t,{DEFAULT_CONTEXT_ITEM_RANK:()=>v,default:()=>B});var o=a(52884),n=a(92005),i=a(5768),r=a(69652),l=a(77994),s=a(7122),d=a(74161),c=a(79487),u=a(58623),p=a(93315),g=a(79444),b=a(18151),m=a(96927);const v=100;var h;!function(e){e.activateNextTab="application:activate-next-tab",e.activatePreviousTab="application:activate-previous-tab",e.activateNextTabBar="application:activate-next-tab-bar",e.activatePreviousTabBar="application:activate-previous-tab-bar",e.close="application:close",e.closeOtherTabs="application:close-other-tabs",e.closeRightTabs="application:close-right-tabs",e.closeAll="application:close-all",e.setMode="application:set-mode",e.toggleMode="application:toggle-mode",e.toggleLeftArea="application:toggle-left-area",e.toggleRightArea="application:toggle-right-area",e.togglePresentationMode="application:toggle-presentation-mode",e.tree="router:tree",e.switchSidebar="sidebar:switch"}(h||(h={}));const y={id:"@jupyterlab/application-extension:commands",autoStart:!0,requires:[d.ITranslator],optional:[o.ILabShell,n.ICommandPalette],activate:(e,t,a,n)=>{const{commands:r,shell:l}=e,s=t.load("jupyterlab"),d=s.__("Main Area");r.addCommand(o.JupyterFrontEndContextMenu.contextMenu,{label:s.__("Shift+Right Click for Browser Menu"),isEnabled:()=>!1,execute:()=>{}});const c=()=>{const t=e.contextMenuHitTest((e=>!!e.dataset.id));if(!t)return l.currentWidget;const a=(0,u.toArray)(l.widgets("main")).filter((e=>e.id===t.dataset.id));return a.length<1?l.currentWidget:a[0]},p=e=>{e.forEach((e=>e.close()))},g=(e,t)=>{switch(e.type){case"split-area":{const a=(0,u.iter)(e.children);let o,n=null;do{o=a.next(),o&&(n=g(o,t))}while(!n&&o);return n}case"tab-area":{const{id:a}=t;return e.widgets.some((e=>e.id===a))?e:null}default:return null}},b=e=>{const{id:t}=e,o=(e=>{var t;const o=null==a?void 0:a.saveLayout(),n=null==o?void 0:o.mainArea;if(!n||"multiple-document"!==i.PageConfig.getOption("mode"))return null;const r=null===(t=n.dock)||void 0===t?void 0:t.main;return r?g(r,e):null})(e),n=o&&o.widgets||[],r=n.findIndex((e=>e.id===t));return r<0?[]:n.slice(r+1)};r.addCommand(h.close,{label:()=>s.__("Close Tab"),isEnabled:()=>{const e=c();return!!e&&e.title.closable},execute:()=>{const e=c();e&&e.close()}}),r.addCommand(h.closeOtherTabs,{label:()=>s.__("Close All Other Tabs"),isEnabled:()=>{const e=l.widgets("main");return!!e.next()&&!!e.next()},execute:()=>{const e=c();if(!e)return;const{id:t}=e,a=(0,u.toArray)(l.widgets("main")).filter((e=>e.id!==t));p(a)}}),r.addCommand(h.closeRightTabs,{label:()=>s.__("Close Tabs to Right"),isEnabled:()=>!!c()&&b(c()).length>0,execute:()=>{const e=c();e&&p(b(e))}}),a&&(r.addCommand(h.activateNextTab,{label:s.__("Activate Next Tab"),execute:()=>{a.activateNextTab()}}),r.addCommand(h.activatePreviousTab,{label:s.__("Activate Previous Tab"),execute:()=>{a.activatePreviousTab()}}),r.addCommand(h.activateNextTabBar,{label:s.__("Activate Next Tab Bar"),execute:()=>{a.activateNextTabBar()}}),r.addCommand(h.activatePreviousTabBar,{label:s.__("Activate Previous Tab Bar"),execute:()=>{a.activatePreviousTabBar()}}),r.addCommand(h.closeAll,{label:s.__("Close All Tabs"),execute:()=>{a.closeAll()}}),r.addCommand(h.toggleLeftArea,{label:()=>s.__("Show Left Sidebar"),execute:()=>{a.leftCollapsed?a.expandLeft():(a.collapseLeft(),a.currentWidget&&a.activateById(a.currentWidget.id))},isToggled:()=>!a.leftCollapsed,isVisible:()=>!a.isEmpty("left")}),r.addCommand(h.toggleRightArea,{label:()=>s.__("Show Right Sidebar"),execute:()=>{a.rightCollapsed?a.expandRight():(a.collapseRight(),a.currentWidget&&a.activateById(a.currentWidget.id))},isToggled:()=>!a.rightCollapsed,isVisible:()=>!a.isEmpty("right")}),r.addCommand(h.togglePresentationMode,{label:()=>s.__("Presentation Mode"),execute:()=>{a.presentationMode=!a.presentationMode},isToggled:()=>a.presentationMode,isVisible:()=>!0}),r.addCommand(h.setMode,{isVisible:e=>{const t=e.mode;return"single-document"===t||"multiple-document"===t},execute:e=>{const t=e.mode;if("single-document"!==t&&"multiple-document"!==t)throw new Error(`Unsupported application shell mode: ${t}`);a.mode=t}}),r.addCommand(h.toggleMode,{label:s.__("Simple Interface"),isToggled:()=>"single-document"===a.mode,execute:()=>{const e="multiple-document"===a.mode?{mode:"single-document"}:{mode:"multiple-document"};return r.execute(h.setMode,e)}})),n&&[h.activateNextTab,h.activatePreviousTab,h.activateNextTabBar,h.activatePreviousTabBar,h.close,h.closeAll,h.closeOtherTabs,h.closeRightTabs,h.toggleLeftArea,h.toggleRightArea,h.togglePresentationMode,h.toggleMode].forEach((e=>n.addItem({command:e,category:d})))}},f={id:"@jupyterlab/application-extension:main",requires:[o.IRouter,n.IWindowResolver,d.ITranslator,o.JupyterFrontEnd.ITreeResolver],optional:[o.IConnectionLost],provides:o.ITreePathUpdater,activate:(e,t,a,r,l,s)=>{const d=r.load("jupyterlab");if(!(e instanceof o.JupyterLab))throw new Error(`${f.id} must be activated in JupyterLab.`);let c="",u="";const p=a.name;if(console.debug(`Starting application in workspace: "${p}"`),0!==e.registerPluginErrors.length){const t=m.createElement("pre",null,e.registerPluginErrors.map((e=>e.message)).join("\n"));(0,n.showErrorMessage)(d.__("Error Registering Plugins"),{message:t})}e.shell.layoutModified.connect((()=>{e.commands.notifyCommandChanged()})),e.shell.modeChanged.connect(((e,a)=>{const o=i.PageConfig.getUrl({mode:a}),n=i.URLExt.parse(o).pathname;t.navigate(n,{skipRouting:!0}),i.PageConfig.setOption("mode",a)})),l.paths.then((()=>{e.shell.currentPathChanged.connect(((e,a)=>{const o=a.newValue,n=o||u,r=i.PageConfig.getUrl({treePath:n}),l=i.URLExt.parse(r).pathname;t.navigate(l,{skipRouting:!0}),i.PageConfig.setOption("treePath",n),c=o}))})),s=s||o.ConnectionLost,e.serviceManager.connectionFailure.connect(((e,t)=>s(e,t,r)));const g=e.serviceManager.builder,b=()=>g.build().then((()=>(0,n.showDialog)({title:d.__("Build Complete"),body:m.createElement("div",null,d.__("Build successfully completed, reload page?"),m.createElement("br",null),d.__("You will lose any unsaved changes.")),buttons:[n.Dialog.cancelButton({label:d.__("Reload Without Saving"),actions:["reload"]}),n.Dialog.okButton({label:d.__("Save and Reload")})],hasClose:!0}))).then((({button:{accept:a,actions:o}})=>{a?e.commands.execute("docmanager:save").then((()=>{t.reload()})).catch((e=>{(0,n.showErrorMessage)(d.__("Save Failed"),{message:m.createElement("pre",null,e.message)})})):o.includes("reload")&&t.reload()})).catch((e=>{(0,n.showErrorMessage)(d.__("Build Failed"),{message:m.createElement("pre",null,e.message)})}));return g.isAvailable&&g.shouldCheck&&g.getStatus().then((e=>{if("building"===e.status)return b();if("needed"!==e.status)return;const t=m.createElement("div",null,d.__("JupyterLab build is suggested:"),m.createElement("br",null),m.createElement("pre",null,e.message));(0,n.showDialog)({title:d.__("Build Recommended"),body:t,buttons:[n.Dialog.cancelButton(),n.Dialog.okButton({label:d.__("Build")})]}).then((e=>e.button.accept?b():void 0))})),function(e){l.paths.then((()=>{if(u=e,!c){const a=i.PageConfig.getUrl({treePath:e}),o=i.URLExt.parse(a).pathname;t.navigate(o,{skipRouting:!0}),i.PageConfig.setOption("treePath",e)}}))}},autoStart:!0},x={id:"@jupyterlab/application-extension:context-menu",autoStart:!0,requires:[l.ISettingRegistry,d.ITranslator],activate:(e,t,a)=>{const o=a.load("jupyterlab");function n(t){const a=new c.RankedMenu(Object.assign(Object.assign({},t),{commands:e.commands}));return t.label&&(a.title.label=o.__(t.label)),a}e.started.then((()=>A.loadSettingsContextMenu(e.contextMenu,t,n,a))).catch((e=>{console.error("Failed to load context menu items from settings registry.",e)}))}},_={id:"@jupyterlab/application-extension:dirty",autoStart:!0,requires:[d.ITranslator],activate:(e,t)=>{if(!(e instanceof o.JupyterLab))throw new Error(`${_.id} must be activated in JupyterLab.`);const a=t.load("jupyterlab").__("Are you sure you want to exit JupyterLab?\n\nAny unsaved changes will be lost.");window.addEventListener("beforeunload",(t=>{if(e.status.isDirty)return t.returnValue=a}))}},w={id:"@jupyterlab/application-extension:layout",requires:[s.IStateDB,o.ILabShell,l.ISettingRegistry,d.ITranslator],activate:(e,t,a,n,r)=>{const l=e.started,s=e.commands,d=new o.LayoutRestorer({connector:t,first:l,registry:s});return d.fetch().then((t=>{a.restoreLayout(i.PageConfig.getOption("mode"),t),a.layoutModified.connect((()=>{d.save(a.saveLayout())})),A.activateSidebarSwitcher(e,a,n,r,t)})),d},autoStart:!0,provides:o.ILayoutRestorer},S={id:"@jupyterlab/application-extension:router",requires:[o.JupyterFrontEnd.IPaths],activate:(e,t)=>{const{commands:a}=e,n=t.urls.base,i=new o.Router({base:n,commands:a});return e.started.then((()=>{i.route(),window.addEventListener("popstate",(()=>{i.route()}))})),i},autoStart:!0,provides:o.IRouter},E={id:"@jupyterlab/application-extension:tree-resolver",autoStart:!0,requires:[o.IRouter],provides:o.JupyterFrontEnd.ITreeResolver,activate:(e,t)=>{const{commands:a}=e,o=new g.DisposableSet,n=new p.PromiseDelegate,r=new RegExp("/(lab|doc)(/workspaces/[a-zA-Z0-9-_]+)?(/tree/.*)?");o.add(a.addCommand(h.tree,{execute:async e=>{var t;if(o.isDisposed)return;const a=i.URLExt.queryStringToObject(null!==(t=e.search)&&void 0!==t?t:""),r=a["file-browser-path"]||"";delete a["file-browser-path"],o.dispose(),n.resolve({browser:r,file:i.PageConfig.getOption("treePath")})}})),o.add(t.register({command:h.tree,pattern:r}));const l=()=>{o.isDisposed||(o.dispose(),n.resolve(null))};return t.routed.connect(l),o.add(new g.DisposableDelegate((()=>{t.routed.disconnect(l)}))),{paths:n.promise}}},C={id:"@jupyterlab/application-extension:notfound",requires:[o.JupyterFrontEnd.IPaths,o.IRouter,d.ITranslator],activate:(e,t,a,o)=>{const i=o.load("jupyterlab"),r=t.urls.notFound;if(!r)return;const l=a.base,s=i.__("The path: %1 was not found. JupyterLab redirected to: %2",r,l);a.navigate(""),(0,n.showErrorMessage)(i.__("Path Not Found"),{message:s})},autoStart:!0},I={id:"@jupyterlab/application-extension:faviconbusy",requires:[o.ILabStatus],activate:async(e,t)=>{t.busySignal.connect(((e,t)=>{const a=document.querySelector('link[rel="icon"]'+(t?".idle.favicon":".busy.favicon"));if(!a)return;const o=document.querySelector("link"+(t?".busy.favicon":".idle.favicon"));o&&a!==o&&(a.rel="",o.rel="icon",o.parentNode.replaceChild(o,o))}))},autoStart:!0},T={id:"@jupyterlab/application-extension:shell",activate:e=>{if(!(e.shell instanceof o.LabShell))throw new Error(`${T.id} did not find a LabShell instance.`);return e.shell},autoStart:!0,provides:o.ILabShell},P={id:"@jupyterlab/application-extension:status",activate:e=>{if(!(e instanceof o.JupyterLab))throw new Error(`${P.id} must be activated in JupyterLab.`);return e.status},autoStart:!0,provides:o.ILabStatus},R={id:"@jupyterlab/application-extension:info",activate:e=>{if(!(e instanceof o.JupyterLab))throw new Error(`${R.id} must be activated in JupyterLab.`);return e.info},autoStart:!0,provides:o.JupyterLab.IInfo},L={id:"@jupyterlab/apputils-extension:paths",activate:e=>{if(!(e instanceof o.JupyterLab))throw new Error(`${L.id} must be activated in JupyterLab.`);return e.paths},autoStart:!0,provides:o.JupyterFrontEnd.IPaths},M={id:"@jupyterlab/application-extension:property-inspector",autoStart:!0,requires:[o.ILabShell,d.ITranslator],optional:[o.ILayoutRestorer],provides:r.IPropertyInspectorProvider,activate:(e,t,a,o)=>{const n=a.load("jupyterlab"),i=new r.SideBarPropertyInspectorProvider(t,void 0,a);return i.title.icon=c.buildIcon,i.title.caption=n.__("Property Inspector"),i.id="jp-property-inspector",t.add(i,"right",{rank:100}),o&&o.add(i,"jp-property-inspector"),i}},j={id:"@jupyterlab/application-extension:logo",autoStart:!0,requires:[o.ILabShell],activate:(e,t)=>{const a=new b.Widget;c.jupyterIcon.element({container:a.node,elementPosition:"center",margin:"2px 2px 2px 8px",height:"auto",width:"16px"}),a.id="jp-MainLogo",t.add(a,"top",{rank:0})}},B=[x,_,f,y,w,S,E,C,I,T,P,R,L,M,j];var A;!function(e){async function t(e){(await(0,n.showDialog)({title:e.__("Information"),body:e.__("Context menu customization has changed. You will need to reload JupyterLab to see the changes."),buttons:[n.Dialog.cancelButton(),n.Dialog.okButton({label:e.__("Reload")})]})).button.accept&&location.reload()}e.loadSettingsContextMenu=async function(e,a,o,i){var r;const s=i.load("jupyterlab"),d=x.id;let c,u={};function g(e){var t,o;u={},e.properties.contextMenu.default=Object.keys(a.plugins).map((e=>{var t,o;const n=null!==(o=null===(t=a.plugins[e].schema["jupyter.lab.menus"])||void 0===t?void 0:t.context)&&void 0!==o?o:[];return u[e]=n,n})).concat([null!==(o=null===(t=e["jupyter.lab.menus"])||void 0===t?void 0:t.context)&&void 0!==o?o:[],e.properties.contextMenu.default]).reduceRight(((e,t)=>l.SettingRegistry.reconcileItems(e,t,!0)),[]).sort(((e,t)=>{var a,o;return(null!==(a=e.rank)&&void 0!==a?a:1/0)-(null!==(o=t.rank)&&void 0!==o?o:1/0)}))}a.transform(d,{compose:e=>{var t,a,o,n;c||(c=p.JSONExt.deepCopy(e.schema),g(c));const i=null!==(o=null===(a=null===(t=c.properties)||void 0===t?void 0:t.contextMenu)||void 0===a?void 0:a.default)&&void 0!==o?o:[],r={contextMenu:null!==(n=e.data.user.contextMenu)&&void 0!==n?n:[]},s={contextMenu:l.SettingRegistry.reconcileItems(i,r.contextMenu,!1)};return e.data={composite:s,user:r},e},fetch:e=>(c||(c=p.JSONExt.deepCopy(e.schema),g(c)),{data:e.data,id:e.id,raw:e.raw,schema:c,version:e.version})}),c=null;const b=await a.load(d),m=null!==(r=b.composite.contextMenu)&&void 0!==r?r:[];l.SettingRegistry.filterDisabledItems(m).forEach((t=>{n.MenuFactory.addContextItem(Object.assign({rank:v},t),e,o)})),b.changed.connect((()=>{var e;const a=null!==(e=b.composite.contextMenu)&&void 0!==e?e:[];p.JSONExt.deepEqual(m,a)||t(s)})),a.pluginChanged.connect((async(i,r)=>{var c,g,b,h;if(r!==d){const i=null!==(c=u[r])&&void 0!==c?c:[],d=null!==(b=null===(g=a.plugins[r].schema["jupyter.lab.menus"])||void 0===g?void 0:g.context)&&void 0!==b?b:[];if(!p.JSONExt.deepEqual(i,d))if(u[r])await t(s);else{u[r]=p.JSONExt.deepCopy(d);const t=null!==(h=l.SettingRegistry.reconcileItems(d,m,!1,!1))&&void 0!==h?h:[];l.SettingRegistry.filterDisabledItems(t).forEach((t=>{n.MenuFactory.addContextItem(Object.assign({rank:v},t),e,o)}))}}}))},e.activateSidebarSwitcher=function(e,t,a,o,n){const i="@jupyterlab/application-extension:sidebar",r=o.load("jupyterlab");let l={};const s=(e,a)=>{(0,u.each)(t.widgets("left"),(e=>{var o;l[e.id]&&"right"===l[e.id]&&(t.add(e,"right"),a&&(null===(o=a.rightArea)||void 0===o?void 0:o.currentWidget)===e&&t.activateById(e.id))})),(0,u.each)(t.widgets("right"),(e=>{var o;l[e.id]&&"left"===l[e.id]&&(t.add(e,"left"),a&&(null===(o=a.leftArea)||void 0===o?void 0:o.currentWidget)===e&&t.activateById(e.id))}))};Promise.all([a.load(i),e.restored]).then((([e])=>{l=e.get("overrides").composite||{},e.changed.connect((e=>{l=e.get("overrides").composite||{},s()})),t.layoutModified.connect(s),s(0,n)})),e.commands.addCommand(h.switchSidebar,{label:r.__("Switch Sidebar Side"),execute:()=>{const t=e.contextMenuHitTest((e=>!!e.dataset.id));if(!t)return;const o=t.dataset.id,n=document.getElementById("jp-left-stack"),r=document.getElementById(o);let s;return s=n&&r&&n.contains(r)?"right":"left",a.set(i,"overrides",Object.assign(Object.assign({},l),{[o]:s}))}})}}(A||(A={}))}}]);
//# sourceMappingURL=5311.969010b154c6e0f52832.js.map