芝麻web文件管理V1.00
编辑当前文件:/home/royashxg/public_html/wp-content/plugins/chaty/admin/assets/js/acolorpicker.js
/*! * a-color-picker (https://github.com/narsenico/a-color-picker) * * Copyright (c) 2017-2018, Gianfranco Caldi. * Released under the MIT License. */ !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define("AColorPicker",[],t):"object"==typeof exports?exports.AColorPicker=t():e.AColorPicker=t()}("undefined"!=typeof self?self:this,function(){return function(e){var t={};function r(i){if(t[i])return t[i].exports;var o=t[i]={i:i,l:!1,exports:{}};return e[i].call(o.exports,o,o.exports,r),o.l=!0,o.exports}return r.m=e,r.c=t,r.d=function(e,t,i){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:i})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var i=Object.create(null);if(r.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)r.d(i,o,function(t){return e[t]}.bind(null,o));return i},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=1)}([function(e,t,r){"use strict"; /*! * is-plain-object
* * Copyright (c) 2014-2017, Jon Schlinkert. * Released under the MIT License. */var i=r(3);function o(e){return!0===i(e)&&"[object Object]"===Object.prototype.toString.call(e)}e.exports=function(e){var t,r;return!1!==o(e)&&"function"==typeof(t=e.constructor)&&!1!==o(r=t.prototype)&&!1!==r.hasOwnProperty("isPrototypeOf")}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.VERSION=t.PALETTE_MATERIAL_CHROME=t.PALETTE_MATERIAL_500=t.COLOR_NAMES=t.getLuminance=t.intToRgb=t.rgbToInt=t.rgbToHsv=t.rgbToHsl=t.hslToRgb=t.rgbToHex=t.parseColor=t.parseColorToHsla=t.parseColorToHsl=t.parseColorToRgba=t.parseColorToRgb=t.from=t.createPicker=void 0;var i=function(){function e(e,t){for(var r=0;r
-1,p="undefined"!=typeof window&&window.navigator.userAgent.indexOf("rv:")>-1,d={id:null,attachTo:"body",showHSL:!0,showRGB:!0,showHEX:!0,showAlpha:!1,color:"#ff0000",palette:null,paletteEditable:!1,useAlphaInPalette:"auto"},f=[232,150],g=[150,11],b=g,v="COLOR",m="RGBA_USER",A="HSLA_USER";function y(e,t,r){return e?e instanceof HTMLElement?e:e instanceof NodeList?e[0]:"string"==typeof e?document.querySelector(e):e.jquery?e.get(0):r?t:null:t}function k(e){var t=e.getContext("2d"),r=+e.width,i=+e.height,a=t.createLinearGradient(1,1,1,i-1);return a.addColorStop(0,"white"),a.addColorStop(1,"black"),{setHue:function(e){var o=t.createLinearGradient(1,0,r-1,0);o.addColorStop(0,"hsla("+e+", 100%, 50%, 0)"),o.addColorStop(1,"hsla("+e+", 100%, 50%, 1)"),t.fillStyle=a,t.fillRect(0,0,r,i),t.fillStyle=o,t.globalCompositeOperation="multiply",t.fillRect(0,0,r,i),t.globalCompositeOperation="source-over"},grabColor:function(e,r){return t.getImageData(e,r,1,1).data},findColor:function(e,t,a){var s=(0,n.rgbToHsv)(e,t,a),l=o(s,3),c=l[1],u=l[2];return[c*r,i-u*i]}}}function F(e,t,r){return null===e?t:/^\s*$/.test(e)?r:!!/true|yes|1/i.test(e)||!/false|no|0/i.test(e)&&t}var E=function(){function e(t,r){if(c(this,e),r?(t=y(t),this.options=Object.assign({},d,r)):t&&(0,a.default)(t)?(this.options=Object.assign({},d,t),t=y(this.options.attachTo)):(this.options=Object.assign({},d),t=y((0,n.nvl)(t,this.options.attachTo))),!t)throw new Error("Container not found: "+this.options.attachTo);!function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"acp-";if(t.hasAttribute(r+"show-hsl")&&(e.showHSL=F(t.getAttribute(r+"show-hsl"),d.showHSL,!0)),t.hasAttribute(r+"show-rgb")&&(e.showRGB=F(t.getAttribute(r+"show-rgb"),d.showRGB,!0)),t.hasAttribute(r+"show-hex")&&(e.showHEX=F(t.getAttribute(r+"show-hex"),d.showHEX,!0)),t.hasAttribute(r+"show-alpha")&&(e.showAlpha=F(t.getAttribute(r+"show-alpha"),d.showAlpha,!0)),t.hasAttribute(r+"palette-editable")&&(e.paletteEditable=F(t.getAttribute(r+"palette-editable"),d.paletteEditable,!0)),t.hasAttribute(r+"palette")){var i=t.getAttribute(r+"palette");switch(i){case"PALETTE_MATERIAL_500":e.palette=n.PALETTE_MATERIAL_500;break;case"PALETTE_MATERIAL_CHROME":case"":e.palette=n.PALETTE_MATERIAL_CHROME;break;default:e.palette=i.split(/[;|]/)}}t.hasAttribute(r+"color")&&(e.color=t.getAttribute(r+"color"))}(this.options,t),this.H=0,this.S=0,this.L=0,this.R=0,this.G=0,this.B=0,this.A=1,this.palette={},this.element=document.createElement("div"),this.options.id&&(this.element.id=this.options.id),this.element.className="a-color-picker",this.element.innerHTML=s.default,t.appendChild(this.element);var i=this.element.querySelector(".a-color-picker-h");this.setupHueCanvas(i),this.hueBarHelper=k(i),this.huePointer=this.element.querySelector(".a-color-picker-h+.a-color-picker-dot");var o=this.element.querySelector(".a-color-picker-sl");this.setupSlCanvas(o),this.slBarHelper=k(o),this.slPointer=this.element.querySelector(".a-color-picker-sl+.a-color-picker-dot"),this.preview=this.element.querySelector(".a-color-picker-preview"),this.setupClipboard(this.preview.querySelector(".a-color-picker-clipbaord")),this.options.showHSL?(this.setupInput(this.inputH=this.element.querySelector(".a-color-picker-hsl>input[nameref=H]")),this.setupInput(this.inputS=this.element.querySelector(".a-color-picker-hsl>input[nameref=S]")),this.setupInput(this.inputL=this.element.querySelector(".a-color-picker-hsl>input[nameref=L]"))):this.element.querySelector(".a-color-picker-hsl").remove(),this.options.showRGB?(this.setupInput(this.inputR=this.element.querySelector(".a-color-picker-rgb>input[nameref=R]")),this.setupInput(this.inputG=this.element.querySelector(".a-color-picker-rgb>input[nameref=G]")),this.setupInput(this.inputB=this.element.querySelector(".a-color-picker-rgb>input[nameref=B]"))):this.element.querySelector(".a-color-picker-rgb").remove(),this.options.showHEX?this.setupInput(this.inputRGBHEX=this.element.querySelector("input[nameref=RGBHEX]")):this.element.querySelector(".a-color-picker-rgbhex").remove(),this.options.paletteEditable||this.options.palette&&this.options.palette.length>0?this.setPalette(this.element.querySelector(".a-color-picker-palette")):this.element.querySelector(".a-color-picker-palette").remove(),this.options.showAlpha?(this.setupAlphaCanvas(this.element.querySelector(".a-color-picker-a")),this.alphaPointer=this.element.querySelector(".a-color-picker-a+.a-color-picker-dot")):this.element.querySelector(".a-color-picker-alpha").remove(),this.onValueChanged(v,this.options.color)}return i(e,[{key:"setupHueCanvas",value:function(e){var t=this;e.width=g[0],e.height=g[1];for(var r=e.getContext("2d"),i=r.createLinearGradient(0,0,g[0],0),o=0;o<=1;o+=1/360)i.addColorStop(o,"hsl("+360*o+", 100%, 50%)");r.fillStyle=i,r.fillRect(0,0,g[0],g[1]);var a=function(r){var i=(0,n.limit)(r.clientX-e.getBoundingClientRect().left,0,g[0]),o=Math.round(360*i/g[0]);t.huePointer.style.left=i-7+"px",t.onValueChanged("H",o)},s=function e(){document.removeEventListener("mousemove",a),document.removeEventListener("mouseup",e)};e.addEventListener("mousedown",function(e){a(e),document.addEventListener("mousemove",a),document.addEventListener("mouseup",s)})}},{key:"setupSlCanvas",value:function(e){var t=this;e.width=f[0],e.height=f[1];var r=function(r){var i=(0,n.limit)(r.clientX-e.getBoundingClientRect().left,0,f[0]-1),o=(0,n.limit)(r.clientY-e.getBoundingClientRect().top,0,f[1]-1),a=t.slBarHelper.grabColor(i,o);t.slPointer.style.left=i-7+"px",t.slPointer.style.top=o-7+"px",t.onValueChanged("RGB",a)},i=function e(){document.removeEventListener("mousemove",r),document.removeEventListener("mouseup",e)};e.addEventListener("mousedown",function(e){r(e),document.addEventListener("mousemove",r),document.addEventListener("mouseup",i)})}},{key:"setupAlphaCanvas",value:function(e){var t=this;e.width=b[0],e.height=b[1];var r=e.getContext("2d"),i=r.createLinearGradient(0,0,e.width-1,0);i.addColorStop(0,"hsla(0, 0%, 50%, 0)"),i.addColorStop(1,"hsla(0, 0%, 50%, 1)"),r.fillStyle=i,r.fillRect(0,0,b[0],b[1]);var o=function(r){var i=(0,n.limit)(r.clientX-e.getBoundingClientRect().left,0,b[0]),o=+(i/b[0]).toFixed(2);t.alphaPointer.style.left=i-7+"px",t.onValueChanged("ALPHA",o)},a=function e(){document.removeEventListener("mousemove",o),document.removeEventListener("mouseup",e)};e.addEventListener("mousedown",function(e){o(e),document.addEventListener("mousemove",o),document.addEventListener("mouseup",a)})}},{key:"setupInput",value:function(e){var t=this,r=+e.min,i=+e.max,o=e.getAttribute("nameref");e.hasAttribute("select-on-focus")&&e.addEventListener("focus",function(){e.select()}),"text"===e.type?e.addEventListener("change",function(){t.onValueChanged(o,e.value)}):((h||p)&&e.addEventListener("keydown",function(a){"Up"===a.key?(e.value=(0,n.limit)(+e.value+1,r,i),t.onValueChanged(o,e.value),a.returnValue=!1):"Down"===a.key&&(e.value=(0,n.limit)(+e.value-1,r,i),t.onValueChanged(o,e.value),a.returnValue=!1)}),e.addEventListener("change",function(){var a=+e.value;t.onValueChanged(o,(0,n.limit)(a,r,i))}))}},{key:"setupClipboard",value:function(e){var t=this;e.title="click to copy",e.addEventListener("click",function(){e.value=(0,n.parseColor)([t.R,t.G,t.B,t.A],"hexcss4"),e.select(),document.execCommand("copy")})}},{key:"setPalette",value:function(e){var t=this,r="auto"===this.options.useAlphaInPalette?this.options.showAlpha:this.options.useAlphaInPalette,i=void 0;switch(this.options.palette){case"PALETTE_MATERIAL_500":i=n.PALETTE_MATERIAL_500;break;case"PALETTE_MATERIAL_CHROME":i=n.PALETTE_MATERIAL_CHROME;break;default:i=(0,n.ensureArray)(this.options.palette)}if(this.options.paletteEditable||i.length>0){var o=function(r,i,o){var n=e.querySelector('.a-color-picker-palette-color[data-color="'+r+'"]')||document.createElement("div");n.className="a-color-picker-palette-color",n.style.backgroundColor=r,n.setAttribute("data-color",r),n.title=r,e.insertBefore(n,i),t.palette[r]=!0,o&&t.onPaletteColorAdd(r)},a=function(r,i){r?(e.removeChild(r),t.palette[r.getAttribute("data-color")]=!1,i&&t.onPaletteColorRemove(r.getAttribute("data-color"))):(e.querySelectorAll(".a-color-picker-palette-color[data-color]").forEach(function(t){e.removeChild(t)}),Object.keys(t.palette).forEach(function(e){t.palette[e]=!1}),i&&t.onPaletteColorRemove())};if(i.map(function(e){return(0,n.parseColor)(e,r?"rgbcss4":"hex")}).filter(function(e){return!!e}).forEach(function(e){return o(e)}),this.options.paletteEditable){var s=document.createElement("div");s.className="a-color-picker-palette-color a-color-picker-palette-add",s.innerHTML="+",e.appendChild(s),e.addEventListener("click",function(e){/a-color-picker-palette-add/.test(e.target.className)?e.shiftKey?a(null,!0):o(r?(0,n.parseColor)([t.R,t.G,t.B,t.A],"rgbcss4"):(0,n.rgbToHex)(t.R,t.G,t.B),e.target,!0):/a-color-picker-palette-color/.test(e.target.className)&&(e.shiftKey?a(e.target,!0):t.onValueChanged(v,e.target.getAttribute("data-color")))})}else e.addEventListener("click",function(e){/a-color-picker-palette-color/.test(e.target.className)&&t.onValueChanged(v,e.target.getAttribute("data-color"))})}else e.style.display="none"}},{key:"onValueChanged",value:function(e,t){switch(e){case"H":this.H=t;var r=(0,n.hslToRgb)(this.H,this.S,this.L),i=o(r,3);this.R=i[0],this.G=i[1],this.B=i[2],this.slBarHelper.setHue(t),this.updatePointerH(this.H),this.updateInputHSL(this.H,this.S,this.L),this.updateInputRGB(this.R,this.G,this.B),this.updateInputRGBHEX(this.R,this.G,this.B);break;case"S":this.S=t;var a=(0,n.hslToRgb)(this.H,this.S,this.L),s=o(a,3);this.R=s[0],this.G=s[1],this.B=s[2],this.updatePointerSL(this.H,this.S,this.L),this.updateInputHSL(this.H,this.S,this.L),this.updateInputRGB(this.R,this.G,this.B),this.updateInputRGBHEX(this.R,this.G,this.B);break;case"L":this.L=t;var l=(0,n.hslToRgb)(this.H,this.S,this.L),c=o(l,3);this.R=c[0],this.G=c[1],this.B=c[2],this.updatePointerSL(this.H,this.S,this.L),this.updateInputHSL(this.H,this.S,this.L),this.updateInputRGB(this.R,this.G,this.B),this.updateInputRGBHEX(this.R,this.G,this.B);break;case"R":this.R=t;var u=(0,n.rgbToHsl)(this.R,this.G,this.B),h=o(u,3);this.H=h[0],this.S=h[1],this.L=h[2],this.slBarHelper.setHue(this.H),this.updatePointerH(this.H),this.updatePointerSL(this.H,this.S,this.L),this.updateInputHSL(this.H,this.S,this.L),this.updateInputRGBHEX(this.R,this.G,this.B);break;case"G":this.G=t;var p=(0,n.rgbToHsl)(this.R,this.G,this.B),d=o(p,3);this.H=d[0],this.S=d[1],this.L=d[2],this.slBarHelper.setHue(this.H),this.updatePointerH(this.H),this.updatePointerSL(this.H,this.S,this.L),this.updateInputHSL(this.H,this.S,this.L),this.updateInputRGBHEX(this.R,this.G,this.B);break;case"B":this.B=t;var f=(0,n.rgbToHsl)(this.R,this.G,this.B),g=o(f,3);this.H=g[0],this.S=g[1],this.L=g[2],this.slBarHelper.setHue(this.H),this.updatePointerH(this.H),this.updatePointerSL(this.H,this.S,this.L),this.updateInputHSL(this.H,this.S,this.L),this.updateInputRGBHEX(this.R,this.G,this.B);break;case"RGB":var b=o(t,3);this.R=b[0],this.G=b[1],this.B=b[2];var y=(0,n.rgbToHsl)(this.R,this.G,this.B),k=o(y,3);this.H=k[0],this.S=k[1],this.L=k[2],this.updateInputHSL(this.H,this.S,this.L),this.updateInputRGB(this.R,this.G,this.B),this.updateInputRGBHEX(this.R,this.G,this.B);break;case m:var F=o(t,4);this.R=F[0],this.G=F[1],this.B=F[2],this.A=F[3];var E=(0,n.rgbToHsl)(this.R,this.G,this.B),H=o(E,3);this.H=H[0],this.S=H[1],this.L=H[2],this.slBarHelper.setHue(this.H),this.updatePointerH(this.H),this.updatePointerSL(this.H,this.S,this.L),this.updateInputHSL(this.H,this.S,this.L),this.updateInputRGB(this.R,this.G,this.B),this.updateInputRGBHEX(this.R,this.G,this.B),this.updatePointerA(this.A);break;case A:var C=o(t,4);this.H=C[0],this.S=C[1],this.L=C[2],this.A=C[3];var R=(0,n.hslToRgb)(this.H,this.S,this.L),B=o(R,3);this.R=B[0],this.G=B[1],this.B=B[2],this.slBarHelper.setHue(this.H),this.updatePointerH(this.H),this.updatePointerSL(this.H,this.S,this.L),this.updateInputHSL(this.H,this.S,this.L),this.updateInputRGB(this.R,this.G,this.B),this.updateInputRGBHEX(this.R,this.G,this.B),this.updatePointerA(this.A);break;case"RGBHEX":var L=(0,n.cssColorToRgb)(t)||[this.R,this.G,this.B],T=o(L,3);this.R=T[0],this.G=T[1],this.B=T[2];var w=(0,n.rgbToHsl)(this.R,this.G,this.B),x=o(w,3);this.H=x[0],this.S=x[1],this.L=x[2],this.slBarHelper.setHue(this.H),this.updatePointerH(this.H),this.updatePointerSL(this.H,this.S,this.L),this.updateInputHSL(this.H,this.S,this.L),this.updateInputRGB(this.R,this.G,this.B);break;case v:var S=(0,n.parseColor)(t,"rgba")||[0,0,0,1],G=o(S,4);this.R=G[0],this.G=G[1],this.B=G[2],this.A=G[3];var I=(0,n.rgbToHsl)(this.R,this.G,this.B),P=o(I,3);this.H=P[0],this.S=P[1],this.L=P[2],this.slBarHelper.setHue(this.H),this.updatePointerH(this.H),this.updatePointerSL(this.H,this.S,this.L),this.updateInputHSL(this.H,this.S,this.L),this.updateInputRGB(this.R,this.G,this.B),this.updateInputRGBHEX(this.R,this.G,this.B),this.updatePointerA(this.A);break;case"ALPHA":this.A=t}this.onColorChanged(this.R,this.G,this.B,this.A)}},{key:"onColorChanged",value:function(e,t,r,i){this.preview.style.backgroundColor=1===i?"rgb("+e+","+t+","+r+")":"rgba("+e+","+t+","+r+","+i+")",this.onchange&&this.onchange(this.preview.style.backgroundColor)}},{key:"onPaletteColorAdd",value:function(e){this.oncoloradd&&this.oncoloradd(e)}},{key:"onPaletteColorRemove",value:function(e){this.oncolorremove&&this.oncolorremove(e)}},{key:"updateInputHSL",value:function(e,t,r){this.options.showHSL&&(this.inputH.value=e,this.inputS.value=t,this.inputL.value=r)}},{key:"updateInputRGB",value:function(e,t,r){this.options.showRGB&&(this.inputR.value=e,this.inputG.value=t,this.inputB.value=r)}},{key:"updateInputRGBHEX",value:function(e,t,r){this.options.showHEX&&(this.inputRGBHEX.value=(0,n.rgbToHex)(e,t,r))}},{key:"updatePointerH",value:function(e){var t=g[0]*e/360;this.huePointer.style.left=t-7+"px"}},{key:"updatePointerSL",value:function(e,t,r){var i=(0,n.hslToRgb)(e,t,r),a=o(i,3),s=a[0],l=a[1],c=a[2],u=this.slBarHelper.findColor(s,l,c),h=o(u,2),p=h[0],d=h[1];p>=0&&(this.slPointer.style.left=p-7+"px",this.slPointer.style.top=d-7+"px")}},{key:"updatePointerA",value:function(e){if(this.options.showAlpha){var t=b[0]*e;this.alphaPointer.style.left=t-7+"px"}}}]),e}(),H=function(){function e(t){c(this,e),this.name=t,this.listeners=[]}return i(e,[{key:"on",value:function(e){e&&this.listeners.push(e)}},{key:"off",value:function(e){this.listeners=e?this.listeners.filter(function(t){return t!==e}):[]}},{key:"emit",value:function(e,t){for(var r=this.listeners.slice(0),i=0;i
style[data-source="a-color-picker"]')){var R=r(5).toString(),B=document.createElement("style");B.setAttribute("type","text/css"),B.setAttribute("data-source","a-color-picker"),B.innerHTML=R,document.querySelector("head").appendChild(B)}t.createPicker=C,t.from=function(e,t){var r=function(e){return e?Array.isArray(e)?e:e instanceof HTMLElement?[e]:e instanceof NodeList?[].concat(u(e)):"string"==typeof e?[].concat(u(document.querySelectorAll(e))):e.jquery?e.get():[]:[]}(e).map(function(e,r){var i=C(e,t);return i.index=r,i});return r.on=function(e,t){return r.forEach(function(r){return r.on(e,t)}),this},r.off=function(e){return r.forEach(function(t){return t.off(e)}),this},r},t.parseColorToRgb=n.parseColorToRgb,t.parseColorToRgba=n.parseColorToRgba,t.parseColorToHsl=n.parseColorToHsl,t.parseColorToHsla=n.parseColorToHsla,t.parseColor=n.parseColor,t.rgbToHex=n.rgbToHex,t.hslToRgb=n.hslToRgb,t.rgbToHsl=n.rgbToHsl,t.rgbToHsv=n.rgbToHsv,t.rgbToInt=n.rgbToInt,t.intToRgb=n.intToRgb,t.getLuminance=n.getLuminance,t.COLOR_NAMES=n.COLOR_NAMES,t.PALETTE_MATERIAL_500=n.PALETTE_MATERIAL_500,t.PALETTE_MATERIAL_CHROME=n.PALETTE_MATERIAL_CHROME,t.VERSION="1.1.8"},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.nvl=t.ensureArray=t.limit=t.getLuminance=t.parseColor=t.parseColorToHsla=t.parseColorToHsl=t.cssHslaToHsla=t.cssHslToHsl=t.parseColorToRgba=t.parseColorToRgb=t.cssRgbaToRgba=t.cssRgbToRgb=t.cssColorToRgba=t.cssColorToRgb=t.intToRgb=t.rgbToInt=t.rgbToHsv=t.rgbToHsl=t.hslToRgb=t.rgbToHex=t.PALETTE_MATERIAL_CHROME=t.PALETTE_MATERIAL_500=t.COLOR_NAMES=void 0;var i=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var r=[],i=!0,o=!1,n=void 0;try{for(var a,s=e[Symbol.iterator]();!(i=(a=s.next()).done)&&(r.push(a.value),!t||r.length!==t);i=!0);}catch(e){o=!0,n=e}finally{try{!i&&s.return&&s.return()}finally{if(o)throw n}}return r}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")},o=function(e){return e&&e.__esModule?e:{default:e}}(r(0));function n(e){if(Array.isArray(e)){for(var t=0,r=Array(e.length);t
r?r:e}function l(e,t){return null==e?t:e}function c(e,t,r){var i=[s(e,0,255),s(t,0,255),s(r,0,255)];return"#"+("000000"+((e=i[0])<<16|(t=i[1])<<8|(r=i[2])).toString(16)).slice(-6)}function u(e,t,r){var i=void 0,o=void 0,n=void 0,a=[s(e,0,360)/360,s(t,0,100)/100,s(r,0,100)/100];if(e=a[0],r=a[2],0==(t=a[1]))i=o=n=r;else{var l=function(e,t,r){return r<0&&(r+=1),r>1&&(r-=1),r<1/6?e+6*(t-e)*r:r<.5?t:r<2/3?e+(t-e)*(2/3-r)*6:e},c=r<.5?r*(1+t):r+t-r*t,u=2*r-c;i=l(u,c,e+1/3),o=l(u,c,e),n=l(u,c,e-1/3)}return[255*i,255*o,255*n].map(Math.round)}function h(e,t,r){var i=[s(e,0,255)/255,s(t,0,255)/255,s(r,0,255)/255];e=i[0],t=i[1],r=i[2];var o=Math.max(e,t,r),n=Math.min(e,t,r),a=void 0,l=void 0,c=(o+n)/2;if(o==n)a=l=0;else{var u=o-n;switch(l=c>.5?u/(2-o-n):u/(o+n),o){case e:a=(t-r)/u+(t
>16&255,e>>8&255,255&e]},t.cssColorToRgb=d,t.cssColorToRgba=f,t.cssRgbToRgb=g,t.cssRgbaToRgba=b,t.parseColorToRgb=function(e){return Array.isArray(e)?e=[s(e[0],0,255),s(e[1],0,255),s(e[2],0,255)]:d(e)||g(e)},t.parseColorToRgba=v,t.cssHslToHsl=m,t.cssHslaToHsla=A,t.parseColorToHsl=function(e){return Array.isArray(e)?e=[s(e[0],0,360),s(e[1],0,100),s(e[2],0,100)]:m(e)},t.parseColorToHsla=y,t.parseColor=function(e,t){if(t=t||"rgb",null!=e){var r=void 0;if((r=v(e))||(r=y(e))&&(r=[].concat(n(u.apply(void 0,n(r))),[r[3]])))return(0,o.default)(t)?["rgb","rgbcss","rgbcss4","rgba","rgbacss","hsl","hslcss","hslcss4","hsla","hslacss","hex","hexcss4","int"].reduce(function(e,t){return e[t]=k(r,t),e},t||{}):k(r,t.toString().toLowerCase())}},t.getLuminance=function(e,t,r){return.2126*(e=(e/=255)<.03928?e/12.92:Math.pow((e+.055)/1.055,2.4))+.7152*(t=(t/=255)<.03928?t/12.92:Math.pow((t+.055)/1.055,2.4))+.0722*((r/=255)<.03928?r/12.92:Math.pow((r+.055)/1.055,2.4))},t.limit=s,t.ensureArray=function(e){return e?Array.from(e):[]},t.nvl=l},function(e,t,r){"use strict"; /*! * isobject
* * Copyright (c) 2014-2017, Jon Schlinkert. * Released under the MIT License. */e.exports=function(e){return null!=e&&"object"==typeof e&&!1===Array.isArray(e)}},function(e,t){e.exports='
H
S
L
R
G
B
HEX
'},function(e,t,r){var i=r(6);e.exports="string"==typeof i?i:i.toString()},function(e,t,r){(e.exports=r(7)(!1)).push([e.i,"/*!\n * a-color-picker\n * https://github.com/narsenico/a-color-picker\n * \n * Copyright (c) 2017-2018, Gianfranco Caldi.\n * Released under the MIT License.\n */.a-color-picker{background-color:#fff;padding:0;display:inline-flex;flex-direction:column;user-select:none;width:232px;font:400 10px Helvetica,Arial,sans-serif;border-radius:3px;box-shadow:0 0 0 1px rgba(0,0,0,.05),0 2px 4px rgba(0,0,0,.25)}.a-color-picker,.a-color-picker-row,.a-color-picker input{box-sizing:border-box}.a-color-picker-row{padding:15px;display:flex;flex-direction:row;align-items:center;justify-content:space-between;user-select:none}.a-color-picker-row-top{padding:0}.a-color-picker-row:not(:first-child){border-top:1px solid #f5f5f5}.a-color-picker-column{display:flex;flex-direction:column}.a-color-picker-cell{flex:1 1 auto;margin-bottom:4px}.a-color-picker-cell:last-child{margin-bottom:0}.a-color-picker-stack{position:relative}.a-color-picker-dot{position:absolute;width:14px;height:14px;top:0;left:0;background:#fff;pointer-events:none;border-radius:50px;z-index:1000;box-shadow:0 1px 2px rgba(0,0,0,.75)}.a-color-picker-a,.a-color-picker-h,.a-color-picker-sl{cursor:cell}.a-color-picker-a+.a-color-picker-dot,.a-color-picker-h+.a-color-picker-dot{top:-2px}.a-color-picker-a,.a-color-picker-h{border-radius:2px}.a-color-picker-preview{box-sizing:border-box;width:30px;height:30px;user-select:none;border-radius:15px}.a-color-picker-circle{border-radius:50px;border:1px solid #eee}.a-color-picker-hsl,.a-color-picker-rgb,.a-color-picker-single-input{justify-content:space-evenly}.a-color-picker-hsl>label,.a-color-picker-rgb>label,.a-color-picker-single-input>label{padding:0 8px;flex:0 0 auto;color:#969696}.a-color-picker-hsl>input,.a-color-picker-rgb>input,.a-color-picker-single-input>input{text-align:center;padding:2px 0;width:0;flex:1 1 auto;border:1px solid #e0e0e0;line-height:20px}.a-color-picker-hsl>input::-webkit-inner-spin-button,.a-color-picker-rgb>input::-webkit-inner-spin-button,.a-color-picker-single-input>input::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}.a-color-picker-hsl>input:focus,.a-color-picker-rgb>input:focus,.a-color-picker-single-input>input:focus{border-color:#04a9f4;outline:none}.a-color-picker-transparent{background-image:linear-gradient(-45deg,#cdcdcd 25%,transparent 0),linear-gradient(45deg,#cdcdcd 25%,transparent 0),linear-gradient(-45deg,transparent 75%,#cdcdcd 0),linear-gradient(45deg,transparent 75%,#cdcdcd 0);background-size:11px 11px;background-position:0 0,0 -5.5px,-5.5px 5.5px,5.5px 0}.a-color-picker-sl{border-radius:3px 3px 0 0}.a-color-picker.hide-alpha [show-on-alpha],.a-color-picker.hide-hsl [show-on-hsl],.a-color-picker.hide-rgb [show-on-rgb],.a-color-picker.hide-single-input [show-on-single-input]{display:none}.a-color-picker-clipbaord{width:100%;height:100%;opacity:0;cursor:pointer}.a-color-picker-palette{flex-flow:wrap;flex-direction:row;justify-content:flex-start;padding:10px}.a-color-picker-palette-color{width:15px;height:15px;flex:0 1 15px;margin:3px;box-sizing:border-box;cursor:pointer;border-radius:3px;box-shadow:inset 0 0 0 1px rgba(0,0,0,.1)}.a-color-picker-palette-add{text-align:center;line-height:13px;color:#607d8b}",""])},function(e,t){e.exports=function(e){var t=[];return t.toString=function(){return this.map(function(t){var r=function(e,t){var r=e[1]||"",i=e[3];if(!i)return r;if(t&&"function"==typeof btoa){var o=function(e){return"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(e))))+" */"}(i),n=i.sources.map(function(e){return"/*# sourceURL="+i.sourceRoot+e+" */"});return[r].concat(n).concat([o]).join("\n")}return[r].join("\n")}(t,e);return t[2]?"@media "+t[2]+"{"+r+"}":r}).join("")},t.i=function(e,r){"string"==typeof e&&(e=[[null,e,""]]);for(var i={},o=0;o