notebooklist.js
494 lines
| 17.2 KiB
| application/javascript
|
JavascriptLexer
Jonathan Frederic
|
r17189 | // Copyright (c) IPython Development Team. | ||
// Distributed under the terms of the Modified BSD License. | ||||
define([ | ||||
'base/js/namespace', | ||||
Jonathan Frederic
|
r17200 | 'jquery', | ||
Jonathan Frederic
|
r17189 | 'base/js/utils', | ||
'base/js/dialog', | ||||
Jonathan Frederic
|
r17202 | ], function(IPython, $, utils, dialog) { | ||
MinRK
|
r13063 | "use strict"; | ||
jon
|
r17210 | var NotebookList = function (selector, options) { | ||
jon
|
r17211 | // Constructor | ||
// | ||||
// Parameters: | ||||
// selector: string | ||||
// options: dictionary | ||||
// Dictionary of keyword arguments. | ||||
// session_list: SessionList instance | ||||
// element_name: string | ||||
// base_url: string | ||||
// notebook_path: string | ||||
Jonathan Frederic
|
r17189 | var that = this; | ||
jon
|
r17210 | this.session_list = options.session_list; | ||
Paul Ivanov
|
r15454 | // allow code re-use by just changing element_name in kernellist.js | ||
jon
|
r17210 | this.element_name = options.element_name || 'notebook'; | ||
Brian E. Granger
|
r4488 | this.selector = selector; | ||
if (this.selector !== undefined) { | ||||
this.element = $(selector); | ||||
this.style(); | ||||
this.bind_events(); | ||||
} | ||||
MinRK
|
r13063 | this.notebooks_list = []; | ||
this.sessions = {}; | ||||
Jonathan Frederic
|
r17198 | this.base_url = options.base_url || utils.get_body_data("baseUrl"); | ||
this.notebook_path = options.notebook_path || utils.get_body_data("notebookPath"); | ||||
Jonathan Frederic
|
r17195 | if (this.session_list && this.session_list.events) { | ||
this.session_list.events.on('sessions_loaded.Dashboard', | ||||
function(e, d) { that.sessions_loaded(d); }); | ||||
} | ||||
Brian E. Granger
|
r4488 | }; | ||
NotebookList.prototype.style = function () { | ||||
Jonathan Frederic
|
r17189 | var prefix = '#' + this.element_name; | ||
Paul Ivanov
|
r15518 | $(prefix + '_toolbar').addClass('list_toolbar'); | ||
$(prefix + '_list_info').addClass('toolbar_info'); | ||||
$(prefix + '_buttons').addClass('toolbar_buttons'); | ||||
$(prefix + '_list_header').addClass('list_header'); | ||||
MinRK
|
r10920 | this.element.addClass("list_container"); | ||
Brian E. Granger
|
r4488 | }; | ||
NotebookList.prototype.bind_events = function () { | ||||
Brian E. Granger
|
r4491 | var that = this; | ||
Paul Ivanov
|
r15456 | $('#refresh_' + this.element_name + '_list').click(function () { | ||
that.load_sessions(); | ||||
Brian Granger
|
r6195 | }); | ||
Brian E. Granger
|
r4491 | this.element.bind('dragover', function () { | ||
return false; | ||||
}); | ||||
Matthias BUSSONNIER
|
r6838 | this.element.bind('drop', function(event){ | ||
Paul Ivanov
|
r15455 | that.handleFilesUpload(event,'drop'); | ||
Brian E. Granger
|
r4491 | return false; | ||
}); | ||||
Brian E. Granger
|
r4488 | }; | ||
Paul Ivanov
|
r15455 | NotebookList.prototype.handleFilesUpload = function(event, dropOrForm) { | ||
Matthias BUSSONNIER
|
r6838 | var that = this; | ||
var files; | ||||
if(dropOrForm =='drop'){ | ||||
files = event.originalEvent.dataTransfer.files; | ||||
} else | ||||
{ | ||||
MinRK
|
r13063 | files = event.originalEvent.target.files; | ||
Matthias BUSSONNIER
|
r6838 | } | ||
MinRK
|
r13063 | for (var i = 0; i < files.length; i++) { | ||
var f = files[i]; | ||||
Jonathan Frederic
|
r17198 | var name_and_ext = utils.splitext(f.name); | ||
Matthias BUSSONNIER
|
r13322 | var file_ext = name_and_ext[1]; | ||
MinRK
|
r17536 | |||
var reader = new FileReader(); | ||||
MinRK
|
r13121 | if (file_ext === '.ipynb') { | ||
MinRK
|
r17536 | reader.readAsText(f); | ||
Brian E. Granger
|
r13115 | } else { | ||
MinRK
|
r17536 | // read non-notebook files as binary | ||
reader.readAsArrayBuffer(f); | ||||
MinRK
|
r13063 | } | ||
MinRK
|
r17536 | var item = that.new_item(0); | ||
item.addClass('new-file'); | ||||
that.add_name_input(f.name, item); | ||||
// Store the list item in the reader so we can use it later | ||||
// to know which item it belongs to. | ||||
$(reader).data('item', item); | ||||
reader.onload = function (event) { | ||||
var item = $(event.target).data('item'); | ||||
that.add_file_data(event.target.result, item); | ||||
that.add_upload_button(item); | ||||
}; | ||||
Matthias BUSSONNIER
|
r6838 | } | ||
Brian E. Granger
|
r14926 | // Replace the file input form wth a clone of itself. This is required to | ||
// reset the form. Otherwise, if you upload a file, delete it and try to | ||||
// upload it again, the changed event won't fire. | ||||
var form = $('input.fileinput'); | ||||
form.replaceWith(form.clone(true)); | ||||
Matthias BUSSONNIER
|
r6838 | return false; | ||
MinRK
|
r13063 | }; | ||
Brian E. Granger
|
r4488 | |||
Jonathan Frederic
|
r16213 | NotebookList.prototype.clear_list = function (remove_uploads) { | ||
// Clears the navigation tree. | ||||
// | ||||
// Parameters | ||||
// remove_uploads: bool=False | ||||
// Should upload prompts also be removed from the tree. | ||||
if (remove_uploads) { | ||||
this.element.children('.list_item').remove(); | ||||
} else { | ||||
this.element.children('.list_item:not(.new-file)').remove(); | ||||
} | ||||
Matthias BUSSONNIER
|
r7941 | }; | ||
Brian Granger
|
r6195 | |||
Zachary Sailer
|
r12988 | NotebookList.prototype.load_sessions = function(){ | ||
Jonathan Frederic
|
r17189 | this.session_list.load_sessions(); | ||
Zachary Sailer
|
r12988 | }; | ||
NotebookList.prototype.sessions_loaded = function(data){ | ||||
Paul Ivanov
|
r15479 | this.sessions = data; | ||
Zachary Sailer
|
r12988 | this.load_list(); | ||
}; | ||||
Brian Granger
|
r6195 | |||
Brian E. Granger
|
r4488 | NotebookList.prototype.load_list = function () { | ||
Matthias BUSSONNIER
|
r7881 | var that = this; | ||
Brian E. Granger
|
r4488 | var settings = { | ||
processData : false, | ||||
cache : false, | ||||
type : "GET", | ||||
dataType : "json", | ||||
Matthias BUSSONNIER
|
r7881 | success : $.proxy(this.list_loaded, this), | ||
MinRK
|
r16445 | error : $.proxy( function(xhr, status, error){ | ||
Jonathan Frederic
|
r17198 | utils.log_ajax_error(xhr, status, error); | ||
Matthias BUSSONNIER
|
r7941 | that.list_loaded([], null, null, {msg:"Error connecting to server."}); | ||
},this) | ||||
Brian E. Granger
|
r4488 | }; | ||
Matthias BUSSONNIER
|
r7881 | |||
Jonathan Frederic
|
r17198 | var url = utils.url_join_encode( | ||
MinRK
|
r15238 | this.base_url, | ||
MinRK
|
r13063 | 'api', | ||
MinRK
|
r17524 | 'contents', | ||
MinRK
|
r15234 | this.notebook_path | ||
MinRK
|
r13063 | ); | ||
Brian E. Granger
|
r5106 | $.ajax(url, settings); | ||
Brian E. Granger
|
r4488 | }; | ||
Matthias BUSSONNIER
|
r7881 | NotebookList.prototype.list_loaded = function (data, status, xhr, param) { | ||
MinRK
|
r7976 | var message = 'Notebook list empty.'; | ||
if (param !== undefined && param.msg) { | ||||
MinRK
|
r13063 | message = param.msg; | ||
MinRK
|
r7976 | } | ||
Brian E. Granger
|
r15078 | var item = null; | ||
MinRK
|
r17526 | var model = null; | ||
var list = data.content; | ||||
var len = list.length; | ||||
Matthias BUSSONNIER
|
r6842 | this.clear_list(); | ||
MinRK
|
r13063 | if (len === 0) { | ||
MinRK
|
r17526 | item = this.new_item(0); | ||
Brian E. Granger
|
r15078 | var span12 = item.children().first(); | ||
span12.empty(); | ||||
MinRK
|
r15094 | span12.append($('<div style="margin:auto;text-align:center;color:grey"/>').text(message)); | ||
Matthias BUSSONNIER
|
r6857 | } | ||
MinRK
|
r15234 | var path = this.notebook_path; | ||
Brian E. Granger
|
r15071 | var offset = 0; | ||
if (path !== '') { | ||||
MinRK
|
r17526 | item = this.new_item(0); | ||
model = { | ||||
type: 'directory', | ||||
name: '..', | ||||
path: path, | ||||
}; | ||||
this.add_link(model, item); | ||||
Brian E. Granger
|
r15071 | offset = 1; | ||
} | ||||
Brian E. Granger
|
r4488 | for (var i=0; i<len; i++) { | ||
MinRK
|
r17526 | model = list[i]; | ||
item = this.new_item(i+offset); | ||||
this.add_link(model, item); | ||||
MinRK
|
r13063 | } | ||
Brian E. Granger
|
r4491 | }; | ||
Brian E. Granger
|
r4490 | |||
Brian E. Granger
|
r4491 | |||
MinRK
|
r17526 | NotebookList.prototype.new_item = function (index) { | ||
Jonathan Frederic
|
r16913 | var item = $('<div/>').addClass("list_item").addClass("row"); | ||
MinRK
|
r10891 | // item.addClass('list_item ui-widget ui-widget-content ui-helper-clearfix'); | ||
// item.css('border-top-style','none'); | ||||
Jonathan Frederic
|
r16923 | item.append($("<div/>").addClass("col-md-12").append( | ||
Brian E. Granger
|
r15071 | $('<i/>').addClass('item_icon') | ||
).append( | ||||
MinRK
|
r10919 | $("<a/>").addClass("item_link").append( | ||
MinRK
|
r10891 | $("<span/>").addClass("item_name") | ||
) | ||||
MinRK
|
r10919 | ).append( | ||
$('<div/>').addClass("item_buttons btn-group pull-right") | ||||
)); | ||||
MinRK
|
r10891 | |||
Brian E. Granger
|
r4491 | if (index === -1) { | ||
Brian E. Granger
|
r4490 | this.element.append(item); | ||
Brian E. Granger
|
r4491 | } else { | ||
this.element.children().eq(index).after(item); | ||||
Brian E. Granger
|
r4488 | } | ||
Brian E. Granger
|
r4491 | return item; | ||
}; | ||||
MinRK
|
r17526 | NotebookList.icons = { | ||
directory: 'folder_icon', | ||||
notebook: 'notebook_icon', | ||||
file: 'file_icon', | ||||
}; | ||||
NotebookList.uri_prefixes = { | ||||
directory: 'tree', | ||||
notebook: 'notebooks', | ||||
file: 'files', | ||||
}; | ||||
NotebookList.prototype.add_link = function (model, item) { | ||||
var path = model.path, | ||||
name = model.name; | ||||
Brian E. Granger
|
r15071 | item.data('name', name); | ||
item.data('path', path); | ||||
item.find(".item_name").text(name); | ||||
MinRK
|
r17526 | var icon = NotebookList.icons[model.type]; | ||
var uri_prefix = NotebookList.uri_prefixes[model.type]; | ||||
item.find(".item_icon").addClass(icon).addClass('icon-fixed-width'); | ||||
MinRK
|
r17535 | var link = item.find("a.item_link") | ||
Brian E. Granger
|
r15071 | .attr('href', | ||
Jonathan Frederic
|
r17198 | utils.url_join_encode( | ||
MinRK
|
r15238 | this.base_url, | ||
MinRK
|
r17526 | uri_prefix, | ||
Brian E. Granger
|
r15071 | path, | ||
name | ||||
) | ||||
); | ||||
MinRK
|
r17535 | // directory nav doesn't open new tabs | ||
// files, notebooks do | ||||
if (model.type !== "directory") { | ||||
link.attr('target','_blank'); | ||||
} | ||||
MinRK
|
r17526 | var path_name = utils.url_path_join(path, name); | ||
if (model.type == 'file') { | ||||
this.add_delete_button(item); | ||||
} else if (model.type == 'notebook') { | ||||
if(this.sessions[path_name] === undefined){ | ||||
this.add_delete_button(item); | ||||
} else { | ||||
this.add_shutdown_button(item, this.sessions[path_name]); | ||||
} | ||||
} | ||||
Brian E. Granger
|
r15071 | }; | ||
MinRK
|
r17526 | NotebookList.prototype.add_name_input = function (name, item) { | ||
item.data('name', name); | ||||
Paul Ivanov
|
r16258 | item.find(".item_icon").addClass('notebook_icon').addClass('icon-fixed-width'); | ||
MinRK
|
r10919 | item.find(".item_name").empty().append( | ||
MinRK
|
r10896 | $('<input/>') | ||
MinRK
|
r17536 | .addClass("filename_input") | ||
.attr('value', name) | ||||
MinRK
|
r10896 | .attr('size', '30') | ||
.attr('type', 'text') | ||||
Brian E. Granger
|
r4491 | ); | ||
}; | ||||
MinRK
|
r17536 | NotebookList.prototype.add_file_data = function (data, item) { | ||
item.data('filedata', data); | ||||
Brian E. Granger
|
r4491 | }; | ||
Zachary Sailer
|
r12988 | NotebookList.prototype.add_shutdown_button = function (item, session) { | ||
Matthias BUSSONNIER
|
r6842 | var that = this; | ||
Jonathan Frederic
|
r16914 | var shutdown_button = $("<button/>").text("Shutdown").addClass("btn btn-xs btn-danger"). | ||
Matthias BUSSONNIER
|
r6842 | click(function (e) { | ||
var settings = { | ||||
processData : false, | ||||
cache : false, | ||||
type : "DELETE", | ||||
dataType : "json", | ||||
Zachary Sailer
|
r12996 | success : function () { | ||
Zachary Sailer
|
r12988 | that.load_sessions(); | ||
MinRK
|
r16445 | }, | ||
Jonathan Frederic
|
r17198 | error : utils.log_ajax_error, | ||
Matthias BUSSONNIER
|
r6842 | }; | ||
Jonathan Frederic
|
r17198 | var url = utils.url_join_encode( | ||
MinRK
|
r15238 | that.base_url, | ||
MinRK
|
r13063 | 'api/sessions', | ||
session | ||||
); | ||||
Matthias BUSSONNIER
|
r6842 | $.ajax(url, settings); | ||
MinRK
|
r10891 | return false; | ||
Matthias BUSSONNIER
|
r6842 | }); | ||
MinRK
|
r10891 | // var new_buttons = item.find('a'); // shutdown_button; | ||
Matthias BUSSONNIER
|
r14634 | item.find(".item_buttons").text("").append(shutdown_button); | ||
Matthias BUSSONNIER
|
r6842 | }; | ||
Brian E. Granger
|
r4491 | NotebookList.prototype.add_delete_button = function (item) { | ||
MinRK
|
r10891 | var new_buttons = $('<span/>').addClass("btn-group pull-right"); | ||
Matthias BUSSONNIER
|
r9787 | var notebooklist = this; | ||
Jonathan Frederic
|
r16913 | var delete_button = $("<button/>").text("Delete").addClass("btn btn-default btn-xs"). | ||
Brian E. Granger
|
r4491 | click(function (e) { | ||
// $(this) is the button that was clicked. | ||||
var that = $(this); | ||||
MinRK
|
r17536 | // We use the filename from the parent list_item element's | ||
// data because the outer scope's values change as we iterate through the loop. | ||||
Brian Granger
|
r6195 | var parent_item = that.parents('div.list_item'); | ||
MinRK
|
r17526 | var name = parent_item.data('name'); | ||
var message = 'Are you sure you want to permanently delete the file: ' + name + '?'; | ||||
Jonathan Frederic
|
r17202 | dialog.modal({ | ||
MinRK
|
r17526 | title : "Delete file", | ||
MinRK
|
r10921 | body : message, | ||
Brian E. Granger
|
r4491 | buttons : { | ||
MinRK
|
r10921 | Delete : { | ||
class: "btn-danger", | ||||
click: function() { | ||||
var settings = { | ||||
processData : false, | ||||
cache : false, | ||||
type : "DELETE", | ||||
dataType : "json", | ||||
success : function (data, status, xhr) { | ||||
parent_item.remove(); | ||||
MinRK
|
r16445 | }, | ||
Jonathan Frederic
|
r17198 | error : utils.log_ajax_error, | ||
MinRK
|
r10921 | }; | ||
Jonathan Frederic
|
r17198 | var url = utils.url_join_encode( | ||
MinRK
|
r15238 | notebooklist.base_url, | ||
MinRK
|
r17524 | 'api/contents', | ||
MinRK
|
r15234 | notebooklist.notebook_path, | ||
MinRK
|
r17526 | name | ||
MinRK
|
r13063 | ); | ||
MinRK
|
r10921 | $.ajax(url, settings); | ||
} | ||||
Brian E. Granger
|
r4491 | }, | ||
MinRK
|
r10921 | Cancel : {} | ||
Brian E. Granger
|
r4491 | } | ||
}); | ||||
MinRK
|
r10891 | return false; | ||
Brian E. Granger
|
r4491 | }); | ||
Matthias BUSSONNIER
|
r14634 | item.find(".item_buttons").text("").append(delete_button); | ||
Brian E. Granger
|
r4491 | }; | ||
MinRK
|
r17536 | NotebookList.prototype.add_upload_button = function (item, type) { | ||
Brian E. Granger
|
r4491 | var that = this; | ||
MinRK
|
r10896 | var upload_button = $('<button/>').text("Upload") | ||
Jonathan Frederic
|
r16914 | .addClass('btn btn-primary btn-xs upload_button') | ||
MinRK
|
r10896 | .click(function (e) { | ||
MinRK
|
r15234 | var path = that.notebook_path; | ||
MinRK
|
r17536 | var filename = item.find('.item_name > input').val(); | ||
var filedata = item.data('filedata'); | ||||
var format = 'text'; | ||||
if (filedata instanceof ArrayBuffer) { | ||||
// base64-encode binary file data | ||||
var bytes = ''; | ||||
var buf = new Uint8Array(filedata); | ||||
var nbytes = buf.byteLength; | ||||
for (var i=0; i<nbytes; i++) { | ||||
bytes += String.fromCharCode(buf[i]); | ||||
} | ||||
filedata = btoa(bytes); | ||||
format = 'base64'; | ||||
} | ||||
MinRK
|
r13072 | var model = { | ||
MinRK
|
r17535 | path: path, | ||
MinRK
|
r17536 | name: filename | ||
MinRK
|
r13072 | }; | ||
MinRK
|
r17536 | |||
var name_and_ext = utils.splitext(filename); | ||||
var file_ext = name_and_ext[1]; | ||||
var content_type; | ||||
if (file_ext === '.ipynb') { | ||||
model.type = 'notebook'; | ||||
model.format = 'json'; | ||||
MinRK
|
r17537 | try { | ||
model.content = JSON.parse(filedata); | ||||
} catch (e) { | ||||
dialog.modal({ | ||||
title : 'Cannot upload invalid Notebook', | ||||
body : "The error was: " + e, | ||||
buttons : {'OK' : { | ||||
'class' : 'btn-primary', | ||||
click: function () { | ||||
item.remove(); | ||||
} | ||||
}} | ||||
}); | ||||
} | ||||
MinRK
|
r17536 | content_type = 'application/json'; | ||
} else { | ||||
model.type = 'file'; | ||||
model.format = format; | ||||
model.content = filedata; | ||||
content_type = 'application/octet-stream'; | ||||
} | ||||
var filedata = item.data('filedata'); | ||||
Brian E. Granger
|
r4491 | var settings = { | ||
processData : false, | ||||
cache : false, | ||||
Matthias BUSSONNIER
|
r13322 | type : 'PUT', | ||
MinRK
|
r13072 | data : JSON.stringify(model), | ||
Brian E. Granger
|
r4493 | headers : {'Content-Type': content_type}, | ||
Brian E. Granger
|
r4491 | success : function (data, status, xhr) { | ||
MinRK
|
r17536 | item.removeClass('new-file'); | ||
MinRK
|
r17535 | that.add_link(model, item); | ||
Brian E. Granger
|
r4491 | that.add_delete_button(item); | ||
MinRK
|
r13072 | }, | ||
Jonathan Frederic
|
r17198 | error : utils.log_ajax_error, | ||
Brian E. Granger
|
r4491 | }; | ||
Jonathan Frederic
|
r17198 | var url = utils.url_join_encode( | ||
MinRK
|
r15238 | that.base_url, | ||
MinRK
|
r17524 | 'api/contents', | ||
MinRK
|
r15234 | that.notebook_path, | ||
MinRK
|
r17536 | filename | ||
MinRK
|
r13063 | ); | ||
Brian E. Granger
|
r5106 | $.ajax(url, settings); | ||
MinRK
|
r10891 | return false; | ||
Brian E. Granger
|
r4491 | }); | ||
MinRK
|
r10896 | var cancel_button = $('<button/>').text("Cancel") | ||
Jonathan Frederic
|
r16913 | .addClass("btn btn-default btn-xs") | ||
MinRK
|
r10896 | .click(function (e) { | ||
Brian E. Granger
|
r4491 | item.remove(); | ||
MinRK
|
r10891 | return false; | ||
Brian E. Granger
|
r4491 | }); | ||
MinRK
|
r10896 | item.find(".item_buttons").empty() | ||
MinRK
|
r10891 | .append(upload_button) | ||
.append(cancel_button); | ||||
Brian E. Granger
|
r4488 | }; | ||
Zachary Sailer
|
r13017 | NotebookList.prototype.new_notebook = function(){ | ||
MinRK
|
r15234 | var path = this.notebook_path; | ||
MinRK
|
r15238 | var base_url = this.base_url; | ||
Zachary Sailer
|
r13017 | var settings = { | ||
processData : false, | ||||
cache : false, | ||||
type : "POST", | ||||
dataType : "json", | ||||
MinRK
|
r13075 | async : false, | ||
success : function (data, status, xhr) { | ||||
MinRK
|
r13063 | var notebook_name = data.name; | ||
window.open( | ||||
Jonathan Frederic
|
r17198 | utils.url_join_encode( | ||
MinRK
|
r15238 | base_url, | ||
MinRK
|
r13063 | 'notebooks', | ||
MinRK
|
r13069 | path, | ||
MinRK
|
r13063 | notebook_name), | ||
'_blank' | ||||
); | ||||
MinRK
|
r16445 | }, | ||
MinRK
|
r16446 | error : $.proxy(this.new_notebook_failed, this), | ||
Zachary Sailer
|
r13017 | }; | ||
Jonathan Frederic
|
r17198 | var url = utils.url_join_encode( | ||
MinRK
|
r15238 | base_url, | ||
MinRK
|
r17524 | 'api/contents', | ||
MinRK
|
r13063 | path | ||
); | ||||
$.ajax(url, settings); | ||||
Zachary Sailer
|
r13017 | }; | ||
MinRK
|
r16446 | |||
NotebookList.prototype.new_notebook_failed = function (xhr, status, error) { | ||||
Jonathan Frederic
|
r17198 | utils.log_ajax_error(xhr, status, error); | ||
MinRK
|
r16446 | var msg; | ||
if (xhr.responseJSON && xhr.responseJSON.message) { | ||||
msg = xhr.responseJSON.message; | ||||
} else { | ||||
msg = xhr.statusText; | ||||
} | ||||
Jonathan Frederic
|
r17202 | dialog.modal({ | ||
MinRK
|
r16446 | title : 'Creating Notebook Failed', | ||
body : "The error was: " + msg, | ||||
buttons : {'OK' : {'class' : 'btn-primary'}} | ||||
}); | ||||
Jonathan Frederic
|
r17189 | }; | ||
MinRK
|
r16446 | |||
MinRK
|
r17526 | |||
// Backwards compatability. | ||||
Brian E. Granger
|
r4488 | IPython.NotebookList = NotebookList; | ||
Jonathan Frederic
|
r17201 | return {'NotebookList': NotebookList}; | ||
Jonathan Frederic
|
r17189 | }); | ||