REDROOM
PHP 8.2.30
Path:
Logout
Edit File
Size: 3.63 KB
Close
/proc/self/root/opt/alt/alt-nodejs19/root/lib/node_modules/npm/node_modules/gauge/lib/theme-set.js
Text
Base64
'use strict' module.exports = function () { return ThemeSetProto.newThemeSet() } var ThemeSetProto = {} ThemeSetProto.baseTheme = require('./base-theme.js') ThemeSetProto.newTheme = function (parent, theme) { if (!theme) { theme = parent parent = this.baseTheme } return Object.assign({}, parent, theme) } ThemeSetProto.getThemeNames = function () { return Object.keys(this.themes) } ThemeSetProto.addTheme = function (name, parent, theme) { this.themes[name] = this.newTheme(parent, theme) } ThemeSetProto.addToAllThemes = function (theme) { var themes = this.themes Object.keys(themes).forEach(function (name) { Object.assign(themes[name], theme) }) Object.assign(this.baseTheme, theme) } ThemeSetProto.getTheme = function (name) { if (!this.themes[name]) { throw this.newMissingThemeError(name) } return this.themes[name] } ThemeSetProto.setDefault = function (opts, name) { if (name == null) { name = opts opts = {} } var platform = opts.platform == null ? 'fallback' : opts.platform var hasUnicode = !!opts.hasUnicode var hasColor = !!opts.hasColor if (!this.defaults[platform]) { this.defaults[platform] = { true: {}, false: {} } } this.defaults[platform][hasUnicode][hasColor] = name } ThemeSetProto.getDefault = function (opts) { if (!opts) { opts = {} } var platformName = opts.platform || process.platform var platform = this.defaults[platformName] || this.defaults.fallback var hasUnicode = !!opts.hasUnicode var hasColor = !!opts.hasColor if (!platform) { throw this.newMissingDefaultThemeError(platformName, hasUnicode, hasColor) } if (!platform[hasUnicode][hasColor]) { if (hasUnicode && hasColor && platform[!hasUnicode][hasColor]) { hasUnicode = false } else if (hasUnicode && hasColor && platform[hasUnicode][!hasColor]) { hasColor = false } else if (hasUnicode && hasColor && platform[!hasUnicode][!hasColor]) { hasUnicode = false hasColor = false } else if (hasUnicode && !hasColor && platform[!hasUnicode][hasColor]) { hasUnicode = false } else if (!hasUnicode && hasColor && platform[hasUnicode][!hasColor]) { hasColor = false } else if (platform === this.defaults.fallback) { throw this.newMissingDefaultThemeError(platformName, hasUnicode, hasColor) } } if (platform[hasUnicode][hasColor]) { return this.getTheme(platform[hasUnicode][hasColor]) } else { return this.getDefault(Object.assign({}, opts, { platform: 'fallback' })) } } ThemeSetProto.newMissingThemeError = function newMissingThemeError (name) { var err = new Error('Could not find a gauge theme named "' + name + '"') Error.captureStackTrace.call(err, newMissingThemeError) err.theme = name err.code = 'EMISSINGTHEME' return err } ThemeSetProto.newMissingDefaultThemeError = function newMissingDefaultThemeError (platformName, hasUnicode, hasColor) { var err = new Error( 'Could not find a gauge theme for your platform/unicode/color use combo:\n' + ' platform = ' + platformName + '\n' + ' hasUnicode = ' + hasUnicode + '\n' + ' hasColor = ' + hasColor) Error.captureStackTrace.call(err, newMissingDefaultThemeError) err.platform = platformName err.hasUnicode = hasUnicode err.hasColor = hasColor err.code = 'EMISSINGTHEME' return err } ThemeSetProto.newThemeSet = function () { var themeset = function (opts) { return themeset.getDefault(opts) } return Object.assign(themeset, ThemeSetProto, { themes: Object.assign({}, this.themes), baseTheme: Object.assign({}, this.baseTheme), defaults: JSON.parse(JSON.stringify(this.defaults || {})), }) }
Save
Close
Exit & Reset
Text mode: syntax highlighting auto-detects file type.
Directory Contents
Dirs: 0 × Files: 15
Delete Selected
Select All
Select None
Sort:
Name
Size
Modified
Enable drag-to-move
Name
Size
Perms
Modified
Actions
base-theme.js
424 B
lrw-r--r--
2023-12-06 18:07:52
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
error.js
616 B
lrw-r--r--
2023-12-06 18:07:52
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
has-color.js
99 B
lrw-r--r--
2023-12-06 18:07:52
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
index.js
7.12 KB
lrw-r--r--
2023-12-06 18:07:52
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
plumbing.js
1.25 KB
lrw-r--r--
2023-12-06 18:07:52
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
process.js
89 B
lrw-r--r--
2023-12-06 18:07:52
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
progress-bar.js
1.01 KB
lrw-r--r--
2023-12-06 18:07:52
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
render-template.js
5.81 KB
lrw-r--r--
2023-12-06 18:07:52
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
set-immediate.js
139 B
lrw-r--r--
2023-12-06 18:07:52
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
set-interval.js
93 B
lrw-r--r--
2023-12-06 18:07:52
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
spin.js
105 B
lrw-r--r--
2023-12-06 18:07:52
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
template-item.js
1.93 KB
lrw-r--r--
2023-12-06 18:07:52
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
theme-set.js
3.63 KB
lrw-r--r--
2023-12-06 18:07:52
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
themes.js
1.63 KB
lrw-r--r--
2023-12-06 18:07:52
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
wide-truncate.js
858 B
lrw-r--r--
2023-12-06 18:07:52
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
Zip Selected
If ZipArchive is unavailable, a
.tar
will be created (no compression).