Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@fractal-components/random-gif-pair-pair

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@fractal-components/random-gif-pair-pair - npm Package Compare versions

Comparing version 1.0.7 to 1.1.0

dist/@fractal-components/random-gif-pair-pair.cjs.js.map

17

dist/@fractal-components/random-gif-pair-pair.cjs.js

@@ -7,7 +7,2 @@ 'use strict';

var _extends = _interopDefault(require('@babel/runtime/helpers/extends'));
var RandomGifPair = require('@fractal-components/random-gif-pair');
var RandomGifPair__default = _interopDefault(RandomGifPair);
var _regeneratorRuntime = _interopDefault(require('@babel/runtime/regenerator'));
var color = _interopDefault(require('color'));
var _inheritsLoose = _interopDefault(require('@babel/runtime/helpers/inheritsLoose'));

@@ -18,4 +13,9 @@ var _assertThisInitialized = _interopDefault(require('@babel/runtime/helpers/assertThisInitialized'));

var fractalComponent = require('fractal-component');
var RandomGifPair = require('@fractal-components/random-gif-pair');
var RandomGifPair__default = _interopDefault(RandomGifPair);
var _extends = _interopDefault(require('@babel/runtime/helpers/extends'));
var _regeneratorRuntime = _interopDefault(require('@babel/runtime/regenerator'));
var jss = _interopDefault(require('jss'));
var jssDefaultPreset = _interopDefault(require('jss-preset-default'));
var color = _interopDefault(require('color'));

@@ -258,3 +258,3 @@ var REQUEST_NEW_PAIR_PAIR =

