├── CNAME ├── favicon.ico ├── .vscode ├── extensions.json └── settings.json ├── README.md ├── webpack.config.js ├── package.json ├── lib ├── style.css ├── style.css.map ├── index.js.map └── index.js ├── src ├── style.scss ├── tree.data.js └── index.js ├── .gitignore ├── index.html └── .eslintrc.js /CNAME: -------------------------------------------------------------------------------- 1 | kibibit.io -------------------------------------------------------------------------------- /favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kibibit/Kibibit.github.io/master/favicon.ico -------------------------------------------------------------------------------- /.vscode/extensions.json: -------------------------------------------------------------------------------- 1 | { 2 | "recommendations": [ 3 | "actboy168.tasks", 4 | "codeandstuff.package-json-upgrade", 5 | "coenraads.bracket-pair-colorizer", 6 | "dbaeumer.vscode-eslint", 7 | "eamodio.gitlens", 8 | "jock.svg", 9 | "mhutchie.git-graph", 10 | "wayou.vscode-todo-highlight", 11 | "wix.vscode-import-cost" 12 | ] 13 | } -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Welcome to kibibit 2 | 3 | kibibit is an open source team of software developers, trying to make the world easier piece by piece. you're more than welcome to contribute! 4 | 5 | Site is under construction. come back soon :-) 6 | 7 | ### Links 8 | 9 | - [achievibit](https://achievibit.kibibit.io/) 10 | - [our GitHub profile](https://github.com/kibibit) 11 | 12 | ### Team members: 13 | 14 | 1. [thatkookooguy](https://github.com/thatkookooguy) 15 | 2. [ortichon](https://github.com/ortichon) 16 | 3. [dunaevsky](https://github.com/dunaevsky) 17 | -------------------------------------------------------------------------------- /webpack.config.js: -------------------------------------------------------------------------------- 1 | const path = require('path'); 2 | 3 | module.exports = { 4 | entry: './src/index.js', 5 | output: { 6 | path: path.resolve(__dirname, 'lib'), 7 | filename: 'index.js', 8 | publicPath: '/lib/' 9 | }, 10 | resolve: { 11 | alias: { 12 | 'node_modules': path.join(__dirname, 'node_modules'), 13 | } 14 | }, 15 | devtool: 'source-map', 16 | devServer: { 17 | static: { 18 | directory: __dirname, 19 | watch: { 20 | ignored: '**/*.scss', 21 | usePolling: false, 22 | }, 23 | }, 24 | compress: true, 25 | port: 8080, 26 | }, 27 | }; -------------------------------------------------------------------------------- /.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "editor.tabSize": 2, 3 | "editor.insertSpaces": true, 4 | "editor.detectIndentation": false, 5 | "editor.rulers": [120], 6 | "editor.matchBrackets": "always", 7 | "debug.javascript.autoAttachFilter": "smart", 8 | "editor.codeActionsOnSave": { 9 | "source.fixAll.eslint": true, 10 | }, 11 | "eslint.format.enable": true, 12 | "bracketPairColorizer.colorMode": "Consecutive", 13 | "bracketPairColorizer.forceUniqueOpeningColor": true, 14 | "bracketPairColorizer.showBracketsInGutter": true, 15 | "window.title": "${activeEditorShort}${separator}${rootName} [kibibit]", 16 | "debug.javascript.terminalOptions": { 17 | "skipFiles": [ 18 | "/**" 19 | ] 20 | }, 21 | "svg.preview.background": "black", 22 | "todotodohighlight.isEnable": true, 23 | "todohighlight.keywordsPattern": "TODO(@\\w+?)?:", 24 | "todohighlight.defaultStyle": { 25 | "color": "black", 26 | "backgroundColor": "rgba(255, 221, 87, .8)", 27 | "overviewRulerColor": "rgba(255, 221, 87, .8)", 28 | "fontWeight": "bold", 29 | "borderRadius": "2px", 30 | "isWholeLine": true, 31 | } 32 | } -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@kibibit/kibibit.github.io", 3 | "version": "1.0.0", 4 | "description": "kibibit is an open source team of software developers, trying to make the world easier piece by piece. you're more than welcome to contribute!", 5 | "main": "index.js", 6 | "scripts": { 7 | "build": "webpack", 8 | "build:compile-styles": "node-sass --output-style expanded --source-map true --source-map-contents true --precision 6 src/style.scss lib/style.css", 9 | "start": "webpack serve", 10 | "start:dev": "concurrently --names \"CSS,WEBPACK\" -c \"bgMagenta.bold,bgYellow.black.bold\" \"npm run build:compile-styles -- --watch\" \"npm run start\"", 11 | "lint": "eslint -c ./.eslintrc.js \"src/**/*.js\"", 12 | "lint:fix": "eslint -c ./.eslintrc.js \"src/**/*.js\" --fix", 13 | "test": "echo \"Error: no test specified\" && exit 1" 14 | }, 15 | "repository": { 16 | "type": "git", 17 | "url": "git+https://github.com/Kibibit/Kibibit.github.io.git" 18 | }, 19 | "author": "thatkookooguy ", 20 | "license": "MIT", 21 | "bugs": { 22 | "url": "https://github.com/Kibibit/Kibibit.github.io/issues" 23 | }, 24 | "homepage": "https://github.com/Kibibit/Kibibit.github.io#readme", 25 | "devDependencies": { 26 | "concurrently": "^6.3.0", 27 | "eslint": "^8.2.0", 28 | "http-server": "^14.0.0", 29 | "node-sass": "^6.0.1", 30 | "webpack": "^5.62.1", 31 | "webpack-cli": "^4.9.1", 32 | "webpack-dev-server": "^4.4.0" 33 | }, 34 | "dependencies": { 35 | "@kibibit/consologo": "^1.2.0" 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /lib/style.css: -------------------------------------------------------------------------------- 1 | body { 2 | overflow: hidden; 3 | background: #212121; 4 | height: 100vh; 5 | width: 100vw; 6 | font-family: 'Comfortaa', cursive; 7 | } 8 | 9 | p[align="center"]:nth-of-type(3) a img { 10 | height: 1.7em; 11 | } 12 | 13 | p[align="center"]:nth-of-type(4) a img { 14 | height: 1.7em; 15 | } 16 | 17 | .kb-close { 18 | position: absolute; 19 | top: 0; 20 | right: 20px; 21 | padding: 10px; 22 | cursor: pointer; 23 | } 24 | 25 | .kb-close:active, .kb-close:focus, .kb-close:hover { 26 | background-color: #14fdce; 27 | color: #031e11; 28 | } 29 | 30 | .kb-crt { 31 | font-size: 1em; 32 | background: #212121; 33 | font-family: "Hack"; 34 | } 35 | 36 | .kb-crt .frame { 37 | display: none; 38 | } 39 | 40 | .kb-crt.active .frame { 41 | display: block; 42 | } 43 | 44 | ion-icon { 45 | --ion-color-base: currentColor; 46 | } 47 | 48 | nav { 49 | position: fixed; 50 | top: 0; 51 | right: 0; 52 | left: 0; 53 | color: white; 54 | height: 60px; 55 | background: #1a1a1a; 56 | display: flex; 57 | align-items: center; 58 | padding: 0 1em; 59 | box-shadow: 0px 7px 16px 2px rgba(0, 0, 0, 0.75); 60 | } 61 | 62 | nav img { 63 | height: 70%; 64 | margin-right: 1em; 65 | } 66 | 67 | nav > a { 68 | height: 100%; 69 | display: flex; 70 | justify-content: center; 71 | align-items: center; 72 | color: #ffdd57; 73 | padding: 0 0.5em; 74 | text-decoration: none; 75 | transition: all 250ms; 76 | font-weight: 500; 77 | border-radius: 4px; 78 | } 79 | 80 | nav > a:hover { 81 | color: black; 82 | background: #ffdd57; 83 | } 84 | 85 | .svg-container { 86 | display: flex; 87 | position: relative; 88 | width: 100vw; 89 | height: 100vh; 90 | align-items: center; 91 | justify-content: center; 92 | overflow: hidden; 93 | } 94 | 95 | .graph-node { 96 | cursor: pointer; 97 | } 98 | 99 | .footer-note { 100 | color: rgba(255, 255, 255, 0.3); 101 | position: fixed; 102 | bottom: 0.5em; 103 | left: 0; 104 | right: 0; 105 | text-align: center; 106 | } 107 | 108 | /*# sourceMappingURL=style.css.map */ -------------------------------------------------------------------------------- /src/style.scss: -------------------------------------------------------------------------------- 1 | $console-color: #14fdce; 2 | $console-bg: #031e11; // global settings 3 | 4 | body { 5 | overflow: hidden; 6 | background: #212121; 7 | height: 100vh; 8 | width: 100vw; 9 | font-family: 'Comfortaa', cursive; 10 | } 11 | p[align="center"] { 12 | &:nth-of-type(3) { 13 | a { 14 | img { 15 | height: 1.7em; 16 | } 17 | } 18 | } 19 | &:nth-of-type(4) { 20 | a { 21 | img { 22 | height: 1.7em; 23 | } 24 | } 25 | } 26 | } 27 | .kb-close { 28 | position: absolute; 29 | top: 0; 30 | right: 20px; 31 | padding: 10px; 32 | cursor: pointer; 33 | &:active, 34 | &:focus, 35 | &:hover { 36 | background-color: $console-color; 37 | color: $console-bg; 38 | } 39 | } 40 | .kb-crt { 41 | font-size: 1em; 42 | background: #212121; 43 | font-family: "Hack"; 44 | .frame { 45 | display: none; 46 | } 47 | } 48 | .kb-crt.active { 49 | .frame { 50 | display: block; 51 | } 52 | } 53 | ion-icon { 54 | --ion-color-base: currentColor; 55 | } 56 | nav { 57 | position: fixed; 58 | top: 0; 59 | right: 0; 60 | left: 0; 61 | color: white; 62 | height: 60px; 63 | background: hsl(0, 0%, 10%); 64 | display: flex; 65 | align-items: center; 66 | padding: 0 1em; 67 | box-shadow: 0px 7px 16px 2px rgba(0, 0, 0, 0.75); 68 | img { 69 | height: 70%; 70 | margin-right: 1em; 71 | } 72 | >a { 73 | height: 100%; 74 | display: flex; 75 | justify-content: center; 76 | align-items: center; 77 | color: hsl(48, 100%, 67%); 78 | padding: 0 0.5em; 79 | text-decoration: none; 80 | transition: all 250ms; 81 | font-weight: 500; 82 | border-radius: 4px; 83 | &:hover { 84 | color: black; 85 | background: hsl(48, 100%, 67%); 86 | } 87 | } 88 | } 89 | 90 | .svg-container { 91 | display: flex; 92 | position: relative; 93 | width: 100vw; 94 | height: 100vh; 95 | align-items: center; 96 | justify-content: center; 97 | overflow: hidden; 98 | } 99 | 100 | .graph-node { 101 | cursor: pointer; 102 | } 103 | 104 | .footer-note { 105 | color: rgba(white, 0.3); 106 | position: fixed; 107 | bottom: 0.5em; 108 | left: 0; 109 | right: 0; 110 | text-align: center; 111 | } -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Logs 2 | logs 3 | *.log 4 | npm-debug.log* 5 | yarn-debug.log* 6 | yarn-error.log* 7 | lerna-debug.log* 8 | .pnpm-debug.log* 9 | 10 | # Diagnostic reports (https://nodejs.org/api/report.html) 11 | report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json 12 | 13 | # Runtime data 14 | pids 15 | *.pid 16 | *.seed 17 | *.pid.lock 18 | 19 | # Directory for instrumented libs generated by jscoverage/JSCover 20 | lib-cov 21 | 22 | # Coverage directory used by tools like istanbul 23 | coverage 24 | *.lcov 25 | 26 | # nyc test coverage 27 | .nyc_output 28 | 29 | # Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files) 30 | .grunt 31 | 32 | # Bower dependency directory (https://bower.io/) 33 | bower_components 34 | 35 | # node-waf configuration 36 | .lock-wscript 37 | 38 | # Compiled binary addons (https://nodejs.org/api/addons.html) 39 | build/Release 40 | 41 | # Dependency directories 42 | node_modules/ 43 | jspm_packages/ 44 | 45 | # Snowpack dependency directory (https://snowpack.dev/) 46 | web_modules/ 47 | 48 | # TypeScript cache 49 | *.tsbuildinfo 50 | 51 | # Optional npm cache directory 52 | .npm 53 | 54 | # Optional eslint cache 55 | .eslintcache 56 | 57 | # Microbundle cache 58 | .rpt2_cache/ 59 | .rts2_cache_cjs/ 60 | .rts2_cache_es/ 61 | .rts2_cache_umd/ 62 | 63 | # Optional REPL history 64 | .node_repl_history 65 | 66 | # Output of 'npm pack' 67 | *.tgz 68 | 69 | # Yarn Integrity file 70 | .yarn-integrity 71 | 72 | # dotenv environment variables file 73 | .env 74 | .env.test 75 | .env.production 76 | 77 | # parcel-bundler cache (https://parceljs.org/) 78 | .cache 79 | .parcel-cache 80 | 81 | # Next.js build output 82 | .next 83 | out 84 | 85 | # Nuxt.js build / generate output 86 | .nuxt 87 | dist 88 | 89 | # Gatsby files 90 | .cache/ 91 | # Comment in the public line in if your project uses Gatsby and not Next.js 92 | # https://nextjs.org/blog/next-9-1#public-directory-support 93 | # public 94 | 95 | # vuepress build output 96 | .vuepress/dist 97 | 98 | # Serverless directories 99 | .serverless/ 100 | 101 | # FuseBox cache 102 | .fusebox/ 103 | 104 | # DynamoDB Local files 105 | .dynamodb/ 106 | 107 | # TernJS port file 108 | .tern-port 109 | 110 | # Stores VSCode versions used for testing VSCode extensions 111 | .vscode-test 112 | 113 | # yarn v2 114 | .yarn/cache 115 | .yarn/unplugged 116 | .yarn/build-state.yml 117 | .yarn/install-state.gz 118 | .pnp.* 119 | -------------------------------------------------------------------------------- /lib/style.css.map: -------------------------------------------------------------------------------- 1 | { 2 | "version": 3, 3 | "file": "style.css", 4 | "sources": [ 5 | "../src/style.scss" 6 | ], 7 | "sourcesContent": [ 8 | "$console-color: #14fdce;\n$console-bg: #031e11; // global settings\n\nbody {\n\toverflow: hidden;\n\tbackground: #212121;\n\theight: 100vh;\n\twidth: 100vw;\n\tfont-family: 'Comfortaa', cursive;\n}\np[align=\"center\"] {\n\t&:nth-of-type(3) {\n\t\ta {\n\t\t\timg {\n\t\t\t\theight: 1.7em;\n\t\t\t}\n\t\t}\n\t}\n\t&:nth-of-type(4) {\n\t\ta {\n\t\t\timg {\n\t\t\t\theight: 1.7em;\n\t\t\t}\n\t\t}\n\t}\n}\n.kb-close {\n\tposition: absolute;\n\ttop: 0;\n\tright: 20px;\n\tpadding: 10px;\n\tcursor: pointer;\n\t&:active,\n &:focus,\n &:hover {\n background-color: $console-color;\n color: $console-bg;\n }\n}\n.kb-crt {\n\tfont-size: 1em;\n\tbackground: #212121;\n\tfont-family: \"Hack\";\n\t.frame {\n\t\tdisplay: none;\n\t}\n}\n.kb-crt.active {\n\t.frame {\n\t\tdisplay: block;\n\t}\n}\nion-icon {\n\t--ion-color-base: currentColor;\n}\nnav {\n\tposition: fixed;\n\ttop: 0;\n\tright: 0;\n\tleft: 0;\n\tcolor: white;\n\theight: 60px;\n\tbackground: hsl(0, 0%, 10%);\n\tdisplay: flex;\n\talign-items: center;\n\tpadding: 0 1em;\n\tbox-shadow: 0px 7px 16px 2px rgba(0, 0, 0, 0.75);\n\timg {\n\t\theight: 70%;\n\t\tmargin-right: 1em;\n\t}\n\t>a {\n\t\theight: 100%;\n\t\tdisplay: flex;\n\t\tjustify-content: center;\n\t\talign-items: center;\n\t\tcolor: hsl(48, 100%, 67%);\n\t\tpadding: 0 0.5em;\n\t\ttext-decoration: none;\n\t\ttransition: all 250ms;\n\t\tfont-weight: 500;\n\t\tborder-radius: 4px;\n\t\t&:hover {\n\t\t\tcolor: black;\n\t\t\tbackground: hsl(48, 100%, 67%);\n\t\t}\n\t}\n}\n\n.svg-container {\n display: flex;\n position: relative;\n width: 100vw;\n\theight: 100vh;\n\talign-items: center;\n\tjustify-content: center;\n overflow: hidden;\n}\n\n.graph-node {\n cursor: pointer;\n}\n\n.footer-note {\n color: rgba(white, 0.3);\n position: fixed;\n bottom: 0.5em;\n left: 0;\n right: 0;\n text-align: center;\n}" 9 | ], 10 | "names": [], 11 | "mappings": "AAGA,AAAA,IAAI,CAAC;EACJ,QAAQ,EAAE,MAAM;EAChB,UAAU,EAAE,OAAO;EACnB,MAAM,EAAE,KAAK;EACb,KAAK,EAAE,KAAK;EACZ,WAAW,EAAE,oBAAoB;CACjC;;AACD,AAGG,CAHF,CAAA,AAAA,KAAC,CAAM,QAAQ,AAAd,CACA,YAAa,CAAA,CAAC,EACd,CAAC,CACA,GAAG,CAAC;EACH,MAAM,EAAE,KAAK;CACb;;AALJ,AAUG,CAVF,CAAA,AAAA,KAAC,CAAM,QAAQ,AAAd,CAQA,YAAa,CAAA,CAAC,EACd,CAAC,CACA,GAAG,CAAC;EACH,MAAM,EAAE,KAAK;CACb;;AAIJ,AAAA,SAAS,CAAC;EACT,QAAQ,EAAE,QAAQ;EAClB,GAAG,EAAE,CAAC;EACN,KAAK,EAAE,IAAI;EACX,OAAO,EAAE,IAAI;EACb,MAAM,EAAE,OAAO;CAOf;;AAZD,AAMC,SANQ,AAMP,OAAO,EANT,SAAS,AAON,MAAM,EAPT,SAAS,AAQN,MAAM,CAAC;EACN,gBAAgB,EAnCJ,OAAO;EAoCnB,KAAK,EAnCI,OAAO;CAoCjB;;AAEH,AAAA,OAAO,CAAC;EACP,SAAS,EAAE,GAAG;EACd,UAAU,EAAE,OAAO;EACnB,WAAW,EAAE,MAAM;CAInB;;AAPD,AAIC,OAJM,CAIN,MAAM,CAAC;EACN,OAAO,EAAE,IAAI;CACb;;AAEF,AACC,OADM,AAAA,OAAO,CACb,MAAM,CAAC;EACN,OAAO,EAAE,KAAK;CACd;;AAEF,AAAA,QAAQ,CAAC;EACR,gBAAgB,CAAA,aAAC;CACjB;;AACD,AAAA,GAAG,CAAC;EACH,QAAQ,EAAE,KAAK;EACf,GAAG,EAAE,CAAC;EACN,KAAK,EAAE,CAAC;EACR,IAAI,EAAE,CAAC;EACP,KAAK,EAAE,KAAK;EACZ,MAAM,EAAE,IAAI;EACZ,UAAU,EAAE,OAAe;EAC3B,OAAO,EAAE,IAAI;EACb,WAAW,EAAE,MAAM;EACnB,OAAO,EAAE,KAAK;EACd,UAAU,EAAE,GAAG,CAAC,GAAG,CAAC,IAAI,CAAC,GAAG,CAAC,mBAAmB;CAqBhD;;AAhCD,AAYC,GAZE,CAYF,GAAG,CAAC;EACH,MAAM,EAAE,GAAG;EACX,YAAY,EAAE,GAAG;CACjB;;AAfF,AAgBC,GAhBE,GAgBD,CAAC,CAAC;EACF,MAAM,EAAE,IAAI;EACZ,OAAO,EAAE,IAAI;EACb,eAAe,EAAE,MAAM;EACvB,WAAW,EAAE,MAAM;EACnB,KAAK,EAAE,OAAkB;EACzB,OAAO,EAAE,OAAO;EAChB,eAAe,EAAE,IAAI;EACrB,UAAU,EAAE,SAAS;EACrB,WAAW,EAAE,GAAG;EAChB,aAAa,EAAE,GAAG;CAKlB;;AA/BF,AA2BE,GA3BC,GAgBD,CAAC,AAWA,MAAM,CAAC;EACP,KAAK,EAAE,KAAK;EACZ,UAAU,EAAE,OAAkB;CAC9B;;AAIH,AAAA,cAAc,CAAC;EACb,OAAO,EAAE,IAAI;EACb,QAAQ,EAAE,QAAQ;EAClB,KAAK,EAAE,KAAK;EACb,MAAM,EAAE,KAAK;EACb,WAAW,EAAE,MAAM;EACnB,eAAe,EAAE,MAAM;EACtB,QAAQ,EAAE,MAAM;CACjB;;AAED,AAAA,WAAW,CAAC;EACV,MAAM,EAAE,OAAO;CAChB;;AAED,AAAA,YAAY,CAAC;EACX,KAAK,EAAO,wBAAK;EACjB,QAAQ,EAAE,KAAK;EACf,MAAM,EAAE,KAAK;EACb,IAAI,EAAE,CAAC;EACP,KAAK,EAAE,CAAC;EACR,UAAU,EAAE,MAAM;CACnB" 12 | } -------------------------------------------------------------------------------- /src/tree.data.js: -------------------------------------------------------------------------------- 1 | const nodes = [ { 2 | id: 'kibibit', 3 | image: 'https://kibibit.io/logo-demo/logo.png', 4 | modalSelector: '#about-kibibit' 5 | }, 6 | { 7 | id: 'achievibit', 8 | image: 'https://github.com/Kibibit/kibibit-assets/raw/master/logo-achi.png', 9 | modalSelector: '#about-readme', 10 | parentId: 'kibibit' 11 | }, 12 | // { 13 | // "id": "achievibit-chrome-extension", 14 | // "image": "https://www.pivotaltracker.com/marketing_assets/integrations/2015/google-chrome-extension-6a26cdad27e6f383174791f8648fbe4cc7627acc06e3870c588217c98d1bde91.png", 15 | // "modalSelector": "#about-readme", 16 | // parentId: 'kibibit' 17 | // }, 18 | { 19 | id: 'kibibit-code-editor', 20 | image: 'https://kibibit.io/logo-demo/code-editor.png', 21 | modalSelector: '#about-readme', 22 | parentId: 'kibibit' 23 | }, 24 | { 25 | id: 'cli-lit', 26 | image: 'https://kibibit.io/kibibit-assets/cli-lit-logo-transparent.png', 27 | modalSelector: '#about-readme', 28 | parentId: 'kibibit' 29 | }, 30 | { 31 | id: 'kb-components', 32 | image: 'https://kibibit.io/kibibit-assets/kb-components-logo-transparent.png', 33 | modalSelector: '#about-readme', 34 | parentId: 'kibibit' 35 | }, 36 | { 37 | id: 'tdd1t', 38 | image: 'https://kibibit.io/kibibit-assets/4x/tdd1t-avatar-transparent%404x.png', 39 | modalSelector: '#about-readme', 40 | parentId: 'kibibit' 41 | }, 42 | { 43 | id: 'kb-hologram', 44 | image: 'https://kibibit.io/kibibit-assets/kb-hologram/logo.svg', 45 | modalSelector: '#about-readme', 46 | parentId: 'kibibit' 47 | }, 48 | { 49 | id: 'announce-it', 50 | image: 'https://camo.githubusercontent.com/b80d088e5a18d62cee79035f457e157792b4d99f/687474703a2f2f6b6962696269742e696f2f6b6962696269742d6173736574732f616e6e6f756e63652d69742e737667', 51 | modalSelector: '#about-readme', 52 | parentId: 'kibibit' 53 | }, 54 | { 55 | id: 'cold-deck', 56 | image: 'https://kibibit.io/kibibit-assets/cold-deck/logo.svg', 57 | modalSelector: '#about-readme', 58 | parentId: 'kibibit' 59 | }, 60 | { 61 | id: 'stacker', 62 | image: 'https://kibibit.io/kibibit-assets/stacker.png', 63 | modalSelector: '#about-readme', 64 | parentId: 'kibibit' 65 | }, 66 | { 67 | id: 'hass-kibibit-theme', 68 | image: 'https://kibibit.io/kibibit-assets/hassio-theme/hassio-theme-logo-trans.png', 69 | modalSelector: '#about-readme', 70 | parentId: 'kibibit' 71 | }, 72 | { 73 | id: 'command-lime', 74 | image: 'https://kibibit.io/command-lime/logo-clear.png', 75 | modalSelector: '#about-readme', 76 | parentId: 'kibibit' 77 | }, 78 | { 79 | id: 'dev-tools', 80 | image: 'https://kibibit.io/dev-tools/logo.png', 81 | modalSelector: '#about-readme', 82 | parentId: 'kibibit' 83 | }, 84 | { 85 | id: 'configit', 86 | image: 'https://kibibit.io/configit/logo.png', 87 | modalSelector: '#about-readme', 88 | parentId: 'kibibit' 89 | } 90 | // { 91 | // "id": "kb-login-page", 92 | // "image": "https://camo.githubusercontent.com/01a1947671f7f77ecdd0096aa8d8f51b6aadaa4a/687474703a2f2f6b6962696269742e696f2f6b6962696269742d6173736574732f6c6f67696e2e737667", 93 | // "modalSelector": "#about-readme", 94 | // parentId: 'kibibit' 95 | // }, 96 | // { 97 | // "id": "kb-profile-page", 98 | // "image": "https://camo.githubusercontent.com/7620455813fc7ce4ed7f9017f188f301e371d2fb/687474703a2f2f6b6962696269742e696f2f6b6962696269742d6173736574732f70726f66696c652e737667", 99 | // "modalSelector": "#about-readme", 100 | // parentId: 'kibibit' 101 | // } 102 | ]; 103 | 104 | module.exports = { 105 | nodes, 106 | edges: getEdgesFromNotes() 107 | }; 108 | 109 | function getEdgesFromNotes() { 110 | return nodes 111 | .map((node, index) => { 112 | return { 113 | source: nodes.indexOf(nodes.find((parentNode) => parentNode.id === node.parentId)), 114 | target: index 115 | }; 116 | }) 117 | .filter((item) => item.source >= 0); 118 | } 119 | -------------------------------------------------------------------------------- /index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | kibibit homepage 8 | 10 | 11 | 12 | 14 | 16 | 18 | 19 | 20 | 22 | 24 | 26 | 28 | 30 | 31 | 32 | 34 | 36 | 38 | 40 | 41 | 42 | 44 | 45 | 46 | 48 | 50 | 52 | 53 | 55 | 56 | 57 | 58 |
60 |
61 |
62 |
63 |

kibibit

64 |
66 | 67 |
68 |

kibibit is an open source team of software developers, trying to make the world easier piece by piece. you’re 69 | more than welcome to contribute!

70 |

Site is under construction. come back soon :-)

71 |

watch on GitHub

73 |
74 |
75 |
76 |
77 |
78 | 79 |
81 |
82 |
83 |
84 |
86 | 87 |
88 |
89 |

watch on GitHub

92 |

watch Homepage

95 |
96 |
97 |
98 |
99 |
100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | -------------------------------------------------------------------------------- /.eslintrc.js: -------------------------------------------------------------------------------- 1 | // @ts-check 2 | /** 3 | * @type {import("eslint").Linter.Config} 4 | */ 5 | const config = { 6 | parserOptions: { 7 | ecmaVersion: 2018, 8 | sourceType: 'module' 9 | }, 10 | env: { 11 | es6: true, 12 | node: true 13 | }, 14 | globals: { 15 | MyGlobal: true 16 | }, 17 | ignorePatterns: [ 18 | '**/db/models/*.js' 19 | ], 20 | rules: { 21 | 'space-infix-ops': 'error', 22 | 'array-bracket-newline': 'off', 23 | 'array-bracket-spacing': [ 'error', 'always' ], 24 | 'array-element-newline': 'off', 25 | 'block-spacing': [ 'error', 'always' ], 26 | 'brace-style': [ 'error', '1tbs', { 27 | 'allowSingleLine': true 28 | } ], 29 | 'camelcase': [ 'error', { 30 | 'properties': 'never' 31 | } ], 32 | 'comma-dangle': [ 'error', 'never' ], 33 | 'comma-spacing': [ 'error', { 34 | 'after': true, 35 | 'before': false 36 | } ], 37 | 'comma-style': 'error', 38 | 'computed-property-spacing': 'error', 39 | 'curly': [ 'error', 'multi-line' ], 40 | 'eol-last': 'error', 41 | 'func-call-spacing': 'error', 42 | 'indent': [ 'error', 2, { 43 | 'CallExpression': { 44 | 'arguments': 1 45 | }, 46 | 'FunctionDeclaration': { 47 | 'body': 1, 48 | 'parameters': 1 49 | }, 50 | 'FunctionExpression': { 51 | 'body': 1, 52 | 'parameters': 1 53 | }, 54 | 'ignoredNodes': [ 'ConditionalExpression' ], 55 | 'MemberExpression': 1, 56 | 'ObjectExpression': 1, 57 | 'SwitchCase': 1 58 | } ], 59 | 'key-spacing': 'error', 60 | 'keyword-spacing': 'error', 61 | 'linebreak-style': 'error', 62 | 'max-len': [ 'error', { 63 | // starting small (forcing 120), but later we should force 80 64 | code: 120, 65 | ignoreComments: true, 66 | ignoreUrls: true, 67 | ignoreStrings: true, 68 | tabWidth: 2 69 | } ], 70 | 'new-cap': 'error', 71 | 'no-array-constructor': 'error', 72 | 'no-caller': 'error', 73 | 'no-extend-native': 'error', 74 | 'no-extra-bind': 'error', 75 | // 'no-invalid-this': 'error', 76 | 'no-irregular-whitespace': 'error', 77 | 'no-mixed-spaces-and-tabs': 'error', 78 | 'no-multi-spaces': 'error', 79 | 'no-multi-str': 'error', 80 | 81 | 'no-multiple-empty-lines': [ 'error', { 82 | max: 2 83 | } ], 84 | 'no-new-object': 'error', 85 | 'no-new-wrappers': 'error', 86 | 'no-tabs': 'error', 87 | 'no-throw-literal': 'error', 88 | 'no-trailing-spaces': 'error', 89 | 'no-unused-vars': [ 'error', { 90 | args: 'none' 91 | } ], 92 | 93 | 'no-with': 'error', 94 | 'object-curly-spacing': [ 'error', 'always' ], 95 | 'one-var': [ 'error', { 96 | const: 'never', 97 | let: 'never', 98 | var: 'never' 99 | } ], 100 | 'operator-linebreak': [ 'error', 'after' ], 101 | 'padded-blocks': [ 'error', 'never' ], 102 | 'prefer-promise-reject-errors': 'error', 103 | 'quotes': [ 'error', 'single', { 104 | allowTemplateLiterals: true 105 | } ], 106 | 'semi': [ 'error' ], 107 | 'semi-spacing': 'error', 108 | 'valid-jsdoc': [ 'error', { 109 | prefer: { 110 | returns: 'return' 111 | }, 112 | requireParamDescription: false, 113 | requireReturn: false, 114 | requireReturnDescription: false 115 | } ], 116 | 'space-before-blocks': 'error', 117 | 'space-before-function-paren': [ 'error', { 118 | asyncArrow: 'always', 119 | anonymous: 'never', 120 | named: 'never' 121 | } ], 122 | 'spaced-comment': [ 'error', 'always' ], 123 | 'switch-colon-spacing': 'error', 124 | 'arrow-parens': [ 'error', 'always' ], 125 | 'constructor-super': 'error', // eslint:recommended 126 | 'generator-star-spacing': [ 'error', 'after' ], 127 | 'no-new-symbol': 'error', // eslint:recommended 128 | 'no-this-before-super': 'error', // eslint:recommended 129 | 'no-var': 'error', 130 | 'prefer-const': [ 'error', { destructuring: 'all' } ], 131 | 'prefer-rest-params': 'error', 132 | 'prefer-spread': 'error', 133 | 'rest-spread-spacing': 'error', 134 | 'yield-star-spacing': [ 'error', 'after' ], 135 | 'no-await-in-loop': 'warn', 136 | 'no-unreachable-loop': 'error', 137 | // 'require-atomic-updates': 'error', 138 | 'dot-notation': 'error', 139 | 'require-await': 'warn', 140 | 'no-shadow': 'warn', 141 | 'no-undefined': 'error', 142 | 'line-comment-position': [ 'error', { position: 'above' } ], 143 | 'quote-props': [ 'error', 'as-needed' ] 144 | } 145 | }; 146 | 147 | module.exports = config; 148 | -------------------------------------------------------------------------------- /src/index.js: -------------------------------------------------------------------------------- 1 | /* eslint-disable no-unused-vars */ 2 | import { webConsolelogo } from '@kibibit/consologo'; 3 | import treeData from './tree.data'; 4 | 5 | console.log(treeData); 6 | 7 | webConsolelogo('kibibit.io Homepage'); 8 | 9 | const body = document.body; 10 | const html = document.documentElement; 11 | 12 | // nice 13 | 14 | const svg = d3.select('body') 15 | .append('div') 16 | // Container class to make it responsive. 17 | .classed('svg-container', true) 18 | .append('svg'); 19 | 20 | redraw(); 21 | 22 | $('.kb-close').click(function() { 23 | $(this).closest('.kb-crt').removeClass('active'); 24 | }); 25 | 26 | window.addEventListener('resize', debounce(onResize, 800)); 27 | 28 | function onResize() { 29 | svg.selectAll('*').remove(); 30 | redraw(); 31 | } 32 | 33 | function debounce(func, wait, immediate) { 34 | let timeout; 35 | 36 | return function executedFunction(...args) { 37 | const context = this; 38 | 39 | const later = function() { 40 | timeout = null; 41 | if (!immediate) func.apply(context, args); 42 | }; 43 | 44 | const callNow = immediate && !timeout; 45 | 46 | clearTimeout(timeout); 47 | 48 | timeout = setTimeout(later, wait); 49 | 50 | if (callNow) func.apply(context, args); 51 | }; 52 | }; 53 | 54 | function redraw() { 55 | const height = Math.max(body.scrollHeight, body.offsetHeight, 56 | html.clientHeight, html.scrollHeight, html.offsetHeight); 57 | 58 | const width = Math.max(body.scrollWidth, body.offsetWidth, 59 | html.clientWidth, html.scrollWidth, html.offsetWidth); 60 | 61 | svg 62 | .attr('width', width) 63 | .attr('height', height); 64 | 65 | const simulation = d3.forceSimulation() 66 | .force('link', d3.forceLink()) 67 | .force('charge', d3.forceManyBody().strength(-5000)) 68 | .force('center', d3.forceCenter(width / 2, height / 2)); 69 | 70 | const links = svg.selectAll('foo') 71 | .data(treeData.edges) 72 | .enter() 73 | .append('line') 74 | .style('stroke', '#ccc') 75 | .style('stroke-width', 2); 76 | 77 | const color = d3.scaleOrdinal(d3.schemeCategory20); 78 | 79 | const node = svg.selectAll('foo') 80 | .data(treeData.nodes) 81 | .enter() 82 | .append('g') 83 | .classed('graph-node', true) 84 | .call(d3.drag() 85 | .on('start', dragstarted) 86 | .on('drag', dragged) 87 | .on('end', dragended)); 88 | 89 | const nodeCircle = node.append('circle') 90 | .attr('r', 50) 91 | .attr('stroke', 'gray') 92 | .attr('stroke-width', '3px') 93 | .attr('fill', '#212121'); 94 | 95 | const nodeImage = node.append('image') 96 | .attr('xlink:href', (d) => d.image) 97 | .attr('height', '80') 98 | .attr('width', '80') 99 | .attr('x', -40) 100 | .attr('y', -40) 101 | .on('click', function(datum) { 102 | // Determine if current line is visible 103 | if (datum.modalSelector === '#about-readme') { 104 | const octokit = new Octokit(); 105 | 106 | Promise.all([ 107 | octokit.repos.getContents({ 108 | owner: 'kibibit', 109 | repo: datum.id, 110 | path: 'README.md' 111 | }), 112 | octokit.repos.getContents({ 113 | owner: 'kibibit', 114 | repo: datum.id, 115 | path: 'package.json' 116 | }) 117 | ]) 118 | .then((result) => { 119 | let [ readme, info ] = result; 120 | 121 | try { 122 | info = JSON.parse(atob(info.data.content)); 123 | } catch (err) {} 124 | 125 | let content = ''; 126 | atob(readme.data.content) 127 | .replace(/^([\s\S]*\)([\s\S]*?)(#+\s?Contributing[\s\S]*)?$/m, (full, first, second, third) => { 128 | content = `${ first }\n${ third || '' }`; 129 | return `${ first }\n${ third || '' }`; 130 | }); 131 | 132 | content = content 133 | .replace('"logo.png"', `"//kibibit.io/${datum.id}/logo.png"`) 134 | .replace('"logo-clear.png"', `"//kibibit.io/${datum.id}/logo-clear.png"`); 135 | 136 | showdown.setFlavor('github'); 137 | 138 | const converter = new showdown.Converter({ 139 | emoji: true, 140 | tables: true 141 | }); 142 | converter.setOption('emoji', true); 143 | const newHtml = converter.makeHtml(content); 144 | 145 | const modalElement = $(datum.modalSelector); 146 | const modalContentElement = modalElement.find('.content'); 147 | const githubLinkElement = modalElement.find('.watch-on-github'); 148 | const homepageLinkElement = modalElement.find('.watch-homepage'); 149 | 150 | modalContentElement.html(newHtml); 151 | githubLinkElement.attr('href', `https://github.com/kibibit/${ datum.id }`); 152 | homepageLinkElement.attr('href', info.homepage || ''); 153 | if (!info.homepage) { 154 | homepageLinkElement.hide(); 155 | } else { 156 | homepageLinkElement.show(); 157 | } 158 | modalElement.addClass('active'); 159 | }) 160 | .catch((err) => console.error(err)); 161 | } else { 162 | $(datum.modalSelector).addClass('active'); 163 | } 164 | }); 165 | 166 | // var texts = node.append("text") 167 | // .style("fill", "white") 168 | // .attr("dx", 30) 169 | // .attr("dy", 8) 170 | // .text(function(d) { 171 | // return d.id; 172 | // }); 173 | 174 | simulation.nodes(treeData.nodes); 175 | simulation.force('link') 176 | .links(treeData.edges); 177 | 178 | simulation.on('tick', function() { 179 | links.attr('x1', function(d) { 180 | return d.source.x; 181 | }) 182 | .attr('y1', function(d) { 183 | return d.source.y; 184 | }) 185 | .attr('x2', function(d) { 186 | return d.target.x; 187 | }) 188 | .attr('y2', function(d) { 189 | return d.target.y; 190 | }); 191 | 192 | node.attr('transform', (d) => 'translate(' + d.x + ',' + d.y + ')'); 193 | }); 194 | 195 | function dragstarted(d) { 196 | if (!d3.event.active) simulation.alphaTarget(0.3).restart(); 197 | d.fx = d.x; 198 | d.fy = d.y; 199 | } 200 | 201 | function dragged(d) { 202 | d.fx = d3.event.x; 203 | d.fy = d3.event.y; 204 | } 205 | 206 | function dragended(d) { 207 | if (!d3.event.active) simulation.alphaTarget(0); 208 | d.fx = null; 209 | d.fy = null; 210 | } 211 | } 212 | -------------------------------------------------------------------------------- /lib/index.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"index.js","mappings":";;;;;;;;;;AAAa;AACb;AACA;AACA,mCAAmC,oCAAoC,gBAAgB;AACvF,CAAC;AACD;AACA;AACA,CAAC;AACD;AACA;AACA;AACA,8CAA6C,EAAE,aAAa,EAAC;AAC7D,aAAa,mBAAO,CAAC,yFAAsB;AAC3C,aAAa,mBAAO,CAAC,+EAAiB;AACtC;;;;;;;;;;;ACda;AACb;AACA,6CAA6C;AAC7C;AACA,8CAA6C,EAAE,aAAa,EAAC;AAC7D,2BAA2B;AAC3B,iCAAiC,mBAAO,CAAC,uEAAmB;AAC5D,8BAA8B,mBAAO,CAAC,mDAAO;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B;AAC3B;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AChDa;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,sBAAsB;AACtB;AACA,sCAAsC,0BAA0B,iBAAiB,oBAAoB;AACrG,4CAA4C,wBAAwB,gCAAgC,8EAA8E,yBAAyB,uCAAuC,eAAe,kBAAkB,oBAAoB,yBAAyB;AAChU;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB;AACtB;;;;;;;;;;ACjBA;AACA;AACA;AACA;AACA;AACA,cAAc,SAAS;AACvB;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;ACXa;;AAEb;AACA;AACA,kBAAkB,cAAc;AAChC;;AAEA;AACA;AACA,kBAAkB,aAAa,EAAE,EAAE,KAAK;AACxC;;AAEA;AACA;AACA,kBAAkB,aAAa,EAAE,EAAE,QAAQ,EAAE,QAAQ,EAAE,OAAO;AAC9D;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,IAAI;;AAEJ;AACA,GAAG;AACH;AACA;AACA,EAAE;AACF;;AAEA,WAAW,gCAAgC;AAC3C;AACA;AACA;AACA,iBAAiB,mBAAO,CAAC,4DAAe;AACxC;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,oBAAoB,SAAS;AAC7B,qBAAqB,SAAS;AAC9B;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA,EAAE;;AAEF;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,CAAC;;;;;;;;;;;;AClKY;AACb,mBAAmB,mBAAO,CAAC,wDAAa;AACxC,OAAO,0CAA0C,EAAE,mBAAO,CAAC,gEAAgB;AAC3E;AACA;AACA;AACA,EAAE,EAAE,mBAAO,CAAC,mDAAQ;;AAEpB,OAAO,SAAS;;AAEhB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA,0CAA0C;AAC1C;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,2CAA2C,eAAe;AAC1D;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,0CAA0C,eAAe;AACzD;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,UAAU,OAAO;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,UAAU,OAAO;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,8CAA8C;AAC9C;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,oEAAoE,OAAO,KAAK;AAChF;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA,QAAQ,mBAAmB;AAC3B;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,iBAAiB,wBAAwB;AACzC;AACA,yCAAyC;AACzC;AACA;AACA;;AAEA;AACA,aAAa,mBAAO,CAAC,6DAAa;AAClC;;AAEA;AACA;;AAEA;;AAEA,uBAAuB;AACvB;AACA,sBAAsB,2CAA2C,GAAG;AACpE;;AAEA;;;;;;;;;;;;ACpOa;AACb,0CAA0C,EAAE,GAAG,QAAQ,IAAI,EAAE,WAAW,EAAE,UAAU,uEAAuE;AAC3J;AACA;AACA,qCAAqC,EAAE,EAAE,QAAQ,KAAK,WAAW,EAAE;;AAEnE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,4BAA4B;;AAE5B;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA,IAAI;AACJ,6DAA6D,OAAO,aAAa,KAAK;AACtF;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA,2CAA2C,UAAU;AACrD;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA,gBAAgB,mCAAmC;AACnD,IAAI;AACJ;AACA,wCAAwC;AACxC;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA,EAAE;;AAEF;;AAEA;AACA,0DAA0D,eAAe,iBAAiB,gCAAgC,IAAI;AAC9H;AACA;;AAEA;AACA;;;;;;;;;;;;ACrIa;;AAEb;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;;AAEA;AACA;AACA;AACA;;;;;;;;;;;ACtCA;AACA;AACA,oBAAoB,mBAAO,CAAC,sDAAY;;AAExC;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,OAAO,2BAA2B;AAClC,OAAO,2BAA2B;AAClC,OAAO,2BAA2B;AAClC,OAAO,2BAA2B;AAClC,QAAQ,4BAA4B;AACpC,OAAO,2BAA2B;AAClC,OAAO,2BAA2B;AAClC,OAAO,2BAA2B;AAClC,OAAO,6BAA6B;AACpC,WAAW,iCAAiC;AAC5C,UAAU,gCAAgC;AAC1C,WAAW,iCAAiC;AAC5C,OAAO,qCAAqC;AAC5C,SAAS,2CAA2C;AACpD,QAAQ;AACR;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,QAAQ,kBAAkB;AAC1B;AACA;AACA,oDAAoD,gBAAgB;AACpE,kDAAkD,cAAc;AAChE;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,GAAG;AACH;AACA,GAAG;AACH;AACA,GAAG;AACH;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,GAAG;AACH;AACA,GAAG;AACH;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA,IAAI;AACJ;AACA,IAAI;AACJ;AACA;;AAEA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,GAAG;AACH;AACA;;AAEA;;AAEA;AACA,iBAAiB,OAAO;AACxB;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,IAAI;AACJ;AACA,IAAI;AACJ;AACA,IAAI;AACJ;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,8BAA8B;;AAE9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,QAAQ,QAAQ;AAClC,kBAAkB,QAAQ,QAAQ;AAClC,kBAAkB,QAAQ,OAAO;AACjC,kBAAkB,QAAQ,OAAO;AACjC,kBAAkB,QAAQ,OAAO;AACjC,kBAAkB,QAAQ,OAAO;AACjC;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,0EAA0E;;AAE1E;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,uBAAuB;AACvB;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,iDAAiD,EAAE,UAAU,EAAE;AAC/D;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,gBAAgB,aAAa,aAAa;AAC1C;AACA,gBAAgB,aAAa,aAAa;AAC1C;AACA,gBAAgB,aAAa,aAAa;AAC1C;AACA,gBAAgB,aAAa,aAAa;AAC1C;AACA,gBAAgB,aAAa,aAAa;AAC1C;AACA,gBAAgB,aAAa;AAC7B;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;;;;;;;;;;ACt0BA,oBAAoB,mBAAO,CAAC,kEAAe;AAC3C,cAAc,mBAAO,CAAC,sDAAS;;AAE/B;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA,mCAAmC;AACnC;AACA;AACA,wCAAwC,SAAS;AACjD;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA,wDAAwD,uCAAuC;AAC/F,sDAAsD,qCAAqC;;AAE3F;AACA;;AAEA;AACA;;AAEA;AACA;AACA,EAAE;AACF,CAAC;;AAED;;;;;;;;;;;AChFA,oBAAoB,mBAAO,CAAC,kEAAe;;AAE3C;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,sCAAsC,SAAS;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,4BAA4B;;AAE5B;;AAEA;AACA;AACA;;AAEA,0CAA0C,SAAS;AACnD;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,sCAAsC,SAAS;AAC/C;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;;;;;;;;;;;;AC/FY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACvJa;AACb;AACA;AACA;AACA;;;;;;;;;;;ACJA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;;;;;;;UCrHA;UACA;;UAEA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;;UAEA;UACA;;UAEA;UACA;;UAEA;UACA;UACA;;;;;WCzBA;WACA;WACA;WACA;WACA;WACA,iCAAiC,WAAW;WAC5C;WACA;;;;;WCPA;WACA;WACA;WACA;WACA,yCAAyC,wCAAwC;WACjF;WACA;WACA;;;;;WCPA;;;;;WCAA;WACA;WACA;WACA,uDAAuD,iBAAiB;WACxE;WACA,gDAAgD,aAAa;WAC7D;;;;;WCNA;WACA;WACA;WACA;WACA;;;;;;;;;;;;;;;;ACJA;AACoD;AACjB;;AAEnC,YAAY,mDAAQ;;AAEpB,kEAAc;;AAEd;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,CAAC;;AAED;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,UAAU,yDAAc;AACxB;AACA;AACA;AACA;;AAEA;;AAEA;AACA,UAAU,yDAAc;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;;AAEA;AACA;AACA,cAAc;;AAEd;AACA;AACA;AACA,8BAA8B,OAAO,KAAK,aAAa;AACvD,2BAA2B,OAAO,KAAK,aAAa;AACpD,eAAe;;AAEf;AACA,sDAAsD,SAAS;AAC/D,4DAA4D,SAAS;;AAErE;;AAEA;AACA;AACA;AACA,aAAa;AACb;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,0EAA0E,UAAU;AACpF;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA,WAAW;AACX;AACA,QAAQ;AACR;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;;AAEV,mBAAmB,yDAAc;AACjC;AACA,WAAW,yDAAc;;AAEzB;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,OAAO;AACP;AACA;AACA,OAAO;AACP;AACA;AACA,OAAO;;AAEP;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA","sources":["webpack://@kibibit/kibibit.github.io/./node_modules/@kibibit/consologo/lib/index.js","webpack://@kibibit/kibibit.github.io/./node_modules/@kibibit/consologo/lib/terminal.consologo.js","webpack://@kibibit/kibibit.github.io/./node_modules/@kibibit/consologo/lib/web.consologo.js","webpack://@kibibit/kibibit.github.io/./node_modules/@kibibit/kb-error/kb-error.js","webpack://@kibibit/kibibit.github.io/./node_modules/ansi-styles/index.js","webpack://@kibibit/kibibit.github.io/./node_modules/chalk/source/index.js","webpack://@kibibit/kibibit.github.io/./node_modules/chalk/source/templates.js","webpack://@kibibit/kibibit.github.io/./node_modules/chalk/source/util.js","webpack://@kibibit/kibibit.github.io/./node_modules/color-convert/conversions.js","webpack://@kibibit/kibibit.github.io/./node_modules/color-convert/index.js","webpack://@kibibit/kibibit.github.io/./node_modules/color-convert/route.js","webpack://@kibibit/kibibit.github.io/./node_modules/color-name/index.js","webpack://@kibibit/kibibit.github.io/./node_modules/supports-color/browser.js","webpack://@kibibit/kibibit.github.io/./src/tree.data.js","webpack://@kibibit/kibibit.github.io/webpack/bootstrap","webpack://@kibibit/kibibit.github.io/webpack/runtime/compat get default export","webpack://@kibibit/kibibit.github.io/webpack/runtime/define property getters","webpack://@kibibit/kibibit.github.io/webpack/runtime/hasOwnProperty shorthand","webpack://@kibibit/kibibit.github.io/webpack/runtime/make namespace object","webpack://@kibibit/kibibit.github.io/webpack/runtime/node module decorator","webpack://@kibibit/kibibit.github.io/./src/index.js"],"sourcesContent":["\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\n__exportStar(require(\"./terminal.consologo\"), exports);\n__exportStar(require(\"./web.consologo\"), exports);\n//# sourceMappingURL=index.js.map","\"use strict\";\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.terminalConsoleLogo = void 0;\nvar kb_error_1 = __importDefault(require(\"@kibibit/kb-error\"));\nvar chalk_1 = __importDefault(require(\"chalk\"));\nvar log = console.log;\nvar r = chalk_1.default.red;\nvar y = chalk_1.default.yellow;\nvar b = chalk_1.default.blue;\nfunction terminalConsoleLogo(productName, applicationInfo) {\n if (!productName) {\n throw new kb_error_1.default('must pass a valid product name');\n }\n log(chalk_1.default.bgBlack.white(['\\n',\n ' ⣶⣶⡆⠀⠀⠀⠀⠀⠀', r('⣴⣿⣶'), '⠀⢰⣶⣶⠀⠀⠀⠀⠀⠀⠀⠀', b('⣴⣿⣶'), '⠀⢰⣶⣶⠀⠀⠀⠀⠀⠀⠀⠀', y('⣴⣿⣶'), '⠀⠀⣶⣶⡄⠀⠀⠀ \\n',\n ' ⣿⣿⡇⠀⠀⠀⠀⠀⠀', r('⠈⠛⠋'), '⠀⢸⣿⣿⠀⠀⠀⠀⠀⠀⠀⠀', b('⠈⠛⠋'), '⠀⢸⣿⣿⠀⠀⠀⠀⠀⠀⠀⠀', y('⠈⠛⠋'), '⠀⠀⣿⣿⡇⠀⠀⠀ \\n',\n ' ⣿⣿⡇⠀⢀⣴⣿⡟⠁', r('⢸⣿⡇'), '⠀⢸⣿⣿⣾⣿⣿⣿⣷⣄⠀⠀', b('⢸⣿⡇'), '⠀⢸⣿⣿⣾⣿⣿⣿⣷⣄⠀⠀', y('⢸⣿⡇'), '⠀⣿⣿⣿⣿⣿⣿⣿ \\n',\n ' ⣿⣿⡇⣠⣿⡿⠋⠀⠀', r('⢸⣿⡇'), '⠀⢸⣿⣿⠟⠁⠀⠉⢿⣿⣧⠀', b('⢸⣿⡇'), '⠀⢸⣿⣿⠟⠁⠀⠉⢿⣿⣧⠀', y('⢸⣿⡇'), '⠀⠉⣿⣿⡏⠉⠉⠉ \\n',\n ' ⣿⣿⣿⣿⣿⣿⡄⠀⠀', r('⢸⣿⡇'), '⠀⢸⣿⣿⠀⠀⠀⠀⢸⣿⣿⠀', b('⢸⣿⡇'), '⠀⢸⣿⣿⠀⠀⠀⠀⢸⣿⣿⠀', y('⢸⣿⡇'), '⠀⠀⣿⣿⡇⠀⠀⠀ \\n',\n ' ⣿⣿⡿⠋⠙⣿⣿⣄⠀', r('⢸⣿⡇'), '⠀⠀⢻⣿⣷⣤⣤⣴⣿⣿⠃⠀', b('⢸⣿⡇'), '⠀⠀⢻⣿⣷⣤⣤⣴⣿⣿⠃⠀', y('⢸⣿⡇'), '⠀⠀⠹⣿⣷⣦⣤⣤ \\n',\n ' ⠛⠛⠃⠀⠀⠘⠛⠛⠂', r('⠘⠛⠃'), '⠀⠀⠀⠉⠛⠿⠿⠟⠋⠁⠀⠀', b('⠘⠛⠃'), '⠀⠀⠀⠉⠛⠿⠿⠟⠋⠁⠀⠀', y('⠘⠛⠃'), '⠀⠀⠀⠈⠛⠛⠛⠛ \\n'\n ].join('')));\n var totalWidth = 50;\n var title = \" \" + productName + \" \";\n var separator = '-----';\n log(getIndentation(totalWidth, title) + chalk_1.default.bgYellow.black(title));\n log(getIndentation(totalWidth, separator) + chalk_1.default.gray(separator));\n if (applicationInfo) {\n if (Array.isArray(applicationInfo)) {\n applicationInfo.forEach(function (line) {\n log(getIndentation(totalWidth, line) + chalk_1.default.gray(line));\n });\n log('\\n');\n }\n else {\n log(getIndentation(totalWidth, applicationInfo) + chalk_1.default.gray(applicationInfo + \"\\n\"));\n }\n }\n}\nexports.terminalConsoleLogo = terminalConsoleLogo;\nfunction getIndentation(totalWidth, str) {\n var halfWidth = Math.floor(totalWidth / 2);\n var halfChars = Math.floor(str.length / 2);\n return ' '.repeat(halfWidth - halfChars);\n}\n//# sourceMappingURL=terminal.consologo.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.webConsolelogo = void 0;\nfunction webConsolelogo(productName, applicationInfo) {\n var subStyle = \"\\npadding: .1em 0;\\ncolor: rgb(98, 98, 108);\\nfont-size: 2em;\\nfont-weight: bold;\\n\".trim();\n var imageStyle = (\"\\ncolor: transparent;\\ndisplay: inline-block;\\nbackground-color: transparent;\\nbackground-image: url('http://kibibit.io/kibibit-assets/1x/long-white.png');\\nbackground-size: cover;\\npadding: 0 \" + 50 * 3.6 + \"px 50px 0;\\nborder: none;\\nfont-size: 11px;\\nline-height: 11px;\\nfont-family: monospace;\\n\").trim();\n console.log(\"%ckibibit\", imageStyle);\n console.log(\"%c\" + productName, subStyle);\n console.groupCollapsed(\"application info\");\n if (applicationInfo) {\n Array.isArray(applicationInfo)\n ? console.log(applicationInfo.join(\"\\n\") + \"\\n\")\n : console.log(applicationInfo + \"\\n\");\n }\n console.groupEnd();\n}\nexports.webConsolelogo = webConsolelogo;\n//# sourceMappingURL=web.consologo.js.map","module.exports = class kbError extends Error {\n /**\n * Creates a new KbError instance\n * @example\n * const error = new KbError('Error Message');\n * @param { String } message - a more detailed human-readable error message\n */\n constructor(message) {\n super(message);\n this.name = this.constructor.name;\n }\n};\n","'use strict';\n\nconst wrapAnsi16 = (fn, offset) => (...args) => {\n\tconst code = fn(...args);\n\treturn `\\u001B[${code + offset}m`;\n};\n\nconst wrapAnsi256 = (fn, offset) => (...args) => {\n\tconst code = fn(...args);\n\treturn `\\u001B[${38 + offset};5;${code}m`;\n};\n\nconst wrapAnsi16m = (fn, offset) => (...args) => {\n\tconst rgb = fn(...args);\n\treturn `\\u001B[${38 + offset};2;${rgb[0]};${rgb[1]};${rgb[2]}m`;\n};\n\nconst ansi2ansi = n => n;\nconst rgb2rgb = (r, g, b) => [r, g, b];\n\nconst setLazyProperty = (object, property, get) => {\n\tObject.defineProperty(object, property, {\n\t\tget: () => {\n\t\t\tconst value = get();\n\n\t\t\tObject.defineProperty(object, property, {\n\t\t\t\tvalue,\n\t\t\t\tenumerable: true,\n\t\t\t\tconfigurable: true\n\t\t\t});\n\n\t\t\treturn value;\n\t\t},\n\t\tenumerable: true,\n\t\tconfigurable: true\n\t});\n};\n\n/** @type {typeof import('color-convert')} */\nlet colorConvert;\nconst makeDynamicStyles = (wrap, targetSpace, identity, isBackground) => {\n\tif (colorConvert === undefined) {\n\t\tcolorConvert = require('color-convert');\n\t}\n\n\tconst offset = isBackground ? 10 : 0;\n\tconst styles = {};\n\n\tfor (const [sourceSpace, suite] of Object.entries(colorConvert)) {\n\t\tconst name = sourceSpace === 'ansi16' ? 'ansi' : sourceSpace;\n\t\tif (sourceSpace === targetSpace) {\n\t\t\tstyles[name] = wrap(identity, offset);\n\t\t} else if (typeof suite === 'object') {\n\t\t\tstyles[name] = wrap(suite[targetSpace], offset);\n\t\t}\n\t}\n\n\treturn styles;\n};\n\nfunction assembleStyles() {\n\tconst codes = new Map();\n\tconst styles = {\n\t\tmodifier: {\n\t\t\treset: [0, 0],\n\t\t\t// 21 isn't widely supported and 22 does the same thing\n\t\t\tbold: [1, 22],\n\t\t\tdim: [2, 22],\n\t\t\titalic: [3, 23],\n\t\t\tunderline: [4, 24],\n\t\t\tinverse: [7, 27],\n\t\t\thidden: [8, 28],\n\t\t\tstrikethrough: [9, 29]\n\t\t},\n\t\tcolor: {\n\t\t\tblack: [30, 39],\n\t\t\tred: [31, 39],\n\t\t\tgreen: [32, 39],\n\t\t\tyellow: [33, 39],\n\t\t\tblue: [34, 39],\n\t\t\tmagenta: [35, 39],\n\t\t\tcyan: [36, 39],\n\t\t\twhite: [37, 39],\n\n\t\t\t// Bright color\n\t\t\tblackBright: [90, 39],\n\t\t\tredBright: [91, 39],\n\t\t\tgreenBright: [92, 39],\n\t\t\tyellowBright: [93, 39],\n\t\t\tblueBright: [94, 39],\n\t\t\tmagentaBright: [95, 39],\n\t\t\tcyanBright: [96, 39],\n\t\t\twhiteBright: [97, 39]\n\t\t},\n\t\tbgColor: {\n\t\t\tbgBlack: [40, 49],\n\t\t\tbgRed: [41, 49],\n\t\t\tbgGreen: [42, 49],\n\t\t\tbgYellow: [43, 49],\n\t\t\tbgBlue: [44, 49],\n\t\t\tbgMagenta: [45, 49],\n\t\t\tbgCyan: [46, 49],\n\t\t\tbgWhite: [47, 49],\n\n\t\t\t// Bright color\n\t\t\tbgBlackBright: [100, 49],\n\t\t\tbgRedBright: [101, 49],\n\t\t\tbgGreenBright: [102, 49],\n\t\t\tbgYellowBright: [103, 49],\n\t\t\tbgBlueBright: [104, 49],\n\t\t\tbgMagentaBright: [105, 49],\n\t\t\tbgCyanBright: [106, 49],\n\t\t\tbgWhiteBright: [107, 49]\n\t\t}\n\t};\n\n\t// Alias bright black as gray (and grey)\n\tstyles.color.gray = styles.color.blackBright;\n\tstyles.bgColor.bgGray = styles.bgColor.bgBlackBright;\n\tstyles.color.grey = styles.color.blackBright;\n\tstyles.bgColor.bgGrey = styles.bgColor.bgBlackBright;\n\n\tfor (const [groupName, group] of Object.entries(styles)) {\n\t\tfor (const [styleName, style] of Object.entries(group)) {\n\t\t\tstyles[styleName] = {\n\t\t\t\topen: `\\u001B[${style[0]}m`,\n\t\t\t\tclose: `\\u001B[${style[1]}m`\n\t\t\t};\n\n\t\t\tgroup[styleName] = styles[styleName];\n\n\t\t\tcodes.set(style[0], style[1]);\n\t\t}\n\n\t\tObject.defineProperty(styles, groupName, {\n\t\t\tvalue: group,\n\t\t\tenumerable: false\n\t\t});\n\t}\n\n\tObject.defineProperty(styles, 'codes', {\n\t\tvalue: codes,\n\t\tenumerable: false\n\t});\n\n\tstyles.color.close = '\\u001B[39m';\n\tstyles.bgColor.close = '\\u001B[49m';\n\n\tsetLazyProperty(styles.color, 'ansi', () => makeDynamicStyles(wrapAnsi16, 'ansi16', ansi2ansi, false));\n\tsetLazyProperty(styles.color, 'ansi256', () => makeDynamicStyles(wrapAnsi256, 'ansi256', ansi2ansi, false));\n\tsetLazyProperty(styles.color, 'ansi16m', () => makeDynamicStyles(wrapAnsi16m, 'rgb', rgb2rgb, false));\n\tsetLazyProperty(styles.bgColor, 'ansi', () => makeDynamicStyles(wrapAnsi16, 'ansi16', ansi2ansi, true));\n\tsetLazyProperty(styles.bgColor, 'ansi256', () => makeDynamicStyles(wrapAnsi256, 'ansi256', ansi2ansi, true));\n\tsetLazyProperty(styles.bgColor, 'ansi16m', () => makeDynamicStyles(wrapAnsi16m, 'rgb', rgb2rgb, true));\n\n\treturn styles;\n}\n\n// Make the export immutable\nObject.defineProperty(module, 'exports', {\n\tenumerable: true,\n\tget: assembleStyles\n});\n","'use strict';\nconst ansiStyles = require('ansi-styles');\nconst {stdout: stdoutColor, stderr: stderrColor} = require('supports-color');\nconst {\n\tstringReplaceAll,\n\tstringEncaseCRLFWithFirstIndex\n} = require('./util');\n\nconst {isArray} = Array;\n\n// `supportsColor.level` → `ansiStyles.color[name]` mapping\nconst levelMapping = [\n\t'ansi',\n\t'ansi',\n\t'ansi256',\n\t'ansi16m'\n];\n\nconst styles = Object.create(null);\n\nconst applyOptions = (object, options = {}) => {\n\tif (options.level && !(Number.isInteger(options.level) && options.level >= 0 && options.level <= 3)) {\n\t\tthrow new Error('The `level` option should be an integer from 0 to 3');\n\t}\n\n\t// Detect level if not set manually\n\tconst colorLevel = stdoutColor ? stdoutColor.level : 0;\n\tobject.level = options.level === undefined ? colorLevel : options.level;\n};\n\nclass ChalkClass {\n\tconstructor(options) {\n\t\t// eslint-disable-next-line no-constructor-return\n\t\treturn chalkFactory(options);\n\t}\n}\n\nconst chalkFactory = options => {\n\tconst chalk = {};\n\tapplyOptions(chalk, options);\n\n\tchalk.template = (...arguments_) => chalkTag(chalk.template, ...arguments_);\n\n\tObject.setPrototypeOf(chalk, Chalk.prototype);\n\tObject.setPrototypeOf(chalk.template, chalk);\n\n\tchalk.template.constructor = () => {\n\t\tthrow new Error('`chalk.constructor()` is deprecated. Use `new chalk.Instance()` instead.');\n\t};\n\n\tchalk.template.Instance = ChalkClass;\n\n\treturn chalk.template;\n};\n\nfunction Chalk(options) {\n\treturn chalkFactory(options);\n}\n\nfor (const [styleName, style] of Object.entries(ansiStyles)) {\n\tstyles[styleName] = {\n\t\tget() {\n\t\t\tconst builder = createBuilder(this, createStyler(style.open, style.close, this._styler), this._isEmpty);\n\t\t\tObject.defineProperty(this, styleName, {value: builder});\n\t\t\treturn builder;\n\t\t}\n\t};\n}\n\nstyles.visible = {\n\tget() {\n\t\tconst builder = createBuilder(this, this._styler, true);\n\t\tObject.defineProperty(this, 'visible', {value: builder});\n\t\treturn builder;\n\t}\n};\n\nconst usedModels = ['rgb', 'hex', 'keyword', 'hsl', 'hsv', 'hwb', 'ansi', 'ansi256'];\n\nfor (const model of usedModels) {\n\tstyles[model] = {\n\t\tget() {\n\t\t\tconst {level} = this;\n\t\t\treturn function (...arguments_) {\n\t\t\t\tconst styler = createStyler(ansiStyles.color[levelMapping[level]][model](...arguments_), ansiStyles.color.close, this._styler);\n\t\t\t\treturn createBuilder(this, styler, this._isEmpty);\n\t\t\t};\n\t\t}\n\t};\n}\n\nfor (const model of usedModels) {\n\tconst bgModel = 'bg' + model[0].toUpperCase() + model.slice(1);\n\tstyles[bgModel] = {\n\t\tget() {\n\t\t\tconst {level} = this;\n\t\t\treturn function (...arguments_) {\n\t\t\t\tconst styler = createStyler(ansiStyles.bgColor[levelMapping[level]][model](...arguments_), ansiStyles.bgColor.close, this._styler);\n\t\t\t\treturn createBuilder(this, styler, this._isEmpty);\n\t\t\t};\n\t\t}\n\t};\n}\n\nconst proto = Object.defineProperties(() => {}, {\n\t...styles,\n\tlevel: {\n\t\tenumerable: true,\n\t\tget() {\n\t\t\treturn this._generator.level;\n\t\t},\n\t\tset(level) {\n\t\t\tthis._generator.level = level;\n\t\t}\n\t}\n});\n\nconst createStyler = (open, close, parent) => {\n\tlet openAll;\n\tlet closeAll;\n\tif (parent === undefined) {\n\t\topenAll = open;\n\t\tcloseAll = close;\n\t} else {\n\t\topenAll = parent.openAll + open;\n\t\tcloseAll = close + parent.closeAll;\n\t}\n\n\treturn {\n\t\topen,\n\t\tclose,\n\t\topenAll,\n\t\tcloseAll,\n\t\tparent\n\t};\n};\n\nconst createBuilder = (self, _styler, _isEmpty) => {\n\tconst builder = (...arguments_) => {\n\t\tif (isArray(arguments_[0]) && isArray(arguments_[0].raw)) {\n\t\t\t// Called as a template literal, for example: chalk.red`2 + 3 = {bold ${2+3}}`\n\t\t\treturn applyStyle(builder, chalkTag(builder, ...arguments_));\n\t\t}\n\n\t\t// Single argument is hot path, implicit coercion is faster than anything\n\t\t// eslint-disable-next-line no-implicit-coercion\n\t\treturn applyStyle(builder, (arguments_.length === 1) ? ('' + arguments_[0]) : arguments_.join(' '));\n\t};\n\n\t// We alter the prototype because we must return a function, but there is\n\t// no way to create a function with a different prototype\n\tObject.setPrototypeOf(builder, proto);\n\n\tbuilder._generator = self;\n\tbuilder._styler = _styler;\n\tbuilder._isEmpty = _isEmpty;\n\n\treturn builder;\n};\n\nconst applyStyle = (self, string) => {\n\tif (self.level <= 0 || !string) {\n\t\treturn self._isEmpty ? '' : string;\n\t}\n\n\tlet styler = self._styler;\n\n\tif (styler === undefined) {\n\t\treturn string;\n\t}\n\n\tconst {openAll, closeAll} = styler;\n\tif (string.indexOf('\\u001B') !== -1) {\n\t\twhile (styler !== undefined) {\n\t\t\t// Replace any instances already present with a re-opening code\n\t\t\t// otherwise only the part of the string until said closing code\n\t\t\t// will be colored, and the rest will simply be 'plain'.\n\t\t\tstring = stringReplaceAll(string, styler.close, styler.open);\n\n\t\t\tstyler = styler.parent;\n\t\t}\n\t}\n\n\t// We can move both next actions out of loop, because remaining actions in loop won't have\n\t// any/visible effect on parts we add here. Close the styling before a linebreak and reopen\n\t// after next line to fix a bleed issue on macOS: https://github.com/chalk/chalk/pull/92\n\tconst lfIndex = string.indexOf('\\n');\n\tif (lfIndex !== -1) {\n\t\tstring = stringEncaseCRLFWithFirstIndex(string, closeAll, openAll, lfIndex);\n\t}\n\n\treturn openAll + string + closeAll;\n};\n\nlet template;\nconst chalkTag = (chalk, ...strings) => {\n\tconst [firstString] = strings;\n\n\tif (!isArray(firstString) || !isArray(firstString.raw)) {\n\t\t// If chalk() was called by itself or with a string,\n\t\t// return the string itself as a string.\n\t\treturn strings.join(' ');\n\t}\n\n\tconst arguments_ = strings.slice(1);\n\tconst parts = [firstString.raw[0]];\n\n\tfor (let i = 1; i < firstString.length; i++) {\n\t\tparts.push(\n\t\t\tString(arguments_[i - 1]).replace(/[{}\\\\]/g, '\\\\$&'),\n\t\t\tString(firstString.raw[i])\n\t\t);\n\t}\n\n\tif (template === undefined) {\n\t\ttemplate = require('./templates');\n\t}\n\n\treturn template(chalk, parts.join(''));\n};\n\nObject.defineProperties(Chalk.prototype, styles);\n\nconst chalk = Chalk(); // eslint-disable-line new-cap\nchalk.supportsColor = stdoutColor;\nchalk.stderr = Chalk({level: stderrColor ? stderrColor.level : 0}); // eslint-disable-line new-cap\nchalk.stderr.supportsColor = stderrColor;\n\nmodule.exports = chalk;\n","'use strict';\nconst TEMPLATE_REGEX = /(?:\\\\(u(?:[a-f\\d]{4}|\\{[a-f\\d]{1,6}\\})|x[a-f\\d]{2}|.))|(?:\\{(~)?(\\w+(?:\\([^)]*\\))?(?:\\.\\w+(?:\\([^)]*\\))?)*)(?:[ \\t]|(?=\\r?\\n)))|(\\})|((?:.|[\\r\\n\\f])+?)/gi;\nconst STYLE_REGEX = /(?:^|\\.)(\\w+)(?:\\(([^)]*)\\))?/g;\nconst STRING_REGEX = /^(['\"])((?:\\\\.|(?!\\1)[^\\\\])*)\\1$/;\nconst ESCAPE_REGEX = /\\\\(u(?:[a-f\\d]{4}|{[a-f\\d]{1,6}})|x[a-f\\d]{2}|.)|([^\\\\])/gi;\n\nconst ESCAPES = new Map([\n\t['n', '\\n'],\n\t['r', '\\r'],\n\t['t', '\\t'],\n\t['b', '\\b'],\n\t['f', '\\f'],\n\t['v', '\\v'],\n\t['0', '\\0'],\n\t['\\\\', '\\\\'],\n\t['e', '\\u001B'],\n\t['a', '\\u0007']\n]);\n\nfunction unescape(c) {\n\tconst u = c[0] === 'u';\n\tconst bracket = c[1] === '{';\n\n\tif ((u && !bracket && c.length === 5) || (c[0] === 'x' && c.length === 3)) {\n\t\treturn String.fromCharCode(parseInt(c.slice(1), 16));\n\t}\n\n\tif (u && bracket) {\n\t\treturn String.fromCodePoint(parseInt(c.slice(2, -1), 16));\n\t}\n\n\treturn ESCAPES.get(c) || c;\n}\n\nfunction parseArguments(name, arguments_) {\n\tconst results = [];\n\tconst chunks = arguments_.trim().split(/\\s*,\\s*/g);\n\tlet matches;\n\n\tfor (const chunk of chunks) {\n\t\tconst number = Number(chunk);\n\t\tif (!Number.isNaN(number)) {\n\t\t\tresults.push(number);\n\t\t} else if ((matches = chunk.match(STRING_REGEX))) {\n\t\t\tresults.push(matches[2].replace(ESCAPE_REGEX, (m, escape, character) => escape ? unescape(escape) : character));\n\t\t} else {\n\t\t\tthrow new Error(`Invalid Chalk template style argument: ${chunk} (in style '${name}')`);\n\t\t}\n\t}\n\n\treturn results;\n}\n\nfunction parseStyle(style) {\n\tSTYLE_REGEX.lastIndex = 0;\n\n\tconst results = [];\n\tlet matches;\n\n\twhile ((matches = STYLE_REGEX.exec(style)) !== null) {\n\t\tconst name = matches[1];\n\n\t\tif (matches[2]) {\n\t\t\tconst args = parseArguments(name, matches[2]);\n\t\t\tresults.push([name].concat(args));\n\t\t} else {\n\t\t\tresults.push([name]);\n\t\t}\n\t}\n\n\treturn results;\n}\n\nfunction buildStyle(chalk, styles) {\n\tconst enabled = {};\n\n\tfor (const layer of styles) {\n\t\tfor (const style of layer.styles) {\n\t\t\tenabled[style[0]] = layer.inverse ? null : style.slice(1);\n\t\t}\n\t}\n\n\tlet current = chalk;\n\tfor (const [styleName, styles] of Object.entries(enabled)) {\n\t\tif (!Array.isArray(styles)) {\n\t\t\tcontinue;\n\t\t}\n\n\t\tif (!(styleName in current)) {\n\t\t\tthrow new Error(`Unknown Chalk style: ${styleName}`);\n\t\t}\n\n\t\tcurrent = styles.length > 0 ? current[styleName](...styles) : current[styleName];\n\t}\n\n\treturn current;\n}\n\nmodule.exports = (chalk, temporary) => {\n\tconst styles = [];\n\tconst chunks = [];\n\tlet chunk = [];\n\n\t// eslint-disable-next-line max-params\n\ttemporary.replace(TEMPLATE_REGEX, (m, escapeCharacter, inverse, style, close, character) => {\n\t\tif (escapeCharacter) {\n\t\t\tchunk.push(unescape(escapeCharacter));\n\t\t} else if (style) {\n\t\t\tconst string = chunk.join('');\n\t\t\tchunk = [];\n\t\t\tchunks.push(styles.length === 0 ? string : buildStyle(chalk, styles)(string));\n\t\t\tstyles.push({inverse, styles: parseStyle(style)});\n\t\t} else if (close) {\n\t\t\tif (styles.length === 0) {\n\t\t\t\tthrow new Error('Found extraneous } in Chalk template literal');\n\t\t\t}\n\n\t\t\tchunks.push(buildStyle(chalk, styles)(chunk.join('')));\n\t\t\tchunk = [];\n\t\t\tstyles.pop();\n\t\t} else {\n\t\t\tchunk.push(character);\n\t\t}\n\t});\n\n\tchunks.push(chunk.join(''));\n\n\tif (styles.length > 0) {\n\t\tconst errMessage = `Chalk template literal is missing ${styles.length} closing bracket${styles.length === 1 ? '' : 's'} (\\`}\\`)`;\n\t\tthrow new Error(errMessage);\n\t}\n\n\treturn chunks.join('');\n};\n","'use strict';\n\nconst stringReplaceAll = (string, substring, replacer) => {\n\tlet index = string.indexOf(substring);\n\tif (index === -1) {\n\t\treturn string;\n\t}\n\n\tconst substringLength = substring.length;\n\tlet endIndex = 0;\n\tlet returnValue = '';\n\tdo {\n\t\treturnValue += string.substr(endIndex, index - endIndex) + substring + replacer;\n\t\tendIndex = index + substringLength;\n\t\tindex = string.indexOf(substring, endIndex);\n\t} while (index !== -1);\n\n\treturnValue += string.substr(endIndex);\n\treturn returnValue;\n};\n\nconst stringEncaseCRLFWithFirstIndex = (string, prefix, postfix, index) => {\n\tlet endIndex = 0;\n\tlet returnValue = '';\n\tdo {\n\t\tconst gotCR = string[index - 1] === '\\r';\n\t\treturnValue += string.substr(endIndex, (gotCR ? index - 1 : index) - endIndex) + prefix + (gotCR ? '\\r\\n' : '\\n') + postfix;\n\t\tendIndex = index + 1;\n\t\tindex = string.indexOf('\\n', endIndex);\n\t} while (index !== -1);\n\n\treturnValue += string.substr(endIndex);\n\treturn returnValue;\n};\n\nmodule.exports = {\n\tstringReplaceAll,\n\tstringEncaseCRLFWithFirstIndex\n};\n","/* MIT license */\n/* eslint-disable no-mixed-operators */\nconst cssKeywords = require('color-name');\n\n// NOTE: conversions should only return primitive values (i.e. arrays, or\n// values that give correct `typeof` results).\n// do not use box values types (i.e. Number(), String(), etc.)\n\nconst reverseKeywords = {};\nfor (const key of Object.keys(cssKeywords)) {\n\treverseKeywords[cssKeywords[key]] = key;\n}\n\nconst convert = {\n\trgb: {channels: 3, labels: 'rgb'},\n\thsl: {channels: 3, labels: 'hsl'},\n\thsv: {channels: 3, labels: 'hsv'},\n\thwb: {channels: 3, labels: 'hwb'},\n\tcmyk: {channels: 4, labels: 'cmyk'},\n\txyz: {channels: 3, labels: 'xyz'},\n\tlab: {channels: 3, labels: 'lab'},\n\tlch: {channels: 3, labels: 'lch'},\n\thex: {channels: 1, labels: ['hex']},\n\tkeyword: {channels: 1, labels: ['keyword']},\n\tansi16: {channels: 1, labels: ['ansi16']},\n\tansi256: {channels: 1, labels: ['ansi256']},\n\thcg: {channels: 3, labels: ['h', 'c', 'g']},\n\tapple: {channels: 3, labels: ['r16', 'g16', 'b16']},\n\tgray: {channels: 1, labels: ['gray']}\n};\n\nmodule.exports = convert;\n\n// Hide .channels and .labels properties\nfor (const model of Object.keys(convert)) {\n\tif (!('channels' in convert[model])) {\n\t\tthrow new Error('missing channels property: ' + model);\n\t}\n\n\tif (!('labels' in convert[model])) {\n\t\tthrow new Error('missing channel labels property: ' + model);\n\t}\n\n\tif (convert[model].labels.length !== convert[model].channels) {\n\t\tthrow new Error('channel and label counts mismatch: ' + model);\n\t}\n\n\tconst {channels, labels} = convert[model];\n\tdelete convert[model].channels;\n\tdelete convert[model].labels;\n\tObject.defineProperty(convert[model], 'channels', {value: channels});\n\tObject.defineProperty(convert[model], 'labels', {value: labels});\n}\n\nconvert.rgb.hsl = function (rgb) {\n\tconst r = rgb[0] / 255;\n\tconst g = rgb[1] / 255;\n\tconst b = rgb[2] / 255;\n\tconst min = Math.min(r, g, b);\n\tconst max = Math.max(r, g, b);\n\tconst delta = max - min;\n\tlet h;\n\tlet s;\n\n\tif (max === min) {\n\t\th = 0;\n\t} else if (r === max) {\n\t\th = (g - b) / delta;\n\t} else if (g === max) {\n\t\th = 2 + (b - r) / delta;\n\t} else if (b === max) {\n\t\th = 4 + (r - g) / delta;\n\t}\n\n\th = Math.min(h * 60, 360);\n\n\tif (h < 0) {\n\t\th += 360;\n\t}\n\n\tconst l = (min + max) / 2;\n\n\tif (max === min) {\n\t\ts = 0;\n\t} else if (l <= 0.5) {\n\t\ts = delta / (max + min);\n\t} else {\n\t\ts = delta / (2 - max - min);\n\t}\n\n\treturn [h, s * 100, l * 100];\n};\n\nconvert.rgb.hsv = function (rgb) {\n\tlet rdif;\n\tlet gdif;\n\tlet bdif;\n\tlet h;\n\tlet s;\n\n\tconst r = rgb[0] / 255;\n\tconst g = rgb[1] / 255;\n\tconst b = rgb[2] / 255;\n\tconst v = Math.max(r, g, b);\n\tconst diff = v - Math.min(r, g, b);\n\tconst diffc = function (c) {\n\t\treturn (v - c) / 6 / diff + 1 / 2;\n\t};\n\n\tif (diff === 0) {\n\t\th = 0;\n\t\ts = 0;\n\t} else {\n\t\ts = diff / v;\n\t\trdif = diffc(r);\n\t\tgdif = diffc(g);\n\t\tbdif = diffc(b);\n\n\t\tif (r === v) {\n\t\t\th = bdif - gdif;\n\t\t} else if (g === v) {\n\t\t\th = (1 / 3) + rdif - bdif;\n\t\t} else if (b === v) {\n\t\t\th = (2 / 3) + gdif - rdif;\n\t\t}\n\n\t\tif (h < 0) {\n\t\t\th += 1;\n\t\t} else if (h > 1) {\n\t\t\th -= 1;\n\t\t}\n\t}\n\n\treturn [\n\t\th * 360,\n\t\ts * 100,\n\t\tv * 100\n\t];\n};\n\nconvert.rgb.hwb = function (rgb) {\n\tconst r = rgb[0];\n\tconst g = rgb[1];\n\tlet b = rgb[2];\n\tconst h = convert.rgb.hsl(rgb)[0];\n\tconst w = 1 / 255 * Math.min(r, Math.min(g, b));\n\n\tb = 1 - 1 / 255 * Math.max(r, Math.max(g, b));\n\n\treturn [h, w * 100, b * 100];\n};\n\nconvert.rgb.cmyk = function (rgb) {\n\tconst r = rgb[0] / 255;\n\tconst g = rgb[1] / 255;\n\tconst b = rgb[2] / 255;\n\n\tconst k = Math.min(1 - r, 1 - g, 1 - b);\n\tconst c = (1 - r - k) / (1 - k) || 0;\n\tconst m = (1 - g - k) / (1 - k) || 0;\n\tconst y = (1 - b - k) / (1 - k) || 0;\n\n\treturn [c * 100, m * 100, y * 100, k * 100];\n};\n\nfunction comparativeDistance(x, y) {\n\t/*\n\t\tSee https://en.m.wikipedia.org/wiki/Euclidean_distance#Squared_Euclidean_distance\n\t*/\n\treturn (\n\t\t((x[0] - y[0]) ** 2) +\n\t\t((x[1] - y[1]) ** 2) +\n\t\t((x[2] - y[2]) ** 2)\n\t);\n}\n\nconvert.rgb.keyword = function (rgb) {\n\tconst reversed = reverseKeywords[rgb];\n\tif (reversed) {\n\t\treturn reversed;\n\t}\n\n\tlet currentClosestDistance = Infinity;\n\tlet currentClosestKeyword;\n\n\tfor (const keyword of Object.keys(cssKeywords)) {\n\t\tconst value = cssKeywords[keyword];\n\n\t\t// Compute comparative distance\n\t\tconst distance = comparativeDistance(rgb, value);\n\n\t\t// Check if its less, if so set as closest\n\t\tif (distance < currentClosestDistance) {\n\t\t\tcurrentClosestDistance = distance;\n\t\t\tcurrentClosestKeyword = keyword;\n\t\t}\n\t}\n\n\treturn currentClosestKeyword;\n};\n\nconvert.keyword.rgb = function (keyword) {\n\treturn cssKeywords[keyword];\n};\n\nconvert.rgb.xyz = function (rgb) {\n\tlet r = rgb[0] / 255;\n\tlet g = rgb[1] / 255;\n\tlet b = rgb[2] / 255;\n\n\t// Assume sRGB\n\tr = r > 0.04045 ? (((r + 0.055) / 1.055) ** 2.4) : (r / 12.92);\n\tg = g > 0.04045 ? (((g + 0.055) / 1.055) ** 2.4) : (g / 12.92);\n\tb = b > 0.04045 ? (((b + 0.055) / 1.055) ** 2.4) : (b / 12.92);\n\n\tconst x = (r * 0.4124) + (g * 0.3576) + (b * 0.1805);\n\tconst y = (r * 0.2126) + (g * 0.7152) + (b * 0.0722);\n\tconst z = (r * 0.0193) + (g * 0.1192) + (b * 0.9505);\n\n\treturn [x * 100, y * 100, z * 100];\n};\n\nconvert.rgb.lab = function (rgb) {\n\tconst xyz = convert.rgb.xyz(rgb);\n\tlet x = xyz[0];\n\tlet y = xyz[1];\n\tlet z = xyz[2];\n\n\tx /= 95.047;\n\ty /= 100;\n\tz /= 108.883;\n\n\tx = x > 0.008856 ? (x ** (1 / 3)) : (7.787 * x) + (16 / 116);\n\ty = y > 0.008856 ? (y ** (1 / 3)) : (7.787 * y) + (16 / 116);\n\tz = z > 0.008856 ? (z ** (1 / 3)) : (7.787 * z) + (16 / 116);\n\n\tconst l = (116 * y) - 16;\n\tconst a = 500 * (x - y);\n\tconst b = 200 * (y - z);\n\n\treturn [l, a, b];\n};\n\nconvert.hsl.rgb = function (hsl) {\n\tconst h = hsl[0] / 360;\n\tconst s = hsl[1] / 100;\n\tconst l = hsl[2] / 100;\n\tlet t2;\n\tlet t3;\n\tlet val;\n\n\tif (s === 0) {\n\t\tval = l * 255;\n\t\treturn [val, val, val];\n\t}\n\n\tif (l < 0.5) {\n\t\tt2 = l * (1 + s);\n\t} else {\n\t\tt2 = l + s - l * s;\n\t}\n\n\tconst t1 = 2 * l - t2;\n\n\tconst rgb = [0, 0, 0];\n\tfor (let i = 0; i < 3; i++) {\n\t\tt3 = h + 1 / 3 * -(i - 1);\n\t\tif (t3 < 0) {\n\t\t\tt3++;\n\t\t}\n\n\t\tif (t3 > 1) {\n\t\t\tt3--;\n\t\t}\n\n\t\tif (6 * t3 < 1) {\n\t\t\tval = t1 + (t2 - t1) * 6 * t3;\n\t\t} else if (2 * t3 < 1) {\n\t\t\tval = t2;\n\t\t} else if (3 * t3 < 2) {\n\t\t\tval = t1 + (t2 - t1) * (2 / 3 - t3) * 6;\n\t\t} else {\n\t\t\tval = t1;\n\t\t}\n\n\t\trgb[i] = val * 255;\n\t}\n\n\treturn rgb;\n};\n\nconvert.hsl.hsv = function (hsl) {\n\tconst h = hsl[0];\n\tlet s = hsl[1] / 100;\n\tlet l = hsl[2] / 100;\n\tlet smin = s;\n\tconst lmin = Math.max(l, 0.01);\n\n\tl *= 2;\n\ts *= (l <= 1) ? l : 2 - l;\n\tsmin *= lmin <= 1 ? lmin : 2 - lmin;\n\tconst v = (l + s) / 2;\n\tconst sv = l === 0 ? (2 * smin) / (lmin + smin) : (2 * s) / (l + s);\n\n\treturn [h, sv * 100, v * 100];\n};\n\nconvert.hsv.rgb = function (hsv) {\n\tconst h = hsv[0] / 60;\n\tconst s = hsv[1] / 100;\n\tlet v = hsv[2] / 100;\n\tconst hi = Math.floor(h) % 6;\n\n\tconst f = h - Math.floor(h);\n\tconst p = 255 * v * (1 - s);\n\tconst q = 255 * v * (1 - (s * f));\n\tconst t = 255 * v * (1 - (s * (1 - f)));\n\tv *= 255;\n\n\tswitch (hi) {\n\t\tcase 0:\n\t\t\treturn [v, t, p];\n\t\tcase 1:\n\t\t\treturn [q, v, p];\n\t\tcase 2:\n\t\t\treturn [p, v, t];\n\t\tcase 3:\n\t\t\treturn [p, q, v];\n\t\tcase 4:\n\t\t\treturn [t, p, v];\n\t\tcase 5:\n\t\t\treturn [v, p, q];\n\t}\n};\n\nconvert.hsv.hsl = function (hsv) {\n\tconst h = hsv[0];\n\tconst s = hsv[1] / 100;\n\tconst v = hsv[2] / 100;\n\tconst vmin = Math.max(v, 0.01);\n\tlet sl;\n\tlet l;\n\n\tl = (2 - s) * v;\n\tconst lmin = (2 - s) * vmin;\n\tsl = s * vmin;\n\tsl /= (lmin <= 1) ? lmin : 2 - lmin;\n\tsl = sl || 0;\n\tl /= 2;\n\n\treturn [h, sl * 100, l * 100];\n};\n\n// http://dev.w3.org/csswg/css-color/#hwb-to-rgb\nconvert.hwb.rgb = function (hwb) {\n\tconst h = hwb[0] / 360;\n\tlet wh = hwb[1] / 100;\n\tlet bl = hwb[2] / 100;\n\tconst ratio = wh + bl;\n\tlet f;\n\n\t// Wh + bl cant be > 1\n\tif (ratio > 1) {\n\t\twh /= ratio;\n\t\tbl /= ratio;\n\t}\n\n\tconst i = Math.floor(6 * h);\n\tconst v = 1 - bl;\n\tf = 6 * h - i;\n\n\tif ((i & 0x01) !== 0) {\n\t\tf = 1 - f;\n\t}\n\n\tconst n = wh + f * (v - wh); // Linear interpolation\n\n\tlet r;\n\tlet g;\n\tlet b;\n\t/* eslint-disable max-statements-per-line,no-multi-spaces */\n\tswitch (i) {\n\t\tdefault:\n\t\tcase 6:\n\t\tcase 0: r = v; g = n; b = wh; break;\n\t\tcase 1: r = n; g = v; b = wh; break;\n\t\tcase 2: r = wh; g = v; b = n; break;\n\t\tcase 3: r = wh; g = n; b = v; break;\n\t\tcase 4: r = n; g = wh; b = v; break;\n\t\tcase 5: r = v; g = wh; b = n; break;\n\t}\n\t/* eslint-enable max-statements-per-line,no-multi-spaces */\n\n\treturn [r * 255, g * 255, b * 255];\n};\n\nconvert.cmyk.rgb = function (cmyk) {\n\tconst c = cmyk[0] / 100;\n\tconst m = cmyk[1] / 100;\n\tconst y = cmyk[2] / 100;\n\tconst k = cmyk[3] / 100;\n\n\tconst r = 1 - Math.min(1, c * (1 - k) + k);\n\tconst g = 1 - Math.min(1, m * (1 - k) + k);\n\tconst b = 1 - Math.min(1, y * (1 - k) + k);\n\n\treturn [r * 255, g * 255, b * 255];\n};\n\nconvert.xyz.rgb = function (xyz) {\n\tconst x = xyz[0] / 100;\n\tconst y = xyz[1] / 100;\n\tconst z = xyz[2] / 100;\n\tlet r;\n\tlet g;\n\tlet b;\n\n\tr = (x * 3.2406) + (y * -1.5372) + (z * -0.4986);\n\tg = (x * -0.9689) + (y * 1.8758) + (z * 0.0415);\n\tb = (x * 0.0557) + (y * -0.2040) + (z * 1.0570);\n\n\t// Assume sRGB\n\tr = r > 0.0031308\n\t\t? ((1.055 * (r ** (1.0 / 2.4))) - 0.055)\n\t\t: r * 12.92;\n\n\tg = g > 0.0031308\n\t\t? ((1.055 * (g ** (1.0 / 2.4))) - 0.055)\n\t\t: g * 12.92;\n\n\tb = b > 0.0031308\n\t\t? ((1.055 * (b ** (1.0 / 2.4))) - 0.055)\n\t\t: b * 12.92;\n\n\tr = Math.min(Math.max(0, r), 1);\n\tg = Math.min(Math.max(0, g), 1);\n\tb = Math.min(Math.max(0, b), 1);\n\n\treturn [r * 255, g * 255, b * 255];\n};\n\nconvert.xyz.lab = function (xyz) {\n\tlet x = xyz[0];\n\tlet y = xyz[1];\n\tlet z = xyz[2];\n\n\tx /= 95.047;\n\ty /= 100;\n\tz /= 108.883;\n\n\tx = x > 0.008856 ? (x ** (1 / 3)) : (7.787 * x) + (16 / 116);\n\ty = y > 0.008856 ? (y ** (1 / 3)) : (7.787 * y) + (16 / 116);\n\tz = z > 0.008856 ? (z ** (1 / 3)) : (7.787 * z) + (16 / 116);\n\n\tconst l = (116 * y) - 16;\n\tconst a = 500 * (x - y);\n\tconst b = 200 * (y - z);\n\n\treturn [l, a, b];\n};\n\nconvert.lab.xyz = function (lab) {\n\tconst l = lab[0];\n\tconst a = lab[1];\n\tconst b = lab[2];\n\tlet x;\n\tlet y;\n\tlet z;\n\n\ty = (l + 16) / 116;\n\tx = a / 500 + y;\n\tz = y - b / 200;\n\n\tconst y2 = y ** 3;\n\tconst x2 = x ** 3;\n\tconst z2 = z ** 3;\n\ty = y2 > 0.008856 ? y2 : (y - 16 / 116) / 7.787;\n\tx = x2 > 0.008856 ? x2 : (x - 16 / 116) / 7.787;\n\tz = z2 > 0.008856 ? z2 : (z - 16 / 116) / 7.787;\n\n\tx *= 95.047;\n\ty *= 100;\n\tz *= 108.883;\n\n\treturn [x, y, z];\n};\n\nconvert.lab.lch = function (lab) {\n\tconst l = lab[0];\n\tconst a = lab[1];\n\tconst b = lab[2];\n\tlet h;\n\n\tconst hr = Math.atan2(b, a);\n\th = hr * 360 / 2 / Math.PI;\n\n\tif (h < 0) {\n\t\th += 360;\n\t}\n\n\tconst c = Math.sqrt(a * a + b * b);\n\n\treturn [l, c, h];\n};\n\nconvert.lch.lab = function (lch) {\n\tconst l = lch[0];\n\tconst c = lch[1];\n\tconst h = lch[2];\n\n\tconst hr = h / 360 * 2 * Math.PI;\n\tconst a = c * Math.cos(hr);\n\tconst b = c * Math.sin(hr);\n\n\treturn [l, a, b];\n};\n\nconvert.rgb.ansi16 = function (args, saturation = null) {\n\tconst [r, g, b] = args;\n\tlet value = saturation === null ? convert.rgb.hsv(args)[2] : saturation; // Hsv -> ansi16 optimization\n\n\tvalue = Math.round(value / 50);\n\n\tif (value === 0) {\n\t\treturn 30;\n\t}\n\n\tlet ansi = 30\n\t\t+ ((Math.round(b / 255) << 2)\n\t\t| (Math.round(g / 255) << 1)\n\t\t| Math.round(r / 255));\n\n\tif (value === 2) {\n\t\tansi += 60;\n\t}\n\n\treturn ansi;\n};\n\nconvert.hsv.ansi16 = function (args) {\n\t// Optimization here; we already know the value and don't need to get\n\t// it converted for us.\n\treturn convert.rgb.ansi16(convert.hsv.rgb(args), args[2]);\n};\n\nconvert.rgb.ansi256 = function (args) {\n\tconst r = args[0];\n\tconst g = args[1];\n\tconst b = args[2];\n\n\t// We use the extended greyscale palette here, with the exception of\n\t// black and white. normal palette only has 4 greyscale shades.\n\tif (r === g && g === b) {\n\t\tif (r < 8) {\n\t\t\treturn 16;\n\t\t}\n\n\t\tif (r > 248) {\n\t\t\treturn 231;\n\t\t}\n\n\t\treturn Math.round(((r - 8) / 247) * 24) + 232;\n\t}\n\n\tconst ansi = 16\n\t\t+ (36 * Math.round(r / 255 * 5))\n\t\t+ (6 * Math.round(g / 255 * 5))\n\t\t+ Math.round(b / 255 * 5);\n\n\treturn ansi;\n};\n\nconvert.ansi16.rgb = function (args) {\n\tlet color = args % 10;\n\n\t// Handle greyscale\n\tif (color === 0 || color === 7) {\n\t\tif (args > 50) {\n\t\t\tcolor += 3.5;\n\t\t}\n\n\t\tcolor = color / 10.5 * 255;\n\n\t\treturn [color, color, color];\n\t}\n\n\tconst mult = (~~(args > 50) + 1) * 0.5;\n\tconst r = ((color & 1) * mult) * 255;\n\tconst g = (((color >> 1) & 1) * mult) * 255;\n\tconst b = (((color >> 2) & 1) * mult) * 255;\n\n\treturn [r, g, b];\n};\n\nconvert.ansi256.rgb = function (args) {\n\t// Handle greyscale\n\tif (args >= 232) {\n\t\tconst c = (args - 232) * 10 + 8;\n\t\treturn [c, c, c];\n\t}\n\n\targs -= 16;\n\n\tlet rem;\n\tconst r = Math.floor(args / 36) / 5 * 255;\n\tconst g = Math.floor((rem = args % 36) / 6) / 5 * 255;\n\tconst b = (rem % 6) / 5 * 255;\n\n\treturn [r, g, b];\n};\n\nconvert.rgb.hex = function (args) {\n\tconst integer = ((Math.round(args[0]) & 0xFF) << 16)\n\t\t+ ((Math.round(args[1]) & 0xFF) << 8)\n\t\t+ (Math.round(args[2]) & 0xFF);\n\n\tconst string = integer.toString(16).toUpperCase();\n\treturn '000000'.substring(string.length) + string;\n};\n\nconvert.hex.rgb = function (args) {\n\tconst match = args.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);\n\tif (!match) {\n\t\treturn [0, 0, 0];\n\t}\n\n\tlet colorString = match[0];\n\n\tif (match[0].length === 3) {\n\t\tcolorString = colorString.split('').map(char => {\n\t\t\treturn char + char;\n\t\t}).join('');\n\t}\n\n\tconst integer = parseInt(colorString, 16);\n\tconst r = (integer >> 16) & 0xFF;\n\tconst g = (integer >> 8) & 0xFF;\n\tconst b = integer & 0xFF;\n\n\treturn [r, g, b];\n};\n\nconvert.rgb.hcg = function (rgb) {\n\tconst r = rgb[0] / 255;\n\tconst g = rgb[1] / 255;\n\tconst b = rgb[2] / 255;\n\tconst max = Math.max(Math.max(r, g), b);\n\tconst min = Math.min(Math.min(r, g), b);\n\tconst chroma = (max - min);\n\tlet grayscale;\n\tlet hue;\n\n\tif (chroma < 1) {\n\t\tgrayscale = min / (1 - chroma);\n\t} else {\n\t\tgrayscale = 0;\n\t}\n\n\tif (chroma <= 0) {\n\t\thue = 0;\n\t} else\n\tif (max === r) {\n\t\thue = ((g - b) / chroma) % 6;\n\t} else\n\tif (max === g) {\n\t\thue = 2 + (b - r) / chroma;\n\t} else {\n\t\thue = 4 + (r - g) / chroma;\n\t}\n\n\thue /= 6;\n\thue %= 1;\n\n\treturn [hue * 360, chroma * 100, grayscale * 100];\n};\n\nconvert.hsl.hcg = function (hsl) {\n\tconst s = hsl[1] / 100;\n\tconst l = hsl[2] / 100;\n\n\tconst c = l < 0.5 ? (2.0 * s * l) : (2.0 * s * (1.0 - l));\n\n\tlet f = 0;\n\tif (c < 1.0) {\n\t\tf = (l - 0.5 * c) / (1.0 - c);\n\t}\n\n\treturn [hsl[0], c * 100, f * 100];\n};\n\nconvert.hsv.hcg = function (hsv) {\n\tconst s = hsv[1] / 100;\n\tconst v = hsv[2] / 100;\n\n\tconst c = s * v;\n\tlet f = 0;\n\n\tif (c < 1.0) {\n\t\tf = (v - c) / (1 - c);\n\t}\n\n\treturn [hsv[0], c * 100, f * 100];\n};\n\nconvert.hcg.rgb = function (hcg) {\n\tconst h = hcg[0] / 360;\n\tconst c = hcg[1] / 100;\n\tconst g = hcg[2] / 100;\n\n\tif (c === 0.0) {\n\t\treturn [g * 255, g * 255, g * 255];\n\t}\n\n\tconst pure = [0, 0, 0];\n\tconst hi = (h % 1) * 6;\n\tconst v = hi % 1;\n\tconst w = 1 - v;\n\tlet mg = 0;\n\n\t/* eslint-disable max-statements-per-line */\n\tswitch (Math.floor(hi)) {\n\t\tcase 0:\n\t\t\tpure[0] = 1; pure[1] = v; pure[2] = 0; break;\n\t\tcase 1:\n\t\t\tpure[0] = w; pure[1] = 1; pure[2] = 0; break;\n\t\tcase 2:\n\t\t\tpure[0] = 0; pure[1] = 1; pure[2] = v; break;\n\t\tcase 3:\n\t\t\tpure[0] = 0; pure[1] = w; pure[2] = 1; break;\n\t\tcase 4:\n\t\t\tpure[0] = v; pure[1] = 0; pure[2] = 1; break;\n\t\tdefault:\n\t\t\tpure[0] = 1; pure[1] = 0; pure[2] = w;\n\t}\n\t/* eslint-enable max-statements-per-line */\n\n\tmg = (1.0 - c) * g;\n\n\treturn [\n\t\t(c * pure[0] + mg) * 255,\n\t\t(c * pure[1] + mg) * 255,\n\t\t(c * pure[2] + mg) * 255\n\t];\n};\n\nconvert.hcg.hsv = function (hcg) {\n\tconst c = hcg[1] / 100;\n\tconst g = hcg[2] / 100;\n\n\tconst v = c + g * (1.0 - c);\n\tlet f = 0;\n\n\tif (v > 0.0) {\n\t\tf = c / v;\n\t}\n\n\treturn [hcg[0], f * 100, v * 100];\n};\n\nconvert.hcg.hsl = function (hcg) {\n\tconst c = hcg[1] / 100;\n\tconst g = hcg[2] / 100;\n\n\tconst l = g * (1.0 - c) + 0.5 * c;\n\tlet s = 0;\n\n\tif (l > 0.0 && l < 0.5) {\n\t\ts = c / (2 * l);\n\t} else\n\tif (l >= 0.5 && l < 1.0) {\n\t\ts = c / (2 * (1 - l));\n\t}\n\n\treturn [hcg[0], s * 100, l * 100];\n};\n\nconvert.hcg.hwb = function (hcg) {\n\tconst c = hcg[1] / 100;\n\tconst g = hcg[2] / 100;\n\tconst v = c + g * (1.0 - c);\n\treturn [hcg[0], (v - c) * 100, (1 - v) * 100];\n};\n\nconvert.hwb.hcg = function (hwb) {\n\tconst w = hwb[1] / 100;\n\tconst b = hwb[2] / 100;\n\tconst v = 1 - b;\n\tconst c = v - w;\n\tlet g = 0;\n\n\tif (c < 1) {\n\t\tg = (v - c) / (1 - c);\n\t}\n\n\treturn [hwb[0], c * 100, g * 100];\n};\n\nconvert.apple.rgb = function (apple) {\n\treturn [(apple[0] / 65535) * 255, (apple[1] / 65535) * 255, (apple[2] / 65535) * 255];\n};\n\nconvert.rgb.apple = function (rgb) {\n\treturn [(rgb[0] / 255) * 65535, (rgb[1] / 255) * 65535, (rgb[2] / 255) * 65535];\n};\n\nconvert.gray.rgb = function (args) {\n\treturn [args[0] / 100 * 255, args[0] / 100 * 255, args[0] / 100 * 255];\n};\n\nconvert.gray.hsl = function (args) {\n\treturn [0, 0, args[0]];\n};\n\nconvert.gray.hsv = convert.gray.hsl;\n\nconvert.gray.hwb = function (gray) {\n\treturn [0, 100, gray[0]];\n};\n\nconvert.gray.cmyk = function (gray) {\n\treturn [0, 0, 0, gray[0]];\n};\n\nconvert.gray.lab = function (gray) {\n\treturn [gray[0], 0, 0];\n};\n\nconvert.gray.hex = function (gray) {\n\tconst val = Math.round(gray[0] / 100 * 255) & 0xFF;\n\tconst integer = (val << 16) + (val << 8) + val;\n\n\tconst string = integer.toString(16).toUpperCase();\n\treturn '000000'.substring(string.length) + string;\n};\n\nconvert.rgb.gray = function (rgb) {\n\tconst val = (rgb[0] + rgb[1] + rgb[2]) / 3;\n\treturn [val / 255 * 100];\n};\n","const conversions = require('./conversions');\nconst route = require('./route');\n\nconst convert = {};\n\nconst models = Object.keys(conversions);\n\nfunction wrapRaw(fn) {\n\tconst wrappedFn = function (...args) {\n\t\tconst arg0 = args[0];\n\t\tif (arg0 === undefined || arg0 === null) {\n\t\t\treturn arg0;\n\t\t}\n\n\t\tif (arg0.length > 1) {\n\t\t\targs = arg0;\n\t\t}\n\n\t\treturn fn(args);\n\t};\n\n\t// Preserve .conversion property if there is one\n\tif ('conversion' in fn) {\n\t\twrappedFn.conversion = fn.conversion;\n\t}\n\n\treturn wrappedFn;\n}\n\nfunction wrapRounded(fn) {\n\tconst wrappedFn = function (...args) {\n\t\tconst arg0 = args[0];\n\n\t\tif (arg0 === undefined || arg0 === null) {\n\t\t\treturn arg0;\n\t\t}\n\n\t\tif (arg0.length > 1) {\n\t\t\targs = arg0;\n\t\t}\n\n\t\tconst result = fn(args);\n\n\t\t// We're assuming the result is an array here.\n\t\t// see notice in conversions.js; don't use box types\n\t\t// in conversion functions.\n\t\tif (typeof result === 'object') {\n\t\t\tfor (let len = result.length, i = 0; i < len; i++) {\n\t\t\t\tresult[i] = Math.round(result[i]);\n\t\t\t}\n\t\t}\n\n\t\treturn result;\n\t};\n\n\t// Preserve .conversion property if there is one\n\tif ('conversion' in fn) {\n\t\twrappedFn.conversion = fn.conversion;\n\t}\n\n\treturn wrappedFn;\n}\n\nmodels.forEach(fromModel => {\n\tconvert[fromModel] = {};\n\n\tObject.defineProperty(convert[fromModel], 'channels', {value: conversions[fromModel].channels});\n\tObject.defineProperty(convert[fromModel], 'labels', {value: conversions[fromModel].labels});\n\n\tconst routes = route(fromModel);\n\tconst routeModels = Object.keys(routes);\n\n\trouteModels.forEach(toModel => {\n\t\tconst fn = routes[toModel];\n\n\t\tconvert[fromModel][toModel] = wrapRounded(fn);\n\t\tconvert[fromModel][toModel].raw = wrapRaw(fn);\n\t});\n});\n\nmodule.exports = convert;\n","const conversions = require('./conversions');\n\n/*\n\tThis function routes a model to all other models.\n\n\tall functions that are routed have a property `.conversion` attached\n\tto the returned synthetic function. This property is an array\n\tof strings, each with the steps in between the 'from' and 'to'\n\tcolor models (inclusive).\n\n\tconversions that are not possible simply are not included.\n*/\n\nfunction buildGraph() {\n\tconst graph = {};\n\t// https://jsperf.com/object-keys-vs-for-in-with-closure/3\n\tconst models = Object.keys(conversions);\n\n\tfor (let len = models.length, i = 0; i < len; i++) {\n\t\tgraph[models[i]] = {\n\t\t\t// http://jsperf.com/1-vs-infinity\n\t\t\t// micro-opt, but this is simple.\n\t\t\tdistance: -1,\n\t\t\tparent: null\n\t\t};\n\t}\n\n\treturn graph;\n}\n\n// https://en.wikipedia.org/wiki/Breadth-first_search\nfunction deriveBFS(fromModel) {\n\tconst graph = buildGraph();\n\tconst queue = [fromModel]; // Unshift -> queue -> pop\n\n\tgraph[fromModel].distance = 0;\n\n\twhile (queue.length) {\n\t\tconst current = queue.pop();\n\t\tconst adjacents = Object.keys(conversions[current]);\n\n\t\tfor (let len = adjacents.length, i = 0; i < len; i++) {\n\t\t\tconst adjacent = adjacents[i];\n\t\t\tconst node = graph[adjacent];\n\n\t\t\tif (node.distance === -1) {\n\t\t\t\tnode.distance = graph[current].distance + 1;\n\t\t\t\tnode.parent = current;\n\t\t\t\tqueue.unshift(adjacent);\n\t\t\t}\n\t\t}\n\t}\n\n\treturn graph;\n}\n\nfunction link(from, to) {\n\treturn function (args) {\n\t\treturn to(from(args));\n\t};\n}\n\nfunction wrapConversion(toModel, graph) {\n\tconst path = [graph[toModel].parent, toModel];\n\tlet fn = conversions[graph[toModel].parent][toModel];\n\n\tlet cur = graph[toModel].parent;\n\twhile (graph[cur].parent) {\n\t\tpath.unshift(graph[cur].parent);\n\t\tfn = link(conversions[graph[cur].parent][cur], fn);\n\t\tcur = graph[cur].parent;\n\t}\n\n\tfn.conversion = path;\n\treturn fn;\n}\n\nmodule.exports = function (fromModel) {\n\tconst graph = deriveBFS(fromModel);\n\tconst conversion = {};\n\n\tconst models = Object.keys(graph);\n\tfor (let len = models.length, i = 0; i < len; i++) {\n\t\tconst toModel = models[i];\n\t\tconst node = graph[toModel];\n\n\t\tif (node.parent === null) {\n\t\t\t// No possible conversion, or this node is the source model.\n\t\t\tcontinue;\n\t\t}\n\n\t\tconversion[toModel] = wrapConversion(toModel, graph);\n\t}\n\n\treturn conversion;\n};\n\n","'use strict'\r\n\r\nmodule.exports = {\r\n\t\"aliceblue\": [240, 248, 255],\r\n\t\"antiquewhite\": [250, 235, 215],\r\n\t\"aqua\": [0, 255, 255],\r\n\t\"aquamarine\": [127, 255, 212],\r\n\t\"azure\": [240, 255, 255],\r\n\t\"beige\": [245, 245, 220],\r\n\t\"bisque\": [255, 228, 196],\r\n\t\"black\": [0, 0, 0],\r\n\t\"blanchedalmond\": [255, 235, 205],\r\n\t\"blue\": [0, 0, 255],\r\n\t\"blueviolet\": [138, 43, 226],\r\n\t\"brown\": [165, 42, 42],\r\n\t\"burlywood\": [222, 184, 135],\r\n\t\"cadetblue\": [95, 158, 160],\r\n\t\"chartreuse\": [127, 255, 0],\r\n\t\"chocolate\": [210, 105, 30],\r\n\t\"coral\": [255, 127, 80],\r\n\t\"cornflowerblue\": [100, 149, 237],\r\n\t\"cornsilk\": [255, 248, 220],\r\n\t\"crimson\": [220, 20, 60],\r\n\t\"cyan\": [0, 255, 255],\r\n\t\"darkblue\": [0, 0, 139],\r\n\t\"darkcyan\": [0, 139, 139],\r\n\t\"darkgoldenrod\": [184, 134, 11],\r\n\t\"darkgray\": [169, 169, 169],\r\n\t\"darkgreen\": [0, 100, 0],\r\n\t\"darkgrey\": [169, 169, 169],\r\n\t\"darkkhaki\": [189, 183, 107],\r\n\t\"darkmagenta\": [139, 0, 139],\r\n\t\"darkolivegreen\": [85, 107, 47],\r\n\t\"darkorange\": [255, 140, 0],\r\n\t\"darkorchid\": [153, 50, 204],\r\n\t\"darkred\": [139, 0, 0],\r\n\t\"darksalmon\": [233, 150, 122],\r\n\t\"darkseagreen\": [143, 188, 143],\r\n\t\"darkslateblue\": [72, 61, 139],\r\n\t\"darkslategray\": [47, 79, 79],\r\n\t\"darkslategrey\": [47, 79, 79],\r\n\t\"darkturquoise\": [0, 206, 209],\r\n\t\"darkviolet\": [148, 0, 211],\r\n\t\"deeppink\": [255, 20, 147],\r\n\t\"deepskyblue\": [0, 191, 255],\r\n\t\"dimgray\": [105, 105, 105],\r\n\t\"dimgrey\": [105, 105, 105],\r\n\t\"dodgerblue\": [30, 144, 255],\r\n\t\"firebrick\": [178, 34, 34],\r\n\t\"floralwhite\": [255, 250, 240],\r\n\t\"forestgreen\": [34, 139, 34],\r\n\t\"fuchsia\": [255, 0, 255],\r\n\t\"gainsboro\": [220, 220, 220],\r\n\t\"ghostwhite\": [248, 248, 255],\r\n\t\"gold\": [255, 215, 0],\r\n\t\"goldenrod\": [218, 165, 32],\r\n\t\"gray\": [128, 128, 128],\r\n\t\"green\": [0, 128, 0],\r\n\t\"greenyellow\": [173, 255, 47],\r\n\t\"grey\": [128, 128, 128],\r\n\t\"honeydew\": [240, 255, 240],\r\n\t\"hotpink\": [255, 105, 180],\r\n\t\"indianred\": [205, 92, 92],\r\n\t\"indigo\": [75, 0, 130],\r\n\t\"ivory\": [255, 255, 240],\r\n\t\"khaki\": [240, 230, 140],\r\n\t\"lavender\": [230, 230, 250],\r\n\t\"lavenderblush\": [255, 240, 245],\r\n\t\"lawngreen\": [124, 252, 0],\r\n\t\"lemonchiffon\": [255, 250, 205],\r\n\t\"lightblue\": [173, 216, 230],\r\n\t\"lightcoral\": [240, 128, 128],\r\n\t\"lightcyan\": [224, 255, 255],\r\n\t\"lightgoldenrodyellow\": [250, 250, 210],\r\n\t\"lightgray\": [211, 211, 211],\r\n\t\"lightgreen\": [144, 238, 144],\r\n\t\"lightgrey\": [211, 211, 211],\r\n\t\"lightpink\": [255, 182, 193],\r\n\t\"lightsalmon\": [255, 160, 122],\r\n\t\"lightseagreen\": [32, 178, 170],\r\n\t\"lightskyblue\": [135, 206, 250],\r\n\t\"lightslategray\": [119, 136, 153],\r\n\t\"lightslategrey\": [119, 136, 153],\r\n\t\"lightsteelblue\": [176, 196, 222],\r\n\t\"lightyellow\": [255, 255, 224],\r\n\t\"lime\": [0, 255, 0],\r\n\t\"limegreen\": [50, 205, 50],\r\n\t\"linen\": [250, 240, 230],\r\n\t\"magenta\": [255, 0, 255],\r\n\t\"maroon\": [128, 0, 0],\r\n\t\"mediumaquamarine\": [102, 205, 170],\r\n\t\"mediumblue\": [0, 0, 205],\r\n\t\"mediumorchid\": [186, 85, 211],\r\n\t\"mediumpurple\": [147, 112, 219],\r\n\t\"mediumseagreen\": [60, 179, 113],\r\n\t\"mediumslateblue\": [123, 104, 238],\r\n\t\"mediumspringgreen\": [0, 250, 154],\r\n\t\"mediumturquoise\": [72, 209, 204],\r\n\t\"mediumvioletred\": [199, 21, 133],\r\n\t\"midnightblue\": [25, 25, 112],\r\n\t\"mintcream\": [245, 255, 250],\r\n\t\"mistyrose\": [255, 228, 225],\r\n\t\"moccasin\": [255, 228, 181],\r\n\t\"navajowhite\": [255, 222, 173],\r\n\t\"navy\": [0, 0, 128],\r\n\t\"oldlace\": [253, 245, 230],\r\n\t\"olive\": [128, 128, 0],\r\n\t\"olivedrab\": [107, 142, 35],\r\n\t\"orange\": [255, 165, 0],\r\n\t\"orangered\": [255, 69, 0],\r\n\t\"orchid\": [218, 112, 214],\r\n\t\"palegoldenrod\": [238, 232, 170],\r\n\t\"palegreen\": [152, 251, 152],\r\n\t\"paleturquoise\": [175, 238, 238],\r\n\t\"palevioletred\": [219, 112, 147],\r\n\t\"papayawhip\": [255, 239, 213],\r\n\t\"peachpuff\": [255, 218, 185],\r\n\t\"peru\": [205, 133, 63],\r\n\t\"pink\": [255, 192, 203],\r\n\t\"plum\": [221, 160, 221],\r\n\t\"powderblue\": [176, 224, 230],\r\n\t\"purple\": [128, 0, 128],\r\n\t\"rebeccapurple\": [102, 51, 153],\r\n\t\"red\": [255, 0, 0],\r\n\t\"rosybrown\": [188, 143, 143],\r\n\t\"royalblue\": [65, 105, 225],\r\n\t\"saddlebrown\": [139, 69, 19],\r\n\t\"salmon\": [250, 128, 114],\r\n\t\"sandybrown\": [244, 164, 96],\r\n\t\"seagreen\": [46, 139, 87],\r\n\t\"seashell\": [255, 245, 238],\r\n\t\"sienna\": [160, 82, 45],\r\n\t\"silver\": [192, 192, 192],\r\n\t\"skyblue\": [135, 206, 235],\r\n\t\"slateblue\": [106, 90, 205],\r\n\t\"slategray\": [112, 128, 144],\r\n\t\"slategrey\": [112, 128, 144],\r\n\t\"snow\": [255, 250, 250],\r\n\t\"springgreen\": [0, 255, 127],\r\n\t\"steelblue\": [70, 130, 180],\r\n\t\"tan\": [210, 180, 140],\r\n\t\"teal\": [0, 128, 128],\r\n\t\"thistle\": [216, 191, 216],\r\n\t\"tomato\": [255, 99, 71],\r\n\t\"turquoise\": [64, 224, 208],\r\n\t\"violet\": [238, 130, 238],\r\n\t\"wheat\": [245, 222, 179],\r\n\t\"white\": [255, 255, 255],\r\n\t\"whitesmoke\": [245, 245, 245],\r\n\t\"yellow\": [255, 255, 0],\r\n\t\"yellowgreen\": [154, 205, 50]\r\n};\r\n","'use strict';\nmodule.exports = {\n\tstdout: false,\n\tstderr: false\n};\n","const nodes = [ {\n id: 'kibibit',\n image: 'https://kibibit.io/logo-demo/logo.png',\n modalSelector: '#about-kibibit'\n},\n{\n id: 'achievibit',\n image: 'https://github.com/Kibibit/kibibit-assets/raw/master/logo-achi.png',\n modalSelector: '#about-readme',\n parentId: 'kibibit'\n},\n// {\n// \"id\": \"achievibit-chrome-extension\",\n// \"image\": \"https://www.pivotaltracker.com/marketing_assets/integrations/2015/google-chrome-extension-6a26cdad27e6f383174791f8648fbe4cc7627acc06e3870c588217c98d1bde91.png\",\n// \"modalSelector\": \"#about-readme\",\n// parentId: 'kibibit'\n// },\n{\n id: 'kibibit-code-editor',\n image: 'https://kibibit.io/logo-demo/code-editor.png',\n modalSelector: '#about-readme',\n parentId: 'kibibit'\n},\n{\n id: 'cli-lit',\n image: 'https://kibibit.io/kibibit-assets/cli-lit-logo-transparent.png',\n modalSelector: '#about-readme',\n parentId: 'kibibit'\n},\n{\n id: 'kb-components',\n image: 'https://kibibit.io/kibibit-assets/kb-components-logo-transparent.png',\n modalSelector: '#about-readme',\n parentId: 'kibibit'\n},\n{\n id: 'tdd1t',\n image: 'https://kibibit.io/kibibit-assets/4x/tdd1t-avatar-transparent%404x.png',\n modalSelector: '#about-readme',\n parentId: 'kibibit'\n},\n{\n id: 'kb-hologram',\n image: 'https://kibibit.io/kibibit-assets/kb-hologram/logo.svg',\n modalSelector: '#about-readme',\n parentId: 'kibibit'\n},\n{\n id: 'announce-it',\n image: 'https://camo.githubusercontent.com/b80d088e5a18d62cee79035f457e157792b4d99f/687474703a2f2f6b6962696269742e696f2f6b6962696269742d6173736574732f616e6e6f756e63652d69742e737667',\n modalSelector: '#about-readme',\n parentId: 'kibibit'\n},\n{\n id: 'cold-deck',\n image: 'https://kibibit.io/kibibit-assets/cold-deck/logo.svg',\n modalSelector: '#about-readme',\n parentId: 'kibibit'\n},\n{\n id: 'stacker',\n image: 'https://kibibit.io/kibibit-assets/stacker.png',\n modalSelector: '#about-readme',\n parentId: 'kibibit'\n},\n{\n id: 'hass-kibibit-theme',\n image: 'https://kibibit.io/kibibit-assets/hassio-theme/hassio-theme-logo-trans.png',\n modalSelector: '#about-readme',\n parentId: 'kibibit'\n},\n{\n id: 'command-lime',\n image: 'https://kibibit.io/command-lime/logo-clear.png',\n modalSelector: '#about-readme',\n parentId: 'kibibit'\n},\n{\n id: 'dev-tools',\n image: 'https://kibibit.io/dev-tools/logo.png',\n modalSelector: '#about-readme',\n parentId: 'kibibit'\n},\n{\n id: 'configit',\n image: 'https://kibibit.io/configit/logo.png',\n modalSelector: '#about-readme',\n parentId: 'kibibit'\n}\n // {\n // \"id\": \"kb-login-page\",\n // \"image\": \"https://camo.githubusercontent.com/01a1947671f7f77ecdd0096aa8d8f51b6aadaa4a/687474703a2f2f6b6962696269742e696f2f6b6962696269742d6173736574732f6c6f67696e2e737667\",\n // \"modalSelector\": \"#about-readme\",\n // parentId: 'kibibit'\n // },\n // {\n // \"id\": \"kb-profile-page\",\n // \"image\": \"https://camo.githubusercontent.com/7620455813fc7ce4ed7f9017f188f301e371d2fb/687474703a2f2f6b6962696269742e696f2f6b6962696269742d6173736574732f70726f66696c652e737667\",\n // \"modalSelector\": \"#about-readme\",\n // parentId: 'kibibit'\n // }\n];\n\nmodule.exports = {\n nodes,\n edges: getEdgesFromNotes()\n};\n\nfunction getEdgesFromNotes() {\n return nodes\n .map((node, index) => {\n return {\n source: nodes.indexOf(nodes.find((parentNode) => parentNode.id === node.parentId)),\n target: index\n };\n })\n .filter((item) => item.source >= 0);\n}\n","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\tid: moduleId,\n\t\tloaded: false,\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n\t// Flag the module as loaded\n\tmodule.loaded = true;\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","__webpack_require__.nmd = (module) => {\n\tmodule.paths = [];\n\tif (!module.children) module.children = [];\n\treturn module;\n};","/* eslint-disable no-unused-vars */\nimport { webConsolelogo } from '@kibibit/consologo';\nimport treeData from './tree.data';\n\nconsole.log(treeData);\n\nwebConsolelogo('kibibit.io Homepage');\n\nconst body = document.body;\nconst html = document.documentElement;\n\n// nice\n\nconst svg = d3.select('body')\n .append('div')\n // Container class to make it responsive.\n .classed('svg-container', true)\n .append('svg');\n\nredraw();\n\n$('.kb-close').click(function() {\n $(this).closest('.kb-crt').removeClass('active');\n});\n\nwindow.addEventListener('resize', debounce(onResize, 800));\n\nfunction onResize() {\n svg.selectAll('*').remove();\n redraw();\n}\n\nfunction debounce(func, wait, immediate) {\n let timeout;\n\n return function executedFunction(...args) {\n const context = this;\n\n const later = function() {\n timeout = null;\n if (!immediate) func.apply(context, args);\n };\n\n const callNow = immediate && !timeout;\n\n clearTimeout(timeout);\n\n timeout = setTimeout(later, wait);\n\n if (callNow) func.apply(context, args);\n };\n};\n\nfunction redraw() {\n const height = Math.max(body.scrollHeight, body.offsetHeight,\n html.clientHeight, html.scrollHeight, html.offsetHeight);\n\n const width = Math.max(body.scrollWidth, body.offsetWidth,\n html.clientWidth, html.scrollWidth, html.offsetWidth);\n\n svg\n .attr('width', width)\n .attr('height', height);\n\n const simulation = d3.forceSimulation()\n .force('link', d3.forceLink())\n .force('charge', d3.forceManyBody().strength(-5000))\n .force('center', d3.forceCenter(width / 2, height / 2));\n\n const links = svg.selectAll('foo')\n .data(treeData.edges)\n .enter()\n .append('line')\n .style('stroke', '#ccc')\n .style('stroke-width', 2);\n\n const color = d3.scaleOrdinal(d3.schemeCategory20);\n\n const node = svg.selectAll('foo')\n .data(treeData.nodes)\n .enter()\n .append('g')\n .classed('graph-node', true)\n .call(d3.drag()\n .on('start', dragstarted)\n .on('drag', dragged)\n .on('end', dragended));\n\n const nodeCircle = node.append('circle')\n .attr('r', 50)\n .attr('stroke', 'gray')\n .attr('stroke-width', '3px')\n .attr('fill', '#212121');\n\n const nodeImage = node.append('image')\n .attr('xlink:href', (d) => d.image)\n .attr('height', '80')\n .attr('width', '80')\n .attr('x', -40)\n .attr('y', -40)\n .on('click', function(datum) {\n // Determine if current line is visible\n if (datum.modalSelector === '#about-readme') {\n const octokit = new Octokit();\n\n Promise.all([\n octokit.repos.getContents({\n owner: 'kibibit',\n repo: datum.id,\n path: 'README.md'\n }),\n octokit.repos.getContents({\n owner: 'kibibit',\n repo: datum.id,\n path: 'package.json'\n })\n ])\n .then((result) => {\n let [ readme, info ] = result;\n\n try {\n info = JSON.parse(atob(info.data.content));\n } catch (err) {}\n\n let content = '';\n atob(readme.data.content)\n .replace(/^([\\s\\S]*\\)([\\s\\S]*?)(#+\\s?Contributing[\\s\\S]*)?$/m, (full, first, second, third) => {\n content = `${ first }\\n${ third || '' }`;\n return `${ first }\\n${ third || '' }`;\n });\n\n content = content\n .replace('\"logo.png\"', `\"//kibibit.io/${datum.id}/logo.png\"`)\n .replace('\"logo-clear.png\"', `\"//kibibit.io/${datum.id}/logo-clear.png\"`);\n\n showdown.setFlavor('github');\n\n const converter = new showdown.Converter({\n emoji: true,\n tables: true\n });\n converter.setOption('emoji', true);\n const newHtml = converter.makeHtml(content);\n\n const modalElement = $(datum.modalSelector);\n const modalContentElement = modalElement.find('.content');\n const githubLinkElement = modalElement.find('.watch-on-github');\n const homepageLinkElement = modalElement.find('.watch-homepage');\n\n modalContentElement.html(newHtml);\n githubLinkElement.attr('href', `https://github.com/kibibit/${ datum.id }`);\n homepageLinkElement.attr('href', info.homepage || '');\n if (!info.homepage) {\n homepageLinkElement.hide();\n } else {\n homepageLinkElement.show();\n }\n modalElement.addClass('active');\n })\n .catch((err) => console.error(err));\n } else {\n $(datum.modalSelector).addClass('active');\n }\n });\n\n // var texts = node.append(\"text\")\n // .style(\"fill\", \"white\")\n // .attr(\"dx\", 30)\n // .attr(\"dy\", 8)\n // .text(function(d) {\n // return d.id;\n // });\n\n simulation.nodes(treeData.nodes);\n simulation.force('link')\n .links(treeData.edges);\n\n simulation.on('tick', function() {\n links.attr('x1', function(d) {\n return d.source.x;\n })\n .attr('y1', function(d) {\n return d.source.y;\n })\n .attr('x2', function(d) {\n return d.target.x;\n })\n .attr('y2', function(d) {\n return d.target.y;\n });\n\n node.attr('transform', (d) => 'translate(' + d.x + ',' + d.y + ')');\n });\n\n function dragstarted(d) {\n if (!d3.event.active) simulation.alphaTarget(0.3).restart();\n d.fx = d.x;\n d.fy = d.y;\n }\n\n function dragged(d) {\n d.fx = d3.event.x;\n d.fy = d3.event.y;\n }\n\n function dragended(d) {\n if (!d3.event.active) simulation.alphaTarget(0);\n d.fx = null;\n d.fy = null;\n }\n}\n"],"names":[],"sourceRoot":""} -------------------------------------------------------------------------------- /lib/index.js: -------------------------------------------------------------------------------- 1 | /******/ (() => { // webpackBootstrap 2 | /******/ var __webpack_modules__ = ({ 3 | 4 | /***/ "./node_modules/@kibibit/consologo/lib/index.js": 5 | /*!******************************************************!*\ 6 | !*** ./node_modules/@kibibit/consologo/lib/index.js ***! 7 | \******************************************************/ 8 | /***/ (function(__unused_webpack_module, exports, __webpack_require__) { 9 | 10 | "use strict"; 11 | 12 | var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { 13 | if (k2 === undefined) k2 = k; 14 | Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); 15 | }) : (function(o, m, k, k2) { 16 | if (k2 === undefined) k2 = k; 17 | o[k2] = m[k]; 18 | })); 19 | var __exportStar = (this && this.__exportStar) || function(m, exports) { 20 | for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); 21 | }; 22 | Object.defineProperty(exports, "__esModule", ({ value: true })); 23 | __exportStar(__webpack_require__(/*! ./terminal.consologo */ "./node_modules/@kibibit/consologo/lib/terminal.consologo.js"), exports); 24 | __exportStar(__webpack_require__(/*! ./web.consologo */ "./node_modules/@kibibit/consologo/lib/web.consologo.js"), exports); 25 | //# sourceMappingURL=index.js.map 26 | 27 | /***/ }), 28 | 29 | /***/ "./node_modules/@kibibit/consologo/lib/terminal.consologo.js": 30 | /*!*******************************************************************!*\ 31 | !*** ./node_modules/@kibibit/consologo/lib/terminal.consologo.js ***! 32 | \*******************************************************************/ 33 | /***/ (function(__unused_webpack_module, exports, __webpack_require__) { 34 | 35 | "use strict"; 36 | 37 | var __importDefault = (this && this.__importDefault) || function (mod) { 38 | return (mod && mod.__esModule) ? mod : { "default": mod }; 39 | }; 40 | Object.defineProperty(exports, "__esModule", ({ value: true })); 41 | exports.terminalConsoleLogo = void 0; 42 | var kb_error_1 = __importDefault(__webpack_require__(/*! @kibibit/kb-error */ "./node_modules/@kibibit/kb-error/kb-error.js")); 43 | var chalk_1 = __importDefault(__webpack_require__(/*! chalk */ "./node_modules/chalk/source/index.js")); 44 | var log = console.log; 45 | var r = chalk_1.default.red; 46 | var y = chalk_1.default.yellow; 47 | var b = chalk_1.default.blue; 48 | function terminalConsoleLogo(productName, applicationInfo) { 49 | if (!productName) { 50 | throw new kb_error_1.default('must pass a valid product name'); 51 | } 52 | log(chalk_1.default.bgBlack.white(['\n', 53 | ' ⣶⣶⡆⠀⠀⠀⠀⠀⠀', r('⣴⣿⣶'), '⠀⢰⣶⣶⠀⠀⠀⠀⠀⠀⠀⠀', b('⣴⣿⣶'), '⠀⢰⣶⣶⠀⠀⠀⠀⠀⠀⠀⠀', y('⣴⣿⣶'), '⠀⠀⣶⣶⡄⠀⠀⠀ \n', 54 | ' ⣿⣿⡇⠀⠀⠀⠀⠀⠀', r('⠈⠛⠋'), '⠀⢸⣿⣿⠀⠀⠀⠀⠀⠀⠀⠀', b('⠈⠛⠋'), '⠀⢸⣿⣿⠀⠀⠀⠀⠀⠀⠀⠀', y('⠈⠛⠋'), '⠀⠀⣿⣿⡇⠀⠀⠀ \n', 55 | ' ⣿⣿⡇⠀⢀⣴⣿⡟⠁', r('⢸⣿⡇'), '⠀⢸⣿⣿⣾⣿⣿⣿⣷⣄⠀⠀', b('⢸⣿⡇'), '⠀⢸⣿⣿⣾⣿⣿⣿⣷⣄⠀⠀', y('⢸⣿⡇'), '⠀⣿⣿⣿⣿⣿⣿⣿ \n', 56 | ' ⣿⣿⡇⣠⣿⡿⠋⠀⠀', r('⢸⣿⡇'), '⠀⢸⣿⣿⠟⠁⠀⠉⢿⣿⣧⠀', b('⢸⣿⡇'), '⠀⢸⣿⣿⠟⠁⠀⠉⢿⣿⣧⠀', y('⢸⣿⡇'), '⠀⠉⣿⣿⡏⠉⠉⠉ \n', 57 | ' ⣿⣿⣿⣿⣿⣿⡄⠀⠀', r('⢸⣿⡇'), '⠀⢸⣿⣿⠀⠀⠀⠀⢸⣿⣿⠀', b('⢸⣿⡇'), '⠀⢸⣿⣿⠀⠀⠀⠀⢸⣿⣿⠀', y('⢸⣿⡇'), '⠀⠀⣿⣿⡇⠀⠀⠀ \n', 58 | ' ⣿⣿⡿⠋⠙⣿⣿⣄⠀', r('⢸⣿⡇'), '⠀⠀⢻⣿⣷⣤⣤⣴⣿⣿⠃⠀', b('⢸⣿⡇'), '⠀⠀⢻⣿⣷⣤⣤⣴⣿⣿⠃⠀', y('⢸⣿⡇'), '⠀⠀⠹⣿⣷⣦⣤⣤ \n', 59 | ' ⠛⠛⠃⠀⠀⠘⠛⠛⠂', r('⠘⠛⠃'), '⠀⠀⠀⠉⠛⠿⠿⠟⠋⠁⠀⠀', b('⠘⠛⠃'), '⠀⠀⠀⠉⠛⠿⠿⠟⠋⠁⠀⠀', y('⠘⠛⠃'), '⠀⠀⠀⠈⠛⠛⠛⠛ \n' 60 | ].join(''))); 61 | var totalWidth = 50; 62 | var title = " " + productName + " "; 63 | var separator = '-----'; 64 | log(getIndentation(totalWidth, title) + chalk_1.default.bgYellow.black(title)); 65 | log(getIndentation(totalWidth, separator) + chalk_1.default.gray(separator)); 66 | if (applicationInfo) { 67 | if (Array.isArray(applicationInfo)) { 68 | applicationInfo.forEach(function (line) { 69 | log(getIndentation(totalWidth, line) + chalk_1.default.gray(line)); 70 | }); 71 | log('\n'); 72 | } 73 | else { 74 | log(getIndentation(totalWidth, applicationInfo) + chalk_1.default.gray(applicationInfo + "\n")); 75 | } 76 | } 77 | } 78 | exports.terminalConsoleLogo = terminalConsoleLogo; 79 | function getIndentation(totalWidth, str) { 80 | var halfWidth = Math.floor(totalWidth / 2); 81 | var halfChars = Math.floor(str.length / 2); 82 | return ' '.repeat(halfWidth - halfChars); 83 | } 84 | //# sourceMappingURL=terminal.consologo.js.map 85 | 86 | /***/ }), 87 | 88 | /***/ "./node_modules/@kibibit/consologo/lib/web.consologo.js": 89 | /*!**************************************************************!*\ 90 | !*** ./node_modules/@kibibit/consologo/lib/web.consologo.js ***! 91 | \**************************************************************/ 92 | /***/ ((__unused_webpack_module, exports) => { 93 | 94 | "use strict"; 95 | 96 | Object.defineProperty(exports, "__esModule", ({ value: true })); 97 | exports.webConsolelogo = void 0; 98 | function webConsolelogo(productName, applicationInfo) { 99 | var subStyle = "\npadding: .1em 0;\ncolor: rgb(98, 98, 108);\nfont-size: 2em;\nfont-weight: bold;\n".trim(); 100 | var imageStyle = ("\ncolor: transparent;\ndisplay: inline-block;\nbackground-color: transparent;\nbackground-image: url('http://kibibit.io/kibibit-assets/1x/long-white.png');\nbackground-size: cover;\npadding: 0 " + 50 * 3.6 + "px 50px 0;\nborder: none;\nfont-size: 11px;\nline-height: 11px;\nfont-family: monospace;\n").trim(); 101 | console.log("%ckibibit", imageStyle); 102 | console.log("%c" + productName, subStyle); 103 | console.groupCollapsed("application info"); 104 | if (applicationInfo) { 105 | Array.isArray(applicationInfo) 106 | ? console.log(applicationInfo.join("\n") + "\n") 107 | : console.log(applicationInfo + "\n"); 108 | } 109 | console.groupEnd(); 110 | } 111 | exports.webConsolelogo = webConsolelogo; 112 | //# sourceMappingURL=web.consologo.js.map 113 | 114 | /***/ }), 115 | 116 | /***/ "./node_modules/@kibibit/kb-error/kb-error.js": 117 | /*!****************************************************!*\ 118 | !*** ./node_modules/@kibibit/kb-error/kb-error.js ***! 119 | \****************************************************/ 120 | /***/ ((module) => { 121 | 122 | module.exports = class kbError extends Error { 123 | /** 124 | * Creates a new KbError instance 125 | * @example 126 | * const error = new KbError('Error Message'); 127 | * @param { String } message - a more detailed human-readable error message 128 | */ 129 | constructor(message) { 130 | super(message); 131 | this.name = this.constructor.name; 132 | } 133 | }; 134 | 135 | 136 | /***/ }), 137 | 138 | /***/ "./node_modules/ansi-styles/index.js": 139 | /*!*******************************************!*\ 140 | !*** ./node_modules/ansi-styles/index.js ***! 141 | \*******************************************/ 142 | /***/ ((module, __unused_webpack_exports, __webpack_require__) => { 143 | 144 | "use strict"; 145 | /* module decorator */ module = __webpack_require__.nmd(module); 146 | 147 | 148 | const wrapAnsi16 = (fn, offset) => (...args) => { 149 | const code = fn(...args); 150 | return `\u001B[${code + offset}m`; 151 | }; 152 | 153 | const wrapAnsi256 = (fn, offset) => (...args) => { 154 | const code = fn(...args); 155 | return `\u001B[${38 + offset};5;${code}m`; 156 | }; 157 | 158 | const wrapAnsi16m = (fn, offset) => (...args) => { 159 | const rgb = fn(...args); 160 | return `\u001B[${38 + offset};2;${rgb[0]};${rgb[1]};${rgb[2]}m`; 161 | }; 162 | 163 | const ansi2ansi = n => n; 164 | const rgb2rgb = (r, g, b) => [r, g, b]; 165 | 166 | const setLazyProperty = (object, property, get) => { 167 | Object.defineProperty(object, property, { 168 | get: () => { 169 | const value = get(); 170 | 171 | Object.defineProperty(object, property, { 172 | value, 173 | enumerable: true, 174 | configurable: true 175 | }); 176 | 177 | return value; 178 | }, 179 | enumerable: true, 180 | configurable: true 181 | }); 182 | }; 183 | 184 | /** @type {typeof import('color-convert')} */ 185 | let colorConvert; 186 | const makeDynamicStyles = (wrap, targetSpace, identity, isBackground) => { 187 | if (colorConvert === undefined) { 188 | colorConvert = __webpack_require__(/*! color-convert */ "./node_modules/color-convert/index.js"); 189 | } 190 | 191 | const offset = isBackground ? 10 : 0; 192 | const styles = {}; 193 | 194 | for (const [sourceSpace, suite] of Object.entries(colorConvert)) { 195 | const name = sourceSpace === 'ansi16' ? 'ansi' : sourceSpace; 196 | if (sourceSpace === targetSpace) { 197 | styles[name] = wrap(identity, offset); 198 | } else if (typeof suite === 'object') { 199 | styles[name] = wrap(suite[targetSpace], offset); 200 | } 201 | } 202 | 203 | return styles; 204 | }; 205 | 206 | function assembleStyles() { 207 | const codes = new Map(); 208 | const styles = { 209 | modifier: { 210 | reset: [0, 0], 211 | // 21 isn't widely supported and 22 does the same thing 212 | bold: [1, 22], 213 | dim: [2, 22], 214 | italic: [3, 23], 215 | underline: [4, 24], 216 | inverse: [7, 27], 217 | hidden: [8, 28], 218 | strikethrough: [9, 29] 219 | }, 220 | color: { 221 | black: [30, 39], 222 | red: [31, 39], 223 | green: [32, 39], 224 | yellow: [33, 39], 225 | blue: [34, 39], 226 | magenta: [35, 39], 227 | cyan: [36, 39], 228 | white: [37, 39], 229 | 230 | // Bright color 231 | blackBright: [90, 39], 232 | redBright: [91, 39], 233 | greenBright: [92, 39], 234 | yellowBright: [93, 39], 235 | blueBright: [94, 39], 236 | magentaBright: [95, 39], 237 | cyanBright: [96, 39], 238 | whiteBright: [97, 39] 239 | }, 240 | bgColor: { 241 | bgBlack: [40, 49], 242 | bgRed: [41, 49], 243 | bgGreen: [42, 49], 244 | bgYellow: [43, 49], 245 | bgBlue: [44, 49], 246 | bgMagenta: [45, 49], 247 | bgCyan: [46, 49], 248 | bgWhite: [47, 49], 249 | 250 | // Bright color 251 | bgBlackBright: [100, 49], 252 | bgRedBright: [101, 49], 253 | bgGreenBright: [102, 49], 254 | bgYellowBright: [103, 49], 255 | bgBlueBright: [104, 49], 256 | bgMagentaBright: [105, 49], 257 | bgCyanBright: [106, 49], 258 | bgWhiteBright: [107, 49] 259 | } 260 | }; 261 | 262 | // Alias bright black as gray (and grey) 263 | styles.color.gray = styles.color.blackBright; 264 | styles.bgColor.bgGray = styles.bgColor.bgBlackBright; 265 | styles.color.grey = styles.color.blackBright; 266 | styles.bgColor.bgGrey = styles.bgColor.bgBlackBright; 267 | 268 | for (const [groupName, group] of Object.entries(styles)) { 269 | for (const [styleName, style] of Object.entries(group)) { 270 | styles[styleName] = { 271 | open: `\u001B[${style[0]}m`, 272 | close: `\u001B[${style[1]}m` 273 | }; 274 | 275 | group[styleName] = styles[styleName]; 276 | 277 | codes.set(style[0], style[1]); 278 | } 279 | 280 | Object.defineProperty(styles, groupName, { 281 | value: group, 282 | enumerable: false 283 | }); 284 | } 285 | 286 | Object.defineProperty(styles, 'codes', { 287 | value: codes, 288 | enumerable: false 289 | }); 290 | 291 | styles.color.close = '\u001B[39m'; 292 | styles.bgColor.close = '\u001B[49m'; 293 | 294 | setLazyProperty(styles.color, 'ansi', () => makeDynamicStyles(wrapAnsi16, 'ansi16', ansi2ansi, false)); 295 | setLazyProperty(styles.color, 'ansi256', () => makeDynamicStyles(wrapAnsi256, 'ansi256', ansi2ansi, false)); 296 | setLazyProperty(styles.color, 'ansi16m', () => makeDynamicStyles(wrapAnsi16m, 'rgb', rgb2rgb, false)); 297 | setLazyProperty(styles.bgColor, 'ansi', () => makeDynamicStyles(wrapAnsi16, 'ansi16', ansi2ansi, true)); 298 | setLazyProperty(styles.bgColor, 'ansi256', () => makeDynamicStyles(wrapAnsi256, 'ansi256', ansi2ansi, true)); 299 | setLazyProperty(styles.bgColor, 'ansi16m', () => makeDynamicStyles(wrapAnsi16m, 'rgb', rgb2rgb, true)); 300 | 301 | return styles; 302 | } 303 | 304 | // Make the export immutable 305 | Object.defineProperty(module, 'exports', { 306 | enumerable: true, 307 | get: assembleStyles 308 | }); 309 | 310 | 311 | /***/ }), 312 | 313 | /***/ "./node_modules/chalk/source/index.js": 314 | /*!********************************************!*\ 315 | !*** ./node_modules/chalk/source/index.js ***! 316 | \********************************************/ 317 | /***/ ((module, __unused_webpack_exports, __webpack_require__) => { 318 | 319 | "use strict"; 320 | 321 | const ansiStyles = __webpack_require__(/*! ansi-styles */ "./node_modules/ansi-styles/index.js"); 322 | const {stdout: stdoutColor, stderr: stderrColor} = __webpack_require__(/*! supports-color */ "./node_modules/supports-color/browser.js"); 323 | const { 324 | stringReplaceAll, 325 | stringEncaseCRLFWithFirstIndex 326 | } = __webpack_require__(/*! ./util */ "./node_modules/chalk/source/util.js"); 327 | 328 | const {isArray} = Array; 329 | 330 | // `supportsColor.level` → `ansiStyles.color[name]` mapping 331 | const levelMapping = [ 332 | 'ansi', 333 | 'ansi', 334 | 'ansi256', 335 | 'ansi16m' 336 | ]; 337 | 338 | const styles = Object.create(null); 339 | 340 | const applyOptions = (object, options = {}) => { 341 | if (options.level && !(Number.isInteger(options.level) && options.level >= 0 && options.level <= 3)) { 342 | throw new Error('The `level` option should be an integer from 0 to 3'); 343 | } 344 | 345 | // Detect level if not set manually 346 | const colorLevel = stdoutColor ? stdoutColor.level : 0; 347 | object.level = options.level === undefined ? colorLevel : options.level; 348 | }; 349 | 350 | class ChalkClass { 351 | constructor(options) { 352 | // eslint-disable-next-line no-constructor-return 353 | return chalkFactory(options); 354 | } 355 | } 356 | 357 | const chalkFactory = options => { 358 | const chalk = {}; 359 | applyOptions(chalk, options); 360 | 361 | chalk.template = (...arguments_) => chalkTag(chalk.template, ...arguments_); 362 | 363 | Object.setPrototypeOf(chalk, Chalk.prototype); 364 | Object.setPrototypeOf(chalk.template, chalk); 365 | 366 | chalk.template.constructor = () => { 367 | throw new Error('`chalk.constructor()` is deprecated. Use `new chalk.Instance()` instead.'); 368 | }; 369 | 370 | chalk.template.Instance = ChalkClass; 371 | 372 | return chalk.template; 373 | }; 374 | 375 | function Chalk(options) { 376 | return chalkFactory(options); 377 | } 378 | 379 | for (const [styleName, style] of Object.entries(ansiStyles)) { 380 | styles[styleName] = { 381 | get() { 382 | const builder = createBuilder(this, createStyler(style.open, style.close, this._styler), this._isEmpty); 383 | Object.defineProperty(this, styleName, {value: builder}); 384 | return builder; 385 | } 386 | }; 387 | } 388 | 389 | styles.visible = { 390 | get() { 391 | const builder = createBuilder(this, this._styler, true); 392 | Object.defineProperty(this, 'visible', {value: builder}); 393 | return builder; 394 | } 395 | }; 396 | 397 | const usedModels = ['rgb', 'hex', 'keyword', 'hsl', 'hsv', 'hwb', 'ansi', 'ansi256']; 398 | 399 | for (const model of usedModels) { 400 | styles[model] = { 401 | get() { 402 | const {level} = this; 403 | return function (...arguments_) { 404 | const styler = createStyler(ansiStyles.color[levelMapping[level]][model](...arguments_), ansiStyles.color.close, this._styler); 405 | return createBuilder(this, styler, this._isEmpty); 406 | }; 407 | } 408 | }; 409 | } 410 | 411 | for (const model of usedModels) { 412 | const bgModel = 'bg' + model[0].toUpperCase() + model.slice(1); 413 | styles[bgModel] = { 414 | get() { 415 | const {level} = this; 416 | return function (...arguments_) { 417 | const styler = createStyler(ansiStyles.bgColor[levelMapping[level]][model](...arguments_), ansiStyles.bgColor.close, this._styler); 418 | return createBuilder(this, styler, this._isEmpty); 419 | }; 420 | } 421 | }; 422 | } 423 | 424 | const proto = Object.defineProperties(() => {}, { 425 | ...styles, 426 | level: { 427 | enumerable: true, 428 | get() { 429 | return this._generator.level; 430 | }, 431 | set(level) { 432 | this._generator.level = level; 433 | } 434 | } 435 | }); 436 | 437 | const createStyler = (open, close, parent) => { 438 | let openAll; 439 | let closeAll; 440 | if (parent === undefined) { 441 | openAll = open; 442 | closeAll = close; 443 | } else { 444 | openAll = parent.openAll + open; 445 | closeAll = close + parent.closeAll; 446 | } 447 | 448 | return { 449 | open, 450 | close, 451 | openAll, 452 | closeAll, 453 | parent 454 | }; 455 | }; 456 | 457 | const createBuilder = (self, _styler, _isEmpty) => { 458 | const builder = (...arguments_) => { 459 | if (isArray(arguments_[0]) && isArray(arguments_[0].raw)) { 460 | // Called as a template literal, for example: chalk.red`2 + 3 = {bold ${2+3}}` 461 | return applyStyle(builder, chalkTag(builder, ...arguments_)); 462 | } 463 | 464 | // Single argument is hot path, implicit coercion is faster than anything 465 | // eslint-disable-next-line no-implicit-coercion 466 | return applyStyle(builder, (arguments_.length === 1) ? ('' + arguments_[0]) : arguments_.join(' ')); 467 | }; 468 | 469 | // We alter the prototype because we must return a function, but there is 470 | // no way to create a function with a different prototype 471 | Object.setPrototypeOf(builder, proto); 472 | 473 | builder._generator = self; 474 | builder._styler = _styler; 475 | builder._isEmpty = _isEmpty; 476 | 477 | return builder; 478 | }; 479 | 480 | const applyStyle = (self, string) => { 481 | if (self.level <= 0 || !string) { 482 | return self._isEmpty ? '' : string; 483 | } 484 | 485 | let styler = self._styler; 486 | 487 | if (styler === undefined) { 488 | return string; 489 | } 490 | 491 | const {openAll, closeAll} = styler; 492 | if (string.indexOf('\u001B') !== -1) { 493 | while (styler !== undefined) { 494 | // Replace any instances already present with a re-opening code 495 | // otherwise only the part of the string until said closing code 496 | // will be colored, and the rest will simply be 'plain'. 497 | string = stringReplaceAll(string, styler.close, styler.open); 498 | 499 | styler = styler.parent; 500 | } 501 | } 502 | 503 | // We can move both next actions out of loop, because remaining actions in loop won't have 504 | // any/visible effect on parts we add here. Close the styling before a linebreak and reopen 505 | // after next line to fix a bleed issue on macOS: https://github.com/chalk/chalk/pull/92 506 | const lfIndex = string.indexOf('\n'); 507 | if (lfIndex !== -1) { 508 | string = stringEncaseCRLFWithFirstIndex(string, closeAll, openAll, lfIndex); 509 | } 510 | 511 | return openAll + string + closeAll; 512 | }; 513 | 514 | let template; 515 | const chalkTag = (chalk, ...strings) => { 516 | const [firstString] = strings; 517 | 518 | if (!isArray(firstString) || !isArray(firstString.raw)) { 519 | // If chalk() was called by itself or with a string, 520 | // return the string itself as a string. 521 | return strings.join(' '); 522 | } 523 | 524 | const arguments_ = strings.slice(1); 525 | const parts = [firstString.raw[0]]; 526 | 527 | for (let i = 1; i < firstString.length; i++) { 528 | parts.push( 529 | String(arguments_[i - 1]).replace(/[{}\\]/g, '\\$&'), 530 | String(firstString.raw[i]) 531 | ); 532 | } 533 | 534 | if (template === undefined) { 535 | template = __webpack_require__(/*! ./templates */ "./node_modules/chalk/source/templates.js"); 536 | } 537 | 538 | return template(chalk, parts.join('')); 539 | }; 540 | 541 | Object.defineProperties(Chalk.prototype, styles); 542 | 543 | const chalk = Chalk(); // eslint-disable-line new-cap 544 | chalk.supportsColor = stdoutColor; 545 | chalk.stderr = Chalk({level: stderrColor ? stderrColor.level : 0}); // eslint-disable-line new-cap 546 | chalk.stderr.supportsColor = stderrColor; 547 | 548 | module.exports = chalk; 549 | 550 | 551 | /***/ }), 552 | 553 | /***/ "./node_modules/chalk/source/templates.js": 554 | /*!************************************************!*\ 555 | !*** ./node_modules/chalk/source/templates.js ***! 556 | \************************************************/ 557 | /***/ ((module) => { 558 | 559 | "use strict"; 560 | 561 | const TEMPLATE_REGEX = /(?:\\(u(?:[a-f\d]{4}|\{[a-f\d]{1,6}\})|x[a-f\d]{2}|.))|(?:\{(~)?(\w+(?:\([^)]*\))?(?:\.\w+(?:\([^)]*\))?)*)(?:[ \t]|(?=\r?\n)))|(\})|((?:.|[\r\n\f])+?)/gi; 562 | const STYLE_REGEX = /(?:^|\.)(\w+)(?:\(([^)]*)\))?/g; 563 | const STRING_REGEX = /^(['"])((?:\\.|(?!\1)[^\\])*)\1$/; 564 | const ESCAPE_REGEX = /\\(u(?:[a-f\d]{4}|{[a-f\d]{1,6}})|x[a-f\d]{2}|.)|([^\\])/gi; 565 | 566 | const ESCAPES = new Map([ 567 | ['n', '\n'], 568 | ['r', '\r'], 569 | ['t', '\t'], 570 | ['b', '\b'], 571 | ['f', '\f'], 572 | ['v', '\v'], 573 | ['0', '\0'], 574 | ['\\', '\\'], 575 | ['e', '\u001B'], 576 | ['a', '\u0007'] 577 | ]); 578 | 579 | function unescape(c) { 580 | const u = c[0] === 'u'; 581 | const bracket = c[1] === '{'; 582 | 583 | if ((u && !bracket && c.length === 5) || (c[0] === 'x' && c.length === 3)) { 584 | return String.fromCharCode(parseInt(c.slice(1), 16)); 585 | } 586 | 587 | if (u && bracket) { 588 | return String.fromCodePoint(parseInt(c.slice(2, -1), 16)); 589 | } 590 | 591 | return ESCAPES.get(c) || c; 592 | } 593 | 594 | function parseArguments(name, arguments_) { 595 | const results = []; 596 | const chunks = arguments_.trim().split(/\s*,\s*/g); 597 | let matches; 598 | 599 | for (const chunk of chunks) { 600 | const number = Number(chunk); 601 | if (!Number.isNaN(number)) { 602 | results.push(number); 603 | } else if ((matches = chunk.match(STRING_REGEX))) { 604 | results.push(matches[2].replace(ESCAPE_REGEX, (m, escape, character) => escape ? unescape(escape) : character)); 605 | } else { 606 | throw new Error(`Invalid Chalk template style argument: ${chunk} (in style '${name}')`); 607 | } 608 | } 609 | 610 | return results; 611 | } 612 | 613 | function parseStyle(style) { 614 | STYLE_REGEX.lastIndex = 0; 615 | 616 | const results = []; 617 | let matches; 618 | 619 | while ((matches = STYLE_REGEX.exec(style)) !== null) { 620 | const name = matches[1]; 621 | 622 | if (matches[2]) { 623 | const args = parseArguments(name, matches[2]); 624 | results.push([name].concat(args)); 625 | } else { 626 | results.push([name]); 627 | } 628 | } 629 | 630 | return results; 631 | } 632 | 633 | function buildStyle(chalk, styles) { 634 | const enabled = {}; 635 | 636 | for (const layer of styles) { 637 | for (const style of layer.styles) { 638 | enabled[style[0]] = layer.inverse ? null : style.slice(1); 639 | } 640 | } 641 | 642 | let current = chalk; 643 | for (const [styleName, styles] of Object.entries(enabled)) { 644 | if (!Array.isArray(styles)) { 645 | continue; 646 | } 647 | 648 | if (!(styleName in current)) { 649 | throw new Error(`Unknown Chalk style: ${styleName}`); 650 | } 651 | 652 | current = styles.length > 0 ? current[styleName](...styles) : current[styleName]; 653 | } 654 | 655 | return current; 656 | } 657 | 658 | module.exports = (chalk, temporary) => { 659 | const styles = []; 660 | const chunks = []; 661 | let chunk = []; 662 | 663 | // eslint-disable-next-line max-params 664 | temporary.replace(TEMPLATE_REGEX, (m, escapeCharacter, inverse, style, close, character) => { 665 | if (escapeCharacter) { 666 | chunk.push(unescape(escapeCharacter)); 667 | } else if (style) { 668 | const string = chunk.join(''); 669 | chunk = []; 670 | chunks.push(styles.length === 0 ? string : buildStyle(chalk, styles)(string)); 671 | styles.push({inverse, styles: parseStyle(style)}); 672 | } else if (close) { 673 | if (styles.length === 0) { 674 | throw new Error('Found extraneous } in Chalk template literal'); 675 | } 676 | 677 | chunks.push(buildStyle(chalk, styles)(chunk.join(''))); 678 | chunk = []; 679 | styles.pop(); 680 | } else { 681 | chunk.push(character); 682 | } 683 | }); 684 | 685 | chunks.push(chunk.join('')); 686 | 687 | if (styles.length > 0) { 688 | const errMessage = `Chalk template literal is missing ${styles.length} closing bracket${styles.length === 1 ? '' : 's'} (\`}\`)`; 689 | throw new Error(errMessage); 690 | } 691 | 692 | return chunks.join(''); 693 | }; 694 | 695 | 696 | /***/ }), 697 | 698 | /***/ "./node_modules/chalk/source/util.js": 699 | /*!*******************************************!*\ 700 | !*** ./node_modules/chalk/source/util.js ***! 701 | \*******************************************/ 702 | /***/ ((module) => { 703 | 704 | "use strict"; 705 | 706 | 707 | const stringReplaceAll = (string, substring, replacer) => { 708 | let index = string.indexOf(substring); 709 | if (index === -1) { 710 | return string; 711 | } 712 | 713 | const substringLength = substring.length; 714 | let endIndex = 0; 715 | let returnValue = ''; 716 | do { 717 | returnValue += string.substr(endIndex, index - endIndex) + substring + replacer; 718 | endIndex = index + substringLength; 719 | index = string.indexOf(substring, endIndex); 720 | } while (index !== -1); 721 | 722 | returnValue += string.substr(endIndex); 723 | return returnValue; 724 | }; 725 | 726 | const stringEncaseCRLFWithFirstIndex = (string, prefix, postfix, index) => { 727 | let endIndex = 0; 728 | let returnValue = ''; 729 | do { 730 | const gotCR = string[index - 1] === '\r'; 731 | returnValue += string.substr(endIndex, (gotCR ? index - 1 : index) - endIndex) + prefix + (gotCR ? '\r\n' : '\n') + postfix; 732 | endIndex = index + 1; 733 | index = string.indexOf('\n', endIndex); 734 | } while (index !== -1); 735 | 736 | returnValue += string.substr(endIndex); 737 | return returnValue; 738 | }; 739 | 740 | module.exports = { 741 | stringReplaceAll, 742 | stringEncaseCRLFWithFirstIndex 743 | }; 744 | 745 | 746 | /***/ }), 747 | 748 | /***/ "./node_modules/color-convert/conversions.js": 749 | /*!***************************************************!*\ 750 | !*** ./node_modules/color-convert/conversions.js ***! 751 | \***************************************************/ 752 | /***/ ((module, __unused_webpack_exports, __webpack_require__) => { 753 | 754 | /* MIT license */ 755 | /* eslint-disable no-mixed-operators */ 756 | const cssKeywords = __webpack_require__(/*! color-name */ "./node_modules/color-name/index.js"); 757 | 758 | // NOTE: conversions should only return primitive values (i.e. arrays, or 759 | // values that give correct `typeof` results). 760 | // do not use box values types (i.e. Number(), String(), etc.) 761 | 762 | const reverseKeywords = {}; 763 | for (const key of Object.keys(cssKeywords)) { 764 | reverseKeywords[cssKeywords[key]] = key; 765 | } 766 | 767 | const convert = { 768 | rgb: {channels: 3, labels: 'rgb'}, 769 | hsl: {channels: 3, labels: 'hsl'}, 770 | hsv: {channels: 3, labels: 'hsv'}, 771 | hwb: {channels: 3, labels: 'hwb'}, 772 | cmyk: {channels: 4, labels: 'cmyk'}, 773 | xyz: {channels: 3, labels: 'xyz'}, 774 | lab: {channels: 3, labels: 'lab'}, 775 | lch: {channels: 3, labels: 'lch'}, 776 | hex: {channels: 1, labels: ['hex']}, 777 | keyword: {channels: 1, labels: ['keyword']}, 778 | ansi16: {channels: 1, labels: ['ansi16']}, 779 | ansi256: {channels: 1, labels: ['ansi256']}, 780 | hcg: {channels: 3, labels: ['h', 'c', 'g']}, 781 | apple: {channels: 3, labels: ['r16', 'g16', 'b16']}, 782 | gray: {channels: 1, labels: ['gray']} 783 | }; 784 | 785 | module.exports = convert; 786 | 787 | // Hide .channels and .labels properties 788 | for (const model of Object.keys(convert)) { 789 | if (!('channels' in convert[model])) { 790 | throw new Error('missing channels property: ' + model); 791 | } 792 | 793 | if (!('labels' in convert[model])) { 794 | throw new Error('missing channel labels property: ' + model); 795 | } 796 | 797 | if (convert[model].labels.length !== convert[model].channels) { 798 | throw new Error('channel and label counts mismatch: ' + model); 799 | } 800 | 801 | const {channels, labels} = convert[model]; 802 | delete convert[model].channels; 803 | delete convert[model].labels; 804 | Object.defineProperty(convert[model], 'channels', {value: channels}); 805 | Object.defineProperty(convert[model], 'labels', {value: labels}); 806 | } 807 | 808 | convert.rgb.hsl = function (rgb) { 809 | const r = rgb[0] / 255; 810 | const g = rgb[1] / 255; 811 | const b = rgb[2] / 255; 812 | const min = Math.min(r, g, b); 813 | const max = Math.max(r, g, b); 814 | const delta = max - min; 815 | let h; 816 | let s; 817 | 818 | if (max === min) { 819 | h = 0; 820 | } else if (r === max) { 821 | h = (g - b) / delta; 822 | } else if (g === max) { 823 | h = 2 + (b - r) / delta; 824 | } else if (b === max) { 825 | h = 4 + (r - g) / delta; 826 | } 827 | 828 | h = Math.min(h * 60, 360); 829 | 830 | if (h < 0) { 831 | h += 360; 832 | } 833 | 834 | const l = (min + max) / 2; 835 | 836 | if (max === min) { 837 | s = 0; 838 | } else if (l <= 0.5) { 839 | s = delta / (max + min); 840 | } else { 841 | s = delta / (2 - max - min); 842 | } 843 | 844 | return [h, s * 100, l * 100]; 845 | }; 846 | 847 | convert.rgb.hsv = function (rgb) { 848 | let rdif; 849 | let gdif; 850 | let bdif; 851 | let h; 852 | let s; 853 | 854 | const r = rgb[0] / 255; 855 | const g = rgb[1] / 255; 856 | const b = rgb[2] / 255; 857 | const v = Math.max(r, g, b); 858 | const diff = v - Math.min(r, g, b); 859 | const diffc = function (c) { 860 | return (v - c) / 6 / diff + 1 / 2; 861 | }; 862 | 863 | if (diff === 0) { 864 | h = 0; 865 | s = 0; 866 | } else { 867 | s = diff / v; 868 | rdif = diffc(r); 869 | gdif = diffc(g); 870 | bdif = diffc(b); 871 | 872 | if (r === v) { 873 | h = bdif - gdif; 874 | } else if (g === v) { 875 | h = (1 / 3) + rdif - bdif; 876 | } else if (b === v) { 877 | h = (2 / 3) + gdif - rdif; 878 | } 879 | 880 | if (h < 0) { 881 | h += 1; 882 | } else if (h > 1) { 883 | h -= 1; 884 | } 885 | } 886 | 887 | return [ 888 | h * 360, 889 | s * 100, 890 | v * 100 891 | ]; 892 | }; 893 | 894 | convert.rgb.hwb = function (rgb) { 895 | const r = rgb[0]; 896 | const g = rgb[1]; 897 | let b = rgb[2]; 898 | const h = convert.rgb.hsl(rgb)[0]; 899 | const w = 1 / 255 * Math.min(r, Math.min(g, b)); 900 | 901 | b = 1 - 1 / 255 * Math.max(r, Math.max(g, b)); 902 | 903 | return [h, w * 100, b * 100]; 904 | }; 905 | 906 | convert.rgb.cmyk = function (rgb) { 907 | const r = rgb[0] / 255; 908 | const g = rgb[1] / 255; 909 | const b = rgb[2] / 255; 910 | 911 | const k = Math.min(1 - r, 1 - g, 1 - b); 912 | const c = (1 - r - k) / (1 - k) || 0; 913 | const m = (1 - g - k) / (1 - k) || 0; 914 | const y = (1 - b - k) / (1 - k) || 0; 915 | 916 | return [c * 100, m * 100, y * 100, k * 100]; 917 | }; 918 | 919 | function comparativeDistance(x, y) { 920 | /* 921 | See https://en.m.wikipedia.org/wiki/Euclidean_distance#Squared_Euclidean_distance 922 | */ 923 | return ( 924 | ((x[0] - y[0]) ** 2) + 925 | ((x[1] - y[1]) ** 2) + 926 | ((x[2] - y[2]) ** 2) 927 | ); 928 | } 929 | 930 | convert.rgb.keyword = function (rgb) { 931 | const reversed = reverseKeywords[rgb]; 932 | if (reversed) { 933 | return reversed; 934 | } 935 | 936 | let currentClosestDistance = Infinity; 937 | let currentClosestKeyword; 938 | 939 | for (const keyword of Object.keys(cssKeywords)) { 940 | const value = cssKeywords[keyword]; 941 | 942 | // Compute comparative distance 943 | const distance = comparativeDistance(rgb, value); 944 | 945 | // Check if its less, if so set as closest 946 | if (distance < currentClosestDistance) { 947 | currentClosestDistance = distance; 948 | currentClosestKeyword = keyword; 949 | } 950 | } 951 | 952 | return currentClosestKeyword; 953 | }; 954 | 955 | convert.keyword.rgb = function (keyword) { 956 | return cssKeywords[keyword]; 957 | }; 958 | 959 | convert.rgb.xyz = function (rgb) { 960 | let r = rgb[0] / 255; 961 | let g = rgb[1] / 255; 962 | let b = rgb[2] / 255; 963 | 964 | // Assume sRGB 965 | r = r > 0.04045 ? (((r + 0.055) / 1.055) ** 2.4) : (r / 12.92); 966 | g = g > 0.04045 ? (((g + 0.055) / 1.055) ** 2.4) : (g / 12.92); 967 | b = b > 0.04045 ? (((b + 0.055) / 1.055) ** 2.4) : (b / 12.92); 968 | 969 | const x = (r * 0.4124) + (g * 0.3576) + (b * 0.1805); 970 | const y = (r * 0.2126) + (g * 0.7152) + (b * 0.0722); 971 | const z = (r * 0.0193) + (g * 0.1192) + (b * 0.9505); 972 | 973 | return [x * 100, y * 100, z * 100]; 974 | }; 975 | 976 | convert.rgb.lab = function (rgb) { 977 | const xyz = convert.rgb.xyz(rgb); 978 | let x = xyz[0]; 979 | let y = xyz[1]; 980 | let z = xyz[2]; 981 | 982 | x /= 95.047; 983 | y /= 100; 984 | z /= 108.883; 985 | 986 | x = x > 0.008856 ? (x ** (1 / 3)) : (7.787 * x) + (16 / 116); 987 | y = y > 0.008856 ? (y ** (1 / 3)) : (7.787 * y) + (16 / 116); 988 | z = z > 0.008856 ? (z ** (1 / 3)) : (7.787 * z) + (16 / 116); 989 | 990 | const l = (116 * y) - 16; 991 | const a = 500 * (x - y); 992 | const b = 200 * (y - z); 993 | 994 | return [l, a, b]; 995 | }; 996 | 997 | convert.hsl.rgb = function (hsl) { 998 | const h = hsl[0] / 360; 999 | const s = hsl[1] / 100; 1000 | const l = hsl[2] / 100; 1001 | let t2; 1002 | let t3; 1003 | let val; 1004 | 1005 | if (s === 0) { 1006 | val = l * 255; 1007 | return [val, val, val]; 1008 | } 1009 | 1010 | if (l < 0.5) { 1011 | t2 = l * (1 + s); 1012 | } else { 1013 | t2 = l + s - l * s; 1014 | } 1015 | 1016 | const t1 = 2 * l - t2; 1017 | 1018 | const rgb = [0, 0, 0]; 1019 | for (let i = 0; i < 3; i++) { 1020 | t3 = h + 1 / 3 * -(i - 1); 1021 | if (t3 < 0) { 1022 | t3++; 1023 | } 1024 | 1025 | if (t3 > 1) { 1026 | t3--; 1027 | } 1028 | 1029 | if (6 * t3 < 1) { 1030 | val = t1 + (t2 - t1) * 6 * t3; 1031 | } else if (2 * t3 < 1) { 1032 | val = t2; 1033 | } else if (3 * t3 < 2) { 1034 | val = t1 + (t2 - t1) * (2 / 3 - t3) * 6; 1035 | } else { 1036 | val = t1; 1037 | } 1038 | 1039 | rgb[i] = val * 255; 1040 | } 1041 | 1042 | return rgb; 1043 | }; 1044 | 1045 | convert.hsl.hsv = function (hsl) { 1046 | const h = hsl[0]; 1047 | let s = hsl[1] / 100; 1048 | let l = hsl[2] / 100; 1049 | let smin = s; 1050 | const lmin = Math.max(l, 0.01); 1051 | 1052 | l *= 2; 1053 | s *= (l <= 1) ? l : 2 - l; 1054 | smin *= lmin <= 1 ? lmin : 2 - lmin; 1055 | const v = (l + s) / 2; 1056 | const sv = l === 0 ? (2 * smin) / (lmin + smin) : (2 * s) / (l + s); 1057 | 1058 | return [h, sv * 100, v * 100]; 1059 | }; 1060 | 1061 | convert.hsv.rgb = function (hsv) { 1062 | const h = hsv[0] / 60; 1063 | const s = hsv[1] / 100; 1064 | let v = hsv[2] / 100; 1065 | const hi = Math.floor(h) % 6; 1066 | 1067 | const f = h - Math.floor(h); 1068 | const p = 255 * v * (1 - s); 1069 | const q = 255 * v * (1 - (s * f)); 1070 | const t = 255 * v * (1 - (s * (1 - f))); 1071 | v *= 255; 1072 | 1073 | switch (hi) { 1074 | case 0: 1075 | return [v, t, p]; 1076 | case 1: 1077 | return [q, v, p]; 1078 | case 2: 1079 | return [p, v, t]; 1080 | case 3: 1081 | return [p, q, v]; 1082 | case 4: 1083 | return [t, p, v]; 1084 | case 5: 1085 | return [v, p, q]; 1086 | } 1087 | }; 1088 | 1089 | convert.hsv.hsl = function (hsv) { 1090 | const h = hsv[0]; 1091 | const s = hsv[1] / 100; 1092 | const v = hsv[2] / 100; 1093 | const vmin = Math.max(v, 0.01); 1094 | let sl; 1095 | let l; 1096 | 1097 | l = (2 - s) * v; 1098 | const lmin = (2 - s) * vmin; 1099 | sl = s * vmin; 1100 | sl /= (lmin <= 1) ? lmin : 2 - lmin; 1101 | sl = sl || 0; 1102 | l /= 2; 1103 | 1104 | return [h, sl * 100, l * 100]; 1105 | }; 1106 | 1107 | // http://dev.w3.org/csswg/css-color/#hwb-to-rgb 1108 | convert.hwb.rgb = function (hwb) { 1109 | const h = hwb[0] / 360; 1110 | let wh = hwb[1] / 100; 1111 | let bl = hwb[2] / 100; 1112 | const ratio = wh + bl; 1113 | let f; 1114 | 1115 | // Wh + bl cant be > 1 1116 | if (ratio > 1) { 1117 | wh /= ratio; 1118 | bl /= ratio; 1119 | } 1120 | 1121 | const i = Math.floor(6 * h); 1122 | const v = 1 - bl; 1123 | f = 6 * h - i; 1124 | 1125 | if ((i & 0x01) !== 0) { 1126 | f = 1 - f; 1127 | } 1128 | 1129 | const n = wh + f * (v - wh); // Linear interpolation 1130 | 1131 | let r; 1132 | let g; 1133 | let b; 1134 | /* eslint-disable max-statements-per-line,no-multi-spaces */ 1135 | switch (i) { 1136 | default: 1137 | case 6: 1138 | case 0: r = v; g = n; b = wh; break; 1139 | case 1: r = n; g = v; b = wh; break; 1140 | case 2: r = wh; g = v; b = n; break; 1141 | case 3: r = wh; g = n; b = v; break; 1142 | case 4: r = n; g = wh; b = v; break; 1143 | case 5: r = v; g = wh; b = n; break; 1144 | } 1145 | /* eslint-enable max-statements-per-line,no-multi-spaces */ 1146 | 1147 | return [r * 255, g * 255, b * 255]; 1148 | }; 1149 | 1150 | convert.cmyk.rgb = function (cmyk) { 1151 | const c = cmyk[0] / 100; 1152 | const m = cmyk[1] / 100; 1153 | const y = cmyk[2] / 100; 1154 | const k = cmyk[3] / 100; 1155 | 1156 | const r = 1 - Math.min(1, c * (1 - k) + k); 1157 | const g = 1 - Math.min(1, m * (1 - k) + k); 1158 | const b = 1 - Math.min(1, y * (1 - k) + k); 1159 | 1160 | return [r * 255, g * 255, b * 255]; 1161 | }; 1162 | 1163 | convert.xyz.rgb = function (xyz) { 1164 | const x = xyz[0] / 100; 1165 | const y = xyz[1] / 100; 1166 | const z = xyz[2] / 100; 1167 | let r; 1168 | let g; 1169 | let b; 1170 | 1171 | r = (x * 3.2406) + (y * -1.5372) + (z * -0.4986); 1172 | g = (x * -0.9689) + (y * 1.8758) + (z * 0.0415); 1173 | b = (x * 0.0557) + (y * -0.2040) + (z * 1.0570); 1174 | 1175 | // Assume sRGB 1176 | r = r > 0.0031308 1177 | ? ((1.055 * (r ** (1.0 / 2.4))) - 0.055) 1178 | : r * 12.92; 1179 | 1180 | g = g > 0.0031308 1181 | ? ((1.055 * (g ** (1.0 / 2.4))) - 0.055) 1182 | : g * 12.92; 1183 | 1184 | b = b > 0.0031308 1185 | ? ((1.055 * (b ** (1.0 / 2.4))) - 0.055) 1186 | : b * 12.92; 1187 | 1188 | r = Math.min(Math.max(0, r), 1); 1189 | g = Math.min(Math.max(0, g), 1); 1190 | b = Math.min(Math.max(0, b), 1); 1191 | 1192 | return [r * 255, g * 255, b * 255]; 1193 | }; 1194 | 1195 | convert.xyz.lab = function (xyz) { 1196 | let x = xyz[0]; 1197 | let y = xyz[1]; 1198 | let z = xyz[2]; 1199 | 1200 | x /= 95.047; 1201 | y /= 100; 1202 | z /= 108.883; 1203 | 1204 | x = x > 0.008856 ? (x ** (1 / 3)) : (7.787 * x) + (16 / 116); 1205 | y = y > 0.008856 ? (y ** (1 / 3)) : (7.787 * y) + (16 / 116); 1206 | z = z > 0.008856 ? (z ** (1 / 3)) : (7.787 * z) + (16 / 116); 1207 | 1208 | const l = (116 * y) - 16; 1209 | const a = 500 * (x - y); 1210 | const b = 200 * (y - z); 1211 | 1212 | return [l, a, b]; 1213 | }; 1214 | 1215 | convert.lab.xyz = function (lab) { 1216 | const l = lab[0]; 1217 | const a = lab[1]; 1218 | const b = lab[2]; 1219 | let x; 1220 | let y; 1221 | let z; 1222 | 1223 | y = (l + 16) / 116; 1224 | x = a / 500 + y; 1225 | z = y - b / 200; 1226 | 1227 | const y2 = y ** 3; 1228 | const x2 = x ** 3; 1229 | const z2 = z ** 3; 1230 | y = y2 > 0.008856 ? y2 : (y - 16 / 116) / 7.787; 1231 | x = x2 > 0.008856 ? x2 : (x - 16 / 116) / 7.787; 1232 | z = z2 > 0.008856 ? z2 : (z - 16 / 116) / 7.787; 1233 | 1234 | x *= 95.047; 1235 | y *= 100; 1236 | z *= 108.883; 1237 | 1238 | return [x, y, z]; 1239 | }; 1240 | 1241 | convert.lab.lch = function (lab) { 1242 | const l = lab[0]; 1243 | const a = lab[1]; 1244 | const b = lab[2]; 1245 | let h; 1246 | 1247 | const hr = Math.atan2(b, a); 1248 | h = hr * 360 / 2 / Math.PI; 1249 | 1250 | if (h < 0) { 1251 | h += 360; 1252 | } 1253 | 1254 | const c = Math.sqrt(a * a + b * b); 1255 | 1256 | return [l, c, h]; 1257 | }; 1258 | 1259 | convert.lch.lab = function (lch) { 1260 | const l = lch[0]; 1261 | const c = lch[1]; 1262 | const h = lch[2]; 1263 | 1264 | const hr = h / 360 * 2 * Math.PI; 1265 | const a = c * Math.cos(hr); 1266 | const b = c * Math.sin(hr); 1267 | 1268 | return [l, a, b]; 1269 | }; 1270 | 1271 | convert.rgb.ansi16 = function (args, saturation = null) { 1272 | const [r, g, b] = args; 1273 | let value = saturation === null ? convert.rgb.hsv(args)[2] : saturation; // Hsv -> ansi16 optimization 1274 | 1275 | value = Math.round(value / 50); 1276 | 1277 | if (value === 0) { 1278 | return 30; 1279 | } 1280 | 1281 | let ansi = 30 1282 | + ((Math.round(b / 255) << 2) 1283 | | (Math.round(g / 255) << 1) 1284 | | Math.round(r / 255)); 1285 | 1286 | if (value === 2) { 1287 | ansi += 60; 1288 | } 1289 | 1290 | return ansi; 1291 | }; 1292 | 1293 | convert.hsv.ansi16 = function (args) { 1294 | // Optimization here; we already know the value and don't need to get 1295 | // it converted for us. 1296 | return convert.rgb.ansi16(convert.hsv.rgb(args), args[2]); 1297 | }; 1298 | 1299 | convert.rgb.ansi256 = function (args) { 1300 | const r = args[0]; 1301 | const g = args[1]; 1302 | const b = args[2]; 1303 | 1304 | // We use the extended greyscale palette here, with the exception of 1305 | // black and white. normal palette only has 4 greyscale shades. 1306 | if (r === g && g === b) { 1307 | if (r < 8) { 1308 | return 16; 1309 | } 1310 | 1311 | if (r > 248) { 1312 | return 231; 1313 | } 1314 | 1315 | return Math.round(((r - 8) / 247) * 24) + 232; 1316 | } 1317 | 1318 | const ansi = 16 1319 | + (36 * Math.round(r / 255 * 5)) 1320 | + (6 * Math.round(g / 255 * 5)) 1321 | + Math.round(b / 255 * 5); 1322 | 1323 | return ansi; 1324 | }; 1325 | 1326 | convert.ansi16.rgb = function (args) { 1327 | let color = args % 10; 1328 | 1329 | // Handle greyscale 1330 | if (color === 0 || color === 7) { 1331 | if (args > 50) { 1332 | color += 3.5; 1333 | } 1334 | 1335 | color = color / 10.5 * 255; 1336 | 1337 | return [color, color, color]; 1338 | } 1339 | 1340 | const mult = (~~(args > 50) + 1) * 0.5; 1341 | const r = ((color & 1) * mult) * 255; 1342 | const g = (((color >> 1) & 1) * mult) * 255; 1343 | const b = (((color >> 2) & 1) * mult) * 255; 1344 | 1345 | return [r, g, b]; 1346 | }; 1347 | 1348 | convert.ansi256.rgb = function (args) { 1349 | // Handle greyscale 1350 | if (args >= 232) { 1351 | const c = (args - 232) * 10 + 8; 1352 | return [c, c, c]; 1353 | } 1354 | 1355 | args -= 16; 1356 | 1357 | let rem; 1358 | const r = Math.floor(args / 36) / 5 * 255; 1359 | const g = Math.floor((rem = args % 36) / 6) / 5 * 255; 1360 | const b = (rem % 6) / 5 * 255; 1361 | 1362 | return [r, g, b]; 1363 | }; 1364 | 1365 | convert.rgb.hex = function (args) { 1366 | const integer = ((Math.round(args[0]) & 0xFF) << 16) 1367 | + ((Math.round(args[1]) & 0xFF) << 8) 1368 | + (Math.round(args[2]) & 0xFF); 1369 | 1370 | const string = integer.toString(16).toUpperCase(); 1371 | return '000000'.substring(string.length) + string; 1372 | }; 1373 | 1374 | convert.hex.rgb = function (args) { 1375 | const match = args.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i); 1376 | if (!match) { 1377 | return [0, 0, 0]; 1378 | } 1379 | 1380 | let colorString = match[0]; 1381 | 1382 | if (match[0].length === 3) { 1383 | colorString = colorString.split('').map(char => { 1384 | return char + char; 1385 | }).join(''); 1386 | } 1387 | 1388 | const integer = parseInt(colorString, 16); 1389 | const r = (integer >> 16) & 0xFF; 1390 | const g = (integer >> 8) & 0xFF; 1391 | const b = integer & 0xFF; 1392 | 1393 | return [r, g, b]; 1394 | }; 1395 | 1396 | convert.rgb.hcg = function (rgb) { 1397 | const r = rgb[0] / 255; 1398 | const g = rgb[1] / 255; 1399 | const b = rgb[2] / 255; 1400 | const max = Math.max(Math.max(r, g), b); 1401 | const min = Math.min(Math.min(r, g), b); 1402 | const chroma = (max - min); 1403 | let grayscale; 1404 | let hue; 1405 | 1406 | if (chroma < 1) { 1407 | grayscale = min / (1 - chroma); 1408 | } else { 1409 | grayscale = 0; 1410 | } 1411 | 1412 | if (chroma <= 0) { 1413 | hue = 0; 1414 | } else 1415 | if (max === r) { 1416 | hue = ((g - b) / chroma) % 6; 1417 | } else 1418 | if (max === g) { 1419 | hue = 2 + (b - r) / chroma; 1420 | } else { 1421 | hue = 4 + (r - g) / chroma; 1422 | } 1423 | 1424 | hue /= 6; 1425 | hue %= 1; 1426 | 1427 | return [hue * 360, chroma * 100, grayscale * 100]; 1428 | }; 1429 | 1430 | convert.hsl.hcg = function (hsl) { 1431 | const s = hsl[1] / 100; 1432 | const l = hsl[2] / 100; 1433 | 1434 | const c = l < 0.5 ? (2.0 * s * l) : (2.0 * s * (1.0 - l)); 1435 | 1436 | let f = 0; 1437 | if (c < 1.0) { 1438 | f = (l - 0.5 * c) / (1.0 - c); 1439 | } 1440 | 1441 | return [hsl[0], c * 100, f * 100]; 1442 | }; 1443 | 1444 | convert.hsv.hcg = function (hsv) { 1445 | const s = hsv[1] / 100; 1446 | const v = hsv[2] / 100; 1447 | 1448 | const c = s * v; 1449 | let f = 0; 1450 | 1451 | if (c < 1.0) { 1452 | f = (v - c) / (1 - c); 1453 | } 1454 | 1455 | return [hsv[0], c * 100, f * 100]; 1456 | }; 1457 | 1458 | convert.hcg.rgb = function (hcg) { 1459 | const h = hcg[0] / 360; 1460 | const c = hcg[1] / 100; 1461 | const g = hcg[2] / 100; 1462 | 1463 | if (c === 0.0) { 1464 | return [g * 255, g * 255, g * 255]; 1465 | } 1466 | 1467 | const pure = [0, 0, 0]; 1468 | const hi = (h % 1) * 6; 1469 | const v = hi % 1; 1470 | const w = 1 - v; 1471 | let mg = 0; 1472 | 1473 | /* eslint-disable max-statements-per-line */ 1474 | switch (Math.floor(hi)) { 1475 | case 0: 1476 | pure[0] = 1; pure[1] = v; pure[2] = 0; break; 1477 | case 1: 1478 | pure[0] = w; pure[1] = 1; pure[2] = 0; break; 1479 | case 2: 1480 | pure[0] = 0; pure[1] = 1; pure[2] = v; break; 1481 | case 3: 1482 | pure[0] = 0; pure[1] = w; pure[2] = 1; break; 1483 | case 4: 1484 | pure[0] = v; pure[1] = 0; pure[2] = 1; break; 1485 | default: 1486 | pure[0] = 1; pure[1] = 0; pure[2] = w; 1487 | } 1488 | /* eslint-enable max-statements-per-line */ 1489 | 1490 | mg = (1.0 - c) * g; 1491 | 1492 | return [ 1493 | (c * pure[0] + mg) * 255, 1494 | (c * pure[1] + mg) * 255, 1495 | (c * pure[2] + mg) * 255 1496 | ]; 1497 | }; 1498 | 1499 | convert.hcg.hsv = function (hcg) { 1500 | const c = hcg[1] / 100; 1501 | const g = hcg[2] / 100; 1502 | 1503 | const v = c + g * (1.0 - c); 1504 | let f = 0; 1505 | 1506 | if (v > 0.0) { 1507 | f = c / v; 1508 | } 1509 | 1510 | return [hcg[0], f * 100, v * 100]; 1511 | }; 1512 | 1513 | convert.hcg.hsl = function (hcg) { 1514 | const c = hcg[1] / 100; 1515 | const g = hcg[2] / 100; 1516 | 1517 | const l = g * (1.0 - c) + 0.5 * c; 1518 | let s = 0; 1519 | 1520 | if (l > 0.0 && l < 0.5) { 1521 | s = c / (2 * l); 1522 | } else 1523 | if (l >= 0.5 && l < 1.0) { 1524 | s = c / (2 * (1 - l)); 1525 | } 1526 | 1527 | return [hcg[0], s * 100, l * 100]; 1528 | }; 1529 | 1530 | convert.hcg.hwb = function (hcg) { 1531 | const c = hcg[1] / 100; 1532 | const g = hcg[2] / 100; 1533 | const v = c + g * (1.0 - c); 1534 | return [hcg[0], (v - c) * 100, (1 - v) * 100]; 1535 | }; 1536 | 1537 | convert.hwb.hcg = function (hwb) { 1538 | const w = hwb[1] / 100; 1539 | const b = hwb[2] / 100; 1540 | const v = 1 - b; 1541 | const c = v - w; 1542 | let g = 0; 1543 | 1544 | if (c < 1) { 1545 | g = (v - c) / (1 - c); 1546 | } 1547 | 1548 | return [hwb[0], c * 100, g * 100]; 1549 | }; 1550 | 1551 | convert.apple.rgb = function (apple) { 1552 | return [(apple[0] / 65535) * 255, (apple[1] / 65535) * 255, (apple[2] / 65535) * 255]; 1553 | }; 1554 | 1555 | convert.rgb.apple = function (rgb) { 1556 | return [(rgb[0] / 255) * 65535, (rgb[1] / 255) * 65535, (rgb[2] / 255) * 65535]; 1557 | }; 1558 | 1559 | convert.gray.rgb = function (args) { 1560 | return [args[0] / 100 * 255, args[0] / 100 * 255, args[0] / 100 * 255]; 1561 | }; 1562 | 1563 | convert.gray.hsl = function (args) { 1564 | return [0, 0, args[0]]; 1565 | }; 1566 | 1567 | convert.gray.hsv = convert.gray.hsl; 1568 | 1569 | convert.gray.hwb = function (gray) { 1570 | return [0, 100, gray[0]]; 1571 | }; 1572 | 1573 | convert.gray.cmyk = function (gray) { 1574 | return [0, 0, 0, gray[0]]; 1575 | }; 1576 | 1577 | convert.gray.lab = function (gray) { 1578 | return [gray[0], 0, 0]; 1579 | }; 1580 | 1581 | convert.gray.hex = function (gray) { 1582 | const val = Math.round(gray[0] / 100 * 255) & 0xFF; 1583 | const integer = (val << 16) + (val << 8) + val; 1584 | 1585 | const string = integer.toString(16).toUpperCase(); 1586 | return '000000'.substring(string.length) + string; 1587 | }; 1588 | 1589 | convert.rgb.gray = function (rgb) { 1590 | const val = (rgb[0] + rgb[1] + rgb[2]) / 3; 1591 | return [val / 255 * 100]; 1592 | }; 1593 | 1594 | 1595 | /***/ }), 1596 | 1597 | /***/ "./node_modules/color-convert/index.js": 1598 | /*!*********************************************!*\ 1599 | !*** ./node_modules/color-convert/index.js ***! 1600 | \*********************************************/ 1601 | /***/ ((module, __unused_webpack_exports, __webpack_require__) => { 1602 | 1603 | const conversions = __webpack_require__(/*! ./conversions */ "./node_modules/color-convert/conversions.js"); 1604 | const route = __webpack_require__(/*! ./route */ "./node_modules/color-convert/route.js"); 1605 | 1606 | const convert = {}; 1607 | 1608 | const models = Object.keys(conversions); 1609 | 1610 | function wrapRaw(fn) { 1611 | const wrappedFn = function (...args) { 1612 | const arg0 = args[0]; 1613 | if (arg0 === undefined || arg0 === null) { 1614 | return arg0; 1615 | } 1616 | 1617 | if (arg0.length > 1) { 1618 | args = arg0; 1619 | } 1620 | 1621 | return fn(args); 1622 | }; 1623 | 1624 | // Preserve .conversion property if there is one 1625 | if ('conversion' in fn) { 1626 | wrappedFn.conversion = fn.conversion; 1627 | } 1628 | 1629 | return wrappedFn; 1630 | } 1631 | 1632 | function wrapRounded(fn) { 1633 | const wrappedFn = function (...args) { 1634 | const arg0 = args[0]; 1635 | 1636 | if (arg0 === undefined || arg0 === null) { 1637 | return arg0; 1638 | } 1639 | 1640 | if (arg0.length > 1) { 1641 | args = arg0; 1642 | } 1643 | 1644 | const result = fn(args); 1645 | 1646 | // We're assuming the result is an array here. 1647 | // see notice in conversions.js; don't use box types 1648 | // in conversion functions. 1649 | if (typeof result === 'object') { 1650 | for (let len = result.length, i = 0; i < len; i++) { 1651 | result[i] = Math.round(result[i]); 1652 | } 1653 | } 1654 | 1655 | return result; 1656 | }; 1657 | 1658 | // Preserve .conversion property if there is one 1659 | if ('conversion' in fn) { 1660 | wrappedFn.conversion = fn.conversion; 1661 | } 1662 | 1663 | return wrappedFn; 1664 | } 1665 | 1666 | models.forEach(fromModel => { 1667 | convert[fromModel] = {}; 1668 | 1669 | Object.defineProperty(convert[fromModel], 'channels', {value: conversions[fromModel].channels}); 1670 | Object.defineProperty(convert[fromModel], 'labels', {value: conversions[fromModel].labels}); 1671 | 1672 | const routes = route(fromModel); 1673 | const routeModels = Object.keys(routes); 1674 | 1675 | routeModels.forEach(toModel => { 1676 | const fn = routes[toModel]; 1677 | 1678 | convert[fromModel][toModel] = wrapRounded(fn); 1679 | convert[fromModel][toModel].raw = wrapRaw(fn); 1680 | }); 1681 | }); 1682 | 1683 | module.exports = convert; 1684 | 1685 | 1686 | /***/ }), 1687 | 1688 | /***/ "./node_modules/color-convert/route.js": 1689 | /*!*********************************************!*\ 1690 | !*** ./node_modules/color-convert/route.js ***! 1691 | \*********************************************/ 1692 | /***/ ((module, __unused_webpack_exports, __webpack_require__) => { 1693 | 1694 | const conversions = __webpack_require__(/*! ./conversions */ "./node_modules/color-convert/conversions.js"); 1695 | 1696 | /* 1697 | This function routes a model to all other models. 1698 | 1699 | all functions that are routed have a property `.conversion` attached 1700 | to the returned synthetic function. This property is an array 1701 | of strings, each with the steps in between the 'from' and 'to' 1702 | color models (inclusive). 1703 | 1704 | conversions that are not possible simply are not included. 1705 | */ 1706 | 1707 | function buildGraph() { 1708 | const graph = {}; 1709 | // https://jsperf.com/object-keys-vs-for-in-with-closure/3 1710 | const models = Object.keys(conversions); 1711 | 1712 | for (let len = models.length, i = 0; i < len; i++) { 1713 | graph[models[i]] = { 1714 | // http://jsperf.com/1-vs-infinity 1715 | // micro-opt, but this is simple. 1716 | distance: -1, 1717 | parent: null 1718 | }; 1719 | } 1720 | 1721 | return graph; 1722 | } 1723 | 1724 | // https://en.wikipedia.org/wiki/Breadth-first_search 1725 | function deriveBFS(fromModel) { 1726 | const graph = buildGraph(); 1727 | const queue = [fromModel]; // Unshift -> queue -> pop 1728 | 1729 | graph[fromModel].distance = 0; 1730 | 1731 | while (queue.length) { 1732 | const current = queue.pop(); 1733 | const adjacents = Object.keys(conversions[current]); 1734 | 1735 | for (let len = adjacents.length, i = 0; i < len; i++) { 1736 | const adjacent = adjacents[i]; 1737 | const node = graph[adjacent]; 1738 | 1739 | if (node.distance === -1) { 1740 | node.distance = graph[current].distance + 1; 1741 | node.parent = current; 1742 | queue.unshift(adjacent); 1743 | } 1744 | } 1745 | } 1746 | 1747 | return graph; 1748 | } 1749 | 1750 | function link(from, to) { 1751 | return function (args) { 1752 | return to(from(args)); 1753 | }; 1754 | } 1755 | 1756 | function wrapConversion(toModel, graph) { 1757 | const path = [graph[toModel].parent, toModel]; 1758 | let fn = conversions[graph[toModel].parent][toModel]; 1759 | 1760 | let cur = graph[toModel].parent; 1761 | while (graph[cur].parent) { 1762 | path.unshift(graph[cur].parent); 1763 | fn = link(conversions[graph[cur].parent][cur], fn); 1764 | cur = graph[cur].parent; 1765 | } 1766 | 1767 | fn.conversion = path; 1768 | return fn; 1769 | } 1770 | 1771 | module.exports = function (fromModel) { 1772 | const graph = deriveBFS(fromModel); 1773 | const conversion = {}; 1774 | 1775 | const models = Object.keys(graph); 1776 | for (let len = models.length, i = 0; i < len; i++) { 1777 | const toModel = models[i]; 1778 | const node = graph[toModel]; 1779 | 1780 | if (node.parent === null) { 1781 | // No possible conversion, or this node is the source model. 1782 | continue; 1783 | } 1784 | 1785 | conversion[toModel] = wrapConversion(toModel, graph); 1786 | } 1787 | 1788 | return conversion; 1789 | }; 1790 | 1791 | 1792 | 1793 | /***/ }), 1794 | 1795 | /***/ "./node_modules/color-name/index.js": 1796 | /*!******************************************!*\ 1797 | !*** ./node_modules/color-name/index.js ***! 1798 | \******************************************/ 1799 | /***/ ((module) => { 1800 | 1801 | "use strict"; 1802 | 1803 | 1804 | module.exports = { 1805 | "aliceblue": [240, 248, 255], 1806 | "antiquewhite": [250, 235, 215], 1807 | "aqua": [0, 255, 255], 1808 | "aquamarine": [127, 255, 212], 1809 | "azure": [240, 255, 255], 1810 | "beige": [245, 245, 220], 1811 | "bisque": [255, 228, 196], 1812 | "black": [0, 0, 0], 1813 | "blanchedalmond": [255, 235, 205], 1814 | "blue": [0, 0, 255], 1815 | "blueviolet": [138, 43, 226], 1816 | "brown": [165, 42, 42], 1817 | "burlywood": [222, 184, 135], 1818 | "cadetblue": [95, 158, 160], 1819 | "chartreuse": [127, 255, 0], 1820 | "chocolate": [210, 105, 30], 1821 | "coral": [255, 127, 80], 1822 | "cornflowerblue": [100, 149, 237], 1823 | "cornsilk": [255, 248, 220], 1824 | "crimson": [220, 20, 60], 1825 | "cyan": [0, 255, 255], 1826 | "darkblue": [0, 0, 139], 1827 | "darkcyan": [0, 139, 139], 1828 | "darkgoldenrod": [184, 134, 11], 1829 | "darkgray": [169, 169, 169], 1830 | "darkgreen": [0, 100, 0], 1831 | "darkgrey": [169, 169, 169], 1832 | "darkkhaki": [189, 183, 107], 1833 | "darkmagenta": [139, 0, 139], 1834 | "darkolivegreen": [85, 107, 47], 1835 | "darkorange": [255, 140, 0], 1836 | "darkorchid": [153, 50, 204], 1837 | "darkred": [139, 0, 0], 1838 | "darksalmon": [233, 150, 122], 1839 | "darkseagreen": [143, 188, 143], 1840 | "darkslateblue": [72, 61, 139], 1841 | "darkslategray": [47, 79, 79], 1842 | "darkslategrey": [47, 79, 79], 1843 | "darkturquoise": [0, 206, 209], 1844 | "darkviolet": [148, 0, 211], 1845 | "deeppink": [255, 20, 147], 1846 | "deepskyblue": [0, 191, 255], 1847 | "dimgray": [105, 105, 105], 1848 | "dimgrey": [105, 105, 105], 1849 | "dodgerblue": [30, 144, 255], 1850 | "firebrick": [178, 34, 34], 1851 | "floralwhite": [255, 250, 240], 1852 | "forestgreen": [34, 139, 34], 1853 | "fuchsia": [255, 0, 255], 1854 | "gainsboro": [220, 220, 220], 1855 | "ghostwhite": [248, 248, 255], 1856 | "gold": [255, 215, 0], 1857 | "goldenrod": [218, 165, 32], 1858 | "gray": [128, 128, 128], 1859 | "green": [0, 128, 0], 1860 | "greenyellow": [173, 255, 47], 1861 | "grey": [128, 128, 128], 1862 | "honeydew": [240, 255, 240], 1863 | "hotpink": [255, 105, 180], 1864 | "indianred": [205, 92, 92], 1865 | "indigo": [75, 0, 130], 1866 | "ivory": [255, 255, 240], 1867 | "khaki": [240, 230, 140], 1868 | "lavender": [230, 230, 250], 1869 | "lavenderblush": [255, 240, 245], 1870 | "lawngreen": [124, 252, 0], 1871 | "lemonchiffon": [255, 250, 205], 1872 | "lightblue": [173, 216, 230], 1873 | "lightcoral": [240, 128, 128], 1874 | "lightcyan": [224, 255, 255], 1875 | "lightgoldenrodyellow": [250, 250, 210], 1876 | "lightgray": [211, 211, 211], 1877 | "lightgreen": [144, 238, 144], 1878 | "lightgrey": [211, 211, 211], 1879 | "lightpink": [255, 182, 193], 1880 | "lightsalmon": [255, 160, 122], 1881 | "lightseagreen": [32, 178, 170], 1882 | "lightskyblue": [135, 206, 250], 1883 | "lightslategray": [119, 136, 153], 1884 | "lightslategrey": [119, 136, 153], 1885 | "lightsteelblue": [176, 196, 222], 1886 | "lightyellow": [255, 255, 224], 1887 | "lime": [0, 255, 0], 1888 | "limegreen": [50, 205, 50], 1889 | "linen": [250, 240, 230], 1890 | "magenta": [255, 0, 255], 1891 | "maroon": [128, 0, 0], 1892 | "mediumaquamarine": [102, 205, 170], 1893 | "mediumblue": [0, 0, 205], 1894 | "mediumorchid": [186, 85, 211], 1895 | "mediumpurple": [147, 112, 219], 1896 | "mediumseagreen": [60, 179, 113], 1897 | "mediumslateblue": [123, 104, 238], 1898 | "mediumspringgreen": [0, 250, 154], 1899 | "mediumturquoise": [72, 209, 204], 1900 | "mediumvioletred": [199, 21, 133], 1901 | "midnightblue": [25, 25, 112], 1902 | "mintcream": [245, 255, 250], 1903 | "mistyrose": [255, 228, 225], 1904 | "moccasin": [255, 228, 181], 1905 | "navajowhite": [255, 222, 173], 1906 | "navy": [0, 0, 128], 1907 | "oldlace": [253, 245, 230], 1908 | "olive": [128, 128, 0], 1909 | "olivedrab": [107, 142, 35], 1910 | "orange": [255, 165, 0], 1911 | "orangered": [255, 69, 0], 1912 | "orchid": [218, 112, 214], 1913 | "palegoldenrod": [238, 232, 170], 1914 | "palegreen": [152, 251, 152], 1915 | "paleturquoise": [175, 238, 238], 1916 | "palevioletred": [219, 112, 147], 1917 | "papayawhip": [255, 239, 213], 1918 | "peachpuff": [255, 218, 185], 1919 | "peru": [205, 133, 63], 1920 | "pink": [255, 192, 203], 1921 | "plum": [221, 160, 221], 1922 | "powderblue": [176, 224, 230], 1923 | "purple": [128, 0, 128], 1924 | "rebeccapurple": [102, 51, 153], 1925 | "red": [255, 0, 0], 1926 | "rosybrown": [188, 143, 143], 1927 | "royalblue": [65, 105, 225], 1928 | "saddlebrown": [139, 69, 19], 1929 | "salmon": [250, 128, 114], 1930 | "sandybrown": [244, 164, 96], 1931 | "seagreen": [46, 139, 87], 1932 | "seashell": [255, 245, 238], 1933 | "sienna": [160, 82, 45], 1934 | "silver": [192, 192, 192], 1935 | "skyblue": [135, 206, 235], 1936 | "slateblue": [106, 90, 205], 1937 | "slategray": [112, 128, 144], 1938 | "slategrey": [112, 128, 144], 1939 | "snow": [255, 250, 250], 1940 | "springgreen": [0, 255, 127], 1941 | "steelblue": [70, 130, 180], 1942 | "tan": [210, 180, 140], 1943 | "teal": [0, 128, 128], 1944 | "thistle": [216, 191, 216], 1945 | "tomato": [255, 99, 71], 1946 | "turquoise": [64, 224, 208], 1947 | "violet": [238, 130, 238], 1948 | "wheat": [245, 222, 179], 1949 | "white": [255, 255, 255], 1950 | "whitesmoke": [245, 245, 245], 1951 | "yellow": [255, 255, 0], 1952 | "yellowgreen": [154, 205, 50] 1953 | }; 1954 | 1955 | 1956 | /***/ }), 1957 | 1958 | /***/ "./node_modules/supports-color/browser.js": 1959 | /*!************************************************!*\ 1960 | !*** ./node_modules/supports-color/browser.js ***! 1961 | \************************************************/ 1962 | /***/ ((module) => { 1963 | 1964 | "use strict"; 1965 | 1966 | module.exports = { 1967 | stdout: false, 1968 | stderr: false 1969 | }; 1970 | 1971 | 1972 | /***/ }), 1973 | 1974 | /***/ "./src/tree.data.js": 1975 | /*!**************************!*\ 1976 | !*** ./src/tree.data.js ***! 1977 | \**************************/ 1978 | /***/ ((module) => { 1979 | 1980 | const nodes = [ { 1981 | id: 'kibibit', 1982 | image: 'https://kibibit.io/logo-demo/logo.png', 1983 | modalSelector: '#about-kibibit' 1984 | }, 1985 | { 1986 | id: 'achievibit', 1987 | image: 'https://github.com/Kibibit/kibibit-assets/raw/master/logo-achi.png', 1988 | modalSelector: '#about-readme', 1989 | parentId: 'kibibit' 1990 | }, 1991 | // { 1992 | // "id": "achievibit-chrome-extension", 1993 | // "image": "https://www.pivotaltracker.com/marketing_assets/integrations/2015/google-chrome-extension-6a26cdad27e6f383174791f8648fbe4cc7627acc06e3870c588217c98d1bde91.png", 1994 | // "modalSelector": "#about-readme", 1995 | // parentId: 'kibibit' 1996 | // }, 1997 | { 1998 | id: 'kibibit-code-editor', 1999 | image: 'https://kibibit.io/logo-demo/code-editor.png', 2000 | modalSelector: '#about-readme', 2001 | parentId: 'kibibit' 2002 | }, 2003 | { 2004 | id: 'cli-lit', 2005 | image: 'https://kibibit.io/kibibit-assets/cli-lit-logo-transparent.png', 2006 | modalSelector: '#about-readme', 2007 | parentId: 'kibibit' 2008 | }, 2009 | { 2010 | id: 'kb-components', 2011 | image: 'https://kibibit.io/kibibit-assets/kb-components-logo-transparent.png', 2012 | modalSelector: '#about-readme', 2013 | parentId: 'kibibit' 2014 | }, 2015 | { 2016 | id: 'tdd1t', 2017 | image: 'https://kibibit.io/kibibit-assets/4x/tdd1t-avatar-transparent%404x.png', 2018 | modalSelector: '#about-readme', 2019 | parentId: 'kibibit' 2020 | }, 2021 | { 2022 | id: 'kb-hologram', 2023 | image: 'https://kibibit.io/kibibit-assets/kb-hologram/logo.svg', 2024 | modalSelector: '#about-readme', 2025 | parentId: 'kibibit' 2026 | }, 2027 | { 2028 | id: 'announce-it', 2029 | image: 'https://camo.githubusercontent.com/b80d088e5a18d62cee79035f457e157792b4d99f/687474703a2f2f6b6962696269742e696f2f6b6962696269742d6173736574732f616e6e6f756e63652d69742e737667', 2030 | modalSelector: '#about-readme', 2031 | parentId: 'kibibit' 2032 | }, 2033 | { 2034 | id: 'cold-deck', 2035 | image: 'https://kibibit.io/kibibit-assets/cold-deck/logo.svg', 2036 | modalSelector: '#about-readme', 2037 | parentId: 'kibibit' 2038 | }, 2039 | { 2040 | id: 'stacker', 2041 | image: 'https://kibibit.io/kibibit-assets/stacker.png', 2042 | modalSelector: '#about-readme', 2043 | parentId: 'kibibit' 2044 | }, 2045 | { 2046 | id: 'hass-kibibit-theme', 2047 | image: 'https://kibibit.io/kibibit-assets/hassio-theme/hassio-theme-logo-trans.png', 2048 | modalSelector: '#about-readme', 2049 | parentId: 'kibibit' 2050 | }, 2051 | { 2052 | id: 'command-lime', 2053 | image: 'https://kibibit.io/command-lime/logo-clear.png', 2054 | modalSelector: '#about-readme', 2055 | parentId: 'kibibit' 2056 | }, 2057 | { 2058 | id: 'dev-tools', 2059 | image: 'https://kibibit.io/dev-tools/logo.png', 2060 | modalSelector: '#about-readme', 2061 | parentId: 'kibibit' 2062 | }, 2063 | { 2064 | id: 'configit', 2065 | image: 'https://kibibit.io/configit/logo.png', 2066 | modalSelector: '#about-readme', 2067 | parentId: 'kibibit' 2068 | } 2069 | // { 2070 | // "id": "kb-login-page", 2071 | // "image": "https://camo.githubusercontent.com/01a1947671f7f77ecdd0096aa8d8f51b6aadaa4a/687474703a2f2f6b6962696269742e696f2f6b6962696269742d6173736574732f6c6f67696e2e737667", 2072 | // "modalSelector": "#about-readme", 2073 | // parentId: 'kibibit' 2074 | // }, 2075 | // { 2076 | // "id": "kb-profile-page", 2077 | // "image": "https://camo.githubusercontent.com/7620455813fc7ce4ed7f9017f188f301e371d2fb/687474703a2f2f6b6962696269742e696f2f6b6962696269742d6173736574732f70726f66696c652e737667", 2078 | // "modalSelector": "#about-readme", 2079 | // parentId: 'kibibit' 2080 | // } 2081 | ]; 2082 | 2083 | module.exports = { 2084 | nodes, 2085 | edges: getEdgesFromNotes() 2086 | }; 2087 | 2088 | function getEdgesFromNotes() { 2089 | return nodes 2090 | .map((node, index) => { 2091 | return { 2092 | source: nodes.indexOf(nodes.find((parentNode) => parentNode.id === node.parentId)), 2093 | target: index 2094 | }; 2095 | }) 2096 | .filter((item) => item.source >= 0); 2097 | } 2098 | 2099 | 2100 | /***/ }) 2101 | 2102 | /******/ }); 2103 | /************************************************************************/ 2104 | /******/ // The module cache 2105 | /******/ var __webpack_module_cache__ = {}; 2106 | /******/ 2107 | /******/ // The require function 2108 | /******/ function __webpack_require__(moduleId) { 2109 | /******/ // Check if module is in cache 2110 | /******/ var cachedModule = __webpack_module_cache__[moduleId]; 2111 | /******/ if (cachedModule !== undefined) { 2112 | /******/ return cachedModule.exports; 2113 | /******/ } 2114 | /******/ // Create a new module (and put it into the cache) 2115 | /******/ var module = __webpack_module_cache__[moduleId] = { 2116 | /******/ id: moduleId, 2117 | /******/ loaded: false, 2118 | /******/ exports: {} 2119 | /******/ }; 2120 | /******/ 2121 | /******/ // Execute the module function 2122 | /******/ __webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__); 2123 | /******/ 2124 | /******/ // Flag the module as loaded 2125 | /******/ module.loaded = true; 2126 | /******/ 2127 | /******/ // Return the exports of the module 2128 | /******/ return module.exports; 2129 | /******/ } 2130 | /******/ 2131 | /************************************************************************/ 2132 | /******/ /* webpack/runtime/compat get default export */ 2133 | /******/ (() => { 2134 | /******/ // getDefaultExport function for compatibility with non-harmony modules 2135 | /******/ __webpack_require__.n = (module) => { 2136 | /******/ var getter = module && module.__esModule ? 2137 | /******/ () => (module['default']) : 2138 | /******/ () => (module); 2139 | /******/ __webpack_require__.d(getter, { a: getter }); 2140 | /******/ return getter; 2141 | /******/ }; 2142 | /******/ })(); 2143 | /******/ 2144 | /******/ /* webpack/runtime/define property getters */ 2145 | /******/ (() => { 2146 | /******/ // define getter functions for harmony exports 2147 | /******/ __webpack_require__.d = (exports, definition) => { 2148 | /******/ for(var key in definition) { 2149 | /******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) { 2150 | /******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] }); 2151 | /******/ } 2152 | /******/ } 2153 | /******/ }; 2154 | /******/ })(); 2155 | /******/ 2156 | /******/ /* webpack/runtime/hasOwnProperty shorthand */ 2157 | /******/ (() => { 2158 | /******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop)) 2159 | /******/ })(); 2160 | /******/ 2161 | /******/ /* webpack/runtime/make namespace object */ 2162 | /******/ (() => { 2163 | /******/ // define __esModule on exports 2164 | /******/ __webpack_require__.r = (exports) => { 2165 | /******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) { 2166 | /******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); 2167 | /******/ } 2168 | /******/ Object.defineProperty(exports, '__esModule', { value: true }); 2169 | /******/ }; 2170 | /******/ })(); 2171 | /******/ 2172 | /******/ /* webpack/runtime/node module decorator */ 2173 | /******/ (() => { 2174 | /******/ __webpack_require__.nmd = (module) => { 2175 | /******/ module.paths = []; 2176 | /******/ if (!module.children) module.children = []; 2177 | /******/ return module; 2178 | /******/ }; 2179 | /******/ })(); 2180 | /******/ 2181 | /************************************************************************/ 2182 | var __webpack_exports__ = {}; 2183 | // This entry need to be wrapped in an IIFE because it need to be in strict mode. 2184 | (() => { 2185 | "use strict"; 2186 | /*!**********************!*\ 2187 | !*** ./src/index.js ***! 2188 | \**********************/ 2189 | __webpack_require__.r(__webpack_exports__); 2190 | /* harmony import */ var _kibibit_consologo__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @kibibit/consologo */ "./node_modules/@kibibit/consologo/lib/index.js"); 2191 | /* harmony import */ var _kibibit_consologo__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_kibibit_consologo__WEBPACK_IMPORTED_MODULE_0__); 2192 | /* harmony import */ var _tree_data__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./tree.data */ "./src/tree.data.js"); 2193 | /* harmony import */ var _tree_data__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_tree_data__WEBPACK_IMPORTED_MODULE_1__); 2194 | /* eslint-disable no-unused-vars */ 2195 | 2196 | 2197 | 2198 | console.log((_tree_data__WEBPACK_IMPORTED_MODULE_1___default())); 2199 | 2200 | (0,_kibibit_consologo__WEBPACK_IMPORTED_MODULE_0__.webConsolelogo)('kibibit.io Homepage'); 2201 | 2202 | const body = document.body; 2203 | const html = document.documentElement; 2204 | 2205 | // nice 2206 | 2207 | const svg = d3.select('body') 2208 | .append('div') 2209 | // Container class to make it responsive. 2210 | .classed('svg-container', true) 2211 | .append('svg'); 2212 | 2213 | redraw(); 2214 | 2215 | $('.kb-close').click(function() { 2216 | $(this).closest('.kb-crt').removeClass('active'); 2217 | }); 2218 | 2219 | window.addEventListener('resize', debounce(onResize, 800)); 2220 | 2221 | function onResize() { 2222 | svg.selectAll('*').remove(); 2223 | redraw(); 2224 | } 2225 | 2226 | function debounce(func, wait, immediate) { 2227 | let timeout; 2228 | 2229 | return function executedFunction(...args) { 2230 | const context = this; 2231 | 2232 | const later = function() { 2233 | timeout = null; 2234 | if (!immediate) func.apply(context, args); 2235 | }; 2236 | 2237 | const callNow = immediate && !timeout; 2238 | 2239 | clearTimeout(timeout); 2240 | 2241 | timeout = setTimeout(later, wait); 2242 | 2243 | if (callNow) func.apply(context, args); 2244 | }; 2245 | }; 2246 | 2247 | function redraw() { 2248 | const height = Math.max(body.scrollHeight, body.offsetHeight, 2249 | html.clientHeight, html.scrollHeight, html.offsetHeight); 2250 | 2251 | const width = Math.max(body.scrollWidth, body.offsetWidth, 2252 | html.clientWidth, html.scrollWidth, html.offsetWidth); 2253 | 2254 | svg 2255 | .attr('width', width) 2256 | .attr('height', height); 2257 | 2258 | const simulation = d3.forceSimulation() 2259 | .force('link', d3.forceLink()) 2260 | .force('charge', d3.forceManyBody().strength(-5000)) 2261 | .force('center', d3.forceCenter(width / 2, height / 2)); 2262 | 2263 | const links = svg.selectAll('foo') 2264 | .data((_tree_data__WEBPACK_IMPORTED_MODULE_1___default().edges)) 2265 | .enter() 2266 | .append('line') 2267 | .style('stroke', '#ccc') 2268 | .style('stroke-width', 2); 2269 | 2270 | const color = d3.scaleOrdinal(d3.schemeCategory20); 2271 | 2272 | const node = svg.selectAll('foo') 2273 | .data((_tree_data__WEBPACK_IMPORTED_MODULE_1___default().nodes)) 2274 | .enter() 2275 | .append('g') 2276 | .classed('graph-node', true) 2277 | .call(d3.drag() 2278 | .on('start', dragstarted) 2279 | .on('drag', dragged) 2280 | .on('end', dragended)); 2281 | 2282 | const nodeCircle = node.append('circle') 2283 | .attr('r', 50) 2284 | .attr('stroke', 'gray') 2285 | .attr('stroke-width', '3px') 2286 | .attr('fill', '#212121'); 2287 | 2288 | const nodeImage = node.append('image') 2289 | .attr('xlink:href', (d) => d.image) 2290 | .attr('height', '80') 2291 | .attr('width', '80') 2292 | .attr('x', -40) 2293 | .attr('y', -40) 2294 | .on('click', function(datum) { 2295 | // Determine if current line is visible 2296 | if (datum.modalSelector === '#about-readme') { 2297 | const octokit = new Octokit(); 2298 | 2299 | Promise.all([ 2300 | octokit.repos.getContents({ 2301 | owner: 'kibibit', 2302 | repo: datum.id, 2303 | path: 'README.md' 2304 | }), 2305 | octokit.repos.getContents({ 2306 | owner: 'kibibit', 2307 | repo: datum.id, 2308 | path: 'package.json' 2309 | }) 2310 | ]) 2311 | .then((result) => { 2312 | let [ readme, info ] = result; 2313 | 2314 | try { 2315 | info = JSON.parse(atob(info.data.content)); 2316 | } catch (err) {} 2317 | 2318 | let content = ''; 2319 | atob(readme.data.content) 2320 | .replace(/^([\s\S]*\)([\s\S]*?)(#+\s?Contributing[\s\S]*)?$/m, (full, first, second, third) => { 2321 | content = `${ first }\n${ third || '' }`; 2322 | return `${ first }\n${ third || '' }`; 2323 | }); 2324 | 2325 | content = content 2326 | .replace('"logo.png"', `"//kibibit.io/${datum.id}/logo.png"`) 2327 | .replace('"logo-clear.png"', `"//kibibit.io/${datum.id}/logo-clear.png"`); 2328 | 2329 | showdown.setFlavor('github'); 2330 | 2331 | const converter = new showdown.Converter({ 2332 | emoji: true, 2333 | tables: true 2334 | }); 2335 | converter.setOption('emoji', true); 2336 | const newHtml = converter.makeHtml(content); 2337 | 2338 | const modalElement = $(datum.modalSelector); 2339 | const modalContentElement = modalElement.find('.content'); 2340 | const githubLinkElement = modalElement.find('.watch-on-github'); 2341 | const homepageLinkElement = modalElement.find('.watch-homepage'); 2342 | 2343 | modalContentElement.html(newHtml); 2344 | githubLinkElement.attr('href', `https://github.com/kibibit/${ datum.id }`); 2345 | homepageLinkElement.attr('href', info.homepage || ''); 2346 | if (!info.homepage) { 2347 | homepageLinkElement.hide(); 2348 | } else { 2349 | homepageLinkElement.show(); 2350 | } 2351 | modalElement.addClass('active'); 2352 | }) 2353 | .catch((err) => console.error(err)); 2354 | } else { 2355 | $(datum.modalSelector).addClass('active'); 2356 | } 2357 | }); 2358 | 2359 | // var texts = node.append("text") 2360 | // .style("fill", "white") 2361 | // .attr("dx", 30) 2362 | // .attr("dy", 8) 2363 | // .text(function(d) { 2364 | // return d.id; 2365 | // }); 2366 | 2367 | simulation.nodes((_tree_data__WEBPACK_IMPORTED_MODULE_1___default().nodes)); 2368 | simulation.force('link') 2369 | .links((_tree_data__WEBPACK_IMPORTED_MODULE_1___default().edges)); 2370 | 2371 | simulation.on('tick', function() { 2372 | links.attr('x1', function(d) { 2373 | return d.source.x; 2374 | }) 2375 | .attr('y1', function(d) { 2376 | return d.source.y; 2377 | }) 2378 | .attr('x2', function(d) { 2379 | return d.target.x; 2380 | }) 2381 | .attr('y2', function(d) { 2382 | return d.target.y; 2383 | }); 2384 | 2385 | node.attr('transform', (d) => 'translate(' + d.x + ',' + d.y + ')'); 2386 | }); 2387 | 2388 | function dragstarted(d) { 2389 | if (!d3.event.active) simulation.alphaTarget(0.3).restart(); 2390 | d.fx = d.x; 2391 | d.fy = d.y; 2392 | } 2393 | 2394 | function dragged(d) { 2395 | d.fx = d3.event.x; 2396 | d.fy = d3.event.y; 2397 | } 2398 | 2399 | function dragended(d) { 2400 | if (!d3.event.active) simulation.alphaTarget(0); 2401 | d.fx = null; 2402 | d.fy = null; 2403 | } 2404 | } 2405 | 2406 | })(); 2407 | 2408 | /******/ })() 2409 | ; 2410 | //# sourceMappingURL=index.js.map --------------------------------------------------------------------------------