├── demo ├── .gitignore ├── public │ ├── favicon.png │ ├── tests.js │ ├── style.css │ └── randomColor.min.js ├── source │ ├── favicon.png │ ├── tests.js │ └── style.css ├── package.json ├── index.js └── package-lock.json ├── package.json ├── README.md ├── LICENSE.md └── randomColor.js /demo/.gitignore: -------------------------------------------------------------------------------- 1 | index.html 2 | npm-debug.log 3 | node_modules 4 | -------------------------------------------------------------------------------- /demo/public/favicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/davidmerfield/randomColor/HEAD/demo/public/favicon.png -------------------------------------------------------------------------------- /demo/source/favicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/davidmerfield/randomColor/HEAD/demo/source/favicon.png -------------------------------------------------------------------------------- /demo/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "randomcolor-demo", 3 | "author": "David Merfield", 4 | "license": "CC0", 5 | "dependencies": { 6 | "cheerio": "^1.0.0-rc.12", 7 | "clean-css": "^4.1.11", 8 | "esbuild": "^0.19.0", 9 | "fs-extra": "^5.0.0", 10 | "highlight": "^0.2.3", 11 | "highlight.js": "^11.8.0", 12 | "html-minifier": "^4.0.0", 13 | "typeset": "^0.2.6" 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "randomcolor", 3 | "version": "0.6.2", 4 | "description": "A tiny script for generating attractive random colors", 5 | "main": "randomColor.js", 6 | "repository": { 7 | "type": "git", 8 | "url": "git://github.com/davidmerfield/randomColor.git" 9 | }, 10 | "keywords": [ 11 | "attractive", 12 | "random", 13 | "color", 14 | "generator" 15 | ], 16 | "author": "David Merfield", 17 | "license": "CC0-1.0", 18 | "homepage": "https://randomcolor.lllllllllllllllll.com/" 19 | } 20 | -------------------------------------------------------------------------------- /demo/public/tests.js: -------------------------------------------------------------------------------- 1 | var f=function(){for(var a=document.querySelectorAll(".output"),n=0;n{for(var e in a)R(r,e,{get:a[e],enumerable:!0})},I=(r,a,e,n)=>{if(a&&typeof a=="object"||typeof a=="function")for(let t of F(a))!T.call(r,t)&&t!==e&&R(r,t,{get:()=>a[t],enumerable:!(n=w(a,t))||n.enumerable});return r};var E=r=>I(R({},"__esModule",{value:!0}),r);var X={};H(X,{default:()=>y});module.exports=E(X);var g=null,s={};D();var b=[];function y(r){if(r=r||{},r.reset!==void 0&&r.reset!==null&&r.reset===!0&&(b=[]),r.seed!==void 0&&r.seed!==null&&r.seed===parseInt(r.seed,10))g=r.seed;else if(typeof r.seed=="string")g=L(r.seed);else{if(r.seed!==void 0&&r.seed!==null)throw new TypeError("The seed value must be an integer or string");g=null}var a,e,n;if(r.count!==null&&r.count!==void 0){for(var t=r.count,f=[],u=0;uf.length;){var i=y(r);g!==null&&(r.seed=g),f.push(i)}return r.count=t,f}return a=B(r),e=C(a,r),n=N(a,e,r),V([a,e,n],r)}function B(r){if(b.length>0){var a=W(r.hue),e=k(a),n=(a[1]-a[0])/b.length,t=parseInt((e-a[0])/n);b[t]===!0?t=(t+2)%b.length:b[t]=!0;var f=(a[0]+t*n)%359,u=(a[0]+(t+1)*n)%359;return a=[f,u],e=k(a),e<0&&(e=360+e),e}else{var a=$(r.hue);return e=k(a),e<0&&(e=360+e),e}}function C(r,a){if(a.hue==="monochrome")return 0;if(a.luminosity==="random")return k([0,100]);var e=G(r),n=e[0],t=e[1];switch(a.luminosity){case"bright":n=55;break;case"dark":n=t-10;break;case"light":t=55;break}return k([n,t])}function N(r,a,e){var n=_(r,a),t=100;switch(e.luminosity){case"dark":t=n+20;break;case"light":n=(t+n)/2;break;case"random":n=0,t=100;break}return k([n,t])}function V(r,a){switch(a.format){case"hsvArray":return r;case"hslArray":return x(r);case"hsl":var e=x(r);return"hsl("+e[0]+", "+e[1]+"%, "+e[2]+"%)";case"hsla":var n=x(r),u=a.alpha||Math.random();return"hsla("+n[0]+", "+n[1]+"%, "+n[2]+"%, "+u+")";case"rgbArray":return m(r);case"rgb":var t=m(r);return"rgb("+t.join(", ")+")";case"rgba":var f=m(r),u=a.alpha||Math.random();return"rgba("+f.join(", ")+", "+u+")";default:return q(r)}}function _(r,a){for(var e=M(r).lowerBounds,n=0;n=t&&a<=u){var c=(i-f)/(u-t),v=f-c*t;return c*a+v}}return 0}function $(r){if(typeof parseInt(r)=="number"){var a=parseInt(r);if(a<360&&a>0)return[a,a]}if(typeof r=="string"){if(s[r]){var e=s[r];if(e.hueRange)return e.hueRange}else if(r.match(/^#?([0-9A-F]{3}|[0-9A-F]{6})$/i)){var n=A(r)[0];return[n,n]}}return[0,360]}function G(r){return M(r).saturationRange}function M(r){r>=334&&r<=360&&(r-=360);for(var a in s){var e=s[a];if(e.hueRange&&r>=e.hueRange[0]&&r<=e.hueRange[1])return s[a]}return"Color not found"}function k(r){if(g===null){var a=.618033988749895,e=Math.random();return e+=a,e%=1,Math.floor(r[0]+e*(r[1]+1-r[0]))}else{var n=r[1]||1,t=r[0]||0;g=(g*9301+49297)%233280;var f=g/233280;return Math.floor(t+f*(n-t))}}function q(r){var a=m(r);function e(t){var f=t.toString(16);return f.length==1?"0"+f:f}var n="#"+e(a[0])+e(a[1])+e(a[2]);return n}function d(r,a,e){var n=e[0][0],t=e[e.length-1][0],f=e[e.length-1][1],u=e[0][1];s[r]={hueRange:a,lowerBounds:e,saturationRange:[n,t],brightnessRange:[f,u]}}function D(){d("monochrome",null,[[0,0],[100,0]]),d("red",[-26,18],[[20,100],[30,92],[40,89],[50,85],[60,78],[70,70],[80,60],[90,55],[100,50]]),d("orange",[18,46],[[20,100],[30,93],[40,88],[50,86],[60,85],[70,70],[100,70]]),d("yellow",[46,62],[[25,100],[40,94],[50,89],[60,86],[70,84],[80,82],[90,80],[100,75]]),d("green",[62,178],[[30,100],[40,90],[50,85],[60,81],[70,74],[80,64],[90,50],[100,40]]),d("blue",[178,257],[[20,100],[30,86],[40,80],[50,74],[60,60],[70,52],[80,44],[90,39],[100,35]]),d("purple",[257,282],[[20,100],[30,87],[40,79],[50,70],[60,65],[70,59],[80,52],[90,45],[100,42]]),d("pink",[282,334],[[20,100],[30,90],[40,86],[60,84],[80,80],[90,75],[100,73]])}function m(r){var a=r[0];a===0&&(a=1),a===360&&(a=359),a=a/360;var e=r[1]/100,n=r[2]/100,t=Math.floor(a*6),f=a*6-t,u=n*(1-e),i=n*(1-f*e),c=n*(1-(1-f)*e),v=256,l=256,h=256;switch(t){case 0:v=n,l=c,h=u;break;case 1:v=i,l=n,h=u;break;case 2:v=u,l=n,h=c;break;case 3:v=u,l=i,h=n;break;case 4:v=c,l=u,h=n;break;case 5:v=n,l=u,h=i;break}var S=[Math.floor(v*255),Math.floor(l*255),Math.floor(h*255)];return S}function A(r){let a=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(r),e=parseInt(a[1],16),n=parseInt(a[2],16),t=parseInt(a[3],16);e/=255,n/=255,t/=255;var f=Math.max(e,n,t),u=Math.min(e,n,t),i,c,v=(f+u)/2;if(f==u)i=c=0;else{var l=f-u;switch(c=v>.5?l/(2-f-u):l/(f+u),f){case e:i=(n-t)/l+(n=Number.MAX_SAFE_INTEGER);e++)a+=r.charCodeAt(e);return a}function W(r){if(isNaN(r)){if(typeof r=="string"){if(s[r]){var e=s[r];if(e.hueRange)return e.hueRange}else if(r.match(/^#?([0-9A-F]{3}|[0-9A-F]{6})$/i)){var n=A(r)[0];return M(n).hueRange}}}else{var a=parseInt(r);if(a<360&&a>0)return M(r).hueRange}} 2 | -------------------------------------------------------------------------------- /LICENSE.md: -------------------------------------------------------------------------------- 1 | CC0 1.0 Universal 2 | 3 | Statement of Purpose 4 | 5 | The laws of most jurisdictions throughout the world automatically confer 6 | exclusive Copyright and Related Rights (defined below) upon the creator and 7 | subsequent owner(s) (each and all, an "owner") of an original work of 8 | authorship and/or a database (each, a "Work"). 9 | 10 | Certain owners wish to permanently relinquish those rights to a Work for the 11 | purpose of contributing to a commons of creative, cultural and scientific 12 | works ("Commons") that the public can reliably and without fear of later 13 | claims of infringement build upon, modify, incorporate in other works, reuse 14 | and redistribute as freely as possible in any form whatsoever and for any 15 | purposes, including without limitation commercial purposes. These owners may 16 | contribute to the Commons to promote the ideal of a free culture and the 17 | further production of creative, cultural and scientific works, or to gain 18 | reputation or greater distribution for their Work in part through the use and 19 | efforts of others. 20 | 21 | For these and/or other purposes and motivations, and without any expectation 22 | of additional consideration or compensation, the person associating CC0 with a 23 | Work (the "Affirmer"), to the extent that he or she is an owner of Copyright 24 | and Related Rights in the Work, voluntarily elects to apply CC0 to the Work 25 | and publicly distribute the Work under its terms, with knowledge of his or her 26 | Copyright and Related Rights in the Work and the meaning and intended legal 27 | effect of CC0 on those rights. 28 | 29 | 1. Copyright and Related Rights. A Work made available under CC0 may be 30 | protected by copyright and related or neighboring rights ("Copyright and 31 | Related Rights"). Copyright and Related Rights include, but are not limited 32 | to, the following: 33 | 34 | i. the right to reproduce, adapt, distribute, perform, display, communicate, 35 | and translate a Work; 36 | 37 | ii. moral rights retained by the original author(s) and/or performer(s); 38 | 39 | iii. publicity and privacy rights pertaining to a person's image or likeness 40 | depicted in a Work; 41 | 42 | iv. rights protecting against unfair competition in regards to a Work, 43 | subject to the limitations in paragraph 4(a), below; 44 | 45 | v. rights protecting the extraction, dissemination, use and reuse of data in 46 | a Work; 47 | 48 | vi. database rights (such as those arising under Directive 96/9/EC of the 49 | European Parliament and of the Council of 11 March 1996 on the legal 50 | protection of databases, and under any national implementation thereof, 51 | including any amended or successor version of such directive); and 52 | 53 | vii. other similar, equivalent or corresponding rights throughout the world 54 | based on applicable law or treaty, and any national implementations thereof. 55 | 56 | 2. Waiver. To the greatest extent permitted by, but not in contravention of, 57 | applicable law, Affirmer hereby overtly, fully, permanently, irrevocably and 58 | unconditionally waives, abandons, and surrenders all of Affirmer's Copyright 59 | and Related Rights and associated claims and causes of action, whether now 60 | known or unknown (including existing as well as future claims and causes of 61 | action), in the Work (i) in all territories worldwide, (ii) for the maximum 62 | duration provided by applicable law or treaty (including future time 63 | extensions), (iii) in any current or future medium and for any number of 64 | copies, and (iv) for any purpose whatsoever, including without limitation 65 | commercial, advertising or promotional purposes (the "Waiver"). Affirmer makes 66 | the Waiver for the benefit of each member of the public at large and to the 67 | detriment of Affirmer's heirs and successors, fully intending that such Waiver 68 | shall not be subject to revocation, rescission, cancellation, termination, or 69 | any other legal or equitable action to disrupt the quiet enjoyment of the Work 70 | by the public as contemplated by Affirmer's express Statement of Purpose. 71 | 72 | 3. Public License Fallback. Should any part of the Waiver for any reason be 73 | judged legally invalid or ineffective under applicable law, then the Waiver 74 | shall be preserved to the maximum extent permitted taking into account 75 | Affirmer's express Statement of Purpose. In addition, to the extent the Waiver 76 | is so judged Affirmer hereby grants to each affected person a royalty-free, 77 | non transferable, non sublicensable, non exclusive, irrevocable and 78 | unconditional license to exercise Affirmer's Copyright and Related Rights in 79 | the Work (i) in all territories worldwide, (ii) for the maximum duration 80 | provided by applicable law or treaty (including future time extensions), (iii) 81 | in any current or future medium and for any number of copies, and (iv) for any 82 | purpose whatsoever, including without limitation commercial, advertising or 83 | promotional purposes (the "License"). The License shall be deemed effective as 84 | of the date CC0 was applied by Affirmer to the Work. Should any part of the 85 | License for any reason be judged legally invalid or ineffective under 86 | applicable law, such partial invalidity or ineffectiveness shall not 87 | invalidate the remainder of the License, and in such case Affirmer hereby 88 | affirms that he or she will not (i) exercise any of his or her remaining 89 | Copyright and Related Rights in the Work or (ii) assert any associated claims 90 | and causes of action with respect to the Work, in either case contrary to 91 | Affirmer's express Statement of Purpose. 92 | 93 | 4. Limitations and Disclaimers. 94 | 95 | a. No trademark or patent rights held by Affirmer are waived, abandoned, 96 | surrendered, licensed or otherwise affected by this document. 97 | 98 | b. Affirmer offers the Work as-is and makes no representations or warranties 99 | of any kind concerning the Work, express, implied, statutory or otherwise, 100 | including without limitation warranties of title, merchantability, fitness 101 | for a particular purpose, non infringement, or the absence of latent or 102 | other defects, accuracy, or the present or absence of errors, whether or not 103 | discoverable, all to the greatest extent permissible under applicable law. 104 | 105 | c. Affirmer disclaims responsibility for clearing rights of other persons 106 | that may apply to the Work or any use thereof, including without limitation 107 | any person's Copyright and Related Rights in the Work. Further, Affirmer 108 | disclaims responsibility for obtaining any necessary consents, permissions 109 | or other rights required for any use of the Work. 110 | 111 | d. Affirmer understands and acknowledges that Creative Commons is not a 112 | party to this document and has no duty or obligation with respect to this 113 | CC0 or use of the Work. 114 | 115 | For more information, please see 116 | 117 | -------------------------------------------------------------------------------- /randomColor.js: -------------------------------------------------------------------------------- 1 | // randomColor by David Merfield under the CC0 license 2 | // https://github.com/davidmerfield/randomColor/ 3 | 4 | (function (root, factory) { 5 | // Support CommonJS 6 | if (typeof exports === "object") { 7 | var randomColor = factory(); 8 | 9 | // Support NodeJS & Component, which allow module.exports to be a function 10 | if (typeof module === "object" && module && module.exports) { 11 | exports = module.exports = randomColor; 12 | } 13 | 14 | // Support CommonJS 1.1.1 spec 15 | exports.randomColor = randomColor; 16 | 17 | // Support AMD 18 | } else if (typeof define === "function" && define.amd) { 19 | define([], factory); 20 | 21 | // Support vanilla script loading 22 | } else { 23 | root.randomColor = factory(); 24 | } 25 | })(this, function () { 26 | // Seed to get repeatable colors 27 | var seed = null; 28 | 29 | // Shared color dictionary 30 | var colorDictionary = {}; 31 | 32 | // Populate the color dictionary 33 | loadColorBounds(); 34 | 35 | // check if a range is taken 36 | var colorRanges = []; 37 | 38 | var randomColor = function (options) { 39 | options = options || {}; 40 | 41 | // Check if there is a seed and ensure it's an 42 | // integer. Otherwise, reset the seed value. 43 | if ( 44 | options.seed !== undefined && 45 | options.seed !== null && 46 | options.seed === parseInt(options.seed, 10) 47 | ) { 48 | seed = options.seed; 49 | 50 | // A string was passed as a seed 51 | } else if (typeof options.seed === "string") { 52 | seed = stringToInteger(options.seed); 53 | 54 | // Something was passed as a seed but it wasn't an integer or string 55 | } else if (options.seed !== undefined && options.seed !== null) { 56 | throw new TypeError("The seed value must be an integer or string"); 57 | 58 | // No seed, reset the value outside. 59 | } else { 60 | seed = null; 61 | } 62 | 63 | var H, S, B; 64 | 65 | // Check if we need to generate multiple colors 66 | if (options.count !== null && options.count !== undefined) { 67 | var totalColors = options.count, 68 | colors = []; 69 | // Value false at index i means the range i is not taken yet. 70 | for (var i = 0; i < options.count; i++) { 71 | colorRanges.push(false); 72 | } 73 | options.count = null; 74 | 75 | while (totalColors > colors.length) { 76 | var color = randomColor(options); 77 | 78 | if (seed !== null) { 79 | options.seed = seed; 80 | } 81 | 82 | colors.push(color); 83 | } 84 | 85 | options.count = totalColors; 86 | 87 | return colors; 88 | } 89 | 90 | // First we pick a hue (H) 91 | H = pickHue(options); 92 | 93 | // Then use H to determine saturation (S) 94 | S = pickSaturation(H, options); 95 | 96 | // Then use S and H to determine brightness (B). 97 | B = pickBrightness(H, S, options); 98 | 99 | // Then we return the HSB color in the desired format 100 | return setFormat([H, S, B], options); 101 | }; 102 | 103 | function pickHue(options) { 104 | if (colorRanges.length > 0) { 105 | var hueRange = getRealHueRange(options.hue); 106 | 107 | var hue = randomWithin(hueRange); 108 | 109 | //Each of colorRanges.length ranges has a length equal approximatelly one step 110 | var step = (hueRange[1] - hueRange[0]) / colorRanges.length; 111 | 112 | var j = parseInt((hue - hueRange[0]) / step); 113 | 114 | //Check if the range j is taken 115 | if (colorRanges[j] === true) { 116 | j = (j + 2) % colorRanges.length; 117 | } else { 118 | colorRanges[j] = true; 119 | } 120 | 121 | var min = (hueRange[0] + j * step) % 359, 122 | max = (hueRange[0] + (j + 1) * step) % 359; 123 | 124 | hueRange = [min, max]; 125 | 126 | hue = randomWithin(hueRange); 127 | 128 | if (hue < 0) { 129 | hue = 360 + hue; 130 | } 131 | return hue; 132 | } else { 133 | var hueRange = getHueRange(options.hue); 134 | 135 | hue = randomWithin(hueRange); 136 | // Instead of storing red as two seperate ranges, 137 | // we group them, using negative numbers 138 | if (hue < 0) { 139 | hue = 360 + hue; 140 | } 141 | 142 | return hue; 143 | } 144 | } 145 | 146 | function pickSaturation(hue, options) { 147 | if (options.hue === "monochrome") { 148 | return 0; 149 | } 150 | 151 | if (options.luminosity === "random") { 152 | return randomWithin([0, 100]); 153 | } 154 | 155 | var saturationRange = getSaturationRange(hue); 156 | 157 | var sMin = saturationRange[0], 158 | sMax = saturationRange[1]; 159 | 160 | switch (options.luminosity) { 161 | case "bright": 162 | sMin = 55; 163 | break; 164 | 165 | case "dark": 166 | sMin = sMax - 10; 167 | break; 168 | 169 | case "light": 170 | sMax = 55; 171 | break; 172 | } 173 | 174 | return randomWithin([sMin, sMax]); 175 | } 176 | 177 | function pickBrightness(H, S, options) { 178 | var bMin = getMinimumBrightness(H, S), 179 | bMax = 100; 180 | 181 | switch (options.luminosity) { 182 | case "dark": 183 | bMax = bMin + 20; 184 | break; 185 | 186 | case "light": 187 | bMin = (bMax + bMin) / 2; 188 | break; 189 | 190 | case "random": 191 | bMin = 0; 192 | bMax = 100; 193 | break; 194 | } 195 | 196 | return randomWithin([bMin, bMax]); 197 | } 198 | 199 | function setFormat(hsv, options) { 200 | switch (options.format) { 201 | case "hsvArray": 202 | return hsv; 203 | 204 | case "hslArray": 205 | return HSVtoHSL(hsv); 206 | 207 | case "hsl": 208 | var hsl = HSVtoHSL(hsv); 209 | return "hsl(" + hsl[0] + ", " + hsl[1] + "%, " + hsl[2] + "%)"; 210 | 211 | case "hsla": 212 | var hslColor = HSVtoHSL(hsv); 213 | var alpha = options.alpha || Math.random(); 214 | return ( 215 | "hsla(" + 216 | hslColor[0] + 217 | ", " + 218 | hslColor[1] + 219 | "%, " + 220 | hslColor[2] + 221 | "%, " + 222 | alpha + 223 | ")" 224 | ); 225 | 226 | case "rgbArray": 227 | return HSVtoRGB(hsv); 228 | 229 | case "rgb": 230 | var rgb = HSVtoRGB(hsv); 231 | return "rgb(" + rgb.join(", ") + ")"; 232 | 233 | case "rgba": 234 | var rgbColor = HSVtoRGB(hsv); 235 | var alpha = options.alpha || Math.random(); 236 | return "rgba(" + rgbColor.join(", ") + ", " + alpha + ")"; 237 | 238 | default: 239 | return HSVtoHex(hsv); 240 | } 241 | } 242 | 243 | function getMinimumBrightness(H, S) { 244 | var lowerBounds = getColorInfo(H).lowerBounds; 245 | 246 | for (var i = 0; i < lowerBounds.length - 1; i++) { 247 | var s1 = lowerBounds[i][0], 248 | v1 = lowerBounds[i][1]; 249 | 250 | var s2 = lowerBounds[i + 1][0], 251 | v2 = lowerBounds[i + 1][1]; 252 | 253 | if (S >= s1 && S <= s2) { 254 | var m = (v2 - v1) / (s2 - s1), 255 | b = v1 - m * s1; 256 | 257 | return m * S + b; 258 | } 259 | } 260 | 261 | return 0; 262 | } 263 | 264 | function getHueRange(colorInput) { 265 | if (typeof parseInt(colorInput) === "number") { 266 | var number = parseInt(colorInput); 267 | 268 | if (number < 360 && number > 0) { 269 | return [number, number]; 270 | } 271 | } 272 | 273 | if (typeof colorInput === "string") { 274 | if (colorDictionary[colorInput]) { 275 | var color = colorDictionary[colorInput]; 276 | if (color.hueRange) { 277 | return color.hueRange; 278 | } 279 | } else if (colorInput.match(/^#?([0-9A-F]{3}|[0-9A-F]{6})$/i)) { 280 | var hue = HexToHSB(colorInput)[0]; 281 | return [hue, hue]; 282 | } 283 | } 284 | 285 | return [0, 360]; 286 | } 287 | 288 | function getSaturationRange(hue) { 289 | return getColorInfo(hue).saturationRange; 290 | } 291 | 292 | function getColorInfo(hue) { 293 | // Maps red colors to make picking hue easier 294 | if (hue >= 334 && hue <= 360) { 295 | hue -= 360; 296 | } 297 | if (hue < 0) { 298 | hue *= -1; 299 | } 300 | 301 | for (var colorName in colorDictionary) { 302 | var color = colorDictionary[colorName]; 303 | if ( 304 | color.hueRange && 305 | hue >= color.hueRange[0] && 306 | hue <= color.hueRange[1] 307 | ) { 308 | return colorDictionary[colorName]; 309 | } 310 | } 311 | return "Color not found"; 312 | } 313 | 314 | function randomWithin(range) { 315 | if (seed === null) { 316 | //generate random evenly destinct number from : https://martin.ankerl.com/2009/12/09/how-to-create-random-colors-programmatically/ 317 | var golden_ratio = 0.618033988749895; 318 | var r = Math.random(); 319 | r += golden_ratio; 320 | r %= 1; 321 | return Math.floor(range[0] + r * (range[1] + 1 - range[0])); 322 | } else { 323 | //Seeded random algorithm from http://indiegamr.com/generate-repeatable-random-numbers-in-js/ 324 | var max = range[1] || 1; 325 | var min = range[0] || 0; 326 | seed = (seed * 9301 + 49297) % 233280; 327 | var rnd = seed / 233280.0; 328 | return Math.floor(min + rnd * (max - min)); 329 | } 330 | } 331 | 332 | function HSVtoHex(hsv) { 333 | var rgb = HSVtoRGB(hsv); 334 | 335 | function componentToHex(c) { 336 | var hex = c.toString(16); 337 | return hex.length == 1 ? "0" + hex : hex; 338 | } 339 | 340 | var hex = 341 | "#" + 342 | componentToHex(rgb[0]) + 343 | componentToHex(rgb[1]) + 344 | componentToHex(rgb[2]); 345 | 346 | return hex; 347 | } 348 | 349 | function defineColor(name, hueRange, lowerBounds) { 350 | var sMin = lowerBounds[0][0], 351 | sMax = lowerBounds[lowerBounds.length - 1][0], 352 | bMin = lowerBounds[lowerBounds.length - 1][1], 353 | bMax = lowerBounds[0][1]; 354 | 355 | colorDictionary[name] = { 356 | hueRange: hueRange, 357 | lowerBounds: lowerBounds, 358 | saturationRange: [sMin, sMax], 359 | brightnessRange: [bMin, bMax], 360 | }; 361 | } 362 | 363 | function loadColorBounds() { 364 | defineColor("monochrome", null, [ 365 | [0, 0], 366 | [100, 0], 367 | ]); 368 | 369 | defineColor( 370 | "red", 371 | [-26, 18], 372 | [ 373 | [20, 100], 374 | [30, 92], 375 | [40, 89], 376 | [50, 85], 377 | [60, 78], 378 | [70, 70], 379 | [80, 60], 380 | [90, 55], 381 | [100, 50], 382 | ] 383 | ); 384 | 385 | defineColor( 386 | "orange", 387 | [18, 46], 388 | [ 389 | [20, 100], 390 | [30, 93], 391 | [40, 88], 392 | [50, 86], 393 | [60, 85], 394 | [70, 70], 395 | [100, 70], 396 | ] 397 | ); 398 | 399 | defineColor( 400 | "yellow", 401 | [46, 62], 402 | [ 403 | [25, 100], 404 | [40, 94], 405 | [50, 89], 406 | [60, 86], 407 | [70, 84], 408 | [80, 82], 409 | [90, 80], 410 | [100, 75], 411 | ] 412 | ); 413 | 414 | defineColor( 415 | "green", 416 | [62, 178], 417 | [ 418 | [30, 100], 419 | [40, 90], 420 | [50, 85], 421 | [60, 81], 422 | [70, 74], 423 | [80, 64], 424 | [90, 50], 425 | [100, 40], 426 | ] 427 | ); 428 | 429 | defineColor( 430 | "blue", 431 | [178, 257], 432 | [ 433 | [20, 100], 434 | [30, 86], 435 | [40, 80], 436 | [50, 74], 437 | [60, 60], 438 | [70, 52], 439 | [80, 44], 440 | [90, 39], 441 | [100, 35], 442 | ] 443 | ); 444 | 445 | defineColor( 446 | "purple", 447 | [257, 282], 448 | [ 449 | [20, 100], 450 | [30, 87], 451 | [40, 79], 452 | [50, 70], 453 | [60, 65], 454 | [70, 59], 455 | [80, 52], 456 | [90, 45], 457 | [100, 42], 458 | ] 459 | ); 460 | 461 | defineColor( 462 | "pink", 463 | [282, 334], 464 | [ 465 | [20, 100], 466 | [30, 90], 467 | [40, 86], 468 | [60, 84], 469 | [80, 80], 470 | [90, 75], 471 | [100, 73], 472 | ] 473 | ); 474 | } 475 | 476 | function HSVtoRGB(hsv) { 477 | // this doesn't work for the values of 0 and 360 478 | // here's the hacky fix 479 | var h = hsv[0]; 480 | if (h === 0) { 481 | h = 1; 482 | } 483 | if (h === 360) { 484 | h = 359; 485 | } 486 | 487 | // Rebase the h,s,v values 488 | h = h / 360; 489 | var s = hsv[1] / 100, 490 | v = hsv[2] / 100; 491 | 492 | var h_i = Math.floor(h * 6), 493 | f = h * 6 - h_i, 494 | p = v * (1 - s), 495 | q = v * (1 - f * s), 496 | t = v * (1 - (1 - f) * s), 497 | r = 256, 498 | g = 256, 499 | b = 256; 500 | 501 | switch (h_i) { 502 | case 0: 503 | r = v; 504 | g = t; 505 | b = p; 506 | break; 507 | case 1: 508 | r = q; 509 | g = v; 510 | b = p; 511 | break; 512 | case 2: 513 | r = p; 514 | g = v; 515 | b = t; 516 | break; 517 | case 3: 518 | r = p; 519 | g = q; 520 | b = v; 521 | break; 522 | case 4: 523 | r = t; 524 | g = p; 525 | b = v; 526 | break; 527 | case 5: 528 | r = v; 529 | g = p; 530 | b = q; 531 | break; 532 | } 533 | 534 | var result = [ 535 | Math.floor(r * 255), 536 | Math.floor(g * 255), 537 | Math.floor(b * 255), 538 | ]; 539 | return result; 540 | } 541 | 542 | function HexToHSB(hex) { 543 | hex = hex.replace(/^#/, ""); 544 | hex = hex.length === 3 ? hex.replace(/(.)/g, "$1$1") : hex; 545 | 546 | var red = parseInt(hex.substr(0, 2), 16) / 255, 547 | green = parseInt(hex.substr(2, 2), 16) / 255, 548 | blue = parseInt(hex.substr(4, 2), 16) / 255; 549 | 550 | var cMax = Math.max(red, green, blue), 551 | delta = cMax - Math.min(red, green, blue), 552 | saturation = cMax ? delta / cMax : 0; 553 | 554 | switch (cMax) { 555 | case red: 556 | return [60 * (((green - blue) / delta) % 6) || 0, saturation, cMax]; 557 | case green: 558 | return [60 * ((blue - red) / delta + 2) || 0, saturation, cMax]; 559 | case blue: 560 | return [60 * ((red - green) / delta + 4) || 0, saturation, cMax]; 561 | } 562 | } 563 | 564 | function HSVtoHSL(hsv) { 565 | var h = hsv[0], 566 | s = hsv[1] / 100, 567 | v = hsv[2] / 100, 568 | k = (2 - s) * v; 569 | 570 | return [ 571 | h, 572 | Math.round(((s * v) / (k < 1 ? k : 2 - k)) * 10000) / 100, 573 | (k / 2) * 100, 574 | ]; 575 | } 576 | 577 | function stringToInteger(string) { 578 | var total = 0; 579 | for (var i = 0; i !== string.length; i++) { 580 | if (total >= Number.MAX_SAFE_INTEGER) break; 581 | total += string.charCodeAt(i); 582 | } 583 | return total; 584 | } 585 | 586 | // get The range of given hue when options.count!=0 587 | function getRealHueRange(colorHue) { 588 | if (!isNaN(colorHue)) { 589 | var number = parseInt(colorHue); 590 | 591 | if (number < 360 && number > 0) { 592 | return getColorInfo(colorHue).hueRange; 593 | } 594 | } else if (typeof colorHue === "string") { 595 | if (colorDictionary[colorHue]) { 596 | var color = colorDictionary[colorHue]; 597 | 598 | if (color.hueRange) { 599 | return color.hueRange; 600 | } 601 | } else if (colorHue.match(/^#?([0-9A-F]{3}|[0-9A-F]{6})$/i)) { 602 | var hue = HexToHSB(colorHue)[0]; 603 | return getColorInfo(hue).hueRange; 604 | } 605 | } 606 | 607 | return [0, 360]; 608 | } 609 | return randomColor; 610 | }); 611 | -------------------------------------------------------------------------------- /demo/package-lock.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "randomcolor-demo", 3 | "lockfileVersion": 2, 4 | "requires": true, 5 | "packages": { 6 | "": { 7 | "name": "randomcolor-demo", 8 | "license": "CC0", 9 | "dependencies": { 10 | "cheerio": "^1.0.0-rc.12", 11 | "clean-css": "^4.1.11", 12 | "esbuild": "^0.19.0", 13 | "fs-extra": "^5.0.0", 14 | "highlight": "^0.2.3", 15 | "highlight.js": "^11.8.0", 16 | "html-minifier": "^4.0.0", 17 | "typeset": "^0.2.6" 18 | } 19 | }, 20 | "node_modules/@esbuild/android-arm": { 21 | "version": "0.19.0", 22 | "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.19.0.tgz", 23 | "integrity": "sha512-GAkjUyHgWTYuex3evPd5V7uV/XS4LMKr1PWHRPW1xNyy/Jx08x3uTrDFRefBYLKT/KpaWM8/YMQcwbp5a3yIDA==", 24 | "cpu": [ 25 | "arm" 26 | ], 27 | "optional": true, 28 | "os": [ 29 | "android" 30 | ], 31 | "engines": { 32 | "node": ">=12" 33 | } 34 | }, 35 | "node_modules/@esbuild/android-arm64": { 36 | "version": "0.19.0", 37 | "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.19.0.tgz", 38 | "integrity": "sha512-AzsozJnB+RNaDncBCs3Ys5g3kqhPFUueItfEaCpp89JH2naFNX2mYDIvUgPYMqqjm8hiFoo+jklb3QHZyR3ubw==", 39 | "cpu": [ 40 | "arm64" 41 | ], 42 | "optional": true, 43 | "os": [ 44 | "android" 45 | ], 46 | "engines": { 47 | "node": ">=12" 48 | } 49 | }, 50 | "node_modules/@esbuild/android-x64": { 51 | "version": "0.19.0", 52 | "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.19.0.tgz", 53 | "integrity": "sha512-SUG8/qiVhljBDpdkHQ9DvOWbp7hFFIP0OzxOTptbmVsgBgzY6JWowmMd6yJuOhapfxmj/DrvwKmjRLvVSIAKZg==", 54 | "cpu": [ 55 | "x64" 56 | ], 57 | "optional": true, 58 | "os": [ 59 | "android" 60 | ], 61 | "engines": { 62 | "node": ">=12" 63 | } 64 | }, 65 | "node_modules/@esbuild/darwin-arm64": { 66 | "version": "0.19.0", 67 | "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.19.0.tgz", 68 | "integrity": "sha512-HkxZ8k3Jvcw0FORPNTavA8BMgQjLOB6AajT+iXmil7BwY3gU1hWvJJAyWyEogCmA4LdbGvKF8vEykdmJ4xNJJQ==", 69 | "cpu": [ 70 | "arm64" 71 | ], 72 | "optional": true, 73 | "os": [ 74 | "darwin" 75 | ], 76 | "engines": { 77 | "node": ">=12" 78 | } 79 | }, 80 | "node_modules/@esbuild/darwin-x64": { 81 | "version": "0.19.0", 82 | "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.19.0.tgz", 83 | "integrity": "sha512-9IRWJjqpWFHM9a5Qs3r3bK834NCFuDY5ZaLrmTjqE+10B6w65UMQzeZjh794JcxpHolsAHqwsN/33crUXNCM2Q==", 84 | "cpu": [ 85 | "x64" 86 | ], 87 | "optional": true, 88 | "os": [ 89 | "darwin" 90 | ], 91 | "engines": { 92 | "node": ">=12" 93 | } 94 | }, 95 | "node_modules/@esbuild/freebsd-arm64": { 96 | "version": "0.19.0", 97 | "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.19.0.tgz", 98 | "integrity": "sha512-s7i2WcXcK0V1PJHVBe7NsGddsL62a9Vhpz2U7zapPrwKoFuxPP9jybwX8SXnropR/AOj3ppt2ern4ItblU6UQQ==", 99 | "cpu": [ 100 | "arm64" 101 | ], 102 | "optional": true, 103 | "os": [ 104 | "freebsd" 105 | ], 106 | "engines": { 107 | "node": ">=12" 108 | } 109 | }, 110 | "node_modules/@esbuild/freebsd-x64": { 111 | "version": "0.19.0", 112 | "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.19.0.tgz", 113 | "integrity": "sha512-NMdBSSdgwHCqCsucU5k1xflIIRU0qi1QZnM6+vdGy5fvxm1c8rKh50VzsWsIVTFUG3l91AtRxVwoz3Lcvy3I5w==", 114 | "cpu": [ 115 | "x64" 116 | ], 117 | "optional": true, 118 | "os": [ 119 | "freebsd" 120 | ], 121 | "engines": { 122 | "node": ">=12" 123 | } 124 | }, 125 | "node_modules/@esbuild/linux-arm": { 126 | "version": "0.19.0", 127 | "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.19.0.tgz", 128 | "integrity": "sha512-2F1+lH7ZBcCcgxiSs8EXQV0PPJJdTNiNcXxDb61vzxTRJJkXX1I/ye9mAhfHyScXzHaEibEXg1Jq9SW586zz7w==", 129 | "cpu": [ 130 | "arm" 131 | ], 132 | "optional": true, 133 | "os": [ 134 | "linux" 135 | ], 136 | "engines": { 137 | "node": ">=12" 138 | } 139 | }, 140 | "node_modules/@esbuild/linux-arm64": { 141 | "version": "0.19.0", 142 | "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.19.0.tgz", 143 | "integrity": "sha512-I4zvE2srSZxRPapFnNqj+NL3sDJ1wkvEZqt903OZUlBBgigrQMvzUowvP/TTTu2OGYe1oweg5MFilfyrElIFag==", 144 | "cpu": [ 145 | "arm64" 146 | ], 147 | "optional": true, 148 | "os": [ 149 | "linux" 150 | ], 151 | "engines": { 152 | "node": ">=12" 153 | } 154 | }, 155 | "node_modules/@esbuild/linux-ia32": { 156 | "version": "0.19.0", 157 | "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.19.0.tgz", 158 | "integrity": "sha512-dz2Q7+P92r1Evc8kEN+cQnB3qqPjmCrOZ+EdBTn8lEc1yN8WDgaDORQQiX+mxaijbH8npXBT9GxUqE52Gt6Y+g==", 159 | "cpu": [ 160 | "ia32" 161 | ], 162 | "optional": true, 163 | "os": [ 164 | "linux" 165 | ], 166 | "engines": { 167 | "node": ">=12" 168 | } 169 | }, 170 | "node_modules/@esbuild/linux-loong64": { 171 | "version": "0.19.0", 172 | "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.19.0.tgz", 173 | "integrity": "sha512-IcVJovJVflih4oFahhUw+N7YgNbuMSVFNr38awb0LNzfaiIfdqIh518nOfYaNQU3aVfiJnOIRVJDSAP4k35WxA==", 174 | "cpu": [ 175 | "loong64" 176 | ], 177 | "optional": true, 178 | "os": [ 179 | "linux" 180 | ], 181 | "engines": { 182 | "node": ">=12" 183 | } 184 | }, 185 | "node_modules/@esbuild/linux-mips64el": { 186 | "version": "0.19.0", 187 | "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.19.0.tgz", 188 | "integrity": "sha512-bZGRAGySMquWsKw0gIdsClwfvgbsSq/7oq5KVu1H1r9Il+WzOcfkV1hguntIuBjRVL8agI95i4AukjdAV2YpUw==", 189 | "cpu": [ 190 | "mips64el" 191 | ], 192 | "optional": true, 193 | "os": [ 194 | "linux" 195 | ], 196 | "engines": { 197 | "node": ">=12" 198 | } 199 | }, 200 | "node_modules/@esbuild/linux-ppc64": { 201 | "version": "0.19.0", 202 | "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.19.0.tgz", 203 | "integrity": "sha512-3LC6H5/gCDorxoRBUdpLV/m7UthYSdar0XcCu+ypycQxMS08MabZ06y1D1yZlDzL/BvOYliRNRWVG/YJJvQdbg==", 204 | "cpu": [ 205 | "ppc64" 206 | ], 207 | "optional": true, 208 | "os": [ 209 | "linux" 210 | ], 211 | "engines": { 212 | "node": ">=12" 213 | } 214 | }, 215 | "node_modules/@esbuild/linux-riscv64": { 216 | "version": "0.19.0", 217 | "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.19.0.tgz", 218 | "integrity": "sha512-jfvdKjWk+Cp2sgLtEEdSHXO7qckrw2B2eFBaoRdmfhThqZs29GMMg7q/LsQpybA7BxCLLEs4di5ucsWzZC5XPA==", 219 | "cpu": [ 220 | "riscv64" 221 | ], 222 | "optional": true, 223 | "os": [ 224 | "linux" 225 | ], 226 | "engines": { 227 | "node": ">=12" 228 | } 229 | }, 230 | "node_modules/@esbuild/linux-s390x": { 231 | "version": "0.19.0", 232 | "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.19.0.tgz", 233 | "integrity": "sha512-ofcucfNLkoXmcnJaw9ugdEOf40AWKGt09WBFCkpor+vFJVvmk/8OPjl/qRtks2Z7BuZbG3ztJuK1zS9z5Cgx9A==", 234 | "cpu": [ 235 | "s390x" 236 | ], 237 | "optional": true, 238 | "os": [ 239 | "linux" 240 | ], 241 | "engines": { 242 | "node": ">=12" 243 | } 244 | }, 245 | "node_modules/@esbuild/linux-x64": { 246 | "version": "0.19.0", 247 | "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.19.0.tgz", 248 | "integrity": "sha512-Fpf7zNDBti3xrQKQKLdXT0hTyOxgFdRJIMtNy8x1az9ATR9/GJ1brYbB/GLWoXhKiHsoWs+2DLkFVNNMTCLEwA==", 249 | "cpu": [ 250 | "x64" 251 | ], 252 | "optional": true, 253 | "os": [ 254 | "linux" 255 | ], 256 | "engines": { 257 | "node": ">=12" 258 | } 259 | }, 260 | "node_modules/@esbuild/netbsd-x64": { 261 | "version": "0.19.0", 262 | "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.19.0.tgz", 263 | "integrity": "sha512-AMQAp/5oENgDOvVhvOlbhVe1pWii7oFAMRHlmTjSEMcpjTpIHtFXhv9uAFgUERHm3eYtNvS9Vf+gT55cwuI6Aw==", 264 | "cpu": [ 265 | "x64" 266 | ], 267 | "optional": true, 268 | "os": [ 269 | "netbsd" 270 | ], 271 | "engines": { 272 | "node": ">=12" 273 | } 274 | }, 275 | "node_modules/@esbuild/openbsd-x64": { 276 | "version": "0.19.0", 277 | "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.19.0.tgz", 278 | "integrity": "sha512-fDztEve1QUs3h/Dw2AUmBlWGkNQbhDoD05ppm5jKvzQv+HVuV13so7m5RYeiSMIC2XQy7PAjZh+afkxAnCRZxA==", 279 | "cpu": [ 280 | "x64" 281 | ], 282 | "optional": true, 283 | "os": [ 284 | "openbsd" 285 | ], 286 | "engines": { 287 | "node": ">=12" 288 | } 289 | }, 290 | "node_modules/@esbuild/sunos-x64": { 291 | "version": "0.19.0", 292 | "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.19.0.tgz", 293 | "integrity": "sha512-bKZzJ2/rvUjDzA5Ddyva2tMk89WzNJEibZEaq+wY6SiqPlwgFbqyQLimouxLHiHh1itb5P3SNCIF1bc2bw5H9w==", 294 | "cpu": [ 295 | "x64" 296 | ], 297 | "optional": true, 298 | "os": [ 299 | "sunos" 300 | ], 301 | "engines": { 302 | "node": ">=12" 303 | } 304 | }, 305 | "node_modules/@esbuild/win32-arm64": { 306 | "version": "0.19.0", 307 | "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.19.0.tgz", 308 | "integrity": "sha512-NQJ+4jmnA79saI+sE+QzcEls19uZkoEmdxo7r//PDOjIpX8pmoWtTnWg6XcbnO7o4fieyAwb5U2LvgWynF4diA==", 309 | "cpu": [ 310 | "arm64" 311 | ], 312 | "optional": true, 313 | "os": [ 314 | "win32" 315 | ], 316 | "engines": { 317 | "node": ">=12" 318 | } 319 | }, 320 | "node_modules/@esbuild/win32-ia32": { 321 | "version": "0.19.0", 322 | "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.19.0.tgz", 323 | "integrity": "sha512-uyxiZAnsfu9diHm9/rIH2soecF/HWLXYUhJKW4q1+/LLmNQ+55lRjvSUDhUmsgJtSUscRJB/3S4RNiTb9o9mCg==", 324 | "cpu": [ 325 | "ia32" 326 | ], 327 | "optional": true, 328 | "os": [ 329 | "win32" 330 | ], 331 | "engines": { 332 | "node": ">=12" 333 | } 334 | }, 335 | "node_modules/@esbuild/win32-x64": { 336 | "version": "0.19.0", 337 | "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.19.0.tgz", 338 | "integrity": "sha512-jl+NXUjK2StMgqnZnqgNjZuerFG8zQqWXMBZdMMv4W/aO1ZKQaYWZBxTrtWKphkCBVEMh0wMVfGgOd2BjOZqUQ==", 339 | "cpu": [ 340 | "x64" 341 | ], 342 | "optional": true, 343 | "os": [ 344 | "win32" 345 | ], 346 | "engines": { 347 | "node": ">=12" 348 | } 349 | }, 350 | "node_modules/boolbase": { 351 | "version": "1.0.0", 352 | "resolved": "https://registry.npmjs.org/boolbase/-/boolbase-1.0.0.tgz", 353 | "integrity": "sha512-JZOSA7Mo9sNGB8+UjSgzdLtokWAky1zbztM3WRLCbZ70/3cTANmQmOdR7y2g+J0e2WXywy1yS468tY+IruqEww==" 354 | }, 355 | "node_modules/camel-case": { 356 | "version": "3.0.0", 357 | "resolved": "https://registry.npmjs.org/camel-case/-/camel-case-3.0.0.tgz", 358 | "integrity": "sha512-+MbKztAYHXPr1jNTSKQF52VpcFjwY5RkR7fxksV8Doo4KAYc5Fl4UJRgthBbTmEx8C54DqahhbLJkDwjI3PI/w==", 359 | "dependencies": { 360 | "no-case": "^2.2.0", 361 | "upper-case": "^1.1.1" 362 | } 363 | }, 364 | "node_modules/cheerio": { 365 | "version": "1.0.0-rc.12", 366 | "resolved": "https://registry.npmjs.org/cheerio/-/cheerio-1.0.0-rc.12.tgz", 367 | "integrity": "sha512-VqR8m68vM46BNnuZ5NtnGBKIE/DfN0cRIzg9n40EIq9NOv90ayxLBXA8fXC5gquFRGJSTRqBq25Jt2ECLR431Q==", 368 | "dependencies": { 369 | "cheerio-select": "^2.1.0", 370 | "dom-serializer": "^2.0.0", 371 | "domhandler": "^5.0.3", 372 | "domutils": "^3.0.1", 373 | "htmlparser2": "^8.0.1", 374 | "parse5": "^7.0.0", 375 | "parse5-htmlparser2-tree-adapter": "^7.0.0" 376 | }, 377 | "engines": { 378 | "node": ">= 6" 379 | }, 380 | "funding": { 381 | "url": "https://github.com/cheeriojs/cheerio?sponsor=1" 382 | } 383 | }, 384 | "node_modules/cheerio-select": { 385 | "version": "2.1.0", 386 | "resolved": "https://registry.npmjs.org/cheerio-select/-/cheerio-select-2.1.0.tgz", 387 | "integrity": "sha512-9v9kG0LvzrlcungtnJtpGNxY+fzECQKhK4EGJX2vByejiMX84MFNQw4UxPJl3bFbTMw+Dfs37XaIkCwTZfLh4g==", 388 | "dependencies": { 389 | "boolbase": "^1.0.0", 390 | "css-select": "^5.1.0", 391 | "css-what": "^6.1.0", 392 | "domelementtype": "^2.3.0", 393 | "domhandler": "^5.0.3", 394 | "domutils": "^3.0.1" 395 | }, 396 | "funding": { 397 | "url": "https://github.com/sponsors/fb55" 398 | } 399 | }, 400 | "node_modules/clean-css": { 401 | "version": "4.2.4", 402 | "resolved": "https://registry.npmjs.org/clean-css/-/clean-css-4.2.4.tgz", 403 | "integrity": "sha512-EJUDT7nDVFDvaQgAo2G/PJvxmp1o/c6iXLbswsBbUFXi1Nr+AjA2cKmfbKDMjMvzEe75g3P6JkaDDAKk96A85A==", 404 | "dependencies": { 405 | "source-map": "~0.6.0" 406 | }, 407 | "engines": { 408 | "node": ">= 4.0" 409 | } 410 | }, 411 | "node_modules/commander": { 412 | "version": "2.20.3", 413 | "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", 414 | "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==" 415 | }, 416 | "node_modules/css-select": { 417 | "version": "5.1.0", 418 | "resolved": "https://registry.npmjs.org/css-select/-/css-select-5.1.0.tgz", 419 | "integrity": "sha512-nwoRF1rvRRnnCqqY7updORDsuqKzqYJ28+oSMaJMMgOauh3fvwHqMS7EZpIPqK8GL+g9mKxF1vP/ZjSeNjEVHg==", 420 | "dependencies": { 421 | "boolbase": "^1.0.0", 422 | "css-what": "^6.1.0", 423 | "domhandler": "^5.0.2", 424 | "domutils": "^3.0.1", 425 | "nth-check": "^2.0.1" 426 | }, 427 | "funding": { 428 | "url": "https://github.com/sponsors/fb55" 429 | } 430 | }, 431 | "node_modules/css-what": { 432 | "version": "6.1.0", 433 | "resolved": "https://registry.npmjs.org/css-what/-/css-what-6.1.0.tgz", 434 | "integrity": "sha512-HTUrgRJ7r4dsZKU6GjmpfRK1O76h97Z8MfS1G0FozR+oF2kG6Vfe8JE6zwrkbxigziPHinCJ+gCPjA9EaBDtRw==", 435 | "engines": { 436 | "node": ">= 6" 437 | }, 438 | "funding": { 439 | "url": "https://github.com/sponsors/fb55" 440 | } 441 | }, 442 | "node_modules/dom-serializer": { 443 | "version": "2.0.0", 444 | "resolved": "https://registry.npmjs.org/dom-serializer/-/dom-serializer-2.0.0.tgz", 445 | "integrity": "sha512-wIkAryiqt/nV5EQKqQpo3SToSOV9J0DnbJqwK7Wv/Trc92zIAYZ4FlMu+JPFW1DfGFt81ZTCGgDEabffXeLyJg==", 446 | "dependencies": { 447 | "domelementtype": "^2.3.0", 448 | "domhandler": "^5.0.2", 449 | "entities": "^4.2.0" 450 | }, 451 | "funding": { 452 | "url": "https://github.com/cheeriojs/dom-serializer?sponsor=1" 453 | } 454 | }, 455 | "node_modules/domelementtype": { 456 | "version": "2.3.0", 457 | "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-2.3.0.tgz", 458 | "integrity": "sha512-OLETBj6w0OsagBwdXnPdN0cnMfF9opN69co+7ZrbfPGrdpPVNBUj02spi6B1N7wChLQiPn4CSH/zJvXw56gmHw==", 459 | "funding": [ 460 | { 461 | "type": "github", 462 | "url": "https://github.com/sponsors/fb55" 463 | } 464 | ] 465 | }, 466 | "node_modules/domhandler": { 467 | "version": "5.0.3", 468 | "resolved": "https://registry.npmjs.org/domhandler/-/domhandler-5.0.3.tgz", 469 | "integrity": "sha512-cgwlv/1iFQiFnU96XXgROh8xTeetsnJiDsTc7TYCLFd9+/WNkIqPTxiM/8pSd8VIrhXGTf1Ny1q1hquVqDJB5w==", 470 | "dependencies": { 471 | "domelementtype": "^2.3.0" 472 | }, 473 | "engines": { 474 | "node": ">= 4" 475 | }, 476 | "funding": { 477 | "url": "https://github.com/fb55/domhandler?sponsor=1" 478 | } 479 | }, 480 | "node_modules/domutils": { 481 | "version": "3.1.0", 482 | "resolved": "https://registry.npmjs.org/domutils/-/domutils-3.1.0.tgz", 483 | "integrity": "sha512-H78uMmQtI2AhgDJjWeQmHwJJ2bLPD3GMmO7Zja/ZZh84wkm+4ut+IUnUdRa8uCGX88DiVx1j6FRe1XfxEgjEZA==", 484 | "dependencies": { 485 | "dom-serializer": "^2.0.0", 486 | "domelementtype": "^2.3.0", 487 | "domhandler": "^5.0.3" 488 | }, 489 | "funding": { 490 | "url": "https://github.com/fb55/domutils?sponsor=1" 491 | } 492 | }, 493 | "node_modules/entities": { 494 | "version": "4.5.0", 495 | "resolved": "https://registry.npmjs.org/entities/-/entities-4.5.0.tgz", 496 | "integrity": "sha512-V0hjH4dGPh9Ao5p0MoRY6BVqtwCjhz6vI5LT8AJ55H+4g9/4vbHx1I54fS0XuclLhDHArPQCiMjDxjaL8fPxhw==", 497 | "engines": { 498 | "node": ">=0.12" 499 | }, 500 | "funding": { 501 | "url": "https://github.com/fb55/entities?sponsor=1" 502 | } 503 | }, 504 | "node_modules/esbuild": { 505 | "version": "0.19.0", 506 | "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.19.0.tgz", 507 | "integrity": "sha512-i7i8TP4vuG55bKeLyqqk5sTPu1ZjPH3wkcLvAj/0X/222iWFo3AJUYRKjbOoY6BWFMH3teizxHEdV9Su5ESl0w==", 508 | "hasInstallScript": true, 509 | "bin": { 510 | "esbuild": "bin/esbuild" 511 | }, 512 | "engines": { 513 | "node": ">=12" 514 | }, 515 | "optionalDependencies": { 516 | "@esbuild/android-arm": "0.19.0", 517 | "@esbuild/android-arm64": "0.19.0", 518 | "@esbuild/android-x64": "0.19.0", 519 | "@esbuild/darwin-arm64": "0.19.0", 520 | "@esbuild/darwin-x64": "0.19.0", 521 | "@esbuild/freebsd-arm64": "0.19.0", 522 | "@esbuild/freebsd-x64": "0.19.0", 523 | "@esbuild/linux-arm": "0.19.0", 524 | "@esbuild/linux-arm64": "0.19.0", 525 | "@esbuild/linux-ia32": "0.19.0", 526 | "@esbuild/linux-loong64": "0.19.0", 527 | "@esbuild/linux-mips64el": "0.19.0", 528 | "@esbuild/linux-ppc64": "0.19.0", 529 | "@esbuild/linux-riscv64": "0.19.0", 530 | "@esbuild/linux-s390x": "0.19.0", 531 | "@esbuild/linux-x64": "0.19.0", 532 | "@esbuild/netbsd-x64": "0.19.0", 533 | "@esbuild/openbsd-x64": "0.19.0", 534 | "@esbuild/sunos-x64": "0.19.0", 535 | "@esbuild/win32-arm64": "0.19.0", 536 | "@esbuild/win32-ia32": "0.19.0", 537 | "@esbuild/win32-x64": "0.19.0" 538 | } 539 | }, 540 | "node_modules/fs-extra": { 541 | "version": "5.0.0", 542 | "license": "MIT", 543 | "dependencies": { 544 | "graceful-fs": "^4.1.2", 545 | "jsonfile": "^4.0.0", 546 | "universalify": "^0.1.0" 547 | } 548 | }, 549 | "node_modules/fs-extra/node_modules/jsonfile": { 550 | "version": "4.0.0", 551 | "license": "MIT", 552 | "optionalDependencies": { 553 | "graceful-fs": "^4.1.6" 554 | } 555 | }, 556 | "node_modules/fs-extra/node_modules/universalify": { 557 | "version": "0.1.1", 558 | "license": "MIT" 559 | }, 560 | "node_modules/graceful-fs": { 561 | "version": "4.2.11", 562 | "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz", 563 | "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==" 564 | }, 565 | "node_modules/he": { 566 | "version": "1.2.0", 567 | "resolved": "https://registry.npmjs.org/he/-/he-1.2.0.tgz", 568 | "integrity": "sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==", 569 | "bin": { 570 | "he": "bin/he" 571 | } 572 | }, 573 | "node_modules/highlight": { 574 | "version": "0.2.4", 575 | "deprecated": "Not maintained anymore" 576 | }, 577 | "node_modules/highlight.js": { 578 | "version": "11.8.0", 579 | "resolved": "https://registry.npmjs.org/highlight.js/-/highlight.js-11.8.0.tgz", 580 | "integrity": "sha512-MedQhoqVdr0U6SSnWPzfiadUcDHfN/Wzq25AkXiQv9oiOO/sG0S7XkvpFIqWBl9Yq1UYyYOOVORs5UW2XlPyzg==", 581 | "engines": { 582 | "node": ">=12.0.0" 583 | } 584 | }, 585 | "node_modules/html-entities": { 586 | "version": "1.2.1", 587 | "resolved": "https://registry.npmjs.org/html-entities/-/html-entities-1.2.1.tgz", 588 | "integrity": "sha512-LSGr3unsIfdtmwikBiTnJGuqn8lvv/wbNveg42owC3EhR0ZddBTkGW4ReqqQ7DB6QWUFhqMWbYuldgAuZJZcdw==", 589 | "engines": [ 590 | "node >= 0.4.0" 591 | ] 592 | }, 593 | "node_modules/html-minifier": { 594 | "version": "4.0.0", 595 | "resolved": "https://registry.npmjs.org/html-minifier/-/html-minifier-4.0.0.tgz", 596 | "integrity": "sha512-aoGxanpFPLg7MkIl/DDFYtb0iWz7jMFGqFhvEDZga6/4QTjneiD8I/NXL1x5aaoCp7FSIT6h/OhykDdPsbtMig==", 597 | "dependencies": { 598 | "camel-case": "^3.0.0", 599 | "clean-css": "^4.2.1", 600 | "commander": "^2.19.0", 601 | "he": "^1.2.0", 602 | "param-case": "^2.1.1", 603 | "relateurl": "^0.2.7", 604 | "uglify-js": "^3.5.1" 605 | }, 606 | "bin": { 607 | "html-minifier": "cli.js" 608 | }, 609 | "engines": { 610 | "node": ">=6" 611 | } 612 | }, 613 | "node_modules/html-minifier/node_modules/relateurl": { 614 | "version": "0.2.7", 615 | "license": "MIT", 616 | "engines": { 617 | "node": ">= 0.10" 618 | } 619 | }, 620 | "node_modules/htmlparser2": { 621 | "version": "8.0.2", 622 | "resolved": "https://registry.npmjs.org/htmlparser2/-/htmlparser2-8.0.2.tgz", 623 | "integrity": "sha512-GYdjWKDkbRLkZ5geuHs5NY1puJ+PXwP7+fHPRz06Eirsb9ugf6d8kkXav6ADhcODhFFPMIXyxkxSuMf3D6NCFA==", 624 | "funding": [ 625 | "https://github.com/fb55/htmlparser2?sponsor=1", 626 | { 627 | "type": "github", 628 | "url": "https://github.com/sponsors/fb55" 629 | } 630 | ], 631 | "dependencies": { 632 | "domelementtype": "^2.3.0", 633 | "domhandler": "^5.0.3", 634 | "domutils": "^3.0.1", 635 | "entities": "^4.4.0" 636 | } 637 | }, 638 | "node_modules/lower-case": { 639 | "version": "1.1.4", 640 | "resolved": "https://registry.npmjs.org/lower-case/-/lower-case-1.1.4.tgz", 641 | "integrity": "sha512-2Fgx1Ycm599x+WGpIYwJOvsjmXFzTSc34IwDWALRA/8AopUKAVPwfJ+h5+f85BCp0PWmmJcWzEpxOpoXycMpdA==" 642 | }, 643 | "node_modules/no-case": { 644 | "version": "2.3.2", 645 | "resolved": "https://registry.npmjs.org/no-case/-/no-case-2.3.2.tgz", 646 | "integrity": "sha512-rmTZ9kz+f3rCvK2TD1Ue/oZlns7OGoIWP4fc3llxxRXlOkHKoWPPWJOfFYpITabSow43QJbRIoHQXtt10VldyQ==", 647 | "dependencies": { 648 | "lower-case": "^1.1.1" 649 | } 650 | }, 651 | "node_modules/nth-check": { 652 | "version": "2.1.1", 653 | "resolved": "https://registry.npmjs.org/nth-check/-/nth-check-2.1.1.tgz", 654 | "integrity": "sha512-lqjrjmaOoAnWfMmBPL+XNnynZh2+swxiX3WUE0s4yEHI6m+AwrK2UZOimIRl3X/4QctVqS8AiZjFqyOGrMXb/w==", 655 | "dependencies": { 656 | "boolbase": "^1.0.0" 657 | }, 658 | "funding": { 659 | "url": "https://github.com/fb55/nth-check?sponsor=1" 660 | } 661 | }, 662 | "node_modules/param-case": { 663 | "version": "2.1.1", 664 | "resolved": "https://registry.npmjs.org/param-case/-/param-case-2.1.1.tgz", 665 | "integrity": "sha512-eQE845L6ot89sk2N8liD8HAuH4ca6Vvr7VWAWwt7+kvvG5aBcPmmphQ68JsEG2qa9n1TykS2DLeMt363AAH8/w==", 666 | "dependencies": { 667 | "no-case": "^2.2.0" 668 | } 669 | }, 670 | "node_modules/parse5": { 671 | "version": "7.1.2", 672 | "resolved": "https://registry.npmjs.org/parse5/-/parse5-7.1.2.tgz", 673 | "integrity": "sha512-Czj1WaSVpaoj0wbhMzLmWD69anp2WH7FXMB9n1Sy8/ZFF9jolSQVMu1Ij5WIyGmcBmhk7EOndpO4mIpihVqAXw==", 674 | "dependencies": { 675 | "entities": "^4.4.0" 676 | }, 677 | "funding": { 678 | "url": "https://github.com/inikulin/parse5?sponsor=1" 679 | } 680 | }, 681 | "node_modules/parse5-htmlparser2-tree-adapter": { 682 | "version": "7.0.0", 683 | "resolved": "https://registry.npmjs.org/parse5-htmlparser2-tree-adapter/-/parse5-htmlparser2-tree-adapter-7.0.0.tgz", 684 | "integrity": "sha512-B77tOZrqqfUfnVcOrUvfdLbz4pu4RopLD/4vmu3HUPswwTA8OH0EMW9BlWR2B0RCoiZRAHEUu7IxeP1Pd1UU+g==", 685 | "dependencies": { 686 | "domhandler": "^5.0.2", 687 | "parse5": "^7.0.0" 688 | }, 689 | "funding": { 690 | "url": "https://github.com/inikulin/parse5?sponsor=1" 691 | } 692 | }, 693 | "node_modules/source-map": { 694 | "version": "0.6.1", 695 | "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", 696 | "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", 697 | "engines": { 698 | "node": ">=0.10.0" 699 | } 700 | }, 701 | "node_modules/typeset": { 702 | "version": "0.2.6", 703 | "resolved": "https://registry.npmjs.org/typeset/-/typeset-0.2.6.tgz", 704 | "integrity": "sha512-dO8zKySgj5APkuGtEbUUEZG2uOxIryiw42EGYUX2/VvNpwezoUHmo4V3DnDHauohrP0X1Ji0kOJxHs304uHHCA==", 705 | "dependencies": { 706 | "commander": "3.0.2", 707 | "html-entities": "1.2.1", 708 | "html-minifier": "4.0.0", 709 | "hypher": "0.2.5" 710 | }, 711 | "bin": { 712 | "typeset-js": "src/cmd.js" 713 | } 714 | }, 715 | "node_modules/typeset/node_modules/commander": { 716 | "version": "3.0.2", 717 | "resolved": "https://registry.npmjs.org/commander/-/commander-3.0.2.tgz", 718 | "integrity": "sha512-Gar0ASD4BDyKC4hl4DwHqDrmvjoxWKZigVnAbn5H1owvm4CxCPdb0HQDehwNYMJpla5+M2tPmPARzhtYuwpHow==" 719 | }, 720 | "node_modules/typeset/node_modules/hypher": { 721 | "version": "0.2.5", 722 | "license": "BSD-3-Clause" 723 | }, 724 | "node_modules/uglify-js": { 725 | "version": "3.17.4", 726 | "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.17.4.tgz", 727 | "integrity": "sha512-T9q82TJI9e/C1TAxYvfb16xO120tMVFZrGA3f9/P4424DNu6ypK103y0GPFVa17yotwSyZW5iYXgjYHkGrJW/g==", 728 | "bin": { 729 | "uglifyjs": "bin/uglifyjs" 730 | }, 731 | "engines": { 732 | "node": ">=0.8.0" 733 | } 734 | }, 735 | "node_modules/upper-case": { 736 | "version": "1.1.3", 737 | "resolved": "https://registry.npmjs.org/upper-case/-/upper-case-1.1.3.tgz", 738 | "integrity": "sha512-WRbjgmYzgXkCV7zNVpy5YgrHgbBv126rMALQQMrmzOVC4GM2waQ9x7xtm8VU+1yF2kWyPzI9zbZ48n4vSxwfSA==" 739 | } 740 | }, 741 | "dependencies": { 742 | "@esbuild/android-arm": { 743 | "version": "0.19.0", 744 | "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.19.0.tgz", 745 | "integrity": "sha512-GAkjUyHgWTYuex3evPd5V7uV/XS4LMKr1PWHRPW1xNyy/Jx08x3uTrDFRefBYLKT/KpaWM8/YMQcwbp5a3yIDA==", 746 | "optional": true 747 | }, 748 | "@esbuild/android-arm64": { 749 | "version": "0.19.0", 750 | "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.19.0.tgz", 751 | "integrity": "sha512-AzsozJnB+RNaDncBCs3Ys5g3kqhPFUueItfEaCpp89JH2naFNX2mYDIvUgPYMqqjm8hiFoo+jklb3QHZyR3ubw==", 752 | "optional": true 753 | }, 754 | "@esbuild/android-x64": { 755 | "version": "0.19.0", 756 | "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.19.0.tgz", 757 | "integrity": "sha512-SUG8/qiVhljBDpdkHQ9DvOWbp7hFFIP0OzxOTptbmVsgBgzY6JWowmMd6yJuOhapfxmj/DrvwKmjRLvVSIAKZg==", 758 | "optional": true 759 | }, 760 | "@esbuild/darwin-arm64": { 761 | "version": "0.19.0", 762 | "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.19.0.tgz", 763 | "integrity": "sha512-HkxZ8k3Jvcw0FORPNTavA8BMgQjLOB6AajT+iXmil7BwY3gU1hWvJJAyWyEogCmA4LdbGvKF8vEykdmJ4xNJJQ==", 764 | "optional": true 765 | }, 766 | "@esbuild/darwin-x64": { 767 | "version": "0.19.0", 768 | "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.19.0.tgz", 769 | "integrity": "sha512-9IRWJjqpWFHM9a5Qs3r3bK834NCFuDY5ZaLrmTjqE+10B6w65UMQzeZjh794JcxpHolsAHqwsN/33crUXNCM2Q==", 770 | "optional": true 771 | }, 772 | "@esbuild/freebsd-arm64": { 773 | "version": "0.19.0", 774 | "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.19.0.tgz", 775 | "integrity": "sha512-s7i2WcXcK0V1PJHVBe7NsGddsL62a9Vhpz2U7zapPrwKoFuxPP9jybwX8SXnropR/AOj3ppt2ern4ItblU6UQQ==", 776 | "optional": true 777 | }, 778 | "@esbuild/freebsd-x64": { 779 | "version": "0.19.0", 780 | "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.19.0.tgz", 781 | "integrity": "sha512-NMdBSSdgwHCqCsucU5k1xflIIRU0qi1QZnM6+vdGy5fvxm1c8rKh50VzsWsIVTFUG3l91AtRxVwoz3Lcvy3I5w==", 782 | "optional": true 783 | }, 784 | "@esbuild/linux-arm": { 785 | "version": "0.19.0", 786 | "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.19.0.tgz", 787 | "integrity": "sha512-2F1+lH7ZBcCcgxiSs8EXQV0PPJJdTNiNcXxDb61vzxTRJJkXX1I/ye9mAhfHyScXzHaEibEXg1Jq9SW586zz7w==", 788 | "optional": true 789 | }, 790 | "@esbuild/linux-arm64": { 791 | "version": "0.19.0", 792 | "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.19.0.tgz", 793 | "integrity": "sha512-I4zvE2srSZxRPapFnNqj+NL3sDJ1wkvEZqt903OZUlBBgigrQMvzUowvP/TTTu2OGYe1oweg5MFilfyrElIFag==", 794 | "optional": true 795 | }, 796 | "@esbuild/linux-ia32": { 797 | "version": "0.19.0", 798 | "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.19.0.tgz", 799 | "integrity": "sha512-dz2Q7+P92r1Evc8kEN+cQnB3qqPjmCrOZ+EdBTn8lEc1yN8WDgaDORQQiX+mxaijbH8npXBT9GxUqE52Gt6Y+g==", 800 | "optional": true 801 | }, 802 | "@esbuild/linux-loong64": { 803 | "version": "0.19.0", 804 | "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.19.0.tgz", 805 | "integrity": "sha512-IcVJovJVflih4oFahhUw+N7YgNbuMSVFNr38awb0LNzfaiIfdqIh518nOfYaNQU3aVfiJnOIRVJDSAP4k35WxA==", 806 | "optional": true 807 | }, 808 | "@esbuild/linux-mips64el": { 809 | "version": "0.19.0", 810 | "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.19.0.tgz", 811 | "integrity": "sha512-bZGRAGySMquWsKw0gIdsClwfvgbsSq/7oq5KVu1H1r9Il+WzOcfkV1hguntIuBjRVL8agI95i4AukjdAV2YpUw==", 812 | "optional": true 813 | }, 814 | "@esbuild/linux-ppc64": { 815 | "version": "0.19.0", 816 | "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.19.0.tgz", 817 | "integrity": "sha512-3LC6H5/gCDorxoRBUdpLV/m7UthYSdar0XcCu+ypycQxMS08MabZ06y1D1yZlDzL/BvOYliRNRWVG/YJJvQdbg==", 818 | "optional": true 819 | }, 820 | "@esbuild/linux-riscv64": { 821 | "version": "0.19.0", 822 | "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.19.0.tgz", 823 | "integrity": "sha512-jfvdKjWk+Cp2sgLtEEdSHXO7qckrw2B2eFBaoRdmfhThqZs29GMMg7q/LsQpybA7BxCLLEs4di5ucsWzZC5XPA==", 824 | "optional": true 825 | }, 826 | "@esbuild/linux-s390x": { 827 | "version": "0.19.0", 828 | "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.19.0.tgz", 829 | "integrity": "sha512-ofcucfNLkoXmcnJaw9ugdEOf40AWKGt09WBFCkpor+vFJVvmk/8OPjl/qRtks2Z7BuZbG3ztJuK1zS9z5Cgx9A==", 830 | "optional": true 831 | }, 832 | "@esbuild/linux-x64": { 833 | "version": "0.19.0", 834 | "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.19.0.tgz", 835 | "integrity": "sha512-Fpf7zNDBti3xrQKQKLdXT0hTyOxgFdRJIMtNy8x1az9ATR9/GJ1brYbB/GLWoXhKiHsoWs+2DLkFVNNMTCLEwA==", 836 | "optional": true 837 | }, 838 | "@esbuild/netbsd-x64": { 839 | "version": "0.19.0", 840 | "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.19.0.tgz", 841 | "integrity": "sha512-AMQAp/5oENgDOvVhvOlbhVe1pWii7oFAMRHlmTjSEMcpjTpIHtFXhv9uAFgUERHm3eYtNvS9Vf+gT55cwuI6Aw==", 842 | "optional": true 843 | }, 844 | "@esbuild/openbsd-x64": { 845 | "version": "0.19.0", 846 | "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.19.0.tgz", 847 | "integrity": "sha512-fDztEve1QUs3h/Dw2AUmBlWGkNQbhDoD05ppm5jKvzQv+HVuV13so7m5RYeiSMIC2XQy7PAjZh+afkxAnCRZxA==", 848 | "optional": true 849 | }, 850 | "@esbuild/sunos-x64": { 851 | "version": "0.19.0", 852 | "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.19.0.tgz", 853 | "integrity": "sha512-bKZzJ2/rvUjDzA5Ddyva2tMk89WzNJEibZEaq+wY6SiqPlwgFbqyQLimouxLHiHh1itb5P3SNCIF1bc2bw5H9w==", 854 | "optional": true 855 | }, 856 | "@esbuild/win32-arm64": { 857 | "version": "0.19.0", 858 | "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.19.0.tgz", 859 | "integrity": "sha512-NQJ+4jmnA79saI+sE+QzcEls19uZkoEmdxo7r//PDOjIpX8pmoWtTnWg6XcbnO7o4fieyAwb5U2LvgWynF4diA==", 860 | "optional": true 861 | }, 862 | "@esbuild/win32-ia32": { 863 | "version": "0.19.0", 864 | "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.19.0.tgz", 865 | "integrity": "sha512-uyxiZAnsfu9diHm9/rIH2soecF/HWLXYUhJKW4q1+/LLmNQ+55lRjvSUDhUmsgJtSUscRJB/3S4RNiTb9o9mCg==", 866 | "optional": true 867 | }, 868 | "@esbuild/win32-x64": { 869 | "version": "0.19.0", 870 | "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.19.0.tgz", 871 | "integrity": "sha512-jl+NXUjK2StMgqnZnqgNjZuerFG8zQqWXMBZdMMv4W/aO1ZKQaYWZBxTrtWKphkCBVEMh0wMVfGgOd2BjOZqUQ==", 872 | "optional": true 873 | }, 874 | "boolbase": { 875 | "version": "1.0.0", 876 | "resolved": "https://registry.npmjs.org/boolbase/-/boolbase-1.0.0.tgz", 877 | "integrity": "sha512-JZOSA7Mo9sNGB8+UjSgzdLtokWAky1zbztM3WRLCbZ70/3cTANmQmOdR7y2g+J0e2WXywy1yS468tY+IruqEww==" 878 | }, 879 | "camel-case": { 880 | "version": "3.0.0", 881 | "resolved": "https://registry.npmjs.org/camel-case/-/camel-case-3.0.0.tgz", 882 | "integrity": "sha512-+MbKztAYHXPr1jNTSKQF52VpcFjwY5RkR7fxksV8Doo4KAYc5Fl4UJRgthBbTmEx8C54DqahhbLJkDwjI3PI/w==", 883 | "requires": { 884 | "no-case": "^2.2.0", 885 | "upper-case": "^1.1.1" 886 | } 887 | }, 888 | "cheerio": { 889 | "version": "1.0.0-rc.12", 890 | "resolved": "https://registry.npmjs.org/cheerio/-/cheerio-1.0.0-rc.12.tgz", 891 | "integrity": "sha512-VqR8m68vM46BNnuZ5NtnGBKIE/DfN0cRIzg9n40EIq9NOv90ayxLBXA8fXC5gquFRGJSTRqBq25Jt2ECLR431Q==", 892 | "requires": { 893 | "cheerio-select": "^2.1.0", 894 | "dom-serializer": "^2.0.0", 895 | "domhandler": "^5.0.3", 896 | "domutils": "^3.0.1", 897 | "htmlparser2": "^8.0.1", 898 | "parse5": "^7.0.0", 899 | "parse5-htmlparser2-tree-adapter": "^7.0.0" 900 | } 901 | }, 902 | "cheerio-select": { 903 | "version": "2.1.0", 904 | "resolved": "https://registry.npmjs.org/cheerio-select/-/cheerio-select-2.1.0.tgz", 905 | "integrity": "sha512-9v9kG0LvzrlcungtnJtpGNxY+fzECQKhK4EGJX2vByejiMX84MFNQw4UxPJl3bFbTMw+Dfs37XaIkCwTZfLh4g==", 906 | "requires": { 907 | "boolbase": "^1.0.0", 908 | "css-select": "^5.1.0", 909 | "css-what": "^6.1.0", 910 | "domelementtype": "^2.3.0", 911 | "domhandler": "^5.0.3", 912 | "domutils": "^3.0.1" 913 | } 914 | }, 915 | "clean-css": { 916 | "version": "4.2.4", 917 | "resolved": "https://registry.npmjs.org/clean-css/-/clean-css-4.2.4.tgz", 918 | "integrity": "sha512-EJUDT7nDVFDvaQgAo2G/PJvxmp1o/c6iXLbswsBbUFXi1Nr+AjA2cKmfbKDMjMvzEe75g3P6JkaDDAKk96A85A==", 919 | "requires": { 920 | "source-map": "~0.6.0" 921 | } 922 | }, 923 | "commander": { 924 | "version": "2.20.3", 925 | "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", 926 | "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==" 927 | }, 928 | "css-select": { 929 | "version": "5.1.0", 930 | "resolved": "https://registry.npmjs.org/css-select/-/css-select-5.1.0.tgz", 931 | "integrity": "sha512-nwoRF1rvRRnnCqqY7updORDsuqKzqYJ28+oSMaJMMgOauh3fvwHqMS7EZpIPqK8GL+g9mKxF1vP/ZjSeNjEVHg==", 932 | "requires": { 933 | "boolbase": "^1.0.0", 934 | "css-what": "^6.1.0", 935 | "domhandler": "^5.0.2", 936 | "domutils": "^3.0.1", 937 | "nth-check": "^2.0.1" 938 | } 939 | }, 940 | "css-what": { 941 | "version": "6.1.0", 942 | "resolved": "https://registry.npmjs.org/css-what/-/css-what-6.1.0.tgz", 943 | "integrity": "sha512-HTUrgRJ7r4dsZKU6GjmpfRK1O76h97Z8MfS1G0FozR+oF2kG6Vfe8JE6zwrkbxigziPHinCJ+gCPjA9EaBDtRw==" 944 | }, 945 | "dom-serializer": { 946 | "version": "2.0.0", 947 | "resolved": "https://registry.npmjs.org/dom-serializer/-/dom-serializer-2.0.0.tgz", 948 | "integrity": "sha512-wIkAryiqt/nV5EQKqQpo3SToSOV9J0DnbJqwK7Wv/Trc92zIAYZ4FlMu+JPFW1DfGFt81ZTCGgDEabffXeLyJg==", 949 | "requires": { 950 | "domelementtype": "^2.3.0", 951 | "domhandler": "^5.0.2", 952 | "entities": "^4.2.0" 953 | } 954 | }, 955 | "domelementtype": { 956 | "version": "2.3.0", 957 | "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-2.3.0.tgz", 958 | "integrity": "sha512-OLETBj6w0OsagBwdXnPdN0cnMfF9opN69co+7ZrbfPGrdpPVNBUj02spi6B1N7wChLQiPn4CSH/zJvXw56gmHw==" 959 | }, 960 | "domhandler": { 961 | "version": "5.0.3", 962 | "resolved": "https://registry.npmjs.org/domhandler/-/domhandler-5.0.3.tgz", 963 | "integrity": "sha512-cgwlv/1iFQiFnU96XXgROh8xTeetsnJiDsTc7TYCLFd9+/WNkIqPTxiM/8pSd8VIrhXGTf1Ny1q1hquVqDJB5w==", 964 | "requires": { 965 | "domelementtype": "^2.3.0" 966 | } 967 | }, 968 | "domutils": { 969 | "version": "3.1.0", 970 | "resolved": "https://registry.npmjs.org/domutils/-/domutils-3.1.0.tgz", 971 | "integrity": "sha512-H78uMmQtI2AhgDJjWeQmHwJJ2bLPD3GMmO7Zja/ZZh84wkm+4ut+IUnUdRa8uCGX88DiVx1j6FRe1XfxEgjEZA==", 972 | "requires": { 973 | "dom-serializer": "^2.0.0", 974 | "domelementtype": "^2.3.0", 975 | "domhandler": "^5.0.3" 976 | } 977 | }, 978 | "entities": { 979 | "version": "4.5.0", 980 | "resolved": "https://registry.npmjs.org/entities/-/entities-4.5.0.tgz", 981 | "integrity": "sha512-V0hjH4dGPh9Ao5p0MoRY6BVqtwCjhz6vI5LT8AJ55H+4g9/4vbHx1I54fS0XuclLhDHArPQCiMjDxjaL8fPxhw==" 982 | }, 983 | "esbuild": { 984 | "version": "0.19.0", 985 | "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.19.0.tgz", 986 | "integrity": "sha512-i7i8TP4vuG55bKeLyqqk5sTPu1ZjPH3wkcLvAj/0X/222iWFo3AJUYRKjbOoY6BWFMH3teizxHEdV9Su5ESl0w==", 987 | "requires": { 988 | "@esbuild/android-arm": "0.19.0", 989 | "@esbuild/android-arm64": "0.19.0", 990 | "@esbuild/android-x64": "0.19.0", 991 | "@esbuild/darwin-arm64": "0.19.0", 992 | "@esbuild/darwin-x64": "0.19.0", 993 | "@esbuild/freebsd-arm64": "0.19.0", 994 | "@esbuild/freebsd-x64": "0.19.0", 995 | "@esbuild/linux-arm": "0.19.0", 996 | "@esbuild/linux-arm64": "0.19.0", 997 | "@esbuild/linux-ia32": "0.19.0", 998 | "@esbuild/linux-loong64": "0.19.0", 999 | "@esbuild/linux-mips64el": "0.19.0", 1000 | "@esbuild/linux-ppc64": "0.19.0", 1001 | "@esbuild/linux-riscv64": "0.19.0", 1002 | "@esbuild/linux-s390x": "0.19.0", 1003 | "@esbuild/linux-x64": "0.19.0", 1004 | "@esbuild/netbsd-x64": "0.19.0", 1005 | "@esbuild/openbsd-x64": "0.19.0", 1006 | "@esbuild/sunos-x64": "0.19.0", 1007 | "@esbuild/win32-arm64": "0.19.0", 1008 | "@esbuild/win32-ia32": "0.19.0", 1009 | "@esbuild/win32-x64": "0.19.0" 1010 | } 1011 | }, 1012 | "fs-extra": { 1013 | "version": "5.0.0", 1014 | "requires": { 1015 | "graceful-fs": "^4.1.2", 1016 | "jsonfile": "^4.0.0", 1017 | "universalify": "^0.1.0" 1018 | }, 1019 | "dependencies": { 1020 | "jsonfile": { 1021 | "version": "4.0.0", 1022 | "requires": { 1023 | "graceful-fs": "^4.1.6" 1024 | } 1025 | }, 1026 | "universalify": { 1027 | "version": "0.1.1" 1028 | } 1029 | } 1030 | }, 1031 | "graceful-fs": { 1032 | "version": "4.2.11", 1033 | "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz", 1034 | "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==" 1035 | }, 1036 | "he": { 1037 | "version": "1.2.0", 1038 | "resolved": "https://registry.npmjs.org/he/-/he-1.2.0.tgz", 1039 | "integrity": "sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==" 1040 | }, 1041 | "highlight": { 1042 | "version": "0.2.4" 1043 | }, 1044 | "highlight.js": { 1045 | "version": "11.8.0", 1046 | "resolved": "https://registry.npmjs.org/highlight.js/-/highlight.js-11.8.0.tgz", 1047 | "integrity": "sha512-MedQhoqVdr0U6SSnWPzfiadUcDHfN/Wzq25AkXiQv9oiOO/sG0S7XkvpFIqWBl9Yq1UYyYOOVORs5UW2XlPyzg==" 1048 | }, 1049 | "html-entities": { 1050 | "version": "1.2.1", 1051 | "resolved": "https://registry.npmjs.org/html-entities/-/html-entities-1.2.1.tgz", 1052 | "integrity": "sha512-LSGr3unsIfdtmwikBiTnJGuqn8lvv/wbNveg42owC3EhR0ZddBTkGW4ReqqQ7DB6QWUFhqMWbYuldgAuZJZcdw==" 1053 | }, 1054 | "html-minifier": { 1055 | "version": "4.0.0", 1056 | "resolved": "https://registry.npmjs.org/html-minifier/-/html-minifier-4.0.0.tgz", 1057 | "integrity": "sha512-aoGxanpFPLg7MkIl/DDFYtb0iWz7jMFGqFhvEDZga6/4QTjneiD8I/NXL1x5aaoCp7FSIT6h/OhykDdPsbtMig==", 1058 | "requires": { 1059 | "camel-case": "^3.0.0", 1060 | "clean-css": "^4.2.1", 1061 | "commander": "^2.19.0", 1062 | "he": "^1.2.0", 1063 | "param-case": "^2.1.1", 1064 | "relateurl": "^0.2.7", 1065 | "uglify-js": "^3.5.1" 1066 | }, 1067 | "dependencies": { 1068 | "relateurl": { 1069 | "version": "0.2.7" 1070 | } 1071 | } 1072 | }, 1073 | "htmlparser2": { 1074 | "version": "8.0.2", 1075 | "resolved": "https://registry.npmjs.org/htmlparser2/-/htmlparser2-8.0.2.tgz", 1076 | "integrity": "sha512-GYdjWKDkbRLkZ5geuHs5NY1puJ+PXwP7+fHPRz06Eirsb9ugf6d8kkXav6ADhcODhFFPMIXyxkxSuMf3D6NCFA==", 1077 | "requires": { 1078 | "domelementtype": "^2.3.0", 1079 | "domhandler": "^5.0.3", 1080 | "domutils": "^3.0.1", 1081 | "entities": "^4.4.0" 1082 | } 1083 | }, 1084 | "lower-case": { 1085 | "version": "1.1.4", 1086 | "resolved": "https://registry.npmjs.org/lower-case/-/lower-case-1.1.4.tgz", 1087 | "integrity": "sha512-2Fgx1Ycm599x+WGpIYwJOvsjmXFzTSc34IwDWALRA/8AopUKAVPwfJ+h5+f85BCp0PWmmJcWzEpxOpoXycMpdA==" 1088 | }, 1089 | "no-case": { 1090 | "version": "2.3.2", 1091 | "resolved": "https://registry.npmjs.org/no-case/-/no-case-2.3.2.tgz", 1092 | "integrity": "sha512-rmTZ9kz+f3rCvK2TD1Ue/oZlns7OGoIWP4fc3llxxRXlOkHKoWPPWJOfFYpITabSow43QJbRIoHQXtt10VldyQ==", 1093 | "requires": { 1094 | "lower-case": "^1.1.1" 1095 | } 1096 | }, 1097 | "nth-check": { 1098 | "version": "2.1.1", 1099 | "resolved": "https://registry.npmjs.org/nth-check/-/nth-check-2.1.1.tgz", 1100 | "integrity": "sha512-lqjrjmaOoAnWfMmBPL+XNnynZh2+swxiX3WUE0s4yEHI6m+AwrK2UZOimIRl3X/4QctVqS8AiZjFqyOGrMXb/w==", 1101 | "requires": { 1102 | "boolbase": "^1.0.0" 1103 | } 1104 | }, 1105 | "param-case": { 1106 | "version": "2.1.1", 1107 | "resolved": "https://registry.npmjs.org/param-case/-/param-case-2.1.1.tgz", 1108 | "integrity": "sha512-eQE845L6ot89sk2N8liD8HAuH4ca6Vvr7VWAWwt7+kvvG5aBcPmmphQ68JsEG2qa9n1TykS2DLeMt363AAH8/w==", 1109 | "requires": { 1110 | "no-case": "^2.2.0" 1111 | } 1112 | }, 1113 | "parse5": { 1114 | "version": "7.1.2", 1115 | "resolved": "https://registry.npmjs.org/parse5/-/parse5-7.1.2.tgz", 1116 | "integrity": "sha512-Czj1WaSVpaoj0wbhMzLmWD69anp2WH7FXMB9n1Sy8/ZFF9jolSQVMu1Ij5WIyGmcBmhk7EOndpO4mIpihVqAXw==", 1117 | "requires": { 1118 | "entities": "^4.4.0" 1119 | } 1120 | }, 1121 | "parse5-htmlparser2-tree-adapter": { 1122 | "version": "7.0.0", 1123 | "resolved": "https://registry.npmjs.org/parse5-htmlparser2-tree-adapter/-/parse5-htmlparser2-tree-adapter-7.0.0.tgz", 1124 | "integrity": "sha512-B77tOZrqqfUfnVcOrUvfdLbz4pu4RopLD/4vmu3HUPswwTA8OH0EMW9BlWR2B0RCoiZRAHEUu7IxeP1Pd1UU+g==", 1125 | "requires": { 1126 | "domhandler": "^5.0.2", 1127 | "parse5": "^7.0.0" 1128 | } 1129 | }, 1130 | "source-map": { 1131 | "version": "0.6.1", 1132 | "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", 1133 | "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==" 1134 | }, 1135 | "typeset": { 1136 | "version": "0.2.6", 1137 | "resolved": "https://registry.npmjs.org/typeset/-/typeset-0.2.6.tgz", 1138 | "integrity": "sha512-dO8zKySgj5APkuGtEbUUEZG2uOxIryiw42EGYUX2/VvNpwezoUHmo4V3DnDHauohrP0X1Ji0kOJxHs304uHHCA==", 1139 | "requires": { 1140 | "commander": "3.0.2", 1141 | "html-entities": "1.2.1", 1142 | "html-minifier": "4.0.0", 1143 | "hypher": "0.2.5" 1144 | }, 1145 | "dependencies": { 1146 | "commander": { 1147 | "version": "3.0.2", 1148 | "resolved": "https://registry.npmjs.org/commander/-/commander-3.0.2.tgz", 1149 | "integrity": "sha512-Gar0ASD4BDyKC4hl4DwHqDrmvjoxWKZigVnAbn5H1owvm4CxCPdb0HQDehwNYMJpla5+M2tPmPARzhtYuwpHow==" 1150 | }, 1151 | "hypher": { 1152 | "version": "0.2.5" 1153 | } 1154 | } 1155 | }, 1156 | "uglify-js": { 1157 | "version": "3.17.4", 1158 | "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.17.4.tgz", 1159 | "integrity": "sha512-T9q82TJI9e/C1TAxYvfb16xO120tMVFZrGA3f9/P4424DNu6ypK103y0GPFVa17yotwSyZW5iYXgjYHkGrJW/g==" 1160 | }, 1161 | "upper-case": { 1162 | "version": "1.1.3", 1163 | "resolved": "https://registry.npmjs.org/upper-case/-/upper-case-1.1.3.tgz", 1164 | "integrity": "sha512-WRbjgmYzgXkCV7zNVpy5YgrHgbBv126rMALQQMrmzOVC4GM2waQ9x7xtm8VU+1yF2kWyPzI9zbZ48n4vSxwfSA==" 1165 | } 1166 | } 1167 | } 1168 | --------------------------------------------------------------------------------