funnel-gfx-wc 0.0.162 → 0.0.166
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/color-picker_6.cjs.entry.js +1 -1
- package/dist/cjs/funnel-gfx-wc.cjs.js +2 -2
- package/dist/cjs/{index-20d51273.js → index-8ee1bb4e.js} +7 -0
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/collection/collection-manifest.json +1 -1
- package/dist/esm/color-picker_6.entry.js +1 -1
- package/dist/esm/funnel-gfx-wc.js +2 -2
- package/dist/esm/{index-73b5fbc2.js → index-1a1d2095.js} +7 -0
- package/dist/esm/loader.js +2 -2
- package/dist/funnel-gfx-wc/funnel-gfx-wc.esm.js +1 -1
- package/dist/funnel-gfx-wc/{p-6d213167.entry.js → p-a03f2c4b.entry.js} +1 -1
- package/dist/funnel-gfx-wc/{p-94ae5206.js → p-b8fd5dd3.js} +0 -0
- package/package.json +5 -5
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const index = require('./index-
|
|
5
|
+
const index = require('./index-8ee1bb4e.js');
|
|
6
6
|
|
|
7
7
|
var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
|
|
8
8
|
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
const index = require('./index-
|
|
3
|
+
const index = require('./index-8ee1bb4e.js');
|
|
4
4
|
|
|
5
5
|
/*
|
|
6
|
-
Stencil Client Patch Browser v2.8.
|
|
6
|
+
Stencil Client Patch Browser v2.8.1 | MIT Licensed | https://stenciljs.com
|
|
7
7
|
*/
|
|
8
8
|
const patchBrowser = () => {
|
|
9
9
|
const importMeta = (typeof document === 'undefined' ? new (require('u' + 'rl').URL)('file:' + __filename).href : (document.currentScript && document.currentScript.src || new URL('funnel-gfx-wc.cjs.js', document.baseURI).href));
|
|
@@ -569,6 +569,13 @@ const renderVdom = (hostRef, renderFnResults) => {
|
|
|
569
569
|
// synchronous patch
|
|
570
570
|
patch(oldVNode, rootVnode);
|
|
571
571
|
};
|
|
572
|
+
/**
|
|
573
|
+
* Helper function to create & dispatch a custom Event on a provided target
|
|
574
|
+
* @param elm the target of the Event
|
|
575
|
+
* @param name the name to give the custom Event
|
|
576
|
+
* @param opts options for configuring a custom Event
|
|
577
|
+
* @returns the custom Event
|
|
578
|
+
*/
|
|
572
579
|
const emitEvent = (elm, name, opts) => {
|
|
573
580
|
const ev = plt.ce(name, opts);
|
|
574
581
|
elm.dispatchEvent(ev);
|
package/dist/cjs/loader.cjs.js
CHANGED
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const index = require('./index-
|
|
5
|
+
const index = require('./index-8ee1bb4e.js');
|
|
6
6
|
|
|
7
7
|
/*
|
|
8
|
-
Stencil Client Patch Esm v2.8.
|
|
8
|
+
Stencil Client Patch Esm v2.8.1 | MIT Licensed | https://stenciljs.com
|
|
9
9
|
*/
|
|
10
10
|
const patchEsm = () => {
|
|
11
11
|
return index.promiseResolve();
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { g as getRenderingRef, f as forceUpdate, h, r as registerInstance } from './index-
|
|
1
|
+
import { g as getRenderingRef, f as forceUpdate, h, r as registerInstance } from './index-1a1d2095.js';
|
|
2
2
|
|
|
3
3
|
var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
|
|
4
4
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { p as promiseResolve, b as bootstrapLazy } from './index-
|
|
1
|
+
import { p as promiseResolve, b as bootstrapLazy } from './index-1a1d2095.js';
|
|
2
2
|
|
|
3
3
|
/*
|
|
4
|
-
Stencil Client Patch Browser v2.8.
|
|
4
|
+
Stencil Client Patch Browser v2.8.1 | MIT Licensed | https://stenciljs.com
|
|
5
5
|
*/
|
|
6
6
|
const patchBrowser = () => {
|
|
7
7
|
const importMeta = import.meta.url;
|
|
@@ -547,6 +547,13 @@ const renderVdom = (hostRef, renderFnResults) => {
|
|
|
547
547
|
// synchronous patch
|
|
548
548
|
patch(oldVNode, rootVnode);
|
|
549
549
|
};
|
|
550
|
+
/**
|
|
551
|
+
* Helper function to create & dispatch a custom Event on a provided target
|
|
552
|
+
* @param elm the target of the Event
|
|
553
|
+
* @param name the name to give the custom Event
|
|
554
|
+
* @param opts options for configuring a custom Event
|
|
555
|
+
* @returns the custom Event
|
|
556
|
+
*/
|
|
550
557
|
const emitEvent = (elm, name, opts) => {
|
|
551
558
|
const ev = plt.ce(name, opts);
|
|
552
559
|
elm.dispatchEvent(ev);
|
package/dist/esm/loader.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { p as promiseResolve, b as bootstrapLazy } from './index-
|
|
1
|
+
import { p as promiseResolve, b as bootstrapLazy } from './index-1a1d2095.js';
|
|
2
2
|
|
|
3
3
|
/*
|
|
4
|
-
Stencil Client Patch Esm v2.8.
|
|
4
|
+
Stencil Client Patch Esm v2.8.1 | MIT Licensed | https://stenciljs.com
|
|
5
5
|
*/
|
|
6
6
|
const patchEsm = () => {
|
|
7
7
|
return promiseResolve();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{p as a,b as t}from"./p-
|
|
1
|
+
import{p as a,b as t}from"./p-b8fd5dd3.js";(()=>{const t=import.meta.url,e={};return""!==t&&(e.resourcesUrl=new URL(".",t).href),a(e)})().then((a=>t([["p-a03f2c4b",[[1,"funnel-app",{tag:[1]}],[1,"color-picker",{tag:[1]}],[1,"data-source",{tag:[1]}],[1,"data-values",{tag:[1]}],[1,"eswat2-io"],[1,"funnel-gfx",{stroke:[1],tag:[1]}]]]],a)));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{g as t,f as e,h as r,r as n}from"./p-94ae5206.js";var a="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function i(t,e,r){return t(r={path:e,exports:{},require:function(){return function(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}()}},r.exports),r.exports}var o={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]},u=i((function(t){var e=Array.prototype.concat,r=Array.prototype.slice,n=t.exports=function(t){for(var n,a=[],i=0,o=t.length;i<o;i++){var u=t[i];(n=u)&&"string"!=typeof n&&(n instanceof Array||Array.isArray(n)||n.length>=0&&(n.splice instanceof Function||Object.getOwnPropertyDescriptor(n,n.length-1)&&"String"!==n.constructor.name))?a=e.call(a,r.call(u)):a.push(u)}return a};n.wrap=function(t){return function(){return t(n(arguments))}}})),s=i((function(t){var e={};for(var r in o)o.hasOwnProperty(r)&&(e[o[r]]=r);var n=t.exports={to:{},get:{}};function a(t,e,r){return Math.min(Math.max(e,t),r)}function i(t){var e=t.toString(16).toUpperCase();return e.length<2?"0"+e:e}n.get=function(t){var e,r;switch(t.substring(0,3).toLowerCase()){case"hsl":e=n.get.hsl(t),r="hsl";break;case"hwb":e=n.get.hwb(t),r="hwb";break;default:e=n.get.rgb(t),r="rgb"}return e?{model:r,value:e}:null},n.get.rgb=function(t){if(!t)return null;var e,r,n,i=[0,0,0,1];if(e=t.match(/^#([a-f0-9]{6})([a-f0-9]{2})?$/i)){for(n=e[2],e=e[1],r=0;r<3;r++){var u=2*r;i[r]=parseInt(e.slice(u,u+2),16)}n&&(i[3]=parseInt(n,16)/255)}else if(e=t.match(/^#([a-f0-9]{3,4})$/i)){for(n=(e=e[1])[3],r=0;r<3;r++)i[r]=parseInt(e[r]+e[r],16);n&&(i[3]=parseInt(n+n,16)/255)}else if(e=t.match(/^rgba?\(\s*([+-]?\d+)\s*,\s*([+-]?\d+)\s*,\s*([+-]?\d+)\s*(?:,\s*([+-]?[\d\.]+)\s*)?\)$/)){for(r=0;r<3;r++)i[r]=parseInt(e[r+1],0);e[4]&&(i[3]=parseFloat(e[4]))}else{if(!(e=t.match(/^rgba?\(\s*([+-]?[\d\.]+)\%\s*,\s*([+-]?[\d\.]+)\%\s*,\s*([+-]?[\d\.]+)\%\s*(?:,\s*([+-]?[\d\.]+)\s*)?\)$/)))return(e=t.match(/(\D+)/))?"transparent"===e[1]?[0,0,0,0]:(i=o[e[1]])?(i[3]=1,i):null:null;for(r=0;r<3;r++)i[r]=Math.round(2.55*parseFloat(e[r+1]));e[4]&&(i[3]=parseFloat(e[4]))}for(r=0;r<3;r++)i[r]=a(i[r],0,255);return i[3]=a(i[3],0,1),i},n.get.hsl=function(t){if(!t)return null;var e=t.match(/^hsla?\(\s*([+-]?(?:\d{0,3}\.)?\d+)(?:deg)?\s*,?\s*([+-]?[\d\.]+)%\s*,?\s*([+-]?[\d\.]+)%\s*(?:[,|\/]\s*([+-]?[\d\.]+)\s*)?\)$/);if(e){var r=parseFloat(e[4]);return[(parseFloat(e[1])+360)%360,a(parseFloat(e[2]),0,100),a(parseFloat(e[3]),0,100),a(isNaN(r)?1:r,0,1)]}return null},n.get.hwb=function(t){if(!t)return null;var e=t.match(/^hwb\(\s*([+-]?\d{0,3}(?:\.\d+)?)(?:deg)?\s*,\s*([+-]?[\d\.]+)%\s*,\s*([+-]?[\d\.]+)%\s*(?:,\s*([+-]?[\d\.]+)\s*)?\)$/);if(e){var r=parseFloat(e[4]);return[(parseFloat(e[1])%360+360)%360,a(parseFloat(e[2]),0,100),a(parseFloat(e[3]),0,100),a(isNaN(r)?1:r,0,1)]}return null},n.to.hex=function(){var t=u(arguments);return"#"+i(t[0])+i(t[1])+i(t[2])+(t[3]<1?i(Math.round(255*t[3])):"")},n.to.rgb=function(){var t=u(arguments);return t.length<4||1===t[3]?"rgb("+Math.round(t[0])+", "+Math.round(t[1])+", "+Math.round(t[2])+")":"rgba("+Math.round(t[0])+", "+Math.round(t[1])+", "+Math.round(t[2])+", "+t[3]+")"},n.to.rgb.percent=function(){var t=u(arguments),e=Math.round(t[0]/255*100),r=Math.round(t[1]/255*100),n=Math.round(t[2]/255*100);return t.length<4||1===t[3]?"rgb("+e+"%, "+r+"%, "+n+"%)":"rgba("+e+"%, "+r+"%, "+n+"%, "+t[3]+")"},n.to.hsl=function(){var t=u(arguments);return t.length<4||1===t[3]?"hsl("+t[0]+", "+t[1]+"%, "+t[2]+"%)":"hsla("+t[0]+", "+t[1]+"%, "+t[2]+"%, "+t[3]+")"},n.to.hwb=function(){var t=u(arguments),e="";return t.length>=4&&1!==t[3]&&(e=", "+t[3]),"hwb("+t[0]+", "+t[1]+"%, "+t[2]+"%"+e+")"},n.to.keyword=function(t){return e[t.slice(0,3)]}})),l={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]},c=i((function(t){var e={};for(var r in l)l.hasOwnProperty(r)&&(e[l[r]]=r);var n=t.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 a in n)if(n.hasOwnProperty(a)){if(!("channels"in n[a]))throw new Error("missing channels property: "+a);if(!("labels"in n[a]))throw new Error("missing channel labels property: "+a);if(n[a].labels.length!==n[a].channels)throw new Error("channel and label counts mismatch: "+a);var i=n[a].channels,o=n[a].labels;delete n[a].channels,delete n[a].labels,Object.defineProperty(n[a],"channels",{value:i}),Object.defineProperty(n[a],"labels",{value:o})}n.rgb.hsl=function(t){var e,r,n=t[0]/255,a=t[1]/255,i=t[2]/255,o=Math.min(n,a,i),u=Math.max(n,a,i),s=u-o;return u===o?e=0:n===u?e=(a-i)/s:a===u?e=2+(i-n)/s:i===u&&(e=4+(n-a)/s),(e=Math.min(60*e,360))<0&&(e+=360),r=(o+u)/2,[e,100*(u===o?0:r<=.5?s/(u+o):s/(2-u-o)),100*r]},n.rgb.hsv=function(t){var e,r,n,a,i,o=t[0]/255,u=t[1]/255,s=t[2]/255,l=Math.max(o,u,s),c=l-Math.min(o,u,s),h=function(t){return(l-t)/6/c+.5};return 0===c?a=i=0:(i=c/l,e=h(o),r=h(u),n=h(s),o===l?a=n-r:u===l?a=1/3+e-n:s===l&&(a=2/3+r-e),a<0?a+=1:a>1&&(a-=1)),[360*a,100*i,100*l]},n.rgb.hwb=function(t){var e=t[0],r=t[1],a=t[2];return[n.rgb.hsl(t)[0],1/255*Math.min(e,Math.min(r,a))*100,100*(a=1-1/255*Math.max(e,Math.max(r,a)))]},n.rgb.cmyk=function(t){var e,r=t[0]/255,n=t[1]/255,a=t[2]/255;return[100*((1-r-(e=Math.min(1-r,1-n,1-a)))/(1-e)||0),100*((1-n-e)/(1-e)||0),100*((1-a-e)/(1-e)||0),100*e]},n.rgb.keyword=function(t){var r=e[t];if(r)return r;var n,a,i,o=1/0;for(var u in l)if(l.hasOwnProperty(u)){var s=(a=t,i=l[u],Math.pow(a[0]-i[0],2)+Math.pow(a[1]-i[1],2)+Math.pow(a[2]-i[2],2));s<o&&(o=s,n=u)}return n},n.keyword.rgb=function(t){return l[t]},n.rgb.xyz=function(t){var e=t[0]/255,r=t[1]/255,n=t[2]/255;return[100*(.4124*(e=e>.04045?Math.pow((e+.055)/1.055,2.4):e/12.92)+.3576*(r=r>.04045?Math.pow((r+.055)/1.055,2.4):r/12.92)+.1805*(n=n>.04045?Math.pow((n+.055)/1.055,2.4):n/12.92)),100*(.2126*e+.7152*r+.0722*n),100*(.0193*e+.1192*r+.9505*n)]},n.rgb.lab=function(t){var e=n.rgb.xyz(t),r=e[0],a=e[1],i=e[2];return a/=100,i/=108.883,r=(r/=95.047)>.008856?Math.pow(r,1/3):7.787*r+16/116,[116*(a=a>.008856?Math.pow(a,1/3):7.787*a+16/116)-16,500*(r-a),200*(a-(i=i>.008856?Math.pow(i,1/3):7.787*i+16/116))]},n.hsl.rgb=function(t){var e,r,n,a,i,o=t[0]/360,u=t[1]/100,s=t[2]/100;if(0===u)return[i=255*s,i,i];e=2*s-(r=s<.5?s*(1+u):s+u-s*u),a=[0,0,0];for(var l=0;l<3;l++)(n=o+1/3*-(l-1))<0&&n++,n>1&&n--,a[l]=255*(i=6*n<1?e+6*(r-e)*n:2*n<1?r:3*n<2?e+(r-e)*(2/3-n)*6:e);return a},n.hsl.hsv=function(t){var e=t[0],r=t[1]/100,n=t[2]/100,a=r,i=Math.max(n,.01);return r*=(n*=2)<=1?n:2-n,a*=i<=1?i:2-i,[e,100*(0===n?2*a/(i+a):2*r/(n+r)),(n+r)/2*100]},n.hsv.rgb=function(t){var e=t[0]/60,r=t[1]/100,n=t[2]/100,a=Math.floor(e)%6,i=e-Math.floor(e),o=255*n*(1-r),u=255*n*(1-r*i),s=255*n*(1-r*(1-i));switch(n*=255,a){case 0:return[n,s,o];case 1:return[u,n,o];case 2:return[o,n,s];case 3:return[o,u,n];case 4:return[s,o,n];case 5:return[n,o,u]}},n.hsv.hsl=function(t){var e,r,n,a=t[0],i=t[1]/100,o=t[2]/100,u=Math.max(o,.01);return n=(2-i)*o,r=i*u,[a,100*(r=(r/=(e=(2-i)*u)<=1?e:2-e)||0),100*(n/=2)]},n.hwb.rgb=function(t){var e,r,n,a,i,o,u,s=t[0]/360,l=t[1]/100,c=t[2]/100,h=l+c;switch(h>1&&(l/=h,c/=h),n=6*s-(e=Math.floor(6*s)),0!=(1&e)&&(n=1-n),a=l+n*((r=1-c)-l),e){default:case 6:case 0:i=r,o=a,u=l;break;case 1:i=a,o=r,u=l;break;case 2:i=l,o=r,u=a;break;case 3:i=l,o=a,u=r;break;case 4:i=a,o=l,u=r;break;case 5:i=r,o=l,u=a}return[255*i,255*o,255*u]},n.cmyk.rgb=function(t){var e=t[1]/100,r=t[2]/100,n=t[3]/100;return[255*(1-Math.min(1,t[0]/100*(1-n)+n)),255*(1-Math.min(1,e*(1-n)+n)),255*(1-Math.min(1,r*(1-n)+n))]},n.xyz.rgb=function(t){var e,r,n,a=t[0]/100,i=t[1]/100,o=t[2]/100;return r=-.9689*a+1.8758*i+.0415*o,n=.0557*a+-.204*i+1.057*o,e=(e=3.2406*a+-1.5372*i+-.4986*o)>.0031308?1.055*Math.pow(e,1/2.4)-.055:12.92*e,r=r>.0031308?1.055*Math.pow(r,1/2.4)-.055:12.92*r,n=n>.0031308?1.055*Math.pow(n,1/2.4)-.055:12.92*n,[255*(e=Math.min(Math.max(0,e),1)),255*(r=Math.min(Math.max(0,r),1)),255*(n=Math.min(Math.max(0,n),1))]},n.xyz.lab=function(t){var e=t[0],r=t[1],n=t[2];return r/=100,n/=108.883,e=(e/=95.047)>.008856?Math.pow(e,1/3):7.787*e+16/116,[116*(r=r>.008856?Math.pow(r,1/3):7.787*r+16/116)-16,500*(e-r),200*(r-(n=n>.008856?Math.pow(n,1/3):7.787*n+16/116))]},n.lab.xyz=function(t){var e,r,n;e=t[1]/500+(r=(t[0]+16)/116),n=r-t[2]/200;var a=Math.pow(r,3),i=Math.pow(e,3),o=Math.pow(n,3);return r=a>.008856?a:(r-16/116)/7.787,e=i>.008856?i:(e-16/116)/7.787,n=o>.008856?o:(n-16/116)/7.787,[e*=95.047,r*=100,n*=108.883]},n.lab.lch=function(t){var e,r=t[0],n=t[1],a=t[2];return(e=360*Math.atan2(a,n)/2/Math.PI)<0&&(e+=360),[r,Math.sqrt(n*n+a*a),e]},n.lch.lab=function(t){var e,r=t[1];return e=t[2]/360*2*Math.PI,[t[0],r*Math.cos(e),r*Math.sin(e)]},n.rgb.ansi16=function(t){var e=t[0],r=t[1],a=t[2],i=1 in arguments?arguments[1]:n.rgb.hsv(t)[2];if(0===(i=Math.round(i/50)))return 30;var o=30+(Math.round(a/255)<<2|Math.round(r/255)<<1|Math.round(e/255));return 2===i&&(o+=60),o},n.hsv.ansi16=function(t){return n.rgb.ansi16(n.hsv.rgb(t),t[2])},n.rgb.ansi256=function(t){var e=t[0],r=t[1],n=t[2];return e===r&&r===n?e<8?16:e>248?231:Math.round((e-8)/247*24)+232:16+36*Math.round(e/255*5)+6*Math.round(r/255*5)+Math.round(n/255*5)},n.ansi16.rgb=function(t){var e=t%10;if(0===e||7===e)return t>50&&(e+=3.5),[e=e/10.5*255,e,e];var r=.5*(1+~~(t>50));return[(1&e)*r*255,(e>>1&1)*r*255,(e>>2&1)*r*255]},n.ansi256.rgb=function(t){if(t>=232){var e=10*(t-232)+8;return[e,e,e]}var r;return t-=16,[Math.floor(t/36)/5*255,Math.floor((r=t%36)/6)/5*255,r%6/5*255]},n.rgb.hex=function(t){var e=(((255&Math.round(t[0]))<<16)+((255&Math.round(t[1]))<<8)+(255&Math.round(t[2]))).toString(16).toUpperCase();return"000000".substring(e.length)+e},n.hex.rgb=function(t){var e=t.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!e)return[0,0,0];var r=e[0];3===e[0].length&&(r=r.split("").map((function(t){return t+t})).join(""));var n=parseInt(r,16);return[n>>16&255,n>>8&255,255&n]},n.rgb.hcg=function(t){var e,r=t[0]/255,n=t[1]/255,a=t[2]/255,i=Math.max(Math.max(r,n),a),o=Math.min(Math.min(r,n),a),u=i-o;return e=u<=0?0:i===r?(n-a)/u%6:i===n?2+(a-r)/u:4+(r-n)/u+4,e/=6,[360*(e%=1),100*u,100*(u<1?o/(1-u):0)]},n.hsl.hcg=function(t){var e,r=t[1]/100,n=t[2]/100,a=0;return(e=n<.5?2*r*n:2*r*(1-n))<1&&(a=(n-.5*e)/(1-e)),[t[0],100*e,100*a]},n.hsv.hcg=function(t){var e=t[2]/100,r=t[1]/100*e,n=0;return r<1&&(n=(e-r)/(1-r)),[t[0],100*r,100*n]},n.hcg.rgb=function(t){var e=t[1]/100,r=t[2]/100;if(0===e)return[255*r,255*r,255*r];var n,a=[0,0,0],i=t[0]/360%1*6,o=i%1,u=1-o;switch(Math.floor(i)){case 0:a[0]=1,a[1]=o,a[2]=0;break;case 1:a[0]=u,a[1]=1,a[2]=0;break;case 2:a[0]=0,a[1]=1,a[2]=o;break;case 3:a[0]=0,a[1]=u,a[2]=1;break;case 4:a[0]=o,a[1]=0,a[2]=1;break;default:a[0]=1,a[1]=0,a[2]=u}return[255*(e*a[0]+(n=(1-e)*r)),255*(e*a[1]+n),255*(e*a[2]+n)]},n.hcg.hsv=function(t){var e=t[1]/100,r=e+t[2]/100*(1-e),n=0;return r>0&&(n=e/r),[t[0],100*n,100*r]},n.hcg.hsl=function(t){var e=t[1]/100,r=t[2]/100*(1-e)+.5*e,n=0;return r>0&&r<.5?n=e/(2*r):r>=.5&&r<1&&(n=e/(2*(1-r))),[t[0],100*n,100*r]},n.hcg.hwb=function(t){var e=t[1]/100,r=e+t[2]/100*(1-e);return[t[0],100*(r-e),100*(1-r)]},n.hwb.hcg=function(t){var e=1-t[2]/100,r=e-t[1]/100,n=0;return r<1&&(n=(e-r)/(1-r)),[t[0],100*r,100*n]},n.apple.rgb=function(t){return[t[0]/65535*255,t[1]/65535*255,t[2]/65535*255]},n.rgb.apple=function(t){return[t[0]/255*65535,t[1]/255*65535,t[2]/255*65535]},n.gray.rgb=function(t){return[t[0]/100*255,t[0]/100*255,t[0]/100*255]},n.gray.hsl=n.gray.hsv=function(t){return[0,0,t[0]]},n.gray.hwb=function(t){return[0,100,t[0]]},n.gray.cmyk=function(t){return[0,0,0,t[0]]},n.gray.lab=function(t){return[t[0],0,0]},n.gray.hex=function(t){var e=255&Math.round(t[0]/100*255),r=((e<<16)+(e<<8)+e).toString(16).toUpperCase();return"000000".substring(r.length)+r},n.rgb.gray=function(t){return[(t[0]+t[1]+t[2])/3/255*100]}}));function h(t,e){return function(r){return e(t(r))}}function f(t,e){for(var r=[e[t].parent,t],n=c[e[t].parent][t],a=e[t].parent;e[a].parent;)r.unshift(e[a].parent),n=h(c[e[a].parent][a],n),a=e[a].parent;return n.conversion=r,n}var d={};Object.keys(c).forEach((function(t){d[t]={},Object.defineProperty(d[t],"channels",{value:c[t].channels}),Object.defineProperty(d[t],"labels",{value:c[t].labels});var e=function(t){for(var e=function(t){var e=function(){for(var t={},e=Object.keys(c),r=e.length,n=0;n<r;n++)t[e[n]]={distance:-1,parent:null};return t}(),r=[t];for(e[t].distance=0;r.length;)for(var n=r.pop(),a=Object.keys(c[n]),i=a.length,o=0;o<i;o++){var u=a[o],s=e[u];-1===s.distance&&(s.distance=e[n].distance+1,s.parent=n,r.unshift(u))}return e}(t),r={},n=Object.keys(e),a=n.length,i=0;i<a;i++){var o=n[i];null!==e[o].parent&&(r[o]=f(o,e))}return r}(t);Object.keys(e).forEach((function(r){var n=e[r];d[t][r]=function(t){var e=function(e){if(null==e)return e;arguments.length>1&&(e=Array.prototype.slice.call(arguments));var r=t(e);if("object"==typeof r)for(var n=r.length,a=0;a<n;a++)r[a]=Math.round(r[a]);return r};return"conversion"in t&&(e.conversion=t.conversion),e}(n),d[t][r].raw=function(t){var e=function(e){return null==e?e:(arguments.length>1&&(e=Array.prototype.slice.call(arguments)),t(e))};return"conversion"in t&&(e.conversion=t.conversion),e}(n)}))}));var b=d,v=[].slice,g=["keyword","gray","hex"],p={};Object.keys(b).forEach((function(t){p[v.call(b[t].labels).sort().join("")]=t}));var y={};function m(t,e){if(!(this instanceof m))return new m(t,e);if(e&&e in g&&(e=null),e&&!(e in b))throw new Error("Unknown model: "+e);var r,n;if(null==t)this.model="rgb",this.color=[0,0,0],this.valpha=1;else if(t instanceof m)this.model=t.model,this.color=t.color.slice(),this.valpha=t.valpha;else if("string"==typeof t){var a=s.get(t);if(null===a)throw new Error("Unable to parse color from string: "+t);this.model=a.model,this.color=a.value.slice(0,n=b[this.model].channels),this.valpha="number"==typeof a.value[n]?a.value[n]:1}else if(t.length){this.model=e||"rgb";var i=v.call(t,0,n=b[this.model].channels);this.color=x(i,n),this.valpha="number"==typeof t[n]?t[n]:1}else if("number"==typeof t)t&=16777215,this.model="rgb",this.color=[t>>16&255,t>>8&255,255&t],this.valpha=1;else{this.valpha=1;var o=Object.keys(t);"alpha"in t&&(o.splice(o.indexOf("alpha"),1),this.valpha="number"==typeof t.alpha?t.alpha:0);var u=o.sort().join("");if(!(u in p))throw new Error("Unable to parse color from object: "+JSON.stringify(t));this.model=p[u];var l=b[this.model].labels,c=[];for(r=0;r<l.length;r++)c.push(t[l[r]]);this.color=x(c)}if(y[this.model])for(n=b[this.model].channels,r=0;r<n;r++){var h=y[this.model][r];h&&(this.color[r]=h(this.color[r]))}this.valpha=Math.max(0,Math.min(1,this.valpha)),Object.freeze&&Object.freeze(this)}function w(t,e,r){return(t=Array.isArray(t)?t:[t]).forEach((function(t){(y[t]||(y[t]=[]))[e]=r})),t=t[0],function(n){var a;return arguments.length?(r&&(n=r(n)),(a=this[t]()).color[e]=n,a):(a=this[t]().color[e],r&&(a=r(a)),a)}}function M(t){return function(e){return Math.max(0,Math.min(t,e))}}function k(t){return Array.isArray(t)?t:[t]}function x(t,e){for(var r=0;r<e;r++)"number"!=typeof t[r]&&(t[r]=0);return t}m.prototype={toString:function(){return this.string()},toJSON:function(){return this[this.model]()},string:function(t){var e=this.model in s.to?this:this.rgb(),r=1===(e=e.round("number"==typeof t?t:1)).valpha?e.color:e.color.concat(this.valpha);return s.to[e.model](r)},percentString:function(t){var e=this.rgb().round("number"==typeof t?t:1),r=1===e.valpha?e.color:e.color.concat(this.valpha);return s.to.rgb.percent(r)},array:function(){return 1===this.valpha?this.color.slice():this.color.concat(this.valpha)},object:function(){for(var t={},e=b[this.model].channels,r=b[this.model].labels,n=0;n<e;n++)t[r[n]]=this.color[n];return 1!==this.valpha&&(t.alpha=this.valpha),t},unitArray:function(){var t=this.rgb().color;return t[0]/=255,t[1]/=255,t[2]/=255,1!==this.valpha&&t.push(this.valpha),t},unitObject:function(){var t=this.rgb().object();return t.r/=255,t.g/=255,t.b/=255,1!==this.valpha&&(t.alpha=this.valpha),t},round:function(t){return t=Math.max(t||0,0),new m(this.color.map(function(t){return function(e){return function(t,e){return Number(t.toFixed(e))}(e,t)}}(t)).concat(this.valpha),this.model)},alpha:function(t){return arguments.length?new m(this.color.concat(Math.max(0,Math.min(1,t))),this.model):this.valpha},red:w("rgb",0,M(255)),green:w("rgb",1,M(255)),blue:w("rgb",2,M(255)),hue:w(["hsl","hsv","hsl","hwb","hcg"],0,(function(t){return(t%360+360)%360})),saturationl:w("hsl",1,M(100)),lightness:w("hsl",2,M(100)),saturationv:w("hsv",1,M(100)),value:w("hsv",2,M(100)),chroma:w("hcg",1,M(100)),gray:w("hcg",2,M(100)),white:w("hwb",1,M(100)),wblack:w("hwb",2,M(100)),cyan:w("cmyk",0,M(100)),magenta:w("cmyk",1,M(100)),yellow:w("cmyk",2,M(100)),black:w("cmyk",3,M(100)),x:w("xyz",0,M(100)),y:w("xyz",1,M(100)),z:w("xyz",2,M(100)),l:w("lab",0,M(100)),a:w("lab",1),b:w("lab",2),keyword:function(t){return arguments.length?new m(t):b[this.model].keyword(this.color)},hex:function(t){return arguments.length?new m(t):s.to.hex(this.rgb().round().color)},rgbNumber:function(){var t=this.rgb().color;return(255&t[0])<<16|(255&t[1])<<8|255&t[2]},luminosity:function(){for(var t=this.rgb().color,e=[],r=0;r<t.length;r++){var n=t[r]/255;e[r]=n<=.03928?n/12.92:Math.pow((n+.055)/1.055,2.4)}return.2126*e[0]+.7152*e[1]+.0722*e[2]},contrast:function(t){var e=this.luminosity(),r=t.luminosity();return e>r?(e+.05)/(r+.05):(r+.05)/(e+.05)},level:function(t){var e=this.contrast(t);return e>=7.1?"AAA":e>=4.5?"AA":""},isDark:function(){var t=this.rgb().color;return(299*t[0]+587*t[1]+114*t[2])/1e3<128},isLight:function(){return!this.isDark()},negate:function(){for(var t=this.rgb(),e=0;e<3;e++)t.color[e]=255-t.color[e];return t},lighten:function(t){var e=this.hsl();return e.color[2]+=e.color[2]*t,e},darken:function(t){var e=this.hsl();return e.color[2]-=e.color[2]*t,e},saturate:function(t){var e=this.hsl();return e.color[1]+=e.color[1]*t,e},desaturate:function(t){var e=this.hsl();return e.color[1]-=e.color[1]*t,e},whiten:function(t){var e=this.hwb();return e.color[1]+=e.color[1]*t,e},blacken:function(t){var e=this.hwb();return e.color[2]+=e.color[2]*t,e},grayscale:function(){var t=this.rgb().color,e=.3*t[0]+.59*t[1]+.11*t[2];return m.rgb(e,e,e)},fade:function(t){return this.alpha(this.valpha-this.valpha*t)},opaquer:function(t){return this.alpha(this.valpha+this.valpha*t)},rotate:function(t){var e=this.hsl(),r=e.color[0];return e.color[0]=r=(r=(r+t)%360)<0?360+r:r,e},mix:function(t,e){if(!t||!t.rgb)throw new Error('Argument to "mix" was not a Color instance, but rather an instance of '+typeof t);var r=t.rgb(),n=this.rgb(),a=void 0===e?.5:e,i=2*a-1,o=r.alpha()-n.alpha(),u=((i*o==-1?i:(i+o)/(1+i*o))+1)/2,s=1-u;return m.rgb(u*r.red()+s*n.red(),u*r.green()+s*n.green(),u*r.blue()+s*n.blue(),r.alpha()*a+n.alpha()*(1-a))}},Object.keys(b).forEach((function(t){if(-1===g.indexOf(t)){var e=b[t].channels;m.prototype[t]=function(){if(this.model===t)return new m(this);if(arguments.length)return new m(arguments,t);var r="number"==typeof arguments[e]?e:this.valpha;return new m(k(b[this.model][t].raw(this.color)).concat(r),t)},m[t]=function(r){return"number"==typeof r&&(r=x(v.call(arguments),e)),new m(r,t)}}}));var O=m,j=function(t,e,r){return t*(1-r)+e*r};const C={name:"color",test:t=>"string"==typeof t&&(t.indexOf("rgb")>=0||t.indexOf("#")>=0||t.indexOf("hsl")>=0||s.get.rgb(t)),initialize:(t,e)=>({data:{format:(t.indexOf("rgba")>=0?"rgba":t.indexOf("rgb")>=0&&"rgb")||t.indexOf("#")>=0&&"hex"||O(t).model},startValue:O(t).rgb(),destValue:O(e).rgb()}),interpolate(t,e,r,n){const a=j(t.color[0],e.color[0],r),i=j(t.color[1],e.color[1],r),o=j(t.color[2],e.color[2],r),u=j(t.valpha,e.valpha,r),s=O.rgb(a,i,o,u)["rgba"===n.format?"rgb":n.format]();return"string"==typeof s?s:s.string()}},z=[{id:1,height:400,width:100,x:10,y:10,drop:20},{id:2,height:356,width:100,x:120,y:32,drop:20},{id:3,height:312,width:100,x:230,y:54,drop:20},{id:4,height:268,width:100,x:340,y:76,drop:20},{id:5,height:224,width:100,x:450,y:98,drop:20}],q=z.map((()=>0)),I="#ffffff",A={bada55:"#bada55",navy:"#001f3f",blue:"#0074d9",aqua:"#7fdbff",teal:"#39cccc",olive:"#3d9970",green:"#2ecc40",lime:"#01ff70",yellow:"#ffdc00",orange:"#ff851b",red:"#ff4136",maroon:"#85144b",fuchsia:"#f012be",purple:"#b10dc9",black:"#111111",gray:"#aaaaaa",silver:"#dddddd"},$=t=>A[t],L=Object.keys(A),S=t=>!("isConnected"in t)||t.isConnected,F=(()=>{let t;return(...e)=>{t&&clearTimeout(t),t=setTimeout((()=>{t=0,(t=>{for(let e of t.keys())t.set(e,t.get(e).filter(S))})(...e)}),2e3)}})(),_=(()=>{const r=((t,e=((t,e)=>t!==e))=>{let r=new Map(Object.entries(null!=t?t:{}));const n={dispose:[],get:[],set:[],reset:[]},a=()=>{r=new Map(Object.entries(null!=t?t:{})),n.reset.forEach((t=>t()))},i=t=>(n.get.forEach((e=>e(t))),r.get(t)),o=(t,a)=>{const i=r.get(t);e(a,i,t)&&(r.set(t,a),n.set.forEach((e=>e(t,a,i))))},u="undefined"==typeof Proxy?{}:new Proxy(t,{get:(t,e)=>i(e),ownKeys:()=>Array.from(r.keys()),getOwnPropertyDescriptor:()=>({enumerable:!0,configurable:!0}),has:(t,e)=>r.has(e),set:(t,e,r)=>(o(e,r),!0)}),s=(t,e)=>(n[t].push(e),()=>{((t,e)=>{const r=t.indexOf(e);r>=0&&(t[r]=t[t.length-1],t.length--)})(n[t],e)});return{state:u,get:i,set:o,on:s,onChange:(e,r)=>{const n=s("set",((t,n)=>{t===e&&r(n)})),a=s("reset",(()=>r(t[e])));return()=>{n(),a()}},use:(...t)=>t.forEach((t=>{t.set&&s("set",t.set),t.get&&s("get",t.get),t.reset&&s("reset",t.reset)})),dispose:()=>{n.dispose.forEach((t=>t())),a()},reset:a,forceUpdate:t=>{const e=r.get(t);n.set.forEach((r=>r(t,e,e)))}}})({count:0,pick:"bada55",values:[...q]},void 0);return(({on:r})=>{const n=new Map;"function"==typeof t&&(r("dispose",(()=>{n.clear()})),r("get",(e=>{const r=t();r&&((t,e,r)=>{const n=t.get(e);n?n.includes(r)||n.push(r):t.set(e,[r])})(n,e,r)})),r("set",(t=>{const r=n.get(t);r&&n.set(t,r.filter(e)),F(n)})),r("reset",(()=>{n.forEach((t=>t.forEach(e))),F(n)})))})(r),r})(),{state:D}=_,E=class{constructor(t){n(this,t),this.tag="color-picker"}render(){const{pick:t}=_.state;return r("div",{id:"toolbar"},L.map((e=>{const n=$(e);return r("div",{"aria-label":e,title:e,onClick:()=>{(t=>{D.pick=t})(e)}},(({hex:t=I,selected:e=!1,size:n=24})=>r("svg",{width:n,height:n,viewBox:"0 0 24 24"},r("g",{fill:t},r("path",e?{d:"M12 7c-2.76 0-5 2.24-5 5s2.24 5 5 5 5-2.24 5-5-2.24-5-5-5zm0-5C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"}:{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"})),r("path",{d:"M0 0h24v24H0z",fill:"none"})))({hex:n,selected:t==e}))})))}};E.style="#toolbar{display:flex;flex-direction:row;flex-wrap:wrap}";const N=class{constructor(t){n(this,t),this.tag="data-source"}render(){const{count:t}=_.state;return r("div",{id:"toolbar"},r("button",{"aria-label":"Refresh",title:"Refresh",class:"bg-blue",onClick:()=>{(()=>{const t=q.map((()=>Math.floor(100*Math.random())));D.count=D.count+1,D.values=t})()}},(({hex:t=I,size:e=24})=>r("svg",{width:e,height:e,viewBox:"0 0 24 24"},r("g",{fill:t},r("path",{d:"M17.65 6.35C16.2 4.9 14.21 4 12 4c-4.42 0-7.99 3.58-7.99 8s3.57 8 7.99 8c3.73 0 6.84-2.55 7.73-6h-2.08c-.82 2.33-3.04 4-5.65 4-3.31 0-6-2.69-6-6s2.69-6 6-6c1.66 0 3.14.69 4.22 1.78L13 11h7V4l-2.35 2.35z"})),r("path",{d:"M0 0h24v24H0z",fill:"none"})))({})),r("button",{"aria-label":"Reset",title:"Reset",class:"bg-red",onClick:()=>{D.count=0,D.values=[...q]}},(({hex:t=I,size:e=24})=>r("svg",{width:e,height:e,viewBox:"0 0 24 24"},r("g",{fill:t},r("path",{d:"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"})),r("path",{d:"M0 0h24v24H0z",fill:"none"})))({})),r("span",{class:"info"},(({hex:t="#001f3f",size:e=24})=>r("svg",{width:e,height:e,viewBox:"0 0 24 24"},r("g",{fill:t},r("path",{d:"M18.41,7.41L17,6L11,12L17,18L18.41,16.59L13.83,12L18.41,7.41M12.41,7.41L11,6L5,12L11,18L12.41,16.59L7.83,12L12.41,7.41Z"})),r("path",{d:"M0 0h24v24H0z",fill:"none"})))({size:28}),r("span",{class:"help"},"click a button... ",r("sup",null,t))))}};N.style="#toolbar{display:flex;flex-direction:row;align-items:center;margin-top:10px;margin-bottom:10px}button{display:flex;align-content:center;border-radius:5px;border:1px solid #ccc;padding:5px;margin:0px;margin-right:5px;cursor:pointer}button:active{background-color:var(--clrs-gray)}.bg-blue{background:var(--clrs-blue)}.bg-red{background:var(--clrs-red)}.info{color:var(--clrs-navy);fill:var(--clrs-navy);display:flex;flex-direction:row;align-items:center}.help{font-style:italic}";const R=class{constructor(t){n(this,t),this.tag="data-values"}render(){const{values:t,pick:e,count:n}=_.state;return r("div",{class:"info"},r("div",{class:"row"},r("span",{class:"label"},"color:"),r("span",{class:"value"},e)),r("div",{class:"row sample"},r("span",{class:"label"},"sample:"),r("span",{class:"value"},`${n>0?t:"..."}`)))}};R.style=".info{display:flex;flex-direction:column}.row{display:flex;flex-direction:row;align-items:center}.sample{margin-top:5px}.label{color:var(--clrs-navy);font-weight:bold;margin-right:10px}.value{color:var(--clrs-slate4);font-style:italic}";const T=class{constructor(t){n(this,t)}render(){return r("a",{href:"https://eswat2.dev","aria-label":"eswat2",title:"eswat2"},(({hex:t=I,size:e=24})=>r("svg",{width:e,height:e,viewBox:"0 0 24 24"},r("g",{fill:t},r("path",{d:"M8.35,3C9.53,2.83 10.78,4.12 11.14,5.9C11.5,7.67 10.85,9.25\n 9.67,9.43C8.5,9.61 7.24,8.32 6.87,6.54C6.5,4.77 7.17,3.19\n 8.35,3M15.5,3C16.69,3.19 17.35,4.77 17,6.54C16.62,8.32 15.37,9.61\n 14.19,9.43C13,9.25 12.35,7.67 12.72,5.9C13.08,4.12 14.33,2.83\n 15.5,3M3,7.6C4.14,7.11 5.69,8 6.5,9.55C7.26,11.13 7,12.79\n 5.87,13.28C4.74,13.77 3.2,12.89 2.41,11.32C1.62,9.75 1.9,8.08\n 3,7.6M21,7.6C22.1,8.08 22.38,9.75 21.59,11.32C20.8,12.89 19.26,13.77\n 18.13,13.28C17,12.79 16.74,11.13 17.5,9.55C18.31,8 19.86,7.11\n 21,7.6M19.33,18.38C19.37,19.32 18.65,20.36 17.79,20.75C16,21.57\n 13.88,19.87 11.89,19.87C9.9,19.87 7.76,21.64 6,20.75C5,20.26 4.31,18.96\n 4.44,17.88C4.62,16.39 6.41,15.59 7.47,14.5C8.88,13.09 9.88,10.44\n 11.89,10.44C13.89,10.44 14.95,13.05 16.3,14.5C17.41,15.72 19.26,16.75\n 19.33,18.38Z"})),r("path",{d:"M0 0h24v24H0z",fill:"none"})))({hex:"#aaaaaa"}))}};T.style="a{position:absolute;top:32px;right:32px}:hover{fill:var(--clrs-navy)}";const B=class{constructor(t){n(this,t),this.tag="funnel-app"}render(){return r("div",{id:"app"},r("eswat2-io",null),r("funnel-gfx",null),r("data-source",null),r("color-picker",null),r("hr",null),r("data-values",null))}};B.style="#app{--clrs-navy:#001f3f;--clrs-blue:#0074d9;--clrs-aqua:#7fdbff;--clrs-teal:#39cccc;--clrs-olive:#3d9970;--clrs-green:#2ecc40;--clrs-lime:#01ff70;--clrs-yellow:#ffdc00;--clrs-orange:#ff851b;--clrs-red:#ff4136;--clrs-maroon:#85144b;--clrs-fuchsia:#f012be;--clrs-purple:#b10dc9;--clrs-black:#111111;--clrs-gray:#aaaaaa;--clrs-silver:#dddddd;--clrs-bada55:#bada55;--clrs-slate:#708090;--clrs-slate4:#4e5964;--clrs-white:#ffffff;display:flex;flex-direction:column;padding:1em;color:var(--clrs-navy);font-family:'Roboto', Helvetica, sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}hr{margin-left:0;margin-right:0}";var U=i((function(t){t.exports=function(){function t(e){return(t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(e)}function e(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function r(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}function n(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function i(t){return(i=Object.getPrototypeOf||function(t){return t.__proto__})(t)}function o(t,e){return(o=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function u(t,e,r){return(u="undefined"!=typeof Reflect&&Reflect.construct?Reflect.construct:function(t,e,r){var n=[null];n.push.apply(n,e);var a=new(t.bind.apply(t,n));return r&&o(a,r.prototype),a}).apply(null,arguments)}function s(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}var l=function(t,e,r){return t*(1-r)+e*r},c="undefined"!=typeof window?window:void 0!==a?a:"undefined"!=typeof self?self:{};function h(t,e){return t(e={exports:{}},e.exports),e.exports}for(var f=h((function(t){var e=t.exports={Linear:{None:function(t){return t}},Quadratic:{In:function(t){return t*t},Out:function(t){return t*(2-t)},InOut:function(t){return(t*=2)<1?.5*t*t:-.5*(--t*(t-2)-1)}},Cubic:{In:function(t){return t*t*t},Out:function(t){return--t*t*t+1},InOut:function(t){return(t*=2)<1?.5*t*t*t:.5*((t-=2)*t*t+2)}},Quartic:{In:function(t){return t*t*t*t},Out:function(t){return 1- --t*t*t*t},InOut:function(t){return(t*=2)<1?.5*t*t*t*t:-.5*((t-=2)*t*t*t-2)}},Quintic:{In:function(t){return t*t*t*t*t},Out:function(t){return--t*t*t*t*t+1},InOut:function(t){return(t*=2)<1?.5*t*t*t*t*t:.5*((t-=2)*t*t*t*t+2)}},Sinusoidal:{In:function(t){return 1-Math.cos(t*Math.PI/2)},Out:function(t){return Math.sin(t*Math.PI/2)},InOut:function(t){return.5*(1-Math.cos(Math.PI*t))}},Exponential:{In:function(t){return 0===t?0:Math.pow(1024,t-1)},Out:function(t){return 1===t?1:1-Math.pow(2,-10*t)},InOut:function(t){return 0===t?0:1===t?1:(t*=2)<1?.5*Math.pow(1024,t-1):.5*(2-Math.pow(2,-10*(t-1)))}},Circular:{In:function(t){return 1-Math.sqrt(1-t*t)},Out:function(t){return Math.sqrt(1- --t*t)},InOut:function(t){return(t*=2)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1)}},Elastic:{In:function(t){var e,r=.1;return 0===t?0:1===t?1:(!r||r<1?(r=1,e=.1):e=.4*Math.asin(1/r)/(2*Math.PI),-r*Math.pow(2,10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/.4))},Out:function(t){var e,r=.1;return 0===t?0:1===t?1:(!r||r<1?(r=1,e=.1):e=.4*Math.asin(1/r)/(2*Math.PI),r*Math.pow(2,-10*t)*Math.sin((t-e)*(2*Math.PI)/.4)+1)},InOut:function(t){var e,r=.1;return 0===t?0:1===t?1:(!r||r<1?(r=1,e=.1):e=.4*Math.asin(1/r)/(2*Math.PI),(t*=2)<1?r*Math.pow(2,10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/.4)*-.5:r*Math.pow(2,-10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/.4)*.5+1)}},Back:{In:function(t){return t*t*(2.70158*t-1.70158)},Out:function(t){return--t*t*(2.70158*t+1.70158)+1},InOut:function(t){var e=2.5949095;return(t*=2)<1?t*t*((e+1)*t-e)*.5:.5*((t-=2)*t*((e+1)*t+e)+2)}},Bounce:{In:function(t){return 1-e.Bounce.Out(1-t)},Out:function(t){return t<1/2.75?7.5625*t*t:t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375},InOut:function(t){return t<.5?.5*e.Bounce.In(2*t):.5*e.Bounce.Out(2*t-1)+.5}}}})),d=h((function(t){(function(){var e,r,n,a,i,o;"undefined"!=typeof performance&&null!==performance&&performance.now?t.exports=function(){return performance.now()}:"undefined"!=typeof process&&null!==process&&process.hrtime?(t.exports=function(){return(e()-i)/1e6},r=process.hrtime,a=(e=function(){var t;return 1e9*(t=r())[0]+t[1]})(),o=1e9*process.uptime(),i=a-o):Date.now?(t.exports=function(){return Date.now()-n},n=Date.now()):(t.exports=function(){return(new Date).getTime()-n},n=(new Date).getTime())}).call(c)})),b="undefined"==typeof window?c:window,v=["moz","webkit"],g="AnimationFrame",p=b["request"+g],y=b["cancel"+g]||b["cancelRequest"+g],m=0;!p&&m<v.length;m++)p=b[v[m]+"Request"+g],y=b[v[m]+"Cancel"+g]||b[v[m]+"CancelRequest"+g];if(!p||!y){var w=0,M=0,k=[];p=function(t){if(0===k.length){var e=d(),r=Math.max(0,1e3/60-(e-w));w=r+e,setTimeout((function(){for(var t=k.slice(0),e=k.length=0;e<t.length;e++)if(!t[e].cancelled)try{t[e].callback(w)}catch(t){setTimeout((function(){throw t}),0)}}),Math.round(r))}return k.push({handle:++M,callback:t,cancelled:!1}),M},y=function(t){for(var e=0;e<k.length;e++)k[e].handle===t&&(k[e].cancelled=!0)}}var x=function(t){return p.call(b,t)};x.cancel=function(){y.apply(b,arguments)},x.polyfill=function(t){t||(t=b),t.requestAnimationFrame=p,t.cancelAnimationFrame=y};var O,j,C=[],z=Symbol("type"),q=Symbol("start_time"),I=Symbol("completed"),A=Symbol("paused"),$=requestAnimationFrame||x,L=Date.now();!function t(){$(t),O=Date.now(),j=O-L;for(var e=0;e<C.length;e++)C[e][I]||C[e](j,Date.now()-C[e][q]);L=O}();var S=function(e){function a(e,r){var o,u,c;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,a),c=i(a).call(this),n(s(s(u=!c||"object"!=typeof c&&"function"!=typeof c?s(this):c)),"update",(function(){var t=s(s(u))._updateValue;return function(e,r){u[I]||u[A]||(0===u.localTime&&u.emit("start",u.value,s(s(u))),t(u.ease(u.loopFunction.progress(Math.min(1,(r||u.localTime)/u.duration)))),u.emit("update",u.value,s(s(u)),e),u.localTime>=u.duration&&u.loopFunction.complete((function(){u[I]=!0,u.emit("complete",u.value,s(s(u)))})),u.localTime+=e)}}));var h=u.plugin=Object.values(a._plugins).reduce((function(t,r){return t||r&&r.test&&r.test(e)&&r}),!1),f=h&&h.name||("object"===t(e)?Array.isArray(e)?"array":"object":"number");if(h){var d=h.initialize(e,r);e=d.startValue,r=d.destValue,u.data=d.data}switch(Object.assign(s(s(u)),(n(o={duration:1e3,localTime:0,startValue:e,destValue:r,loopMode:"once",loopFunction:a.DEFAULT_LOOP,ease:function(t){return t},value:"array"===f?[].concat(e):"object"===f?Object.assign({},e):e},I,!1),n(o,z,f),n(o,q,Date.now()),n(o,A,!1),o)),u[z]){case"number":u._updateValue=function(t){u.value=l(u.startValue,u.destValue,t)};break;case"array":var b=u.value.length,v=s(s(u)),g=v.startValue,p=v.destValue,y=v.value;u._updateValue=function(t){for(var e=0;e<b;e++)y[e]=l(g[e],p[e],t)};break;case"object":var m=Object.keys(u.startValue),w=m.length,M=s(s(u)),k=M.startValue,x=M.destValue,O=M.value;u._updateValue=function(t){for(var e=0;e<w;e++){var r=m[e];O[r]=l(k[r],x[r],t)}};break;default:u.plugin?u._updateValue=function(t){u.value=u.plugin.interpolate(u.startValue,u.destValue,t,u.data)}:(console.warn("Between: startValue type was unrecognized."),u._updateValue=function(){return null})}return C.push(u.update()),u}return r(a,null,[{key:"between",value:function(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];return u(a,e)}}]),r(a,[{key:"pause",value:function(){return this[A]=!0,this.emit("pause",this.value,this,j),this}},{key:"play",value:function(){return this[A]=!1,this.emit("play",this.value,this,j),this}},{key:"easing",value:function(t){return this.ease=t,this}},{key:"time",value:function(t){return this.duration=t,this}},{key:"loop",value:function(){for(var t="__loop_".concat(0<arguments.length&&void 0!==arguments[0]?arguments[0]:"once"),e=arguments.length,r=new Array(1<e?e-1:0),n=1;n<e;n++)r[n-1]=arguments[n];return this.loopFunction=t in this?Object.assign({},a.DEFAULT_LOOP,this[t].apply(this,r)):a.DEFAULT_LOOP,this}},{key:"__loop_repeat",value:function(t){var e=this,r=t;return this.times=0,{complete:function(t){e.localTime=0,Number.isInteger(r)&&++e.times===r?t():Number.isInteger(r)||++e.times}}}},{key:"__loop_bounce",value:function(t){var e=this,r=t,n=1;return this.times=0,{complete:function(t){e.localTime=0,n=-n,Number.isInteger(r)&&++e.times===r?t():Number.isInteger(r)||++e.times},progress:function(t){return 0<n?t:1-t}}}},{key:"isPaused",get:function(){return this[A]}}]),function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");o(t.prototype,e&&e.prototype),e&&o(t,e)}(a,e),a}((function(t){var e={},r=[];(t=t||this).on=function(r,n,a){return(e[r]=e[r]||[]).push([n,a]),t},t.off=function(n,a){n||(e={});for(var i=e[n]||r,o=i.length=a?i.length:0;o--;)a==i[o][0]&&i.splice(o,1);return t},t.emit=function(n){for(var a,i=e[n]||r,o=0<i.length?i.slice(0,i.length):i,u=0;a=o[u++];)a[0].apply(a[1],r.slice.call(arguments,1));return t}}));return n(S,"DEFAULT_LOOP",{complete:function(t){return t()},progress:function(t){return t}}),S.Easing=f,S._plugins={},S}()}));U._plugins.color=C;const H=class{constructor(t){n(this,t),this.stroke="#001f3f",this.tag="funnel-gfx",this.processColor=t=>{if(!this.barRefs)return;const e=this.lastHex,r=$(t);null!==e&&e!==r&&(this.tween&&this.tween.pause(),this.tween=new U(e,r).time(1e3).easing(U.Easing.Cubic.InOut).on("update",(t=>{this.barRefs.forEach((e=>{e.setAttribute("fill",`${t}`)})),this.lastHex=t})))},this.processValues=t=>{this.barRefs&&this.barRefs.forEach(((e,r)=>{const n=this.barHeight[r],a=this.lastVal[r],i=t[r];null!==a&&a!==i&&(this.tween2[r]&&this.tween2[r].pause(),this.tween2[r]=new U(a,i).time(1e3).easing(U.Easing.Cubic.InOut).on("update",(t=>{e.setAttribute("y",""+n*((100-t)/100)),this.lastVal[r]=t})))}))},this.bgdFill=I,this.xFill=$("bada55"),this.barHeight=void 0,this.barRefs=void 0,this.lastHex="#bada55",this.tween=void 0,this.lastVal=[0,0,0,0,0],this.tween2=[void 0,void 0,void 0,void 0,void 0],this.createFunnel=({id:t,height:e,width:r,x:n,y:a,drop:i})=>({id:t,height:e,width:r,x:n,y:a,maskId:`mask-${t}`,maskUri:`url('#mask-${t}')`,mask:`0.5,0.5,0.5,${e-.5},${r-.5},${e-i-.5},${r-.5},${i+.5}`,matrix:`matrix(1,0,0,1,${n},${a})`,points:`0,0,0,${e},${r},${e-i},${r},${i}`}),this.generateBars=()=>z.map((t=>this.createFunnel(t)))}componentDidLoad(){_.onChange("pick",this.processColor),_.onChange("values",this.processValues)}render(){const t=this.generateBars(),{bgdFill:e,xFill:n,stroke:a}=this;return this.barHeight=Array(t.length),this.barRefs=Array(t.length),r("div",{class:"funnel"},r("svg",{viewBox:"0 0 600 420"},r("desc",null,"Created with Snap"),r("defs",null,t.map((t=>r("mask",{id:t.maskId},r("polygon",{points:t.mask,fill:e}))))),t.map(((t,i)=>{const{height:o,width:u,maskUri:s,matrix:l,points:c}=t;return this.barHeight[i]=o,r("g",{transform:l},r("polygon",{points:c,fill:e,stroke:a}),r("rect",{ref:t=>this.barRefs[i]=t,x:"0",y:o,width:u,height:o,mask:s,fill:n,stroke:a}))}))))}};H.style=".funnel{width:calc(100% - 20px);height:100%;padding:10px;background-color:var(--clrs-silver);border-radius:10px;border:1px solid var(--clrs-gray)}";export{E as color_picker,N as data_source,R as data_values,T as eswat2_io,B as funnel_app,H as funnel_gfx}
|
|
1
|
+
import{g as t,f as e,h as r,r as n}from"./p-b8fd5dd3.js";var a="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function i(t,e,r){return t(r={path:e,exports:{},require:function(){return function(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}()}},r.exports),r.exports}var o={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]},u=i((function(t){var e=Array.prototype.concat,r=Array.prototype.slice,n=t.exports=function(t){for(var n,a=[],i=0,o=t.length;i<o;i++){var u=t[i];(n=u)&&"string"!=typeof n&&(n instanceof Array||Array.isArray(n)||n.length>=0&&(n.splice instanceof Function||Object.getOwnPropertyDescriptor(n,n.length-1)&&"String"!==n.constructor.name))?a=e.call(a,r.call(u)):a.push(u)}return a};n.wrap=function(t){return function(){return t(n(arguments))}}})),s=i((function(t){var e={};for(var r in o)o.hasOwnProperty(r)&&(e[o[r]]=r);var n=t.exports={to:{},get:{}};function a(t,e,r){return Math.min(Math.max(e,t),r)}function i(t){var e=t.toString(16).toUpperCase();return e.length<2?"0"+e:e}n.get=function(t){var e,r;switch(t.substring(0,3).toLowerCase()){case"hsl":e=n.get.hsl(t),r="hsl";break;case"hwb":e=n.get.hwb(t),r="hwb";break;default:e=n.get.rgb(t),r="rgb"}return e?{model:r,value:e}:null},n.get.rgb=function(t){if(!t)return null;var e,r,n,i=[0,0,0,1];if(e=t.match(/^#([a-f0-9]{6})([a-f0-9]{2})?$/i)){for(n=e[2],e=e[1],r=0;r<3;r++){var u=2*r;i[r]=parseInt(e.slice(u,u+2),16)}n&&(i[3]=parseInt(n,16)/255)}else if(e=t.match(/^#([a-f0-9]{3,4})$/i)){for(n=(e=e[1])[3],r=0;r<3;r++)i[r]=parseInt(e[r]+e[r],16);n&&(i[3]=parseInt(n+n,16)/255)}else if(e=t.match(/^rgba?\(\s*([+-]?\d+)\s*,\s*([+-]?\d+)\s*,\s*([+-]?\d+)\s*(?:,\s*([+-]?[\d\.]+)\s*)?\)$/)){for(r=0;r<3;r++)i[r]=parseInt(e[r+1],0);e[4]&&(i[3]=parseFloat(e[4]))}else{if(!(e=t.match(/^rgba?\(\s*([+-]?[\d\.]+)\%\s*,\s*([+-]?[\d\.]+)\%\s*,\s*([+-]?[\d\.]+)\%\s*(?:,\s*([+-]?[\d\.]+)\s*)?\)$/)))return(e=t.match(/(\D+)/))?"transparent"===e[1]?[0,0,0,0]:(i=o[e[1]])?(i[3]=1,i):null:null;for(r=0;r<3;r++)i[r]=Math.round(2.55*parseFloat(e[r+1]));e[4]&&(i[3]=parseFloat(e[4]))}for(r=0;r<3;r++)i[r]=a(i[r],0,255);return i[3]=a(i[3],0,1),i},n.get.hsl=function(t){if(!t)return null;var e=t.match(/^hsla?\(\s*([+-]?(?:\d{0,3}\.)?\d+)(?:deg)?\s*,?\s*([+-]?[\d\.]+)%\s*,?\s*([+-]?[\d\.]+)%\s*(?:[,|\/]\s*([+-]?[\d\.]+)\s*)?\)$/);if(e){var r=parseFloat(e[4]);return[(parseFloat(e[1])+360)%360,a(parseFloat(e[2]),0,100),a(parseFloat(e[3]),0,100),a(isNaN(r)?1:r,0,1)]}return null},n.get.hwb=function(t){if(!t)return null;var e=t.match(/^hwb\(\s*([+-]?\d{0,3}(?:\.\d+)?)(?:deg)?\s*,\s*([+-]?[\d\.]+)%\s*,\s*([+-]?[\d\.]+)%\s*(?:,\s*([+-]?[\d\.]+)\s*)?\)$/);if(e){var r=parseFloat(e[4]);return[(parseFloat(e[1])%360+360)%360,a(parseFloat(e[2]),0,100),a(parseFloat(e[3]),0,100),a(isNaN(r)?1:r,0,1)]}return null},n.to.hex=function(){var t=u(arguments);return"#"+i(t[0])+i(t[1])+i(t[2])+(t[3]<1?i(Math.round(255*t[3])):"")},n.to.rgb=function(){var t=u(arguments);return t.length<4||1===t[3]?"rgb("+Math.round(t[0])+", "+Math.round(t[1])+", "+Math.round(t[2])+")":"rgba("+Math.round(t[0])+", "+Math.round(t[1])+", "+Math.round(t[2])+", "+t[3]+")"},n.to.rgb.percent=function(){var t=u(arguments),e=Math.round(t[0]/255*100),r=Math.round(t[1]/255*100),n=Math.round(t[2]/255*100);return t.length<4||1===t[3]?"rgb("+e+"%, "+r+"%, "+n+"%)":"rgba("+e+"%, "+r+"%, "+n+"%, "+t[3]+")"},n.to.hsl=function(){var t=u(arguments);return t.length<4||1===t[3]?"hsl("+t[0]+", "+t[1]+"%, "+t[2]+"%)":"hsla("+t[0]+", "+t[1]+"%, "+t[2]+"%, "+t[3]+")"},n.to.hwb=function(){var t=u(arguments),e="";return t.length>=4&&1!==t[3]&&(e=", "+t[3]),"hwb("+t[0]+", "+t[1]+"%, "+t[2]+"%"+e+")"},n.to.keyword=function(t){return e[t.slice(0,3)]}})),l={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]},c=i((function(t){var e={};for(var r in l)l.hasOwnProperty(r)&&(e[l[r]]=r);var n=t.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 a in n)if(n.hasOwnProperty(a)){if(!("channels"in n[a]))throw new Error("missing channels property: "+a);if(!("labels"in n[a]))throw new Error("missing channel labels property: "+a);if(n[a].labels.length!==n[a].channels)throw new Error("channel and label counts mismatch: "+a);var i=n[a].channels,o=n[a].labels;delete n[a].channels,delete n[a].labels,Object.defineProperty(n[a],"channels",{value:i}),Object.defineProperty(n[a],"labels",{value:o})}n.rgb.hsl=function(t){var e,r,n=t[0]/255,a=t[1]/255,i=t[2]/255,o=Math.min(n,a,i),u=Math.max(n,a,i),s=u-o;return u===o?e=0:n===u?e=(a-i)/s:a===u?e=2+(i-n)/s:i===u&&(e=4+(n-a)/s),(e=Math.min(60*e,360))<0&&(e+=360),r=(o+u)/2,[e,100*(u===o?0:r<=.5?s/(u+o):s/(2-u-o)),100*r]},n.rgb.hsv=function(t){var e,r,n,a,i,o=t[0]/255,u=t[1]/255,s=t[2]/255,l=Math.max(o,u,s),c=l-Math.min(o,u,s),h=function(t){return(l-t)/6/c+.5};return 0===c?a=i=0:(i=c/l,e=h(o),r=h(u),n=h(s),o===l?a=n-r:u===l?a=1/3+e-n:s===l&&(a=2/3+r-e),a<0?a+=1:a>1&&(a-=1)),[360*a,100*i,100*l]},n.rgb.hwb=function(t){var e=t[0],r=t[1],a=t[2];return[n.rgb.hsl(t)[0],1/255*Math.min(e,Math.min(r,a))*100,100*(a=1-1/255*Math.max(e,Math.max(r,a)))]},n.rgb.cmyk=function(t){var e,r=t[0]/255,n=t[1]/255,a=t[2]/255;return[100*((1-r-(e=Math.min(1-r,1-n,1-a)))/(1-e)||0),100*((1-n-e)/(1-e)||0),100*((1-a-e)/(1-e)||0),100*e]},n.rgb.keyword=function(t){var r=e[t];if(r)return r;var n,a,i,o=1/0;for(var u in l)if(l.hasOwnProperty(u)){var s=(a=t,i=l[u],Math.pow(a[0]-i[0],2)+Math.pow(a[1]-i[1],2)+Math.pow(a[2]-i[2],2));s<o&&(o=s,n=u)}return n},n.keyword.rgb=function(t){return l[t]},n.rgb.xyz=function(t){var e=t[0]/255,r=t[1]/255,n=t[2]/255;return[100*(.4124*(e=e>.04045?Math.pow((e+.055)/1.055,2.4):e/12.92)+.3576*(r=r>.04045?Math.pow((r+.055)/1.055,2.4):r/12.92)+.1805*(n=n>.04045?Math.pow((n+.055)/1.055,2.4):n/12.92)),100*(.2126*e+.7152*r+.0722*n),100*(.0193*e+.1192*r+.9505*n)]},n.rgb.lab=function(t){var e=n.rgb.xyz(t),r=e[0],a=e[1],i=e[2];return a/=100,i/=108.883,r=(r/=95.047)>.008856?Math.pow(r,1/3):7.787*r+16/116,[116*(a=a>.008856?Math.pow(a,1/3):7.787*a+16/116)-16,500*(r-a),200*(a-(i=i>.008856?Math.pow(i,1/3):7.787*i+16/116))]},n.hsl.rgb=function(t){var e,r,n,a,i,o=t[0]/360,u=t[1]/100,s=t[2]/100;if(0===u)return[i=255*s,i,i];e=2*s-(r=s<.5?s*(1+u):s+u-s*u),a=[0,0,0];for(var l=0;l<3;l++)(n=o+1/3*-(l-1))<0&&n++,n>1&&n--,a[l]=255*(i=6*n<1?e+6*(r-e)*n:2*n<1?r:3*n<2?e+(r-e)*(2/3-n)*6:e);return a},n.hsl.hsv=function(t){var e=t[0],r=t[1]/100,n=t[2]/100,a=r,i=Math.max(n,.01);return r*=(n*=2)<=1?n:2-n,a*=i<=1?i:2-i,[e,100*(0===n?2*a/(i+a):2*r/(n+r)),(n+r)/2*100]},n.hsv.rgb=function(t){var e=t[0]/60,r=t[1]/100,n=t[2]/100,a=Math.floor(e)%6,i=e-Math.floor(e),o=255*n*(1-r),u=255*n*(1-r*i),s=255*n*(1-r*(1-i));switch(n*=255,a){case 0:return[n,s,o];case 1:return[u,n,o];case 2:return[o,n,s];case 3:return[o,u,n];case 4:return[s,o,n];case 5:return[n,o,u]}},n.hsv.hsl=function(t){var e,r,n,a=t[0],i=t[1]/100,o=t[2]/100,u=Math.max(o,.01);return n=(2-i)*o,r=i*u,[a,100*(r=(r/=(e=(2-i)*u)<=1?e:2-e)||0),100*(n/=2)]},n.hwb.rgb=function(t){var e,r,n,a,i,o,u,s=t[0]/360,l=t[1]/100,c=t[2]/100,h=l+c;switch(h>1&&(l/=h,c/=h),n=6*s-(e=Math.floor(6*s)),0!=(1&e)&&(n=1-n),a=l+n*((r=1-c)-l),e){default:case 6:case 0:i=r,o=a,u=l;break;case 1:i=a,o=r,u=l;break;case 2:i=l,o=r,u=a;break;case 3:i=l,o=a,u=r;break;case 4:i=a,o=l,u=r;break;case 5:i=r,o=l,u=a}return[255*i,255*o,255*u]},n.cmyk.rgb=function(t){var e=t[1]/100,r=t[2]/100,n=t[3]/100;return[255*(1-Math.min(1,t[0]/100*(1-n)+n)),255*(1-Math.min(1,e*(1-n)+n)),255*(1-Math.min(1,r*(1-n)+n))]},n.xyz.rgb=function(t){var e,r,n,a=t[0]/100,i=t[1]/100,o=t[2]/100;return r=-.9689*a+1.8758*i+.0415*o,n=.0557*a+-.204*i+1.057*o,e=(e=3.2406*a+-1.5372*i+-.4986*o)>.0031308?1.055*Math.pow(e,1/2.4)-.055:12.92*e,r=r>.0031308?1.055*Math.pow(r,1/2.4)-.055:12.92*r,n=n>.0031308?1.055*Math.pow(n,1/2.4)-.055:12.92*n,[255*(e=Math.min(Math.max(0,e),1)),255*(r=Math.min(Math.max(0,r),1)),255*(n=Math.min(Math.max(0,n),1))]},n.xyz.lab=function(t){var e=t[0],r=t[1],n=t[2];return r/=100,n/=108.883,e=(e/=95.047)>.008856?Math.pow(e,1/3):7.787*e+16/116,[116*(r=r>.008856?Math.pow(r,1/3):7.787*r+16/116)-16,500*(e-r),200*(r-(n=n>.008856?Math.pow(n,1/3):7.787*n+16/116))]},n.lab.xyz=function(t){var e,r,n;e=t[1]/500+(r=(t[0]+16)/116),n=r-t[2]/200;var a=Math.pow(r,3),i=Math.pow(e,3),o=Math.pow(n,3);return r=a>.008856?a:(r-16/116)/7.787,e=i>.008856?i:(e-16/116)/7.787,n=o>.008856?o:(n-16/116)/7.787,[e*=95.047,r*=100,n*=108.883]},n.lab.lch=function(t){var e,r=t[0],n=t[1],a=t[2];return(e=360*Math.atan2(a,n)/2/Math.PI)<0&&(e+=360),[r,Math.sqrt(n*n+a*a),e]},n.lch.lab=function(t){var e,r=t[1];return e=t[2]/360*2*Math.PI,[t[0],r*Math.cos(e),r*Math.sin(e)]},n.rgb.ansi16=function(t){var e=t[0],r=t[1],a=t[2],i=1 in arguments?arguments[1]:n.rgb.hsv(t)[2];if(0===(i=Math.round(i/50)))return 30;var o=30+(Math.round(a/255)<<2|Math.round(r/255)<<1|Math.round(e/255));return 2===i&&(o+=60),o},n.hsv.ansi16=function(t){return n.rgb.ansi16(n.hsv.rgb(t),t[2])},n.rgb.ansi256=function(t){var e=t[0],r=t[1],n=t[2];return e===r&&r===n?e<8?16:e>248?231:Math.round((e-8)/247*24)+232:16+36*Math.round(e/255*5)+6*Math.round(r/255*5)+Math.round(n/255*5)},n.ansi16.rgb=function(t){var e=t%10;if(0===e||7===e)return t>50&&(e+=3.5),[e=e/10.5*255,e,e];var r=.5*(1+~~(t>50));return[(1&e)*r*255,(e>>1&1)*r*255,(e>>2&1)*r*255]},n.ansi256.rgb=function(t){if(t>=232){var e=10*(t-232)+8;return[e,e,e]}var r;return t-=16,[Math.floor(t/36)/5*255,Math.floor((r=t%36)/6)/5*255,r%6/5*255]},n.rgb.hex=function(t){var e=(((255&Math.round(t[0]))<<16)+((255&Math.round(t[1]))<<8)+(255&Math.round(t[2]))).toString(16).toUpperCase();return"000000".substring(e.length)+e},n.hex.rgb=function(t){var e=t.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!e)return[0,0,0];var r=e[0];3===e[0].length&&(r=r.split("").map((function(t){return t+t})).join(""));var n=parseInt(r,16);return[n>>16&255,n>>8&255,255&n]},n.rgb.hcg=function(t){var e,r=t[0]/255,n=t[1]/255,a=t[2]/255,i=Math.max(Math.max(r,n),a),o=Math.min(Math.min(r,n),a),u=i-o;return e=u<=0?0:i===r?(n-a)/u%6:i===n?2+(a-r)/u:4+(r-n)/u+4,e/=6,[360*(e%=1),100*u,100*(u<1?o/(1-u):0)]},n.hsl.hcg=function(t){var e,r=t[1]/100,n=t[2]/100,a=0;return(e=n<.5?2*r*n:2*r*(1-n))<1&&(a=(n-.5*e)/(1-e)),[t[0],100*e,100*a]},n.hsv.hcg=function(t){var e=t[2]/100,r=t[1]/100*e,n=0;return r<1&&(n=(e-r)/(1-r)),[t[0],100*r,100*n]},n.hcg.rgb=function(t){var e=t[1]/100,r=t[2]/100;if(0===e)return[255*r,255*r,255*r];var n,a=[0,0,0],i=t[0]/360%1*6,o=i%1,u=1-o;switch(Math.floor(i)){case 0:a[0]=1,a[1]=o,a[2]=0;break;case 1:a[0]=u,a[1]=1,a[2]=0;break;case 2:a[0]=0,a[1]=1,a[2]=o;break;case 3:a[0]=0,a[1]=u,a[2]=1;break;case 4:a[0]=o,a[1]=0,a[2]=1;break;default:a[0]=1,a[1]=0,a[2]=u}return[255*(e*a[0]+(n=(1-e)*r)),255*(e*a[1]+n),255*(e*a[2]+n)]},n.hcg.hsv=function(t){var e=t[1]/100,r=e+t[2]/100*(1-e),n=0;return r>0&&(n=e/r),[t[0],100*n,100*r]},n.hcg.hsl=function(t){var e=t[1]/100,r=t[2]/100*(1-e)+.5*e,n=0;return r>0&&r<.5?n=e/(2*r):r>=.5&&r<1&&(n=e/(2*(1-r))),[t[0],100*n,100*r]},n.hcg.hwb=function(t){var e=t[1]/100,r=e+t[2]/100*(1-e);return[t[0],100*(r-e),100*(1-r)]},n.hwb.hcg=function(t){var e=1-t[2]/100,r=e-t[1]/100,n=0;return r<1&&(n=(e-r)/(1-r)),[t[0],100*r,100*n]},n.apple.rgb=function(t){return[t[0]/65535*255,t[1]/65535*255,t[2]/65535*255]},n.rgb.apple=function(t){return[t[0]/255*65535,t[1]/255*65535,t[2]/255*65535]},n.gray.rgb=function(t){return[t[0]/100*255,t[0]/100*255,t[0]/100*255]},n.gray.hsl=n.gray.hsv=function(t){return[0,0,t[0]]},n.gray.hwb=function(t){return[0,100,t[0]]},n.gray.cmyk=function(t){return[0,0,0,t[0]]},n.gray.lab=function(t){return[t[0],0,0]},n.gray.hex=function(t){var e=255&Math.round(t[0]/100*255),r=((e<<16)+(e<<8)+e).toString(16).toUpperCase();return"000000".substring(r.length)+r},n.rgb.gray=function(t){return[(t[0]+t[1]+t[2])/3/255*100]}}));function h(t,e){return function(r){return e(t(r))}}function f(t,e){for(var r=[e[t].parent,t],n=c[e[t].parent][t],a=e[t].parent;e[a].parent;)r.unshift(e[a].parent),n=h(c[e[a].parent][a],n),a=e[a].parent;return n.conversion=r,n}var d={};Object.keys(c).forEach((function(t){d[t]={},Object.defineProperty(d[t],"channels",{value:c[t].channels}),Object.defineProperty(d[t],"labels",{value:c[t].labels});var e=function(t){for(var e=function(t){var e=function(){for(var t={},e=Object.keys(c),r=e.length,n=0;n<r;n++)t[e[n]]={distance:-1,parent:null};return t}(),r=[t];for(e[t].distance=0;r.length;)for(var n=r.pop(),a=Object.keys(c[n]),i=a.length,o=0;o<i;o++){var u=a[o],s=e[u];-1===s.distance&&(s.distance=e[n].distance+1,s.parent=n,r.unshift(u))}return e}(t),r={},n=Object.keys(e),a=n.length,i=0;i<a;i++){var o=n[i];null!==e[o].parent&&(r[o]=f(o,e))}return r}(t);Object.keys(e).forEach((function(r){var n=e[r];d[t][r]=function(t){var e=function(e){if(null==e)return e;arguments.length>1&&(e=Array.prototype.slice.call(arguments));var r=t(e);if("object"==typeof r)for(var n=r.length,a=0;a<n;a++)r[a]=Math.round(r[a]);return r};return"conversion"in t&&(e.conversion=t.conversion),e}(n),d[t][r].raw=function(t){var e=function(e){return null==e?e:(arguments.length>1&&(e=Array.prototype.slice.call(arguments)),t(e))};return"conversion"in t&&(e.conversion=t.conversion),e}(n)}))}));var b=d,v=[].slice,g=["keyword","gray","hex"],p={};Object.keys(b).forEach((function(t){p[v.call(b[t].labels).sort().join("")]=t}));var y={};function m(t,e){if(!(this instanceof m))return new m(t,e);if(e&&e in g&&(e=null),e&&!(e in b))throw new Error("Unknown model: "+e);var r,n;if(null==t)this.model="rgb",this.color=[0,0,0],this.valpha=1;else if(t instanceof m)this.model=t.model,this.color=t.color.slice(),this.valpha=t.valpha;else if("string"==typeof t){var a=s.get(t);if(null===a)throw new Error("Unable to parse color from string: "+t);this.model=a.model,this.color=a.value.slice(0,n=b[this.model].channels),this.valpha="number"==typeof a.value[n]?a.value[n]:1}else if(t.length){this.model=e||"rgb";var i=v.call(t,0,n=b[this.model].channels);this.color=x(i,n),this.valpha="number"==typeof t[n]?t[n]:1}else if("number"==typeof t)t&=16777215,this.model="rgb",this.color=[t>>16&255,t>>8&255,255&t],this.valpha=1;else{this.valpha=1;var o=Object.keys(t);"alpha"in t&&(o.splice(o.indexOf("alpha"),1),this.valpha="number"==typeof t.alpha?t.alpha:0);var u=o.sort().join("");if(!(u in p))throw new Error("Unable to parse color from object: "+JSON.stringify(t));this.model=p[u];var l=b[this.model].labels,c=[];for(r=0;r<l.length;r++)c.push(t[l[r]]);this.color=x(c)}if(y[this.model])for(n=b[this.model].channels,r=0;r<n;r++){var h=y[this.model][r];h&&(this.color[r]=h(this.color[r]))}this.valpha=Math.max(0,Math.min(1,this.valpha)),Object.freeze&&Object.freeze(this)}function w(t,e,r){return(t=Array.isArray(t)?t:[t]).forEach((function(t){(y[t]||(y[t]=[]))[e]=r})),t=t[0],function(n){var a;return arguments.length?(r&&(n=r(n)),(a=this[t]()).color[e]=n,a):(a=this[t]().color[e],r&&(a=r(a)),a)}}function M(t){return function(e){return Math.max(0,Math.min(t,e))}}function k(t){return Array.isArray(t)?t:[t]}function x(t,e){for(var r=0;r<e;r++)"number"!=typeof t[r]&&(t[r]=0);return t}m.prototype={toString:function(){return this.string()},toJSON:function(){return this[this.model]()},string:function(t){var e=this.model in s.to?this:this.rgb(),r=1===(e=e.round("number"==typeof t?t:1)).valpha?e.color:e.color.concat(this.valpha);return s.to[e.model](r)},percentString:function(t){var e=this.rgb().round("number"==typeof t?t:1),r=1===e.valpha?e.color:e.color.concat(this.valpha);return s.to.rgb.percent(r)},array:function(){return 1===this.valpha?this.color.slice():this.color.concat(this.valpha)},object:function(){for(var t={},e=b[this.model].channels,r=b[this.model].labels,n=0;n<e;n++)t[r[n]]=this.color[n];return 1!==this.valpha&&(t.alpha=this.valpha),t},unitArray:function(){var t=this.rgb().color;return t[0]/=255,t[1]/=255,t[2]/=255,1!==this.valpha&&t.push(this.valpha),t},unitObject:function(){var t=this.rgb().object();return t.r/=255,t.g/=255,t.b/=255,1!==this.valpha&&(t.alpha=this.valpha),t},round:function(t){return t=Math.max(t||0,0),new m(this.color.map(function(t){return function(e){return function(t,e){return Number(t.toFixed(e))}(e,t)}}(t)).concat(this.valpha),this.model)},alpha:function(t){return arguments.length?new m(this.color.concat(Math.max(0,Math.min(1,t))),this.model):this.valpha},red:w("rgb",0,M(255)),green:w("rgb",1,M(255)),blue:w("rgb",2,M(255)),hue:w(["hsl","hsv","hsl","hwb","hcg"],0,(function(t){return(t%360+360)%360})),saturationl:w("hsl",1,M(100)),lightness:w("hsl",2,M(100)),saturationv:w("hsv",1,M(100)),value:w("hsv",2,M(100)),chroma:w("hcg",1,M(100)),gray:w("hcg",2,M(100)),white:w("hwb",1,M(100)),wblack:w("hwb",2,M(100)),cyan:w("cmyk",0,M(100)),magenta:w("cmyk",1,M(100)),yellow:w("cmyk",2,M(100)),black:w("cmyk",3,M(100)),x:w("xyz",0,M(100)),y:w("xyz",1,M(100)),z:w("xyz",2,M(100)),l:w("lab",0,M(100)),a:w("lab",1),b:w("lab",2),keyword:function(t){return arguments.length?new m(t):b[this.model].keyword(this.color)},hex:function(t){return arguments.length?new m(t):s.to.hex(this.rgb().round().color)},rgbNumber:function(){var t=this.rgb().color;return(255&t[0])<<16|(255&t[1])<<8|255&t[2]},luminosity:function(){for(var t=this.rgb().color,e=[],r=0;r<t.length;r++){var n=t[r]/255;e[r]=n<=.03928?n/12.92:Math.pow((n+.055)/1.055,2.4)}return.2126*e[0]+.7152*e[1]+.0722*e[2]},contrast:function(t){var e=this.luminosity(),r=t.luminosity();return e>r?(e+.05)/(r+.05):(r+.05)/(e+.05)},level:function(t){var e=this.contrast(t);return e>=7.1?"AAA":e>=4.5?"AA":""},isDark:function(){var t=this.rgb().color;return(299*t[0]+587*t[1]+114*t[2])/1e3<128},isLight:function(){return!this.isDark()},negate:function(){for(var t=this.rgb(),e=0;e<3;e++)t.color[e]=255-t.color[e];return t},lighten:function(t){var e=this.hsl();return e.color[2]+=e.color[2]*t,e},darken:function(t){var e=this.hsl();return e.color[2]-=e.color[2]*t,e},saturate:function(t){var e=this.hsl();return e.color[1]+=e.color[1]*t,e},desaturate:function(t){var e=this.hsl();return e.color[1]-=e.color[1]*t,e},whiten:function(t){var e=this.hwb();return e.color[1]+=e.color[1]*t,e},blacken:function(t){var e=this.hwb();return e.color[2]+=e.color[2]*t,e},grayscale:function(){var t=this.rgb().color,e=.3*t[0]+.59*t[1]+.11*t[2];return m.rgb(e,e,e)},fade:function(t){return this.alpha(this.valpha-this.valpha*t)},opaquer:function(t){return this.alpha(this.valpha+this.valpha*t)},rotate:function(t){var e=this.hsl(),r=e.color[0];return e.color[0]=r=(r=(r+t)%360)<0?360+r:r,e},mix:function(t,e){if(!t||!t.rgb)throw new Error('Argument to "mix" was not a Color instance, but rather an instance of '+typeof t);var r=t.rgb(),n=this.rgb(),a=void 0===e?.5:e,i=2*a-1,o=r.alpha()-n.alpha(),u=((i*o==-1?i:(i+o)/(1+i*o))+1)/2,s=1-u;return m.rgb(u*r.red()+s*n.red(),u*r.green()+s*n.green(),u*r.blue()+s*n.blue(),r.alpha()*a+n.alpha()*(1-a))}},Object.keys(b).forEach((function(t){if(-1===g.indexOf(t)){var e=b[t].channels;m.prototype[t]=function(){if(this.model===t)return new m(this);if(arguments.length)return new m(arguments,t);var r="number"==typeof arguments[e]?e:this.valpha;return new m(k(b[this.model][t].raw(this.color)).concat(r),t)},m[t]=function(r){return"number"==typeof r&&(r=x(v.call(arguments),e)),new m(r,t)}}}));var O=m,j=function(t,e,r){return t*(1-r)+e*r};const C={name:"color",test:t=>"string"==typeof t&&(t.indexOf("rgb")>=0||t.indexOf("#")>=0||t.indexOf("hsl")>=0||s.get.rgb(t)),initialize:(t,e)=>({data:{format:(t.indexOf("rgba")>=0?"rgba":t.indexOf("rgb")>=0&&"rgb")||t.indexOf("#")>=0&&"hex"||O(t).model},startValue:O(t).rgb(),destValue:O(e).rgb()}),interpolate(t,e,r,n){const a=j(t.color[0],e.color[0],r),i=j(t.color[1],e.color[1],r),o=j(t.color[2],e.color[2],r),u=j(t.valpha,e.valpha,r),s=O.rgb(a,i,o,u)["rgba"===n.format?"rgb":n.format]();return"string"==typeof s?s:s.string()}},z=[{id:1,height:400,width:100,x:10,y:10,drop:20},{id:2,height:356,width:100,x:120,y:32,drop:20},{id:3,height:312,width:100,x:230,y:54,drop:20},{id:4,height:268,width:100,x:340,y:76,drop:20},{id:5,height:224,width:100,x:450,y:98,drop:20}],q=z.map((()=>0)),I="#ffffff",A={bada55:"#bada55",navy:"#001f3f",blue:"#0074d9",aqua:"#7fdbff",teal:"#39cccc",olive:"#3d9970",green:"#2ecc40",lime:"#01ff70",yellow:"#ffdc00",orange:"#ff851b",red:"#ff4136",maroon:"#85144b",fuchsia:"#f012be",purple:"#b10dc9",black:"#111111",gray:"#aaaaaa",silver:"#dddddd"},$=t=>A[t],L=Object.keys(A),S=t=>!("isConnected"in t)||t.isConnected,F=(()=>{let t;return(...e)=>{t&&clearTimeout(t),t=setTimeout((()=>{t=0,(t=>{for(let e of t.keys())t.set(e,t.get(e).filter(S))})(...e)}),2e3)}})(),_=(()=>{const r=((t,e=((t,e)=>t!==e))=>{let r=new Map(Object.entries(null!=t?t:{}));const n={dispose:[],get:[],set:[],reset:[]},a=()=>{r=new Map(Object.entries(null!=t?t:{})),n.reset.forEach((t=>t()))},i=t=>(n.get.forEach((e=>e(t))),r.get(t)),o=(t,a)=>{const i=r.get(t);e(a,i,t)&&(r.set(t,a),n.set.forEach((e=>e(t,a,i))))},u="undefined"==typeof Proxy?{}:new Proxy(t,{get:(t,e)=>i(e),ownKeys:()=>Array.from(r.keys()),getOwnPropertyDescriptor:()=>({enumerable:!0,configurable:!0}),has:(t,e)=>r.has(e),set:(t,e,r)=>(o(e,r),!0)}),s=(t,e)=>(n[t].push(e),()=>{((t,e)=>{const r=t.indexOf(e);r>=0&&(t[r]=t[t.length-1],t.length--)})(n[t],e)});return{state:u,get:i,set:o,on:s,onChange:(e,r)=>{const n=s("set",((t,n)=>{t===e&&r(n)})),a=s("reset",(()=>r(t[e])));return()=>{n(),a()}},use:(...t)=>t.forEach((t=>{t.set&&s("set",t.set),t.get&&s("get",t.get),t.reset&&s("reset",t.reset)})),dispose:()=>{n.dispose.forEach((t=>t())),a()},reset:a,forceUpdate:t=>{const e=r.get(t);n.set.forEach((r=>r(t,e,e)))}}})({count:0,pick:"bada55",values:[...q]},void 0);return(({on:r})=>{const n=new Map;"function"==typeof t&&(r("dispose",(()=>{n.clear()})),r("get",(e=>{const r=t();r&&((t,e,r)=>{const n=t.get(e);n?n.includes(r)||n.push(r):t.set(e,[r])})(n,e,r)})),r("set",(t=>{const r=n.get(t);r&&n.set(t,r.filter(e)),F(n)})),r("reset",(()=>{n.forEach((t=>t.forEach(e))),F(n)})))})(r),r})(),{state:D}=_,E=class{constructor(t){n(this,t),this.tag="color-picker"}render(){const{pick:t}=_.state;return r("div",{id:"toolbar"},L.map((e=>{const n=$(e);return r("div",{"aria-label":e,title:e,onClick:()=>{(t=>{D.pick=t})(e)}},(({hex:t=I,selected:e=!1,size:n=24})=>r("svg",{width:n,height:n,viewBox:"0 0 24 24"},r("g",{fill:t},r("path",e?{d:"M12 7c-2.76 0-5 2.24-5 5s2.24 5 5 5 5-2.24 5-5-2.24-5-5-5zm0-5C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"}:{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"})),r("path",{d:"M0 0h24v24H0z",fill:"none"})))({hex:n,selected:t==e}))})))}};E.style="#toolbar{display:flex;flex-direction:row;flex-wrap:wrap}";const N=class{constructor(t){n(this,t),this.tag="data-source"}render(){const{count:t}=_.state;return r("div",{id:"toolbar"},r("button",{"aria-label":"Refresh",title:"Refresh",class:"bg-blue",onClick:()=>{(()=>{const t=q.map((()=>Math.floor(100*Math.random())));D.count=D.count+1,D.values=t})()}},(({hex:t=I,size:e=24})=>r("svg",{width:e,height:e,viewBox:"0 0 24 24"},r("g",{fill:t},r("path",{d:"M17.65 6.35C16.2 4.9 14.21 4 12 4c-4.42 0-7.99 3.58-7.99 8s3.57 8 7.99 8c3.73 0 6.84-2.55 7.73-6h-2.08c-.82 2.33-3.04 4-5.65 4-3.31 0-6-2.69-6-6s2.69-6 6-6c1.66 0 3.14.69 4.22 1.78L13 11h7V4l-2.35 2.35z"})),r("path",{d:"M0 0h24v24H0z",fill:"none"})))({})),r("button",{"aria-label":"Reset",title:"Reset",class:"bg-red",onClick:()=>{D.count=0,D.values=[...q]}},(({hex:t=I,size:e=24})=>r("svg",{width:e,height:e,viewBox:"0 0 24 24"},r("g",{fill:t},r("path",{d:"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"})),r("path",{d:"M0 0h24v24H0z",fill:"none"})))({})),r("span",{class:"info"},(({hex:t="#001f3f",size:e=24})=>r("svg",{width:e,height:e,viewBox:"0 0 24 24"},r("g",{fill:t},r("path",{d:"M18.41,7.41L17,6L11,12L17,18L18.41,16.59L13.83,12L18.41,7.41M12.41,7.41L11,6L5,12L11,18L12.41,16.59L7.83,12L12.41,7.41Z"})),r("path",{d:"M0 0h24v24H0z",fill:"none"})))({size:28}),r("span",{class:"help"},"click a button... ",r("sup",null,t))))}};N.style="#toolbar{display:flex;flex-direction:row;align-items:center;margin-top:10px;margin-bottom:10px}button{display:flex;align-content:center;border-radius:5px;border:1px solid #ccc;padding:5px;margin:0px;margin-right:5px;cursor:pointer}button:active{background-color:var(--clrs-gray)}.bg-blue{background:var(--clrs-blue)}.bg-red{background:var(--clrs-red)}.info{color:var(--clrs-navy);fill:var(--clrs-navy);display:flex;flex-direction:row;align-items:center}.help{font-style:italic}";const R=class{constructor(t){n(this,t),this.tag="data-values"}render(){const{values:t,pick:e,count:n}=_.state;return r("div",{class:"info"},r("div",{class:"row"},r("span",{class:"label"},"color:"),r("span",{class:"value"},e)),r("div",{class:"row sample"},r("span",{class:"label"},"sample:"),r("span",{class:"value"},`${n>0?t:"..."}`)))}};R.style=".info{display:flex;flex-direction:column}.row{display:flex;flex-direction:row;align-items:center}.sample{margin-top:5px}.label{color:var(--clrs-navy);font-weight:bold;margin-right:10px}.value{color:var(--clrs-slate4);font-style:italic}";const T=class{constructor(t){n(this,t)}render(){return r("a",{href:"https://eswat2.dev","aria-label":"eswat2",title:"eswat2"},(({hex:t=I,size:e=24})=>r("svg",{width:e,height:e,viewBox:"0 0 24 24"},r("g",{fill:t},r("path",{d:"M8.35,3C9.53,2.83 10.78,4.12 11.14,5.9C11.5,7.67 10.85,9.25\n 9.67,9.43C8.5,9.61 7.24,8.32 6.87,6.54C6.5,4.77 7.17,3.19\n 8.35,3M15.5,3C16.69,3.19 17.35,4.77 17,6.54C16.62,8.32 15.37,9.61\n 14.19,9.43C13,9.25 12.35,7.67 12.72,5.9C13.08,4.12 14.33,2.83\n 15.5,3M3,7.6C4.14,7.11 5.69,8 6.5,9.55C7.26,11.13 7,12.79\n 5.87,13.28C4.74,13.77 3.2,12.89 2.41,11.32C1.62,9.75 1.9,8.08\n 3,7.6M21,7.6C22.1,8.08 22.38,9.75 21.59,11.32C20.8,12.89 19.26,13.77\n 18.13,13.28C17,12.79 16.74,11.13 17.5,9.55C18.31,8 19.86,7.11\n 21,7.6M19.33,18.38C19.37,19.32 18.65,20.36 17.79,20.75C16,21.57\n 13.88,19.87 11.89,19.87C9.9,19.87 7.76,21.64 6,20.75C5,20.26 4.31,18.96\n 4.44,17.88C4.62,16.39 6.41,15.59 7.47,14.5C8.88,13.09 9.88,10.44\n 11.89,10.44C13.89,10.44 14.95,13.05 16.3,14.5C17.41,15.72 19.26,16.75\n 19.33,18.38Z"})),r("path",{d:"M0 0h24v24H0z",fill:"none"})))({hex:"#aaaaaa"}))}};T.style="a{position:absolute;top:32px;right:32px}:hover{fill:var(--clrs-navy)}";const B=class{constructor(t){n(this,t),this.tag="funnel-app"}render(){return r("div",{id:"app"},r("eswat2-io",null),r("funnel-gfx",null),r("data-source",null),r("color-picker",null),r("hr",null),r("data-values",null))}};B.style="#app{--clrs-navy:#001f3f;--clrs-blue:#0074d9;--clrs-aqua:#7fdbff;--clrs-teal:#39cccc;--clrs-olive:#3d9970;--clrs-green:#2ecc40;--clrs-lime:#01ff70;--clrs-yellow:#ffdc00;--clrs-orange:#ff851b;--clrs-red:#ff4136;--clrs-maroon:#85144b;--clrs-fuchsia:#f012be;--clrs-purple:#b10dc9;--clrs-black:#111111;--clrs-gray:#aaaaaa;--clrs-silver:#dddddd;--clrs-bada55:#bada55;--clrs-slate:#708090;--clrs-slate4:#4e5964;--clrs-white:#ffffff;display:flex;flex-direction:column;padding:1em;color:var(--clrs-navy);font-family:'Roboto', Helvetica, sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}hr{margin-left:0;margin-right:0}";var U=i((function(t){t.exports=function(){function t(e){return(t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(e)}function e(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function r(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}function n(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function i(t){return(i=Object.getPrototypeOf||function(t){return t.__proto__})(t)}function o(t,e){return(o=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function u(t,e,r){return(u="undefined"!=typeof Reflect&&Reflect.construct?Reflect.construct:function(t,e,r){var n=[null];n.push.apply(n,e);var a=new(t.bind.apply(t,n));return r&&o(a,r.prototype),a}).apply(null,arguments)}function s(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}var l=function(t,e,r){return t*(1-r)+e*r},c="undefined"!=typeof window?window:void 0!==a?a:"undefined"!=typeof self?self:{};function h(t,e){return t(e={exports:{}},e.exports),e.exports}for(var f=h((function(t){var e=t.exports={Linear:{None:function(t){return t}},Quadratic:{In:function(t){return t*t},Out:function(t){return t*(2-t)},InOut:function(t){return(t*=2)<1?.5*t*t:-.5*(--t*(t-2)-1)}},Cubic:{In:function(t){return t*t*t},Out:function(t){return--t*t*t+1},InOut:function(t){return(t*=2)<1?.5*t*t*t:.5*((t-=2)*t*t+2)}},Quartic:{In:function(t){return t*t*t*t},Out:function(t){return 1- --t*t*t*t},InOut:function(t){return(t*=2)<1?.5*t*t*t*t:-.5*((t-=2)*t*t*t-2)}},Quintic:{In:function(t){return t*t*t*t*t},Out:function(t){return--t*t*t*t*t+1},InOut:function(t){return(t*=2)<1?.5*t*t*t*t*t:.5*((t-=2)*t*t*t*t+2)}},Sinusoidal:{In:function(t){return 1-Math.cos(t*Math.PI/2)},Out:function(t){return Math.sin(t*Math.PI/2)},InOut:function(t){return.5*(1-Math.cos(Math.PI*t))}},Exponential:{In:function(t){return 0===t?0:Math.pow(1024,t-1)},Out:function(t){return 1===t?1:1-Math.pow(2,-10*t)},InOut:function(t){return 0===t?0:1===t?1:(t*=2)<1?.5*Math.pow(1024,t-1):.5*(2-Math.pow(2,-10*(t-1)))}},Circular:{In:function(t){return 1-Math.sqrt(1-t*t)},Out:function(t){return Math.sqrt(1- --t*t)},InOut:function(t){return(t*=2)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1)}},Elastic:{In:function(t){var e,r=.1;return 0===t?0:1===t?1:(!r||r<1?(r=1,e=.1):e=.4*Math.asin(1/r)/(2*Math.PI),-r*Math.pow(2,10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/.4))},Out:function(t){var e,r=.1;return 0===t?0:1===t?1:(!r||r<1?(r=1,e=.1):e=.4*Math.asin(1/r)/(2*Math.PI),r*Math.pow(2,-10*t)*Math.sin((t-e)*(2*Math.PI)/.4)+1)},InOut:function(t){var e,r=.1;return 0===t?0:1===t?1:(!r||r<1?(r=1,e=.1):e=.4*Math.asin(1/r)/(2*Math.PI),(t*=2)<1?r*Math.pow(2,10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/.4)*-.5:r*Math.pow(2,-10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/.4)*.5+1)}},Back:{In:function(t){return t*t*(2.70158*t-1.70158)},Out:function(t){return--t*t*(2.70158*t+1.70158)+1},InOut:function(t){var e=2.5949095;return(t*=2)<1?t*t*((e+1)*t-e)*.5:.5*((t-=2)*t*((e+1)*t+e)+2)}},Bounce:{In:function(t){return 1-e.Bounce.Out(1-t)},Out:function(t){return t<1/2.75?7.5625*t*t:t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375},InOut:function(t){return t<.5?.5*e.Bounce.In(2*t):.5*e.Bounce.Out(2*t-1)+.5}}}})),d=h((function(t){(function(){var e,r,n,a,i,o;"undefined"!=typeof performance&&null!==performance&&performance.now?t.exports=function(){return performance.now()}:"undefined"!=typeof process&&null!==process&&process.hrtime?(t.exports=function(){return(e()-i)/1e6},r=process.hrtime,a=(e=function(){var t;return 1e9*(t=r())[0]+t[1]})(),o=1e9*process.uptime(),i=a-o):Date.now?(t.exports=function(){return Date.now()-n},n=Date.now()):(t.exports=function(){return(new Date).getTime()-n},n=(new Date).getTime())}).call(c)})),b="undefined"==typeof window?c:window,v=["moz","webkit"],g="AnimationFrame",p=b["request"+g],y=b["cancel"+g]||b["cancelRequest"+g],m=0;!p&&m<v.length;m++)p=b[v[m]+"Request"+g],y=b[v[m]+"Cancel"+g]||b[v[m]+"CancelRequest"+g];if(!p||!y){var w=0,M=0,k=[];p=function(t){if(0===k.length){var e=d(),r=Math.max(0,1e3/60-(e-w));w=r+e,setTimeout((function(){for(var t=k.slice(0),e=k.length=0;e<t.length;e++)if(!t[e].cancelled)try{t[e].callback(w)}catch(t){setTimeout((function(){throw t}),0)}}),Math.round(r))}return k.push({handle:++M,callback:t,cancelled:!1}),M},y=function(t){for(var e=0;e<k.length;e++)k[e].handle===t&&(k[e].cancelled=!0)}}var x=function(t){return p.call(b,t)};x.cancel=function(){y.apply(b,arguments)},x.polyfill=function(t){t||(t=b),t.requestAnimationFrame=p,t.cancelAnimationFrame=y};var O,j,C=[],z=Symbol("type"),q=Symbol("start_time"),I=Symbol("completed"),A=Symbol("paused"),$=requestAnimationFrame||x,L=Date.now();!function t(){$(t),O=Date.now(),j=O-L;for(var e=0;e<C.length;e++)C[e][I]||C[e](j,Date.now()-C[e][q]);L=O}();var S=function(e){function a(e,r){var o,u,c;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,a),c=i(a).call(this),n(s(s(u=!c||"object"!=typeof c&&"function"!=typeof c?s(this):c)),"update",(function(){var t=s(s(u))._updateValue;return function(e,r){u[I]||u[A]||(0===u.localTime&&u.emit("start",u.value,s(s(u))),t(u.ease(u.loopFunction.progress(Math.min(1,(r||u.localTime)/u.duration)))),u.emit("update",u.value,s(s(u)),e),u.localTime>=u.duration&&u.loopFunction.complete((function(){u[I]=!0,u.emit("complete",u.value,s(s(u)))})),u.localTime+=e)}}));var h=u.plugin=Object.values(a._plugins).reduce((function(t,r){return t||r&&r.test&&r.test(e)&&r}),!1),f=h&&h.name||("object"===t(e)?Array.isArray(e)?"array":"object":"number");if(h){var d=h.initialize(e,r);e=d.startValue,r=d.destValue,u.data=d.data}switch(Object.assign(s(s(u)),(n(o={duration:1e3,localTime:0,startValue:e,destValue:r,loopMode:"once",loopFunction:a.DEFAULT_LOOP,ease:function(t){return t},value:"array"===f?[].concat(e):"object"===f?Object.assign({},e):e},I,!1),n(o,z,f),n(o,q,Date.now()),n(o,A,!1),o)),u[z]){case"number":u._updateValue=function(t){u.value=l(u.startValue,u.destValue,t)};break;case"array":var b=u.value.length,v=s(s(u)),g=v.startValue,p=v.destValue,y=v.value;u._updateValue=function(t){for(var e=0;e<b;e++)y[e]=l(g[e],p[e],t)};break;case"object":var m=Object.keys(u.startValue),w=m.length,M=s(s(u)),k=M.startValue,x=M.destValue,O=M.value;u._updateValue=function(t){for(var e=0;e<w;e++){var r=m[e];O[r]=l(k[r],x[r],t)}};break;default:u.plugin?u._updateValue=function(t){u.value=u.plugin.interpolate(u.startValue,u.destValue,t,u.data)}:(console.warn("Between: startValue type was unrecognized."),u._updateValue=function(){return null})}return C.push(u.update()),u}return r(a,null,[{key:"between",value:function(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];return u(a,e)}}]),r(a,[{key:"pause",value:function(){return this[A]=!0,this.emit("pause",this.value,this,j),this}},{key:"play",value:function(){return this[A]=!1,this.emit("play",this.value,this,j),this}},{key:"easing",value:function(t){return this.ease=t,this}},{key:"time",value:function(t){return this.duration=t,this}},{key:"loop",value:function(){for(var t="__loop_".concat(0<arguments.length&&void 0!==arguments[0]?arguments[0]:"once"),e=arguments.length,r=new Array(1<e?e-1:0),n=1;n<e;n++)r[n-1]=arguments[n];return this.loopFunction=t in this?Object.assign({},a.DEFAULT_LOOP,this[t].apply(this,r)):a.DEFAULT_LOOP,this}},{key:"__loop_repeat",value:function(t){var e=this,r=t;return this.times=0,{complete:function(t){e.localTime=0,Number.isInteger(r)&&++e.times===r?t():Number.isInteger(r)||++e.times}}}},{key:"__loop_bounce",value:function(t){var e=this,r=t,n=1;return this.times=0,{complete:function(t){e.localTime=0,n=-n,Number.isInteger(r)&&++e.times===r?t():Number.isInteger(r)||++e.times},progress:function(t){return 0<n?t:1-t}}}},{key:"isPaused",get:function(){return this[A]}}]),function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");o(t.prototype,e&&e.prototype),e&&o(t,e)}(a,e),a}((function(t){var e={},r=[];(t=t||this).on=function(r,n,a){return(e[r]=e[r]||[]).push([n,a]),t},t.off=function(n,a){n||(e={});for(var i=e[n]||r,o=i.length=a?i.length:0;o--;)a==i[o][0]&&i.splice(o,1);return t},t.emit=function(n){for(var a,i=e[n]||r,o=0<i.length?i.slice(0,i.length):i,u=0;a=o[u++];)a[0].apply(a[1],r.slice.call(arguments,1));return t}}));return n(S,"DEFAULT_LOOP",{complete:function(t){return t()},progress:function(t){return t}}),S.Easing=f,S._plugins={},S}()}));U._plugins.color=C;const H=class{constructor(t){n(this,t),this.stroke="#001f3f",this.tag="funnel-gfx",this.processColor=t=>{if(!this.barRefs)return;const e=this.lastHex,r=$(t);null!==e&&e!==r&&(this.tween&&this.tween.pause(),this.tween=new U(e,r).time(1e3).easing(U.Easing.Cubic.InOut).on("update",(t=>{this.barRefs.forEach((e=>{e.setAttribute("fill",`${t}`)})),this.lastHex=t})))},this.processValues=t=>{this.barRefs&&this.barRefs.forEach(((e,r)=>{const n=this.barHeight[r],a=this.lastVal[r],i=t[r];null!==a&&a!==i&&(this.tween2[r]&&this.tween2[r].pause(),this.tween2[r]=new U(a,i).time(1e3).easing(U.Easing.Cubic.InOut).on("update",(t=>{e.setAttribute("y",""+n*((100-t)/100)),this.lastVal[r]=t})))}))},this.bgdFill=I,this.xFill=$("bada55"),this.barHeight=void 0,this.barRefs=void 0,this.lastHex="#bada55",this.tween=void 0,this.lastVal=[0,0,0,0,0],this.tween2=[void 0,void 0,void 0,void 0,void 0],this.createFunnel=({id:t,height:e,width:r,x:n,y:a,drop:i})=>({id:t,height:e,width:r,x:n,y:a,maskId:`mask-${t}`,maskUri:`url('#mask-${t}')`,mask:`0.5,0.5,0.5,${e-.5},${r-.5},${e-i-.5},${r-.5},${i+.5}`,matrix:`matrix(1,0,0,1,${n},${a})`,points:`0,0,0,${e},${r},${e-i},${r},${i}`}),this.generateBars=()=>z.map((t=>this.createFunnel(t)))}componentDidLoad(){_.onChange("pick",this.processColor),_.onChange("values",this.processValues)}render(){const t=this.generateBars(),{bgdFill:e,xFill:n,stroke:a}=this;return this.barHeight=Array(t.length),this.barRefs=Array(t.length),r("div",{class:"funnel"},r("svg",{viewBox:"0 0 600 420"},r("desc",null,"Created with Snap"),r("defs",null,t.map((t=>r("mask",{id:t.maskId},r("polygon",{points:t.mask,fill:e}))))),t.map(((t,i)=>{const{height:o,width:u,maskUri:s,matrix:l,points:c}=t;return this.barHeight[i]=o,r("g",{transform:l},r("polygon",{points:c,fill:e,stroke:a}),r("rect",{ref:t=>this.barRefs[i]=t,x:"0",y:o,width:u,height:o,mask:s,fill:n,stroke:a}))}))))}};H.style=".funnel{width:calc(100% - 20px);height:100%;padding:10px;background-color:var(--clrs-silver);border-radius:10px;border:1px solid var(--clrs-gray)}";export{E as color_picker,N as data_source,R as data_values,T as eswat2_io,B as funnel_app,H as funnel_gfx}
|
|
File without changes
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "funnel-gfx-wc",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.166",
|
|
4
4
|
"description": "Stencil Component Starter",
|
|
5
5
|
"main": "dist/index.cjs.js",
|
|
6
6
|
"module": "dist/index.js",
|
|
@@ -27,20 +27,20 @@
|
|
|
27
27
|
"format": "prettier --write src"
|
|
28
28
|
},
|
|
29
29
|
"dependencies": {
|
|
30
|
-
"@stencil/core": "2.8.
|
|
30
|
+
"@stencil/core": "2.8.1",
|
|
31
31
|
"@stencil/store": "1.4.1",
|
|
32
32
|
"between.js": "0.1.2-fix.2"
|
|
33
33
|
},
|
|
34
34
|
"devDependencies": {
|
|
35
35
|
"@types/jest": "27.0.1",
|
|
36
36
|
"@types/puppeteer": "5.4.4",
|
|
37
|
-
"cspell": "5.9.
|
|
37
|
+
"cspell": "5.9.1",
|
|
38
38
|
"eslint": "7.32.0",
|
|
39
39
|
"jest": "26.6.3",
|
|
40
|
-
"prettier": "2.4.
|
|
40
|
+
"prettier": "2.4.1",
|
|
41
41
|
"puppeteer": "10.2.0",
|
|
42
42
|
"tslint": "6.1.3",
|
|
43
|
-
"typescript": "4.4.
|
|
43
|
+
"typescript": "4.4.3"
|
|
44
44
|
},
|
|
45
45
|
"license": "MIT"
|
|
46
46
|
}
|