Socket
Socket
Sign inDemoInstall

simple-color-picker

Package Overview
Dependencies
11
Maintainers
1
Versions
18
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.0.9 to 0.1.0

index.d.ts

4

example/example-build.js

@@ -1,2 +0,2 @@

(function t(e,r,n){function i(a,s){if(!r[a]){if(!e[a]){var u=typeof require=="function"&&require;if(!s&&u)return u(a,!0);if(o)return o(a,!0);var f=new Error("Cannot find module '"+a+"'");throw f.code="MODULE_NOT_FOUND",f}var l=r[a]={exports:{}};e[a][0].call(l.exports,function(t){var r=e[a][1][t];return i(r?r:t)},l,l.exports,t,e,r,n)}return r[a].exports}var o=typeof require=="function"&&require;for(var a=0;a<n.length;a++)i(n[a]);return i})({1:[function(t,e,r){"use strict";var n=t("domready");var i=t("../index.js");n(function(){var t=new i({el:document.body,color:"#123456",background:"#656565"});t.onChange(function(e){document.body.style.background=e;document.querySelector("h1 a").style.color=t.color.isDark()?"#FFFFFF":"#000000"})})},{"../index.js":2,domready:9}],2:[function(t,e,r){"use strict";var n=t("lodash.bindall");var i=t("dom-transform");var o=t("tinycolor2");var a=t("component-emitter");var s=t("is-number");var u=t("./src/utils/dom/offset");var f=t("./src/utils/maths/clamp");function l(t){t=t||{};this.color=null;this.width=0;this.height=0;this.hue=0;this.choosing=false;this.position={x:0,y:0};this.huePosition=0;this.saturationWidth=0;this.maxHue=0;this.inputIsNumber=false;n(this,"_onSaturationMouseMove","_onSaturationMouseDown","_onSaturationMouseUp","_onHueMouseDown","_onHueMouseUp","_onHueMouseMove");this.$el=document.createElement("div");this.$el.className="Scp";this.$el.innerHTML=['<div class="Scp-saturation">','<div class="Scp-brightness"></div>','<div class="Scp-sbSelector"></div>',"</div>",'<div class="Scp-hue">','<div class="Scp-hSelector"></div>',"</div>"].join("\n");this.$saturation=this.$el.querySelector(".Scp-saturation");this.$hue=this.$el.querySelector(".Scp-hue");this.$sbSelector=this.$el.querySelector(".Scp-sbSelector");this.$hSelector=this.$el.querySelector(".Scp-hSelector");this.$saturation.addEventListener("mousedown",this._onSaturationMouseDown);this.$hue.addEventListener("mousedown",this._onHueMouseDown);if(t.el){this.appendTo(t.el)}if(t.background){this.setBackgroundColor(t.background)}this.setSize(t.width||175,t.height||150);this.setColor(t.color);return this}a(l.prototype);l.prototype.appendTo=function(t){t.appendChild(this.$el);return this};l.prototype.remove=function(){this.$saturation.removeEventListener("mousedown",this._onSaturationMouseDown);this.$hue.removeEventListener("mousedown",this._onHueMouseDown);this._onSaturationMouseUp();this._onHueMouseUp();this.off();if(this.$el.parentNode){this.$el.parentNode.removeChild(this.$el)}};l.prototype.setColor=function(t){if(s(t)){this.inputIsNumber=true;t="#"+("00000"+(t|0).toString(16)).substr(-6)}else{this.inputIsNumber=false}this.color=o(t);var e=this.color.toHsv();if(!isNaN(e.h)){this.hue=e.h}this._moveSelectorTo(this.saturationWidth*e.s,(1-e.v)*this.height);this._moveHueTo((1-this.hue/360)*this.height);this._updateHue();return this};l.prototype.setSize=function(t,e){this.width=t;this.height=e;this.$el.style.width=this.width+"px";this.$el.style.height=this.height+"px";this.saturationWidth=this.width-25;this.maxHue=this.height-2;return this};l.prototype.setBackgroundColor=function(t){if(s(t)){t="#"+("00000"+(t|0).toString(16)).substr(-6)}this.$el.style.padding="5px";this.$el.style.background=o(t).toHexString()};l.prototype.setNoBackground=function(){this.$el.style.padding="0px";this.$el.style.background="none"};l.prototype.onChange=function(t){this.on("update",t);this.emit("update",this.getHexString());return this};l.prototype.getColor=function(){if(this.inputIsNumber){return this.getHexNumber()}return this.color.toString()};l.prototype.getHexString=function(){return this.color.toHexString().toUpperCase()};l.prototype.getHexNumber=function(){return parseInt(this.color.toHex(),16)};l.prototype.getRGB=function(){return this.color.toRgb()};l.prototype.getHSV=function(){return this.color.toHsv()};l.prototype.isDark=function(){return this.color.isDark()};l.prototype.isLight=function(){return this.color.isLight()};l.prototype._moveSelectorTo=function(t,e){this.position.x=f(t,0,this.saturationWidth);this.position.y=f(e,0,this.height);i(this.$sbSelector,{x:this.position.x,y:this.position.y})};l.prototype._updateColorFromPosition=function(){this.color=o({h:this.hue,s:this.position.x/this.saturationWidth,v:1-this.position.y/this.height});this._updateColor()};l.prototype._moveHueTo=function(t){this.huePosition=f(t,0,this.maxHue);i(this.$hSelector,{y:this.huePosition})};l.prototype._updateHueFromPosition=function(){var t=this.color.toHsv();this.hue=360*(1-this.huePosition/this.maxHue);this.color=o({h:this.hue,s:t.s,v:t.v});this._updateHue()};l.prototype._updateHue=function(){var t=o({h:this.hue,s:1,v:1});this.$saturation.style.background="linear-gradient(to right, #fff 0%, "+t.toHexString()+" 100%)";this._updateColor()};l.prototype._updateColor=function(){this.$sbSelector.style.background=this.color.toHexString();this.$sbSelector.style.borderColor=this.color.isDark()?"#FFF":"#000";this.emit("update",this.color.toHexString())};l.prototype._onSaturationMouseDown=function(t){this.choosing=true;var e=u(this.$saturation);this._moveSelectorTo(t.clientX-e.left,t.clientY-e.top);this._updateColorFromPosition();window.addEventListener("mouseup",this._onSaturationMouseUp);window.addEventListener("mousemove",this._onSaturationMouseMove);t.preventDefault()};l.prototype._onSaturationMouseMove=function(t){var e=u(this.$saturation);this._moveSelectorTo(t.clientX-e.left,t.clientY-e.top);this._updateColorFromPosition()};l.prototype._onSaturationMouseUp=function(){this.choosing=false;window.removeEventListener("mouseup",this._onSaturationMouseUp);window.removeEventListener("mousemove",this._onSaturationMouseMove)};l.prototype._onHueMouseDown=function(t){this.choosing=true;var e=u(this.$hue);this._moveHueTo(t.clientY-e.top);this._updateHueFromPosition();window.addEventListener("mouseup",this._onHueMouseUp);window.addEventListener("mousemove",this._onHueMouseMove);t.preventDefault()};l.prototype._onHueMouseMove=function(t){var e=u(this.$hue);this._moveHueTo(t.clientY-e.top);this._updateHueFromPosition()};l.prototype._onHueMouseUp=function(){this.choosing=false;window.removeEventListener("mouseup",this._onHueMouseUp);window.removeEventListener("mousemove",this._onHueMouseMove)};e.exports=l},{"./src/utils/dom/offset":27,"./src/utils/maths/clamp":28,"component-emitter":3,"dom-transform":4,"is-number":10,"lodash.bindall":11,tinycolor2:26}],3:[function(t,e,r){e.exports=n;function n(t){if(t)return i(t)}function i(t){for(var e in n.prototype){t[e]=n.prototype[e]}return t}n.prototype.on=n.prototype.addEventListener=function(t,e){this._callbacks=this._callbacks||{};(this._callbacks["$"+t]=this._callbacks["$"+t]||[]).push(e);return this};n.prototype.once=function(t,e){function r(){this.off(t,r);e.apply(this,arguments)}r.fn=e;this.on(t,r);return this};n.prototype.off=n.prototype.removeListener=n.prototype.removeAllListeners=n.prototype.removeEventListener=function(t,e){this._callbacks=this._callbacks||{};if(0==arguments.length){this._callbacks={};return this}var r=this._callbacks["$"+t];if(!r)return this;if(1==arguments.length){delete this._callbacks["$"+t];return this}var n;for(var i=0;i<r.length;i++){n=r[i];if(n===e||n.fn===e){r.splice(i,1);break}}return this};n.prototype.emit=function(t){this._callbacks=this._callbacks||{};var e=[].slice.call(arguments,1),r=this._callbacks["$"+t];if(r){r=r.slice(0);for(var n=0,i=r.length;n<i;++n){r[n].apply(this,e)}}return this};n.prototype.listeners=function(t){this._callbacks=this._callbacks||{};return this._callbacks["$"+t]||[]};n.prototype.hasListeners=function(t){return!!this.listeners(t).length}},{}],4:[function(t,e,r){"use strict";var n=t("trim");var i=t("prefix");var o=i("transform");var a=i("transformOrigin");var s=t("./lib/properties");var u=Object.prototype.hasOwnProperty;var f={x:"translateX",y:"translateY",z:"translateZ"};r=e.exports=l;function l(t,e){var r=[];var n;var i;var l;for(n in e){l=e[n];i=u.call(f,n)?i=f[n]:i=n;if(u.call(s,i)){r.push(s[i](g(l)));continue}if(i==="origin"){t.style[a]=l;continue}console.warn(i,"is not a valid property")}t.style[o]=r.join(" ")}r.get=h;function h(t){return d(t)}r.none=c;function c(t){t.style[o]="";t.style[a]=""}r.isSupported=p;function p(){return o.length>0}function d(t){return t.style[o]}function g(t){if(typeof t==="number"){t+=""}else{t=n(t)}return t}},{"./lib/properties":6,prefix:7,trim:8}],5:[function(t,e,r){"use strict";r=e.exports=n;function n(){var t=arguments;return function(){var e=arguments;for(var r=t.length-1;r>=0;r--){e=[t[r].apply(this,e)]}return e[0]}}},{}],6:[function(t,e,r){"use strict";var n=t("trim");var i=t("./compose");var o=/^-?\d+(\.\d+)?$/;e.exports={translate:i(function(t){return"translate("+t+")"},s("px"),a),translate3d:i(function(t){return"translate3d("+t+")"},s("px"),a),translateX:i(function(t){return"translateX("+t+")"},s("px")),translateY:i(function(t){return"translateY("+t+")"},s("px")),translateZ:i(function(t){return"translateZ("+t+")"},s("px")),scale:i(function(t){return"scale("+t+")"},a),scale3d:i(function(t){return"scale3d("+t+")"},a),scaleX:function(t){return"scaleX("+t+")"},scaleY:function(t){return"scaleY("+t+")"},scaleZ:function(t){return"scaleZ("+t+")"},rotate:i(function(t){return"rotate("+t+")"},s("deg"),a),rotate3d:i(function(t){return"rotate3d("+t+")"},a),rotateX:i(function(t){return"rotateX("+t+")"},s("deg")),rotateY:i(function(t){return"rotateY("+t+")"},s("deg")),rotateZ:i(function(t){return"rotateZ("+t+")"},s("deg")),skew:i(function(t){return"skew("+t+")"},s("deg"),a),skewX:i(function(t){return"skewX("+t+")"},s("deg")),skewY:i(function(t){return"skewY("+t+")"},s("deg")),matrix:i(function(t){return"matrix("+t+")"},a),matrix3d:i(function(t){return"matrix3d("+t+")"},a),perspective:i(function(t){return"perspective("+t+")"},s("px"))};function a(t){if(!/,/.test(t)){t=t.split(" ").join(",")}return t}function s(t){return function(e){return e.split(",").map(function(e){e=n(e);if(o.test(e)){e+=t}return e}).join(",")}}},{"./compose":5,trim:8}],7:[function(t,e,r){var n=document.createElement("p").style;var i="O ms Moz webkit".split(" ");var o=/([A-Z])/g;var a={};e.exports=r=function(t){return t in a?a[t]:a[t]=s(t)};r.prefix=s;r.dash=f;function s(t){t=t.replace(/-([a-z])/g,function(t,e){return e.toUpperCase()});if(n[t]!==undefined)return t;var e=u(t);var r=i.length;while(r--){var o=i[r]+e;if(n[o]!==undefined)return o}throw new Error("unable to prefix "+t)}function u(t){return t.charAt(0).toUpperCase()+t.slice(1)}function f(t){t=s(t);if(o.test(t))t="-"+t.replace(o,"-$1");return t.toLowerCase()}},{}],8:[function(t,e,r){r=e.exports=n;function n(t){return t.replace(/^\s*|\s*$/g,"")}r.left=function(t){return t.replace(/^\s*/,"")};r.right=function(t){return t.replace(/\s*$/,"")}},{}],9:[function(t,e,r){!function(t,r){if(typeof e!="undefined")e.exports=r();else if(typeof define=="function"&&typeof define.amd=="object")define(r);else this[t]=r()}("domready",function(){var t=[],e,r=document,n=r.documentElement.doScroll,i="DOMContentLoaded",o=(n?/^loaded|^c/:/^loaded|^i|^c/).test(r.readyState);if(!o)r.addEventListener(i,e=function(){r.removeEventListener(i,e);o=1;while(e=t.shift())e()});return function(e){o?setTimeout(e,0):t.push(e)}})},{}],10:[function(t,e,r){"use strict";e.exports=function n(t){return!!+t&&!Array.isArray(t)&&isFinite(t)||t==="0"||t===0}},{}],11:[function(t,e,r){var n=t("lodash._baseflatten"),i=t("lodash._createwrapper"),o=t("lodash.functions"),a=t("lodash.restparam");var s=1;var u=a(function(t,e){e=e.length?n(e):o(t);var r=-1,a=e.length;while(++r<a){var u=e[r];t[u]=i(t[u],s,t)}return t});e.exports=u},{"lodash._baseflatten":12,"lodash._createwrapper":15,"lodash.functions":19,"lodash.restparam":25}],12:[function(t,e,r){var n=t("lodash.isarguments"),i=t("lodash.isarray");function o(t){return!!t&&typeof t=="object"}var a=Math.pow(2,53)-1;function s(t,e,r){var a=-1,f=t.length,l=-1,h=[];while(++a<f){var c=t[a];if(o(c)&&u(c.length)&&(i(c)||n(c))){if(e){c=s(c,e,r)}var p=-1,d=c.length;h.length+=d;while(++p<d){h[++l]=c[p]}}else if(!r){h[++l]=c}}return h}function u(t){return typeof t=="number"&&t>-1&&t%1==0&&t<=a}e.exports=s},{"lodash.isarguments":13,"lodash.isarray":14}],13:[function(t,e,r){var n="[object Arguments]";function i(t){return!!t&&typeof t=="object"}var o=Object.prototype;var a=o.toString;var s=Math.pow(2,53)-1;function u(t){return typeof t=="number"&&t>-1&&t%1==0&&t<=s}function f(t){var e=i(t)?t.length:undefined;return u(e)&&a.call(t)==n}e.exports=f},{}],14:[function(t,e,r){var n="[object Array]",i="[object Function]";var o=/[.*+?^${}()|[\]\/\\]/g,a=RegExp(o.source);var s=/^\[object .+?Constructor\]$/;function u(t){if(typeof t=="string"){return t}return t==null?"":t+""}function f(t){return!!t&&typeof t=="object"}var l=Object.prototype;var h=Function.prototype.toString;var c=l.toString;var p=RegExp("^"+y(c).replace(/toString|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");var d=m(d=Array.isArray)&&d;var g=Math.pow(2,53)-1;function v(t){return typeof t=="number"&&t>-1&&t%1==0&&t<=g}var b=d||function(t){return f(t)&&v(t.length)&&c.call(t)==n};function m(t){if(t==null){return false}if(c.call(t)==i){return p.test(h.call(t))}return f(t)&&s.test(t)}function y(t){t=u(t);return t&&a.test(t)?t.replace(o,"\\$&"):t}e.exports=b},{}],15:[function(t,e,r){(function(r){var n=t("lodash._arraycopy"),i=t("lodash._basecreate"),o=t("lodash._replaceholders");var a=1,s=2,u=4,f=8,l=16,h=32,c=64,p=128;var d="Expected a function";var g=Math.max,v=Math.min;var b=Math.pow(2,53)-1;function m(t,e,r){var n=r.length,i=-1,o=g(t.length-n,0),a=-1,s=e.length,u=Array(o+s);while(++a<s){u[a]=e[a]}while(++i<n){u[r[i]]=t[i]}while(o--){u[a++]=t[i++]}return u}function y(t,e,r){var n=-1,i=r.length,o=-1,a=g(t.length-i,0),s=-1,u=e.length,f=Array(a+u);while(++o<a){f[o]=t[o]}var l=o;while(++s<u){f[l+s]=e[s]}while(++n<i){f[l+r[n]]=t[o++]}return f}function _(t,e){var n=w(t);function i(){var o=this&&this!==r&&this instanceof i?n:t;return o.apply(e,arguments)}return i}function w(t){return function(){var e=i(t.prototype),r=t.apply(e,arguments);return M(r)?r:e}}function x(t,e,i,d,v,b,_,k,S,A){var M=e&p,$=e&a,E=e&s,F=e&f,C=e&u,L=e&l;var j=!E&&w(t),R=t;function O(){var u=arguments.length,f=u,l=Array(u);while(f--){l[f]=arguments[f]}if(d){l=m(l,d,v)}if(b){l=y(l,b,_)}if(F||L){var p=O.placeholder,P=o(l,p);u-=P.length;if(u<A){var T=k?n(k):null,D=g(A-u,0),N=F?P:null,q=F?null:P,U=F?l:null,Y=F?null:l;e|=F?h:c;e&=~(F?c:h);if(!C){e&=~(a|s)}var z=x(t,e,i,U,N,Y,q,T,S,D);z.placeholder=p;return z}}var I=$?i:this;if(E){t=I[R]}if(k){l=H(l,k)}if(M&&S<l.length){l.length=S}var X=this&&this!==r&&this instanceof O?j||w(t):t;return X.apply(I,l)}return O}function k(t,e,n,i){var o=e&a,s=w(t);function u(){var e=-1,a=arguments.length,f=-1,l=i.length,h=Array(a+l);while(++f<l){h[f]=i[f]}while(a--){h[f++]=arguments[++e]}var c=this&&this!==r&&this instanceof u?s:t;return c.apply(o?n:this,h)}return u}function S(t,e,r,n,i,o,u,f){var l=e&s;if(!l&&typeof t!="function"){throw new TypeError(d)}var p=n?n.length:0;if(!p){e&=~(h|c);n=i=null}p-=i?i.length:0;if(e&c){var v=n,b=i;n=i=null}var m=[t,e,r,n,i,v,b,o,u,f];m[9]=f==null?l?0:t.length:g(f-p,0)||0;if(e==a){var y=_(m[0],m[2])}else if((e==h||e==(a|h))&&!m[4].length){y=k.apply(undefined,m)}else{y=x.apply(undefined,m)}return y}function A(t,e){t=+t;e=e==null?b:e;return t>-1&&t%1==0&&t<e}function H(t,e){var r=t.length,i=v(e.length,r),o=n(t);while(i--){var a=e[i];t[i]=A(a,r)?o[a]:undefined}return t}function M(t){var e=typeof t;return e=="function"||!!t&&e=="object"}e.exports=S}).call(this,typeof global!=="undefined"?global:typeof self!=="undefined"?self:typeof window!=="undefined"?window:{})},{"lodash._arraycopy":16,"lodash._basecreate":17,"lodash._replaceholders":18}],16:[function(t,e,r){function n(t,e){var r=-1,n=t.length;e||(e=Array(n));while(++r<n){e[r]=t[r]}return e}e.exports=n},{}],17:[function(t,e,r){(function(t){var r=function(){function e(){}return function(r){if(n(r)){e.prototype=r;var i=new e;e.prototype=null}return i||t.Object()}}();function n(t){var e=typeof t;return e=="function"||!!t&&e=="object"}e.exports=r}).call(this,typeof global!=="undefined"?global:typeof self!=="undefined"?self:typeof window!=="undefined"?window:{})},{}],18:[function(t,e,r){var n="__lodash_placeholder__";function i(t,e){var r=-1,i=t.length,o=-1,a=[];while(++r<i){if(t[r]===e){t[r]=n;a[++o]=r}}return a}e.exports=i},{}],19:[function(t,e,r){var n=t("lodash._basefunctions"),i=t("lodash.keysin");function o(t){return n(t,i(t))}e.exports=o},{"lodash._basefunctions":20,"lodash.keysin":22}],20:[function(t,e,r){var n=t("lodash.isfunction");function i(t,e){var r=-1,i=e.length,o=-1,a=[];while(++r<i){var s=e[r];if(n(t[s])){a[++o]=s}}return a}e.exports=i},{"lodash.isfunction":21}],21:[function(t,e,r){(function(t){var r="[object Function]";var n=/[.*+?^${}()|[\]\/\\]/g,i=RegExp(n.source);var o=/^\[object .+?Constructor\]$/;function a(t){return typeof t=="function"||false}function s(t){if(typeof t=="string"){return t}return t==null?"":t+""}function u(t){return!!t&&typeof t=="object"}var f=Object.prototype;var l=Function.prototype.toString;var h=f.toString;var c=RegExp("^"+v(h).replace(/toString|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");var p=g(p=t.Uint8Array)&&p;var d=!(a(/x/)||p&&!a(p))?a:function(t){return h.call(t)==r};function g(t){if(t==null){return false}if(h.call(t)==r){return c.test(l.call(t))}return u(t)&&o.test(t)}function v(t){t=s(t);return t&&i.test(t)?t.replace(n,"\\$&"):t}e.exports=d}).call(this,typeof global!=="undefined"?global:typeof self!=="undefined"?self:typeof window!=="undefined"?window:{})},{}],22:[function(t,e,r){var n=t("lodash.isarguments"),i=t("lodash.isarray");var o=Object.prototype;var a=o.hasOwnProperty;var s=o.propertyIsEnumerable;var u=Math.pow(2,53)-1;var f={};(function(t){var e=function(){this.x=t},r={0:t,length:t},n=[];e.prototype={valueOf:t,y:t};for(var i in new e){n.push(i)}try{f.nonEnumArgs=!s.call(arguments,1)}catch(o){f.nonEnumArgs=true}})(1,0);function l(t,e){t=+t;e=e==null?u:e;return t>-1&&t%1==0&&t<e}function h(t){return typeof t=="number"&&t>-1&&t%1==0&&t<=u}function c(t){var e=typeof t;return e=="function"||!!t&&e=="object"}function p(t){if(t==null){return[]}if(!c(t)){t=Object(t)}var e=t.length;e=e&&h(e)&&(i(t)||f.nonEnumArgs&&n(t))&&e||0;var r=t.constructor,o=-1,s=typeof r=="function"&&r.prototype===t,u=Array(e),p=e>0;while(++o<e){u[o]=o+""}for(var d in t){if(!(p&&l(d,e))&&!(d=="constructor"&&(s||!a.call(t,d)))){u.push(d)}}return u}e.exports=p},{"lodash.isarguments":23,"lodash.isarray":24}],23:[function(t,e,r){arguments[4][13][0].apply(r,arguments)},{dup:13}],24:[function(t,e,r){arguments[4][14][0].apply(r,arguments)},{dup:14}],25:[function(t,e,r){var n="Expected a function";var i=Math.max;function o(t,e){if(typeof t!="function"){throw new TypeError(n)}e=i(e===undefined?t.length-1:+e||0,0);return function(){var r=arguments,n=-1,o=i(r.length-e,0),a=Array(o);while(++n<o){a[n]=r[e+n]}switch(e){case 0:return t.call(this,a);case 1:return t.call(this,r[0],a);case 2:return t.call(this,r[0],r[1],a)}var s=Array(e+1);n=-1;while(++n<e){s[n]=r[n]}s[e]=a;return t.apply(this,s)}}e.exports=o},{}],26:[function(t,e,r){(function(){var t=/^[\s,#]+/,r=/\s+$/,n=0,i=Math,o=i.round,a=i.min,s=i.max,u=i.random;function f(t,e){t=t?t:"";e=e||{};if(t instanceof f){return t}if(!(this instanceof f)){return new f(t,e)}var r=l(t);this._originalInput=t,this._r=r.r,this._g=r.g,this._b=r.b,this._a=r.a,this._roundA=o(100*this._a)/100,this._format=e.format||r.format;this._gradientType=e.gradientType;if(this._r<1){this._r=o(this._r)}if(this._g<1){this._g=o(this._g)}if(this._b<1){this._b=o(this._b)}this._ok=r.ok;this._tc_id=n++}f.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(t.r*299+t.g*587+t.b*114)/1e3},getLuminance:function(){var t=this.toRgb();var e,r,n,i,o,a;e=t.r/255;r=t.g/255;n=t.b/255;if(e<=.03928){i=e/12.92}else{i=Math.pow((e+.055)/1.055,2.4)}if(r<=.03928){o=r/12.92}else{o=Math.pow((r+.055)/1.055,2.4)}if(n<=.03928){a=n/12.92}else{a=Math.pow((n+.055)/1.055,2.4)}return.2126*i+.7152*o+.0722*a},setAlpha:function(t){this._a=R(t);this._roundA=o(100*this._a)/100;return this},toHsv:function(){var t=d(this._r,this._g,this._b);return{h:t.h*360,s:t.s,v:t.v,a:this._a}},toHsvString:function(){var t=d(this._r,this._g,this._b);var e=o(t.h*360),r=o(t.s*100),n=o(t.v*100);return this._a==1?"hsv("+e+", "+r+"%, "+n+"%)":"hsva("+e+", "+r+"%, "+n+"%, "+this._roundA+")"},toHsl:function(){var t=c(this._r,this._g,this._b);return{h:t.h*360,s:t.s,l:t.l,a:this._a}},toHslString:function(){var t=c(this._r,this._g,this._b);var e=o(t.h*360),r=o(t.s*100),n=o(t.l*100);return this._a==1?"hsl("+e+", "+r+"%, "+n+"%)":"hsla("+e+", "+r+"%, "+n+"%, "+this._roundA+")"},toHex:function(t){return v(this._r,this._g,this._b,t)},toHexString:function(t){return"#"+this.toHex(t)},toHex8:function(){return b(this._r,this._g,this._b,this._a)},toHex8String:function(){return"#"+this.toHex8()},toRgb:function(){return{r:o(this._r),g:o(this._g),b:o(this._b),a:this._a}},toRgbString:function(){return this._a==1?"rgb("+o(this._r)+", "+o(this._g)+", "+o(this._b)+")":"rgba("+o(this._r)+", "+o(this._g)+", "+o(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:o(O(this._r,255)*100)+"%",g:o(O(this._g,255)*100)+"%",b:o(O(this._b,255)*100)+"%",a:this._a}},toPercentageRgbString:function(){return this._a==1?"rgb("+o(O(this._r,255)*100)+"%, "+o(O(this._g,255)*100)+"%, "+o(O(this._b,255)*100)+"%)":"rgba("+o(O(this._r,255)*100)+"%, "+o(O(this._g,255)*100)+"%, "+o(O(this._b,255)*100)+"%, "+this._roundA+")"},toName:function(){if(this._a===0){return"transparent"}if(this._a<1){return false}return L[v(this._r,this._g,this._b,true)]||false},toFilter:function(t){var e="#"+b(this._r,this._g,this._b,this._a);var r=e;var n=this._gradientType?"GradientType = 1, ":"";if(t){var i=f(t);r=i.toHex8String()}return"progid:DXImageTransform.Microsoft.gradient("+n+"startColorstr="+e+",endColorstr="+r+")"},toString:function(t){var e=!!t;t=t||this._format;var r=false;var n=this._a<1&&this._a>=0;var i=!e&&n&&(t==="hex"||t==="hex6"||t==="hex3"||t==="name");if(i){if(t==="name"&&this._a===0){return this.toName()}return this.toRgbString()}if(t==="rgb"){r=this.toRgbString()}if(t==="prgb"){r=this.toPercentageRgbString()}if(t==="hex"||t==="hex6"){r=this.toHexString()}if(t==="hex3"){r=this.toHexString(true)}if(t==="hex8"){r=this.toHex8String()}if(t==="name"){r=this.toName()}if(t==="hsl"){r=this.toHslString()}if(t==="hsv"){r=this.toHsvString()}return r||this.toHexString()},_applyModification:function(t,e){var r=t.apply(null,[this].concat([].slice.call(e)));this._r=r._r;this._g=r._g;this._b=r._b;this.setAlpha(r._a);return this},lighten:function(){return this._applyModification(w,arguments)},brighten:function(){return this._applyModification(x,arguments)},darken:function(){return this._applyModification(k,arguments)},desaturate:function(){return this._applyModification(m,arguments)},saturate:function(){return this._applyModification(y,arguments)},greyscale:function(){return this._applyModification(_,arguments)},spin:function(){return this._applyModification(S,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(F,arguments)},splitcomplement:function(){return this._applyCombination($,arguments)},triad:function(){return this._applyCombination(H,arguments)},tetrad:function(){return this._applyCombination(M,arguments)}};f.fromRatio=function(t,e){if(typeof t=="object"){var r={};for(var n in t){if(t.hasOwnProperty(n)){if(n==="a"){r[n]=t[n]}else{r[n]=U(t[n])}}}t=r}return f(t,e)};function l(t){var e={r:0,g:0,b:0};var r=1;var n=false;var i=false;if(typeof t=="string"){t=X(t)}if(typeof t=="object"){if(t.hasOwnProperty("r")&&t.hasOwnProperty("g")&&t.hasOwnProperty("b")){e=h(t.r,t.g,t.b);n=true;i=String(t.r).substr(-1)==="%"?"prgb":"rgb"}else if(t.hasOwnProperty("h")&&t.hasOwnProperty("s")&&t.hasOwnProperty("v")){t.s=U(t.s);t.v=U(t.v);e=g(t.h,t.s,t.v);n=true;i="hsv"}else if(t.hasOwnProperty("h")&&t.hasOwnProperty("s")&&t.hasOwnProperty("l")){t.s=U(t.s);t.l=U(t.l);e=p(t.h,t.s,t.l);n=true;i="hsl"}if(t.hasOwnProperty("a")){r=t.a}}r=R(r);return{ok:n,format:t.format||i,r:a(255,s(e.r,0)),g:a(255,s(e.g,0)),b:a(255,s(e.b,0)),a:r}}function h(t,e,r){return{r:O(t,255)*255,g:O(e,255)*255,b:O(r,255)*255}}function c(t,e,r){t=O(t,255);e=O(e,255);r=O(r,255);var n=s(t,e,r),i=a(t,e,r);var o,u,f=(n+i)/2;if(n==i){o=u=0}else{var l=n-i;u=f>.5?l/(2-n-i):l/(n+i);switch(n){case t:o=(e-r)/l+(e<r?6:0);break;case e:o=(r-t)/l+2;break;case r:o=(t-e)/l+4;break}o/=6}return{h:o,s:u,l:f}}function p(t,e,r){var n,i,o;t=O(t,360);e=O(e,100);r=O(r,100);function a(t,e,r){if(r<0)r+=1;if(r>1)r-=1;if(r<1/6)return t+(e-t)*6*r;if(r<1/2)return e;if(r<2/3)return t+(e-t)*(2/3-r)*6;return t}if(e===0){n=i=o=r}else{var s=r<.5?r*(1+e):r+e-r*e;var u=2*r-s;n=a(u,s,t+1/3);i=a(u,s,t);o=a(u,s,t-1/3)}return{r:n*255,g:i*255,b:o*255}}function d(t,e,r){t=O(t,255);e=O(e,255);r=O(r,255);var n=s(t,e,r),i=a(t,e,r);var o,u,f=n;var l=n-i;u=n===0?0:l/n;if(n==i){o=0}else{switch(n){case t:o=(e-r)/l+(e<r?6:0);break;case e:o=(r-t)/l+2;break;case r:o=(t-e)/l+4;break}o/=6}return{h:o,s:u,v:f}}function g(t,e,r){t=O(t,360)*6;e=O(e,100);r=O(r,100);var n=i.floor(t),o=t-n,a=r*(1-e),s=r*(1-o*e),u=r*(1-(1-o)*e),f=n%6,l=[r,s,a,a,u,r][f],h=[u,r,r,s,a,a][f],c=[a,a,u,r,r,s][f];return{r:l*255,g:h*255,b:c*255}}function v(t,e,r,n){var i=[q(o(t).toString(16)),q(o(e).toString(16)),q(o(r).toString(16))];if(n&&i[0].charAt(0)==i[0].charAt(1)&&i[1].charAt(0)==i[1].charAt(1)&&i[2].charAt(0)==i[2].charAt(1)){return i[0].charAt(0)+i[1].charAt(0)+i[2].charAt(0)}return i.join("")}function b(t,e,r,n){var i=[q(Y(n)),q(o(t).toString(16)),q(o(e).toString(16)),q(o(r).toString(16))];return i.join("")}f.equals=function(t,e){if(!t||!e){return false}return f(t).toRgbString()==f(e).toRgbString()};f.random=function(){return f.fromRatio({r:u(),g:u(),b:u()})};function m(t,e){e=e===0?0:e||10;var r=f(t).toHsl();r.s-=e/100;r.s=P(r.s);return f(r)}function y(t,e){e=e===0?0:e||10;var r=f(t).toHsl();r.s+=e/100;r.s=P(r.s);return f(r)}function _(t){return f(t).desaturate(100)}function w(t,e){e=e===0?0:e||10;var r=f(t).toHsl();r.l+=e/100;r.l=P(r.l);return f(r)}function x(t,e){e=e===0?0:e||10;var r=f(t).toRgb();r.r=s(0,a(255,r.r-o(255*-(e/100))));r.g=s(0,a(255,r.g-o(255*-(e/100))));r.b=s(0,a(255,r.b-o(255*-(e/100))));return f(r)}function k(t,e){e=e===0?0:e||10;var r=f(t).toHsl();r.l-=e/100;r.l=P(r.l);return f(r)}function S(t,e){var r=f(t).toHsl();var n=(o(r.h)+e)%360;r.h=n<0?360+n:n;return f(r)}function A(t){var e=f(t).toHsl();e.h=(e.h+180)%360;return f(e)}function H(t){var e=f(t).toHsl();var r=e.h;return[f(t),f({h:(r+120)%360,s:e.s,l:e.l}),f({h:(r+240)%360,s:e.s,l:e.l})]}function M(t){var e=f(t).toHsl();var r=e.h;return[f(t),f({h:(r+90)%360,s:e.s,l:e.l}),f({h:(r+180)%360,s:e.s,l:e.l}),f({h:(r+270)%360,s:e.s,l:e.l})]}function $(t){var e=f(t).toHsl();var r=e.h;return[f(t),f({h:(r+72)%360,s:e.s,l:e.l}),f({h:(r+216)%360,s:e.s,l:e.l})]}function E(t,e,r){e=e||6;r=r||30;var n=f(t).toHsl();var i=360/r;var o=[f(t)];for(n.h=(n.h-(i*e>>1)+720)%360;--e;){n.h=(n.h+i)%360;o.push(f(n))}return o}function F(t,e){e=e||6;var r=f(t).toHsv();var n=r.h,i=r.s,o=r.v;var a=[];var s=1/e;while(e--){a.push(f({h:n,s:i,v:o}));o=(o+s)%1}return a}f.mix=function(t,e,r){r=r===0?0:r||50;var n=f(t).toRgb();var i=f(e).toRgb();var o=r/100;var a=o*2-1;var s=i.a-n.a;var u;if(a*s==-1){u=a}else{u=(a+s)/(1+a*s)}u=(u+1)/2;var l=1-u;var h={r:i.r*u+n.r*l,g:i.g*u+n.g*l,b:i.b*u+n.b*l,a:i.a*o+n.a*(1-o)};return f(h)};f.readability=function(t,e){var r=f(t);var n=f(e);return(Math.max(r.getLuminance(),n.getLuminance())+.05)/(Math.min(r.getLuminance(),n.getLuminance())+.05)};f.isReadable=function(t,e,r){var n=f.readability(t,e);var i,o;o=false;i=Z(r);switch(i.level+i.size){case"AAsmall":case"AAAlarge":o=n>=4.5;break;case"AAlarge":o=n>=3;break;case"AAAsmall":o=n>=7;break}return o};f.mostReadable=function(t,e,r){var n=null;var i=0;var o;var a,s,u;r=r||{};a=r.includeFallbackColors;s=r.level;u=r.size;for(var l=0;l<e.length;l++){o=f.readability(t,e[l]);if(o>i){i=o;n=f(e[l])}}if(f.isReadable(t,n,{level:s,size:u})||!a){return n}else{r.includeFallbackColors=false;return f.mostReadable(t,["#fff","#000"],r)}};var C=f.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"};var L=f.hexNames=j(C);function j(t){var e={};for(var r in t){if(t.hasOwnProperty(r)){e[t[r]]=r}}return e}function R(t){t=parseFloat(t);if(isNaN(t)||t<0||t>1){t=1}return t}function O(t,e){if(D(t)){t="100%"}var r=N(t);t=a(e,s(0,parseFloat(t)));if(r){t=parseInt(t*e,10)/100}if(i.abs(t-e)<1e-6){return 1}return t%e/parseFloat(e)}function P(t){return a(1,s(0,t))}function T(t){return parseInt(t,16)}function D(t){return typeof t=="string"&&t.indexOf(".")!=-1&&parseFloat(t)===1}function N(t){return typeof t==="string"&&t.indexOf("%")!=-1}function q(t){return t.length==1?"0"+t:""+t}function U(t){if(t<=1){
t=t*100+"%"}return t}function Y(t){return Math.round(parseFloat(t)*255).toString(16)}function z(t){return T(t)/255}var I=function(){var t="[-\\+]?\\d+%?";var e="[-\\+]?\\d*\\.\\d+%?";var r="(?:"+e+")|(?:"+t+")";var n="[\\s|\\(]+("+r+")[,|\\s]+("+r+")[,|\\s]+("+r+")\\s*\\)?";var i="[\\s|\\(]+("+r+")[,|\\s]+("+r+")[,|\\s]+("+r+")[,|\\s]+("+r+")\\s*\\)?";return{rgb:new RegExp("rgb"+n),rgba:new RegExp("rgba"+i),hsl:new RegExp("hsl"+n),hsla:new RegExp("hsla"+i),hsv:new RegExp("hsv"+n),hsva:new RegExp("hsva"+i),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})$/,hex8:/^([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/}}();function X(e){e=e.replace(t,"").replace(r,"").toLowerCase();var n=false;if(C[e]){e=C[e];n=true}else if(e=="transparent"){return{r:0,g:0,b:0,a:0,format:"name"}}var i;if(i=I.rgb.exec(e)){return{r:i[1],g:i[2],b:i[3]}}if(i=I.rgba.exec(e)){return{r:i[1],g:i[2],b:i[3],a:i[4]}}if(i=I.hsl.exec(e)){return{h:i[1],s:i[2],l:i[3]}}if(i=I.hsla.exec(e)){return{h:i[1],s:i[2],l:i[3],a:i[4]}}if(i=I.hsv.exec(e)){return{h:i[1],s:i[2],v:i[3]}}if(i=I.hsva.exec(e)){return{h:i[1],s:i[2],v:i[3],a:i[4]}}if(i=I.hex8.exec(e)){return{a:z(i[1]),r:T(i[2]),g:T(i[3]),b:T(i[4]),format:n?"name":"hex8"}}if(i=I.hex6.exec(e)){return{r:T(i[1]),g:T(i[2]),b:T(i[3]),format:n?"name":"hex"}}if(i=I.hex3.exec(e)){return{r:T(i[1]+""+i[1]),g:T(i[2]+""+i[2]),b:T(i[3]+""+i[3]),format:n?"name":"hex"}}return false}function Z(t){var e,r;t=t||{level:"AA",size:"small"};e=(t.level||"AA").toUpperCase();r=(t.size||"small").toLowerCase();if(e!=="AA"&&e!=="AAA"){e="AA"}if(r!=="small"&&r!=="large"){r="small"}return{level:e,size:r}}if(typeof e!=="undefined"&&e.exports){e.exports=f}else if(typeof define==="function"&&define.amd){define(function(){return f})}else{window.tinycolor=f}})()},{}],27:[function(t,e,r){"use strict";e.exports=function n(t){var e={left:0,top:0};if(t.offsetParent){do{e.left+=t.offsetLeft;e.top+=t.offsetTop}while(t=t.offsetParent)}return e}},{}],28:[function(t,e,r){"use strict";e.exports=function n(t,e,r){return Math.min(Math.max(t,e),r)}},{}]},{},[1]);
(function t(e,r,n){function i(a,s){if(!r[a]){if(!e[a]){var u=typeof require=="function"&&require;if(!s&&u)return u(a,!0);if(o)return o(a,!0);var f=new Error("Cannot find module '"+a+"'");throw f.code="MODULE_NOT_FOUND",f}var h=r[a]={exports:{}};e[a][0].call(h.exports,function(t){var r=e[a][1][t];return i(r?r:t)},h,h.exports,t,e,r,n)}return r[a].exports}var o=typeof require=="function"&&require;for(var a=0;a<n.length;a++)i(n[a]);return i})({1:[function(t,e,r){"use strict";r.toByteArray=s;r.fromByteArray=h;var n=[];var i=[];var o=typeof Uint8Array!=="undefined"?Uint8Array:Array;function a(){var t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(var e=0,r=t.length;e<r;++e){n[e]=t[e];i[t.charCodeAt(e)]=e}i["-".charCodeAt(0)]=62;i["_".charCodeAt(0)]=63}a();function s(t){var e,r,n,a,s,u;var f=t.length;if(f%4>0){throw new Error("Invalid string. Length must be a multiple of 4")}s=t[f-2]==="="?2:t[f-1]==="="?1:0;u=new o(f*3/4-s);n=s>0?f-4:f;var h=0;for(e=0,r=0;e<n;e+=4,r+=3){a=i[t.charCodeAt(e)]<<18|i[t.charCodeAt(e+1)]<<12|i[t.charCodeAt(e+2)]<<6|i[t.charCodeAt(e+3)];u[h++]=a>>16&255;u[h++]=a>>8&255;u[h++]=a&255}if(s===2){a=i[t.charCodeAt(e)]<<2|i[t.charCodeAt(e+1)]>>4;u[h++]=a&255}else if(s===1){a=i[t.charCodeAt(e)]<<10|i[t.charCodeAt(e+1)]<<4|i[t.charCodeAt(e+2)]>>2;u[h++]=a>>8&255;u[h++]=a&255}return u}function u(t){return n[t>>18&63]+n[t>>12&63]+n[t>>6&63]+n[t&63]}function f(t,e,r){var n;var i=[];for(var o=e;o<r;o+=3){n=(t[o]<<16)+(t[o+1]<<8)+t[o+2];i.push(u(n))}return i.join("")}function h(t){var e;var r=t.length;var i=r%3;var o="";var a=[];var s=16383;for(var u=0,h=r-i;u<h;u+=s){a.push(f(t,u,u+s>h?h:u+s))}if(i===1){e=t[r-1];o+=n[e>>2];o+=n[e<<4&63];o+="=="}else if(i===2){e=(t[r-2]<<8)+t[r-1];o+=n[e>>10];o+=n[e>>4&63];o+=n[e<<2&63];o+="="}a.push(o);return a.join("")}},{}],2:[function(t,e,r){(function(e){"use strict";var n=t("base64-js");var i=t("ieee754");var o=t("isarray");r.Buffer=f;r.SlowBuffer=_;r.INSPECT_MAX_BYTES=50;f.poolSize=8192;var a={};f.TYPED_ARRAY_SUPPORT=e.TYPED_ARRAY_SUPPORT!==undefined?e.TYPED_ARRAY_SUPPORT:s();function s(){try{var t=new Uint8Array(1);t.foo=function(){return 42};return t.foo()===42&&typeof t.subarray==="function"&&t.subarray(1,1).byteLength===0}catch(e){return false}}function u(){return f.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function f(t){if(!(this instanceof f)){if(arguments.length>1)return new f(t,arguments[1]);return new f(t)}if(!f.TYPED_ARRAY_SUPPORT){this.length=0;this.parent=undefined}if(typeof t==="number"){return h(this,t)}if(typeof t==="string"){return l(this,t,arguments.length>1?arguments[1]:"utf8")}return c(this,t)}f._augment=function(t){t.__proto__=f.prototype;return t};function h(t,e){t=w(t,e<0?0:m(e)|0);if(!f.TYPED_ARRAY_SUPPORT){for(var r=0;r<e;r++){t[r]=0}}return t}function l(t,e,r){if(typeof r!=="string"||r==="")r="utf8";var n=A(e,r)|0;t=w(t,n);t.write(e,r);return t}function c(t,e){if(f.isBuffer(e))return p(t,e);if(o(e))return d(t,e);if(e==null){throw new TypeError("must start with number, buffer, array or string")}if(typeof ArrayBuffer!=="undefined"){if(e.buffer instanceof ArrayBuffer){return v(t,e)}if(e instanceof ArrayBuffer){return g(t,e)}}if(e.length)return y(t,e);return b(t,e)}function p(t,e){var r=m(e.length)|0;t=w(t,r);e.copy(t,0,0,r);return t}function d(t,e){var r=m(e.length)|0;t=w(t,r);for(var n=0;n<r;n+=1){t[n]=e[n]&255}return t}function v(t,e){var r=m(e.length)|0;t=w(t,r);for(var n=0;n<r;n+=1){t[n]=e[n]&255}return t}function g(t,e){e.byteLength;if(f.TYPED_ARRAY_SUPPORT){t=new Uint8Array(e);t.__proto__=f.prototype}else{t=v(t,new Uint8Array(e))}return t}function y(t,e){var r=m(e.length)|0;t=w(t,r);for(var n=0;n<r;n+=1){t[n]=e[n]&255}return t}function b(t,e){var r;var n=0;if(e.type==="Buffer"&&o(e.data)){r=e.data;n=m(r.length)|0}t=w(t,n);for(var i=0;i<n;i+=1){t[i]=r[i]&255}return t}if(f.TYPED_ARRAY_SUPPORT){f.prototype.__proto__=Uint8Array.prototype;f.__proto__=Uint8Array;if(typeof Symbol!=="undefined"&&Symbol.species&&f[Symbol.species]===f){Object.defineProperty(f,Symbol.species,{value:null,configurable:true})}}else{f.prototype.length=undefined;f.prototype.parent=undefined}function w(t,e){if(f.TYPED_ARRAY_SUPPORT){t=new Uint8Array(e);t.__proto__=f.prototype}else{t.length=e}var r=e!==0&&e<=f.poolSize>>>1;if(r)t.parent=a;return t}function m(t){if(t>=u()){throw new RangeError("Attempt to allocate Buffer larger than maximum "+"size: 0x"+u().toString(16)+" bytes")}return t|0}function _(t,e){if(!(this instanceof _))return new _(t,e);var r=new f(t,e);delete r.parent;return r}f.isBuffer=function tt(t){return!!(t!=null&&t._isBuffer)};f.compare=function et(t,e){if(!f.isBuffer(t)||!f.isBuffer(e)){throw new TypeError("Arguments must be Buffers")}if(t===e)return 0;var r=t.length;var n=e.length;for(var i=0,o=Math.min(r,n);i<o;++i){if(t[i]!==e[i]){r=t[i];n=e[i];break}}if(r<n)return-1;if(n<r)return 1;return 0};f.isEncoding=function rt(t){switch(String(t).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"raw":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return true;default:return false}};f.concat=function nt(t,e){if(!o(t))throw new TypeError("list argument must be an Array of Buffers.");if(t.length===0){return new f(0)}var r;if(e===undefined){e=0;for(r=0;r<t.length;r++){e+=t[r].length}}var n=new f(e);var i=0;for(r=0;r<t.length;r++){var a=t[r];a.copy(n,i);i+=a.length}return n};function A(t,e){if(typeof t!=="string")t=""+t;var r=t.length;if(r===0)return 0;var n=false;for(;;){switch(e){case"ascii":case"binary":case"raw":case"raws":return r;case"utf8":case"utf-8":return Z(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return r*2;case"hex":return r>>>1;case"base64":return K(t).length;default:if(n)return Z(t).length;e=(""+e).toLowerCase();n=true}}}f.byteLength=A;function S(t,e,r){var n=false;e=e|0;r=r===undefined||r===Infinity?this.length:r|0;if(!t)t="utf8";if(e<0)e=0;if(r>this.length)r=this.length;if(r<=e)return"";while(true){switch(t){case"hex":return j(this,e,r);case"utf8":case"utf-8":return T(this,e,r);case"ascii":return C(this,e,r);case"binary":return L(this,e,r);case"base64":return U(this,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return B(this,e,r);default:if(n)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase();n=true}}}f.prototype._isBuffer=true;f.prototype.toString=function it(){var t=this.length|0;if(t===0)return"";if(arguments.length===0)return T(this,0,t);return S.apply(this,arguments)};f.prototype.equals=function ot(t){if(!f.isBuffer(t))throw new TypeError("Argument must be a Buffer");if(this===t)return true;return f.compare(this,t)===0};f.prototype.inspect=function at(){var t="";var e=r.INSPECT_MAX_BYTES;if(this.length>0){t=this.toString("hex",0,e).match(/.{2}/g).join(" ");if(this.length>e)t+=" ... "}return"<Buffer "+t+">"};f.prototype.compare=function st(t){if(!f.isBuffer(t))throw new TypeError("Argument must be a Buffer");return f.compare(this,t)};f.prototype.indexOf=function ut(t,e){if(e>2147483647)e=2147483647;else if(e<-2147483648)e=-2147483648;e>>=0;if(this.length===0)return-1;if(e>=this.length)return-1;if(e<0)e=Math.max(this.length+e,0);if(typeof t==="string"){if(t.length===0)return-1;return String.prototype.indexOf.call(this,t,e)}if(f.isBuffer(t)){return r(this,t,e)}if(typeof t==="number"){if(f.TYPED_ARRAY_SUPPORT&&Uint8Array.prototype.indexOf==="function"){return Uint8Array.prototype.indexOf.call(this,t,e)}return r(this,[t],e)}function r(t,e,r){var n=-1;for(var i=0;r+i<t.length;i++){if(t[r+i]===e[n===-1?0:i-n]){if(n===-1)n=i;if(i-n+1===e.length)return r+n}else{n=-1}}return-1}throw new TypeError("val must be string, number or Buffer")};function x(t,e,r,n){r=Number(r)||0;var i=t.length-r;if(!n){n=i}else{n=Number(n);if(n>i){n=i}}var o=e.length;if(o%2!==0)throw new Error("Invalid hex string");if(n>o/2){n=o/2}for(var a=0;a<n;a++){var s=parseInt(e.substr(a*2,2),16);if(isNaN(s))throw new Error("Invalid hex string");t[r+a]=s}return a}function E(t,e,r,n){return Q(Z(e,t.length-r),t,r,n)}function R(t,e,r,n){return Q(V(e),t,r,n)}function k(t,e,r,n){return R(t,e,r,n)}function M(t,e,r,n){return Q(K(e),t,r,n)}function P(t,e,r,n){return Q(J(e,t.length-r),t,r,n)}f.prototype.write=function ft(t,e,r,n){if(e===undefined){n="utf8";r=this.length;e=0}else if(r===undefined&&typeof e==="string"){n=e;r=this.length;e=0}else if(isFinite(e)){e=e|0;if(isFinite(r)){r=r|0;if(n===undefined)n="utf8"}else{n=r;r=undefined}}else{var i=n;n=e;e=r|0;r=i}var o=this.length-e;if(r===undefined||r>o)r=o;if(t.length>0&&(r<0||e<0)||e>this.length){throw new RangeError("attempt to write outside buffer bounds")}if(!n)n="utf8";var a=false;for(;;){switch(n){case"hex":return x(this,t,e,r);case"utf8":case"utf-8":return E(this,t,e,r);case"ascii":return R(this,t,e,r);case"binary":return k(this,t,e,r);case"base64":return M(this,t,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return P(this,t,e,r);default:if(a)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase();a=true}}};f.prototype.toJSON=function ht(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function U(t,e,r){if(e===0&&r===t.length){return n.fromByteArray(t)}else{return n.fromByteArray(t.slice(e,r))}}function T(t,e,r){r=Math.min(t.length,r);var n=[];var i=e;while(i<r){var o=t[i];var a=null;var s=o>239?4:o>223?3:o>191?2:1;if(i+s<=r){var u,f,h,l;switch(s){case 1:if(o<128){a=o}break;case 2:u=t[i+1];if((u&192)===128){l=(o&31)<<6|u&63;if(l>127){a=l}}break;case 3:u=t[i+1];f=t[i+2];if((u&192)===128&&(f&192)===128){l=(o&15)<<12|(u&63)<<6|f&63;if(l>2047&&(l<55296||l>57343)){a=l}}break;case 4:u=t[i+1];f=t[i+2];h=t[i+3];if((u&192)===128&&(f&192)===128&&(h&192)===128){l=(o&15)<<18|(u&63)<<12|(f&63)<<6|h&63;if(l>65535&&l<1114112){a=l}}}}if(a===null){a=65533;s=1}else if(a>65535){a-=65536;n.push(a>>>10&1023|55296);a=56320|a&1023}n.push(a);i+=s}return O(n)}var H=4096;function O(t){var e=t.length;if(e<=H){return String.fromCharCode.apply(String,t)}var r="";var n=0;while(n<e){r+=String.fromCharCode.apply(String,t.slice(n,n+=H))}return r}function C(t,e,r){var n="";r=Math.min(t.length,r);for(var i=e;i<r;i++){n+=String.fromCharCode(t[i]&127)}return n}function L(t,e,r){var n="";r=Math.min(t.length,r);for(var i=e;i<r;i++){n+=String.fromCharCode(t[i])}return n}function j(t,e,r){var n=t.length;if(!e||e<0)e=0;if(!r||r<0||r>n)r=n;var i="";for(var o=e;o<r;o++){i+=G(t[o])}return i}function B(t,e,r){var n=t.slice(e,r);var i="";for(var o=0;o<n.length;o+=2){i+=String.fromCharCode(n[o]+n[o+1]*256)}return i}f.prototype.slice=function lt(t,e){var r=this.length;t=~~t;e=e===undefined?r:~~e;if(t<0){t+=r;if(t<0)t=0}else if(t>r){t=r}if(e<0){e+=r;if(e<0)e=0}else if(e>r){e=r}if(e<t)e=t;var n;if(f.TYPED_ARRAY_SUPPORT){n=this.subarray(t,e);n.__proto__=f.prototype}else{var i=e-t;n=new f(i,undefined);for(var o=0;o<i;o++){n[o]=this[o+t]}}if(n.length)n.parent=this.parent||this;return n};function $(t,e,r){if(t%1!==0||t<0)throw new RangeError("offset is not uint");if(t+e>r)throw new RangeError("Trying to access beyond buffer length")}f.prototype.readUIntLE=function ct(t,e,r){t=t|0;e=e|0;if(!r)$(t,e,this.length);var n=this[t];var i=1;var o=0;while(++o<e&&(i*=256)){n+=this[t+o]*i}return n};f.prototype.readUIntBE=function pt(t,e,r){t=t|0;e=e|0;if(!r){$(t,e,this.length)}var n=this[t+--e];var i=1;while(e>0&&(i*=256)){n+=this[t+--e]*i}return n};f.prototype.readUInt8=function dt(t,e){if(!e)$(t,1,this.length);return this[t]};f.prototype.readUInt16LE=function vt(t,e){if(!e)$(t,2,this.length);return this[t]|this[t+1]<<8};f.prototype.readUInt16BE=function gt(t,e){if(!e)$(t,2,this.length);return this[t]<<8|this[t+1]};f.prototype.readUInt32LE=function yt(t,e){if(!e)$(t,4,this.length);return(this[t]|this[t+1]<<8|this[t+2]<<16)+this[t+3]*16777216};f.prototype.readUInt32BE=function bt(t,e){if(!e)$(t,4,this.length);return this[t]*16777216+(this[t+1]<<16|this[t+2]<<8|this[t+3])};f.prototype.readIntLE=function wt(t,e,r){t=t|0;e=e|0;if(!r)$(t,e,this.length);var n=this[t];var i=1;var o=0;while(++o<e&&(i*=256)){n+=this[t+o]*i}i*=128;if(n>=i)n-=Math.pow(2,8*e);return n};f.prototype.readIntBE=function mt(t,e,r){t=t|0;e=e|0;if(!r)$(t,e,this.length);var n=e;var i=1;var o=this[t+--n];while(n>0&&(i*=256)){o+=this[t+--n]*i}i*=128;if(o>=i)o-=Math.pow(2,8*e);return o};f.prototype.readInt8=function _t(t,e){if(!e)$(t,1,this.length);if(!(this[t]&128))return this[t];return(255-this[t]+1)*-1};f.prototype.readInt16LE=function At(t,e){if(!e)$(t,2,this.length);var r=this[t]|this[t+1]<<8;return r&32768?r|4294901760:r};f.prototype.readInt16BE=function St(t,e){if(!e)$(t,2,this.length);var r=this[t+1]|this[t]<<8;return r&32768?r|4294901760:r};f.prototype.readInt32LE=function xt(t,e){if(!e)$(t,4,this.length);return this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24};f.prototype.readInt32BE=function Et(t,e){if(!e)$(t,4,this.length);return this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]};f.prototype.readFloatLE=function Rt(t,e){if(!e)$(t,4,this.length);return i.read(this,t,true,23,4)};f.prototype.readFloatBE=function kt(t,e){if(!e)$(t,4,this.length);return i.read(this,t,false,23,4)};f.prototype.readDoubleLE=function Mt(t,e){if(!e)$(t,8,this.length);return i.read(this,t,true,52,8)};f.prototype.readDoubleBE=function Pt(t,e){if(!e)$(t,8,this.length);return i.read(this,t,false,52,8)};function Y(t,e,r,n,i,o){if(!f.isBuffer(t))throw new TypeError("buffer must be a Buffer instance");if(e>i||e<o)throw new RangeError("value is out of bounds");if(r+n>t.length)throw new RangeError("index out of range")}f.prototype.writeUIntLE=function Ut(t,e,r,n){t=+t;e=e|0;r=r|0;if(!n)Y(this,t,e,r,Math.pow(2,8*r),0);var i=1;var o=0;this[e]=t&255;while(++o<r&&(i*=256)){this[e+o]=t/i&255}return e+r};f.prototype.writeUIntBE=function Tt(t,e,r,n){t=+t;e=e|0;r=r|0;if(!n)Y(this,t,e,r,Math.pow(2,8*r),0);var i=r-1;var o=1;this[e+i]=t&255;while(--i>=0&&(o*=256)){this[e+i]=t/o&255}return e+r};f.prototype.writeUInt8=function Ht(t,e,r){t=+t;e=e|0;if(!r)Y(this,t,e,1,255,0);if(!f.TYPED_ARRAY_SUPPORT)t=Math.floor(t);this[e]=t&255;return e+1};function I(t,e,r,n){if(e<0)e=65535+e+1;for(var i=0,o=Math.min(t.length-r,2);i<o;i++){t[r+i]=(e&255<<8*(n?i:1-i))>>>(n?i:1-i)*8}}f.prototype.writeUInt16LE=function Ot(t,e,r){t=+t;e=e|0;if(!r)Y(this,t,e,2,65535,0);if(f.TYPED_ARRAY_SUPPORT){this[e]=t&255;this[e+1]=t>>>8}else{I(this,t,e,true)}return e+2};f.prototype.writeUInt16BE=function Ct(t,e,r){t=+t;e=e|0;if(!r)Y(this,t,e,2,65535,0);if(f.TYPED_ARRAY_SUPPORT){this[e]=t>>>8;this[e+1]=t&255}else{I(this,t,e,false)}return e+2};function D(t,e,r,n){if(e<0)e=4294967295+e+1;for(var i=0,o=Math.min(t.length-r,4);i<o;i++){t[r+i]=e>>>(n?i:3-i)*8&255}}f.prototype.writeUInt32LE=function Lt(t,e,r){t=+t;e=e|0;if(!r)Y(this,t,e,4,4294967295,0);if(f.TYPED_ARRAY_SUPPORT){this[e+3]=t>>>24;this[e+2]=t>>>16;this[e+1]=t>>>8;this[e]=t&255}else{D(this,t,e,true)}return e+4};f.prototype.writeUInt32BE=function jt(t,e,r){t=+t;e=e|0;if(!r)Y(this,t,e,4,4294967295,0);if(f.TYPED_ARRAY_SUPPORT){this[e]=t>>>24;this[e+1]=t>>>16;this[e+2]=t>>>8;this[e+3]=t&255}else{D(this,t,e,false)}return e+4};f.prototype.writeIntLE=function Bt(t,e,r,n){t=+t;e=e|0;if(!n){var i=Math.pow(2,8*r-1);Y(this,t,e,r,i-1,-i)}var o=0;var a=1;var s=t<0?1:0;this[e]=t&255;while(++o<r&&(a*=256)){this[e+o]=(t/a>>0)-s&255}return e+r};f.prototype.writeIntBE=function $t(t,e,r,n){t=+t;e=e|0;if(!n){var i=Math.pow(2,8*r-1);Y(this,t,e,r,i-1,-i)}var o=r-1;var a=1;var s=t<0?1:0;this[e+o]=t&255;while(--o>=0&&(a*=256)){this[e+o]=(t/a>>0)-s&255}return e+r};f.prototype.writeInt8=function Yt(t,e,r){t=+t;e=e|0;if(!r)Y(this,t,e,1,127,-128);if(!f.TYPED_ARRAY_SUPPORT)t=Math.floor(t);if(t<0)t=255+t+1;this[e]=t&255;return e+1};f.prototype.writeInt16LE=function It(t,e,r){t=+t;e=e|0;if(!r)Y(this,t,e,2,32767,-32768);if(f.TYPED_ARRAY_SUPPORT){this[e]=t&255;this[e+1]=t>>>8}else{I(this,t,e,true)}return e+2};f.prototype.writeInt16BE=function Dt(t,e,r){t=+t;e=e|0;if(!r)Y(this,t,e,2,32767,-32768);if(f.TYPED_ARRAY_SUPPORT){this[e]=t>>>8;this[e+1]=t&255}else{I(this,t,e,false)}return e+2};f.prototype.writeInt32LE=function Ft(t,e,r){t=+t;e=e|0;if(!r)Y(this,t,e,4,2147483647,-2147483648);if(f.TYPED_ARRAY_SUPPORT){this[e]=t&255;this[e+1]=t>>>8;this[e+2]=t>>>16;this[e+3]=t>>>24}else{D(this,t,e,true)}return e+4};f.prototype.writeInt32BE=function Nt(t,e,r){t=+t;e=e|0;if(!r)Y(this,t,e,4,2147483647,-2147483648);if(t<0)t=4294967295+t+1;if(f.TYPED_ARRAY_SUPPORT){this[e]=t>>>24;this[e+1]=t>>>16;this[e+2]=t>>>8;this[e+3]=t&255}else{D(this,t,e,false)}return e+4};function F(t,e,r,n,i,o){if(r+n>t.length)throw new RangeError("index out of range");if(r<0)throw new RangeError("index out of range")}function N(t,e,r,n,o){if(!o){F(t,e,r,4,3.4028234663852886e38,-3.4028234663852886e38)}i.write(t,e,r,n,23,4);return r+4}f.prototype.writeFloatLE=function qt(t,e,r){return N(this,t,e,true,r)};f.prototype.writeFloatBE=function zt(t,e,r){return N(this,t,e,false,r)};function q(t,e,r,n,o){if(!o){F(t,e,r,8,1.7976931348623157e308,-1.7976931348623157e308)}i.write(t,e,r,n,52,8);return r+8}f.prototype.writeDoubleLE=function Xt(t,e,r){return q(this,t,e,true,r)};f.prototype.writeDoubleBE=function Wt(t,e,r){return q(this,t,e,false,r)};f.prototype.copy=function Gt(t,e,r,n){if(!r)r=0;if(!n&&n!==0)n=this.length;if(e>=t.length)e=t.length;if(!e)e=0;if(n>0&&n<r)n=r;if(n===r)return 0;if(t.length===0||this.length===0)return 0;if(e<0){throw new RangeError("targetStart out of bounds")}if(r<0||r>=this.length)throw new RangeError("sourceStart out of bounds");if(n<0)throw new RangeError("sourceEnd out of bounds");if(n>this.length)n=this.length;if(t.length-e<n-r){n=t.length-e+r}var i=n-r;var o;if(this===t&&r<e&&e<n){for(o=i-1;o>=0;o--){t[o+e]=this[o+r]}}else if(i<1e3||!f.TYPED_ARRAY_SUPPORT){for(o=0;o<i;o++){t[o+e]=this[o+r]}}else{Uint8Array.prototype.set.call(t,this.subarray(r,r+i),e)}return i};f.prototype.fill=function Zt(t,e,r){if(!t)t=0;if(!e)e=0;if(!r)r=this.length;if(r<e)throw new RangeError("end < start");if(r===e)return;if(this.length===0)return;if(e<0||e>=this.length)throw new RangeError("start out of bounds");if(r<0||r>this.length)throw new RangeError("end out of bounds");var n;if(typeof t==="number"){for(n=e;n<r;n++){this[n]=t}}else{var i=Z(t.toString());var o=i.length;for(n=e;n<r;n++){this[n]=i[n%o]}}return this};var z=/[^+\/0-9A-Za-z-_]/g;function X(t){t=W(t).replace(z,"");if(t.length<2)return"";while(t.length%4!==0){t=t+"="}return t}function W(t){if(t.trim)return t.trim();return t.replace(/^\s+|\s+$/g,"")}function G(t){if(t<16)return"0"+t.toString(16);return t.toString(16)}function Z(t,e){e=e||Infinity;var r;var n=t.length;var i=null;var o=[];for(var a=0;a<n;a++){r=t.charCodeAt(a);if(r>55295&&r<57344){if(!i){if(r>56319){if((e-=3)>-1)o.push(239,191,189);continue}else if(a+1===n){if((e-=3)>-1)o.push(239,191,189);continue}i=r;continue}if(r<56320){if((e-=3)>-1)o.push(239,191,189);i=r;continue}r=(i-55296<<10|r-56320)+65536}else if(i){if((e-=3)>-1)o.push(239,191,189)}i=null;if(r<128){if((e-=1)<0)break;o.push(r)}else if(r<2048){if((e-=2)<0)break;o.push(r>>6|192,r&63|128)}else if(r<65536){if((e-=3)<0)break;o.push(r>>12|224,r>>6&63|128,r&63|128)}else if(r<1114112){if((e-=4)<0)break;o.push(r>>18|240,r>>12&63|128,r>>6&63|128,r&63|128)}else{throw new Error("Invalid code point")}}return o}function V(t){var e=[];for(var r=0;r<t.length;r++){e.push(t.charCodeAt(r)&255)}return e}function J(t,e){var r,n,i;var o=[];for(var a=0;a<t.length;a++){if((e-=2)<0)break;r=t.charCodeAt(a);n=r>>8;i=r%256;o.push(i);o.push(n)}return o}function K(t){return n.toByteArray(X(t))}function Q(t,e,r,n){for(var i=0;i<n;i++){if(i+r>=e.length||i>=t.length)break;e[i+r]=t[i]}return i}}).call(this,typeof global!=="undefined"?global:typeof self!=="undefined"?self:typeof window!=="undefined"?window:{})},{"base64-js":1,ieee754:4,isarray:3}],3:[function(t,e,r){var n={}.toString;e.exports=Array.isArray||function(t){return n.call(t)=="[object Array]"}},{}],4:[function(t,e,r){r.read=function(t,e,r,n,i){var o,a;var s=i*8-n-1;var u=(1<<s)-1;var f=u>>1;var h=-7;var l=r?i-1:0;var c=r?-1:1;var p=t[e+l];l+=c;o=p&(1<<-h)-1;p>>=-h;h+=s;for(;h>0;o=o*256+t[e+l],l+=c,h-=8){}a=o&(1<<-h)-1;o>>=-h;h+=n;for(;h>0;a=a*256+t[e+l],l+=c,h-=8){}if(o===0){o=1-f}else if(o===u){return a?NaN:(p?-1:1)*Infinity}else{a=a+Math.pow(2,n);o=o-f}return(p?-1:1)*a*Math.pow(2,o-n)};r.write=function(t,e,r,n,i,o){var a,s,u;var f=o*8-i-1;var h=(1<<f)-1;var l=h>>1;var c=i===23?Math.pow(2,-24)-Math.pow(2,-77):0;var p=n?0:o-1;var d=n?1:-1;var v=e<0||e===0&&1/e<0?1:0;e=Math.abs(e);if(isNaN(e)||e===Infinity){s=isNaN(e)?1:0;a=h}else{a=Math.floor(Math.log(e)/Math.LN2);if(e*(u=Math.pow(2,-a))<1){a--;u*=2}if(a+l>=1){e+=c/u}else{e+=c*Math.pow(2,1-l)}if(e*u>=2){a++;u/=2}if(a+l>=h){s=0;a=h}else if(a+l>=1){s=(e*u-1)*Math.pow(2,i);a=a+l}else{s=e*Math.pow(2,l-1)*Math.pow(2,i);a=0}}for(;i>=8;t[r+p]=s&255,p+=d,s/=256,i-=8){}a=a<<i|s;f+=i;for(;f>0;t[r+p]=a&255,p+=d,a/=256,f-=8){}t[r+p-d]|=v*128}},{}],5:[function(t,e,r){"use strict";var n=t("../index.js");var i=new n({el:document.body,color:"#123456",background:"#656565"});i.onChange(function(t){document.body.style.background=t;document.querySelector("h1 a").style.color=i.color.isDark()?"#FFFFFF":"#000000"})},{"../index.js":6}],6:[function(t,e,r){"use strict";var n=t("lodash.bindall");var i=t("component-emitter");var o=t("is-number");var a=t("tinycolor2");var s=t("dom-transform");var u=t("./src/utils/maths/clamp");function f(t){t=t||{};this.color=null;this.width=0;this.height=0;this.hue=0;this.choosing=false;this.position={x:0,y:0};this.huePosition=0;this.saturationWidth=0;this.maxHue=0;this.inputIsNumber=false;n(this,"_onSaturationMouseMove","_onSaturationMouseDown","_onSaturationMouseUp","_onHueMouseDown","_onHueMouseUp","_onHueMouseMove");this.$el=document.createElement("div");this.$el.className="Scp";this.$el.innerHTML=['<div class="Scp-saturation">','<div class="Scp-brightness"></div>','<div class="Scp-sbSelector"></div>',"</div>",'<div class="Scp-hue">','<div class="Scp-hSelector"></div>',"</div>"].join("\n");this.$saturation=this.$el.querySelector(".Scp-saturation");this.$hue=this.$el.querySelector(".Scp-hue");this.$sbSelector=this.$el.querySelector(".Scp-sbSelector");this.$hSelector=this.$el.querySelector(".Scp-hSelector");this.$saturation.addEventListener("mousedown",this._onSaturationMouseDown);this.$saturation.addEventListener("touchstart",this._onSaturationMouseDown);this.$hue.addEventListener("mousedown",this._onHueMouseDown);this.$hue.addEventListener("touchstart",this._onHueMouseDown);if(t.el){this.appendTo(t.el)}if(t.background){this.setBackgroundColor(t.background)}this.setSize(t.width||175,t.height||150);this.setColor(t.color);return this}i(f.prototype);f.prototype.appendTo=function(t){t.appendChild(this.$el);return this};f.prototype.remove=function(){this.$saturation.removeEventListener("mousedown",this._onSaturationMouseDown);this.$saturation.removeEventListener("touchstart",this._onSaturationMouseDown);this.$hue.removeEventListener("mousedown",this._onHueMouseDown);this.$hue.removeEventListener("touchstart",this._onHueMouseDown);this._onSaturationMouseUp();this._onHueMouseUp();this.off();if(this.$el.parentNode){this.$el.parentNode.removeChild(this.$el)}};f.prototype.setColor=function(t){if(o(t)){this.inputIsNumber=true;t="#"+("00000"+(t|0).toString(16)).substr(-6)}else{this.inputIsNumber=false}this.color=a(t);var e=this.color.toHsv();if(!isNaN(e.h)){this.hue=e.h}this._moveSelectorTo(this.saturationWidth*e.s,(1-e.v)*this.height);this._moveHueTo((1-this.hue/360)*this.height);this._updateHue();return this};f.prototype.setSize=function(t,e){this.width=t;this.height=e;this.$el.style.width=this.width+"px";this.$el.style.height=this.height+"px";this.saturationWidth=this.width-25;this.maxHue=this.height-2;return this};f.prototype.setBackgroundColor=function(t){if(o(t)){t="#"+("00000"+(t|0).toString(16)).substr(-6)}this.$el.style.padding="5px";this.$el.style.background=a(t).toHexString()};f.prototype.setNoBackground=function(){this.$el.style.padding="0px";this.$el.style.background="none"};f.prototype.onChange=function(t){this.on("update",t);this.emit("update",this.getHexString());return this};f.prototype.getColor=function(){if(this.inputIsNumber){return this.getHexNumber()}return this.color.toString()};f.prototype.getHexString=function(){return this.color.toHexString().toUpperCase()};f.prototype.getHexNumber=function(){return parseInt(this.color.toHex(),16)};f.prototype.getRGB=function(){return this.color.toRgb()};f.prototype.getHSV=function(){return this.color.toHsv()};f.prototype.isDark=function(){return this.color.isDark()};f.prototype.isLight=function(){return this.color.isLight()};f.prototype._moveSelectorTo=function(t,e){this.position.x=u(t,0,this.saturationWidth);this.position.y=u(e,0,this.height);s(this.$sbSelector,{x:this.position.x,y:this.position.y})};f.prototype._updateColorFromPosition=function(){this.color=a({h:this.hue,s:this.position.x/this.saturationWidth,v:1-this.position.y/this.height});this._updateColor()};f.prototype._moveHueTo=function(t){this.huePosition=u(t,0,this.maxHue);s(this.$hSelector,{y:this.huePosition})};f.prototype._updateHueFromPosition=function(){var t=this.color.toHsv();this.hue=360*(1-this.huePosition/this.maxHue);this.color=a({h:this.hue,s:t.s,v:t.v});this._updateHue()};f.prototype._updateHue=function(){var t=a({h:this.hue,s:1,v:1});this.$saturation.style.background="linear-gradient(to right, #fff, "+t.toHexString()+")";this._updateColor()};f.prototype._updateColor=function(){this.$sbSelector.style.background=this.color.toHexString();this.$sbSelector.style.borderColor=this.color.isDark()?"#fff":"#000";this.emit("update",this.color.toHexString())};f.prototype._onSaturationMouseDown=function(t){this.choosing=true;var e=this.$saturation.getBoundingClientRect();var r=t.type.indexOf("touch")===0?t.touches[0].clientX:t.clientX;var n=t.type.indexOf("touch")===0?t.touches[0].clientY:t.clientY;this._moveSelectorTo(r-e.left,n-e.top);this._updateColorFromPosition();window.addEventListener("mouseup",this._onSaturationMouseUp);window.addEventListener("touchend",this._onSaturationMouseUp);window.addEventListener("mousemove",this._onSaturationMouseMove);window.addEventListener("touchmove",this._onSaturationMouseMove);t.preventDefault()};f.prototype._onSaturationMouseMove=function(t){var e=this.$saturation.getBoundingClientRect();var r=t.type.indexOf("touch")===0?t.touches[0].clientX:t.clientX;var n=t.type.indexOf("touch")===0?t.touches[0].clientY:t.clientY;this._moveSelectorTo(r-e.left,n-e.top);this._updateColorFromPosition()};f.prototype._onSaturationMouseUp=function(){this.choosing=false;window.removeEventListener("mouseup",this._onSaturationMouseUp);window.removeEventListener("touchend",this._onSaturationMouseUp);window.removeEventListener("mousemove",this._onSaturationMouseMove);window.removeEventListener("touchmove",this._onSaturationMouseMove)};f.prototype._onHueMouseDown=function(t){this.choosing=true;var e=this.$hue.getBoundingClientRect();var r=t.type.indexOf("touch")===0?t.touches[0].clientY:t.clientY;this._moveHueTo(r-e.top);this._updateHueFromPosition();window.addEventListener("mouseup",this._onHueMouseUp);window.addEventListener("touchend",this._onHueMouseUp);window.addEventListener("mousemove",this._onHueMouseMove);window.addEventListener("touchmove",this._onHueMouseMove);t.preventDefault()};f.prototype._onHueMouseMove=function(t){var e=this.$hue.getBoundingClientRect();var r=t.type.indexOf("touch")===0?t.touches[0].clientY:t.clientY;this._moveHueTo(r-e.top);this._updateHueFromPosition()};f.prototype._onHueMouseUp=function(){this.choosing=false;window.removeEventListener("mouseup",this._onHueMouseUp);window.removeEventListener("touchend",this._onHueMouseUp);window.removeEventListener("mousemove",this._onHueMouseMove);window.removeEventListener("touchmove",this._onHueMouseMove)};e.exports=f},{"./src/utils/maths/clamp":23,"component-emitter":7,"dom-transform":8,"is-number":13,"lodash.bindall":18,tinycolor2:21}],7:[function(t,e,r){e.exports=n;function n(t){if(t)return i(t)}function i(t){for(var e in n.prototype){t[e]=n.prototype[e]}return t}n.prototype.on=n.prototype.addEventListener=function(t,e){this._callbacks=this._callbacks||{};(this._callbacks["$"+t]=this._callbacks["$"+t]||[]).push(e);return this};n.prototype.once=function(t,e){function r(){this.off(t,r);e.apply(this,arguments)}r.fn=e;this.on(t,r);return this};n.prototype.off=n.prototype.removeListener=n.prototype.removeAllListeners=n.prototype.removeEventListener=function(t,e){this._callbacks=this._callbacks||{};if(0==arguments.length){this._callbacks={};return this}var r=this._callbacks["$"+t];if(!r)return this;if(1==arguments.length){delete this._callbacks["$"+t];return this}var n;for(var i=0;i<r.length;i++){n=r[i];if(n===e||n.fn===e){r.splice(i,1);break}}return this};n.prototype.emit=function(t){this._callbacks=this._callbacks||{};var e=[].slice.call(arguments,1),r=this._callbacks["$"+t];if(r){r=r.slice(0);for(var n=0,i=r.length;n<i;++n){r[n].apply(this,e)}}return this};n.prototype.listeners=function(t){this._callbacks=this._callbacks||{};return this._callbacks["$"+t]||[]};n.prototype.hasListeners=function(t){return!!this.listeners(t).length}},{}],8:[function(t,e,r){"use strict";var n=t("prefix");var i=t("is-array");var o=t("./lib/properties");var a=t("./lib/default-unit");var s=Object.prototype.hasOwnProperty;var u=n("transform");var f={x:"translateX",y:"translateY",z:"translateZ",origin:"transformOrigin"};r=e.exports=h;function h(t,e){var r=[];var f;var h;var l;d(e);for(f in e){if(!s.call(e,f))continue;h=e[f];if(s.call(o.transform,f)){l=o.transform[f];if(i(h)){h=h.join(l.separator)}r.push(f+"("+a(h,l.defaultUnit,l.separator)+")");continue}if(s.call(o,f)){l=o[f];if(i(h)){h=h.join(l.separator)}t.style[n(f)]=a(h,l.defaultUnit,l.separator);continue}console.warn("dom-transform: this property (`"+f+"`) is not supported.")}t.style[u]=r.join(" ")}r.get=l;function l(t,e){var r=t.style;if(typeof e==="string"){if(s.call(o.transform,e)){return r[u]}return r[n(e)]}if(!e){e=v()}var i={};e.forEach(function(t){i[t]=r[n(t)]});return i}r.reset=c;function c(t,e){var r=t.style;if(typeof e==="string"){r[n(e)]=null;return}if(!e){e=v()}e.forEach(function(t){r[n(t)]=null})}r.isSupported=p;function p(){return u.length>0}function d(t){var e;for(e in t){if(s.call(f,e)){t[f[e]]=t[e];delete t[e]}}}function v(){return Object.keys(o).map(function(t){return t})}},{"./lib/default-unit":9,"./lib/properties":10,"is-array":11,prefix:20}],9:[function(t,e,r){"use strict";var n=t("trim");var i=/^-?\d+(\.\d+)?$/;e.exports=function(t,e,r){r=r||",";if(typeof t==="number"){return""+t+e}var o=new RegExp(r,"g");var a=t.split(o.test(t)?r:" ");return a.map(function(t){t=n(t);if(i.test(t)){t+=e}return t}).join(r)}},{trim:22}],10:[function(t,e,r){"use strict";e.exports={transform:{translate:{defaultUnit:"px"},translate3d:{defaultUnit:"px"},translateX:{defaultUnit:"px"},translateY:{defaultUnit:"px"},translateZ:{defaultUnit:"px"},scale:{defaultUnit:""},scale3d:{defaultUnit:""},scaleX:{defaultUnit:""},scaleY:{defaultUnit:""},scaleZ:{defaultUnit:""},rotate:{defaultUnit:"deg"},rotate3d:{defaultUnit:""},rotateX:{defaultUnit:"deg"},rotateY:{defaultUnit:"deg"},rotateZ:{defaultUnit:"deg"},skew:{defaultUnit:"deg"},skewX:{defaultUnit:"deg"},skewY:{defaultUnit:"deg"},perspective:{defaultUnit:"px"},matrix:{defaultUnit:""},matrix3d:{defaultUnit:""}},transformOrigin:{defaultUnit:"px",separator:" "}}},{}],11:[function(t,e,r){var n=Array.isArray;var i=Object.prototype.toString;e.exports=n||function(t){return!!t&&"[object Array]"==i.call(t)}},{}],12:[function(t,e,r){e.exports=function(t){return!!(t!=null&&(t._isBuffer||t.constructor&&typeof t.constructor.isBuffer==="function"&&t.constructor.isBuffer(t)))}},{}],13:[function(t,e,r){"use strict";var n=t("kind-of");e.exports=function i(t){var e=n(t);if(e!=="number"&&e!=="string"){return false}var r=+t;return r-r+1>=0&&t!==""}},{"kind-of":14}],14:[function(t,e,r){(function(r){var n=t("is-buffer");var i=Object.prototype.toString;e.exports=function o(t){if(typeof t==="undefined"){return"undefined"}if(t===null){return"null";
}if(t===true||t===false||t instanceof Boolean){return"boolean"}if(typeof t==="string"||t instanceof String){return"string"}if(typeof t==="number"||t instanceof Number){return"number"}if(typeof t==="function"||t instanceof Function){return"function"}if(typeof Array.isArray!=="undefined"&&Array.isArray(t)){return"array"}if(t instanceof RegExp){return"regexp"}if(t instanceof Date){return"date"}var e=i.call(t);if(e==="[object RegExp]"){return"regexp"}if(e==="[object Date]"){return"date"}if(e==="[object Arguments]"){return"arguments"}if(typeof r!=="undefined"&&n(t)){return"buffer"}if(e==="[object Set]"){return"set"}if(e==="[object WeakSet]"){return"weakset"}if(e==="[object Map]"){return"map"}if(e==="[object WeakMap]"){return"weakmap"}if(e==="[object Symbol]"){return"symbol"}if(e==="[object Int8Array]"){return"int8array"}if(e==="[object Uint8Array]"){return"uint8array"}if(e==="[object Uint8ClampedArray]"){return"uint8clampedarray"}if(e==="[object Int16Array]"){return"int16array"}if(e==="[object Uint16Array]"){return"uint16array"}if(e==="[object Int32Array]"){return"int32array"}if(e==="[object Uint32Array]"){return"uint32array"}if(e==="[object Float32Array]"){return"float32array"}if(e==="[object Float64Array]"){return"float64array"}return"object"}}).call(this,t("buffer").Buffer)},{buffer:2,"is-buffer":12}],15:[function(t,e,r){var n=9007199254740991;var i="[object Arguments]",o="[object Function]",a="[object GeneratorFunction]";function s(t,e){var r=-1,n=e.length,i=t.length;while(++r<n){t[i+r]=e[r]}return t}var u=Object.prototype;var f=u.hasOwnProperty;var h=u.toString;var l=u.propertyIsEnumerable;function c(t,e,r,n){n||(n=[]);var i=-1,o=t.length;while(++i<o){var a=t[i];if(e>0&&b(a)&&(r||g(a)||v(a))){if(e>1){c(a,e-1,r,n)}else{s(n,a)}}else if(!r){n[n.length]=a}}return n}function p(t){return function(e){return e==null?undefined:e[t]}}var d=p("length");function v(t){return b(t)&&f.call(t,"callee")&&(!l.call(t,"callee")||h.call(t)==i)}var g=Array.isArray;function y(t){return t!=null&&m(d(t))&&!w(t)}function b(t){return A(t)&&y(t)}function w(t){var e=_(t)?h.call(t):"";return e==o||e==a}function m(t){return typeof t=="number"&&t>-1&&t%1==0&&t<=n}function _(t){var e=typeof t;return!!t&&(e=="object"||e=="function")}function A(t){return!!t&&typeof t=="object"}e.exports=c},{}],16:[function(t,e,r){(function(t){var n="Expected a function";var i="__lodash_placeholder__";var o=1,a=2,s=4,u=8,f=16,h=32,l=64,c=128,p=512;var d=1/0,v=9007199254740991,g=1.7976931348623157e308,y=0/0;var b="[object Function]",w="[object GeneratorFunction]",m="[object Symbol]";var _=/^\s+|\s+$/g;var A=/^[-+]0x[0-9a-f]+$/i;var S=/^0b[01]+$/i;var x=/^0o[0-7]+$/i;var E=/^(?:0|[1-9]\d*)$/;var R={"function":true,object:true};var k=parseInt;var M=R[typeof r]&&r&&!r.nodeType?r:undefined;var P=R[typeof e]&&e&&!e.nodeType?e:undefined;var U=j(M&&P&&typeof t=="object"&&t);var T=j(R[typeof self]&&self);var H=j(R[typeof window]&&window);var O=j(R[typeof this]&&this);var C=U||H!==(O&&O.window)&&H||T||O||Function("return this")();function L(t,e,r){var n=r.length;switch(n){case 0:return t.call(e);case 1:return t.call(e,r[0]);case 2:return t.call(e,r[0],r[1]);case 3:return t.call(e,r[0],r[1],r[2])}return t.apply(e,r)}function j(t){return t&&t.Object===Object?t:null}function B(t,e){var r=t.length,n=0;while(r--){if(t[r]===e){n++}}return n}function $(t,e){t=typeof t=="number"||E.test(t)?+t:-1;e=e==null?v:e;return t>-1&&t%1==0&&t<e}function Y(t,e){var r=-1,n=t.length,o=0,a=[];while(++r<n){var s=t[r];if(s===e||s===i){t[r]=i;a[o++]=r}}return a}var I=Object.prototype;var D=I.toString;var F=Object.create;var N=Math.max,q=Math.min;function z(t){return ot(t)?F(t):{}}function X(t,e,r,n){var i=-1,o=t.length,a=r.length,s=-1,u=e.length,f=N(o-a,0),h=Array(u+f),l=!n;while(++s<u){h[s]=e[s]}while(++i<a){if(l||i<o){h[r[i]]=t[i]}}while(f--){h[s++]=t[i++]}return h}function W(t,e,r,n){var i=-1,o=t.length,a=-1,s=r.length,u=-1,f=e.length,h=N(o-s,0),l=Array(h+f),c=!n;while(++i<h){l[i]=t[i]}var p=i;while(++u<f){l[p+u]=e[u]}while(++a<s){if(c||i<o){l[p+r[a]]=t[i++]}}return l}function G(t,e){var r=-1,n=t.length;e||(e=Array(n));while(++r<n){e[r]=t[r]}return e}function Z(t,e,r){var n=e&o,i=V(t);function a(){var e=this&&this!==C&&this instanceof a?i:t;return e.apply(n?r:this,arguments)}return a}function V(t){return function(){var e=arguments;switch(e.length){case 0:return new t;case 1:return new t(e[0]);case 2:return new t(e[0],e[1]);case 3:return new t(e[0],e[1],e[2]);case 4:return new t(e[0],e[1],e[2],e[3]);case 5:return new t(e[0],e[1],e[2],e[3],e[4]);case 6:return new t(e[0],e[1],e[2],e[3],e[4],e[5]);case 7:return new t(e[0],e[1],e[2],e[3],e[4],e[5],e[6])}var r=z(t.prototype),n=t.apply(r,e);return ot(n)?n:r}}function J(t,e,r){var n=V(t);function i(){var o=arguments.length,a=Array(o),s=o,u=rt(i);while(s--){a[s]=arguments[s]}var f=o<3&&a[0]!==u&&a[o-1]!==u?[]:Y(a,u);o-=f.length;if(o<r){return tt(t,e,K,i.placeholder,undefined,a,f,undefined,undefined,r-o)}var h=this&&this!==C&&this instanceof i?n:t;return L(h,this,a)}return i}function K(t,e,r,n,i,s,h,l,d,v){var g=e&c,y=e&o,b=e&a,w=e&(u|f),m=e&p,_=b?undefined:V(t);function A(){var o=arguments.length,a=o,u=Array(o);while(a--){u[a]=arguments[a]}if(w){var f=rt(A),c=B(u,f)}if(n){u=X(u,n,i,w)}if(s){u=W(u,s,h,w)}o-=c;if(w&&o<v){var p=Y(u,f);return tt(t,e,K,A.placeholder,r,u,p,l,d,v-o)}var S=y?r:this,x=b?S[t]:t;o=u.length;if(l){u=nt(u,l)}else if(m&&o>1){u.reverse()}if(g&&d<o){u.length=d}if(this&&this!==C&&this instanceof A){x=_||V(x)}return x.apply(S,u)}return A}function Q(t,e,r,n){var i=e&o,a=V(t);function s(){var e=-1,o=arguments.length,u=-1,f=n.length,h=Array(f+o),l=this&&this!==C&&this instanceof s?a:t;while(++u<f){h[u]=n[u]}while(o--){h[u++]=arguments[++e]}return L(l,i?r:this,h)}return s}function tt(t,e,r,n,i,f,c,p,d,v){var g=e&u,y=p?G(p):undefined,b=g?c:undefined,w=g?undefined:c,m=g?f:undefined,_=g?undefined:f;e|=g?h:l;e&=~(g?l:h);if(!(e&s)){e&=~(o|a)}var A=r(t,e,i,m,b,_,w,y,d,v);A.placeholder=n;return A}function et(t,e,r,i,s,c,p,d){var v=e&a;if(!v&&typeof t!="function"){throw new TypeError(n)}var g=i?i.length:0;if(!g){e&=~(h|l);i=s=undefined}p=p===undefined?p:N(ut(p),0);d=d===undefined?d:ut(d);g-=s?s.length:0;if(e&l){var y=i,b=s;i=s=undefined}var w=[t,e,r,i,s,y,b,c,p,d];t=w[0];e=w[1];r=w[2];i=w[3];s=w[4];d=w[9]=w[9]==null?v?0:t.length:N(w[9]-g,0);if(!d&&e&(u|f)){e&=~(u|f)}if(!e||e==o){var m=Z(t,e,r)}else if(e==u||e==f){m=J(t,e,d)}else if((e==h||e==(o|h))&&!s.length){m=Q(t,e,r,i)}else{m=K.apply(undefined,w)}return m}function rt(t){var e=t;return e.placeholder}function nt(t,e){var r=t.length,n=q(e.length,r),i=G(t);while(n--){var o=e[n];t[n]=$(o,r)?i[o]:undefined}return t}function it(t){var e=ot(t)?D.call(t):"";return e==b||e==w}function ot(t){var e=typeof t;return!!t&&(e=="object"||e=="function")}function at(t){return!!t&&typeof t=="object"}function st(t){return typeof t=="symbol"||at(t)&&D.call(t)==m}function ut(t){if(!t){return t===0?t:0}t=ft(t);if(t===d||t===-d){var e=t<0?-1:1;return e*g}var r=t%1;return t===t?r?t-r:t:0}function ft(t){if(typeof t=="number"){return t}if(st(t)){return y}if(ot(t)){var e=it(t.valueOf)?t.valueOf():t;t=ot(e)?e+"":e}if(typeof t!="string"){return t===0?t:+t}t=t.replace(_,"");var r=S.test(t);return r||x.test(t)?k(t.slice(2),r?2:8):A.test(t)?y:+t}e.exports=et}).call(this,typeof global!=="undefined"?global:typeof self!=="undefined"?self:typeof window!=="undefined"?window:{})},{}],17:[function(t,e,r){var n=t("lodash._createwrapper"),i=t("lodash.rest");var o="__lodash_placeholder__";var a=1,s=32;function u(t,e){var r=-1,n=t.length,i=0,a=[];while(++r<n){var s=t[r];if(s===e||s===o){t[r]=o;a[i++]=r}}return a}function f(t){var e=t;return e.placeholder}var h=i(function(t,e,r){var i=a;if(r.length){var o=u(r,f(h));i|=s}return n(t,i,e,r,o)});h.placeholder={};e.exports=h},{"lodash._createwrapper":16,"lodash.rest":19}],18:[function(t,e,r){var n=t("lodash._baseflatten"),i=t("lodash.bind"),o=t("lodash.rest");function a(t,e){var r=-1,n=t.length;while(++r<n){if(e(t[r],r,t)===false){break}}return t}var s=o(function(t,e){a(n(e,1),function(e){t[e]=i(t[e],t)});return t});e.exports=s},{"lodash._baseflatten":15,"lodash.bind":17,"lodash.rest":19}],19:[function(t,e,r){var n="Expected a function";var i=1/0,o=1.7976931348623157e308,a=0/0;var s="[object Function]",u="[object GeneratorFunction]",f="[object Symbol]";var h=/^\s+|\s+$/g;var l=/^[-+]0x[0-9a-f]+$/i;var c=/^0b[01]+$/i;var p=/^0o[0-7]+$/i;var d=parseInt;function v(t,e,r){var n=r.length;switch(n){case 0:return t.call(e);case 1:return t.call(e,r[0]);case 2:return t.call(e,r[0],r[1]);case 3:return t.call(e,r[0],r[1],r[2])}return t.apply(e,r)}var g=Object.prototype;var y=g.toString;var b=Math.max;function w(t,e){if(typeof t!="function"){throw new TypeError(n)}e=b(e===undefined?t.length-1:x(e),0);return function(){var r=arguments,n=-1,i=b(r.length-e,0),o=Array(i);while(++n<i){o[n]=r[e+n]}switch(e){case 0:return t.call(this,o);case 1:return t.call(this,r[0],o);case 2:return t.call(this,r[0],r[1],o)}var a=Array(e+1);n=-1;while(++n<e){a[n]=r[n]}a[e]=o;return v(t,this,a)}}function m(t){var e=_(t)?y.call(t):"";return e==s||e==u}function _(t){var e=typeof t;return!!t&&(e=="object"||e=="function")}function A(t){return!!t&&typeof t=="object"}function S(t){return typeof t=="symbol"||A(t)&&y.call(t)==f}function x(t){if(!t){return t===0?t:0}t=E(t);if(t===i||t===-i){var e=t<0?-1:1;return e*o}var r=t%1;return t===t?r?t-r:t:0}function E(t){if(typeof t=="number"){return t}if(S(t)){return a}if(_(t)){var e=m(t.valueOf)?t.valueOf():t;t=_(e)?e+"":e}if(typeof t!="string"){return t===0?t:+t}t=t.replace(h,"");var r=c.test(t);return r||p.test(t)?d(t.slice(2),r?2:8):l.test(t)?a:+t}e.exports=w},{}],20:[function(t,e,r){function n(t){return t}e.exports=n;e.exports.dash=n;e.exports.dash=n},{}],21:[function(t,e,r){(function(){var t=/^\s+/,r=/\s+$/,n=0,i=Math,o=i.round,a=i.min,s=i.max,u=i.random;function f(t,e){t=t?t:"";e=e||{};if(t instanceof f){return t}if(!(this instanceof f)){return new f(t,e)}var r=h(t);this._originalInput=t,this._r=r.r,this._g=r.g,this._b=r.b,this._a=r.a,this._roundA=o(100*this._a)/100,this._format=e.format||r.format;this._gradientType=e.gradientType;if(this._r<1){this._r=o(this._r)}if(this._g<1){this._g=o(this._g)}if(this._b<1){this._b=o(this._b)}this._ok=r.ok;this._tc_id=n++}f.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(t.r*299+t.g*587+t.b*114)/1e3},getLuminance:function(){var t=this.toRgb();var e,r,n,i,o,a;e=t.r/255;r=t.g/255;n=t.b/255;if(e<=.03928){i=e/12.92}else{i=Math.pow((e+.055)/1.055,2.4)}if(r<=.03928){o=r/12.92}else{o=Math.pow((r+.055)/1.055,2.4)}if(n<=.03928){a=n/12.92}else{a=Math.pow((n+.055)/1.055,2.4)}return.2126*i+.7152*o+.0722*a},setAlpha:function(t){this._a=C(t);this._roundA=o(100*this._a)/100;return this},toHsv:function(){var t=d(this._r,this._g,this._b);return{h:t.h*360,s:t.s,v:t.v,a:this._a}},toHsvString:function(){var t=d(this._r,this._g,this._b);var e=o(t.h*360),r=o(t.s*100),n=o(t.v*100);return this._a==1?"hsv("+e+", "+r+"%, "+n+"%)":"hsva("+e+", "+r+"%, "+n+"%, "+this._roundA+")"},toHsl:function(){var t=c(this._r,this._g,this._b);return{h:t.h*360,s:t.s,l:t.l,a:this._a}},toHslString:function(){var t=c(this._r,this._g,this._b);var e=o(t.h*360),r=o(t.s*100),n=o(t.l*100);return this._a==1?"hsl("+e+", "+r+"%, "+n+"%)":"hsla("+e+", "+r+"%, "+n+"%, "+this._roundA+")"},toHex:function(t){return g(this._r,this._g,this._b,t)},toHexString:function(t){return"#"+this.toHex(t)},toHex8:function(){return y(this._r,this._g,this._b,this._a)},toHex8String:function(){return"#"+this.toHex8()},toRgb:function(){return{r:o(this._r),g:o(this._g),b:o(this._b),a:this._a}},toRgbString:function(){return this._a==1?"rgb("+o(this._r)+", "+o(this._g)+", "+o(this._b)+")":"rgba("+o(this._r)+", "+o(this._g)+", "+o(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:o(L(this._r,255)*100)+"%",g:o(L(this._g,255)*100)+"%",b:o(L(this._b,255)*100)+"%",a:this._a}},toPercentageRgbString:function(){return this._a==1?"rgb("+o(L(this._r,255)*100)+"%, "+o(L(this._g,255)*100)+"%, "+o(L(this._b,255)*100)+"%)":"rgba("+o(L(this._r,255)*100)+"%, "+o(L(this._g,255)*100)+"%, "+o(L(this._b,255)*100)+"%, "+this._roundA+")"},toName:function(){if(this._a===0){return"transparent"}if(this._a<1){return false}return H[g(this._r,this._g,this._b,true)]||false},toFilter:function(t){var e="#"+y(this._r,this._g,this._b,this._a);var r=e;var n=this._gradientType?"GradientType = 1, ":"";if(t){var i=f(t);r=i.toHex8String()}return"progid:DXImageTransform.Microsoft.gradient("+n+"startColorstr="+e+",endColorstr="+r+")"},toString:function(t){var e=!!t;t=t||this._format;var r=false;var n=this._a<1&&this._a>=0;var i=!e&&n&&(t==="hex"||t==="hex6"||t==="hex3"||t==="name");if(i){if(t==="name"&&this._a===0){return this.toName()}return this.toRgbString()}if(t==="rgb"){r=this.toRgbString()}if(t==="prgb"){r=this.toPercentageRgbString()}if(t==="hex"||t==="hex6"){r=this.toHexString()}if(t==="hex3"){r=this.toHexString(true)}if(t==="hex8"){r=this.toHex8String()}if(t==="name"){r=this.toName()}if(t==="hsl"){r=this.toHslString()}if(t==="hsv"){r=this.toHsvString()}return r||this.toHexString()},clone:function(){return f(this.toString())},_applyModification:function(t,e){var r=t.apply(null,[this].concat([].slice.call(e)));this._r=r._r;this._g=r._g;this._b=r._b;this.setAlpha(r._a);return this},lighten:function(){return this._applyModification(_,arguments)},brighten:function(){return this._applyModification(A,arguments)},darken:function(){return this._applyModification(S,arguments)},desaturate:function(){return this._applyModification(b,arguments)},saturate:function(){return this._applyModification(w,arguments)},greyscale:function(){return this._applyModification(m,arguments)},spin:function(){return this._applyModification(x,arguments)},_applyCombination:function(t,e){return t.apply(null,[this].concat([].slice.call(e)))},analogous:function(){return this._applyCombination(P,arguments)},complement:function(){return this._applyCombination(E,arguments)},monochromatic:function(){return this._applyCombination(U,arguments)},splitcomplement:function(){return this._applyCombination(M,arguments)},triad:function(){return this._applyCombination(R,arguments)},tetrad:function(){return this._applyCombination(k,arguments)}};f.fromRatio=function(t,e){if(typeof t=="object"){var r={};for(var n in t){if(t.hasOwnProperty(n)){if(n==="a"){r[n]=t[n]}else{r[n]=D(t[n])}}}t=r}return f(t,e)};function h(t){var e={r:0,g:0,b:0};var r=1;var n=false;var i=false;if(typeof t=="string"){t=z(t)}if(typeof t=="object"){if(t.hasOwnProperty("r")&&t.hasOwnProperty("g")&&t.hasOwnProperty("b")){e=l(t.r,t.g,t.b);n=true;i=String(t.r).substr(-1)==="%"?"prgb":"rgb"}else if(t.hasOwnProperty("h")&&t.hasOwnProperty("s")&&t.hasOwnProperty("v")){t.s=D(t.s);t.v=D(t.v);e=v(t.h,t.s,t.v);n=true;i="hsv"}else if(t.hasOwnProperty("h")&&t.hasOwnProperty("s")&&t.hasOwnProperty("l")){t.s=D(t.s);t.l=D(t.l);e=p(t.h,t.s,t.l);n=true;i="hsl"}if(t.hasOwnProperty("a")){r=t.a}}r=C(r);return{ok:n,format:t.format||i,r:a(255,s(e.r,0)),g:a(255,s(e.g,0)),b:a(255,s(e.b,0)),a:r}}function l(t,e,r){return{r:L(t,255)*255,g:L(e,255)*255,b:L(r,255)*255}}function c(t,e,r){t=L(t,255);e=L(e,255);r=L(r,255);var n=s(t,e,r),i=a(t,e,r);var o,u,f=(n+i)/2;if(n==i){o=u=0}else{var h=n-i;u=f>.5?h/(2-n-i):h/(n+i);switch(n){case t:o=(e-r)/h+(e<r?6:0);break;case e:o=(r-t)/h+2;break;case r:o=(t-e)/h+4;break}o/=6}return{h:o,s:u,l:f}}function p(t,e,r){var n,i,o;t=L(t,360);e=L(e,100);r=L(r,100);function a(t,e,r){if(r<0)r+=1;if(r>1)r-=1;if(r<1/6)return t+(e-t)*6*r;if(r<1/2)return e;if(r<2/3)return t+(e-t)*(2/3-r)*6;return t}if(e===0){n=i=o=r}else{var s=r<.5?r*(1+e):r+e-r*e;var u=2*r-s;n=a(u,s,t+1/3);i=a(u,s,t);o=a(u,s,t-1/3)}return{r:n*255,g:i*255,b:o*255}}function d(t,e,r){t=L(t,255);e=L(e,255);r=L(r,255);var n=s(t,e,r),i=a(t,e,r);var o,u,f=n;var h=n-i;u=n===0?0:h/n;if(n==i){o=0}else{switch(n){case t:o=(e-r)/h+(e<r?6:0);break;case e:o=(r-t)/h+2;break;case r:o=(t-e)/h+4;break}o/=6}return{h:o,s:u,v:f}}function v(t,e,r){t=L(t,360)*6;e=L(e,100);r=L(r,100);var n=i.floor(t),o=t-n,a=r*(1-e),s=r*(1-o*e),u=r*(1-(1-o)*e),f=n%6,h=[r,s,a,a,u,r][f],l=[u,r,r,s,a,a][f],c=[a,a,u,r,r,s][f];return{r:h*255,g:l*255,b:c*255}}function g(t,e,r,n){var i=[I(o(t).toString(16)),I(o(e).toString(16)),I(o(r).toString(16))];if(n&&i[0].charAt(0)==i[0].charAt(1)&&i[1].charAt(0)==i[1].charAt(1)&&i[2].charAt(0)==i[2].charAt(1)){return i[0].charAt(0)+i[1].charAt(0)+i[2].charAt(0)}return i.join("")}function y(t,e,r,n){var i=[I(F(n)),I(o(t).toString(16)),I(o(e).toString(16)),I(o(r).toString(16))];return i.join("")}f.equals=function(t,e){if(!t||!e){return false}return f(t).toRgbString()==f(e).toRgbString()};f.random=function(){return f.fromRatio({r:u(),g:u(),b:u()})};function b(t,e){e=e===0?0:e||10;var r=f(t).toHsl();r.s-=e/100;r.s=j(r.s);return f(r)}function w(t,e){e=e===0?0:e||10;var r=f(t).toHsl();r.s+=e/100;r.s=j(r.s);return f(r)}function m(t){return f(t).desaturate(100)}function _(t,e){e=e===0?0:e||10;var r=f(t).toHsl();r.l+=e/100;r.l=j(r.l);return f(r)}function A(t,e){e=e===0?0:e||10;var r=f(t).toRgb();r.r=s(0,a(255,r.r-o(255*-(e/100))));r.g=s(0,a(255,r.g-o(255*-(e/100))));r.b=s(0,a(255,r.b-o(255*-(e/100))));return f(r)}function S(t,e){e=e===0?0:e||10;var r=f(t).toHsl();r.l-=e/100;r.l=j(r.l);return f(r)}function x(t,e){var r=f(t).toHsl();var n=(o(r.h)+e)%360;r.h=n<0?360+n:n;return f(r)}function E(t){var e=f(t).toHsl();e.h=(e.h+180)%360;return f(e)}function R(t){var e=f(t).toHsl();var r=e.h;return[f(t),f({h:(r+120)%360,s:e.s,l:e.l}),f({h:(r+240)%360,s:e.s,l:e.l})]}function k(t){var e=f(t).toHsl();var r=e.h;return[f(t),f({h:(r+90)%360,s:e.s,l:e.l}),f({h:(r+180)%360,s:e.s,l:e.l}),f({h:(r+270)%360,s:e.s,l:e.l})]}function M(t){var e=f(t).toHsl();var r=e.h;return[f(t),f({h:(r+72)%360,s:e.s,l:e.l}),f({h:(r+216)%360,s:e.s,l:e.l})]}function P(t,e,r){e=e||6;r=r||30;var n=f(t).toHsl();var i=360/r;var o=[f(t)];for(n.h=(n.h-(i*e>>1)+720)%360;--e;){n.h=(n.h+i)%360;o.push(f(n))}return o}function U(t,e){e=e||6;var r=f(t).toHsv();var n=r.h,i=r.s,o=r.v;var a=[];var s=1/e;while(e--){a.push(f({h:n,s:i,v:o}));o=(o+s)%1}return a}f.mix=function(t,e,r){r=r===0?0:r||50;var n=f(t).toRgb();var i=f(e).toRgb();var o=r/100;var a=o*2-1;var s=i.a-n.a;var u;if(a*s==-1){u=a}else{u=(a+s)/(1+a*s)}u=(u+1)/2;var h=1-u;var l={r:i.r*u+n.r*h,g:i.g*u+n.g*h,b:i.b*u+n.b*h,a:i.a*o+n.a*(1-o)};return f(l)};f.readability=function(t,e){var r=f(t);var n=f(e);return(Math.max(r.getLuminance(),n.getLuminance())+.05)/(Math.min(r.getLuminance(),n.getLuminance())+.05)};f.isReadable=function(t,e,r){var n=f.readability(t,e);var i,o;o=false;i=X(r);switch(i.level+i.size){case"AAsmall":case"AAAlarge":o=n>=4.5;break;case"AAlarge":o=n>=3;break;case"AAAsmall":o=n>=7;break}return o};f.mostReadable=function(t,e,r){var n=null;var i=0;var o;var a,s,u;r=r||{};a=r.includeFallbackColors;s=r.level;u=r.size;for(var h=0;h<e.length;h++){o=f.readability(t,e[h]);if(o>i){i=o;n=f(e[h])}}if(f.isReadable(t,n,{level:s,size:u})||!a){return n}else{r.includeFallbackColors=false;return f.mostReadable(t,["#fff","#000"],r)}};var T=f.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"};var H=f.hexNames=O(T);function O(t){var e={};for(var r in t){if(t.hasOwnProperty(r)){e[t[r]]=r}}return e}function C(t){t=parseFloat(t);if(isNaN(t)||t<0||t>1){t=1}return t}function L(t,e){if($(t)){t="100%"}var r=Y(t);t=a(e,s(0,parseFloat(t)));if(r){t=parseInt(t*e,10)/100}if(i.abs(t-e)<1e-6){return 1}return t%e/parseFloat(e)}function j(t){return a(1,s(0,t))}function B(t){return parseInt(t,16)}function $(t){return typeof t=="string"&&t.indexOf(".")!=-1&&parseFloat(t)===1}function Y(t){return typeof t==="string"&&t.indexOf("%")!=-1}function I(t){return t.length==1?"0"+t:""+t}function D(t){if(t<=1){t=t*100+"%"}return t}function F(t){return Math.round(parseFloat(t)*255).toString(16)}function N(t){return B(t)/255}var q=function(){var t="[-\\+]?\\d+%?";var e="[-\\+]?\\d*\\.\\d+%?";var r="(?:"+e+")|(?:"+t+")";var n="[\\s|\\(]+("+r+")[,|\\s]+("+r+")[,|\\s]+("+r+")\\s*\\)?";var i="[\\s|\\(]+("+r+")[,|\\s]+("+r+")[,|\\s]+("+r+")[,|\\s]+("+r+")\\s*\\)?";return{rgb:new RegExp("rgb"+n),rgba:new RegExp("rgba"+i),hsl:new RegExp("hsl"+n),hsla:new RegExp("hsla"+i),hsv:new RegExp("hsv"+n),hsva:new RegExp("hsva"+i),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})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/}}();function z(e){e=e.replace(t,"").replace(r,"").toLowerCase();var n=false;if(T[e]){e=T[e];n=true}else if(e=="transparent"){return{r:0,g:0,b:0,a:0,format:"name"}}var i;if(i=q.rgb.exec(e)){return{r:i[1],g:i[2],b:i[3]}}if(i=q.rgba.exec(e)){return{r:i[1],g:i[2],b:i[3],a:i[4]}}if(i=q.hsl.exec(e)){return{h:i[1],s:i[2],l:i[3]}}if(i=q.hsla.exec(e)){return{h:i[1],s:i[2],l:i[3],a:i[4]}}if(i=q.hsv.exec(e)){return{h:i[1],s:i[2],v:i[3]}}if(i=q.hsva.exec(e)){return{h:i[1],s:i[2],v:i[3],a:i[4]}}if(i=q.hex8.exec(e)){return{a:N(i[1]),r:B(i[2]),g:B(i[3]),b:B(i[4]),format:n?"name":"hex8"}}if(i=q.hex6.exec(e)){return{r:B(i[1]),g:B(i[2]),b:B(i[3]),format:n?"name":"hex"}}if(i=q.hex3.exec(e)){return{r:B(i[1]+""+i[1]),g:B(i[2]+""+i[2]),b:B(i[3]+""+i[3]),format:n?"name":"hex"}}return false}function X(t){var e,r;t=t||{level:"AA",size:"small"};e=(t.level||"AA").toUpperCase();r=(t.size||"small").toLowerCase();if(e!=="AA"&&e!=="AAA"){e="AA"}if(r!=="small"&&r!=="large"){r="small"}return{level:e,size:r}}if(typeof e!=="undefined"&&e.exports){e.exports=f}else if(typeof define==="function"&&define.amd){define(function(){return f})}else{window.tinycolor=f}})()},{}],22:[function(t,e,r){r=e.exports=n;function n(t){return t.replace(/^\s*|\s*$/g,"")}r.left=function(t){return t.replace(/^\s*/,"")};r.right=function(t){return t.replace(/\s*$/,"")}},{}],23:[function(t,e,r){"use strict";e.exports=function n(t,e,r){return Math.min(Math.max(t,e),r)}},{}]},{},[5]);
'use strict';
var domready = require('domready');
var ColorPicker = require('../index.js');
domready(function() {
/* --------------------------
ColorPicker
*/
var colorPicker = new ColorPicker({
el: document.body,
color: '#123456',
background: '#656565'
});
colorPicker.onChange(function(hexStringColor) {
document.body.style.background = hexStringColor;
document.querySelector('h1 a').style.color = colorPicker.color.isDark() ? '#FFFFFF' : '#000000';
});
/* --------------------------
ColorPicker
*/
var colorPicker = new ColorPicker({
el: document.body,
color: '#123456',
background: '#656565'
});
colorPicker.onChange(function(hexStringColor) {
document.body.style.background = hexStringColor;
document.querySelector('h1 a').style.color = colorPicker.color.isDark() ? '#FFFFFF' : '#000000';
});
'use strict';
var bindAll = require('lodash.bindall');
var transform = require('dom-transform');
var tinycolor = require('tinycolor2');
var Emitter = require('component-emitter');
var isNumber = require('is-number');
var tinycolor = require('tinycolor2');
var transform = require('dom-transform');
var clamp = require('./src/utils/maths/clamp');

@@ -264,3 +264,2 @@

});
};

@@ -279,3 +278,2 @@

});
};

@@ -292,3 +290,3 @@

var hueColor = tinycolor({h: this.hue, s: 1, v: 1});
this.$saturation.style.background = 'linear-gradient(to right, #fff 0%, ' + hueColor.toHexString() + ' 100%)';
this.$saturation.style.background = 'linear-gradient(to right, #fff, ' + hueColor.toHexString() + ')';
this._updateColor();

@@ -299,3 +297,3 @@ };

this.$sbSelector.style.background = this.color.toHexString();
this.$sbSelector.style.borderColor = this.color.isDark() ? '#FFF' : '#000';
this.$sbSelector.style.borderColor = this.color.isDark() ? '#fff' : '#000';
this.emit('update', this.color.toHexString());

@@ -302,0 +300,0 @@ };

{
"name": "simple-color-picker",
"version": "0.0.9",
"version": "0.1.0",
"description": "Simple Color picker in common.js.",
"main": "./index.js",
"scripts": {
"start": "npm run example & npm run css:watch",
"example": "budo example/example.js:example/example-build.js --live | garnish",
"example:build": "browserify example/example.js | uglifyjs -nm > example/example-build.js",
"css": "stylus -u autoprefixer-stylus src/css -o ./",
"css:watch": "stylus -u autoprefixer-stylus src/css -w -o ./",
"test": "browserify test/test.js | tap-closer | smokestack | faucet",
"test:nc": "browserify test/test.js | smokestack | faucet"
},
"author": "Guillaume Gouessan <guillaume.gouessan@gmail.com>",
"license": "MIT",
"repository": {

@@ -31,28 +23,36 @@ "type": "git",

],
"author": "Guillaume Gouessan <guillaume.gouessan@gmail.com>",
"license": "MIT",
"main": "index.js",
"typings": "index.d.ts",
"scripts": {
"start": "npm run example & npm run css:watch",
"example": "budo example/example.js:example/example-build.js --live | garnish",
"example:build": "browserify example/example.js | uglifyjs -nm > example/example-build.js",
"css": "stylus -u autoprefixer-stylus src/css -o ./",
"css:watch": "stylus -u autoprefixer-stylus src/css -w -o ./",
"test": "browserify test/test.js | tap-closer | smokestack | faucet",
"test:nc": "browserify test/test.js | smokestack | faucet"
},
"devDependencies": {
"autoprefixer-stylus": "^0.5.0",
"browserify": "^9.0.8",
"browserify-css": "^0.6.1",
"budo": "^3.1.1",
"domready": "^1.0.7",
"autoprefixer-stylus": "^0.9.2",
"browserify": "^13.0.0",
"browserify-css": "^0.9.1",
"budo": "^8.1.0",
"faucet": "0.0.1",
"garnish": "^2.1.3",
"jsdom": "^3.1.2",
"raf": "^2.0.4",
"smokestack": "^3.2.2",
"stylus": "^0.50.0",
"garnish": "^5.2.0",
"jsdom": "^8.3.0",
"raf": "^3.2.0",
"smokestack": "^3.4.1",
"stylus": "^0.54.2",
"tap-closer": "^1.0.0",
"tape": "^4.0.0",
"uglify-js": "^2.4.20",
"watchify": "^3.1.2"
"tape": "^4.5.1",
"uglify-js": "^2.6.2",
"watchify": "^3.7.0"
},
"dependencies": {
"component-emitter": "^1.2.0",
"dom-transform": "^1.0.1",
"is-number": "^1.1.2",
"lodash.bindall": "^3.1.0",
"tinycolor2": "^1.1.2"
"dom-transform": "^2.0.0",
"is-number": "^2.1.0",
"lodash.bindall": "^4.1.1",
"tinycolor2": "^1.3.0"
}
}

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc