64 lines
1.4 MiB
Text
64 lines
1.4 MiB
Text
|
{
|
||
|
"version": 3,
|
||
|
"sources": [
|
||
|
"components/jquery/jquery.min.js",
|
||
|
"base/js/namespace.js",
|
||
|
"components/codemirror/lib/codemirror.js",
|
||
|
"components/bootstrap/dist/js/bootstrap.min.js",
|
||
|
"components/jed/jed.js",
|
||
|
"base/js/i18n.js",
|
||
|
"base/js/dialog.js",
|
||
|
"base/js/events.js",
|
||
|
"base/js/promises.js",
|
||
|
"base/js/page.js",
|
||
|
"components/moment/min/moment-with-locales.js",
|
||
|
"components/underscore/underscore-min.js",
|
||
|
"components/codemirror/mode/meta.js",
|
||
|
"base/js/utils.js",
|
||
|
"services/config.js",
|
||
|
"base/js/keyboard.js",
|
||
|
"bidi/numericshaping.js",
|
||
|
"bidi/bidi.js",
|
||
|
"components/marked/lib/marked.js",
|
||
|
"tree/js/notebooklist.js",
|
||
|
"tree/js/sessionlist.js",
|
||
|
"tree/js/kernellist.js",
|
||
|
"tree/js/terminallist.js",
|
||
|
"tree/js/newnotebook.js",
|
||
|
"tree/js/shutdownbutton.js",
|
||
|
"auth/js/loginwidget.js",
|
||
|
"tree/js/main.js"
|
||
|
],
|
||
|
"names": [],
|
||
|
"mappings": "AAAA;AACA;AACA;AACA,ACHA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,ACpFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA
|
||
|
"file": "main.min.js",
|
||
|
"sourcesContent": [
|
||
|
"/*! jQuery v3.5.1 | (c) JS Foundation and other contributors | jquery.org/license */\n!function(e,t){\"use strict\";\"object\"==typeof module&&\"object\"==typeof module.exports?module.exports=e.document?t(e,!0):function(e){if(!e.document)throw new Error(\"jQuery requires a window with a document\");return t(e)}:t(e)}(\"undefined\"!=typeof window?window:this,function(C,e){\"use strict\";var t=[],r=Object.getPrototypeOf,s=t.slice,g=t.flat?function(e){return t.flat.call(e)}:function(e){return t.concat.apply([],e)},u=t.push,i=t.indexOf,n={},o=n.toString,v=n.hasOwnProperty,a=v.toString,l=a.call(Object),y={},m=function(e){return\"function\"==typeof e&&\"number\"!=typeof e.nodeType},x=function(e){return null!=e&&e===e.window},E=C.document,c={type:!0,src:!0,nonce:!0,noModule:!0};function b(e,t,n){var r,i,o=(n=n||E).createElement(\"script\");if(o.text=e,t)for(r in c)(i=t[r]||t.getAttribute&&t.getAttribute(r))&&o.setAttribute(r,i);n.head.appendChild(o).parentNode.removeChild(o)}function w(e){return null==e?e+\"\":\"object\"==typeof e||\"function\"==typeof e?n[o.call(e)]||\"object\":typeof e}var f=\"3.5.1\",S=function(e,t){return new S.fn.init(e,t)};function p(e){var t=!!e&&\"length\"in e&&e.length,n=w(e);return!m(e)&&!x(e)&&(\"array\"===n||0===t||\"number\"==typeof t&&0<t&&t-1 in e)}S.fn=S.prototype={jquery:f,constructor:S,length:0,toArray:function(){return s.call(this)},get:function(e){return null==e?s.call(this):e<0?this[e+this.length]:this[e]},pushStack:function(e){var t=S.merge(this.constructor(),e);return t.prevObject=this,t},each:function(e){return S.each(this,e)},map:function(n){return this.pushStack(S.map(this,function(e,t){return n.call(e,t,e)}))},slice:function(){return this.pushStack(s.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},even:function(){return this.pushStack(S.grep(this,function(e,t){return(t+1)%2}))},odd:function(){return this.pushStack(S.grep(this,function(e,t){return t%2}))},eq:function(e){var t=this.length,n=+e+(e<0?t:0);return this.pushStack(0<=n&&n<t?[this[n]]:[])},end:function(){return this.prevObject||this.constructor()},push:u,sort:t.sort,splice:t.splice},S.extend=S.fn.extend=function(){var e,t,n,r,i,o,a=arguments[0]||{},s=1,u=arguments.length,l=!1;for(\"boolean\"==typeof a&&(l=a,a=arguments[s]||{},s++),\"object\"==typeof a||m(a)||(a={}),s===u&&(a=this,s--);s<u;s++)if(null!=(e=arguments[s]))for(t in e)r=e[t],\"__proto__\"!==t&&a!==r&&(l&&r&&(S.isPlainObject(r)||(i=Array.isArray(r)))?(n=a[t],o=i&&!Array.isArray(n)?[]:i||S.isPlainObject(n)?n:{},i=!1,a[t]=S.extend(l,o,r)):void 0!==r&&(a[t]=r));return a},S.extend({expando:\"jQuery\"+(f+Math.random()).replace(/\\D/g,\"\"),isReady:!0,error:function(e){throw new Error(e)},noop:function(){},isPlainObject:function(e){var t,n;return!(!e||\"[object Object]\"!==o.call(e))&&(!(t=r(e))||\"function\"==typeof(n=v.call(t,\"constructor\")&&t.constructor)&&a.call(n)===l)},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},globalEval:function(e,t,n){b(e,{nonce:t&&t.nonce},n)},each:function(e,t){var n,r=0;if(p(e)){for(n=e.length;r<n;r++)if(!1===t.call(e[r],r,e[r]))break}else for(r in e)if(!1===t.call(e[r],r,e[r]))break;return e},makeArray:function(e,t){var n=t||[];return null!=e&&(p(Object(e))?S.merge(n,\"string\"==typeof e?[e]:e):u.call(n,e)),n},inArray:function(e,t,n){return null==t?-1:i.call(t,e,n)},merge:function(e,t){for(var n=+t.length,r=0,i=e.length;r<n;r++)e[i++]=t[r];return e.length=i,e},grep:function(e,t,n){for(var r=[],i=0,o=e.length,a=!n;i<o;i++)!t(e[i],i)!==a&&r.push(e[i]);return r},map:function(e,t,n){var r,i,o=0,a=[];if(p(e))for(r=e.length;o<r;o++)null!=(i=t(e[o],o,n))&&a.push(i);else for(o in e)null!=(i=t(e[o],o,n))&&a.push(i);return g(a)},guid:1,support:y}),\"function\"==typeof Symbol&&(S.fn[Symbol.iterator]=t[Symbol.iterator]),S.each(\"Boolean Number String Function Array Date RegExp Object Error Symbol\".split(\" \"),function(e,t){n[\"[object \"+t+\"]\"]=t.toLowerCase()});var d=function(n){var e,d,b,o,i,h,f,g,w,u,l,T,C,a,E,v,s,c,y,S=\"sizzle\"+1*new Date,p=n.document,k=0,r=0,m=ue(),x=ue(
|
||
|
"// Copyright (c) Jupyter Development Team.\n// Distributed under the terms of the Modified BSD License.\n\n\nvar Jupyter = Jupyter || {};\n\nvar jprop = function(name, module_path){\n Object.defineProperty(Jupyter, name, {\n get: function() { \n console.warn('accessing `'+name+'` is deprecated. Use `requirejs(\"'+module_path+'\")`');\n return requirejs(module_path); \n },\n enumerable: true,\n configurable: false\n });\n}\n\nvar jglobal = function(name, module_path){\n Object.defineProperty(Jupyter, name, {\n get: function() { \n console.warn('accessing `'+name+'` is deprecated. Use `requirejs(\"'+module_path+'\").'+name+'`');\n return requirejs(module_path)[name]; \n },\n enumerable: true,\n configurable: false\n });\n}\n\ndefine('base/js/namespace',[],function(){\n \"use strict\";\n\n // expose modules\n \n jprop('utils','base/js/utils')\n \n //Jupyter.load_extensions = Jupyter.utils.load_extensions;\n // \n jprop('security','base/js/security');\n jprop('keyboard','base/js/keyboard');\n jprop('dialog','base/js/dialog');\n jprop('mathjaxutils','notebook/js/mathjaxutils');\n\n\n //// exposed constructors\n jglobal('CommManager','services/kernels/comm')\n jglobal('Comm','services/kernels/comm')\n\n jglobal('NotificationWidget','base/js/notificationwidget');\n jglobal('Kernel','services/kernels/kernel');\n jglobal('Session','services/sessions/session');\n jglobal('LoginWidget','auth/js/loginwidget');\n jglobal('Page','base/js/page');\n\n // notebook\n jglobal('TextCell','notebook/js/textcell');\n jglobal('OutputArea','notebook/js/outputarea');\n jglobal('KeyboardManager','notebook/js/keyboardmanager');\n jglobal('Completer','notebook/js/completer');\n jglobal('Notebook','notebook/js/notebook');\n jglobal('Tooltip','notebook/js/tooltip');\n jglobal('Toolbar','notebook/js/toolbar');\n jglobal('SaveWidget','notebook/js/savewidget');\n jglobal('Pager','notebook/js/pager');\n jglobal('QuickHelp','notebook/js/quickhelp');\n jglobal('MarkdownCell','notebook/js/textcell');\n jglobal('RawCell','notebook/js/textcell');\n jglobal('Cell','notebook/js/cell');\n jglobal('MainToolBar','notebook/js/maintoolbar');\n jglobal('NotebookNotificationArea','notebook/js/notificationarea');\n jglobal('NotebookTour', 'notebook/js/tour');\n jglobal('MenuBar', 'notebook/js/menubar');\n\n // tree\n jglobal('SessionList','tree/js/sessionlist');\n\n Jupyter.version = \"6.1.5\";\n Jupyter._target = '_blank';\n\n return Jupyter;\n});\n\n// deprecated since 4.0, remove in 5+\nvar IPython = Jupyter;\n\n",
|
||
|
"// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: https://codemirror.net/LICENSE\n\n// This is CodeMirror (https://codemirror.net), a code editor\n// implemented in JavaScript on top of the browser's DOM.\n//\n// You can find some technical background for some of the code below\n// at http://marijnhaverbeke.nl/blog/#cm-internals .\n\n(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :\n typeof define === 'function' && define.amd ? define('codemirror/lib/codemirror',factory) :\n (global = global || self, global.CodeMirror = factory());\n}(this, (function () { 'use strict';\n\n // Kludges for bugs and behavior differences that can't be feature\n // detected are enabled based on userAgent etc sniffing.\n var userAgent = navigator.userAgent;\n var platform = navigator.platform;\n\n var gecko = /gecko\\/\\d/i.test(userAgent);\n var ie_upto10 = /MSIE \\d/.test(userAgent);\n var ie_11up = /Trident\\/(?:[7-9]|\\d{2,})\\..*rv:(\\d+)/.exec(userAgent);\n var edge = /Edge\\/(\\d+)/.exec(userAgent);\n var ie = ie_upto10 || ie_11up || edge;\n var ie_version = ie && (ie_upto10 ? document.documentMode || 6 : +(edge || ie_11up)[1]);\n var webkit = !edge && /WebKit\\//.test(userAgent);\n var qtwebkit = webkit && /Qt\\/\\d+\\.\\d+/.test(userAgent);\n var chrome = !edge && /Chrome\\//.test(userAgent);\n var presto = /Opera\\//.test(userAgent);\n var safari = /Apple Computer/.test(navigator.vendor);\n var mac_geMountainLion = /Mac OS X 1\\d\\D([8-9]|\\d\\d)\\D/.test(userAgent);\n var phantom = /PhantomJS/.test(userAgent);\n\n var ios = !edge && /AppleWebKit/.test(userAgent) && /Mobile\\/\\w+/.test(userAgent);\n var android = /Android/.test(userAgent);\n // This is woefully incomplete. Suggestions for alternative methods welcome.\n var mobile = ios || android || /webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(userAgent);\n var mac = ios || /Mac/.test(platform);\n var chromeOS = /\\bCrOS\\b/.test(userAgent);\n var windows = /win/i.test(platform);\n\n var presto_version = presto && userAgent.match(/Version\\/(\\d*\\.\\d*)/);\n if (presto_version) { presto_version = Number(presto_version[1]); }\n if (presto_version && presto_version >= 15) { presto = false; webkit = true; }\n // Some browsers use the wrong event properties to signal cmd/ctrl on OS X\n var flipCtrlCmd = mac && (qtwebkit || presto && (presto_version == null || presto_version < 12.11));\n var captureRightClick = gecko || (ie && ie_version >= 9);\n\n function classTest(cls) { return new RegExp(\"(^|\\\\s)\" + cls + \"(?:$|\\\\s)\\\\s*\") }\n\n var rmClass = function(node, cls) {\n var current = node.className;\n var match = classTest(cls).exec(current);\n if (match) {\n var after = current.slice(match.index + match[0].length);\n node.className = current.slice(0, match.index) + (after ? match[1] + after : \"\");\n }\n };\n\n function removeChildren(e) {\n for (var count = e.childNodes.length; count > 0; --count)\n { e.removeChild(e.firstChild); }\n return e\n }\n\n function removeChildrenAndAdd(parent, e) {\n return removeChildren(parent).appendChild(e)\n }\n\n function elt(tag, content, className, style) {\n var e = document.createElement(tag);\n if (className) { e.className = className; }\n if (style) { e.style.cssText = style; }\n if (typeof content == \"string\") { e.appendChild(document.createTextNode(content)); }\n else if (content) { for (var i = 0; i < content.length; ++i) { e.appendChild(content[i]); } }\n return e\n }\n // wrapper for elt, which removes the elt from the accessibility tree\n function eltP(tag, content, className, style) {\n var e = elt(tag, content, className, style);\n e.setAttribute(\"role\", \"presentation\");\n return e\n }\n\n var range;\n if (document.createRange) { range = function(node, start, end, endNode) {\n var r = document.createRange();\n r.setEnd(endNode || node, end);\n r.setStart(node, start);
|
||
|
"/*!\n * Bootstrap v3.4.1 (https://getbootstrap.com/)\n * Copyright 2011-2019 Twitter, Inc.\n * Licensed under the MIT license\n */\nif(\"undefined\"==typeof jQuery)throw new Error(\"Bootstrap's JavaScript requires jQuery\");!function(t){\"use strict\";var e=jQuery.fn.jquery.split(\" \")[0].split(\".\");if(e[0]<2&&e[1]<9||1==e[0]&&9==e[1]&&e[2]<1||3<e[0])throw new Error(\"Bootstrap's JavaScript requires jQuery version 1.9.1 or higher, but lower than version 4\")}(),function(n){\"use strict\";n.fn.emulateTransitionEnd=function(t){var e=!1,i=this;n(this).one(\"bsTransitionEnd\",function(){e=!0});return setTimeout(function(){e||n(i).trigger(n.support.transition.end)},t),this},n(function(){n.support.transition=function o(){var t=document.createElement(\"bootstrap\"),e={WebkitTransition:\"webkitTransitionEnd\",MozTransition:\"transitionend\",OTransition:\"oTransitionEnd otransitionend\",transition:\"transitionend\"};for(var i in e)if(t.style[i]!==undefined)return{end:e[i]};return!1}(),n.support.transition&&(n.event.special.bsTransitionEnd={bindType:n.support.transition.end,delegateType:n.support.transition.end,handle:function(t){if(n(t.target).is(this))return t.handleObj.handler.apply(this,arguments)}})})}(jQuery),function(s){\"use strict\";var e='[data-dismiss=\"alert\"]',a=function(t){s(t).on(\"click\",e,this.close)};a.VERSION=\"3.4.1\",a.TRANSITION_DURATION=150,a.prototype.close=function(t){var e=s(this),i=e.attr(\"data-target\");i||(i=(i=e.attr(\"href\"))&&i.replace(/.*(?=#[^\\s]*$)/,\"\")),i=\"#\"===i?[]:i;var o=s(document).find(i);function n(){o.detach().trigger(\"closed.bs.alert\").remove()}t&&t.preventDefault(),o.length||(o=e.closest(\".alert\")),o.trigger(t=s.Event(\"close.bs.alert\")),t.isDefaultPrevented()||(o.removeClass(\"in\"),s.support.transition&&o.hasClass(\"fade\")?o.one(\"bsTransitionEnd\",n).emulateTransitionEnd(a.TRANSITION_DURATION):n())};var t=s.fn.alert;s.fn.alert=function o(i){return this.each(function(){var t=s(this),e=t.data(\"bs.alert\");e||t.data(\"bs.alert\",e=new a(this)),\"string\"==typeof i&&e[i].call(t)})},s.fn.alert.Constructor=a,s.fn.alert.noConflict=function(){return s.fn.alert=t,this},s(document).on(\"click.bs.alert.data-api\",e,a.prototype.close)}(jQuery),function(s){\"use strict\";var n=function(t,e){this.$element=s(t),this.options=s.extend({},n.DEFAULTS,e),this.isLoading=!1};function i(o){return this.each(function(){var t=s(this),e=t.data(\"bs.button\"),i=\"object\"==typeof o&&o;e||t.data(\"bs.button\",e=new n(this,i)),\"toggle\"==o?e.toggle():o&&e.setState(o)})}n.VERSION=\"3.4.1\",n.DEFAULTS={loadingText:\"loading...\"},n.prototype.setState=function(t){var e=\"disabled\",i=this.$element,o=i.is(\"input\")?\"val\":\"html\",n=i.data();t+=\"Text\",null==n.resetText&&i.data(\"resetText\",i[o]()),setTimeout(s.proxy(function(){i[o](null==n[t]?this.options[t]:n[t]),\"loadingText\"==t?(this.isLoading=!0,i.addClass(e).attr(e,e).prop(e,!0)):this.isLoading&&(this.isLoading=!1,i.removeClass(e).removeAttr(e).prop(e,!1))},this),0)},n.prototype.toggle=function(){var t=!0,e=this.$element.closest('[data-toggle=\"buttons\"]');if(e.length){var i=this.$element.find(\"input\");\"radio\"==i.prop(\"type\")?(i.prop(\"checked\")&&(t=!1),e.find(\".active\").removeClass(\"active\"),this.$element.addClass(\"active\")):\"checkbox\"==i.prop(\"type\")&&(i.prop(\"checked\")!==this.$element.hasClass(\"active\")&&(t=!1),this.$element.toggleClass(\"active\")),i.prop(\"checked\",this.$element.hasClass(\"active\")),t&&i.trigger(\"change\")}else this.$element.attr(\"aria-pressed\",!this.$element.hasClass(\"active\")),this.$element.toggleClass(\"active\")};var t=s.fn.button;s.fn.button=i,s.fn.button.Constructor=n,s.fn.button.noConflict=function(){return s.fn.button=t,this},s(document).on(\"click.bs.button.data-api\",'[data-toggle^=\"button\"]',function(t){var e=s(t.target).closest(\".btn\");i.call(e,\"toggle\"),s(t.target).is('input[type=\"radio\"], input[type=\"checkbox\"]')||(t.preventDefault(),e.is(\"input,button\")?e.trigger(\"focus\"):e.find(\"input:visible,button:visible\").first().trigger(\"focus\"))}).on(\"focu
|
||
|
"/**\n * @preserve jed.js https://github.com/SlexAxton/Jed\n */\n/*\n-----------\nA gettext compatible i18n library for modern JavaScript Applications\n\nby Alex Sexton - AlexSexton [at] gmail - @SlexAxton\n\nMIT License\n\nA jQuery Foundation project - requires CLA to contribute -\nhttps://contribute.jquery.org/CLA/\n\n\n\nJed offers the entire applicable GNU gettext spec'd set of\nfunctions, but also offers some nicer wrappers around them.\nThe api for gettext was written for a language with no function\noverloading, so Jed allows a little more of that.\n\nMany thanks to Joshua I. Miller - unrtst@cpan.org - who wrote\ngettext.js back in 2008. I was able to vet a lot of my ideas\nagainst his. I also made sure Jed passed against his tests\nin order to offer easy upgrades -- jsgettext.berlios.de\n*/\n(function (root, undef) {\n\n // Set up some underscore-style functions, if you already have\n // underscore, feel free to delete this section, and use it\n // directly, however, the amount of functions used doesn't\n // warrant having underscore as a full dependency.\n // Underscore 1.3.0 was used to port and is licensed\n // under the MIT License by Jeremy Ashkenas.\n var ArrayProto = Array.prototype,\n ObjProto = Object.prototype,\n slice = ArrayProto.slice,\n hasOwnProp = ObjProto.hasOwnProperty,\n nativeForEach = ArrayProto.forEach,\n breaker = {};\n\n // We're not using the OOP style _ so we don't need the\n // extra level of indirection. This still means that you\n // sub out for real `_` though.\n var _ = {\n forEach : function( obj, iterator, context ) {\n var i, l, key;\n if ( obj === null ) {\n return;\n }\n\n if ( nativeForEach && obj.forEach === nativeForEach ) {\n obj.forEach( iterator, context );\n }\n else if ( obj.length === +obj.length ) {\n for ( i = 0, l = obj.length; i < l; i++ ) {\n if ( i in obj && iterator.call( context, obj[i], i, obj ) === breaker ) {\n return;\n }\n }\n }\n else {\n for ( key in obj) {\n if ( hasOwnProp.call( obj, key ) ) {\n if ( iterator.call (context, obj[key], key, obj ) === breaker ) {\n return;\n }\n }\n }\n }\n },\n extend : function( obj ) {\n this.forEach( slice.call( arguments, 1 ), function ( source ) {\n for ( var prop in source ) {\n obj[prop] = source[prop];\n }\n });\n return obj;\n }\n };\n // END Miniature underscore impl\n\n // Jed is a constructor function\n var Jed = function ( options ) {\n // Some minimal defaults\n this.defaults = {\n \"locale_data\" : {\n \"messages\" : {\n \"\" : {\n \"domain\" : \"messages\",\n \"lang\" : \"en\",\n \"plural_forms\" : \"nplurals=2; plural=(n != 1);\"\n }\n // There are no default keys, though\n }\n },\n // The default domain if one is missing\n \"domain\" : \"messages\",\n // enable debug mode to log untranslated strings to the console\n \"debug\" : false\n };\n\n // Mix in the sent options with the default options\n this.options = _.extend( {}, this.defaults, options );\n this.textdomain( this.options.domain );\n\n if ( options.domain && ! this.options.locale_data[ this.options.domain ] ) {\n throw new Error('Text domain set to non-existent domain: `' + options.domain + '`');\n }\n };\n\n // The gettext spec sets this character as the default\n // delimiter for context lookups.\n // e.g.: context\\u0004key\n // If your translation company uses something different,\n // just change this at any time and it will use that instead.\n Jed.context_delimiter = String.fromCharCode( 4 );\n\n function getPluralFormFunc ( plural_form_string ) {\n return Jed.PF.compile( plural_form_string || \"nplurals=2; plural=(n != 1);\");\n }\n\n function Chain( key, i18n ){\n this._key = key;\n this._i
|
||
|
"// Copyright (c) Jupyter Development Team.\n// Distributed under the terms of the Modified BSD License.\n\n// Module to handle i18n ( Internationalization ) and translated UI\n\ndefine('base/js/i18n',[\n 'jed'\n\t], function(Jed) {\n \"use strict\";\n\n var i18n = new Jed(document.nbjs_translations);\n i18n._ = i18n.gettext;\n i18n.msg = i18n; // Just a place holder until the init promise resolves.\n\n return i18n;\n});\n\n",
|
||
|
"// Copyright (c) Jupyter Development Team.\n// Distributed under the terms of the Modified BSD License.\n\ndefine('base/js/dialog',['jquery',\n 'codemirror/lib/codemirror',\n 'bootstrap',\n\t'base/js/i18n'],\n\tfunction($, CodeMirror, bs, i18n) {\n \"use strict\";\n\n /**\n * A wrapper around bootstrap modal for easier use\n * Pass it an option dictionary with the following properties:\n *\n * - body : <string> or <DOM node>, main content of the dialog\n * if pass a <string> it will be wrapped in a p tag and\n * html element escaped, unless you specify sanitize=false\n * option.\n * - title : Dialog title, default to empty string.\n * - buttons : dict of btn_options who keys are button label.\n * see btn_options below for description\n * - open : callback to trigger on dialog open.\n * - destroy:\n * - notebook : notebook instance\n * - keyboard_manager: keyboard manager instance.\n *\n * Unlike bootstrap modals, the backdrop options is set by default \n * to 'static'.\n *\n * The rest of the options are passed as is to bootstrap modals. \n *\n * btn_options: dict with the following property:\n * \n * - click : callback to trigger on click\n * - class : css classes to add to button.\n *\n *\n *\n **/\n var modal = function (options) {\n\n var modal = $(\"<div/>\")\n .addClass(\"modal\")\n .addClass(\"fade\")\n .attr(\"role\", \"dialog\");\n var dialog = $(\"<div/>\")\n .addClass(\"modal-dialog\")\n .appendTo(modal);\n var dialog_content = $(\"<div/>\")\n .addClass(\"modal-content\")\n .appendTo(dialog);\n if(typeof(options.body) === 'string' && options.sanitize !== false){\n options.body = $(\"<p/>\").text(options.body);\n }\n dialog_content.append(\n $(\"<div/>\")\n .addClass(\"modal-header\")\n .mousedown(function() {\n $(\".modal\").draggable({handle: '.modal-header'});\n })\n .append($(\"<button>\")\n .attr(\"type\", \"button\")\n .attr(\"aria-label\", i18n.msg._(\"close\"))\n .addClass(\"close\")\n .attr(\"data-dismiss\", \"modal\")\n .attr(\"aria-hidden\", \"true\")\n .html(\"×\")\n ).append(\n $(\"<h4/>\")\n .addClass('modal-title')\n .text(options.title || \"\")\n )\n ).append(\n $(\"<div/>\")\n .addClass(\"modal-body\")\n .append(\n options.body || $(\"<p/>\")\n )\n );\n \n var footer = $(\"<div/>\").addClass(\"modal-footer\");\n \n var default_button;\n \n for (var label in options.buttons) {\n var btn_opts = options.buttons[label];\n var button = $(\"<button/>\")\n .addClass(\"btn btn-default btn-sm\")\n .attr(\"data-dismiss\", \"modal\")\n .text(i18n.msg.translate(label).fetch());\n if (btn_opts.id) {\n button.attr('id', btn_opts.id);\n }\n if (btn_opts.click) {\n button.click($.proxy(btn_opts.click, dialog_content));\n }\n if (btn_opts.class) {\n button.addClass(btn_opts.class);\n }\n footer.append(button);\n if (options.default_button && label === options.default_button) {\n default_button = button;\n }\n }\n if (!options.default_button) {\n default_button = footer.find(\"button\").last();\n }\n dialog_content.append(footer);\n // hook up on-open event\n modal.on(\"shown.bs.m
|
||
|
"// Copyright (c) Jupyter Development Team.\n// Distributed under the terms of the Modified BSD License.\n\n// Give us an object to bind all events to. This object should be created\n// before all other objects so it exists when others register event handlers.\n// To register an event handler:\n//\n// requirejs(['base/js/events'], function (events) {\n// events.on(\"event.Namespace\", function () { do_stuff(); });\n// });\n\ndefine('base/js/events',['jquery', 'base/js/namespace'], function($, Jupyter) {\n \"use strict\";\n \n // Events singleton\n if (!window._Events) {\n window._Events = function () {};\n window._events = new window._Events();\n }\n \n // Backwards compatibility.\n Jupyter.Events = window._Events;\n Jupyter.events = window._events;\n \n var events = $([window._events]);\n\n // catch and log errors in triggered events\n events._original_trigger = events.trigger;\n events.trigger = function (name, data) {\n try {\n this._original_trigger.apply(this, arguments);\n } catch (e) {\n console.error(\"Exception in event handler for \" + name, e, arguments);\n }\n }\n return events;\n});\n\n",
|
||
|
"// Copyright (c) Jupyter Development Team.\n// Distributed under the terms of the Modified BSD License.\n\n// Define an object to attach promises to for one-time events.\n\ndefine('base/js/promises',['base/js/events', 'base/js/namespace'], function(events, Jupyter) {\n \"use strict\";\n\n // Promise to be resolved when the application is initialized.\n // The value is the name of the app on the current page.\n var app_initialized = new Promise(function(resolve, reject) {\n events.on('app_initialized.NotebookApp', function() {\n resolve('NotebookApp');\n });\n events.on('app_initialized.DashboardApp', function() {\n resolve('DashboardApp');\n });\n });\n\n var promises = {\n app_initialized: app_initialized\n };\n Jupyter.promises = promises;\n\n return promises;\n});\n\n",
|
||
|
"// Copyright (c) Jupyter Development Team.\n// Distributed under the terms of the Modified BSD License.\n\ndefine('base/js/page',[\n 'jquery',\n 'base/js/events',\n], function($, events){\n \"use strict\";\n\n var Page = function (header_div_selector, site_div_selector) {\n /**\n * Constructor\n *\n * Parameters\n * header_div_selector: string\n * site_div_selector: string\n */\n this.header_div_element = $(header_div_selector || 'div#header');\n this.site_div_element = $(site_div_selector || 'div#site');\n\n this.bind_events();\n };\n\n Page.prototype.bind_events = function () {\n // resize site on:\n // - window resize\n // - header change\n // - page load\n var _handle_resize = $.proxy(this._resize_site, this);\n\n $(window).resize(_handle_resize);\n\n // On document ready, resize codemirror.\n $(document).ready(_handle_resize);\n events.on('resize-header.Page', _handle_resize);\n };\n\n Page.prototype.show = function () {\n /**\n * The header and site divs start out hidden to prevent FLOUC.\n * Main scripts should call this method after styling everything.\n */\n this.show_header();\n this.show_site();\n };\n\n Page.prototype.show_header = function () {\n /**\n * The header and site divs start out hidden to prevent FLOUC.\n * Main scripts should call this method after styling everything.\n */\n this.header_div_element.css('display','block');\n };\n\n Page.prototype.show_site = function () {\n /**\n * The header and site divs start out hidden to prevent FLOUC.\n * Main scripts should call this method after styling everything.\n */\n this.site_div_element.css('display', 'block');\n this._resize_site();\n };\n\n Page.prototype._resize_site = function(e) {\n /**\n * Update the site's size.\n */\n\n // In the case an event is passed in, only trigger if the event does\n // *not* have a target DOM node (i.e., it is not bubbling up). See\n // https://bugs.jquery.com/ticket/9841#comment:8\n if (!(e && e.target && e.target.tagName)) {\n $('div#site').height($(window).height() - $('#header').height());\n }\n };\n\n return {'Page': Page};\n});\n\n",
|
||
|
";(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :\n typeof define === 'function' && define.amd ? define('moment',factory) :\n global.moment = factory()\n}(this, (function () { 'use strict';\n\nvar hookCallback;\n\nfunction hooks () {\n return hookCallback.apply(null, arguments);\n}\n\n// This is done to register the method called with moment()\n// without creating circular dependencies.\nfunction setHookCallback (callback) {\n hookCallback = callback;\n}\n\nfunction isArray(input) {\n return input instanceof Array || Object.prototype.toString.call(input) === '[object Array]';\n}\n\nfunction isObject(input) {\n // IE8 will treat undefined and null as object if it wasn't for\n // input != null\n return input != null && Object.prototype.toString.call(input) === '[object Object]';\n}\n\nfunction isObjectEmpty(obj) {\n if (Object.getOwnPropertyNames) {\n return (Object.getOwnPropertyNames(obj).length === 0);\n } else {\n var k;\n for (k in obj) {\n if (obj.hasOwnProperty(k)) {\n return false;\n }\n }\n return true;\n }\n}\n\nfunction isUndefined(input) {\n return input === void 0;\n}\n\nfunction isNumber(input) {\n return typeof input === 'number' || Object.prototype.toString.call(input) === '[object Number]';\n}\n\nfunction isDate(input) {\n return input instanceof Date || Object.prototype.toString.call(input) === '[object Date]';\n}\n\nfunction map(arr, fn) {\n var res = [], i;\n for (i = 0; i < arr.length; ++i) {\n res.push(fn(arr[i], i));\n }\n return res;\n}\n\nfunction hasOwnProp(a, b) {\n return Object.prototype.hasOwnProperty.call(a, b);\n}\n\nfunction extend(a, b) {\n for (var i in b) {\n if (hasOwnProp(b, i)) {\n a[i] = b[i];\n }\n }\n\n if (hasOwnProp(b, 'toString')) {\n a.toString = b.toString;\n }\n\n if (hasOwnProp(b, 'valueOf')) {\n a.valueOf = b.valueOf;\n }\n\n return a;\n}\n\nfunction createUTC (input, format, locale, strict) {\n return createLocalOrUTC(input, format, locale, strict, true).utc();\n}\n\nfunction defaultParsingFlags() {\n // We need to deep clone this object.\n return {\n empty : false,\n unusedTokens : [],\n unusedInput : [],\n overflow : -2,\n charsLeftOver : 0,\n nullInput : false,\n invalidMonth : null,\n invalidFormat : false,\n userInvalidated : false,\n iso : false,\n parsedDateParts : [],\n meridiem : null,\n rfc2822 : false,\n weekdayMismatch : false\n };\n}\n\nfunction getParsingFlags(m) {\n if (m._pf == null) {\n m._pf = defaultParsingFlags();\n }\n return m._pf;\n}\n\nvar some;\nif (Array.prototype.some) {\n some = Array.prototype.some;\n} else {\n some = function (fun) {\n var t = Object(this);\n var len = t.length >>> 0;\n\n for (var i = 0; i < len; i++) {\n if (i in t && fun.call(this, t[i], i, t)) {\n return true;\n }\n }\n\n return false;\n };\n}\n\nfunction isValid(m) {\n if (m._isValid == null) {\n var flags = getParsingFlags(m);\n var parsedParts = some.call(flags.parsedDateParts, function (i) {\n return i != null;\n });\n var isNowValid = !isNaN(m._d.getTime()) &&\n flags.overflow < 0 &&\n !flags.empty &&\n !flags.invalidMonth &&\n !flags.invalidWeekday &&\n !flags.weekdayMismatch &&\n !flags.nullInput &&\n !flags.invalidFormat &&\n !flags.userInvalidated &&\n (!flags.meridiem || (flags.meridiem && parsedParts));\n\n if (m._strict) {\n isNowValid = isNowValid &&\n flags.charsLeftOver === 0 &&\n flags.unusedTokens.length === 0 &&\n f
|
||
|
"// Underscore.js 1.8.3\n// http://underscorejs.org\n// (c) 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors\n// Underscore may be freely distributed under the MIT license.\n(function(){function n(n){function t(t,r,e,u,i,o){for(;i>=0&&o>i;i+=n){var a=u?u[i]:i;e=r(e,t[a],a,t)}return e}return function(r,e,u,i){e=b(e,i,4);var o=!k(r)&&m.keys(r),a=(o||r).length,c=n>0?0:a-1;return arguments.length<3&&(u=r[o?o[c]:c],c+=n),t(r,e,u,o,c,a)}}function t(n){return function(t,r,e){r=x(r,e);for(var u=O(t),i=n>0?0:u-1;i>=0&&u>i;i+=n)if(r(t[i],i,t))return i;return-1}}function r(n,t,r){return function(e,u,i){var o=0,a=O(e);if(\"number\"==typeof i)n>0?o=i>=0?i:Math.max(i+a,o):a=i>=0?Math.min(i+1,a):i+a+1;else if(r&&i&&a)return i=r(e,u),e[i]===u?i:-1;if(u!==u)return i=t(l.call(e,o,a),m.isNaN),i>=0?i+o:-1;for(i=n>0?o:a-1;i>=0&&a>i;i+=n)if(e[i]===u)return i;return-1}}function e(n,t){var r=I.length,e=n.constructor,u=m.isFunction(e)&&e.prototype||a,i=\"constructor\";for(m.has(n,i)&&!m.contains(t,i)&&t.push(i);r--;)i=I[r],i in n&&n[i]!==u[i]&&!m.contains(t,i)&&t.push(i)}var u=this,i=u._,o=Array.prototype,a=Object.prototype,c=Function.prototype,f=o.push,l=o.slice,s=a.toString,p=a.hasOwnProperty,h=Array.isArray,v=Object.keys,g=c.bind,y=Object.create,d=function(){},m=function(n){return n instanceof m?n:this instanceof m?void(this._wrapped=n):new m(n)};\"undefined\"!=typeof exports?(\"undefined\"!=typeof module&&module.exports&&(exports=module.exports=m),exports._=m):u._=m,m.VERSION=\"1.8.3\";var b=function(n,t,r){if(t===void 0)return n;switch(null==r?3:r){case 1:return function(r){return n.call(t,r)};case 2:return function(r,e){return n.call(t,r,e)};case 3:return function(r,e,u){return n.call(t,r,e,u)};case 4:return function(r,e,u,i){return n.call(t,r,e,u,i)}}return function(){return n.apply(t,arguments)}},x=function(n,t,r){return null==n?m.identity:m.isFunction(n)?b(n,t,r):m.isObject(n)?m.matcher(n):m.property(n)};m.iteratee=function(n,t){return x(n,t,1/0)};var _=function(n,t){return function(r){var e=arguments.length;if(2>e||null==r)return r;for(var u=1;e>u;u++)for(var i=arguments[u],o=n(i),a=o.length,c=0;a>c;c++){var f=o[c];t&&r[f]!==void 0||(r[f]=i[f])}return r}},j=function(n){if(!m.isObject(n))return{};if(y)return y(n);d.prototype=n;var t=new d;return d.prototype=null,t},w=function(n){return function(t){return null==t?void 0:t[n]}},A=Math.pow(2,53)-1,O=w(\"length\"),k=function(n){var t=O(n);return\"number\"==typeof t&&t>=0&&A>=t};m.each=m.forEach=function(n,t,r){t=b(t,r);var e,u;if(k(n))for(e=0,u=n.length;u>e;e++)t(n[e],e,n);else{var i=m.keys(n);for(e=0,u=i.length;u>e;e++)t(n[i[e]],i[e],n)}return n},m.map=m.collect=function(n,t,r){t=x(t,r);for(var e=!k(n)&&m.keys(n),u=(e||n).length,i=Array(u),o=0;u>o;o++){var a=e?e[o]:o;i[o]=t(n[a],a,n)}return i},m.reduce=m.foldl=m.inject=n(1),m.reduceRight=m.foldr=n(-1),m.find=m.detect=function(n,t,r){var e;return e=k(n)?m.findIndex(n,t,r):m.findKey(n,t,r),e!==void 0&&e!==-1?n[e]:void 0},m.filter=m.select=function(n,t,r){var e=[];return t=x(t,r),m.each(n,function(n,r,u){t(n,r,u)&&e.push(n)}),e},m.reject=function(n,t,r){return m.filter(n,m.negate(x(t)),r)},m.every=m.all=function(n,t,r){t=x(t,r);for(var e=!k(n)&&m.keys(n),u=(e||n).length,i=0;u>i;i++){var o=e?e[i]:i;if(!t(n[o],o,n))return!1}return!0},m.some=m.any=function(n,t,r){t=x(t,r);for(var e=!k(n)&&m.keys(n),u=(e||n).length,i=0;u>i;i++){var o=e?e[i]:i;if(t(n[o],o,n))return!0}return!1},m.contains=m.includes=m.include=function(n,t,r,e){return k(n)||(n=m.values(n)),(\"number\"!=typeof r||e)&&(r=0),m.indexOf(n,t,r)>=0},m.invoke=function(n,t){var r=l.call(arguments,2),e=m.isFunction(t);return m.map(n,function(n){var u=e?t:n[t];return null==u?u:u.apply(n,r)})},m.pluck=function(n,t){return m.map(n,m.property(t))},m.where=function(n,t){return m.filter(n,m.matcher(t))},m.findWhere=function(n,t){return m.find(n,m.matcher(t))},m.max=function(n,t,r){var e,u,i=-1/0,o=-1/0;if(null==t&&null!=n){n=k(n)?n:m.values(n);for(var a=0,c=n.length;c>a;a++)e=n[a],e>i&&(i=e)}else t=x(t,r),m.each(n,function(n,r,e){u=t(n,r,e),(u>o||u
|
||
|
"// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: https://codemirror.net/LICENSE\n\n(function(mod) {\n if (typeof exports == \"object\" && typeof module == \"object\") // CommonJS\n mod(require(\"../lib/codemirror\"));\n else if (typeof define == \"function\" && define.amd) // AMD\n define('codemirror/mode/meta',[\"../lib/codemirror\"], mod);\n else // Plain browser env\n mod(CodeMirror);\n})(function(CodeMirror) {\n \"use strict\";\n\n CodeMirror.modeInfo = [\n {name: \"APL\", mime: \"text/apl\", mode: \"apl\", ext: [\"dyalog\", \"apl\"]},\n {name: \"PGP\", mimes: [\"application/pgp\", \"application/pgp-encrypted\", \"application/pgp-keys\", \"application/pgp-signature\"], mode: \"asciiarmor\", ext: [\"asc\", \"pgp\", \"sig\"]},\n {name: \"ASN.1\", mime: \"text/x-ttcn-asn\", mode: \"asn.1\", ext: [\"asn\", \"asn1\"]},\n {name: \"Asterisk\", mime: \"text/x-asterisk\", mode: \"asterisk\", file: /^extensions\\.conf$/i},\n {name: \"Brainfuck\", mime: \"text/x-brainfuck\", mode: \"brainfuck\", ext: [\"b\", \"bf\"]},\n {name: \"C\", mime: \"text/x-csrc\", mode: \"clike\", ext: [\"c\", \"h\", \"ino\"]},\n {name: \"C++\", mime: \"text/x-c++src\", mode: \"clike\", ext: [\"cpp\", \"c++\", \"cc\", \"cxx\", \"hpp\", \"h++\", \"hh\", \"hxx\"], alias: [\"cpp\"]},\n {name: \"Cobol\", mime: \"text/x-cobol\", mode: \"cobol\", ext: [\"cob\", \"cpy\"]},\n {name: \"C#\", mime: \"text/x-csharp\", mode: \"clike\", ext: [\"cs\"], alias: [\"csharp\", \"cs\"]},\n {name: \"Clojure\", mime: \"text/x-clojure\", mode: \"clojure\", ext: [\"clj\", \"cljc\", \"cljx\"]},\n {name: \"ClojureScript\", mime: \"text/x-clojurescript\", mode: \"clojure\", ext: [\"cljs\"]},\n {name: \"Closure Stylesheets (GSS)\", mime: \"text/x-gss\", mode: \"css\", ext: [\"gss\"]},\n {name: \"CMake\", mime: \"text/x-cmake\", mode: \"cmake\", ext: [\"cmake\", \"cmake.in\"], file: /^CMakeLists.txt$/},\n {name: \"CoffeeScript\", mimes: [\"application/vnd.coffeescript\", \"text/coffeescript\", \"text/x-coffeescript\"], mode: \"coffeescript\", ext: [\"coffee\"], alias: [\"coffee\", \"coffee-script\"]},\n {name: \"Common Lisp\", mime: \"text/x-common-lisp\", mode: \"commonlisp\", ext: [\"cl\", \"lisp\", \"el\"], alias: [\"lisp\"]},\n {name: \"Cypher\", mime: \"application/x-cypher-query\", mode: \"cypher\", ext: [\"cyp\", \"cypher\"]},\n {name: \"Cython\", mime: \"text/x-cython\", mode: \"python\", ext: [\"pyx\", \"pxd\", \"pxi\"]},\n {name: \"Crystal\", mime: \"text/x-crystal\", mode: \"crystal\", ext: [\"cr\"]},\n {name: \"CSS\", mime: \"text/css\", mode: \"css\", ext: [\"css\"]},\n {name: \"CQL\", mime: \"text/x-cassandra\", mode: \"sql\", ext: [\"cql\"]},\n {name: \"D\", mime: \"text/x-d\", mode: \"d\", ext: [\"d\"]},\n {name: \"Dart\", mimes: [\"application/dart\", \"text/x-dart\"], mode: \"dart\", ext: [\"dart\"]},\n {name: \"diff\", mime: \"text/x-diff\", mode: \"diff\", ext: [\"diff\", \"patch\"]},\n {name: \"Django\", mime: \"text/x-django\", mode: \"django\"},\n {name: \"Dockerfile\", mime: \"text/x-dockerfile\", mode: \"dockerfile\", file: /^Dockerfile$/},\n {name: \"DTD\", mime: \"application/xml-dtd\", mode: \"dtd\", ext: [\"dtd\"]},\n {name: \"Dylan\", mime: \"text/x-dylan\", mode: \"dylan\", ext: [\"dylan\", \"dyl\", \"intr\"]},\n {name: \"EBNF\", mime: \"text/x-ebnf\", mode: \"ebnf\"},\n {name: \"ECL\", mime: \"text/x-ecl\", mode: \"ecl\", ext: [\"ecl\"]},\n {name: \"edn\", mime: \"application/edn\", mode: \"clojure\", ext: [\"edn\"]},\n {name: \"Eiffel\", mime: \"text/x-eiffel\", mode: \"eiffel\", ext: [\"e\"]},\n {name: \"Elm\", mime: \"text/x-elm\", mode: \"elm\", ext: [\"elm\"]},\n {name: \"Embedded Javascript\", mime: \"application/x-ejs\", mode: \"htmlembedded\", ext: [\"ejs\"]},\n {name: \"Embedded Ruby\", mime: \"application/x-erb\", mode: \"htmlembedded\", ext: [\"erb\"]},\n {name: \"Erlang\", mime: \"text/x-erlang\", mode: \"erlang\", ext: [\"erl\"]},\n {name: \"Esper\", mime: \"text
|
||
|
"// Copyright (c) Jupyter Development Team.\n// Distributed under the terms of the Modified BSD License.\n\ndefine('base/js/utils',[\n 'jquery',\n 'codemirror/lib/codemirror',\n 'moment',\n 'underscore',\n // silently upgrades CodeMirror\n 'codemirror/mode/meta',\n], function($, CodeMirror, moment, _){\n \"use strict\";\n \n // keep track of which extensions have been loaded already\n var extensions_loaded = [];\n\n /**\n * Whether or not an extension has been loaded\n * @param {string} extension - name of the extension\n * @return {boolean} true if loaded already\n */\n var is_loaded = function(extension) {\n var ext_path = \"nbextensions/\" + extension;\n return extensions_loaded.indexOf(ext_path) >= 0;\n };\n\n /**\n * Load a single extension.\n * @param {string} extension - extension path.\n * @return {Promise} that resolves to an extension module handle\n */\n var load_extension = function (extension) {\n return new Promise(function(resolve, reject) {\n var ext_path = \"nbextensions/\" + extension;\n requirejs([ext_path], function(module) {\n if (!is_loaded(extension)) {\n console.log(\"Loading extension: \" + extension);\n if (module && module.load_ipython_extension) {\n Promise.resolve(module.load_ipython_extension()).then(function() {\n resolve(module);\n }).catch(reject);\n }\n extensions_loaded.push(ext_path);\n } else {\n console.log(\"Loaded extension already: \" + extension);\n resolve(module);\n }\n }, function(err) {\n reject(err);\n });\n });\n };\n\n /**\n * Load multiple extensions.\n * Takes n-args, where each arg is a string path to the extension.\n * @return {Promise} that resolves to a list of loaded module handles.\n */\n var load_extensions = function () {\n console.log('load_extensions', arguments);\n return Promise.all(Array.prototype.map.call(arguments, load_extension)).catch(function(err) {\n console.error(\"Failed to load extension\" + (err.requireModules.length>1?'s':'') + \":\", err.requireModules, err);\n });\n };\n\n /**\n * Return a list of extensions that should be active\n * The config for nbextensions comes in as a dict where keys are\n * nbextensions paths and the values are a bool indicating if it\n * should be active. This returns a list of nbextension paths\n * where the value is true\n */\n function filter_extensions(nbext_config) {\n var active = [];\n Object.keys(nbext_config).forEach(function (nbext) {\n if (nbext_config[nbext]) {active.push(nbext);}\n });\n return active;\n }\n\n /**\n * Wait for a config section to load, and then load the extensions specified\n * in a 'load_extensions' key inside it.\n */\n function load_extensions_from_config(section) {\n return section.loaded.then(function() {\n if (section.data.load_extensions) {\n var active = filter_extensions(section.data.load_extensions);\n return load_extensions.apply(this, active);\n }\n }).catch(utils.reject('Could not load nbextensions from ' + section.section_name + ' config file'));\n }\n\n //============================================================================\n // Cross-browser RegEx Split\n //============================================================================\n\n // This code has been MODIFIED from the code licensed below to not replace the\n // default browser split. The license is reproduced here.\n\n // see http://blog.stevenlevithan.com/archives/cross-browser-split for more info:\n /*!\n * Cross-Browser Split 1.1.1\n * Copyright 2007-2012
|
||
|
"// Copyright (c) Jupyter Development Team.\n// Distributed under the terms of the Modified BSD License.\n\ndefine('services/config',[\n 'base/js/utils',\n ],\nfunction(utils) {\n \"use strict\";\n var ConfigSection = function(section_name, options) {\n this.section_name = section_name;\n this.base_url = options.base_url;\n this.data = {};\n \n var that = this;\n \n /* .loaded is a promise, fulfilled the first time the config is loaded\n * from the server. Code can do:\n * conf.loaded.then(function() { ... using conf.data ... });\n */\n this._one_load_finished = false;\n this.loaded = new Promise(function(resolve, reject) {\n that._finish_firstload = resolve;\n });\n };\n\n ConfigSection.prototype.api_url = function() {\n return utils.url_path_join(this.base_url, 'api/config',\n utils.encode_uri_components(this.section_name));\n };\n \n ConfigSection.prototype._load_done = function() {\n if (!this._one_load_finished) {\n this._one_load_finished = true;\n this._finish_firstload();\n }\n };\n \n ConfigSection.prototype.load = function() {\n var that = this;\n return utils.promising_ajax(this.api_url(), {\n cache: false,\n type: \"GET\",\n dataType: \"json\",\n }).then(function(data) {\n that.data = data;\n that._load_done();\n return data;\n });\n };\n \n /**\n * Modify the config values stored. Update the local data immediately,\n * send the change to the server, and use the updated data from the server\n * when the reply comes.\n */\n ConfigSection.prototype.update = function(newdata) {\n $.extend(true, this.data, newdata); // true -> recursive update\n \n var that = this;\n return utils.promising_ajax(this.api_url(), {\n processData: false,\n type : \"PATCH\",\n data: JSON.stringify(newdata),\n dataType : \"json\",\n contentType: 'application/json',\n }).then(function(data) {\n that.data = data;\n that._load_done();\n return data;\n });\n };\n \n \n var ConfigWithDefaults = function(section, defaults, classname) {\n this.section = section;\n this.defaults = defaults;\n this.classname = classname;\n };\n \n ConfigWithDefaults.prototype._class_data = function() {\n if (this.classname) {\n return this.section.data[this.classname] || {};\n } else {\n return this.section.data;\n }\n };\n \n /**\n * Wait for config to have loaded, then get a value or the default.\n * Returns a promise.\n */\n ConfigWithDefaults.prototype.get = function(key) {\n var that = this;\n return this.section.loaded.then(function() {\n return that.get_sync(key);\n });\n };\n \n /**\n * Return a config value. If config is not yet loaded, return the default\n * instead of waiting for it to load.\n */\n ConfigWithDefaults.prototype.get_sync = function(key) {\n var data = this._class_data();\n if (key === undefined) {\n // no key specified, return full config data\n return $.extend(true, {}, this.defaults, data);\n }\n\n var value = data[key];\n if (value !== undefined) {\n if (typeof value == 'object') {\n // merge with defaults if it's an object\n return $.extend(true, {}, this.defaults[key], value);\n } else {\n return value;\n }\n }\n return this.defaults[key];\n };\n \n /**\n * Set a config value. Send the update to the server, and change our\n * local copy of the data immediately.\n * Returns a promise which is fulfilled when the server replies to the\n * change.\n
|
||
|
"// Copyright (c) Jupyter Development Team.\n// Distributed under the terms of the Modified BSD License.\n/**\n *\n *\n * @module keyboard\n * @namespace keyboard\n * @class ShortcutManager\n */\n\ndefine('base/js/keyboard',[\n 'jquery',\n 'base/js/utils',\n 'underscore',\n], function($, utils, _) {\n \"use strict\";\n\n\n /**\n * Setup global keycodes and inverse keycodes.\n *\n * See http://unixpapa.com/js/key.html for a complete description. The short of\n * it is that there are different keycode sets. Firefox uses the \"Mozilla keycodes\"\n * and Webkit/IE use the \"IE keycodes\". These keycode sets are mostly the same\n * but have minor differences.\n **/\n\n // These apply to Firefox, (Webkit and IE)\n // This does work **only** on US keyboard.\n var _keycodes = {\n 'a': 65, 'b': 66, 'c': 67, 'd': 68, 'e': 69, 'f': 70, 'g': 71, 'h': 72, 'i': 73,\n 'j': 74, 'k': 75, 'l': 76, 'm': 77, 'n': 78, 'o': 79, 'p': 80, 'q': 81, 'r': 82,\n 's': 83, 't': 84, 'u': 85, 'v': 86, 'w': 87, 'x': 88, 'y': 89, 'z': 90,\n '1 !': 49, '2 @': 50, '3 #': 51, '4 $': 52, '5 %': 53, '6 ^': 54,\n '7 &': 55, '8 *': 56, '9 (': 57, '0 )': 48, \n '[ {': 219, '] }': 221, '` ~': 192, ', <': 188, '. >': 190, '/ ?': 191,\n '\\\\ |': 220, '\\' \"': 222,\n 'numpad0': 96, 'numpad1': 97, 'numpad2': 98, 'numpad3': 99, 'numpad4': 100,\n 'numpad5': 101, 'numpad6': 102, 'numpad7': 103, 'numpad8': 104, 'numpad9': 105,\n 'multiply': 106, 'add': 107, 'subtract': 109, 'decimal': 110, 'divide': 111,\n 'f1': 112, 'f2': 113, 'f3': 114, 'f4': 115, 'f5': 116, 'f6': 117, 'f7': 118,\n 'f8': 119, 'f9': 120, 'f10': 121, 'f11': 122, 'f12': 123, 'f13': 124, 'f14': 125, 'f15': 126,\n 'backspace': 8, 'tab': 9, 'enter': 13, 'shift': 16, 'ctrl': 17, 'alt': 18,\n 'meta': 91, 'capslock': 20, 'esc': 27, 'space': 32, 'pageup': 33, 'pagedown': 34,\n 'end': 35, 'home': 36, 'left': 37, 'up': 38, 'right': 39, 'down': 40,\n 'insert': 45, 'delete': 46, 'numlock': 144,\n };\n \n // These apply to Firefox and Opera\n var _mozilla_keycodes = {\n '; :': 59, '= +': 61, '- _': 173, 'meta': 224, 'minus':173\n };\n \n // This apply to Webkit and IE\n var _ie_keycodes = {\n '; :': 186, '= +': 187, '- _': 189, 'minus':189\n };\n \n var browser = utils.browser[0];\n var platform = utils.platform;\n \n if (browser === 'Firefox' || browser === 'Opera' || browser === 'Netscape') {\n $.extend(_keycodes, _mozilla_keycodes);\n } else if (browser === 'Safari' || browser === 'Chrome' || browser === 'MSIE') {\n $.extend(_keycodes, _ie_keycodes);\n }\n\n var keycodes = {};\n var inv_keycodes = {};\n for (var name in _keycodes) {\n var names = name.split(' ');\n if (names.length === 1) {\n var n = names[0];\n keycodes[n] = _keycodes[n];\n inv_keycodes[_keycodes[n]] = n;\n } else {\n var primary = names[0];\n var secondary = names[1];\n keycodes[primary] = _keycodes[name];\n keycodes[secondary] = _keycodes[name];\n inv_keycodes[_keycodes[name]] = primary;\n }\n }\n\n var normalize_key = function (key) {\n return inv_keycodes[keycodes[key]];\n };\n\n var normalize_shortcut = function (shortcut) {\n /**\n * @function _normalize_shortcut\n * @private\n * return a dict containing the normalized shortcut and the number of time it should be pressed:\n *\n * Put a shortcut into normalized form:\n * 1. Make lowercase\n * 2. Replace cmd by meta\n * 3. Sort '-' separated modifiers into the order alt-ctrl-meta-shift\n * 4. Normalize keys\n **/\n if (platform === 'MacOS') {\n shortcut = shortcut.toLowerCase().replace('cmdtrl-', 'cmd-');\n } else {\n shortcut = shortcut.toLowerCase().replace('cmdtrl-', 'ctrl-');\n
|
||
|
"// Copyright (c) Jupyter Development Team.\n// Distributed under the terms of the Modified BSD License.\n\ndefine('bidi/numericshaping',[],\n function(bidi) {\n \"use strict\";\n\t\n var regex = /([0-9])|([\\u0660-\\u0669])|([\\u0608\\u060B\\u060D\\u061B-\\u064A\\u066D-\\u066F\\u0671-\\u06D5\\u06E5-\\u06E6\\u06EE-\\u06EF\\u06FA-\\u06FF\\u0750-\\u077F\\u08A0-\\u08E3\\u200F\\u202B\\u202E\\u2067\\uFB50-\\uFD3D\\uFD40-\\uFDCF\\uFDF0-\\uFDFC\\uFDFE-\\uFDFF\\uFE70-\\uFEFE]+)|([^0-9\\u0660-\\u0669\\u0608\\u060B\\u060D\\u061B-\\u064A\\u066D-\\u066F\\u0671-\\u06D5\\u06E5-\\u06E6\\u06EE-\\u06EF\\u06FA-\\u06FF\\u0750-\\u077F\\u08A0-\\u08E3\\u200F\\u202B\\u202E\\u2067\\uFB50-\\uFD3D\\uFD40-\\uFDCF\\uFDF0-\\uFDFC\\uFDFE-\\uFDFF\\uFE70-\\uFEFE\\u0600-\\u0607\\u0609-\\u060A\\u060C\\u060E-\\u061A\\u064B-\\u066C\\u0670\\u06D6-\\u06E4\\u06E7-\\u06ED\\u06F0-\\u06F9\\u08E4-\\u08FF\\uFD3E-\\uFD3F\\uFDD0-\\uFDEF\\uFDFD\\uFEFF\\u0000-\\u0040\\u005B-\\u0060\\u007B-\\u007F\\u0080-\\u00A9\\u00AB-\\u00B4\\u00B6-\\u00B9\\u00BB-\\u00BF\\u00D7\\u00F7\\u02B9-\\u02BA\\u02C2-\\u02CF\\u02D2-\\u02DF\\u02E5-\\u02ED\\u02EF-\\u02FF\\u2070\\u2074-\\u207E\\u2080-\\u208E\\u2100-\\u2101\\u2103-\\u2106\\u2108-\\u2109\\u2114\\u2116-\\u2118\\u211E-\\u2123\\u2125\\u2127\\u2129\\u212E\\u213A-\\u213B\\u2140-\\u2144\\u214A-\\u214D\\u2150-\\u215F\\u2189\\uA720-\\uA721\\uA788\\uFF01-\\uFF20\\uFF3B-\\uFF40\\uFF5B-\\uFF65\\uFFE0-\\uFFE6\\uFFE8-\\uFFEE]+)/g;\n\t\n var shape = function(text, shaperType) {\n text = text.toString();\n if (!text) { \n return text;\n }\n switch (shaperType) {\n case \"defaultNumeral\":\n return _shapeEuropean(text);\n case \"national\":\n return _shapeArabic(text);\n default:\n return text;\n }\n };\n \n var _shapeEuropean = function(text) {\n return text.replace(/[\\u0660-\\u0669]/g, function(c) {\n return c.charCodeAt(0) - 1632;\n });\n };\n\n var _shapeArabic = function(text) {\n return text.replace(/[0-9]/g, function(c) {\n return String.fromCharCode(parseInt(c) + 1632);\n });\n };\n \n var numericshaping = {\n shapeNumerals : shape\n };\n \n return numericshaping; \n});\n\n",
|
||
|
"// Copyright (c) Jupyter Development Team.\n// Distributed under the terms of the Modified BSD License.\n\ndefine('bidi/bidi',['bidi/numericshaping'], function(numericshaping) {\n 'use strict';\n\n var shaperType = '';\n\n var _uiLang = function() {\n return navigator.language.toLowerCase();\n };\n\n var _loadLocale = function() {\n if (_isMirroringEnabled()) {\n document.body.dir = 'rtl';\n }\n\n requirejs(['moment'], function (moment) {\n console.log('Loaded moment locale', moment.locale(_uiLang()));\n });\n\n shaperType = _uiLang().split('-')[0] == 'ar' ? 'national' : 'defaultNumeral';\n };\n\n var _isMirroringEnabled = function() {\n return new RegExp('^(ar|ara|arc|ae|ave|egy|he|heb|nqo|pal|phn|sam|syc|syr|fa|per|fas|ckb|ur|urd)').test(_uiLang());\n };\n\n /**\n * @param value : the string to apply the bidi-support on it.\n * @param flag :indicates the type of bidi-support (Numeric-shaping ,Base-text-dir ).\n */\n var _applyBidi = function(value /*, flag*/) {\n value = numericshaping.shapeNumerals(value, shaperType);\n return value;\n };\n\n var bidi = {\n applyBidi: _applyBidi,\n isMirroringEnabled: _isMirroringEnabled,\n loadLocale: _loadLocale,\n };\n\n return bidi;\n});\n\n",
|
||
|
"/**\n * marked - a markdown parser\n * Copyright (c) 2011-2018, Christopher Jeffrey. (MIT Licensed)\n * https://github.com/markedjs/marked\n */\n\n;(function(root) {\n'use strict';\n\n/**\n * Block-Level Grammar\n */\n\nvar block = {\n newline: /^\\n+/,\n code: /^( {4}[^\\n]+\\n*)+/,\n fences: /^ {0,3}(`{3,}|~{3,})([^`~\\n]*)\\n(?:|([\\s\\S]*?)\\n)(?: {0,3}\\1[~`]* *(?:\\n+|$)|$)/,\n hr: /^ {0,3}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)/,\n heading: /^ {0,3}(#{1,6}) +([^\\n]*?)(?: +#+)? *(?:\\n+|$)/,\n blockquote: /^( {0,3}> ?(paragraph|[^\\n]*)(?:\\n|$))+/,\n list: /^( {0,3})(bull) [\\s\\S]+?(?:hr|def|\\n{2,}(?! )(?!\\1bull )\\n*|\\s*$)/,\n html: '^ {0,3}(?:' // optional indentation\n + '<(script|pre|style)[\\\\s>][\\\\s\\\\S]*?(?:</\\\\1>[^\\\\n]*\\\\n+|$)' // (1)\n + '|comment[^\\\\n]*(\\\\n+|$)' // (2)\n + '|<\\\\?[\\\\s\\\\S]*?\\\\?>\\\\n*' // (3)\n + '|<![A-Z][\\\\s\\\\S]*?>\\\\n*' // (4)\n + '|<!\\\\[CDATA\\\\[[\\\\s\\\\S]*?\\\\]\\\\]>\\\\n*' // (5)\n + '|</?(tag)(?: +|\\\\n|/?>)[\\\\s\\\\S]*?(?:\\\\n{2,}|$)' // (6)\n + '|<(?!script|pre|style)([a-z][\\\\w-]*)(?:attribute)*? */?>(?=[ \\\\t]*(?:\\\\n|$))[\\\\s\\\\S]*?(?:\\\\n{2,}|$)' // (7) open tag\n + '|</(?!script|pre|style)[a-z][\\\\w-]*\\\\s*>(?=[ \\\\t]*(?:\\\\n|$))[\\\\s\\\\S]*?(?:\\\\n{2,}|$)' // (7) closing tag\n + ')',\n def: /^ {0,3}\\[(label)\\]: *\\n? *<?([^\\s>]+)>?(?:(?: +\\n? *| *\\n *)(title))? *(?:\\n+|$)/,\n nptable: noop,\n table: noop,\n lheading: /^([^\\n]+)\\n {0,3}(=+|-+) *(?:\\n+|$)/,\n // regex template, placeholders will be replaced according to different paragraph\n // interruption rules of commonmark and the original markdown spec:\n _paragraph: /^([^\\n]+(?:\\n(?!hr|heading|lheading|blockquote|fences|list|html)[^\\n]+)*)/,\n text: /^[^\\n]+/\n};\n\nblock._label = /(?!\\s*\\])(?:\\\\[\\[\\]]|[^\\[\\]])+/;\nblock._title = /(?:\"(?:\\\\\"?|[^\"\\\\])*\"|'[^'\\n]*(?:\\n[^'\\n]+)*\\n?'|\\([^()]*\\))/;\nblock.def = edit(block.def)\n .replace('label', block._label)\n .replace('title', block._title)\n .getRegex();\n\nblock.bullet = /(?:[*+-]|\\d{1,9}\\.)/;\nblock.item = /^( *)(bull) ?[^\\n]*(?:\\n(?!\\1bull ?)[^\\n]*)*/;\nblock.item = edit(block.item, 'gm')\n .replace(/bull/g, block.bullet)\n .getRegex();\n\nblock.list = edit(block.list)\n .replace(/bull/g, block.bullet)\n .replace('hr', '\\\\n+(?=\\\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\\\* *){3,})(?:\\\\n+|$))')\n .replace('def', '\\\\n+(?=' + block.def.source + ')')\n .getRegex();\n\nblock._tag = 'address|article|aside|base|basefont|blockquote|body|caption'\n + '|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption'\n + '|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe'\n + '|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option'\n + '|p|param|section|source|summary|table|tbody|td|tfoot|th|thead|title|tr'\n + '|track|ul';\nblock._comment = /<!--(?!-?>)[\\s\\S]*?-->/;\nblock.html = edit(block.html, 'i')\n .replace('comment', block._comment)\n .replace('tag', block._tag)\n .replace('attribute', / +[a-zA-Z:_][\\w.:-]*(?: *= *\"[^\"\\n]*\"| *= *'[^'\\n]*'| *= *[^\\s\"'=<>`]+)?/)\n .getRegex();\n\nblock.paragraph = edit(block._paragraph)\n .replace('hr', block.hr)\n .replace('heading', ' {0,3}#{1,6} +')\n .replace('|lheading', '') // setex headings don't interrupt commonmark paragraphs\n .replace('blockquote', ' {0,3}>')\n .replace('fences', ' {0,3}(?:`{3,}|~{3,})[^`\\\\n]*\\\\n')\n .replace('list', ' {0,3}(?:[*+-]|1[.)]) ') // only lists starting from 1 can interrupt\n .replace('html', '</?(?:tag)(?: +|\\\\n|/?>)|<(?:script|pre|style|!--)')\n .replace('tag', block._tag) // pars can be interrupted by type (6) html blocks\n .getRegex();\n\nblock.blockquote = edit(block.blockquote)\n .replace('paragraph', block.paragraph)\n .getRegex();\n\n/**\n * Normal Block Grammar\n */\n\nblock.normal = merge({}, block);\n\n/**\n * GFM Block Grammar\n */\n\nblock.gfm = merge({}, block.normal, {\n nptable: /^ *([^|\\n ].*\\|.*)\\n *([-:]+ *\\|[-| :]*)(?:\\n((?:.*[^>\\n ].*(?
|
||
|
"// Copyright (c) Jupyter Development Team.\n// Distributed under the terms of the Modified BSD License.\n\ndefine('tree/js/notebooklist',[\n 'jquery',\n 'base/js/namespace',\n 'base/js/utils',\n 'base/js/i18n',\n 'base/js/dialog',\n 'base/js/events',\n 'base/js/keyboard',\n 'moment',\n 'bidi/bidi',\n 'components/marked/lib/marked'\n], function($, IPython, utils, i18n, dialog, events, keyboard, moment, bidi, marked) {\n \"use strict\";\n\n var extension = function(path){\n /**\n * return the last pat after the dot in a filepath\n * or the filepath itself if no dots present.\n * Empty string if the filepath ends with a dot.\n **/\n var parts = path.split('.');\n return parts[parts.length-1];\n };\n\n var item_in = function(item, list) {\n // Normalize list and item to lowercase\n var normalized_list = list.map(function(_item) {\n return _item.toLowerCase();\n });\n return normalized_list.indexOf(item.toLowerCase()) !== -1;\n };\n\n var includes_extension = function(filepath, extensionslist) {\n return item_in(extension(filepath), extensionslist);\n };\n\n function name_sorter(ascending) {\n return (function(a, b) {\n if (type_order[a['type']] < type_order[b['type']]) {\n return -1;\n }\n if (type_order[a['type']] > type_order[b['type']]) {\n return 1;\n }\n if (a['name'].toLowerCase() < b['name'].toLowerCase()) {\n return (ascending) ? -1 : 1;\n }\n if (a['name'].toLowerCase() > b['name'].toLowerCase()) {\n return (ascending) ? 1 : -1;\n }\n return 0;\n });\n }\n\n function modified_sorter(ascending) {\n var order = ascending ? 1 : 0;\n return (function(a, b) {\n return utils.datetime_sort_helper(a.last_modified, b.last_modified,\n order)\n });\n }\n\n function size_sorter(ascending) {\n var order = ascending ? 1 : 0;\n // directories have file size of undefined\n return (function(a, b) {\n if (a.size === undefined) {\n return (ascending) ? -1 : 1;\n }\n\n if (b.size === undefined) {\n return (ascending) ? 1 : -1;\n }\n\n if (a.size > b.size) {\n return (ascending) ? -1 : 1;\n }\n\n if (b.size > a.size) {\n return (ascending) ? 1 : -1;\n }\n\n return 0;\n });\n }\n\n var sort_functions = {\n 'sort-name': name_sorter,\n 'last-modified': modified_sorter,\n 'file-size': size_sorter\n };\n\n var NotebookList = function (selector, options) {\n /**\n * Constructor\n *\n * Parameters:\n * selector: string\n * options: dictionary\n * Dictionary of keyword arguments.\n * session_list: SessionList instance\n * element_name: string\n * base_url: string\n * notebook_path: string\n * contents: Contents instance\n */\n var that = this;\n this.session_list = options.session_list;\n this.events = this.session_list.events;\n // allow code re-use by just changing element_name in kernellist.js\n this.element_name = options.element_name || 'notebook';\n this.selector = selector;\n if (this.selector !== undefined) {\n this.element = $(selector);\n this.style();\n this.bind_events();\n }\n this.notebooks_list = [];\n this.sessions = {};\n this.base_url = options.base_url || utils.get_body_data(\"baseUrl\");\n this.notebook_path = options.notebook_path || utils.get_body_data(\"notebookPath\");\n this.initial_notebook_path = this.notebook_path;\n this.contents = options.contents;\n if (
|
||
|
"// Copyright (c) Jupyter Development Team.\n// Distributed under the terms of the Modified BSD License.\n\ndefine('tree/js/sessionlist',[\n 'jquery',\n 'base/js/utils',\n 'bidi/bidi',\n], function($, utils, bidi) {\n \"use strict\";\n\n var isRTL = bidi.isMirroringEnabled();\n var SesssionList = function (options) {\n /**\n * Constructor\n *\n * Parameters:\n * options: dictionary\n * Dictionary of keyword arguments.\n * events: $(Events) instance\n * base_url : string\n */\n this.events = options.events;\n this.sessions = {};\n this.base_url = options.base_url || utils.get_body_data(\"baseUrl\");\n\n // Add collapse arrows.\n $('#running .panel-group .panel .panel-heading a').each(function(index, el) {\n var $link = $(el);\n var $icon = $('<i />')\n .addClass('fa fa-caret-down');\n $link.append($icon);\n $link.down = true;\n $link.click(function () {\n if ($link.down) {\n $link.down = false;\n // jQeury doesn't know how to animate rotations. Abuse\n // jQueries animate function by using an unused css attribute\n // to do the animation (borderSpacing).\n $icon.animate({ borderSpacing: 90 }, {\n step: function(now,fx) {\n \tisRTL ? $icon.css('transform','rotate(' + now + 'deg)') : $icon.css('transform','rotate(-' + now + 'deg)');\n }\n }, 250);\n } else {\n $link.down = true;\n // See comment above.\n $icon.animate({ borderSpacing: 0 }, {\n step: function(now,fx) {\n \tisRTL ? $icon.css('transform','rotate(' + now + 'deg)') : $icon.css('transform','rotate(-' + now + 'deg)'); \n }\n }, 250);\n }\n });\n });\n };\n \n SesssionList.prototype.load_sessions = function(){\n var that = this;\n var settings = {\n processData : false,\n cache : false,\n type : \"GET\",\n dataType : \"json\",\n success : $.proxy(that.sessions_loaded, this),\n error : utils.log_ajax_error,\n };\n var url = utils.url_path_join(this.base_url, 'api/sessions');\n utils.ajax(url, settings);\n };\n\n SesssionList.prototype.sessions_loaded = function(data){\n this.sessions = {};\n var len = data.length;\n var nb_path;\n for (var i=0; i<len; i++) {\n // The classic notebook only knows about sessions for notebooks,\n // but the server now knows about more general sessions for\n // things like consoles.\n if (data[i].type === 'notebook') {\n nb_path = data[i].notebook.path;\n this.sessions[nb_path] = {\n id: data[i].id,\n kernel: {\n name: data[i].kernel.name\n }\n };\n }\n }\n this.events.trigger('sessions_loaded.Dashboard', this.sessions);\n };\n\n return {'SesssionList': SesssionList};\n});\n\n",
|
||
|
"// Copyright (c) Jupyter Development Team.\n// Distributed under the terms of the Modified BSD License.\n\ndefine('tree/js/kernellist',[\n 'jquery',\n 'base/js/namespace',\n 'tree/js/notebooklist',\n 'base/js/i18n'\n], function($, IPython, notebooklist, i18n) {\n \"use strict\";\n \n var KernelList = function (selector, options) {\n /**\n * Constructor\n *\n * Parameters:\n * selector: string\n * options: dictionary\n * Dictionary of keyword arguments.\n * session_list: SessionList instance\n * base_url: string\n * notebook_path: string\n */\n notebooklist.NotebookList.call(this, selector, $.extend({\n element_name: 'running'},\n options));\n this.kernelspecs = this.sessions = null;\n this.events.on('kernelspecs_loaded.KernelSpec', $.proxy(this._kernelspecs_loaded, this));\n };\n\n KernelList.prototype = Object.create(notebooklist.NotebookList.prototype);\n\n KernelList.prototype.add_duplicate_button = function () {\n /**\n * do nothing\n */\n };\n \n KernelList.prototype._kernelspecs_loaded = function (event, kernelspecs) {\n this.kernelspecs = kernelspecs;\n if (this.sessions) {\n // trigger delayed session load, since kernelspecs arrived later\n this.sessions_loaded(this.sessions);\n }\n };\n \n KernelList.prototype.sessions_loaded = function (d) {\n this.sessions = d;\n if (!this.kernelspecs) {\n return; // wait for kernelspecs before first load\n }\n this.clear_list();\n var item, path, session, info;\n for (path in d) {\n if (!d.hasOwnProperty(path)) {\n // nothing is safe in javascript\n continue;\n }\n session = d[path];\n item = this.new_item(-1);\n info = this.kernelspecs[session.kernel.name];\n this.add_link({\n name: path,\n path: path,\n type: 'notebook',\n kernel_display_name: (info && info.spec) ? info.spec.display_name : session.kernel.name\n }, item);\n }\n $('#running_list_placeholder').toggle($.isEmptyObject(d));\n };\n\n KernelList.prototype.add_link = function (model, item) {\n notebooklist.NotebookList.prototype.add_link.apply(this, [model, item]);\n\n var running_indicator = item.find(\".item_buttons\")\n .text('');\n\n var that = this;\n var kernel_name = $('<div/>')\n .addClass('kernel-name')\n .text(model.kernel_display_name)\n .appendTo(running_indicator);\n\n var shutdown_button = $('<button/>')\n .addClass('btn btn-warning btn-xs')\n .text(i18n._('Shutdown'))\n .click(function() {\n var parent = $(this).parent().parent().parent();\n var path = parent.data('path');\n if(!path) {\n path = parent.parent().data('path');\n }\n if(!path) {\n throw new Error(\"Shutdown path not present\");\n }\n that.shutdown_notebook(path);\n })\n .appendTo(running_indicator);\n };\n \n // Backwards compatibility.\n IPython.KernelList = KernelList;\n\n return {'KernelList': KernelList};\n});\n\n",
|
||
|
"// Copyright (c) Jupyter Development Team.\n// Distributed under the terms of the Modified BSD License.\n\ndefine('tree/js/terminallist',[\n 'jquery',\n 'base/js/namespace',\n 'base/js/utils',\n 'base/js/i18n',\n 'tree/js/notebooklist',\n], function($, IPython, utils, i18n, notebooklist) {\n \"use strict\";\n\n var TerminalList = function (selector, options) {\n /**\n * Constructor\n *\n * Parameters:\n * selector: string\n * options: dictionary\n * Dictionary of keyword arguments.\n * base_url: string\n */\n this.base_url = options.base_url || utils.get_body_data(\"baseUrl\");\n this.element_name = options.element_name || 'running';\n this.selector = selector;\n this.terminals = [];\n if (this.selector !== undefined) {\n this.element = $(selector);\n this.style();\n this.bind_events();\n this.load_terminals();\n }\n };\n\n TerminalList.prototype = Object.create(notebooklist.NotebookList.prototype);\n\n TerminalList.prototype.bind_events = function () {\n var that = this;\n $('#refresh_' + this.element_name + '_list').click(function () {\n that.load_terminals();\n });\n $('#new-terminal').click($.proxy(this.new_terminal, this));\n };\n\n TerminalList.prototype.new_terminal = function (event) {\n if (event) {\n event.preventDefault();\n }\n var w = window.open('#', IPython._target);\n var base_url = this.base_url;\n var settings = {\n type : \"POST\",\n dataType: \"json\",\n success : function (data, status, xhr) {\n var name = data.name;\n w.location = utils.url_path_join(base_url, 'terminals', \n utils.encode_uri_components(name));\n },\n error : function(jqXHR, status, error){\n w.close();\n utils.log_ajax_error(jqXHR, status, error);\n },\n };\n var url = utils.url_path_join(\n this.base_url,\n 'api/terminals'\n );\n utils.ajax(url, settings);\n };\n \n TerminalList.prototype.load_terminals = function() {\n var url = utils.url_path_join(this.base_url, 'api/terminals');\n utils.ajax(url, {\n type: \"GET\",\n cache: false,\n dataType: \"json\",\n success: $.proxy(this.terminals_loaded, this),\n error : utils.log_ajax_error\n });\n };\n\n TerminalList.prototype.terminals_loaded = function (data) {\n this.terminals = data;\n this.clear_list();\n var item, term;\n for (var i=0; i < this.terminals.length; i++) {\n term = this.terminals[i];\n item = this.new_item(-1);\n this.add_link(term.name, item);\n this.add_shutdown_button(term.name, item);\n }\n $('#terminal_list_header').toggle(data.length === 0);\n };\n \n TerminalList.prototype.add_link = function(name, item) {\n item.data('term-name', name);\n item.find(\".item_name\").text(\"terminals/\" + name);\n item.find(\".item_icon\").addClass(\"fa fa-terminal\");\n var link = item.find(\"a.item_link\")\n .attr('href', utils.url_path_join(this.base_url, \"terminals\",\n utils.encode_uri_components(name)));\n link.attr('target', IPython._target||'_blank');\n this.add_shutdown_button(name, item);\n };\n \n TerminalList.prototype.add_shutdown_button = function(name, item) {\n var that = this;\n var shutdown_button = $(\"<button/>\").text(i18n._(\"Shutdown\")).addClass(\"btn btn-xs btn-warning\").\n click(function (e) {\n var settings = {\n processData : false,\n type : \"DELETE\",\n dataType : \"json\",\n success : funct
|
||
|
"// Copyright (c) Jupyter Development Team.\n// Distributed under the terms of the Modified BSD License.\n\ndefine('tree/js/newnotebook',[\n 'jquery',\n 'base/js/namespace',\n 'base/js/utils',\n 'base/js/i18n',\n 'base/js/dialog',\n], function ($, IPython, utils, i18n, dialog) {\n \"use strict\";\n \n var NewNotebookWidget = function (selector, options) {\n this.selector = selector;\n this.base_url = options.base_url;\n this.contents = options.contents;\n this.events = options.events;\n this.default_kernel = null;\n this.kernelspecs = {};\n if (this.selector !== undefined) {\n this.element = $(selector);\n this.request_kernelspecs();\n }\n this.bind_events();\n };\n \n NewNotebookWidget.prototype.bind_events = function () {\n var that = this;\n this.element.find('#new_notebook').click(function () {\n that.new_notebook();\n });\n };\n \n NewNotebookWidget.prototype.request_kernelspecs = function () {\n /** request and then load kernel specs */\n var url = utils.url_path_join(this.base_url, 'api/kernelspecs');\n utils.promising_ajax(url).then($.proxy(this._load_kernelspecs, this));\n };\n \n NewNotebookWidget.prototype._load_kernelspecs = function (data) {\n /** load kernelspec list */\n var that = this;\n this.kernelspecs = data.kernelspecs;\n var menu = this.element.find(\"#notebook-kernels\");\n var keys = Object.keys(data.kernelspecs).sort(function (a, b) {\n var da = data.kernelspecs[a].spec.display_name;\n var db = data.kernelspecs[b].spec.display_name;\n if (da === db) {\n return 0;\n } else if (da > db) {\n return 1;\n } else {\n return -1;\n }\n });\n\n // Create the kernel list in reverse order because\n // the .after insertion causes each item to be added\n // to the top of the list.\n for (var i = keys.length - 1; i >= 0; i--) {\n var ks = this.kernelspecs[keys[i]];\n var li = $(\"<li>\")\n .attr(\"id\", \"kernel-\" +ks.name)\n .data('kernelspec', ks).append(\n $('<a>')\n .attr(\"aria-label\", ks.name)\n .attr(\"role\", \"menuitem\")\n .attr('href', '#')\n .click($.proxy(this.new_notebook, this, ks.name))\n .text(ks.spec.display_name)\n .attr('title', i18n.sprintf(i18n._('Create a new notebook with %s'), ks.spec.display_name))\n );\n menu.after(li);\n }\n this.events.trigger('kernelspecs_loaded.KernelSpec', data.kernelspecs);\n };\n \n NewNotebookWidget.prototype.new_notebook = function (kernel_name, evt) {\n /** create and open a new notebook */\n var that = this;\n kernel_name = kernel_name || this.default_kernel;\n var w = window.open(undefined, IPython._target);\n var dir_path = $('body').attr('data-notebook-path');\n this.contents.new_untitled(dir_path, {type: \"notebook\"}).then(\n function (data) {\n var url = utils.url_path_join(\n that.base_url, 'notebooks',\n utils.encode_uri_components(data.path)\n );\n if (kernel_name) {\n url += \"?kernel_name=\" + kernel_name;\n }\n w.location = url;\n }).catch(function (e) {\n w.close();\n // This statement is used simply so that message extraction\n // will pick up the strings. The actual setting of the text\n // for the button is in dialog.js.\n var button_labels = [ i18n._(\"OK\")];\n dialog.modal({\n title : i18n._('Creating Notebook Failed'),\n body : $(
|
||
|
"// Copyright (c) Jupyter Development Team.\n// Distributed under the terms of the Modified BSD License.\n\ndefine('tree/js/shutdownbutton',[\n 'jquery',\n 'base/js/dialog',\n 'base/js/i18n',\n 'base/js/utils'\n], function(\n $,\n dialog,\n i18n,\n utils\n){\n \"use strict\";\n\n function display_shutdown_dialog() {\n var body = $('<div/>').append(\n $('<p/>').text(i18n.msg._(\"You have shut down Jupyter. You can now close this tab.\"))\n ).append(\n $('<p/>').text(i18n.msg._(\"To use Jupyter again, you will need to relaunch it.\"))\n );\n\n dialog.modal({\n title: i18n.msg._(\"Server stopped\"),\n body: body\n })\n }\n\n function activate() {\n // Add shutdown button\n $(\"button#shutdown\").click(function () {\n utils.ajax(utils.url_path_join(\n utils.get_body_data(\"baseUrl\"),\n \"api\",\n \"shutdown\"\n ), {\n type: \"POST\",\n success: display_shutdown_dialog,\n error: function (error) {\n console.log(error);\n }\n });\n });\n }\n\n return {activate: activate}\n});\n\n",
|
||
|
"// Copyright (c) Jupyter Development Team.\n// Distributed under the terms of the Modified BSD License.\n\ndefine('auth/js/loginwidget',[\n 'jquery',\n 'base/js/utils',\n], function($, utils){\n \"use strict\";\n\n var LoginWidget = function (selector, options) {\n options = options || {};\n this.base_url = options.base_url || utils.get_body_data(\"baseUrl\");\n this.selector = selector;\n if (this.selector !== undefined) {\n this.element = $(selector);\n this.bind_events();\n }\n };\n\n\n LoginWidget.prototype.bind_events = function () {\n var that = this;\n this.element.find(\"button#logout\").click(function () {\n window.location = utils.url_path_join(\n that.base_url,\n \"logout\"\n );\n });\n this.element.find(\"button#login\").click(function () {\n window.location = utils.url_path_join(\n that.base_url,\n \"login\"\n );\n });\n };\n\n return {'LoginWidget': LoginWidget};\n});\n\n",
|
||
|
"// Copyright (c) Jupyter Development Team.\n// Distributed under the terms of the Modified BSD License.\n\n// adapted from Mozilla Developer Network example at\n// https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Function/bind\n// shim `bind` for testing under casper.js\nvar bind = function bind(obj) {\n var slice = [].slice;\n var args = slice.call(arguments, 1),\n self = this,\n nop = function() {\n },\n bound = function() {\n return self.apply(this instanceof nop ? this : (obj || {}), args.concat(slice.call(arguments)));\n };\n nop.prototype = this.prototype || {}; // Firefox cries sometimes if prototype is undefined\n bound.prototype = new nop();\n return bound;\n};\nFunction.prototype.bind = Function.prototype.bind || bind ;\n\n\nrequirejs([\n 'jquery',\n 'contents',\n 'base/js/namespace',\n 'base/js/dialog',\n 'base/js/events',\n 'base/js/promises',\n 'base/js/page',\n 'base/js/utils',\n 'services/config',\n 'tree/js/notebooklist',\n 'tree/js/sessionlist',\n 'tree/js/kernellist',\n 'tree/js/terminallist',\n 'tree/js/newnotebook',\n 'tree/js/shutdownbutton',\n 'auth/js/loginwidget',\n 'bidi/bidi',\n], function(\n $,\n contents_service,\n IPython,\n dialog,\n events,\n promises,\n page,\n utils,\n config,\n notebooklist,\n sesssionlist,\n kernellist,\n terminallist,\n newnotebook,\n shutdownbutton,\n loginwidget,\n bidi){\n \"use strict\";\n \n try{\n requirejs(['custom/custom'], function() {});\n bidi.loadLocale();\n } catch(err) {\n console.log(\"Error loading custom.js from tree service. Continuing and logging\");\n console.warn(err);\n }\n\n console.log('Welcome to Project Jupyter! Explore the various tools available and their corresponding documentation. If you are interested in contributing to the platform, please visit the community resources section at http://jupyter.org/community.html.');\n\n\n // Setup all of the config related things\n\n var common_options = {\n base_url: utils.get_body_data(\"baseUrl\"),\n notebook_path: utils.get_body_data(\"notebookPath\"),\n };\n var cfg = new config.ConfigSection('tree', common_options);\n cfg.load();\n common_options.config = cfg;\n var common_config = new config.ConfigSection('common', common_options);\n common_config.load();\n\n // Instantiate the main objects\n\n page = new page.Page('div#header', 'div#site');\n\n var session_list = new sesssionlist.SesssionList($.extend({\n events: events},\n common_options));\n var contents = new contents_service.Contents({\n base_url: common_options.base_url,\n common_config: common_config\n });\n IPython.NotebookList = notebooklist.NotebookList;\n var notebook_list = new notebooklist.NotebookList('#notebook_list', $.extend({\n contents: contents,\n session_list: session_list},\n common_options));\n var kernel_list = new kernellist.KernelList('#running_list', $.extend({\n session_list: session_list},\n common_options));\n \n var terminal_list;\n if (utils.get_body_data(\"terminalsAvailable\") === \"True\") {\n terminal_list = new terminallist.TerminalList('#terminal_list', common_options);\n }\n\n var login_widget = new loginwidget.LoginWidget('#login_widget', common_options);\n\n var new_buttons = new newnotebook.NewNotebookWidget(\"#new-buttons\",\n $.extend(\n {contents: contents, events: events},\n common_options\n )\n );\n\n var interval_id=0;\n // auto refresh every xx secondes, no need to be fast,\n // update is done most of the time when page get focus\n IPython.tree_time_refresh = 60; // in sec\n\n // limit refresh on focus at 1/10sec, otherwise this\n // can cause too frequent refresh on switching through windows or tabs.\n IPython.min_delta_refresh = 10; // in sec\n\n var _last_refresh = null;\n\n var _ref
|
||
|
]
|
||
|
}
|