UNPKG

@wix/design-system

Version:

@wix/design-system

6 lines 3.03 MB
(function(Cv,Ep){typeof exports=="object"&&typeof module=="object"?module.exports=Ep(require("React"),require("ReactDOM")):typeof define=="function"&&define.amd?define(["React","ReactDOM"],Ep):typeof exports=="object"?exports.WixDesignSystem=Ep(require("React"),require("ReactDOM")):Cv.WixDesignSystem=Ep(Cv.React,Cv.ReactDOM)})(typeof self<"u"?self:this,(l5,Cv)=>(()=>{var Ep={34859(F,U,c){"use strict";U.__esModule=!0;var S=c(4883),i=M(S),y=c(39067),p=M(y),v=c(24590),m=M(v),b=c(64674),D=M(b);function M(j){return j&&j.__esModule?j:{default:j}}function O(j,K){if(!(j instanceof K))throw new TypeError("Cannot call a class as a function")}function z(j,K){if(!j)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return K&&(typeof K=="object"||typeof K=="function")?K:j}function B(j,K){if(typeof K!="function"&&K!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof K);j.prototype=Object.create(K&&K.prototype,{constructor:{value:j,enumerable:!1,writable:!0,configurable:!0}}),K&&(Object.setPrototypeOf?Object.setPrototypeOf(j,K):j.__proto__=K)}var k=1073741823;function T(j,K){return j===K?j!==0||1/j===1/K:j!==j&&K!==K}function P(j){var K=[];return{on:function(le){K.push(le)},off:function(le){K=K.filter(function(xe){return xe!==le})},get:function(){return j},set:function(le,xe){j=le,K.forEach(function(De){return De(j,xe)})}}}function Y(j){return Array.isArray(j)?j[0]:j}function W(j,K){var ne,le,xe="__create-react-context-"+(0,m.default)()+"__",De=(function(me){B(he,me);function he(){var oe,ce,be;O(this,he);for(var Fe=arguments.length,We=Array(Fe),Oe=0;Oe<Fe;Oe++)We[Oe]=arguments[Oe];return be=(oe=(ce=z(this,me.call.apply(me,[this].concat(We))),ce),ce.emitter=P(ce.props.value),oe),z(ce,be)}return he.prototype.getChildContext=function(){var ce;return ce={},ce[xe]=this.emitter,ce},he.prototype.componentWillReceiveProps=function(ce){if(this.props.value!==ce.value){var be=this.props.value,Fe=ce.value,We=void 0;T(be,Fe)?We=0:(We=typeof K=="function"?K(be,Fe):k,We|=0,We!==0&&this.emitter.set(ce.value,We))}},he.prototype.render=function(){return this.props.children},he})(S.Component);De.childContextTypes=(ne={},ne[xe]=p.default.object.isRequired,ne);var Ee=(function(me){B(he,me);function he(){var oe,ce,be;O(this,he);for(var Fe=arguments.length,We=Array(Fe),Oe=0;Oe<Fe;Oe++)We[Oe]=arguments[Oe];return be=(oe=(ce=z(this,me.call.apply(me,[this].concat(We))),ce),ce.state={value:ce.getValue()},ce.onUpdate=function(rt,lt){var ct=ce.observedBits|0;(ct&lt)!==0&&ce.setState({value:ce.getValue()})},oe),z(ce,be)}return he.prototype.componentWillReceiveProps=function(ce){var be=ce.observedBits;this.observedBits=be??k},he.prototype.componentDidMount=function(){this.context[xe]&&this.context[xe].on(this.onUpdate);var ce=this.props.observedBits;this.observedBits=ce??k},he.prototype.componentWillUnmount=function(){this.context[xe]&&this.context[xe].off(this.onUpdate)},he.prototype.getValue=function(){return this.context[xe]?this.context[xe].get():j},he.prototype.render=function(){return Y(this.props.children)(this.state.value)},he})(S.Component);return Ee.contextTypes=(le={},le[xe]=p.default.object,le),{Provider:De,Consumer:Ee}}U.default=W,F.exports=U.default},43205(F,U,c){"use strict";U.__esModule=!0;var S=c(4883),i=v(S),y=c(34859),p=v(y);function v(m){return m&&m.__esModule?m:{default:m}}U.default=i.default.createContext||p.default,F.exports=U.default},71035(F,U,c){"use strict";c.d(U,{V:()=>S});function S(i,y){for(var p=arguments.length,v=new Array(p>2?p-2:0),m=2;m<p;m++)v[m-2]=arguments[m];if(!i){var b;if(y===void 0)b=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var D=0;b=new Error(y.replace(/%s/g,function(){return v[D++]})),b.name="Invariant Violation"}throw b.framesToPop=1,b}}},29471(F,U,c){"use strict";c.d(U,{b:()=>S});function S(i,y,p,v){var m=p?p.call(v,i,y):void 0;if(m!==void 0)return!!m;if(i===y)return!0;if(typeof i!="object"||!i||typeof y!="object"||!y)return!1;var b=Object.keys(i),D=Object.keys(y);if(b.length!==D.length)return!1;for(var M=Object.prototype.hasOwnProperty.bind(y),O=0;O<b.length;O++){var z=b[O];if(!M(z))return!1;var B=i[z],k=y[z];if(m=p?p.call(v,B,k,z):void 0,m===!1||m===void 0&&B!==k)return!1}return!0}},1361(F){"use strict";const U=async function(){}.constructor;F.exports=()=>U},17233(F){"use strict";const U=async function*(){}.constructor;F.exports=()=>U},68165(F,U,c){"use strict";var S=c(79138),i=c(6095),y=c(64531),p=c(87196);F.exports=p||S.call(y,i)},62012(F,U,c){"use strict";var S=c(79138),i=c(6095),y=c(68165);F.exports=function(){return y(S,i,arguments)}},6095(F){"use strict";F.exports=Function.prototype.apply},64531(F){"use strict";F.exports=Function.prototype.call},79903(F,U,c){"use strict";var S=c(79138),i=c(3468),y=c(64531),p=c(68165);F.exports=function(m){if(m.length<1||typeof m[0]!="function")throw new i("a function is required");return p(S,y,m)}},87196(F){"use strict";F.exports=typeof Reflect<"u"&&Reflect&&Reflect.apply},79818(F,U,c){"use strict";var S=c(528),i=c(28498),y=i(S("String.prototype.indexOf"));F.exports=function(v,m){var b=S(v,!!m);return typeof b=="function"&&y(v,".prototype.")>-1?i(b):b}},28498(F,U,c){"use strict";var S=c(26108),i=c(64940),y=c(79903),p=c(62012);F.exports=function(m){var b=y(arguments),D=m.length-(arguments.length-1);return S(b,1+(D>0?D:0),!0)},i?i(F.exports,"apply",{value:p}):F.exports.apply=p},14607(F,U,c){"use strict";var S=c(528),i=c(79903),y=i([S("%String.prototype.indexOf%")]);F.exports=function(v,m){var b=S(v,!!m);return typeof b=="function"&&y(v,".prototype.")>-1?i([b]):b}},59556(F,U,c){/*! * Chart.js v2.9.4 * https://www.chartjs.org * (c) 2020 Chart.js Contributors * Released under the MIT License */(function(S,i){F.exports=i((function(){try{return c(99420)}catch{}})())})(this,(function(S){"use strict";S=S&&S.hasOwnProperty("default")?S.default:S;function i(u,h){return h={exports:{}},u(h,h.exports),h.exports}function y(u){return u&&u.default||u}var p={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]},v=i(function(u){var h={};for(var C in p)p.hasOwnProperty(C)&&(h[p[C]]=C);var E=u.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 R in E)if(E.hasOwnProperty(R)){if(!("channels"in E[R]))throw new Error("missing channels property: "+R);if(!("labels"in E[R]))throw new Error("missing channel labels property: "+R);if(E[R].labels.length!==E[R].channels)throw new Error("channel and label counts mismatch: "+R);var $=E[R].channels,X=E[R].labels;delete E[R].channels,delete E[R].labels,Object.defineProperty(E[R],"channels",{value:$}),Object.defineProperty(E[R],"labels",{value:X})}E.rgb.hsl=function(q){var fe=q[0]/255,ye=q[1]/255,Ce=q[2]/255,Ke=Math.min(fe,ye,Ce),ft=Math.max(fe,ye,Ce),pt=ft-Ke,wt,Nt,dr;return ft===Ke?wt=0:fe===ft?wt=(ye-Ce)/pt:ye===ft?wt=2+(Ce-fe)/pt:Ce===ft&&(wt=4+(fe-ye)/pt),wt=Math.min(wt*60,360),wt<0&&(wt+=360),dr=(Ke+ft)/2,ft===Ke?Nt=0:dr<=.5?Nt=pt/(ft+Ke):Nt=pt/(2-ft-Ke),[wt,Nt*100,dr*100]},E.rgb.hsv=function(q){var fe,ye,Ce,Ke,ft,pt=q[0]/255,wt=q[1]/255,Nt=q[2]/255,dr=Math.max(pt,wt,Nt),zr=dr-Math.min(pt,wt,Nt),jr=function(gn){return(dr-gn)/6/zr+1/2};return zr===0?Ke=ft=0:(ft=zr/dr,fe=jr(pt),ye=jr(wt),Ce=jr(Nt),pt===dr?Ke=Ce-ye:wt===dr?Ke=1/3+fe-Ce:Nt===dr&&(Ke=2/3+ye-fe),Ke<0?Ke+=1:Ke>1&&(Ke-=1)),[Ke*360,ft*100,dr*100]},E.rgb.hwb=function(q){var fe=q[0],ye=q[1],Ce=q[2],Ke=E.rgb.hsl(q)[0],ft=1/255*Math.min(fe,Math.min(ye,Ce));return Ce=1-1/255*Math.max(fe,Math.max(ye,Ce)),[Ke,ft*100,Ce*100]},E.rgb.cmyk=function(q){var fe=q[0]/255,ye=q[1]/255,Ce=q[2]/255,Ke,ft,pt,wt;return wt=Math.min(1-fe,1-ye,1-Ce),Ke=(1-fe-wt)/(1-wt)||0,ft=(1-ye-wt)/(1-wt)||0,pt=(1-Ce-wt)/(1-wt)||0,[Ke*100,ft*100,pt*100,wt*100]};function ae(q,fe){return Math.pow(q[0]-fe[0],2)+Math.pow(q[1]-fe[1],2)+Math.pow(q[2]-fe[2],2)}E.rgb.keyword=function(q){var fe=h[q];if(fe)return fe;var ye=1/0,Ce;for(var Ke in p)if(p.hasOwnProperty(Ke)){var ft=p[Ke],pt=ae(q,ft);pt<ye&&(ye=pt,Ce=Ke)}return Ce},E.keyword.rgb=function(q){return p[q]},E.rgb.xyz=function(q){var fe=q[0]/255,ye=q[1]/255,Ce=q[2]/255;fe=fe>.04045?Math.pow((fe+.055)/1.055,2.4):fe/12.92,ye=ye>.04045?Math.pow((ye+.055)/1.055,2.4):ye/12.92,Ce=Ce>.04045?Math.pow((Ce+.055)/1.055,2.4):Ce/12.92;var Ke=fe*.4124+ye*.3576+Ce*.1805,ft=fe*.2126+ye*.7152+Ce*.0722,pt=fe*.0193+ye*.1192+Ce*.9505;return[Ke*100,ft*100,pt*100]},E.rgb.lab=function(q){var fe=E.rgb.xyz(q),ye=fe[0],Ce=fe[1],Ke=fe[2],ft,pt,wt;return ye/=95.047,Ce/=100,Ke/=108.883,ye=ye>.008856?Math.pow(ye,1/3):7.787*ye+16/116,Ce=Ce>.008856?Math.pow(Ce,1/3):7.787*Ce+16/116,Ke=Ke>.008856?Math.pow(Ke,1/3):7.787*Ke+16/116,ft=116*Ce-16,pt=500*(ye-Ce),wt=200*(Ce-Ke),[ft,pt,wt]},E.hsl.rgb=function(q){var fe=q[0]/360,ye=q[1]/100,Ce=q[2]/100,Ke,ft,pt,wt,Nt;if(ye===0)return Nt=Ce*255,[Nt,Nt,Nt];Ce<.5?ft=Ce*(1+ye):ft=Ce+ye-Ce*ye,Ke=2*Ce-ft,wt=[0,0,0];for(var dr=0;dr<3;dr++)pt=fe+1/3*-(dr-1),pt<0&&pt++,pt>1&&pt--,6*pt<1?Nt=Ke+(ft-Ke)*6*pt:2*pt<1?Nt=ft:3*pt<2?Nt=Ke+(ft-Ke)*(2/3-pt)*6:Nt=Ke,wt[dr]=Nt*255;return wt},E.hsl.hsv=function(q){var fe=q[0],ye=q[1]/100,Ce=q[2]/100,Ke=ye,ft=Math.max(Ce,.01),pt,wt;return Ce*=2,ye*=Ce<=1?Ce:2-Ce,Ke*=ft<=1?ft:2-ft,wt=(Ce+ye)/2,pt=Ce===0?2*Ke/(ft+Ke):2*ye/(Ce+ye),[fe,pt*100,wt*100]},E.hsv.rgb=function(q){var fe=q[0]/60,ye=q[1]/100,Ce=q[2]/100,Ke=Math.floor(fe)%6,ft=fe-Math.floor(fe),pt=255*Ce*(1-ye),wt=255*Ce*(1-ye*ft),Nt=255*Ce*(1-ye*(1-ft));switch(Ce*=255,Ke){case 0:return[Ce,Nt,pt];case 1:return[wt,Ce,pt];case 2:return[pt,Ce,Nt];case 3:return[pt,wt,Ce];case 4:return[Nt,pt,Ce];case 5:return[Ce,pt,wt]}},E.hsv.hsl=function(q){var fe=q[0],ye=q[1]/100,Ce=q[2]/100,Ke=Math.max(Ce,.01),ft,pt,wt;return wt=(2-ye)*Ce,ft=(2-ye)*Ke,pt=ye*Ke,pt/=ft<=1?ft:2-ft,pt=pt||0,wt/=2,[fe,pt*100,wt*100]},E.hwb.rgb=function(q){var fe=q[0]/360,ye=q[1]/100,Ce=q[2]/100,Ke=ye+Ce,ft,pt,wt,Nt;Ke>1&&(ye/=Ke,Ce/=Ke),ft=Math.floor(6*fe),pt=1-Ce,wt=6*fe-ft,(ft&1)!==0&&(wt=1-wt),Nt=ye+wt*(pt-ye);var dr,zr,jr;switch(ft){default:case 6:case 0:dr=pt,zr=Nt,jr=ye;break;case 1:dr=Nt,zr=pt,jr=ye;break;case 2:dr=ye,zr=pt,jr=Nt;break;case 3:dr=ye,zr=Nt,jr=pt;break;case 4:dr=Nt,zr=ye,jr=pt;break;case 5:dr=pt,zr=ye,jr=Nt;break}return[dr*255,zr*255,jr*255]},E.cmyk.rgb=function(q){var fe=q[0]/100,ye=q[1]/100,Ce=q[2]/100,Ke=q[3]/100,ft,pt,wt;return ft=1-Math.min(1,fe*(1-Ke)+Ke),pt=1-Math.min(1,ye*(1-Ke)+Ke),wt=1-Math.min(1,Ce*(1-Ke)+Ke),[ft*255,pt*255,wt*255]},E.xyz.rgb=function(q){var fe=q[0]/100,ye=q[1]/100,Ce=q[2]/100,Ke,ft,pt;return Ke=fe*3.2406+ye*-1.5372+Ce*-.4986,ft=fe*-.9689+ye*1.8758+Ce*.0415,pt=fe*.0557+ye*-.204+Ce*1.057,Ke=Ke>.0031308?1.055*Math.pow(Ke,1/2.4)-.055:Ke*12.92,ft=ft>.0031308?1.055*Math.pow(ft,1/2.4)-.055:ft*12.92,pt=pt>.0031308?1.055*Math.pow(pt,1/2.4)-.055:pt*12.92,Ke=Math.min(Math.max(0,Ke),1),ft=Math.min(Math.max(0,ft),1),pt=Math.min(Math.max(0,pt),1),[Ke*255,ft*255,pt*255]},E.xyz.lab=function(q){var fe=q[0],ye=q[1],Ce=q[2],Ke,ft,pt;return fe/=95.047,ye/=100,Ce/=108.883,fe=fe>.008856?Math.pow(fe,1/3):7.787*fe+16/116,ye=ye>.008856?Math.pow(ye,1/3):7.787*ye+16/116,Ce=Ce>.008856?Math.pow(Ce,1/3):7.787*Ce+16/116,Ke=116*ye-16,ft=500*(fe-ye),pt=200*(ye-Ce),[Ke,ft,pt]},E.lab.xyz=function(q){var fe=q[0],ye=q[1],Ce=q[2],Ke,ft,pt;ft=(fe+16)/116,Ke=ye/500+ft,pt=ft-Ce/200;var wt=Math.pow(ft,3),Nt=Math.pow(Ke,3),dr=Math.pow(pt,3);return ft=wt>.008856?wt:(ft-16/116)/7.787,Ke=Nt>.008856?Nt:(Ke-16/116)/7.787,pt=dr>.008856?dr:(pt-16/116)/7.787,Ke*=95.047,ft*=100,pt*=108.883,[Ke,ft,pt]},E.lab.lch=function(q){var fe=q[0],ye=q[1],Ce=q[2],Ke,ft,pt;return Ke=Math.atan2(Ce,ye),ft=Ke*360/2/Math.PI,ft<0&&(ft+=360),pt=Math.sqrt(ye*ye+Ce*Ce),[fe,pt,ft]},E.lch.lab=function(q){var fe=q[0],ye=q[1],Ce=q[2],Ke,ft,pt;return pt=Ce/360*2*Math.PI,Ke=ye*Math.cos(pt),ft=ye*Math.sin(pt),[fe,Ke,ft]},E.rgb.ansi16=function(q){var fe=q[0],ye=q[1],Ce=q[2],Ke=1 in arguments?arguments[1]:E.rgb.hsv(q)[2];if(Ke=Math.round(Ke/50),Ke===0)return 30;var ft=30+(Math.round(Ce/255)<<2|Math.round(ye/255)<<1|Math.round(fe/255));return Ke===2&&(ft+=60),ft},E.hsv.ansi16=function(q){return E.rgb.ansi16(E.hsv.rgb(q),q[2])},E.rgb.ansi256=function(q){var fe=q[0],ye=q[1],Ce=q[2];if(fe===ye&&ye===Ce)return fe<8?16:fe>248?231:Math.round((fe-8)/247*24)+232;var Ke=16+36*Math.round(fe/255*5)+6*Math.round(ye/255*5)+Math.round(Ce/255*5);return Ke},E.ansi16.rgb=function(q){var fe=q%10;if(fe===0||fe===7)return q>50&&(fe+=3.5),fe=fe/10.5*255,[fe,fe,fe];var ye=(~~(q>50)+1)*.5,Ce=(fe&1)*ye*255,Ke=(fe>>1&1)*ye*255,ft=(fe>>2&1)*ye*255;return[Ce,Ke,ft]},E.ansi256.rgb=function(q){if(q>=232){var fe=(q-232)*10+8;return[fe,fe,fe]}q-=16;var ye,Ce=Math.floor(q/36)/5*255,Ke=Math.floor((ye=q%36)/6)/5*255,ft=ye%6/5*255;return[Ce,Ke,ft]},E.rgb.hex=function(q){var fe=((Math.round(q[0])&255)<<16)+((Math.round(q[1])&255)<<8)+(Math.round(q[2])&255),ye=fe.toString(16).toUpperCase();return"000000".substring(ye.length)+ye},E.hex.rgb=function(q){var fe=q.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!fe)return[0,0,0];var ye=fe[0];fe[0].length===3&&(ye=ye.split("").map(function(wt){return wt+wt}).join(""));var Ce=parseInt(ye,16),Ke=Ce>>16&255,ft=Ce>>8&255,pt=Ce&255;return[Ke,ft,pt]},E.rgb.hcg=function(q){var fe=q[0]/255,ye=q[1]/255,Ce=q[2]/255,Ke=Math.max(Math.max(fe,ye),Ce),ft=Math.min(Math.min(fe,ye),Ce),pt=Ke-ft,wt,Nt;return pt<1?wt=ft/(1-pt):wt=0,pt<=0?Nt=0:Ke===fe?Nt=(ye-Ce)/pt%6:Ke===ye?Nt=2+(Ce-fe)/pt:Nt=4+(fe-ye)/pt+4,Nt/=6,Nt%=1,[Nt*360,pt*100,wt*100]},E.hsl.hcg=function(q){var fe=q[1]/100,ye=q[2]/100,Ce=1,Ke=0;return ye<.5?Ce=2*fe*ye:Ce=2*fe*(1-ye),Ce<1&&(Ke=(ye-.5*Ce)/(1-Ce)),[q[0],Ce*100,Ke*100]},E.hsv.hcg=function(q){var fe=q[1]/100,ye=q[2]/100,Ce=fe*ye,Ke=0;return Ce<1&&(Ke=(ye-Ce)/(1-Ce)),[q[0],Ce*100,Ke*100]},E.hcg.rgb=function(q){var fe=q[0]/360,ye=q[1]/100,Ce=q[2]/100;if(ye===0)return[Ce*255,Ce*255,Ce*255];var Ke=[0,0,0],ft=fe%1*6,pt=ft%1,wt=1-pt,Nt=0;switch(Math.floor(ft)){case 0:Ke[0]=1,Ke[1]=pt,Ke[2]=0;break;case 1:Ke[0]=wt,Ke[1]=1,Ke[2]=0;break;case 2:Ke[0]=0,Ke[1]=1,Ke[2]=pt;break;case 3:Ke[0]=0,Ke[1]=wt,Ke[2]=1;break;case 4:Ke[0]=pt,Ke[1]=0,Ke[2]=1;break;default:Ke[0]=1,Ke[1]=0,Ke[2]=wt}return Nt=(1-ye)*Ce,[(ye*Ke[0]+Nt)*255,(ye*Ke[1]+Nt)*255,(ye*Ke[2]+Nt)*255]},E.hcg.hsv=function(q){var fe=q[1]/100,ye=q[2]/100,Ce=fe+ye*(1-fe),Ke=0;return Ce>0&&(Ke=fe/Ce),[q[0],Ke*100,Ce*100]},E.hcg.hsl=function(q){var fe=q[1]/100,ye=q[2]/100,Ce=ye*(1-fe)+.5*fe,Ke=0;return Ce>0&&Ce<.5?Ke=fe/(2*Ce):Ce>=.5&&Ce<1&&(Ke=fe/(2*(1-Ce))),[q[0],Ke*100,Ce*100]},E.hcg.hwb=function(q){var fe=q[1]/100,ye=q[2]/100,Ce=fe+ye*(1-fe);return[q[0],(Ce-fe)*100,(1-Ce)*100]},E.hwb.hcg=function(q){var fe=q[1]/100,ye=q[2]/100,Ce=1-ye,Ke=Ce-fe,ft=0;return Ke<1&&(ft=(Ce-Ke)/(1-Ke)),[q[0],Ke*100,ft*100]},E.apple.rgb=function(q){return[q[0]/65535*255,q[1]/65535*255,q[2]/65535*255]},E.rgb.apple=function(q){return[q[0]/255*65535,q[1]/255*65535,q[2]/255*65535]},E.gray.rgb=function(q){return[q[0]/100*255,q[0]/100*255,q[0]/100*255]},E.gray.hsl=E.gray.hsv=function(q){return[0,0,q[0]]},E.gray.hwb=function(q){return[0,100,q[0]]},E.gray.cmyk=function(q){return[0,0,0,q[0]]},E.gray.lab=function(q){return[q[0],0,0]},E.gray.hex=function(q){var fe=Math.round(q[0]/100*255)&255,ye=(fe<<16)+(fe<<8)+fe,Ce=ye.toString(16).toUpperCase();return"000000".substring(Ce.length)+Ce},E.rgb.gray=function(q){var fe=(q[0]+q[1]+q[2])/3;return[fe/255*100]}}),m=v.rgb,b=v.hsl,D=v.hsv,M=v.hwb,O=v.cmyk,z=v.xyz,B=v.lab,k=v.lch,T=v.hex,P=v.keyword,Y=v.ansi16,W=v.ansi256,j=v.hcg,K=v.apple,ne=v.gray;function le(){for(var u={},h=Object.keys(v),C=h.length,E=0;E<C;E++)u[h[E]]={distance:-1,parent:null};return u}function xe(u){var h=le(),C=[u];for(h[u].distance=0;C.length;)for(var E=C.pop(),R=Object.keys(v[E]),$=R.length,X=0;X<$;X++){var ae=R[X],q=h[ae];q.distance===-1&&(q.distance=h[E].distance+1,q.parent=E,C.unshift(ae))}return h}function De(u,h){return function(C){return h(u(C))}}function Ee(u,h){for(var C=[h[u].parent,u],E=v[h[u].parent][u],R=h[u].parent;h[R].parent;)C.unshift(h[R].parent),E=De(v[h[R].parent][R],E),R=h[R].parent;return E.conversion=C,E}var me=function(u){for(var h=xe(u),C={},E=Object.keys(h),R=E.length,$=0;$<R;$++){var X=E[$],ae=h[X];ae.parent!==null&&(C[X]=Ee(X,h))}return C},he={},oe=Object.keys(v);function ce(u){var h=function(C){return C==null?C:(arguments.length>1&&(C=Array.prototype.slice.call(arguments)),u(C))};return"conversion"in u&&(h.conversion=u.conversion),h}function be(u){var h=function(C){if(C==null)return C;arguments.length>1&&(C=Array.prototype.slice.call(arguments));var E=u(C);if(typeof E=="object")for(var R=E.length,$=0;$<R;$++)E[$]=Math.round(E[$]);return E};return"conversion"in u&&(h.conversion=u.conversion),h}oe.forEach(function(u){he[u]={},Object.defineProperty(he[u],"channels",{value:v[u].channels}),Object.defineProperty(he[u],"labels",{value:v[u].labels});var h=me(u),C=Object.keys(h);C.forEach(function(E){var R=h[E];he[u][E]=be(R),he[u][E].raw=ce(R)})});var Fe=he,We={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]},Oe={getRgba:rt,getHsla:lt,getRgb:ht,getHsl:Qe,getHwb:ct,getAlpha:Ae,hexString:Pe,rgbString:Ve,rgbaString:bt,percentString:xt,percentaString:Wt,hslString:Zt,hslaString:gr,hwbString:Xt,keyword:Yt};function rt(u){if(u){var h=/^#([a-fA-F0-9]{3,4})$/i,C=/^#([a-fA-F0-9]{6}([a-fA-F0-9]{2})?)$/i,E=/^rgba?\(\s*([+-]?\d+)\s*,\s*([+-]?\d+)\s*,\s*([+-]?\d+)\s*(?:,\s*([+-]?[\d\.]+)\s*)?\)$/i,R=/^rgba?\(\s*([+-]?[\d\.]+)\%\s*,\s*([+-]?[\d\.]+)\%\s*,\s*([+-]?[\d\.]+)\%\s*(?:,\s*([+-]?[\d\.]+)\s*)?\)$/i,$=/(\w+)/,X=[0,0,0],ae=1,q=u.match(h),fe="";if(q){q=q[1],fe=q[3];for(var ye=0;ye<X.length;ye++)X[ye]=parseInt(q[ye]+q[ye],16);fe&&(ae=Math.round(parseInt(fe+fe,16)/255*100)/100)}else if(q=u.match(C)){fe=q[2],q=q[1];for(var ye=0;ye<X.length;ye++)X[ye]=parseInt(q.slice(ye*2,ye*2+2),16);fe&&(ae=Math.round(parseInt(fe,16)/255*100)/100)}else if(q=u.match(E)){for(var ye=0;ye<X.length;ye++)X[ye]=parseInt(q[ye+1]);ae=parseFloat(q[4])}else if(q=u.match(R)){for(var ye=0;ye<X.length;ye++)X[ye]=Math.round(parseFloat(q[ye+1])*2.55);ae=parseFloat(q[4])}else if(q=u.match($)){if(q[1]=="transparent")return[0,0,0,0];if(X=We[q[1]],!X)return}for(var ye=0;ye<X.length;ye++)X[ye]=Ft(X[ye],0,255);return!ae&&ae!=0?ae=1:ae=Ft(ae,0,1),X[3]=ae,X}}function lt(u){if(u){var h=/^hsla?\(\s*([+-]?\d+)(?:deg)?\s*,\s*([+-]?[\d\.]+)%\s*,\s*([+-]?[\d\.]+)%\s*(?:,\s*([+-]?[\d\.]+)\s*)?\)/,C=u.match(h);if(C){var E=parseFloat(C[4]),R=Ft(parseInt(C[1]),0,360),$=Ft(parseFloat(C[2]),0,100),X=Ft(parseFloat(C[3]),0,100),ae=Ft(isNaN(E)?1:E,0,1);return[R,$,X,ae]}}}function ct(u){if(u){var h=/^hwb\(\s*([+-]?\d+)(?:deg)?\s*,\s*([+-]?[\d\.]+)%\s*,\s*([+-]?[\d\.]+)%\s*(?:,\s*([+-]?[\d\.]+)\s*)?\)/,C=u.match(h);if(C){var E=parseFloat(C[4]),R=Ft(parseInt(C[1]),0,360),$=Ft(parseFloat(C[2]),0,100),X=Ft(parseFloat(C[3]),0,100),ae=Ft(isNaN(E)?1:E,0,1);return[R,$,X,ae]}}}function ht(u){var h=rt(u);return h&&h.slice(0,3)}function Qe(u){var h=lt(u);return h&&h.slice(0,3)}function Ae(u){var h=rt(u);if(h)return h[3];if(h=lt(u))return h[3];if(h=ct(u))return h[3]}function Pe(u,C){var C=C!==void 0&&u.length===3?C:u[3];return"#"+Kt(u[0])+Kt(u[1])+Kt(u[2])+(C>=0&&C<1?Kt(Math.round(C*255)):"")}function Ve(u,h){return h<1||u[3]&&u[3]<1?bt(u,h):"rgb("+u[0]+", "+u[1]+", "+u[2]+")"}function bt(u,h){return h===void 0&&(h=u[3]!==void 0?u[3]:1),"rgba("+u[0]+", "+u[1]+", "+u[2]+", "+h+")"}function xt(u,h){if(h<1||u[3]&&u[3]<1)return Wt(u,h);var C=Math.round(u[0]/255*100),E=Math.round(u[1]/255*100),R=Math.round(u[2]/255*100);return"rgb("+C+"%, "+E+"%, "+R+"%)"}function Wt(u,h){var C=Math.round(u[0]/255*100),E=Math.round(u[1]/255*100),R=Math.round(u[2]/255*100);return"rgba("+C+"%, "+E+"%, "+R+"%, "+(h||u[3]||1)+")"}function Zt(u,h){return h<1||u[3]&&u[3]<1?gr(u,h):"hsl("+u[0]+", "+u[1]+"%, "+u[2]+"%)"}function gr(u,h){return h===void 0&&(h=u[3]!==void 0?u[3]:1),"hsla("+u[0]+", "+u[1]+"%, "+u[2]+"%, "+h+")"}function Xt(u,h){return h===void 0&&(h=u[3]!==void 0?u[3]:1),"hwb("+u[0]+", "+u[1]+"%, "+u[2]+"%"+(h!==void 0&&h!==1?", "+h:"")+")"}function Yt(u){return Ut[u.slice(0,3)]}function Ft(u,h,C){return Math.min(Math.max(h,u),C)}function Kt(u){var h=u.toString(16).toUpperCase();return h.length<2?"0"+h:h}var Ut={};for(var Qt in We)Ut[We[Qt]]=Qt;var jt=function(u){if(u instanceof jt)return u;if(!(this instanceof jt))return new jt(u);this.valid=!1,this.values={rgb:[0,0,0],hsl:[0,0,0],hsv:[0,0,0],hwb:[0,0,0],cmyk:[0,0,0,0],alpha:1};var h;typeof u=="string"?(h=Oe.getRgba(u),h?this.setValues("rgb",h):(h=Oe.getHsla(u))?this.setValues("hsl",h):(h=Oe.getHwb(u))&&this.setValues("hwb",h)):typeof u=="object"&&(h=u,h.r!==void 0||h.red!==void 0?this.setValues("rgb",h):h.l!==void 0||h.lightness!==void 0?this.setValues("hsl",h):h.v!==void 0||h.value!==void 0?this.setValues("hsv",h):h.w!==void 0||h.whiteness!==void 0?this.setValues("hwb",h):(h.c!==void 0||h.cyan!==void 0)&&this.setValues("cmyk",h))};jt.prototype={isValid:function(){return this.valid},rgb:function(){return this.setSpace("rgb",arguments)},hsl:function(){return this.setSpace("hsl",arguments)},hsv:function(){return this.setSpace("hsv",arguments)},hwb:function(){return this.setSpace("hwb",arguments)},cmyk:function(){return this.setSpace("cmyk",arguments)},rgbArray:function(){return this.values.rgb},hslArray:function(){return this.values.hsl},hsvArray:function(){return this.values.hsv},hwbArray:function(){var u=this.values;return u.alpha!==1?u.hwb.concat([u.alpha]):u.hwb},cmykArray:function(){return this.values.cmyk},rgbaArray:function(){var u=this.values;return u.rgb.concat([u.alpha])},hslaArray:function(){var u=this.values;return u.hsl.concat([u.alpha])},alpha:function(u){return u===void 0?this.values.alpha:(this.setValues("alpha",u),this)},red:function(u){return this.setChannel("rgb",0,u)},green:function(u){return this.setChannel("rgb",1,u)},blue:function(u){return this.setChannel("rgb",2,u)},hue:function(u){return u&&(u%=360,u=u<0?360+u:u),this.setChannel("hsl",0,u)},saturation:function(u){return this.setChannel("hsl",1,u)},lightness:function(u){return this.setChannel("hsl",2,u)},saturationv:function(u){return this.setChannel("hsv",1,u)},whiteness:function(u){return this.setChannel("hwb",1,u)},blackness:function(u){return this.setChannel("hwb",2,u)},value:function(u){return this.setChannel("hsv",2,u)},cyan:function(u){return this.setChannel("cmyk",0,u)},magenta:function(u){return this.setChannel("cmyk",1,u)},yellow:function(u){return this.setChannel("cmyk",2,u)},black:function(u){return this.setChannel("cmyk",3,u)},hexString:function(){return Oe.hexString(this.values.rgb)},rgbString:function(){return Oe.rgbString(this.values.rgb,this.values.alpha)},rgbaString:function(){return Oe.rgbaString(this.values.rgb,this.values.alpha)},percentString:function(){return Oe.percentString(this.values.rgb,this.values.alpha)},hslString:function(){return Oe.hslString(this.values.hsl,this.values.alpha)},hslaString:function(){return Oe.hslaString(this.values.hsl,this.values.alpha)},hwbString:function(){return Oe.hwbString(this.values.hwb,this.values.alpha)},keyword:function(){return Oe.keyword(this.values.rgb,this.values.alpha)},rgbNumber:function(){var u=this.values.rgb;return u[0]<<16|u[1]<<8|u[2]},luminosity:function(){for(var u=this.values.rgb,h=[],C=0;C<u.length;C++){var E=u[C]/255;h[C]=E<=.03928?E/12.92:Math.pow((E+.055)/1.055,2.4)}return .2126*h[0]+.7152*h[1]+.0722*h[2]},contrast:function(u){var h=this.luminosity(),C=u.luminosity();return h>C?(h+.05)/(C+.05):(C+.05)/(h+.05)},level:function(u){var h=this.contrast(u);return h>=7.1?"AAA":h>=4.5?"AA":""},dark:function(){var u=this.values.rgb,h=(u[0]*299+u[1]*587+u[2]*114)/1e3;return h<128},light:function(){return!this.dark()},negate:function(){for(var u=[],h=0;h<3;h++)u[h]=255-this.values.rgb[h];return this.setValues("rgb",u),this},lighten:function(u){var h=this.values.hsl;return h[2]+=h[2]*u,this.setValues("hsl",h),this},darken:function(u){var h=this.values.hsl;return h[2]-=h[2]*u,this.setValues("hsl",h),this},saturate:function(u){var h=this.values.hsl;return h[1]+=h[1]*u,this.setValues("hsl",h),this},desaturate:function(u){var h=this.values.hsl;return h[1]-=h[1]*u,this.setValues("hsl",h),this},whiten:function(u){var h=this.values.hwb;return h[1]+=h[1]*u,this.setValues("hwb",h),this},blacken:function(u){var h=this.values.hwb;return h[2]+=h[2]*u,this.setValues("hwb",h),this},greyscale:function(){var u=this.values.rgb,h=u[0]*.3+u[1]*.59+u[2]*.11;return this.setValues("rgb",[h,h,h]),this},clearer:function(u){var h=this.values.alpha;return this.setValues("alpha",h-h*u),this},opaquer:function(u){var h=this.values.alpha;return this.setValues("alpha",h+h*u),this},rotate:function(u){var h=this.values.hsl,C=(h[0]+u)%360;return h[0]=C<0?360+C:C,this.setValues("hsl",h),this},mix:function(u,h){var C=this,E=u,R=h===void 0?.5:h,$=2*R-1,X=C.alpha()-E.alpha(),ae=(($*X===-1?$:($+X)/(1+$*X))+1)/2,q=1-ae;return this.rgb(ae*C.red()+q*E.red(),ae*C.green()+q*E.green(),ae*C.blue()+q*E.blue()).alpha(C.alpha()*R+E.alpha()*(1-R))},toJSON:function(){return this.rgb()},clone:function(){var u=new jt,h=this.values,C=u.values,E,R;for(var $ in h)h.hasOwnProperty($)&&(E=h[$],R={}.toString.call(E),R==="[object Array]"?C[$]=E.slice(0):R==="[object Number]"?C[$]=E:console.error("unexpected color value:",E));return u}},jt.prototype.spaces={rgb:["red","green","blue"],hsl:["hue","saturation","lightness"],hsv:["hue","saturation","value"],hwb:["hue","whiteness","blackness"],cmyk:["cyan","magenta","yellow","black"]},jt.prototype.maxes={rgb:[255,255,255],hsl:[360,100,100],hsv:[360,100,100],hwb:[360,100,100],cmyk:[100,100,100,100]},jt.prototype.getValues=function(u){for(var h=this.values,C={},E=0;E<u.length;E++)C[u.charAt(E)]=h[u][E];return h.alpha!==1&&(C.a=h.alpha),C},jt.prototype.setValues=function(u,h){var C=this.values,E=this.spaces,R=this.maxes,$=1,X;if(this.valid=!0,u==="alpha")$=h;else if(h.length)C[u]=h.slice(0,u.length),$=h[u.length];else if(h[u.charAt(0)]!==void 0){for(X=0;X<u.length;X++)C[u][X]=h[u.charAt(X)];$=h.a}else if(h[E[u][0]]!==void 0){var ae=E[u];for(X=0;X<u.length;X++)C[u][X]=h[ae[X]];$=h.alpha}if(C.alpha=Math.max(0,Math.min(1,$===void 0?C.alpha:$)),u==="alpha")return!1;var q;for(X=0;X<u.length;X++)q=Math.max(0,Math.min(R[u][X],C[u][X])),C[u][X]=Math.round(q);for(var fe in E)fe!==u&&(C[fe]=Fe[u][fe](C[u]));return!0},jt.prototype.setSpace=function(u,h){var C=h[0];return C===void 0?this.getValues(u):(typeof C=="number"&&(C=Array.prototype.slice.call(h)),this.setValues(u,C),this)},jt.prototype.setChannel=function(u,h,C){var E=this.values[u];return C===void 0?E[h]:C===E[h]?this:(E[h]=C,this.setValues(u,E),this)},typeof window<"u"&&(window.Color=jt);var pr=jt;function cr(u){return["__proto__","prototype","constructor"].indexOf(u)===-1}var Cr={noop:function(){},uid:(function(){var u=0;return function(){return u++}})(),isNullOrUndef:function(u){return u===null||typeof u>"u"},isArray:function(u){if(Array.isArray&&Array.isArray(u))return!0;var h=Object.prototype.toString.call(u);return h.substr(0,7)==="[object"&&h.substr(-6)==="Array]"},isObject:function(u){return u!==null&&Object.prototype.toString.call(u)==="[object Object]"},isFinite:function(u){return(typeof u=="number"||u instanceof Number)&&isFinite(u)},valueOrDefault:function(u,h){return typeof u>"u"?h:u},valueAtIndexOrDefault:function(u,h,C){return Cr.valueOrDefault(Cr.isArray(u)?u[h]:u,C)},callback:function(u,h,C){if(u&&typeof u.call=="function")return u.apply(C,h)},each:function(u,h,C,E){var R,$,X;if(Cr.isArray(u))if($=u.length,E)for(R=$-1;R>=0;R--)h.call(C,u[R],R);else for(R=0;R<$;R++)h.call(C,u[R],R);else if(Cr.isObject(u))for(X=Object.keys(u),$=X.length,R=0;R<$;R++)h.call(C,u[X[R]],X[R])},arrayEquals:function(u,h){var C,E,R,$;if(!u||!h||u.length!==h.length)return!1;for(C=0,E=u.length;C<E;++C)if(R=u[C],$=h[C],R instanceof Array&&$ instanceof Array){if(!Cr.arrayEquals(R,$))return!1}else if(R!==$)return!1;return!0},clone:function(u){if(Cr.isArray(u))return u.map(Cr.clone);if(Cr.isObject(u)){for(var h=Object.create(u),C=Object.keys(u),E=C.length,R=0;R<E;++R)h[C[R]]=Cr.clone(u[C[R]]);return h}return u},_merger:function(u,h,C,E){if(cr(u)){var R=h[u],$=C[u];Cr.isObject(R)&&Cr.isObject($)?Cr.merge(R,$,E):h[u]=Cr.clone($)}},_mergerIf:function(u,h,C){if(cr(u)){var E=h[u],R=C[u];Cr.isObject(E)&&Cr.isObject(R)?Cr.mergeIf(E,R):h.hasOwnProperty(u)||(h[u]=Cr.clone(R))}},merge:function(u,h,C){var E=Cr.isArray(h)?h:[h],R=E.length,$,X,ae,q,fe;if(!Cr.isObject(u))return u;for(C=C||{},$=C.merger||Cr._merger,X=0;X<R;++X)if(h=E[X],!!Cr.isObject(h))for(ae=Object.keys(h),fe=0,q=ae.length;fe<q;++fe)$(ae[fe],u,h,C);return u},mergeIf:function(u,h){return Cr.merge(u,h,{merger:Cr._mergerIf})},extend:Object.assign||function(u){return Cr.merge(u,[].slice.call(arguments,1),{merger:function(h,C,E){C[h]=E[h]}})},inherits:function(u){var h=this,C=u&&u.hasOwnProperty("constructor")?u.constructor:function(){return h.apply(this,arguments)},E=function(){this.constructor=C};return E.prototype=h.prototype,C.prototype=new E,C.extend=Cr.inherits,u&&Cr.extend(C.prototype,u),C.__super__=h.prototype,C},_deprecated:function(u,h,C,E){h!==void 0&&console.warn(u+': "'+C+'" is deprecated. Please use "'+E+'" instead')}},Rr=Cr;Cr.callCallback=Cr.callback,Cr.indexOf=function(u,h,C){return Array.prototype.indexOf.call(u,h,C)},Cr.getValueOrDefault=Cr.valueOrDefault,Cr.getValueAtIndexOrDefault=Cr.valueAtIndexOrDefault;var qr={linear:function(u){return u},easeInQuad:function(u){return u*u},easeOutQuad:function(u){return-u*(u-2)},easeInOutQuad:function(u){return(u/=.5)<1?.5*u*u:-.5*(--u*(u-2)-1)},easeInCubic:function(u){return u*u*u},easeOutCubic:function(u){return(u=u-1)*u*u+1},easeInOutCubic:function(u){return(u/=.5)<1?.5*u*u*u:.5*((u-=2)*u*u+2)},easeInQuart:function(u){return u*u*u*u},easeOutQuart:function(u){return-((u=u-1)*u*u*u-1)},easeInOutQuart:function(u){return(u/=.5)<1?.5*u*u*u*u:-.5*((u-=2)*u*u*u-2)},easeInQuint:function(u){return u*u*u*u*u},easeOutQuint:function(u){return(u=u-1)*u*u*u*u+1},easeInOutQuint:function(u){return(u/=.5)<1?.5*u*u*u*u*u:.5*((u-=2)*u*u*u*u+2)},easeInSine:function(u){return-Math.cos(u*(Math.PI/2))+1},easeOutSine:function(u){return Math.sin(u*(Math.PI/2))},easeInOutSine:function(u){return-.5*(Math.cos(Math.PI*u)-1)},easeInExpo:function(u){return u===0?0:Math.pow(2,10*(u-1))},easeOutExpo:function(u){return u===1?1:-Math.pow(2,-10*u)+1},easeInOutExpo:function(u){return u===0?0:u===1?1:(u/=.5)<1?.5*Math.pow(2,10*(u-1)):.5*(-Math.pow(2,-10*--u)+2)},easeInCirc:function(u){return u>=1?u:-(Math.sqrt(1-u*u)-1)},easeOutCirc:function(u){return Math.sqrt(1-(u=u-1)*u)},easeInOutCirc:function(u){return(u/=.5)<1?-.5*(Math.sqrt(1-u*u)-1):.5*(Math.sqrt(1-(u-=2)*u)+1)},easeInElastic:function(u){var h=1.70158,C=0,E=1;return u===0?0:u===1?1:(C||(C=.3),E<1?(E=1,h=C/4):h=C/(2*Math.PI)*Math.asin(1/E),-(E*Math.pow(2,10*(u-=1))*Math.sin((u-h)*(2*Math.PI)/C)))},easeOutElastic:function(u){var h=1.70158,C=0,E=1;return u===0?0:u===1?1:(C||(C=.3),E<1?(E=1,h=C/4):h=C/(2*Math.PI)*Math.asin(1/E),E*Math.pow(2,-10*u)*Math.sin((u-h)*(2*Math.PI)/C)+1)},easeInOutElastic:function(u){var h=1.70158,C=0,E=1;return u===0?0:(u/=.5)===2?1:(C||(C=.45),E<1?(E=1,h=C/4):h=C/(2*Math.PI)*Math.asin(1/E),u<1?-.5*(E*Math.pow(2,10*(u-=1))*Math.sin((u-h)*(2*Math.PI)/C)):E*Math.pow(2,-10*(u-=1))*Math.sin((u-h)*(2*Math.PI)/C)*.5+1)},easeInBack:function(u){var h=1.70158;return u*u*((h+1)*u-h)},easeOutBack:function(u){var h=1.70158;return(u=u-1)*u*((h+1)*u+h)+1},easeInOutBack:function(u){var h=1.70158;return(u/=.5)<1?.5*(u*u*(((h*=1.525)+1)*u-h)):.5*((u-=2)*u*(((h*=1.525)+1)*u+h)+2)},easeInBounce:function(u){return 1-qr.easeOutBounce(1-u)},easeOutBounce:function(u){return u<1/2.75?7.5625*u*u:u<2/2.75?7.5625*(u-=1.5/2.75)*u+.75:u<2.5/2.75?7.5625*(u-=2.25/2.75)*u+.9375:7.5625*(u-=2.625/2.75)*u+.984375},easeInOutBounce:function(u){return u<.5?qr.easeInBounce(u*2)*.5:qr.easeOutBounce(u*2-1)*.5+.5}},bn={effects:qr};Rr.easingEffects=qr;var fr=Math.PI,xr=fr/180,Tr=fr*2,Kr=fr/2,Yr=fr/4,Qn=fr*2/3,Dr={clear:function(u){u.ctx.clearRect(0,0,u.width,u.height)},roundedRect:function(u,h,C,E,R,$){if($){var X=Math.min($,R/2,E/2),ae=h+X,q=C+X,fe=h+E-X,ye=C+R-X;u.moveTo(h,q),ae<fe&&q<ye?(u.arc(ae,q,X,-fr,-Kr),u.arc(fe,q,X,-Kr,0),u.arc(fe,ye,X,0,Kr),u.arc(ae,ye,X,Kr,fr)):ae<fe?(u.moveTo(ae,C),u.arc(fe,q,X,-Kr,Kr),u.arc(ae,q,X,Kr,fr+Kr)):q<ye?(u.arc(ae,q,X,-fr,0),u.arc(ae,ye,X,0,fr)):u.arc(ae,q,X,-fr,fr),u.closePath(),u.moveTo(h,C)}else u.rect(h,C,E,R)},drawPoint:function(u,h,C,E,R,$){var X,ae,q,fe,ye,Ce=($||0)*xr;if(h&&typeof h=="object"&&(X=h.toString(),X==="[object HTMLImageElement]"||X==="[object HTMLCanvasElement]")){u.save(),u.translate(E,R),u.rotate(Ce),u.drawImage(h,-h.width/2,-h.height/2,h.width,h.height),u.restore();return}if(!(isNaN(C)||C<=0)){switch(u.beginPath(),h){default:u.arc(E,R,C,0,Tr),u.closePath();break;case"triangle":u.moveTo(E+Math.sin(Ce)*C,R-Math.cos(Ce)*C),Ce+=Qn,u.lineTo(E+Math.sin(Ce)*C,R-Math.cos(Ce)*C),Ce+=Qn,u.lineTo(E+Math.sin(Ce)*C,R-Math.cos(Ce)*C),u.closePath();break;case"rectRounded":ye=C*.516,fe=C-ye,ae=Math.cos(Ce+Yr)*fe,q=Math.sin(Ce+Yr)*fe,u.arc(E-ae,R-q,ye,Ce-fr,Ce-Kr),u.arc(E+q,R-ae,ye,Ce-Kr,Ce),u.arc(E+ae,R+q,ye,Ce,Ce+Kr),u.arc(E-q,R+ae,ye,Ce+Kr,Ce+fr),u.closePath();break;case"rect":if(!$){fe=Math.SQRT1_2*C,u.rect(E-fe,R-fe,2*fe,2*fe);break}Ce+=Yr;case"rectRot":ae=Math.cos(Ce)*C,q=Math.sin(Ce)*C,u.moveTo(E-ae,R-q),u.lineTo(E+q,R-ae),u.lineTo(E+ae,R+q),u.lineTo(E-q,R+ae),u.closePath();break;case"crossRot":Ce+=Yr;case"cross":ae=Math.cos(Ce)*C,q=Math.sin(Ce)*C,u.moveTo(E-ae,R-q),u.lineTo(E+ae,R+q),u.moveTo(E+q,R-ae),u.lineTo(E-q,R+ae);break;case"star":ae=Math.cos(Ce)*C,q=Math.sin(Ce)*C,u.moveTo(E-ae,R-q),u.lineTo(E+ae,R+q),u.moveTo(E+q,R-ae),u.lineTo(E-q,R+ae),Ce+=Yr,ae=Math.cos(Ce)*C,q=Math.sin(Ce)*C,u.moveTo(E-ae,R-q),u.lineTo(E+ae,R+q),u.moveTo(E+q,R-ae),u.lineTo(E-q,R+ae);break;case"line":ae=Math.cos(Ce)*C,q=Math.sin(Ce)*C,u.moveTo(E-ae,R-q),u.lineTo(E+ae,R+q);break;case"dash":u.moveTo(E,R),u.lineTo(E+Math.cos(Ce)*C,R+Math.sin(Ce)*C);break}u.fill(),u.stroke()}},_isPointInArea:function(u,h){var C=1e-6;return u.x>h.left-C&&u.x<h.right+C&&u.y>h.top-C&&u.y<h.bottom+C},clipArea:function(u,h){u.save(),u.beginPath(),u.rect(h.left,h.top,h.right-h.left,h.bottom-h.top),u.clip()},unclipArea:function(u){u.restore()},lineTo:function(u,h,C,E){var R=C.steppedLine;if(R){if(R==="middle"){var $=(h.x+C.x)/2;u.lineTo($,E?C.y:h.y),u.lineTo($,E?h.y:C.y)}else R==="after"&&!E||R!=="after"&&E?u.lineTo(h.x,C.y):u.lineTo(C.x,h.y);u.lineTo(C.x,C.y);return}if(!C.tension){u.lineTo(C.x,C.y);return}u.bezierCurveTo(E?h.controlPointPreviousX:h.controlPointNextX,E?h.controlPointPreviousY:h.controlPointNextY,E?C.controlPointNextX:C.controlPointPreviousX,E?C.controlPointNextY:C.controlPointPreviousY,C.x,C.y)}},Aa=Dr;Rr.clear=Dr.clear,Rr.drawRoundedRectangle=function(u){u.beginPath(),Dr.roundedRect.apply(Dr,arguments)};var _a={_set:function(u,h){return Rr.merge(this[u]||(this[u]={}),h)}};_a._set("global",{defaultColor:"rgba(0,0,0,0.1)",defaultFontColor:"#666",defaultFontFamily:"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",defaultFontSize:12,defaultFontStyle:"normal",defaultLineHeight:1.2,showLines:!0});var rr=_a,pa=Rr.valueOrDefault;function kn(u){return!u||Rr.isNullOrUndef(u.size)||Rr.isNullOrUndef(u.family)?null:(u.style?u.style+" ":"")+(u.weight?u.weight+" ":"")+u.size+"px "+u.family}var Ma={toLineHeight:function(u,h){var C=(""+u).match(/^(normal|(\d+(?:\.\d+)?)(px|em|%)?)$/);if(!C||C[1]==="normal")return h*1.2;switch(u=+C[2],C[3]){case"px":return u;case"%":u/=100;break}return h*u},toPadding:function(u){var h,C,E,R;return Rr.isObject(u)?(h=+u.top||0,C=+u.right||0,E=+u.bottom||0,R=+u.left||0):h=C=E=R=+u||0,{top:h,right:C,bottom:E,left:R,height:h+E,width:R+C}},_parseFont:function(u){var h=rr.global,C=pa(u.fontSize,h.defaultFontSize),E={family:pa(u.fontFamily,h.defaultFontFamily),lineHeight:Rr.options.toLineHeight(pa(u.lineHeight,h.defaultLineHeight),C),size:C,style:pa(u.fontStyle,h.defaultFontStyle),weight:null,string:""};return E.string=kn(E),E},resolve:function(u,h,C,E){var R=!0,$,X,ae;for($=0,X=u.length;$<X;++$)if(ae=u[$],ae!==void 0&&(h!==void 0&&typeof ae=="function"&&(ae=ae(h),R=!1),C!==void 0&&Rr.isArray(ae)&&(ae=ae[C],R=!1),ae!==void 0))return E&&!R&&(E.cacheable=!1),ae}},Fs={_factorize:function(u){var h=[],C=Math.sqrt(u),E;for(E=1;E<C;E++)u%E===0&&(h.push(E),h.push(u/E));return C===(C|0)&&h.push(C),h.sort(function(R,$){return R-$}).pop(),h},log10:Math.log10||function(u){var h=Math.log(u)*Math.LOG10E,C=Math.round(h),E=u===Math.pow(10,C);return E?C:h}},Ta=Fs;Rr.log10=Fs.log10;var io=function(u,h){return{x:function(C){return u+u+h-C},setWidth:function(C){h=C},textAlign:function(C){return C==="center"?C:C==="right"?"left":"right"},xPlus:function(C,E){return C-E},leftForLtr:function(C,E){return C-E}}},ks=function(){return{x:function(u){return u},setWidth:function(u){},textAlign:function(u){return u},xPlus:function(u,h){return u+h},leftForLtr:function(u,h){return u}}},xa=function(u,h,C){return u?io(h,C):ks()},Da=function(u,h){var C,E;(h==="ltr"||h==="rtl")&&(C=u.canvas.style,E=[C.getPropertyValue("direction"),C.getPropertyPriority("direction")],C.setProperty("direction",h,"important"),u.prevTextDirection=E)},Es=function(u){var h=u.prevTextDirection;h!==void 0&&(delete u.prevTextDirection,u.canvas.style.setProperty("direction",h[0],h[1]))},Sn={getRtlAdapter:xa,overrideTextDirection:Da,restoreTextDirection:Es},Se=Rr,ka=bn,lo=Aa,ha=Ma,Oa=Ta,nn=Sn;Se.easing=ka,Se.canvas=lo,Se.options=ha,Se.math=Oa,Se.rtl=nn;function Ms(u,h,C,E){var R=Object.keys(C),$,X,ae,q,fe,ye,Ce,Ke,ft;for($=0,X=R.length;$<X;++$)if(ae=R[$],ye=C[ae],h.hasOwnProperty(ae)||(h[ae]=ye),q=h[ae],!(q===ye||ae[0]==="_")){if(u.hasOwnProperty(ae)||(u[ae]=q),fe=u[ae],Ce=typeof ye,Ce===typeof fe){if(Ce==="string"){if(Ke=pr(fe),Ke.valid&&(ft=pr(ye),ft.valid)){h[ae]=ft.mix(Ke,E).rgbString();continue}}else if(Se.isFinite(fe)&&Se.isFinite(ye)){h[ae]=fe+(ye-fe)*E;continue}}h[ae]=ye}}var xn=function(u){Se.extend(this,u),this.initialize.apply(this,arguments)};Se.extend(xn.prototype,{_type:void 0,initialize:function(){this.hidden=!1},pivot:function(){var u=this;return u._view||(u._view=Se.extend({},u._model)),u._start={},u},transition:function(u){var h=this,C=h._model,E=h._start,R=h._view;return!C||u===1?(h._view=Se.extend({},C),h._start=null,h):(R||(R=h._view={}),E||(E=h._start={}),Ms(E,R,C,u),h)},tooltipPosition:function(){return{x:this._model.x,y:this._model.y}},hasValue:function(){return Se.isNumber(this._model.x)&&Se.isNumber(this._model.y)}}),xn.extend=Se.inherits;var ma=xn,co=ma.extend({chart:null,currentStep:0,numSteps:60,easing:"",render:null,onAnimationProgress:null,onAnimationComplete:null}),Ts=co;Object.defineProperty(co.prototype,"animationObject",{get:function(){return this}}),Object.defineProperty(co.prototype,"chartInstance",{get:function(){return this.chart},set:function(u){this.chart=u}}),rr._set("global",{animation:{duration:1e3,easing:"easeOutQuart",onProgress:Se.noop,onComplete:Se.noop}});var Bn={animations:[],request:null,addAnimation:function(u,h,C,E){var R=this.animations,$,X;for(h.chart=u,h.startTime=Date.now(),h.duration=C,E||(u.animating=!0),$=0,X=R.length;$<X;++$)if(R[$].chart===u){R[$]=h;return}R.push(h),R.length===1&&this.requestAnimationFrame()},cancelAnimation:function(u){var h=Se.findIndex(this.animations,function(C){return C.chart===u});h!==-1&&(this.animations.splice(h,1),u.animating=!1)},requestAnimationFrame:function(){var u=this;u.request===null&&(u.request=Se.requestAnimFrame.call(window,function(){u.request=null,u.startDigest()}))},startDigest:function(){var u=this;u.advance(),u.animations.length>0&&u.requestAnimationFrame()},advance:function(){for(var u=this.animations,h,C,E,R,$=0;$<u.length;)h=u[$],C=h.chart,E=h.numSteps,R=Math.floor((Date.now()-h.startTime)/h.duration*E)+1,h.currentStep=Math.min(R,E),Se.callback(h.render,[C,h],C),Se.callback(h.onAnimationProgress,[h],C),h.currentStep>=E?(Se.callback(h.onAnimationComplete,[h],C),C.animating=!1,u.splice($,1)):++$}},ja=Se.options.resolve,Ka=["push","pop","shift","splice","unshift"];function $n(u,h){if(u._chartjs){u._chartjs.listeners.push(h);return}Object.defineProperty(u,"_chartjs",{configurable:!0,enumerable:!1,value:{listeners:[h]}}),Ka.forEach(function(C){var E="onData"+C.charAt(0).toUpperCase()+C.slice(1),R=u[C];Object.defineProperty(u,C,{configurable:!0,enumerable:!1,value:function(){var $=Array.prototype.slice.call(arguments),X=R.apply(this,$);return Se.each(u._chartjs.listeners,function(ae){typeof ae[E]=="function"&&ae[E].apply(ae,$)}),X}})})}function Na(u,h){var C=u._chartjs;if(C){var E=C.listeners,R=E.indexOf(h);R!==-1&&E.splice(R,1),!(E.length>0)&&(Ka.forEach(function($){delete u[$]}),delete u._chartjs)}}var Pn=function(u,h){this.initialize(u,h)};Se.extend(Pn.prototype,{datasetElementType:null,dataElementType:null,_datasetElementOptions:["backgroundColor","borderCapStyle","borderColor","borderDash","borderDashOffset","borderJoinStyle","borderWidth"],_dataElementOptions:["backgroundColor","borderColor","borderWidth","pointStyle"],initialize:function(u,h){var C=this;C.chart=u,C.index=h,C.linkScales(),C.addElements(),C._type=C.getMeta().type},updateIndex:function(u){this.index=u},linkScales:function(){var u=this,h=u.getMeta(),C=u.chart,E=C.scales,R=u.getDataset(),$=C.options.scales;(h.xAxisID===null||!(h.xAxisID in E)||R.xAxisID)&&(h.xAxisID=R.xAxisID||$.xAxes[0].id),(h.yAxisID===null||!(h.yAxisID in E)||R.yAxisID)&&(h.yAxisID=R.yAxisID||$.yAxes[0].id)},getDataset:function(){return this.chart.data.datasets[this.index]},getMeta:function(){return this.chart.getDatasetMeta(this.index)},getScaleForId:function(u){return this.chart.scales[u]},_getValueScaleId:function(){return this.getMeta().yAxisID},_getIndexScaleId:function(){return this.getMeta().xAxisID},_getValueScale:function(){return this.getScaleForId(this._getValueScaleId())},_getIndexScale:function(){return this.getScaleForId(this._getIndexScaleId())},reset:function(){this._update(!0)},destroy:function(){this._data&&Na(this._data,this)},createMetaDataset:function(){var u=this,h=u.datasetElementType;return h&&new h({_chart:u.chart,_datasetIndex:u.index})},createMetaData:function(u){var h=this,C=h.dataElementType;return C&&new C({_chart:h.chart,_datasetIndex:h.index,_index:u})},addElements:function(){var u=this,h=u.getMeta(),C=u.getDataset().data||[],E=h.data,R,$;for(R=0,$=C.length;R<$;++R)E[R]=E[R]||u.createMetaData(R);h.dataset=h.dataset||u.createMetaDataset()},addElementAndReset:function(u){var h=this.createMetaData(u);this.getMeta().data.splice(u,0,h),this.updateElement(h,u,!0)},buildOrUpdateElements:function(){var u=this,h=u.getDataset(),C=h.data||(h.data=[]);u._data!==C&&(u._data&&Na(u._data,u),C&&Object.isExtensible(C)&&$n(C,u),u._data=C),u.resyncElements()},_configure:function(){var u=this;u._config=Se.merge(Object.create(null),[u.chart.options.datasets[u._type],u.getDataset()],{merger:function(h,C,E){h!=="_meta"&&h!=="data"&&Se._merger(h,C,E)}})},_update:function(u){var h=this;h._config