UNPKG

@cocalc/static

Version:

CoCalc's static frontend Webpack-based build system and framework

1 lines 22.2 kB
"use strict";(self.webpackChunk_cocalc_static=self.webpackChunk_cocalc_static||[]).push([[5876],{64629:(e,t,n)=>{n.d(t,{C:()=>a});var l=n(48668);function o(e,t,n,l,o,r,c){try{var a=e[r](c),i=a.value}catch(e){return void n(e)}a.done?t(i):Promise.resolve(i).then(l,o)}function r(e){return function(){var t=this,n=arguments;return new Promise((function(l,r){var c=e.apply(t,n);function a(e){o(c,l,r,a,i,"next",e)}function i(e){o(c,l,r,a,i,"throw",e)}a(void 0)}))}}var c=function(e,t){var n,l,o,r,c={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return r={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(r[Symbol.iterator]=function(){return this}),r;function a(r){return function(a){return function(r){if(n)throw new TypeError("Generator is already executing.");for(;c;)try{if(n=1,l&&(o=2&r[0]?l.return:r[0]?l.throw||((o=l.return)&&o.call(l),0):l.next)&&!(o=o.call(l,r[1])).done)return o;switch(l=0,o&&(r=[2&r[0],o.value]),r[0]){case 0:case 1:o=r;break;case 4:return c.label++,{value:r[1],done:!1};case 5:c.label++,l=r[1],r=[0];continue;case 7:r=c.ops.pop(),c.trys.pop();continue;default:if(!((o=(o=c.trys).length>0&&o[o.length-1])||6!==r[0]&&2!==r[0])){c=0;continue}if(3===r[0]&&(!o||r[1]>o[0]&&r[1]<o[3])){c.label=r[1];break}if(6===r[0]&&c.label<o[1]){c.label=o[1],o=r;break}if(o&&c.label<o[2]){c.label=o[2],c.ops.push(r);break}o[2]&&c.ops.pop(),c.trys.pop();continue}r=t.call(e,c)}catch(e){r=[6,e],l=0}finally{n=o=0}if(5&r[0])throw r[1];return{value:r[0]?r[1]:void 0,done:!0}}([r,a])}}};function a(e,t,n){var o=function(){return a.store.get("cur_id")};if(null==e||null==n)throw Error("actions must be defined");if(null==t.current)return{};var a=t.current;return{"cell toolbar none":{m:"No cell toolbar",menu:"None",f:function(){return e.cell_toolbar()}},"cell toolbar attachments":{m:"Attachments toolbar",menu:"Attachments",f:function(){return e.cell_toolbar("attachments")}},"cell toolbar tags":{m:"Edit cell tags toolbar",menu:"Tags",f:function(){return e.cell_toolbar("tags")}},"cell toolbar metadata":{m:"Edit custom metadata toolbar",menu:"Metadata",f:function(){return e.cell_toolbar("metadata")}},"cell toolbar create_assignment":{m:"Create assignment (nbgrader) toolbar",menu:"Create assignment (nbgrader)",f:function(){return e.cell_toolbar("create_assignment")}},"cell toolbar slideshow":{m:"Slideshow toolbar",menu:"Slideshow",f:function(){return e.cell_toolbar("slideshow")}},"change cell to code":{m:"Change to code",k:[{which:89,mode:"escape"}],f:function(){return a.set_selected_cell_type("code")}},"change cell to heading 1":{m:"Heading 1",k:[{which:49,mode:"escape"}],f:function(){return a.change_cell_to_heading(o(),1)}},"change cell to heading 2":{m:"Heading 2",k:[{which:50,mode:"escape"}],f:function(){return a.change_cell_to_heading(o(),2)}},"change cell to heading 3":{m:"Heading 3",k:[{which:51,mode:"escape"}],f:function(){return a.change_cell_to_heading(o(),3)}},"change cell to heading 4":{m:"Heading 4",k:[{which:52,mode:"escape"}],f:function(){return a.change_cell_to_heading(o(),4)}},"change cell to heading 5":{m:"Heading 5",k:[{which:53,mode:"escape"}],f:function(){return a.change_cell_to_heading(o(),5)}},"change cell to heading 6":{m:"Heading 6",k:[{which:54,mode:"escape"}],f:function(){return a.change_cell_to_heading(o(),6)}},"change cell to markdown":{m:"Change to markdown",k:[{which:77,mode:"escape"}],f:function(){return a.set_selected_cell_type("markdown")}},"change cell to raw":{m:"Change to raw",k:[{which:82,mode:"escape"}],f:function(){return a.set_selected_cell_type("raw")}},"clear all cells output":{m:"Clear all output",f:function(){return e.clear_all_outputs()}},"clear cell output":{m:"Clear output",f:function(){return a.clear_selected_outputs()}},"close and halt":{i:"PoweroffOutlined",m:"Close and halt",f:function(){return e.confirm_close_and_halt()}},"close pager":{m:"Close pager",k:[{which:27,mode:"escape"}],f:function(){n.close_introspect()}},"confirm restart kernel":{m:"Restart kernel...",i:"refresh",k:[{mode:"escape",which:48,twice:!0}],f:function(){return e.confirm_restart()}},"confirm halt kernel":{m:"Halt kernel...",i:"stop",f:function(){return e.confirm_halt_kernel()}},"confirm restart kernel and clear output":{m:"Restart and clear output...",menu:"Clear output...",f:function(){return e.restart_clear_all_output()}},"confirm restart kernel and run all cells":{m:"Restart and run all...",menu:"Run all...",i:"forward",f:function(){return e.restart_and_run_all()}},"confirm restart kernel and run all cells without halting on error":{m:"Run all (do not stop on errors)...",menu:"Restart and run all (do not stop on errors)...",i:"run",k:[{which:13,ctrl:!0,shift:!0}],f:function(){return e.restart_and_run_all_no_halt()}},"confirm shutdown kernel":{m:"Shutdown kernel...",f:function(){return r((function(){return c(this,(function(t){switch(t.label){case 0:return[4,e.confirm_dialog({title:"Shutdown kernel?",body:"Do you want to shutdown the current kernel? All variables will be lost.",choices:[{title:"Continue running"},{title:"Shutdown",style:"danger",default:!0}]})];case 1:return"Shutdown"===t.sent()&&e.shutdown(),[2]}}))}))()}},"copy cell":{i:"files",m:"Copy cells",k:[{mode:"escape",which:67}],f:function(){return a.copy_selected_cells()}},"cut cell":{i:"scissors",m:"Cut cells",k:[{mode:"escape",which:88}],f:function(){return a.cut_selected_cells()}},"delete cell":{m:"Delete cells",k:[{mode:"escape",which:68,twice:!0},{mode:"escape",which:8},{mode:"escape",which:46}],f:function(){return a.delete_selected_cells()}},"delete all blank code cells":{m:"Delete all blank code cells",f:function(){return e.delete_all_blank_code_cells()}},"duplicate notebook":{m:"Make a copy...",f:function(){return e.file_action("duplicate")}},"edit keyboard shortcuts":{m:"Keyboard shortcuts and commands...",f:function(){return e.show_keyboard_shortcuts()}},"enter command mode":{k:[{which:27,mode:"edit"},{ctrl:!0,mode:"edit",which:77},{alt:!0,mode:"edit",which:77}],f:function(){"escape"===a.store.get("mode")&&null!=e.store.get("introspect")&&e.clear_introspect(),"vim"===e.store.getIn(["cm_options","options","keyMap"])&&"escape"!==a.store.get("cur_cell_vim_mode","escape")||a.set_mode("escape")}},"enter edit mode":{k:[{which:13,mode:"escape"}],f:function(){a.unhide_current_input(),a.set_mode("edit")}},"extend selection above":{k:[{mode:"escape",shift:!0,which:75},{mode:"escape",shift:!0,which:38}],f:function(){return a.extend_selection(-1)}},"extend selection below":{k:[{mode:"escape",shift:!0,which:74},{mode:"escape",shift:!0,which:40}],f:function(){return a.extend_selection(1)}},"find and replace":{m:"Find and replace",k:[{mode:"escape",which:70},{alt:!0,mode:"escape",which:70}],f:function(){return e.show_find_and_replace()}},"global undo":{m:"Undo",i:"undo",d:"Global user-aware undo. Undo the last change *you* made to the notebook.",k:[{alt:!0,mode:"escape",which:90},{ctrl:!0,mode:"escape",which:90}],f:function(){return e.undo()}},"global redo":{m:"Redo",i:"repeat",d:"Global user-aware redo. Redo the last change *you* made to the notebook.",k:[{alt:!0,mode:"escape",which:90,shift:!0},{ctrl:!0,mode:"escape",which:90,shift:!0},{alt:!0,mode:"escape",which:89},{ctrl:!0,mode:"escape",which:89}],f:function(){return e.redo()}},"hide all line numbers":{m:"Hide all line numbers",f:function(){return e.set_line_numbers(!1)}},"hide header":{m:"Hide header",f:function(){return e.set_header_state(!0)}},"hide toolbar":{m:"Hide toolbar",f:function(){return e.set_toolbar_state(!1)}},"insert cell above":{m:"Insert cell above",k:[{mode:"escape",which:65}],f:function(){a.insert_cell(-1)}},"insert cell below":{i:"plus",m:"Insert cell below",k:[{mode:"escape",which:66}],f:function(){a.insert_cell(1)}},"insert image":{m:"Insert images in selected markdown cell...",f:function(){return a.insert_image()}},"interrupt kernel":{i:"stop",m:"Interrupt kernel",k:[{mode:"escape",which:73,twice:!0}],f:function(){return e.signal("SIGINT")}},"merge cell with next cell":{m:"Merge cell below",f:function(){return a.merge_cell_below()}},"merge cell with previous cell":{m:"Merge cell above",f:function(){return a.merge_cell_above()}},"merge cells":{m:"Merge selected cells",k:[{mode:"escape",shift:!0,which:77}],f:function(){return a.merge_selected_cells()}},"merge selected cells":{m:"Merge selected cells",f:function(){return a.merge_selected_cells()}},"move cell down":{i:"arrow-down",m:"Move cells down",k:[{alt:!0,mode:"escape",which:40}],f:function(){return a.move_selected_cells(1)}},"move cell up":{i:"arrow-up",m:"Move cells up",k:[{alt:!0,mode:"escape",which:38}],f:function(){return a.move_selected_cells(-1)}},"move cursor down":{m:"Move cursor down",f:function(){return a.move_edit_cursor(1)}},"move cursor up":{m:"Move cursor up",f:function(){return a.move_edit_cursor(-1)}},"new notebook":{m:"New...",f:function(){return e.file_new()}},"nbconvert ipynb":{m:"Notebook (.ipynb)...",f:function(){e.save(),e.file_action("download")}},"nbconvert asciidoc":{m:"AsciiDoc (.asciidoc)...",f:function(){return e.show_nbconvert_dialog("asciidoc")}},"nbconvert python":{m:"Python (.py)...",f:function(){return e.show_nbconvert_dialog("python")}},"nbconvert classic html":{m:"HTML via Classic nbconvert (.html)...",f:function(){return e.show_nbconvert_dialog("classic-html")}},"nbconvert classic pdf":{m:"PDF via Classic nbconvert and Chrome (.pdf)...",f:function(){return e.show_nbconvert_dialog("classic-pdf")}},"nbconvert lab html":{m:"HTML via JupyterLab nbconvert (.html)...",f:function(){return e.show_nbconvert_dialog("lab-html")}},"nbconvert lab pdf":{m:"PDF via JupyterLab nbconvert and Chrome (.pdf)...",f:function(){return e.show_nbconvert_dialog("lab-pdf")}},"nbconvert cocalc html":{m:"HTML (.html)...",f:function(){return e.show_nbconvert_dialog("cocalc-html")}},"nbconvert markdown":{m:"Markdown (.md)...",f:function(){return e.show_nbconvert_dialog("markdown")}},"nbconvert rst":{m:"reST (.rst)...",f:function(){return e.show_nbconvert_dialog("rst")}},"nbconvert slides":{m:"Slideshow server via nbconvert...",f:function(){return e.show_nbconvert_dialog("slides")}},slideshow:{m:"Slideshow",f:function(){return n.show_revealjs_slideshow()}},"table of contents":{m:"Table of Contents",f:function(){return n.show_table_of_contents()}},"nbconvert tex":{m:"LaTeX (.tex)...",f:function(){return e.show_nbconvert_dialog("latex")}},"nbconvert cocalc pdf":{m:"PDF (.pdf)...",f:function(){return e.show_nbconvert_dialog("cocalc-pdf")}},"nbconvert latex pdf":{m:"PDF via LaTeX (.pdf)...",f:function(){return e.show_nbconvert_dialog("pdf")}},"nbconvert script":{m:"Executable script...",f:function(){return e.show_nbconvert_dialog("script")}},"nbconvert sagews":{m:"Sage worksheet (.sagews)...",f:function(){return e.show_nbconvert_dialog("sagews")}},"nbgrader validate":{m:"Restart and validate...",menu:"Validate...",f:function(){return e.nbgrader_actions.confirm_validate()}},"nbgrader assign":{m:"Create student version...",menu:"Generate student version...",f:function(){return e.nbgrader_actions.confirm_assign()}},"open file":{m:"Open...",f:function(){return e.file_open()}},"paste cell above":{m:"Paste cells above",k:[{mode:"escape",shift:!0,which:86},{mode:"escape",shift:!0,ctrl:!0,which:86},{mode:"escape",shift:!0,alt:!0,which:86}],f:function(){return a.paste_cells(-1)}},"paste cell below":{m:"Paste cells below",f:function(){return a.paste_cells(1)}},"paste cell and replace":{i:"clipboard",m:"Paste cells & replace",k:[{mode:"escape",alt:!0,which:86},{mode:"escape",which:86},{mode:"escape",ctrl:!0,which:86}],f:function(){a.store.get("sel_ids",{size:0}).size>0?a.paste_cells(0):a.paste_cells(1)}},"print preview":{m:"Print preview...",f:function(){return e.show_nbconvert_dialog("html")}},"refresh kernels":{m:"Refresh kernel list",f:function(){return e.fetch_jupyter_kernels()}},"custom kernel":{m:"How to create a custom kernel...",f:function(){return e.custom_jupyter_kernel_docs()}},"rename notebook":{m:"Rename...",f:function(){return e.file_action("rename")}},"restart kernel":{m:"Restart kernel",f:function(){return e.restart()}},"restart kernel and clear output":{m:"Restart kernel and clear output",f:function(){e.restart(),e.clear_all_outputs()}},"restart kernel and run all cells":{m:"Restart and run all",f:function(){return r((function(){return c(this,(function(t){switch(t.label){case 0:return[4,e.restart()];case 1:return t.sent(),e.run_all_cells(),[2]}}))}))()}},"run all cells":{m:"Run all",f:function(){return e.run_all_cells()}},"run all cells above":{m:"Run all above",f:function(){return a.run_all_above()}},"run all cells below":{m:"Run all below",f:function(){return a.run_all_below()}},"run cell":{m:"Run selected cells",k:[{which:13,ctrl:!0}],f:function(){a.run_selected_cells(),a.set_mode("escape"),a.scroll("cell visible")}},"run cell and insert below":{m:"Run selected cells and insert cell below",k:[{which:13,alt:!0}],f:function(){return a.run_selected_cells_and_insert_new_cell_below()}},"run cell and select next":{i:"step-forward",m:"Run selected cells and select below",k:[{which:13,shift:!0}],f:function(){a.shift_enter_run_selected_cells(),a.scroll("cell visible")}},"save notebook":{m:"Save",k:[{which:83,alt:!0},{which:83,ctrl:!0}],f:function(){return e.save()}},"scroll cell visible":{f:function(){return a.scroll("cell visible")}},"scroll notebook down":{k:[{mode:"escape",which:32}],f:function(){return a.scroll("list down")}},"scroll notebook up":{k:[{mode:"escape",shift:!0,which:32}],f:function(){return a.scroll("list up")}},"select all cells":{m:"Select all cells",k:[{alt:!0,mode:"escape",which:65},{ctrl:!0,mode:"escape",which:65}],f:function(){return a.select_all_cells()}},"select next cell":{k:[{which:40,mode:"escape"},{which:74,mode:"escape"}],f:function(){a.move_cursor(1),a.unselect_all_cells(),a.scroll("cell visible")}},"select previous cell":{k:[{which:38,mode:"escape"},{which:75,mode:"escape"}],f:function(){a.move_cursor(-1),a.unselect_all_cells(),a.scroll("cell visible")}},"show all line numbers":{m:"Show all line numbers",f:function(){return e.set_line_numbers(!0)}},"show command palette":{m:"Show command palette...",k:[{alt:!0,shift:!0,which:80},{ctrl:!0,shift:!0,which:80}],f:function(){return e.show_keyboard_shortcuts()}},"show header":{m:"Show header",f:function(){return e.set_header_state(!1)}},"show keyboard shortcuts":{i:"keyboard",m:"Show keyboard shortcuts...",k:[{mode:"escape",which:72}],f:function(){return e.show_keyboard_shortcuts()}},"show toolbar":{m:"Show toolbar",f:function(){return e.set_toolbar_state(!0)}},"shutdown kernel":{m:"Shutdown kernel",f:function(){return e.shutdown()}},"split cell at cursor":{m:"Split cell",k:[{ctrl:!0,shift:!0,which:189},{ctrl:!0,key:";",which:186}],f:function(){a.set_mode("escape"),a.split_current_cell()}},"switch to classical notebook":{m:"Switch to classical notebook...",f:function(){return e.switch_to_classical_notebook()}},"tab key":{k:[{mode:"escape",which:9}],m:"Tab key (completion)",i:"tab",f:function(){return a.tab_key()}},"shift+tab key":{k:[{mode:"escape",shift:!0,which:9}],m:"Shift+Tab introspection (show function docstring)",f:function(){return a.shift_tab_key()}},"time travel":{m:"TimeTravel",f:function(){return e.show_history_viewer()}},"toggle all cells output collapsed":{m:"Toggle all collapsed",f:function(){return e.toggle_all_outputs("collapsed")}},"toggle all cells output scrolled":{m:"Toggle all scrolled",f:function(){return e.toggle_all_outputs("scrolled")}},"toggle all line numbers":{m:"Toggle all line numbers",k:[{mode:"escape",shift:!0,which:76}],f:function(){return e.toggle_line_numbers()}},"toggle cell line numbers":{m:"Toggle cell line numbers",k:[{mode:"escape",which:76}],f:function(){return e.toggle_cell_line_numbers(o())}},"toggle cell output collapsed":{m:"Toggle collapsed",k:[{mode:"escape",which:79}],f:function(){return a.toggle_selected_outputs("collapsed")}},"toggle cell output scrolled":{m:"Toggle scrolled",k:[{mode:"escape",which:79,shift:!0}],f:function(){return a.toggle_selected_outputs("scrolled")}},"toggle header":{m:"Toggle header",f:function(){return e.toggle_header()}},"toggle toolbar":{m:"Toggle toolbar",f:function(){return e.toggle_toolbar()}},"trust notebook":{m:"Trust notebook",f:function(){return e.trust_notebook()}},"undo cell deletion":{m:"Undo cell deletion",k:[{mode:"escape",which:90}],f:function(){return e.undo()}},"zoom in":{m:"Zoom in",k:[{ctrl:!0,shift:!0,which:190}],f:function(){return a.zoom(1)}},"zoom out":{m:"Zoom out",k:[{ctrl:!0,shift:!0,which:188}],f:function(){return a.zoom(-1)}},"write protect":{m:"Edit protect -- toggle whether cells are editable",f:function(){return a.toggle_write_protection_on_selected_cells()}},"delete protect":{m:"Delete protection -- toggle whether cells are deletable",f:function(){return a.toggle_delete_protection_on_selected_cells()}},protect:{m:"Protection -- toggle whether cells are editable and deletable",k:[{alt:!0,which:80},{meta:!0,which:80}],f:function(){a.toggle_write_protection_on_selected_cells(),a.toggle_delete_protection_on_selected_cells()}},"toggle hide input":{m:"Toggle hide input of cells",f:function(){return a.toggle_source_hidden()},k:[{alt:!0,which:72},{meta:!0,which:72}]},"toggle hide output":{m:"Toggle hide output of cells",f:function(){return a.toggle_outputs_hidden()},k:[{alt:!0,shift:!0,which:72},{meta:!0,shift:!0,which:72}]},"format cells":{i:l.U,m:"Format selected cells",f:function(){return a.format_selected_cells()}},"format all cells":{i:l.U,m:"Format all cells",f:function(){return a.format_all_cells()}}}}},92990:(e,t,n)=>{n.d(t,{m:()=>r});var l=n(85460),o=n(24620);function r(e){var t={cells:(e=o.defaults(e,{cell_list:o.required,cells:o.required,metadata:void 0,kernelspec:{},language_info:void 0,blob_store:void 0,more_output:void 0})).cell_list.toJS().map((function(t){return function(e,t){var n,r,i,u=t.cells.get(e),s={},f={cell_type:null!=(n=u.get("cell_type"))?n:"code",source:a(null!=(r=u.get("input"))?r:""),metadata:s},d=u.get("metadata");null!=d&&function(e,t){null!=t&&Object.assign(e.metadata,t)}(f,d.toJS()),s.collapsed=!!u.get("collapsed"),u.get("scrolled")&&(s.scrolled=!0);var h=null!=(i=u.get("exec_count"))?i:0;if("code"===f.cell_type&&(f.execution_count=h),function(e,t){null!=t&&(e.metadata.slideshow={slide_type:t})}(f,u.get("slide")),function(e,t,n){null!=t&&null!=n&&(e.attachments={},t.forEach((function(t,l){if("sha1"===t.get("type")){var r=t.get("value"),c=n.get_ipynb(r),a=o.filename_extension(l);"jpg"===a&&(a="jpeg"),e.attachments[l]=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}({},"image/".concat(a),c)}})))}(f,u.get("attachments"),t.blob_store),function(e,t){null!=t&&(e.metadata.tags=o.keys(t.toJS()).sort())}(f,u.get("tags")),"code"!==f.cell_type)return f;var m=u.get("output");for(var _ in(null!=m?m.size:void 0)>0?f.outputs=function(e,t,n,o){if(e&&null!=e.getIn(["".concat(e.size-1),"more_output"])){var r=e.size-1;if(0===(n&&(n.length||0)||0))e=e.set("".concat(r),l.fromJS({text:"WARNING: Some output was deleted.\n",name:"stderr"}));else{e=e.delete("".concat(r));var a=!0,i=!1,u=void 0;try{for(var s,f=n[Symbol.iterator]();!(a=(s=f.next()).done);a=!0){var d=s.value;e=e.set("".concat(r),l.fromJS(d)),r+=1}}catch(e){i=!0,u=e}finally{try{a||null==f.return||f.return()}finally{if(i)throw u}}}}var h=[];if(e&&e.size>0)for(var m=0;m<e.size+1;m++){var _=null!=e.get("".concat(m))?e.get("".concat(m)).toJS():void 0;null!=_&&(c(_,t,o),h.push(_))}return h}(m,h,null!=t.more_output?t.more_output[e]:void 0,t.blob_store):null==f.outputs&&"code"===f.cell_type&&(f.outputs=[]),f.outputs){var p=f.outputs[_];null!=p.cocalc&&(null==s.cocalc&&(s.cocalc={outputs:{}}),s.cocalc.outputs[_]=p.cocalc,delete p.cocalc)}return f}(t,e)})),metadata:e.metadata&&e.metadata.toJS()||{},nbformat:4,nbformat_minor:4};return t.metadata.kernelspec=e.kernelspec,null!=e.language_info&&(t.metadata.language_info=e.language_info.toJS()||{}),t}function c(e,t,n){var l;if(null!=e)if(null!=e.exec_count&&delete e.exec_count,null!=e.text&&(e.text=a(e.text)),null!=e.data){for(var r in e.data){var c=e.data[r];if("text/"===r.slice(0,5)&&(e.data[r]=a(e.data[r])),o.startswith(r,"image/")||"application/pdf"===r||"iframe"===r){if(null==n)return;var i=n.get_ipynb(c);if(null==i)return;"iframe"===r&&(delete e.data[r],r="text/html"),e.data[r]=i}}e.output_type="execute_result",null==e.metadata&&(e.metadata={}),e.execution_count=t}else null!=e.name?(e.output_type="stream","input"===e.name&&((l=e).cocalc=o.deep_copy(l),l.name="stdout",l.text=l.opts.prompt+" "+(null!=l.value?l.value:""),delete l.opts,delete l.value)):null!=e.ename&&(e.output_type="error")}function a(e){if("string"!=typeof e)return e;for(var t=e.split("\n"),n=0;n<t.length-1;n++)t[n]+="\n";return""===t[t.length-1]&&t.pop(),t}},39268:(e,t,n)=>{n.d(t,{Cs:()=>a,UO:()=>u,e_:()=>s});var l=n(63510),o=n.n(l),r=n(24620),c=n(64629);function a(e){var t=e-48*Math.floor(e/48);return String.fromCharCode(96<=e?t:e)}var i=void 0;function u(e,t){var n={which:e.which};null!=i&&function(e,t){for(var n=0,l=["which","ctrl","shift","alt","meta"];n<l.length;n++){var o=l[n];if(e[o]!==t[o])return!1}return!0}(i,e)?(n.twice=!0,i=void 0):i=e;for(var l=0,o=["ctrl","shift","alt","meta"];l<o.length;l++){var r=o[l];e[r+"Key"]&&(n[r]=!0)}return null!=t&&(n.mode=t),n}function s(e,t,n){if(null==e||null==t||null==n)throw Error("bug in create_key_handler");var l,a={};function s(e,t,n){if(null!=e.mode){if(null!=e.key&&(e=(0,r.copy_without)(e,["key"])),a[o()(e)]={name:t,val:n},e.alt)return(e=(0,r.copy_without)(e,"alt")).meta=!0,s(e,t,n)}else for(var l=0,c=["escape","edit"];l<c.length;l++){var i=c[l];s((0,r.merge)(e,{mode:i}),t,n)}}var f=(0,c.C)(e,{current:t},n);for(var d in f)if(null!=(null!=(l=f[d])?l.k:void 0)){var h=!0,m=!1,_=void 0;try{for(var p,g=l.k[Symbol.iterator]();!(h=(p=g.next()).done);h=!0)s(p.value,d,l)}catch(e){m=!0,_=e}finally{try{h||null==g.return||g.return()}finally{if(m)throw _}}}return function(n){if(null!=e.store&&null!=t.store&&null==e.store.get("complete")){var l=t.store.get("mode");if("escape"===l){var r=$(":focus");if(r.length>0&&"DIV"!=r[0].tagName)return}var c=function(e,t){return o()(u(e,t))}(n,l),s=a[c];return null!=s?(i=void 0,s.val.f(),!1):void 0}}}}}]);