color-interfaces
Advanced tools
Comparing version 0.1.25 to 0.1.26
@@ -0,0 +0,0 @@ import { Color } from './ColorInterface'; |
@@ -0,0 +0,0 @@ import { Color } from './ColorInterface'; |
@@ -0,0 +0,0 @@ import { Color } from './ColorInterface'; |
@@ -0,0 +0,0 @@ import { Color as Color_ } from './ColorInterface'; |
@@ -0,0 +0,0 @@ export interface Color { |
@@ -0,0 +0,0 @@ import { RGB } from './ColorInterface'; |
@@ -0,0 +0,0 @@ import { HexAInterface as HexAInterface_, HEXA } from './ColorInterface'; |
@@ -0,0 +0,0 @@ import { HexInterface as HexInterface_, HEX } from './ColorInterface'; |
@@ -0,0 +0,0 @@ import { HSLAInterface as HSLAInterface_, HSLA } from './ColorInterface'; |
@@ -0,0 +0,0 @@ import { HSLInterface as HSLInterface_, HSL } from './ColorInterface'; |
@@ -0,0 +0,0 @@ import { HSVAInterface as HSVAInterface_, HSVA } from './ColorInterface'; |
@@ -0,0 +0,0 @@ import { HSVInterface as HSVInterface_, HSV } from './ColorInterface'; |
@@ -0,0 +0,0 @@ import Color from './Color'; |
@@ -1,1 +0,1 @@ | ||
module.exports=function(e){var t={};function r(n){if(t[n])return t[n].exports;var o=t[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}return r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)r.d(n,o,function(t){return e[t]}.bind(null,o));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=14)}([function(e,t,r){"use strict";var n=this&&this.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),c=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)c.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return c},o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.toTwoHex=t.hueToRgb=t.toPercent=t.mixRgbColors=t.clamp=t.parseCSSColor=t.cssParsers=void 0;var i=r(1),c=o(r(2)),u=function(e,t){void 0===t&&(t=new c.default);var r=e.slice(1).map((function(e){return Number.parseInt(e,16)}));return t.rgb.set(r),t},s=function(e,t){void 0===t&&(t=new c.default);var r=e.slice(1).map((function(e){return Number.parseInt(e.repeat(2),16)}));return t.rgb.set(r),t},f=function(e,t){void 0===t&&(t=new c.default);var r=e.slice(1).map((function(e){return Number.parseInt(e,10)}));return t.rgb.set(r),t},a=function(e,t){void 0===t&&(t=new c.default);var r=n(e.slice(1).map((function(e){return Number.parseInt(e,10)})),3),o=r[0],i=r[1],u=r[2];return t.hsl.set([o%360,i/100,u/100]),t},l=[[i.RE_HEX_6,u],[i.RE_HEX_3,s],[i.RE_HEX_8,function(e,t){void 0===t&&(t=new c.default);var r=Number.parseInt(e.pop(),16);return u(e,t),t.alpha=0===r?r:r/255,t}],[i.RE_HEX_4,function(e,t){void 0===t&&(t=new c.default);var r=Number.parseInt(e.pop().repeat(2),16);return s(e,t),t.alpha=0===r?r:r/255,t}],[i.RE_RGB,f],[i.RE_RGBA,function(e,t){void 0===t&&(t=new c.default);var r=Number.parseFloat(e.pop());return f(e,t),t.alpha=r,t}],[i.RE_HSL,a],[i.RE_HSLA,function(e,t){void 0===t&&(t=new c.default);var r=Number.parseFloat(e.pop());return a(e,t),t.alpha=r,t}]];t.cssParsers=new Map(l),t.parseCSSColor=function(e,t){void 0===t&&(t=new c.default);var r=l.find((function(t){return n(t,1)[0].test(e)}));if(r){var o=n(r,2),u=o[0];return(0,o[1])(e.match(u),t)}return i.colorKeywords.has(e.trim())?(t.rgb.set(i.colorKeywords.get(e.trim())),t):(t.rgb.set([0,0,0]),t)},t.clamp=function(e,t,r){return Math.min(Math.max(e,t),r)},t.mixRgbColors=function(e,t,r){return[e[0]+r*(t[0]-e[0]),e[1]+r*(t[1]-e[1]),e[2]+r*(t[2]-e[2])]},t.toPercent=function(e){return Math.round(100*e)+"%"},t.hueToRgb=function(e){var t=(e%=360)%60;switch(e-=t,t=Math.round(4.25*t),e){case 0:return[255,t,0];case 60:return[255-t,255,0];case 120:return[0,255,t];case 180:return[0,255-t,255];case 240:return[t,0,255];case 300:return[255,0,255-t]}return[0,0,0]},t.toTwoHex=function(e){var t=e.toString(16);return 1===t.length?"0"+t:t}},function(e,t,r){"use strict";var n=this&&this.__makeTemplateObject||function(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e};Object.defineProperty(t,"__esModule",{value:!0}),t.colorKeywords=t.RE_HSLA=t.RE_HSL=t.RE_RGBA=t.RE_RGB=t.RE_HEX_4=t.RE_HEX_8=t.RE_HEX_3=t.RE_HEX_6=t.GREY=t.WHITE=t.BLACK=t.DEFAULT_COLOR=t.ColorType=void 0;var o,i,c,u,s,f,a,l,b,h,p,O,j,d,z,y=String.raw,g=y(o||(o=n(["([0-9a-fA-F])"],["([0-9a-fA-F])"]))),_=y(i||(i=n(["([0-9a-fA-F]{2})"],["([0-9a-fA-F]{2})"]))),v=y(c||(c=n(["(d|[1-9]d|1d{2}|2[0-4]d|25[0-5])"],["(\\d|[1-9]\\d|1\\d{2}|2[0-4]\\d|25[0-5])"]))),m=y(u||(u=n(["(0|1|0?.d{1,20})"],["(0|1|0?\\.\\d{1,20})"]))),w=y(s||(s=n(["(d|[1-9]d|100)"],["(\\d|[1-9]\\d|100)"]))),H=y(f||(f=n(["s*","s*,s*","s*,s*","s*"],["\\s*","\\s*,\\s*","\\s*,\\s*","\\s*"])),v,v,v),R=y(a||(a=n(["s*(d{1,20})s*,s*","%s*,s*","%s*"],["\\s*(\\d{1,20})\\s*,\\s*","%\\s*,\\s*","%\\s*"])),w,w);!function(e){e[e.KEYWORD=1]="KEYWORD",e[e.HEX=2]="HEX",e[e.RGB=3]="RGB",e[e.RGBA=4]="RGBA",e[e.HSL=5]="HSL",e[e.HSLA=6]="HSLA",e[e.HSV=7]="HSV",e[e.HSVA=8]="HSVA"}(t.ColorType||(t.ColorType={})),t.DEFAULT_COLOR="black",t.BLACK=[0,0,0],t.WHITE=[255,255,255],t.GREY=[127.5,127.5,127.5],t.RE_HEX_6=new RegExp(y(l||(l=n(["^s*#?","","","s*$"],["^\\s*#?","","","\\s*$"])),_,_,_)),t.RE_HEX_3=new RegExp(y(b||(b=n(["^s*#?","","","s*$"],["^\\s*#?","","","\\s*$"])),g,g,g)),t.RE_HEX_8=new RegExp(y(h||(h=n(["^s*#?","","","","s*$"],["^\\s*#?","","","","\\s*$"])),_,_,_,_)),t.RE_HEX_4=new RegExp(y(p||(p=n(["^s*#?","","","","s*$"],["^\\s*#?","","","","\\s*$"])),g,g,g,g)),t.RE_RGB=new RegExp(y(O||(O=n(["^s*rgb(",")s*$"],["^\\s*rgb\\(","\\)\\s*$"])),H)),t.RE_RGBA=new RegExp(y(j||(j=n(["^s*rgba(",",s*","s*)s*$"],["^\\s*rgba\\(",",\\s*","\\s*\\)\\s*$"])),H,m)),t.RE_HSL=new RegExp(y(d||(d=n(["^s*hsl(",")s*$"],["^\\s*hsl\\(","\\)\\s*$"])),R)),t.RE_HSLA=new RegExp(y(z||(z=n(["^s*hsla(",",s*","s*)s*$"],["^\\s*hsla\\(",",\\s*","\\s*\\)\\s*$"])),R,m)),t.colorKeywords=new Map([Object.freeze(["aliceblue",Object.freeze([240,248,255])]),Object.freeze(["antiquewhite",Object.freeze([250,235,215])]),Object.freeze(["aqua",Object.freeze([0,255,255])]),Object.freeze(["aquamarine",Object.freeze([127,255,212])]),Object.freeze(["azure",Object.freeze([240,255,255])]),Object.freeze(["beige",Object.freeze([245,245,220])]),Object.freeze(["bisque",Object.freeze([255,228,196])]),Object.freeze(["black",Object.freeze([0,0,0])]),Object.freeze(["blanchedalmond",Object.freeze([255,235,205])]),Object.freeze(["blue",Object.freeze([0,0,255])]),Object.freeze(["blueviolet",Object.freeze([138,43,226])]),Object.freeze(["brown",Object.freeze([165,42,42])]),Object.freeze(["burlywood",Object.freeze([222,184,135])]),Object.freeze(["cadetblue",Object.freeze([95,158,160])]),Object.freeze(["chartreuse",Object.freeze([127,255,0])]),Object.freeze(["chocolate",Object.freeze([210,105,30])]),Object.freeze(["coral",Object.freeze([255,127,80])]),Object.freeze(["cornflowerblue",Object.freeze([100,149,237])]),Object.freeze(["cornsilk",Object.freeze([255,248,220])]),Object.freeze(["crimson",Object.freeze([220,20,60])]),Object.freeze(["cyan",Object.freeze([0,255,255])]),Object.freeze(["darkblue",Object.freeze([0,0,139])]),Object.freeze(["darkcyan",Object.freeze([0,139,139])]),Object.freeze(["darkgoldenrod",Object.freeze([184,134,11])]),Object.freeze(["darkgray",Object.freeze([169,169,169])]),Object.freeze(["darkgreen",Object.freeze([0,100,0])]),Object.freeze(["darkgrey",Object.freeze([169,169,169])]),Object.freeze(["darkkhaki",Object.freeze([189,183,107])]),Object.freeze(["darkmagenta",Object.freeze([139,0,139])]),Object.freeze(["darkolivegreen",Object.freeze([85,107,47])]),Object.freeze(["darkorange",Object.freeze([255,140,0])]),Object.freeze(["darkorchid",Object.freeze([153,50,204])]),Object.freeze(["darkred",Object.freeze([139,0,0])]),Object.freeze(["darksalmon",Object.freeze([233,150,122])]),Object.freeze(["darkseagreen",Object.freeze([143,188,143])]),Object.freeze(["darkslateblue",Object.freeze([72,61,139])]),Object.freeze(["darkslategray",Object.freeze([47,79,79])]),Object.freeze(["darkslategrey",Object.freeze([47,79,79])]),Object.freeze(["darkturquoise",Object.freeze([0,206,209])]),Object.freeze(["darkviolet",Object.freeze([148,0,211])]),Object.freeze(["deeppink",Object.freeze([255,20,147])]),Object.freeze(["deepskyblue",Object.freeze([0,191,255])]),Object.freeze(["dimgray",Object.freeze([105,105,105])]),Object.freeze(["dimgrey",Object.freeze([105,105,105])]),Object.freeze(["dodgerblue",Object.freeze([30,144,255])]),Object.freeze(["firebrick",Object.freeze([178,34,34])]),Object.freeze(["floralwhite",Object.freeze([255,250,240])]),Object.freeze(["forestgreen",Object.freeze([34,139,34])]),Object.freeze(["fuchsia",Object.freeze([255,0,255])]),Object.freeze(["gainsboro",Object.freeze([220,220,220])]),Object.freeze(["ghostwhite",Object.freeze([248,248,255])]),Object.freeze(["gold",Object.freeze([255,215,0])]),Object.freeze(["goldenrod",Object.freeze([218,165,32])]),Object.freeze(["gray",Object.freeze([128,128,128])]),Object.freeze(["green",Object.freeze([0,128,0])]),Object.freeze(["greenyellow",Object.freeze([173,255,47])]),Object.freeze(["grey",Object.freeze([128,128,128])]),Object.freeze(["honeydew",Object.freeze([240,255,240])]),Object.freeze(["hotpink",Object.freeze([255,105,180])]),Object.freeze(["indianred",Object.freeze([205,92,92])]),Object.freeze(["indigo",Object.freeze([75,0,130])]),Object.freeze(["ivory",Object.freeze([255,255,240])]),Object.freeze(["khaki",Object.freeze([240,230,140])]),Object.freeze(["lavender",Object.freeze([230,230,250])]),Object.freeze(["lavenderblush",Object.freeze([255,240,245])]),Object.freeze(["lawngreen",Object.freeze([124,252,0])]),Object.freeze(["lemonchiffon",Object.freeze([255,250,205])]),Object.freeze(["lightblue",Object.freeze([173,216,230])]),Object.freeze(["lightcoral",Object.freeze([240,128,128])]),Object.freeze(["lightcyan",Object.freeze([224,255,255])]),Object.freeze(["lightgoldenrodyellow",Object.freeze([250,250,210])]),Object.freeze(["lightgray",Object.freeze([211,211,211])]),Object.freeze(["lightgreen",Object.freeze([144,238,144])]),Object.freeze(["lightgrey",Object.freeze([211,211,211])]),Object.freeze(["lightpink",Object.freeze([255,182,193])]),Object.freeze(["lightsalmon",Object.freeze([255,160,122])]),Object.freeze(["lightseagreen",Object.freeze([32,178,170])]),Object.freeze(["lightskyblue",Object.freeze([135,206,250])]),Object.freeze(["lightslategray",Object.freeze([119,136,153])]),Object.freeze(["lightslategrey",Object.freeze([119,136,153])]),Object.freeze(["lightsteelblue",Object.freeze([176,196,222])]),Object.freeze(["lightyellow",Object.freeze([255,255,224])]),Object.freeze(["lime",Object.freeze([0,255,0])]),Object.freeze(["limegreen",Object.freeze([50,205,50])]),Object.freeze(["linen",Object.freeze([250,240,230])]),Object.freeze(["magenta",Object.freeze([255,0,255])]),Object.freeze(["maroon",Object.freeze([128,0,0])]),Object.freeze(["mediumaquamarine",Object.freeze([102,205,170])]),Object.freeze(["mediumblue",Object.freeze([0,0,205])]),Object.freeze(["mediumorchid",Object.freeze([186,85,211])]),Object.freeze(["mediumpurple",Object.freeze([147,112,219])]),Object.freeze(["mediumseagreen",Object.freeze([60,179,113])]),Object.freeze(["mediumslateblue",Object.freeze([123,104,238])]),Object.freeze(["mediumspringgreen",Object.freeze([0,250,154])]),Object.freeze(["mediumturquoise",Object.freeze([72,209,204])]),Object.freeze(["mediumvioletred",Object.freeze([199,21,133])]),Object.freeze(["midnightblue",Object.freeze([25,25,112])]),Object.freeze(["mintcream",Object.freeze([245,255,250])]),Object.freeze(["mistyrose",Object.freeze([255,228,225])]),Object.freeze(["moccasin",Object.freeze([255,228,181])]),Object.freeze(["navajowhite",Object.freeze([255,222,173])]),Object.freeze(["navy",Object.freeze([0,0,128])]),Object.freeze(["oldlace",Object.freeze([253,245,230])]),Object.freeze(["olive",Object.freeze([128,128,0])]),Object.freeze(["olivedrab",Object.freeze([107,142,35])]),Object.freeze(["orange",Object.freeze([255,165,0])]),Object.freeze(["orangered",Object.freeze([255,69,0])]),Object.freeze(["orchid",Object.freeze([218,112,214])]),Object.freeze(["palegoldenrod",Object.freeze([238,232,170])]),Object.freeze(["palegreen",Object.freeze([152,251,152])]),Object.freeze(["paleturquoise",Object.freeze([175,238,238])]),Object.freeze(["palevioletred",Object.freeze([219,112,147])]),Object.freeze(["papayawhip",Object.freeze([255,239,213])]),Object.freeze(["peachpuff",Object.freeze([255,218,185])]),Object.freeze(["peru",Object.freeze([205,133,63])]),Object.freeze(["pink",Object.freeze([255,192,203])]),Object.freeze(["plum",Object.freeze([221,160,221])]),Object.freeze(["powderblue",Object.freeze([176,224,230])]),Object.freeze(["purple",Object.freeze([128,0,128])]),Object.freeze(["red",Object.freeze([255,0,0])]),Object.freeze(["rosybrown",Object.freeze([188,143,143])]),Object.freeze(["royalblue",Object.freeze([65,105,225])]),Object.freeze(["saddlebrown",Object.freeze([139,69,19])]),Object.freeze(["salmon",Object.freeze([250,128,114])]),Object.freeze(["sandybrown",Object.freeze([244,164,96])]),Object.freeze(["seagreen",Object.freeze([46,139,87])]),Object.freeze(["seashell",Object.freeze([255,245,238])]),Object.freeze(["sienna",Object.freeze([160,82,45])]),Object.freeze(["silver",Object.freeze([192,192,192])]),Object.freeze(["skyblue",Object.freeze([135,206,235])]),Object.freeze(["slateblue",Object.freeze([106,90,205])]),Object.freeze(["slategray",Object.freeze([112,128,144])]),Object.freeze(["slategrey",Object.freeze([112,128,144])]),Object.freeze(["snow",Object.freeze([255,250,250])]),Object.freeze(["springgreen",Object.freeze([0,255,127])]),Object.freeze(["steelblue",Object.freeze([70,130,180])]),Object.freeze(["tan",Object.freeze([210,180,140])]),Object.freeze(["teal",Object.freeze([0,128,128])]),Object.freeze(["thistle",Object.freeze([216,191,216])]),Object.freeze(["tomato",Object.freeze([255,99,71])]),Object.freeze(["turquoise",Object.freeze([64,224,208])]),Object.freeze(["violet",Object.freeze([238,130,238])]),Object.freeze(["wheat",Object.freeze([245,222,179])]),Object.freeze(["white",Object.freeze([255,255,255])]),Object.freeze(["whitesmoke",Object.freeze([245,245,245])]),Object.freeze(["yellow",Object.freeze([255,255,0])]),Object.freeze(["yellowgreen",Object.freeze([154,205,50])])])},function(e,t,r){"use strict";var n=this&&this.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),c=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)c.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return c},o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.createColor=void 0;var i=o(r(3)),c=o(r(5)),u=o(r(6)),s=o(r(8)),f=o(r(9)),a=o(r(11)),l=o(r(12)),b=o(r(13)),h=r(1),p=r(0),O=function(){function e(e,t){if(this._alpha=1,this.red=0,this.green=0,this.blue=0,this.hue=0,this.saturation=0,this.lightness=0,this.saturationV=0,this.value=0,this._rgb=null,this._rgba=null,this._hsl=null,this._hsla=null,this._hsv=null,this._hsva=null,this._hex=null,this._hexa=null,"string"==typeof e&&this.parseCSSColor(e),Array.isArray(e))switch(t){case void 0:case h.ColorType.RGB:this.rgb.set(e);break;case h.ColorType.HSL:this.hsl.set(e);break;case h.ColorType.HSLA:this.hsla.set(e);break;case h.ColorType.HSV:this.hsv.set(e);break;case h.ColorType.HSVA:this.hsva.set(e)}}return Object.defineProperty(e,"ColorType",{get:function(){return h.ColorType},enumerable:!1,configurable:!0}),e.createColor=function(t,r){return new e(t,r)},e.prototype.parseCSSColor=function(e){p.parseCSSColor(e,this)},Object.defineProperty(e.prototype,"rgb",{get:function(){return null===this._rgb&&(this._rgb=new i.default(this)),this._rgb},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"rgba",{get:function(){return null===this._rgba&&(this._rgba=new c.default(this)),this._rgba},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"hsl",{get:function(){return this._hsl||(this._hsl=new u.default(this)),this._hsl},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"hsla",{get:function(){return this._hsla||(this._hsla=new s.default(this)),this._hsla},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"hsv",{get:function(){return this._hsv||(this._hsv=new f.default(this)),this._hsv},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"hsva",{get:function(){return this._hsva||(this._hsva=new a.default(this)),this._hsva},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"hex",{get:function(){return this._hex||(this._hex=new l.default(this)),this._hex},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"hexa",{get:function(){return this._hexa||(this._hexa=new b.default(this)),this._hexa},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"alpha",{get:function(){return p.clamp(this._alpha,0,1)},set:function(e){this._alpha=e},enumerable:!1,configurable:!0}),e.prototype.setRed=function(e){this.red=p.clamp(e,0,255),this.updateHslFromRgb(),this.updateHsvFromHsl()},e.prototype.getRed=function(){return Math.round(p.clamp(this.red,0,255))},e.prototype.setGreen=function(e){this.green=p.clamp(e,0,255),this.updateHslFromRgb(),this.updateHsvFromHsl()},e.prototype.getGreen=function(){return Math.round(p.clamp(this.green,0,255))},e.prototype.setBlue=function(e){this.blue=p.clamp(e,0,255),this.updateHslFromRgb(),this.updateHsvFromHsl()},e.prototype.getBlue=function(){return Math.round(p.clamp(this.blue,0,255))},e.prototype.setHue=function(e){this.hue=p.clamp(e,0,360),this.updateRgbFromHsl()},e.prototype.getHue=function(){return Math.round(p.clamp(this.hue,0,360))},e.prototype.setSaturation=function(e){this.saturation=p.clamp(e,0,1),this.updateRgbFromHsl(),this.updateHsvFromHsl()},e.prototype.getSaturation=function(){return p.clamp(this.saturation,0,1)},e.prototype.setSaturationV=function(e){this.saturationV=p.clamp(e,0,1),this.updateHslFromHsv(),this.updateRgbFromHsl()},e.prototype.getSaturationV=function(){return p.clamp(this.saturationV,0,1)},e.prototype.setLightness=function(e){this.lightness=p.clamp(e,0,1),this.updateRgbFromHsl(),this.updateHsvFromHsl()},e.prototype.getLightness=function(){return p.clamp(this.lightness,0,1)},e.prototype.setValue=function(e){this.value=p.clamp(e,0,1),this.updateHslFromHsv(),this.updateRgbFromHsl()},e.prototype.getValue=function(){return p.clamp(this.value,0,1)},e.prototype.getGreyValue=function(){return.2126*this.red+.7152*this.green+.0722*this.blue},e.prototype.invert=function(){return this.setHue((this.hue+180)%360),this},e.prototype.getLuminance=function(){var e=n(this.rgb.get().map((function(e){return e/255})).map((function(e){return e<=.03928?e/12.92:Math.pow((e+.055)/1.055,2.4)})),3);return.2126*e[0]+.7152*e[1]+.0722*e[2]},e.prototype.getContrastRatio=function(e){var t=this.getLuminance(),r=e.getLuminance();return t>r?(t+.05)/(r+.05):(r+.05)/(t+.05)},e.prototype.copy=function(){var t=new e;return t.setRed(this.red),t.setGreen(this.green),t.setBlue(this.blue),t.alpha=this.alpha,t},e.prototype.mixWithColor=function(e,t){return this.rgb.set(p.mixRgbColors(this.rgb.get(),e.rgb.get(),t)),this},e.prototype.updateHslFromRgb=function(){var e=this.red/255,t=this.green/255,r=this.blue/255,n=Math.max(e,t,r),o=Math.min(e,t,r),i=n+o,c=n-o;if(this.hue=0,this.saturation=0,this.lightness=i/2,0!==c){this.saturation=c/(1-Math.abs(i-1));var u=60/c;switch(n){case e:this.hue=(360+(t-r)*u)%360;break;case t:this.hue=120+(r-e)*u;break;case r:this.hue=240+(e-t)*u}}},e.prototype.updateRgbFromHsl=function(){var e,t=p.hueToRgb(this.hue),r=p.mixRgbColors(t,h.GREY,1-this.saturation),o=this.lightness<=.5?h.BLACK:h.WHITE,i=1-Math.abs(2*this.lightness-1);e=n(p.mixRgbColors(o,r,i),3),this.red=e[0],this.green=e[1],this.blue=e[2]},e.prototype.updateHsvFromHsl=function(){var e=this.lightness,t=(2*e+this.saturation*(1-Math.abs(2*e-1)))/2;this.saturationV=2*(t-e)/t||0,this.value=t},e.prototype.updateHslFromHsv=function(){var e=this.value,t=this.saturationV,r=.5*e*(2-t);this.saturation=t*e/(1-Math.abs(2*r-1))||0,this.lightness=r},e.parseCSSColor=p.parseCSSColor,e}();t.default=O,t.createColor=O.createColor},function(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),i=this&&this.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),c=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)c.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return c},c=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var u=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t.prototype.get=function(){return[this.r,this.g,this.b]},t.prototype.set=function(e){var t;return t=i(e,3),this.r=t[0],this.g=t[1],this.b=t[2],this},t.prototype.toCss=function(){return"rgb("+this.r+", "+this.g+", "+this.b+")"},t}(c(r(4)).default);t.default=u},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e){this.color=e}return Object.defineProperty(e.prototype,"r",{get:function(){return this.color.getRed()},set:function(e){this.color.setRed(e)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"g",{get:function(){return this.color.getGreen()},set:function(e){this.color.setGreen(e)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"b",{get:function(){return this.color.getBlue()},set:function(e){this.color.setBlue(e)},enumerable:!1,configurable:!0}),e}();t.default=n},function(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),i=this&&this.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),c=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)c.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return c},c=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var u=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),Object.defineProperty(t.prototype,"a",{get:function(){return this.color.alpha},set:function(e){this.color.alpha=e},enumerable:!1,configurable:!0}),t.prototype.get=function(){return[this.r,this.g,this.b,this.a]},t.prototype.set=function(e){var t;return t=i(e,4),this.r=t[0],this.g=t[1],this.b=t[2],this.a=t[3],this},t.prototype.toCss=function(){return"rgba("+this.r+", "+this.g+", "+this.b+", "+this.a.toFixed(2)+")"},t}(c(r(4)).default);t.default=u},function(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),i=this&&this.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),c=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)c.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return c},c=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var u=r(0),s=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t.prototype.get=function(){return[this.h,this.s,this.l]},t.prototype.set=function(e){var t;return t=i(e,3),this.h=t[0],this.s=t[1],this.l=t[2],this},t.prototype.toCss=function(){var e=u.toPercent(this.s),t=u.toPercent(this.l);return"hsl("+this.h+", "+e+", "+t+")"},t}(c(r(7)).default);t.default=s},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e){this.color=e}return Object.defineProperty(e.prototype,"h",{get:function(){return this.color.getHue()},set:function(e){this.color.setHue(e)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"s",{get:function(){return this.color.getSaturation()},set:function(e){this.color.setSaturation(e)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"l",{get:function(){return this.color.getLightness()},set:function(e){this.color.setLightness(e)},enumerable:!1,configurable:!0}),e}();t.default=n},function(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),i=this&&this.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),c=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)c.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return c},c=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var u=r(0),s=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),Object.defineProperty(t.prototype,"a",{get:function(){return this.color.alpha},set:function(e){this.color.alpha=e},enumerable:!1,configurable:!0}),t.prototype.get=function(){return[this.h,this.s,this.l,this.a]},t.prototype.set=function(e){var t;return t=i(e,4),this.h=t[0],this.s=t[1],this.l=t[2],this.a=t[3],this},t.prototype.toCss=function(){var e=u.toPercent(this.s),t=u.toPercent(this.l);return"hsla("+this.h+", "+e+", "+t+", "+this.color.alpha.toFixed(2)+")"},t}(c(r(7)).default);t.default=s},function(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),i=this&&this.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),c=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)c.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return c},c=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var u=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t.prototype.get=function(){return[this.h,this.s,this.v]},t.prototype.set=function(e){var t;return t=i(e,3),this.h=t[0],this.s=t[1],this.v=t[2],this},t.prototype.toCss=function(){return this.color.hsl.toCss()},t}(c(r(10)).default);t.default=u},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e){this.color=e}return Object.defineProperty(e.prototype,"h",{get:function(){return this.color.getHue()},set:function(e){this.color.setHue(e)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"s",{get:function(){return this.color.getSaturationV()},set:function(e){this.color.setSaturationV(e)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"v",{get:function(){return this.color.getValue()},set:function(e){this.color.setValue(e)},enumerable:!1,configurable:!0}),e}();t.default=n},function(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),i=this&&this.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),c=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)c.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return c},c=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var u=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),Object.defineProperty(t.prototype,"a",{get:function(){return this.color.alpha},set:function(e){this.color.alpha=e},enumerable:!1,configurable:!0}),t.prototype.get=function(){return[this.h,this.s,this.v,this.a]},t.prototype.set=function(e){var t;return t=i(e,4),this.h=t[0],this.s=t[1],this.v=t[2],this.a=t[3],this},t.prototype.toCss=function(){return this.color.hsla.toCss()},t}(c(r(10)).default);t.default=u},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(1),o=r(0),i=function(){function e(e){this.color=e}return e.prototype.set=function(e){var t,r=(t=e,[n.RE_HEX_6,n.RE_HEX_3].find((function(e){return e.test(t)})));if(!r)throw new Error("Not valid hex color");return o.cssParsers.get(r)(e.match(r),this.color),this},e.prototype.get=function(){return this.color.rgb.get().map(o.toTwoHex).join("")},e.prototype.toCss=function(){var e=this.get();return e[0]===e[1]&&e[2]===e[3]&&e[4]===e[5]?"#"+e[0]+e[2]+e[4]:"#"+e},e}();t.default=i},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(1),o=r(0),i=function(){function e(e){this.color=e}return Object.defineProperty(e.prototype,"a",{get:function(){return this.color.alpha},set:function(e){this.color.alpha=e},enumerable:!1,configurable:!0}),e.prototype.set=function(e){var t,r=(t=e,[n.RE_HEX_8,n.RE_HEX_4].find((function(e){return e.test(t)})));if(!r)throw new Error("Not valid hex color");return o.cssParsers.get(r)(e.match(r),this.color),this},e.prototype.get=function(){return this.color.rgba.get().map((function(e,t){return o.toTwoHex(3===t?Math.round(255*e):e)})).join("")},e.prototype.toCss=function(){var e=this.get();return e[0]===e[1]&&e[2]===e[3]&&e[4]===e[5]&&e[6]===e[7]&&(e=""+e[0]+e[2]+e[4]+e[6]),"#"+e},e}();t.default=i},function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var o=n(r(2));t.default=o.default;var i=r(3);Object.defineProperty(t,"RGBInterface",{enumerable:!0,get:function(){return i.default}});var c=r(5);Object.defineProperty(t,"RGBAInterface",{enumerable:!0,get:function(){return c.default}});var u=r(6);Object.defineProperty(t,"HSLInterface",{enumerable:!0,get:function(){return u.default}});var s=r(8);Object.defineProperty(t,"HSLAInterface",{enumerable:!0,get:function(){return s.default}});var f=r(9);Object.defineProperty(t,"HSVInterface",{enumerable:!0,get:function(){return f.default}});var a=r(11);Object.defineProperty(t,"HSVAInterface",{enumerable:!0,get:function(){return a.default}});var l=r(12);Object.defineProperty(t,"HexInterface",{enumerable:!0,get:function(){return l.default}});var b=r(13);Object.defineProperty(t,"HexAInterface",{enumerable:!0,get:function(){return b.default}});var h=r(1);Object.defineProperty(t,"ColorType",{enumerable:!0,get:function(){return h.ColorType}});var p=r(0);Object.defineProperty(t,"parseCSSColor",{enumerable:!0,get:function(){return p.parseCSSColor}});var O=r(2);Object.defineProperty(t,"createColor",{enumerable:!0,get:function(){return O.createColor}})}]); | ||
module.exports=function(t){var e={};function r(n){if(e[n])return e[n].exports;var o=e[n]={i:n,l:!1,exports:{}};return t[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}return r.m=t,r.c=e,r.d=function(t,e,n){r.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.t=function(t,e){if(1&e&&(t=r(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)r.d(n,o,function(e){return t[e]}.bind(null,o));return n},r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,"a",e),e},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.p="",r(r.s=14)}([function(t,e,r){"use strict";var n=this&&this.__read||function(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,o,i=r.call(t),u=[];try{for(;(void 0===e||e-- >0)&&!(n=i.next()).done;)u.push(n.value)}catch(t){o={error:t}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return u},o=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.toTwoHex=e.hueToRgb=e.toPercent=e.mixRgbColors=e.clamp=e.parseCSSColor=e.cssParsers=void 0;var i=r(1),u=o(r(2)),s=function(t,e){void 0===e&&(e=new u.default);var r=t.slice(1).map((function(t){return Number.parseInt(t,16)}));return e.rgb.set(r),e},a=function(t,e){void 0===e&&(e=new u.default);var r=t.slice(1).map((function(t){return Number.parseInt(t.repeat(2),16)}));return e.rgb.set(r),e},l=function(t,e){void 0===e&&(e=new u.default);var r=t.slice(1).map((function(t){return Number.parseInt(t,10)}));return e.rgb.set(r),e},c=function(t,e){void 0===e&&(e=new u.default);var r=n(t.slice(1).map((function(t){return Number.parseInt(t,10)})),3),o=r[0],i=r[1],s=r[2];return e.hsl.set([o%360,i/100,s/100]),e},h=[[i.RE_HEX_6,s],[i.RE_HEX_3,a],[i.RE_HEX_8,function(t,e){void 0===e&&(e=new u.default);var r=Number.parseInt(t.pop(),16);return s(t,e),e.alpha=0===r?r:r/255,e}],[i.RE_HEX_4,function(t,e){void 0===e&&(e=new u.default);var r=Number.parseInt(t.pop().repeat(2),16);return a(t,e),e.alpha=0===r?r:r/255,e}],[i.RE_RGB,l],[i.RE_RGBA,function(t,e){void 0===e&&(e=new u.default);var r=Number.parseFloat(t.pop());return l(t,e),e.alpha=r,e}],[i.RE_HSL,c],[i.RE_HSLA,function(t,e){void 0===e&&(e=new u.default);var r=Number.parseFloat(t.pop());return c(t,e),e.alpha=r,e}]];e.cssParsers=new Map(h),e.parseCSSColor=function(t,e){void 0===e&&(e=new u.default);var r=h.find((function(e){return n(e,1)[0].test(t)}));if(r){var o=n(r,2),s=o[0];return(0,o[1])(t.match(s),e)}return i.colorKeywords.has(t.trim())?(e.rgb.set(i.colorKeywords.get(t.trim())),e):(e.rgb.set([0,0,0]),e)},e.clamp=function(t,e,r){return Math.min(Math.max(t,e),r)},e.mixRgbColors=function(t,e,r){return[t[0]+r*(e[0]-t[0]),t[1]+r*(e[1]-t[1]),t[2]+r*(e[2]-t[2])]},e.toPercent=function(t){return Math.round(100*t)+"%"},e.hueToRgb=function(t){var e=(t%=360)%60;switch(t-=e,e=Math.round(4.25*e),t){case 0:return[255,e,0];case 60:return[255-e,255,0];case 120:return[0,255,e];case 180:return[0,255-e,255];case 240:return[e,0,255];case 300:return[255,0,255-e]}return[0,0,0]},e.toTwoHex=function(t){var e=t.toString(16);return 1===e.length?"0"+e:e}},function(t,e,r){"use strict";var n=this&&this.__makeTemplateObject||function(t,e){return Object.defineProperty?Object.defineProperty(t,"raw",{value:e}):t.raw=e,t};Object.defineProperty(e,"__esModule",{value:!0}),e.colorKeywords=e.RE_HSLA=e.RE_HSL=e.RE_RGBA=e.RE_RGB=e.RE_HEX_4=e.RE_HEX_8=e.RE_HEX_3=e.RE_HEX_6=e.GREY=e.WHITE=e.BLACK=e.DEFAULT_COLOR=e.ColorType=void 0;var o=String.raw,i=o(f||(f=n(["([0-9a-fA-F])"],["([0-9a-fA-F])"]))),u=o(p||(p=n(["([0-9a-fA-F]{2})"],["([0-9a-fA-F]{2})"]))),s=o(d||(d=n(["(d|[1-9]d|1d{2}|2[0-4]d|25[0-5])"],["(\\d|[1-9]\\d|1\\d{2}|2[0-4]\\d|25[0-5])"]))),a=o(y||(y=n(["(0|1|0?.d{1,20})"],["(0|1|0?\\.\\d{1,20})"]))),l=o(b||(b=n(["(d|[1-9]d|100)"],["(\\d|[1-9]\\d|100)"]))),c=o(g||(g=n(["s*","s*,s*","s*,s*","s*"],["\\s*","\\s*,\\s*","\\s*,\\s*","\\s*"])),s,s,s),h=o(_||(_=n(["s*(d{1,20})s*,s*","%s*,s*","%s*"],["\\s*(\\d{1,20})\\s*,\\s*","%\\s*,\\s*","%\\s*"])),l,l);!function(t){t[t.KEYWORD=1]="KEYWORD",t[t.HEX=2]="HEX",t[t.RGB=3]="RGB",t[t.RGBA=4]="RGBA",t[t.HSL=5]="HSL",t[t.HSLA=6]="HSLA",t[t.HSV=7]="HSV",t[t.HSVA=8]="HSVA"}(e.ColorType||(e.ColorType={})),e.DEFAULT_COLOR="black",e.BLACK=[0,0,0],e.WHITE=[255,255,255],e.GREY=[127.5,127.5,127.5],e.RE_HEX_6=new RegExp(o(v||(v=n(["^s*#?","","","s*$"],["^\\s*#?","","","\\s*$"])),u,u,u)),e.RE_HEX_3=new RegExp(o(m||(m=n(["^s*#?","","","s*$"],["^\\s*#?","","","\\s*$"])),i,i,i)),e.RE_HEX_8=new RegExp(o(w||(w=n(["^s*#?","","","","s*$"],["^\\s*#?","","","","\\s*$"])),u,u,u,u)),e.RE_HEX_4=new RegExp(o(O||(O=n(["^s*#?","","","","s*$"],["^\\s*#?","","","","\\s*$"])),i,i,i,i)),e.RE_RGB=new RegExp(o(H||(H=n(["^s*rgb(",")s*$"],["^\\s*rgb\\(","\\)\\s*$"])),c)),e.RE_RGBA=new RegExp(o(R||(R=n(["^s*rgba(",",s*","s*)s*$"],["^\\s*rgba\\(",",\\s*","\\s*\\)\\s*$"])),c,a)),e.RE_HSL=new RegExp(o(P||(P=n(["^s*hsl(",")s*$"],["^\\s*hsl\\(","\\)\\s*$"])),h)),e.RE_HSLA=new RegExp(o(j||(j=n(["^s*hsla(",",s*","s*)s*$"],["^\\s*hsla\\(",",\\s*","\\s*\\)\\s*$"])),h,a));var f,p,d,y,b,g,_,v,m,w,O,H,R,P,j,S=function(t){return Object.freeze(t),Object.values(t).filter((function(t){return null!==t&&"object"==typeof t})).forEach(S),t};e.colorKeywords=new Map(S([["aliceblue",[240,248,255]],["antiquewhite",[250,235,215]],["aqua",[0,255,255]],["aquamarine",[127,255,212]],["azure",[240,255,255]],["beige",[245,245,220]],["bisque",[255,228,196]],["black",[0,0,0]],["blanchedalmond",[255,235,205]],["blue",[0,0,255]],["blueviolet",[138,43,226]],["brown",[165,42,42]],["burlywood",[222,184,135]],["cadetblue",[95,158,160]],["chartreuse",[127,255,0]],["chocolate",[210,105,30]],["coral",[255,127,80]],["cornflowerblue",[100,149,237]],["cornsilk",[255,248,220]],["crimson",[220,20,60]],["cyan",[0,255,255]],["darkblue",[0,0,139]],["darkcyan",[0,139,139]],["darkgoldenrod",[184,134,11]],["darkgray",[169,169,169]],["darkgreen",[0,100,0]],["darkgrey",[169,169,169]],["darkkhaki",[189,183,107]],["darkmagenta",[139,0,139]],["darkolivegreen",[85,107,47]],["darkorange",[255,140,0]],["darkorchid",[153,50,204]],["darkred",[139,0,0]],["darksalmon",[233,150,122]],["darkseagreen",[143,188,143]],["darkslateblue",[72,61,139]],["darkslategray",[47,79,79]],["darkslategrey",[47,79,79]],["darkturquoise",[0,206,209]],["darkviolet",[148,0,211]],["deeppink",[255,20,147]],["deepskyblue",[0,191,255]],["dimgray",[105,105,105]],["dimgrey",[105,105,105]],["dodgerblue",[30,144,255]],["firebrick",[178,34,34]],["floralwhite",[255,250,240]],["forestgreen",[34,139,34]],["fuchsia",[255,0,255]],["gainsboro",[220,220,220]],["ghostwhite",[248,248,255]],["gold",[255,215,0]],["goldenrod",[218,165,32]],["gray",[128,128,128]],["green",[0,128,0]],["greenyellow",[173,255,47]],["grey",[128,128,128]],["honeydew",[240,255,240]],["hotpink",[255,105,180]],["indianred",[205,92,92]],["indigo",[75,0,130]],["ivory",[255,255,240]],["khaki",[240,230,140]],["lavender",[230,230,250]],["lavenderblush",[255,240,245]],["lawngreen",[124,252,0]],["lemonchiffon",[255,250,205]],["lightblue",[173,216,230]],["lightcoral",[240,128,128]],["lightcyan",[224,255,255]],["lightgoldenrodyellow",[250,250,210]],["lightgray",[211,211,211]],["lightgreen",[144,238,144]],["lightgrey",[211,211,211]],["lightpink",[255,182,193]],["lightsalmon",[255,160,122]],["lightseagreen",[32,178,170]],["lightskyblue",[135,206,250]],["lightslategray",[119,136,153]],["lightslategrey",[119,136,153]],["lightsteelblue",[176,196,222]],["lightyellow",[255,255,224]],["lime",[0,255,0]],["limegreen",[50,205,50]],["linen",[250,240,230]],["magenta",[255,0,255]],["maroon",[128,0,0]],["mediumaquamarine",[102,205,170]],["mediumblue",[0,0,205]],["mediumorchid",[186,85,211]],["mediumpurple",[147,112,219]],["mediumseagreen",[60,179,113]],["mediumslateblue",[123,104,238]],["mediumspringgreen",[0,250,154]],["mediumturquoise",[72,209,204]],["mediumvioletred",[199,21,133]],["midnightblue",[25,25,112]],["mintcream",[245,255,250]],["mistyrose",[255,228,225]],["moccasin",[255,228,181]],["navajowhite",[255,222,173]],["navy",[0,0,128]],["oldlace",[253,245,230]],["olive",[128,128,0]],["olivedrab",[107,142,35]],["orange",[255,165,0]],["orangered",[255,69,0]],["orchid",[218,112,214]],["palegoldenrod",[238,232,170]],["palegreen",[152,251,152]],["paleturquoise",[175,238,238]],["palevioletred",[219,112,147]],["papayawhip",[255,239,213]],["peachpuff",[255,218,185]],["peru",[205,133,63]],["pink",[255,192,203]],["plum",[221,160,221]],["powderblue",[176,224,230]],["purple",[128,0,128]],["red",[255,0,0]],["rosybrown",[188,143,143]],["royalblue",[65,105,225]],["saddlebrown",[139,69,19]],["salmon",[250,128,114]],["sandybrown",[244,164,96]],["seagreen",[46,139,87]],["seashell",[255,245,238]],["sienna",[160,82,45]],["silver",[192,192,192]],["skyblue",[135,206,235]],["slateblue",[106,90,205]],["slategray",[112,128,144]],["slategrey",[112,128,144]],["snow",[255,250,250]],["springgreen",[0,255,127]],["steelblue",[70,130,180]],["tan",[210,180,140]],["teal",[0,128,128]],["thistle",[216,191,216]],["tomato",[255,99,71]],["turquoise",[64,224,208]],["violet",[238,130,238]],["wheat",[245,222,179]],["white",[255,255,255]],["whitesmoke",[245,245,245]],["yellow",[255,255,0]],["yellowgreen",[154,205,50]]]))},function(t,e,r){"use strict";var n=this&&this.__read||function(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,o,i=r.call(t),u=[];try{for(;(void 0===e||e-- >0)&&!(n=i.next()).done;)u.push(n.value)}catch(t){o={error:t}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return u},o=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.createColor=void 0;var i=o(r(3)),u=o(r(5)),s=o(r(6)),a=o(r(8)),l=o(r(9)),c=o(r(11)),h=o(r(12)),f=o(r(13)),p=r(1),d=r(0),y=function(){function t(t,e){if(this._alpha=1,this.red=0,this.green=0,this.blue=0,this.hue=0,this.saturation=0,this.lightness=0,this.saturationV=0,this.value=0,this._rgb=null,this._rgba=null,this._hsl=null,this._hsla=null,this._hsv=null,this._hsva=null,this._hex=null,this._hexa=null,"string"==typeof t&&this.parseCSSColor(t),Array.isArray(t))switch(e){case void 0:case p.ColorType.RGB:this.rgb.set(t);break;case p.ColorType.HSL:this.hsl.set(t);break;case p.ColorType.HSLA:this.hsla.set(t);break;case p.ColorType.HSV:this.hsv.set(t);break;case p.ColorType.HSVA:this.hsva.set(t)}}return Object.defineProperty(t,"ColorType",{get:function(){return p.ColorType},enumerable:!1,configurable:!0}),t.createColor=function(e,r){return new t(e,r)},t.prototype.parseCSSColor=function(t){d.parseCSSColor(t,this)},Object.defineProperty(t.prototype,"rgb",{get:function(){return null===this._rgb&&(this._rgb=new i.default(this)),this._rgb},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"rgba",{get:function(){return null===this._rgba&&(this._rgba=new u.default(this)),this._rgba},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"hsl",{get:function(){return this._hsl||(this._hsl=new s.default(this)),this._hsl},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"hsla",{get:function(){return this._hsla||(this._hsla=new a.default(this)),this._hsla},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"hsv",{get:function(){return this._hsv||(this._hsv=new l.default(this)),this._hsv},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"hsva",{get:function(){return this._hsva||(this._hsva=new c.default(this)),this._hsva},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"hex",{get:function(){return this._hex||(this._hex=new h.default(this)),this._hex},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"hexa",{get:function(){return this._hexa||(this._hexa=new f.default(this)),this._hexa},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"alpha",{get:function(){return d.clamp(this._alpha,0,1)},set:function(t){this._alpha=t},enumerable:!1,configurable:!0}),t.prototype.setRed=function(t){this.red=d.clamp(t,0,255),this.updateHslFromRgb(),this.updateHsvFromHsl()},t.prototype.getRed=function(){return Math.round(d.clamp(this.red,0,255))},t.prototype.setGreen=function(t){this.green=d.clamp(t,0,255),this.updateHslFromRgb(),this.updateHsvFromHsl()},t.prototype.getGreen=function(){return Math.round(d.clamp(this.green,0,255))},t.prototype.setBlue=function(t){this.blue=d.clamp(t,0,255),this.updateHslFromRgb(),this.updateHsvFromHsl()},t.prototype.getBlue=function(){return Math.round(d.clamp(this.blue,0,255))},t.prototype.setHue=function(t){this.hue=d.clamp(t,0,360),this.updateRgbFromHsl()},t.prototype.getHue=function(){return Math.round(d.clamp(this.hue,0,360))},t.prototype.setSaturation=function(t){this.saturation=d.clamp(t,0,1),this.updateRgbFromHsl(),this.updateHsvFromHsl()},t.prototype.getSaturation=function(){return d.clamp(this.saturation,0,1)},t.prototype.setSaturationV=function(t){this.saturationV=d.clamp(t,0,1),this.updateHslFromHsv(),this.updateRgbFromHsl()},t.prototype.getSaturationV=function(){return d.clamp(this.saturationV,0,1)},t.prototype.setLightness=function(t){this.lightness=d.clamp(t,0,1),this.updateRgbFromHsl(),this.updateHsvFromHsl()},t.prototype.getLightness=function(){return d.clamp(this.lightness,0,1)},t.prototype.setValue=function(t){this.value=d.clamp(t,0,1),this.updateHslFromHsv(),this.updateRgbFromHsl()},t.prototype.getValue=function(){return d.clamp(this.value,0,1)},t.prototype.getGreyValue=function(){return.2126*this.red+.7152*this.green+.0722*this.blue},t.prototype.invert=function(){return this.setHue((this.hue+180)%360),this},t.prototype.getLuminance=function(){var t=n(this.rgb.get().map((function(t){return t/255})).map((function(t){return t<=.03928?t/12.92:Math.pow((t+.055)/1.055,2.4)})),3);return.2126*t[0]+.7152*t[1]+.0722*t[2]},t.prototype.getContrastRatio=function(t){var e=this.getLuminance(),r=t.getLuminance();return e>r?(e+.05)/(r+.05):(r+.05)/(e+.05)},t.prototype.copy=function(){var e=new t;return e.setRed(this.red),e.setGreen(this.green),e.setBlue(this.blue),e.alpha=this.alpha,e},t.prototype.mixWithColor=function(t,e){return this.rgb.set(d.mixRgbColors(this.rgb.get(),t.rgb.get(),e)),this},t.prototype.updateHslFromRgb=function(){var t=this.red/255,e=this.green/255,r=this.blue/255,n=Math.max(t,e,r),o=Math.min(t,e,r),i=n+o,u=n-o;if(this.hue=0,this.saturation=0,this.lightness=i/2,0!==u){this.saturation=u/(1-Math.abs(i-1));var s=60/u;switch(n){case t:this.hue=(360+(e-r)*s)%360;break;case e:this.hue=120+(r-t)*s;break;case r:this.hue=240+(t-e)*s}}},t.prototype.updateRgbFromHsl=function(){var t,e=d.hueToRgb(this.hue),r=d.mixRgbColors(e,p.GREY,1-this.saturation),o=this.lightness<=.5?p.BLACK:p.WHITE,i=1-Math.abs(2*this.lightness-1);t=n(d.mixRgbColors(o,r,i),3),this.red=t[0],this.green=t[1],this.blue=t[2]},t.prototype.updateHsvFromHsl=function(){var t=this.lightness,e=(2*t+this.saturation*(1-Math.abs(2*t-1)))/2;this.saturationV=2*(e-t)/e||0,this.value=e},t.prototype.updateHslFromHsv=function(){var t=this.value,e=this.saturationV,r=.5*t*(2-e);this.saturation=e*t/(1-Math.abs(2*r-1))||0,this.lightness=r},t.parseCSSColor=d.parseCSSColor,t}();e.default=y,e.createColor=y.createColor},function(t,e,r){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(t,e)},function(t,e){function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}),i=this&&this.__read||function(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,o,i=r.call(t),u=[];try{for(;(void 0===e||e-- >0)&&!(n=i.next()).done;)u.push(n.value)}catch(t){o={error:t}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return u},u=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var s=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return o(e,t),e.prototype.get=function(){return[this.r,this.g,this.b]},e.prototype.set=function(t){var e;return e=i(t,3),this.r=e[0],this.g=e[1],this.b=e[2],this},e.prototype.toCss=function(){return"rgb("+this.r+", "+this.g+", "+this.b+")"},e}(u(r(4)).default);e.default=s},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=function(){function t(t){this.color=t}return Object.defineProperty(t.prototype,"r",{get:function(){return this.color.getRed()},set:function(t){this.color.setRed(t)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"g",{get:function(){return this.color.getGreen()},set:function(t){this.color.setGreen(t)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"b",{get:function(){return this.color.getBlue()},set:function(t){this.color.setBlue(t)},enumerable:!1,configurable:!0}),t}();e.default=n},function(t,e,r){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(t,e)},function(t,e){function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}),i=this&&this.__read||function(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,o,i=r.call(t),u=[];try{for(;(void 0===e||e-- >0)&&!(n=i.next()).done;)u.push(n.value)}catch(t){o={error:t}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return u},u=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var s=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return o(e,t),Object.defineProperty(e.prototype,"a",{get:function(){return this.color.alpha},set:function(t){this.color.alpha=t},enumerable:!1,configurable:!0}),e.prototype.get=function(){return[this.r,this.g,this.b,this.a]},e.prototype.set=function(t){var e;return e=i(t,4),this.r=e[0],this.g=e[1],this.b=e[2],this.a=e[3],this},e.prototype.toCss=function(){return"rgba("+this.r+", "+this.g+", "+this.b+", "+this.a.toFixed(2)+")"},e}(u(r(4)).default);e.default=s},function(t,e,r){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(t,e)},function(t,e){function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}),i=this&&this.__read||function(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,o,i=r.call(t),u=[];try{for(;(void 0===e||e-- >0)&&!(n=i.next()).done;)u.push(n.value)}catch(t){o={error:t}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return u},u=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var s=r(0),a=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return o(e,t),e.prototype.get=function(){return[this.h,this.s,this.l]},e.prototype.set=function(t){var e;return e=i(t,3),this.h=e[0],this.s=e[1],this.l=e[2],this},e.prototype.toCss=function(){var t=s.toPercent(this.s),e=s.toPercent(this.l);return"hsl("+this.h+", "+t+", "+e+")"},e}(u(r(7)).default);e.default=a},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=function(){function t(t){this.color=t}return Object.defineProperty(t.prototype,"h",{get:function(){return this.color.getHue()},set:function(t){this.color.setHue(t)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"s",{get:function(){return this.color.getSaturation()},set:function(t){this.color.setSaturation(t)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"l",{get:function(){return this.color.getLightness()},set:function(t){this.color.setLightness(t)},enumerable:!1,configurable:!0}),t}();e.default=n},function(t,e,r){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(t,e)},function(t,e){function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}),i=this&&this.__read||function(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,o,i=r.call(t),u=[];try{for(;(void 0===e||e-- >0)&&!(n=i.next()).done;)u.push(n.value)}catch(t){o={error:t}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return u},u=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var s=r(0),a=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return o(e,t),Object.defineProperty(e.prototype,"a",{get:function(){return this.color.alpha},set:function(t){this.color.alpha=t},enumerable:!1,configurable:!0}),e.prototype.get=function(){return[this.h,this.s,this.l,this.a]},e.prototype.set=function(t){var e;return e=i(t,4),this.h=e[0],this.s=e[1],this.l=e[2],this.a=e[3],this},e.prototype.toCss=function(){var t=s.toPercent(this.s),e=s.toPercent(this.l);return"hsla("+this.h+", "+t+", "+e+", "+this.color.alpha.toFixed(2)+")"},e}(u(r(7)).default);e.default=a},function(t,e,r){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(t,e)},function(t,e){function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}),i=this&&this.__read||function(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,o,i=r.call(t),u=[];try{for(;(void 0===e||e-- >0)&&!(n=i.next()).done;)u.push(n.value)}catch(t){o={error:t}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return u},u=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var s=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return o(e,t),e.prototype.get=function(){return[this.h,this.s,this.v]},e.prototype.set=function(t){var e;return e=i(t,3),this.h=e[0],this.s=e[1],this.v=e[2],this},e.prototype.toCss=function(){return this.color.hsl.toCss()},e}(u(r(10)).default);e.default=s},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=function(){function t(t){this.color=t}return Object.defineProperty(t.prototype,"h",{get:function(){return this.color.getHue()},set:function(t){this.color.setHue(t)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"s",{get:function(){return this.color.getSaturationV()},set:function(t){this.color.setSaturationV(t)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"v",{get:function(){return this.color.getValue()},set:function(t){this.color.setValue(t)},enumerable:!1,configurable:!0}),t}();e.default=n},function(t,e,r){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(t,e)},function(t,e){function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}),i=this&&this.__read||function(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,o,i=r.call(t),u=[];try{for(;(void 0===e||e-- >0)&&!(n=i.next()).done;)u.push(n.value)}catch(t){o={error:t}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return u},u=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var s=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return o(e,t),Object.defineProperty(e.prototype,"a",{get:function(){return this.color.alpha},set:function(t){this.color.alpha=t},enumerable:!1,configurable:!0}),e.prototype.get=function(){return[this.h,this.s,this.v,this.a]},e.prototype.set=function(t){var e;return e=i(t,4),this.h=e[0],this.s=e[1],this.v=e[2],this.a=e[3],this},e.prototype.toCss=function(){return this.color.hsla.toCss()},e}(u(r(10)).default);e.default=s},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=r(1),o=r(0),i=function(){function t(t){this.color=t}return t.prototype.set=function(t){var e,r=(e=t,[n.RE_HEX_6,n.RE_HEX_3].find((function(t){return t.test(e)})));if(!r)throw new Error("Not valid hex color");return o.cssParsers.get(r)(t.match(r),this.color),this},t.prototype.get=function(){return this.color.rgb.get().map(o.toTwoHex).join("")},t.prototype.toCss=function(){var t=this.get();return t[0]===t[1]&&t[2]===t[3]&&t[4]===t[5]?"#"+t[0]+t[2]+t[4]:"#"+t},t}();e.default=i},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=r(1),o=r(0),i=function(){function t(t){this.color=t}return Object.defineProperty(t.prototype,"a",{get:function(){return this.color.alpha},set:function(t){this.color.alpha=t},enumerable:!1,configurable:!0}),t.prototype.set=function(t){var e,r=(e=t,[n.RE_HEX_8,n.RE_HEX_4].find((function(t){return t.test(e)})));if(!r)throw new Error("Not valid hex color");return o.cssParsers.get(r)(t.match(r),this.color),this},t.prototype.get=function(){return this.color.rgba.get().map((function(t,e){return o.toTwoHex(3===e?Math.round(255*t):t)})).join("")},t.prototype.toCss=function(){var t=this.get();return t[0]===t[1]&&t[2]===t[3]&&t[4]===t[5]&&t[6]===t[7]&&(t=""+t[0]+t[2]+t[4]+t[6]),"#"+t},t}();e.default=i},function(t,e,r){"use strict";var n=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var o=n(r(2));e.default=o.default;var i=r(3);Object.defineProperty(e,"RGBInterface",{enumerable:!0,get:function(){return i.default}});var u=r(5);Object.defineProperty(e,"RGBAInterface",{enumerable:!0,get:function(){return u.default}});var s=r(6);Object.defineProperty(e,"HSLInterface",{enumerable:!0,get:function(){return s.default}});var a=r(8);Object.defineProperty(e,"HSLAInterface",{enumerable:!0,get:function(){return a.default}});var l=r(9);Object.defineProperty(e,"HSVInterface",{enumerable:!0,get:function(){return l.default}});var c=r(11);Object.defineProperty(e,"HSVAInterface",{enumerable:!0,get:function(){return c.default}});var h=r(12);Object.defineProperty(e,"HexInterface",{enumerable:!0,get:function(){return h.default}});var f=r(13);Object.defineProperty(e,"HexAInterface",{enumerable:!0,get:function(){return f.default}});var p=r(1);Object.defineProperty(e,"ColorType",{enumerable:!0,get:function(){return p.ColorType}});var d=r(0);Object.defineProperty(e,"parseCSSColor",{enumerable:!0,get:function(){return d.parseCSSColor}});var y=r(2);Object.defineProperty(e,"createColor",{enumerable:!0,get:function(){return y.createColor}})}]); |
@@ -0,0 +0,0 @@ import { RGBAInterface as RGBAInterface_, RGBA } from './ColorInterface'; |
@@ -0,0 +0,0 @@ import { RGBInterface as RGBInterface_, RGB } from './ColorInterface'; |
@@ -0,0 +0,0 @@ import { RGB } from './ColorInterface'; |
@@ -68,3 +68,3 @@ { | ||
"types": "dist/index.d.ts", | ||
"version": "0.1.25" | ||
"version": "0.1.26" | ||
} |
44927