_this.isLoadingStartActionDispatched = false;
_this.componentManager = fractalComponent.AppContainerUtils.registerComponent(_assertThisInitialized(_assertThisInitialized(_this)), {
_this.componentManager = new fractalComponent.ComponentManager(_assertThisInitialized(_assertThisInitialized(_this)), {
namespace: "io.github.t83714/RandomGifPairPair",

@@ -359,4 +359,6 @@ reducer: reducer,

showButton: true
};
}; // --- Define contentType allow `AppContainer` pass through React Content
RandomGifPairPair.contextType = fractalComponent.AppContainerContext;
var exposedActionTypes = {

@@ -378,1 +380,2 @@ // --- export NEW_GIF action type as well just

exports.actions = exposedActions;
//# sourceMappingURL=random-gif-pair-pair.cjs.js.map

@@ -1,5 +0,1 @@

import _extends from '@babel/runtime/helpers/extends';
import RandomGifPair, { actionTypes, actions } from '@fractal-components/random-gif-pair';
import _regeneratorRuntime from '@babel/runtime/regenerator';
import color from 'color';
import _inheritsLoose from '@babel/runtime/helpers/inheritsLoose';

@@ -9,5 +5,9 @@ import _assertThisInitialized from '@babel/runtime/helpers/assertThisInitialized';

import PropTypes from 'prop-types';
import { AppContainerUtils, ActionForwarder, AppContainer } from 'fractal-component';
import { ComponentManager, ActionForwarder, AppContainer, AppContainerContext } from 'fractal-component';
import RandomGifPair, { actionTypes, actions } from '@fractal-components/random-gif-pair';
import _extends from '@babel/runtime/helpers/extends';
import _regeneratorRuntime from '@babel/runtime/regenerator';
import jss from 'jss';
import jssDefaultPreset from 'jss-preset-default';
import color from 'color';

@@ -250,3 +250,3 @@ var REQUEST_NEW_PAIR_PAIR =

_this.isLoadingStartActionDispatched = false;
_this.componentManager = AppContainerUtils.registerComponent(_assertThisInitialized(_assertThisInitialized(_this)), {
_this.componentManager = new ComponentManager(_assertThisInitialized(_assertThisInitialized(_this)), {
namespace: "io.github.t83714/RandomGifPairPair",

@@ -351,4 +351,6 @@ reducer: reducer,

showButton: true
};
}; // --- Define contentType allow `AppContainer` pass through React Content
RandomGifPairPair.contextType = AppContainerContext;
var exposedActionTypes = {

@@ -369,1 +371,2 @@ // --- export NEW_GIF action type as well just

export { exposedActionTypes as actionTypes, exposedActions as actions };
//# sourceMappingURL=random-gif-pair-pair.esm.js.map

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

!function(e,r){"object"==typeof exports&&"undefined"!=typeof module?r(exports,require("@fractal-components/random-gif-pair"),require("react"),require("prop-types"),require("fractal-component"),require("jss"),require("jss-preset-default")):"function"==typeof define&&define.amd?define(["exports","@fractal-components/random-gif-pair","react","prop-types","fractal-component","jss","jss-preset-default"],r):r(e.RandomGifPairPair={},e.RandomGifPair,e.React,e.PropTypes,e.FractalComponent,e.jss,e.jssPreset)}(this,function(e,u,n,r,a,o,i){"use strict";var l="default"in u?u.default:u;n=n&&n.hasOwnProperty("default")?n.default:n,r=r&&r.hasOwnProperty("default")?r.default:r,o=o&&o.hasOwnProperty("default")?o.default:o,i=i&&i.hasOwnProperty("default")?i.default:i;var s=function(e,r){e.prototype=Object.create(r.prototype),(e.prototype.constructor=e).__proto__=r};var c=function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e},h=Symbol("REQUEST_NEW_PAIR_PAIR"),t=Symbol("LOADING_START"),f=Symbol("LOADING_COMPLETE"),p=Object.freeze({REQUEST_NEW_PAIR_PAIR:h,LOADING_START:t,LOADING_COMPLETE:f});function d(){return{type:h}}function g(e,r){return e(r={exports:{}},r.exports),r.exports}var m=g(function(e){function r(){return e.exports=r=Object.assign||function(e){for(var r=1;r<arguments.length;r++){var t=arguments[r];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])}return e},r.apply(this,arguments)}e.exports=r}),y=function(e,r){var t;switch(r.type){case u.actionTypes.LOADING_START:return m({},e,{isLoading:!0,itemsLoading:m({},e.itemsLoading,(t={},t[r.componentId]=!0,t))});case u.actionTypes.LOADING_COMPLETE:var n,a=r.payload,o=a.isSuccess,i=a.payloadError,l=e.itemsLoading,s=e.error;l=m({},l,((n={})[r.componentId]=!1,n));var c=!1;return Object.keys(l).forEach(function(e){l[e]&&(c=!0)}),m({},e,{isLoading:c,error:s||(o?null:i),itemsLoading:l});default:return e}},v=g(function(N){!function(e){var s,r=Object.prototype,c=r.hasOwnProperty,t="function"==typeof Symbol?Symbol:{},a=t.iterator||"@@iterator",n=t.asyncIterator||"@@asyncIterator",o=t.toStringTag||"@@toStringTag",i=e.regeneratorRuntime;if(i)N.exports=i;else{(i=e.regeneratorRuntime=N.exports).wrap=v;var u="suspendedStart",h="suspendedYield",f="executing",p="completed",d={},l={};l[a]=function(){return this};var g=Object.getPrototypeOf,m=g&&g(g(A([])));m&&m!==r&&c.call(m,a)&&(l=m);var y=x.prototype=w.prototype=Object.create(l);k.prototype=y.constructor=x,x.constructor=k,x[o]=k.displayName="GeneratorFunction",i.isGeneratorFunction=function(e){var r="function"==typeof e&&e.constructor;return!!r&&(r===k||"GeneratorFunction"===(r.displayName||r.name))},i.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,x):(e.__proto__=x,o in e||(e[o]="GeneratorFunction")),e.prototype=Object.create(y),e},i.awrap=function(e){return{__await:e}},M(E.prototype),E.prototype[n]=function(){return this},i.AsyncIterator=E,i.async=function(e,r,t,n){var a=new E(v(e,r,t,n));return i.isGeneratorFunction(r)?a:a.next().then(function(e){return e.done?e.value:a.next()})},M(y),y[o]="Generator",y[a]=function(){return this},y.toString=function(){return"[object Generator]"},i.keys=function(t){var n=[];for(var e in t)n.push(e);return n.reverse(),function e(){for(;n.length;){var r=n.pop();if(r in t)return e.value=r,e.done=!1,e}return e.done=!0,e}},i.values=A,j.prototype={constructor:j,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=s,this.done=!1,this.delegate=null,this.method="next",this.arg=s,this.tryEntries.forEach(L),!e)for(var r in this)"t"===r.charAt(0)&&c.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=s)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var n=this;function e(e,r){return o.type="throw",o.arg=t,n.next=e,r&&(n.method="next",n.arg=s),!!r}for(var r=this.tryEntries.length-1;0<=r;--r){var a=this.tryEntries[r],o=a.completion;if("root"===a.tryLoc)return e("end");if(a.tryLoc<=this.prev){var i=c.call(a,"catchLoc"),l=c.call(a,"finallyLoc");if(i&&l){if(this.prev<a.catchLoc)return e(a.catchLoc,!0);if(this.prev<a.finallyLoc)return e(a.finallyLoc)}else if(i){if(this.prev<a.catchLoc)return e(a.catchLoc,!0)}else{if(!l)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return e(a.finallyLoc)}}}},abrupt:function(e,r){for(var t=this.tryEntries.length-1;0<=t;--t){var n=this.tryEntries[t];if(n.tryLoc<=this.prev&&c.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var a=n;break}}!a||"break"!==e&&"continue"!==e||r<a.tryLoc||a.finallyLoc<r||(a=null);var o=a?a.completion:{};return o.type=e,o.arg=r,a?(this.method="next",this.next=a.finallyLoc,d):this.complete(o)},complete:function(e,r){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&r&&(this.next=r),d},finish:function(e){for(var r=this.tryEntries.length-1;0<=r;--r){var t=this.tryEntries[r];if(t.finallyLoc===e)return this.complete(t.completion,t.afterLoc),L(t),d}},catch:function(e){for(var r=this.tryEntries.length-1;0<=r;--r){var t=this.tryEntries[r];if(t.tryLoc===e){var n=t.completion;if("throw"===n.type){var a=n.arg;L(t)}return a}}throw Error("illegal catch attempt")},delegateYield:function(e,r,t){return this.delegate={iterator:A(e),resultName:r,nextLoc:t},"next"===this.method&&(this.arg=s),d}}}function v(e,r,t,n){var o,i,l,s,a=Object.create((r&&r.prototype instanceof w?r:w).prototype),c=new j(n||[]);return a._invoke=(o=e,i=t,l=c,s=u,function(e,r){if(s===f)throw Error("Generator is already running");if(s===p){if("throw"===e)throw r;return _()}for(l.method=e,l.arg=r;;){var t=l.delegate;if(t){var n=O(t,l);if(n){if(n===d)continue;return n}}if("next"===l.method)l.sent=l._sent=l.arg;else if("throw"===l.method){if(s===u)throw s=p,l.arg;l.dispatchException(l.arg)}else"return"===l.method&&l.abrupt("return",l.arg);s=f;var a=b(o,i,l);if("normal"===a.type){if(s=l.done?p:h,a.arg===d)continue;return{value:a.arg,done:l.done}}"throw"===a.type&&(s=p,l.method="throw",l.arg=a.arg)}}),a}function b(e,r,t){try{return{type:"normal",arg:e.call(r,t)}}catch(e){return{type:"throw",arg:e}}}function w(){}function k(){}function x(){}function M(e){["next","throw","return"].forEach(function(r){e[r]=function(e){return this._invoke(r,e)}})}function E(s){var r;this._invoke=function(t,n){function e(){return new Promise(function(e,r){!function r(e,t,n,a){var o=b(s[e],s,t);if("throw"!==o.type){var i=o.arg,l=i.value;return l&&"object"==typeof l&&c.call(l,"__await")?Promise.resolve(l.__await).then(function(e){r("next",e,n,a)},function(e){r("throw",e,n,a)}):Promise.resolve(l).then(function(e){i.value=e,n(i)},function(e){return r("throw",e,n,a)})}a(o.arg)}(t,n,e,r)})}return r=r?r.then(e,e):e()}}function O(e,r){var t=e.iterator[r.method];if(t===s){if(r.delegate=null,"throw"===r.method){if(e.iterator.return&&(r.method="return",r.arg=s,O(e,r),"throw"===r.method))return d;r.method="throw",r.arg=new TypeError("The iterator does not provide a 'throw' method")}return d}var n=b(t,e.iterator,r.arg);if("throw"===n.type)return r.method="throw",r.arg=n.arg,r.delegate=null,d;var a=n.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=s),r.delegate=null,d):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,d)}function P(e){var r={tryLoc:e[0]};1 in e&&(r.catchLoc=e[1]),2 in e&&(r.finallyLoc=e[2],r.afterLoc=e[3]),this.tryEntries.push(r)}function L(e){var r=e.completion||{};r.type="normal",delete r.arg,e.completion=r}function j(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(P,this),this.reset(!0)}function A(r){if(r){var e=r[a];if(e)return e.call(r);if("function"==typeof r.next)return r;if(!isNaN(r.length)){var t=-1,n=function e(){for(;++t<r.length;)if(c.call(r,t))return e.value=r[t],e.done=!1,e;return e.value=s,e.done=!0,e};return n.next=n}}return{next:_}}function _(){return{value:s,done:!0}}}(function(){return this||"object"==typeof self&&self}()||Function("return this")())}),b=function(){return this||"object"==typeof self&&self}()||Function("return this")(),w=b.regeneratorRuntime&&0<=Object.getOwnPropertyNames(b).indexOf("regeneratorRuntime"),k=w&&b.regeneratorRuntime;b.regeneratorRuntime=void 0;var x=v;if(w)b.regeneratorRuntime=k;else try{delete b.regeneratorRuntime}catch(e){b.regeneratorRuntime=void 0}var M=x,E=M.mark(O);function O(a){return M.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,a.takeEvery(u.actionTypes.LOADING_START,M.mark(function e(){return M.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(this.isLoadingStartActionDispatched){e.next=3;break}return e.next=3,a.put({type:t},"../../../*");case 3:case"end":return e.stop()}},e,this)}).bind(this));case 2:return e.next=4,a.takeEvery(u.actionTypes.LOADING_COMPLETE,M.mark(function e(){var t,n;return M.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,a.select();case 2:if(n=(t=e.sent).error,t.isLoading){e.next=9;break}return e.next=8,a.put((void 0===(r=n)&&(r=null),{type:f,payload:{isSuccess:!r,error:r}}),"../../../*");case 8:this.isLoadingStartActionDispatched=!1;case 9:case"end":return e.stop()}var r},e,this)}).bind(this));case 4:return e.next=6,a.takeEvery(h,M.mark(function e(){return M.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,a.put(u.actions.requestNewPair(),"./GifPairs/*");case 2:case"end":return e.stop()}},e,this)}));case 6:case"end":return e.stop()}},E,this)}var P={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]},L=g(function(e){var i=Array.prototype.concat,l=Array.prototype.slice,r=e.exports=function(e){for(var r,t=[],n=0,a=e.length;n<a;n++){var o=e[n];(r=o)&&"string"!=typeof r&&(r instanceof Array||Array.isArray(r)||0<=r.length&&(r.splice instanceof Function||Object.getOwnPropertyDescriptor(r,r.length-1)&&"String"!==r.constructor.name))?t=i.call(t,l.call(o)):t.push(o)}return t};r.wrap=function(e){return function(){return e(r(arguments))}}}),j=g(function(e){var r={};for(var t in P)P.hasOwnProperty(t)&&(r[P[t]]=t);var n=e.exports={to:{},get:{}};function i(e,r,t){return Math.min(Math.max(r,e),t)}function a(e){var r=e.toString(16).toUpperCase();return r.length<2?"0"+r:r}n.get=function(e){var r,t;switch(e.substring(0,3).toLowerCase()){case"hsl":r=n.get.hsl(e),t="hsl";break;case"hwb":r=n.get.hwb(e),t="hwb";break;default:r=n.get.rgb(e),t="rgb"}return r?{model:t,value:r}:null},n.get.rgb=function(e){if(!e)return null;var r,t,n,a=[0,0,0,1];if(r=e.match(/^#([a-f0-9]{6})([a-f0-9]{2})?$/i)){for(n=r[2],r=r[1],t=0;t<3;t++){var o=2*t;a[t]=parseInt(r.slice(o,o+2),16)}n&&(a[3]=Math.round(parseInt(n,16)/255*100)/100)}else if(r=e.match(/^#([a-f0-9]{3,4})$/i)){for(n=(r=r[1])[3],t=0;t<3;t++)a[t]=parseInt(r[t]+r[t],16);n&&(a[3]=Math.round(parseInt(n+n,16)/255*100)/100)}else if(r=e.match(/^rgba?\(\s*([+-]?\d+)\s*,\s*([+-]?\d+)\s*,\s*([+-]?\d+)\s*(?:,\s*([+-]?[\d\.]+)\s*)?\)$/)){for(t=0;t<3;t++)a[t]=parseInt(r[t+1],0);r[4]&&(a[3]=parseFloat(r[4]))}else{if(!(r=e.match(/^rgba?\(\s*([+-]?[\d\.]+)\%\s*,\s*([+-]?[\d\.]+)\%\s*,\s*([+-]?[\d\.]+)\%\s*(?:,\s*([+-]?[\d\.]+)\s*)?\)$/)))return(r=e.match(/(\D+)/))?"transparent"===r[1]?[0,0,0,0]:(a=P[r[1]])?(a[3]=1,a):null:null;for(t=0;t<3;t++)a[t]=Math.round(2.55*parseFloat(r[t+1]));r[4]&&(a[3]=parseFloat(r[4]))}for(t=0;t<3;t++)a[t]=i(a[t],0,255);return a[3]=i(a[3],0,1),a},n.get.hsl=function(e){if(!e)return null;var r=e.match(/^hsla?\(\s*([+-]?(?:\d*\.)?\d+)(?:deg)?\s*,\s*([+-]?[\d\.]+)%\s*,\s*([+-]?[\d\.]+)%\s*(?:,\s*([+-]?[\d\.]+)\s*)?\)$/);if(r){var t=parseFloat(r[4]);return[(parseFloat(r[1])+360)%360,i(parseFloat(r[2]),0,100),i(parseFloat(r[3]),0,100),i(isNaN(t)?1:t,0,1)]}return null},n.get.hwb=function(e){if(!e)return null;var r=e.match(/^hwb\(\s*([+-]?\d*[\.]?\d+)(?:deg)?\s*,\s*([+-]?[\d\.]+)%\s*,\s*([+-]?[\d\.]+)%\s*(?:,\s*([+-]?[\d\.]+)\s*)?\)$/);if(r){var t=parseFloat(r[4]);return[(parseFloat(r[1])%360+360)%360,i(parseFloat(r[2]),0,100),i(parseFloat(r[3]),0,100),i(isNaN(t)?1:t,0,1)]}return null},n.to.hex=function(){var e=L(arguments);return"#"+a(e[0])+a(e[1])+a(e[2])+(e[3]<1?a(Math.round(255*e[3])):"")},n.to.rgb=function(){var e=L(arguments);return e.length<4||1===e[3]?"rgb("+Math.round(e[0])+", "+Math.round(e[1])+", "+Math.round(e[2])+")":"rgba("+Math.round(e[0])+", "+Math.round(e[1])+", "+Math.round(e[2])+", "+e[3]+")"},n.to.rgb.percent=function(){var e=L(arguments),r=Math.round(e[0]/255*100),t=Math.round(e[1]/255*100),n=Math.round(e[2]/255*100);return e.length<4||1===e[3]?"rgb("+r+"%, "+t+"%, "+n+"%)":"rgba("+r+"%, "+t+"%, "+n+"%, "+e[3]+")"},n.to.hsl=function(){var e=L(arguments);return e.length<4||1===e[3]?"hsl("+e[0]+", "+e[1]+"%, "+e[2]+"%)":"hsla("+e[0]+", "+e[1]+"%, "+e[2]+"%, "+e[3]+")"},n.to.hwb=function(){var e=L(arguments),r="";return e.length<4||1===e[3]||(r=", "+e[3]),"hwb("+e[0]+", "+e[1]+"%, "+e[2]+"%"+r+")"},n.to.keyword=function(e){return r[e.slice(0,3)]}}),A={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]},_=g(function(e){var s={};for(var r in A)A.hasOwnProperty(r)&&(s[A[r]]=r);var i=e.exports={rgb:{channels:3,labels:"rgb"},hsl:{channels:3,labels:"hsl"},hsv:{channels:3,labels:"hsv"},hwb:{channels:3,labels:"hwb"},cmyk:{channels:4,labels:"cmyk"},xyz:{channels:3,labels:"xyz"},lab:{channels:3,labels:"lab"},lch:{channels:3,labels:"lch"},hex:{channels:1,labels:["hex"]},keyword:{channels:1,labels:["keyword"]},ansi16:{channels:1,labels:["ansi16"]},ansi256:{channels:1,labels:["ansi256"]},hcg:{channels:3,labels:["h","c","g"]},apple:{channels:3,labels:["r16","g16","b16"]},gray:{channels:1,labels:["gray"]}};for(var t in i)if(i.hasOwnProperty(t)){if(!("channels"in i[t]))throw Error("missing channels property: "+t);if(!("labels"in i[t]))throw Error("missing channel labels property: "+t);if(i[t].labels.length!==i[t].channels)throw Error("channel and label counts mismatch: "+t);var n=i[t].channels,a=i[t].labels;delete i[t].channels,delete i[t].labels,Object.defineProperty(i[t],"channels",{value:n}),Object.defineProperty(i[t],"labels",{value:a})}i.rgb.hsl=function(e){var r,t,n=e[0]/255,a=e[1]/255,o=e[2]/255,i=Math.min(n,a,o),l=Math.max(n,a,o),s=l-i;return l===i?r=0:n===l?r=(a-o)/s:a===l?r=2+(o-n)/s:o===l&&(r=4+(n-a)/s),(r=Math.min(60*r,360))<0&&(r+=360),t=(i+l)/2,[r,100*(l===i?0:.5<t?s/(2-l-i):s/(l+i)),100*t]},i.rgb.hsv=function(e){var r,t,n,a,o,i=e[0]/255,l=e[1]/255,s=e[2]/255,c=Math.max(i,l,s),u=c-Math.min(i,l,s),h=function(e){return(c-e)/6/u+.5};return 0===u?a=o=0:(o=u/c,r=h(i),t=h(l),n=h(s),i===c?a=n-t:l===c?a=1/3+r-n:s===c&&(a=2/3+t-r),a<0?a+=1:1<a&&(a-=1)),[360*a,100*o,100*c]},i.rgb.hwb=function(e){var r=e[0],t=e[1],n=e[2];return[i.rgb.hsl(e)[0],100*(1/255*Math.min(r,Math.min(t,n))),100*(n=1-1/255*Math.max(r,Math.max(t,n)))]},i.rgb.cmyk=function(e){var r,t=e[0]/255,n=e[1]/255,a=e[2]/255;return[100*((1-t-(r=Math.min(1-t,1-n,1-a)))/(1-r)||0),100*((1-n-r)/(1-r)||0),100*((1-a-r)/(1-r)||0),100*r]},i.rgb.keyword=function(e){var r=s[e];if(r)return r;var t,n,a,o=1/0;for(var i in A)if(A.hasOwnProperty(i)){var l=Math.pow((n=e)[0]-(a=A[i])[0],2)+Math.pow(n[1]-a[1],2)+Math.pow(n[2]-a[2],2);l<o&&(o=l,t=i)}return t},i.keyword.rgb=function(e){return A[e]},i.rgb.xyz=function(e){var r=e[0]/255,t=e[1]/255,n=e[2]/255;return[100*(.4124*(r=.04045<r?Math.pow((r+.055)/1.055,2.4):r/12.92)+.3576*(t=.04045<t?Math.pow((t+.055)/1.055,2.4):t/12.92)+.1805*(n=.04045<n?Math.pow((n+.055)/1.055,2.4):n/12.92)),100*(.2126*r+.7152*t+.0722*n),100*(.0193*r+.1192*t+.9505*n)]},i.rgb.lab=function(e){var r=i.rgb.xyz(e),t=r[0],n=r[1],a=r[2];return n/=100,a/=108.883,t=.008856<(t/=95.047)?Math.pow(t,1/3):7.787*t+16/116,[116*(n=.008856<n?Math.pow(n,1/3):7.787*n+16/116)-16,500*(t-n),200*(n-(a=.008856<a?Math.pow(a,1/3):7.787*a+16/116))]},i.hsl.rgb=function(e){var r,t,n,a,o,i=e[0]/360,l=e[1]/100,s=e[2]/100;if(0===l)return[o=255*s,o,o];r=2*s-(t=s<.5?s*(1+l):s+l-s*l),a=[0,0,0];for(var c=0;c<3;c++)(n=i+1/3*-(c-1))<0&&n++,1<n&&n--,a[c]=255*(o=6*n<1?r+6*(t-r)*n:2*n<1?t:3*n<2?r+(t-r)*(2/3-n)*6:r);return a},i.hsl.hsv=function(e){var r=e[0],t=e[1]/100,n=e[2]/100,a=t,o=Math.max(n,.01);return t*=1<(n*=2)?2-n:n,a*=1<o?2-o:o,[r,100*(0===n?2*a/(o+a):2*t/(n+t)),100*((n+t)/2)]},i.hsv.rgb=function(e){var r=e[0]/60,t=e[1]/100,n=e[2]/100,a=Math.floor(r)%6,o=r-Math.floor(r),i=255*n*(1-t),l=255*n*(1-t*o),s=255*n*(1-t*(1-o));switch(n*=255,a){case 0:return[n,s,i];case 1:return[l,n,i];case 2:return[i,n,s];case 3:return[i,l,n];case 4:return[s,i,n];case 5:return[n,i,l]}},i.hsv.hsl=function(e){var r,t,n,a=e[0],o=e[1]/100,i=e[2]/100,l=Math.max(i,.01);return n=(2-o)*i,t=o*l,[a,100*(t=(t/=1<(r=(2-o)*l)?2-r:r)||0),100*(n/=2)]},i.hwb.rgb=function(e){var r,t,n,a,o,i,l,s=e[0]/360,c=e[1]/100,u=e[2]/100,h=c+u;switch(1<h&&(c/=h,u/=h),n=6*s-(r=Math.floor(6*s)),0!=(1&r)&&(n=1-n),a=c+n*((t=1-u)-c),r){default:case 6:case 0:o=t,i=a,l=c;break;case 1:o=a,i=t,l=c;break;case 2:o=c,i=t,l=a;break;case 3:o=c,i=a,l=t;break;case 4:o=a,i=c,l=t;break;case 5:o=t,i=c,l=a}return[255*o,255*i,255*l]},i.cmyk.rgb=function(e){var r=e[1]/100,t=e[2]/100,n=e[3]/100;return[255*(1-Math.min(1,e[0]/100*(1-n)+n)),255*(1-Math.min(1,r*(1-n)+n)),255*(1-Math.min(1,t*(1-n)+n))]},i.xyz.rgb=function(e){var r,t,n,a=e[0]/100,o=e[1]/100,i=e[2]/100;return t=-.9689*a+1.8758*o+.0415*i,n=.0557*a+-.204*o+1.057*i,r=.0031308<(r=3.2406*a+-1.5372*o+-.4986*i)?1.055*Math.pow(r,1/2.4)-.055:12.92*r,t=.0031308<t?1.055*Math.pow(t,1/2.4)-.055:12.92*t,n=.0031308<n?1.055*Math.pow(n,1/2.4)-.055:12.92*n,[255*(r=Math.min(Math.max(0,r),1)),255*(t=Math.min(Math.max(0,t),1)),255*(n=Math.min(Math.max(0,n),1))]},i.xyz.lab=function(e){var r=e[0],t=e[1],n=e[2];return t/=100,n/=108.883,r=.008856<(r/=95.047)?Math.pow(r,1/3):7.787*r+16/116,[116*(t=.008856<t?Math.pow(t,1/3):7.787*t+16/116)-16,500*(r-t),200*(t-(n=.008856<n?Math.pow(n,1/3):7.787*n+16/116))]},i.lab.xyz=function(e){var r,t,n;r=e[1]/500+(t=(e[0]+16)/116),n=t-e[2]/200;var a=Math.pow(t,3),o=Math.pow(r,3),i=Math.pow(n,3);return t=.008856<a?a:(t-16/116)/7.787,r=.008856<o?o:(r-16/116)/7.787,n=.008856<i?i:(n-16/116)/7.787,[r*=95.047,t*=100,n*=108.883]},i.lab.lch=function(e){var r,t=e[0],n=e[1],a=e[2];return(r=360*Math.atan2(a,n)/2/Math.PI)<0&&(r+=360),[t,Math.sqrt(n*n+a*a),r]},i.lch.lab=function(e){var r,t=e[1];return[e[0],t*Math.cos(r=e[2]/360*2*Math.PI),t*Math.sin(r)]},i.rgb.ansi16=function(e){var r=e[0],t=e[1],n=e[2],a=1 in arguments?arguments[1]:i.rgb.hsv(e)[2];if(0===(a=Math.round(a/50)))return 30;var o=30+(Math.round(n/255)<<2|Math.round(t/255)<<1|Math.round(r/255));return 2===a&&(o+=60),o},i.hsv.ansi16=function(e){return i.rgb.ansi16(i.hsv.rgb(e),e[2])},i.rgb.ansi256=function(e){var r=e[0],t=e[1],n=e[2];return r===t&&t===n?r<8?16:248<r?231:232+Math.round((r-8)/247*24):16+36*Math.round(r/255*5)+6*Math.round(t/255*5)+Math.round(n/255*5)},i.ansi16.rgb=function(e){var r=e%10;if(0===r||7===r)return 50<e&&(r+=3.5),[r=r/10.5*255,r,r];var t=.5*(1+~~(50<e));return[(1&r)*t*255,(r>>1&1)*t*255,(r>>2&1)*t*255]},i.ansi256.rgb=function(e){if(e<232)return[Math.floor((e-=16)/36)/5*255,Math.floor((r=e%36)/6)/5*255,r%6/5*255];var r,t=10*(e-232)+8;return[t,t,t]},i.rgb.hex=function(e){var r=(((255&Math.round(e[0]))<<16)+((255&Math.round(e[1]))<<8)+(255&Math.round(e[2]))).toString(16).toUpperCase();return"000000".substring(r.length)+r},i.hex.rgb=function(e){var r=e.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!r)return[0,0,0];var t=r[0];3===r[0].length&&(t=t.split("").map(function(e){return e+e}).join(""));var n=parseInt(t,16);return[n>>16&255,n>>8&255,255&n]},i.rgb.hcg=function(e){var r,t=e[0]/255,n=e[1]/255,a=e[2]/255,o=Math.max(Math.max(t,n),a),i=Math.min(Math.min(t,n),a),l=o-i;return r=0<l?o===t?(n-a)/l%6:o===n?2+(a-t)/l:4+(t-n)/l+4:0,r/=6,[360*(r%=1),100*l,100*(l<1?i/(1-l):0)]},i.hsl.hcg=function(e){var r=e[1]/100,t=e[2]/100,n=1,a=0;return(n=t<.5?2*r*t:2*r*(1-t))<1&&(a=(t-.5*n)/(1-n)),[e[0],100*n,100*a]},i.hsv.hcg=function(e){var r=e[2]/100,t=e[1]/100*r,n=0;return t<1&&(n=(r-t)/(1-t)),[e[0],100*t,100*n]},i.hcg.rgb=function(e){var r=e[1]/100,t=e[2]/100;if(0===r)return[255*t,255*t,255*t];var n,a=[0,0,0],o=e[0]/360%1*6,i=o%1,l=1-i;switch(Math.floor(o)){case 0:a[0]=1,a[1]=i,a[2]=0;break;case 1:a[0]=l,a[1]=1,a[2]=0;break;case 2:a[0]=0,a[1]=1,a[2]=i;break;case 3:a[0]=0,a[1]=l,a[2]=1;break;case 4:a[0]=i,a[1]=0,a[2]=1;break;default:a[0]=1,a[1]=0,a[2]=l}return[255*(r*a[0]+(n=(1-r)*t)),255*(r*a[1]+n),255*(r*a[2]+n)]},i.hcg.hsv=function(e){var r=e[1]/100,t=r+e[2]/100*(1-r),n=0;return 0<t&&(n=r/t),[e[0],100*n,100*t]},i.hcg.hsl=function(e){var r=e[1]/100,t=e[2]/100*(1-r)+.5*r,n=0;return 0<t&&t<.5?n=r/(2*t):.5<=t&&t<1&&(n=r/(2*(1-t))),[e[0],100*n,100*t]},i.hcg.hwb=function(e){var r=e[1]/100,t=r+e[2]/100*(1-r);return[e[0],100*(t-r),100*(1-t)]},i.hwb.hcg=function(e){var r=1-e[2]/100,t=r-e[1]/100,n=0;return t<1&&(n=(r-t)/(1-t)),[e[0],100*t,100*n]},i.apple.rgb=function(e){return[e[0]/65535*255,e[1]/65535*255,e[2]/65535*255]},i.rgb.apple=function(e){return[e[0]/255*65535,e[1]/255*65535,e[2]/255*65535]},i.gray.rgb=function(e){return[e[0]/100*255,e[0]/100*255,e[0]/100*255]},i.gray.hsl=i.gray.hsv=function(e){return[0,0,e[0]]},i.gray.hwb=function(e){return[0,100,e[0]]},i.gray.cmyk=function(e){return[0,0,0,e[0]]},i.gray.lab=function(e){return[e[0],0,0]},i.gray.hex=function(e){var r=255&Math.round(e[0]/100*255),t=((r<<16)+(r<<8)+r).toString(16).toUpperCase();return"000000".substring(t.length)+t},i.rgb.gray=function(e){return[(e[0]+e[1]+e[2])/3/255*100]}});function N(e){var r=function(){for(var e={},r=Object.keys(_),t=r.length,n=0;n<t;n++)e[r[n]]={distance:-1,parent:null};return e}(),t=[e];for(r[e].distance=0;t.length;)for(var n=t.pop(),a=Object.keys(_[n]),o=a.length,i=0;i<o;i++){var l=a[i],s=r[l];-1===s.distance&&(s.distance=r[n].distance+1,s.parent=n,t.unshift(l))}return r}function T(r,t){return function(e){return t(r(e))}}function S(e,r){for(var t=[r[e].parent,e],n=_[r[e].parent][e],a=r[e].parent;r[a].parent;)t.unshift(r[a].parent),n=T(_[r[a].parent][a],n),a=r[a].parent;return n.conversion=t,n}var I={};Object.keys(_).forEach(function(i){I[i]={},Object.defineProperty(I[i],"channels",{value:_[i].channels}),Object.defineProperty(I[i],"labels",{value:_[i].labels});var l=function(e){for(var r=N(e),t={},n=Object.keys(r),a=n.length,o=0;o<a;o++){var i=n[o];null!==r[i].parent&&(t[i]=S(i,r))}return t}(i);Object.keys(l).forEach(function(e){var a,r,t,n,o=l[e];I[i][e]=(r=function(e){if(null==e)return e;1<arguments.length&&(e=Array.prototype.slice.call(arguments));var r=a(e);if("object"==typeof r)for(var t=r.length,n=0;n<t;n++)r[n]=Math.round(r[n]);return r},"conversion"in(a=o)&&(r.conversion=a.conversion),r),I[i][e].raw=(n=function(e){return null==e?e:(1<arguments.length&&(e=Array.prototype.slice.call(arguments)),t(e))},"conversion"in(t=o)&&(n.conversion=t.conversion),n)})});var G=I,R=[].slice,C=["keyword","gray","hex"],q={};Object.keys(G).forEach(function(e){q[R.call(G[e].labels).sort().join("")]=e});var F={};function D(e,r){if(!(this instanceof D))return new D(e,r);if(r&&r in C&&(r=null),r&&!(r in G))throw Error("Unknown model: "+r);var t,n;if(e)if(e instanceof D)this.model=e.model,this.color=e.color.slice(),this.valpha=e.valpha;else if("string"==typeof e){var a=j.get(e);if(null===a)throw Error("Unable to parse color from string: "+e);this.model=a.model,this.color=a.value.slice(0,n=G[this.model].channels),this.valpha="number"==typeof a.value[n]?a.value[n]:1}else if(e.length){this.model=r||"rgb";var o=R.call(e,0,n=G[this.model].channels);this.color=W(o,n),this.valpha="number"==typeof e[n]?e[n]:1}else if("number"==typeof e)e&=16777215,this.model="rgb",this.color=[e>>16&255,e>>8&255,255&e],this.valpha=1;else{this.valpha=1;var i=Object.keys(e);"alpha"in e&&(i.splice(i.indexOf("alpha"),1),this.valpha="number"==typeof e.alpha?e.alpha:0);var l=i.sort().join("");if(!(l in q))throw Error("Unable to parse color from object: "+JSON.stringify(e));this.model=q[l];var s=G[this.model].labels,c=[];for(t=0;t<s.length;t++)c.push(e[s[t]]);this.color=W(c)}else this.model="rgb",this.color=[0,0,0],this.valpha=1;if(F[this.model])for(n=G[this.model].channels,t=0;t<n;t++){var u=F[this.model][t];u&&(this.color[t]=u(this.color[t]))}this.valpha=Math.max(0,Math.min(1,this.valpha)),Object.freeze&&Object.freeze(this)}function z(t,n,a){return(t=Array.isArray(t)?t:[t]).forEach(function(e){(F[e]||(F[e]=[]))[n]=a}),t=t[0],function(e){var r;return arguments.length?(a&&(e=a(e)),(r=this[t]()).color[n]=e):(r=this[t]().color[n],a&&(r=a(r))),r}}function U(r){return function(e){return Math.max(0,Math.min(r,e))}}function W(e,r){for(var t=0;t<r;t++)"number"!=typeof e[t]&&(e[t]=0);return e}D.prototype={toString:function(){return this.string()},toJSON:function(){return this[this.model]()},string:function(e){var r=this.model in j.to?this:this.rgb(),t=1===(r=r.round("number"==typeof e?e:1)).valpha?r.color:r.color.concat(this.valpha);return j.to[r.model](t)},percentString:function(e){var r=this.rgb().round("number"==typeof e?e:1),t=1===r.valpha?r.color:r.color.concat(this.valpha);return j.to.rgb.percent(t)},array:function(){return 1===this.valpha?this.color.slice():this.color.concat(this.valpha)},object:function(){for(var e={},r=G[this.model].channels,t=G[this.model].labels,n=0;n<r;n++)e[t[n]]=this.color[n];return 1!==this.valpha&&(e.alpha=this.valpha),e},unitArray:function(){var e=this.rgb().color;return e[0]/=255,e[1]/=255,e[2]/=255,1!==this.valpha&&e.push(this.valpha),e},unitObject:function(){var e=this.rgb().object();return e.r/=255,e.g/=255,e.b/=255,1!==this.valpha&&(e.alpha=this.valpha),e},round:function(e){return new D(this.color.map((r=e=Math.max(e||0,0),function(e){return+e.toFixed(r)})).concat(this.valpha),this.model);var r},alpha:function(e){return arguments.length?new D(this.color.concat(Math.max(0,Math.min(1,e))),this.model):this.valpha},red:z("rgb",0,U(255)),green:z("rgb",1,U(255)),blue:z("rgb",2,U(255)),hue:z(["hsl","hsv","hsl","hwb","hcg"],0,function(e){return(e%360+360)%360}),saturationl:z("hsl",1,U(100)),lightness:z("hsl",2,U(100)),saturationv:z("hsv",1,U(100)),value:z("hsv",2,U(100)),chroma:z("hcg",1,U(100)),gray:z("hcg",2,U(100)),white:z("hwb",1,U(100)),wblack:z("hwb",2,U(100)),cyan:z("cmyk",0,U(100)),magenta:z("cmyk",1,U(100)),yellow:z("cmyk",2,U(100)),black:z("cmyk",3,U(100)),x:z("xyz",0,U(100)),y:z("xyz",1,U(100)),z:z("xyz",2,U(100)),l:z("lab",0,U(100)),a:z("lab",1),b:z("lab",2),keyword:function(e){return arguments.length?new D(e):G[this.model].keyword(this.color)},hex:function(e){return arguments.length?new D(e):j.to.hex(this.rgb().round().color)},rgbNumber:function(){var e=this.rgb().color;return(255&e[0])<<16|(255&e[1])<<8|255&e[2]},luminosity:function(){for(var e=this.rgb().color,r=[],t=0;t<e.length;t++){var n=e[t]/255;r[t]=.03928<n?Math.pow((n+.055)/1.055,2.4):n/12.92}return.2126*r[0]+.7152*r[1]+.0722*r[2]},contrast:function(e){var r=this.luminosity(),t=e.luminosity();return t<r?(r+.05)/(t+.05):(t+.05)/(r+.05)},level:function(e){var r=this.contrast(e);return r<7.1?r<4.5?"":"AA":"AAA"},isDark:function(){var e=this.rgb().color;return(299*e[0]+587*e[1]+114*e[2])/1e3<128},isLight:function(){return!this.isDark()},negate:function(){for(var e=this.rgb(),r=0;r<3;r++)e.color[r]=255-e.color[r];return e},lighten:function(e){var r=this.hsl();return r.color[2]+=r.color[2]*e,r},darken:function(e){var r=this.hsl();return r.color[2]-=r.color[2]*e,r},saturate:function(e){var r=this.hsl();return r.color[1]+=r.color[1]*e,r},desaturate:function(e){var r=this.hsl();return r.color[1]-=r.color[1]*e,r},whiten:function(e){var r=this.hwb();return r.color[1]+=r.color[1]*e,r},blacken:function(e){var r=this.hwb();return r.color[2]+=r.color[2]*e,r},grayscale:function(){var e=this.rgb().color,r=.3*e[0]+.59*e[1]+.11*e[2];return D.rgb(r,r,r)},fade:function(e){return this.alpha(this.valpha-this.valpha*e)},opaquer:function(e){return this.alpha(this.valpha+this.valpha*e)},rotate:function(e){var r=this.hsl(),t=r.color[0];return r.color[0]=t=(t=(t+e)%360)<0?360+t:t,r},mix:function(e,r){var t=e.rgb(),n=this.rgb(),a=void 0===r?.5:r,o=2*a-1,i=t.alpha()-n.alpha(),l=((o*i==-1?o:(o+i)/(1+o*i))+1)/2,s=1-l;return D.rgb(l*t.red()+s*n.red(),l*t.green()+s*n.green(),l*t.blue()+s*n.blue(),t.alpha()*a+n.alpha()*(1-a))}},Object.keys(G).forEach(function(t){if(-1==C.indexOf(t)){var n=G[t].channels;D.prototype[t]=function(){if(this.model===t)return new D(this);if(arguments.length)return new D(arguments,t);var e,r="number"==typeof arguments[n]?n:this.valpha;return new D((e=G[this.model][t].raw(this.color),Array.isArray(e)?e:[e]).concat(r),t)},D[t]=function(e){return"number"==typeof e&&(e=W(R.call(arguments),n)),new D(e,t)}}});var $=D,B={table:{display:"flex","flex-wrap":"wrap",margin:"0.2em 0.2em 0.2em 0.2em",padding:0,"flex-direction":"column",width:"82em"},cell:{"box-sizing":"border-box","flex-grow":1,width:"100%",overflow:"hidden",padding:"0.2em 0.2em",border:"solid 2px "+$("slategrey").fade(.5),"border-bottom":"none","background-color":"#f7f7f7",display:"flex","flex-direction":"row","align-items":"center","justify-content":"space-evenly","&:last-child":{"border-bottom":"solid 2px "+$("slategrey").fade(.5)+" !important"}},"image-container":{height:"15em"},image:{width:"100%",height:"100%"}},K=function(t){function e(r){var e;return(e=t.call(this,r)||this).state={itemsLoading:{},isLoading:!1,error:null},e.isLoadingStartActionDispatched=!1,e.componentManager=a.AppContainerUtils.registerComponent(c(c(e)),{namespace:"io.github.t83714/RandomGifPairPair",reducer:y,saga:O,actionTypes:p,allowedIncomingMulticastActionTypes:[h],namespaceInitCallback:function(e){return{styleSheet:(r.styles?o:o.setup(i())).createStyleSheet(r.styles?r.styles:B,{generateClassName:e.createClassNameGenerator()}).attach()}},namespaceDestroyCallback:function(e){e.styleSheet.detach()}}),e}return s(e,t),e.prototype.render=function(){var e=this,r=this.componentManager.getNamespaceData().styleSheet.classes;return n.createElement("div",{className:r.table},n.createElement("div",{className:r.cell},"RandomGif Pair Pair"),n.createElement("div",{className:""+r.cell},n.createElement("div",null,n.createElement(l,{showButton:!1,apiKey:this.props.apiKey,namespacePrefix:this.componentManager.fullPath+"/GifPairs",appContainer:this.props.appContainer})),n.createElement("div",null,n.createElement(l,{showButton:!1,apiKey:this.props.apiKey,namespacePrefix:this.componentManager.fullPath+"/GifPairs",appContainer:this.props.appContainer}))),this.props.showButton&&n.createElement("div",{className:r.cell+" "},n.createElement("button",{onClick:function(){e.componentManager.dispatch(d())},disabled:this.state.isLoading},this.state.isLoading?"Loading...":"Get Gif Pair Pair")),n.createElement(a.ActionForwarder,{namespacePrefix:this.componentManager.fullPath+"/GifPairs",pattern:u.actionTypes.NEW_GIF,relativeDispatchPath:"../../../../*",appContainer:this.props.appContainer}),n.createElement(a.ActionForwarder,{namespacePrefix:this.componentManager.fullPath+"/GifPairs",pattern:function(e){return e.type===u.actionTypes.LOADING_START||e.type===u.actionTypes.LOADING_COMPLETE},relativeDispatchPath:"..",appContainer:this.props.appContainer}))},e}(n.Component);K.propTypes={showButton:r.bool,apiKey:r.string,styles:r.object,appContainer:r.instanceOf(a.AppContainer)},K.defaultProps={showButton:!0};var Q={NEW_GIF:u.actionTypes.NEW_GIF,LOADING_START:t,LOADING_COMPLETE:f,REQUEST_NEW_PAIR_PAIR:h},J={requestNewPairPair:d};e.default=K,e.actionTypes=Q,e.actions=J,Object.defineProperty(e,"__esModule",{value:!0})});
!function(e,r){"object"==typeof exports&&"undefined"!=typeof module?r(exports,require("react"),require("prop-types"),require("fractal-component"),require("@fractal-components/random-gif-pair"),require("jss"),require("jss-preset-default")):"function"==typeof define&&define.amd?define(["exports","react","prop-types","fractal-component","@fractal-components/random-gif-pair","jss","jss-preset-default"],r):r((e=e||self).RandomGifPairPair={},e.React,e.PropTypes,e.FractalComponent,e.RandomGifPair,e.jss,e.jssPreset)}(this,function(e,n,r,a,u,o,i){"use strict";n=n&&n.hasOwnProperty("default")?n.default:n,r=r&&r.hasOwnProperty("default")?r.default:r;var l="default"in u?u.default:u;o=o&&o.hasOwnProperty("default")?o.default:o,i=i&&i.hasOwnProperty("default")?i.default:i;var s=function(e,r){e.prototype=Object.create(r.prototype),(e.prototype.constructor=e).__proto__=r};var c=function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e},h=Symbol("REQUEST_NEW_PAIR_PAIR"),t=Symbol("LOADING_START"),f=Symbol("LOADING_COMPLETE"),p=Object.freeze({REQUEST_NEW_PAIR_PAIR:h,LOADING_START:t,LOADING_COMPLETE:f});function d(){return{type:h}}function g(e,r){return e(r={exports:{}},r.exports),r.exports}var m=g(function(e){function r(){return e.exports=r=Object.assign||function(e){for(var r=1;r<arguments.length;r++){var t=arguments[r];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])}return e},r.apply(this,arguments)}e.exports=r}),y=function(e,r){var t;switch(r.type){case u.actionTypes.LOADING_START:return m({},e,{isLoading:!0,itemsLoading:m({},e.itemsLoading,(t={},t[r.componentId]=!0,t))});case u.actionTypes.LOADING_COMPLETE:var n,a=r.payload,o=a.isSuccess,i=a.payloadError,l=e.itemsLoading,s=e.error;l=m({},l,((n={})[r.componentId]=!1,n));var c=!1;return Object.keys(l).forEach(function(e){l[e]&&(c=!0)}),m({},e,{isLoading:c,error:s||(o?null:i),itemsLoading:l});default:return e}},v=g(function(N){!function(e){var s,r=Object.prototype,c=r.hasOwnProperty,t="function"==typeof Symbol?Symbol:{},a=t.iterator||"@@iterator",n=t.asyncIterator||"@@asyncIterator",o=t.toStringTag||"@@toStringTag",i=e.regeneratorRuntime;if(i)N.exports=i;else{(i=e.regeneratorRuntime=N.exports).wrap=v;var u="suspendedStart",h="suspendedYield",f="executing",p="completed",d={},l={};l[a]=function(){return this};var g=Object.getPrototypeOf,m=g&&g(g(A([])));m&&m!==r&&c.call(m,a)&&(l=m);var y=x.prototype=w.prototype=Object.create(l);k.prototype=y.constructor=x,x.constructor=k,x[o]=k.displayName="GeneratorFunction",i.isGeneratorFunction=function(e){var r="function"==typeof e&&e.constructor;return!!r&&(r===k||"GeneratorFunction"===(r.displayName||r.name))},i.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,x):(e.__proto__=x,o in e||(e[o]="GeneratorFunction")),e.prototype=Object.create(y),e},i.awrap=function(e){return{__await:e}},M(E.prototype),E.prototype[n]=function(){return this},i.AsyncIterator=E,i.async=function(e,r,t,n){var a=new E(v(e,r,t,n));return i.isGeneratorFunction(r)?a:a.next().then(function(e){return e.done?e.value:a.next()})},M(y),y[o]="Generator",y[a]=function(){return this},y.toString=function(){return"[object Generator]"},i.keys=function(t){var n=[];for(var e in t)n.push(e);return n.reverse(),function e(){for(;n.length;){var r=n.pop();if(r in t)return e.value=r,e.done=!1,e}return e.done=!0,e}},i.values=A,j.prototype={constructor:j,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=s,this.done=!1,this.delegate=null,this.method="next",this.arg=s,this.tryEntries.forEach(L),!e)for(var r in this)"t"===r.charAt(0)&&c.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=s)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var n=this;function e(e,r){return o.type="throw",o.arg=t,n.next=e,r&&(n.method="next",n.arg=s),!!r}for(var r=this.tryEntries.length-1;0<=r;--r){var a=this.tryEntries[r],o=a.completion;if("root"===a.tryLoc)return e("end");if(a.tryLoc<=this.prev){var i=c.call(a,"catchLoc"),l=c.call(a,"finallyLoc");if(i&&l){if(this.prev<a.catchLoc)return e(a.catchLoc,!0);if(this.prev<a.finallyLoc)return e(a.finallyLoc)}else if(i){if(this.prev<a.catchLoc)return e(a.catchLoc,!0)}else{if(!l)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return e(a.finallyLoc)}}}},abrupt:function(e,r){for(var t=this.tryEntries.length-1;0<=t;--t){var n=this.tryEntries[t];if(n.tryLoc<=this.prev&&c.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var a=n;break}}!a||"break"!==e&&"continue"!==e||r<a.tryLoc||a.finallyLoc<r||(a=null);var o=a?a.completion:{};return o.type=e,o.arg=r,a?(this.method="next",this.next=a.finallyLoc,d):this.complete(o)},complete:function(e,r){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&r&&(this.next=r),d},finish:function(e){for(var r=this.tryEntries.length-1;0<=r;--r){var t=this.tryEntries[r];if(t.finallyLoc===e)return this.complete(t.completion,t.afterLoc),L(t),d}},catch:function(e){for(var r=this.tryEntries.length-1;0<=r;--r){var t=this.tryEntries[r];if(t.tryLoc===e){var n=t.completion;if("throw"===n.type){var a=n.arg;L(t)}return a}}throw Error("illegal catch attempt")},delegateYield:function(e,r,t){return this.delegate={iterator:A(e),resultName:r,nextLoc:t},"next"===this.method&&(this.arg=s),d}}}function v(e,r,t,n){var o,i,l,s,a=Object.create((r&&r.prototype instanceof w?r:w).prototype),c=new j(n||[]);return a._invoke=(o=e,i=t,l=c,s=u,function(e,r){if(s===f)throw Error("Generator is already running");if(s===p){if("throw"===e)throw r;return _()}for(l.method=e,l.arg=r;;){var t=l.delegate;if(t){var n=O(t,l);if(n){if(n===d)continue;return n}}if("next"===l.method)l.sent=l._sent=l.arg;else if("throw"===l.method){if(s===u)throw s=p,l.arg;l.dispatchException(l.arg)}else"return"===l.method&&l.abrupt("return",l.arg);s=f;var a=b(o,i,l);if("normal"===a.type){if(s=l.done?p:h,a.arg===d)continue;return{value:a.arg,done:l.done}}"throw"===a.type&&(s=p,l.method="throw",l.arg=a.arg)}}),a}function b(e,r,t){try{return{type:"normal",arg:e.call(r,t)}}catch(e){return{type:"throw",arg:e}}}function w(){}function k(){}function x(){}function M(e){["next","throw","return"].forEach(function(r){e[r]=function(e){return this._invoke(r,e)}})}function E(s){var r;this._invoke=function(t,n){function e(){return new Promise(function(e,r){!function r(e,t,n,a){var o=b(s[e],s,t);if("throw"!==o.type){var i=o.arg,l=i.value;return l&&"object"==typeof l&&c.call(l,"__await")?Promise.resolve(l.__await).then(function(e){r("next",e,n,a)},function(e){r("throw",e,n,a)}):Promise.resolve(l).then(function(e){i.value=e,n(i)},function(e){return r("throw",e,n,a)})}a(o.arg)}(t,n,e,r)})}return r=r?r.then(e,e):e()}}function O(e,r){var t=e.iterator[r.method];if(t===s){if(r.delegate=null,"throw"===r.method){if(e.iterator.return&&(r.method="return",r.arg=s,O(e,r),"throw"===r.method))return d;r.method="throw",r.arg=new TypeError("The iterator does not provide a 'throw' method")}return d}var n=b(t,e.iterator,r.arg);if("throw"===n.type)return r.method="throw",r.arg=n.arg,r.delegate=null,d;var a=n.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=s),r.delegate=null,d):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,d)}function P(e){var r={tryLoc:e[0]};1 in e&&(r.catchLoc=e[1]),2 in e&&(r.finallyLoc=e[2],r.afterLoc=e[3]),this.tryEntries.push(r)}function L(e){var r=e.completion||{};r.type="normal",delete r.arg,e.completion=r}function j(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(P,this),this.reset(!0)}function A(r){if(r){var e=r[a];if(e)return e.call(r);if("function"==typeof r.next)return r;if(!isNaN(r.length)){var t=-1,n=function e(){for(;++t<r.length;)if(c.call(r,t))return e.value=r[t],e.done=!1,e;return e.value=s,e.done=!0,e};return n.next=n}}return{next:_}}function _(){return{value:s,done:!0}}}(function(){return this||"object"==typeof self&&self}()||Function("return this")())}),b=function(){return this||"object"==typeof self&&self}()||Function("return this")(),w=b.regeneratorRuntime&&0<=Object.getOwnPropertyNames(b).indexOf("regeneratorRuntime"),k=w&&b.regeneratorRuntime;b.regeneratorRuntime=void 0;var x=v;if(w)b.regeneratorRuntime=k;else try{delete b.regeneratorRuntime}catch(e){b.regeneratorRuntime=void 0}var M=x,E=M.mark(O);function O(a){return M.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,a.takeEvery(u.actionTypes.LOADING_START,M.mark(function e(){return M.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(this.isLoadingStartActionDispatched){e.next=3;break}return e.next=3,a.put({type:t},"../../../*");case 3:case"end":return e.stop()}},e,this)}).bind(this));case 2:return e.next=4,a.takeEvery(u.actionTypes.LOADING_COMPLETE,M.mark(function e(){var t,n;return M.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,a.select();case 2:if(n=(t=e.sent).error,t.isLoading){e.next=9;break}return e.next=8,a.put((void 0===(r=n)&&(r=null),{type:f,payload:{isSuccess:!r,error:r}}),"../../../*");case 8:this.isLoadingStartActionDispatched=!1;case 9:case"end":return e.stop()}var r},e,this)}).bind(this));case 4:return e.next=6,a.takeEvery(h,M.mark(function e(){return M.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,a.put(u.actions.requestNewPair(),"./GifPairs/*");case 2:case"end":return e.stop()}},e,this)}));case 6:case"end":return e.stop()}},E,this)}var P={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]},L=g(function(e){var i=Array.prototype.concat,l=Array.prototype.slice,r=e.exports=function(e){for(var r,t=[],n=0,a=e.length;n<a;n++){var o=e[n];(r=o)&&"string"!=typeof r&&(r instanceof Array||Array.isArray(r)||0<=r.length&&(r.splice instanceof Function||Object.getOwnPropertyDescriptor(r,r.length-1)&&"String"!==r.constructor.name))?t=i.call(t,l.call(o)):t.push(o)}return t};r.wrap=function(e){return function(){return e(r(arguments))}}}),j=g(function(e){var r={};for(var t in P)P.hasOwnProperty(t)&&(r[P[t]]=t);var n=e.exports={to:{},get:{}};function i(e,r,t){return Math.min(Math.max(r,e),t)}function a(e){var r=e.toString(16).toUpperCase();return r.length<2?"0"+r:r}n.get=function(e){var r,t;switch(e.substring(0,3).toLowerCase()){case"hsl":r=n.get.hsl(e),t="hsl";break;case"hwb":r=n.get.hwb(e),t="hwb";break;default:r=n.get.rgb(e),t="rgb"}return r?{model:t,value:r}:null},n.get.rgb=function(e){if(!e)return null;var r,t,n,a=[0,0,0,1];if(r=e.match(/^#([a-f0-9]{6})([a-f0-9]{2})?$/i)){for(n=r[2],r=r[1],t=0;t<3;t++){var o=2*t;a[t]=parseInt(r.slice(o,o+2),16)}n&&(a[3]=Math.round(parseInt(n,16)/255*100)/100)}else if(r=e.match(/^#([a-f0-9]{3,4})$/i)){for(n=(r=r[1])[3],t=0;t<3;t++)a[t]=parseInt(r[t]+r[t],16);n&&(a[3]=Math.round(parseInt(n+n,16)/255*100)/100)}else if(r=e.match(/^rgba?\(\s*([+-]?\d+)\s*,\s*([+-]?\d+)\s*,\s*([+-]?\d+)\s*(?:,\s*([+-]?[\d\.]+)\s*)?\)$/)){for(t=0;t<3;t++)a[t]=parseInt(r[t+1],0);r[4]&&(a[3]=parseFloat(r[4]))}else{if(!(r=e.match(/^rgba?\(\s*([+-]?[\d\.]+)\%\s*,\s*([+-]?[\d\.]+)\%\s*,\s*([+-]?[\d\.]+)\%\s*(?:,\s*([+-]?[\d\.]+)\s*)?\)$/)))return(r=e.match(/(\D+)/))?"transparent"===r[1]?[0,0,0,0]:(a=P[r[1]])?(a[3]=1,a):null:null;for(t=0;t<3;t++)a[t]=Math.round(2.55*parseFloat(r[t+1]));r[4]&&(a[3]=parseFloat(r[4]))}for(t=0;t<3;t++)a[t]=i(a[t],0,255);return a[3]=i(a[3],0,1),a},n.get.hsl=function(e){if(!e)return null;var r=e.match(/^hsla?\(\s*([+-]?(?:\d*\.)?\d+)(?:deg)?\s*,\s*([+-]?[\d\.]+)%\s*,\s*([+-]?[\d\.]+)%\s*(?:,\s*([+-]?[\d\.]+)\s*)?\)$/);if(r){var t=parseFloat(r[4]);return[(parseFloat(r[1])+360)%360,i(parseFloat(r[2]),0,100),i(parseFloat(r[3]),0,100),i(isNaN(t)?1:t,0,1)]}return null},n.get.hwb=function(e){if(!e)return null;var r=e.match(/^hwb\(\s*([+-]?\d*[\.]?\d+)(?:deg)?\s*,\s*([+-]?[\d\.]+)%\s*,\s*([+-]?[\d\.]+)%\s*(?:,\s*([+-]?[\d\.]+)\s*)?\)$/);if(r){var t=parseFloat(r[4]);return[(parseFloat(r[1])%360+360)%360,i(parseFloat(r[2]),0,100),i(parseFloat(r[3]),0,100),i(isNaN(t)?1:t,0,1)]}return null},n.to.hex=function(){var e=L(arguments);return"#"+a(e[0])+a(e[1])+a(e[2])+(e[3]<1?a(Math.round(255*e[3])):"")},n.to.rgb=function(){var e=L(arguments);return e.length<4||1===e[3]?"rgb("+Math.round(e[0])+", "+Math.round(e[1])+", "+Math.round(e[2])+")":"rgba("+Math.round(e[0])+", "+Math.round(e[1])+", "+Math.round(e[2])+", "+e[3]+")"},n.to.rgb.percent=function(){var e=L(arguments),r=Math.round(e[0]/255*100),t=Math.round(e[1]/255*100),n=Math.round(e[2]/255*100);return e.length<4||1===e[3]?"rgb("+r+"%, "+t+"%, "+n+"%)":"rgba("+r+"%, "+t+"%, "+n+"%, "+e[3]+")"},n.to.hsl=function(){var e=L(arguments);return e.length<4||1===e[3]?"hsl("+e[0]+", "+e[1]+"%, "+e[2]+"%)":"hsla("+e[0]+", "+e[1]+"%, "+e[2]+"%, "+e[3]+")"},n.to.hwb=function(){var e=L(arguments),r="";return e.length<4||1===e[3]||(r=", "+e[3]),"hwb("+e[0]+", "+e[1]+"%, "+e[2]+"%"+r+")"},n.to.keyword=function(e){return r[e.slice(0,3)]}}),A={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]},_=g(function(e){var s={};for(var r in A)A.hasOwnProperty(r)&&(s[A[r]]=r);var i=e.exports={rgb:{channels:3,labels:"rgb"},hsl:{channels:3,labels:"hsl"},hsv:{channels:3,labels:"hsv"},hwb:{channels:3,labels:"hwb"},cmyk:{channels:4,labels:"cmyk"},xyz:{channels:3,labels:"xyz"},lab:{channels:3,labels:"lab"},lch:{channels:3,labels:"lch"},hex:{channels:1,labels:["hex"]},keyword:{channels:1,labels:["keyword"]},ansi16:{channels:1,labels:["ansi16"]},ansi256:{channels:1,labels:["ansi256"]},hcg:{channels:3,labels:["h","c","g"]},apple:{channels:3,labels:["r16","g16","b16"]},gray:{channels:1,labels:["gray"]}};for(var t in i)if(i.hasOwnProperty(t)){if(!("channels"in i[t]))throw Error("missing channels property: "+t);if(!("labels"in i[t]))throw Error("missing channel labels property: "+t);if(i[t].labels.length!==i[t].channels)throw Error("channel and label counts mismatch: "+t);var n=i[t].channels,a=i[t].labels;delete i[t].channels,delete i[t].labels,Object.defineProperty(i[t],"channels",{value:n}),Object.defineProperty(i[t],"labels",{value:a})}i.rgb.hsl=function(e){var r,t,n=e[0]/255,a=e[1]/255,o=e[2]/255,i=Math.min(n,a,o),l=Math.max(n,a,o),s=l-i;return l===i?r=0:n===l?r=(a-o)/s:a===l?r=2+(o-n)/s:o===l&&(r=4+(n-a)/s),(r=Math.min(60*r,360))<0&&(r+=360),t=(i+l)/2,[r,100*(l===i?0:.5<t?s/(2-l-i):s/(l+i)),100*t]},i.rgb.hsv=function(e){var r,t,n,a,o,i=e[0]/255,l=e[1]/255,s=e[2]/255,c=Math.max(i,l,s),u=c-Math.min(i,l,s),h=function(e){return(c-e)/6/u+.5};return 0===u?a=o=0:(o=u/c,r=h(i),t=h(l),n=h(s),i===c?a=n-t:l===c?a=1/3+r-n:s===c&&(a=2/3+t-r),a<0?a+=1:1<a&&(a-=1)),[360*a,100*o,100*c]},i.rgb.hwb=function(e){var r=e[0],t=e[1],n=e[2];return[i.rgb.hsl(e)[0],100*(1/255*Math.min(r,Math.min(t,n))),100*(n=1-1/255*Math.max(r,Math.max(t,n)))]},i.rgb.cmyk=function(e){var r,t=e[0]/255,n=e[1]/255,a=e[2]/255;return[100*((1-t-(r=Math.min(1-t,1-n,1-a)))/(1-r)||0),100*((1-n-r)/(1-r)||0),100*((1-a-r)/(1-r)||0),100*r]},i.rgb.keyword=function(e){var r=s[e];if(r)return r;var t,n,a,o=1/0;for(var i in A)if(A.hasOwnProperty(i)){var l=Math.pow((n=e)[0]-(a=A[i])[0],2)+Math.pow(n[1]-a[1],2)+Math.pow(n[2]-a[2],2);l<o&&(o=l,t=i)}return t},i.keyword.rgb=function(e){return A[e]},i.rgb.xyz=function(e){var r=e[0]/255,t=e[1]/255,n=e[2]/255;return[100*(.4124*(r=.04045<r?Math.pow((r+.055)/1.055,2.4):r/12.92)+.3576*(t=.04045<t?Math.pow((t+.055)/1.055,2.4):t/12.92)+.1805*(n=.04045<n?Math.pow((n+.055)/1.055,2.4):n/12.92)),100*(.2126*r+.7152*t+.0722*n),100*(.0193*r+.1192*t+.9505*n)]},i.rgb.lab=function(e){var r=i.rgb.xyz(e),t=r[0],n=r[1],a=r[2];return n/=100,a/=108.883,t=.008856<(t/=95.047)?Math.pow(t,1/3):7.787*t+16/116,[116*(n=.008856<n?Math.pow(n,1/3):7.787*n+16/116)-16,500*(t-n),200*(n-(a=.008856<a?Math.pow(a,1/3):7.787*a+16/116))]},i.hsl.rgb=function(e){var r,t,n,a,o,i=e[0]/360,l=e[1]/100,s=e[2]/100;if(0===l)return[o=255*s,o,o];r=2*s-(t=s<.5?s*(1+l):s+l-s*l),a=[0,0,0];for(var c=0;c<3;c++)(n=i+1/3*-(c-1))<0&&n++,1<n&&n--,a[c]=255*(o=6*n<1?r+6*(t-r)*n:2*n<1?t:3*n<2?r+(t-r)*(2/3-n)*6:r);return a},i.hsl.hsv=function(e){var r=e[0],t=e[1]/100,n=e[2]/100,a=t,o=Math.max(n,.01);return t*=1<(n*=2)?2-n:n,a*=1<o?2-o:o,[r,100*(0===n?2*a/(o+a):2*t/(n+t)),100*((n+t)/2)]},i.hsv.rgb=function(e){var r=e[0]/60,t=e[1]/100,n=e[2]/100,a=Math.floor(r)%6,o=r-Math.floor(r),i=255*n*(1-t),l=255*n*(1-t*o),s=255*n*(1-t*(1-o));switch(n*=255,a){case 0:return[n,s,i];case 1:return[l,n,i];case 2:return[i,n,s];case 3:return[i,l,n];case 4:return[s,i,n];case 5:return[n,i,l]}},i.hsv.hsl=function(e){var r,t,n,a=e[0],o=e[1]/100,i=e[2]/100,l=Math.max(i,.01);return n=(2-o)*i,t=o*l,[a,100*(t=(t/=1<(r=(2-o)*l)?2-r:r)||0),100*(n/=2)]},i.hwb.rgb=function(e){var r,t,n,a,o,i,l,s=e[0]/360,c=e[1]/100,u=e[2]/100,h=c+u;switch(1<h&&(c/=h,u/=h),n=6*s-(r=Math.floor(6*s)),0!=(1&r)&&(n=1-n),a=c+n*((t=1-u)-c),r){default:case 6:case 0:o=t,i=a,l=c;break;case 1:o=a,i=t,l=c;break;case 2:o=c,i=t,l=a;break;case 3:o=c,i=a,l=t;break;case 4:o=a,i=c,l=t;break;case 5:o=t,i=c,l=a}return[255*o,255*i,255*l]},i.cmyk.rgb=function(e){var r=e[1]/100,t=e[2]/100,n=e[3]/100;return[255*(1-Math.min(1,e[0]/100*(1-n)+n)),255*(1-Math.min(1,r*(1-n)+n)),255*(1-Math.min(1,t*(1-n)+n))]},i.xyz.rgb=function(e){var r,t,n,a=e[0]/100,o=e[1]/100,i=e[2]/100;return t=-.9689*a+1.8758*o+.0415*i,n=.0557*a+-.204*o+1.057*i,r=.0031308<(r=3.2406*a+-1.5372*o+-.4986*i)?1.055*Math.pow(r,1/2.4)-.055:12.92*r,t=.0031308<t?1.055*Math.pow(t,1/2.4)-.055:12.92*t,n=.0031308<n?1.055*Math.pow(n,1/2.4)-.055:12.92*n,[255*(r=Math.min(Math.max(0,r),1)),255*(t=Math.min(Math.max(0,t),1)),255*(n=Math.min(Math.max(0,n),1))]},i.xyz.lab=function(e){var r=e[0],t=e[1],n=e[2];return t/=100,n/=108.883,r=.008856<(r/=95.047)?Math.pow(r,1/3):7.787*r+16/116,[116*(t=.008856<t?Math.pow(t,1/3):7.787*t+16/116)-16,500*(r-t),200*(t-(n=.008856<n?Math.pow(n,1/3):7.787*n+16/116))]},i.lab.xyz=function(e){var r,t,n;r=e[1]/500+(t=(e[0]+16)/116),n=t-e[2]/200;var a=Math.pow(t,3),o=Math.pow(r,3),i=Math.pow(n,3);return t=.008856<a?a:(t-16/116)/7.787,r=.008856<o?o:(r-16/116)/7.787,n=.008856<i?i:(n-16/116)/7.787,[r*=95.047,t*=100,n*=108.883]},i.lab.lch=function(e){var r,t=e[0],n=e[1],a=e[2];return(r=360*Math.atan2(a,n)/2/Math.PI)<0&&(r+=360),[t,Math.sqrt(n*n+a*a),r]},i.lch.lab=function(e){var r,t=e[1];return[e[0],t*Math.cos(r=e[2]/360*2*Math.PI),t*Math.sin(r)]},i.rgb.ansi16=function(e){var r=e[0],t=e[1],n=e[2],a=1 in arguments?arguments[1]:i.rgb.hsv(e)[2];if(0===(a=Math.round(a/50)))return 30;var o=30+(Math.round(n/255)<<2|Math.round(t/255)<<1|Math.round(r/255));return 2===a&&(o+=60),o},i.hsv.ansi16=function(e){return i.rgb.ansi16(i.hsv.rgb(e),e[2])},i.rgb.ansi256=function(e){var r=e[0],t=e[1],n=e[2];return r===t&&t===n?r<8?16:248<r?231:232+Math.round((r-8)/247*24):16+36*Math.round(r/255*5)+6*Math.round(t/255*5)+Math.round(n/255*5)},i.ansi16.rgb=function(e){var r=e%10;if(0===r||7===r)return 50<e&&(r+=3.5),[r=r/10.5*255,r,r];var t=.5*(1+~~(50<e));return[(1&r)*t*255,(r>>1&1)*t*255,(r>>2&1)*t*255]},i.ansi256.rgb=function(e){if(e<232)return[Math.floor((e-=16)/36)/5*255,Math.floor((r=e%36)/6)/5*255,r%6/5*255];var r,t=10*(e-232)+8;return[t,t,t]},i.rgb.hex=function(e){var r=(((255&Math.round(e[0]))<<16)+((255&Math.round(e[1]))<<8)+(255&Math.round(e[2]))).toString(16).toUpperCase();return"000000".substring(r.length)+r},i.hex.rgb=function(e){var r=e.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!r)return[0,0,0];var t=r[0];3===r[0].length&&(t=t.split("").map(function(e){return e+e}).join(""));var n=parseInt(t,16);return[n>>16&255,n>>8&255,255&n]},i.rgb.hcg=function(e){var r,t=e[0]/255,n=e[1]/255,a=e[2]/255,o=Math.max(Math.max(t,n),a),i=Math.min(Math.min(t,n),a),l=o-i;return r=0<l?o===t?(n-a)/l%6:o===n?2+(a-t)/l:4+(t-n)/l+4:0,r/=6,[360*(r%=1),100*l,100*(l<1?i/(1-l):0)]},i.hsl.hcg=function(e){var r=e[1]/100,t=e[2]/100,n=1,a=0;return(n=t<.5?2*r*t:2*r*(1-t))<1&&(a=(t-.5*n)/(1-n)),[e[0],100*n,100*a]},i.hsv.hcg=function(e){var r=e[2]/100,t=e[1]/100*r,n=0;return t<1&&(n=(r-t)/(1-t)),[e[0],100*t,100*n]},i.hcg.rgb=function(e){var r=e[1]/100,t=e[2]/100;if(0===r)return[255*t,255*t,255*t];var n,a=[0,0,0],o=e[0]/360%1*6,i=o%1,l=1-i;switch(Math.floor(o)){case 0:a[0]=1,a[1]=i,a[2]=0;break;case 1:a[0]=l,a[1]=1,a[2]=0;break;case 2:a[0]=0,a[1]=1,a[2]=i;break;case 3:a[0]=0,a[1]=l,a[2]=1;break;case 4:a[0]=i,a[1]=0,a[2]=1;break;default:a[0]=1,a[1]=0,a[2]=l}return[255*(r*a[0]+(n=(1-r)*t)),255*(r*a[1]+n),255*(r*a[2]+n)]},i.hcg.hsv=function(e){var r=e[1]/100,t=r+e[2]/100*(1-r),n=0;return 0<t&&(n=r/t),[e[0],100*n,100*t]},i.hcg.hsl=function(e){var r=e[1]/100,t=e[2]/100*(1-r)+.5*r,n=0;return 0<t&&t<.5?n=r/(2*t):.5<=t&&t<1&&(n=r/(2*(1-t))),[e[0],100*n,100*t]},i.hcg.hwb=function(e){var r=e[1]/100,t=r+e[2]/100*(1-r);return[e[0],100*(t-r),100*(1-t)]},i.hwb.hcg=function(e){var r=1-e[2]/100,t=r-e[1]/100,n=0;return t<1&&(n=(r-t)/(1-t)),[e[0],100*t,100*n]},i.apple.rgb=function(e){return[e[0]/65535*255,e[1]/65535*255,e[2]/65535*255]},i.rgb.apple=function(e){return[e[0]/255*65535,e[1]/255*65535,e[2]/255*65535]},i.gray.rgb=function(e){return[e[0]/100*255,e[0]/100*255,e[0]/100*255]},i.gray.hsl=i.gray.hsv=function(e){return[0,0,e[0]]},i.gray.hwb=function(e){return[0,100,e[0]]},i.gray.cmyk=function(e){return[0,0,0,e[0]]},i.gray.lab=function(e){return[e[0],0,0]},i.gray.hex=function(e){var r=255&Math.round(e[0]/100*255),t=((r<<16)+(r<<8)+r).toString(16).toUpperCase();return"000000".substring(t.length)+t},i.rgb.gray=function(e){return[(e[0]+e[1]+e[2])/3/255*100]}});function N(e){var r=function(){for(var e={},r=Object.keys(_),t=r.length,n=0;n<t;n++)e[r[n]]={distance:-1,parent:null};return e}(),t=[e];for(r[e].distance=0;t.length;)for(var n=t.pop(),a=Object.keys(_[n]),o=a.length,i=0;i<o;i++){var l=a[i],s=r[l];-1===s.distance&&(s.distance=r[n].distance+1,s.parent=n,t.unshift(l))}return r}function T(r,t){return function(e){return t(r(e))}}function S(e,r){for(var t=[r[e].parent,e],n=_[r[e].parent][e],a=r[e].parent;r[a].parent;)t.unshift(r[a].parent),n=T(_[r[a].parent][a],n),a=r[a].parent;return n.conversion=t,n}var I={};Object.keys(_).forEach(function(i){I[i]={},Object.defineProperty(I[i],"channels",{value:_[i].channels}),Object.defineProperty(I[i],"labels",{value:_[i].labels});var l=function(e){for(var r=N(e),t={},n=Object.keys(r),a=n.length,o=0;o<a;o++){var i=n[o];null!==r[i].parent&&(t[i]=S(i,r))}return t}(i);Object.keys(l).forEach(function(e){var a,r,t,n,o=l[e];I[i][e]=(r=function(e){if(null==e)return e;1<arguments.length&&(e=Array.prototype.slice.call(arguments));var r=a(e);if("object"==typeof r)for(var t=r.length,n=0;n<t;n++)r[n]=Math.round(r[n]);return r},"conversion"in(a=o)&&(r.conversion=a.conversion),r),I[i][e].raw=(n=function(e){return null==e?e:(1<arguments.length&&(e=Array.prototype.slice.call(arguments)),t(e))},"conversion"in(t=o)&&(n.conversion=t.conversion),n)})});var G=I,C=[].slice,R=["keyword","gray","hex"],q={};Object.keys(G).forEach(function(e){q[C.call(G[e].labels).sort().join("")]=e});var F={};function D(e,r){if(!(this instanceof D))return new D(e,r);if(r&&r in R&&(r=null),r&&!(r in G))throw Error("Unknown model: "+r);var t,n;if(e)if(e instanceof D)this.model=e.model,this.color=e.color.slice(),this.valpha=e.valpha;else if("string"==typeof e){var a=j.get(e);if(null===a)throw Error("Unable to parse color from string: "+e);this.model=a.model,this.color=a.value.slice(0,n=G[this.model].channels),this.valpha="number"==typeof a.value[n]?a.value[n]:1}else if(e.length){this.model=r||"rgb";var o=C.call(e,0,n=G[this.model].channels);this.color=W(o,n),this.valpha="number"==typeof e[n]?e[n]:1}else if("number"==typeof e)e&=16777215,this.model="rgb",this.color=[e>>16&255,e>>8&255,255&e],this.valpha=1;else{this.valpha=1;var i=Object.keys(e);"alpha"in e&&(i.splice(i.indexOf("alpha"),1),this.valpha="number"==typeof e.alpha?e.alpha:0);var l=i.sort().join("");if(!(l in q))throw Error("Unable to parse color from object: "+JSON.stringify(e));this.model=q[l];var s=G[this.model].labels,c=[];for(t=0;t<s.length;t++)c.push(e[s[t]]);this.color=W(c)}else this.model="rgb",this.color=[0,0,0],this.valpha=1;if(F[this.model])for(n=G[this.model].channels,t=0;t<n;t++){var u=F[this.model][t];u&&(this.color[t]=u(this.color[t]))}this.valpha=Math.max(0,Math.min(1,this.valpha)),Object.freeze&&Object.freeze(this)}function z(t,n,a){return(t=Array.isArray(t)?t:[t]).forEach(function(e){(F[e]||(F[e]=[]))[n]=a}),t=t[0],function(e){var r;return arguments.length?(a&&(e=a(e)),(r=this[t]()).color[n]=e):(r=this[t]().color[n],a&&(r=a(r))),r}}function U(r){return function(e){return Math.max(0,Math.min(r,e))}}function W(e,r){for(var t=0;t<r;t++)"number"!=typeof e[t]&&(e[t]=0);return e}D.prototype={toString:function(){return this.string()},toJSON:function(){return this[this.model]()},string:function(e){var r=this.model in j.to?this:this.rgb(),t=1===(r=r.round("number"==typeof e?e:1)).valpha?r.color:r.color.concat(this.valpha);return j.to[r.model](t)},percentString:function(e){var r=this.rgb().round("number"==typeof e?e:1),t=1===r.valpha?r.color:r.color.concat(this.valpha);return j.to.rgb.percent(t)},array:function(){return 1===this.valpha?this.color.slice():this.color.concat(this.valpha)},object:function(){for(var e={},r=G[this.model].channels,t=G[this.model].labels,n=0;n<r;n++)e[t[n]]=this.color[n];return 1!==this.valpha&&(e.alpha=this.valpha),e},unitArray:function(){var e=this.rgb().color;return e[0]/=255,e[1]/=255,e[2]/=255,1!==this.valpha&&e.push(this.valpha),e},unitObject:function(){var e=this.rgb().object();return e.r/=255,e.g/=255,e.b/=255,1!==this.valpha&&(e.alpha=this.valpha),e},round:function(e){return new D(this.color.map((r=e=Math.max(e||0,0),function(e){return+e.toFixed(r)})).concat(this.valpha),this.model);var r},alpha:function(e){return arguments.length?new D(this.color.concat(Math.max(0,Math.min(1,e))),this.model):this.valpha},red:z("rgb",0,U(255)),green:z("rgb",1,U(255)),blue:z("rgb",2,U(255)),hue:z(["hsl","hsv","hsl","hwb","hcg"],0,function(e){return(e%360+360)%360}),saturationl:z("hsl",1,U(100)),lightness:z("hsl",2,U(100)),saturationv:z("hsv",1,U(100)),value:z("hsv",2,U(100)),chroma:z("hcg",1,U(100)),gray:z("hcg",2,U(100)),white:z("hwb",1,U(100)),wblack:z("hwb",2,U(100)),cyan:z("cmyk",0,U(100)),magenta:z("cmyk",1,U(100)),yellow:z("cmyk",2,U(100)),black:z("cmyk",3,U(100)),x:z("xyz",0,U(100)),y:z("xyz",1,U(100)),z:z("xyz",2,U(100)),l:z("lab",0,U(100)),a:z("lab",1),b:z("lab",2),keyword:function(e){return arguments.length?new D(e):G[this.model].keyword(this.color)},hex:function(e){return arguments.length?new D(e):j.to.hex(this.rgb().round().color)},rgbNumber:function(){var e=this.rgb().color;return(255&e[0])<<16|(255&e[1])<<8|255&e[2]},luminosity:function(){for(var e=this.rgb().color,r=[],t=0;t<e.length;t++){var n=e[t]/255;r[t]=.03928<n?Math.pow((n+.055)/1.055,2.4):n/12.92}return.2126*r[0]+.7152*r[1]+.0722*r[2]},contrast:function(e){var r=this.luminosity(),t=e.luminosity();return t<r?(r+.05)/(t+.05):(t+.05)/(r+.05)},level:function(e){var r=this.contrast(e);return r<7.1?r<4.5?"":"AA":"AAA"},isDark:function(){var e=this.rgb().color;return(299*e[0]+587*e[1]+114*e[2])/1e3<128},isLight:function(){return!this.isDark()},negate:function(){for(var e=this.rgb(),r=0;r<3;r++)e.color[r]=255-e.color[r];return e},lighten:function(e){var r=this.hsl();return r.color[2]+=r.color[2]*e,r},darken:function(e){var r=this.hsl();return r.color[2]-=r.color[2]*e,r},saturate:function(e){var r=this.hsl();return r.color[1]+=r.color[1]*e,r},desaturate:function(e){var r=this.hsl();return r.color[1]-=r.color[1]*e,r},whiten:function(e){var r=this.hwb();return r.color[1]+=r.color[1]*e,r},blacken:function(e){var r=this.hwb();return r.color[2]+=r.color[2]*e,r},grayscale:function(){var e=this.rgb().color,r=.3*e[0]+.59*e[1]+.11*e[2];return D.rgb(r,r,r)},fade:function(e){return this.alpha(this.valpha-this.valpha*e)},opaquer:function(e){return this.alpha(this.valpha+this.valpha*e)},rotate:function(e){var r=this.hsl(),t=r.color[0];return r.color[0]=t=(t=(t+e)%360)<0?360+t:t,r},mix:function(e,r){var t=e.rgb(),n=this.rgb(),a=void 0===r?.5:r,o=2*a-1,i=t.alpha()-n.alpha(),l=((o*i==-1?o:(o+i)/(1+o*i))+1)/2,s=1-l;return D.rgb(l*t.red()+s*n.red(),l*t.green()+s*n.green(),l*t.blue()+s*n.blue(),t.alpha()*a+n.alpha()*(1-a))}},Object.keys(G).forEach(function(t){if(-1==R.indexOf(t)){var n=G[t].channels;D.prototype[t]=function(){if(this.model===t)return new D(this);if(arguments.length)return new D(arguments,t);var e,r="number"==typeof arguments[n]?n:this.valpha;return new D((e=G[this.model][t].raw(this.color),Array.isArray(e)?e:[e]).concat(r),t)},D[t]=function(e){return"number"==typeof e&&(e=W(C.call(arguments),n)),new D(e,t)}}});var $=D,B={table:{display:"flex","flex-wrap":"wrap",margin:"0.2em 0.2em 0.2em 0.2em",padding:0,"flex-direction":"column",width:"82em"},cell:{"box-sizing":"border-box","flex-grow":1,width:"100%",overflow:"hidden",padding:"0.2em 0.2em",border:"solid 2px "+$("slategrey").fade(.5),"border-bottom":"none","background-color":"#f7f7f7",display:"flex","flex-direction":"row","align-items":"center","justify-content":"space-evenly","&:last-child":{"border-bottom":"solid 2px "+$("slategrey").fade(.5)+" !important"}},"image-container":{height:"15em"},image:{width:"100%",height:"100%"}},K=function(t){function e(r){var e;return(e=t.call(this,r)||this).state={itemsLoading:{},isLoading:!1,error:null},e.isLoadingStartActionDispatched=!1,e.componentManager=new a.ComponentManager(c(c(e)),{namespace:"io.github.t83714/RandomGifPairPair",reducer:y,saga:O,actionTypes:p,allowedIncomingMulticastActionTypes:[h],namespaceInitCallback:function(e){return{styleSheet:(r.styles?o:o.setup(i())).createStyleSheet(r.styles?r.styles:B,{generateClassName:e.createClassNameGenerator()}).attach()}},namespaceDestroyCallback:function(e){e.styleSheet.detach()}}),e}return s(e,t),e.prototype.render=function(){var e=this,r=this.componentManager.getNamespaceData().styleSheet.classes;return n.createElement("div",{className:r.table},n.createElement("div",{className:r.cell},"RandomGif Pair Pair"),n.createElement("div",{className:""+r.cell},n.createElement("div",null,n.createElement(l,{showButton:!1,apiKey:this.props.apiKey,namespacePrefix:this.componentManager.fullPath+"/GifPairs",appContainer:this.props.appContainer})),n.createElement("div",null,n.createElement(l,{showButton:!1,apiKey:this.props.apiKey,namespacePrefix:this.componentManager.fullPath+"/GifPairs",appContainer:this.props.appContainer}))),this.props.showButton&&n.createElement("div",{className:r.cell+" "},n.createElement("button",{onClick:function(){e.componentManager.dispatch(d())},disabled:this.state.isLoading},this.state.isLoading?"Loading...":"Get Gif Pair Pair")),n.createElement(a.ActionForwarder,{namespacePrefix:this.componentManager.fullPath+"/GifPairs",pattern:u.actionTypes.NEW_GIF,relativeDispatchPath:"../../../../*",appContainer:this.props.appContainer}),n.createElement(a.ActionForwarder,{namespacePrefix:this.componentManager.fullPath+"/GifPairs",pattern:function(e){return e.type===u.actionTypes.LOADING_START||e.type===u.actionTypes.LOADING_COMPLETE},relativeDispatchPath:"..",appContainer:this.props.appContainer}))},e}(n.Component);K.propTypes={showButton:r.bool,apiKey:r.string,styles:r.object,appContainer:r.instanceOf(a.AppContainer)},K.defaultProps={showButton:!0},K.contextType=a.AppContainerContext;var Q={NEW_GIF:u.actionTypes.NEW_GIF,LOADING_START:t,LOADING_COMPLETE:f,REQUEST_NEW_PAIR_PAIR:h},J={requestNewPairPair:d};e.default=K,e.actionTypes=Q,e.actions=J,Object.defineProperty(e,"__esModule",{value:!0})});
//# sourceMappingURL=random-gif-pair-pair.min.umd.js.map
{
"name": "@fractal-components/random-gif-pair-pair",
"version": "1.0.7",
"version": "1.1.0",
"private": false,

@@ -15,6 +15,7 @@ "description": "A sample UI component built using `fractal-component`",

"prettier": "prettier --write 'src/*.js' 'src/*.ts'",
"eslint": "eslint 'src/*.js'",
"eslint": "eslint src/",
"dtslint": "dtslint src --onlyTestTsNext",
"clean": "rimraf dist",
"prebuild": "npm run clean",
"build": "rollup -c",
"build": "rollup -c -m",
"prepare": "npm run build",

@@ -47,48 +48,46 @@ "release:patch": "npm version patch && npm publish && git push --follow-tags",

"dependencies": {
"@babel/runtime": "^7.0.0-rc.3",
"fractal-component": ">=3.2.2",
"prop-types": ">= 15.5.7",
"react": ">= 15.0.0",
"@babel/runtime": "^7.0.0",
"color": "^3.0.0",
"fractal-component": "^4.0.0",
"jss": "^9.8.7",
"jss-preset-default": "^4.5.0",
"color": "^3.0.0",
"redux-saga": "^1.0.0-beta.2",
"@fractal-components/random-gif-pair": "^1.0.5"
"prop-types": "~15.6.0",
"react": "~16.8.0",
"redux-saga": "~1.0.0",
"@fractal-components/random-gif-pair": "^1.0.0"
},
"peerDependencies": {
"fractal-component": ">=3.2.2",
"prop-types": ">= 15.5.7",
"react": ">= 15.0.0",
"fractal-component": "^4.0.0",
"jss": "^9.8.7",
"jss-preset-default": "^4.5.0",
"redux-saga": "^1.0.0-beta.2",
"@fractal-components/random-gif-pair": "^1.0.5"
"prop-types": "~15.6.0",
"react": "~16.8.0",
"redux-saga": "~1.0.0",
"@fractal-components/random-gif-pair": "^1.0.0"
},
"devDependencies": {
"@babel/cli": "^7.0.0-rc.3",
"@babel/core": "^7.0.0-rc.3",
"@babel/node": "^7.0.0-rc.3",
"@babel/plugin-transform-runtime": "^7.0.0-rc.3",
"@babel/polyfill": "^7.0.0-rc.3",
"@babel/preset-env": "^7.0.0-rc.3",
"@babel/cli": "^7.0.0",
"@babel/core": "^7.0.0",
"@babel/node": "^7.0.0",
"@babel/plugin-transform-runtime": "^7.0.0",
"@babel/polyfill": "^7.0.0",
"@babel/preset-env": "^7.0.0",
"@babel/preset-react": "^7.0.0",
"@babel/preset-stage-2": "^7.0.0-rc.3",
"babel-core": "^7.0.0-0",
"babel-eslint": "^8.2.6",
"babel-jest": "^23.4.2",
"babel-plugin-annotate-pure-calls": "babel7",
"eslint": "^5.2.0",
"eslint-plugin-jest": "^21.22.0",
"eslint-plugin-react": "^7.11.1",
"jest": "^23.5.0",
"prettier": "^1.13.7",
"@babel/preset-stage-2": "^7.0.0",
"babel-eslint": "^10.0.0",
"babel-plugin-annotate-pure-calls": "^0.4.0",
"eslint": "^5.13.0",
"eslint-plugin-jest": "^22.2.0",
"eslint-plugin-react": "^7.12.0",
"jest": "^24.0.0",
"prettier": "^1.16.0",
"rimraf": "^2.6.2",
"rollup": "^0.64.1",
"rollup-plugin-babel": "4.0.0-beta.1",
"rollup-plugin-commonjs": "^9.1.5",
"rollup-plugin-json": "^3.0.0",
"rollup": "^1.1.2",
"rollup-plugin-babel": "^4.3.0",
"rollup-plugin-commonjs": "^9.2.0",
"rollup-plugin-json": "^3.1.0",
"rollup-plugin-node-builtins": "^2.1.2",
"rollup-plugin-node-resolve": "^3.3.0",
"rollup-plugin-replace": "^2.0.0",
"rollup-plugin-uglify": "^4.0.0"
"rollup-plugin-node-resolve": "^4.0.0",
"rollup-plugin-replace": "^2.1.0",
"rollup-plugin-uglify": "^6.0.0"
},

@@ -95,0 +94,0 @@ "typings": "./src/index.d.ts",

@@ -15,34 +15,39 @@ # A Sample RandomGifPairPair UI Component

```html
<!doctype html>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>RandomGifPairPair Demo</title>
<!--
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>RandomGifPairPair Demo</title>
<!--
Load `babel-standalone` to support JSX in script tag
-->
<script src="https://unpkg.com/babel-standalone@7.0.0-beta.3/babel.min.js"></script>
<script src="https://unpkg.com/react@16.5.0/umd/react.production.min.js"></script>
<script src="https://unpkg.com/prop-types@15.6.2/prop-types.min.js"></script>
<script src="https://unpkg.com/react-dom@16.5.0/umd/react-dom.production.min.js"></script>
<script src="https://unpkg.com/redux-saga@1.0.0-beta.2/dist/redux-saga.min.umd.js"></script>
<script src="https://unpkg.com/fractal-component@latest/dist/fractal-component.min.umd.js"></script>
<script src="https://unpkg.com/jss@9.8.7/dist/jss.min.js"></script>
<script src="https://unpkg.com/jss-preset-default@4.5.0/dist/jss-preset-default.min.js"></script>
<script src="https://unpkg.com/@fractal-components/random-gif@latest/dist/@fractal-components/random-gif.min.umd.js"></script>
<script src="https://unpkg.com/@fractal-components/random-gif-pair@latest/dist/@fractal-components/random-gif-pair.min.umd.js"></script>
<script src="https://unpkg.com/@fractal-components/random-gif-pair-pair@latest/dist/@fractal-components/random-gif-pair-pair.min.umd.js"></script>
</head>
<body>
<div id="app_root"></div>
<script type="text/babel">
FractalComponent.AppContainerUtils.createAppContainer({
//--- make dev tool always available
reduxDevToolsDevOnly: false
});
ReactDOM.render(<RandomGifPairPair.default />, document.getElementById("app_root"));
</script>
</body>
<script src="https://unpkg.com/babel-standalone@^7.0.0/babel.min.js"></script>
<script src="https://unpkg.com/react@~16.8.0/umd/react.production.min.js"></script>
<script src="https://unpkg.com/prop-types@~15.6.2/prop-types.min.js"></script>
<script src="https://unpkg.com/react-dom@~16.8.0/umd/react-dom.production.min.js"></script>
<script src="https://unpkg.com/redux-saga@~1.0.0/dist/redux-saga.min.umd.js"></script>
<script src="https://unpkg.com/fractal-component@latest/dist/fractal-component.min.umd.js"></script>
<script src="https://unpkg.com/jss@9.8.7/dist/jss.min.js"></script>
<script src="https://unpkg.com/jss-preset-default@4.5.0/dist/jss-preset-default.min.js"></script>
<script src="https://unpkg.com/@fractal-components/random-gif@latest/dist/@fractal-components/random-gif.min.umd.js"></script>
<script src="https://unpkg.com/@fractal-components/random-gif-pair@latest/dist/@fractal-components/random-gif-pair.min.umd.js"></script>
<script src="https://unpkg.com/@fractal-components/random-gif-pair-pair@latest/dist/@fractal-components/random-gif-pair-pair.min.umd.js"></script>
</head>
<body>
<div id="app_root"></div>
<script type="text/babel">
const appContainer = new FractalComponent.AppContainer({
reduxDevToolsDevOnly: false
});
ReactDOM.render(
<FractalComponent.AppContainerContext.Provider
value={appContainer}
>
<RandomGifPairPair.default />
</FractalComponent.AppContainerContext.Provider>,
document.getElementById("app_root")
);
</script>
</body>
</html>

@@ -58,10 +63,15 @@ ```

import { AppContainerUtils } from "fractal-component";
import RandomGifPairPair, { actions, actionTypes} from "@fractal-components/random-gif-pair-pair";
import { AppContainer, AppContainerContext } from "fractal-component";
import RandomGifPairPair, { actions, actionTypes } from "@fractal-components/random-gif-pair-pair";
AppContainerUtils.createAppContainer({
const appContainer = new AppContainer({
reduxDevToolsDevOnly: false
});
ReactDOM.render(<RandomGifPairPair />, document.getElementById("root"));
ReactDOM.render(
<AppContainerContext.Provider value={appContainer}>
<RandomGifPairPair />
</AppContainerContext.Provider>,
document.getElementById("root")
);
```

@@ -68,0 +78,0 @@

@@ -1,13 +0,13 @@

import React from "react";
import * as React from "react";
import { Action } from "redux";
declare class RandomGifPairPair extends React.Component {}
export default RandomGifPairPair;
export declare interface actionTypes {
NEW_GIF: Symbol;
LOADING_START: Symbol;
LOADING_COMPLETE: Symbol;
REQUEST_NEW_PAIR_PAIR: Symbol;
export interface actionTypes {
NEW_GIF: symbol;
LOADING_START: symbol;
LOADING_COMPLETE: symbol;
REQUEST_NEW_PAIR_PAIR: symbol;
}
export declare interface actions {
export interface actions {
requestNewPairPair: () => Action;
}

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc