cloudcmd 15.9.8 → 15.9.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/ChangeLog +15 -0
- package/HELP.md +7 -1
- package/README.md +2 -4
- package/common/callbackify.js +6 -8
- package/dist/cloudcmd.common.js +3 -3
- package/dist/cloudcmd.common.js.map +1 -1
- package/dist/cloudcmd.js +1 -1
- package/dist/cloudcmd.js.map +1 -1
- package/dist/modules/cloud.js +1 -1
- package/dist/modules/cloud.js.map +1 -1
- package/dist/modules/config.js +1 -1
- package/dist/modules/config.js.map +1 -1
- package/dist/modules/contact.js +1 -1
- package/dist/modules/contact.js.map +1 -1
- package/dist/modules/edit.js +1 -1
- package/dist/modules/edit.js.map +1 -1
- package/dist/modules/konsole.js.map +1 -1
- package/dist/modules/markdown.js +1 -1
- package/dist/modules/markdown.js.map +1 -1
- package/dist/modules/menu.js +1 -1
- package/dist/modules/menu.js.map +1 -1
- package/dist/modules/operation.js +1 -1
- package/dist/modules/operation.js.map +1 -1
- package/dist/modules/terminal-run.js +1 -1
- package/dist/modules/terminal-run.js.map +1 -1
- package/dist/modules/terminal.js +1 -1
- package/dist/modules/terminal.js.map +1 -1
- package/dist/modules/upload.js +1 -1
- package/dist/modules/upload.js.map +1 -1
- package/dist/modules/user-menu.js +1 -1
- package/dist/modules/user-menu.js.map +1 -1
- package/dist/modules/view.js +1 -1
- package/dist/modules/view.js.map +1 -1
- package/dist/sw.js +1 -1
- package/dist/sw.js.map +1 -1
- package/dist-dev/cloudcmd.common.js +28 -28
- package/dist-dev/cloudcmd.js +6 -6
- package/dist-dev/modules/cloud.js +1 -1
- package/dist-dev/modules/config.js +2 -2
- package/dist-dev/modules/contact.js +1 -1
- package/dist-dev/modules/edit.js +1 -1
- package/dist-dev/modules/konsole.js +1 -1
- package/dist-dev/modules/markdown.js +1 -1
- package/dist-dev/modules/menu.js +1 -1
- package/dist-dev/modules/operation.js +2 -2
- package/dist-dev/modules/terminal-run.js +1 -1
- package/dist-dev/modules/terminal.js +1 -1
- package/dist-dev/modules/upload.js +1 -1
- package/dist-dev/modules/user-menu.js +2 -2
- package/dist-dev/modules/view.js +1 -1
- package/dist-dev/sw.js +1 -1
- package/package.json +8 -8
- package/server/config.js +1 -1
- package/server/distribute/log.js +1 -3
- package/server/show-config.js +1 -3
- package/server/user-menu.js +1 -1
|
@@ -20,7 +20,7 @@ eval("\n/* global CloudCmd */\n\nconst tryToPromiseAll = __webpack_require__(/*!
|
|
|
20
20
|
/***/ (function(module, exports, __webpack_require__) {
|
|
21
21
|
|
|
22
22
|
"use strict";
|
|
23
|
-
eval("/**\n * Parse a `data-name` attribute string back into the original filename\n * @param attribute The string we wish to decode\n */\n\n/* global DOM */\n\n/* global CloudCmd */\n\nconst {\n atob,\n btoa\n} = __webpack_require__(/*! ../../common/base64 */ \"./common/base64.js\");\n\nconst createElement = __webpack_require__(/*! @cloudcmd/create-element */ \"./node_modules/@cloudcmd/create-element/lib/create-element.js\");\n\nconst {\n encode,\n decode\n} = __webpack_require__(/*! ../../common/entity */ \"./common/entity.js\");\n\nconst {\n getTitle,\n FS\n} = __webpack_require__(/*! ../../common/cloudfunc */ \"./common/cloudfunc.js\");\n\nlet Title;\nconst CURRENT_FILE = 'current-file';\nconst NBSP_REG = RegExp(String.fromCharCode(160), 'g');\nconst SPACE = ' ';\nmodule.exports._CURRENT_FILE = CURRENT_FILE;\n/**\n * set name from current (or param) file\n *\n * @param name\n * @param current\n */\n\nmodule.exports.setCurrentName = (name, current) => {\n const Info = DOM.CurrentInfo;\n const {\n link\n } = Info;\n const {\n prefix\n } = CloudCmd;\n const dir = prefix + FS + Info.dirPath;\n const encoded = encode(name);\n link.title = encoded;\n link.href = dir + encoded;\n link.innerHTML = encoded;\n current.setAttribute('data-name', createNameAttribute(name));\n CloudCmd.emit('current-file', current);\n return link;\n};\n/**\n * get name from current (or param) file\n *\n * @param currentFile\n */\n\n\nmodule.exports.getCurrentName = currentFile => {\n const current = currentFile || DOM.getCurrentFile();\n if (!current) return '';\n return parseNameAttribute(current.getAttribute('data-name'));\n};\n/**\n * Generate a `data-name` attribute for the given filename\n * @param name The string name to encode\n */\n\n\nconst createNameAttribute = name => {\n const encoded = btoa(encodeURI(name));\n return `js-file-${encoded}`;\n};\n/**\n * Parse a `data-name` attribute string back into the original filename\n * @param attribute The string we wish to decode\n */\n\n\nconst parseNameAttribute = attribute => {\n attribute = attribute.replace('js-file-', '');\n return decodeURI(atob(attribute));\n};\n/**\n * get current direcotory path\n */\n\n\nmodule.exports.getCurrentDirPath = (panel = DOM.getPanel()
|
|
23
|
+
eval("/**\n * Parse a `data-name` attribute string back into the original filename\n * @param attribute The string we wish to decode\n */\n\n/* global DOM */\n\n/* global CloudCmd */\n\nconst {\n atob,\n btoa\n} = __webpack_require__(/*! ../../common/base64 */ \"./common/base64.js\");\n\nconst createElement = __webpack_require__(/*! @cloudcmd/create-element */ \"./node_modules/@cloudcmd/create-element/lib/create-element.js\");\n\nconst {\n encode,\n decode\n} = __webpack_require__(/*! ../../common/entity */ \"./common/entity.js\");\n\nconst {\n getTitle,\n FS\n} = __webpack_require__(/*! ../../common/cloudfunc */ \"./common/cloudfunc.js\");\n\nlet Title;\nconst CURRENT_FILE = 'current-file';\nconst NBSP_REG = RegExp(String.fromCharCode(160), 'g');\nconst SPACE = ' ';\nmodule.exports._CURRENT_FILE = CURRENT_FILE;\n/**\n * set name from current (or param) file\n *\n * @param name\n * @param current\n */\n\nmodule.exports.setCurrentName = (name, current) => {\n const Info = DOM.CurrentInfo;\n const {\n link\n } = Info;\n const {\n prefix\n } = CloudCmd;\n const dir = prefix + FS + Info.dirPath;\n const encoded = encode(name);\n link.title = encoded;\n link.href = dir + encoded;\n link.innerHTML = encoded;\n current.setAttribute('data-name', createNameAttribute(name));\n CloudCmd.emit('current-file', current);\n return link;\n};\n/**\n * get name from current (or param) file\n *\n * @param currentFile\n */\n\n\nmodule.exports.getCurrentName = currentFile => {\n const current = currentFile || DOM.getCurrentFile();\n if (!current) return '';\n return parseNameAttribute(current.getAttribute('data-name'));\n};\n/**\n * Generate a `data-name` attribute for the given filename\n * @param name The string name to encode\n */\n\n\nconst createNameAttribute = name => {\n const encoded = btoa(encodeURI(name));\n return `js-file-${encoded}`;\n};\n/**\n * Parse a `data-name` attribute string back into the original filename\n * @param attribute The string we wish to decode\n */\n\n\nconst parseNameAttribute = attribute => {\n attribute = attribute.replace('js-file-', '');\n return decodeURI(atob(attribute));\n};\n/**\n * get current direcotory path\n */\n\n\nmodule.exports.getCurrentDirPath = function () {\n let panel = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : DOM.getPanel();\n const path = DOM.getByDataName('js-path', panel);\n return path.textContent.replace(NBSP_REG, SPACE);\n};\n/**\n * get link from current (or param) file\n *\n * @param currentFile - current file by default\n */\n\n\nmodule.exports.getCurrentPath = currentFile => {\n const current = currentFile || DOM.getCurrentFile();\n const [element] = DOM.getByTag('a', current);\n const {\n prefix\n } = CloudCmd;\n const path = element.getAttribute('href').replace(RegExp('^' + prefix + FS), '').replace(NBSP_REG, SPACE);\n return decode(path);\n};\n/**\n * get current direcotory name\n */\n\n\nmodule.exports.getCurrentDirName = () => {\n const href = DOM.getCurrentDirPath().replace(/\\/$/, '');\n const substr = href.substr(href, href.lastIndexOf('/'));\n const ret = href.replace(substr + '/', '') || '/';\n return ret;\n};\n/**\n * get current direcotory path\n */\n\n\nmodule.exports.getParentDirPath = panel => {\n const path = DOM.getCurrentDirPath(panel);\n const dirName = DOM.getCurrentDirName() + '/';\n const index = path.lastIndexOf(dirName);\n if (path === '/') return path;\n return path.slice(0, index);\n};\n/**\n * get not current direcotory path\n */\n\n\nmodule.exports.getNotCurrentDirPath = () => {\n const panel = DOM.getPanel({\n active: false\n });\n return DOM.getCurrentDirPath(panel);\n};\n/**\n * unified way to get current file\n *\n * @currentFile\n */\n\n\nmodule.exports.getCurrentFile = () => {\n return DOM.getByClass(CURRENT_FILE);\n};\n/**\n * get current file by name\n */\n\n\nmodule.exports.getCurrentByName = function (name) {\n let panel = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : DOM.CurrentInfo.panel;\n const dataName = 'js-file-' + btoa(encodeURI(name));\n return DOM.getByDataName(dataName, panel);\n};\n/**\n * private function thet unset currentfile\n *\n * @currentFile\n */\n\n\nfunction unsetCurrentFile(currentFile) {\n const is = DOM.isCurrentFile(currentFile);\n if (!is) return;\n currentFile.classList.remove(CURRENT_FILE);\n}\n/**\n * unified way to set current file\n */\n\n\nmodule.exports.setCurrentFile = (currentFile, options) => {\n const o = options;\n const currentFileWas = DOM.getCurrentFile();\n if (!currentFile) return DOM;\n let pathWas = '';\n\n if (currentFileWas) {\n pathWas = DOM.getCurrentDirPath();\n unsetCurrentFile(currentFileWas);\n }\n\n currentFile.classList.add(CURRENT_FILE);\n const path = DOM.getCurrentDirPath();\n const name = CloudCmd.config('name');\n\n if (path !== pathWas) {\n DOM.setTitle(getTitle({\n name,\n path\n }));\n /* history could be present\n * but it should be false\n * to prevent default behavior\n */\n\n if (!o || o.history) {\n const historyPath = path === '/' ? path : FS + path;\n DOM.setHistory(historyPath, null, historyPath);\n }\n }\n /* scrolling to current file */\n\n\n const CENTER = true;\n DOM.scrollIntoViewIfNeeded(currentFile, CENTER);\n CloudCmd.emit('current-file', currentFile);\n CloudCmd.emit('current-path', path);\n CloudCmd.emit('current-name', DOM.getCurrentName(currentFile));\n return DOM;\n};\n\nthis.setCurrentByName = name => {\n const current = DOM.getCurrentByName(name);\n return DOM.setCurrentFile(current);\n};\n/*\n * set current file by position\n *\n * @param layer - element\n * @param - position {x, y}\n */\n\n\nmodule.exports.getCurrentByPosition = _ref => {\n let {\n x,\n y\n } = _ref;\n const element = document.elementFromPoint(x, y);\n\n const getEl = el => {\n const {\n tagName\n } = el;\n const isChild = /A|SPAN|LI/.test(tagName);\n if (!isChild) return null;\n if (tagName === 'A') return el.parentElement.parentElement;\n if (tagName === 'SPAN') return el.parentElement;\n return el;\n };\n\n const el = getEl(element);\n if (el && el.tagName !== 'LI') return null;\n return el;\n};\n/**\n * current file check\n *\n * @param currentFile\n */\n\n\nmodule.exports.isCurrentFile = currentFile => {\n if (!currentFile) return false;\n return DOM.isContainClass(currentFile, CURRENT_FILE);\n};\n/**\n * set title or create title element\n *\n * @param name\n */\n\n\nmodule.exports.setTitle = name => {\n if (!Title) Title = DOM.getByTag('title')[0] || createElement('title', {\n innerHTML: name,\n parent: document.head\n });\n Title.textContent = name;\n return DOM;\n};\n/**\n * check is current file is a directory\n *\n * @param currentFile\n */\n\n\nmodule.exports.isCurrentIsDir = currentFile => {\n const current = currentFile || DOM.getCurrentFile();\n const path = DOM.getCurrentPath(current);\n const fileType = DOM.getCurrentType(current);\n const isZip = /\\.zip$/.test(path);\n const isDir = /^directory(-link)?/.test(fileType);\n return isDir || isZip;\n};\n\nmodule.exports.getCurrentType = currentFile => {\n const current = currentFile || DOM.getCurrentFile();\n const el = DOM.getByDataName('js-type', current);\n const type = el.className.split(' ').pop();\n return type;\n};\n\n//# sourceURL=file://cloudcmd/client/dom/current-file.js");
|
|
24
24
|
|
|
25
25
|
/***/ }),
|
|
26
26
|
|
|
@@ -32,7 +32,7 @@ eval("/**\n * Parse a `data-name` attribute string back into the original filena
|
|
|
32
32
|
/***/ (function(module, exports, __webpack_require__) {
|
|
33
33
|
|
|
34
34
|
"use strict";
|
|
35
|
-
eval("\n\nconst tryToCatch = __webpack_require__(/*! try-to-catch */ \"./node_modules/try-to-catch/lib/try-to-catch.js\");\n\nconst {\n alert,\n prompt,\n confirm,\n progress\n} = __webpack_require__(/*! smalltalk */ \"./node_modules/smalltalk/lib/smalltalk.js\");\n\nconst title = 'Cloud Commander';\n\nmodule.exports.alert = (
|
|
35
|
+
eval("\n\nconst tryToCatch = __webpack_require__(/*! try-to-catch */ \"./node_modules/try-to-catch/lib/try-to-catch.js\");\n\nconst {\n alert,\n prompt,\n confirm,\n progress\n} = __webpack_require__(/*! smalltalk */ \"./node_modules/smalltalk/lib/smalltalk.js\");\n\nconst title = 'Cloud Commander';\n\nmodule.exports.alert = function () {\n for (var _len = arguments.length, a = new Array(_len), _key = 0; _key < _len; _key++) {\n a[_key] = arguments[_key];\n }\n\n return alert(title, ...a, {\n cancel: false\n });\n};\n\nmodule.exports.prompt = function () {\n for (var _len2 = arguments.length, a = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\n a[_key2] = arguments[_key2];\n }\n\n return tryToCatch(prompt, title, ...a);\n};\n\nmodule.exports.confirm = function () {\n for (var _len3 = arguments.length, a = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {\n a[_key3] = arguments[_key3];\n }\n\n return tryToCatch(confirm, title, ...a);\n};\n\nmodule.exports.progress = function () {\n for (var _len4 = arguments.length, a = new Array(_len4), _key4 = 0; _key4 < _len4; _key4++) {\n a[_key4] = arguments[_key4];\n }\n\n return progress(title, ...a);\n};\n\nmodule.exports.alert.noFiles = () => {\n return alert(title, 'No files selected!', {\n cancel: false\n });\n};\n\n//# sourceURL=file://cloudcmd/client/dom/dialog.js");
|
|
36
36
|
|
|
37
37
|
/***/ }),
|
|
38
38
|
|
|
@@ -44,7 +44,7 @@ eval("\n\nconst tryToCatch = __webpack_require__(/*! try-to-catch */ \"./node_mo
|
|
|
44
44
|
/***/ (function(module, exports, __webpack_require__) {
|
|
45
45
|
|
|
46
46
|
"use strict";
|
|
47
|
-
eval("\n/* global CloudCmd */\n\nconst philip = __webpack_require__(/*! philip */ \"./node_modules/philip/legacy/philip.js\");\n\nconst Images = __webpack_require__(/*! ./images */ \"./client/dom/images.js\");\n\nconst {\n FS\n} = __webpack_require__(/*! ../../common/cloudfunc */ \"./common/cloudfunc.js\");\n\nconst DOM = __webpack_require__(/*! . */ \"./client/dom/index.js\");\n\nconst Dialog = __webpack_require__(/*! ./dialog */ \"./client/dom/dialog.js\");\n\nconst {\n getCurrentDirPath: getPathWhenRootEmpty\n} = DOM;\n\nmodule.exports = items => {\n if (items.length) Images.show('top');\n const entries = Array.from(items).map(item => {\n return item.webkitGetAsEntry();\n });\n const dirPath = getPathWhenRootEmpty();\n const path = dirPath.replace(/\\/$/, '');\n const progress = Dialog.progress('Uploading...');\n progress.catch(() => {\n Dialog.alert('Upload aborted');\n uploader.abort();\n });\n const uploader = philip(entries, (type, name, data, i, n, callback) => {\n const {\n prefixURL\n } = CloudCmd;\n const full = prefixURL + FS + path + name;\n let upload;\n\n switch (type) {\n case 'file':\n upload = uploadFile(full, data);\n break;\n\n case 'directory':\n upload = uploadDir(full);\n break;\n }\n\n upload.on('end', callback);\n upload.on('progress', count => {\n const current = percent(i, n);\n const next = percent(i + 1, n);\n const max = next - current;\n const value = current + percent(count, 100, max);\n progress.setProgress(value);\n });\n });\n uploader.on('error', error => {\n Dialog.alert(error);\n uploader.abort();\n });\n uploader.on('end', CloudCmd.refresh);\n};\n\nfunction percent(i, n
|
|
47
|
+
eval("\n/* global CloudCmd */\n\nconst philip = __webpack_require__(/*! philip */ \"./node_modules/philip/legacy/philip.js\");\n\nconst Images = __webpack_require__(/*! ./images */ \"./client/dom/images.js\");\n\nconst {\n FS\n} = __webpack_require__(/*! ../../common/cloudfunc */ \"./common/cloudfunc.js\");\n\nconst DOM = __webpack_require__(/*! . */ \"./client/dom/index.js\");\n\nconst Dialog = __webpack_require__(/*! ./dialog */ \"./client/dom/dialog.js\");\n\nconst {\n getCurrentDirPath: getPathWhenRootEmpty\n} = DOM;\n\nmodule.exports = items => {\n if (items.length) Images.show('top');\n const entries = Array.from(items).map(item => {\n return item.webkitGetAsEntry();\n });\n const dirPath = getPathWhenRootEmpty();\n const path = dirPath.replace(/\\/$/, '');\n const progress = Dialog.progress('Uploading...');\n progress.catch(() => {\n Dialog.alert('Upload aborted');\n uploader.abort();\n });\n const uploader = philip(entries, (type, name, data, i, n, callback) => {\n const {\n prefixURL\n } = CloudCmd;\n const full = prefixURL + FS + path + name;\n let upload;\n\n switch (type) {\n case 'file':\n upload = uploadFile(full, data);\n break;\n\n case 'directory':\n upload = uploadDir(full);\n break;\n }\n\n upload.on('end', callback);\n upload.on('progress', count => {\n const current = percent(i, n);\n const next = percent(i + 1, n);\n const max = next - current;\n const value = current + percent(count, 100, max);\n progress.setProgress(value);\n });\n });\n uploader.on('error', error => {\n Dialog.alert(error);\n uploader.abort();\n });\n uploader.on('end', CloudCmd.refresh);\n};\n\nfunction percent(i, n) {\n let per = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 100;\n return Math.round(i * per / n);\n}\n\nfunction uploadFile(url, data) {\n return DOM.load.put(url, data);\n}\n\nfunction uploadDir(url) {\n return DOM.load.put(url + '?dir');\n}\n\n//# sourceURL=file://cloudcmd/client/dom/directory.js");
|
|
48
48
|
|
|
49
49
|
/***/ }),
|
|
50
50
|
|
|
@@ -56,7 +56,7 @@ eval("\n/* global CloudCmd */\n\nconst philip = __webpack_require__(/*! philip *
|
|
|
56
56
|
/***/ (function(module, exports, __webpack_require__) {
|
|
57
57
|
|
|
58
58
|
"use strict";
|
|
59
|
-
eval("\n\nconst currify = __webpack_require__(/*! currify */ \"./node_modules/currify/lib/currify.js\");\n\nconst DOM = module.exports;\n/**\n * check class of element\n *\n * @param element\n * @param className\n */\n\nconst isContainClass = (element, className) => {\n if (!element) throw Error('element could not be empty!');\n if (!className) throw Error('className could not be empty!');\n if (Array.isArray(className)) return className.some(currify(isContainClass, element));\n const {\n classList\n } = element;\n return classList.contains(className);\n};\n\nmodule.exports.isContainClass = isContainClass;\n/**\n * Function search element by tag\n * @param tag - className\n * @param element - element\n */\n\nmodule.exports.getByTag = (tag
|
|
59
|
+
eval("\n\nconst currify = __webpack_require__(/*! currify */ \"./node_modules/currify/lib/currify.js\");\n\nconst DOM = module.exports;\n/**\n * check class of element\n *\n * @param element\n * @param className\n */\n\nconst isContainClass = (element, className) => {\n if (!element) throw Error('element could not be empty!');\n if (!className) throw Error('className could not be empty!');\n if (Array.isArray(className)) return className.some(currify(isContainClass, element));\n const {\n classList\n } = element;\n return classList.contains(className);\n};\n\nmodule.exports.isContainClass = isContainClass;\n/**\n * Function search element by tag\n * @param tag - className\n * @param element - element\n */\n\nmodule.exports.getByTag = function (tag) {\n let element = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : document;\n return element.getElementsByTagName(tag);\n};\n/**\n * Function search element by id\n * @param Id - id\n */\n\n\nmodule.exports.getById = function (id) {\n let element = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : document;\n return element.querySelector('#' + id);\n};\n/**\n * Function search first element by class name\n * @param className - className\n * @param element - element\n */\n\n\nmodule.exports.getByClass = function (className) {\n let element = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : document;\n return DOM.getByClassAll(className, element)[0];\n};\n\nmodule.exports.getByDataName = function (attribute) {\n let element = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : document;\n const selector = '[' + 'data-name=\"' + attribute + '\"]';\n return element.querySelector(selector);\n};\n/**\n * Function search element by class name\n * @param pClass - className\n * @param element - element\n */\n\n\nmodule.exports.getByClassAll = (className, element) => {\n return (element || document).getElementsByClassName(className);\n};\n/**\n * add class=hidden to element\n *\n * @param element\n */\n\n\nmodule.exports.hide = element => {\n element.classList.add('hidden');\n return DOM;\n};\n\nmodule.exports.show = element => {\n element.classList.remove('hidden');\n return DOM;\n};\n\n//# sourceURL=file://cloudcmd/client/dom/dom-tree.js");
|
|
60
60
|
|
|
61
61
|
/***/ }),
|
|
62
62
|
|
|
@@ -68,7 +68,7 @@ eval("\n\nconst currify = __webpack_require__(/*! currify */ \"./node_modules/cu
|
|
|
68
68
|
/***/ (function(module, exports, __webpack_require__) {
|
|
69
69
|
|
|
70
70
|
"use strict";
|
|
71
|
-
eval("\n\nlet list = [];\n\nmodule.exports.add = (el, name, fn) => {\n list.push([el, name, fn]);\n};\n\nmodule.exports.clear = () => {\n list = [];\n};\n\nmodule.exports.get = () =>
|
|
71
|
+
eval("\n\nlet list = [];\n\nmodule.exports.add = (el, name, fn) => {\n list.push([el, name, fn]);\n};\n\nmodule.exports.clear = () => {\n list = [];\n};\n\nmodule.exports.get = () => list;\n\n//# sourceURL=file://cloudcmd/client/dom/events/event-store.js");
|
|
72
72
|
|
|
73
73
|
/***/ }),
|
|
74
74
|
|
|
@@ -80,7 +80,7 @@ eval("\n\nlet list = [];\n\nmodule.exports.add = (el, name, fn) => {\n list.pus
|
|
|
80
80
|
/***/ (function(module, exports, __webpack_require__) {
|
|
81
81
|
|
|
82
82
|
"use strict";
|
|
83
|
-
eval("\n\nconst itype = __webpack_require__(/*! itype */ \"./node_modules/itype/lib/itype.js\");\n\nconst EventStore = __webpack_require__(/*! ./event-store */ \"./client/dom/events/event-store.js\");\n\nmodule.exports = new EventsProto();\n\nfunction EventsProto() {\n const Events = this;\n\n const getEventOptions = eventName => {\n if (eventName !== 'touchstart') return false;\n return {\n passive: true\n };\n };\n\n function parseArgs(eventName, element, listener, callback) {\n let isFunc;\n const args = [eventName, element, listener, callback];\n const EVENT_NAME = 1;\n const ELEMENT = 0;\n const type = itype(eventName);\n\n switch (type) {\n default:\n if (!/element$/.test(type)) throw Error('unknown eventName: ' + type);\n parseArgs(args[EVENT_NAME], args[ELEMENT], listener, callback);\n break;\n\n case 'string':\n isFunc = itype.function(element);\n\n if (isFunc) {\n listener = element;\n element = null;\n }\n\n if (!element) element = window;\n callback(element, [eventName, listener, getEventOptions(eventName)]);\n break;\n\n case 'array':\n for (const name of eventName) {\n parseArgs(name, element, listener, callback);\n }\n\n break;\n\n case 'object':\n for (const name of Object.keys(eventName)) {\n const eventListener = eventName[name];\n parseArgs(name, element, eventListener, callback);\n }\n\n break;\n }\n }\n /**\n * safe add event listener\n *\n * @param type\n * @param element {document by default}\n * @param listener\n */\n\n\n this.add = (type, element, listener) => {\n checkType(type);\n parseArgs(type, element, listener, (element, args) => {\n const [name, fn, options] = args;\n element.addEventListener(name, fn, options);\n EventStore.add(element, name, fn);\n });\n return Events;\n };\n /**\n * safe add event listener\n *\n * @param type\n * @param listener\n * @param element {document by default}\n */\n\n\n this.addOnce = (type, element, listener) => {\n const once = event => {\n Events.remove(type, element, once);\n listener(event);\n };\n\n if (!listener) {\n listener = element;\n element = null;\n }\n\n this.add(type, element, once);\n return Events;\n };\n /**\n * safe remove event listener\n *\n * @param type\n * @param listener\n * @param element {document by default}\n */\n\n\n this.remove = (type, element, listener) => {\n checkType(type);\n parseArgs(type, element, listener, (element, args) => {\n element.removeEventListener(...args);\n });\n return Events;\n };\n /**\n * remove all added event listeners\n *\n * @param listener\n */\n\n\n this.removeAll = () => {\n const events = EventStore.get();\n\n for (const [el, name, fn] of events) el.removeEventListener(name, fn);\n\n EventStore.clear();\n };\n /**\n * safe add event keydown listener\n *\n * @param listener\n */\n\n\n this.addKey = function (
|
|
83
|
+
eval("\n\nconst itype = __webpack_require__(/*! itype */ \"./node_modules/itype/lib/itype.js\");\n\nconst EventStore = __webpack_require__(/*! ./event-store */ \"./client/dom/events/event-store.js\");\n\nmodule.exports = new EventsProto();\n\nfunction EventsProto() {\n const Events = this;\n\n const getEventOptions = eventName => {\n if (eventName !== 'touchstart') return false;\n return {\n passive: true\n };\n };\n\n function parseArgs(eventName, element, listener, callback) {\n let isFunc;\n const args = [eventName, element, listener, callback];\n const EVENT_NAME = 1;\n const ELEMENT = 0;\n const type = itype(eventName);\n\n switch (type) {\n default:\n if (!/element$/.test(type)) throw Error('unknown eventName: ' + type);\n parseArgs(args[EVENT_NAME], args[ELEMENT], listener, callback);\n break;\n\n case 'string':\n isFunc = itype.function(element);\n\n if (isFunc) {\n listener = element;\n element = null;\n }\n\n if (!element) element = window;\n callback(element, [eventName, listener, getEventOptions(eventName)]);\n break;\n\n case 'array':\n for (const name of eventName) {\n parseArgs(name, element, listener, callback);\n }\n\n break;\n\n case 'object':\n for (const name of Object.keys(eventName)) {\n const eventListener = eventName[name];\n parseArgs(name, element, eventListener, callback);\n }\n\n break;\n }\n }\n /**\n * safe add event listener\n *\n * @param type\n * @param element {document by default}\n * @param listener\n */\n\n\n this.add = (type, element, listener) => {\n checkType(type);\n parseArgs(type, element, listener, (element, args) => {\n const [name, fn, options] = args;\n element.addEventListener(name, fn, options);\n EventStore.add(element, name, fn);\n });\n return Events;\n };\n /**\n * safe add event listener\n *\n * @param type\n * @param listener\n * @param element {document by default}\n */\n\n\n this.addOnce = (type, element, listener) => {\n const once = event => {\n Events.remove(type, element, once);\n listener(event);\n };\n\n if (!listener) {\n listener = element;\n element = null;\n }\n\n this.add(type, element, once);\n return Events;\n };\n /**\n * safe remove event listener\n *\n * @param type\n * @param listener\n * @param element {document by default}\n */\n\n\n this.remove = (type, element, listener) => {\n checkType(type);\n parseArgs(type, element, listener, (element, args) => {\n element.removeEventListener(...args);\n });\n return Events;\n };\n /**\n * remove all added event listeners\n *\n * @param listener\n */\n\n\n this.removeAll = () => {\n const events = EventStore.get();\n\n for (const [el, name, fn] of events) el.removeEventListener(name, fn);\n\n EventStore.clear();\n };\n /**\n * safe add event keydown listener\n *\n * @param listener\n */\n\n\n this.addKey = function () {\n const name = 'keydown';\n\n for (var _len = arguments.length, argsArr = new Array(_len), _key = 0; _key < _len; _key++) {\n argsArr[_key] = arguments[_key];\n }\n\n const args = [name, ...argsArr];\n return Events.add(...args);\n };\n /**\n * safe remove event click listener\n *\n * @param listener\n */\n\n\n this.rmKey = function () {\n const name = 'keydown';\n\n for (var _len2 = arguments.length, argsArr = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\n argsArr[_key2] = arguments[_key2];\n }\n\n const args = [name, ...argsArr];\n return Events.remove(...args);\n };\n /**\n * safe add event click listener\n *\n * @param listener\n */\n\n\n this.addClick = function () {\n const name = 'click';\n\n for (var _len3 = arguments.length, argsArr = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {\n argsArr[_key3] = arguments[_key3];\n }\n\n const args = [name, ...argsArr];\n return Events.add(...args);\n };\n /**\n * safe remove event click listener\n *\n * @param listener\n */\n\n\n this.rmClick = function () {\n const name = 'click';\n\n for (var _len4 = arguments.length, argsArr = new Array(_len4), _key4 = 0; _key4 < _len4; _key4++) {\n argsArr[_key4] = arguments[_key4];\n }\n\n const args = [name, ...argsArr];\n return Events.remove(...args);\n };\n\n this.addContextMenu = function () {\n const name = 'contextmenu';\n\n for (var _len5 = arguments.length, argsArr = new Array(_len5), _key5 = 0; _key5 < _len5; _key5++) {\n argsArr[_key5] = arguments[_key5];\n }\n\n const args = [name, ...argsArr];\n return Events.add(...args);\n };\n /**\n * safe add event click listener\n *\n * @param listener\n */\n\n\n this.addError = function () {\n const name = 'error';\n\n for (var _len6 = arguments.length, argsArr = new Array(_len6), _key6 = 0; _key6 < _len6; _key6++) {\n argsArr[_key6] = arguments[_key6];\n }\n\n const args = [name, ...argsArr];\n return Events.add(...args);\n };\n /**\n * safe add load click listener\n *\n * @param listener\n */\n\n\n this.addLoad = function () {\n const name = 'load';\n\n for (var _len7 = arguments.length, argsArr = new Array(_len7), _key7 = 0; _key7 < _len7; _key7++) {\n argsArr[_key7] = arguments[_key7];\n }\n\n const args = [name, ...argsArr];\n return Events.add(...args);\n };\n\n function checkType(type) {\n if (!type) throw Error('type could not be empty!');\n }\n}\n\n//# sourceURL=file://cloudcmd/client/dom/events/index.js");
|
|
84
84
|
|
|
85
85
|
/***/ }),
|
|
86
86
|
|
|
@@ -92,7 +92,7 @@ eval("\n\nconst itype = __webpack_require__(/*! itype */ \"./node_modules/itype/
|
|
|
92
92
|
/***/ (function(module, exports, __webpack_require__) {
|
|
93
93
|
|
|
94
94
|
"use strict";
|
|
95
|
-
eval("\n/* global CloudCmd */\n\nconst itype = __webpack_require__(/*! itype */ \"./node_modules/itype/lib/itype.js\");\n\nconst {\n promisify\n} = __webpack_require__(/*! es6-promisify */ \"./node_modules/es6-promisify/dist/promisify.mjs\");\n\nconst load = __webpack_require__(/*! ./load */ \"./client/dom/load.js\");\n\nconst RESTful = __webpack_require__(/*! ./rest */ \"./client/dom/rest.js\");\n\nconst Promises = {};\nconst FILES_JSON = 'config|modules';\nconst FILES_HTML = 'file|path|link|pathLink|media';\nconst FILES_HTML_ROOT = 'view/media-tmpl|config-tmpl|upload';\nconst DIR_HTML = '/tmpl/';\nconst DIR_HTML_FS = DIR_HTML + 'fs/';\nconst DIR_JSON = '/json/';\nconst timeout = getTimeoutOnce(2000);\nmodule.exports.get = getFile;\n\
|
|
95
|
+
eval("\n/* global CloudCmd */\n\nconst itype = __webpack_require__(/*! itype */ \"./node_modules/itype/lib/itype.js\");\n\nconst {\n promisify\n} = __webpack_require__(/*! es6-promisify */ \"./node_modules/es6-promisify/dist/promisify.mjs\");\n\nconst load = __webpack_require__(/*! ./load */ \"./client/dom/load.js\");\n\nconst RESTful = __webpack_require__(/*! ./rest */ \"./client/dom/rest.js\");\n\nconst Promises = {};\nconst FILES_JSON = 'config|modules';\nconst FILES_HTML = 'file|path|link|pathLink|media';\nconst FILES_HTML_ROOT = 'view/media-tmpl|config-tmpl|upload';\nconst DIR_HTML = '/tmpl/';\nconst DIR_HTML_FS = DIR_HTML + 'fs/';\nconst DIR_JSON = '/json/';\nconst timeout = getTimeoutOnce(2000);\nmodule.exports.get = getFile;\n\nfunction getFile(name) {\n const type = itype(name);\n check(name);\n if (type === 'string') return getModule(name);\n if (type === 'array') return Promise.all(name.map(getFile));\n}\n\nfunction check(name) {\n if (!name) throw Error('name could not be empty!');\n}\n\nfunction getModule(name) {\n const regExpHTML = new RegExp(FILES_HTML + '|' + FILES_HTML_ROOT);\n const regExpJSON = new RegExp(FILES_JSON);\n const isHTML = regExpHTML.test(name);\n const isJSON = regExpJSON.test(name);\n if (!isHTML && !isJSON) return showError(name);\n if (name === 'config') return getConfig();\n const path = getPath(name, isHTML, isJSON);\n return getSystemFile(path);\n}\n\nfunction getPath(name, isHTML, isJSON) {\n let path;\n const regExp = new RegExp(FILES_HTML_ROOT);\n const isRoot = regExp.test(name);\n\n if (isHTML) {\n if (isRoot) path = DIR_HTML + name.replace('-tmpl', '');else path = DIR_HTML_FS + name;\n path += '.hbs';\n } else if (isJSON) {\n path = DIR_JSON + name + '.json';\n }\n\n return path;\n}\n\nfunction showError(name) {\n const str = 'Wrong file name: ' + name;\n const error = Error(str);\n throw error;\n}\n\nconst getSystemFile = promisify((file, callback) => {\n const {\n prefix\n } = CloudCmd;\n if (!Promises[file]) Promises[file] = new Promise((success, error) => {\n const url = prefix + file;\n load.ajax({\n url,\n success,\n error\n });\n });\n Promises[file].then(data => {\n callback(null, data);\n }, error => {\n Promises[file] = null;\n callback(error);\n });\n});\n\nconst getConfig = async () => {\n let is;\n if (!Promises.config) Promises.config = () => {\n is = true;\n return RESTful.Config.read();\n };\n const [, data] = await Promises.config();\n if (data) is = false;\n timeout(() => {\n if (!is) Promises.config = null;\n });\n return data;\n};\n\nfunction getTimeoutOnce(time) {\n let is;\n return callback => {\n if (is) return;\n is = true;\n setTimeout(() => {\n is = false;\n callback();\n }, time);\n };\n}\n\n//# sourceURL=file://cloudcmd/client/dom/files.js");
|
|
96
96
|
|
|
97
97
|
/***/ }),
|
|
98
98
|
|
|
@@ -116,7 +116,7 @@ eval("/* global DOM */\n\n\nconst createElement = __webpack_require__(/*! @cloud
|
|
|
116
116
|
/***/ (function(module, exports, __webpack_require__) {
|
|
117
117
|
|
|
118
118
|
"use strict";
|
|
119
|
-
eval("\n/* global CloudCmd */\n\nconst Util = __webpack_require__(/*! ../../common/util */ \"./common/util.js\");\n\nconst Images = __webpack_require__(/*! ./images */ \"./client/dom/images.js\");\n\nconst load = __webpack_require__(/*! ./load */ \"./client/dom/load.js\");\n\nconst Files = __webpack_require__(/*! ./files */ \"./client/dom/files.js\");\n\nconst RESTful = __webpack_require__(/*! ./rest */ \"./client/dom/rest.js\");\n\nconst IO = __webpack_require__(/*! ./io */ \"./client/dom/io/index.js\");\n\nconst Storage = __webpack_require__(/*! ./storage */ \"./client/dom/storage.js\");\n\nconst Dialog = __webpack_require__(/*! ./dialog */ \"./client/dom/dialog.js\");\n\nconst renameCurrent = __webpack_require__(/*! ./operations/rename-current */ \"./client/dom/operations/rename-current.js\");\n\nconst CurrentFile = __webpack_require__(/*! ./current-file */ \"./client/dom/current-file.js\");\n\nconst DOMTree = __webpack_require__(/*! ./dom-tree */ \"./client/dom/dom-tree.js\");\n\nconst Cmd = module.exports;\nconst DOM = { ...DOMTree,\n ...CurrentFile,\n ...Cmd\n};\nconst CurrentInfo = {};\nDOM.Images = Images;\nDOM.load = load;\nDOM.Files = Files;\nDOM.RESTful = RESTful;\nDOM.IO = IO;\nDOM.Storage = Storage;\nDOM.Dialog = Dialog;\nDOM.CurrentInfo = CurrentInfo;\nmodule.exports = DOM;\nDOM.uploadDirectory = __webpack_require__(/*! ./directory */ \"./client/dom/directory.js\");\nDOM.Buffer = __webpack_require__(/*! ./buffer */ \"./client/dom/buffer.js\");\nDOM.Events = __webpack_require__(/*! ./events */ \"./client/dom/events/index.js\");\n\nconst loadRemote = __webpack_require__(/*! ./load-remote */ \"./client/dom/load-remote.js\");\n\nconst selectByPattern = __webpack_require__(/*! ./select-by-pattern */ \"./client/dom/select-by-pattern.js\");\n\nconst SELECTED_FILE = 'selected-file';\nconst TabPanel = {\n 'js-left': null,\n 'js-right': null\n};\n\nmodule.exports.loadRemote = (name, options, callback) => {\n loadRemote(name, options, callback);\n return DOM;\n};\n\nmodule.exports.loadSocket = callback => {\n DOM.loadRemote('socket', {\n name: 'io'\n }, callback);\n return DOM;\n};\n/**\n * create new folder\n *\n */\n\n\nmodule.exports.promptNewDir = async function () {\n await promptNew('directory');\n};\n/**\n * create new file\n *\n * @typeName\n * @type\n */\n\n\nmodule.exports.promptNewFile = async () => {\n await promptNew('file');\n};\n\nasync function promptNew(typeName) {\n const {\n Dialog\n } = DOM;\n const dir = DOM.getCurrentDirPath();\n const msg = 'New ' + typeName || false;\n\n const getName = () => {\n const name = DOM.getCurrentName();\n if (name === '..') return '';\n return name;\n };\n\n const name = getName();\n const [cancel, currentName] = await Dialog.prompt(msg, name);\n if (cancel) return;\n const path = `${dir}${currentName}`;\n if (typeName === 'directory') await RESTful.createDirectory(path);else await RESTful.write(path);\n await CloudCmd.refresh({\n currentName\n });\n}\n/**\n * get current direcotory name\n */\n\n\nmodule.exports.getCurrentDirName = () => {\n const href = DOM.getCurrentDirPath().replace(/\\/$/, '');\n const substr = href.substr(href, href.lastIndexOf('/'));\n const ret = href.replace(substr + '/', '') || '/';\n return ret;\n};\n/**\n * get current direcotory path\n */\n\n\nmodule.exports.getParentDirPath = panel => {\n const path = DOM.getCurrentDirPath(panel);\n const dirName = DOM.getCurrentDirName() + '/';\n const index = path.lastIndexOf(dirName);\n if (path !== '/') return path.slice(0, index);\n return path;\n};\n/**\n * get not current direcotory path\n */\n\n\nmodule.exports.getNotCurrentDirPath = () => {\n const panel = DOM.getPanel({\n active: false\n });\n const path = DOM.getCurrentDirPath(panel);\n return path;\n};\n/**\n * get current file by name\n */\n\n\nmodule.exports.getCurrentByName = (name, panel = CurrentInfo.panel) => {\n const dataName = 'js-file-' + btoa(encodeURI(name));\n const element = DOM.getByDataName(dataName, panel);\n return element;\n};\n/**\n * unified way to get selected files\n *\n * @currentFile\n */\n\n\nmodule.exports.getSelectedFiles = () => {\n const panel = DOM.getPanel();\n const selected = DOM.getByClassAll(SELECTED_FILE, panel);\n return Array.from(selected);\n};\n/*\n * unselect all files\n */\n\n\nmodule.exports.unselectFiles = files => {\n files = files || DOM.getSelectedFiles();\n Array.from(files).forEach(DOM.toggleSelectedFile);\n};\n/**\n * get all selected files or current when none selected\n *\n * @currentFile\n */\n\n\nmodule.exports.getActiveFiles = () => {\n const current = DOM.getCurrentFile();\n const files = DOM.getSelectedFiles();\n const name = DOM.getCurrentName(current);\n if (!files.length && name !== '..') return [current];\n return files;\n};\n\nmodule.exports.getCurrentDate = currentFile => {\n const current = currentFile || DOM.getCurrentFile();\n const date = DOM.getByDataName('js-date', current).textContent;\n return date;\n};\n/**\n * get size\n * @currentFile\n */\n\n\nmodule.exports.getCurrentSize = currentFile => {\n const current = currentFile || DOM.getCurrentFile();\n /* если это папка - возвращаем слово dir вместо размера*/\n\n const size = DOM.getByDataName('js-size', current).textContent.replace(/^<|>$/g, '');\n return size;\n};\n/**\n * get size\n * @currentFile\n */\n\n\nmodule.exports.loadCurrentSize = async currentFile => {\n const current = currentFile || DOM.getCurrentFile();\n const query = '?size';\n const link = DOM.getCurrentPath(current);\n Images.show.load();\n if (name === '..') return;\n const [, size] = await RESTful.read(link + query);\n DOM.setCurrentSize(size, current);\n Images.hide();\n return current;\n};\n/**\n * load hash\n * @callback\n * @currentFile\n */\n\n\nmodule.exports.loadCurrentHash = async currentFile => {\n const current = currentFile || DOM.getCurrentFile();\n const query = '?hash';\n const link = DOM.getCurrentPath(current);\n const [, data] = await RESTful.read(link + query);\n return data;\n};\n/**\n * set size\n * @currentFile\n */\n\n\nmodule.exports.setCurrentSize = (size, currentFile) => {\n const current = currentFile || DOM.getCurrentFile();\n const sizeElement = DOM.getByDataName('js-size', current);\n sizeElement.textContent = size;\n};\n/**\n * @currentFile\n */\n\n\nmodule.exports.getCurrentMode = currentFile => {\n const current = currentFile || DOM.getCurrentFile();\n const mode = DOM.getByDataName('js-mode', current);\n return mode.textContent;\n};\n/**\n * @currentFile\n */\n\n\nmodule.exports.getCurrentOwner = currentFile => {\n const current = currentFile || DOM.getCurrentFile();\n const owner = DOM.getByDataName('js-owner', current);\n return owner.textContent;\n};\n/**\n * unified way to get current file content\n *\n * @param currentFile\n */\n\n\nmodule.exports.getCurrentData = async currentFile => {\n const {\n Dialog\n } = DOM;\n const Info = DOM.CurrentInfo;\n const current = currentFile || DOM.getCurrentFile();\n const path = DOM.getCurrentPath(current);\n const isDir = DOM.isCurrentIsDir(current);\n\n if (Info.name === '..') {\n Dialog.alert.noFiles();\n return [Error('No Files')];\n }\n\n if (isDir) return await RESTful.read(path);\n const [hashNew, hash] = await DOM.checkStorageHash(path);\n if (!hashNew) return [Error(`Can't get hash of a file`)];\n if (hash === hashNew) return [null, await Storage.get(`${path}-data`)];\n const [e, data] = await RESTful.read(path);\n if (e) return [e, null];\n const ONE_MEGABYTE = 1024 * 1024 * 1024;\n const {\n length\n } = data;\n if (hash && length < ONE_MEGABYTE) await DOM.saveDataToStorage(path, data, hashNew);\n return [null, data];\n};\n/**\n * unified way to get RefreshButton\n */\n\n\nmodule.exports.getRefreshButton = (panel = DOM.getPanel()) => {\n return DOM.getByDataName('js-refresh', panel);\n};\n/**\n * select current file\n * @param currentFile\n */\n\n\nmodule.exports.selectFile = currentFile => {\n const current = currentFile || DOM.getCurrentFile();\n current.classList.add(SELECTED_FILE);\n return Cmd;\n};\n\nmodule.exports.unselectFile = currentFile => {\n const current = currentFile || DOM.getCurrentFile();\n current.classList.remove(SELECTED_FILE);\n return Cmd;\n};\n\nmodule.exports.toggleSelectedFile = currentFile => {\n const current = currentFile || DOM.getCurrentFile();\n const name = DOM.getCurrentName(current);\n if (name === '..') return Cmd;\n current.classList.toggle(SELECTED_FILE);\n return Cmd;\n};\n\nmodule.exports.toggleAllSelectedFiles = () => {\n DOM.getAllFiles().map(DOM.toggleSelectedFile);\n return Cmd;\n};\n\nmodule.exports.selectAllFiles = () => {\n DOM.getAllFiles().map(DOM.selectFile);\n return Cmd;\n};\n\nmodule.exports.getAllFiles = () => {\n const panel = DOM.getPanel();\n const files = DOM.getFiles(panel);\n const name = DOM.getCurrentName(files[0]);\n\n const from = a => a === '..' ? 1 : 0;\n\n const i = from(name);\n return Array.from(files).slice(i);\n};\n/**\n * open dialog with expand selection\n */\n\n\nmodule.exports.expandSelection = () => {\n const msg = 'expand';\n const {\n files\n } = CurrentInfo;\n selectByPattern(msg, files);\n};\n/**\n * open dialog with shrink selection\n */\n\n\nmodule.exports.shrinkSelection = () => {\n const msg = 'shrink';\n const {\n files\n } = CurrentInfo;\n selectByPattern(msg, files);\n};\n/**\n * setting history wrapper\n */\n\n\nmodule.exports.setHistory = (data, title, url) => {\n const ret = window.history;\n const {\n prefix\n } = CloudCmd;\n url = prefix + url;\n if (ret) history.pushState(data, title, url);\n return ret;\n};\n/**\n * selected file check\n *\n * @param currentFile\n */\n\n\nmodule.exports.isSelected = selected => {\n if (!selected) return false;\n return DOM.isContainClass(selected, SELECTED_FILE);\n};\n/**\n * get link from current (or param) file\n *\n * @param currentFile - current file by default\n */\n\n\nmodule.exports.getCurrentLink = currentFile => {\n const current = currentFile || DOM.getCurrentFile();\n const link = DOM.getByTag('a', current);\n return link[0];\n};\n\nmodule.exports.getFilenames = files => {\n if (!files) throw Error('AllFiles could not be empty');\n const first = files[0] || DOM.getCurrentFile();\n const name = DOM.getCurrentName(first);\n const allFiles = Array.from(files);\n if (name === '..') allFiles.shift();\n const names = allFiles.map(current => {\n return DOM.getCurrentName(current);\n });\n return names;\n};\n/**\n * check storage hash\n */\n\n\nmodule.exports.checkStorageHash = async name => {\n const nameHash = name + '-hash';\n if (typeof name !== 'string') throw Error('name should be a string!');\n const [loadHash, storeHash] = await Promise.all([DOM.loadCurrentHash(), Storage.get(nameHash)]);\n return [loadHash, storeHash];\n};\n/**\n * save data to storage\n *\n * @param name\n * @param data\n * @param hash\n * @param callback\n */\n\n\nmodule.exports.saveDataToStorage = async (name, data, hash) => {\n const isDir = DOM.isCurrentIsDir();\n if (isDir) return;\n hash = hash || (await DOM.loadCurrentHash());\n const nameHash = name + '-hash';\n const nameData = name + '-data';\n await Storage.set(nameHash, hash);\n await Storage.set(nameData, data);\n return hash;\n};\n\nmodule.exports.getFM = () => {\n return DOM.getPanel().parentElement;\n};\n\nmodule.exports.getPanelPosition = panel => {\n panel = panel || DOM.getPanel();\n return panel.dataset.name.replace('js-', '');\n};\n/** function getting panel active, or passive\n * @param options = {active: true}\n */\n\n\nmodule.exports.getPanel = options => {\n let files;\n let panel;\n let isLeft;\n let dataName = 'js-';\n const current = DOM.getCurrentFile();\n\n if (!current) {\n panel = DOM.getByDataName('js-left');\n } else {\n files = current.parentElement;\n panel = files.parentElement;\n isLeft = panel.getAttribute('data-name') === 'js-left';\n }\n /* if {active : false} getting passive panel */\n\n\n if (options && !options.active) {\n dataName += isLeft ? 'right' : 'left';\n panel = DOM.getByDataName(dataName);\n }\n /* if two panels showed\n * then always work with passive\n * panel\n */\n\n\n if (window.innerWidth < CloudCmd.MIN_ONE_PANEL_WIDTH) panel = DOM.getByDataName('js-left');\n if (!panel) throw Error('can not find Active Panel!');\n return panel;\n};\n\nmodule.exports.getFiles = element => {\n const files = DOM.getByDataName('js-files', element);\n return files.children || [];\n};\n/**\n * shows panel right or left (or active)\n */\n\n\nmodule.exports.showPanel = active => {\n const panel = DOM.getPanel({\n active\n });\n if (!panel) return false;\n DOM.show(panel);\n return true;\n};\n/**\n * hides panel right or left (or active)\n */\n\n\nmodule.exports.hidePanel = active => {\n const panel = DOM.getPanel({\n active\n });\n if (!panel) return false;\n return DOM.hide(panel);\n};\n/**\n * remove child of element\n * @param pChild\n * @param element\n */\n\n\nmodule.exports.remove = (child, element) => {\n const parent = element || document.body;\n parent.removeChild(child);\n return DOM;\n};\n/**\n * remove current file from file table\n * @param current\n *\n */\n\n\nmodule.exports.deleteCurrent = current => {\n if (!current) DOM.getCurrentFile();\n const parent = current === null || current === void 0 ? void 0 : current.parentElement;\n const name = DOM.getCurrentName(current);\n\n if (current && name !== '..') {\n const next = current.nextSibling;\n const prev = current.previousSibling;\n DOM.setCurrentFile(next || prev);\n parent.removeChild(current);\n }\n};\n/**\n * remove selected files from file table\n * @Selected\n */\n\n\nmodule.exports.deleteSelected = selected => {\n selected = selected || DOM.getSelectedFiles();\n if (!selected) return;\n selected.map(DOM.deleteCurrent);\n};\n/**\n * rename current file\n *\n * @currentFile\n */\n\n\nmodule.exports.renameCurrent = renameCurrent;\n/**\n * unified way to scrollIntoViewIfNeeded\n * (native suporte by webkit only)\n * @param element\n * @param center - to scroll as small as possible param should be false\n */\n\nmodule.exports.scrollIntoViewIfNeeded = (element, center = false) => {\n if (!element || !element.scrollIntoViewIfNeeded) return;\n element.scrollIntoViewIfNeeded(center);\n};\n/* scroll on one page */\n\n\nmodule.exports.scrollByPages = (element, pPages) => {\n const ret = (element === null || element === void 0 ? void 0 : element.scrollByPages) && pPages;\n if (ret) element.scrollByPages(pPages);\n return ret;\n};\n\nmodule.exports.changePanel = () => {\n const Info = CurrentInfo;\n let panel = DOM.getPanel();\n CloudCmd.emit('passive-dir', Info.dirPath);\n const panelPassive = DOM.getPanel({\n active: false\n });\n let name = DOM.getCurrentName();\n const filesPassive = DOM.getFiles(panelPassive);\n let dataName = panel.getAttribute('data-name');\n TabPanel[dataName] = name;\n panel = panelPassive;\n dataName = panel.getAttribute('data-name');\n name = TabPanel[dataName];\n let files;\n let current;\n\n if (name) {\n current = DOM.getCurrentByName(name, panel);\n if (current) files = current.parentElement;\n }\n\n if (!files || !files.parentElement) {\n current = DOM.getCurrentByName(name, panel);\n if (!current) [current] = filesPassive;\n }\n\n DOM.setCurrentFile(current, {\n history: true\n });\n CloudCmd.emit('active-dir', Info.dirPath);\n return DOM;\n};\n\nmodule.exports.getPackerExt = type => {\n if (type === 'zip') return '.zip';\n return '.tar.gz';\n};\n\nmodule.exports.goToDirectory = async () => {\n const msg = 'Go to directory:';\n const {\n Dialog\n } = DOM;\n const {\n dirPath\n } = CurrentInfo;\n const [cancel, path = dirPath] = await Dialog.prompt(msg, dirPath);\n if (cancel) return;\n await CloudCmd.loadDir({\n path\n });\n};\n\nmodule.exports.duplicatePanel = async () => {\n const Info = CurrentInfo;\n const {\n isDir\n } = Info;\n const panel = Info.panelPassive;\n const noCurrent = !Info.isOnePanel;\n\n const getPath = isDir => {\n if (isDir) return Info.path;\n return Info.dirPath;\n };\n\n const path = getPath(isDir);\n await CloudCmd.loadDir({\n path,\n panel,\n noCurrent\n });\n};\n\nmodule.exports.swapPanels = async () => {\n const Info = CurrentInfo;\n const {\n panel,\n files,\n element,\n panelPassive\n } = Info;\n const path = DOM.getCurrentDirPath();\n const dirPathPassive = DOM.getNotCurrentDirPath();\n let currentIndex = files.indexOf(element);\n await CloudCmd.loadDir({\n path,\n panel: panelPassive,\n noCurrent: true\n });\n await CloudCmd.loadDir({\n path: dirPathPassive,\n panel\n });\n const length = Info.files.length - 1;\n if (currentIndex > length) currentIndex = length;\n const el = Info.files[currentIndex];\n DOM.setCurrentFile(el);\n};\n\nmodule.exports.CurrentInfo = CurrentInfo;\n\nmodule.exports.updateCurrentInfo = currentFile => {\n const info = DOM.CurrentInfo;\n const current = currentFile || DOM.getCurrentFile();\n const files = current.parentElement;\n const panel = files.parentElement || DOM.getPanel();\n const panelPassive = DOM.getPanel({\n active: false\n });\n const filesPassive = DOM.getFiles(panelPassive);\n const name = DOM.getCurrentName(current);\n info.dir = DOM.getCurrentDirName();\n info.dirPath = DOM.getCurrentDirPath();\n info.parentDirPath = DOM.getParentDirPath();\n info.element = current;\n info.ext = Util.getExt(name);\n info.files = Array.from(files.children);\n info.filesPassive = Array.from(filesPassive);\n info.first = files.firstChild;\n info.getData = DOM.getCurrentData;\n info.last = files.lastChild;\n info.link = DOM.getCurrentLink(current);\n info.mode = DOM.getCurrentMode(current);\n info.name = name;\n info.path = DOM.getCurrentPath(current);\n info.panel = panel;\n info.panelPassive = panelPassive;\n info.size = DOM.getCurrentSize(current);\n info.isDir = DOM.isCurrentIsDir();\n info.isSelected = DOM.isSelected(current);\n info.panelPosition = DOM.getPanel().dataset.name.replace('js-', '');\n info.isOnePanel = info.panel.getAttribute('data-name') === info.panelPassive.getAttribute('data-name');\n};\n\n//# sourceURL=file://cloudcmd/client/dom/index.js");
|
|
119
|
+
eval("\n/* global CloudCmd */\n\nconst Util = __webpack_require__(/*! ../../common/util */ \"./common/util.js\");\n\nconst Images = __webpack_require__(/*! ./images */ \"./client/dom/images.js\");\n\nconst load = __webpack_require__(/*! ./load */ \"./client/dom/load.js\");\n\nconst Files = __webpack_require__(/*! ./files */ \"./client/dom/files.js\");\n\nconst RESTful = __webpack_require__(/*! ./rest */ \"./client/dom/rest.js\");\n\nconst IO = __webpack_require__(/*! ./io */ \"./client/dom/io/index.js\");\n\nconst Storage = __webpack_require__(/*! ./storage */ \"./client/dom/storage.js\");\n\nconst Dialog = __webpack_require__(/*! ./dialog */ \"./client/dom/dialog.js\");\n\nconst renameCurrent = __webpack_require__(/*! ./operations/rename-current */ \"./client/dom/operations/rename-current.js\");\n\nconst CurrentFile = __webpack_require__(/*! ./current-file */ \"./client/dom/current-file.js\");\n\nconst DOMTree = __webpack_require__(/*! ./dom-tree */ \"./client/dom/dom-tree.js\");\n\nconst Cmd = module.exports;\nconst DOM = { ...DOMTree,\n ...CurrentFile,\n ...Cmd\n};\nconst CurrentInfo = {};\nDOM.Images = Images;\nDOM.load = load;\nDOM.Files = Files;\nDOM.RESTful = RESTful;\nDOM.IO = IO;\nDOM.Storage = Storage;\nDOM.Dialog = Dialog;\nDOM.CurrentInfo = CurrentInfo;\nmodule.exports = DOM;\nDOM.uploadDirectory = __webpack_require__(/*! ./directory */ \"./client/dom/directory.js\");\nDOM.Buffer = __webpack_require__(/*! ./buffer */ \"./client/dom/buffer.js\");\nDOM.Events = __webpack_require__(/*! ./events */ \"./client/dom/events/index.js\");\n\nconst loadRemote = __webpack_require__(/*! ./load-remote */ \"./client/dom/load-remote.js\");\n\nconst selectByPattern = __webpack_require__(/*! ./select-by-pattern */ \"./client/dom/select-by-pattern.js\");\n\nconst SELECTED_FILE = 'selected-file';\nconst TabPanel = {\n 'js-left': null,\n 'js-right': null\n};\n\nmodule.exports.loadRemote = (name, options, callback) => {\n loadRemote(name, options, callback);\n return DOM;\n};\n\nmodule.exports.loadSocket = callback => {\n DOM.loadRemote('socket', {\n name: 'io'\n }, callback);\n return DOM;\n};\n/**\n * create new folder\n *\n */\n\n\nmodule.exports.promptNewDir = async function () {\n await promptNew('directory');\n};\n/**\n * create new file\n *\n * @typeName\n * @type\n */\n\n\nmodule.exports.promptNewFile = async () => {\n await promptNew('file');\n};\n\nasync function promptNew(typeName) {\n const {\n Dialog\n } = DOM;\n const dir = DOM.getCurrentDirPath();\n const msg = 'New ' + typeName || false;\n\n const getName = () => {\n const name = DOM.getCurrentName();\n if (name === '..') return '';\n return name;\n };\n\n const name = getName();\n const [cancel, currentName] = await Dialog.prompt(msg, name);\n if (cancel) return;\n const path = `${dir}${currentName}`;\n if (typeName === 'directory') await RESTful.createDirectory(path);else await RESTful.write(path);\n await CloudCmd.refresh({\n currentName\n });\n}\n/**\n * get current direcotory name\n */\n\n\nmodule.exports.getCurrentDirName = () => {\n const href = DOM.getCurrentDirPath().replace(/\\/$/, '');\n const substr = href.substr(href, href.lastIndexOf('/'));\n const ret = href.replace(substr + '/', '') || '/';\n return ret;\n};\n/**\n * get current direcotory path\n */\n\n\nmodule.exports.getParentDirPath = panel => {\n const path = DOM.getCurrentDirPath(panel);\n const dirName = DOM.getCurrentDirName() + '/';\n const index = path.lastIndexOf(dirName);\n if (path !== '/') return path.slice(0, index);\n return path;\n};\n/**\n * get not current direcotory path\n */\n\n\nmodule.exports.getNotCurrentDirPath = () => {\n const panel = DOM.getPanel({\n active: false\n });\n const path = DOM.getCurrentDirPath(panel);\n return path;\n};\n/**\n * get current file by name\n */\n\n\nmodule.exports.getCurrentByName = function (name) {\n let panel = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : CurrentInfo.panel;\n const dataName = 'js-file-' + btoa(encodeURI(name));\n const element = DOM.getByDataName(dataName, panel);\n return element;\n};\n/**\n * unified way to get selected files\n *\n * @currentFile\n */\n\n\nmodule.exports.getSelectedFiles = () => {\n const panel = DOM.getPanel();\n const selected = DOM.getByClassAll(SELECTED_FILE, panel);\n return Array.from(selected);\n};\n/*\n * unselect all files\n */\n\n\nmodule.exports.unselectFiles = files => {\n files = files || DOM.getSelectedFiles();\n Array.from(files).forEach(DOM.toggleSelectedFile);\n};\n/**\n * get all selected files or current when none selected\n *\n * @currentFile\n */\n\n\nmodule.exports.getActiveFiles = () => {\n const current = DOM.getCurrentFile();\n const files = DOM.getSelectedFiles();\n const name = DOM.getCurrentName(current);\n if (!files.length && name !== '..') return [current];\n return files;\n};\n\nmodule.exports.getCurrentDate = currentFile => {\n const current = currentFile || DOM.getCurrentFile();\n const date = DOM.getByDataName('js-date', current).textContent;\n return date;\n};\n/**\n * get size\n * @currentFile\n */\n\n\nmodule.exports.getCurrentSize = currentFile => {\n const current = currentFile || DOM.getCurrentFile();\n /* если это папка - возвращаем слово dir вместо размера*/\n\n const size = DOM.getByDataName('js-size', current).textContent.replace(/^<|>$/g, '');\n return size;\n};\n/**\n * get size\n * @currentFile\n */\n\n\nmodule.exports.loadCurrentSize = async currentFile => {\n const current = currentFile || DOM.getCurrentFile();\n const query = '?size';\n const link = DOM.getCurrentPath(current);\n Images.show.load();\n if (name === '..') return;\n const [, size] = await RESTful.read(link + query);\n DOM.setCurrentSize(size, current);\n Images.hide();\n return current;\n};\n/**\n * load hash\n * @callback\n * @currentFile\n */\n\n\nmodule.exports.loadCurrentHash = async currentFile => {\n const current = currentFile || DOM.getCurrentFile();\n const query = '?hash';\n const link = DOM.getCurrentPath(current);\n const [, data] = await RESTful.read(link + query);\n return data;\n};\n/**\n * set size\n * @currentFile\n */\n\n\nmodule.exports.setCurrentSize = (size, currentFile) => {\n const current = currentFile || DOM.getCurrentFile();\n const sizeElement = DOM.getByDataName('js-size', current);\n sizeElement.textContent = size;\n};\n/**\n * @currentFile\n */\n\n\nmodule.exports.getCurrentMode = currentFile => {\n const current = currentFile || DOM.getCurrentFile();\n const mode = DOM.getByDataName('js-mode', current);\n return mode.textContent;\n};\n/**\n * @currentFile\n */\n\n\nmodule.exports.getCurrentOwner = currentFile => {\n const current = currentFile || DOM.getCurrentFile();\n const owner = DOM.getByDataName('js-owner', current);\n return owner.textContent;\n};\n/**\n * unified way to get current file content\n *\n * @param currentFile\n */\n\n\nmodule.exports.getCurrentData = async currentFile => {\n const {\n Dialog\n } = DOM;\n const Info = DOM.CurrentInfo;\n const current = currentFile || DOM.getCurrentFile();\n const path = DOM.getCurrentPath(current);\n const isDir = DOM.isCurrentIsDir(current);\n\n if (Info.name === '..') {\n Dialog.alert.noFiles();\n return [Error('No Files')];\n }\n\n if (isDir) return await RESTful.read(path);\n const [hashNew, hash] = await DOM.checkStorageHash(path);\n if (!hashNew) return [Error(`Can't get hash of a file`)];\n if (hash === hashNew) return [null, await Storage.get(`${path}-data`)];\n const [e, data] = await RESTful.read(path);\n if (e) return [e, null];\n const ONE_MEGABYTE = 1024 * 1024 * 1024;\n const {\n length\n } = data;\n if (hash && length < ONE_MEGABYTE) await DOM.saveDataToStorage(path, data, hashNew);\n return [null, data];\n};\n/**\n * unified way to get RefreshButton\n */\n\n\nmodule.exports.getRefreshButton = function () {\n let panel = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : DOM.getPanel();\n return DOM.getByDataName('js-refresh', panel);\n};\n/**\n * select current file\n * @param currentFile\n */\n\n\nmodule.exports.selectFile = currentFile => {\n const current = currentFile || DOM.getCurrentFile();\n current.classList.add(SELECTED_FILE);\n return Cmd;\n};\n\nmodule.exports.unselectFile = currentFile => {\n const current = currentFile || DOM.getCurrentFile();\n current.classList.remove(SELECTED_FILE);\n return Cmd;\n};\n\nmodule.exports.toggleSelectedFile = currentFile => {\n const current = currentFile || DOM.getCurrentFile();\n const name = DOM.getCurrentName(current);\n if (name === '..') return Cmd;\n current.classList.toggle(SELECTED_FILE);\n return Cmd;\n};\n\nmodule.exports.toggleAllSelectedFiles = () => {\n DOM.getAllFiles().map(DOM.toggleSelectedFile);\n return Cmd;\n};\n\nmodule.exports.selectAllFiles = () => {\n DOM.getAllFiles().map(DOM.selectFile);\n return Cmd;\n};\n\nmodule.exports.getAllFiles = () => {\n const panel = DOM.getPanel();\n const files = DOM.getFiles(panel);\n const name = DOM.getCurrentName(files[0]);\n\n const from = a => a === '..' ? 1 : 0;\n\n const i = from(name);\n return Array.from(files).slice(i);\n};\n/**\n * open dialog with expand selection\n */\n\n\nmodule.exports.expandSelection = () => {\n const msg = 'expand';\n const {\n files\n } = CurrentInfo;\n selectByPattern(msg, files);\n};\n/**\n * open dialog with shrink selection\n */\n\n\nmodule.exports.shrinkSelection = () => {\n const msg = 'shrink';\n const {\n files\n } = CurrentInfo;\n selectByPattern(msg, files);\n};\n/**\n * setting history wrapper\n */\n\n\nmodule.exports.setHistory = (data, title, url) => {\n const ret = window.history;\n const {\n prefix\n } = CloudCmd;\n url = prefix + url;\n if (ret) history.pushState(data, title, url);\n return ret;\n};\n/**\n * selected file check\n *\n * @param currentFile\n */\n\n\nmodule.exports.isSelected = selected => {\n if (!selected) return false;\n return DOM.isContainClass(selected, SELECTED_FILE);\n};\n/**\n * get link from current (or param) file\n *\n * @param currentFile - current file by default\n */\n\n\nmodule.exports.getCurrentLink = currentFile => {\n const current = currentFile || DOM.getCurrentFile();\n const link = DOM.getByTag('a', current);\n return link[0];\n};\n\nmodule.exports.getFilenames = files => {\n if (!files) throw Error('AllFiles could not be empty');\n const first = files[0] || DOM.getCurrentFile();\n const name = DOM.getCurrentName(first);\n const allFiles = Array.from(files);\n if (name === '..') allFiles.shift();\n const names = allFiles.map(current => {\n return DOM.getCurrentName(current);\n });\n return names;\n};\n/**\n * check storage hash\n */\n\n\nmodule.exports.checkStorageHash = async name => {\n const nameHash = name + '-hash';\n if (typeof name !== 'string') throw Error('name should be a string!');\n const [loadHash, storeHash] = await Promise.all([DOM.loadCurrentHash(), Storage.get(nameHash)]);\n return [loadHash, storeHash];\n};\n/**\n * save data to storage\n *\n * @param name\n * @param data\n * @param hash\n * @param callback\n */\n\n\nmodule.exports.saveDataToStorage = async (name, data, hash) => {\n const isDir = DOM.isCurrentIsDir();\n if (isDir) return;\n hash = hash || (await DOM.loadCurrentHash());\n const nameHash = name + '-hash';\n const nameData = name + '-data';\n await Storage.set(nameHash, hash);\n await Storage.set(nameData, data);\n return hash;\n};\n\nmodule.exports.getFM = () => DOM.getPanel().parentElement;\n\nmodule.exports.getPanelPosition = panel => {\n panel = panel || DOM.getPanel();\n return panel.dataset.name.replace('js-', '');\n};\n/** function getting panel active, or passive\n * @param options = {active: true}\n */\n\n\nmodule.exports.getPanel = options => {\n let files;\n let panel;\n let isLeft;\n let dataName = 'js-';\n const current = DOM.getCurrentFile();\n\n if (!current) {\n panel = DOM.getByDataName('js-left');\n } else {\n files = current.parentElement;\n panel = files.parentElement;\n isLeft = panel.getAttribute('data-name') === 'js-left';\n }\n /* if {active : false} getting passive panel */\n\n\n if (options && !options.active) {\n dataName += isLeft ? 'right' : 'left';\n panel = DOM.getByDataName(dataName);\n }\n /* if two panels showed\n * then always work with passive\n * panel\n */\n\n\n if (window.innerWidth < CloudCmd.MIN_ONE_PANEL_WIDTH) panel = DOM.getByDataName('js-left');\n if (!panel) throw Error('can not find Active Panel!');\n return panel;\n};\n\nmodule.exports.getFiles = element => {\n const files = DOM.getByDataName('js-files', element);\n return files.children || [];\n};\n/**\n * shows panel right or left (or active)\n */\n\n\nmodule.exports.showPanel = active => {\n const panel = DOM.getPanel({\n active\n });\n if (!panel) return false;\n DOM.show(panel);\n return true;\n};\n/**\n * hides panel right or left (or active)\n */\n\n\nmodule.exports.hidePanel = active => {\n const panel = DOM.getPanel({\n active\n });\n if (!panel) return false;\n return DOM.hide(panel);\n};\n/**\n * remove child of element\n * @param pChild\n * @param element\n */\n\n\nmodule.exports.remove = (child, element) => {\n const parent = element || document.body;\n parent.removeChild(child);\n return DOM;\n};\n/**\n * remove current file from file table\n * @param current\n *\n */\n\n\nmodule.exports.deleteCurrent = current => {\n if (!current) DOM.getCurrentFile();\n const parent = current === null || current === void 0 ? void 0 : current.parentElement;\n const name = DOM.getCurrentName(current);\n\n if (current && name !== '..') {\n const next = current.nextSibling;\n const prev = current.previousSibling;\n DOM.setCurrentFile(next || prev);\n parent.removeChild(current);\n }\n};\n/**\n * remove selected files from file table\n * @Selected\n */\n\n\nmodule.exports.deleteSelected = selected => {\n selected = selected || DOM.getSelectedFiles();\n if (!selected) return;\n selected.map(DOM.deleteCurrent);\n};\n/**\n * rename current file\n *\n * @currentFile\n */\n\n\nmodule.exports.renameCurrent = renameCurrent;\n/**\n * unified way to scrollIntoViewIfNeeded\n * (native suporte by webkit only)\n * @param element\n * @param center - to scroll as small as possible param should be false\n */\n\nmodule.exports.scrollIntoViewIfNeeded = function (element) {\n let center = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n if (!element || !element.scrollIntoViewIfNeeded) return;\n element.scrollIntoViewIfNeeded(center);\n};\n/* scroll on one page */\n\n\nmodule.exports.scrollByPages = (element, pPages) => {\n const ret = (element === null || element === void 0 ? void 0 : element.scrollByPages) && pPages;\n if (ret) element.scrollByPages(pPages);\n return ret;\n};\n\nmodule.exports.changePanel = () => {\n const Info = CurrentInfo;\n let panel = DOM.getPanel();\n CloudCmd.emit('passive-dir', Info.dirPath);\n const panelPassive = DOM.getPanel({\n active: false\n });\n let name = DOM.getCurrentName();\n const filesPassive = DOM.getFiles(panelPassive);\n let dataName = panel.getAttribute('data-name');\n TabPanel[dataName] = name;\n panel = panelPassive;\n dataName = panel.getAttribute('data-name');\n name = TabPanel[dataName];\n let files;\n let current;\n\n if (name) {\n current = DOM.getCurrentByName(name, panel);\n if (current) files = current.parentElement;\n }\n\n if (!files || !files.parentElement) {\n current = DOM.getCurrentByName(name, panel);\n if (!current) [current] = filesPassive;\n }\n\n DOM.setCurrentFile(current, {\n history: true\n });\n CloudCmd.emit('active-dir', Info.dirPath);\n return DOM;\n};\n\nmodule.exports.getPackerExt = type => {\n if (type === 'zip') return '.zip';\n return '.tar.gz';\n};\n\nmodule.exports.goToDirectory = async () => {\n const msg = 'Go to directory:';\n const {\n Dialog\n } = DOM;\n const {\n dirPath\n } = CurrentInfo;\n const [cancel, path = dirPath] = await Dialog.prompt(msg, dirPath);\n if (cancel) return;\n await CloudCmd.loadDir({\n path\n });\n};\n\nmodule.exports.duplicatePanel = async () => {\n const Info = CurrentInfo;\n const {\n isDir\n } = Info;\n const panel = Info.panelPassive;\n const noCurrent = !Info.isOnePanel;\n\n const getPath = isDir => {\n if (isDir) return Info.path;\n return Info.dirPath;\n };\n\n const path = getPath(isDir);\n await CloudCmd.loadDir({\n path,\n panel,\n noCurrent\n });\n};\n\nmodule.exports.swapPanels = async () => {\n const Info = CurrentInfo;\n const {\n panel,\n files,\n element,\n panelPassive\n } = Info;\n const path = DOM.getCurrentDirPath();\n const dirPathPassive = DOM.getNotCurrentDirPath();\n let currentIndex = files.indexOf(element);\n await CloudCmd.loadDir({\n path,\n panel: panelPassive,\n noCurrent: true\n });\n await CloudCmd.loadDir({\n path: dirPathPassive,\n panel\n });\n const length = Info.files.length - 1;\n if (currentIndex > length) currentIndex = length;\n const el = Info.files[currentIndex];\n DOM.setCurrentFile(el);\n};\n\nmodule.exports.CurrentInfo = CurrentInfo;\n\nmodule.exports.updateCurrentInfo = currentFile => {\n const info = DOM.CurrentInfo;\n const current = currentFile || DOM.getCurrentFile();\n const files = current.parentElement;\n const panel = files.parentElement || DOM.getPanel();\n const panelPassive = DOM.getPanel({\n active: false\n });\n const filesPassive = DOM.getFiles(panelPassive);\n const name = DOM.getCurrentName(current);\n info.dir = DOM.getCurrentDirName();\n info.dirPath = DOM.getCurrentDirPath();\n info.parentDirPath = DOM.getParentDirPath();\n info.element = current;\n info.ext = Util.getExt(name);\n info.files = Array.from(files.children);\n info.filesPassive = Array.from(filesPassive);\n info.first = files.firstChild;\n info.getData = DOM.getCurrentData;\n info.last = files.lastChild;\n info.link = DOM.getCurrentLink(current);\n info.mode = DOM.getCurrentMode(current);\n info.name = name;\n info.path = DOM.getCurrentPath(current);\n info.panel = panel;\n info.panelPassive = panelPassive;\n info.size = DOM.getCurrentSize(current);\n info.isDir = DOM.isCurrentIsDir();\n info.isSelected = DOM.isSelected(current);\n info.panelPosition = DOM.getPanel().dataset.name.replace('js-', '');\n info.isOnePanel = info.panel.getAttribute('data-name') === info.panelPassive.getAttribute('data-name');\n};\n\n//# sourceURL=file://cloudcmd/client/dom/index.js");
|
|
120
120
|
|
|
121
121
|
/***/ }),
|
|
122
122
|
|
|
@@ -128,7 +128,7 @@ eval("\n/* global CloudCmd */\n\nconst Util = __webpack_require__(/*! ../../comm
|
|
|
128
128
|
/***/ (function(module, exports, __webpack_require__) {
|
|
129
129
|
|
|
130
130
|
"use strict";
|
|
131
|
-
eval("\n\nconst {\n FS\n} = __webpack_require__(/*! ../../../common/cloudfunc */ \"./common/cloudfunc.js\");\n\nconst sendRequest = __webpack_require__(/*! ./send-request */ \"./client/dom/io/send-request.js\");\n\nconst imgPosition = {\n top: true\n};\n\nmodule.exports.delete = async (url, data) => {\n return await sendRequest({\n method: 'DELETE',\n url: FS + url,\n data,\n imgPosition: {\n top: Boolean(data)\n }\n });\n};\n\nmodule.exports.patch = async (url, data) => {\n return await sendRequest({\n method: 'PATCH',\n url: FS + url,\n data,\n imgPosition\n });\n};\n\nmodule.exports.write = async (url, data) => {\n return await sendRequest({\n method: 'PUT',\n url: FS + url,\n data,\n imgPosition\n });\n};\n\nmodule.exports.createDirectory = async url => {\n return await sendRequest({\n method: 'PUT',\n url: `${FS}${url}?dir`,\n imgPosition\n });\n};\n\nmodule.exports.read = async (url
|
|
131
|
+
eval("\n\nconst {\n FS\n} = __webpack_require__(/*! ../../../common/cloudfunc */ \"./common/cloudfunc.js\");\n\nconst sendRequest = __webpack_require__(/*! ./send-request */ \"./client/dom/io/send-request.js\");\n\nconst imgPosition = {\n top: true\n};\n\nmodule.exports.delete = async (url, data) => {\n return await sendRequest({\n method: 'DELETE',\n url: FS + url,\n data,\n imgPosition: {\n top: Boolean(data)\n }\n });\n};\n\nmodule.exports.patch = async (url, data) => {\n return await sendRequest({\n method: 'PATCH',\n url: FS + url,\n data,\n imgPosition\n });\n};\n\nmodule.exports.write = async (url, data) => {\n return await sendRequest({\n method: 'PUT',\n url: FS + url,\n data,\n imgPosition\n });\n};\n\nmodule.exports.createDirectory = async url => {\n return await sendRequest({\n method: 'PUT',\n url: `${FS}${url}?dir`,\n imgPosition\n });\n};\n\nmodule.exports.read = async function (url) {\n let dataType = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'text';\n const notLog = !url.includes('?');\n return await sendRequest({\n method: 'GET',\n url: FS + url,\n notLog,\n dataType\n });\n};\n\nmodule.exports.copy = async (from, to, names) => {\n return await sendRequest({\n method: 'PUT',\n url: '/copy',\n data: {\n from,\n to,\n names\n },\n imgPosition\n });\n};\n\nmodule.exports.pack = async data => {\n return await sendRequest({\n method: 'PUT',\n url: '/pack',\n data\n });\n};\n\nmodule.exports.extract = async data => {\n return await sendRequest({\n method: 'PUT',\n url: '/extract',\n data\n });\n};\n\nmodule.exports.move = async (from, to, names) => {\n return await sendRequest({\n method: 'PUT',\n url: '/move',\n data: {\n from,\n to,\n names\n },\n imgPosition\n });\n};\n\nmodule.exports.rename = async (from, to) => {\n return await sendRequest({\n method: 'PUT',\n url: '/rename',\n data: {\n from,\n to\n },\n imgPosition\n });\n};\n\nmodule.exports.Config = {\n read: async () => {\n return await sendRequest({\n method: 'GET',\n url: '/config',\n imgPosition,\n notLog: true\n });\n },\n write: async data => {\n return await sendRequest({\n method: 'PATCH',\n url: '/config',\n data,\n imgPosition\n });\n }\n};\nmodule.exports.Markdown = {\n read: async url => {\n return await sendRequest({\n method: 'GET',\n url: '/markdown' + url,\n imgPosition,\n notLog: true\n });\n },\n render: async data => {\n return await sendRequest({\n method: 'PUT',\n url: '/markdown',\n data,\n imgPosition,\n notLog: true\n });\n }\n};\n\n//# sourceURL=file://cloudcmd/client/dom/io/index.js");
|
|
132
132
|
|
|
133
133
|
/***/ }),
|
|
134
134
|
|
|
@@ -152,7 +152,7 @@ eval("\n/* global CloudCmd */\n\nconst {\n promisify\n} = __webpack_require__(/
|
|
|
152
152
|
/***/ (function(module, exports, __webpack_require__) {
|
|
153
153
|
|
|
154
154
|
"use strict";
|
|
155
|
-
eval("\n/* global CloudCmd */\n\nconst rendy = __webpack_require__(/*! rendy */ \"./node_modules/rendy/lib/rendy.js\");\n\nconst itype = __webpack_require__(/*! itype */ \"./node_modules/itype/lib/itype.js\");\n\nconst load = __webpack_require__(/*! load.js */ \"./node_modules/load.js/lib/load.js\");\n\nconst tryToCatch = __webpack_require__(/*! try-to-catch */ \"./node_modules/try-to-catch/lib/try-to-catch.js\");\n\nconst {\n findObjByNameInArr\n} = __webpack_require__(/*! ../../common/util */ \"./common/util.js\");\n\nconst Files = __webpack_require__(/*! ./files */ \"./client/dom/files.js\");\n\nmodule.exports = (name, options
|
|
155
|
+
eval("\n/* global CloudCmd */\n\nconst rendy = __webpack_require__(/*! rendy */ \"./node_modules/rendy/lib/rendy.js\");\n\nconst itype = __webpack_require__(/*! itype */ \"./node_modules/itype/lib/itype.js\");\n\nconst load = __webpack_require__(/*! load.js */ \"./node_modules/load.js/lib/load.js\");\n\nconst tryToCatch = __webpack_require__(/*! try-to-catch */ \"./node_modules/try-to-catch/lib/try-to-catch.js\");\n\nconst {\n findObjByNameInArr\n} = __webpack_require__(/*! ../../common/util */ \"./common/util.js\");\n\nconst Files = __webpack_require__(/*! ./files */ \"./client/dom/files.js\");\n\nmodule.exports = function (name, options) {\n let callback = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : options;\n const {\n prefix,\n config\n } = CloudCmd;\n const o = options;\n if (o.name && window[o.name]) return callback();\n Files.get('modules').then(async modules => {\n const online = config('online') && navigator.onLine;\n const module = findObjByNameInArr(modules.remote, name);\n const isArray = itype.array(module.local);\n const {\n version\n } = module;\n let remoteTmpls;\n let local;\n\n if (isArray) {\n remoteTmpls = module.remote;\n local = module.local;\n } else {\n remoteTmpls = [module.remote];\n local = [module.local];\n }\n\n const localURL = local.map(url => prefix + url);\n const remoteURL = remoteTmpls.map(tmpl => {\n return rendy(tmpl, {\n version\n });\n });\n\n if (online) {\n const [e] = await tryToCatch(load.parallel, remoteURL);\n if (!e) return callback();\n }\n\n const [e] = await tryToCatch(load.parallel, localURL);\n callback(e);\n });\n};\n\n//# sourceURL=file://cloudcmd/client/dom/load-remote.js");
|
|
156
156
|
|
|
157
157
|
/***/ }),
|
|
158
158
|
|
|
@@ -188,7 +188,7 @@ eval("\n/* global CloudCmd */\n\nconst capitalize = __webpack_require__(/*! just
|
|
|
188
188
|
/***/ (function(module, exports, __webpack_require__) {
|
|
189
189
|
|
|
190
190
|
"use strict";
|
|
191
|
-
eval("\n\nconst tryToCatch = __webpack_require__(/*! try-to-catch */ \"./node_modules/try-to-catch/lib/try-to-catch.js\");\n\nconst {\n encode\n} = __webpack_require__(/*! ../../common/entity */ \"./common/entity.js\");\n\nconst Images = __webpack_require__(/*! ./images */ \"./client/dom/images.js\");\n\nconst IO = __webpack_require__(/*! ./io */ \"./client/dom/io/index.js\");\n\nconst Dialog = __webpack_require__(/*! ./dialog */ \"./client/dom/dialog.js\");\n\nconst handleError = promise => async (
|
|
191
|
+
eval("\n\nconst tryToCatch = __webpack_require__(/*! try-to-catch */ \"./node_modules/try-to-catch/lib/try-to-catch.js\");\n\nconst {\n encode\n} = __webpack_require__(/*! ../../common/entity */ \"./common/entity.js\");\n\nconst Images = __webpack_require__(/*! ./images */ \"./client/dom/images.js\");\n\nconst IO = __webpack_require__(/*! ./io */ \"./client/dom/io/index.js\");\n\nconst Dialog = __webpack_require__(/*! ./dialog */ \"./client/dom/dialog.js\");\n\nconst handleError = promise => async function () {\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n const [e, data] = await tryToCatch(promise, ...args);\n if (!e) return [e, data];\n const encoded = encode(e.message);\n Images.show.error(encoded);\n Dialog.alert(encoded);\n return [e, data];\n};\n\nmodule.exports.delete = handleError(IO.delete);\nmodule.exports.patch = handleError(IO.patch);\nmodule.exports.write = handleError(IO.write);\nmodule.exports.createDirectory = handleError(IO.createDirectory);\nmodule.exports.read = handleError(IO.read);\nmodule.exports.copy = handleError(IO.copy);\nmodule.exports.pack = handleError(IO.pack);\nmodule.exports.extract = handleError(IO.extract);\nmodule.exports.move = handleError(IO.move);\nmodule.exports.rename = handleError(IO.rename);\nmodule.exports.Config = {\n read: handleError(IO.Config.read),\n write: handleError(IO.Config.write)\n};\nmodule.exports.Markdown = {\n read: handleError(IO.Markdown.read),\n render: handleError(IO.Markdown.render)\n};\n\n//# sourceURL=file://cloudcmd/client/dom/rest.js");
|
|
192
192
|
|
|
193
193
|
/***/ }),
|
|
194
194
|
|
|
@@ -224,7 +224,7 @@ eval("\n\nconst {\n parse,\n stringify\n} = JSON;\n\nmodule.exports.set = asyn
|
|
|
224
224
|
/***/ (function(module, exports, __webpack_require__) {
|
|
225
225
|
|
|
226
226
|
"use strict";
|
|
227
|
-
eval("\n/* global CloudCmd */\n\nconst {\n eachSeries\n} = __webpack_require__(/*! execon */ \"./node_modules/execon/lib/exec.js\");\n\nconst wraptile = __webpack_require__(/*! wraptile */ \"./node_modules/wraptile/lib/wraptile.js\");\n\nconst load = __webpack_require__(/*! ./load */ \"./client/dom/load.js\");\n\nconst Images = __webpack_require__(/*! ./images */ \"./client/dom/images.js\");\n\nconst {\n alert\n} = __webpack_require__(/*! ./dialog */ \"./client/dom/dialog.js\");\n\nconst {\n FS\n} = __webpack_require__(/*! ../../common/cloudfunc */ \"./common/cloudfunc.js\");\n\nconst onEnd = wraptile(_onEnd);\nconst loadFile = wraptile(_loadFile);\n\nconst {\n getCurrentDirPath: getPathWhenRootEmpty\n} = __webpack_require__(/*! . */ \"./client/dom/index.js\");\n\nmodule.exports = (dir, files) => {\n if (!files) {\n files = dir;\n dir = getPathWhenRootEmpty();\n }\n\n const n = files.length;\n if (!n) return;\n const array = Array.from(files);\n const {\n name\n } = files[0];\n eachSeries(array, loadFile(dir, n), onEnd(name));\n};\n\nfunction _onEnd(currentName) {\n CloudCmd.refresh({\n currentName\n });\n}\n\nfunction _loadFile(dir, n, file, callback) {\n let i = 0;\n const {\n name\n } = file;\n const path = dir + name;\n const {\n prefixURL\n } = CloudCmd;\n const api = prefixURL + FS;\n\n const percent = (i, n
|
|
227
|
+
eval("\n/* global CloudCmd */\n\nconst {\n eachSeries\n} = __webpack_require__(/*! execon */ \"./node_modules/execon/lib/exec.js\");\n\nconst wraptile = __webpack_require__(/*! wraptile */ \"./node_modules/wraptile/lib/wraptile.js\");\n\nconst load = __webpack_require__(/*! ./load */ \"./client/dom/load.js\");\n\nconst Images = __webpack_require__(/*! ./images */ \"./client/dom/images.js\");\n\nconst {\n alert\n} = __webpack_require__(/*! ./dialog */ \"./client/dom/dialog.js\");\n\nconst {\n FS\n} = __webpack_require__(/*! ../../common/cloudfunc */ \"./common/cloudfunc.js\");\n\nconst onEnd = wraptile(_onEnd);\nconst loadFile = wraptile(_loadFile);\n\nconst {\n getCurrentDirPath: getPathWhenRootEmpty\n} = __webpack_require__(/*! . */ \"./client/dom/index.js\");\n\nmodule.exports = (dir, files) => {\n if (!files) {\n files = dir;\n dir = getPathWhenRootEmpty();\n }\n\n const n = files.length;\n if (!n) return;\n const array = Array.from(files);\n const {\n name\n } = files[0];\n eachSeries(array, loadFile(dir, n), onEnd(name));\n};\n\nfunction _onEnd(currentName) {\n CloudCmd.refresh({\n currentName\n });\n}\n\nfunction _loadFile(dir, n, file, callback) {\n let i = 0;\n const {\n name\n } = file;\n const path = dir + name;\n const {\n prefixURL\n } = CloudCmd;\n const api = prefixURL + FS;\n\n const percent = function (i, n) {\n let per = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 100;\n return Math.round(i * per / n);\n };\n\n const step = n => 100 / n;\n\n ++i;\n load.put(api + path, file).on('error', showError).on('end', callback).on('progress', count => {\n const max = step(n);\n const value = (i - 1) * max + percent(count, 100, max);\n Images.show.load('top');\n Images.setProgress(Math.round(value));\n });\n}\n\nfunction showError(_ref) {\n let {\n message\n } = _ref;\n alert(message);\n}\n\n//# sourceURL=file://cloudcmd/client/dom/upload-files.js");
|
|
228
228
|
|
|
229
229
|
/***/ }),
|
|
230
230
|
|
|
@@ -319,7 +319,7 @@ eval("// removed by extract-text-webpack-plugin\n\n//# sourceURL=file://cloudcmd
|
|
|
319
319
|
/***/ (function(module, exports, __webpack_require__) {
|
|
320
320
|
|
|
321
321
|
"use strict";
|
|
322
|
-
eval("/* WEBPACK VAR INJECTION */(function(process) {\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.codeFrameColumns = codeFrameColumns;\nexports.default = _default;\n\nvar _highlight = __webpack_require__(/*! @babel/highlight */ \"./node_modules/@babel/highlight/lib/index.js\");\n\nlet deprecationWarningShown = false;\n\nfunction getDefs(chalk) {\n return {\n gutter: chalk.grey,\n marker: chalk.red.bold,\n message: chalk.red.bold\n };\n}\n\nconst NEWLINE = /\\r\\n|[\\n\\r\\u2028\\u2029]/;\n\nfunction getMarkerLines(loc, source, opts) {\n const startLoc = Object.assign({\n column: 0,\n line: -1\n }, loc.start);\n const endLoc = Object.assign({}, startLoc, loc.end);\n const {\n linesAbove = 2,\n linesBelow = 3\n } = opts || {};\n const startLine = startLoc.line;\n const startColumn = startLoc.column;\n const endLine = endLoc.line;\n const endColumn = endLoc.column;\n let start = Math.max(startLine - (linesAbove + 1), 0);\n let end = Math.min(source.length, endLine + linesBelow);\n\n if (startLine === -1) {\n start = 0;\n }\n\n if (endLine === -1) {\n end = source.length;\n }\n\n const lineDiff = endLine - startLine;\n const markerLines = {};\n\n if (lineDiff) {\n for (let i = 0; i <= lineDiff; i++) {\n const lineNumber = i + startLine;\n\n if (!startColumn) {\n markerLines[lineNumber] = true;\n } else if (i === 0) {\n const sourceLength = source[lineNumber - 1].length;\n markerLines[lineNumber] = [startColumn, sourceLength - startColumn + 1];\n } else if (i === lineDiff) {\n markerLines[lineNumber] = [0, endColumn];\n } else {\n const sourceLength = source[lineNumber - i].length;\n markerLines[lineNumber] = [0, sourceLength];\n }\n }\n } else {\n if (startColumn === endColumn) {\n if (startColumn) {\n markerLines[startLine] = [startColumn, 0];\n } else {\n markerLines[startLine] = true;\n }\n } else {\n markerLines[startLine] = [startColumn, endColumn - startColumn];\n }\n }\n\n return {\n start,\n end,\n markerLines\n };\n}\n\nfunction codeFrameColumns(rawLines, loc, opts = {}) {\n const highlighted = (opts.highlightCode || opts.forceColor) && (0, _highlight.shouldHighlight)(opts);\n const chalk = (0, _highlight.getChalk)(opts);\n const defs = getDefs(chalk);\n\n const maybeHighlight = (chalkFn, string) => {\n return highlighted ? chalkFn(string) : string;\n };\n\n const lines = rawLines.split(NEWLINE);\n const {\n start,\n end,\n markerLines\n } = getMarkerLines(loc, lines, opts);\n const hasColumns = loc.start && typeof loc.start.column === \"number\";\n const numberMaxWidth = String(end).length;\n const highlightedLines = highlighted ? (0, _highlight.default)(rawLines, opts) : rawLines;\n let frame = highlightedLines.split(NEWLINE).slice(start, end).map((line, index) => {\n const number = start + 1 + index;\n const paddedNumber = ` ${number}`.slice(-numberMaxWidth);\n const gutter = ` ${paddedNumber} |`;\n const hasMarker = markerLines[number];\n const lastMarkerLine = !markerLines[number + 1];\n\n if (hasMarker) {\n let markerLine = \"\";\n\n if (Array.isArray(hasMarker)) {\n const markerSpacing = line.slice(0, Math.max(hasMarker[0] - 1, 0)).replace(/[^\\t]/g, \" \");\n const numberOfMarkers = hasMarker[1] || 1;\n markerLine = [\"\\n \", maybeHighlight(defs.gutter, gutter.replace(/\\d/g, \" \")), \" \", markerSpacing, maybeHighlight(defs.marker, \"^\").repeat(numberOfMarkers)].join(\"\");\n\n if (lastMarkerLine && opts.message) {\n markerLine += \" \" + maybeHighlight(defs.message, opts.message);\n }\n }\n\n return [maybeHighlight(defs.marker, \">\"), maybeHighlight(defs.gutter, gutter), line.length > 0 ? ` ${line}` : \"\", markerLine].join(\"\");\n } else {\n return ` ${maybeHighlight(defs.gutter, gutter)}${line.length > 0 ? ` ${line}` : \"\"}`;\n }\n }).join(\"\\n\");\n\n if (opts.message && !hasColumns) {\n frame = `${\" \".repeat(numberMaxWidth + 1)}${opts.message}\\n${frame}`;\n }\n\n if (highlighted) {\n return chalk.reset(frame);\n } else {\n return frame;\n }\n}\n\nfunction _default(rawLines, lineNumber, colNumber, opts = {}) {\n if (!deprecationWarningShown) {\n deprecationWarningShown = true;\n const message = \"Passing lineNumber and colNumber is deprecated to @babel/code-frame. Please use `codeFrameColumns`.\";\n\n if (process.emitWarning) {\n process.emitWarning(message, \"DeprecationWarning\");\n } else {\n const deprecationError = new Error(message);\n deprecationError.name = \"DeprecationWarning\";\n console.warn(new Error(message));\n }\n }\n\n colNumber = Math.max(colNumber, 0);\n const location = {\n start: {\n column: colNumber,\n line: lineNumber\n }\n };\n return codeFrameColumns(rawLines, location, opts);\n}\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../../process/browser.js */ \"./node_modules/process/browser.js\")))\n\n//# sourceURL=file://cloudcmd/node_modules/@babel/code-frame/lib/index.js");
|
|
322
|
+
eval("/* WEBPACK VAR INJECTION */(function(process) {\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.codeFrameColumns = codeFrameColumns;\nexports.default = _default;\n\nvar _highlight = __webpack_require__(/*! @babel/highlight */ \"./node_modules/@babel/highlight/lib/index.js\");\n\nlet deprecationWarningShown = false;\n\nfunction getDefs(chalk) {\n return {\n gutter: chalk.grey,\n marker: chalk.red.bold,\n message: chalk.red.bold\n };\n}\n\nconst NEWLINE = /\\r\\n|[\\n\\r\\u2028\\u2029]/;\n\nfunction getMarkerLines(loc, source, opts) {\n const startLoc = Object.assign({\n column: 0,\n line: -1\n }, loc.start);\n const endLoc = Object.assign({}, startLoc, loc.end);\n const {\n linesAbove = 2,\n linesBelow = 3\n } = opts || {};\n const startLine = startLoc.line;\n const startColumn = startLoc.column;\n const endLine = endLoc.line;\n const endColumn = endLoc.column;\n let start = Math.max(startLine - (linesAbove + 1), 0);\n let end = Math.min(source.length, endLine + linesBelow);\n\n if (startLine === -1) {\n start = 0;\n }\n\n if (endLine === -1) {\n end = source.length;\n }\n\n const lineDiff = endLine - startLine;\n const markerLines = {};\n\n if (lineDiff) {\n for (let i = 0; i <= lineDiff; i++) {\n const lineNumber = i + startLine;\n\n if (!startColumn) {\n markerLines[lineNumber] = true;\n } else if (i === 0) {\n const sourceLength = source[lineNumber - 1].length;\n markerLines[lineNumber] = [startColumn, sourceLength - startColumn + 1];\n } else if (i === lineDiff) {\n markerLines[lineNumber] = [0, endColumn];\n } else {\n const sourceLength = source[lineNumber - i].length;\n markerLines[lineNumber] = [0, sourceLength];\n }\n }\n } else {\n if (startColumn === endColumn) {\n if (startColumn) {\n markerLines[startLine] = [startColumn, 0];\n } else {\n markerLines[startLine] = true;\n }\n } else {\n markerLines[startLine] = [startColumn, endColumn - startColumn];\n }\n }\n\n return {\n start,\n end,\n markerLines\n };\n}\n\nfunction codeFrameColumns(rawLines, loc, opts = {}) {\n const highlighted = (opts.highlightCode || opts.forceColor) && (0, _highlight.shouldHighlight)(opts);\n const chalk = (0, _highlight.getChalk)(opts);\n const defs = getDefs(chalk);\n\n const maybeHighlight = (chalkFn, string) => {\n return highlighted ? chalkFn(string) : string;\n };\n\n const lines = rawLines.split(NEWLINE);\n const {\n start,\n end,\n markerLines\n } = getMarkerLines(loc, lines, opts);\n const hasColumns = loc.start && typeof loc.start.column === \"number\";\n const numberMaxWidth = String(end).length;\n const highlightedLines = highlighted ? (0, _highlight.default)(rawLines, opts) : rawLines;\n let frame = highlightedLines.split(NEWLINE, end).slice(start, end).map((line, index) => {\n const number = start + 1 + index;\n const paddedNumber = ` ${number}`.slice(-numberMaxWidth);\n const gutter = ` ${paddedNumber} |`;\n const hasMarker = markerLines[number];\n const lastMarkerLine = !markerLines[number + 1];\n\n if (hasMarker) {\n let markerLine = \"\";\n\n if (Array.isArray(hasMarker)) {\n const markerSpacing = line.slice(0, Math.max(hasMarker[0] - 1, 0)).replace(/[^\\t]/g, \" \");\n const numberOfMarkers = hasMarker[1] || 1;\n markerLine = [\"\\n \", maybeHighlight(defs.gutter, gutter.replace(/\\d/g, \" \")), \" \", markerSpacing, maybeHighlight(defs.marker, \"^\").repeat(numberOfMarkers)].join(\"\");\n\n if (lastMarkerLine && opts.message) {\n markerLine += \" \" + maybeHighlight(defs.message, opts.message);\n }\n }\n\n return [maybeHighlight(defs.marker, \">\"), maybeHighlight(defs.gutter, gutter), line.length > 0 ? ` ${line}` : \"\", markerLine].join(\"\");\n } else {\n return ` ${maybeHighlight(defs.gutter, gutter)}${line.length > 0 ? ` ${line}` : \"\"}`;\n }\n }).join(\"\\n\");\n\n if (opts.message && !hasColumns) {\n frame = `${\" \".repeat(numberMaxWidth + 1)}${opts.message}\\n${frame}`;\n }\n\n if (highlighted) {\n return chalk.reset(frame);\n } else {\n return frame;\n }\n}\n\nfunction _default(rawLines, lineNumber, colNumber, opts = {}) {\n if (!deprecationWarningShown) {\n deprecationWarningShown = true;\n const message = \"Passing lineNumber and colNumber is deprecated to @babel/code-frame. Please use `codeFrameColumns`.\";\n\n if (process.emitWarning) {\n process.emitWarning(message, \"DeprecationWarning\");\n } else {\n const deprecationError = new Error(message);\n deprecationError.name = \"DeprecationWarning\";\n console.warn(new Error(message));\n }\n }\n\n colNumber = Math.max(colNumber, 0);\n const location = {\n start: {\n column: colNumber,\n line: lineNumber\n }\n };\n return codeFrameColumns(rawLines, location, opts);\n}\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../../process/browser.js */ \"./node_modules/process/browser.js\")))\n\n//# sourceURL=file://cloudcmd/node_modules/@babel/code-frame/lib/index.js");
|
|
323
323
|
|
|
324
324
|
/***/ }),
|
|
325
325
|
|
|
@@ -331,7 +331,7 @@ eval("/* WEBPACK VAR INJECTION */(function(process) {\n\nObject.defineProperty(e
|
|
|
331
331
|
/***/ (function(module, exports, __webpack_require__) {
|
|
332
332
|
|
|
333
333
|
"use strict";
|
|
334
|
-
eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.isIdentifierStart = isIdentifierStart;\nexports.isIdentifierChar = isIdentifierChar;\nexports.isIdentifierName = isIdentifierName;\nlet nonASCIIidentifierStartChars = \"\\xaa\\xb5\\xba\\xc0-\\xd6\\xd8-\\xf6\\xf8-\\u02c1\\u02c6-\\u02d1\\u02e0-\\u02e4\\u02ec\\u02ee\\u0370-\\u0374\\u0376\\u0377\\u037a-\\u037d\\u037f\\u0386\\u0388-\\u038a\\u038c\\u038e-\\u03a1\\u03a3-\\u03f5\\u03f7-\\u0481\\u048a-\\u052f\\u0531-\\u0556\\u0559\\u0560-\\u0588\\u05d0-\\u05ea\\u05ef-\\u05f2\\u0620-\\u064a\\u066e\\u066f\\u0671-\\u06d3\\u06d5\\u06e5\\u06e6\\u06ee\\u06ef\\u06fa-\\u06fc\\u06ff\\u0710\\u0712-\\u072f\\u074d-\\u07a5\\u07b1\\u07ca-\\u07ea\\u07f4\\u07f5\\u07fa\\u0800-\\u0815\\u081a\\u0824\\u0828\\u0840-\\u0858\\u0860-\\u086a\\u08a0-\\u08b4\\u08b6-\\u08c7\\u0904-\\u0939\\u093d\\u0950\\u0958-\\u0961\\u0971-\\u0980\\u0985-\\u098c\\u098f\\u0990\\u0993-\\u09a8\\u09aa-\\u09b0\\u09b2\\u09b6-\\u09b9\\u09bd\\u09ce\\u09dc\\u09dd\\u09df-\\u09e1\\u09f0\\u09f1\\u09fc\\u0a05-\\u0a0a\\u0a0f\\u0a10\\u0a13-\\u0a28\\u0a2a-\\u0a30\\u0a32\\u0a33\\u0a35\\u0a36\\u0a38\\u0a39\\u0a59-\\u0a5c\\u0a5e\\u0a72-\\u0a74\\u0a85-\\u0a8d\\u0a8f-\\u0a91\\u0a93-\\u0aa8\\u0aaa-\\u0ab0\\u0ab2\\u0ab3\\u0ab5-\\u0ab9\\u0abd\\u0ad0\\u0ae0\\u0ae1\\u0af9\\u0b05-\\u0b0c\\u0b0f\\u0b10\\u0b13-\\u0b28\\u0b2a-\\u0b30\\u0b32\\u0b33\\u0b35-\\u0b39\\u0b3d\\u0b5c\\u0b5d\\u0b5f-\\u0b61\\u0b71\\u0b83\\u0b85-\\u0b8a\\u0b8e-\\u0b90\\u0b92-\\u0b95\\u0b99\\u0b9a\\u0b9c\\u0b9e\\u0b9f\\u0ba3\\u0ba4\\u0ba8-\\u0baa\\u0bae-\\u0bb9\\u0bd0\\u0c05-\\u0c0c\\u0c0e-\\u0c10\\u0c12-\\u0c28\\u0c2a-\\u0c39\\u0c3d\\u0c58-\\u0c5a\\u0c60\\u0c61\\u0c80\\u0c85-\\u0c8c\\u0c8e-\\u0c90\\u0c92-\\u0ca8\\u0caa-\\u0cb3\\u0cb5-\\u0cb9\\u0cbd\\u0cde\\u0ce0\\u0ce1\\u0cf1\\u0cf2\\u0d04-\\u0d0c\\u0d0e-\\u0d10\\u0d12-\\u0d3a\\u0d3d\\u0d4e\\u0d54-\\u0d56\\u0d5f-\\u0d61\\u0d7a-\\u0d7f\\u0d85-\\u0d96\\u0d9a-\\u0db1\\u0db3-\\u0dbb\\u0dbd\\u0dc0-\\u0dc6\\u0e01-\\u0e30\\u0e32\\u0e33\\u0e40-\\u0e46\\u0e81\\u0e82\\u0e84\\u0e86-\\u0e8a\\u0e8c-\\u0ea3\\u0ea5\\u0ea7-\\u0eb0\\u0eb2\\u0eb3\\u0ebd\\u0ec0-\\u0ec4\\u0ec6\\u0edc-\\u0edf\\u0f00\\u0f40-\\u0f47\\u0f49-\\u0f6c\\u0f88-\\u0f8c\\u1000-\\u102a\\u103f\\u1050-\\u1055\\u105a-\\u105d\\u1061\\u1065\\u1066\\u106e-\\u1070\\u1075-\\u1081\\u108e\\u10a0-\\u10c5\\u10c7\\u10cd\\u10d0-\\u10fa\\u10fc-\\u1248\\u124a-\\u124d\\u1250-\\u1256\\u1258\\u125a-\\u125d\\u1260-\\u1288\\u128a-\\u128d\\u1290-\\u12b0\\u12b2-\\u12b5\\u12b8-\\u12be\\u12c0\\u12c2-\\u12c5\\u12c8-\\u12d6\\u12d8-\\u1310\\u1312-\\u1315\\u1318-\\u135a\\u1380-\\u138f\\u13a0-\\u13f5\\u13f8-\\u13fd\\u1401-\\u166c\\u166f-\\u167f\\u1681-\\u169a\\u16a0-\\u16ea\\u16ee-\\u16f8\\u1700-\\u170c\\u170e-\\u1711\\u1720-\\u1731\\u1740-\\u1751\\u1760-\\u176c\\u176e-\\u1770\\u1780-\\u17b3\\u17d7\\u17dc\\u1820-\\u1878\\u1880-\\u18a8\\u18aa\\u18b0-\\u18f5\\u1900-\\u191e\\u1950-\\u196d\\u1970-\\u1974\\u1980-\\u19ab\\u19b0-\\u19c9\\u1a00-\\u1a16\\u1a20-\\u1a54\\u1aa7\\u1b05-\\u1b33\\u1b45-\\u1b4b\\u1b83-\\u1ba0\\u1bae\\u1baf\\u1bba-\\u1be5\\u1c00-\\u1c23\\u1c4d-\\u1c4f\\u1c5a-\\u1c7d\\u1c80-\\u1c88\\u1c90-\\u1cba\\u1cbd-\\u1cbf\\u1ce9-\\u1cec\\u1cee-\\u1cf3\\u1cf5\\u1cf6\\u1cfa\\u1d00-\\u1dbf\\u1e00-\\u1f15\\u1f18-\\u1f1d\\u1f20-\\u1f45\\u1f48-\\u1f4d\\u1f50-\\u1f57\\u1f59\\u1f5b\\u1f5d\\u1f5f-\\u1f7d\\u1f80-\\u1fb4\\u1fb6-\\u1fbc\\u1fbe\\u1fc2-\\u1fc4\\u1fc6-\\u1fcc\\u1fd0-\\u1fd3\\u1fd6-\\u1fdb\\u1fe0-\\u1fec\\u1ff2-\\u1ff4\\u1ff6-\\u1ffc\\u2071\\u207f\\u2090-\\u209c\\u2102\\u2107\\u210a-\\u2113\\u2115\\u2118-\\u211d\\u2124\\u2126\\u2128\\u212a-\\u2139\\u213c-\\u213f\\u2145-\\u2149\\u214e\\u2160-\\u2188\\u2c00-\\u2c2e\\u2c30-\\u2c5e\\u2c60-\\u2ce4\\u2ceb-\\u2cee\\u2cf2\\u2cf3\\u2d00-\\u2d25\\u2d27\\u2d2d\\u2d30-\\u2d67\\u2d6f\\u2d80-\\u2d96\\u2da0-\\u2da6\\u2da8-\\u2dae\\u2db0-\\u2db6\\u2db8-\\u2dbe\\u2dc0-\\u2dc6\\u2dc8-\\u2dce\\u2dd0-\\u2dd6\\u2dd8-\\u2dde\\u3005-\\u3007\\u3021-\\u3029\\u3031-\\u3035\\u3038-\\u303c\\u3041-\\u3096\\u309b-\\u309f\\u30a1-\\u30fa\\u30fc-\\u30ff\\u3105-\\u312f\\u3131-\\u318e\\u31a0-\\u31bf\\u31f0-\\u31ff\\u3400-\\u4dbf\\u4e00-\\u9ffc\\ua000-\\ua48c\\ua4d0-\\ua4fd\\ua500-\\ua60c\\ua610-\\ua61f\\ua62a\\ua62b\\ua640-\\ua66e\\ua67f-\\ua69d\\ua6a0-\\ua6ef\\ua717-\\ua71f\\ua722-\\ua788\\ua78b-\\ua7bf\\ua7c2-\\ua7ca\\ua7f5-\\ua801\\ua803-\\ua805\\ua807-\\ua80a\\ua80c-\\ua822\\ua840-\\ua873\\ua882-\\ua8b3\\ua8f2-\\ua8f7\\ua8fb\\ua8fd\\ua8fe\\ua90a-\\ua925\\ua930-\\ua946\\ua960-\\ua97c\\ua984-\\ua9b2\\ua9cf\\ua9e0-\\ua9e4\\ua9e6-\\ua9ef\\ua9fa-\\ua9fe\\uaa00-\\uaa28\\uaa40-\\uaa42\\uaa44-\\uaa4b\\uaa60-\\uaa76\\uaa7a\\uaa7e-\\uaaaf\\uaab1\\uaab5\\uaab6\\uaab9-\\uaabd\\uaac0\\uaac2\\uaadb-\\uaadd\\uaae0-\\uaaea\\uaaf2-\\uaaf4\\uab01-\\uab06\\uab09-\\uab0e\\uab11-\\uab16\\uab20-\\uab26\\uab28-\\uab2e\\uab30-\\uab5a\\uab5c-\\uab69\\uab70-\\uabe2\\uac00-\\ud7a3\\ud7b0-\\ud7c6\\ud7cb-\\ud7fb\\uf900-\\ufa6d\\ufa70-\\ufad9\\ufb00-\\ufb06\\ufb13-\\ufb17\\ufb1d\\ufb1f-\\ufb28\\ufb2a-\\ufb36\\ufb38-\\ufb3c\\ufb3e\\ufb40\\ufb41\\ufb43\\ufb44\\ufb46-\\ufbb1\\ufbd3-\\ufd3d\\ufd50-\\ufd8f\\ufd92-\\ufdc7\\ufdf0-\\ufdfb\\ufe70-\\ufe74\\ufe76-\\ufefc\\uff21-\\uff3a\\uff41-\\uff5a\\uff66-\\uffbe\\uffc2-\\uffc7\\uffca-\\uffcf\\uffd2-\\uffd7\\uffda-\\uffdc\";\nlet nonASCIIidentifierChars = \"\\u200c\\u200d\\xb7\\u0300-\\u036f\\u0387\\u0483-\\u0487\\u0591-\\u05bd\\u05bf\\u05c1\\u05c2\\u05c4\\u05c5\\u05c7\\u0610-\\u061a\\u064b-\\u0669\\u0670\\u06d6-\\u06dc\\u06df-\\u06e4\\u06e7\\u06e8\\u06ea-\\u06ed\\u06f0-\\u06f9\\u0711\\u0730-\\u074a\\u07a6-\\u07b0\\u07c0-\\u07c9\\u07eb-\\u07f3\\u07fd\\u0816-\\u0819\\u081b-\\u0823\\u0825-\\u0827\\u0829-\\u082d\\u0859-\\u085b\\u08d3-\\u08e1\\u08e3-\\u0903\\u093a-\\u093c\\u093e-\\u094f\\u0951-\\u0957\\u0962\\u0963\\u0966-\\u096f\\u0981-\\u0983\\u09bc\\u09be-\\u09c4\\u09c7\\u09c8\\u09cb-\\u09cd\\u09d7\\u09e2\\u09e3\\u09e6-\\u09ef\\u09fe\\u0a01-\\u0a03\\u0a3c\\u0a3e-\\u0a42\\u0a47\\u0a48\\u0a4b-\\u0a4d\\u0a51\\u0a66-\\u0a71\\u0a75\\u0a81-\\u0a83\\u0abc\\u0abe-\\u0ac5\\u0ac7-\\u0ac9\\u0acb-\\u0acd\\u0ae2\\u0ae3\\u0ae6-\\u0aef\\u0afa-\\u0aff\\u0b01-\\u0b03\\u0b3c\\u0b3e-\\u0b44\\u0b47\\u0b48\\u0b4b-\\u0b4d\\u0b55-\\u0b57\\u0b62\\u0b63\\u0b66-\\u0b6f\\u0b82\\u0bbe-\\u0bc2\\u0bc6-\\u0bc8\\u0bca-\\u0bcd\\u0bd7\\u0be6-\\u0bef\\u0c00-\\u0c04\\u0c3e-\\u0c44\\u0c46-\\u0c48\\u0c4a-\\u0c4d\\u0c55\\u0c56\\u0c62\\u0c63\\u0c66-\\u0c6f\\u0c81-\\u0c83\\u0cbc\\u0cbe-\\u0cc4\\u0cc6-\\u0cc8\\u0cca-\\u0ccd\\u0cd5\\u0cd6\\u0ce2\\u0ce3\\u0ce6-\\u0cef\\u0d00-\\u0d03\\u0d3b\\u0d3c\\u0d3e-\\u0d44\\u0d46-\\u0d48\\u0d4a-\\u0d4d\\u0d57\\u0d62\\u0d63\\u0d66-\\u0d6f\\u0d81-\\u0d83\\u0dca\\u0dcf-\\u0dd4\\u0dd6\\u0dd8-\\u0ddf\\u0de6-\\u0def\\u0df2\\u0df3\\u0e31\\u0e34-\\u0e3a\\u0e47-\\u0e4e\\u0e50-\\u0e59\\u0eb1\\u0eb4-\\u0ebc\\u0ec8-\\u0ecd\\u0ed0-\\u0ed9\\u0f18\\u0f19\\u0f20-\\u0f29\\u0f35\\u0f37\\u0f39\\u0f3e\\u0f3f\\u0f71-\\u0f84\\u0f86\\u0f87\\u0f8d-\\u0f97\\u0f99-\\u0fbc\\u0fc6\\u102b-\\u103e\\u1040-\\u1049\\u1056-\\u1059\\u105e-\\u1060\\u1062-\\u1064\\u1067-\\u106d\\u1071-\\u1074\\u1082-\\u108d\\u108f-\\u109d\\u135d-\\u135f\\u1369-\\u1371\\u1712-\\u1714\\u1732-\\u1734\\u1752\\u1753\\u1772\\u1773\\u17b4-\\u17d3\\u17dd\\u17e0-\\u17e9\\u180b-\\u180d\\u1810-\\u1819\\u18a9\\u1920-\\u192b\\u1930-\\u193b\\u1946-\\u194f\\u19d0-\\u19da\\u1a17-\\u1a1b\\u1a55-\\u1a5e\\u1a60-\\u1a7c\\u1a7f-\\u1a89\\u1a90-\\u1a99\\u1ab0-\\u1abd\\u1abf\\u1ac0\\u1b00-\\u1b04\\u1b34-\\u1b44\\u1b50-\\u1b59\\u1b6b-\\u1b73\\u1b80-\\u1b82\\u1ba1-\\u1bad\\u1bb0-\\u1bb9\\u1be6-\\u1bf3\\u1c24-\\u1c37\\u1c40-\\u1c49\\u1c50-\\u1c59\\u1cd0-\\u1cd2\\u1cd4-\\u1ce8\\u1ced\\u1cf4\\u1cf7-\\u1cf9\\u1dc0-\\u1df9\\u1dfb-\\u1dff\\u203f\\u2040\\u2054\\u20d0-\\u20dc\\u20e1\\u20e5-\\u20f0\\u2cef-\\u2cf1\\u2d7f\\u2de0-\\u2dff\\u302a-\\u302f\\u3099\\u309a\\ua620-\\ua629\\ua66f\\ua674-\\ua67d\\ua69e\\ua69f\\ua6f0\\ua6f1\\ua802\\ua806\\ua80b\\ua823-\\ua827\\ua82c\\ua880\\ua881\\ua8b4-\\ua8c5\\ua8d0-\\ua8d9\\ua8e0-\\ua8f1\\ua8ff-\\ua909\\ua926-\\ua92d\\ua947-\\ua953\\ua980-\\ua983\\ua9b3-\\ua9c0\\ua9d0-\\ua9d9\\ua9e5\\ua9f0-\\ua9f9\\uaa29-\\uaa36\\uaa43\\uaa4c\\uaa4d\\uaa50-\\uaa59\\uaa7b-\\uaa7d\\uaab0\\uaab2-\\uaab4\\uaab7\\uaab8\\uaabe\\uaabf\\uaac1\\uaaeb-\\uaaef\\uaaf5\\uaaf6\\uabe3-\\uabea\\uabec\\uabed\\uabf0-\\uabf9\\ufb1e\\ufe00-\\ufe0f\\ufe20-\\ufe2f\\ufe33\\ufe34\\ufe4d-\\ufe4f\\uff10-\\uff19\\uff3f\";\nconst nonASCIIidentifierStart = new RegExp(\"[\" + nonASCIIidentifierStartChars + \"]\");\nconst nonASCIIidentifier = new RegExp(\"[\" + nonASCIIidentifierStartChars + nonASCIIidentifierChars + \"]\");\nnonASCIIidentifierStartChars = nonASCIIidentifierChars = null;\nconst astralIdentifierStartCodes = [0, 11, 2, 25, 2, 18, 2, 1, 2, 14, 3, 13, 35, 122, 70, 52, 268, 28, 4, 48, 48, 31, 14, 29, 6, 37, 11, 29, 3, 35, 5, 7, 2, 4, 43, 157, 19, 35, 5, 35, 5, 39, 9, 51, 157, 310, 10, 21, 11, 7, 153, 5, 3, 0, 2, 43, 2, 1, 4, 0, 3, 22, 11, 22, 10, 30, 66, 18, 2, 1, 11, 21, 11, 25, 71, 55, 7, 1, 65, 0, 16, 3, 2, 2, 2, 28, 43, 28, 4, 28, 36, 7, 2, 27, 28, 53, 11, 21, 11, 18, 14, 17, 111, 72, 56, 50, 14, 50, 14, 35, 349, 41, 7, 1, 79, 28, 11, 0, 9, 21, 107, 20, 28, 22, 13, 52, 76, 44, 33, 24, 27, 35, 30, 0, 3, 0, 9, 34, 4, 0, 13, 47, 15, 3, 22, 0, 2, 0, 36, 17, 2, 24, 85, 6, 2, 0, 2, 3, 2, 14, 2, 9, 8, 46, 39, 7, 3, 1, 3, 21, 2, 6, 2, 1, 2, 4, 4, 0, 19, 0, 13, 4, 159, 52, 19, 3, 21, 2, 31, 47, 21, 1, 2, 0, 185, 46, 42, 3, 37, 47, 21, 0, 60, 42, 14, 0, 72, 26, 230, 43, 117, 63, 32, 7, 3, 0, 3, 7, 2, 1, 2, 23, 16, 0, 2, 0, 95, 7, 3, 38, 17, 0, 2, 0, 29, 0, 11, 39, 8, 0, 22, 0, 12, 45, 20, 0, 35, 56, 264, 8, 2, 36, 18, 0, 50, 29, 113, 6, 2, 1, 2, 37, 22, 0, 26, 5, 2, 1, 2, 31, 15, 0, 328, 18, 190, 0, 80, 921, 103, 110, 18, 195, 2749, 1070, 4050, 582, 8634, 568, 8, 30, 114, 29, 19, 47, 17, 3, 32, 20, 6, 18, 689, 63, 129, 74, 6, 0, 67, 12, 65, 1, 2, 0, 29, 6135, 9, 1237, 43, 8, 8952, 286, 50, 2, 18, 3, 9, 395, 2309, 106, 6, 12, 4, 8, 8, 9, 5991, 84, 2, 70, 2, 1, 3, 0, 3, 1, 3, 3, 2, 11, 2, 0, 2, 6, 2, 64, 2, 3, 3, 7, 2, 6, 2, 27, 2, 3, 2, 4, 2, 0, 4, 6, 2, 339, 3, 24, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 7, 2357, 44, 11, 6, 17, 0, 370, 43, 1301, 196, 60, 67, 8, 0, 1205, 3, 2, 26, 2, 1, 2, 0, 3, 0, 2, 9, 2, 3, 2, 0, 2, 0, 7, 0, 5, 0, 2, 0, 2, 0, 2, 2, 2, 1, 2, 0, 3, 0, 2, 0, 2, 0, 2, 0, 2, 0, 2, 1, 2, 0, 3, 3, 2, 6, 2, 3, 2, 3, 2, 0, 2, 9, 2, 16, 6, 2, 2, 4, 2, 16, 4421, 42717, 35, 4148, 12, 221, 3, 5761, 15, 7472, 3104, 541, 1507, 4938];\nconst astralIdentifierCodes = [509, 0, 227, 0, 150, 4, 294, 9, 1368, 2, 2, 1, 6, 3, 41, 2, 5, 0, 166, 1, 574, 3, 9, 9, 370, 1, 154, 10, 176, 2, 54, 14, 32, 9, 16, 3, 46, 10, 54, 9, 7, 2, 37, 13, 2, 9, 6, 1, 45, 0, 13, 2, 49, 13, 9, 3, 2, 11, 83, 11, 7, 0, 161, 11, 6, 9, 7, 3, 56, 1, 2, 6, 3, 1, 3, 2, 10, 0, 11, 1, 3, 6, 4, 4, 193, 17, 10, 9, 5, 0, 82, 19, 13, 9, 214, 6, 3, 8, 28, 1, 83, 16, 16, 9, 82, 12, 9, 9, 84, 14, 5, 9, 243, 14, 166, 9, 71, 5, 2, 1, 3, 3, 2, 0, 2, 1, 13, 9, 120, 6, 3, 6, 4, 0, 29, 9, 41, 6, 2, 3, 9, 0, 10, 10, 47, 15, 406, 7, 2, 7, 17, 9, 57, 21, 2, 13, 123, 5, 4, 0, 2, 1, 2, 6, 2, 0, 9, 9, 49, 4, 2, 1, 2, 4, 9, 9, 330, 3, 19306, 9, 135, 4, 60, 6, 26, 9, 1014, 0, 2, 54, 8, 3, 82, 0, 12, 1, 19628, 1, 5319, 4, 4, 5, 9, 7, 3, 6, 31, 3, 149, 2, 1418, 49, 513, 54, 5, 49, 9, 0, 15, 0, 23, 4, 2, 14, 1361, 6, 2, 16, 3, 6, 2, 1, 2, 4, 262, 6, 10, 9, 419, 13, 1495, 6, 110, 6, 6, 9, 4759, 9, 787719, 239];\n\nfunction isInAstralSet(code, set) {\n let pos = 0x10000;\n\n for (let i = 0, length = set.length; i < length; i += 2) {\n pos += set[i];\n if (pos > code) return false;\n pos += set[i + 1];\n if (pos >= code) return true;\n }\n\n return false;\n}\n\nfunction isIdentifierStart(code) {\n if (code < 65) return code === 36;\n if (code <= 90) return true;\n if (code < 97) return code === 95;\n if (code <= 122) return true;\n\n if (code <= 0xffff) {\n return code >= 0xaa && nonASCIIidentifierStart.test(String.fromCharCode(code));\n }\n\n return isInAstralSet(code, astralIdentifierStartCodes);\n}\n\nfunction isIdentifierChar(code) {\n if (code < 48) return code === 36;\n if (code < 58) return true;\n if (code < 65) return false;\n if (code <= 90) return true;\n if (code < 97) return code === 95;\n if (code <= 122) return true;\n\n if (code <= 0xffff) {\n return code >= 0xaa && nonASCIIidentifier.test(String.fromCharCode(code));\n }\n\n return isInAstralSet(code, astralIdentifierStartCodes) || isInAstralSet(code, astralIdentifierCodes);\n}\n\nfunction isIdentifierName(name) {\n let isFirst = true;\n\n for (let i = 0; i < name.length; i++) {\n let cp = name.charCodeAt(i);\n\n if ((cp & 0xfc00) === 0xd800 && i + 1 < name.length) {\n const trail = name.charCodeAt(++i);\n\n if ((trail & 0xfc00) === 0xdc00) {\n cp = 0x10000 + ((cp & 0x3ff) << 10) + (trail & 0x3ff);\n }\n }\n\n if (isFirst) {\n isFirst = false;\n\n if (!isIdentifierStart(cp)) {\n return false;\n }\n } else if (!isIdentifierChar(cp)) {\n return false;\n }\n }\n\n return !isFirst;\n}\n\n//# sourceURL=file://cloudcmd/node_modules/@babel/helper-validator-identifier/lib/identifier.js");
|
|
334
|
+
eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.isIdentifierStart = isIdentifierStart;\nexports.isIdentifierChar = isIdentifierChar;\nexports.isIdentifierName = isIdentifierName;\nlet nonASCIIidentifierStartChars = \"\\xaa\\xb5\\xba\\xc0-\\xd6\\xd8-\\xf6\\xf8-\\u02c1\\u02c6-\\u02d1\\u02e0-\\u02e4\\u02ec\\u02ee\\u0370-\\u0374\\u0376\\u0377\\u037a-\\u037d\\u037f\\u0386\\u0388-\\u038a\\u038c\\u038e-\\u03a1\\u03a3-\\u03f5\\u03f7-\\u0481\\u048a-\\u052f\\u0531-\\u0556\\u0559\\u0560-\\u0588\\u05d0-\\u05ea\\u05ef-\\u05f2\\u0620-\\u064a\\u066e\\u066f\\u0671-\\u06d3\\u06d5\\u06e5\\u06e6\\u06ee\\u06ef\\u06fa-\\u06fc\\u06ff\\u0710\\u0712-\\u072f\\u074d-\\u07a5\\u07b1\\u07ca-\\u07ea\\u07f4\\u07f5\\u07fa\\u0800-\\u0815\\u081a\\u0824\\u0828\\u0840-\\u0858\\u0860-\\u086a\\u0870-\\u0887\\u0889-\\u088e\\u08a0-\\u08c9\\u0904-\\u0939\\u093d\\u0950\\u0958-\\u0961\\u0971-\\u0980\\u0985-\\u098c\\u098f\\u0990\\u0993-\\u09a8\\u09aa-\\u09b0\\u09b2\\u09b6-\\u09b9\\u09bd\\u09ce\\u09dc\\u09dd\\u09df-\\u09e1\\u09f0\\u09f1\\u09fc\\u0a05-\\u0a0a\\u0a0f\\u0a10\\u0a13-\\u0a28\\u0a2a-\\u0a30\\u0a32\\u0a33\\u0a35\\u0a36\\u0a38\\u0a39\\u0a59-\\u0a5c\\u0a5e\\u0a72-\\u0a74\\u0a85-\\u0a8d\\u0a8f-\\u0a91\\u0a93-\\u0aa8\\u0aaa-\\u0ab0\\u0ab2\\u0ab3\\u0ab5-\\u0ab9\\u0abd\\u0ad0\\u0ae0\\u0ae1\\u0af9\\u0b05-\\u0b0c\\u0b0f\\u0b10\\u0b13-\\u0b28\\u0b2a-\\u0b30\\u0b32\\u0b33\\u0b35-\\u0b39\\u0b3d\\u0b5c\\u0b5d\\u0b5f-\\u0b61\\u0b71\\u0b83\\u0b85-\\u0b8a\\u0b8e-\\u0b90\\u0b92-\\u0b95\\u0b99\\u0b9a\\u0b9c\\u0b9e\\u0b9f\\u0ba3\\u0ba4\\u0ba8-\\u0baa\\u0bae-\\u0bb9\\u0bd0\\u0c05-\\u0c0c\\u0c0e-\\u0c10\\u0c12-\\u0c28\\u0c2a-\\u0c39\\u0c3d\\u0c58-\\u0c5a\\u0c5d\\u0c60\\u0c61\\u0c80\\u0c85-\\u0c8c\\u0c8e-\\u0c90\\u0c92-\\u0ca8\\u0caa-\\u0cb3\\u0cb5-\\u0cb9\\u0cbd\\u0cdd\\u0cde\\u0ce0\\u0ce1\\u0cf1\\u0cf2\\u0d04-\\u0d0c\\u0d0e-\\u0d10\\u0d12-\\u0d3a\\u0d3d\\u0d4e\\u0d54-\\u0d56\\u0d5f-\\u0d61\\u0d7a-\\u0d7f\\u0d85-\\u0d96\\u0d9a-\\u0db1\\u0db3-\\u0dbb\\u0dbd\\u0dc0-\\u0dc6\\u0e01-\\u0e30\\u0e32\\u0e33\\u0e40-\\u0e46\\u0e81\\u0e82\\u0e84\\u0e86-\\u0e8a\\u0e8c-\\u0ea3\\u0ea5\\u0ea7-\\u0eb0\\u0eb2\\u0eb3\\u0ebd\\u0ec0-\\u0ec4\\u0ec6\\u0edc-\\u0edf\\u0f00\\u0f40-\\u0f47\\u0f49-\\u0f6c\\u0f88-\\u0f8c\\u1000-\\u102a\\u103f\\u1050-\\u1055\\u105a-\\u105d\\u1061\\u1065\\u1066\\u106e-\\u1070\\u1075-\\u1081\\u108e\\u10a0-\\u10c5\\u10c7\\u10cd\\u10d0-\\u10fa\\u10fc-\\u1248\\u124a-\\u124d\\u1250-\\u1256\\u1258\\u125a-\\u125d\\u1260-\\u1288\\u128a-\\u128d\\u1290-\\u12b0\\u12b2-\\u12b5\\u12b8-\\u12be\\u12c0\\u12c2-\\u12c5\\u12c8-\\u12d6\\u12d8-\\u1310\\u1312-\\u1315\\u1318-\\u135a\\u1380-\\u138f\\u13a0-\\u13f5\\u13f8-\\u13fd\\u1401-\\u166c\\u166f-\\u167f\\u1681-\\u169a\\u16a0-\\u16ea\\u16ee-\\u16f8\\u1700-\\u1711\\u171f-\\u1731\\u1740-\\u1751\\u1760-\\u176c\\u176e-\\u1770\\u1780-\\u17b3\\u17d7\\u17dc\\u1820-\\u1878\\u1880-\\u18a8\\u18aa\\u18b0-\\u18f5\\u1900-\\u191e\\u1950-\\u196d\\u1970-\\u1974\\u1980-\\u19ab\\u19b0-\\u19c9\\u1a00-\\u1a16\\u1a20-\\u1a54\\u1aa7\\u1b05-\\u1b33\\u1b45-\\u1b4c\\u1b83-\\u1ba0\\u1bae\\u1baf\\u1bba-\\u1be5\\u1c00-\\u1c23\\u1c4d-\\u1c4f\\u1c5a-\\u1c7d\\u1c80-\\u1c88\\u1c90-\\u1cba\\u1cbd-\\u1cbf\\u1ce9-\\u1cec\\u1cee-\\u1cf3\\u1cf5\\u1cf6\\u1cfa\\u1d00-\\u1dbf\\u1e00-\\u1f15\\u1f18-\\u1f1d\\u1f20-\\u1f45\\u1f48-\\u1f4d\\u1f50-\\u1f57\\u1f59\\u1f5b\\u1f5d\\u1f5f-\\u1f7d\\u1f80-\\u1fb4\\u1fb6-\\u1fbc\\u1fbe\\u1fc2-\\u1fc4\\u1fc6-\\u1fcc\\u1fd0-\\u1fd3\\u1fd6-\\u1fdb\\u1fe0-\\u1fec\\u1ff2-\\u1ff4\\u1ff6-\\u1ffc\\u2071\\u207f\\u2090-\\u209c\\u2102\\u2107\\u210a-\\u2113\\u2115\\u2118-\\u211d\\u2124\\u2126\\u2128\\u212a-\\u2139\\u213c-\\u213f\\u2145-\\u2149\\u214e\\u2160-\\u2188\\u2c00-\\u2ce4\\u2ceb-\\u2cee\\u2cf2\\u2cf3\\u2d00-\\u2d25\\u2d27\\u2d2d\\u2d30-\\u2d67\\u2d6f\\u2d80-\\u2d96\\u2da0-\\u2da6\\u2da8-\\u2dae\\u2db0-\\u2db6\\u2db8-\\u2dbe\\u2dc0-\\u2dc6\\u2dc8-\\u2dce\\u2dd0-\\u2dd6\\u2dd8-\\u2dde\\u3005-\\u3007\\u3021-\\u3029\\u3031-\\u3035\\u3038-\\u303c\\u3041-\\u3096\\u309b-\\u309f\\u30a1-\\u30fa\\u30fc-\\u30ff\\u3105-\\u312f\\u3131-\\u318e\\u31a0-\\u31bf\\u31f0-\\u31ff\\u3400-\\u4dbf\\u4e00-\\ua48c\\ua4d0-\\ua4fd\\ua500-\\ua60c\\ua610-\\ua61f\\ua62a\\ua62b\\ua640-\\ua66e\\ua67f-\\ua69d\\ua6a0-\\ua6ef\\ua717-\\ua71f\\ua722-\\ua788\\ua78b-\\ua7ca\\ua7d0\\ua7d1\\ua7d3\\ua7d5-\\ua7d9\\ua7f2-\\ua801\\ua803-\\ua805\\ua807-\\ua80a\\ua80c-\\ua822\\ua840-\\ua873\\ua882-\\ua8b3\\ua8f2-\\ua8f7\\ua8fb\\ua8fd\\ua8fe\\ua90a-\\ua925\\ua930-\\ua946\\ua960-\\ua97c\\ua984-\\ua9b2\\ua9cf\\ua9e0-\\ua9e4\\ua9e6-\\ua9ef\\ua9fa-\\ua9fe\\uaa00-\\uaa28\\uaa40-\\uaa42\\uaa44-\\uaa4b\\uaa60-\\uaa76\\uaa7a\\uaa7e-\\uaaaf\\uaab1\\uaab5\\uaab6\\uaab9-\\uaabd\\uaac0\\uaac2\\uaadb-\\uaadd\\uaae0-\\uaaea\\uaaf2-\\uaaf4\\uab01-\\uab06\\uab09-\\uab0e\\uab11-\\uab16\\uab20-\\uab26\\uab28-\\uab2e\\uab30-\\uab5a\\uab5c-\\uab69\\uab70-\\uabe2\\uac00-\\ud7a3\\ud7b0-\\ud7c6\\ud7cb-\\ud7fb\\uf900-\\ufa6d\\ufa70-\\ufad9\\ufb00-\\ufb06\\ufb13-\\ufb17\\ufb1d\\ufb1f-\\ufb28\\ufb2a-\\ufb36\\ufb38-\\ufb3c\\ufb3e\\ufb40\\ufb41\\ufb43\\ufb44\\ufb46-\\ufbb1\\ufbd3-\\ufd3d\\ufd50-\\ufd8f\\ufd92-\\ufdc7\\ufdf0-\\ufdfb\\ufe70-\\ufe74\\ufe76-\\ufefc\\uff21-\\uff3a\\uff41-\\uff5a\\uff66-\\uffbe\\uffc2-\\uffc7\\uffca-\\uffcf\\uffd2-\\uffd7\\uffda-\\uffdc\";\nlet nonASCIIidentifierChars = \"\\u200c\\u200d\\xb7\\u0300-\\u036f\\u0387\\u0483-\\u0487\\u0591-\\u05bd\\u05bf\\u05c1\\u05c2\\u05c4\\u05c5\\u05c7\\u0610-\\u061a\\u064b-\\u0669\\u0670\\u06d6-\\u06dc\\u06df-\\u06e4\\u06e7\\u06e8\\u06ea-\\u06ed\\u06f0-\\u06f9\\u0711\\u0730-\\u074a\\u07a6-\\u07b0\\u07c0-\\u07c9\\u07eb-\\u07f3\\u07fd\\u0816-\\u0819\\u081b-\\u0823\\u0825-\\u0827\\u0829-\\u082d\\u0859-\\u085b\\u0898-\\u089f\\u08ca-\\u08e1\\u08e3-\\u0903\\u093a-\\u093c\\u093e-\\u094f\\u0951-\\u0957\\u0962\\u0963\\u0966-\\u096f\\u0981-\\u0983\\u09bc\\u09be-\\u09c4\\u09c7\\u09c8\\u09cb-\\u09cd\\u09d7\\u09e2\\u09e3\\u09e6-\\u09ef\\u09fe\\u0a01-\\u0a03\\u0a3c\\u0a3e-\\u0a42\\u0a47\\u0a48\\u0a4b-\\u0a4d\\u0a51\\u0a66-\\u0a71\\u0a75\\u0a81-\\u0a83\\u0abc\\u0abe-\\u0ac5\\u0ac7-\\u0ac9\\u0acb-\\u0acd\\u0ae2\\u0ae3\\u0ae6-\\u0aef\\u0afa-\\u0aff\\u0b01-\\u0b03\\u0b3c\\u0b3e-\\u0b44\\u0b47\\u0b48\\u0b4b-\\u0b4d\\u0b55-\\u0b57\\u0b62\\u0b63\\u0b66-\\u0b6f\\u0b82\\u0bbe-\\u0bc2\\u0bc6-\\u0bc8\\u0bca-\\u0bcd\\u0bd7\\u0be6-\\u0bef\\u0c00-\\u0c04\\u0c3c\\u0c3e-\\u0c44\\u0c46-\\u0c48\\u0c4a-\\u0c4d\\u0c55\\u0c56\\u0c62\\u0c63\\u0c66-\\u0c6f\\u0c81-\\u0c83\\u0cbc\\u0cbe-\\u0cc4\\u0cc6-\\u0cc8\\u0cca-\\u0ccd\\u0cd5\\u0cd6\\u0ce2\\u0ce3\\u0ce6-\\u0cef\\u0d00-\\u0d03\\u0d3b\\u0d3c\\u0d3e-\\u0d44\\u0d46-\\u0d48\\u0d4a-\\u0d4d\\u0d57\\u0d62\\u0d63\\u0d66-\\u0d6f\\u0d81-\\u0d83\\u0dca\\u0dcf-\\u0dd4\\u0dd6\\u0dd8-\\u0ddf\\u0de6-\\u0def\\u0df2\\u0df3\\u0e31\\u0e34-\\u0e3a\\u0e47-\\u0e4e\\u0e50-\\u0e59\\u0eb1\\u0eb4-\\u0ebc\\u0ec8-\\u0ecd\\u0ed0-\\u0ed9\\u0f18\\u0f19\\u0f20-\\u0f29\\u0f35\\u0f37\\u0f39\\u0f3e\\u0f3f\\u0f71-\\u0f84\\u0f86\\u0f87\\u0f8d-\\u0f97\\u0f99-\\u0fbc\\u0fc6\\u102b-\\u103e\\u1040-\\u1049\\u1056-\\u1059\\u105e-\\u1060\\u1062-\\u1064\\u1067-\\u106d\\u1071-\\u1074\\u1082-\\u108d\\u108f-\\u109d\\u135d-\\u135f\\u1369-\\u1371\\u1712-\\u1715\\u1732-\\u1734\\u1752\\u1753\\u1772\\u1773\\u17b4-\\u17d3\\u17dd\\u17e0-\\u17e9\\u180b-\\u180d\\u180f-\\u1819\\u18a9\\u1920-\\u192b\\u1930-\\u193b\\u1946-\\u194f\\u19d0-\\u19da\\u1a17-\\u1a1b\\u1a55-\\u1a5e\\u1a60-\\u1a7c\\u1a7f-\\u1a89\\u1a90-\\u1a99\\u1ab0-\\u1abd\\u1abf-\\u1ace\\u1b00-\\u1b04\\u1b34-\\u1b44\\u1b50-\\u1b59\\u1b6b-\\u1b73\\u1b80-\\u1b82\\u1ba1-\\u1bad\\u1bb0-\\u1bb9\\u1be6-\\u1bf3\\u1c24-\\u1c37\\u1c40-\\u1c49\\u1c50-\\u1c59\\u1cd0-\\u1cd2\\u1cd4-\\u1ce8\\u1ced\\u1cf4\\u1cf7-\\u1cf9\\u1dc0-\\u1dff\\u203f\\u2040\\u2054\\u20d0-\\u20dc\\u20e1\\u20e5-\\u20f0\\u2cef-\\u2cf1\\u2d7f\\u2de0-\\u2dff\\u302a-\\u302f\\u3099\\u309a\\ua620-\\ua629\\ua66f\\ua674-\\ua67d\\ua69e\\ua69f\\ua6f0\\ua6f1\\ua802\\ua806\\ua80b\\ua823-\\ua827\\ua82c\\ua880\\ua881\\ua8b4-\\ua8c5\\ua8d0-\\ua8d9\\ua8e0-\\ua8f1\\ua8ff-\\ua909\\ua926-\\ua92d\\ua947-\\ua953\\ua980-\\ua983\\ua9b3-\\ua9c0\\ua9d0-\\ua9d9\\ua9e5\\ua9f0-\\ua9f9\\uaa29-\\uaa36\\uaa43\\uaa4c\\uaa4d\\uaa50-\\uaa59\\uaa7b-\\uaa7d\\uaab0\\uaab2-\\uaab4\\uaab7\\uaab8\\uaabe\\uaabf\\uaac1\\uaaeb-\\uaaef\\uaaf5\\uaaf6\\uabe3-\\uabea\\uabec\\uabed\\uabf0-\\uabf9\\ufb1e\\ufe00-\\ufe0f\\ufe20-\\ufe2f\\ufe33\\ufe34\\ufe4d-\\ufe4f\\uff10-\\uff19\\uff3f\";\nconst nonASCIIidentifierStart = new RegExp(\"[\" + nonASCIIidentifierStartChars + \"]\");\nconst nonASCIIidentifier = new RegExp(\"[\" + nonASCIIidentifierStartChars + nonASCIIidentifierChars + \"]\");\nnonASCIIidentifierStartChars = nonASCIIidentifierChars = null;\nconst astralIdentifierStartCodes = [0, 11, 2, 25, 2, 18, 2, 1, 2, 14, 3, 13, 35, 122, 70, 52, 268, 28, 4, 48, 48, 31, 14, 29, 6, 37, 11, 29, 3, 35, 5, 7, 2, 4, 43, 157, 19, 35, 5, 35, 5, 39, 9, 51, 13, 10, 2, 14, 2, 6, 2, 1, 2, 10, 2, 14, 2, 6, 2, 1, 68, 310, 10, 21, 11, 7, 25, 5, 2, 41, 2, 8, 70, 5, 3, 0, 2, 43, 2, 1, 4, 0, 3, 22, 11, 22, 10, 30, 66, 18, 2, 1, 11, 21, 11, 25, 71, 55, 7, 1, 65, 0, 16, 3, 2, 2, 2, 28, 43, 28, 4, 28, 36, 7, 2, 27, 28, 53, 11, 21, 11, 18, 14, 17, 111, 72, 56, 50, 14, 50, 14, 35, 349, 41, 7, 1, 79, 28, 11, 0, 9, 21, 43, 17, 47, 20, 28, 22, 13, 52, 58, 1, 3, 0, 14, 44, 33, 24, 27, 35, 30, 0, 3, 0, 9, 34, 4, 0, 13, 47, 15, 3, 22, 0, 2, 0, 36, 17, 2, 24, 85, 6, 2, 0, 2, 3, 2, 14, 2, 9, 8, 46, 39, 7, 3, 1, 3, 21, 2, 6, 2, 1, 2, 4, 4, 0, 19, 0, 13, 4, 159, 52, 19, 3, 21, 2, 31, 47, 21, 1, 2, 0, 185, 46, 42, 3, 37, 47, 21, 0, 60, 42, 14, 0, 72, 26, 38, 6, 186, 43, 117, 63, 32, 7, 3, 0, 3, 7, 2, 1, 2, 23, 16, 0, 2, 0, 95, 7, 3, 38, 17, 0, 2, 0, 29, 0, 11, 39, 8, 0, 22, 0, 12, 45, 20, 0, 19, 72, 264, 8, 2, 36, 18, 0, 50, 29, 113, 6, 2, 1, 2, 37, 22, 0, 26, 5, 2, 1, 2, 31, 15, 0, 328, 18, 190, 0, 80, 921, 103, 110, 18, 195, 2637, 96, 16, 1070, 4050, 582, 8634, 568, 8, 30, 18, 78, 18, 29, 19, 47, 17, 3, 32, 20, 6, 18, 689, 63, 129, 74, 6, 0, 67, 12, 65, 1, 2, 0, 29, 6135, 9, 1237, 43, 8, 8936, 3, 2, 6, 2, 1, 2, 290, 46, 2, 18, 3, 9, 395, 2309, 106, 6, 12, 4, 8, 8, 9, 5991, 84, 2, 70, 2, 1, 3, 0, 3, 1, 3, 3, 2, 11, 2, 0, 2, 6, 2, 64, 2, 3, 3, 7, 2, 6, 2, 27, 2, 3, 2, 4, 2, 0, 4, 6, 2, 339, 3, 24, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 7, 1845, 30, 482, 44, 11, 6, 17, 0, 322, 29, 19, 43, 1269, 6, 2, 3, 2, 1, 2, 14, 2, 196, 60, 67, 8, 0, 1205, 3, 2, 26, 2, 1, 2, 0, 3, 0, 2, 9, 2, 3, 2, 0, 2, 0, 7, 0, 5, 0, 2, 0, 2, 0, 2, 2, 2, 1, 2, 0, 3, 0, 2, 0, 2, 0, 2, 0, 2, 0, 2, 1, 2, 0, 3, 3, 2, 6, 2, 3, 2, 3, 2, 0, 2, 9, 2, 16, 6, 2, 2, 4, 2, 16, 4421, 42719, 33, 4152, 8, 221, 3, 5761, 15, 7472, 3104, 541, 1507, 4938];\nconst astralIdentifierCodes = [509, 0, 227, 0, 150, 4, 294, 9, 1368, 2, 2, 1, 6, 3, 41, 2, 5, 0, 166, 1, 574, 3, 9, 9, 370, 1, 154, 10, 50, 3, 123, 2, 54, 14, 32, 10, 3, 1, 11, 3, 46, 10, 8, 0, 46, 9, 7, 2, 37, 13, 2, 9, 6, 1, 45, 0, 13, 2, 49, 13, 9, 3, 2, 11, 83, 11, 7, 0, 161, 11, 6, 9, 7, 3, 56, 1, 2, 6, 3, 1, 3, 2, 10, 0, 11, 1, 3, 6, 4, 4, 193, 17, 10, 9, 5, 0, 82, 19, 13, 9, 214, 6, 3, 8, 28, 1, 83, 16, 16, 9, 82, 12, 9, 9, 84, 14, 5, 9, 243, 14, 166, 9, 71, 5, 2, 1, 3, 3, 2, 0, 2, 1, 13, 9, 120, 6, 3, 6, 4, 0, 29, 9, 41, 6, 2, 3, 9, 0, 10, 10, 47, 15, 406, 7, 2, 7, 17, 9, 57, 21, 2, 13, 123, 5, 4, 0, 2, 1, 2, 6, 2, 0, 9, 9, 49, 4, 2, 1, 2, 4, 9, 9, 330, 3, 19306, 9, 87, 9, 39, 4, 60, 6, 26, 9, 1014, 0, 2, 54, 8, 3, 82, 0, 12, 1, 19628, 1, 4706, 45, 3, 22, 543, 4, 4, 5, 9, 7, 3, 6, 31, 3, 149, 2, 1418, 49, 513, 54, 5, 49, 9, 0, 15, 0, 23, 4, 2, 14, 1361, 6, 2, 16, 3, 6, 2, 1, 2, 4, 262, 6, 10, 9, 357, 0, 62, 13, 1495, 6, 110, 6, 6, 9, 4759, 9, 787719, 239];\n\nfunction isInAstralSet(code, set) {\n let pos = 0x10000;\n\n for (let i = 0, length = set.length; i < length; i += 2) {\n pos += set[i];\n if (pos > code) return false;\n pos += set[i + 1];\n if (pos >= code) return true;\n }\n\n return false;\n}\n\nfunction isIdentifierStart(code) {\n if (code < 65) return code === 36;\n if (code <= 90) return true;\n if (code < 97) return code === 95;\n if (code <= 122) return true;\n\n if (code <= 0xffff) {\n return code >= 0xaa && nonASCIIidentifierStart.test(String.fromCharCode(code));\n }\n\n return isInAstralSet(code, astralIdentifierStartCodes);\n}\n\nfunction isIdentifierChar(code) {\n if (code < 48) return code === 36;\n if (code < 58) return true;\n if (code < 65) return false;\n if (code <= 90) return true;\n if (code < 97) return code === 95;\n if (code <= 122) return true;\n\n if (code <= 0xffff) {\n return code >= 0xaa && nonASCIIidentifier.test(String.fromCharCode(code));\n }\n\n return isInAstralSet(code, astralIdentifierStartCodes) || isInAstralSet(code, astralIdentifierCodes);\n}\n\nfunction isIdentifierName(name) {\n let isFirst = true;\n\n for (let i = 0; i < name.length; i++) {\n let cp = name.charCodeAt(i);\n\n if ((cp & 0xfc00) === 0xd800 && i + 1 < name.length) {\n const trail = name.charCodeAt(++i);\n\n if ((trail & 0xfc00) === 0xdc00) {\n cp = 0x10000 + ((cp & 0x3ff) << 10) + (trail & 0x3ff);\n }\n }\n\n if (isFirst) {\n isFirst = false;\n\n if (!isIdentifierStart(cp)) {\n return false;\n }\n } else if (!isIdentifierChar(cp)) {\n return false;\n }\n }\n\n return !isFirst;\n}\n\n//# sourceURL=file://cloudcmd/node_modules/@babel/helper-validator-identifier/lib/identifier.js");
|
|
335
335
|
|
|
336
336
|
/***/ }),
|
|
337
337
|
|
|
@@ -367,7 +367,7 @@ eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n
|
|
|
367
367
|
/***/ (function(module, exports, __webpack_require__) {
|
|
368
368
|
|
|
369
369
|
"use strict";
|
|
370
|
-
eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.
|
|
370
|
+
eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = highlight;\nexports.getChalk = getChalk;\nexports.shouldHighlight = shouldHighlight;\n\nvar _jsTokens = __webpack_require__(/*! js-tokens */ \"./node_modules/js-tokens/index.js\");\n\nvar _helperValidatorIdentifier = __webpack_require__(/*! @babel/helper-validator-identifier */ \"./node_modules/@babel/helper-validator-identifier/lib/index.js\");\n\nvar _chalk = __webpack_require__(/*! chalk */ \"./node_modules/@babel/highlight/node_modules/chalk/index.js\");\n\nconst sometimesKeywords = new Set([\"as\", \"async\", \"from\", \"get\", \"of\", \"set\"]);\n\nfunction getDefs(chalk) {\n return {\n keyword: chalk.cyan,\n capitalized: chalk.yellow,\n jsxIdentifier: chalk.yellow,\n punctuator: chalk.yellow,\n number: chalk.magenta,\n string: chalk.green,\n regex: chalk.magenta,\n comment: chalk.grey,\n invalid: chalk.white.bgRed.bold\n };\n}\n\nconst NEWLINE = /\\r\\n|[\\n\\r\\u2028\\u2029]/;\nconst BRACKET = /^[()[\\]{}]$/;\nlet tokenize;\n{\n const JSX_TAG = /^[a-z][\\w-]*$/i;\n\n const getTokenType = function (token, offset, text) {\n if (token.type === \"name\") {\n if ((0, _helperValidatorIdentifier.isKeyword)(token.value) || (0, _helperValidatorIdentifier.isStrictReservedWord)(token.value, true) || sometimesKeywords.has(token.value)) {\n return \"keyword\";\n }\n\n if (JSX_TAG.test(token.value) && (text[offset - 1] === \"<\" || text.substr(offset - 2, 2) == \"</\")) {\n return \"jsxIdentifier\";\n }\n\n if (token.value[0] !== token.value[0].toLowerCase()) {\n return \"capitalized\";\n }\n }\n\n if (token.type === \"punctuator\" && BRACKET.test(token.value)) {\n return \"bracket\";\n }\n\n if (token.type === \"invalid\" && (token.value === \"@\" || token.value === \"#\")) {\n return \"punctuator\";\n }\n\n return token.type;\n };\n\n tokenize = function* (text) {\n let match;\n\n while (match = _jsTokens.default.exec(text)) {\n const token = _jsTokens.matchToToken(match);\n\n yield {\n type: getTokenType(token, match.index, text),\n value: token.value\n };\n }\n };\n}\n\nfunction highlightTokens(defs, text) {\n let highlighted = \"\";\n\n for (const {\n type,\n value\n } of tokenize(text)) {\n const colorize = defs[type];\n\n if (colorize) {\n highlighted += value.split(NEWLINE).map(str => colorize(str)).join(\"\\n\");\n } else {\n highlighted += value;\n }\n }\n\n return highlighted;\n}\n\nfunction shouldHighlight(options) {\n return !!_chalk.supportsColor || options.forceColor;\n}\n\nfunction getChalk(options) {\n return options.forceColor ? new _chalk.constructor({\n enabled: true,\n level: 1\n }) : _chalk;\n}\n\nfunction highlight(code, options = {}) {\n if (shouldHighlight(options)) {\n const chalk = getChalk(options);\n const defs = getDefs(chalk);\n return highlightTokens(defs, code);\n } else {\n return code;\n }\n}\n\n//# sourceURL=file://cloudcmd/node_modules/@babel/highlight/lib/index.js");
|
|
371
371
|
|
|
372
372
|
/***/ }),
|
|
373
373
|
|
|
@@ -391,7 +391,7 @@ eval("/* WEBPACK VAR INJECTION */(function(module) {\nconst colorConvert = __web
|
|
|
391
391
|
/***/ (function(module, exports, __webpack_require__) {
|
|
392
392
|
|
|
393
393
|
"use strict";
|
|
394
|
-
eval("/* WEBPACK VAR INJECTION */(function(process) {\nconst escapeStringRegexp = __webpack_require__(/*! escape-string-regexp */ \"./node_modules/escape-string-regexp/index.js\");\nconst ansiStyles = __webpack_require__(/*! ansi-styles */ \"./node_modules/@babel/highlight/node_modules/ansi-styles/index.js\");\nconst stdoutColor = __webpack_require__(/*! supports-color */ \"./node_modules/supports-color/browser.js\").stdout;\n\nconst template = __webpack_require__(/*! ./templates.js */ \"./node_modules/@babel/highlight/node_modules/chalk/templates.js\");\n\nconst isSimpleWindowsTerm = process.platform === 'win32' && !(process.env.TERM || '').toLowerCase().startsWith('xterm');\n\n// `supportsColor.level` → `ansiStyles.color[name]` mapping\nconst levelMapping = ['ansi', 'ansi', 'ansi256', 'ansi16m'];\n\n// `color-convert` models to exclude from the Chalk API due to conflicts and such\nconst skipModels = new Set(['gray']);\n\nconst styles = Object.create(null);\n\nfunction applyOptions(obj, options) {\n\toptions = options || {};\n\n\t// Detect level if not set manually\n\tconst scLevel = stdoutColor ? stdoutColor.level : 0;\n\tobj.level = options.level === undefined ? scLevel : options.level;\n\tobj.enabled = 'enabled' in options ? options.enabled : obj.level > 0;\n}\n\nfunction Chalk(options) {\n\t// We check for this.template here since calling `chalk.constructor()`\n\t// by itself will have a `this` of a previously constructed chalk object\n\tif (!this || !(this instanceof Chalk) || this.template) {\n\t\tconst chalk = {};\n\t\tapplyOptions(chalk, options);\n\n\t\tchalk.template = function () {\n\t\t\tconst args = [].slice.call(arguments);\n\t\t\treturn chalkTag.apply(null, [chalk.template].concat(args));\n\t\t};\n\n\t\tObject.setPrototypeOf(chalk, Chalk.prototype);\n\t\tObject.setPrototypeOf(chalk.template, chalk);\n\n\t\tchalk.template.constructor = Chalk;\n\n\t\treturn chalk.template;\n\t}\n\n\tapplyOptions(this, options);\n}\n\n// Use bright blue on Windows as the normal blue color is illegible\nif (isSimpleWindowsTerm) {\n\tansiStyles.blue.open = '\\u001B[94m';\n}\n\nfor (const key of Object.keys(ansiStyles)) {\n\tansiStyles[key].closeRe = new RegExp(escapeStringRegexp(ansiStyles[key].close), 'g');\n\n\tstyles[key] = {\n\t\tget() {\n\t\t\tconst codes = ansiStyles[key];\n\t\t\treturn build.call(this, this._styles ? this._styles.concat(codes) : [codes], this._empty, key);\n\t\t}\n\t};\n}\n\nstyles.visible = {\n\tget() {\n\t\treturn build.call(this, this._styles || [], true, 'visible');\n\t}\n};\n\nansiStyles.color.closeRe = new RegExp(escapeStringRegexp(ansiStyles.color.close), 'g');\nfor (const model of Object.keys(ansiStyles.color.ansi)) {\n\tif (skipModels.has(model)) {\n\t\tcontinue;\n\t}\n\n\tstyles[model] = {\n\t\tget() {\n\t\t\tconst level = this.level;\n\t\t\treturn function () {\n\t\t\t\tconst open = ansiStyles.color[levelMapping[level]][model].apply(null, arguments);\n\t\t\t\tconst codes = {\n\t\t\t\t\topen,\n\t\t\t\t\tclose: ansiStyles.color.close,\n\t\t\t\t\tcloseRe: ansiStyles.color.closeRe\n\t\t\t\t};\n\t\t\t\treturn build.call(this, this._styles ? this._styles.concat(codes) : [codes], this._empty, model);\n\t\t\t};\n\t\t}\n\t};\n}\n\nansiStyles.bgColor.closeRe = new RegExp(escapeStringRegexp(ansiStyles.bgColor.close), 'g');\nfor (const model of Object.keys(ansiStyles.bgColor.ansi)) {\n\tif (skipModels.has(model)) {\n\t\tcontinue;\n\t}\n\n\tconst bgModel = 'bg' + model[0].toUpperCase() + model.slice(1);\n\tstyles[bgModel] = {\n\t\tget() {\n\t\t\tconst level = this.level;\n\t\t\treturn function () {\n\t\t\t\tconst open = ansiStyles.bgColor[levelMapping[level]][model].apply(null, arguments);\n\t\t\t\tconst codes = {\n\t\t\t\t\topen,\n\t\t\t\t\tclose: ansiStyles.bgColor.close,\n\t\t\t\t\tcloseRe: ansiStyles.bgColor.closeRe\n\t\t\t\t};\n\t\t\t\treturn build.call(this, this._styles ? this._styles.concat(codes) : [codes], this._empty, model);\n\t\t\t};\n\t\t}\n\t};\n}\n\nconst proto = Object.defineProperties(() => {}, styles);\n\nfunction build(_styles, _empty, key) {\n\tconst builder = function () {\n\t\treturn applyStyle.apply(builder, arguments);\n\t};\n\n\tbuilder._styles = _styles;\n\tbuilder._empty = _empty;\n\n\tconst self = this;\n\n\tObject.defineProperty(builder, 'level', {\n\t\tenumerable: true,\n\t\tget() {\n\t\t\treturn self.level;\n\t\t},\n\t\tset(level) {\n\t\t\tself.level = level;\n\t\t}\n\t});\n\n\tObject.defineProperty(builder, 'enabled', {\n\t\tenumerable: true,\n\t\tget() {\n\t\t\treturn self.enabled;\n\t\t},\n\t\tset(enabled) {\n\t\t\tself.enabled = enabled;\n\t\t}\n\t});\n\n\t// See below for fix regarding invisible grey/dim combination on Windows\n\tbuilder.hasGrey = this.hasGrey || key === 'gray' || key === 'grey';\n\n\t// `__proto__` is used because we must return a function, but there is\n\t// no way to create a function with a different prototype\n\tbuilder.__proto__ = proto; // eslint-disable-line no-proto\n\n\treturn builder;\n}\n\nfunction applyStyle() {\n\t// Support varags, but simply cast to string in case there's only one arg\n\tconst args = arguments;\n\tconst argsLen = args.length;\n\tlet str = String(arguments[0]);\n\n\tif (argsLen === 0) {\n\t\treturn '';\n\t}\n\n\tif (argsLen > 1) {\n\t\t// Don't slice `arguments`, it prevents V8 optimizations\n\t\tfor (let a = 1; a < argsLen; a++) {\n\t\t\tstr += ' ' + args[a];\n\t\t}\n\t}\n\n\tif (!this.enabled || this.level <= 0 || !str) {\n\t\treturn this._empty ? '' : str;\n\t}\n\n\t// Turns out that on Windows dimmed gray text becomes invisible in cmd.exe,\n\t// see https://github.com/chalk/chalk/issues/58\n\t// If we're on Windows and we're dealing with a gray color, temporarily make 'dim' a noop.\n\tconst originalDim = ansiStyles.dim.open;\n\tif (isSimpleWindowsTerm && this.hasGrey) {\n\t\tansiStyles.dim.open = '';\n\t}\n\n\tfor (const code of this._styles.slice().reverse()) {\n\t\t// Replace any instances already present with a re-opening code\n\t\t// otherwise only the part of the string until said closing code\n\t\t// will be colored, and the rest will simply be 'plain'.\n\t\tstr = code.open + str.replace(code.closeRe, code.open) + code.close;\n\n\t\t// Close the styling before a linebreak and reopen\n\t\t// after next line to fix a bleed issue on macOS\n\t\t// https://github.com/chalk/chalk/pull/92\n\t\tstr = str.replace(/\\r?\\n/g, `${code.close}$&${code.open}`);\n\t}\n\n\t// Reset the original `dim` if we changed it to work around the Windows dimmed gray issue\n\tansiStyles.dim.open = originalDim;\n\n\treturn str;\n}\n\nfunction chalkTag(chalk, strings) {\n\tif (!Array.isArray(strings)) {\n\t\t// If chalk() was called by itself or with a string,\n\t\t// return the string itself as a string.\n\t\treturn [].slice.call(arguments, 1).join(' ');\n\t}\n\n\tconst args = [].slice.call(arguments, 2);\n\tconst parts = [strings.raw[0]];\n\n\tfor (let i = 1; i < strings.length; i++) {\n\t\tparts.push(String(args[i - 1]).replace(/[{}\\\\]/g, '\\\\$&'));\n\t\tparts.push(String(strings.raw[i]));\n\t}\n\n\treturn template(chalk, parts.join(''));\n}\n\nObject.defineProperties(Chalk.prototype, styles);\n\nmodule.exports = Chalk(); // eslint-disable-line new-cap\nmodule.exports.supportsColor = stdoutColor;\nmodule.exports.default = module.exports; // For TypeScript\n\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../../../process/browser.js */ \"./node_modules/process/browser.js\")))\n\n//# sourceURL=file://cloudcmd/node_modules/@babel/highlight/node_modules/chalk/index.js");
|
|
394
|
+
eval("/* WEBPACK VAR INJECTION */(function(process) {\nconst escapeStringRegexp = __webpack_require__(/*! escape-string-regexp */ \"./node_modules/@babel/highlight/node_modules/escape-string-regexp/index.js\");\nconst ansiStyles = __webpack_require__(/*! ansi-styles */ \"./node_modules/@babel/highlight/node_modules/ansi-styles/index.js\");\nconst stdoutColor = __webpack_require__(/*! supports-color */ \"./node_modules/supports-color/browser.js\").stdout;\n\nconst template = __webpack_require__(/*! ./templates.js */ \"./node_modules/@babel/highlight/node_modules/chalk/templates.js\");\n\nconst isSimpleWindowsTerm = process.platform === 'win32' && !(process.env.TERM || '').toLowerCase().startsWith('xterm');\n\n// `supportsColor.level` → `ansiStyles.color[name]` mapping\nconst levelMapping = ['ansi', 'ansi', 'ansi256', 'ansi16m'];\n\n// `color-convert` models to exclude from the Chalk API due to conflicts and such\nconst skipModels = new Set(['gray']);\n\nconst styles = Object.create(null);\n\nfunction applyOptions(obj, options) {\n\toptions = options || {};\n\n\t// Detect level if not set manually\n\tconst scLevel = stdoutColor ? stdoutColor.level : 0;\n\tobj.level = options.level === undefined ? scLevel : options.level;\n\tobj.enabled = 'enabled' in options ? options.enabled : obj.level > 0;\n}\n\nfunction Chalk(options) {\n\t// We check for this.template here since calling `chalk.constructor()`\n\t// by itself will have a `this` of a previously constructed chalk object\n\tif (!this || !(this instanceof Chalk) || this.template) {\n\t\tconst chalk = {};\n\t\tapplyOptions(chalk, options);\n\n\t\tchalk.template = function () {\n\t\t\tconst args = [].slice.call(arguments);\n\t\t\treturn chalkTag.apply(null, [chalk.template].concat(args));\n\t\t};\n\n\t\tObject.setPrototypeOf(chalk, Chalk.prototype);\n\t\tObject.setPrototypeOf(chalk.template, chalk);\n\n\t\tchalk.template.constructor = Chalk;\n\n\t\treturn chalk.template;\n\t}\n\n\tapplyOptions(this, options);\n}\n\n// Use bright blue on Windows as the normal blue color is illegible\nif (isSimpleWindowsTerm) {\n\tansiStyles.blue.open = '\\u001B[94m';\n}\n\nfor (const key of Object.keys(ansiStyles)) {\n\tansiStyles[key].closeRe = new RegExp(escapeStringRegexp(ansiStyles[key].close), 'g');\n\n\tstyles[key] = {\n\t\tget() {\n\t\t\tconst codes = ansiStyles[key];\n\t\t\treturn build.call(this, this._styles ? this._styles.concat(codes) : [codes], this._empty, key);\n\t\t}\n\t};\n}\n\nstyles.visible = {\n\tget() {\n\t\treturn build.call(this, this._styles || [], true, 'visible');\n\t}\n};\n\nansiStyles.color.closeRe = new RegExp(escapeStringRegexp(ansiStyles.color.close), 'g');\nfor (const model of Object.keys(ansiStyles.color.ansi)) {\n\tif (skipModels.has(model)) {\n\t\tcontinue;\n\t}\n\n\tstyles[model] = {\n\t\tget() {\n\t\t\tconst level = this.level;\n\t\t\treturn function () {\n\t\t\t\tconst open = ansiStyles.color[levelMapping[level]][model].apply(null, arguments);\n\t\t\t\tconst codes = {\n\t\t\t\t\topen,\n\t\t\t\t\tclose: ansiStyles.color.close,\n\t\t\t\t\tcloseRe: ansiStyles.color.closeRe\n\t\t\t\t};\n\t\t\t\treturn build.call(this, this._styles ? this._styles.concat(codes) : [codes], this._empty, model);\n\t\t\t};\n\t\t}\n\t};\n}\n\nansiStyles.bgColor.closeRe = new RegExp(escapeStringRegexp(ansiStyles.bgColor.close), 'g');\nfor (const model of Object.keys(ansiStyles.bgColor.ansi)) {\n\tif (skipModels.has(model)) {\n\t\tcontinue;\n\t}\n\n\tconst bgModel = 'bg' + model[0].toUpperCase() + model.slice(1);\n\tstyles[bgModel] = {\n\t\tget() {\n\t\t\tconst level = this.level;\n\t\t\treturn function () {\n\t\t\t\tconst open = ansiStyles.bgColor[levelMapping[level]][model].apply(null, arguments);\n\t\t\t\tconst codes = {\n\t\t\t\t\topen,\n\t\t\t\t\tclose: ansiStyles.bgColor.close,\n\t\t\t\t\tcloseRe: ansiStyles.bgColor.closeRe\n\t\t\t\t};\n\t\t\t\treturn build.call(this, this._styles ? this._styles.concat(codes) : [codes], this._empty, model);\n\t\t\t};\n\t\t}\n\t};\n}\n\nconst proto = Object.defineProperties(() => {}, styles);\n\nfunction build(_styles, _empty, key) {\n\tconst builder = function () {\n\t\treturn applyStyle.apply(builder, arguments);\n\t};\n\n\tbuilder._styles = _styles;\n\tbuilder._empty = _empty;\n\n\tconst self = this;\n\n\tObject.defineProperty(builder, 'level', {\n\t\tenumerable: true,\n\t\tget() {\n\t\t\treturn self.level;\n\t\t},\n\t\tset(level) {\n\t\t\tself.level = level;\n\t\t}\n\t});\n\n\tObject.defineProperty(builder, 'enabled', {\n\t\tenumerable: true,\n\t\tget() {\n\t\t\treturn self.enabled;\n\t\t},\n\t\tset(enabled) {\n\t\t\tself.enabled = enabled;\n\t\t}\n\t});\n\n\t// See below for fix regarding invisible grey/dim combination on Windows\n\tbuilder.hasGrey = this.hasGrey || key === 'gray' || key === 'grey';\n\n\t// `__proto__` is used because we must return a function, but there is\n\t// no way to create a function with a different prototype\n\tbuilder.__proto__ = proto; // eslint-disable-line no-proto\n\n\treturn builder;\n}\n\nfunction applyStyle() {\n\t// Support varags, but simply cast to string in case there's only one arg\n\tconst args = arguments;\n\tconst argsLen = args.length;\n\tlet str = String(arguments[0]);\n\n\tif (argsLen === 0) {\n\t\treturn '';\n\t}\n\n\tif (argsLen > 1) {\n\t\t// Don't slice `arguments`, it prevents V8 optimizations\n\t\tfor (let a = 1; a < argsLen; a++) {\n\t\t\tstr += ' ' + args[a];\n\t\t}\n\t}\n\n\tif (!this.enabled || this.level <= 0 || !str) {\n\t\treturn this._empty ? '' : str;\n\t}\n\n\t// Turns out that on Windows dimmed gray text becomes invisible in cmd.exe,\n\t// see https://github.com/chalk/chalk/issues/58\n\t// If we're on Windows and we're dealing with a gray color, temporarily make 'dim' a noop.\n\tconst originalDim = ansiStyles.dim.open;\n\tif (isSimpleWindowsTerm && this.hasGrey) {\n\t\tansiStyles.dim.open = '';\n\t}\n\n\tfor (const code of this._styles.slice().reverse()) {\n\t\t// Replace any instances already present with a re-opening code\n\t\t// otherwise only the part of the string until said closing code\n\t\t// will be colored, and the rest will simply be 'plain'.\n\t\tstr = code.open + str.replace(code.closeRe, code.open) + code.close;\n\n\t\t// Close the styling before a linebreak and reopen\n\t\t// after next line to fix a bleed issue on macOS\n\t\t// https://github.com/chalk/chalk/pull/92\n\t\tstr = str.replace(/\\r?\\n/g, `${code.close}$&${code.open}`);\n\t}\n\n\t// Reset the original `dim` if we changed it to work around the Windows dimmed gray issue\n\tansiStyles.dim.open = originalDim;\n\n\treturn str;\n}\n\nfunction chalkTag(chalk, strings) {\n\tif (!Array.isArray(strings)) {\n\t\t// If chalk() was called by itself or with a string,\n\t\t// return the string itself as a string.\n\t\treturn [].slice.call(arguments, 1).join(' ');\n\t}\n\n\tconst args = [].slice.call(arguments, 2);\n\tconst parts = [strings.raw[0]];\n\n\tfor (let i = 1; i < strings.length; i++) {\n\t\tparts.push(String(args[i - 1]).replace(/[{}\\\\]/g, '\\\\$&'));\n\t\tparts.push(String(strings.raw[i]));\n\t}\n\n\treturn template(chalk, parts.join(''));\n}\n\nObject.defineProperties(Chalk.prototype, styles);\n\nmodule.exports = Chalk(); // eslint-disable-line new-cap\nmodule.exports.supportsColor = stdoutColor;\nmodule.exports.default = module.exports; // For TypeScript\n\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../../../process/browser.js */ \"./node_modules/process/browser.js\")))\n\n//# sourceURL=file://cloudcmd/node_modules/@babel/highlight/node_modules/chalk/index.js");
|
|
395
395
|
|
|
396
396
|
/***/ }),
|
|
397
397
|
|
|
@@ -407,6 +407,18 @@ eval("\nconst TEMPLATE_REGEX = /(?:\\\\(u[a-f\\d]{4}|x[a-f\\d]{2}|.))|(?:\\{(~)?
|
|
|
407
407
|
|
|
408
408
|
/***/ }),
|
|
409
409
|
|
|
410
|
+
/***/ "./node_modules/@babel/highlight/node_modules/escape-string-regexp/index.js":
|
|
411
|
+
/*!**********************************************************************************!*\
|
|
412
|
+
!*** ./node_modules/@babel/highlight/node_modules/escape-string-regexp/index.js ***!
|
|
413
|
+
\**********************************************************************************/
|
|
414
|
+
/*! no static exports found */
|
|
415
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
416
|
+
|
|
417
|
+
"use strict";
|
|
418
|
+
eval("\n\nvar matchOperatorsRe = /[|\\\\{}()[\\]^$+*?.]/g;\n\nmodule.exports = function (str) {\n\tif (typeof str !== 'string') {\n\t\tthrow new TypeError('Expected a string');\n\t}\n\n\treturn str.replace(matchOperatorsRe, '\\\\$&');\n};\n\n\n//# sourceURL=file://cloudcmd/node_modules/@babel/highlight/node_modules/escape-string-regexp/index.js");
|
|
419
|
+
|
|
420
|
+
/***/ }),
|
|
421
|
+
|
|
410
422
|
/***/ "./node_modules/@cloudcmd/clipboard/lib/clipboard.js":
|
|
411
423
|
/*!***********************************************************!*\
|
|
412
424
|
!*** ./node_modules/@cloudcmd/clipboard/lib/clipboard.js ***!
|
|
@@ -677,18 +689,6 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) *
|
|
|
677
689
|
|
|
678
690
|
/***/ }),
|
|
679
691
|
|
|
680
|
-
/***/ "./node_modules/escape-string-regexp/index.js":
|
|
681
|
-
/*!****************************************************!*\
|
|
682
|
-
!*** ./node_modules/escape-string-regexp/index.js ***!
|
|
683
|
-
\****************************************************/
|
|
684
|
-
/*! no static exports found */
|
|
685
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
686
|
-
|
|
687
|
-
"use strict";
|
|
688
|
-
eval("\n\nvar matchOperatorsRe = /[|\\\\{}()[\\]^$+*?.]/g;\n\nmodule.exports = function (str) {\n\tif (typeof str !== 'string') {\n\t\tthrow new TypeError('Expected a string');\n\t}\n\n\treturn str.replace(matchOperatorsRe, '\\\\$&');\n};\n\n\n//# sourceURL=file://cloudcmd/node_modules/escape-string-regexp/index.js");
|
|
689
|
-
|
|
690
|
-
/***/ }),
|
|
691
|
-
|
|
692
692
|
/***/ "./node_modules/execon/lib/exec.js":
|
|
693
693
|
/*!*****************************************!*\
|
|
694
694
|
!*** ./node_modules/execon/lib/exec.js ***!
|