cloudcmd 19.20.8 → 19.21.0
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 +8 -0
- package/HELP.md +2 -1
- package/README.md +1 -1
- package/dist/cloudcmd.common.css +1 -1
- package/dist/cloudcmd.common.css.map +1 -1
- package/dist/cloudcmd.common.js +19 -13729
- package/dist/cloudcmd.common.js.map +1 -1
- package/dist/cloudcmd.js +1 -165
- package/dist/cloudcmd.js.map +1 -1
- package/dist/columns/name-size-date-time.js +0 -7
- package/dist/columns/name-size-date.js +0 -7
- package/dist/columns/name-size.js +0 -7
- package/dist/config.js +0 -7
- package/dist/help.js +0 -7
- package/dist/index.html +1 -8
- package/dist/modules/cloud.js +1 -165
- package/dist/modules/cloud.js.map +1 -1
- package/dist/modules/command-line.js +1 -165
- package/dist/modules/command-line.js.map +1 -1
- package/dist/modules/config.js +1 -165
- package/dist/modules/config.js.map +1 -1
- package/dist/modules/contact.js +1 -165
- package/dist/modules/contact.js.map +1 -1
- package/dist/modules/edit-file-vim.js +1 -165
- package/dist/modules/edit-file-vim.js.map +1 -1
- package/dist/modules/edit-file.js +1 -165
- package/dist/modules/edit-file.js.map +1 -1
- package/dist/modules/edit-names-vim.js +1 -165
- package/dist/modules/edit-names-vim.js.map +1 -1
- package/dist/modules/edit-names.js +1 -165
- package/dist/modules/edit-names.js.map +1 -1
- package/dist/modules/edit.js +1 -165
- package/dist/modules/edit.js.map +1 -1
- package/dist/modules/help.js +1 -165
- package/dist/modules/help.js.map +1 -1
- package/dist/modules/konsole.js +1 -165
- package/dist/modules/konsole.js.map +1 -1
- package/dist/modules/markdown.js +1 -165
- package/dist/modules/markdown.js.map +1 -1
- package/dist/modules/menu.js +117 -162
- package/dist/modules/menu.js.map +1 -1
- package/dist/modules/operation.js +1 -165
- package/dist/modules/operation.js.map +1 -1
- package/dist/modules/polyfill.js +1 -165
- package/dist/modules/polyfill.js.map +1 -1
- package/dist/modules/terminal-run.js +1 -165
- package/dist/modules/terminal-run.js.map +1 -1
- package/dist/modules/terminal.js +1 -165
- package/dist/modules/terminal.js.map +1 -1
- package/dist/modules/upload.js +1 -165
- package/dist/modules/upload.js.map +1 -1
- package/dist/modules/user-menu.js +1 -165
- package/dist/modules/user-menu.js.map +1 -1
- package/dist/modules/view.js +1 -165
- package/dist/modules/view.js.map +1 -1
- package/dist/nojs.js +0 -7
- package/dist/sw.js +1 -354
- package/dist/sw.js.map +1 -1
- package/dist/terminal.js +0 -7
- package/dist/themes/dark.js +0 -7
- package/dist/themes/light.js +0 -7
- package/dist/user-menu.js +0 -7
- package/dist/view.js +0 -7
- package/dist-dev/cloudcmd.common.css +86 -86
- package/dist-dev/cloudcmd.common.js +27 -63
- package/dist-dev/cloudcmd.js +0 -7
- package/dist-dev/columns/name-size-date-time.css +1 -1
- package/dist-dev/columns/name-size-date.css +1 -1
- package/dist-dev/columns/name-size.css +1 -1
- package/dist-dev/config.css +1 -1
- package/dist-dev/help.css +1 -1
- package/dist-dev/index.html +0 -10
- package/dist-dev/modules/cloud.js +0 -7
- package/dist-dev/modules/command-line.js +0 -7
- package/dist-dev/modules/config.js +0 -7
- package/dist-dev/modules/contact.js +0 -7
- package/dist-dev/modules/edit-file-vim.js +0 -7
- package/dist-dev/modules/edit-file.js +0 -7
- package/dist-dev/modules/edit-names-vim.js +0 -7
- package/dist-dev/modules/edit-names.js +0 -7
- package/dist-dev/modules/edit.js +0 -7
- package/dist-dev/modules/help.js +0 -7
- package/dist-dev/modules/konsole.js +0 -7
- package/dist-dev/modules/markdown.js +0 -7
- package/dist-dev/modules/menu.js +7817 -8
- package/dist-dev/modules/operation.js +0 -7
- package/dist-dev/modules/polyfill.js +0 -7
- package/dist-dev/modules/terminal-run.js +0 -7
- package/dist-dev/modules/terminal.js +0 -7
- package/dist-dev/modules/upload.js +0 -7
- package/dist-dev/modules/user-menu.js +0 -7
- package/dist-dev/modules/view.js +0 -7
- package/dist-dev/nojs.css +1 -1
- package/dist-dev/sw.js +2 -2
- package/dist-dev/terminal.css +1 -1
- package/dist-dev/themes/dark.css +1 -1
- package/dist-dev/themes/light.css +1 -1
- package/dist-dev/user-menu.css +1 -1
- package/dist-dev/view.css +1 -1
- package/package.json +4 -3
- package/dist/columns/name-size-date-time.js.map +0 -1
- package/dist/columns/name-size-date.js.map +0 -1
- package/dist/columns/name-size.js.map +0 -1
- package/dist/config.js.map +0 -1
- package/dist/help.js.map +0 -1
- package/dist/nojs.js.map +0 -1
- package/dist/terminal.js.map +0 -1
- package/dist/themes/dark.js.map +0 -1
- package/dist/themes/light.js.map +0 -1
- package/dist/user-menu.js.map +0 -1
- package/dist/view.js.map +0 -1
|
@@ -784,24 +784,6 @@ eval("{\n\nvar forEach = __webpack_require__(/*! for-each */ \"./node_modules/fo
|
|
|
784
784
|
"use strict";
|
|
785
785
|
eval("{\n\nconst wrap = (fn) => (...a) => (...b) => fn(...a, ...b);\n\nmodule.exports = (fn, ...a) => {\n check(fn);\n \n if (a.length)\n return wrap(fn)(...a);\n \n return wrap(fn);\n};\n\nfunction check(fn) {\n if (typeof fn !== 'function')\n throw Error('fn should be a function!');\n}\n\n\n\n//# sourceURL=file://cloudcmd//Users/coderaiser/cloudcmd/node_modules/wraptile/lib/wraptile.js\n}");
|
|
786
786
|
|
|
787
|
-
},
|
|
788
|
-
"https://esm.sh/@putout/bundle@5.5"
|
|
789
|
-
/*!****************************************************!*\
|
|
790
|
-
!*** external "https://esm.sh/@putout/bundle@5.5" ***!
|
|
791
|
-
\****************************************************/
|
|
792
|
-
(module) {
|
|
793
|
-
"use strict";
|
|
794
|
-
module.exports = import("https://esm.sh/@putout/bundle@5.5").then(function(module) { return module; });
|
|
795
|
-
|
|
796
|
-
},
|
|
797
|
-
"https://esm.sh/@putout/processor-html"
|
|
798
|
-
/*!********************************************************!*\
|
|
799
|
-
!*** external "https://esm.sh/@putout/processor-html" ***!
|
|
800
|
-
\********************************************************/
|
|
801
|
-
(module) {
|
|
802
|
-
"use strict";
|
|
803
|
-
module.exports = import("https://esm.sh/@putout/processor-html").then(function(module) { return module; });
|
|
804
|
-
|
|
805
787
|
},
|
|
806
788
|
"./node_modules/available-typed-arrays/index.js"
|
|
807
789
|
/*!******************************************************!*\
|
|
@@ -809,7 +791,7 @@ module.exports = import("https://esm.sh/@putout/processor-html").then(function(m
|
|
|
809
791
|
\******************************************************/
|
|
810
792
|
(module, __unused_rspack_exports, __webpack_require__) {
|
|
811
793
|
"use strict";
|
|
812
|
-
eval("{\n\nvar possibleNames = __webpack_require__(/*! possible-typed-array-names */ \"./node_modules/possible-typed-array-names/index.js\");\n\nvar g = typeof globalThis === 'undefined' ? __webpack_require__.g : globalThis;\n\n/** @type {import('.')} */\nmodule.exports = function availableTypedArrays() {\n\tvar /** @type {ReturnType<typeof availableTypedArrays>} */ out = [];\n\tfor (var i = 0; i < possibleNames.length; i++) {\n\t\tif (typeof g[possibleNames[i]] === 'function') {\n\t\t\t// @ts-expect-error\n\t\t\tout[out.length] = possibleNames[i];\n\t\t}\n\t}\n\treturn out;\n};\n\n\n//# sourceURL=file://cloudcmd
|
|
794
|
+
eval("{\n\nvar possibleNames = __webpack_require__(/*! possible-typed-array-names */ \"./node_modules/possible-typed-array-names/index.js\");\n\nvar g = typeof globalThis === 'undefined' ? __webpack_require__.g : globalThis;\n\n/** @type {import('.')} */\nmodule.exports = function availableTypedArrays() {\n\tvar /** @type {ReturnType<typeof availableTypedArrays>} */ out = [];\n\tfor (var i = 0; i < possibleNames.length; i++) {\n\t\tif (typeof g[possibleNames[i]] === 'function') {\n\t\t\t// @ts-expect-error\n\t\t\tout[out.length] = possibleNames[i];\n\t\t}\n\t}\n\treturn out;\n};\n\n\n//# sourceURL=file://cloudcmd//Users/coderaiser/cloudcmd/node_modules/available-typed-arrays/index.js\n}");
|
|
813
795
|
|
|
814
796
|
},
|
|
815
797
|
"./node_modules/jonny/node_modules/try-catch/lib/try-catch.js"
|
|
@@ -818,7 +800,7 @@ eval("{\n\nvar possibleNames = __webpack_require__(/*! possible-typed-array-name
|
|
|
818
800
|
\********************************************************************/
|
|
819
801
|
(module) {
|
|
820
802
|
"use strict";
|
|
821
|
-
eval("{\n\nmodule.exports = (fn, ...args) => {\n try {\n return [null, fn(...args)];\n } catch(e) {\n return [e];\n }\n};\n\n\n\n//# sourceURL=file://cloudcmd
|
|
803
|
+
eval("{\n\nmodule.exports = (fn, ...args) => {\n try {\n return [null, fn(...args)];\n } catch(e) {\n return [e];\n }\n};\n\n\n\n//# sourceURL=file://cloudcmd//Users/coderaiser/cloudcmd/node_modules/jonny/node_modules/try-catch/lib/try-catch.js\n}");
|
|
822
804
|
|
|
823
805
|
},
|
|
824
806
|
"./node_modules/philip/lib/philip.js"
|
|
@@ -827,7 +809,7 @@ eval("{\n\nmodule.exports = (fn, ...args) => {\n try {\n return [null,
|
|
|
827
809
|
\*******************************************/
|
|
828
810
|
(module, __unused_rspack_exports, __webpack_require__) {
|
|
829
811
|
"use strict";
|
|
830
|
-
eval("{\n\nconst findit = __webpack_require__(/*! domfs-findit */ \"./node_modules/domfs-findit/legacy/findit.js\");\nconst Emitify = __webpack_require__(/*! emitify */ \"./node_modules/emitify/lib/emitify.js\");\nconst itchy = __webpack_require__(/*! itchy */ \"./node_modules/itchy/lib/itchy.js\");\nconst inherits = __webpack_require__(/*! inherits */ \"./node_modules/inherits/inherits_browser.js\");\nconst {isArray} = Array;\nconst maybeArray = (a) => isArray(a) ? a : [a];\nconst isFn = (a) => typeof a === 'function';\n\nmodule.exports = Philip;\n\ninherits(Philip, Emitify);\n\nfunction Philip(entries, processingFn) {\n if (!(this instanceof Philip))\n return new Philip(entries, processingFn);\n \n if (!isFn(processingFn))\n throw Error('processingFn should be function!');\n \n Emitify.call(this);\n \n const array = maybeArray(entries);\n \n this._i = 0;\n this._n = 0;\n this._processingFn = processingFn;\n this._pause = false;\n this._prev = 0;\n \n this._find(array, (files, dirs) => {\n this._files = files;\n this._dirs = dirs;\n this._n = files.length + dirs.length;\n this._data = {};\n \n this._getFiles(files, this._data, () => {\n this._process();\n });\n });\n}\n\nPhilip.prototype._process = function() {\n const argsLength = this._processingFn.length;\n const fn = (error) => {\n ++this._i;\n \n if (error) {\n this.emit('error', error);\n this.pause();\n }\n \n this._process();\n this._progress();\n };\n \n let data;\n let name = this._dirs.shift();\n let type = 'directory';\n \n if (!name) {\n type = 'file';\n const el = this._files.shift();\n \n if (el) {\n name = el.fullPath;\n data = this._data[name];\n }\n }\n \n if (!name)\n return this.emit('end');\n \n let args;\n \n if (!this._pause) {\n switch(argsLength) {\n default:\n args = [\n type,\n name,\n data,\n ];\n break;\n \n case 6:\n args = [\n type,\n name,\n data,\n this._i,\n this._n,\n ];\n break;\n }\n \n args.push(fn);\n \n this._processingFn(...args);\n }\n};\n\nPhilip.prototype.pause = function() {\n this._pause = true;\n};\n\nPhilip.prototype.continue = function() {\n if (this._pause) {\n this._pause = false;\n this._process();\n }\n};\n\nPhilip.prototype.abort = function() {\n this._files = [];\n this._dirs = [];\n \n this._process();\n};\n\nPhilip.prototype._progress = function() {\n const value = Math.round(this._i * 100 / this._n);\n \n if (value !== this._prev) {\n this._prev = value;\n this.emit('progress', value);\n }\n};\n\nPhilip.prototype._getFiles = function(files, obj, callback) {\n const filesList = files.slice();\n const current = filesList.shift();\n \n if (!current)\n return callback(null, obj);\n \n current.file((file) => {\n const name = current.fullPath;\n \n obj[name] = file;\n \n this._getFiles(filesList, obj, callback);\n });\n};\n\nPhilip.prototype._find = function(entries, fn) {\n const files = [];\n const dirs = [];\n \n itchy(entries, (entry, callback) => {\n const finder = findit(entry);\n \n finder.on('directory', (name) => {\n dirs.push(name);\n });\n \n finder.on('file', (name, current) => {\n files.push(current);\n });\n \n finder.on('end', () => {\n callback();\n });\n }, () => {\n fn(files, dirs);\n });\n};\n\n\n//# sourceURL=file://cloudcmd
|
|
812
|
+
eval("{\n\nconst findit = __webpack_require__(/*! domfs-findit */ \"./node_modules/domfs-findit/legacy/findit.js\");\nconst Emitify = __webpack_require__(/*! emitify */ \"./node_modules/emitify/lib/emitify.js\");\nconst itchy = __webpack_require__(/*! itchy */ \"./node_modules/itchy/lib/itchy.js\");\nconst inherits = __webpack_require__(/*! inherits */ \"./node_modules/inherits/inherits_browser.js\");\nconst {isArray} = Array;\nconst maybeArray = (a) => isArray(a) ? a : [a];\nconst isFn = (a) => typeof a === 'function';\n\nmodule.exports = Philip;\n\ninherits(Philip, Emitify);\n\nfunction Philip(entries, processingFn) {\n if (!(this instanceof Philip))\n return new Philip(entries, processingFn);\n \n if (!isFn(processingFn))\n throw Error('processingFn should be function!');\n \n Emitify.call(this);\n \n const array = maybeArray(entries);\n \n this._i = 0;\n this._n = 0;\n this._processingFn = processingFn;\n this._pause = false;\n this._prev = 0;\n \n this._find(array, (files, dirs) => {\n this._files = files;\n this._dirs = dirs;\n this._n = files.length + dirs.length;\n this._data = {};\n \n this._getFiles(files, this._data, () => {\n this._process();\n });\n });\n}\n\nPhilip.prototype._process = function() {\n const argsLength = this._processingFn.length;\n const fn = (error) => {\n ++this._i;\n \n if (error) {\n this.emit('error', error);\n this.pause();\n }\n \n this._process();\n this._progress();\n };\n \n let data;\n let name = this._dirs.shift();\n let type = 'directory';\n \n if (!name) {\n type = 'file';\n const el = this._files.shift();\n \n if (el) {\n name = el.fullPath;\n data = this._data[name];\n }\n }\n \n if (!name)\n return this.emit('end');\n \n let args;\n \n if (!this._pause) {\n switch(argsLength) {\n default:\n args = [\n type,\n name,\n data,\n ];\n break;\n \n case 6:\n args = [\n type,\n name,\n data,\n this._i,\n this._n,\n ];\n break;\n }\n \n args.push(fn);\n \n this._processingFn(...args);\n }\n};\n\nPhilip.prototype.pause = function() {\n this._pause = true;\n};\n\nPhilip.prototype.continue = function() {\n if (this._pause) {\n this._pause = false;\n this._process();\n }\n};\n\nPhilip.prototype.abort = function() {\n this._files = [];\n this._dirs = [];\n \n this._process();\n};\n\nPhilip.prototype._progress = function() {\n const value = Math.round(this._i * 100 / this._n);\n \n if (value !== this._prev) {\n this._prev = value;\n this.emit('progress', value);\n }\n};\n\nPhilip.prototype._getFiles = function(files, obj, callback) {\n const filesList = files.slice();\n const current = filesList.shift();\n \n if (!current)\n return callback(null, obj);\n \n current.file((file) => {\n const name = current.fullPath;\n \n obj[name] = file;\n \n this._getFiles(filesList, obj, callback);\n });\n};\n\nPhilip.prototype._find = function(entries, fn) {\n const files = [];\n const dirs = [];\n \n itchy(entries, (entry, callback) => {\n const finder = findit(entry);\n \n finder.on('directory', (name) => {\n dirs.push(name);\n });\n \n finder.on('file', (name, current) => {\n files.push(current);\n });\n \n finder.on('end', () => {\n callback();\n });\n }, () => {\n fn(files, dirs);\n });\n};\n\n\n//# sourceURL=file://cloudcmd//Users/coderaiser/cloudcmd/node_modules/philip/lib/philip.js\n}");
|
|
831
813
|
|
|
832
814
|
},
|
|
833
815
|
"./node_modules/@babel/code-frame/lib/browser.js"
|
|
@@ -836,7 +818,7 @@ eval("{\n\nconst findit = __webpack_require__(/*! domfs-findit */ \"./node_modul
|
|
|
836
818
|
\*******************************************************/
|
|
837
819
|
(__unused_rspack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
838
820
|
"use strict";
|
|
839
|
-
eval("{__webpack_require__.r(__webpack_exports__);\n__webpack_require__.d(__webpack_exports__, {\n codeFrameColumns: () => (codeFrameColumns),\n highlight: () => (highlight)\n});\n/* import */ var _common_shared_js__rspack_import_0 = __webpack_require__(/*! ./common-shared.js */ \"./node_modules/@babel/code-frame/lib/common-shared.js\");\n\n\nfunction codeFrameColumns(rawLines, loc, opts = {}) {\n return (0,_common_shared_js__rspack_import_0._codeFrameColumns)(rawLines, loc, opts);\n}\nfunction highlight(code) {\n return code;\n}\n\n\n
|
|
821
|
+
eval("{__webpack_require__.r(__webpack_exports__);\n__webpack_require__.d(__webpack_exports__, {\n codeFrameColumns: () => (codeFrameColumns),\n highlight: () => (highlight)\n});\n/* import */ var _common_shared_js__rspack_import_0 = __webpack_require__(/*! ./common-shared.js */ \"./node_modules/@babel/code-frame/lib/common-shared.js\");\n\n\nfunction codeFrameColumns(rawLines, loc, opts = {}) {\n return (0,_common_shared_js__rspack_import_0._codeFrameColumns)(rawLines, loc, opts);\n}\nfunction highlight(code) {\n return code;\n}\n\n\n\n\n//# sourceURL=file://cloudcmd//Users/coderaiser/cloudcmd/node_modules/@babel/code-frame/lib/browser.js\n}");
|
|
840
822
|
|
|
841
823
|
},
|
|
842
824
|
"./node_modules/@babel/code-frame/lib/common-shared.js"
|
|
@@ -845,7 +827,7 @@ eval("{__webpack_require__.r(__webpack_exports__);\n__webpack_require__.d(__webp
|
|
|
845
827
|
\*************************************************************/
|
|
846
828
|
(__unused_rspack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
847
829
|
"use strict";
|
|
848
|
-
eval("{__webpack_require__.r(__webpack_exports__);\n__webpack_require__.d(__webpack_exports__, {\n _codeFrameColumns: () => (_codeFrameColumns)\n});\nconst NEWLINE = /\\r\\n|[\\n\\r\\u2028\\u2029]/;\nfunction getMarkerLines(loc, source, opts, startLineBaseZero) {\n const startLoc = {\n column: null,\n line: -1,\n ...loc.start\n };\n const endLoc = {\n ...startLoc,\n ...loc.end\n };\n const {\n linesAbove = 2,\n linesBelow = 3\n } = opts || {};\n const startLine = startLoc.line - startLineBaseZero;\n const startColumn = startLoc.column;\n const endLine = endLoc.line - startLineBaseZero;\n const endColumn = endLoc.column;\n let start = Math.max(startLine - (linesAbove + 1), 0);\n let end = Math.min(source.length, endLine + linesBelow);\n if (startLine === -1) {\n start = 0;\n }\n if (endLine === -1) {\n end = source.length;\n }\n const lineDiff = endLine - startLine;\n const markerLines = {};\n if (lineDiff) {\n for (let i = 0; i <= lineDiff; i++) {\n const lineNumber = i + startLine;\n if (startColumn == null) {\n markerLines[lineNumber] = true;\n } else if (i === 0) {\n const sourceLength = source[lineNumber - 1].length;\n markerLines[lineNumber] = [startColumn, sourceLength - startColumn];\n } else if (i === lineDiff) {\n markerLines[lineNumber] = [0, endColumn];\n } else {\n const sourceLength = source[lineNumber - 1].length;\n markerLines[lineNumber] = [0, sourceLength];\n }\n }\n } else {\n if (startColumn === endColumn) {\n if (startColumn != null) {\n markerLines[startLine] = [startColumn, 0];\n } else {\n markerLines[startLine] = true;\n }\n } else {\n const safeStart = startColumn ?? 0;\n const safeEnd = endColumn ?? safeStart;\n markerLines[startLine] = [safeStart, safeEnd - safeStart];\n }\n }\n return {\n start,\n end,\n markerLines\n };\n}\nfunction _codeFrameColumns(rawLines, loc, opts = {}, colorOpts) {\n const {\n defs,\n highlight\n } = colorOpts || {\n defs: {\n gutter: String,\n marker: String,\n message: String,\n reset: String\n },\n highlight: String\n };\n const startLineBaseZero = (opts.startLine || 1) - 1;\n const lines = rawLines.split(NEWLINE);\n const {\n start,\n end,\n markerLines\n } = getMarkerLines(loc, lines, opts, startLineBaseZero);\n const hasColumns = loc.start && typeof loc.start.column === \"number\";\n const numberMaxWidth = String(end + startLineBaseZero).length;\n const highlightedLines = highlight(rawLines);\n let frame = highlightedLines.split(NEWLINE, end).slice(start, end).map((line, index) => {\n const number = start + 1 + index;\n const paddedNumber = ` ${number + startLineBaseZero}`.slice(-numberMaxWidth);\n const gutter = ` ${paddedNumber} |`;\n const hasMarker = markerLines[number];\n const lastMarkerLine = !markerLines[number + 1];\n if (hasMarker) {\n let markerLine = \"\";\n if (Array.isArray(hasMarker)) {\n const markerSpacing = line.slice(0, hasMarker[0]).replace(/[^\\t]/g, \" \");\n const numberOfMarkers = hasMarker[1] || 1;\n markerLine = [\"\\n \", defs.gutter(gutter.replace(/\\d/g, \" \")), \" \", markerSpacing, defs.marker(\"^\").repeat(numberOfMarkers)].join(\"\");\n if (lastMarkerLine && opts.message) {\n markerLine += \" \" + defs.message(opts.message);\n }\n }\n return [defs.marker(\">\"), defs.gutter(gutter), line.length > 0 ? ` ${line}` : \"\", markerLine].join(\"\");\n } else {\n return ` ${defs.gutter(gutter)}${line.length > 0 ? ` ${line}` : \"\"}`;\n }\n }).join(\"\\n\");\n if (opts.message && !hasColumns) {\n frame = `${\" \".repeat(numberMaxWidth + 1)}${opts.message}\\n${frame}`;\n }\n return defs.reset(frame);\n}\n\n\n
|
|
830
|
+
eval("{__webpack_require__.r(__webpack_exports__);\n__webpack_require__.d(__webpack_exports__, {\n _codeFrameColumns: () => (_codeFrameColumns)\n});\nconst NEWLINE = /\\r\\n|[\\n\\r\\u2028\\u2029]/;\nfunction getMarkerLines(loc, source, opts, startLineBaseZero) {\n const startLoc = {\n column: null,\n line: -1,\n ...loc.start\n };\n const endLoc = {\n ...startLoc,\n ...loc.end\n };\n const {\n linesAbove = 2,\n linesBelow = 3\n } = opts || {};\n const startLine = startLoc.line - startLineBaseZero;\n const startColumn = startLoc.column;\n const endLine = endLoc.line - startLineBaseZero;\n const endColumn = endLoc.column;\n let start = Math.max(startLine - (linesAbove + 1), 0);\n let end = Math.min(source.length, endLine + linesBelow);\n if (startLine === -1) {\n start = 0;\n }\n if (endLine === -1) {\n end = source.length;\n }\n const lineDiff = endLine - startLine;\n const markerLines = {};\n if (lineDiff) {\n for (let i = 0; i <= lineDiff; i++) {\n const lineNumber = i + startLine;\n if (startColumn == null) {\n markerLines[lineNumber] = true;\n } else if (i === 0) {\n const sourceLength = source[lineNumber - 1].length;\n markerLines[lineNumber] = [startColumn, sourceLength - startColumn];\n } else if (i === lineDiff) {\n markerLines[lineNumber] = [0, endColumn];\n } else {\n const sourceLength = source[lineNumber - 1].length;\n markerLines[lineNumber] = [0, sourceLength];\n }\n }\n } else {\n if (startColumn === endColumn) {\n if (startColumn != null) {\n markerLines[startLine] = [startColumn, 0];\n } else {\n markerLines[startLine] = true;\n }\n } else {\n const safeStart = startColumn ?? 0;\n const safeEnd = endColumn ?? safeStart;\n markerLines[startLine] = [safeStart, safeEnd - safeStart];\n }\n }\n return {\n start,\n end,\n markerLines\n };\n}\nfunction _codeFrameColumns(rawLines, loc, opts = {}, colorOpts) {\n const {\n defs,\n highlight\n } = colorOpts || {\n defs: {\n gutter: String,\n marker: String,\n message: String,\n reset: String\n },\n highlight: String\n };\n const startLineBaseZero = (opts.startLine || 1) - 1;\n const lines = rawLines.split(NEWLINE);\n const {\n start,\n end,\n markerLines\n } = getMarkerLines(loc, lines, opts, startLineBaseZero);\n const hasColumns = loc.start && typeof loc.start.column === \"number\";\n const numberMaxWidth = String(end + startLineBaseZero).length;\n const highlightedLines = highlight(rawLines);\n let frame = highlightedLines.split(NEWLINE, end).slice(start, end).map((line, index) => {\n const number = start + 1 + index;\n const paddedNumber = ` ${number + startLineBaseZero}`.slice(-numberMaxWidth);\n const gutter = ` ${paddedNumber} |`;\n const hasMarker = markerLines[number];\n const lastMarkerLine = !markerLines[number + 1];\n if (hasMarker) {\n let markerLine = \"\";\n if (Array.isArray(hasMarker)) {\n const markerSpacing = line.slice(0, hasMarker[0]).replace(/[^\\t]/g, \" \");\n const numberOfMarkers = hasMarker[1] || 1;\n markerLine = [\"\\n \", defs.gutter(gutter.replace(/\\d/g, \" \")), \" \", markerSpacing, defs.marker(\"^\").repeat(numberOfMarkers)].join(\"\");\n if (lastMarkerLine && opts.message) {\n markerLine += \" \" + defs.message(opts.message);\n }\n }\n return [defs.marker(\">\"), defs.gutter(gutter), line.length > 0 ? ` ${line}` : \"\", markerLine].join(\"\");\n } else {\n return ` ${defs.gutter(gutter)}${line.length > 0 ? ` ${line}` : \"\"}`;\n }\n }).join(\"\\n\");\n if (opts.message && !hasColumns) {\n frame = `${\" \".repeat(numberMaxWidth + 1)}${opts.message}\\n${frame}`;\n }\n return defs.reset(frame);\n}\n\n\n\n\n//# sourceURL=file://cloudcmd//Users/coderaiser/cloudcmd/node_modules/@babel/code-frame/lib/common-shared.js\n}");
|
|
849
831
|
|
|
850
832
|
},
|
|
851
833
|
"./node_modules/@cloudcmd/modal/lib/get-class-name.js"
|
|
@@ -854,7 +836,7 @@ eval("{__webpack_require__.r(__webpack_exports__);\n__webpack_require__.d(__webp
|
|
|
854
836
|
\************************************************************/
|
|
855
837
|
(__unused_rspack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
856
838
|
"use strict";
|
|
857
|
-
eval("{__webpack_require__.r(__webpack_exports__);\n__webpack_require__.d(__webpack_exports__, {\n \"default\": () => (__rspack_default_export)\n});\n/* export default */ const __rspack_default_export = (({autoSize, isTitle}) => {\n const classNames = ['modal-main'];\n \n if (autoSize)\n classNames.push('modal-autosize');\n \n if (isTitle)\n classNames.push('modal-is-title');\n \n return classNames.join(' ');\n});\n\n\n//# sourceURL=file://cloudcmd
|
|
839
|
+
eval("{__webpack_require__.r(__webpack_exports__);\n__webpack_require__.d(__webpack_exports__, {\n \"default\": () => (__rspack_default_export)\n});\n/* export default */ const __rspack_default_export = (({autoSize, isTitle}) => {\n const classNames = ['modal-main'];\n \n if (autoSize)\n classNames.push('modal-autosize');\n \n if (isTitle)\n classNames.push('modal-is-title');\n \n return classNames.join(' ');\n});\n\n\n//# sourceURL=file://cloudcmd//Users/coderaiser/cloudcmd/node_modules/@cloudcmd/modal/lib/get-class-name.js\n}");
|
|
858
840
|
|
|
859
841
|
},
|
|
860
842
|
"./node_modules/@cloudcmd/modal/lib/modal.js"
|
|
@@ -863,7 +845,7 @@ eval("{__webpack_require__.r(__webpack_exports__);\n__webpack_require__.d(__webp
|
|
|
863
845
|
\***************************************************/
|
|
864
846
|
(__unused_rspack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
865
847
|
"use strict";
|
|
866
|
-
eval("{__webpack_require__.r(__webpack_exports__);\n__webpack_require__.d(__webpack_exports__, {\n _onMainClick: () => (_onMainClick),\n _optionsStore: () => (_optionsStore),\n close: () => (close),\n open: () => (open)\n});\n/* import */ var _css_modal_css__rspack_import_0 = __webpack_require__(/*! ../css/modal.css */ \"./node_modules/@cloudcmd/modal/css/modal.css\");\n/* import */ var fullstore__rspack_import_1 = __webpack_require__(/*! fullstore */ \"./node_modules/fullstore/lib/fullstore.js\");\n/* import */ var currify__rspack_import_2 = __webpack_require__(/*! currify */ \"./node_modules/currify/lib/currify.js\");\n/* import */ var _cloudcmd_create_element__rspack_import_3 = __webpack_require__(/*! @cloudcmd/create-element */ \"./node_modules/@cloudcmd/create-element/lib/create-element.js\");\n/* import */ var _parse_images_js__rspack_import_4 = __webpack_require__(/*! ./parse-images.js */ \"./node_modules/@cloudcmd/modal/lib/parse-images.js\");\n/* import */ var _show_title_js__rspack_import_5 = __webpack_require__(/*! ./show-title.js */ \"./node_modules/@cloudcmd/modal/lib/show-title.js\");\n/* import */ var _query_js__rspack_import_6 = __webpack_require__(/*! ./query.js */ \"./node_modules/@cloudcmd/modal/lib/query.js\");\n/* import */ var _get_class_name_js__rspack_import_7 = __webpack_require__(/*! ./get-class-name.js */ \"./node_modules/@cloudcmd/modal/lib/get-class-name.js\");\n\n\n\n\n\n\n\n\n\nconst noop = () => {};\n\nconst optionsStore = (0,fullstore__rspack_import_1.fullstore)({});\n\nconst innerHTML = `\n <div class=\"modal-child\" data-name=\"modal-child\">\n <div class=\"modal-close\" data-name=\"modal-close\"></div>\n </div>\n`;\n\nconst addEvent = currify__rspack_import_2((el, fn, query, name) => query(el).addEventListener(name, fn));\nconst _addAllEvents = (el, fn, query, names) => names.map(addEvent(el, fn, query));\n\nconst {isArray} = Array;\n\nconst open = (inner, options = {}) => {\n check(inner);\n \n const {\n beforeShow = noop,\n beforeClose = noop,\n afterShow = noop,\n afterClose = noop,\n onOverlayClick = noop,\n autoSize = false,\n index = 0,\n helpers = {},\n title = '',\n query = _query_js__rspack_import_6[\"default\"],\n showTitle = _show_title_js__rspack_import_5[\"default\"],\n parseImages = _parse_images_js__rspack_import_4[\"default\"],\n addAllEvents = _addAllEvents,\n } = options;\n \n if (query('main'))\n return;\n \n optionsStore({\n beforeClose,\n afterClose,\n });\n \n beforeShow();\n \n const isImage = isArray(inner);\n const isTitle = helpers.title && title || isImage;\n \n const className = (0,_get_class_name_js__rspack_import_7[\"default\"])({\n autoSize,\n isTitle,\n });\n \n const el = _cloudcmd_create_element__rspack_import_3('div', {\n innerHTML,\n className,\n dataName: 'modal-main',\n });\n \n addAllEvents('main', onMainClick(onOverlayClick), query, ['mousedown', 'contextmenu']);\n \n query('close').addEventListener('click', close);\n \n const child = query('child');\n \n if (isImage)\n return parseImages(child, inner, {\n index,\n afterShow,\n helpers,\n });\n \n child.appendChild(inner);\n \n if (isTitle)\n showTitle(title, child);\n \n afterShow();\n \n return el;\n};\n\nconst onMainClick = (overlayClick, overrides = {}) => (event) => {\n const {query = _query_js__rspack_import_6[\"default\"]} = overrides;\n \n if (event.target !== query('main'))\n return;\n \n close(event);\n overlayClick(event);\n};\n\nconst close = (event, overrides = {}) => {\n const {query = _query_js__rspack_import_6[\"default\"]} = overrides;\n \n if (event)\n event.stopPropagation();\n \n const el = query('main');\n \n const {\n beforeClose = noop,\n afterClose = noop,\n } = optionsStore();\n \n if (!el)\n return;\n \n beforeClose();\n \n document.body.removeChild(el);\n \n afterClose();\n};\n\nconst _optionsStore = optionsStore;\nconst _onMainClick = onMainClick;\n\nfunction check(inner) {\n if (!inner)\n throw Error('inner should be DOM-element!');\n}\n\n\n//# sourceURL=file://cloudcmd
|
|
848
|
+
eval("{__webpack_require__.r(__webpack_exports__);\n__webpack_require__.d(__webpack_exports__, {\n _onMainClick: () => (_onMainClick),\n _optionsStore: () => (_optionsStore),\n close: () => (close),\n open: () => (open)\n});\n/* import */ var _css_modal_css__rspack_import_0 = __webpack_require__(/*! ../css/modal.css */ \"./node_modules/@cloudcmd/modal/css/modal.css\");\n/* import */ var fullstore__rspack_import_1 = __webpack_require__(/*! fullstore */ \"./node_modules/fullstore/lib/fullstore.js\");\n/* import */ var currify__rspack_import_2 = __webpack_require__(/*! currify */ \"./node_modules/currify/lib/currify.js\");\n/* import */ var _cloudcmd_create_element__rspack_import_3 = __webpack_require__(/*! @cloudcmd/create-element */ \"./node_modules/@cloudcmd/create-element/lib/create-element.js\");\n/* import */ var _parse_images_js__rspack_import_4 = __webpack_require__(/*! ./parse-images.js */ \"./node_modules/@cloudcmd/modal/lib/parse-images.js\");\n/* import */ var _show_title_js__rspack_import_5 = __webpack_require__(/*! ./show-title.js */ \"./node_modules/@cloudcmd/modal/lib/show-title.js\");\n/* import */ var _query_js__rspack_import_6 = __webpack_require__(/*! ./query.js */ \"./node_modules/@cloudcmd/modal/lib/query.js\");\n/* import */ var _get_class_name_js__rspack_import_7 = __webpack_require__(/*! ./get-class-name.js */ \"./node_modules/@cloudcmd/modal/lib/get-class-name.js\");\n\n\n\n\n\n\n\n\n\nconst noop = () => {};\n\nconst optionsStore = (0,fullstore__rspack_import_1.fullstore)({});\n\nconst innerHTML = `\n <div class=\"modal-child\" data-name=\"modal-child\">\n <div class=\"modal-close\" data-name=\"modal-close\"></div>\n </div>\n`;\n\nconst addEvent = currify__rspack_import_2((el, fn, query, name) => query(el).addEventListener(name, fn));\nconst _addAllEvents = (el, fn, query, names) => names.map(addEvent(el, fn, query));\n\nconst {isArray} = Array;\n\nconst open = (inner, options = {}) => {\n check(inner);\n \n const {\n beforeShow = noop,\n beforeClose = noop,\n afterShow = noop,\n afterClose = noop,\n onOverlayClick = noop,\n autoSize = false,\n index = 0,\n helpers = {},\n title = '',\n query = _query_js__rspack_import_6[\"default\"],\n showTitle = _show_title_js__rspack_import_5[\"default\"],\n parseImages = _parse_images_js__rspack_import_4[\"default\"],\n addAllEvents = _addAllEvents,\n } = options;\n \n if (query('main'))\n return;\n \n optionsStore({\n beforeClose,\n afterClose,\n });\n \n beforeShow();\n \n const isImage = isArray(inner);\n const isTitle = helpers.title && title || isImage;\n \n const className = (0,_get_class_name_js__rspack_import_7[\"default\"])({\n autoSize,\n isTitle,\n });\n \n const el = _cloudcmd_create_element__rspack_import_3('div', {\n innerHTML,\n className,\n dataName: 'modal-main',\n });\n \n addAllEvents('main', onMainClick(onOverlayClick), query, ['mousedown', 'contextmenu']);\n \n query('close').addEventListener('click', close);\n \n const child = query('child');\n \n if (isImage)\n return parseImages(child, inner, {\n index,\n afterShow,\n helpers,\n });\n \n child.appendChild(inner);\n \n if (isTitle)\n showTitle(title, child);\n \n afterShow();\n \n return el;\n};\n\nconst onMainClick = (overlayClick, overrides = {}) => (event) => {\n const {query = _query_js__rspack_import_6[\"default\"]} = overrides;\n \n if (event.target !== query('main'))\n return;\n \n close(event);\n overlayClick(event);\n};\n\nconst close = (event, overrides = {}) => {\n const {query = _query_js__rspack_import_6[\"default\"]} = overrides;\n \n if (event)\n event.stopPropagation();\n \n const el = query('main');\n \n const {\n beforeClose = noop,\n afterClose = noop,\n } = optionsStore();\n \n if (!el)\n return;\n \n beforeClose();\n \n document.body.removeChild(el);\n \n afterClose();\n};\n\nconst _optionsStore = optionsStore;\nconst _onMainClick = onMainClick;\n\nfunction check(inner) {\n if (!inner)\n throw Error('inner should be DOM-element!');\n}\n\n\n//# sourceURL=file://cloudcmd//Users/coderaiser/cloudcmd/node_modules/@cloudcmd/modal/lib/modal.js\n}");
|
|
867
849
|
|
|
868
850
|
},
|
|
869
851
|
"./node_modules/@cloudcmd/modal/lib/parse-images.js"
|
|
@@ -872,7 +854,7 @@ eval("{__webpack_require__.r(__webpack_exports__);\n__webpack_require__.d(__webp
|
|
|
872
854
|
\**********************************************************/
|
|
873
855
|
(__unused_rspack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
874
856
|
"use strict";
|
|
875
|
-
eval("{__webpack_require__.r(__webpack_exports__);\n__webpack_require__.d(__webpack_exports__, {\n _addListenerOnce: () => (_addListenerOnce),\n _helpersStore: () => (_helpersStore),\n _indexStore: () => (_indexStore),\n _onKeydown: () => (_onKeydown),\n _onload: () => (_onload),\n _rmListener: () => (_rmListener),\n \"default\": () => (__rspack_default_export)\n});\n/* import */ var wraptile__rspack_import_0 = __webpack_require__(/*! wraptile */ \"./node_modules/wraptile/lib/wraptile.js\");\n/* import */ var fullstore__rspack_import_1 = __webpack_require__(/*! fullstore */ \"./node_modules/fullstore/lib/fullstore.js\");\n/* import */ var _cloudcmd_create_element__rspack_import_2 = __webpack_require__(/*! @cloudcmd/create-element */ \"./node_modules/@cloudcmd/create-element/lib/create-element.js\");\n/* import */ var _show_title_js__rspack_import_3 = __webpack_require__(/*! ./show-title.js */ \"./node_modules/@cloudcmd/modal/lib/show-title.js\");\n/* import */ var _query_js__rspack_import_4 = __webpack_require__(/*! ./query.js */ \"./node_modules/@cloudcmd/modal/lib/query.js\");\n\n\n\n\n\n\nconst indexStore = (0,fullstore__rspack_import_1.fullstore)();\nconst helpersStore = (0,fullstore__rspack_import_1.fullstore)();\n\nconst next = wraptile__rspack_import_0((img, images) => setImage(indexStore() + 1, img, images));\nconst prev = wraptile__rspack_import_0((img, images) => setImage(indexStore() - 1, img, images));\n\nconst onload = wraptile__rspack_import_0((parent, afterShow) => {\n parent.hidden = false;\n afterShow();\n});\n\nconst onKeydown = (img, images, query) => function keydownListener(e) {\n let i = indexStore();\n \n const ArrowLeft = 37;\n const ArrowRight = 39;\n const Esc = 27;\n \n const {keyCode} = e;\n \n if (keyCode === ArrowLeft) {\n --i;\n } else if (keyCode === ArrowRight) {\n ++i;\n } else {\n if (keyCode === Esc)\n return document.body.removeEventListener('keydown', keydownListener);\n \n return;\n }\n \n setImage(i, img, images, {\n query,\n });\n};\n\nfunction setImage(i, img, images, {query, showTitle}) {\n const n = images.length - 1;\n \n if (i < 0 || i > n)\n return;\n \n indexStore(i);\n \n query('nav-left').hidden = !i;\n query('nav-right').hidden = i === n;\n \n const {href, title} = images[i];\n \n img.src = href;\n img.title = title;\n img.href = title;\n img.alt = title;\n \n if (helpersStore().title)\n showTitle(title, query('child'));\n}\n\n/* export default */ const __rspack_default_export = (parseImages);\n\nfunction parseImages(parent, images, overrides = {}) {\n const {\n afterShow,\n helpers,\n index,\n query = _query_js__rspack_import_4[\"default\"],\n createElement = _cloudcmd_create_element__rspack_import_2,\n showTitle = _show_title_js__rspack_import_3[\"default\"],\n } = overrides;\n \n indexStore(index);\n helpersStore(helpers);\n \n const img = createImage();\n parent.appendChild(img);\n \n parent.hidden = true;\n \n parent.appendChild(createElement('div', {\n className: 'modal-nav modal-nav-left',\n dataName: 'modal-nav-left',\n innerHTML: '<span></span>',\n }));\n \n parent.appendChild(createElement('div', {\n className: 'modal-nav modal-nav-right',\n dataName: 'modal-nav-right',\n innerHTML: '<span data-name=\"modal-next\"></span>',\n }));\n \n setImage(index, img, images, {\n query,\n showTitle,\n });\n addListenerOnce(img, 'load', onload(parent, afterShow));\n \n query('nav-left').addEventListener('click', prev(img, images, query));\n \n query('nav-right').addEventListener('click', next(img, images, query));\n \n document.body.addEventListener('keydown', onKeydown(img, images, query));\n}\n\nfunction createImage() {\n const el = document.createElement('img');\n \n el.className = 'modal-image';\n \n return el;\n}\n\nconst _rmListener = rmListener;\n\nfunction rmListener(el, name, fn) {\n return function f(e) {\n fn(e);\n el.removeEventListener(name, f);\n };\n}\n\nconst _addListenerOnce = addListenerOnce;\n\nfunction addListenerOnce(el, name, fn) {\n el.addEventListener(name, rmListener(el, name, fn));\n}\n\nconst _onKeydown = onKeydown;\nconst _indexStore = indexStore;\nconst _helpersStore = helpersStore;\nconst _onload = onload;\n\n\n//# sourceURL=file://cloudcmd
|
|
857
|
+
eval("{__webpack_require__.r(__webpack_exports__);\n__webpack_require__.d(__webpack_exports__, {\n _addListenerOnce: () => (_addListenerOnce),\n _helpersStore: () => (_helpersStore),\n _indexStore: () => (_indexStore),\n _onKeydown: () => (_onKeydown),\n _onload: () => (_onload),\n _rmListener: () => (_rmListener),\n \"default\": () => (__rspack_default_export)\n});\n/* import */ var wraptile__rspack_import_0 = __webpack_require__(/*! wraptile */ \"./node_modules/wraptile/lib/wraptile.js\");\n/* import */ var fullstore__rspack_import_1 = __webpack_require__(/*! fullstore */ \"./node_modules/fullstore/lib/fullstore.js\");\n/* import */ var _cloudcmd_create_element__rspack_import_2 = __webpack_require__(/*! @cloudcmd/create-element */ \"./node_modules/@cloudcmd/create-element/lib/create-element.js\");\n/* import */ var _show_title_js__rspack_import_3 = __webpack_require__(/*! ./show-title.js */ \"./node_modules/@cloudcmd/modal/lib/show-title.js\");\n/* import */ var _query_js__rspack_import_4 = __webpack_require__(/*! ./query.js */ \"./node_modules/@cloudcmd/modal/lib/query.js\");\n\n\n\n\n\n\nconst indexStore = (0,fullstore__rspack_import_1.fullstore)();\nconst helpersStore = (0,fullstore__rspack_import_1.fullstore)();\n\nconst next = wraptile__rspack_import_0((img, images) => setImage(indexStore() + 1, img, images));\nconst prev = wraptile__rspack_import_0((img, images) => setImage(indexStore() - 1, img, images));\n\nconst onload = wraptile__rspack_import_0((parent, afterShow) => {\n parent.hidden = false;\n afterShow();\n});\n\nconst onKeydown = (img, images, query) => function keydownListener(e) {\n let i = indexStore();\n \n const ArrowLeft = 37;\n const ArrowRight = 39;\n const Esc = 27;\n \n const {keyCode} = e;\n \n if (keyCode === ArrowLeft) {\n --i;\n } else if (keyCode === ArrowRight) {\n ++i;\n } else {\n if (keyCode === Esc)\n return document.body.removeEventListener('keydown', keydownListener);\n \n return;\n }\n \n setImage(i, img, images, {\n query,\n });\n};\n\nfunction setImage(i, img, images, {query, showTitle}) {\n const n = images.length - 1;\n \n if (i < 0 || i > n)\n return;\n \n indexStore(i);\n \n query('nav-left').hidden = !i;\n query('nav-right').hidden = i === n;\n \n const {href, title} = images[i];\n \n img.src = href;\n img.title = title;\n img.href = title;\n img.alt = title;\n \n if (helpersStore().title)\n showTitle(title, query('child'));\n}\n\n/* export default */ const __rspack_default_export = (parseImages);\n\nfunction parseImages(parent, images, overrides = {}) {\n const {\n afterShow,\n helpers,\n index,\n query = _query_js__rspack_import_4[\"default\"],\n createElement = _cloudcmd_create_element__rspack_import_2,\n showTitle = _show_title_js__rspack_import_3[\"default\"],\n } = overrides;\n \n indexStore(index);\n helpersStore(helpers);\n \n const img = createImage();\n parent.appendChild(img);\n \n parent.hidden = true;\n \n parent.appendChild(createElement('div', {\n className: 'modal-nav modal-nav-left',\n dataName: 'modal-nav-left',\n innerHTML: '<span></span>',\n }));\n \n parent.appendChild(createElement('div', {\n className: 'modal-nav modal-nav-right',\n dataName: 'modal-nav-right',\n innerHTML: '<span data-name=\"modal-next\"></span>',\n }));\n \n setImage(index, img, images, {\n query,\n showTitle,\n });\n addListenerOnce(img, 'load', onload(parent, afterShow));\n \n query('nav-left').addEventListener('click', prev(img, images, query));\n \n query('nav-right').addEventListener('click', next(img, images, query));\n \n document.body.addEventListener('keydown', onKeydown(img, images, query));\n}\n\nfunction createImage() {\n const el = document.createElement('img');\n \n el.className = 'modal-image';\n \n return el;\n}\n\nconst _rmListener = rmListener;\n\nfunction rmListener(el, name, fn) {\n return function f(e) {\n fn(e);\n el.removeEventListener(name, f);\n };\n}\n\nconst _addListenerOnce = addListenerOnce;\n\nfunction addListenerOnce(el, name, fn) {\n el.addEventListener(name, rmListener(el, name, fn));\n}\n\nconst _onKeydown = onKeydown;\nconst _indexStore = indexStore;\nconst _helpersStore = helpersStore;\nconst _onload = onload;\n\n\n//# sourceURL=file://cloudcmd//Users/coderaiser/cloudcmd/node_modules/@cloudcmd/modal/lib/parse-images.js\n}");
|
|
876
858
|
|
|
877
859
|
},
|
|
878
860
|
"./node_modules/@cloudcmd/modal/lib/query.js"
|
|
@@ -881,7 +863,7 @@ eval("{__webpack_require__.r(__webpack_exports__);\n__webpack_require__.d(__webp
|
|
|
881
863
|
\***************************************************/
|
|
882
864
|
(__unused_rspack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
883
865
|
"use strict";
|
|
884
|
-
eval("{__webpack_require__.r(__webpack_exports__);\n__webpack_require__.d(__webpack_exports__, {\n \"default\": () => (__rspack_default_export)\n});\n/* export default */ const __rspack_default_export = ((a) => document.querySelector(`[data-name=\"modal-${a}\"]`));\n\n\n//# sourceURL=file://cloudcmd
|
|
866
|
+
eval("{__webpack_require__.r(__webpack_exports__);\n__webpack_require__.d(__webpack_exports__, {\n \"default\": () => (__rspack_default_export)\n});\n/* export default */ const __rspack_default_export = ((a) => document.querySelector(`[data-name=\"modal-${a}\"]`));\n\n\n//# sourceURL=file://cloudcmd//Users/coderaiser/cloudcmd/node_modules/@cloudcmd/modal/lib/query.js\n}");
|
|
885
867
|
|
|
886
868
|
},
|
|
887
869
|
"./node_modules/@cloudcmd/modal/lib/show-title.js"
|
|
@@ -890,7 +872,7 @@ eval("{__webpack_require__.r(__webpack_exports__);\n__webpack_require__.d(__webp
|
|
|
890
872
|
\********************************************************/
|
|
891
873
|
(__unused_rspack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
892
874
|
"use strict";
|
|
893
|
-
eval("{__webpack_require__.r(__webpack_exports__);\n__webpack_require__.d(__webpack_exports__, {\n \"default\": () => (__rspack_default_export)\n});\n/* import */ var _cloudcmd_create_element__rspack_import_0 = __webpack_require__(/*! @cloudcmd/create-element */ \"./node_modules/@cloudcmd/create-element/lib/create-element.js\");\n/* import */ var _query_js__rspack_import_1 = __webpack_require__(/*! ./query.js */ \"./node_modules/@cloudcmd/modal/lib/query.js\");\n\n\n\n/* export default */ const __rspack_default_export = ((title, parent, overrides = {}) => {\n const {\n query = _query_js__rspack_import_1[\"default\"],\n createElement = _cloudcmd_create_element__rspack_import_0,\n } = overrides;\n \n const titleEl = query('title');\n \n if (titleEl) {\n query('title-text').textContent = title;\n return;\n }\n \n const el = createElement('div', {\n className: 'modal-title',\n dataName: 'modal-title',\n parent,\n });\n \n createElement('span', {\n parent: el,\n textContent: title,\n className: 'modal-title-text',\n dataName: 'modal-title-text',\n });\n});\n\n\n//# sourceURL=file://cloudcmd
|
|
875
|
+
eval("{__webpack_require__.r(__webpack_exports__);\n__webpack_require__.d(__webpack_exports__, {\n \"default\": () => (__rspack_default_export)\n});\n/* import */ var _cloudcmd_create_element__rspack_import_0 = __webpack_require__(/*! @cloudcmd/create-element */ \"./node_modules/@cloudcmd/create-element/lib/create-element.js\");\n/* import */ var _query_js__rspack_import_1 = __webpack_require__(/*! ./query.js */ \"./node_modules/@cloudcmd/modal/lib/query.js\");\n\n\n\n/* export default */ const __rspack_default_export = ((title, parent, overrides = {}) => {\n const {\n query = _query_js__rspack_import_1[\"default\"],\n createElement = _cloudcmd_create_element__rspack_import_0,\n } = overrides;\n \n const titleEl = query('title');\n \n if (titleEl) {\n query('title-text').textContent = title;\n return;\n }\n \n const el = createElement('div', {\n className: 'modal-title',\n dataName: 'modal-title',\n parent,\n });\n \n createElement('span', {\n parent: el,\n textContent: title,\n className: 'modal-title-text',\n dataName: 'modal-title-text',\n });\n});\n\n\n//# sourceURL=file://cloudcmd//Users/coderaiser/cloudcmd/node_modules/@cloudcmd/modal/lib/show-title.js\n}");
|
|
894
876
|
|
|
895
877
|
},
|
|
896
878
|
"./node_modules/compute-scroll-into-view/dist/index.js"
|
|
@@ -899,7 +881,7 @@ eval("{__webpack_require__.r(__webpack_exports__);\n__webpack_require__.d(__webp
|
|
|
899
881
|
\*************************************************************/
|
|
900
882
|
(__unused_rspack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
901
883
|
"use strict";
|
|
902
|
-
eval("{__webpack_require__.r(__webpack_exports__);\n__webpack_require__.d(__webpack_exports__, {\n compute: () => (r)\n});\nconst t=t=>\"object\"==typeof t&&null!=t&&1===t.nodeType,e=(t,e)=>(!e||\"hidden\"!==t)&&(\"visible\"!==t&&\"clip\"!==t),n=(t,n)=>{if(t.clientHeight<t.scrollHeight||t.clientWidth<t.scrollWidth){const o=getComputedStyle(t,null);return e(o.overflowY,n)||e(o.overflowX,n)||(t=>{const e=(t=>{if(!t.ownerDocument||!t.ownerDocument.defaultView)return null;try{return t.ownerDocument.defaultView.frameElement}catch(t){return null}})(t);return!!e&&(e.clientHeight<t.scrollHeight||e.clientWidth<t.scrollWidth)})(t)}return!1},o=(t,e,n,o,l,r,i,s)=>r<t&&i>e||r>t&&i<e?0:r<=t&&s<=n||i>=e&&s>=n?r-t-o:i>e&&s<n||r<t&&s>n?i-e+l:0,l=t=>{const e=t.parentElement;return null==e?t.getRootNode().host||null:e},r=(e,r)=>{var i,s,d,h;if(\"undefined\"==typeof document)return[];const{scrollMode:c,block:f,inline:u,boundary:a,skipOverflowHiddenElements:g}=r,p=\"function\"==typeof a?a:t=>t!==a;if(!t(e))throw new TypeError(\"Invalid target\");const m=document.scrollingElement||document.documentElement,w=[];let W=e;for(;t(W)&&p(W);){if(W=l(W),W===m){w.push(W);break}null!=W&&W===document.body&&n(W)&&!n(document.documentElement)||null!=W&&n(W,g)&&w.push(W)}const b=null!=(s=null==(i=window.visualViewport)?void 0:i.width)?s:innerWidth,H=null!=(h=null==(d=window.visualViewport)?void 0:d.height)?h:innerHeight,{scrollX:y,scrollY:M}=window,{height:v,width:E,top:x,right:C,bottom:I,left:R}=e.getBoundingClientRect(),{top:T,right:B,bottom:F,left:V}=(t=>{const e=window.getComputedStyle(t);return{top:parseFloat(e.scrollMarginTop)||0,right:parseFloat(e.scrollMarginRight)||0,bottom:parseFloat(e.scrollMarginBottom)||0,left:parseFloat(e.scrollMarginLeft)||0}})(e);let k=\"start\"===f||\"nearest\"===f?x-T:\"end\"===f?I+F:x+v/2-T+F,D=\"center\"===u?R+E/2-V+B:\"end\"===u?C+B:R-V;const L=[];for(let t=0;t<w.length;t++){const e=w[t],{height:l,width:r,top:i,right:s,bottom:d,left:h}=e.getBoundingClientRect();if(\"if-needed\"===c&&x>=0&&R>=0&&I<=H&&C<=b&&(e===m&&!n(e)||x>=i&&I<=d&&R>=h&&C<=s))return L;const a=getComputedStyle(e),g=parseInt(a.borderLeftWidth,10),p=parseInt(a.borderTopWidth,10),W=parseInt(a.borderRightWidth,10),T=parseInt(a.borderBottomWidth,10);let B=0,F=0;const V=\"offsetWidth\"in e?e.offsetWidth-e.clientWidth-g-W:0,S=\"offsetHeight\"in e?e.offsetHeight-e.clientHeight-p-T:0,X=\"offsetWidth\"in e?0===e.offsetWidth?0:r/e.offsetWidth:0,Y=\"offsetHeight\"in e?0===e.offsetHeight?0:l/e.offsetHeight:0;if(m===e)B=\"start\"===f?k:\"end\"===f?k-H:\"nearest\"===f?o(M,M+H,H,p,T,M+k,M+k+v,v):k-H/2,F=\"start\"===u?D:\"center\"===u?D-b/2:\"end\"===u?D-b:o(y,y+b,b,g,W,y+D,y+D+E,E),B=Math.max(0,B+M),F=Math.max(0,F+y);else{B=\"start\"===f?k-i-p:\"end\"===f?k-d+T+S:\"nearest\"===f?o(i,d,l,p,T+S,k,k+v,v):k-(i+l/2)+S/2,F=\"start\"===u?D-h-g:\"center\"===u?D-(h+r/2)+V/2:\"end\"===u?D-s+W+V:o(h,s,r,g,W+V,D,D+E,E);const{scrollLeft:t,scrollTop:n}=e;B=0===Y?0:Math.max(0,Math.min(n+B/Y,e.scrollHeight-l/Y+S)),F=0===X?0:Math.max(0,Math.min(t+F/X,e.scrollWidth-r/X+V)),k+=n-B,D+=t-F}L.push({el:e,top:B,left:F})}return L};//# sourceMappingURL=index.js.map\n\n\n//# sourceURL=file://cloudcmd
|
|
884
|
+
eval("{__webpack_require__.r(__webpack_exports__);\n__webpack_require__.d(__webpack_exports__, {\n compute: () => (r)\n});\nconst t=t=>\"object\"==typeof t&&null!=t&&1===t.nodeType,e=(t,e)=>(!e||\"hidden\"!==t)&&(\"visible\"!==t&&\"clip\"!==t),n=(t,n)=>{if(t.clientHeight<t.scrollHeight||t.clientWidth<t.scrollWidth){const o=getComputedStyle(t,null);return e(o.overflowY,n)||e(o.overflowX,n)||(t=>{const e=(t=>{if(!t.ownerDocument||!t.ownerDocument.defaultView)return null;try{return t.ownerDocument.defaultView.frameElement}catch(t){return null}})(t);return!!e&&(e.clientHeight<t.scrollHeight||e.clientWidth<t.scrollWidth)})(t)}return!1},o=(t,e,n,o,l,r,i,s)=>r<t&&i>e||r>t&&i<e?0:r<=t&&s<=n||i>=e&&s>=n?r-t-o:i>e&&s<n||r<t&&s>n?i-e+l:0,l=t=>{const e=t.parentElement;return null==e?t.getRootNode().host||null:e},r=(e,r)=>{var i,s,d,h;if(\"undefined\"==typeof document)return[];const{scrollMode:c,block:f,inline:u,boundary:a,skipOverflowHiddenElements:g}=r,p=\"function\"==typeof a?a:t=>t!==a;if(!t(e))throw new TypeError(\"Invalid target\");const m=document.scrollingElement||document.documentElement,w=[];let W=e;for(;t(W)&&p(W);){if(W=l(W),W===m){w.push(W);break}null!=W&&W===document.body&&n(W)&&!n(document.documentElement)||null!=W&&n(W,g)&&w.push(W)}const b=null!=(s=null==(i=window.visualViewport)?void 0:i.width)?s:innerWidth,H=null!=(h=null==(d=window.visualViewport)?void 0:d.height)?h:innerHeight,{scrollX:y,scrollY:M}=window,{height:v,width:E,top:x,right:C,bottom:I,left:R}=e.getBoundingClientRect(),{top:T,right:B,bottom:F,left:V}=(t=>{const e=window.getComputedStyle(t);return{top:parseFloat(e.scrollMarginTop)||0,right:parseFloat(e.scrollMarginRight)||0,bottom:parseFloat(e.scrollMarginBottom)||0,left:parseFloat(e.scrollMarginLeft)||0}})(e);let k=\"start\"===f||\"nearest\"===f?x-T:\"end\"===f?I+F:x+v/2-T+F,D=\"center\"===u?R+E/2-V+B:\"end\"===u?C+B:R-V;const L=[];for(let t=0;t<w.length;t++){const e=w[t],{height:l,width:r,top:i,right:s,bottom:d,left:h}=e.getBoundingClientRect();if(\"if-needed\"===c&&x>=0&&R>=0&&I<=H&&C<=b&&(e===m&&!n(e)||x>=i&&I<=d&&R>=h&&C<=s))return L;const a=getComputedStyle(e),g=parseInt(a.borderLeftWidth,10),p=parseInt(a.borderTopWidth,10),W=parseInt(a.borderRightWidth,10),T=parseInt(a.borderBottomWidth,10);let B=0,F=0;const V=\"offsetWidth\"in e?e.offsetWidth-e.clientWidth-g-W:0,S=\"offsetHeight\"in e?e.offsetHeight-e.clientHeight-p-T:0,X=\"offsetWidth\"in e?0===e.offsetWidth?0:r/e.offsetWidth:0,Y=\"offsetHeight\"in e?0===e.offsetHeight?0:l/e.offsetHeight:0;if(m===e)B=\"start\"===f?k:\"end\"===f?k-H:\"nearest\"===f?o(M,M+H,H,p,T,M+k,M+k+v,v):k-H/2,F=\"start\"===u?D:\"center\"===u?D-b/2:\"end\"===u?D-b:o(y,y+b,b,g,W,y+D,y+D+E,E),B=Math.max(0,B+M),F=Math.max(0,F+y);else{B=\"start\"===f?k-i-p:\"end\"===f?k-d+T+S:\"nearest\"===f?o(i,d,l,p,T+S,k,k+v,v):k-(i+l/2)+S/2,F=\"start\"===u?D-h-g:\"center\"===u?D-(h+r/2)+V/2:\"end\"===u?D-s+W+V:o(h,s,r,g,W+V,D,D+E,E);const{scrollLeft:t,scrollTop:n}=e;B=0===Y?0:Math.max(0,Math.min(n+B/Y,e.scrollHeight-l/Y+S)),F=0===X?0:Math.max(0,Math.min(t+F/X,e.scrollWidth-r/X+V)),k+=n-B,D+=t-F}L.push({el:e,top:B,left:F})}return L};//# sourceMappingURL=index.js.map\n\n\n//# sourceURL=file://cloudcmd//Users/coderaiser/cloudcmd/node_modules/compute-scroll-into-view/dist/index.js\n}");
|
|
903
885
|
|
|
904
886
|
},
|
|
905
887
|
"./node_modules/es6-promisify/dist/promisify.mjs"
|
|
@@ -908,7 +890,7 @@ eval("{__webpack_require__.r(__webpack_exports__);\n__webpack_require__.d(__webp
|
|
|
908
890
|
\*******************************************************/
|
|
909
891
|
(__unused_rspack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
910
892
|
"use strict";
|
|
911
|
-
eval("{__webpack_require__.r(__webpack_exports__);\n__webpack_require__.d(__webpack_exports__, {\n promisify: () => (promisify)\n});\nvar customArgumentsToken=\"__ES6-PROMISIFY--CUSTOM-ARGUMENTS__\";function promisify(a){if(\"function\"!=typeof a)throw new TypeError(\"Argument to promisify must be a function\");var b=a[customArgumentsToken],c=promisify.Promise||Promise;if(\"function\"!=typeof c)throw new Error(\"No Promise implementation found; do you need a polyfill?\");return function(){for(var d=arguments.length,e=Array(d),f=0;f<d;f++)e[f]=arguments[f];return new c((c,d)=>{e.push(function(a){if(a)return d(a);for(var e=arguments.length,f=Array(1<e?e-1:0),g=1;g<e;g++)f[g-1]=arguments[g];if(1===f.length||!b)return c(f[0]);var h={};f.forEach((a,c)=>{var d=b[c];d&&(h[d]=a)}),c(h)}),a.apply(this,e)})}}promisify.argumentNames=\"__ES6-PROMISIFY--CUSTOM-ARGUMENTS__\",promisify.Promise=void 0;\n\n\n//# sourceURL=file://cloudcmd
|
|
893
|
+
eval("{__webpack_require__.r(__webpack_exports__);\n__webpack_require__.d(__webpack_exports__, {\n promisify: () => (promisify)\n});\nvar customArgumentsToken=\"__ES6-PROMISIFY--CUSTOM-ARGUMENTS__\";function promisify(a){if(\"function\"!=typeof a)throw new TypeError(\"Argument to promisify must be a function\");var b=a[customArgumentsToken],c=promisify.Promise||Promise;if(\"function\"!=typeof c)throw new Error(\"No Promise implementation found; do you need a polyfill?\");return function(){for(var d=arguments.length,e=Array(d),f=0;f<d;f++)e[f]=arguments[f];return new c((c,d)=>{e.push(function(a){if(a)return d(a);for(var e=arguments.length,f=Array(1<e?e-1:0),g=1;g<e;g++)f[g-1]=arguments[g];if(1===f.length||!b)return c(f[0]);var h={};f.forEach((a,c)=>{var d=b[c];d&&(h[d]=a)}),c(h)}),a.apply(this,e)})}}promisify.argumentNames=\"__ES6-PROMISIFY--CUSTOM-ARGUMENTS__\",promisify.Promise=void 0;\n\n\n//# sourceURL=file://cloudcmd//Users/coderaiser/cloudcmd/node_modules/es6-promisify/dist/promisify.mjs\n}");
|
|
912
894
|
|
|
913
895
|
},
|
|
914
896
|
"./node_modules/fullstore/lib/fullstore.js"
|
|
@@ -917,7 +899,7 @@ eval("{__webpack_require__.r(__webpack_exports__);\n__webpack_require__.d(__webp
|
|
|
917
899
|
\*************************************************/
|
|
918
900
|
(__unused_rspack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
919
901
|
"use strict";
|
|
920
|
-
eval("{__webpack_require__.r(__webpack_exports__);\n__webpack_require__.d(__webpack_exports__, {\n fullstore: () => (fullstore)\n});\nfunction fullstore(value) {\n const data = {\n value,\n };\n \n return (...args) => {\n const [value] = args;\n \n if (!args.length)\n return data.value;\n \n data.value = value;\n \n return value;\n };\n}\n\n\n//# sourceURL=file://cloudcmd
|
|
902
|
+
eval("{__webpack_require__.r(__webpack_exports__);\n__webpack_require__.d(__webpack_exports__, {\n fullstore: () => (fullstore)\n});\nfunction fullstore(value) {\n const data = {\n value,\n };\n \n return (...args) => {\n const [value] = args;\n \n if (!args.length)\n return data.value;\n \n data.value = value;\n \n return value;\n };\n}\n\n\n//# sourceURL=file://cloudcmd//Users/coderaiser/cloudcmd/node_modules/fullstore/lib/fullstore.js\n}");
|
|
921
903
|
|
|
922
904
|
},
|
|
923
905
|
"./node_modules/just-capitalize/index.mjs"
|
|
@@ -926,7 +908,7 @@ eval("{__webpack_require__.r(__webpack_exports__);\n__webpack_require__.d(__webp
|
|
|
926
908
|
\************************************************/
|
|
927
909
|
(__unused_rspack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
928
910
|
"use strict";
|
|
929
|
-
eval("{__webpack_require__.r(__webpack_exports__);\n__webpack_require__.d(__webpack_exports__, {\n \"default\": () => (stringCapitalize)\n});\nvar stringCapitalize = capitalize;\n\n/*\n capitalize('capitals'); // 'Capitals'\n capitalize('Capitals'); // 'Capitals'\n capitalize('CapiTALS'); // 'Capitals'\n capitalize('many Words'); // 'Many words'\n capitalize('!exclaim'); // '!exclaim'\n*/\n\nfunction capitalize(str) {\n if (typeof str != 'string') {\n throw Error('just-capitalize expects a string argument');\n }\n return str.charAt(0).toUpperCase() + str.slice(1).toLowerCase();\n}\n\n\n\n\n//# sourceURL=file://cloudcmd
|
|
911
|
+
eval("{__webpack_require__.r(__webpack_exports__);\n__webpack_require__.d(__webpack_exports__, {\n \"default\": () => (stringCapitalize)\n});\nvar stringCapitalize = capitalize;\n\n/*\n capitalize('capitals'); // 'Capitals'\n capitalize('Capitals'); // 'Capitals'\n capitalize('CapiTALS'); // 'Capitals'\n capitalize('many Words'); // 'Many words'\n capitalize('!exclaim'); // '!exclaim'\n*/\n\nfunction capitalize(str) {\n if (typeof str != 'string') {\n throw Error('just-capitalize expects a string argument');\n }\n return str.charAt(0).toUpperCase() + str.slice(1).toLowerCase();\n}\n\n\n\n\n//# sourceURL=file://cloudcmd//Users/coderaiser/cloudcmd/node_modules/just-capitalize/index.mjs\n}");
|
|
930
912
|
|
|
931
913
|
},
|
|
932
914
|
"./node_modules/just-pascal-case/index.mjs"
|
|
@@ -935,7 +917,7 @@ eval("{__webpack_require__.r(__webpack_exports__);\n__webpack_require__.d(__webp
|
|
|
935
917
|
\*************************************************/
|
|
936
918
|
(__unused_rspack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
937
919
|
"use strict";
|
|
938
|
-
eval("{__webpack_require__.r(__webpack_exports__);\n__webpack_require__.d(__webpack_exports__, {\n \"default\": () => (stringPascalCase)\n});\nvar stringPascalCase = pascalCase;\n\n/*\n pascalCase('the quick brown fox'); // 'TheQuickBrownFox'\n pascalCase('the_quick_brown_fox'); // 'TheQuickBrownFox'\n pascalCase('the-quick-brown-fox'); // 'TheQuickBrownFox'\n pascalCase('theQuickBrownFox'); // 'TheQuickBrownFox'\n pascalCase('thequickbrownfox'); // 'Thequickbrownfox'\n pascalCase('the - quick * brown# fox'); // 'TheQuickBrownFox'\n pascalCase('theQUICKBrownFox'); // 'TheQUICKBrownFox'\n*/\n\n// any combination of spaces and punctuation characters\n// thanks to http://stackoverflow.com/a/25575009\nvar wordSeparators = /[\\s\\u2000-\\u206F\\u2E00-\\u2E7F\\\\'!\"#$%&()*+,\\-.\\/:;<=>?@\\[\\]^_`{|}~]+/;\n\nfunction pascalCase(str) {\n var words = str.split(wordSeparators);\n var len = words.length;\n var mappedWords = new Array(len);\n for (var i = 0; i < len; i++) {\n var word = words[i];\n if (word === '') {\n continue;\n }\n mappedWords[i] = word[0].toUpperCase() + word.slice(1);\n }\n return mappedWords.join('');\n}\n\n\n\n\n//# sourceURL=file://cloudcmd
|
|
920
|
+
eval("{__webpack_require__.r(__webpack_exports__);\n__webpack_require__.d(__webpack_exports__, {\n \"default\": () => (stringPascalCase)\n});\nvar stringPascalCase = pascalCase;\n\n/*\n pascalCase('the quick brown fox'); // 'TheQuickBrownFox'\n pascalCase('the_quick_brown_fox'); // 'TheQuickBrownFox'\n pascalCase('the-quick-brown-fox'); // 'TheQuickBrownFox'\n pascalCase('theQuickBrownFox'); // 'TheQuickBrownFox'\n pascalCase('thequickbrownfox'); // 'Thequickbrownfox'\n pascalCase('the - quick * brown# fox'); // 'TheQuickBrownFox'\n pascalCase('theQUICKBrownFox'); // 'TheQUICKBrownFox'\n*/\n\n// any combination of spaces and punctuation characters\n// thanks to http://stackoverflow.com/a/25575009\nvar wordSeparators = /[\\s\\u2000-\\u206F\\u2E00-\\u2E7F\\\\'!\"#$%&()*+,\\-.\\/:;<=>?@\\[\\]^_`{|}~]+/;\n\nfunction pascalCase(str) {\n var words = str.split(wordSeparators);\n var len = words.length;\n var mappedWords = new Array(len);\n for (var i = 0; i < len; i++) {\n var word = words[i];\n if (word === '') {\n continue;\n }\n mappedWords[i] = word[0].toUpperCase() + word.slice(1);\n }\n return mappedWords.join('');\n}\n\n\n\n\n//# sourceURL=file://cloudcmd//Users/coderaiser/cloudcmd/node_modules/just-pascal-case/index.mjs\n}");
|
|
939
921
|
|
|
940
922
|
},
|
|
941
923
|
"./node_modules/montag/lib/montag.js"
|
|
@@ -944,7 +926,7 @@ eval("{__webpack_require__.r(__webpack_exports__);\n__webpack_require__.d(__webp
|
|
|
944
926
|
\*******************************************/
|
|
945
927
|
(__unused_rspack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
946
928
|
"use strict";
|
|
947
|
-
eval("{__webpack_require__.r(__webpack_exports__);\n__webpack_require__.d(__webpack_exports__, {\n montag: () => (montag)\n});\nconst START = 1;\nconst END = -1;\n\nconst montag = (strs, ...args) => {\n const str = build(strs, args);\n const lines = str\n .split('\\n')\n .slice(START, END);\n \n if (!lines.length)\n return '';\n \n const [first] = lines;\n \n const count = getSpaceCount(first);\n \n const result = [];\n \n for (const line of lines) {\n const currentCount = getSpaceCount(line);\n \n if (currentCount < count) {\n result.push(line.slice(currentCount));\n continue;\n }\n \n result.push(line.slice(count));\n }\n \n return result.join('\\n');\n};\n\nfunction getSpaceCount(a) {\n let i = 0;\n const {length} = a;\n \n while (i < length && a[i] === ' ') {\n ++i;\n }\n \n return i;\n}\n\nfunction build(strs, args) {\n const result = [];\n const n = strs.length + args.length;\n \n let j = 0;\n \n for (let i = 0; i < n; i++) {\n const current = i % 2 ? args.shift() : strs[j++];\n result.push(current);\n }\n \n return result.join('');\n}\n\n\n//# sourceURL=file://cloudcmd
|
|
929
|
+
eval("{__webpack_require__.r(__webpack_exports__);\n__webpack_require__.d(__webpack_exports__, {\n montag: () => (montag)\n});\nconst START = 1;\nconst END = -1;\n\nconst montag = (strs, ...args) => {\n const str = build(strs, args);\n const lines = str\n .split('\\n')\n .slice(START, END);\n \n if (!lines.length)\n return '';\n \n const [first] = lines;\n \n const count = getSpaceCount(first);\n \n const result = [];\n \n for (const line of lines) {\n const currentCount = getSpaceCount(line);\n \n if (currentCount < count) {\n result.push(line.slice(currentCount));\n continue;\n }\n \n result.push(line.slice(count));\n }\n \n return result.join('\\n');\n};\n\nfunction getSpaceCount(a) {\n let i = 0;\n const {length} = a;\n \n while (i < length && a[i] === ' ') {\n ++i;\n }\n \n return i;\n}\n\nfunction build(strs, args) {\n const result = [];\n const n = strs.length + args.length;\n \n let j = 0;\n \n for (let i = 0; i < n; i++) {\n const current = i % 2 ? args.shift() : strs[j++];\n result.push(current);\n }\n \n return result.join('');\n}\n\n\n//# sourceURL=file://cloudcmd//Users/coderaiser/cloudcmd/node_modules/montag/lib/montag.js\n}");
|
|
948
930
|
|
|
949
931
|
},
|
|
950
932
|
"./node_modules/multi-rename/lib/multi-rename.js"
|
|
@@ -953,7 +935,7 @@ eval("{__webpack_require__.r(__webpack_exports__);\n__webpack_require__.d(__webp
|
|
|
953
935
|
\*******************************************************/
|
|
954
936
|
(__unused_rspack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
955
937
|
"use strict";
|
|
956
|
-
eval("{__webpack_require__.r(__webpack_exports__);\n__webpack_require__.d(__webpack_exports__, {\n multiRename: () => (multiRename)\n});\n/* import */ var shortdate__rspack_import_0 = __webpack_require__(/*! shortdate */ \"./node_modules/shortdate/lib/shortdate.js\");\n\n\nconst multiRename = (pattern, names, overrides) => {\n check(pattern, names);\n \n return names.map(parse(pattern, overrides));\n};\n\nconst parse = (pattern, overrides = {}) => (full, i) => {\n const {\n shortdate = shortdate__rspack_import_0,\n } = overrides;\n \n const [name, ext] = splitName(full);\n const date = shortdate(new Date(), {\n sep: '-',\n });\n \n return pattern\n .replace('[n]', name)\n .replace('[e]', ext)\n .replace('[c]', i + 1)\n .replace('[ymd]', date);\n};\n\nfunction splitName(str) {\n const index = str.lastIndexOf('.');\n \n if (!~index)\n return [str, ''];\n \n return [\n str.substr(0, index),\n str.substr(index),\n ];\n}\n\nfunction check(pattern, names) {\n if (!pattern)\n throw Error('pattern could not be empty!');\n \n if (!Array.isArray(names))\n throw Error('names should be an array!');\n}\n\n\n//# sourceURL=file://cloudcmd
|
|
938
|
+
eval("{__webpack_require__.r(__webpack_exports__);\n__webpack_require__.d(__webpack_exports__, {\n multiRename: () => (multiRename)\n});\n/* import */ var shortdate__rspack_import_0 = __webpack_require__(/*! shortdate */ \"./node_modules/shortdate/lib/shortdate.js\");\n\n\nconst multiRename = (pattern, names, overrides) => {\n check(pattern, names);\n \n return names.map(parse(pattern, overrides));\n};\n\nconst parse = (pattern, overrides = {}) => (full, i) => {\n const {\n shortdate = shortdate__rspack_import_0,\n } = overrides;\n \n const [name, ext] = splitName(full);\n const date = shortdate(new Date(), {\n sep: '-',\n });\n \n return pattern\n .replace('[n]', name)\n .replace('[e]', ext)\n .replace('[c]', i + 1)\n .replace('[ymd]', date);\n};\n\nfunction splitName(str) {\n const index = str.lastIndexOf('.');\n \n if (!~index)\n return [str, ''];\n \n return [\n str.substr(0, index),\n str.substr(index),\n ];\n}\n\nfunction check(pattern, names) {\n if (!pattern)\n throw Error('pattern could not be empty!');\n \n if (!Array.isArray(names))\n throw Error('names should be an array!');\n}\n\n\n//# sourceURL=file://cloudcmd//Users/coderaiser/cloudcmd/node_modules/multi-rename/lib/multi-rename.js\n}");
|
|
957
939
|
|
|
958
940
|
},
|
|
959
941
|
"./node_modules/rendy/lib/rendy.js"
|
|
@@ -962,7 +944,7 @@ eval("{__webpack_require__.r(__webpack_exports__);\n__webpack_require__.d(__webp
|
|
|
962
944
|
\*****************************************/
|
|
963
945
|
(__unused_rspack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
964
946
|
"use strict";
|
|
965
|
-
eval("{__webpack_require__.r(__webpack_exports__);\n__webpack_require__.d(__webpack_exports__, {\n rendy: () => (rendy)\n});\nconst isString = (a) => typeof a === 'string';\nconst constant = (a) => () => a;\nconst {keys} = Object;\n\nconst rendy = (template, values, modifiers = null) => {\n check(template, values);\n \n let result = template;\n const names = !modifiers ? keys(values) : template.match(/{{(.*?)}}/g);\n \n for (const key of names) {\n const [parsedKey, value] = parseValue(key, values, modifiers);\n const str = constant(value);\n \n while (result.includes(parsedKey))\n result = result.replace(parsedKey, str);\n }\n \n if (result.includes('{{'))\n result = result.replace(/{{.*?}}/g, '');\n \n return result;\n};\n\nfunction check(template, values) {\n if (!isString(template))\n throw Error('template should be a string!');\n \n if (typeof values !== 'object')\n throw Error('values should be an object!');\n}\n\nfunction parseValue(key, values, modifiers) {\n if (!modifiers)\n return [\n `{{ ${key} }}`,\n values[key],\n ];\n \n const preparedKey = key\n .replaceAll('{{', '')\n .replaceAll('}}', '')\n .replaceAll(' ', '');\n \n const value = values[preparedKey] || '';\n \n if (!preparedKey.includes('|'))\n return [key, value];\n \n const [name, modifierName] = preparedKey.split('|');\n const fn = modifiers[modifierName];\n const currentValue = values[name];\n \n if (!fn)\n return [key, currentValue];\n \n return [key, fn(currentValue)];\n}\n\n\n//# sourceURL=file://cloudcmd
|
|
947
|
+
eval("{__webpack_require__.r(__webpack_exports__);\n__webpack_require__.d(__webpack_exports__, {\n rendy: () => (rendy)\n});\nconst isString = (a) => typeof a === 'string';\nconst constant = (a) => () => a;\nconst {keys} = Object;\n\nconst rendy = (template, values, modifiers = null) => {\n check(template, values);\n \n let result = template;\n const names = !modifiers ? keys(values) : template.match(/{{(.*?)}}/g);\n \n for (const key of names) {\n const [parsedKey, value] = parseValue(key, values, modifiers);\n const str = constant(value);\n \n while (result.includes(parsedKey))\n result = result.replace(parsedKey, str);\n }\n \n if (result.includes('{{'))\n result = result.replace(/{{.*?}}/g, '');\n \n return result;\n};\n\nfunction check(template, values) {\n if (!isString(template))\n throw Error('template should be a string!');\n \n if (typeof values !== 'object')\n throw Error('values should be an object!');\n}\n\nfunction parseValue(key, values, modifiers) {\n if (!modifiers)\n return [\n `{{ ${key} }}`,\n values[key],\n ];\n \n const preparedKey = key\n .replaceAll('{{', '')\n .replaceAll('}}', '')\n .replaceAll(' ', '');\n \n const value = values[preparedKey] || '';\n \n if (!preparedKey.includes('|'))\n return [key, value];\n \n const [name, modifierName] = preparedKey.split('|');\n const fn = modifiers[modifierName];\n const currentValue = values[name];\n \n if (!fn)\n return [key, currentValue];\n \n return [key, fn(currentValue)];\n}\n\n\n//# sourceURL=file://cloudcmd//Users/coderaiser/cloudcmd/node_modules/rendy/lib/rendy.js\n}");
|
|
966
948
|
|
|
967
949
|
},
|
|
968
950
|
"./node_modules/scroll-into-view-if-needed/dist/index.js"
|
|
@@ -971,7 +953,7 @@ eval("{__webpack_require__.r(__webpack_exports__);\n__webpack_require__.d(__webp
|
|
|
971
953
|
\***************************************************************/
|
|
972
954
|
(__unused_rspack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
973
955
|
"use strict";
|
|
974
|
-
eval("{__webpack_require__.r(__webpack_exports__);\n__webpack_require__.d(__webpack_exports__, {\n \"default\": () => (e)\n});\n/* import */ var compute_scroll_into_view__rspack_import_0 = __webpack_require__(/*! compute-scroll-into-view */ \"./node_modules/compute-scroll-into-view/dist/index.js\");\nconst o=t=>!1===t?{block:\"end\",inline:\"nearest\"}:(t=>t===Object(t)&&0!==Object.keys(t).length)(t)?t:{block:\"start\",inline:\"nearest\"};function e(e,r){if(!e.isConnected||!(t=>{let o=t;for(;o&&o.parentNode;){if(o.parentNode===document)return!0;o=o.parentNode instanceof ShadowRoot?o.parentNode.host:o.parentNode}return!1})(e))return;const n=(t=>{const o=window.getComputedStyle(t);return{top:parseFloat(o.scrollMarginTop)||0,right:parseFloat(o.scrollMarginRight)||0,bottom:parseFloat(o.scrollMarginBottom)||0,left:parseFloat(o.scrollMarginLeft)||0}})(e);if((t=>\"object\"==typeof t&&\"function\"==typeof t.behavior)(r))return r.behavior((0,compute_scroll_into_view__rspack_import_0.compute)(e,r));const l=\"boolean\"==typeof r||null==r?void 0:r.behavior;for(const{el:a,top:i,left:s}of (0,compute_scroll_into_view__rspack_import_0.compute)(e,o(r))){const t=i-n.top+n.bottom,o=s-n.left+n.right;a.scroll({top:t,left:o,behavior:l})}}//# sourceMappingURL=index.js.map\n\n\n//# sourceURL=file://cloudcmd
|
|
956
|
+
eval("{__webpack_require__.r(__webpack_exports__);\n__webpack_require__.d(__webpack_exports__, {\n \"default\": () => (e)\n});\n/* import */ var compute_scroll_into_view__rspack_import_0 = __webpack_require__(/*! compute-scroll-into-view */ \"./node_modules/compute-scroll-into-view/dist/index.js\");\nconst o=t=>!1===t?{block:\"end\",inline:\"nearest\"}:(t=>t===Object(t)&&0!==Object.keys(t).length)(t)?t:{block:\"start\",inline:\"nearest\"};function e(e,r){if(!e.isConnected||!(t=>{let o=t;for(;o&&o.parentNode;){if(o.parentNode===document)return!0;o=o.parentNode instanceof ShadowRoot?o.parentNode.host:o.parentNode}return!1})(e))return;const n=(t=>{const o=window.getComputedStyle(t);return{top:parseFloat(o.scrollMarginTop)||0,right:parseFloat(o.scrollMarginRight)||0,bottom:parseFloat(o.scrollMarginBottom)||0,left:parseFloat(o.scrollMarginLeft)||0}})(e);if((t=>\"object\"==typeof t&&\"function\"==typeof t.behavior)(r))return r.behavior((0,compute_scroll_into_view__rspack_import_0.compute)(e,r));const l=\"boolean\"==typeof r||null==r?void 0:r.behavior;for(const{el:a,top:i,left:s}of (0,compute_scroll_into_view__rspack_import_0.compute)(e,o(r))){const t=i-n.top+n.bottom,o=s-n.left+n.right;a.scroll({top:t,left:o,behavior:l})}}//# sourceMappingURL=index.js.map\n\n\n//# sourceURL=file://cloudcmd//Users/coderaiser/cloudcmd/node_modules/scroll-into-view-if-needed/dist/index.js\n}");
|
|
975
957
|
|
|
976
958
|
},
|
|
977
959
|
"./node_modules/smalltalk/lib/smalltalk.js"
|
|
@@ -980,7 +962,7 @@ eval("{__webpack_require__.r(__webpack_exports__);\n__webpack_require__.d(__webp
|
|
|
980
962
|
\*************************************************/
|
|
981
963
|
(__unused_rspack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
982
964
|
"use strict";
|
|
983
|
-
eval("{__webpack_require__.r(__webpack_exports__);\n__webpack_require__.d(__webpack_exports__, {\n alert: () => (alert),\n confirm: () => (confirm),\n progress: () => (progress),\n prompt: () => (prompt)\n});\n/* import */ var _css_smalltalk_css__rspack_import_0 = __webpack_require__(/*! ../css/smalltalk.css */ \"./node_modules/smalltalk/css/smalltalk.css\");\n/* import */ var currify__rspack_import_1 = __webpack_require__(/*! currify */ \"./node_modules/currify/lib/currify.js\");\n/* import */ var _cloudcmd_create_element__rspack_import_2 = __webpack_require__(/*! @cloudcmd/create-element */ \"./node_modules/@cloudcmd/create-element/lib/create-element.js\");\n/* import */ var fullstore__rspack_import_3 = __webpack_require__(/*! fullstore */ \"./node_modules/fullstore/lib/fullstore.js\");\n\n\n\n\n\nconst isBool = (a) => typeof a === 'boolean';\n\nconst keyDown = currify__rspack_import_1(keyDown_);\n\nconst BUTTON_OK = {\n ok: 'OK',\n};\n\nconst BUTTON_OK_CANCEL = {\n ok: 'OK',\n cancel: 'Cancel',\n};\n\nconst zIndex = (0,fullstore__rspack_import_3.fullstore)(100);\n\nconst alert = (title, msg, options) => {\n const buttons = getButtons(options) || BUTTON_OK;\n return showDialog(title, msg, '', buttons, options);\n};\n\nconst prompt = (title, msg, value = '', options) => {\n const type = getType(options);\n const val = String(value).replace(/\"/g, '"');\n \n const valueStr = `<input type=\"${type}\" value=\"${val}\" data-name=\"js-input\">`;\n const buttons = getButtons(options) || BUTTON_OK_CANCEL;\n \n return showDialog(title, msg, valueStr, buttons, options);\n};\n\nconst confirm = (title, msg, options) => {\n const buttons = getButtons(options) || BUTTON_OK_CANCEL;\n \n return showDialog(title, msg, '', buttons, options);\n};\n\nconst progress = (title, message, options) => {\n const valueStr = `\n <progress value=\"0\" data-name=\"js-progress\" class=\"progress\" max=\"100\"></progress>\n <span data-name=\"js-counter\">0%</span>\n `;\n \n const buttons = {\n cancel: 'Abort',\n };\n \n const promise = showDialog(title, message, valueStr, buttons, options);\n const {ok, dialog} = promise;\n const resolve = ok();\n \n for (const el of find(dialog, ['cancel'])) {\n el.focus();\n }\n \n Object.assign(promise, {\n setProgress(count) {\n const [elProgress] = find(dialog, ['progress']);\n const [elCounter] = find(dialog, ['counter']);\n \n elProgress.value = count;\n elCounter.textContent = `${count}%`;\n \n if (count === 100) {\n remove(dialog);\n resolve();\n }\n },\n \n remove() {\n remove(dialog);\n },\n });\n \n return promise;\n};\n\nfunction getButtons(options = {}) {\n const {buttons} = options;\n \n if (!buttons)\n return null;\n \n return buttons;\n}\n\nfunction getType(options = {}) {\n const {type} = options;\n \n if (type === 'password')\n return 'password';\n \n return 'text';\n}\n\nfunction getTemplate(title, msg, value, buttons) {\n const encodedMsg = msg.replace(/\\n/g, '<br>');\n \n return `<div class=\"page\">\n <div data-name=\"js-close\" class=\"close-button\"></div>\n <header>${title}</header>\n <div class=\"content-area\">${encodedMsg}${value}</div>\n <div class=\"action-area\">\n <div class=\"button-strip\">\n ${parseButtons(buttons)}\n </div>\n </div>\n </div>`;\n}\n\nfunction parseButtons(buttons) {\n const names = Object.keys(buttons);\n const parse = currify__rspack_import_1((buttons, name, i) => `<button\n tabindex=${i}\n data-name=\"js-${name.toLowerCase()}\">\n ${buttons[name]}\n </button>`);\n \n return names\n .map(parse(buttons))\n .join('');\n}\n\nfunction showDialog(title, msg, value, buttons, options) {\n const ok = (0,fullstore__rspack_import_3.fullstore)();\n const cancel = (0,fullstore__rspack_import_3.fullstore)();\n \n const closeButtons = [\n 'cancel',\n 'close',\n 'ok',\n ];\n \n const promise = new Promise((resolve, reject) => {\n const noCancel = options && isBool(options.cancel) && !options.cancel;\n const empty = () => {};\n const rejectError = () => reject(Error());\n \n ok(resolve);\n cancel(noCancel ? empty : rejectError);\n });\n \n const innerHTML = getTemplate(title, msg, value, buttons);\n \n const dialog = _cloudcmd_create_element__rspack_import_2('div', {\n innerHTML,\n className: 'smalltalk',\n style: `z-index: ${zIndex(zIndex() + 1)}`,\n });\n \n for (const el of find(dialog, ['ok', 'input']))\n el.focus();\n \n for (const el of find(dialog, ['input'])) {\n el.setSelectionRange(0, value.length);\n }\n \n addListenerAll('click', dialog, closeButtons, (event) => {\n closeDialog(event.target, dialog, ok(), cancel());\n });\n \n for (const event of ['click', 'contextmenu'])\n dialog.addEventListener(event, (e) => {\n e.stopPropagation();\n \n for (const el of find(dialog, ['ok', 'input']))\n el.focus();\n });\n \n dialog.addEventListener('keydown', keyDown(dialog, ok(), cancel()));\n \n return Object.assign(promise, {\n dialog,\n ok,\n });\n}\n\nfunction keyDown_(dialog, ok, cancel, event) {\n const KEY = {\n ENTER: 13,\n ESC: 27,\n TAB: 9,\n LEFT: 37,\n UP: 38,\n RIGHT: 39,\n DOWN: 40,\n };\n \n const {keyCode} = event;\n const el = event.target;\n \n const namesAll = [\n 'ok',\n 'cancel',\n 'input',\n ];\n \n const names = find(dialog, namesAll).map(getDataName);\n \n switch(keyCode) {\n case KEY.ENTER:\n closeDialog(el, dialog, ok, cancel);\n event.preventDefault();\n break;\n \n case KEY.ESC:\n remove(dialog);\n cancel();\n break;\n \n case KEY.TAB:\n if (event.shiftKey)\n tab(dialog, names);\n \n tab(dialog, names);\n event.preventDefault();\n break;\n \n default:\n [\n 'left',\n 'right',\n 'up',\n 'down',\n ]\n .filter((name) => keyCode === KEY[name.toUpperCase()])\n .forEach(() => {\n changeButtonFocus(dialog, names);\n });\n \n break;\n }\n \n event.stopPropagation();\n}\n\nfunction getDataName(el) {\n return el\n .getAttribute('data-name')\n .replace('js-', '');\n}\n\nconst getName = (activeName) => {\n if (activeName === 'cancel')\n return 'ok';\n \n return 'cancel';\n};\n\nfunction changeButtonFocus(dialog, names) {\n const active = document.activeElement;\n const activeName = getDataName(active);\n const isButton = /ok|cancel/.test(activeName);\n const count = names.length - 1;\n \n if (activeName === 'input' || !count || !isButton)\n return;\n \n const name = getName(activeName);\n \n for (const el of find(dialog, [name])) {\n el.focus();\n }\n}\n\nconst getIndex = (count, index) => {\n if (index === count)\n return 0;\n \n return index + 1;\n};\n\nfunction tab(dialog, names) {\n const active = document.activeElement;\n const activeName = getDataName(active);\n const count = names.length - 1;\n \n const activeIndex = names.indexOf(activeName);\n const index = getIndex(count, activeIndex);\n \n const name = names[index];\n \n for (const el of find(dialog, [name]))\n el.focus();\n}\n\nfunction closeDialog(el, dialog, ok, cancel) {\n const name = el\n .getAttribute('data-name')\n .replace('js-', '');\n \n if (/close|cancel/.test(name)) {\n cancel();\n remove(dialog);\n \n return;\n }\n \n let value = null;\n \n for (const el of find(dialog, ['input'])) {\n ({value} = el);\n }\n \n ok(value);\n remove(dialog);\n}\n\nconst query = currify__rspack_import_1((element, name) => element.querySelector(`[data-name=\"js-${name}\"]`));\n\nfunction find(element, names) {\n const elements = names\n .map(query(element))\n .filter(Boolean);\n \n return elements;\n}\n\nfunction addListenerAll(event, parent, elements, fn) {\n for (const el of find(parent, elements)) {\n el.addEventListener(event, fn);\n }\n}\n\nfunction remove(dialog) {\n const {parentElement} = dialog;\n \n if (parentElement)\n parentElement.removeChild(dialog);\n}\n\n\n//# sourceURL=file://cloudcmd
|
|
965
|
+
eval("{__webpack_require__.r(__webpack_exports__);\n__webpack_require__.d(__webpack_exports__, {\n alert: () => (alert),\n confirm: () => (confirm),\n progress: () => (progress),\n prompt: () => (prompt)\n});\n/* import */ var _css_smalltalk_css__rspack_import_0 = __webpack_require__(/*! ../css/smalltalk.css */ \"./node_modules/smalltalk/css/smalltalk.css\");\n/* import */ var currify__rspack_import_1 = __webpack_require__(/*! currify */ \"./node_modules/currify/lib/currify.js\");\n/* import */ var _cloudcmd_create_element__rspack_import_2 = __webpack_require__(/*! @cloudcmd/create-element */ \"./node_modules/@cloudcmd/create-element/lib/create-element.js\");\n/* import */ var fullstore__rspack_import_3 = __webpack_require__(/*! fullstore */ \"./node_modules/fullstore/lib/fullstore.js\");\n\n\n\n\n\nconst isBool = (a) => typeof a === 'boolean';\n\nconst keyDown = currify__rspack_import_1(keyDown_);\n\nconst BUTTON_OK = {\n ok: 'OK',\n};\n\nconst BUTTON_OK_CANCEL = {\n ok: 'OK',\n cancel: 'Cancel',\n};\n\nconst zIndex = (0,fullstore__rspack_import_3.fullstore)(100);\n\nconst alert = (title, msg, options) => {\n const buttons = getButtons(options) || BUTTON_OK;\n return showDialog(title, msg, '', buttons, options);\n};\n\nconst prompt = (title, msg, value = '', options) => {\n const type = getType(options);\n const val = String(value).replace(/\"/g, '"');\n \n const valueStr = `<input type=\"${type}\" value=\"${val}\" data-name=\"js-input\">`;\n const buttons = getButtons(options) || BUTTON_OK_CANCEL;\n \n return showDialog(title, msg, valueStr, buttons, options);\n};\n\nconst confirm = (title, msg, options) => {\n const buttons = getButtons(options) || BUTTON_OK_CANCEL;\n \n return showDialog(title, msg, '', buttons, options);\n};\n\nconst progress = (title, message, options) => {\n const valueStr = `\n <progress value=\"0\" data-name=\"js-progress\" class=\"progress\" max=\"100\"></progress>\n <span data-name=\"js-counter\">0%</span>\n `;\n \n const buttons = {\n cancel: 'Abort',\n };\n \n const promise = showDialog(title, message, valueStr, buttons, options);\n const {ok, dialog} = promise;\n const resolve = ok();\n \n for (const el of find(dialog, ['cancel'])) {\n el.focus();\n }\n \n Object.assign(promise, {\n setProgress(count) {\n const [elProgress] = find(dialog, ['progress']);\n const [elCounter] = find(dialog, ['counter']);\n \n elProgress.value = count;\n elCounter.textContent = `${count}%`;\n \n if (count === 100) {\n remove(dialog);\n resolve();\n }\n },\n \n remove() {\n remove(dialog);\n },\n });\n \n return promise;\n};\n\nfunction getButtons(options = {}) {\n const {buttons} = options;\n \n if (!buttons)\n return null;\n \n return buttons;\n}\n\nfunction getType(options = {}) {\n const {type} = options;\n \n if (type === 'password')\n return 'password';\n \n return 'text';\n}\n\nfunction getTemplate(title, msg, value, buttons) {\n const encodedMsg = msg.replace(/\\n/g, '<br>');\n \n return `<div class=\"page\">\n <div data-name=\"js-close\" class=\"close-button\"></div>\n <header>${title}</header>\n <div class=\"content-area\">${encodedMsg}${value}</div>\n <div class=\"action-area\">\n <div class=\"button-strip\">\n ${parseButtons(buttons)}\n </div>\n </div>\n </div>`;\n}\n\nfunction parseButtons(buttons) {\n const names = Object.keys(buttons);\n const parse = currify__rspack_import_1((buttons, name, i) => `<button\n tabindex=${i}\n data-name=\"js-${name.toLowerCase()}\">\n ${buttons[name]}\n </button>`);\n \n return names\n .map(parse(buttons))\n .join('');\n}\n\nfunction showDialog(title, msg, value, buttons, options) {\n const ok = (0,fullstore__rspack_import_3.fullstore)();\n const cancel = (0,fullstore__rspack_import_3.fullstore)();\n \n const closeButtons = [\n 'cancel',\n 'close',\n 'ok',\n ];\n \n const promise = new Promise((resolve, reject) => {\n const noCancel = options && isBool(options.cancel) && !options.cancel;\n const empty = () => {};\n const rejectError = () => reject(Error());\n \n ok(resolve);\n cancel(noCancel ? empty : rejectError);\n });\n \n const innerHTML = getTemplate(title, msg, value, buttons);\n \n const dialog = _cloudcmd_create_element__rspack_import_2('div', {\n innerHTML,\n className: 'smalltalk',\n style: `z-index: ${zIndex(zIndex() + 1)}`,\n });\n \n for (const el of find(dialog, ['ok', 'input']))\n el.focus();\n \n for (const el of find(dialog, ['input'])) {\n el.setSelectionRange(0, value.length);\n }\n \n addListenerAll('click', dialog, closeButtons, (event) => {\n closeDialog(event.target, dialog, ok(), cancel());\n });\n \n for (const event of ['click', 'contextmenu'])\n dialog.addEventListener(event, (e) => {\n e.stopPropagation();\n \n for (const el of find(dialog, ['ok', 'input']))\n el.focus();\n });\n \n dialog.addEventListener('keydown', keyDown(dialog, ok(), cancel()));\n \n return Object.assign(promise, {\n dialog,\n ok,\n });\n}\n\nfunction keyDown_(dialog, ok, cancel, event) {\n const KEY = {\n ENTER: 13,\n ESC: 27,\n TAB: 9,\n LEFT: 37,\n UP: 38,\n RIGHT: 39,\n DOWN: 40,\n };\n \n const {keyCode} = event;\n const el = event.target;\n \n const namesAll = [\n 'ok',\n 'cancel',\n 'input',\n ];\n \n const names = find(dialog, namesAll).map(getDataName);\n \n switch(keyCode) {\n case KEY.ENTER:\n closeDialog(el, dialog, ok, cancel);\n event.preventDefault();\n break;\n \n case KEY.ESC:\n remove(dialog);\n cancel();\n break;\n \n case KEY.TAB:\n if (event.shiftKey)\n tab(dialog, names);\n \n tab(dialog, names);\n event.preventDefault();\n break;\n \n default:\n [\n 'left',\n 'right',\n 'up',\n 'down',\n ]\n .filter((name) => keyCode === KEY[name.toUpperCase()])\n .forEach(() => {\n changeButtonFocus(dialog, names);\n });\n \n break;\n }\n \n event.stopPropagation();\n}\n\nfunction getDataName(el) {\n return el\n .getAttribute('data-name')\n .replace('js-', '');\n}\n\nconst getName = (activeName) => {\n if (activeName === 'cancel')\n return 'ok';\n \n return 'cancel';\n};\n\nfunction changeButtonFocus(dialog, names) {\n const active = document.activeElement;\n const activeName = getDataName(active);\n const isButton = /ok|cancel/.test(activeName);\n const count = names.length - 1;\n \n if (activeName === 'input' || !count || !isButton)\n return;\n \n const name = getName(activeName);\n \n for (const el of find(dialog, [name])) {\n el.focus();\n }\n}\n\nconst getIndex = (count, index) => {\n if (index === count)\n return 0;\n \n return index + 1;\n};\n\nfunction tab(dialog, names) {\n const active = document.activeElement;\n const activeName = getDataName(active);\n const count = names.length - 1;\n \n const activeIndex = names.indexOf(activeName);\n const index = getIndex(count, activeIndex);\n \n const name = names[index];\n \n for (const el of find(dialog, [name]))\n el.focus();\n}\n\nfunction closeDialog(el, dialog, ok, cancel) {\n const name = el\n .getAttribute('data-name')\n .replace('js-', '');\n \n if (/close|cancel/.test(name)) {\n cancel();\n remove(dialog);\n \n return;\n }\n \n let value = null;\n \n for (const el of find(dialog, ['input'])) {\n ({value} = el);\n }\n \n ok(value);\n remove(dialog);\n}\n\nconst query = currify__rspack_import_1((element, name) => element.querySelector(`[data-name=\"js-${name}\"]`));\n\nfunction find(element, names) {\n const elements = names\n .map(query(element))\n .filter(Boolean);\n \n return elements;\n}\n\nfunction addListenerAll(event, parent, elements, fn) {\n for (const el of find(parent, elements)) {\n el.addEventListener(event, fn);\n }\n}\n\nfunction remove(dialog) {\n const {parentElement} = dialog;\n \n if (parentElement)\n parentElement.removeChild(dialog);\n}\n\n\n//# sourceURL=file://cloudcmd//Users/coderaiser/cloudcmd/node_modules/smalltalk/lib/smalltalk.js\n}");
|
|
984
966
|
|
|
985
967
|
},
|
|
986
968
|
"./node_modules/supermenu/lib/build-items.js"
|
|
@@ -989,7 +971,7 @@ eval("{__webpack_require__.r(__webpack_exports__);\n__webpack_require__.d(__webp
|
|
|
989
971
|
\***************************************************/
|
|
990
972
|
(__unused_rspack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
991
973
|
"use strict";
|
|
992
|
-
eval("{__webpack_require__.r(__webpack_exports__);\n__webpack_require__.d(__webpack_exports__, {\n \"default\": () => (buildItems)\n});\n/* import */ var rendy__rspack_import_0 = __webpack_require__(/*! rendy */ \"./node_modules/rendy/lib/rendy.js\");\n/* import */ var _template_js__rspack_import_1 = __webpack_require__(/*! ./template.js */ \"./node_modules/supermenu/lib/template.js\");\n\n\n\nconst isObj = (a) => typeof a === 'object';\nconst DATA_MENU = 'data-menu=\"js-submenu\"';\n\nconst {entries} = Object;\n\nfunction buildItems(menuData, menuFuncs, options, path = '') {\n let items = '';\n \n if (path)\n path += '.';\n \n for (const [name, data] of entries(menuData)) {\n let nameIcon;\n let subitems = '';\n let className = '';\n let attribute = '';\n \n const pathName = path + name;\n \n if (!isObj(data)) {\n menuFuncs[pathName] = data;\n } else {\n subitems = (0,rendy__rspack_import_0.rendy)(_template_js__rspack_import_1.MAIN, {\n items: buildItems(data, menuFuncs, options, pathName),\n });\n \n className = ' menu-submenu';\n attribute = ` ${DATA_MENU}`;\n }\n \n if (options.icon) {\n nameIcon = name\n .replace(/[()]/g, '')\n .replace(/\\s/g, '-')\n .toLowerCase();\n \n className += ` icon icon-${nameIcon}`;\n }\n \n items += (0,rendy__rspack_import_0.rendy)(_template_js__rspack_import_1.ITEM, {\n name,\n subitems,\n className,\n attribute,\n path: pathName,\n });\n }\n \n return items;\n}\n\n\n//# sourceURL=file://cloudcmd
|
|
974
|
+
eval("{__webpack_require__.r(__webpack_exports__);\n__webpack_require__.d(__webpack_exports__, {\n \"default\": () => (buildItems)\n});\n/* import */ var rendy__rspack_import_0 = __webpack_require__(/*! rendy */ \"./node_modules/rendy/lib/rendy.js\");\n/* import */ var _template_js__rspack_import_1 = __webpack_require__(/*! ./template.js */ \"./node_modules/supermenu/lib/template.js\");\n\n\n\nconst isObj = (a) => typeof a === 'object';\nconst DATA_MENU = 'data-menu=\"js-submenu\"';\n\nconst {entries} = Object;\n\nfunction buildItems(menuData, menuFuncs, options, path = '') {\n let items = '';\n \n if (path)\n path += '.';\n \n for (const [name, data] of entries(menuData)) {\n let nameIcon;\n let subitems = '';\n let className = '';\n let attribute = '';\n \n const pathName = path + name;\n \n if (!isObj(data)) {\n menuFuncs[pathName] = data;\n } else {\n subitems = (0,rendy__rspack_import_0.rendy)(_template_js__rspack_import_1.MAIN, {\n items: buildItems(data, menuFuncs, options, pathName),\n });\n \n className = ' menu-submenu';\n attribute = ` ${DATA_MENU}`;\n }\n \n if (options.icon) {\n nameIcon = name\n .replace(/[()]/g, '')\n .replace(/\\s/g, '-')\n .toLowerCase();\n \n className += ` icon icon-${nameIcon}`;\n }\n \n items += (0,rendy__rspack_import_0.rendy)(_template_js__rspack_import_1.ITEM, {\n name,\n subitems,\n className,\n attribute,\n path: pathName,\n });\n }\n \n return items;\n}\n\n\n//# sourceURL=file://cloudcmd//Users/coderaiser/cloudcmd/node_modules/supermenu/lib/build-items.js\n}");
|
|
993
975
|
|
|
994
976
|
},
|
|
995
977
|
"./node_modules/supermenu/lib/element-funcs.js"
|
|
@@ -998,7 +980,7 @@ eval("{__webpack_require__.r(__webpack_exports__);\n__webpack_require__.d(__webp
|
|
|
998
980
|
\*****************************************************/
|
|
999
981
|
(__unused_rspack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
1000
982
|
"use strict";
|
|
1001
|
-
eval("{__webpack_require__.r(__webpack_exports__);\n__webpack_require__.d(__webpack_exports__, {\n \"default\": () => (ElementFuncsProto)\n});\nclass ElementFuncsProto {\n getItem(element) {\n if (this.isName(element))\n return element.parentElement;\n \n return element;\n }\n \n getName(element) {\n if (!element)\n return null;\n \n if (this.isName(element))\n return element;\n \n return element.querySelector('[data-menu-path]');\n }\n \n isName(element) {\n if (!element)\n return false;\n \n return element.hasAttribute('data-menu-path');\n }\n \n isItem(element) {\n return this.checkElementsName(element, 'js-menu-item');\n }\n \n isMenu(element) {\n return this.checkElementsName(element, 'js-menu');\n }\n \n checkElementsName(element, nameElement, attribute) {\n if (!attribute)\n attribute = 'data-name';\n \n if (element) {\n const name = element.getAttribute(attribute);\n \n if (name === nameElement)\n return true;\n }\n \n return false;\n }\n \n isSubMenu(element) {\n const attribute = 'data-menu';\n const value = 'js-submenu';\n const item = this.getItem(element);\n \n return this.checkElementsName(item, value, attribute);\n }\n}\n\n\n//# sourceURL=file://cloudcmd
|
|
983
|
+
eval("{__webpack_require__.r(__webpack_exports__);\n__webpack_require__.d(__webpack_exports__, {\n \"default\": () => (ElementFuncsProto)\n});\nclass ElementFuncsProto {\n getItem(element) {\n if (this.isName(element))\n return element.parentElement;\n \n return element;\n }\n \n getName(element) {\n if (!element)\n return null;\n \n if (this.isName(element))\n return element;\n \n return element.querySelector('[data-menu-path]');\n }\n \n isName(element) {\n if (!element)\n return false;\n \n return element.hasAttribute('data-menu-path');\n }\n \n isItem(element) {\n return this.checkElementsName(element, 'js-menu-item');\n }\n \n isMenu(element) {\n return this.checkElementsName(element, 'js-menu');\n }\n \n checkElementsName(element, nameElement, attribute) {\n if (!attribute)\n attribute = 'data-name';\n \n if (element) {\n const name = element.getAttribute(attribute);\n \n if (name === nameElement)\n return true;\n }\n \n return false;\n }\n \n isSubMenu(element) {\n const attribute = 'data-menu';\n const value = 'js-submenu';\n const item = this.getItem(element);\n \n return this.checkElementsName(item, value, attribute);\n }\n}\n\n\n//# sourceURL=file://cloudcmd//Users/coderaiser/cloudcmd/node_modules/supermenu/lib/element-funcs.js\n}");
|
|
1002
984
|
|
|
1003
985
|
},
|
|
1004
986
|
"./node_modules/supermenu/lib/supermenu.js"
|
|
@@ -1007,7 +989,7 @@ eval("{__webpack_require__.r(__webpack_exports__);\n__webpack_require__.d(__webp
|
|
|
1007
989
|
\*************************************************/
|
|
1008
990
|
(__unused_rspack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
1009
991
|
"use strict";
|
|
1010
|
-
eval("{__webpack_require__.r(__webpack_exports__);\n__webpack_require__.d(__webpack_exports__, {\n supermenu: () => (supermenu)\n});\n/* import */ var _css_supermenu_css__rspack_import_0 = __webpack_require__(/*! ../css/supermenu.css */ \"./node_modules/supermenu/css/supermenu.css\");\n/* import */ var _cloudcmd_create_element__rspack_import_1 = __webpack_require__(/*! @cloudcmd/create-element */ \"./node_modules/@cloudcmd/create-element/lib/create-element.js\");\n/* import */ var _build_items_js__rspack_import_2 = __webpack_require__(/*! ./build-items.js */ \"./node_modules/supermenu/lib/build-items.js\");\n/* import */ var _element_funcs_js__rspack_import_3 = __webpack_require__(/*! ./element-funcs.js */ \"./node_modules/supermenu/lib/element-funcs.js\");\n\n\n\n\n\nconst isNumber = (a) => typeof a === 'number';\nconst exec = (f, ...a) => f?.(...a);\n\nfunction supermenu(element, options, menuData) {\n if (!(this instanceof supermenu))\n return new supermenu(element, options, menuData);\n \n const ElementFuncs = new _element_funcs_js__rspack_import_3[\"default\"]();\n \n let Options = {};\n let Element;\n let ElementHeight;\n let ElementWidth;\n let ElementEvent;\n \n if (menuData) {\n Element = element;\n ElementEvent = Element;\n Options = options;\n } else if (options) {\n Element = element;\n ElementEvent = Element;\n menuData = options;\n } else {\n Element = document.body;\n ElementEvent = window;\n menuData = element;\n }\n \n const MenuFuncs = {};\n const ElementMenu = createMenu(menuData);\n \n ElementEvent.addEventListener('click', onClick);\n \n function createMenu(menuData) {\n const items = (0,_build_items_js__rspack_import_2[\"default\"])(menuData, MenuFuncs, Options);\n \n const menu = _cloudcmd_create_element__rspack_import_1('ul', {\n dataName: 'js-menu',\n className: 'menu menu-hidden',\n innerHTML: items,\n parent: Element,\n uniq: false,\n });\n \n return menu;\n }\n \n this.show = showMenuElement;\n this.hide = hideMenuElement;\n \n this.addContextMenuListener = () => {\n ElementEvent.addEventListener('contextmenu', onContextMenu);\n };\n \n this.removeContextMenuListener = () => {\n ElementEvent.addEventListener('contextmenu', onContextMenu);\n };\n \n this.remove = removeElement;\n \n function removeElement() {\n ElementEvent.removeEventListener('click', onClick);\n ElementEvent.removeEventListener('contextmenu', onContextMenu);\n \n Element.removeChild(ElementMenu);\n }\n \n function checkElement(target, position) {\n let element = ElementFuncs.getItem(target);\n let isName = ElementFuncs.isName(element);\n let isItem = ElementFuncs.isItem(element);\n let isSub = ElementFuncs.isSubMenu(element);\n \n if (!isName || !isItem) {\n element = document.elementFromPoint(position.x, position.y);\n isSub = ElementFuncs.isSubMenu(element);\n isName = ElementFuncs.isName(element);\n isItem = ElementFuncs.isItem(element);\n }\n \n return {\n name: isName,\n item: isItem,\n sub: isSub,\n };\n }\n \n function onClick(event, checkResult) {\n event.stopPropagation();\n \n const {\n afterClick,\n beforeClick,\n beforeHide,\n afterHide,\n name,\n } = Options;\n \n const element = event.target;\n \n const is = checkResult || checkElement(element, {\n x: event.clientX,\n y: event.clientY,\n });\n \n const notClick = exec(beforeClick, name);\n \n if (is.sub)\n return event.preventDefault();\n \n exec(beforeHide);\n hideMenuElement();\n exec(afterHide);\n \n if (!notClick && (is.name || is.item)) {\n const itemData = getMenuItemData(element);\n \n exec(itemData);\n exec(afterClick);\n }\n }\n \n function onContextMenu(event) {\n event.preventDefault();\n \n const element = event.target;\n const x = event.clientX;\n const y = event.clientY;\n \n const is = checkElement(element, {\n x,\n y,\n });\n \n if (is.name || is.item || is.sub)\n return onClick(event, is);\n \n hideMenuElement();\n showMenuElement(x, y);\n }\n \n function setMenuPosition(x, y) {\n const isNumberX = isNumber(x);\n const isNumberY = isNumber(y);\n const heightMenu = getMenuHeight();\n const widthMenu = getMenuWidth();\n const heightInner = globalThis.innerHeight;\n const widthInner = globalThis.innerWidth;\n \n if (widthInner < widthMenu + x) {\n x -= widthMenu;\n \n if (x < 0)\n x = 0;\n }\n \n if (heightInner < heightMenu + y) {\n y -= heightMenu;\n \n if (y < 0)\n y = 0;\n }\n \n if (isNumberX)\n ElementMenu.style.left = `${x}px`;\n \n if (isNumberY)\n ElementMenu.style.top = y - 14 + 'px';\n }\n \n function showMenuElement(x, y) {\n const {\n name,\n beforeShow,\n afterShow,\n } = Options;\n \n const params = {\n x,\n y,\n name,\n };\n \n const isShow = exec(beforeShow, params);\n \n if (isShow || isShow !== false) {\n ElementMenu.classList.remove('menu-hidden');\n setMenuPosition(params.x, params.y);\n exec(afterShow, params);\n }\n }\n \n function hideMenuElement() {\n const notHide = exec(Options.beforeClose);\n \n if (!notHide)\n ElementMenu.classList.add('menu-hidden');\n }\n \n function getMenuItemData(element) {\n const nameElement = ElementFuncs.getName(element);\n \n if (!nameElement)\n return null;\n \n const path = nameElement.getAttribute('data-menu-path');\n \n return MenuFuncs[path];\n }\n \n function getMenuHeight() {\n if (!ElementHeight) {\n const {height} = getComputedStyle(ElementMenu);\n \n ElementHeight = parseInt(height, 10);\n }\n \n return ElementHeight;\n }\n \n function getMenuWidth() {\n if (!ElementWidth) {\n const {width} = getComputedStyle(ElementMenu);\n \n ElementWidth = parseInt(width, 10);\n }\n \n return ElementWidth;\n }\n}\n\n\n//# sourceURL=file://cloudcmd
|
|
992
|
+
eval("{__webpack_require__.r(__webpack_exports__);\n__webpack_require__.d(__webpack_exports__, {\n supermenu: () => (supermenu)\n});\n/* import */ var _css_supermenu_css__rspack_import_0 = __webpack_require__(/*! ../css/supermenu.css */ \"./node_modules/supermenu/css/supermenu.css\");\n/* import */ var _cloudcmd_create_element__rspack_import_1 = __webpack_require__(/*! @cloudcmd/create-element */ \"./node_modules/@cloudcmd/create-element/lib/create-element.js\");\n/* import */ var _build_items_js__rspack_import_2 = __webpack_require__(/*! ./build-items.js */ \"./node_modules/supermenu/lib/build-items.js\");\n/* import */ var _element_funcs_js__rspack_import_3 = __webpack_require__(/*! ./element-funcs.js */ \"./node_modules/supermenu/lib/element-funcs.js\");\n\n\n\n\n\nconst isNumber = (a) => typeof a === 'number';\nconst exec = (f, ...a) => f?.(...a);\n\nfunction supermenu(element, options, menuData) {\n if (!(this instanceof supermenu))\n return new supermenu(element, options, menuData);\n \n const ElementFuncs = new _element_funcs_js__rspack_import_3[\"default\"]();\n \n let Options = {};\n let Element;\n let ElementHeight;\n let ElementWidth;\n let ElementEvent;\n \n if (menuData) {\n Element = element;\n ElementEvent = Element;\n Options = options;\n } else if (options) {\n Element = element;\n ElementEvent = Element;\n menuData = options;\n } else {\n Element = document.body;\n ElementEvent = window;\n menuData = element;\n }\n \n const MenuFuncs = {};\n const ElementMenu = createMenu(menuData);\n \n ElementEvent.addEventListener('click', onClick);\n \n function createMenu(menuData) {\n const items = (0,_build_items_js__rspack_import_2[\"default\"])(menuData, MenuFuncs, Options);\n \n const menu = _cloudcmd_create_element__rspack_import_1('ul', {\n dataName: 'js-menu',\n className: 'menu menu-hidden',\n innerHTML: items,\n parent: Element,\n uniq: false,\n });\n \n return menu;\n }\n \n this.show = showMenuElement;\n this.hide = hideMenuElement;\n \n this.addContextMenuListener = () => {\n ElementEvent.addEventListener('contextmenu', onContextMenu);\n };\n \n this.removeContextMenuListener = () => {\n ElementEvent.addEventListener('contextmenu', onContextMenu);\n };\n \n this.remove = removeElement;\n \n function removeElement() {\n ElementEvent.removeEventListener('click', onClick);\n ElementEvent.removeEventListener('contextmenu', onContextMenu);\n \n Element.removeChild(ElementMenu);\n }\n \n function checkElement(target, position) {\n let element = ElementFuncs.getItem(target);\n let isName = ElementFuncs.isName(element);\n let isItem = ElementFuncs.isItem(element);\n let isSub = ElementFuncs.isSubMenu(element);\n \n if (!isName || !isItem) {\n element = document.elementFromPoint(position.x, position.y);\n isSub = ElementFuncs.isSubMenu(element);\n isName = ElementFuncs.isName(element);\n isItem = ElementFuncs.isItem(element);\n }\n \n return {\n name: isName,\n item: isItem,\n sub: isSub,\n };\n }\n \n function onClick(event, checkResult) {\n event.stopPropagation();\n \n const {\n afterClick,\n beforeClick,\n beforeHide,\n afterHide,\n name,\n } = Options;\n \n const element = event.target;\n \n const is = checkResult || checkElement(element, {\n x: event.clientX,\n y: event.clientY,\n });\n \n const notClick = exec(beforeClick, name);\n \n if (is.sub)\n return event.preventDefault();\n \n exec(beforeHide);\n hideMenuElement();\n exec(afterHide);\n \n if (!notClick && (is.name || is.item)) {\n const itemData = getMenuItemData(element);\n \n exec(itemData);\n exec(afterClick);\n }\n }\n \n function onContextMenu(event) {\n event.preventDefault();\n \n const element = event.target;\n const x = event.clientX;\n const y = event.clientY;\n \n const is = checkElement(element, {\n x,\n y,\n });\n \n if (is.name || is.item || is.sub)\n return onClick(event, is);\n \n hideMenuElement();\n showMenuElement(x, y);\n }\n \n function setMenuPosition(x, y) {\n const isNumberX = isNumber(x);\n const isNumberY = isNumber(y);\n const heightMenu = getMenuHeight();\n const widthMenu = getMenuWidth();\n const heightInner = globalThis.innerHeight;\n const widthInner = globalThis.innerWidth;\n \n if (widthInner < widthMenu + x) {\n x -= widthMenu;\n \n if (x < 0)\n x = 0;\n }\n \n if (heightInner < heightMenu + y) {\n y -= heightMenu;\n \n if (y < 0)\n y = 0;\n }\n \n if (isNumberX)\n ElementMenu.style.left = `${x}px`;\n \n if (isNumberY)\n ElementMenu.style.top = y - 14 + 'px';\n }\n \n function showMenuElement(x, y) {\n const {\n name,\n beforeShow,\n afterShow,\n } = Options;\n \n const params = {\n x,\n y,\n name,\n };\n \n const isShow = exec(beforeShow, params);\n \n if (isShow || isShow !== false) {\n ElementMenu.classList.remove('menu-hidden');\n setMenuPosition(params.x, params.y);\n exec(afterShow, params);\n }\n }\n \n function hideMenuElement() {\n const notHide = exec(Options.beforeClose);\n \n if (!notHide)\n ElementMenu.classList.add('menu-hidden');\n }\n \n function getMenuItemData(element) {\n const nameElement = ElementFuncs.getName(element);\n \n if (!nameElement)\n return null;\n \n const path = nameElement.getAttribute('data-menu-path');\n \n return MenuFuncs[path];\n }\n \n function getMenuHeight() {\n if (!ElementHeight) {\n const {height} = getComputedStyle(ElementMenu);\n \n ElementHeight = parseInt(height, 10);\n }\n \n return ElementHeight;\n }\n \n function getMenuWidth() {\n if (!ElementWidth) {\n const {width} = getComputedStyle(ElementMenu);\n \n ElementWidth = parseInt(width, 10);\n }\n \n return ElementWidth;\n }\n}\n\n\n//# sourceURL=file://cloudcmd//Users/coderaiser/cloudcmd/node_modules/supermenu/lib/supermenu.js\n}");
|
|
1011
993
|
|
|
1012
994
|
},
|
|
1013
995
|
"./node_modules/supermenu/lib/template.js"
|
|
@@ -1016,7 +998,7 @@ eval("{__webpack_require__.r(__webpack_exports__);\n__webpack_require__.d(__webp
|
|
|
1016
998
|
\************************************************/
|
|
1017
999
|
(__unused_rspack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
1018
1000
|
"use strict";
|
|
1019
|
-
eval("{__webpack_require__.r(__webpack_exports__);\n__webpack_require__.d(__webpack_exports__, {\n ITEM: () => (ITEM),\n MAIN: () => (MAIN)\n});\nconst MAIN = '<ul data-name=\"js-menu\" class=\"menu menu-hidden\">{{ items }}</ul>';\nconst ITEM = '<li data-name=\"js-menu-item\" class=\"menu-item{{ className }}\"{{ attribute }}>' +\n '<label data-menu-path=\"{{ path }}\">{{ name }}</label>' +\n '{{ subitems }}' +\n '</li>';\n\n\n//# sourceURL=file://cloudcmd
|
|
1001
|
+
eval("{__webpack_require__.r(__webpack_exports__);\n__webpack_require__.d(__webpack_exports__, {\n ITEM: () => (ITEM),\n MAIN: () => (MAIN)\n});\nconst MAIN = '<ul data-name=\"js-menu\" class=\"menu menu-hidden\">{{ items }}</ul>';\nconst ITEM = '<li data-name=\"js-menu-item\" class=\"menu-item{{ className }}\"{{ attribute }}>' +\n '<label data-menu-path=\"{{ path }}\">{{ name }}</label>' +\n '{{ subitems }}' +\n '</li>';\n\n\n//# sourceURL=file://cloudcmd//Users/coderaiser/cloudcmd/node_modules/supermenu/lib/template.js\n}");
|
|
1020
1002
|
|
|
1021
1003
|
},
|
|
1022
1004
|
"./node_modules/try-catch/lib/try-catch.js"
|
|
@@ -1025,7 +1007,7 @@ eval("{__webpack_require__.r(__webpack_exports__);\n__webpack_require__.d(__webp
|
|
|
1025
1007
|
\*************************************************/
|
|
1026
1008
|
(__unused_rspack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
1027
1009
|
"use strict";
|
|
1028
|
-
eval("{__webpack_require__.r(__webpack_exports__);\n__webpack_require__.d(__webpack_exports__, {\n tryCatch: () => (tryCatch)\n});\nconst tryCatch = (fn, ...args) => {\n try {\n return [null, fn(...args)];\n } catch(e) {\n return [e];\n }\n};\n\n\n//# sourceURL=file://cloudcmd
|
|
1010
|
+
eval("{__webpack_require__.r(__webpack_exports__);\n__webpack_require__.d(__webpack_exports__, {\n tryCatch: () => (tryCatch)\n});\nconst tryCatch = (fn, ...args) => {\n try {\n return [null, fn(...args)];\n } catch(e) {\n return [e];\n }\n};\n\n\n//# sourceURL=file://cloudcmd//Users/coderaiser/cloudcmd/node_modules/try-catch/lib/try-catch.js\n}");
|
|
1029
1011
|
|
|
1030
1012
|
},
|
|
1031
1013
|
"./node_modules/try-to-catch/lib/try-to-catch.js"
|
|
@@ -1034,7 +1016,7 @@ eval("{__webpack_require__.r(__webpack_exports__);\n__webpack_require__.d(__webp
|
|
|
1034
1016
|
\*******************************************************/
|
|
1035
1017
|
(__unused_rspack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
1036
1018
|
"use strict";
|
|
1037
|
-
eval("{__webpack_require__.r(__webpack_exports__);\n__webpack_require__.d(__webpack_exports__, {\n tryToCatch: () => (tryToCatch)\n});\nconst isFn = (a) => typeof a === 'function';\n\nconst tryToCatch = async (fn, ...args) => {\n check(fn);\n \n try {\n return [null, await fn(...args)];\n } catch(e) {\n return [e];\n }\n};\n\nfunction check(fn) {\n if (!isFn(fn))\n throw Error('fn should be a function!');\n}\n\n\n//# sourceURL=file://cloudcmd
|
|
1019
|
+
eval("{__webpack_require__.r(__webpack_exports__);\n__webpack_require__.d(__webpack_exports__, {\n tryToCatch: () => (tryToCatch)\n});\nconst isFn = (a) => typeof a === 'function';\n\nconst tryToCatch = async (fn, ...args) => {\n check(fn);\n \n try {\n return [null, await fn(...args)];\n } catch(e) {\n return [e];\n }\n};\n\nfunction check(fn) {\n if (!isFn(fn))\n throw Error('fn should be a function!');\n}\n\n\n//# sourceURL=file://cloudcmd//Users/coderaiser/cloudcmd/node_modules/try-to-catch/lib/try-to-catch.js\n}");
|
|
1038
1020
|
|
|
1039
1021
|
},
|
|
1040
1022
|
"./client/client.js"
|
|
@@ -1052,7 +1034,7 @@ eval("{__webpack_require__.r(__webpack_exports__);\n__webpack_require__.d(__webp
|
|
|
1052
1034
|
\****************************/
|
|
1053
1035
|
(__unused_rspack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
1054
1036
|
"use strict";
|
|
1055
|
-
eval("{__webpack_require__.r(__webpack_exports__);\n__webpack_require__.d(__webpack_exports__, {\n \"default\": () => (__rspack_default_export)\n});\n/* import */ var _css_main_css__rspack_import_0 = __webpack_require__(/*! ../css/main.css */ \"./css/main.css\");\n/* import */ var node_process__rspack_import_1 = __webpack_require__(/*! node:process */ \"./node_modules/process/browser.js\");\n/* import */ var wraptile__rspack_import_2 = __webpack_require__(/*! wraptile */ \"./node_modules/wraptile/lib/wraptile.js\");\n/* import */ var load_js__rspack_import_3 = __webpack_require__(/*! load.js */ \"./node_modules/load.js/lib/load.js\");\n/* import */ var _common_util__rspack_import_4 = __webpack_require__(/*! #common/util */ \"./common/util.js\");\n/* import */ var _common_cloudfunc__rspack_import_5 = __webpack_require__(/*! #common/cloudfunc */ \"./common/cloudfunc.js\");\n/* import */ var _dom__rspack_import_6 = __webpack_require__(/*! #dom */ \"./client/dom/index.js\");\n/* import */ var _sw_register_js__rspack_import_7 = __webpack_require__(/*! ./sw/register.js */ \"./client/sw/register.js\");\n/* import */ var _sort_js__rspack_import_8 = __webpack_require__(/*! ./sort.js */ \"./client/sort.js\");\n/* import */ var _client_js__rspack_import_9 = __webpack_require__(/*! ./client.js */ \"./client/client.js\");\n/* import */ var _listeners_index_js__rspack_import_10 = __webpack_require__(/*! ./listeners/index.js */ \"./client/listeners/index.js\");\n\n\n\n\n\n\n\n\n\n\n\nconst isDev = \"development\" === 'development';\n/* export default */ const __rspack_default_export = (init);\nglobalThis.CloudCmd = init;\nasync function init(config) {\n globalThis.CloudCmd = (0,_client_js__rspack_import_9.createCloudCmd)({\n DOM: _dom__rspack_import_6[\"default\"],\n Listeners: _listeners_index_js__rspack_import_10\n });\n globalThis.DOM = _dom__rspack_import_6[\"default\"];\n globalThis.Util = _common_util__rspack_import_4;\n globalThis.CloudFunc = _common_cloudfunc__rspack_import_5;\n await register(config);\n (0,_sort_js__rspack_import_8.initSortPanel)();\n globalThis.CloudCmd.sortPanel = _sort_js__rspack_import_8.sortPanel;\n const prefix = getPrefix(config.prefix);\n globalThis.CloudCmd.init(prefix, config);\n
|
|
1037
|
+
eval("{__webpack_require__.r(__webpack_exports__);\n__webpack_require__.d(__webpack_exports__, {\n \"default\": () => (__rspack_default_export)\n});\n/* import */ var _css_main_css__rspack_import_0 = __webpack_require__(/*! ../css/main.css */ \"./css/main.css\");\n/* import */ var node_process__rspack_import_1 = __webpack_require__(/*! node:process */ \"./node_modules/process/browser.js\");\n/* import */ var wraptile__rspack_import_2 = __webpack_require__(/*! wraptile */ \"./node_modules/wraptile/lib/wraptile.js\");\n/* import */ var load_js__rspack_import_3 = __webpack_require__(/*! load.js */ \"./node_modules/load.js/lib/load.js\");\n/* import */ var _common_util__rspack_import_4 = __webpack_require__(/*! #common/util */ \"./common/util.js\");\n/* import */ var _common_cloudfunc__rspack_import_5 = __webpack_require__(/*! #common/cloudfunc */ \"./common/cloudfunc.js\");\n/* import */ var _dom__rspack_import_6 = __webpack_require__(/*! #dom */ \"./client/dom/index.js\");\n/* import */ var _sw_register_js__rspack_import_7 = __webpack_require__(/*! ./sw/register.js */ \"./client/sw/register.js\");\n/* import */ var _sort_js__rspack_import_8 = __webpack_require__(/*! ./sort.js */ \"./client/sort.js\");\n/* import */ var _client_js__rspack_import_9 = __webpack_require__(/*! ./client.js */ \"./client/client.js\");\n/* import */ var _listeners_index_js__rspack_import_10 = __webpack_require__(/*! ./listeners/index.js */ \"./client/listeners/index.js\");\n\n\n\n\n\n\n\n\n\n\n\nconst isDev = \"development\" === 'development';\n/* export default */ const __rspack_default_export = (init);\nglobalThis.CloudCmd = init;\nasync function init(config) {\n globalThis.CloudCmd = (0,_client_js__rspack_import_9.createCloudCmd)({\n DOM: _dom__rspack_import_6[\"default\"],\n Listeners: _listeners_index_js__rspack_import_10\n });\n globalThis.DOM = _dom__rspack_import_6[\"default\"];\n globalThis.Util = _common_util__rspack_import_4;\n globalThis.CloudFunc = _common_cloudfunc__rspack_import_5;\n await register(config);\n (0,_sort_js__rspack_import_8.initSortPanel)();\n globalThis.CloudCmd.sortPanel = _sort_js__rspack_import_8.sortPanel;\n const prefix = getPrefix(config.prefix);\n globalThis.CloudCmd.init(prefix, config);\n}\nfunction getPrefix(prefix) {\n if (!prefix) return '';\n if (!prefix.indexOf('/')) return prefix;\n return `/${prefix}`;\n}\nconst onUpdateFound = wraptile__rspack_import_2(async (config)=>{\n if (isDev) return;\n const { DOM } = globalThis;\n const prefix = getPrefix(config.prefix);\n await load_js__rspack_import_3.js(`${prefix}/dist/cloudcmd.common.js`);\n await load_js__rspack_import_3.js(`${prefix}/dist/cloudcmd.js`);\n console.log('cloudcmd: sw: updated');\n DOM.Events.removeAll();\n globalThis.CloudCmd(config);\n});\nasync function register(config) {\n const { prefix } = config;\n const sw = await (0,_sw_register_js__rspack_import_7.registerSW)(prefix);\n (0,_sw_register_js__rspack_import_7.listenSW)(sw, 'updatefound', onUpdateFound(config));\n}\n\n\n//# sourceURL=file://cloudcmd//Users/coderaiser/cloudcmd/client/cloudcmd.js\n}");
|
|
1056
1038
|
|
|
1057
1039
|
},
|
|
1058
1040
|
"./client/dom/buffer.js"
|
|
@@ -1468,24 +1450,6 @@ eval("{__webpack_require__.r(__webpack_exports__);\n__webpack_require__.d(__webp
|
|
|
1468
1450
|
"use strict";
|
|
1469
1451
|
eval("{__webpack_require__.r(__webpack_exports__);\n__webpack_require__.d(__webpack_exports__, {\n hide: () => (hide),\n init: () => (init),\n show: () => (show)\n});\n/* import */ var _cloudcmd_create_element__rspack_import_0 = __webpack_require__(/*! @cloudcmd/create-element */ \"./node_modules/@cloudcmd/create-element/lib/create-element.js\");\n/* import */ var _dom_images__rspack_import_1 = __webpack_require__(/*! #dom/images */ \"./client/dom/images.js\");\n/* import */ var _dom_rest__rspack_import_2 = __webpack_require__(/*! #dom/rest */ \"./client/dom/rest.js\");\n/* import */ var _dom_dialog__rspack_import_3 = __webpack_require__(/*! #dom/dialog */ \"./client/dom/dialog.js\");\n\n\n\n\nconst { CloudCmd } = globalThis;\nCloudCmd.Markdown = {\n init,\n show,\n hide\n};\nasync function init() {\n _dom_images__rspack_import_1.show.load('top');\n await CloudCmd.View();\n}\nfunction hide() {\n CloudCmd.View.hide();\n}\nasync function show(name, options = {}) {\n const { positionLoad, relative } = options;\n _dom_images__rspack_import_1.show.load(positionLoad);\n if (relative) name += '?relative';\n const [error, innerHTML] = await _dom_rest__rspack_import_2.Markdown.read(name);\n _dom_images__rspack_import_1.hide();\n if (error) return (0,_dom_dialog__rspack_import_3.alert)(error.message, {\n cancel: false\n });\n const className = 'help';\n const div = _cloudcmd_create_element__rspack_import_0('div', {\n className,\n innerHTML\n });\n CloudCmd.View.show(div);\n}\n\n\n//# sourceURL=file://cloudcmd//Users/coderaiser/cloudcmd/client/modules/markdown.js\n}");
|
|
1470
1452
|
|
|
1471
|
-
},
|
|
1472
|
-
"./client/modules/menu/cloudmenu.js"
|
|
1473
|
-
/*!******************************************!*\
|
|
1474
|
-
!*** ./client/modules/menu/cloudmenu.js ***!
|
|
1475
|
-
\******************************************/
|
|
1476
|
-
(__unused_rspack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
1477
|
-
"use strict";
|
|
1478
|
-
eval("{__webpack_require__.r(__webpack_exports__);\n__webpack_require__.d(__webpack_exports__, {\n createCloudMenu: () => (createCloudMenu)\n});\n/* import */ var supermenu__rspack_import_0 = __webpack_require__(/*! supermenu */ \"./node_modules/supermenu/lib/supermenu.js\");\n\nconst noop = ()=>{};\nconst { CloudCmd } = globalThis;\nconst createCloudMenu = async (fm, options, menuData)=>{\n const createMenu = await loadMenu();\n const menu = await createMenu(fm, options, menuData);\n menu.addContextMenuListener = menu.addContextMenuListener || noop;\n return menu;\n};\nasync function loadMenu() {\n if (CloudCmd.config('menu') === 'aleman') {\n const { prefix } = CloudCmd;\n const { host, protocol } = globalThis.location;\n const url = `${protocol}//${host}${prefix}/node_modules/aleman/menu/menu.js`;\n const { createMenu } = await import(/* webpackIgnore: true */ url);\n return createMenu;\n }\n return createSupermenu;\n}\nfunction createSupermenu(name, options, menuData) {\n const element = document.querySelector('[data-name=\"js-fm\"]');\n return (0,supermenu__rspack_import_0.supermenu)(element, options, menuData);\n}\n\n\n//# sourceURL=file://cloudcmd//Users/coderaiser/cloudcmd/client/modules/menu/cloudmenu.js\n}");
|
|
1479
|
-
|
|
1480
|
-
},
|
|
1481
|
-
"./client/modules/menu/index.js"
|
|
1482
|
-
/*!**************************************!*\
|
|
1483
|
-
!*** ./client/modules/menu/index.js ***!
|
|
1484
|
-
\**************************************/
|
|
1485
|
-
(__unused_rspack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
1486
|
-
"use strict";
|
|
1487
|
-
eval("{__webpack_require__.r(__webpack_exports__);\n__webpack_require__.d(__webpack_exports__, {\n ENABLED: () => (ENABLED),\n hide: () => (hide),\n init: () => (init),\n show: () => (show)\n});\n/* import */ var execon__rspack_import_0 = __webpack_require__(/*! execon */ \"./node_modules/execon/lib/exec.js\");\n/* import */ var wraptile__rspack_import_1 = __webpack_require__(/*! wraptile */ \"./node_modules/wraptile/lib/wraptile.js\");\n/* import */ var _cloudcmd_create_element__rspack_import_2 = __webpack_require__(/*! @cloudcmd/create-element */ \"./node_modules/@cloudcmd/create-element/lib/create-element.js\");\n/* import */ var _dom_load__rspack_import_3 = __webpack_require__(/*! #dom/load */ \"./client/dom/load.js\");\n/* import */ var _dom_rest__rspack_import_4 = __webpack_require__(/*! #dom/rest */ \"./client/dom/rest.js\");\n/* import */ var _common_cloudfunc__rspack_import_5 = __webpack_require__(/*! #common/cloudfunc */ \"./common/cloudfunc.js\");\n\n\n\n\n\n\nconst { CloudCmd, DOM } = globalThis;\nconst { config, Key } = CloudCmd;\nconst { Buffer, Events, Dialog, Images } = DOM;\nconst Info = DOM.CurrentInfo;\nconst alertNoFiles = Dialog.alert.noFiles;\nconst uploadTo = wraptile__rspack_import_1(_uploadTo);\nlet MenuShowedName;\nlet MenuContext;\nlet MenuContextFile;\nconst ENABLED = false;\nCloudCmd.Menu = {\n init,\n show,\n hide\n};\nasync function init() {\n const { isAuth, menuDataFile } = getFileMenuData();\n const fm = DOM.getFM();\n const menuData = getMenuData(isAuth);\n const options = getOptions({\n type: 'context'\n });\n const optionsFile = getOptions({\n type: 'file'\n });\n const { createCloudMenu } = await __webpack_require__.e(/*! import() */ \"cloudcmd.common\").then(__webpack_require__.bind(__webpack_require__, /*! ./cloudmenu.js */ \"./client/modules/menu/cloudmenu.js\"));\n const { name } = fm.dataset;\n MenuContext = await createCloudMenu(name, options, menuData);\n MenuContextFile = await createCloudMenu(name, optionsFile, menuDataFile);\n MenuContext.addContextMenuListener();\n MenuContextFile.addContextMenuListener();\n Events.addKey(listener);\n}\nfunction hide() {\n MenuContext.hide();\n MenuContextFile.hide();\n}\nfunction show(position) {\n const { x, y } = getPosition(position);\n MenuContext.show(x, y);\n MenuContextFile.show(x, y);\n Images.hide();\n}\nfunction getPosition(position) {\n if (position) return {\n x: position.x,\n y: position.y\n };\n return getCurrentPosition();\n}\nfunction getMenuNameByEl(el) {\n if (!el) return 'context';\n const name = DOM.getCurrentName(el);\n if (name === '..') return 'context';\n return 'contextFile';\n}\nfunction getOptions({ type }) {\n let name;\n let func;\n if (type === 'context') {\n name = 'context';\n func = Key.unsetBind;\n } else if (type === 'file') {\n name = 'contextFile';\n }\n const options = {\n icon: true,\n infiniteScroll: false,\n beforeClose: Key.setBind,\n beforeHide: Key.setBind,\n beforeShow: execon__rspack_import_0[\"with\"](beforeShow, func),\n beforeClick,\n name\n };\n return options;\n}\nfunction getMenuData(isAuth) {\n const menu = {\n 'Paste': Buffer.paste,\n 'New': {\n File: DOM.promptNewFile,\n Directory: DOM.promptNewDir\n },\n 'Upload': ()=>{\n CloudCmd.Upload.show();\n },\n 'Upload From Cloud': uploadFromCloud,\n 'Toggle File Selection': DOM.toggleSelectedFile,\n '(Un)Select All': DOM.toggleAllSelectedFiles\n };\n if (isAuth) menu['Log Out'] = CloudCmd.logOut;\n return menu;\n}\nfunction getFileMenuData() {\n const isAuth = CloudCmd.config('auth');\n const menuBottom = getMenuData(isAuth);\n const menuTop = {\n 'View': ()=>{\n CloudCmd.View.show();\n },\n 'Edit': ()=>{\n const name = config('vim') ? 'EditFileVim' : 'EditFile';\n CloudCmd[name].show();\n },\n 'Rename': ()=>{\n setTimeout(DOM.renameCurrent, 100);\n },\n 'Delete': ()=>{\n CloudCmd.Operation.show('delete');\n },\n 'Pack': ()=>{\n CloudCmd.Operation.show('pack');\n },\n 'Extract': ()=>{\n CloudCmd.Operation.show('extract');\n },\n 'Download': preDownload,\n 'Upload To Cloud': uploadTo('Cloud'),\n 'Cut': ()=>{\n isCurrent(Buffer.cut, alertNoFiles);\n },\n 'Copy': ()=>{\n isCurrent(Buffer.copy, alertNoFiles);\n }\n };\n const menuDataFile = {\n ...menuTop,\n ...menuBottom\n };\n return {\n isAuth,\n menuDataFile\n };\n}\nfunction isCurrent(yesFn, noFn) {\n if (Info.name !== '..') return yesFn();\n noFn();\n}\nfunction isPath(x, y) {\n const { panel } = Info;\n const isEmptyRoot = !panel;\n if (isEmptyRoot) return false;\n const el = document.elementFromPoint(x, y);\n const elements = panel.querySelectorAll('[data-name=\"js-path\"] *');\n return !~[].indexOf.call(elements, el);\n}\nfunction beforeShow(callback, params) {\n Key.unsetBind();\n const { name, position = {\n x: params.x,\n y: params.y\n } } = params;\n const { x, y } = position;\n const el = DOM.getCurrentByPosition({\n x,\n y\n });\n const menuName = getMenuNameByEl(el);\n let isShow = menuName !== 'contextFile';\n if (params.name === 'contextFile') isShow = !isShow;\n if (isShow) MenuShowedName = name;\n execon__rspack_import_0(callback);\n if (isShow) isShow = isPath(x, y);\n return isShow;\n}\nconst beforeClick = (name)=>MenuShowedName !== name;\nasync function _uploadTo(nameModule) {\n const [error, data] = await Info.getData();\n if (error) return;\n const { name } = Info;\n CloudCmd.execFromModule(nameModule, 'uploadFile', name, data);\n CloudCmd.log(`Uploading to ${name}...`);\n}\nfunction uploadFromCloud() {\n Images.show.load('top');\n CloudCmd.execFromModule('Cloud', 'saveFile', async (currentName, data)=>{\n const path = DOM.getCurrentDirPath() + currentName;\n const [e] = await _dom_rest__rspack_import_4.write(path, data);\n if (e) return;\n await CloudCmd.refresh({\n currentName\n });\n });\n}\nfunction preDownload() {\n download(config('packer'));\n}\nfunction download(type) {\n const TIME = 30 * 1000;\n const { prefixURL } = CloudCmd;\n const PACK = '/pack';\n const date = Date.now();\n const files = DOM.getActiveFiles();\n if (!files.length) return alertNoFiles();\n for (const file of files){\n const selected = DOM.isSelected(file);\n const isDir = DOM.isCurrentIsDir(file);\n const path = DOM.getCurrentPath(file);\n CloudCmd.log(`downloading file ${path}...`);\n /*\n * if we send ajax request -\n * no need in hash so we escape #\n * and all other characters, like \"%\"\n */ const encodedPath = encodeURI(path).replace(/#/g, '#');\n const id = (0,_dom_load__rspack_import_3.getIdBySrc)(path);\n let src;\n if (isDir) src = prefixURL + PACK + encodedPath + DOM.getPackerExt(type);\n else src = prefixURL + _common_cloudfunc__rspack_import_5.FS + encodedPath + '?download';\n const element = _cloudcmd_create_element__rspack_import_2('iframe', {\n id: id + '-' + date,\n async: false,\n className: 'hidden',\n src\n });\n const { body } = document;\n const removeChild = body.removeChild.bind(body, element);\n setTimeout(removeChild, TIME);\n if (selected) DOM.toggleSelectedFile(file);\n }\n}\nfunction getCurrentPosition() {\n const current = Info.element;\n const rect = current.getBoundingClientRect();\n const position = {\n x: Math.round(rect.left + rect.width / 3),\n y: Math.round(rect.top)\n };\n return position;\n}\nfunction listener(event) {\n const { F9, ESC } = Key;\n const key = event.keyCode;\n const isBind = Key.isBind();\n if (key === ESC) {\n Key.setBind();\n return hide();\n }\n if (isBind && key === F9) {\n const position = getCurrentPosition();\n MenuContext.show(position.x, position.y);\n event.preventDefault();\n }\n}\n\n\n//# sourceURL=file://cloudcmd//Users/coderaiser/cloudcmd/client/modules/menu/index.js\n}");
|
|
1488
|
-
|
|
1489
1453
|
},
|
|
1490
1454
|
"./client/modules/operation/format.js"
|
|
1491
1455
|
/*!********************************************!*\
|