static.kuangkie.hydrogen.bundle.004974185ac96c7cc5b9.js Maven / Gradle / Ivy
The newest version!
(self.webpackChunkhydrogen_react=self.webpackChunkhydrogen_react||[]).push([[7863],{52322:function(e,t,r){"use strict";var n,o=Object.assign||function(e){for(var t=1;t=0||Object.prototype.hasOwnProperty.call(e,n)&&(r[n]=e[n]);return r}(e,["fill","width","height","style"]);return a.default.createElement("svg",o({viewBox:"0 0 24 24",style:o({fill:r,width:i,height:s},c)},p),a.default.createElement("path",{d:"M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z"}))}},89331:function(e,t,r){"use strict";var n,o=Object.assign||function(e){for(var t=1;t=0||Object.prototype.hasOwnProperty.call(e,n)&&(r[n]=e[n]);return r}(e,["fill","width","height","style"]);return a.default.createElement("svg",o({viewBox:"0 0 24 24",style:o({fill:r,width:i,height:s},c)},p),a.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"}))}},27863:function(e,t,r){"use strict";r.r(t),r.d(t,{default:function(){return Fi}});var n=r(35466),o=r(35143),a=r(65223),i=r(2855),l=r(80056),s=r(81826),u=r(20683),c=r(16945),p={},f=function(e,t,r,n){var o=e+"-"+t+"-"+r+(n?"-server":"");if(p[o])return p[o];var a=function(e,t,r,n){if("undefined"==typeof document&&!n)return null;var o=n?new n:document.createElement("canvas");o.width=2*r,o.height=2*r;var a=o.getContext("2d");return a?(a.fillStyle=e,a.fillRect(0,0,o.width,o.height),a.fillStyle=t,a.fillRect(0,0,r,r),a.translate(r,r),a.fillRect(0,0,r,r),o.toDataURL()):null}(e,t,r,n);return p[o]=a,a},h=Object.assign||function(e){for(var t=1;ti?1:Math.round(100*c/i)/100,t.a!==p)return{h:t.h,s:t.s,l:t.l,a:p,source:"rgb"}}else{var f;if(n!==(f=u<0?0:u>a?1:Math.round(100*u/a)/100))return{h:t.h,s:t.s,l:t.l,a:f,source:"rgb"}}return null}(e,n.props.hsl,n.props.direction,n.props.a,n.container);t&&"function"==typeof n.props.onChange&&n.props.onChange(t,e)},n.handleMouseDown=function(e){n.handleChange(e),window.addEventListener("mousemove",n.handleChange),window.addEventListener("mouseup",n.handleMouseUp)},n.handleMouseUp=function(){n.unbindEventListeners()},n.unbindEventListeners=function(){window.removeEventListener("mousemove",n.handleChange),window.removeEventListener("mouseup",n.handleMouseUp)},x(n,r)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),g(t,[{key:"componentWillUnmount",value:function(){this.unbindEventListeners()}},{key:"render",value:function(){var e=this,t=this.props.rgb,r=(0,c.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("+t.r+","+t.g+","+t.b+", 0) 0%,\n rgba("+t.r+","+t.g+","+t.b+", 1) 100%)",boxShadow:this.props.shadow,borderRadius:this.props.radius},container:{position:"relative",height:"100%",margin:"0 3px"},pointer:{position:"absolute",left:100*t.a+"%"},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("+t.r+","+t.g+","+t.b+", 0) 0%,\n rgba("+t.r+","+t.g+","+t.b+", 1) 100%)"},pointer:{left:0,top:100*t.a+"%"}},overwrite:v({},this.props.style)},{vertical:"vertical"===this.props.direction,overwrite:!0});return n.createElement("div",{style:r.alpha},n.createElement("div",{style:r.checkboard},n.createElement(b,{renderers:this.props.renderers})),n.createElement("div",{style:r.gradient}),n.createElement("div",{style:r.container,ref:function(t){return e.container=t},onMouseDown:this.handleMouseDown,onTouchMove:this.handleChange,onTouchStart:this.handleChange},n.createElement("div",{style:r.pointer},this.props.pointer?n.createElement(this.props.pointer,this.props):n.createElement("div",{style:r.slider}))))}}]),t}(n.PureComponent||n.Component),m=y,w=function(){function e(e,t){for(var r=0;r-1)){var o=r.getArrowOffset(),a=38===e.keyCode?n+o:n-o;r.setUpdatedValue(a,e)}},r.handleDrag=function(e){if(r.props.dragLabel){var t=Math.round(r.props.value+e.movementX);t>=0&&t<=r.props.dragMax&&r.props.onChange&&r.props.onChange(r.getValueObjectWithLabel(t),e)}},r.handleMouseDown=function(e){r.props.dragLabel&&(e.preventDefault(),r.handleDrag(e),window.addEventListener("mousemove",r.handleDrag),window.addEventListener("mouseup",r.handleMouseUp))},r.handleMouseUp=function(){r.unbindEventListeners()},r.unbindEventListeners=function(){window.removeEventListener("mousemove",r.handleDrag),window.removeEventListener("mouseup",r.handleMouseUp)},r.state={value:String(e.value).toUpperCase(),blurValue:String(e.value).toUpperCase()},r.inputId="rc-editable-input-"+E++,r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),w(t,[{key:"componentDidUpdate",value:function(e,t){this.props.value===this.state.value||e.value===this.props.value&&t.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(e){return function(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}({},this.props.label,e)}},{key:"getArrowOffset",value:function(){return this.props.arrowOffset||1}},{key:"setUpdatedValue",value:function(e,t){var r=this.props.label?this.getValueObjectWithLabel(e):e;this.props.onChange&&this.props.onChange(r,t),this.setState({value:e})}},{key:"render",value:function(){var e=this,t=(0,c.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 n.createElement("div",{style:t.wrap},n.createElement("input",{id:this.inputId,style:t.input,ref:function(t){return e.input=t},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?n.createElement("label",{htmlFor:this.inputId,style:t.label,onMouseDown:this.handleMouseDown},this.props.label):null)}}]),t}(n.PureComponent||n.Component),O=function(){function e(e,t){for(var r=0;ra?0:360*(-100*u/a+100)/100,r.h!==c)return{h:c,s:r.s,l:r.l,a:r.a,source:"hsl"}}else{var p;if(p=s<0?0:s>o?359:100*s/o*360/100,r.h!==p)return{h:p,s:r.s,l:r.l,a:r.a,source:"hsl"}}return null}(e,n.props.direction,n.props.hsl,n.container);t&&"function"==typeof n.props.onChange&&n.props.onChange(t,e)},n.handleMouseDown=function(e){n.handleChange(e),window.addEventListener("mousemove",n.handleChange),window.addEventListener("mouseup",n.handleMouseUp)},n.handleMouseUp=function(){n.unbindEventListeners()},C(n,r)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),O(t,[{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 e=this,t=this.props.direction,r=void 0===t?"horizontal":t,o=(0,c.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:100*this.props.hsl.h/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:-100*this.props.hsl.h/360+100+"%"}}},{vertical:"vertical"===r});return n.createElement("div",{style:o.hue},n.createElement("div",{className:"hue-"+r,style:o.container,ref:function(t){return e.container=t},onMouseDown:this.handleMouseDown,onTouchMove:this.handleChange,onTouchStart:this.handleChange},n.createElement("style",null,"\n .hue-horizontal {\n background: linear-gradient(to right, #f00 0%, #ff0 17%, #0f0\n 33%, #0ff 50%, #00f 67%, #f0f 83%, #f00 100%);\n background: -webkit-linear-gradient(to right, #f00 0%, #ff0\n 17%, #0f0 33%, #0ff 50%, #00f 67%, #f0f 83%, #f00 100%);\n }\n\n .hue-vertical {\n background: linear-gradient(to top, #f00 0%, #ff0 17%, #0f0 33%,\n #0ff 50%, #00f 67%, #f0f 83%, #f00 100%);\n background: -webkit-linear-gradient(to top, #f00 0%, #ff0 17%,\n #0f0 33%, #0ff 50%, #00f 67%, #f0f 83%, #f00 100%);\n }\n "),n.createElement("div",{style:o.pointer},this.props.pointer?n.createElement(this.props.pointer,this.props):n.createElement("div",{style:o.slider}))))}}]),t}(n.PureComponent||n.Component),k=S,A=r(3074),M=r.n(A),P=function(e,t){return e===t||e!=e&&t!=t},R=function(e,t){for(var r=e.length;r--;)if(P(e[r][0],t))return r;return-1},F=Array.prototype.splice;function B(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t-1},B.prototype.set=function(e,t){var r=this.__data__,n=R(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this};var z,T=B,H="object"==typeof global&&global&&global.Object===Object&&global,D="object"==typeof self&&self&&self.Object===Object&&self,L=H||D||Function("return this")(),N=L.Symbol,Z=Object.prototype,U=Z.hasOwnProperty,G=Z.toString,I=N?N.toStringTag:void 0,W=Object.prototype.toString,X=N?N.toStringTag:void 0,V=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":X&&X in Object(e)?function(e){var t=U.call(e,I),r=e[I];try{e[I]=void 0;var n=!0}catch(e){}var o=G.call(e);return n&&(t?e[I]=r:delete e[I]),o}(e):function(e){return W.call(e)}(e)},$=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)},q=function(e){if(!$(e))return!1;var t=V(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t},Y=L["__core-js_shared__"],K=(z=/[^.]+$/.exec(Y&&Y.keys&&Y.keys.IE_PROTO||""))?"Symbol(src)_1."+z:"",J=Function.prototype.toString,Q=function(e){if(null!=e){try{return J.call(e)}catch(e){}try{return e+""}catch(e){}}return""},ee=/^\[object .+?Constructor\]$/,te=Function.prototype,re=Object.prototype,ne=te.toString,oe=re.hasOwnProperty,ae=RegExp("^"+ne.call(oe).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),ie=function(e){return!(!$(e)||(t=e,K&&K in t))&&(q(e)?ae:ee).test(Q(e));var t},le=function(e,t){var r=function(e,t){return null==e?void 0:e[t]}(e,t);return ie(r)?r:void 0},se=le(L,"Map"),ue=le(Object,"create"),ce=Object.prototype.hasOwnProperty,pe=Object.prototype.hasOwnProperty;function fe(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t-1&&e%1==0&&e<=9007199254740991},Ie=function(e){return null!=e&&Ge(e.length)&&!q(e)},We="object"==typeof exports&&exports&&!exports.nodeType&&exports,Xe=We&&"object"==typeof module&&module&&!module.nodeType&&module,Ve=Xe&&Xe.exports===We?L.Buffer:void 0,$e=(Ve?Ve.isBuffer:void 0)||function(){return!1},qe=Function.prototype,Ye=Object.prototype,Ke=qe.toString,Je=Ye.hasOwnProperty,Qe=Ke.call(Object),et={};et["[object Float32Array]"]=et["[object Float64Array]"]=et["[object Int8Array]"]=et["[object Int16Array]"]=et["[object Int32Array]"]=et["[object Uint8Array]"]=et["[object Uint8ClampedArray]"]=et["[object Uint16Array]"]=et["[object Uint32Array]"]=!0,et["[object Arguments]"]=et["[object Array]"]=et["[object ArrayBuffer]"]=et["[object Boolean]"]=et["[object DataView]"]=et["[object Date]"]=et["[object Error]"]=et["[object Function]"]=et["[object Map]"]=et["[object Number]"]=et["[object Object]"]=et["[object RegExp]"]=et["[object Set]"]=et["[object String]"]=et["[object WeakMap]"]=!1;var tt,rt,nt="object"==typeof exports&&exports&&!exports.nodeType&&exports,ot=nt&&"object"==typeof module&&module&&!module.nodeType&&module,at=ot&&ot.exports===nt&&H.process,it=function(){try{return ot&&ot.require&&ot.require("util").types||at&&at.binding&&at.binding("util")}catch(e){}}(),lt=it&&it.isTypedArray,st=lt?(tt=lt,function(e){return tt(e)}):function(e){return ze(e)&&Ge(e.length)&&!!et[V(e)]},ut=function(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]},ct=Object.prototype.hasOwnProperty,pt=function(e,t,r){var n=e[t];ct.call(e,t)&&P(n,r)&&(void 0!==r||t in e)||me(e,t,r)},ft=/^(?:0|[1-9]\d*)$/,ht=function(e,t){var r=typeof e;return!!(t=null==t?9007199254740991:t)&&("number"==r||"symbol"!=r&&ft.test(e))&&e>-1&&e%1==0&&e0){if(++t>=800)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}(jt),St=function(e,t){return Ct(function(e,t,r){return t=Et(void 0===t?e.length-1:t,0),function(){for(var n=arguments,o=-1,a=Et(n.length-t,0),i=Array(a);++o1?t[n-1]:void 0,a=n>2?t[2]:void 0;for(o=rt.length>3&&"function"==typeof o?(n--,o):void 0,a&&function(e,t,r){if(!$(r))return!1;var n=typeof t;return!!("number"==n?Ie(r)&&ht(t,r.length):"string"==n&&t in r)&&P(r[t],e)}(t[0],t[1],a)&&(o=n<3?void 0:o,n=1),e=Object(e);++r=t||r<0||p&&e-u>=a}function b(){var e=Pt();if(d(e))return v(e);l=setTimeout(b,function(e){var r=t-(e-s);return p?Ut(r,a-(e-u)):r}(e))}function v(e){return l=void 0,f&&n?h(e):(n=o=void 0,i)}function g(){var e=Pt(),r=d(e);if(n=arguments,o=this,s=e,r){if(void 0===l)return function(e){return u=e,l=setTimeout(b,t),c?h(e):i}(s);if(p)return clearTimeout(l),l=setTimeout(b,t),h(s)}return void 0===l&&(l=setTimeout(b,t)),i}return t=Nt(t)||0,$(r)&&(c=!!r.leading,a=(p="maxWait"in r)?Zt(Nt(r.maxWait)||0,t):a,f="trailing"in r?!!r.trailing:f),g.cancel=function(){void 0!==l&&clearTimeout(l),u=0,n=s=o=l=void 0},g.flush=function(){return void 0===l?i:v(Pt())},g},It=function(){function e(e,t){for(var r=0;ro&&(s=o),u<0?u=0:u>a&&(u=a);var c=s/o,p=1-u/a;return{h:t.h,s:c,v:p,a:t.a,source:"hsv"}}(e,r.props.hsl,r.container),e)},r.handleMouseDown=function(e){r.handleChange(e);var t=r.getContainerRenderWindow();t.addEventListener("mousemove",r.handleChange),t.addEventListener("mouseup",r.handleMouseUp)},r.handleMouseUp=function(){r.unbindEventListeners()},r.throttle=function(e,t,r){var n=!0,o=!0;if("function"!=typeof e)throw new TypeError("Expected a function");return $(r)&&(n="leading"in r?!!r.leading:n,o="trailing"in r?!!r.trailing:o),Gt(e,t,{leading:n,maxWait:t,trailing:o})}((function(e,t,r){e(t,r)}),50),r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),It(t,[{key:"componentWillUnmount",value:function(){this.throttle.cancel(),this.unbindEventListeners()}},{key:"getContainerRenderWindow",value:function(){for(var e=this.container,t=window;!t.document.contains(e)&&t.parent!==t;)t=t.parent;return t}},{key:"unbindEventListeners",value:function(){var e=this.getContainerRenderWindow();e.removeEventListener("mousemove",this.handleChange),e.removeEventListener("mouseup",this.handleMouseUp)}},{key:"render",value:function(){var e=this,t=this.props.style||{},r=t.color,o=t.white,a=t.black,i=t.pointer,l=t.circle,s=(0,c.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:-100*this.props.hsv.v+100+"%",left:100*this.props.hsv.s+"%",cursor:"default"},circle:{width:"4px",height:"4px",boxShadow:"0 0 0 1.5px #fff, inset 0 0 1px 1px rgba(0,0,0,.3),\n 0 0 1px 2px rgba(0,0,0,.4)",borderRadius:"50%",cursor:"hand",transform:"translate(-2px, -2px)"}},custom:{color:r,white:o,black:a,pointer:i,circle:l}},{custom:!!this.props.style});return n.createElement("div",{style:s.color,ref:function(t){return e.container=t},onMouseDown:this.handleMouseDown,onTouchMove:this.handleChange,onTouchStart:this.handleChange},n.createElement("style",null,"\n .saturation-white {\n background: -webkit-linear-gradient(to right, #fff, rgba(255,255,255,0));\n background: linear-gradient(to right, #fff, rgba(255,255,255,0));\n }\n .saturation-black {\n background: -webkit-linear-gradient(to top, #000, rgba(0,0,0,0));\n background: linear-gradient(to top, #000, rgba(0,0,0,0));\n }\n "),n.createElement("div",{style:s.white,className:"saturation-white"},n.createElement("div",{style:s.black,className:"saturation-black"}),n.createElement("div",{style:s.pointer},this.props.pointer?n.createElement(this.props.pointer,this.props):n.createElement("div",{style:s.circle}))))}}]),t}(n.PureComponent||n.Component),Xt=Wt,Vt=function(e,t){for(var r=-1,n=null==e?0:e.length;++r1&&(r-=1),r<1/6?e+6*(t-e)*r:r<.5?t:r<2/3?e+(t-e)*(2/3-r)*6:e}if(e=_r(e,360),t=_r(t,100),r=_r(r,100),0===t)n=o=a=r;else{var l=r<.5?r*(1+t):r+t-r*t,s=2*r-l;n=i(s,l,e+1/3),o=i(s,l,e),a=i(s,l,e-1/3)}return{r:255*n,g:255*o,b:255*a}}(e.h,i,s),u=!0,c="hsl"),e.hasOwnProperty("a")&&(a=e.a)),a=wr(a),{ok:u,format:e.format||c,r:Math.min(255,Math.max(o.r,0)),g:Math.min(255,Math.max(o.g,0)),b:Math.min(255,Math.max(o.b,0)),a:a}}(e);this._originalInput=e,this._r=r.r,this._g=r.g,this._b=r.b,this._a=r.a,this._roundA=Math.round(100*this._a)/100,this._format=t.format||r.format,this._gradientType=t.gradientType,this._r<1&&(this._r=Math.round(this._r)),this._g<1&&(this._g=Math.round(this._g)),this._b<1&&(this._b=Math.round(this._b)),this._ok=r.ok}function nr(e,t,r){e=_r(e,255),t=_r(t,255),r=_r(r,255);var n,o,a=Math.max(e,t,r),i=Math.min(e,t,r),l=(a+i)/2;if(a==i)n=o=0;else{var s=a-i;switch(o=l>.5?s/(2-a-i):s/(a+i),a){case e:n=(t-r)/s+(t>1)+720)%360;--t;)n.h=(n.h+o)%360,a.push(rr(n));return a}function xr(e,t){t=t||6;for(var r=rr(e).toHsv(),n=r.h,o=r.s,a=r.v,i=[],l=1/t;t--;)i.push(rr({h:n,s:o,v:a})),a=(a+l)%1;return i}rr.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var e=this.toRgb();return(299*e.r+587*e.g+114*e.b)/1e3},getLuminance:function(){var e,t,r,n=this.toRgb();return e=n.r/255,t=n.g/255,r=n.b/255,.2126*(e<=.03928?e/12.92:Math.pow((e+.055)/1.055,2.4))+.7152*(t<=.03928?t/12.92:Math.pow((t+.055)/1.055,2.4))+.0722*(r<=.03928?r/12.92:Math.pow((r+.055)/1.055,2.4))},setAlpha:function(e){return this._a=wr(e),this._roundA=Math.round(100*this._a)/100,this},toHsv:function(){var e=or(this._r,this._g,this._b);return{h:360*e.h,s:e.s,v:e.v,a:this._a}},toHsvString:function(){var e=or(this._r,this._g,this._b),t=Math.round(360*e.h),r=Math.round(100*e.s),n=Math.round(100*e.v);return 1==this._a?"hsv("+t+", "+r+"%, "+n+"%)":"hsva("+t+", "+r+"%, "+n+"%, "+this._roundA+")"},toHsl:function(){var e=nr(this._r,this._g,this._b);return{h:360*e.h,s:e.s,l:e.l,a:this._a}},toHslString:function(){var e=nr(this._r,this._g,this._b),t=Math.round(360*e.h),r=Math.round(100*e.s),n=Math.round(100*e.l);return 1==this._a?"hsl("+t+", "+r+"%, "+n+"%)":"hsla("+t+", "+r+"%, "+n+"%, "+this._roundA+")"},toHex:function(e){return ar(this._r,this._g,this._b,e)},toHexString:function(e){return"#"+this.toHex(e)},toHex8:function(e){return function(e,t,r,n,o){var a=[Or(Math.round(e).toString(16)),Or(Math.round(t).toString(16)),Or(Math.round(r).toString(16)),Or(Sr(n))];return o&&a[0].charAt(0)==a[0].charAt(1)&&a[1].charAt(0)==a[1].charAt(1)&&a[2].charAt(0)==a[2].charAt(1)&&a[3].charAt(0)==a[3].charAt(1)?a[0].charAt(0)+a[1].charAt(0)+a[2].charAt(0)+a[3].charAt(0):a.join("")}(this._r,this._g,this._b,this._a,e)},toHex8String:function(e){return"#"+this.toHex8(e)},toRgb:function(){return{r:Math.round(this._r),g:Math.round(this._g),b:Math.round(this._b),a:this._a}},toRgbString:function(){return 1==this._a?"rgb("+Math.round(this._r)+", "+Math.round(this._g)+", "+Math.round(this._b)+")":"rgba("+Math.round(this._r)+", "+Math.round(this._g)+", "+Math.round(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:Math.round(100*_r(this._r,255))+"%",g:Math.round(100*_r(this._g,255))+"%",b:Math.round(100*_r(this._b,255))+"%",a:this._a}},toPercentageRgbString:function(){return 1==this._a?"rgb("+Math.round(100*_r(this._r,255))+"%, "+Math.round(100*_r(this._g,255))+"%, "+Math.round(100*_r(this._b,255))+"%)":"rgba("+Math.round(100*_r(this._r,255))+"%, "+Math.round(100*_r(this._g,255))+"%, "+Math.round(100*_r(this._b,255))+"%, "+this._roundA+")"},toName:function(){return 0===this._a?"transparent":!(this._a<1)&&(mr[ar(this._r,this._g,this._b,!0)]||!1)},toFilter:function(e){var t="#"+ir(this._r,this._g,this._b,this._a),r=t,n=this._gradientType?"GradientType = 1, ":"";if(e){var o=rr(e);r="#"+ir(o._r,o._g,o._b,o._a)}return"progid:DXImageTransform.Microsoft.gradient("+n+"startColorstr="+t+",endColorstr="+r+")"},toString:function(e){var t=!!e;e=e||this._format;var r=!1,n=this._a<1&&this._a>=0;return t||!n||"hex"!==e&&"hex6"!==e&&"hex3"!==e&&"hex4"!==e&&"hex8"!==e&&"name"!==e?("rgb"===e&&(r=this.toRgbString()),"prgb"===e&&(r=this.toPercentageRgbString()),"hex"!==e&&"hex6"!==e||(r=this.toHexString()),"hex3"===e&&(r=this.toHexString(!0)),"hex4"===e&&(r=this.toHex8String(!0)),"hex8"===e&&(r=this.toHex8String()),"name"===e&&(r=this.toName()),"hsl"===e&&(r=this.toHslString()),"hsv"===e&&(r=this.toHsvString()),r||this.toHexString()):"name"===e&&0===this._a?this.toName():this.toRgbString()},clone:function(){return rr(this.toString())},_applyModification:function(e,t){var r=e.apply(null,[this].concat([].slice.call(t)));return this._r=r._r,this._g=r._g,this._b=r._b,this.setAlpha(r._a),this},lighten:function(){return this._applyModification(cr,arguments)},brighten:function(){return this._applyModification(pr,arguments)},darken:function(){return this._applyModification(fr,arguments)},desaturate:function(){return this._applyModification(lr,arguments)},saturate:function(){return this._applyModification(sr,arguments)},greyscale:function(){return this._applyModification(ur,arguments)},spin:function(){return this._applyModification(hr,arguments)},_applyCombination:function(e,t){return e.apply(null,[this].concat([].slice.call(t)))},analogous:function(){return this._applyCombination(gr,arguments)},complement:function(){return this._applyCombination(dr,arguments)},monochromatic:function(){return this._applyCombination(xr,arguments)},splitcomplement:function(){return this._applyCombination(vr,arguments)},triad:function(){return this._applyCombination(br,[3])},tetrad:function(){return this._applyCombination(br,[4])}},rr.fromRatio=function(e,t){if("object"==Qt(e)){var r={};for(var n in e)e.hasOwnProperty(n)&&(r[n]="a"===n?e[n]:Cr(e[n]));e=r}return rr(e,t)},rr.equals=function(e,t){return!(!e||!t)&&rr(e).toRgbString()==rr(t).toRgbString()},rr.random=function(){return rr.fromRatio({r:Math.random(),g:Math.random(),b:Math.random()})},rr.mix=function(e,t,r){r=0===r?0:r||50;var n=rr(e).toRgb(),o=rr(t).toRgb(),a=r/100;return rr({r:(o.r-n.r)*a+n.r,g:(o.g-n.g)*a+n.g,b:(o.b-n.b)*a+n.b,a:(o.a-n.a)*a+n.a})},rr.readability=function(e,t){var r=rr(e),n=rr(t);return(Math.max(r.getLuminance(),n.getLuminance())+.05)/(Math.min(r.getLuminance(),n.getLuminance())+.05)},rr.isReadable=function(e,t,r){var n,o,a,i,l,s=rr.readability(e,t);switch(o=!1,(a=r,"AA"!==(i=((a=a||{level:"AA",size:"small"}).level||"AA").toUpperCase())&&"AAA"!==i&&(i="AA"),"small"!==(l=(a.size||"small").toLowerCase())&&"large"!==l&&(l="small"),n={level:i,size:l}).level+n.size){case"AAsmall":case"AAAlarge":o=s>=4.5;break;case"AAlarge":o=s>=3;break;case"AAAsmall":o=s>=7}return o},rr.mostReadable=function(e,t,r){var n,o,a,i,l=null,s=0;o=(r=r||{}).includeFallbackColors,a=r.level,i=r.size;for(var u=0;us&&(s=n,l=rr(t[u]));return rr.isReadable(e,l,{level:a,size:i})||!o?l:(r.includeFallbackColors=!1,rr.mostReadable(e,["#fff","#000"],r))};var yr=rr.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},mr=rr.hexNames=function(e){var t={};for(var r in e)e.hasOwnProperty(r)&&(t[e[r]]=r);return t}(yr);function wr(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function _r(e,t){(function(e){return"string"==typeof e&&-1!=e.indexOf(".")&&1===parseFloat(e)})(e)&&(e="100%");var r=function(e){return"string"==typeof e&&-1!=e.indexOf("%")}(e);return e=Math.min(t,Math.max(0,parseFloat(e))),r&&(e=parseInt(e*t,10)/100),Math.abs(e-t)<1e-6?1:e%t/parseFloat(t)}function Er(e){return Math.min(1,Math.max(0,e))}function jr(e){return parseInt(e,16)}function Or(e){return 1==e.length?"0"+e:""+e}function Cr(e){return e<=1&&(e=100*e+"%"),e}function Sr(e){return Math.round(255*parseFloat(e)).toString(16)}function kr(e){return jr(e)/255}var Ar,Mr,Pr,Rr=(Mr="[\\s|\\(]+("+(Ar="(?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?)")+")[,|\\s]+("+Ar+")[,|\\s]+("+Ar+")\\s*\\)?",Pr="[\\s|\\(]+("+Ar+")[,|\\s]+("+Ar+")[,|\\s]+("+Ar+")[,|\\s]+("+Ar+")\\s*\\)?",{CSS_UNIT:new RegExp(Ar),rgb:new RegExp("rgb"+Mr),rgba:new RegExp("rgba"+Pr),hsl:new RegExp("hsl"+Mr),hsla:new RegExp("hsla"+Pr),hsv:new RegExp("hsv"+Mr),hsva:new RegExp("hsva"+Pr),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/});function Fr(e){return!!Rr.CSS_UNIT.exec(e)}var Br=function(e){var t=0,r=0;return Jt(["r","g","b","a","h","s","l","v"],(function(n){e[n]&&(t+=1,isNaN(e[n])||(r+=1),"s"===n||"l"===n)&&/^\d+%$/.test(e[n])&&(r+=1)})),t===r&&e},zr=function(e,t){var r=e.hex?rr(e.hex):rr(e),n=r.toHsl(),o=r.toHsv(),a=r.toRgb(),i=r.toHex();return 0===n.s&&(n.h=t||0,o.h=t||0),{hsl:n,hex:"000000"===i&&0===a.a?"transparent":"#"+i,rgb:a,hsv:o,oldHue:e.h||t||n.h,source:e.source}},Tr=function(e){if("transparent"===e)return!0;var t="#"===String(e).charAt(0)?1:0;return e.length!==4+t&&e.length<7+t&&rr(e).isValid()},Hr=function(e){if(!e)return"#fff";var t=zr(e);return"transparent"===t.hex?"rgba(0,0,0,0.4)":(299*t.rgb.r+587*t.rgb.g+114*t.rgb.b)/1e3>=128?"#000":"#fff"},Dr=function(e,t){return rr(t+" ("+e.replace("°","")+")")._ok},Lr=Object.assign||function(e){for(var t=1;t1&&void 0!==arguments[1]?arguments[1]:"span";return function(r){function o(){var e,t,r;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o);for(var n=arguments.length,a=Array(n),i=0;il))return!1;var u=a.get(e),c=a.get(t);if(u&&c)return u==t&&c==e;var p=-1,f=!0,h=2&r?new Kr:void 0;for(a.set(e,t),a.set(t,e);++p1&&(e.a=1),r.props.onChange({h:r.props.hsl.h,s:r.props.hsl.s,l:r.props.hsl.l,a:Math.round(100*e.a)/100,source:"rgb"},t)):(e.h||e.s||e.l)&&("string"==typeof e.s&&e.s.includes("%")&&(e.s=e.s.replace("%","")),"string"==typeof e.l&&e.l.includes("%")&&(e.l=e.l.replace("%","")),1==e.s?e.s=.01:1==e.l&&(e.l=.01),r.props.onChange({h:e.h||r.props.hsl.h,s:Number(Ia(e.s)?r.props.hsl.s:e.s),l:Number(Ia(e.l)?r.props.hsl.l:e.l),source:"hsl"},t))},r.showHighlight=function(e){e.currentTarget.style.background="#eee"},r.hideHighlight=function(e){e.currentTarget.style.background="transparent"},1!==e.hsl.a&&"hex"===e.view?r.state={view:"rgb"}:r.state={view:e.view},r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),Xa(t,[{key:"render",value:function(){var e=this,t=(0,c.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),r=void 0;return"hex"===this.state.view?r=n.createElement("div",{style:t.fields,className:"flexbox-fix"},n.createElement("div",{style:t.field},n.createElement(j,{style:{input:t.input,label:t.label},label:"hex",value:this.props.hex,onChange:this.handleChange}))):"rgb"===this.state.view?r=n.createElement("div",{style:t.fields,className:"flexbox-fix"},n.createElement("div",{style:t.field},n.createElement(j,{style:{input:t.input,label:t.label},label:"r",value:this.props.rgb.r,onChange:this.handleChange})),n.createElement("div",{style:t.field},n.createElement(j,{style:{input:t.input,label:t.label},label:"g",value:this.props.rgb.g,onChange:this.handleChange})),n.createElement("div",{style:t.field},n.createElement(j,{style:{input:t.input,label:t.label},label:"b",value:this.props.rgb.b,onChange:this.handleChange})),n.createElement("div",{style:t.alpha},n.createElement(j,{style:{input:t.input,label:t.label},label:"a",value:this.props.rgb.a,arrowOffset:.01,onChange:this.handleChange}))):"hsl"===this.state.view&&(r=n.createElement("div",{style:t.fields,className:"flexbox-fix"},n.createElement("div",{style:t.field},n.createElement(j,{style:{input:t.input,label:t.label},label:"h",value:Math.round(this.props.hsl.h),onChange:this.handleChange})),n.createElement("div",{style:t.field},n.createElement(j,{style:{input:t.input,label:t.label},label:"s",value:Math.round(100*this.props.hsl.s)+"%",onChange:this.handleChange})),n.createElement("div",{style:t.field},n.createElement(j,{style:{input:t.input,label:t.label},label:"l",value:Math.round(100*this.props.hsl.l)+"%",onChange:this.handleChange})),n.createElement("div",{style:t.alpha},n.createElement(j,{style:{input:t.input,label:t.label},label:"a",value:this.props.hsl.a,arrowOffset:.01,onChange:this.handleChange})))),n.createElement("div",{style:t.wrap,className:"flexbox-fix"},r,n.createElement("div",{style:t.toggle},n.createElement("div",{style:t.icon,onClick:this.toggleViews,ref:function(t){return e.icon=t}},n.createElement(Wa.Z,{style:t.svg,onMouseOver:this.showHighlight,onMouseEnter:this.showHighlight,onMouseOut:this.hideHighlight}))))}}],[{key:"getDerivedStateFromProps",value:function(e,t){return 1!==e.hsl.a&&"hex"===t.view?{view:"rgb"}:null}}]),t}(n.Component);Va.defaultProps={view:"hex"};var $a=Va,qa=function(){var e=(0,c.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 n.createElement("div",{style:e.picker})},Ya=function(){var e=(0,c.ZP)({default:{picker:{width:"12px",height:"12px",borderRadius:"6px",boxShadow:"inset 0 0 0 1px #fff",transform:"translate(-6px, -6px)"}}});return n.createElement("div",{style:e.picker})},Ka=function(e){var t=e.width,r=e.onChange,o=e.disableAlpha,a=e.rgb,i=e.hsl,l=e.hsv,s=e.hex,u=e.renderers,p=e.styles,f=void 0===p?{}:p,h=e.className,d=void 0===h?"":h,v=e.defaultView,g=(0,c.ZP)(kt({default:{picker:{width:t,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("+a.r+", "+a.g+", "+a.b+", "+a.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"}}},f),{disableAlpha:o});return n.createElement("div",{style:g.picker,className:"chrome-picker "+d},n.createElement("div",{style:g.saturation},n.createElement(Xt,{style:g.Saturation,hsl:i,hsv:l,pointer:Ya,onChange:r})),n.createElement("div",{style:g.body},n.createElement("div",{style:g.controls,className:"flexbox-fix"},n.createElement("div",{style:g.color},n.createElement("div",{style:g.swatch},n.createElement("div",{style:g.active}),n.createElement(b,{renderers:u}))),n.createElement("div",{style:g.toggles},n.createElement("div",{style:g.hue},n.createElement(k,{style:g.Hue,hsl:i,pointer:qa,onChange:r})),n.createElement("div",{style:g.alpha},n.createElement(m,{style:g.Alpha,rgb:a,hsl:i,pointer:qa,renderers:u,onChange:r})))),n.createElement($a,{rgb:a,hsl:i,hex:s,view:v,onChange:r,disableAlpha:o})))};Ka.propTypes={width:M().oneOfType([M().string,M().number]),disableAlpha:M().bool,styles:M().object,defaultView:M().oneOf(["hex","rgb","hsl"])},Ka.defaultProps={width:225,disableAlpha:!1,styles:{}};var Ja=Zr(Ka),Qa=function(e){var t=e.color,r=e.onClick,o=void 0===r?function(){}:r,a=e.onSwatchHover,i=e.active,l=(0,c.ZP)({default:{color:{background:t,width:"15px",height:"15px",float:"left",marginRight:"5px",marginBottom:"5px",position:"relative",cursor:"pointer"},dot:{absolute:"5px 5px 5px 5px",background:Hr(t),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:i,"color-#FFFFFF":"#FFFFFF"===t,transparent:"transparent"===t});return n.createElement(Xr,{style:l.color,color:t,onClick:o,onHover:a,focusStyle:{boxShadow:"0 0 4px "+t}},n.createElement("div",{style:l.dot}))},ei=function(e){var t=e.hex,r=e.rgb,o=e.onChange,a=(0,c.ZP)({default:{fields:{display:"flex",paddingBottom:"6px",paddingRight:"5px",position:"relative"},active:{position:"absolute",top:"6px",left:"5px",height:"9px",width:"9px",background:t},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"}}}),i=function(e,t){e.r||e.g||e.b?o({r:e.r||r.r,g:e.g||r.g,b:e.b||r.b,source:"rgb"},t):o({hex:e.hex,source:"hex"},t)};return n.createElement("div",{style:a.fields,className:"flexbox-fix"},n.createElement("div",{style:a.active}),n.createElement(j,{style:{wrap:a.HEXwrap,input:a.HEXinput,label:a.HEXlabel},label:"hex",value:t,onChange:i}),n.createElement(j,{style:{wrap:a.RGBwrap,input:a.RGBinput,label:a.RGBlabel},label:"r",value:r.r,onChange:i}),n.createElement(j,{style:{wrap:a.RGBwrap,input:a.RGBinput,label:a.RGBlabel},label:"g",value:r.g,onChange:i}),n.createElement(j,{style:{wrap:a.RGBwrap,input:a.RGBinput,label:a.RGBlabel},label:"b",value:r.b,onChange:i}))},ti=function(e){var t=e.onChange,r=e.onSwatchHover,o=e.colors,a=e.hex,i=e.rgb,l=e.styles,s=void 0===l?{}:l,u=e.className,p=void 0===u?"":u,f=(0,c.ZP)(kt({default:{Compact:{background:"#f6f6f6",radius:"4px"},compact:{paddingTop:"5px",paddingLeft:"5px",boxSizing:"initial",width:"240px"},clear:{clear:"both"}}},s)),h=function(e,r){e.hex?Tr(e.hex)&&t({hex:e.hex,source:"hex"},r):t(e,r)};return n.createElement(Mt,{style:f.Compact,styles:s},n.createElement("div",{style:f.compact,className:"compact-picker "+p},n.createElement("div",null,ro(o,(function(e){return n.createElement(Qa,{key:e,color:e,active:e.toLowerCase()===a,onClick:h,onSwatchHover:r})})),n.createElement("div",{style:f.clear})),n.createElement(ei,{hex:a,rgb:i,onChange:h})))};ti.propTypes={colors:M().arrayOf(M().string),styles:M().object},ti.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:{}},Zr(ti);var ri=(0,c.tz)((function(e){var t=e.hover,r=e.color,o=e.onClick,a=e.onSwatchHover,i={position:"relative",zIndex:"2",outline:"2px solid #fff",boxShadow:"0 0 5px 2px rgba(0,0,0,0.25)"},l=(0,c.ZP)({default:{swatch:{width:"25px",height:"25px",fontSize:"0"}},hover:{swatch:i}},{hover:t});return n.createElement("div",{style:l.swatch},n.createElement(Xr,{color:r,onClick:o,onHover:a,focusStyle:i}))})),ni=function(e){var t=e.width,r=e.colors,o=e.onChange,a=e.onSwatchHover,i=e.triangle,l=e.styles,s=void 0===l?{}:l,u=e.className,p=void 0===u?"":u,f=(0,c.ZP)(kt({default:{card:{width:t,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)"}}},s),{"hide-triangle":"hide"===i,"top-left-triangle":"top-left"===i,"top-right-triangle":"top-right"===i,"bottom-left-triangle":"bottom-left"===i,"bottom-right-triangle":"bottom-right"===i}),h=function(e,t){return o({hex:e,source:"hex"},t)};return n.createElement("div",{style:f.card,className:"github-picker "+p},n.createElement("div",{style:f.triangleShadow}),n.createElement("div",{style:f.triangle}),ro(r,(function(e){return n.createElement(ri,{color:e,key:e,onClick:h,onSwatchHover:a})})))};ni.propTypes={width:M().oneOfType([M().string,M().number]),colors:M().arrayOf(M().string),triangle:M().oneOf(["hide","top-left","top-right","bottom-left","bottom-right"]),styles:M().object},ni.defaultProps={width:200,colors:["#B80000","#DB3E00","#FCCB00","#008B02","#006B76","#1273DE","#004DCF","#5300EB","#EB9694","#FAD0C3","#FEF3BD","#C1E1C5","#BEDADC","#C4DEF6","#BED3F3","#D4C4FB"],triangle:"top-left",styles:{}},Zr(ni);var oi=Object.assign||function(e){for(var t=1;t.5});return n.createElement("div",{style:r.picker})},si=function(){var e=(0,c.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 n.createElement("div",{style:e.pointer},n.createElement("div",{style:e.left},n.createElement("div",{style:e.leftInside})),n.createElement("div",{style:e.right},n.createElement("div",{style:e.rightInside})))},ui=function(e){var t=e.onClick,r=e.label,o=e.children,a=e.active,i=(0,c.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:a});return n.createElement("div",{style:i.button,onClick:t},r||o)},ci=function(e){var t=e.rgb,r=e.currentColor,o=(0,c.ZP)({default:{swatches:{border:"1px solid #B3B3B3",borderBottom:"1px solid #F0F0F0",marginBottom:"2px",marginTop:"1px"},new:{height:"34px",background:"rgb("+t.r+","+t.g+", "+t.b+")",boxShadow:"inset 1px 0 0 #000, inset -1px 0 0 #000, inset 0 1px 0 #000"},current:{height:"34px",background:r,boxShadow:"inset 1px 0 0 #000, inset -1px 0 0 #000, inset 0 -1px 0 #000"},label:{fontSize:"14px",color:"#000",textAlign:"center"}}});return n.createElement("div",null,n.createElement("div",{style:o.label},"new"),n.createElement("div",{style:o.swatches},n.createElement("div",{style:o.new}),n.createElement("div",{style:o.current})),n.createElement("div",{style:o.label},"current"))},pi=function(){function e(e,t){for(var r=0;r100&&(e.a=100),e.a/=100,t({h:o.h,s:o.s,l:o.l,a:e.a,source:"rgb"},n))};return n.createElement("div",{style:l.fields,className:"flexbox-fix"},n.createElement("div",{style:l.double},n.createElement(j,{style:{input:l.input,label:l.label},label:"hex",value:a.replace("#",""),onChange:s})),n.createElement("div",{style:l.single},n.createElement(j,{style:{input:l.input,label:l.label},label:"r",value:r.r,onChange:s,dragLabel:"true",dragMax:"255"})),n.createElement("div",{style:l.single},n.createElement(j,{style:{input:l.input,label:l.label},label:"g",value:r.g,onChange:s,dragLabel:"true",dragMax:"255"})),n.createElement("div",{style:l.single},n.createElement(j,{style:{input:l.input,label:l.label},label:"b",value:r.b,onChange:s,dragLabel:"true",dragMax:"255"})),n.createElement("div",{style:l.alpha},n.createElement(j,{style:{input:l.input,label:l.label},label:"a",value:Math.round(100*r.a),onChange:s,dragLabel:"true",dragMax:"100"})))},di=Object.assign||function(e){for(var t=1;t{e&&e.hex?this.props.onChange(e.hex):this.props.onChange("")}}componentDidMount(){this.setState({})}componentDidUpdate(e){const{}=this.props;this.props!=e&&this.setState({})}render(){const{displayColorPicker:e}=this.state,t=this.props,{value:r,viewOrEdit:c}=t;return function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(e);o{this.setState({displayColorPicker:!1})}},n.createElement(s.Z,null))))},n.createElement(Ja,{color:r,onChange:this.handleChange}))},n.createElement("div",null,n.createElement("span",{onClick:()=>{this.setState({displayColorPicker:!e})},className:"color",style:{background:r,cursor:"pointer"}},r||n.createElement(l.ZP,{type:"link"},"选择颜色")),n.createElement("span",null,r?n.createElement(l.ZP,{type:"text",onClick:()=>{this.handleChange(void 0)}},n.createElement(u.Z,null)):"")))}}},49940:function(e,t,r){var n=r(43203)(r(44362),"DataView");e.exports=n},61979:function(e,t,r){var n=r(99129),o=r(19047),a=r(13486),i=r(64786),l=r(46444);function s(e){var t=-1,r=null==e?0:e.length;for(this.clear();++tc))return!1;var f=s.get(e),h=s.get(t);if(f&&h)return f==t&&h==e;var d=-1,b=!0,v=2&r?new n:void 0;for(s.set(e,t),s.set(t,e);++d-1&&e%1==0&&e-1}},19743:function(e,t,r){var n=r(76213);e.exports=function(e,t){var r=this.__data__,o=n(r,e);return o<0?(++this.size,r.push([e,t])):r[o][1]=t,this}},46977:function(e,t,r){var n=r(61979),o=r(52768),a=r(4804);e.exports=function(){this.size=0,this.__data__={hash:new n,map:new(a||o),string:new n}}},97474:function(e,t,r){var n=r(90404);e.exports=function(e){var t=n(this,e).delete(e);return this.size-=t?1:0,t}},40727:function(e,t,r){var n=r(90404);e.exports=function(e){return n(this,e).get(e)}},56905:function(e,t,r){var n=r(90404);e.exports=function(e){return n(this,e).has(e)}},66140:function(e,t,r){var n=r(90404);e.exports=function(e,t){var r=n(this,e),o=r.size;return r.set(e,t),this.size+=r.size==o?0:1,this}},88961:function(e){e.exports=function(e){var t=-1,r=Array(e.size);return e.forEach((function(e,n){r[++t]=[n,e]})),r}},24248:function(e){e.exports=function(e,t){return function(r){return null!=r&&r[e]===t&&(void 0!==t||e in Object(r))}}},35933:function(e,t,r){var n=r(40104);e.exports=function(e){var t=n(e,(function(e){return 500===r.size&&r.clear(),e})),r=t.cache;return t}},26326:function(e,t,r){var n=r(43203)(Object,"create");e.exports=n},63865:function(e,t,r){var n=r(15290)(Object.keys,Object);e.exports=n},15842:function(e){e.exports=function(e){var t=[];if(null!=e)for(var r in Object(e))t.push(r);return t}},51985:function(e,t,r){e=r.nmd(e);var n=r(88556),o=t&&!t.nodeType&&t,a=o&&e&&!e.nodeType&&e,i=a&&a.exports===o&&n.process,l=function(){try{return a&&a.require&&a.require("util").types||i&&i.binding&&i.binding("util")}catch(e){}}();e.exports=l},15290:function(e){e.exports=function(e,t){return function(r){return e(t(r))}}},29911:function(e){e.exports=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this}},77447:function(e){e.exports=function(e){return this.__data__.has(e)}},66983:function(e){e.exports=function(e){var t=-1,r=Array(e.size);return e.forEach((function(e){r[++t]=e})),r}},7553:function(e,t,r){var n=r(52768);e.exports=function(){this.__data__=new n,this.size=0}},86038:function(e){e.exports=function(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}},72397:function(e){e.exports=function(e){return this.__data__.get(e)}},2421:function(e){e.exports=function(e){return this.__data__.has(e)}},42936:function(e,t,r){var n=r(52768),o=r(4804),a=r(8423);e.exports=function(e,t){var r=this.__data__;if(r instanceof n){var i=r.__data__;if(!o||i.length<199)return i.push([e,t]),this.size=++r.size,this;r=this.__data__=new a(i)}return r.set(e,t),this.size=r.size,this}},50376:function(e,t,r){var n=r(35933),o=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,a=/\\(\\)?/g,i=n((function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(o,(function(e,r,n,o){t.push(n?o.replace(a,"$1"):r||e)})),t}));e.exports=i},27102:function(e,t,r){var n=r(34655);e.exports=function(e){if("string"==typeof e||n(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}},51214:function(e){var t=Function.prototype.toString;e.exports=function(e){if(null!=e){try{return t.call(e)}catch(e){}try{return e+""}catch(e){}}return""}},79931:function(e,t,r){var n=r(57643);e.exports=function(e){return n(e,5)}},67950:function(e){e.exports=function(e,t){return e===t||e!=e&&t!=t}},34930:function(e,t,r){var n=r(35645),o=r(43183);e.exports=function(e,t){return e&&n(e,o(t))}},20643:function(e,t,r){var n=r(5974);e.exports=function(e,t,r){var o=null==e?void 0:n(e,t);return void 0===o?r:o}},69059:function(e,t,r){var n=r(95529),o=r(14727);e.exports=function(e,t){return null!=e&&o(e,t,n)}},41559:function(e){e.exports=function(e){return e}},79246:function(e,t,r){var n=r(91075),o=r(44939),a=Object.prototype,i=a.hasOwnProperty,l=a.propertyIsEnumerable,s=n(function(){return arguments}())?n:function(e){return o(e)&&i.call(e,"callee")&&!l.call(e,"callee")};e.exports=s},43670:function(e){var t=Array.isArray;e.exports=t},16175:function(e,t,r){var n=r(33626),o=r(27100);e.exports=function(e){return null!=e&&o(e.length)&&!n(e)}},22343:function(e,t,r){e=r.nmd(e);var n=r(44362),o=r(53444),a=t&&!t.nodeType&&t,i=a&&e&&!e.nodeType&&e,l=i&&i.exports===a?n.Buffer:void 0,s=(l?l.isBuffer:void 0)||o;e.exports=s},33626:function(e,t,r){var n=r(1185),o=r(70071);e.exports=function(e){if(!o(e))return!1;var t=n(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}},27100:function(e){e.exports=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}},86043:function(e,t,r){var n=r(81624),o=r(19081),a=r(51985),i=a&&a.isMap,l=i?o(i):n;e.exports=l},63902:function(e,t,r){var n=r(1185),o=r(46972),a=r(44939),i=Function.prototype,l=Object.prototype,s=i.toString,u=l.hasOwnProperty,c=s.call(Object);e.exports=function(e){if(!a(e)||"[object Object]"!=n(e))return!1;var t=o(e);if(null===t)return!0;var r=u.call(t,"constructor")&&t.constructor;return"function"==typeof r&&r instanceof r&&s.call(r)==c}},60818:function(e,t,r){var n=r(67417),o=r(19081),a=r(51985),i=a&&a.isSet,l=i?o(i):n;e.exports=l},75692:function(e,t,r){var n=r(1185),o=r(43670),a=r(44939);e.exports=function(e){return"string"==typeof e||!o(e)&&a(e)&&"[object String]"==n(e)}},91589:function(e,t,r){var n=r(43638),o=r(19081),a=r(51985),i=a&&a.isTypedArray,l=i?o(i):n;e.exports=l},63225:function(e,t,r){var n=r(28083),o=r(27521),a=r(16175);e.exports=function(e){return a(e)?n(e):o(e)}},41291:function(e,t,r){var n=r(28083),o=r(90173),a=r(16175);e.exports=function(e){return a(e)?n(e,!0):o(e)}},7976:function(e,t,r){var n=r(19258),o=r(29047),a=r(75901),i=r(43670);e.exports=function(e,t){return(i(e)?n:a)(e,o(t,3))}},40104:function(e,t,r){var n=r(8423);function o(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new TypeError("Expected a function");var r=function(){var n=arguments,o=t?t.apply(this,n):n[0],a=r.cache;if(a.has(o))return a.get(o);var i=e.apply(this,n);return r.cache=a.set(o,i)||a,i};return r.cache=new(o.Cache||n),r}o.Cache=n,e.exports=o},28886:function(e,t,r){var n=r(63184),o=r(40886),a=r(80837),i=r(27102);e.exports=function(e){return a(e)?n(i(e)):o(e)}},64043:function(e){e.exports=function(){return[]}},53444:function(e){e.exports=function(){return!1}},72049:function(e,t,r){var n=r(38257);e.exports=function(e){return null==e?"":n(e)}},99591:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.autoprefix=void 0;var n,o=(n=r(34930))&&n.__esModule?n:{default:n},a=Object.assign||function(e){for(var t=1;t1&&void 0!==arguments[1]?arguments[1]:"span";return function(r){function n(){var r,l,s;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,n);for(var u=arguments.length,c=Array(u),p=0;p1&&void 0!==arguments[1]?arguments[1]:"span";return function(r){function n(){var r,l,s;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,n);for(var u=arguments.length,c=Array(u),p=0;p0&&void 0!==arguments[0]?arguments[0]:[],r=[];return(0,i.default)(t,(function(t){Array.isArray(t)?e(t).map((function(e){return r.push(e)})):(0,a.default)(t)?(0,o.default)(t,(function(e,t){!0===e&&r.push(t),r.push(t+"-"+e)})):(0,n.default)(t)&&r.push(t)})),r};t.default=s},16945:function(e,t,r){"use strict";t.tz=void 0;var n=u(r(68225)),o=u(r(69564)),a=u(r(99591)),i=u(r(78536)),l=u(r(81147)),s=u(r(91739));function u(e){return e&&e.__esModule?e:{default:e}}i.default,t.tz=i.default,l.default,s.default;t.ZP=function(e){for(var t=arguments.length,r=Array(t>1?t-1:0),i=1;i1&&void 0!==arguments[1])||arguments[1];r[e]=t};return 0===e&&n("first-child"),e===t-1&&n("last-child"),(0===e||e%2==0)&&n("even"),1===Math.abs(e%2)&&n("odd"),n("nth-child",e),r}},69564:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.mergeClasses=void 0;var n=i(r(34930)),o=i(r(79931)),a=Object.assign||function(e){for(var t=1;t1&&void 0!==arguments[1]?arguments[1]:[],r=e.default&&(0,o.default)(e.default)||{};return t.map((function(t){var o=e[t];return o&&(0,n.default)(o,(function(e,t){r[t]||(r[t]={}),r[t]=a({},r[t],o[t])})),t})),r};t.default=l}}]);