text: !function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.Palette=e():(t.ColorPicker=t.ColorPicker||{},t.ColorPicker.Palette=e())}(window,function(){return function(t){var e={};function o(r){if(e[r])return e[r].exports;var i=e[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,o),i.l=!0,i.exports}return o.m=t,o.c=e,o.d=function(t,e,r){o.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},o.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},o.t=function(t,e){if(1&e&&(t=o(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(o.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)o.d(r,i,function(e){return t[e]}.bind(null,i));return r},o.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return o.d(e,"a",e),e},o.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},o.p="",o(o.s=7)}([function(t,e,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(e,o){if(this.nodes=[],this.pseudoSelector="",this.callbacks={},o||(o=document),"string"==typeof e)if("<"===e[0]&&">"===e[e.length-1])this.nodes=[t.createNode(e)];else{if(-1!==e.search(/(:before|:after)$/gi)){var r=e.match(/(:before|:after)$/gi);e=e.split(r[0])[0],this.pseudoSelector=r[0]}this.nodes=[].slice.call(o.querySelectorAll(e))}else e instanceof NodeList?this.nodes=e.length>1?[].slice.call(e):[e]:(e instanceof HTMLDocument||e instanceof Window||e instanceof HTMLElement)&&(this.nodes=[e])}return t.select=function(e,o){return new t(e,o)},t.create=function(e){return new t(t.createNode(e))},t.prototype.attr=function(t,e){return void 0!=e?(this.each(this.nodes,function(o){o.setAttribute(t,e)}),this):this.getLastNode().getAttribute(t)},t.prototype.append=function(e){var o;return o=e instanceof t?e.get():e,this.each(this.nodes,function(t){t.appendChild(o)}),this},t.prototype.parent=function(){return new t(this.getLastNode().parentNode)},t.prototype.each=function(t,e){t instanceof Function&&(e=t,t=this.nodes);for(var o=0;o<t.length;o++)e.call(this.nodes[o],this.nodes[o],o);return this},t.prototype.hasClass=function(t){return this.getLastNode().classList.contains(t)},t.prototype.addClass=function(t){if(t){var e=t.split(" ");this.each(this.nodes,function(t){for(var o in e)t.classList.add(e[o])})}return this},t.prototype.removeClass=function(t){var e=t.split(" ");return this.each(this.nodes,function(t){for(var o in e)t.classList.remove(e[o])}),this},t.prototype.html=function(t){this.each(this.nodes,function(e){e.innerHTML=t})},t.prototype.find=function(e){return new t(e,this.getLastNode())},t.prototype.trigger=function(t,e){var o=new CustomEvent(t,{detail:e});return this.each(this.nodes,function(t){t.dispatchEvent(o)}),this},t.prototype.text=function(t){return this.each(this.nodes,function(e){e.innerText=t}),this},t.prototype.css=function(e,o){if(void 0===o){var r=this.getLastNode(),i=null;if(e=t.convertToJsProperty(e),"function"!=typeof r.getBoundingClientRect||this.pseudoSelector||(i=r.getBoundingClientRect()[e]),!i){var n=getComputedStyle(r,this.pseudoSelector)[e];n.search("px")&&(i=parseInt(n,10))}if(isNaN(i))throw"Undefined css property: "+e;return i}return this.nodes.length>1?this.each(this.nodes,function(t){t.style[e]=o}):this.nodes[0].style[e]=o,this},t.prototype.on=function(t,e){var o=this;return this.each(this.nodes,function(r){var i=function(t){e.call(r,t)};o.callbacks[t]=i,r.addEventListener(t,i)}),this},t.prototype.off=function(t){var e=this.callbacks[t];return this.each(this.nodes,function(o){o.removeEventListener(t,e,!1)}),this},t.prototype.val=function(t){return void 0===t?this.getLastNode().value:(this.each(this.nodes,function(e){e.value=t}),this)},t.prototype.is=function(t){return this.getLastNode().tagName.toLowerCase()===t},t.prototype.get=function(t){return void 0===t&&(t=0),this.nodes[t]},t.prototype.length=function(){return this.nodes.length},t.prototype.hide=function(){return this.each(this.nodes,function(e){t.select(e).css("display","none")}),this},t.prototype.show=function(){return this.each(this.nodes,function(e){t.select(e).css("display","")}),this},t.prototype.empty=function(){return this.each(this.nodes,function(e){t.select(e).get().innerHTML=""}),this},t.prototype.remove=function(){this.each(this.nodes,function(t){t.remove()})},t.prototype.insertBefore=function(t){var e=this.resolveElement(t);return this.each(this.nodes,function(t){t.parentNode.insertBefore(e,e.previousSibling)}),this},t.prototype.insertAfter=function(t){var e=this.resolveElement(t);return this.each(this.nodes,function(t){t.parentNode.insertBefore(e,t.nextSibling)}),this},t.prototype.resolveElement=function(e){var o;return t.isHtml(e)?o=t.createNode(e):e instanceof HTMLElement?o=e:e instanceof t&&(o=e.get()),o},t.prototype.closest=function(e){return t.select(this.getLastNode().closest(e))},t.prototype.data=function(t){return this.attr("data-"+t)},t.prototype.width=function(t){if(void 0!==t)return this.css("width",t),this;if(this.getLastNode()===window)return parseInt(this.getLastNode().innerWidth,10);var e=this.css("width").toString();return e.search("px")?parseInt(this.css("width"),10):e},t.prototype.height=function(t){return void 0!==t?(this.css("height",t),this):this.getLastNode()===window?parseInt(this.getLastNode().innerHeight,10):parseInt(this.css("height"),10)},t.prototype.position=function(){return{top:Number(this.getLastNode().getBoundingClientRect().top),bottom:Number(this.getLastNode().getBoundingClientRect().bottom),left:Number(this.getLastNode().getBoundingClientRect().left),right:Number(this.getLastNode().getBoundingClientRect().right)}},t.prototype.offset=function(){return{top:Number(this.getLastNode().offsetTop),left:Number(this.getLastNode().offsetLeft)}},t.createNode=function(t){if("<"===t[0]&&">"===t[t.length-1]){var e=document.createElement("div");return e.innerHTML=t,e.firstChild}return document.createElement(t)},t.isHtml=function(t){return"<"===t[0]&&">"===t[t.length-1]},t.convertToJsProperty=function(t){return(t=(t=(t=t.toLowerCase().replace("-"," ")).replace(/(^| )(\w)/g,function(t){return t.toUpperCase()})).charAt(0).toLowerCase()+t.slice(1)).replace(" ","")},t.prototype.getLastNode=function(){return this.nodes[this.nodes.length-1]},t}();e.TsDom=r},function(t,e,o){var r;!function(i){var n=/^\s+/,s=/\s+$/,a=0,c=i.round,l=i.min,h=i.max,f=i.random;function u(t,e){if(t=t||"",e=e||{},t instanceof u)return t;if(!(this instanceof u))return new u(t,e);var o=function(t){var e={r:0,g:0,b:0},o=1,r=null,a=null,c=null,f=!1,u=!1;"string"==typeof t&&(t=function(t){t=t.replace(n,"").replace(s,"").toLowerCase();var e,o=!1;if(D[t])t=D[t],o=!0;else if("transparent"==t)return{r:0,g:0,b:0,a:0,format:"name"};if(e=I.rgb.exec(t))return{r:e[1],g:e[2],b:e[3]};if(e=I.rgba.exec(t))return{r:e[1],g:e[2],b:e[3],a:e[4]};if(e=I.hsl.exec(t))return{h:e[1],s:e[2],l:e[3]};if(e=I.hsla.exec(t))return{h:e[1],s:e[2],l:e[3],a:e[4]};if(e=I.hsv.exec(t))return{h:e[1],s:e[2],v:e[3]};if(e=I.hsva.exec(t))return{h:e[1],s:e[2],v:e[3],a:e[4]};if(e=I.hex8.exec(t))return{r:B(e[1]),g:B(e[2]),b:B(e[3]),a:j(e[4]),format:o?"name":"hex8"};if(e=I.hex6.exec(t))return{r:B(e[1]),g:B(e[2]),b:B(e[3]),format:o?"name":"hex"};if(e=I.hex4.exec(t))return{r:B(e[1]+""+e[1]),g:B(e[2]+""+e[2]),b:B(e[3]+""+e[3]),a:j(e[4]+""+e[4]),format:o?"name":"hex8"};if(e=I.hex3.exec(t))return{r:B(e[1]+""+e[1]),g:B(e[2]+""+e[2]),b:B(e[3]+""+e[3]),format:o?"name":"hex"};return!1}(t));"object"==typeof t&&(q(t.r)&&q(t.g)&&q(t.b)?(e=function(t,e,o){return{r:255*N(t,255),g:255*N(e,255),b:255*N(o,255)}}(t.r,t.g,t.b),f=!0,u="%"===String(t.r).substr(-1)?"prgb":"rgb"):q(t.h)&&q(t.s)&&q(t.v)?(r=T(t.s),a=T(t.v),e=function(t,e,o){t=6*N(t,360),e=N(e,100),o=N(o,100);var r=i.floor(t),n=t-r,s=o*(1-e),a=o*(1-n*e),c=o*(1-(1-n)*e),l=r%6;return{r:255*[o,a,s,s,c,o][l],g:255*[c,o,o,a,s,s][l],b:255*[s,s,c,o,o,a][l]}}(t.h,r,a),f=!0,u="hsv"):q(t.h)&&q(t.s)&&q(t.l)&&(r=T(t.s),c=T(t.l),e=function(t,e,o){var r,i,n;function s(t,e,o){return o<0&&(o+=1),o>1&&(o-=1),o<1/6?t+6*(e-t)*o:o<.5?e:o<2/3?t+(e-t)*(2/3-o)*6:t}if(t=N(t,360),e=N(e,100),o=N(o,100),0===e)r=i=n=o;else{var a=o<.5?o*(1+e):o+e-o*e,c=2*o-a;r=s(c,a,t+1/3),i=s(c,a,t),n=s(c,a,t-1/3)}return{r:255*r,g:255*i,b:255*n}}(t.h,r,c),f=!0,u="hsl"),t.hasOwnProperty("a")&&(o=t.a));return o=M(o),{ok:f,format:t.format||u,r:l(255,h(e.r,0)),g:l(255,h(e.g,0)),b:l(255,h(e.b,0)),a:o}}(t);this._originalInput=t,this._r=o.r,this._g=o.g,this._b=o.b,this._a=o.a,this._roundA=c(100*this._a)/100,this._format=e.format||o.format,this._gradientType=e.gradientType,this._r<1&&(this._r=c(this._r)),this._g<1&&(this._g=c(this._g)),this._b<1&&(this._b=c(this._b)),this._ok=o.ok,this._tc_id=a++}function p(t,e,o){t=N(t,255),e=N(e,255),o=N(o,255);var r,i,n=h(t,e,o),s=l(t,e,o),a=(n+s)/2;if(n==s)r=i=0;else{var c=n-s;switch(i=a>.5?c/(2-n-s):c/(n+s),n){case t:r=(e-o)/c+(e<o?6:0);break;case e:r=(o-t)/c+2;break;case o:r=(t-e)/c+4}r/=6}return{h:r,s:i,l:a}}function d(t,e,o){t=N(t,255),e=N(e,255),o=N(o,255);var r,i,n=h(t,e,o),s=l(t,e,o),a=n,c=n-s;if(i=0===n?0:c/n,n==s)r=0;else{switch(n){case t:r=(e-o)/c+(e<o?6:0);break;case e:r=(o-t)/c+2;break;case o:r=(t-e)/c+4}r/=6}return{h:r,s:i,v:a}}function g(t,e,o,r){var i=[R(c(t).toString(16)),R(c(e).toString(16)),R(c(o).toString(16))];return r&&i[0].charAt(0)==i[0].charAt(1)&&i[1].charAt(0)==i[1].charAt(1)&&i[2].charAt(0)==i[2].charAt(1)?i[0].charAt(0)+i[1].charAt(0)+i[2].charAt(0):i.join("")}function b(t,e,o,r){return[R(O(r)),R(c(t).toString(16)),R(c(e).toString(16)),R(c(o).toString(16))].join("")}function m(t,e){e=0===e?0:e||10;var o=u(t).toHsl();return o.s-=e/100,o.s=H(o.s),u(o)}function v(t,e){e=0===e?0:e||10;var o=u(t).toHsl();return o.s+=e/100,o.s=H(o.s),u(o)}function y(t){return u(t).desaturate(100)}function k(t,e){e=0===e?0:e||10;var o=u(t).toHsl();return o.l+=e/100,o.l=H(o.l),u(o)}function C(t,e){e=0===e?0:e||10;var o=u(t).toRgb();return o.r=h(0,l(255,o.r-c(-e/100*255))),o.g=h(0,l(255,o.g-c(-e/100*255))),o.b=h(0,l(255,o.b-c(-e/100*255))),u(o)}function _(t,e){e=0===e?0:e||10;var o=u(t).toHsl();return o.l-=e/100,o.l=H(o.l),u(o)}function w(t,e){var o=u(t).toHsl(),r=(o.h+e)%360;return o.h=r<0?360+r:r,u(o)}function A(t){var e=u(t).toHsl();return e.h=(e.h+180)%360,u(e)}function x(t){var e=u(t).toHsl(),o=e.h;return[u(t),u({h:(o+120)%360,s:e.s,l:e.l}),u({h:(o+240)%360,s:e.s,l:e.l})]}function F(t){var e=u(t).toHsl(),o=e.h;return[u(t),u({h:(o+90)%360,s:e.s,l:e.l}),u({h:(o+180)%360,s:e.s,l:e.l}),u({h:(o+270)%360,s:e.s,l:e.l})]}function S(t){var e=u(t).toHsl(),o=e.h;return[u(t),u({h:(o+72)%360,s:e.s,l:e.l}),u({h:(o+216)%360,s:e.s,l:e.l})]}function E(t,e,o){e=e||6,o=o||30;var r=u(t).toHsl(),i=360/o,n=[u(t)];for(r.h=(r.h-(i*e>>1)+720)%360;--e;)r.h=(r.h+i)%360,n.push(u(r));return n}function P(t,e){e=e||6;for(var o=u(t).toHsv(),r=o.h,i=o.s,n=o.v,s=[],a=1/e;e--;)s.push(u({h:r,s:i,v:n})),n=(n+a)%1;return s}u.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 t=this.toRgb();return(299*t.r+587*t.g+114*t.b)/1e3},getLuminance:function(){var t,e,o,r=this.toRgb();return t=r.r/255,e=r.g/255,o=r.b/255,.2126*(t<=.03928?t/12.92:i.pow((t+.055)/1.055,2.4))+.7152*(e<=.03928?e/12.92:i.pow((e+.055)/1.055,2.4))+.0722*(o<=.03928?o/12.92:i.pow((o+.055)/1.055,2.4))},setAlpha:function(t){return this._a=M(t),this._roundA=c(100*this._a)/100,this},toHsv:function(){var t=d(this._r,this._g,this._b);return{h:360*t.h,s:t.s,v:t.v,a:this._a}},toHsvString:function(){var t=d(this._r,this._g,this._b),e=c(360*t.h),o=c(100*t.s),r=c(100*t.v);return 1==this._a?"hsv("+e+", "+o+"%, "+r+"%)":"hsva("+e+", "+o+"%, "+r+"%, "+this._roundA+")"},toHsl:function(){var t=p(this._r,this._g,this._b);return{h:360*t.h,s:t.s,l:t.l,a:this._a}},toHslString:function(){var t=p(this._r,this._g,this._b),e=c(360*t.h),o=c(100*t.s),r=c(100*t.l);return 1==this._a?"hsl("+e+", "+o+"%, "+r+"%)":"hsla("+e+", "+o+"%, "+r+"%, "+this._roundA+")"},toHex:function(t){return g(this._r,this._g,this._b,t)},toHexString:function(t){return"#"+this.toHex(t)},toHex8:function(t){return function(t,e,o,r,i){var n=[R(c(t).toString(16)),R(c(e).toString(16)),R(c(o).toString(16)),R(O(r))];if(i&&n[0].charAt(0)==n[0].charAt(1)&&n[1].charAt(0)==n[1].charAt(1)&&n[2].charAt(0)==n[2].charAt(1)&&n[3].charAt(0)==n[3].charAt(1))return n[0].charAt(0)+n[1].charAt(0)+n[2].charAt(0)+n[3].charAt(0);return n.join("")}(this._r,this._g,this._b,this._a,t)},toHex8String:function(t){return"#"+this.toHex8(t)},toRgb:function(){return{r:c(this._r),g:c(this._g),b:c(this._b),a:this._a}},toRgbString:function(){return 1==this._a?"rgb("+c(this._r)+", "+c(this._g)+", "+c(this._b)+")":"rgba("+c(this._r)+", "+c(this._g)+", "+c(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:c(100*N(this._r,255))+"%",g:c(100*N(this._g,255))+"%",b:c(100*N(this._b,255))+"%",a:this._a}},toPercentageRgbString:function(){return 1==this._a?"rgb("+c(100*N(this._r,255))+"%, "+c(100*N(this._g,255))+"%, "+c(100*N(this._b,255))+"%)":"rgba("+c(100*N(this._r,255))+"%, "+c(100*N(this._g,255))+"%, "+c(100*N(this._b,255))+"%, "+this._roundA+")"},toName:function(){return 0===this._a?"transparent":!(this._a<1)&&(L[g(this._r,this._g,this._b,!0)]||!1)},toFilter:function(t){var e="#"+b(this._r,this._g,this._b,this._a),o=e,r=this._gradientType?"GradientType = 1, ":"";if(t){var i=u(t);o="#"+b(i._r,i._g,i._b,i._a)}return"progid:DXImageTransform.Microsoft.gradient("+r+"startColorstr="+e+",endColorstr="+o+")"},toString:function(t){var e=!!t;t=t||this._format;var o=!1,r=this._a<1&&this._a>=0;return e||!r||"hex"!==t&&"hex6"!==t&&"hex3"!==t&&"hex4"!==t&&"hex8"!==t&&"name"!==t?("rgb"===t&&(o=this.toRgbString()),"prgb"===t&&(o=this.toPercentageRgbString()),"hex"!==t&&"hex6"!==t||(o=this.toHexString()),"hex3"===t&&(o=this.toHexString(!0)),"hex4"===t&&(o=this.toHex8String(!0)),"hex8"===t&&(o=this.toHex8String()),"name"===t&&(o=this.toName()),"hsl"===t&&(o=this.toHslString()),"hsv"===t&&(o=this.toHsvString()),o||this.toHexString()):"name"===t&&0===this._a?this.toName():this.toRgbString()},clone:function(){return u(this.toString())},_applyModification:function(t,e){var o=t.apply(null,[this].concat([].slice.call(e)));return this._r=o._r,this._g=o._g,this._b=o._b,this.setAlpha(o._a),this},lighten:function(){return this._applyModification(k,arguments)},brighten:function(){return this._applyModification(C,arguments)},darken:function(){return this._applyModification(_,arguments)},desaturate:function(){return this._applyModification(m,arguments)},saturate:function(){return this._applyModification(v,arguments)},greyscale:function(){return this._applyModification(y,arguments)},spin:function(){return this._applyModification(w,arguments)},_applyCombination:function(t,e){return t.apply(null,[this].concat([].slice.call(e)))},analogous:function(){return this._applyCombination(E,arguments)},complement:function(){return this._applyCombination(A,arguments)},monochromatic:function(){return this._applyCombination(P,arguments)},splitcomplement:function(){return this._applyCombination(S,arguments)},triad:function(){return this._applyCombination(x,arguments)},tetrad:function(){return this._applyCombination(F,arguments)}},u.fromRatio=function(t,e){if("object"==typeof t){var o={};for(var r in t)t.hasOwnProperty(r)&&(o[r]="a"===r?t[r]:T(t[r]));t=o}return u(t,e)},u.equals=function(t,e){return!(!t||!e)&&u(t).toRgbString()==u(e).toRgbString()},u.random=function(){return u.fromRatio({r:f(),g:f(),b:f()})},u.mix=function(t,e,o){o=0===o?0:o||50;var r=u(t).toRgb(),i=u(e).toRgb(),n=o/100;return u({r:(i.r-r.r)*n+r.r,g:(i.g-r.g)*n+r.g,b:(i.b-r.b)*n+r.b,a:(i.a-r.a)*n+r.a})},u.readability=function(t,e){var o=u(t),r=u(e);return(i.max(o.getLuminance(),r.getLuminance())+.05)/(i.min(o.getLuminance(),r.getLuminance())+.05)},u.isReadable=function(t,e,o){var r,i,n=u.readability(t,e);switch(i=!1,(r=function(t){var e,o;e=((t=t||{level:"AA",size:"small"}).level||"AA").toUpperCase(),o=(t.size||"small").toLowerCase(),"AA"!==e&&"AAA"!==e&&(e="AA");"small"!==o&&"large"!==o&&(o="small");return{level:e,size:o}}(o)).level+r.size){case"AAsmall":case"AAAlarge":i=n>=4.5;break;case"AAlarge":i=n>=3;break;case"AAAsmall":i=n>=7}return i},u.mostReadable=function(t,e,o){var r,i,n,s,a=null,c=0;i=(o=o||{}).includeFallbackColors,n=o.level,s=o.size;for(var l=0;l<e.length;l++)(r=u.readability(t,e[l]))>c&&(c=r,a=u(e[l]));return u.isReadable(t,a,{level:n,size:s})||!i?a:(o.includeFallbackColors=!1,u.mostReadable(t,["#fff","#000"],o))};var D=u.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"},L=u.hexNames=function(t){var e={};for(var o in t)t.hasOwnProperty(o)&&(e[t[o]]=o);return e}(D);function M(t){return t=parseFloat(t),(isNaN(t)||t<0||t>1)&&(t=1),t}function N(t,e){(function(t){return"string"==typeof t&&-1!=t.indexOf(".")&&1===parseFloat(t)})(t)&&(t="100%");var o=function(t){return"string"==typeof t&&-1!=t.indexOf("%")}(t);return t=l(e,h(0,parseFloat(t))),o&&(t=parseInt(t*e,10)/100),i.abs(t-e)<1e-6?1:t%e/parseFloat(e)}function H(t){return l(1,h(0,t))}function B(t){return parseInt(t,16)}function R(t){return 1==t.length?"0"+t:""+t}function T(t){return t<=1&&(t=100*t+"%"),t}function O(t){return i.round(255*parseFloat(t)).toString(16)}function j(t){return B(t)/255}var I=function(){var t="(?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?)",e="[\\s|\\(]+("+t+")[,|\\s]+("+t+")[,|\\s]+("+t+")\\s*\\)?",o="[\\s|\\(]+("+t+")[,|\\s]+("+t+")[,|\\s]+("+t+")[,|\\s]+("+t+")\\s*\\)?";return{CSS_UNIT:new RegExp(t),rgb:new RegExp("rgb"+e),rgba:new RegExp("rgba"+o),hsl:new RegExp("hsl"+e),hsla:new RegExp("hsla"+o),hsv:new RegExp("hsv"+e),hsva:new RegExp("hsva"+o),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 q(t){return!!I.CSS_UNIT.exec(t)}void 0!==t&&t.exports?t.exports=u:void 0===(r=function(){return u}.call(e,o,e,t))||(t.exports=r)}(Math)},function(t,e,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=o(1),i=function(){function t(t){this.color=t,this.normalize()}return t.prototype.normalize=function(){var t=r(this.color),e=t.getAlpha(),o=t.toRgb(),i=t.toHsl(),n=t.toHsv();t.setAlpha(1),this.rgb=t.toRgbString(),this.rgba="rgba("+o.r+", "+o.g+", "+o.b+", "+e+")",this.hex=t.toHexString(),this.hsl=t.toHslString(),this.hsla="hsla("+Math.floor(i.h)+", "+Math.floor(100*i.s)+"%, "+Math.floor(100*i.l)+"%, "+e+")",this.hsv=t.toHsvString(),this.hsva="",this.source={rgba:{r:o.r,g:o.g,b:o.b,a:e},hsla:{h:Math.floor(i.h),s:Math.floor(100*i.s),l:Math.floor(100*i.l),a:e},hsv:{h:Math.floor(n.h),s:Math.floor(100*n.s),v:Math.floor(100*n.v),a:e}}},t.prototype.format=function(t){return"rgb"===t?this.rgb:"rgba"===t?this.rgba:"hex"===t?this.hex:"hsl"===t?this.hsl:"hsla"===t?this.hsla:"source"===t?this.source:this.hex},t.prototype.setOpacity=function(t){this.rgba="rgba("+this.source.rgba.r+", "+this.source.rgba.g+", "+this.source.rgba.b+", "+t+")",this.hsla="hsla("+this.source.hsla.h+", "+this.source.hsla.s+"%, "+this.source.hsla.l+"%, "+t+")",this.source.rgba.a=t,this.source.hsla.a=t},t.prototype.isValid=function(){return r(this.color).isValid()},t.process=function(e){return new t(e)},t}();e.Color=i},function(t,e,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=o(0),i=function(){function t(t,e,o,i){this.selector=t,this.picker=e,this.defaultPlacement=o,this.arrow=i;var n=this,s=this.getScrollParent(this.selector.get());this.processHandler=function(t){return n.process()},this.scrollParent=r.TsDom.select(s),this.scrollParent.on("scroll",this.processHandler),this.window=r.TsDom.select(window),this.window.on("scroll",this.processHandler)}return t.prototype.process=function(){var t=this.picker.attr("id"),e=r.TsDom.select("#"+t+":after"),o=e.width(),i=e.height(),n=this.selector.width(),s=this.selector.height(),a=this.selector.position().top,c=this.selector.position().left,l=this.picker.width(),h=this.picker.height(),f="bottom",u=this.defaultPlacement.split("-"),p=o/2;if("bottom"===(f=u.length>1?u[0]:this.defaultPlacement)){var d=a+s+i,g=0;if(c+l<r.TsDom.select(window).width())g=c,this.picker.removeClass("is-arrow-right").addClass("is-arrow-left"),n<(b=e.css("left"))+e.width()+Math.ceil(b/2)&&(g-=Math.ceil(b+p/2-n/2));else g=c+n-l,this.picker.removeClass("is-arrow-left").addClass("is-arrow-right"),n<(m=e.css("right"))+e.width()+Math.ceil(m/2)&&(g=g+3+(m+p/2-n/2));this.picker.css("top",d+"px"),this.picker.css("left",g+"px")}else if("top"===f){var b,m;d=a-h-i,g=0;if(c+l<r.TsDom.select(window).width())g=c,this.picker.css("left",g+"px"),this.picker.removeClass("is-arrow-right").addClass("is-arrow-left"),n<(b=e.css("left"))+e.width()+Math.ceil(b/2)&&(g-=Math.ceil(b+p/2-n/2));else g=c+n-l,this.picker.removeClass("is-arrow-left").addClass("is-arrow-right"),n<(m=e.css("right"))+e.width()+Math.ceil(m/2)&&(g=g+3+(m+p/2-n/2));this.picker.css("top",d+"px"),this.picker.css("left",g+"px")}else if("left"===f){d=a,g=c-l-o;if(a+h<r.TsDom.select(window).height())this.picker.removeClass("is-arrow-bottom").addClass("is-arrow-top"),s<(v=e.css("top"))+i+Math.ceil(v/2)&&(d-=Math.ceil(v+p/2-s/2));else d=a+s-h,this.picker.removeClass("is-arrow-top").addClass("is-arrow-bottom"),s<(y=e.css("bottom"))+e.height()+Math.ceil(y/2)&&(d=d+4+(y+p/2-s/2));this.picker.css("top",d+"px"),this.picker.css("left",g+"px")}else if("right"===f){var v,y;d=a,g=c+n+o;if(a+h<r.TsDom.select(window).height())this.picker.removeClass("is-arrow-bottom").addClass("is-arrow-top"),s<(v=e.css("top"))+i+Math.ceil(v/2)&&(d-=Math.ceil(v+p/2-s/2));else d=a+s-h,this.picker.removeClass("is-arrow-top").addClass("is-arrow-bottom"),s<(y=e.css("bottom"))+e.height()+Math.ceil(y/2)&&(d=d+4+(y+p/2-s/2));this.picker.css("top",d+"px"),this.picker.css("left",g+"px")}},t.prototype.destroy=function(){this.scrollParent.off("scroll"),this.window.off("scroll")},t.prototype.getScrollParent=function(t){var e=/(auto|scroll)/,o=function(t,e){return null===t.parentNode?e:o(t.parentNode,e.concat([t]))},r=function(t,e){return getComputedStyle(t,null).getPropertyValue(e)},i=function(t){return e.test(function(t){return r(t,"overflow")+r(t,"overflow-y")+r(t,"overflow-x")}(t))};return function(t){if(t instanceof HTMLElement||t instanceof SVGElement){for(var e=o(t.parentNode,[]),r=0;r<e.length;r+=1)if(i(e[r]))return e[r];return document.scrollingElement||document.documentElement}}(t)},t}();e.PickerPosition=i},function(t,e,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e._uniqueId=function(t){return void 0===t&&(t=16),Math.random().toString(36).substr(2,t)}},function(t,e,o){t.exports=function(){"use strict";var t=function(t){return function(t){return!!t&&"object"==typeof t}(t)&&!function(t){var o=Object.prototype.toString.call(t);return"[object RegExp]"===o||"[object Date]"===o||function(t){return t.$$typeof===e}(t)}(t)},e="function"==typeof Symbol&&Symbol.for?Symbol.for("react.element"):60103;function o(e,o){var r=!o||!1!==o.clone;return r&&t(e)?i(function(t){return Array.isArray(t)?[]:{}}(e),e,o):e}function r(t,e,r){return t.concat(e).map(function(t){return o(t,r)})}function i(e,n,s){var a=Array.isArray(n),c=Array.isArray(e),l=s||{arrayMerge:r},h=a===c;if(h){if(a){var f=l.arrayMerge||r;return f(e,n,s)}return function(e,r,n){var s={};return t(e)&&Object.keys(e).forEach(function(t){s[t]=o(e[t],n)}),Object.keys(r).forEach(function(a){t(r[a])&&e[a]?s[a]=i(e[a],r[a],n):s[a]=o(r[a],n)}),s}(e,n,s)}return o(n,s)}return i.all=function(t,e){if(!Array.isArray(t))throw new Error("first argument should be an array");return t.reduce(function(t,o){return i(t,o,e)},{})},i}()},function(t,e,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=o(0),i=o(5),n=o(4),s=o(3),a=function(){function t(e,o){void 0===o&&(o={}),this.options={color:"",hexOnly:!1,inline:!1,placement:"bottom",format:"rgba",customClass:"",size:"default",arrow:!0,anchor:{hidden:!1,cssProperty:"color"},animation:"slide-in",hideInfo:!1,history:{hidden:!1,placeholdersAmount:10,colors:[]}},this.events={change:function(t){}};this.anchor=r.TsDom.select(e),this.id="colorpicker-"+n._uniqueId(),this.anchorId=this.id+"-anchor",this.cssId="#"+this.id,this.cssAnchorId="#"+this.anchorId,this.options=i.all([this.options,this.getDefaultOptions(),t.globalOptions,o],{arrayMerge:function(t,e,o){return e}}),this.document=r.TsDom.select(document),this.initPicker(),this.update(),this.initAnchor()}return t.prototype.setColor=function(t){this.options.color=t,this.update()},t.prototype.show=function(){this.bindCommonEvents(),this.picker.removeClass(this.options.animation).addClass(this.options.animation).addClass("is-opened").addClass("colorpicker--position-"+this.options.placement),this.detectPickerPosition(),this.afterShow()},t.prototype.hide=function(){this.picker.hasClass("is-opened")&&(this.pickerPosition.destroy(),this.unBindCommonEvents(),this.picker.removeClass("is-opened"),this.anchor.get(0).blur())},t.prototype.unBindCommonEvents=function(){this.options.inline||this.document.off("mousedown")},t.prototype.on=function(t,e){this.events[t]=e},t.prototype.setAnchorCssProperty=function(t){this.options.anchor.cssProperty=t},t.prototype.setPlacement=function(t){this.options.placement=t},t.setGlobalOptions=function(e){t.globalOptions=e},t.prototype.initPicker=function(){this.buildLayout(),this.picker.addClass(this.getPickerCssClassName()+"--size-"+this.options.size),this.options.arrow||this.picker.addClass("colorpicker--no-arrow"),this.addCustomClass(),this.options.inline?(this.anchor.parent().hasClass("colorpicker-input")?this.anchor.parent().insertAfter(this.picker):this.anchor.insertAfter(this.picker),this.anchor.addClass("colorpicker-anchor--inline"),this.picker.addClass("colorpicker--inline")):r.TsDom.select("body").append(this.picker),this.bindEvents()},t.prototype.bindCommonEvents=function(){var t=this;this.options.inline||this.document.on("mousedown",function(e){var o=r.TsDom.select(e.target).closest(".colorpicker");o.length()&&o.attr("id")===t.picker.attr("id")||e.target===t.anchor.get(0)||t.hide()})},t.prototype.initAnchor=function(){var t=this,e=this,o=function(t){e.hideAllActivePickers(),e.show(),t.stopPropagation()};if(this.anchor.addClass("colorpicker-anchor"),this.options.anchor.hidden&&this.anchor.hide(),this.anchor.is("input")){this.anchor.val(e.getColor().toString()).on("input",function(e){t.setColor(t.anchor.val()),t.updateAnchorColor(e,!1)});var r=this.anchor.parent().find("[data-color]");r.length()&&r.css("background",e.getColor()),this.options.inline||this.anchor.on("focus",o)}else this.anchor.find("[data-color]").length()?this.anchor.find("[data-color]").css("background",e.getColor()):this.anchor.css(e.options.anchor.cssProperty,e.getColor()),this.options.inline||this.anchor.on("click",o);this.picker.on("colorpicker:color-change",function(e){t.updateAnchorColor(e)}),this.picker.on("colorpicker:hide",function(e){t.hide()})},t.prototype.updateAnchorColor=function(t,e){void 0===t&&(t=null),void 0===e&&(e=!0);t.detail.enableHidePicker&&this.options.hideAfterColorChange&&!this.options.inline&&this.hide();var o=null;e&&this.anchor.val(this.getColor().toString()),(o=this.anchor.parent().hasClass("colorpicker-input")?this.anchor.parent().find("[data-color]"):this.anchor.find("[data-color]")).length()?o.css("background-color",this.getColor()):this.anchor.is("input")||this.anchor.css(this.options.anchor.cssProperty,this.getColor()),this.events.change.apply(this,[this.getColorObject()])},t.prototype.hideAllActivePickers=function(){r.TsDom.select(".colorpicker.is-opened:not("+this.cssId+"):not(.colorpicker--inline)").trigger("colorpicker:hide")},t.prototype.addCustomClass=function(){this.picker.addClass(this.options.customClass)},t.prototype.detectPickerPosition=function(){var t=this;this.pickerPosition=new s.PickerPosition(this.anchor,this.picker,this.options.placement,this.options.arrow),this.pickerPosition.process(),this.picker.on("colorpicker:refresh-position",function(e){t.pickerPosition.process()})},t.prototype.dispatchColorChangedEvent=function(t){void 0===t&&(t=!0),this.picker.trigger("colorpicker:color-change",{color:this.getColor(),enableHidePicker:t})},t.prototype.dispatchRefreshPositionEvent=function(){this.picker.trigger("colorpicker:refresh-position")},t.prototype.afterShow=function(){},t.globalOptions={},t}();e.ColorPicker=a},function(t,e,o){"use strict";var r=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)e.hasOwnProperty(o)&&(t[o]=e[o])};return function(e,o){function r(){this.constructor=e}t(e,o),e.prototype=null===o?Object.create(o):(r.prototype=o.prototype,new r)}}(),i=o(6),n=o(0),s=o(2),a=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r(e,t),e.prototype.buildLayout=function(){var t=this;this.picker=n.TsDom.create("div").addClass("colorpicker").addClass("colorpicker-palette").attr("id",this.id),1===this.options.palette.length&&this.picker.addClass("colorpicker-palette--plain"),this.options.palette.forEach(function(e){var o=n.TsDom.create("div").addClass("colorpicker-palette__colors");e.descendants.forEach(function(e){var r=n.TsDom.create("div").addClass("colorpicker-palette__color").css("background-color",e.color).attr("data-picker-color",e.color.toLowerCase());"#ffffff"===e.color.toLowerCase()&&r.addClass("colorpicker-palette__color--white"),e.color.toLowerCase()===t.options.color.toLowerCase()&&r.addClass("is-checked"),o.append(r)}),t.picker.append(o)})},e.prototype.bindEvents=function(){var t=this;this.picker.on("click",function(e){var o=n.TsDom.select(e.target);o.hasClass("colorpicker-palette__color")&&(t.picker.find(".colorpicker-palette__color").removeClass("is-checked"),o.addClass("is-checked"),t.options.color=o.data("picker-color"),t.dispatchColorChangedEvent())})},e.prototype.getColor=function(){return s.Color.process(this.options.color).format(this.options.format)},e.prototype.getColorObject=function(){return s.Color.process(this.options.color)},e.prototype.update=function(){this.picker.find(".colorpicker-palette__color").removeClass("is-checked"),this.picker.find('[data-picker-color="'+this.options.color.toLowerCase()+'"]').addClass("is-checked")},e.prototype.refresh=function(){},e.prototype.destroy=function(){this.unBindCommonEvents(),this.picker.remove(),this.anchor.off("focus"),this.anchor.off("click")},e.prototype.getPickerCssClassName=function(){return"colorpicker-palette"},e.prototype.getDefaultOptions=function(){return{color:"#000000",format:"hex",palette:[{descendants:[{color:"#000000"},{color:"#454545"},{color:"#666666"},{color:"#989898"},{color:"#B6B6B6"},{color:"#CBCBCB"},{color:"#D8D8D8"},{color:"#EEEEEF"},{color:"#F3F3F3"},{color:"#ffffff"}]},{descendants:[{color:"#970205"},{color:"#FF0309"},{color:"#FF980C"},{color:"#FFFF11"},{color:"#00ff00"},{color:"#1EFFFF"},{color:"#4985E7"},{color:"#150AFF"},{color:"#970AFF"},{color:"#FF0AFF"}]},{descendants:[{color:"#E6B7AE"},{color:"#F4CBCB"},{color:"#FCE4CC"},{color:"#FFF2CB"},{color:"#D8E9D2"},{color:"#CFDFE2"},{color:"#C7D9F8"},{color:"#CDE1F3"},{color:"#D8D1E8"},{color:"#EAD0DB"}]},{descendants:[{color:"#DD7D6B"},{color:"#EA9898"},{color:"#F9CA9B"},{color:"#FFE498"},{color:"#B4D6A7"},{color:"#A0C3C8"},{color:"#A2C1F4"},{color:"#9DC4E7"},{color:"#B2A6D5"},{color:"#D4A5BC"}]},{descendants:[{color:"#CC432A"},{color:"#E06666"},{color:"#F6B06B"},{color:"#FFD866"},{color:"#91C37C"},{color:"#75A4AD"},{color:"#6B9DEA"},{color:"#6DA7DB"},{color:"#8D7BC2"},{color:"#C17A9F"}]},{descendants:[{color:"#A52206"},{color:"#CC0207"},{color:"#E6903B"},{color:"#F1C136"},{color:"#69A650"},{color:"#46808D"},{color:"#3C77D7"},{color:"#3D84C5"},{color:"#674FA5"},{color:"#A54E78"}]},{descendants:[{color:"#842514"},{color:"#980205"},{color:"#B35F10"},{color:"#BE8F0B"},{color:"#3A7523"},{color:"#18505C"},{color:"#1156CB"},{color:"#0E5493"},{color:"#382274"},{color:"#733855"}]},{descendants:[{color:"#5C1603"},{color:"#660104"},{color:"#78410D"},{color:"#7E6007"},{color:"#2B4F1A"},{color:"#13373F"},{color:"#204786"},{color:"#0D3A63"},{color:"#25194E"},{color:"#4E1833"}]}],hideAfterColorChange:!0}},e}(i.ColorPicker);t.exports=a}])});