28 lines
98 KiB
JavaScript
28 lines
98 KiB
JavaScript
(self.webpackChunkant_design_pro=self.webpackChunkant_design_pro||[]).push([[53390],{70597:function(tt,U,T){"use strict";var i;i={value:!0};var x=Object.assign||function(m){for(var S=1;S<arguments.length;S++){var P=arguments[S];for(var E in P)Object.prototype.hasOwnProperty.call(P,E)&&(m[E]=P[E])}return m},Ce=T(67294),L=Se(Ce);function Se(m){return m&&m.__esModule?m:{default:m}}function Pe(m,S){var P={};for(var E in m)S.indexOf(E)>=0||!Object.prototype.hasOwnProperty.call(m,E)||(P[E]=m[E]);return P}var D=24;U.Z=function(m){var S=m.fill,P=S===void 0?"currentColor":S,E=m.width,Oe=E===void 0?D:E,N=m.height,Te=N===void 0?D:N,$=m.style,W=$===void 0?{}:$,Re=Pe(m,["fill","width","height","style"]);return L.default.createElement("svg",x({viewBox:"0 0 "+D+" "+D,style:x({fill:P,width:Oe,height:Te},W)},Re),L.default.createElement("path",{d:"M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z"}))}},43891:function(tt,U,T){"use strict";var i;i={value:!0};var x=Object.assign||function(m){for(var S=1;S<arguments.length;S++){var P=arguments[S];for(var E in P)Object.prototype.hasOwnProperty.call(P,E)&&(m[E]=P[E])}return m},Ce=T(67294),L=Se(Ce);function Se(m){return m&&m.__esModule?m:{default:m}}function Pe(m,S){var P={};for(var E in m)S.indexOf(E)>=0||!Object.prototype.hasOwnProperty.call(m,E)||(P[E]=m[E]);return P}var D=24;U.Z=function(m){var S=m.fill,P=S===void 0?"currentColor":S,E=m.width,Oe=E===void 0?D:E,N=m.height,Te=N===void 0?D:N,$=m.style,W=$===void 0?{}:$,Re=Pe(m,["fill","width","height","style"]);return L.default.createElement("svg",x({viewBox:"0 0 "+D+" "+D,style:x({fill:P,width:Oe,height:Te},W)},Re),L.default.createElement("path",{d:"M12,18.17L8.83,15L7.42,16.41L12,21L16.59,16.41L15.17,15M12,5.83L15.17,9L16.58,7.59L12,3L7.41,7.59L8.83,9L12,5.83Z"}))}},39350:function(tt,U){"use strict";var T=Array.isArray;U.Z=T},53390:function(tt,U,T){"use strict";T.d(U,{xS:function(){return B0}});var i=T(67294),x=T(79941),Ce=function(e,r,n,a,o){var l=o.clientWidth,s=o.clientHeight,p=typeof e.pageX=="number"?e.pageX:e.touches[0].pageX,c=typeof e.pageY=="number"?e.pageY:e.touches[0].pageY,h=p-(o.getBoundingClientRect().left+window.pageXOffset),d=c-(o.getBoundingClientRect().top+window.pageYOffset);if(n==="vertical"){var u=void 0;if(d<0?u=0:d>s?u=1:u=Math.round(d*100/s)/100,r.a!==u)return{h:r.h,s:r.s,l:r.l,a:u,source:"rgb"}}else{var f=void 0;if(h<0?f=0:h>l?f=1:f=Math.round(h*100/l)/100,a!==f)return{h:r.h,s:r.s,l:r.l,a:f,source:"rgb"}}return null},L={},Se=function(e,r,n,a){if(typeof document=="undefined"&&!a)return null;var o=a?new a:document.createElement("canvas");o.width=n*2,o.height=n*2;var l=o.getContext("2d");return l?(l.fillStyle=e,l.fillRect(0,0,o.width,o.height),l.fillStyle=r,l.fillRect(0,0,n,n),l.translate(n,n),l.fillRect(0,0,n,n),o.toDataURL()):null},Pe=function(e,r,n,a){var o=e+"-"+r+"-"+n+(a?"-server":"");if(L[o])return L[o];var l=Se(e,r,n,a);return L[o]=l,l},D=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},m=function(e){var r=e.white,n=e.grey,a=e.size,o=e.renderers,l=e.borderRadius,s=e.boxShadow,p=e.children,c=(0,x.ZP)({default:{grid:{borderRadius:l,boxShadow:s,absolute:"0px 0px 0px 0px",background:"url("+Pe(r,n,a,o.canvas)+") center left"}}});return(0,i.isValidElement)(p)?i.cloneElement(p,D({},p.props,{style:D({},p.props.style,c.grid)})):i.createElement("div",{style:c.grid})};m.defaultProps={size:8,white:"transparent",grey:"rgba(0,0,0,.08)",renderers:{}};var S=m,P=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},E=function(){function t(e,r){for(var n=0;n<r.length;n++){var a=r[n];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,a.key,a)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}();function Oe(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function N(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:t}function Te(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var $=function(t){Te(e,t);function e(){var r,n,a,o;Oe(this,e);for(var l=arguments.length,s=Array(l),p=0;p<l;p++)s[p]=arguments[p];return o=(n=(a=N(this,(r=e.__proto__||Object.getPrototypeOf(e)).call.apply(r,[this].concat(s))),a),a.handleChange=function(c){var h=Ce(c,a.props.hsl,a.props.direction,a.props.a,a.container);h&&typeof a.props.onChange=="function"&&a.props.onChange(h,c)},a.handleMouseDown=function(c){a.handleChange(c),window.addEventListener("mousemove",a.handleChange),window.addEventListener("mouseup",a.handleMouseUp)},a.handleMouseUp=function(){a.unbindEventListeners()},a.unbindEventListeners=function(){window.removeEventListener("mousemove",a.handleChange),window.removeEventListener("mouseup",a.handleMouseUp)},n),N(a,o)}return E(e,[{key:"componentWillUnmount",value:function(){this.unbindEventListeners()}},{key:"render",value:function(){var n=this,a=this.props.rgb,o=(0,x.ZP)({default:{alpha:{absolute:"0px 0px 0px 0px",borderRadius:this.props.radius},checkboard:{absolute:"0px 0px 0px 0px",overflow:"hidden",borderRadius:this.props.radius},gradient:{absolute:"0px 0px 0px 0px",background:"linear-gradient(to right, rgba("+a.r+","+a.g+","+a.b+`, 0) 0%,
|
|
rgba(`+a.r+","+a.g+","+a.b+", 1) 100%)",boxShadow:this.props.shadow,borderRadius:this.props.radius},container:{position:"relative",height:"100%",margin:"0 3px"},pointer:{position:"absolute",left:a.a*100+"%"},slider:{width:"4px",borderRadius:"1px",height:"8px",boxShadow:"0 0 2px rgba(0, 0, 0, .6)",background:"#fff",marginTop:"1px",transform:"translateX(-2px)"}},vertical:{gradient:{background:"linear-gradient(to bottom, rgba("+a.r+","+a.g+","+a.b+`, 0) 0%,
|
|
rgba(`+a.r+","+a.g+","+a.b+", 1) 100%)"},pointer:{left:0,top:a.a*100+"%"}},overwrite:P({},this.props.style)},{vertical:this.props.direction==="vertical",overwrite:!0});return i.createElement("div",{style:o.alpha},i.createElement("div",{style:o.checkboard},i.createElement(S,{renderers:this.props.renderers})),i.createElement("div",{style:o.gradient}),i.createElement("div",{style:o.container,ref:function(s){return n.container=s},onMouseDown:this.handleMouseDown,onTouchMove:this.handleChange,onTouchStart:this.handleChange},i.createElement("div",{style:o.pointer},this.props.pointer?i.createElement(this.props.pointer,this.props):i.createElement("div",{style:o.slider}))))}}]),e}(i.PureComponent||i.Component),W=$,Re=function(){function t(e,r){for(var n=0;n<r.length;n++){var a=r[n];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,a.key,a)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}();function Yr(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Jr(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Qr(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:t}function en(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var tn=1,It=38,rn=40,nn=[It,rn],an=function(e){return nn.indexOf(e)>-1},on=function(e){return Number(String(e).replace(/%/g,""))},ln=1,sn=function(t){en(e,t);function e(r){Jr(this,e);var n=Qr(this,(e.__proto__||Object.getPrototypeOf(e)).call(this));return n.handleBlur=function(){n.state.blurValue&&n.setState({value:n.state.blurValue,blurValue:null})},n.handleChange=function(a){n.setUpdatedValue(a.target.value,a)},n.handleKeyDown=function(a){var o=on(a.target.value);if(!isNaN(o)&&an(a.keyCode)){var l=n.getArrowOffset(),s=a.keyCode===It?o+l:o-l;n.setUpdatedValue(s,a)}},n.handleDrag=function(a){if(n.props.dragLabel){var o=Math.round(n.props.value+a.movementX);o>=0&&o<=n.props.dragMax&&n.props.onChange&&n.props.onChange(n.getValueObjectWithLabel(o),a)}},n.handleMouseDown=function(a){n.props.dragLabel&&(a.preventDefault(),n.handleDrag(a),window.addEventListener("mousemove",n.handleDrag),window.addEventListener("mouseup",n.handleMouseUp))},n.handleMouseUp=function(){n.unbindEventListeners()},n.unbindEventListeners=function(){window.removeEventListener("mousemove",n.handleDrag),window.removeEventListener("mouseup",n.handleMouseUp)},n.state={value:String(r.value).toUpperCase(),blurValue:String(r.value).toUpperCase()},n.inputId="rc-editable-input-"+ln++,n}return Re(e,[{key:"componentDidUpdate",value:function(n,a){this.props.value!==this.state.value&&(n.value!==this.props.value||a.value!==this.state.value)&&(this.input===document.activeElement?this.setState({blurValue:String(this.props.value).toUpperCase()}):this.setState({value:String(this.props.value).toUpperCase(),blurValue:!this.state.blurValue&&String(this.props.value).toUpperCase()}))}},{key:"componentWillUnmount",value:function(){this.unbindEventListeners()}},{key:"getValueObjectWithLabel",value:function(n){return Yr({},this.props.label,n)}},{key:"getArrowOffset",value:function(){return this.props.arrowOffset||tn}},{key:"setUpdatedValue",value:function(n,a){var o=this.props.label?this.getValueObjectWithLabel(n):n;this.props.onChange&&this.props.onChange(o,a),this.setState({value:n})}},{key:"render",value:function(){var n=this,a=(0,x.ZP)({default:{wrap:{position:"relative"}},"user-override":{wrap:this.props.style&&this.props.style.wrap?this.props.style.wrap:{},input:this.props.style&&this.props.style.input?this.props.style.input:{},label:this.props.style&&this.props.style.label?this.props.style.label:{}},"dragLabel-true":{label:{cursor:"ew-resize"}}},{"user-override":!0},this.props);return i.createElement("div",{style:a.wrap},i.createElement("input",{id:this.inputId,style:a.input,ref:function(l){return n.input=l},value:this.state.value,onKeyDown:this.handleKeyDown,onChange:this.handleChange,onBlur:this.handleBlur,placeholder:this.props.placeholder,spellCheck:"false"}),this.props.label&&!this.props.hideLabel?i.createElement("label",{htmlFor:this.inputId,style:a.label,onMouseDown:this.handleMouseDown},this.props.label):null)}}]),e}(i.PureComponent||i.Component),w=sn,pn=function(e,r,n,a){var o=a.clientWidth,l=a.clientHeight,s=typeof e.pageX=="number"?e.pageX:e.touches[0].pageX,p=typeof e.pageY=="number"?e.pageY:e.touches[0].pageY,c=s-(a.getBoundingClientRect().left+window.pageXOffset),h=p-(a.getBoundingClientRect().top+window.pageYOffset);if(r==="vertical"){var d=void 0;if(h<0)d=359;else if(h>l)d=0;else{var u=-(h*100/l)+100;d=360*u/100}if(n.h!==d)return{h:d,s:n.s,l:n.l,a:n.a,source:"hsl"}}else{var f=void 0;if(c<0)f=0;else if(c>o)f=359;else{var v=c*100/o;f=360*v/100}if(n.h!==f)return{h:f,s:n.s,l:n.l,a:n.a,source:"hsl"}}return null},cn=function(){function t(e,r){for(var n=0;n<r.length;n++){var a=r[n];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,a.key,a)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}();function hn(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function jt(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:t}function un(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var dn=function(t){un(e,t);function e(){var r,n,a,o;hn(this,e);for(var l=arguments.length,s=Array(l),p=0;p<l;p++)s[p]=arguments[p];return o=(n=(a=jt(this,(r=e.__proto__||Object.getPrototypeOf(e)).call.apply(r,[this].concat(s))),a),a.handleChange=function(c){var h=pn(c,a.props.direction,a.props.hsl,a.container);h&&typeof a.props.onChange=="function"&&a.props.onChange(h,c)},a.handleMouseDown=function(c){a.handleChange(c),window.addEventListener("mousemove",a.handleChange),window.addEventListener("mouseup",a.handleMouseUp)},a.handleMouseUp=function(){a.unbindEventListeners()},n),jt(a,o)}return cn(e,[{key:"componentWillUnmount",value:function(){this.unbindEventListeners()}},{key:"unbindEventListeners",value:function(){window.removeEventListener("mousemove",this.handleChange),window.removeEventListener("mouseup",this.handleMouseUp)}},{key:"render",value:function(){var n=this,a=this.props.direction,o=a===void 0?"horizontal":a,l=(0,x.ZP)({default:{hue:{absolute:"0px 0px 0px 0px",borderRadius:this.props.radius,boxShadow:this.props.shadow},container:{padding:"0 2px",position:"relative",height:"100%",borderRadius:this.props.radius},pointer:{position:"absolute",left:this.props.hsl.h*100/360+"%"},slider:{marginTop:"1px",width:"4px",borderRadius:"1px",height:"8px",boxShadow:"0 0 2px rgba(0, 0, 0, .6)",background:"#fff",transform:"translateX(-2px)"}},vertical:{pointer:{left:"0px",top:-(this.props.hsl.h*100/360)+100+"%"}}},{vertical:o==="vertical"});return i.createElement("div",{style:l.hue},i.createElement("div",{className:"hue-"+o,style:l.container,ref:function(p){return n.container=p},onMouseDown:this.handleMouseDown,onTouchMove:this.handleChange,onTouchStart:this.handleChange},i.createElement("style",null,`
|
|
.hue-horizontal {
|
|
background: linear-gradient(to right, #f00 0%, #ff0 17%, #0f0
|
|
33%, #0ff 50%, #00f 67%, #f0f 83%, #f00 100%);
|
|
background: -webkit-linear-gradient(to right, #f00 0%, #ff0
|
|
17%, #0f0 33%, #0ff 50%, #00f 67%, #f0f 83%, #f00 100%);
|
|
}
|
|
|
|
.hue-vertical {
|
|
background: linear-gradient(to top, #f00 0%, #ff0 17%, #0f0 33%,
|
|
#0ff 50%, #00f 67%, #f0f 83%, #f00 100%);
|
|
background: -webkit-linear-gradient(to top, #f00 0%, #ff0 17%,
|
|
#0f0 33%, #0ff 50%, #00f 67%, #f0f 83%, #f00 100%);
|
|
}
|
|
`),i.createElement("div",{style:l.pointer},this.props.pointer?i.createElement(this.props.pointer,this.props):i.createElement("div",{style:l.slider}))))}}]),e}(i.PureComponent||i.Component),be=dn,fn=T(45697),g=T.n(fn);function gn(){this.__data__=[],this.size=0}var vn=gn;function bn(t,e){return t===e||t!==t&&e!==e}var ke=bn;function xn(t,e){for(var r=t.length;r--;)if(ke(t[r][0],e))return r;return-1}var je=xn,yn=Array.prototype,mn=yn.splice;function wn(t){var e=this.__data__,r=je(e,t);if(r<0)return!1;var n=e.length-1;return r==n?e.pop():mn.call(e,r,1),--this.size,!0}var _n=wn;function En(t){var e=this.__data__,r=je(e,t);return r<0?void 0:e[r][1]}var Cn=En;function Sn(t){return je(this.__data__,t)>-1}var Pn=Sn;function On(t,e){var r=this.__data__,n=je(r,t);return n<0?(++this.size,r.push([t,e])):r[n][1]=e,this}var Tn=On;function xe(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}xe.prototype.clear=vn,xe.prototype.delete=_n,xe.prototype.get=Cn,xe.prototype.has=Pn,xe.prototype.set=Tn;var Ge=xe;function Rn(){this.__data__=new Ge,this.size=0}var kn=Rn;function An(t){var e=this.__data__,r=e.delete(t);return this.size=e.size,r}var Fn=An;function Bn(t){return this.__data__.get(t)}var Dn=Bn;function Hn(t){return this.__data__.has(t)}var Mn=Hn,Ln=typeof global=="object"&&global&&global.Object===Object&&global,Gt=Ln,Nn=typeof self=="object"&&self&&self.Object===Object&&self,In=Gt||Nn||Function("return this")(),M=In,jn=M.Symbol,I=jn,zt=Object.prototype,Gn=zt.hasOwnProperty,zn=zt.toString,Ae=I?I.toStringTag:void 0;function Zn(t){var e=Gn.call(t,Ae),r=t[Ae];try{t[Ae]=void 0;var n=!0}catch(o){}var a=zn.call(t);return n&&(e?t[Ae]=r:delete t[Ae]),a}var Un=Zn,$n=Object.prototype,Wn=$n.toString;function Kn(t){return Wn.call(t)}var Xn=Kn,Vn="[object Null]",qn="[object Undefined]",Zt=I?I.toStringTag:void 0;function Yn(t){return t==null?t===void 0?qn:Vn:Zt&&Zt in Object(t)?Un(t):Xn(t)}var K=Yn;function Jn(t){var e=typeof t;return t!=null&&(e=="object"||e=="function")}var H=Jn,Qn="[object AsyncFunction]",ea="[object Function]",ta="[object GeneratorFunction]",ra="[object Proxy]";function na(t){if(!H(t))return!1;var e=K(t);return e==ea||e==ta||e==Qn||e==ra}var rt=na,aa=M["__core-js_shared__"],nt=aa,Ut=function(){var t=/[^.]+$/.exec(nt&&nt.keys&&nt.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}();function ia(t){return!!Ut&&Ut in t}var oa=ia,la=Function.prototype,sa=la.toString;function pa(t){if(t!=null){try{return sa.call(t)}catch(e){}try{return t+""}catch(e){}}return""}var X=pa,ca=/[\\^$.*+?()[\]{}|]/g,ha=/^\[object .+?Constructor\]$/,ua=Function.prototype,da=Object.prototype,fa=ua.toString,ga=da.hasOwnProperty,va=RegExp("^"+fa.call(ga).replace(ca,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function ba(t){if(!H(t)||oa(t))return!1;var e=rt(t)?va:ha;return e.test(X(t))}var xa=ba;function ya(t,e){return t==null?void 0:t[e]}var ma=ya;function wa(t,e){var r=ma(t,e);return xa(r)?r:void 0}var V=wa,_a=V(M,"Map"),Fe=_a,Ea=V(Object,"create"),Be=Ea;function Ca(){this.__data__=Be?Be(null):{},this.size=0}var Sa=Ca;function Pa(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}var Oa=Pa,Ta="__lodash_hash_undefined__",Ra=Object.prototype,ka=Ra.hasOwnProperty;function Aa(t){var e=this.__data__;if(Be){var r=e[t];return r===Ta?void 0:r}return ka.call(e,t)?e[t]:void 0}var Fa=Aa,Ba=Object.prototype,Da=Ba.hasOwnProperty;function Ha(t){var e=this.__data__;return Be?e[t]!==void 0:Da.call(e,t)}var Ma=Ha,La="__lodash_hash_undefined__";function Na(t,e){var r=this.__data__;return this.size+=this.has(t)?0:1,r[t]=Be&&e===void 0?La:e,this}var Ia=Na;function ye(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}ye.prototype.clear=Sa,ye.prototype.delete=Oa,ye.prototype.get=Fa,ye.prototype.has=Ma,ye.prototype.set=Ia;var $t=ye;function ja(){this.size=0,this.__data__={hash:new $t,map:new(Fe||Ge),string:new $t}}var Ga=ja;function za(t){var e=typeof t;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?t!=="__proto__":t===null}var Za=za;function Ua(t,e){var r=t.__data__;return Za(e)?r[typeof e=="string"?"string":"hash"]:r.map}var ze=Ua;function $a(t){var e=ze(this,t).delete(t);return this.size-=e?1:0,e}var Wa=$a;function Ka(t){return ze(this,t).get(t)}var Xa=Ka;function Va(t){return ze(this,t).has(t)}var qa=Va;function Ya(t,e){var r=ze(this,t),n=r.size;return r.set(t,e),this.size+=r.size==n?0:1,this}var Ja=Ya;function me(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}me.prototype.clear=Ga,me.prototype.delete=Wa,me.prototype.get=Xa,me.prototype.has=qa,me.prototype.set=Ja;var Ze=me,Qa=200;function ei(t,e){var r=this.__data__;if(r instanceof Ge){var n=r.__data__;if(!Fe||n.length<Qa-1)return n.push([t,e]),this.size=++r.size,this;r=this.__data__=new Ze(n)}return r.set(t,e),this.size=r.size,this}var ti=ei;function we(t){var e=this.__data__=new Ge(t);this.size=e.size}we.prototype.clear=kn,we.prototype.delete=Fn,we.prototype.get=Dn,we.prototype.has=Mn,we.prototype.set=ti;var De=we,ri=function(){try{var t=V(Object,"defineProperty");return t({},"",{}),t}catch(e){}}(),Ue=ri;function ni(t,e,r){e=="__proto__"&&Ue?Ue(t,e,{configurable:!0,enumerable:!0,value:r,writable:!0}):t[e]=r}var at=ni;function ai(t,e,r){(r!==void 0&&!ke(t[e],r)||r===void 0&&!(e in t))&&at(t,e,r)}var it=ai;function ii(t){return function(e,r,n){for(var a=-1,o=Object(e),l=n(e),s=l.length;s--;){var p=l[t?s:++a];if(r(o[p],p,o)===!1)break}return e}}var oi=ii,li=oi(),Wt=li,Kt=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Xt=Kt&&typeof module=="object"&&module&&!module.nodeType&&module,si=Xt&&Xt.exports===Kt,Vt=si?M.Buffer:void 0,qt=Vt?Vt.allocUnsafe:void 0;function pi(t,e){if(e)return t.slice();var r=t.length,n=qt?qt(r):new t.constructor(r);return t.copy(n),n}var ci=pi,hi=M.Uint8Array,$e=hi;function ui(t){var e=new t.constructor(t.byteLength);return new $e(e).set(new $e(t)),e}var di=ui;function fi(t,e){var r=e?di(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.length)}var gi=fi;function vi(t,e){var r=-1,n=t.length;for(e||(e=Array(n));++r<n;)e[r]=t[r];return e}var bi=vi,Yt=Object.create,xi=function(){function t(){}return function(e){if(!H(e))return{};if(Yt)return Yt(e);t.prototype=e;var r=new t;return t.prototype=void 0,r}}(),yi=xi;function mi(t,e){return function(r){return t(e(r))}}var Jt=mi,wi=Jt(Object.getPrototypeOf,Object),Qt=wi,_i=Object.prototype;function Ei(t){var e=t&&t.constructor,r=typeof e=="function"&&e.prototype||_i;return t===r}var ot=Ei;function Ci(t){return typeof t.constructor=="function"&&!ot(t)?yi(Qt(t)):{}}var Si=Ci;function Pi(t){return t!=null&&typeof t=="object"}var j=Pi,Oi="[object Arguments]";function Ti(t){return j(t)&&K(t)==Oi}var er=Ti,tr=Object.prototype,Ri=tr.hasOwnProperty,ki=tr.propertyIsEnumerable,Ai=er(function(){return arguments}())?er:function(t){return j(t)&&Ri.call(t,"callee")&&!ki.call(t,"callee")},We=Ai,A=T(39350),Fi=9007199254740991;function Bi(t){return typeof t=="number"&&t>-1&&t%1==0&&t<=Fi}var lt=Bi;function Di(t){return t!=null&<(t.length)&&!rt(t)}var _e=Di;function Hi(t){return j(t)&&_e(t)}var Mi=Hi;function Li(){return!1}var Ni=Li,rr=typeof exports=="object"&&exports&&!exports.nodeType&&exports,nr=rr&&typeof module=="object"&&module&&!module.nodeType&&module,Ii=nr&&nr.exports===rr,ar=Ii?M.Buffer:void 0,ji=ar?ar.isBuffer:void 0,Gi=ji||Ni,Ke=Gi,zi="[object Object]",Zi=Function.prototype,Ui=Object.prototype,ir=Zi.toString,$i=Ui.hasOwnProperty,Wi=ir.call(Object);function Ki(t){if(!j(t)||K(t)!=zi)return!1;var e=Qt(t);if(e===null)return!0;var r=$i.call(e,"constructor")&&e.constructor;return typeof r=="function"&&r instanceof r&&ir.call(r)==Wi}var Xi=Ki,Vi="[object Arguments]",qi="[object Array]",Yi="[object Boolean]",Ji="[object Date]",Qi="[object Error]",eo="[object Function]",to="[object Map]",ro="[object Number]",no="[object Object]",ao="[object RegExp]",io="[object Set]",oo="[object String]",lo="[object WeakMap]",so="[object ArrayBuffer]",po="[object DataView]",co="[object Float32Array]",ho="[object Float64Array]",uo="[object Int8Array]",fo="[object Int16Array]",go="[object Int32Array]",vo="[object Uint8Array]",bo="[object Uint8ClampedArray]",xo="[object Uint16Array]",yo="[object Uint32Array]",C={};C[co]=C[ho]=C[uo]=C[fo]=C[go]=C[vo]=C[bo]=C[xo]=C[yo]=!0,C[Vi]=C[qi]=C[so]=C[Yi]=C[po]=C[Ji]=C[Qi]=C[eo]=C[to]=C[ro]=C[no]=C[ao]=C[io]=C[oo]=C[lo]=!1;function mo(t){return j(t)&<(t.length)&&!!C[K(t)]}var wo=mo;function _o(t){return function(e){return t(e)}}var Eo=_o,or=typeof exports=="object"&&exports&&!exports.nodeType&&exports,He=or&&typeof module=="object"&&module&&!module.nodeType&&module,Co=He&&He.exports===or,st=Co&&Gt.process,So=function(){try{var t=He&&He.require&&He.require("util").types;return t||st&&st.binding&&st.binding("util")}catch(e){}}(),lr=So,sr=lr&&lr.isTypedArray,Po=sr?Eo(sr):wo,pt=Po;function Oo(t,e){if(!(e==="constructor"&&typeof t[e]=="function")&&e!="__proto__")return t[e]}var ct=Oo,To=Object.prototype,Ro=To.hasOwnProperty;function ko(t,e,r){var n=t[e];(!(Ro.call(t,e)&&ke(n,r))||r===void 0&&!(e in t))&&at(t,e,r)}var Ao=ko;function Fo(t,e,r,n){var a=!r;r||(r={});for(var o=-1,l=e.length;++o<l;){var s=e[o],p=n?n(r[s],t[s],s,r,t):void 0;p===void 0&&(p=t[s]),a?at(r,s,p):Ao(r,s,p)}return r}var Bo=Fo;function Do(t,e){for(var r=-1,n=Array(t);++r<t;)n[r]=e(r);return n}var Ho=Do,Mo=9007199254740991,Lo=/^(?:0|[1-9]\d*)$/;function No(t,e){var r=typeof t;return e=e==null?Mo:e,!!e&&(r=="number"||r!="symbol"&&Lo.test(t))&&t>-1&&t%1==0&&t<e}var ht=No,Io=Object.prototype,jo=Io.hasOwnProperty;function Go(t,e){var r=(0,A.Z)(t),n=!r&&We(t),a=!r&&!n&&Ke(t),o=!r&&!n&&!a&&pt(t),l=r||n||a||o,s=l?Ho(t.length,String):[],p=s.length;for(var c in t)(e||jo.call(t,c))&&!(l&&(c=="length"||a&&(c=="offset"||c=="parent")||o&&(c=="buffer"||c=="byteLength"||c=="byteOffset")||ht(c,p)))&&s.push(c);return s}var pr=Go;function zo(t){var e=[];if(t!=null)for(var r in Object(t))e.push(r);return e}var Zo=zo,Uo=Object.prototype,$o=Uo.hasOwnProperty;function Wo(t){if(!H(t))return Zo(t);var e=ot(t),r=[];for(var n in t)n=="constructor"&&(e||!$o.call(t,n))||r.push(n);return r}var Ko=Wo;function Xo(t){return _e(t)?pr(t,!0):Ko(t)}var cr=Xo;function Vo(t){return Bo(t,cr(t))}var qo=Vo;function Yo(t,e,r,n,a,o,l){var s=ct(t,r),p=ct(e,r),c=l.get(p);if(c){it(t,r,c);return}var h=o?o(s,p,r+"",t,e,l):void 0,d=h===void 0;if(d){var u=(0,A.Z)(p),f=!u&&Ke(p),v=!u&&!f&&pt(p);h=p,u||f||v?(0,A.Z)(s)?h=s:Mi(s)?h=bi(s):f?(d=!1,h=ci(p,!0)):v?(d=!1,h=gi(p,!0)):h=[]:Xi(p)||We(p)?(h=s,We(s)?h=qo(s):(!H(s)||rt(s))&&(h=Si(p))):d=!1}d&&(l.set(p,h),a(h,p,n,o,l),l.delete(p)),it(t,r,h)}var Jo=Yo;function hr(t,e,r,n,a){t!==e&&Wt(e,function(o,l){if(a||(a=new De),H(o))Jo(t,e,l,r,hr,n,a);else{var s=n?n(ct(t,l),o,l+"",t,e,a):void 0;s===void 0&&(s=o),it(t,l,s)}},cr)}var Qo=hr;function el(t){return t}var Xe=el;function tl(t,e,r){switch(r.length){case 0:return t.call(e);case 1:return t.call(e,r[0]);case 2:return t.call(e,r[0],r[1]);case 3:return t.call(e,r[0],r[1],r[2])}return t.apply(e,r)}var rl=tl,ur=Math.max;function nl(t,e,r){return e=ur(e===void 0?t.length-1:e,0),function(){for(var n=arguments,a=-1,o=ur(n.length-e,0),l=Array(o);++a<o;)l[a]=n[e+a];a=-1;for(var s=Array(e+1);++a<e;)s[a]=n[a];return s[e]=r(l),rl(t,this,s)}}var al=nl;function il(t){return function(){return t}}var ol=il,ll=Ue?function(t,e){return Ue(t,"toString",{configurable:!0,enumerable:!1,value:ol(e),writable:!0})}:Xe,sl=ll,pl=800,cl=16,hl=Date.now;function ul(t){var e=0,r=0;return function(){var n=hl(),a=cl-(n-r);if(r=n,a>0){if(++e>=pl)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}var dl=ul,fl=dl(sl),gl=fl;function vl(t,e){return gl(al(t,e,Xe),t+"")}var bl=vl;function xl(t,e,r){if(!H(r))return!1;var n=typeof e;return(n=="number"?_e(r)&&ht(e,r.length):n=="string"&&e in r)?ke(r[e],t):!1}var yl=xl;function ml(t){return bl(function(e,r){var n=-1,a=r.length,o=a>1?r[a-1]:void 0,l=a>2?r[2]:void 0;for(o=t.length>3&&typeof o=="function"?(a--,o):void 0,l&&yl(r[0],r[1],l)&&(o=a<3?void 0:o,a=1),e=Object(e);++n<a;){var s=r[n];s&&t(e,s,n,o)}return e})}var wl=ml,_l=wl(function(t,e,r){Qo(t,e,r)}),R=_l,ut=function(e){var r=e.zDepth,n=e.radius,a=e.background,o=e.children,l=e.styles,s=l===void 0?{}:l,p=(0,x.ZP)(R({default:{wrap:{position:"relative",display:"inline-block"},content:{position:"relative"},bg:{absolute:"0px 0px 0px 0px",boxShadow:"0 "+r+"px "+r*4+"px rgba(0,0,0,.24)",borderRadius:n,background:a}},"zDepth-0":{bg:{boxShadow:"none"}},"zDepth-1":{bg:{boxShadow:"0 2px 10px rgba(0,0,0,.12), 0 2px 5px rgba(0,0,0,.16)"}},"zDepth-2":{bg:{boxShadow:"0 6px 20px rgba(0,0,0,.19), 0 8px 17px rgba(0,0,0,.2)"}},"zDepth-3":{bg:{boxShadow:"0 17px 50px rgba(0,0,0,.19), 0 12px 15px rgba(0,0,0,.24)"}},"zDepth-4":{bg:{boxShadow:"0 25px 55px rgba(0,0,0,.21), 0 16px 28px rgba(0,0,0,.22)"}},"zDepth-5":{bg:{boxShadow:"0 40px 77px rgba(0,0,0,.22), 0 27px 24px rgba(0,0,0,.2)"}},square:{bg:{borderRadius:"0"}},circle:{bg:{borderRadius:"50%"}}},s),{"zDepth-1":r===1});return i.createElement("div",{style:p.wrap},i.createElement("div",{style:p.bg}),i.createElement("div",{style:p.content},o))};ut.propTypes={background:g().string,zDepth:g().oneOf([0,1,2,3,4,5]),radius:g().number,styles:g().object},ut.defaultProps={background:"#fff",zDepth:1,radius:2,styles:{}};var dt=ut,El=function(){return M.Date.now()},ft=El,Cl=/\s/;function Sl(t){for(var e=t.length;e--&&Cl.test(t.charAt(e)););return e}var Pl=Sl,Ol=/^\s+/;function Tl(t){return t&&t.slice(0,Pl(t)+1).replace(Ol,"")}var Rl=Tl,kl="[object Symbol]";function Al(t){return typeof t=="symbol"||j(t)&&K(t)==kl}var Ve=Al,dr=0/0,Fl=/^[-+]0x[0-9a-f]+$/i,Bl=/^0b[01]+$/i,Dl=/^0o[0-7]+$/i,Hl=parseInt;function Ml(t){if(typeof t=="number")return t;if(Ve(t))return dr;if(H(t)){var e=typeof t.valueOf=="function"?t.valueOf():t;t=H(e)?e+"":e}if(typeof t!="string")return t===0?t:+t;t=Rl(t);var r=Bl.test(t);return r||Dl.test(t)?Hl(t.slice(2),r?2:8):Fl.test(t)?dr:+t}var fr=Ml,Ll="Expected a function",Nl=Math.max,Il=Math.min;function jl(t,e,r){var n,a,o,l,s,p,c=0,h=!1,d=!1,u=!0;if(typeof t!="function")throw new TypeError(Ll);e=fr(e)||0,H(r)&&(h=!!r.leading,d="maxWait"in r,o=d?Nl(fr(r.maxWait)||0,e):o,u="trailing"in r?!!r.trailing:u);function f(O){var Z=n,Ie=a;return n=a=void 0,c=O,l=t.apply(Ie,Z),l}function v(O){return c=O,s=setTimeout(_,e),h?f(O):l}function b(O){var Z=O-p,Ie=O-c,qr=e-Z;return d?Il(qr,o-Ie):qr}function y(O){var Z=O-p,Ie=O-c;return p===void 0||Z>=e||Z<0||d&&Ie>=o}function _(){var O=ft();if(y(O))return F(O);s=setTimeout(_,b(O))}function F(O){return s=void 0,u&&n?f(O):(n=a=void 0,l)}function ve(){s!==void 0&&clearTimeout(s),c=0,n=p=a=s=void 0}function B(){return s===void 0?l:F(ft())}function z(){var O=ft(),Z=y(O);if(n=arguments,a=this,p=O,Z){if(s===void 0)return v(p);if(d)return clearTimeout(s),s=setTimeout(_,e),f(p)}return s===void 0&&(s=setTimeout(_,e)),l}return z.cancel=ve,z.flush=B,z}var gr=jl,Gl="Expected a function";function zl(t,e,r){var n=!0,a=!0;if(typeof t!="function")throw new TypeError(Gl);return H(r)&&(n="leading"in r?!!r.leading:n,a="trailing"in r?!!r.trailing:a),gr(t,e,{leading:n,maxWait:e,trailing:a})}var Zl=zl,Ul=function(e,r,n){var a=n.getBoundingClientRect(),o=a.width,l=a.height,s=typeof e.pageX=="number"?e.pageX:e.touches[0].pageX,p=typeof e.pageY=="number"?e.pageY:e.touches[0].pageY,c=s-(n.getBoundingClientRect().left+window.pageXOffset),h=p-(n.getBoundingClientRect().top+window.pageYOffset);c<0?c=0:c>o&&(c=o),h<0?h=0:h>l&&(h=l);var d=c/o,u=1-h/l;return{h:r.h,s:d,v:u,a:r.a,source:"hsv"}},$l=function(){function t(e,r){for(var n=0;n<r.length;n++){var a=r[n];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,a.key,a)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}();function Wl(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Kl(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:t}function Xl(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var Vl=function(t){Xl(e,t);function e(r){Wl(this,e);var n=Kl(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,r));return n.handleChange=function(a){typeof n.props.onChange=="function"&&n.throttle(n.props.onChange,Ul(a,n.props.hsl,n.container),a)},n.handleMouseDown=function(a){n.handleChange(a);var o=n.getContainerRenderWindow();o.addEventListener("mousemove",n.handleChange),o.addEventListener("mouseup",n.handleMouseUp)},n.handleMouseUp=function(){n.unbindEventListeners()},n.throttle=Zl(function(a,o,l){a(o,l)},50),n}return $l(e,[{key:"componentWillUnmount",value:function(){this.throttle.cancel(),this.unbindEventListeners()}},{key:"getContainerRenderWindow",value:function(){for(var n=this.container,a=window;!a.document.contains(n)&&a.parent!==a;)a=a.parent;return a}},{key:"unbindEventListeners",value:function(){var n=this.getContainerRenderWindow();n.removeEventListener("mousemove",this.handleChange),n.removeEventListener("mouseup",this.handleMouseUp)}},{key:"render",value:function(){var n=this,a=this.props.style||{},o=a.color,l=a.white,s=a.black,p=a.pointer,c=a.circle,h=(0,x.ZP)({default:{color:{absolute:"0px 0px 0px 0px",background:"hsl("+this.props.hsl.h+",100%, 50%)",borderRadius:this.props.radius},white:{absolute:"0px 0px 0px 0px",borderRadius:this.props.radius},black:{absolute:"0px 0px 0px 0px",boxShadow:this.props.shadow,borderRadius:this.props.radius},pointer:{position:"absolute",top:-(this.props.hsv.v*100)+100+"%",left:this.props.hsv.s*100+"%",cursor:"default"},circle:{width:"4px",height:"4px",boxShadow:`0 0 0 1.5px #fff, inset 0 0 1px 1px rgba(0,0,0,.3),
|
|
0 0 1px 2px rgba(0,0,0,.4)`,borderRadius:"50%",cursor:"hand",transform:"translate(-2px, -2px)"}},custom:{color:o,white:l,black:s,pointer:p,circle:c}},{custom:!!this.props.style});return i.createElement("div",{style:h.color,ref:function(u){return n.container=u},onMouseDown:this.handleMouseDown,onTouchMove:this.handleChange,onTouchStart:this.handleChange},i.createElement("style",null,`
|
|
.saturation-white {
|
|
background: -webkit-linear-gradient(to right, #fff, rgba(255,255,255,0));
|
|
background: linear-gradient(to right, #fff, rgba(255,255,255,0));
|
|
}
|
|
.saturation-black {
|
|
background: -webkit-linear-gradient(to top, #000, rgba(0,0,0,0));
|
|
background: linear-gradient(to top, #000, rgba(0,0,0,0));
|
|
}
|
|
`),i.createElement("div",{style:h.white,className:"saturation-white"},i.createElement("div",{style:h.black,className:"saturation-black"}),i.createElement("div",{style:h.pointer},this.props.pointer?i.createElement(this.props.pointer,this.props):i.createElement("div",{style:h.circle}))))}}]),e}(i.PureComponent||i.Component),qe=Vl;function ql(t,e){for(var r=-1,n=t==null?0:t.length;++r<n&&e(t[r],r,t)!==!1;);return t}var Yl=ql,Jl=Jt(Object.keys,Object),Ql=Jl,es=Object.prototype,ts=es.hasOwnProperty;function rs(t){if(!ot(t))return Ql(t);var e=[];for(var r in Object(t))ts.call(t,r)&&r!="constructor"&&e.push(r);return e}var ns=rs;function as(t){return _e(t)?pr(t):ns(t)}var gt=as;function is(t,e){return t&&Wt(t,e,gt)}var os=is;function ls(t,e){return function(r,n){if(r==null)return r;if(!_e(r))return t(r,n);for(var a=r.length,o=e?a:-1,l=Object(r);(e?o--:++o<a)&&n(l[o],o,l)!==!1;);return r}}var ss=ls,ps=ss(os),vr=ps;function cs(t){return typeof t=="function"?t:Xe}var hs=cs;function us(t,e){var r=(0,A.Z)(t)?Yl:vr;return r(t,hs(e))}var ds=us,Ye=T(21997),br=function(e){var r=["r","g","b","a","h","s","l","v"],n=0,a=0;return ds(r,function(o){if(e[o]&&(n+=1,isNaN(e[o])||(a+=1),o==="s"||o==="l")){var l=/^\d+%$/;l.test(e[o])&&(a+=1)}}),n===a?e:!1},Me=function(e,r){var n=e.hex?(0,Ye.Z)(e.hex):(0,Ye.Z)(e),a=n.toHsl(),o=n.toHsv(),l=n.toRgb(),s=n.toHex();a.s===0&&(a.h=r||0,o.h=r||0);var p=s==="000000"&&l.a===0;return{hsl:a,hex:p?"transparent":"#"+s,rgb:l,hsv:o,oldHue:e.h||r||a.h,source:e.source}},G=function(e){if(e==="transparent")return!0;var r=String(e).charAt(0)==="#"?1:0;return e.length!==4+r&&e.length<7+r&&(0,Ye.Z)(e).isValid()},vt=function(e){if(!e)return"#fff";var r=Me(e);if(r.hex==="transparent")return"rgba(0,0,0,0.4)";var n=(r.rgb.r*299+r.rgb.g*587+r.rgb.b*114)/1e3;return n>=128?"#000":"#fff"},X0={hsl:{a:1,h:0,l:.5,s:1},hex:"#ff0000",rgb:{r:255,g:0,b:0,a:1},hsv:{h:0,s:1,v:1,a:1}},bt=function(e,r){var n=e.replace("\xB0","");return(0,Ye.Z)(r+" ("+n+")")._ok},Le=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},fs=function(){function t(e,r){for(var n=0;n<r.length;n++){var a=r[n];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,a.key,a)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}();function gs(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function vs(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:t}function bs(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var xs=function(e){var r=function(n){bs(a,n);function a(o){gs(this,a);var l=vs(this,(a.__proto__||Object.getPrototypeOf(a)).call(this));return l.handleChange=function(s,p){var c=br(s);if(c){var h=Me(s,s.h||l.state.oldHue);l.setState(h),l.props.onChangeComplete&&l.debounce(l.props.onChangeComplete,h,p),l.props.onChange&&l.props.onChange(h,p)}},l.handleSwatchHover=function(s,p){var c=br(s);if(c){var h=Me(s,s.h||l.state.oldHue);l.props.onSwatchHover&&l.props.onSwatchHover(h,p)}},l.state=Le({},Me(o.color,0)),l.debounce=gr(function(s,p,c){s(p,c)},100),l}return fs(a,[{key:"render",value:function(){var l={};return this.props.onSwatchHover&&(l.onSwatchHover=this.handleSwatchHover),i.createElement(e,Le({},this.props,this.state,{onChange:this.handleChange},l))}}],[{key:"getDerivedStateFromProps",value:function(l,s){return Le({},Me(l.color,s.oldHue))}}]),a}(i.PureComponent||i.Component);return r.propTypes=Le({},e.propTypes),r.defaultProps=Le({},e.defaultProps,{color:{h:250,s:.5,l:.2,a:1}}),r},k=xs,ys=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},ms=function(){function t(e,r){for(var n=0;n<r.length;n++){var a=r[n];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,a.key,a)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}();function ws(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function xr(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:t}function _s(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var Es=function(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"span";return function(n){_s(a,n);function a(){var o,l,s,p;ws(this,a);for(var c=arguments.length,h=Array(c),d=0;d<c;d++)h[d]=arguments[d];return p=(l=(s=xr(this,(o=a.__proto__||Object.getPrototypeOf(a)).call.apply(o,[this].concat(h))),s),s.state={focus:!1},s.handleFocus=function(){return s.setState({focus:!0})},s.handleBlur=function(){return s.setState({focus:!1})},l),xr(s,p)}return ms(a,[{key:"render",value:function(){return i.createElement(r,{onFocus:this.handleFocus,onBlur:this.handleBlur},i.createElement(e,ys({},this.props,this.state)))}}]),a}(i.Component)},yr=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},Cs=13,Ss=function(e){var r=e.color,n=e.style,a=e.onClick,o=a===void 0?function(){}:a,l=e.onHover,s=e.title,p=s===void 0?r:s,c=e.children,h=e.focus,d=e.focusStyle,u=d===void 0?{}:d,f=r==="transparent",v=(0,x.ZP)({default:{swatch:yr({background:r,height:"100%",width:"100%",cursor:"pointer",position:"relative",outline:"none"},n,h?u:{})}}),b=function(B){return o(r,B)},y=function(B){return B.keyCode===Cs&&o(r,B)},_=function(B){return l(r,B)},F={};return l&&(F.onMouseOver=_),i.createElement("div",yr({style:v.swatch,onClick:b,title:p,tabIndex:0,onKeyDown:y},F),c,f&&i.createElement(S,{borderRadius:v.swatch.borderRadius,boxShadow:"inset 0 0 0 1px rgba(0,0,0,0.1)"}))},q=Es(Ss),Ps=function(e){var r=e.direction,n=(0,x.ZP)({default:{picker:{width:"18px",height:"18px",borderRadius:"50%",transform:"translate(-9px, -1px)",backgroundColor:"rgb(248, 248, 248)",boxShadow:"0 1px 4px 0 rgba(0, 0, 0, 0.37)"}},vertical:{picker:{transform:"translate(-3px, -9px)"}}},{vertical:r==="vertical"});return i.createElement("div",{style:n.picker})},Os=Ps,Ts=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},mr=function(e){var r=e.rgb,n=e.hsl,a=e.width,o=e.height,l=e.onChange,s=e.direction,p=e.style,c=e.renderers,h=e.pointer,d=e.className,u=d===void 0?"":d,f=(0,x.ZP)({default:{picker:{position:"relative",width:a,height:o},alpha:{radius:"2px",style:p}}});return i.createElement("div",{style:f.picker,className:"alpha-picker "+u},i.createElement(W,Ts({},f.alpha,{rgb:r,hsl:n,pointer:h,renderers:c,onChange:l,direction:s})))};mr.defaultProps={width:"316px",height:"16px",direction:"horizontal",pointer:Os};var V0=k(mr);function Rs(t,e){for(var r=-1,n=t==null?0:t.length,a=Array(n);++r<n;)a[r]=e(t[r],r,t);return a}var wr=Rs,ks="__lodash_hash_undefined__";function As(t){return this.__data__.set(t,ks),this}var Fs=As;function Bs(t){return this.__data__.has(t)}var Ds=Bs;function Je(t){var e=-1,r=t==null?0:t.length;for(this.__data__=new Ze;++e<r;)this.add(t[e])}Je.prototype.add=Je.prototype.push=Fs,Je.prototype.has=Ds;var Hs=Je;function Ms(t,e){for(var r=-1,n=t==null?0:t.length;++r<n;)if(e(t[r],r,t))return!0;return!1}var Ls=Ms;function Ns(t,e){return t.has(e)}var Is=Ns,js=1,Gs=2;function zs(t,e,r,n,a,o){var l=r&js,s=t.length,p=e.length;if(s!=p&&!(l&&p>s))return!1;var c=o.get(t),h=o.get(e);if(c&&h)return c==e&&h==t;var d=-1,u=!0,f=r&Gs?new Hs:void 0;for(o.set(t,e),o.set(e,t);++d<s;){var v=t[d],b=e[d];if(n)var y=l?n(b,v,d,e,t,o):n(v,b,d,t,e,o);if(y!==void 0){if(y)continue;u=!1;break}if(f){if(!Ls(e,function(_,F){if(!Is(f,F)&&(v===_||a(v,_,r,n,o)))return f.push(F)})){u=!1;break}}else if(!(v===b||a(v,b,r,n,o))){u=!1;break}}return o.delete(t),o.delete(e),u}var _r=zs;function Zs(t){var e=-1,r=Array(t.size);return t.forEach(function(n,a){r[++e]=[a,n]}),r}var Us=Zs;function $s(t){var e=-1,r=Array(t.size);return t.forEach(function(n){r[++e]=n}),r}var Ws=$s,Ks=1,Xs=2,Vs="[object Boolean]",qs="[object Date]",Ys="[object Error]",Js="[object Map]",Qs="[object Number]",ep="[object RegExp]",tp="[object Set]",rp="[object String]",np="[object Symbol]",ap="[object ArrayBuffer]",ip="[object DataView]",Er=I?I.prototype:void 0,xt=Er?Er.valueOf:void 0;function op(t,e,r,n,a,o,l){switch(r){case ip:if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case ap:return!(t.byteLength!=e.byteLength||!o(new $e(t),new $e(e)));case Vs:case qs:case Qs:return ke(+t,+e);case Ys:return t.name==e.name&&t.message==e.message;case ep:case rp:return t==e+"";case Js:var s=Us;case tp:var p=n&Ks;if(s||(s=Ws),t.size!=e.size&&!p)return!1;var c=l.get(t);if(c)return c==e;n|=Xs,l.set(t,e);var h=_r(s(t),s(e),n,a,o,l);return l.delete(t),h;case np:if(xt)return xt.call(t)==xt.call(e)}return!1}var lp=op;function sp(t,e){for(var r=-1,n=e.length,a=t.length;++r<n;)t[a+r]=e[r];return t}var pp=sp;function cp(t,e,r){var n=e(t);return(0,A.Z)(t)?n:pp(n,r(t))}var hp=cp;function up(t,e){for(var r=-1,n=t==null?0:t.length,a=0,o=[];++r<n;){var l=t[r];e(l,r,t)&&(o[a++]=l)}return o}var dp=up;function fp(){return[]}var gp=fp,vp=Object.prototype,bp=vp.propertyIsEnumerable,Cr=Object.getOwnPropertySymbols,xp=Cr?function(t){return t==null?[]:(t=Object(t),dp(Cr(t),function(e){return bp.call(t,e)}))}:gp,yp=xp;function mp(t){return hp(t,gt,yp)}var Sr=mp,wp=1,_p=Object.prototype,Ep=_p.hasOwnProperty;function Cp(t,e,r,n,a,o){var l=r&wp,s=Sr(t),p=s.length,c=Sr(e),h=c.length;if(p!=h&&!l)return!1;for(var d=p;d--;){var u=s[d];if(!(l?u in e:Ep.call(e,u)))return!1}var f=o.get(t),v=o.get(e);if(f&&v)return f==e&&v==t;var b=!0;o.set(t,e),o.set(e,t);for(var y=l;++d<p;){u=s[d];var _=t[u],F=e[u];if(n)var ve=l?n(F,_,u,e,t,o):n(_,F,u,t,e,o);if(!(ve===void 0?_===F||a(_,F,r,n,o):ve)){b=!1;break}y||(y=u=="constructor")}if(b&&!y){var B=t.constructor,z=e.constructor;B!=z&&"constructor"in t&&"constructor"in e&&!(typeof B=="function"&&B instanceof B&&typeof z=="function"&&z instanceof z)&&(b=!1)}return o.delete(t),o.delete(e),b}var Sp=Cp,Pp=V(M,"DataView"),yt=Pp,Op=V(M,"Promise"),mt=Op,Tp=V(M,"Set"),wt=Tp,Rp=V(M,"WeakMap"),_t=Rp,Pr="[object Map]",kp="[object Object]",Or="[object Promise]",Tr="[object Set]",Rr="[object WeakMap]",kr="[object DataView]",Ap=X(yt),Fp=X(Fe),Bp=X(mt),Dp=X(wt),Hp=X(_t),Y=K;(yt&&Y(new yt(new ArrayBuffer(1)))!=kr||Fe&&Y(new Fe)!=Pr||mt&&Y(mt.resolve())!=Or||wt&&Y(new wt)!=Tr||_t&&Y(new _t)!=Rr)&&(Y=function(t){var e=K(t),r=e==kp?t.constructor:void 0,n=r?X(r):"";if(n)switch(n){case Ap:return kr;case Fp:return Pr;case Bp:return Or;case Dp:return Tr;case Hp:return Rr}return e});var Ar=Y,Mp=1,Fr="[object Arguments]",Br="[object Array]",Qe="[object Object]",Lp=Object.prototype,Dr=Lp.hasOwnProperty;function Np(t,e,r,n,a,o){var l=(0,A.Z)(t),s=(0,A.Z)(e),p=l?Br:Ar(t),c=s?Br:Ar(e);p=p==Fr?Qe:p,c=c==Fr?Qe:c;var h=p==Qe,d=c==Qe,u=p==c;if(u&&Ke(t)){if(!Ke(e))return!1;l=!0,h=!1}if(u&&!h)return o||(o=new De),l||pt(t)?_r(t,e,r,n,a,o):lp(t,e,p,r,n,a,o);if(!(r&Mp)){var f=h&&Dr.call(t,"__wrapped__"),v=d&&Dr.call(e,"__wrapped__");if(f||v){var b=f?t.value():t,y=v?e.value():e;return o||(o=new De),a(b,y,r,n,o)}}return u?(o||(o=new De),Sp(t,e,r,n,a,o)):!1}var Ip=Np;function Hr(t,e,r,n,a){return t===e?!0:t==null||e==null||!j(t)&&!j(e)?t!==t&&e!==e:Ip(t,e,r,n,Hr,a)}var Mr=Hr,jp=1,Gp=2;function zp(t,e,r,n){var a=r.length,o=a,l=!n;if(t==null)return!o;for(t=Object(t);a--;){var s=r[a];if(l&&s[2]?s[1]!==t[s[0]]:!(s[0]in t))return!1}for(;++a<o;){s=r[a];var p=s[0],c=t[p],h=s[1];if(l&&s[2]){if(c===void 0&&!(p in t))return!1}else{var d=new De;if(n)var u=n(c,h,p,t,e,d);if(!(u===void 0?Mr(h,c,jp|Gp,n,d):u))return!1}}return!0}var Zp=zp;function Up(t){return t===t&&!H(t)}var Lr=Up;function $p(t){for(var e=gt(t),r=e.length;r--;){var n=e[r],a=t[n];e[r]=[n,a,Lr(a)]}return e}var Wp=$p;function Kp(t,e){return function(r){return r==null?!1:r[t]===e&&(e!==void 0||t in Object(r))}}var Nr=Kp;function Xp(t){var e=Wp(t);return e.length==1&&e[0][2]?Nr(e[0][0],e[0][1]):function(r){return r===t||Zp(r,t,e)}}var Vp=Xp,qp=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Yp=/^\w*$/;function Jp(t,e){if((0,A.Z)(t))return!1;var r=typeof t;return r=="number"||r=="symbol"||r=="boolean"||t==null||Ve(t)?!0:Yp.test(t)||!qp.test(t)||e!=null&&t in Object(e)}var Et=Jp,Qp="Expected a function";function Ct(t,e){if(typeof t!="function"||e!=null&&typeof e!="function")throw new TypeError(Qp);var r=function(){var n=arguments,a=e?e.apply(this,n):n[0],o=r.cache;if(o.has(a))return o.get(a);var l=t.apply(this,n);return r.cache=o.set(a,l)||o,l};return r.cache=new(Ct.Cache||Ze),r}Ct.Cache=Ze;var ec=Ct,tc=500;function rc(t){var e=ec(t,function(n){return r.size===tc&&r.clear(),n}),r=e.cache;return e}var nc=rc,ac=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,ic=/\\(\\)?/g,oc=nc(function(t){var e=[];return t.charCodeAt(0)===46&&e.push(""),t.replace(ac,function(r,n,a,o){e.push(a?o.replace(ic,"$1"):n||r)}),e}),lc=oc,sc=1/0,Ir=I?I.prototype:void 0,jr=Ir?Ir.toString:void 0;function Gr(t){if(typeof t=="string")return t;if((0,A.Z)(t))return wr(t,Gr)+"";if(Ve(t))return jr?jr.call(t):"";var e=t+"";return e=="0"&&1/t==-sc?"-0":e}var pc=Gr;function cc(t){return t==null?"":pc(t)}var hc=cc;function uc(t,e){return(0,A.Z)(t)?t:Et(t,e)?[t]:lc(hc(t))}var zr=uc,dc=1/0;function fc(t){if(typeof t=="string"||Ve(t))return t;var e=t+"";return e=="0"&&1/t==-dc?"-0":e}var et=fc;function gc(t,e){e=zr(e,t);for(var r=0,n=e.length;t!=null&&r<n;)t=t[et(e[r++])];return r&&r==n?t:void 0}var Zr=gc;function vc(t,e,r){var n=t==null?void 0:Zr(t,e);return n===void 0?r:n}var bc=vc;function xc(t,e){return t!=null&&e in Object(t)}var yc=xc;function mc(t,e,r){e=zr(e,t);for(var n=-1,a=e.length,o=!1;++n<a;){var l=et(e[n]);if(!(o=t!=null&&r(t,l)))break;t=t[l]}return o||++n!=a?o:(a=t==null?0:t.length,!!a&<(a)&&ht(l,a)&&((0,A.Z)(t)||We(t)))}var wc=mc;function _c(t,e){return t!=null&&wc(t,e,yc)}var Ec=_c,Cc=1,Sc=2;function Pc(t,e){return Et(t)&&Lr(e)?Nr(et(t),e):function(r){var n=bc(r,t);return n===void 0&&n===e?Ec(r,t):Mr(e,n,Cc|Sc)}}var Oc=Pc;function Tc(t){return function(e){return e==null?void 0:e[t]}}var Rc=Tc;function kc(t){return function(e){return Zr(e,t)}}var Ac=kc;function Fc(t){return Et(t)?Rc(et(t)):Ac(t)}var Bc=Fc;function Dc(t){return typeof t=="function"?t:t==null?Xe:typeof t=="object"?(0,A.Z)(t)?Oc(t[0],t[1]):Vp(t):Bc(t)}var Hc=Dc;function Mc(t,e){var r=-1,n=_e(t)?Array(t.length):[];return vr(t,function(a,o,l){n[++r]=e(a,o,l)}),n}var Lc=Mc;function Nc(t,e){var r=(0,A.Z)(t)?wr:Lc;return r(t,Hc(e,3))}var J=Nc,Ic=function(e){var r=e.colors,n=e.onClick,a=e.onSwatchHover,o=(0,x.ZP)({default:{swatches:{marginRight:"-10px"},swatch:{width:"22px",height:"22px",float:"left",marginRight:"10px",marginBottom:"10px",borderRadius:"4px"},clear:{clear:"both"}}});return i.createElement("div",{style:o.swatches},J(r,function(l){return i.createElement(q,{key:l,color:l,style:o.swatch,onClick:n,onHover:a,focusStyle:{boxShadow:"0 0 4px "+l}})}),i.createElement("div",{style:o.clear}))},jc=Ic,St=function(e){var r=e.onChange,n=e.onSwatchHover,a=e.hex,o=e.colors,l=e.width,s=e.triangle,p=e.styles,c=p===void 0?{}:p,h=e.className,d=h===void 0?"":h,u=a==="transparent",f=function(y,_){G(y)&&r({hex:y,source:"hex"},_)},v=(0,x.ZP)(R({default:{card:{width:l,background:"#fff",boxShadow:"0 1px rgba(0,0,0,.1)",borderRadius:"6px",position:"relative"},head:{height:"110px",background:a,borderRadius:"6px 6px 0 0",display:"flex",alignItems:"center",justifyContent:"center",position:"relative"},body:{padding:"10px"},label:{fontSize:"18px",color:vt(a),position:"relative"},triangle:{width:"0px",height:"0px",borderStyle:"solid",borderWidth:"0 10px 10px 10px",borderColor:"transparent transparent "+a+" transparent",position:"absolute",top:"-10px",left:"50%",marginLeft:"-10px"},input:{width:"100%",fontSize:"12px",color:"#666",border:"0px",outline:"none",height:"22px",boxShadow:"inset 0 0 0 1px #ddd",borderRadius:"4px",padding:"0 7px",boxSizing:"border-box"}},"hide-triangle":{triangle:{display:"none"}}},c),{"hide-triangle":s==="hide"});return i.createElement("div",{style:v.card,className:"block-picker "+d},i.createElement("div",{style:v.triangle}),i.createElement("div",{style:v.head},u&&i.createElement(S,{borderRadius:"6px 6px 0 0"}),i.createElement("div",{style:v.label},a)),i.createElement("div",{style:v.body},i.createElement(jc,{colors:o,onClick:f,onSwatchHover:n}),i.createElement(w,{style:{input:v.input},value:a,onChange:f})))};St.propTypes={width:g().oneOfType([g().string,g().number]),colors:g().arrayOf(g().string),triangle:g().oneOf(["top","hide"]),styles:g().object},St.defaultProps={width:170,colors:["#D9E3F0","#F47373","#697689","#37D67A","#2CCCE4","#555555","#dce775","#ff8a65","#ba68c8"],triangle:"top",styles:{}};var q0=k(St),Q={"50":"#ffebee","100":"#ffcdd2","200":"#ef9a9a","300":"#e57373","400":"#ef5350","500":"#f44336","600":"#e53935","700":"#d32f2f","800":"#c62828","900":"#b71c1c",a100:"#ff8a80",a200:"#ff5252",a400:"#ff1744",a700:"#d50000"},ee={"50":"#fce4ec","100":"#f8bbd0","200":"#f48fb1","300":"#f06292","400":"#ec407a","500":"#e91e63","600":"#d81b60","700":"#c2185b","800":"#ad1457","900":"#880e4f",a100:"#ff80ab",a200:"#ff4081",a400:"#f50057",a700:"#c51162"},te={"50":"#f3e5f5","100":"#e1bee7","200":"#ce93d8","300":"#ba68c8","400":"#ab47bc","500":"#9c27b0","600":"#8e24aa","700":"#7b1fa2","800":"#6a1b9a","900":"#4a148c",a100:"#ea80fc",a200:"#e040fb",a400:"#d500f9",a700:"#aa00ff"},re={"50":"#ede7f6","100":"#d1c4e9","200":"#b39ddb","300":"#9575cd","400":"#7e57c2","500":"#673ab7","600":"#5e35b1","700":"#512da8","800":"#4527a0","900":"#311b92",a100:"#b388ff",a200:"#7c4dff",a400:"#651fff",a700:"#6200ea"},ne={"50":"#e8eaf6","100":"#c5cae9","200":"#9fa8da","300":"#7986cb","400":"#5c6bc0","500":"#3f51b5","600":"#3949ab","700":"#303f9f","800":"#283593","900":"#1a237e",a100:"#8c9eff",a200:"#536dfe",a400:"#3d5afe",a700:"#304ffe"},ae={"50":"#e3f2fd","100":"#bbdefb","200":"#90caf9","300":"#64b5f6","400":"#42a5f5","500":"#2196f3","600":"#1e88e5","700":"#1976d2","800":"#1565c0","900":"#0d47a1",a100:"#82b1ff",a200:"#448aff",a400:"#2979ff",a700:"#2962ff"},ie={"50":"#e1f5fe","100":"#b3e5fc","200":"#81d4fa","300":"#4fc3f7","400":"#29b6f6","500":"#03a9f4","600":"#039be5","700":"#0288d1","800":"#0277bd","900":"#01579b",a100:"#80d8ff",a200:"#40c4ff",a400:"#00b0ff",a700:"#0091ea"},oe={"50":"#e0f7fa","100":"#b2ebf2","200":"#80deea","300":"#4dd0e1","400":"#26c6da","500":"#00bcd4","600":"#00acc1","700":"#0097a7","800":"#00838f","900":"#006064",a100:"#84ffff",a200:"#18ffff",a400:"#00e5ff",a700:"#00b8d4"},le={"50":"#e0f2f1","100":"#b2dfdb","200":"#80cbc4","300":"#4db6ac","400":"#26a69a","500":"#009688","600":"#00897b","700":"#00796b","800":"#00695c","900":"#004d40",a100:"#a7ffeb",a200:"#64ffda",a400:"#1de9b6",a700:"#00bfa5"},Ee={"50":"#e8f5e9","100":"#c8e6c9","200":"#a5d6a7","300":"#81c784","400":"#66bb6a","500":"#4caf50","600":"#43a047","700":"#388e3c","800":"#2e7d32","900":"#1b5e20",a100:"#b9f6ca",a200:"#69f0ae",a400:"#00e676",a700:"#00c853"},se={"50":"#f1f8e9","100":"#dcedc8","200":"#c5e1a5","300":"#aed581","400":"#9ccc65","500":"#8bc34a","600":"#7cb342","700":"#689f38","800":"#558b2f","900":"#33691e",a100:"#ccff90",a200:"#b2ff59",a400:"#76ff03",a700:"#64dd17"},pe={"50":"#f9fbe7","100":"#f0f4c3","200":"#e6ee9c","300":"#dce775","400":"#d4e157","500":"#cddc39","600":"#c0ca33","700":"#afb42b","800":"#9e9d24","900":"#827717",a100:"#f4ff81",a200:"#eeff41",a400:"#c6ff00",a700:"#aeea00"},ce={"50":"#fffde7","100":"#fff9c4","200":"#fff59d","300":"#fff176","400":"#ffee58","500":"#ffeb3b","600":"#fdd835","700":"#fbc02d","800":"#f9a825","900":"#f57f17",a100:"#ffff8d",a200:"#ffff00",a400:"#ffea00",a700:"#ffd600"},he={"50":"#fff8e1","100":"#ffecb3","200":"#ffe082","300":"#ffd54f","400":"#ffca28","500":"#ffc107","600":"#ffb300","700":"#ffa000","800":"#ff8f00","900":"#ff6f00",a100:"#ffe57f",a200:"#ffd740",a400:"#ffc400",a700:"#ffab00"},ue={"50":"#fff3e0","100":"#ffe0b2","200":"#ffcc80","300":"#ffb74d","400":"#ffa726","500":"#ff9800","600":"#fb8c00","700":"#f57c00","800":"#ef6c00","900":"#e65100",a100:"#ffd180",a200:"#ffab40",a400:"#ff9100",a700:"#ff6d00"},de={"50":"#fbe9e7","100":"#ffccbc","200":"#ffab91","300":"#ff8a65","400":"#ff7043","500":"#ff5722","600":"#f4511e","700":"#e64a19","800":"#d84315","900":"#bf360c",a100:"#ff9e80",a200:"#ff6e40",a400:"#ff3d00",a700:"#dd2c00"},fe={"50":"#efebe9","100":"#d7ccc8","200":"#bcaaa4","300":"#a1887f","400":"#8d6e63","500":"#795548","600":"#6d4c41","700":"#5d4037","800":"#4e342e","900":"#3e2723"},Gc={"50":"#fafafa","100":"#f5f5f5","200":"#eeeeee","300":"#e0e0e0","400":"#bdbdbd","500":"#9e9e9e","600":"#757575","700":"#616161","800":"#424242","900":"#212121"},ge={"50":"#eceff1","100":"#cfd8dc","200":"#b0bec5","300":"#90a4ae","400":"#78909c","500":"#607d8b","600":"#546e7a","700":"#455a64","800":"#37474f","900":"#263238"},zc={primary:"rgba(0, 0, 0, 0.87)",secondary:"rgba(0, 0, 0, 0.54)",disabled:"rgba(0, 0, 0, 0.38)",dividers:"rgba(0, 0, 0, 0.12)"},Zc={primary:"rgba(255, 255, 255, 1)",secondary:"rgba(255, 255, 255, 0.7)",disabled:"rgba(255, 255, 255, 0.5)",dividers:"rgba(255, 255, 255, 0.12)"},Uc={active:"rgba(0, 0, 0, 0.54)",inactive:"rgba(0, 0, 0, 0.38)"},$c={active:"rgba(255, 255, 255, 1)",inactive:"rgba(255, 255, 255, 0.5)"},Wc="#ffffff",Kc="#000000",Y0={red:Q,pink:ee,purple:te,deepPurple:re,indigo:ne,blue:ae,lightBlue:ie,cyan:oe,teal:le,green:Ee,lightGreen:se,lime:pe,yellow:ce,amber:he,orange:ue,deepOrange:de,brown:fe,grey:Gc,blueGrey:ge,darkText:zc,lightText:Zc,darkIcons:Uc,lightIcons:$c,white:Wc,black:Kc},Ur=function(e){var r=e.color,n=e.onClick,a=e.onSwatchHover,o=e.hover,l=e.active,s=e.circleSize,p=e.circleSpacing,c=(0,x.ZP)({default:{swatch:{width:s,height:s,marginRight:p,marginBottom:p,transform:"scale(1)",transition:"100ms transform ease"},Swatch:{borderRadius:"50%",background:"transparent",boxShadow:"inset 0 0 0 "+(s/2+1)+"px "+r,transition:"100ms box-shadow ease"}},hover:{swatch:{transform:"scale(1.2)"}},active:{Swatch:{boxShadow:"inset 0 0 0 3px "+r}}},{hover:o,active:l});return i.createElement("div",{style:c.swatch},i.createElement(q,{style:c.Swatch,color:r,onClick:n,onHover:a,focusStyle:{boxShadow:c.Swatch.boxShadow+", 0 0 5px "+r}}))};Ur.defaultProps={circleSize:28,circleSpacing:14};var Xc=(0,x.tz)(Ur),Pt=function(e){var r=e.width,n=e.onChange,a=e.onSwatchHover,o=e.colors,l=e.hex,s=e.circleSize,p=e.styles,c=p===void 0?{}:p,h=e.circleSpacing,d=e.className,u=d===void 0?"":d,f=(0,x.ZP)(R({default:{card:{width:r,display:"flex",flexWrap:"wrap",marginRight:-h,marginBottom:-h}}},c)),v=function(y,_){return n({hex:y,source:"hex"},_)};return i.createElement("div",{style:f.card,className:"circle-picker "+u},J(o,function(b){return i.createElement(Xc,{key:b,color:b,onClick:v,onSwatchHover:a,active:l===b.toLowerCase(),circleSize:s,circleSpacing:h})}))};Pt.propTypes={width:g().oneOfType([g().string,g().number]),circleSize:g().number,circleSpacing:g().number,styles:g().object},Pt.defaultProps={width:252,circleSize:28,circleSpacing:14,colors:[Q[500],ee[500],te[500],re[500],ne[500],ae[500],ie[500],oe[500],le[500],Ee[500],se[500],pe[500],ce[500],he[500],ue[500],de[500],fe[500],ge[500]],styles:{}};var J0=k(Pt);function Vc(t){return t===void 0}var $r=Vc,qc=T(43891),Yc=function(){function t(e,r){for(var n=0;n<r.length;n++){var a=r[n];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,a.key,a)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}();function Jc(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Qc(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:t}function e0(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var Wr=function(t){e0(e,t);function e(r){Jc(this,e);var n=Qc(this,(e.__proto__||Object.getPrototypeOf(e)).call(this));return n.toggleViews=function(){n.state.view==="hex"?n.setState({view:"rgb"}):n.state.view==="rgb"?n.setState({view:"hsl"}):n.state.view==="hsl"&&(n.props.hsl.a===1?n.setState({view:"hex"}):n.setState({view:"rgb"}))},n.handleChange=function(a,o){a.hex?G(a.hex)&&n.props.onChange({hex:a.hex,source:"hex"},o):a.r||a.g||a.b?n.props.onChange({r:a.r||n.props.rgb.r,g:a.g||n.props.rgb.g,b:a.b||n.props.rgb.b,source:"rgb"},o):a.a?(a.a<0?a.a=0:a.a>1&&(a.a=1),n.props.onChange({h:n.props.hsl.h,s:n.props.hsl.s,l:n.props.hsl.l,a:Math.round(a.a*100)/100,source:"rgb"},o)):(a.h||a.s||a.l)&&(typeof a.s=="string"&&a.s.includes("%")&&(a.s=a.s.replace("%","")),typeof a.l=="string"&&a.l.includes("%")&&(a.l=a.l.replace("%","")),a.s==1?a.s=.01:a.l==1&&(a.l=.01),n.props.onChange({h:a.h||n.props.hsl.h,s:Number($r(a.s)?n.props.hsl.s:a.s),l:Number($r(a.l)?n.props.hsl.l:a.l),source:"hsl"},o))},n.showHighlight=function(a){a.currentTarget.style.background="#eee"},n.hideHighlight=function(a){a.currentTarget.style.background="transparent"},r.hsl.a!==1&&r.view==="hex"?n.state={view:"rgb"}:n.state={view:r.view},n}return Yc(e,[{key:"render",value:function(){var n=this,a=(0,x.ZP)({default:{wrap:{paddingTop:"16px",display:"flex"},fields:{flex:"1",display:"flex",marginLeft:"-6px"},field:{paddingLeft:"6px",width:"100%"},alpha:{paddingLeft:"6px",width:"100%"},toggle:{width:"32px",textAlign:"right",position:"relative"},icon:{marginRight:"-4px",marginTop:"12px",cursor:"pointer",position:"relative"},iconHighlight:{position:"absolute",width:"24px",height:"28px",background:"#eee",borderRadius:"4px",top:"10px",left:"12px",display:"none"},input:{fontSize:"11px",color:"#333",width:"100%",borderRadius:"2px",border:"none",boxShadow:"inset 0 0 0 1px #dadada",height:"21px",textAlign:"center"},label:{textTransform:"uppercase",fontSize:"11px",lineHeight:"11px",color:"#969696",textAlign:"center",display:"block",marginTop:"12px"},svg:{fill:"#333",width:"24px",height:"24px",border:"1px transparent solid",borderRadius:"5px"}},disableAlpha:{alpha:{display:"none"}}},this.props,this.state),o=void 0;return this.state.view==="hex"?o=i.createElement("div",{style:a.fields,className:"flexbox-fix"},i.createElement("div",{style:a.field},i.createElement(w,{style:{input:a.input,label:a.label},label:"hex",value:this.props.hex,onChange:this.handleChange}))):this.state.view==="rgb"?o=i.createElement("div",{style:a.fields,className:"flexbox-fix"},i.createElement("div",{style:a.field},i.createElement(w,{style:{input:a.input,label:a.label},label:"r",value:this.props.rgb.r,onChange:this.handleChange})),i.createElement("div",{style:a.field},i.createElement(w,{style:{input:a.input,label:a.label},label:"g",value:this.props.rgb.g,onChange:this.handleChange})),i.createElement("div",{style:a.field},i.createElement(w,{style:{input:a.input,label:a.label},label:"b",value:this.props.rgb.b,onChange:this.handleChange})),i.createElement("div",{style:a.alpha},i.createElement(w,{style:{input:a.input,label:a.label},label:"a",value:this.props.rgb.a,arrowOffset:.01,onChange:this.handleChange}))):this.state.view==="hsl"&&(o=i.createElement("div",{style:a.fields,className:"flexbox-fix"},i.createElement("div",{style:a.field},i.createElement(w,{style:{input:a.input,label:a.label},label:"h",value:Math.round(this.props.hsl.h),onChange:this.handleChange})),i.createElement("div",{style:a.field},i.createElement(w,{style:{input:a.input,label:a.label},label:"s",value:Math.round(this.props.hsl.s*100)+"%",onChange:this.handleChange})),i.createElement("div",{style:a.field},i.createElement(w,{style:{input:a.input,label:a.label},label:"l",value:Math.round(this.props.hsl.l*100)+"%",onChange:this.handleChange})),i.createElement("div",{style:a.alpha},i.createElement(w,{style:{input:a.input,label:a.label},label:"a",value:this.props.hsl.a,arrowOffset:.01,onChange:this.handleChange})))),i.createElement("div",{style:a.wrap,className:"flexbox-fix"},o,i.createElement("div",{style:a.toggle},i.createElement("div",{style:a.icon,onClick:this.toggleViews,ref:function(s){return n.icon=s}},i.createElement(qc.Z,{style:a.svg,onMouseOver:this.showHighlight,onMouseEnter:this.showHighlight,onMouseOut:this.hideHighlight}))))}}],[{key:"getDerivedStateFromProps",value:function(n,a){return n.hsl.a!==1&&a.view==="hex"?{view:"rgb"}:null}}]),e}(i.Component);Wr.defaultProps={view:"hex"};var t0=Wr,r0=function(){var e=(0,x.ZP)({default:{picker:{width:"12px",height:"12px",borderRadius:"6px",transform:"translate(-6px, -1px)",backgroundColor:"rgb(248, 248, 248)",boxShadow:"0 1px 4px 0 rgba(0, 0, 0, 0.37)"}}});return i.createElement("div",{style:e.picker})},Kr=r0,n0=function(){var e=(0,x.ZP)({default:{picker:{width:"12px",height:"12px",borderRadius:"6px",boxShadow:"inset 0 0 0 1px #fff",transform:"translate(-6px, -6px)"}}});return i.createElement("div",{style:e.picker})},a0=n0,Ot=function(e){var r=e.width,n=e.onChange,a=e.disableAlpha,o=e.rgb,l=e.hsl,s=e.hsv,p=e.hex,c=e.renderers,h=e.styles,d=h===void 0?{}:h,u=e.className,f=u===void 0?"":u,v=e.defaultView,b=(0,x.ZP)(R({default:{picker:{width:r,background:"#fff",borderRadius:"2px",boxShadow:"0 0 2px rgba(0,0,0,.3), 0 4px 8px rgba(0,0,0,.3)",boxSizing:"initial",fontFamily:"Menlo"},saturation:{width:"100%",paddingBottom:"55%",position:"relative",borderRadius:"2px 2px 0 0",overflow:"hidden"},Saturation:{radius:"2px 2px 0 0"},body:{padding:"16px 16px 12px"},controls:{display:"flex"},color:{width:"32px"},swatch:{marginTop:"6px",width:"16px",height:"16px",borderRadius:"8px",position:"relative",overflow:"hidden"},active:{absolute:"0px 0px 0px 0px",borderRadius:"8px",boxShadow:"inset 0 0 0 1px rgba(0,0,0,.1)",background:"rgba("+o.r+", "+o.g+", "+o.b+", "+o.a+")",zIndex:"2"},toggles:{flex:"1"},hue:{height:"10px",position:"relative",marginBottom:"8px"},Hue:{radius:"2px"},alpha:{height:"10px",position:"relative"},Alpha:{radius:"2px"}},disableAlpha:{color:{width:"22px"},alpha:{display:"none"},hue:{marginBottom:"0px"},swatch:{width:"10px",height:"10px",marginTop:"0px"}}},d),{disableAlpha:a});return i.createElement("div",{style:b.picker,className:"chrome-picker "+f},i.createElement("div",{style:b.saturation},i.createElement(qe,{style:b.Saturation,hsl:l,hsv:s,pointer:a0,onChange:n})),i.createElement("div",{style:b.body},i.createElement("div",{style:b.controls,className:"flexbox-fix"},i.createElement("div",{style:b.color},i.createElement("div",{style:b.swatch},i.createElement("div",{style:b.active}),i.createElement(S,{renderers:c}))),i.createElement("div",{style:b.toggles},i.createElement("div",{style:b.hue},i.createElement(be,{style:b.Hue,hsl:l,pointer:Kr,onChange:n})),i.createElement("div",{style:b.alpha},i.createElement(W,{style:b.Alpha,rgb:o,hsl:l,pointer:Kr,renderers:c,onChange:n})))),i.createElement(t0,{rgb:o,hsl:l,hex:p,view:v,onChange:n,disableAlpha:a})))};Ot.propTypes={width:g().oneOfType([g().string,g().number]),disableAlpha:g().bool,styles:g().object,defaultView:g().oneOf(["hex","rgb","hsl"])},Ot.defaultProps={width:225,disableAlpha:!1,styles:{}};var Q0=k(Ot),i0=function(e){var r=e.color,n=e.onClick,a=n===void 0?function(){}:n,o=e.onSwatchHover,l=e.active,s=(0,x.ZP)({default:{color:{background:r,width:"15px",height:"15px",float:"left",marginRight:"5px",marginBottom:"5px",position:"relative",cursor:"pointer"},dot:{absolute:"5px 5px 5px 5px",background:vt(r),borderRadius:"50%",opacity:"0"}},active:{dot:{opacity:"1"}},"color-#FFFFFF":{color:{boxShadow:"inset 0 0 0 1px #ddd"},dot:{background:"#000"}},transparent:{dot:{background:"#000"}}},{active:l,"color-#FFFFFF":r==="#FFFFFF",transparent:r==="transparent"});return i.createElement(q,{style:s.color,color:r,onClick:a,onHover:o,focusStyle:{boxShadow:"0 0 4px "+r}},i.createElement("div",{style:s.dot}))},o0=i0,l0=function(e){var r=e.hex,n=e.rgb,a=e.onChange,o=(0,x.ZP)({default:{fields:{display:"flex",paddingBottom:"6px",paddingRight:"5px",position:"relative"},active:{position:"absolute",top:"6px",left:"5px",height:"9px",width:"9px",background:r},HEXwrap:{flex:"6",position:"relative"},HEXinput:{width:"80%",padding:"0px",paddingLeft:"20%",border:"none",outline:"none",background:"none",fontSize:"12px",color:"#333",height:"16px"},HEXlabel:{display:"none"},RGBwrap:{flex:"3",position:"relative"},RGBinput:{width:"70%",padding:"0px",paddingLeft:"30%",border:"none",outline:"none",background:"none",fontSize:"12px",color:"#333",height:"16px"},RGBlabel:{position:"absolute",top:"3px",left:"0px",lineHeight:"16px",textTransform:"uppercase",fontSize:"12px",color:"#999"}}}),l=function(p,c){p.r||p.g||p.b?a({r:p.r||n.r,g:p.g||n.g,b:p.b||n.b,source:"rgb"},c):a({hex:p.hex,source:"hex"},c)};return i.createElement("div",{style:o.fields,className:"flexbox-fix"},i.createElement("div",{style:o.active}),i.createElement(w,{style:{wrap:o.HEXwrap,input:o.HEXinput,label:o.HEXlabel},label:"hex",value:r,onChange:l}),i.createElement(w,{style:{wrap:o.RGBwrap,input:o.RGBinput,label:o.RGBlabel},label:"r",value:n.r,onChange:l}),i.createElement(w,{style:{wrap:o.RGBwrap,input:o.RGBinput,label:o.RGBlabel},label:"g",value:n.g,onChange:l}),i.createElement(w,{style:{wrap:o.RGBwrap,input:o.RGBinput,label:o.RGBlabel},label:"b",value:n.b,onChange:l}))},s0=l0,Tt=function(e){var r=e.onChange,n=e.onSwatchHover,a=e.colors,o=e.hex,l=e.rgb,s=e.styles,p=s===void 0?{}:s,c=e.className,h=c===void 0?"":c,d=(0,x.ZP)(R({default:{Compact:{background:"#f6f6f6",radius:"4px"},compact:{paddingTop:"5px",paddingLeft:"5px",boxSizing:"initial",width:"240px"},clear:{clear:"both"}}},p)),u=function(v,b){v.hex?G(v.hex)&&r({hex:v.hex,source:"hex"},b):r(v,b)};return i.createElement(dt,{style:d.Compact,styles:p},i.createElement("div",{style:d.compact,className:"compact-picker "+h},i.createElement("div",null,J(a,function(f){return i.createElement(o0,{key:f,color:f,active:f.toLowerCase()===o,onClick:u,onSwatchHover:n})}),i.createElement("div",{style:d.clear})),i.createElement(s0,{hex:o,rgb:l,onChange:u})))};Tt.propTypes={colors:g().arrayOf(g().string),styles:g().object},Tt.defaultProps={colors:["#4D4D4D","#999999","#FFFFFF","#F44E3B","#FE9200","#FCDC00","#DBDF00","#A4DD00","#68CCCA","#73D8FF","#AEA1FF","#FDA1FF","#333333","#808080","#cccccc","#D33115","#E27300","#FCC400","#B0BC00","#68BC00","#16A5A5","#009CE0","#7B64FF","#FA28FF","#000000","#666666","#B3B3B3","#9F0500","#C45100","#FB9E00","#808900","#194D33","#0C797D","#0062B1","#653294","#AB149E"],styles:{}};var eh=k(Tt),p0=function(e){var r=e.hover,n=e.color,a=e.onClick,o=e.onSwatchHover,l={position:"relative",zIndex:"2",outline:"2px solid #fff",boxShadow:"0 0 5px 2px rgba(0,0,0,0.25)"},s=(0,x.ZP)({default:{swatch:{width:"25px",height:"25px",fontSize:"0"}},hover:{swatch:l}},{hover:r});return i.createElement("div",{style:s.swatch},i.createElement(q,{color:n,onClick:a,onHover:o,focusStyle:l}))},c0=(0,x.tz)(p0),Rt=function(e){var r=e.width,n=e.colors,a=e.onChange,o=e.onSwatchHover,l=e.triangle,s=e.styles,p=s===void 0?{}:s,c=e.className,h=c===void 0?"":c,d=(0,x.ZP)(R({default:{card:{width:r,background:"#fff",border:"1px solid rgba(0,0,0,0.2)",boxShadow:"0 3px 12px rgba(0,0,0,0.15)",borderRadius:"4px",position:"relative",padding:"5px",display:"flex",flexWrap:"wrap"},triangle:{position:"absolute",border:"7px solid transparent",borderBottomColor:"#fff"},triangleShadow:{position:"absolute",border:"8px solid transparent",borderBottomColor:"rgba(0,0,0,0.15)"}},"hide-triangle":{triangle:{display:"none"},triangleShadow:{display:"none"}},"top-left-triangle":{triangle:{top:"-14px",left:"10px"},triangleShadow:{top:"-16px",left:"9px"}},"top-right-triangle":{triangle:{top:"-14px",right:"10px"},triangleShadow:{top:"-16px",right:"9px"}},"bottom-left-triangle":{triangle:{top:"35px",left:"10px",transform:"rotate(180deg)"},triangleShadow:{top:"37px",left:"9px",transform:"rotate(180deg)"}},"bottom-right-triangle":{triangle:{top:"35px",right:"10px",transform:"rotate(180deg)"},triangleShadow:{top:"37px",right:"9px",transform:"rotate(180deg)"}}},p),{"hide-triangle":l==="hide","top-left-triangle":l==="top-left","top-right-triangle":l==="top-right","bottom-left-triangle":l==="bottom-left","bottom-right-triangle":l==="bottom-right"}),u=function(v,b){return a({hex:v,source:"hex"},b)};return i.createElement("div",{style:d.card,className:"github-picker "+h},i.createElement("div",{style:d.triangleShadow}),i.createElement("div",{style:d.triangle}),J(n,function(f){return i.createElement(c0,{color:f,key:f,onClick:u,onSwatchHover:o})}))};Rt.propTypes={width:g().oneOfType([g().string,g().number]),colors:g().arrayOf(g().string),triangle:g().oneOf(["hide","top-left","top-right","bottom-left","bottom-right"]),styles:g().object},Rt.defaultProps={width:200,colors:["#B80000","#DB3E00","#FCCB00","#008B02","#006B76","#1273DE","#004DCF","#5300EB","#EB9694","#FAD0C3","#FEF3BD","#C1E1C5","#BEDADC","#C4DEF6","#BED3F3","#D4C4FB"],triangle:"top-left",styles:{}};var th=k(Rt),h0=function(e){var r=e.direction,n=(0,x.ZP)({default:{picker:{width:"18px",height:"18px",borderRadius:"50%",transform:"translate(-9px, -1px)",backgroundColor:"rgb(248, 248, 248)",boxShadow:"0 1px 4px 0 rgba(0, 0, 0, 0.37)"}},vertical:{picker:{transform:"translate(-3px, -9px)"}}},{vertical:r==="vertical"});return i.createElement("div",{style:n.picker})},u0=h0,d0=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},kt=function(e){var r=e.width,n=e.height,a=e.onChange,o=e.hsl,l=e.direction,s=e.pointer,p=e.styles,c=p===void 0?{}:p,h=e.className,d=h===void 0?"":h,u=(0,x.ZP)(R({default:{picker:{position:"relative",width:r,height:n},hue:{radius:"2px"}}},c)),f=function(b){return a({a:1,h:b.h,l:.5,s:1})};return i.createElement("div",{style:u.picker,className:"hue-picker "+d},i.createElement(be,d0({},u.hue,{hsl:o,pointer:s,onChange:f,direction:l})))};kt.propTypes={styles:g().object},kt.defaultProps={width:"316px",height:"16px",direction:"horizontal",pointer:u0,styles:{}};var rh=k(kt),f0=function(e){var r=e.onChange,n=e.hex,a=e.rgb,o=e.styles,l=o===void 0?{}:o,s=e.className,p=s===void 0?"":s,c=(0,x.ZP)(R({default:{material:{width:"98px",height:"98px",padding:"16px",fontFamily:"Roboto"},HEXwrap:{position:"relative"},HEXinput:{width:"100%",marginTop:"12px",fontSize:"15px",color:"#333",padding:"0px",border:"0px",borderBottom:"2px solid "+n,outline:"none",height:"30px"},HEXlabel:{position:"absolute",top:"0px",left:"0px",fontSize:"11px",color:"#999999",textTransform:"capitalize"},Hex:{style:{}},RGBwrap:{position:"relative"},RGBinput:{width:"100%",marginTop:"12px",fontSize:"15px",color:"#333",padding:"0px",border:"0px",borderBottom:"1px solid #eee",outline:"none",height:"30px"},RGBlabel:{position:"absolute",top:"0px",left:"0px",fontSize:"11px",color:"#999999",textTransform:"capitalize"},split:{display:"flex",marginRight:"-10px",paddingTop:"11px"},third:{flex:"1",paddingRight:"10px"}}},l)),h=function(u,f){u.hex?G(u.hex)&&r({hex:u.hex,source:"hex"},f):(u.r||u.g||u.b)&&r({r:u.r||a.r,g:u.g||a.g,b:u.b||a.b,source:"rgb"},f)};return i.createElement(dt,{styles:l},i.createElement("div",{style:c.material,className:"material-picker "+p},i.createElement(w,{style:{wrap:c.HEXwrap,input:c.HEXinput,label:c.HEXlabel},label:"hex",value:n,onChange:h}),i.createElement("div",{style:c.split,className:"flexbox-fix"},i.createElement("div",{style:c.third},i.createElement(w,{style:{wrap:c.RGBwrap,input:c.RGBinput,label:c.RGBlabel},label:"r",value:a.r,onChange:h})),i.createElement("div",{style:c.third},i.createElement(w,{style:{wrap:c.RGBwrap,input:c.RGBinput,label:c.RGBlabel},label:"g",value:a.g,onChange:h})),i.createElement("div",{style:c.third},i.createElement(w,{style:{wrap:c.RGBwrap,input:c.RGBinput,label:c.RGBlabel},label:"b",value:a.b,onChange:h})))))},nh=k(f0),g0=function(e){var r=e.onChange,n=e.rgb,a=e.hsv,o=e.hex,l=(0,x.ZP)({default:{fields:{paddingTop:"5px",paddingBottom:"9px",width:"80px",position:"relative"},divider:{height:"5px"},RGBwrap:{position:"relative"},RGBinput:{marginLeft:"40%",width:"40%",height:"18px",border:"1px solid #888888",boxShadow:"inset 0 1px 1px rgba(0,0,0,.1), 0 1px 0 0 #ECECEC",marginBottom:"5px",fontSize:"13px",paddingLeft:"3px",marginRight:"10px"},RGBlabel:{left:"0px",top:"0px",width:"34px",textTransform:"uppercase",fontSize:"13px",height:"18px",lineHeight:"22px",position:"absolute"},HEXwrap:{position:"relative"},HEXinput:{marginLeft:"20%",width:"80%",height:"18px",border:"1px solid #888888",boxShadow:"inset 0 1px 1px rgba(0,0,0,.1), 0 1px 0 0 #ECECEC",marginBottom:"6px",fontSize:"13px",paddingLeft:"3px"},HEXlabel:{position:"absolute",top:"0px",left:"0px",width:"14px",textTransform:"uppercase",fontSize:"13px",height:"18px",lineHeight:"22px"},fieldSymbols:{position:"absolute",top:"5px",right:"-7px",fontSize:"13px"},symbol:{height:"20px",lineHeight:"22px",paddingBottom:"7px"}}}),s=function(c,h){c["#"]?G(c["#"])&&r({hex:c["#"],source:"hex"},h):c.r||c.g||c.b?r({r:c.r||n.r,g:c.g||n.g,b:c.b||n.b,source:"rgb"},h):(c.h||c.s||c.v)&&r({h:c.h||a.h,s:c.s||a.s,v:c.v||a.v,source:"hsv"},h)};return i.createElement("div",{style:l.fields},i.createElement(w,{style:{wrap:l.RGBwrap,input:l.RGBinput,label:l.RGBlabel},label:"h",value:Math.round(a.h),onChange:s}),i.createElement(w,{style:{wrap:l.RGBwrap,input:l.RGBinput,label:l.RGBlabel},label:"s",value:Math.round(a.s*100),onChange:s}),i.createElement(w,{style:{wrap:l.RGBwrap,input:l.RGBinput,label:l.RGBlabel},label:"v",value:Math.round(a.v*100),onChange:s}),i.createElement("div",{style:l.divider}),i.createElement(w,{style:{wrap:l.RGBwrap,input:l.RGBinput,label:l.RGBlabel},label:"r",value:n.r,onChange:s}),i.createElement(w,{style:{wrap:l.RGBwrap,input:l.RGBinput,label:l.RGBlabel},label:"g",value:n.g,onChange:s}),i.createElement(w,{style:{wrap:l.RGBwrap,input:l.RGBinput,label:l.RGBlabel},label:"b",value:n.b,onChange:s}),i.createElement("div",{style:l.divider}),i.createElement(w,{style:{wrap:l.HEXwrap,input:l.HEXinput,label:l.HEXlabel},label:"#",value:o.replace("#",""),onChange:s}),i.createElement("div",{style:l.fieldSymbols},i.createElement("div",{style:l.symbol},"\xB0"),i.createElement("div",{style:l.symbol},"%"),i.createElement("div",{style:l.symbol},"%")))},v0=g0,b0=function(e){var r=e.hsl,n=(0,x.ZP)({default:{picker:{width:"12px",height:"12px",borderRadius:"6px",boxShadow:"inset 0 0 0 1px #fff",transform:"translate(-6px, -6px)"}},"black-outline":{picker:{boxShadow:"inset 0 0 0 1px #000"}}},{"black-outline":r.l>.5});return i.createElement("div",{style:n.picker})},x0=b0,y0=function(){var e=(0,x.ZP)({default:{triangle:{width:0,height:0,borderStyle:"solid",borderWidth:"4px 0 4px 6px",borderColor:"transparent transparent transparent #fff",position:"absolute",top:"1px",left:"1px"},triangleBorder:{width:0,height:0,borderStyle:"solid",borderWidth:"5px 0 5px 8px",borderColor:"transparent transparent transparent #555"},left:{Extend:"triangleBorder",transform:"translate(-13px, -4px)"},leftInside:{Extend:"triangle",transform:"translate(-8px, -5px)"},right:{Extend:"triangleBorder",transform:"translate(20px, -14px) rotate(180deg)"},rightInside:{Extend:"triangle",transform:"translate(-8px, -5px)"}}});return i.createElement("div",{style:e.pointer},i.createElement("div",{style:e.left},i.createElement("div",{style:e.leftInside})),i.createElement("div",{style:e.right},i.createElement("div",{style:e.rightInside})))},m0=y0,w0=function(e){var r=e.onClick,n=e.label,a=e.children,o=e.active,l=(0,x.ZP)({default:{button:{backgroundImage:"linear-gradient(-180deg, #FFFFFF 0%, #E6E6E6 100%)",border:"1px solid #878787",borderRadius:"2px",height:"20px",boxShadow:"0 1px 0 0 #EAEAEA",fontSize:"14px",color:"#000",lineHeight:"20px",textAlign:"center",marginBottom:"10px",cursor:"pointer"}},active:{button:{boxShadow:"0 0 0 1px #878787"}}},{active:o});return i.createElement("div",{style:l.button,onClick:r},n||a)},Xr=w0,_0=function(e){var r=e.rgb,n=e.currentColor,a=(0,x.ZP)({default:{swatches:{border:"1px solid #B3B3B3",borderBottom:"1px solid #F0F0F0",marginBottom:"2px",marginTop:"1px"},new:{height:"34px",background:"rgb("+r.r+","+r.g+", "+r.b+")",boxShadow:"inset 1px 0 0 #000, inset -1px 0 0 #000, inset 0 1px 0 #000"},current:{height:"34px",background:n,boxShadow:"inset 1px 0 0 #000, inset -1px 0 0 #000, inset 0 -1px 0 #000"},label:{fontSize:"14px",color:"#000",textAlign:"center"}}});return i.createElement("div",null,i.createElement("div",{style:a.label},"new"),i.createElement("div",{style:a.swatches},i.createElement("div",{style:a.new}),i.createElement("div",{style:a.current})),i.createElement("div",{style:a.label},"current"))},E0=_0,C0=function(){function t(e,r){for(var n=0;n<r.length;n++){var a=r[n];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,a.key,a)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}();function S0(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function P0(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:t}function O0(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var At=function(t){O0(e,t);function e(r){S0(this,e);var n=P0(this,(e.__proto__||Object.getPrototypeOf(e)).call(this));return n.state={currentColor:r.hex},n}return C0(e,[{key:"render",value:function(){var n=this.props,a=n.styles,o=a===void 0?{}:a,l=n.className,s=l===void 0?"":l,p=(0,x.ZP)(R({default:{picker:{background:"#DCDCDC",borderRadius:"4px",boxShadow:"0 0 0 1px rgba(0,0,0,.25), 0 8px 16px rgba(0,0,0,.15)",boxSizing:"initial",width:"513px"},head:{backgroundImage:"linear-gradient(-180deg, #F0F0F0 0%, #D4D4D4 100%)",borderBottom:"1px solid #B1B1B1",boxShadow:"inset 0 1px 0 0 rgba(255,255,255,.2), inset 0 -1px 0 0 rgba(0,0,0,.02)",height:"23px",lineHeight:"24px",borderRadius:"4px 4px 0 0",fontSize:"13px",color:"#4D4D4D",textAlign:"center"},body:{padding:"15px 15px 0",display:"flex"},saturation:{width:"256px",height:"256px",position:"relative",border:"2px solid #B3B3B3",borderBottom:"2px solid #F0F0F0",overflow:"hidden"},hue:{position:"relative",height:"256px",width:"19px",marginLeft:"10px",border:"2px solid #B3B3B3",borderBottom:"2px solid #F0F0F0"},controls:{width:"180px",marginLeft:"10px"},top:{display:"flex"},previews:{width:"60px"},actions:{flex:"1",marginLeft:"20px"}}},o));return i.createElement("div",{style:p.picker,className:"photoshop-picker "+s},i.createElement("div",{style:p.head},this.props.header),i.createElement("div",{style:p.body,className:"flexbox-fix"},i.createElement("div",{style:p.saturation},i.createElement(qe,{hsl:this.props.hsl,hsv:this.props.hsv,pointer:x0,onChange:this.props.onChange})),i.createElement("div",{style:p.hue},i.createElement(be,{direction:"vertical",hsl:this.props.hsl,pointer:m0,onChange:this.props.onChange})),i.createElement("div",{style:p.controls},i.createElement("div",{style:p.top,className:"flexbox-fix"},i.createElement("div",{style:p.previews},i.createElement(E0,{rgb:this.props.rgb,currentColor:this.state.currentColor})),i.createElement("div",{style:p.actions},i.createElement(Xr,{label:"OK",onClick:this.props.onAccept,active:!0}),i.createElement(Xr,{label:"Cancel",onClick:this.props.onCancel}),i.createElement(v0,{onChange:this.props.onChange,rgb:this.props.rgb,hsv:this.props.hsv,hex:this.props.hex}))))))}}]),e}(i.Component);At.propTypes={header:g().string,styles:g().object},At.defaultProps={header:"Color Picker",styles:{}};var ah=k(At),T0=function(e){var r=e.onChange,n=e.rgb,a=e.hsl,o=e.hex,l=e.disableAlpha,s=(0,x.ZP)({default:{fields:{display:"flex",paddingTop:"4px"},single:{flex:"1",paddingLeft:"6px"},alpha:{flex:"1",paddingLeft:"6px"},double:{flex:"2"},input:{width:"80%",padding:"4px 10% 3px",border:"none",boxShadow:"inset 0 0 0 1px #ccc",fontSize:"11px"},label:{display:"block",textAlign:"center",fontSize:"11px",color:"#222",paddingTop:"3px",paddingBottom:"4px",textTransform:"capitalize"}},disableAlpha:{alpha:{display:"none"}}},{disableAlpha:l}),p=function(h,d){h.hex?G(h.hex)&&r({hex:h.hex,source:"hex"},d):h.r||h.g||h.b?r({r:h.r||n.r,g:h.g||n.g,b:h.b||n.b,a:n.a,source:"rgb"},d):h.a&&(h.a<0?h.a=0:h.a>100&&(h.a=100),h.a/=100,r({h:a.h,s:a.s,l:a.l,a:h.a,source:"rgb"},d))};return i.createElement("div",{style:s.fields,className:"flexbox-fix"},i.createElement("div",{style:s.double},i.createElement(w,{style:{input:s.input,label:s.label},label:"hex",value:o.replace("#",""),onChange:p})),i.createElement("div",{style:s.single},i.createElement(w,{style:{input:s.input,label:s.label},label:"r",value:n.r,onChange:p,dragLabel:"true",dragMax:"255"})),i.createElement("div",{style:s.single},i.createElement(w,{style:{input:s.input,label:s.label},label:"g",value:n.g,onChange:p,dragLabel:"true",dragMax:"255"})),i.createElement("div",{style:s.single},i.createElement(w,{style:{input:s.input,label:s.label},label:"b",value:n.b,onChange:p,dragLabel:"true",dragMax:"255"})),i.createElement("div",{style:s.alpha},i.createElement(w,{style:{input:s.input,label:s.label},label:"a",value:Math.round(n.a*100),onChange:p,dragLabel:"true",dragMax:"100"})))},R0=T0,k0=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},Vr=function(e){var r=e.colors,n=e.onClick,a=n===void 0?function(){}:n,o=e.onSwatchHover,l=(0,x.ZP)({default:{colors:{margin:"0 -10px",padding:"10px 0 0 10px",borderTop:"1px solid #eee",display:"flex",flexWrap:"wrap",position:"relative"},swatchWrap:{width:"16px",height:"16px",margin:"0 10px 10px 0"},swatch:{borderRadius:"3px",boxShadow:"inset 0 0 0 1px rgba(0,0,0,.15)"}},"no-presets":{colors:{display:"none"}}},{"no-presets":!r||!r.length}),s=function(c,h){a({hex:c,source:"hex"},h)};return i.createElement("div",{style:l.colors,className:"flexbox-fix"},r.map(function(p){var c=typeof p=="string"?{color:p}:p,h=""+c.color+(c.title||"");return i.createElement("div",{key:h,style:l.swatchWrap},i.createElement(q,k0({},c,{style:l.swatch,onClick:s,onHover:o,focusStyle:{boxShadow:"inset 0 0 0 1px rgba(0,0,0,.15), 0 0 4px "+c.color}})))}))};Vr.propTypes={colors:g().arrayOf(g().oneOfType([g().string,g().shape({color:g().string,title:g().string})])).isRequired};var A0=Vr,F0=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},Ft=function(e){var r=e.width,n=e.rgb,a=e.hex,o=e.hsv,l=e.hsl,s=e.onChange,p=e.onSwatchHover,c=e.disableAlpha,h=e.presetColors,d=e.renderers,u=e.styles,f=u===void 0?{}:u,v=e.className,b=v===void 0?"":v,y=(0,x.ZP)(R({default:F0({picker:{width:r,padding:"10px 10px 0",boxSizing:"initial",background:"#fff",borderRadius:"4px",boxShadow:"0 0 0 1px rgba(0,0,0,.15), 0 8px 16px rgba(0,0,0,.15)"},saturation:{width:"100%",paddingBottom:"75%",position:"relative",overflow:"hidden"},Saturation:{radius:"3px",shadow:"inset 0 0 0 1px rgba(0,0,0,.15), inset 0 0 4px rgba(0,0,0,.25)"},controls:{display:"flex"},sliders:{padding:"4px 0",flex:"1"},color:{width:"24px",height:"24px",position:"relative",marginTop:"4px",marginLeft:"4px",borderRadius:"3px"},activeColor:{absolute:"0px 0px 0px 0px",borderRadius:"2px",background:"rgba("+n.r+","+n.g+","+n.b+","+n.a+")",boxShadow:"inset 0 0 0 1px rgba(0,0,0,.15), inset 0 0 4px rgba(0,0,0,.25)"},hue:{position:"relative",height:"10px",overflow:"hidden"},Hue:{radius:"2px",shadow:"inset 0 0 0 1px rgba(0,0,0,.15), inset 0 0 4px rgba(0,0,0,.25)"},alpha:{position:"relative",height:"10px",marginTop:"4px",overflow:"hidden"},Alpha:{radius:"2px",shadow:"inset 0 0 0 1px rgba(0,0,0,.15), inset 0 0 4px rgba(0,0,0,.25)"}},f),disableAlpha:{color:{height:"10px"},hue:{height:"10px"},alpha:{display:"none"}}},f),{disableAlpha:c});return i.createElement("div",{style:y.picker,className:"sketch-picker "+b},i.createElement("div",{style:y.saturation},i.createElement(qe,{style:y.Saturation,hsl:l,hsv:o,onChange:s})),i.createElement("div",{style:y.controls,className:"flexbox-fix"},i.createElement("div",{style:y.sliders},i.createElement("div",{style:y.hue},i.createElement(be,{style:y.Hue,hsl:l,onChange:s})),i.createElement("div",{style:y.alpha},i.createElement(W,{style:y.Alpha,rgb:n,hsl:l,renderers:d,onChange:s}))),i.createElement("div",{style:y.color},i.createElement(S,null),i.createElement("div",{style:y.activeColor}))),i.createElement(R0,{rgb:n,hsl:l,hex:a,onChange:s,disableAlpha:c}),i.createElement(A0,{colors:h,onClick:s,onSwatchHover:p}))};Ft.propTypes={disableAlpha:g().bool,width:g().oneOfType([g().string,g().number]),styles:g().object},Ft.defaultProps={disableAlpha:!1,width:200,styles:{},presetColors:["#D0021B","#F5A623","#F8E71C","#8B572A","#7ED321","#417505","#BD10E0","#9013FE","#4A90E2","#50E3C2","#B8E986","#000000","#4A4A4A","#9B9B9B","#FFFFFF"]};var B0=k(Ft),D0=function(e){var r=e.hsl,n=e.offset,a=e.onClick,o=a===void 0?function(){}:a,l=e.active,s=e.first,p=e.last,c=(0,x.ZP)({default:{swatch:{height:"12px",background:"hsl("+r.h+", 50%, "+n*100+"%)",cursor:"pointer"}},first:{swatch:{borderRadius:"2px 0 0 2px"}},last:{swatch:{borderRadius:"0 2px 2px 0"}},active:{swatch:{transform:"scaleY(1.8)",borderRadius:"3.6px/2px"}}},{active:l,first:s,last:p}),h=function(u){return o({h:r.h,s:.5,l:n,source:"hsl"},u)};return i.createElement("div",{style:c.swatch,onClick:h})},Ne=D0,H0=function(e){var r=e.onClick,n=e.hsl,a=(0,x.ZP)({default:{swatches:{marginTop:"20px"},swatch:{boxSizing:"border-box",width:"20%",paddingRight:"1px",float:"left"},clear:{clear:"both"}}}),o=.1;return i.createElement("div",{style:a.swatches},i.createElement("div",{style:a.swatch},i.createElement(Ne,{hsl:n,offset:".80",active:Math.abs(n.l-.8)<o&&Math.abs(n.s-.5)<o,onClick:r,first:!0})),i.createElement("div",{style:a.swatch},i.createElement(Ne,{hsl:n,offset:".65",active:Math.abs(n.l-.65)<o&&Math.abs(n.s-.5)<o,onClick:r})),i.createElement("div",{style:a.swatch},i.createElement(Ne,{hsl:n,offset:".50",active:Math.abs(n.l-.5)<o&&Math.abs(n.s-.5)<o,onClick:r})),i.createElement("div",{style:a.swatch},i.createElement(Ne,{hsl:n,offset:".35",active:Math.abs(n.l-.35)<o&&Math.abs(n.s-.5)<o,onClick:r})),i.createElement("div",{style:a.swatch},i.createElement(Ne,{hsl:n,offset:".20",active:Math.abs(n.l-.2)<o&&Math.abs(n.s-.5)<o,onClick:r,last:!0})),i.createElement("div",{style:a.clear}))},M0=H0,L0=function(){var e=(0,x.ZP)({default:{picker:{width:"14px",height:"14px",borderRadius:"6px",transform:"translate(-7px, -1px)",backgroundColor:"rgb(248, 248, 248)",boxShadow:"0 1px 4px 0 rgba(0, 0, 0, 0.37)"}}});return i.createElement("div",{style:e.picker})},N0=L0,Bt=function(e){var r=e.hsl,n=e.onChange,a=e.pointer,o=e.styles,l=o===void 0?{}:o,s=e.className,p=s===void 0?"":s,c=(0,x.ZP)(R({default:{hue:{height:"12px",position:"relative"},Hue:{radius:"2px"}}},l));return i.createElement("div",{style:c.wrap||{},className:"slider-picker "+p},i.createElement("div",{style:c.hue},i.createElement(be,{style:c.Hue,hsl:r,pointer:a,onChange:n})),i.createElement("div",{style:c.swatches},i.createElement(M0,{hsl:r,onClick:n})))};Bt.propTypes={styles:g().object},Bt.defaultProps={pointer:N0,styles:{}};var ih=k(Bt),I0=T(70597),j0=function(e){var r=e.color,n=e.onClick,a=n===void 0?function(){}:n,o=e.onSwatchHover,l=e.first,s=e.last,p=e.active,c=(0,x.ZP)({default:{color:{width:"40px",height:"24px",cursor:"pointer",background:r,marginBottom:"1px"},check:{color:vt(r),marginLeft:"8px",display:"none"}},first:{color:{overflow:"hidden",borderRadius:"2px 2px 0 0"}},last:{color:{overflow:"hidden",borderRadius:"0 0 2px 2px"}},active:{check:{display:"block"}},"color-#FFFFFF":{color:{boxShadow:"inset 0 0 0 1px #ddd"},check:{color:"#333"}},transparent:{check:{color:"#333"}}},{first:l,last:s,active:p,"color-#FFFFFF":r==="#FFFFFF",transparent:r==="transparent"});return i.createElement(q,{color:r,style:c.color,onClick:a,onHover:o,focusStyle:{boxShadow:"0 0 4px "+r}},i.createElement("div",{style:c.check},i.createElement(I0.Z,null)))},G0=j0,z0=function(e){var r=e.onClick,n=e.onSwatchHover,a=e.group,o=e.active,l=(0,x.ZP)({default:{group:{paddingBottom:"10px",width:"40px",float:"left",marginRight:"10px"}}});return i.createElement("div",{style:l.group},J(a,function(s,p){return i.createElement(G0,{key:s,color:s,active:s.toLowerCase()===o,first:p===0,last:p===a.length-1,onClick:r,onSwatchHover:n})}))},Z0=z0,Dt=function(e){var r=e.width,n=e.height,a=e.onChange,o=e.onSwatchHover,l=e.colors,s=e.hex,p=e.styles,c=p===void 0?{}:p,h=e.className,d=h===void 0?"":h,u=(0,x.ZP)(R({default:{picker:{width:r,height:n},overflow:{height:n,overflowY:"scroll"},body:{padding:"16px 0 6px 16px"},clear:{clear:"both"}}},c)),f=function(b,y){return a({hex:b,source:"hex"},y)};return i.createElement("div",{style:u.picker,className:"swatches-picker "+d},i.createElement(dt,null,i.createElement("div",{style:u.overflow},i.createElement("div",{style:u.body},J(l,function(v){return i.createElement(Z0,{key:v.toString(),group:v,active:s,onClick:f,onSwatchHover:o})}),i.createElement("div",{style:u.clear})))))};Dt.propTypes={width:g().oneOfType([g().string,g().number]),height:g().oneOfType([g().string,g().number]),colors:g().arrayOf(g().arrayOf(g().string)),styles:g().object},Dt.defaultProps={width:320,height:240,colors:[[Q[900],Q[700],Q[500],Q[300],Q[100]],[ee[900],ee[700],ee[500],ee[300],ee[100]],[te[900],te[700],te[500],te[300],te[100]],[re[900],re[700],re[500],re[300],re[100]],[ne[900],ne[700],ne[500],ne[300],ne[100]],[ae[900],ae[700],ae[500],ae[300],ae[100]],[ie[900],ie[700],ie[500],ie[300],ie[100]],[oe[900],oe[700],oe[500],oe[300],oe[100]],[le[900],le[700],le[500],le[300],le[100]],["#194D33",Ee[700],Ee[500],Ee[300],Ee[100]],[se[900],se[700],se[500],se[300],se[100]],[pe[900],pe[700],pe[500],pe[300],pe[100]],[ce[900],ce[700],ce[500],ce[300],ce[100]],[he[900],he[700],he[500],he[300],he[100]],[ue[900],ue[700],ue[500],ue[300],ue[100]],[de[900],de[700],de[500],de[300],de[100]],[fe[900],fe[700],fe[500],fe[300],fe[100]],[ge[900],ge[700],ge[500],ge[300],ge[100]],["#000000","#525252","#969696","#D9D9D9","#FFFFFF"]],styles:{}};var oh=k(Dt),Ht=function(e){var r=e.onChange,n=e.onSwatchHover,a=e.hex,o=e.colors,l=e.width,s=e.triangle,p=e.styles,c=p===void 0?{}:p,h=e.className,d=h===void 0?"":h,u=(0,x.ZP)(R({default:{card:{width:l,background:"#fff",border:"0 solid rgba(0,0,0,0.25)",boxShadow:"0 1px 4px rgba(0,0,0,0.25)",borderRadius:"4px",position:"relative"},body:{padding:"15px 9px 9px 15px"},label:{fontSize:"18px",color:"#fff"},triangle:{width:"0px",height:"0px",borderStyle:"solid",borderWidth:"0 9px 10px 9px",borderColor:"transparent transparent #fff transparent",position:"absolute"},triangleShadow:{width:"0px",height:"0px",borderStyle:"solid",borderWidth:"0 9px 10px 9px",borderColor:"transparent transparent rgba(0,0,0,.1) transparent",position:"absolute"},hash:{background:"#F0F0F0",height:"30px",width:"30px",borderRadius:"4px 0 0 4px",float:"left",color:"#98A1A4",display:"flex",alignItems:"center",justifyContent:"center"},input:{width:"100px",fontSize:"14px",color:"#666",border:"0px",outline:"none",height:"28px",boxShadow:"inset 0 0 0 1px #F0F0F0",boxSizing:"content-box",borderRadius:"0 4px 4px 0",float:"left",paddingLeft:"8px"},swatch:{width:"30px",height:"30px",float:"left",borderRadius:"4px",margin:"0 6px 6px 0"},clear:{clear:"both"}},"hide-triangle":{triangle:{display:"none"},triangleShadow:{display:"none"}},"top-left-triangle":{triangle:{top:"-10px",left:"12px"},triangleShadow:{top:"-11px",left:"12px"}},"top-right-triangle":{triangle:{top:"-10px",right:"12px"},triangleShadow:{top:"-11px",right:"12px"}}},c),{"hide-triangle":s==="hide","top-left-triangle":s==="top-left","top-right-triangle":s==="top-right"}),f=function(b,y){G(b)&&r({hex:b,source:"hex"},y)};return i.createElement("div",{style:u.card,className:"twitter-picker "+d},i.createElement("div",{style:u.triangleShadow}),i.createElement("div",{style:u.triangle}),i.createElement("div",{style:u.body},J(o,function(v,b){return i.createElement(q,{key:b,color:v,hex:v,style:u.swatch,onClick:f,onHover:n,focusStyle:{boxShadow:"0 0 4px "+v}})}),i.createElement("div",{style:u.hash},"#"),i.createElement(w,{label:null,style:{input:u.input},value:a.replace("#",""),onChange:f}),i.createElement("div",{style:u.clear})))};Ht.propTypes={width:g().oneOfType([g().string,g().number]),triangle:g().oneOf(["hide","top-left","top-right"]),colors:g().arrayOf(g().string),styles:g().object},Ht.defaultProps={width:276,colors:["#FF6900","#FCB900","#7BDCB5","#00D084","#8ED1FC","#0693E3","#ABB8C3","#EB144C","#F78DA7","#9900EF"],triangle:"top-left",styles:{}};var lh=k(Ht),Mt=function(e){var r=(0,x.ZP)({default:{picker:{width:"20px",height:"20px",borderRadius:"22px",border:"2px #fff solid",transform:"translate(-12px, -13px)",background:"hsl("+Math.round(e.hsl.h)+", "+Math.round(e.hsl.s*100)+"%, "+Math.round(e.hsl.l*100)+"%)"}}});return i.createElement("div",{style:r.picker})};Mt.propTypes={hsl:g().shape({h:g().number,s:g().number,l:g().number,a:g().number})},Mt.defaultProps={hsl:{a:1,h:249.94,l:.2,s:.5}};var U0=Mt,Lt=function(e){var r=(0,x.ZP)({default:{picker:{width:"20px",height:"20px",borderRadius:"22px",transform:"translate(-10px, -7px)",background:"hsl("+Math.round(e.hsl.h)+", 100%, 50%)",border:"2px white solid"}}});return i.createElement("div",{style:r.picker})};Lt.propTypes={hsl:g().shape({h:g().number,s:g().number,l:g().number,a:g().number})},Lt.defaultProps={hsl:{a:1,h:249.94,l:.2,s:.5}};var $0=Lt,W0=function(e){var r=e.onChange,n=e.rgb,a=e.hsl,o=e.hex,l=e.hsv,s=function(f,v){if(f.hex)G(f.hex)&&r({hex:f.hex,source:"hex"},v);else if(f.rgb){var b=f.rgb.split(",");bt(f.rgb,"rgb")&&r({r:b[0],g:b[1],b:b[2],a:1,source:"rgb"},v)}else if(f.hsv){var y=f.hsv.split(",");bt(f.hsv,"hsv")&&(y[2]=y[2].replace("%",""),y[1]=y[1].replace("%",""),y[0]=y[0].replace("\xB0",""),y[1]==1?y[1]=.01:y[2]==1&&(y[2]=.01),r({h:Number(y[0]),s:Number(y[1]),v:Number(y[2]),source:"hsv"},v))}else if(f.hsl){var _=f.hsl.split(",");bt(f.hsl,"hsl")&&(_[2]=_[2].replace("%",""),_[1]=_[1].replace("%",""),_[0]=_[0].replace("\xB0",""),d[1]==1?d[1]=.01:d[2]==1&&(d[2]=.01),r({h:Number(_[0]),s:Number(_[1]),v:Number(_[2]),source:"hsl"},v))}},p=(0,x.ZP)({default:{wrap:{display:"flex",height:"100px",marginTop:"4px"},fields:{width:"100%"},column:{paddingTop:"10px",display:"flex",justifyContent:"space-between"},double:{padding:"0px 4.4px",boxSizing:"border-box"},input:{width:"100%",height:"38px",boxSizing:"border-box",padding:"4px 10% 3px",textAlign:"center",border:"1px solid #dadce0",fontSize:"11px",textTransform:"lowercase",borderRadius:"5px",outline:"none",fontFamily:"Roboto,Arial,sans-serif"},input2:{height:"38px",width:"100%",border:"1px solid #dadce0",boxSizing:"border-box",fontSize:"11px",textTransform:"lowercase",borderRadius:"5px",outline:"none",paddingLeft:"10px",fontFamily:"Roboto,Arial,sans-serif"},label:{textAlign:"center",fontSize:"12px",background:"#fff",position:"absolute",textTransform:"uppercase",color:"#3c4043",width:"35px",top:"-6px",left:"0",right:"0",marginLeft:"auto",marginRight:"auto",fontFamily:"Roboto,Arial,sans-serif"},label2:{left:"10px",textAlign:"center",fontSize:"12px",background:"#fff",position:"absolute",textTransform:"uppercase",color:"#3c4043",width:"32px",top:"-6px",fontFamily:"Roboto,Arial,sans-serif"},single:{flexGrow:"1",margin:"0px 4.4px"}}}),c=n.r+", "+n.g+", "+n.b,h=Math.round(a.h)+"\xB0, "+Math.round(a.s*100)+"%, "+Math.round(a.l*100)+"%",d=Math.round(l.h)+"\xB0, "+Math.round(l.s*100)+"%, "+Math.round(l.v*100)+"%";return i.createElement("div",{style:p.wrap,className:"flexbox-fix"},i.createElement("div",{style:p.fields},i.createElement("div",{style:p.double},i.createElement(w,{style:{input:p.input,label:p.label},label:"hex",value:o,onChange:s})),i.createElement("div",{style:p.column},i.createElement("div",{style:p.single},i.createElement(w,{style:{input:p.input2,label:p.label2},label:"rgb",value:c,onChange:s})),i.createElement("div",{style:p.single},i.createElement(w,{style:{input:p.input2,label:p.label2},label:"hsv",value:d,onChange:s})),i.createElement("div",{style:p.single},i.createElement(w,{style:{input:p.input2,label:p.label2},label:"hsl",value:h,onChange:s})))))},K0=W0,Nt=function(e){var r=e.width,n=e.onChange,a=e.rgb,o=e.hsl,l=e.hsv,s=e.hex,p=e.header,c=e.styles,h=c===void 0?{}:c,d=e.className,u=d===void 0?"":d,f=(0,x.ZP)(R({default:{picker:{width:r,background:"#fff",border:"1px solid #dfe1e5",boxSizing:"initial",display:"flex",flexWrap:"wrap",borderRadius:"8px 8px 0px 0px"},head:{height:"57px",width:"100%",paddingTop:"16px",paddingBottom:"16px",paddingLeft:"16px",fontSize:"20px",boxSizing:"border-box",fontFamily:"Roboto-Regular,HelveticaNeue,Arial,sans-serif"},saturation:{width:"70%",padding:"0px",position:"relative",overflow:"hidden"},swatch:{width:"30%",height:"228px",padding:"0px",background:"rgba("+a.r+", "+a.g+", "+a.b+", 1)",position:"relative",overflow:"hidden"},body:{margin:"auto",width:"95%"},controls:{display:"flex",boxSizing:"border-box",height:"52px",paddingTop:"22px"},color:{width:"32px"},hue:{height:"8px",position:"relative",margin:"0px 16px 0px 16px",width:"100%"},Hue:{radius:"2px"}}},h));return i.createElement("div",{style:f.picker,className:"google-picker "+u},i.createElement("div",{style:f.head},p),i.createElement("div",{style:f.swatch}),i.createElement("div",{style:f.saturation},i.createElement(qe,{hsl:o,hsv:l,pointer:U0,onChange:n})),i.createElement("div",{style:f.body},i.createElement("div",{style:f.controls,className:"flexbox-fix"},i.createElement("div",{style:f.hue},i.createElement(be,{style:f.Hue,hsl:o,radius:"4px",pointer:$0,onChange:n}))),i.createElement(K0,{rgb:a,hsl:o,hex:s,hsv:l,onChange:n})))};Nt.propTypes={width:g().oneOfType([g().string,g().number]),styles:g().object,header:g().string},Nt.defaultProps={width:652,styles:{},header:"Color picker"};var sh=k(Nt)}}]);
|