@tendaui/theme-generator 1.0.0
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/README.md +62 -0
- package/dist/index.cjs.js +269 -0
- package/dist/index.esm.js +6651 -0
- package/package.json +42 -0
|
@@ -0,0 +1,269 @@
|
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});var cc=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function gr(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}var fc={},st,lc;function Cr(){if(lc)return st;lc=1;var r=function(e){return e&&e.Math===Math&&e};return st=r(typeof globalThis=="object"&&globalThis)||r(typeof window=="object"&&window)||r(typeof self=="object"&&self)||r(typeof cc=="object"&&cc)||r(typeof st=="object"&&st)||(function(){return this})()||Function("return this")(),st}var Tn,vc;function pr(){return vc||(vc=1,Tn=function(r){try{return!!r()}catch{return!0}}),Tn}var xn,dc;function Ut(){if(dc)return xn;dc=1;var r=pr();return xn=!r(function(){var e=(function(){}).bind();return typeof e!="function"||e.hasOwnProperty("prototype")}),xn}var Pn,hc;function cp(){if(hc)return Pn;hc=1;var r=Ut(),e=Function.prototype,t=e.apply,n=e.call;return Pn=typeof Reflect=="object"&&Reflect.apply||(r?n.bind(t):function(){return n.apply(t,arguments)}),Pn}var $n,pc;function _r(){if(pc)return $n;pc=1;var r=Ut(),e=Function.prototype,t=e.call,n=r&&e.bind.bind(t,t);return $n=r?n:function(o){return function(){return t.apply(o,arguments)}},$n}var An,yc;function de(){if(yc)return An;yc=1;var r=_r(),e=r({}.toString),t=r("".slice);return An=function(n){return t(e(n),8,-1)},An}var Mn,bc;function fp(){if(bc)return Mn;bc=1;var r=de(),e=_r();return Mn=function(t){if(r(t)==="Function")return e(t)},Mn}var Cn,gc;function xr(){if(gc)return Cn;gc=1;var r=typeof document=="object"&&document.all;return Cn=typeof r>"u"&&r!==void 0?function(e){return typeof e=="function"||e===r}:function(e){return typeof e=="function"},Cn}var Fn={},kn,mc;function Fr(){if(mc)return kn;mc=1;var r=pr();return kn=!r(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!==7}),kn}var Dn,Sc;function Br(){if(Sc)return Dn;Sc=1;var r=Ut(),e=Function.prototype.call;return Dn=r?e.bind(e):function(){return e.apply(e,arguments)},Dn}var jn={},_c;function ds(){if(_c)return jn;_c=1;var r={}.propertyIsEnumerable,e=Object.getOwnPropertyDescriptor,t=e&&!r.call({1:2},1);return jn.f=t?function(o){var s=e(this,o);return!!s&&s.enumerable}:r,jn}var Ln,Rc;function ht(){return Rc||(Rc=1,Ln=function(r,e){return{enumerable:!(r&1),configurable:!(r&2),writable:!(r&4),value:e}}),Ln}var Nn,Ic;function hs(){if(Ic)return Nn;Ic=1;var r=_r(),e=pr(),t=de(),n=Object,o=r("".split);return Nn=e(function(){return!n("z").propertyIsEnumerable(0)})?function(s){return t(s)==="String"?o(s,""):n(s)}:n,Nn}var Bn,qc;function pt(){return qc||(qc=1,Bn=function(r){return r==null}),Bn}var Gn,wc;function yt(){if(wc)return Gn;wc=1;var r=pt(),e=TypeError;return Gn=function(t){if(r(t))throw new e("Can't call method on "+t);return t},Gn}var Kn,Ec;function he(){if(Ec)return Kn;Ec=1;var r=hs(),e=yt();return Kn=function(t){return r(e(t))},Kn}var zn,Oc;function kr(){if(Oc)return zn;Oc=1;var r=xr();return zn=function(e){return typeof e=="object"?e!==null:r(e)},zn}var Wn,Tc;function Qr(){return Tc||(Tc=1,Wn={}),Wn}var Un,xc;function re(){if(xc)return Un;xc=1;var r=Qr(),e=Cr(),t=xr(),n=function(o){return t(o)?o:void 0};return Un=function(o,s){return arguments.length<2?n(r[o])||n(e[o]):r[o]&&r[o][s]||e[o]&&e[o][s]},Un}var Hn,Pc;function zr(){if(Pc)return Hn;Pc=1;var r=_r();return Hn=r({}.isPrototypeOf),Hn}var Vn,$c;function Ht(){if($c)return Vn;$c=1;var r=Cr(),e=r.navigator,t=e&&e.userAgent;return Vn=t?String(t):"",Vn}var Yn,Ac;function Vt(){if(Ac)return Yn;Ac=1;var r=Cr(),e=Ht(),t=r.process,n=r.Deno,o=t&&t.versions||n&&n.version,s=o&&o.v8,u,v;return s&&(u=s.split("."),v=u[0]>0&&u[0]<4?1:+(u[0]+u[1])),!v&&e&&(u=e.match(/Edge\/(\d+)/),(!u||u[1]>=74)&&(u=e.match(/Chrome\/(\d+)/),u&&(v=+u[1]))),Yn=v,Yn}var Jn,Mc;function Ke(){if(Mc)return Jn;Mc=1;var r=Vt(),e=pr(),t=Cr(),n=t.String;return Jn=!!Object.getOwnPropertySymbols&&!e(function(){var o=Symbol("symbol detection");return!n(o)||!(Object(o)instanceof Symbol)||!Symbol.sham&&r&&r<41}),Jn}var Xn,Cc;function lp(){if(Cc)return Xn;Cc=1;var r=Ke();return Xn=r&&!Symbol.sham&&typeof Symbol.iterator=="symbol",Xn}var Zn,Fc;function bt(){if(Fc)return Zn;Fc=1;var r=re(),e=xr(),t=zr(),n=lp(),o=Object;return Zn=n?function(s){return typeof s=="symbol"}:function(s){var u=r("Symbol");return e(u)&&t(u.prototype,o(s))},Zn}var Qn,kc;function ze(){if(kc)return Qn;kc=1;var r=String;return Qn=function(e){try{return r(e)}catch{return"Object"}},Qn}var ra,Dc;function We(){if(Dc)return ra;Dc=1;var r=xr(),e=ze(),t=TypeError;return ra=function(n){if(r(n))return n;throw new t(e(n)+" is not a function")},ra}var ea,jc;function ps(){if(jc)return ea;jc=1;var r=We(),e=pt();return ea=function(t,n){var o=t[n];return e(o)?void 0:r(o)},ea}var ta,Lc;function Eb(){if(Lc)return ta;Lc=1;var r=Br(),e=xr(),t=kr(),n=TypeError;return ta=function(o,s){var u,v;if(s==="string"&&e(u=o.toString)&&!t(v=r(u,o))||e(u=o.valueOf)&&!t(v=r(u,o))||s!=="string"&&e(u=o.toString)&&!t(v=r(u,o)))return v;throw new n("Can't convert object to primitive value")},ta}var na={exports:{}},aa,Nc;function gt(){return Nc||(Nc=1,aa=!0),aa}var oa,Bc;function Ob(){if(Bc)return oa;Bc=1;var r=Cr(),e=Object.defineProperty;return oa=function(t,n){try{e(r,t,{value:n,configurable:!0,writable:!0})}catch{r[t]=n}return n},oa}var Gc;function ys(){if(Gc)return na.exports;Gc=1;var r=gt(),e=Cr(),t=Ob(),n="__core-js_shared__",o=na.exports=e[n]||t(n,{});return(o.versions||(o.versions=[])).push({version:"3.46.0",mode:r?"pure":"global",copyright:"© 2014-2025 Denis Pushkarev (zloirock.ru), 2025 CoreJS Company (core-js.io)",license:"https://github.com/zloirock/core-js/blob/v3.46.0/LICENSE",source:"https://github.com/zloirock/core-js"}),na.exports}var ia,Kc;function Ue(){if(Kc)return ia;Kc=1;var r=ys();return ia=function(e,t){return r[e]||(r[e]=t||{})},ia}var ua,zc;function ee(){if(zc)return ua;zc=1;var r=yt(),e=Object;return ua=function(t){return e(r(t))},ua}var sa,Wc;function Wr(){if(Wc)return sa;Wc=1;var r=_r(),e=ee(),t=r({}.hasOwnProperty);return sa=Object.hasOwn||function(o,s){return t(e(o),s)},sa}var ca,Uc;function Yt(){if(Uc)return ca;Uc=1;var r=_r(),e=0,t=Math.random(),n=r(1.1.toString);return ca=function(o){return"Symbol("+(o===void 0?"":o)+")_"+n(++e+t,36)},ca}var fa,Hc;function Rr(){if(Hc)return fa;Hc=1;var r=Cr(),e=Ue(),t=Wr(),n=Yt(),o=Ke(),s=lp(),u=r.Symbol,v=e("wks"),l=s?u.for||u:u&&u.withoutSetter||n;return fa=function(f){return t(v,f)||(v[f]=o&&t(u,f)?u[f]:l("Symbol."+f)),v[f]},fa}var la,Vc;function Tb(){if(Vc)return la;Vc=1;var r=Br(),e=kr(),t=bt(),n=ps(),o=Eb(),s=Rr(),u=TypeError,v=s("toPrimitive");return la=function(l,f){if(!e(l)||t(l))return l;var h=n(l,v),y;if(h){if(f===void 0&&(f="default"),y=r(h,l,f),!e(y)||t(y))return y;throw new u("Can't convert object to primitive value")}return f===void 0&&(f="number"),o(l,f)},la}var va,Yc;function bs(){if(Yc)return va;Yc=1;var r=Tb(),e=bt();return va=function(t){var n=r(t,"string");return e(n)?n:n+""},va}var da,Jc;function vp(){if(Jc)return da;Jc=1;var r=Cr(),e=kr(),t=r.document,n=e(t)&&e(t.createElement);return da=function(o){return n?t.createElement(o):{}},da}var ha,Xc;function dp(){if(Xc)return ha;Xc=1;var r=Fr(),e=pr(),t=vp();return ha=!r&&!e(function(){return Object.defineProperty(t("div"),"a",{get:function(){return 7}}).a!==7}),ha}var Zc;function hp(){if(Zc)return Fn;Zc=1;var r=Fr(),e=Br(),t=ds(),n=ht(),o=he(),s=bs(),u=Wr(),v=dp(),l=Object.getOwnPropertyDescriptor;return Fn.f=r?l:function(h,y){if(h=o(h),y=s(y),v)try{return l(h,y)}catch{}if(u(h,y))return n(!e(t.f,h,y),h[y])},Fn}var pa,Qc;function xb(){if(Qc)return pa;Qc=1;var r=pr(),e=xr(),t=/#|\.prototype\./,n=function(l,f){var h=s[o(l)];return h===v?!0:h===u?!1:e(f)?r(f):!!f},o=n.normalize=function(l){return String(l).replace(t,".").toLowerCase()},s=n.data={},u=n.NATIVE="N",v=n.POLYFILL="P";return pa=n,pa}var ya,rf;function mt(){if(rf)return ya;rf=1;var r=fp(),e=We(),t=Ut(),n=r(r.bind);return ya=function(o,s){return e(o),s===void 0?o:t?n(o,s):function(){return o.apply(s,arguments)}},ya}var ba={},ga,ef;function pp(){if(ef)return ga;ef=1;var r=Fr(),e=pr();return ga=r&&e(function(){return Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype!==42}),ga}var ma,tf;function ie(){if(tf)return ma;tf=1;var r=kr(),e=String,t=TypeError;return ma=function(n){if(r(n))return n;throw new t(e(n)+" is not an object")},ma}var nf;function Jr(){if(nf)return ba;nf=1;var r=Fr(),e=dp(),t=pp(),n=ie(),o=bs(),s=TypeError,u=Object.defineProperty,v=Object.getOwnPropertyDescriptor,l="enumerable",f="configurable",h="writable";return ba.f=r?t?function(d,p,S){if(n(d),p=o(p),n(S),typeof d=="function"&&p==="prototype"&&"value"in S&&h in S&&!S[h]){var w=v(d,p);w&&w[h]&&(d[p]=S.value,S={configurable:f in S?S[f]:w[f],enumerable:l in S?S[l]:w[l],writable:!1})}return u(d,p,S)}:u:function(d,p,S){if(n(d),p=o(p),n(S),e)try{return u(d,p,S)}catch{}if("get"in S||"set"in S)throw new s("Accessors not supported");return"value"in S&&(d[p]=S.value),d},ba}var Sa,af;function He(){if(af)return Sa;af=1;var r=Fr(),e=Jr(),t=ht();return Sa=r?function(n,o,s){return e.f(n,o,t(1,s))}:function(n,o,s){return n[o]=s,n},Sa}var _a,of;function ar(){if(of)return _a;of=1;var r=Cr(),e=cp(),t=fp(),n=xr(),o=hp().f,s=xb(),u=Qr(),v=mt(),l=He(),f=Wr(),h=function(y){var d=function(p,S,w){if(this instanceof d){switch(arguments.length){case 0:return new y;case 1:return new y(p);case 2:return new y(p,S)}return new y(p,S,w)}return e(y,this,arguments)};return d.prototype=y.prototype,d};return _a=function(y,d){var p=y.target,S=y.global,w=y.stat,$=y.proto,C=S?r:w?r[p]:r[p]&&r[p].prototype,b=S?u:u[p]||l(u,p,{})[p],E=b.prototype,m,O,M,F,q,x,k,A,B;for(F in d)m=s(S?F:p+(w?".":"#")+F,y.forced),O=!m&&C&&f(C,F),x=b[F],O&&(y.dontCallGetSet?(B=o(C,F),k=B&&B.value):k=C[F]),q=O&&k?k:d[F],!(!m&&!$&&typeof x==typeof q)&&(y.bind&&O?A=v(q,r):y.wrap&&O?A=h(q):$&&n(q)?A=t(q):A=q,(y.sham||q&&q.sham||x&&x.sham)&&l(A,"sham",!0),l(b,F,A),$&&(M=p+"Prototype",f(u,M)||l(u,M,{}),l(u[M],F,q),y.real&&E&&(m||!E[F])&&l(E,F,q)))},_a}var Ra,uf;function Ve(){if(uf)return Ra;uf=1;var r=de();return Ra=Array.isArray||function(t){return r(t)==="Array"},Ra}var sf;function Pb(){if(sf)return fc;sf=1;var r=ar(),e=Ve();return r({target:"Array",stat:!0},{isArray:e}),fc}var Ia,cf;function $b(){if(cf)return Ia;cf=1,Pb();var r=Qr();return Ia=r.Array.isArray,Ia}var qa,ff;function Ab(){if(ff)return qa;ff=1;var r=$b();return qa=r,qa}var wa,lf;function Mb(){if(lf)return wa;lf=1;var r=Ab();return wa=r,wa}var Ea,vf;function Cb(){if(vf)return Ea;vf=1;var r=Mb();return Ea=r,Ea}var Oa,df;function Fb(){return df||(df=1,Oa=Cb()),Oa}var Ta,hf;function kb(){return hf||(hf=1,Ta=Fb()),Ta}var Db=kb();const yp=gr(Db);function is(r,e){(e==null||e>r.length)&&(e=r.length);for(var t=0,n=new Array(e);t<e;t++)n[t]=r[t];return n}function jb(r){if(yp(r))return is(r)}var pf={},xa,yf;function Lb(){if(yf)return xa;yf=1;var r=Math.ceil,e=Math.floor;return xa=Math.trunc||function(n){var o=+n;return(o>0?e:r)(o)},xa}var Pa,bf;function St(){if(bf)return Pa;bf=1;var r=Lb();return Pa=function(e){var t=+e;return t!==t||t===0?0:r(t)},Pa}var $a,gf;function Nb(){if(gf)return $a;gf=1;var r=St(),e=Math.min;return $a=function(t){var n=r(t);return n>0?e(n,9007199254740991):0},$a}var Aa,mf;function ue(){if(mf)return Aa;mf=1;var r=Nb();return Aa=function(e){return r(e.length)},Aa}var Ma,Sf;function bp(){if(Sf)return Ma;Sf=1;var r=TypeError,e=9007199254740991;return Ma=function(t){if(t>e)throw r("Maximum allowed index exceeded");return t},Ma}var Ca,_f;function Jt(){if(_f)return Ca;_f=1;var r=Fr(),e=Jr(),t=ht();return Ca=function(n,o,s){r?e.f(n,o,t(0,s)):n[o]=s},Ca}var Fa,Rf;function gs(){if(Rf)return Fa;Rf=1;var r=Rr(),e=r("toStringTag"),t={};return t[e]="z",Fa=String(t)==="[object z]",Fa}var ka,If;function Xt(){if(If)return ka;If=1;var r=gs(),e=xr(),t=de(),n=Rr(),o=n("toStringTag"),s=Object,u=t((function(){return arguments})())==="Arguments",v=function(l,f){try{return l[f]}catch{}};return ka=r?t:function(l){var f,h,y;return l===void 0?"Undefined":l===null?"Null":typeof(h=v(f=s(l),o))=="string"?h:u?t(f):(y=t(f))==="Object"&&e(f.callee)?"Arguments":y},ka}var Da,qf;function Bb(){if(qf)return Da;qf=1;var r=_r(),e=xr(),t=ys(),n=r(Function.toString);return e(t.inspectSource)||(t.inspectSource=function(o){return n(o)}),Da=t.inspectSource,Da}var ja,wf;function ms(){if(wf)return ja;wf=1;var r=_r(),e=pr(),t=xr(),n=Xt(),o=re(),s=Bb(),u=function(){},v=o("Reflect","construct"),l=/^\s*(?:class|function)\b/,f=r(l.exec),h=!l.test(u),y=function(S){if(!t(S))return!1;try{return v(u,[],S),!0}catch{return!1}},d=function(S){if(!t(S))return!1;switch(n(S)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return h||!!f(l,s(S))}catch{return!0}};return d.sham=!0,ja=!v||e(function(){var p;return y(y.call)||!y(Object)||!y(function(){p=!0})||p})?d:y,ja}var La,Ef;function Gb(){if(Ef)return La;Ef=1;var r=Ve(),e=ms(),t=kr(),n=Rr(),o=n("species"),s=Array;return La=function(u){var v;return r(u)&&(v=u.constructor,e(v)&&(v===s||r(v.prototype))?v=void 0:t(v)&&(v=v[o],v===null&&(v=void 0))),v===void 0?s:v},La}var Na,Of;function Ss(){if(Of)return Na;Of=1;var r=Gb();return Na=function(e,t){return new(r(e))(t===0?0:t)},Na}var Ba,Tf;function _t(){if(Tf)return Ba;Tf=1;var r=pr(),e=Rr(),t=Vt(),n=e("species");return Ba=function(o){return t>=51||!r(function(){var s=[],u=s.constructor={};return u[n]=function(){return{foo:1}},s[o](Boolean).foo!==1})},Ba}var xf;function gp(){if(xf)return pf;xf=1;var r=ar(),e=pr(),t=Ve(),n=kr(),o=ee(),s=ue(),u=bp(),v=Jt(),l=Ss(),f=_t(),h=Rr(),y=Vt(),d=h("isConcatSpreadable"),p=y>=51||!e(function(){var $=[];return $[d]=!1,$.concat()[0]!==$}),S=function($){if(!n($))return!1;var C=$[d];return C!==void 0?!!C:t($)},w=!p||!f("concat");return r({target:"Array",proto:!0,arity:1,forced:w},{concat:function(C){var b=o(this),E=l(b,0),m=0,O,M,F,q,x;for(O=-1,F=arguments.length;O<F;O++)if(x=O===-1?b:arguments[O],S(x))for(q=s(x),u(m+q),M=0;M<q;M++,m++)M in x&&v(E,m,x[M]);else u(m+1),v(E,m++,x);return E.length=m,E}}),pf}var Pf={},$f={},Ga,Af;function _e(){if(Af)return Ga;Af=1;var r=Xt(),e=String;return Ga=function(t){if(r(t)==="Symbol")throw new TypeError("Cannot convert a Symbol value to a string");return e(t)},Ga}var Ka={},za,Mf;function Zt(){if(Mf)return za;Mf=1;var r=St(),e=Math.max,t=Math.min;return za=function(n,o){var s=r(n);return s<0?e(s+o,0):t(s,o)},za}var Wa,Cf;function mp(){if(Cf)return Wa;Cf=1;var r=he(),e=Zt(),t=ue(),n=function(o){return function(s,u,v){var l=r(s),f=t(l);if(f===0)return!o&&-1;var h=e(v,f),y;if(o&&u!==u){for(;f>h;)if(y=l[h++],y!==y)return!0}else for(;f>h;h++)if((o||h in l)&&l[h]===u)return o||h||0;return!o&&-1}};return Wa={includes:n(!0),indexOf:n(!1)},Wa}var Ua,Ff;function Rt(){return Ff||(Ff=1,Ua={}),Ua}var Ha,kf;function Sp(){if(kf)return Ha;kf=1;var r=_r(),e=Wr(),t=he(),n=mp().indexOf,o=Rt(),s=r([].push);return Ha=function(u,v){var l=t(u),f=0,h=[],y;for(y in l)!e(o,y)&&e(l,y)&&s(h,y);for(;v.length>f;)e(l,y=v[f++])&&(~n(h,y)||s(h,y));return h},Ha}var Va,Df;function _s(){return Df||(Df=1,Va=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]),Va}var Ya,jf;function Qt(){if(jf)return Ya;jf=1;var r=Sp(),e=_s();return Ya=Object.keys||function(n){return r(n,e)},Ya}var Lf;function _p(){if(Lf)return Ka;Lf=1;var r=Fr(),e=pp(),t=Jr(),n=ie(),o=he(),s=Qt();return Ka.f=r&&!e?Object.defineProperties:function(v,l){n(v);for(var f=o(l),h=s(l),y=h.length,d=0,p;y>d;)t.f(v,p=h[d++],f[p]);return v},Ka}var Ja,Nf;function Kb(){if(Nf)return Ja;Nf=1;var r=re();return Ja=r("document","documentElement"),Ja}var Xa,Bf;function rn(){if(Bf)return Xa;Bf=1;var r=Ue(),e=Yt(),t=r("keys");return Xa=function(n){return t[n]||(t[n]=e(n))},Xa}var Za,Gf;function en(){if(Gf)return Za;Gf=1;var r=ie(),e=_p(),t=_s(),n=Rt(),o=Kb(),s=vp(),u=rn(),v=">",l="<",f="prototype",h="script",y=u("IE_PROTO"),d=function(){},p=function(b){return l+h+v+b+l+"/"+h+v},S=function(b){b.write(p("")),b.close();var E=b.parentWindow.Object;return b=null,E},w=function(){var b=s("iframe"),E="java"+h+":",m;return b.style.display="none",o.appendChild(b),b.src=String(E),m=b.contentWindow.document,m.open(),m.write(p("document.F=Object")),m.close(),m.F},$,C=function(){try{$=new ActiveXObject("htmlfile")}catch{}C=typeof document<"u"?document.domain&&$?S($):w():S($);for(var b=t.length;b--;)delete C[f][t[b]];return C()};return n[y]=!0,Za=Object.create||function(E,m){var O;return E!==null?(d[f]=r(E),O=new d,d[f]=null,O[y]=E):O=C(),m===void 0?O:e.f(O,m)},Za}var Qa={},Kf;function Rs(){if(Kf)return Qa;Kf=1;var r=Sp(),e=_s(),t=e.concat("length","prototype");return Qa.f=Object.getOwnPropertyNames||function(o){return r(o,t)},Qa}var ro={},eo,zf;function tn(){if(zf)return eo;zf=1;var r=_r();return eo=r([].slice),eo}var Wf;function Rp(){if(Wf)return ro;Wf=1;var r=de(),e=he(),t=Rs().f,n=tn(),o=typeof window=="object"&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],s=function(u){try{return t(u)}catch{return n(o)}};return ro.f=function(v){return o&&r(v)==="Window"?s(v):t(e(v))},ro}var to={},Uf;function Is(){return Uf||(Uf=1,to.f=Object.getOwnPropertySymbols),to}var no,Hf;function It(){if(Hf)return no;Hf=1;var r=He();return no=function(e,t,n,o){return o&&o.enumerable?e[t]=n:r(e,t,n),e},no}var ao,Vf;function qs(){if(Vf)return ao;Vf=1;var r=Jr();return ao=function(e,t,n){return r.f(e,t,n)},ao}var oo={},Yf;function Ip(){if(Yf)return oo;Yf=1;var r=Rr();return oo.f=r,oo}var io,Jf;function mr(){if(Jf)return io;Jf=1;var r=Qr(),e=Wr(),t=Ip(),n=Jr().f;return io=function(o){var s=r.Symbol||(r.Symbol={});e(s,o)||n(s,o,{value:t.f(o)})},io}var uo,Xf;function qp(){if(Xf)return uo;Xf=1;var r=Br(),e=re(),t=Rr(),n=It();return uo=function(){var o=e("Symbol"),s=o&&o.prototype,u=s&&s.valueOf,v=t("toPrimitive");s&&!s[v]&&n(s,v,function(l){return r(u,this)},{arity:1})},uo}var so,Zf;function zb(){if(Zf)return so;Zf=1;var r=gs(),e=Xt();return so=r?{}.toString:function(){return"[object "+e(this)+"]"},so}var co,Qf;function Re(){if(Qf)return co;Qf=1;var r=gs(),e=Jr().f,t=He(),n=Wr(),o=zb(),s=Rr(),u=s("toStringTag");return co=function(v,l,f,h){var y=f?v:v&&v.prototype;y&&(n(y,u)||e(y,u,{configurable:!0,value:l}),h&&!r&&t(y,"toString",o))},co}var fo,rl;function Wb(){if(rl)return fo;rl=1;var r=Cr(),e=xr(),t=r.WeakMap;return fo=e(t)&&/native code/.test(String(t)),fo}var lo,el;function qt(){if(el)return lo;el=1;var r=Wb(),e=Cr(),t=kr(),n=He(),o=Wr(),s=ys(),u=rn(),v=Rt(),l="Object already initialized",f=e.TypeError,h=e.WeakMap,y,d,p,S=function(b){return p(b)?d(b):y(b,{})},w=function(b){return function(E){var m;if(!t(E)||(m=d(E)).type!==b)throw new f("Incompatible receiver, "+b+" required");return m}};if(r||s.state){var $=s.state||(s.state=new h);$.get=$.get,$.has=$.has,$.set=$.set,y=function(b,E){if($.has(b))throw new f(l);return E.facade=b,$.set(b,E),E},d=function(b){return $.get(b)||{}},p=function(b){return $.has(b)}}else{var C=u("state");v[C]=!0,y=function(b,E){if(o(b,C))throw new f(l);return E.facade=b,n(b,C,E),E},d=function(b){return o(b,C)?b[C]:{}},p=function(b){return o(b,C)}}return lo={set:y,get:d,has:p,enforce:S,getterFor:w},lo}var vo,tl;function wt(){if(tl)return vo;tl=1;var r=mt(),e=_r(),t=hs(),n=ee(),o=ue(),s=Ss(),u=e([].push),v=function(l){var f=l===1,h=l===2,y=l===3,d=l===4,p=l===6,S=l===7,w=l===5||p;return function($,C,b,E){for(var m=n($),O=t(m),M=o(O),F=r(C,b),q=0,x=E||s,k=f?x($,M):h||S?x($,0):void 0,A,B;M>q;q++)if((w||q in O)&&(A=O[q],B=F(A,q,m),l))if(f)k[q]=B;else if(B)switch(l){case 3:return!0;case 5:return A;case 6:return q;case 2:u(k,A)}else switch(l){case 4:return!1;case 7:u(k,A)}return p?-1:y||d?d:k}};return vo={forEach:v(0),map:v(1),filter:v(2),some:v(3),every:v(4),find:v(5),findIndex:v(6),filterReject:v(7)},vo}var nl;function Ub(){if(nl)return $f;nl=1;var r=ar(),e=Cr(),t=Br(),n=_r(),o=gt(),s=Fr(),u=Ke(),v=pr(),l=Wr(),f=zr(),h=ie(),y=he(),d=bs(),p=_e(),S=ht(),w=en(),$=Qt(),C=Rs(),b=Rp(),E=Is(),m=hp(),O=Jr(),M=_p(),F=ds(),q=It(),x=qs(),k=Ue(),A=rn(),B=Rt(),G=Yt(),W=Rr(),Q=Ip(),hr=mr(),or=qp(),wr=Re(),Pr=qt(),Dr=wt().forEach,V=A("hidden"),yr="Symbol",Er="prototype",Ir=Pr.set,Gr=Pr.getterFor(yr),$r=Object[Er],Xr=e.Symbol,Ur=Xr&&Xr[Er],Je=e.RangeError,pe=e.TypeError,Te=e.QObject,Xe=m.f,te=O.f,Ze=b.f,Tt=F.f,Qe=n([].push),Hr=k("symbols"),se=k("op-symbols"),xt=k("wks"),rt=!Te||!Te[Er]||!Te[Er].findChild,Pt=function(lr,J,X){var tr=Xe($r,J);tr&&delete $r[J],te(lr,J,X),tr&&lr!==$r&&te($r,J,tr)},et=s&&v(function(){return w(te({},"a",{get:function(){return te(this,"a",{value:7}).a}})).a!==7})?Pt:te,tt=function(lr,J){var X=Hr[lr]=w(Ur);return Ir(X,{type:yr,tag:lr,description:J}),s||(X.description=J),X},xe=function(J,X,tr){J===$r&&xe(se,X,tr),h(J);var sr=d(X);return h(tr),l(Hr,sr)?(tr.enumerable?(l(J,V)&&J[V][sr]&&(J[V][sr]=!1),tr=w(tr,{enumerable:S(0,!1)})):(l(J,V)||te(J,V,S(1,w(null))),J[V][sr]=!0),et(J,sr,tr)):te(J,sr,tr)},nt=function(J,X){h(J);var tr=y(X),sr=$(tr).concat(Mt(tr));return Dr(sr,function(Ar){(!s||t(at,tr,Ar))&&xe(J,Ar,tr[Ar])}),J},un=function(J,X){return X===void 0?w(J):nt(w(J),X)},at=function(J){var X=d(J),tr=t(Tt,this,X);return this===$r&&l(Hr,X)&&!l(se,X)?!1:tr||!l(this,X)||!l(Hr,X)||l(this,V)&&this[V][X]?tr:!0},$t=function(J,X){var tr=y(J),sr=d(X);if(!(tr===$r&&l(Hr,sr)&&!l(se,sr))){var Ar=Xe(tr,sr);return Ar&&l(Hr,sr)&&!(l(tr,V)&&tr[V][sr])&&(Ar.enumerable=!0),Ar}},At=function(J){var X=Ze(y(J)),tr=[];return Dr(X,function(sr){!l(Hr,sr)&&!l(B,sr)&&Qe(tr,sr)}),tr},Mt=function(lr){var J=lr===$r,X=Ze(J?se:y(lr)),tr=[];return Dr(X,function(sr){l(Hr,sr)&&(!J||l($r,sr))&&Qe(tr,Hr[sr])}),tr};return u||(Xr=function(){if(f(Ur,this))throw new pe("Symbol is not a constructor");var J=!arguments.length||arguments[0]===void 0?void 0:p(arguments[0]),X=G(J),tr=function(sr){var Ar=this===void 0?e:this;Ar===$r&&t(tr,se,sr),l(Ar,V)&&l(Ar[V],X)&&(Ar[V][X]=!1);var Ct=S(1,sr);try{et(Ar,X,Ct)}catch(Ft){if(!(Ft instanceof Je))throw Ft;Pt(Ar,X,Ct)}};return s&&rt&&et($r,X,{configurable:!0,set:tr}),tt(X,J)},Ur=Xr[Er],q(Ur,"toString",function(){return Gr(this).tag}),q(Xr,"withoutSetter",function(lr){return tt(G(lr),lr)}),F.f=at,O.f=xe,M.f=nt,m.f=$t,C.f=b.f=At,E.f=Mt,Q.f=function(lr){return tt(W(lr),lr)},s&&(x(Ur,"description",{configurable:!0,get:function(){return Gr(this).description}}),o||q($r,"propertyIsEnumerable",at,{unsafe:!0}))),r({global:!0,constructor:!0,wrap:!0,forced:!u,sham:!u},{Symbol:Xr}),Dr($(xt),function(lr){hr(lr)}),r({target:yr,stat:!0,forced:!u},{useSetter:function(){rt=!0},useSimple:function(){rt=!1}}),r({target:"Object",stat:!0,forced:!u,sham:!s},{create:un,defineProperty:xe,defineProperties:nt,getOwnPropertyDescriptor:$t}),r({target:"Object",stat:!0,forced:!u},{getOwnPropertyNames:At}),or(),wr(Xr,yr),B[V]=!0,$f}var al={},ho,ol;function wp(){if(ol)return ho;ol=1;var r=Ke();return ho=r&&!!Symbol.for&&!!Symbol.keyFor,ho}var il;function Hb(){if(il)return al;il=1;var r=ar(),e=re(),t=Wr(),n=_e(),o=Ue(),s=wp(),u=o("string-to-symbol-registry"),v=o("symbol-to-string-registry");return r({target:"Symbol",stat:!0,forced:!s},{for:function(l){var f=n(l);if(t(u,f))return u[f];var h=e("Symbol")(f);return u[f]=h,v[h]=f,h}}),al}var ul={},sl;function Vb(){if(sl)return ul;sl=1;var r=ar(),e=Wr(),t=bt(),n=ze(),o=Ue(),s=wp(),u=o("symbol-to-string-registry");return r({target:"Symbol",stat:!0,forced:!s},{keyFor:function(l){if(!t(l))throw new TypeError(n(l)+" is not a symbol");if(e(u,l))return u[l]}}),ul}var cl={},po,fl;function Yb(){if(fl)return po;fl=1;var r=_r(),e=Ve(),t=xr(),n=de(),o=_e(),s=r([].push);return po=function(u){if(t(u))return u;if(e(u)){for(var v=u.length,l=[],f=0;f<v;f++){var h=u[f];typeof h=="string"?s(l,h):(typeof h=="number"||n(h)==="Number"||n(h)==="String")&&s(l,o(h))}var y=l.length,d=!0;return function(p,S){if(d)return d=!1,S;if(e(this))return S;for(var w=0;w<y;w++)if(l[w]===p)return S}}},po}var ll;function Jb(){if(ll)return cl;ll=1;var r=ar(),e=re(),t=cp(),n=Br(),o=_r(),s=pr(),u=xr(),v=bt(),l=tn(),f=Yb(),h=Ke(),y=String,d=e("JSON","stringify"),p=o(/./.exec),S=o("".charAt),w=o("".charCodeAt),$=o("".replace),C=o(1.1.toString),b=/[\uD800-\uDFFF]/g,E=/^[\uD800-\uDBFF]$/,m=/^[\uDC00-\uDFFF]$/,O=!h||s(function(){var x=e("Symbol")("stringify detection");return d([x])!=="[null]"||d({a:x})!=="{}"||d(Object(x))!=="{}"}),M=s(function(){return d("\uDF06\uD834")!=='"\\udf06\\ud834"'||d("\uDEAD")!=='"\\udead"'}),F=function(x,k){var A=l(arguments),B=f(k);if(!(!u(B)&&(x===void 0||v(x))))return A[1]=function(G,W){if(u(B)&&(W=n(B,this,y(G),W)),!v(W))return W},t(d,null,A)},q=function(x,k,A){var B=S(A,k-1),G=S(A,k+1);return p(E,x)&&!p(m,G)||p(m,x)&&!p(E,B)?"\\u"+C(w(x,0),16):x};return d&&r({target:"JSON",stat:!0,arity:3,forced:O||M},{stringify:function(k,A,B){var G=l(arguments),W=t(O?F:d,null,G);return M&&typeof W=="string"?$(W,b,q):W}}),cl}var vl={},dl;function Xb(){if(dl)return vl;dl=1;var r=ar(),e=Ke(),t=pr(),n=Is(),o=ee(),s=!e||t(function(){n.f(1)});return r({target:"Object",stat:!0,forced:s},{getOwnPropertySymbols:function(v){var l=n.f;return l?l(o(v)):[]}}),vl}var hl;function Zb(){return hl||(hl=1,Ub(),Hb(),Vb(),Jb(),Xb()),Pf}var pl={},yl;function Ep(){if(yl)return pl;yl=1;var r=mr();return r("asyncDispose"),pl}var bl={},gl;function Qb(){if(gl)return bl;gl=1;var r=mr();return r("asyncIterator"),bl}var ml={},Sl;function Op(){if(Sl)return ml;Sl=1;var r=mr();return r("dispose"),ml}var _l={},Rl;function rg(){if(Rl)return _l;Rl=1;var r=mr();return r("hasInstance"),_l}var Il={},ql;function eg(){if(ql)return Il;ql=1;var r=mr();return r("isConcatSpreadable"),Il}var wl={},El;function tg(){if(El)return wl;El=1;var r=mr();return r("iterator"),wl}var Ol={},Tl;function ng(){if(Tl)return Ol;Tl=1;var r=mr();return r("match"),Ol}var xl={},Pl;function ag(){if(Pl)return xl;Pl=1;var r=mr();return r("matchAll"),xl}var $l={},Al;function og(){if(Al)return $l;Al=1;var r=mr();return r("replace"),$l}var Ml={},Cl;function ig(){if(Cl)return Ml;Cl=1;var r=mr();return r("search"),Ml}var Fl={},kl;function ug(){if(kl)return Fl;kl=1;var r=mr();return r("species"),Fl}var Dl={},jl;function sg(){if(jl)return Dl;jl=1;var r=mr();return r("split"),Dl}var Ll={},Nl;function cg(){if(Nl)return Ll;Nl=1;var r=mr(),e=qp();return r("toPrimitive"),e(),Ll}var Bl={},Gl;function fg(){if(Gl)return Bl;Gl=1;var r=re(),e=mr(),t=Re();return e("toStringTag"),t(r("Symbol"),"Symbol"),Bl}var Kl={},zl;function lg(){if(zl)return Kl;zl=1;var r=mr();return r("unscopables"),Kl}var Wl={},Ul;function vg(){if(Ul)return Wl;Ul=1;var r=Cr(),e=Re();return e(r.JSON,"JSON",!0),Wl}var yo,Hl;function dg(){if(Hl)return yo;Hl=1,gp(),Zb(),Ep(),Qb(),Op(),rg(),eg(),tg(),ng(),ag(),og(),ig(),ug(),sg(),cg(),fg(),lg(),vg();var r=Qr();return yo=r.Symbol,yo}var Vl={},bo,Yl;function nn(){return Yl||(Yl=1,bo=function(){}),bo}var go,Jl;function Ye(){return Jl||(Jl=1,go={}),go}var mo,Xl;function hg(){if(Xl)return mo;Xl=1;var r=Fr(),e=Wr(),t=Function.prototype,n=r&&Object.getOwnPropertyDescriptor,o=e(t,"name"),s=o&&(function(){}).name==="something",u=o&&(!r||r&&n(t,"name").configurable);return mo={EXISTS:o,PROPER:s,CONFIGURABLE:u},mo}var So,Zl;function pg(){if(Zl)return So;Zl=1;var r=pr();return So=!r(function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype}),So}var _o,Ql;function Tp(){if(Ql)return _o;Ql=1;var r=Wr(),e=xr(),t=ee(),n=rn(),o=pg(),s=n("IE_PROTO"),u=Object,v=u.prototype;return _o=o?u.getPrototypeOf:function(l){var f=t(l);if(r(f,s))return f[s];var h=f.constructor;return e(h)&&f instanceof h?h.prototype:f instanceof u?v:null},_o}var Ro,rv;function xp(){if(rv)return Ro;rv=1;var r=pr(),e=xr(),t=kr(),n=en(),o=Tp(),s=It(),u=Rr(),v=gt(),l=u("iterator"),f=!1,h,y,d;[].keys&&(d=[].keys(),"next"in d?(y=o(o(d)),y!==Object.prototype&&(h=y)):f=!0);var p=!t(h)||r(function(){var S={};return h[l].call(S)!==S});return p?h={}:v&&(h=n(h)),e(h[l])||s(h,l,function(){return this}),Ro={IteratorPrototype:h,BUGGY_SAFARI_ITERATORS:f},Ro}var Io,ev;function yg(){if(ev)return Io;ev=1;var r=xp().IteratorPrototype,e=en(),t=ht(),n=Re(),o=Ye(),s=function(){return this};return Io=function(u,v,l,f){var h=v+" Iterator";return u.prototype=e(r,{next:t(+!f,l)}),n(u,h,!1,!0),o[h]=s,u},Io}var qo,tv;function bg(){if(tv)return qo;tv=1;var r=_r(),e=We();return qo=function(t,n,o){try{return r(e(Object.getOwnPropertyDescriptor(t,n)[o]))}catch{}},qo}var wo,nv;function gg(){if(nv)return wo;nv=1;var r=kr();return wo=function(e){return r(e)||e===null},wo}var Eo,av;function mg(){if(av)return Eo;av=1;var r=gg(),e=String,t=TypeError;return Eo=function(n){if(r(n))return n;throw new t("Can't set "+e(n)+" as a prototype")},Eo}var Oo,ov;function Sg(){if(ov)return Oo;ov=1;var r=bg(),e=kr(),t=yt(),n=mg();return Oo=Object.setPrototypeOf||("__proto__"in{}?(function(){var o=!1,s={},u;try{u=r(Object.prototype,"__proto__","set"),u(s,[]),o=s instanceof Array}catch{}return function(l,f){return t(l),n(f),e(l)&&(o?u(l,f):l.__proto__=f),l}})():void 0),Oo}var To,iv;function ws(){if(iv)return To;iv=1;var r=ar(),e=Br(),t=gt(),n=hg(),o=xr(),s=yg(),u=Tp(),v=Sg(),l=Re(),f=He(),h=It(),y=Rr(),d=Ye(),p=xp(),S=n.PROPER,w=n.CONFIGURABLE,$=p.IteratorPrototype,C=p.BUGGY_SAFARI_ITERATORS,b=y("iterator"),E="keys",m="values",O="entries",M=function(){return this};return To=function(F,q,x,k,A,B,G){s(x,q,k);var W=function(Ir){if(Ir===A&&Pr)return Pr;if(!C&&Ir&&Ir in or)return or[Ir];switch(Ir){case E:return function(){return new x(this,Ir)};case m:return function(){return new x(this,Ir)};case O:return function(){return new x(this,Ir)}}return function(){return new x(this)}},Q=q+" Iterator",hr=!1,or=F.prototype,wr=or[b]||or["@@iterator"]||A&&or[A],Pr=!C&&wr||W(A),Dr=q==="Array"&&or.entries||wr,V,yr,Er;if(Dr&&(V=u(Dr.call(new F)),V!==Object.prototype&&V.next&&(!t&&u(V)!==$&&(v?v(V,$):o(V[b])||h(V,b,M)),l(V,Q,!0,!0),t&&(d[Q]=M))),S&&A===m&&wr&&wr.name!==m&&(!t&&w?f(or,"name",m):(hr=!0,Pr=function(){return e(wr,this)})),A)if(yr={values:W(m),keys:B?Pr:W(E),entries:W(O)},G)for(Er in yr)(C||hr||!(Er in or))&&h(or,Er,yr[Er]);else r({target:q,proto:!0,forced:C||hr},yr);return(!t||G)&&or[b]!==Pr&&h(or,b,Pr,{name:A}),d[q]=Pr,yr},To}var xo,uv;function Es(){return uv||(uv=1,xo=function(r,e){return{value:r,done:e}}),xo}var Po,sv;function Os(){if(sv)return Po;sv=1;var r=he(),e=nn(),t=Ye(),n=qt(),o=Jr().f,s=ws(),u=Es(),v=gt(),l=Fr(),f="Array Iterator",h=n.set,y=n.getterFor(f);Po=s(Array,"Array",function(p,S){h(this,{type:f,target:r(p),index:0,kind:S})},function(){var p=y(this),S=p.target,w=p.index++;if(!S||w>=S.length)return p.target=null,u(void 0,!0);switch(p.kind){case"keys":return u(w,!1);case"values":return u(S[w],!1)}return u([w,S[w]],!1)},"values");var d=t.Arguments=t.Array;if(e("keys"),e("values"),e("entries"),!v&&l&&d.name!=="values")try{o(d,"name",{value:"values"})}catch{}return Po}var $o,cv;function _g(){return cv||(cv=1,$o={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}),$o}var fv;function Ts(){if(fv)return Vl;fv=1,Os();var r=_g(),e=Cr(),t=Re(),n=Ye();for(var o in r)t(e[o],o),n[o]=n.Array;return Vl}var Ao,lv;function Pp(){if(lv)return Ao;lv=1;var r=dg();return Ts(),Ao=r,Ao}var vv={},dv;function Rg(){if(dv)return vv;dv=1;var r=Rr(),e=Jr().f,t=r("metadata"),n=Function.prototype;return n[t]===void 0&&e(n,t,{value:null}),vv}var hv={},pv;function Ig(){return pv||(pv=1,Ep()),hv}var yv={},bv;function qg(){return bv||(bv=1,Op()),yv}var gv={},mv;function wg(){if(mv)return gv;mv=1;var r=mr();return r("metadata"),gv}var Mo,Sv;function Eg(){if(Sv)return Mo;Sv=1;var r=Pp();return Rg(),Ig(),qg(),wg(),Mo=r,Mo}var _v={},Co,Rv;function $p(){if(Rv)return Co;Rv=1;var r=re(),e=_r(),t=r("Symbol"),n=t.keyFor,o=e(t.prototype.valueOf);return Co=t.isRegisteredSymbol||function(u){try{return n(o(u))!==void 0}catch{return!1}},Co}var Iv;function Og(){if(Iv)return _v;Iv=1;var r=ar(),e=$p();return r({target:"Symbol",stat:!0},{isRegisteredSymbol:e}),_v}var qv={},Fo,wv;function Ap(){if(wv)return Fo;wv=1;for(var r=Ue(),e=re(),t=_r(),n=bt(),o=Rr(),s=e("Symbol"),u=s.isWellKnownSymbol,v=e("Object","getOwnPropertyNames"),l=t(s.prototype.valueOf),f=r("wks"),h=0,y=v(s),d=y.length;h<d;h++)try{var p=y[h];n(s[p])&&o(p)}catch{}return Fo=function(w){if(u&&u(w))return!0;try{for(var $=l(w),C=0,b=v(f),E=b.length;C<E;C++)if(f[b[C]]==$)return!0}catch{}return!1},Fo}var Ev;function Tg(){if(Ev)return qv;Ev=1;var r=ar(),e=Ap();return r({target:"Symbol",stat:!0,forced:!0},{isWellKnownSymbol:e}),qv}var Ov={},Tv;function xg(){if(Tv)return Ov;Tv=1;var r=mr();return r("customMatcher"),Ov}var xv={},Pv;function Pg(){if(Pv)return xv;Pv=1;var r=mr();return r("observable"),xv}var $v={},Av;function $g(){if(Av)return $v;Av=1;var r=ar(),e=$p();return r({target:"Symbol",stat:!0,name:"isRegisteredSymbol"},{isRegistered:e}),$v}var Mv={},Cv;function Ag(){if(Cv)return Mv;Cv=1;var r=ar(),e=Ap();return r({target:"Symbol",stat:!0,name:"isWellKnownSymbol",forced:!0},{isWellKnown:e}),Mv}var Fv={},kv;function Mg(){if(kv)return Fv;kv=1;var r=mr();return r("matcher"),Fv}var Dv={},jv;function Cg(){if(jv)return Dv;jv=1;var r=mr();return r("metadataKey"),Dv}var Lv={},Nv;function Fg(){if(Nv)return Lv;Nv=1;var r=mr();return r("patternMatch"),Lv}var Bv={},Gv;function kg(){if(Gv)return Bv;Gv=1;var r=mr();return r("replaceAll"),Bv}var ko,Kv;function Dg(){if(Kv)return ko;Kv=1;var r=Eg();return Og(),Tg(),xg(),Pg(),$g(),Ag(),Mg(),Cg(),Fg(),kg(),ko=r,ko}var Do,zv;function jg(){return zv||(zv=1,Do=Dg()),Do}var jo,Wv;function Lg(){return Wv||(Wv=1,jo=jg()),jo}var Ng=Lg();const Mp=gr(Ng);var Uv={},Lo,Hv;function Bg(){if(Hv)return Lo;Hv=1;var r=_r(),e=St(),t=_e(),n=yt(),o=r("".charAt),s=r("".charCodeAt),u=r("".slice),v=function(l){return function(f,h){var y=t(n(f)),d=e(h),p=y.length,S,w;return d<0||d>=p?l?"":void 0:(S=s(y,d),S<55296||S>56319||d+1===p||(w=s(y,d+1))<56320||w>57343?l?o(y,d):S:l?u(y,d,d+2):(S-55296<<10)+(w-56320)+65536)}};return Lo={codeAt:v(!1),charAt:v(!0)},Lo}var Vv;function xs(){if(Vv)return Uv;Vv=1;var r=Bg().charAt,e=_e(),t=qt(),n=ws(),o=Es(),s="String Iterator",u=t.set,v=t.getterFor(s);return n(String,"String",function(l){u(this,{type:s,string:e(l),index:0})},function(){var f=v(this),h=f.string,y=f.index,d;return y>=h.length?o(void 0,!0):(d=r(h,y),f.index+=d.length,o(d,!1))}),Uv}var No,Yv;function an(){if(Yv)return No;Yv=1;var r=Xt(),e=ps(),t=pt(),n=Ye(),o=Rr(),s=o("iterator");return No=function(u){if(!t(u))return e(u,s)||e(u,"@@iterator")||n[r(u)]},No}var Bo,Jv;function Gg(){if(Jv)return Bo;Jv=1,Os(),xs();var r=an();return Bo=r,Bo}var Go,Xv;function Kg(){if(Xv)return Go;Xv=1;var r=Gg();return Ts(),Go=r,Go}var Ko,Zv;function zg(){if(Zv)return Ko;Zv=1;var r=Kg();return Ko=r,Ko}var zo,Qv;function Wg(){if(Qv)return zo;Qv=1;var r=zg();return zo=r,zo}var Wo,r0;function Ug(){return r0||(r0=1,Wo=Wg()),Wo}var Uo,e0;function Hg(){return e0||(e0=1,Uo=Ug()),Uo}var Vg=Hg();const Ps=gr(Vg);var t0={},Ho,n0;function on(){if(n0)return Ho;n0=1;var r=Br(),e=ie(),t=ps();return Ho=function(n,o,s){var u,v;e(n);try{if(u=t(n,"return"),!u){if(o==="throw")throw s;return s}u=r(u,n)}catch(l){v=!0,u=l}if(o==="throw")throw s;if(v)throw u;return e(u),s},Ho}var Vo,a0;function Yg(){if(a0)return Vo;a0=1;var r=ie(),e=on();return Vo=function(t,n,o,s){try{return s?n(r(o)[0],o[1]):n(o)}catch(u){e(t,"throw",u)}},Vo}var Yo,o0;function Cp(){if(o0)return Yo;o0=1;var r=Rr(),e=Ye(),t=r("iterator"),n=Array.prototype;return Yo=function(o){return o!==void 0&&(e.Array===o||n[t]===o)},Yo}var Jo,i0;function Fp(){if(i0)return Jo;i0=1;var r=Br(),e=We(),t=ie(),n=ze(),o=an(),s=TypeError;return Jo=function(u,v){var l=arguments.length<2?o(u):v;if(e(l))return t(r(l,u));throw new s(n(u)+" is not iterable")},Jo}var Xo,u0;function Jg(){if(u0)return Xo;u0=1;var r=mt(),e=Br(),t=ee(),n=Yg(),o=Cp(),s=ms(),u=ue(),v=Jt(),l=Fp(),f=an(),h=Array;return Xo=function(d){var p=t(d),S=s(this),w=arguments.length,$=w>1?arguments[1]:void 0,C=$!==void 0;C&&($=r($,w>2?arguments[2]:void 0));var b=f(p),E=0,m,O,M,F,q,x;if(b&&!(this===h&&o(b)))for(O=S?new this:[],F=l(p,b),q=F.next;!(M=e(q,F)).done;E++)x=C?n(F,$,[M.value,E],!0):M.value,v(O,E,x);else for(m=u(p),O=S?new this(m):h(m);m>E;E++)x=C?$(p[E],E):p[E],v(O,E,x);return O.length=E,O},Xo}var Zo,s0;function Xg(){if(s0)return Zo;s0=1;var r=Rr(),e=r("iterator"),t=!1;try{var n=0,o={next:function(){return{done:!!n++}},return:function(){t=!0}};o[e]=function(){return this},Array.from(o,function(){throw 2})}catch{}return Zo=function(s,u){try{if(!u&&!t)return!1}catch{return!1}var v=!1;try{var l={};l[e]=function(){return{next:function(){return{done:v=!0}}}},s(l)}catch{}return v},Zo}var c0;function Zg(){if(c0)return t0;c0=1;var r=ar(),e=Jg(),t=Xg(),n=!t(function(o){Array.from(o)});return r({target:"Array",stat:!0,forced:n},{from:e}),t0}var Qo,f0;function Qg(){if(f0)return Qo;f0=1,xs(),Zg();var r=Qr();return Qo=r.Array.from,Qo}var ri,l0;function kp(){if(l0)return ri;l0=1;var r=Qg();return ri=r,ri}var ei,v0;function rm(){if(v0)return ei;v0=1;var r=kp();return ei=r,ei}var ti,d0;function em(){if(d0)return ti;d0=1;var r=rm();return ti=r,ti}var ni,h0;function tm(){return h0||(h0=1,ni=em()),ni}var ai,p0;function nm(){return p0||(p0=1,ai=tm()),ai}var am=nm();const Dp=gr(am);function om(r){if(typeof Mp<"u"&&Ps(r)!=null||r["@@iterator"]!=null)return Dp(r)}var y0={},b0;function im(){if(b0)return y0;b0=1;var r=ar(),e=Ve(),t=ms(),n=kr(),o=Zt(),s=ue(),u=he(),v=Jt(),l=Rr(),f=_t(),h=tn(),y=f("slice"),d=l("species"),p=Array,S=Math.max;return r({target:"Array",proto:!0,forced:!y},{slice:function($,C){var b=u(this),E=s(b),m=o($,E),O=o(C===void 0?E:C,E),M,F,q;if(e(b)&&(M=b.constructor,t(M)&&(M===p||e(M.prototype))?M=void 0:n(M)&&(M=M[d],M===null&&(M=void 0)),M===p||M===void 0))return h(b,m,O);for(F=new(M===void 0?p:M)(S(O-m,0)),q=0;m<O;m++,q++)m in b&&v(F,q,b[m]);return F.length=q,F}}),y0}var oi,g0;function ne(){if(g0)return oi;g0=1;var r=Cr(),e=Qr();return oi=function(t,n){var o=e[t+"Prototype"],s=o&&o[n];if(s)return s;var u=r[t],v=u&&u.prototype;return v&&v[n]},oi}var ii,m0;function um(){if(m0)return ii;m0=1,im();var r=ne();return ii=r("Array","slice"),ii}var ui,S0;function sm(){if(S0)return ui;S0=1;var r=zr(),e=um(),t=Array.prototype;return ui=function(n){var o=n.slice;return n===t||r(t,n)&&o===t.slice?e:o},ui}var si,_0;function jp(){if(_0)return si;_0=1;var r=sm();return si=r,si}var ci,R0;function cm(){if(R0)return ci;R0=1;var r=jp();return ci=r,ci}var fi,I0;function fm(){if(I0)return fi;I0=1;var r=cm();return fi=r,fi}var li,q0;function lm(){return q0||(q0=1,li=fm()),li}var vi,w0;function vm(){return w0||(w0=1,vi=lm()),vi}var dm=vm();const hm=gr(dm);function Lp(r,e){var t;if(r){if(typeof r=="string")return is(r,e);var n=hm(t=Object.prototype.toString.call(r)).call(t,8,-1);if(n==="Object"&&r.constructor&&(n=r.constructor.name),n==="Map"||n==="Set")return Dp(r);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return is(r,e)}}function pm(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
2
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function zt(r){return jb(r)||om(r)||Lp(r)||pm()}function $s(r,e){if(!(r instanceof e))throw new TypeError("Cannot call a class as a function")}var di={exports:{}},E0={},O0;function ym(){if(O0)return E0;O0=1;var r=ar(),e=Fr(),t=Jr().f;return r({target:"Object",stat:!0,forced:Object.defineProperty!==t,sham:!e},{defineProperty:t}),E0}var T0;function bm(){if(T0)return di.exports;T0=1,ym();var r=Qr(),e=r.Object,t=di.exports=function(o,s,u){return e.defineProperty(o,s,u)};return e.defineProperty.sham&&(t.sham=!0),di.exports}var hi,x0;function gm(){if(x0)return hi;x0=1;var r=bm();return hi=r,hi}var pi,P0;function mm(){if(P0)return pi;P0=1;var r=gm();return pi=r,pi}var yi,$0;function Sm(){if($0)return yi;$0=1;var r=mm();return yi=r,yi}var bi,A0;function _m(){return A0||(A0=1,bi=Sm()),bi}var gi,M0;function Rm(){return M0||(M0=1,gi=_m()),gi}var Im=Rm();const As=gr(Im);function C0(r,e){for(var t=0;t<e.length;t++){var n=e[t];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),As(r,n.key,n)}}function Ms(r,e,t){return e&&C0(r.prototype,e),t&&C0(r,t),As(r,"prototype",{writable:!1}),r}function qm(r,e,t){return e in r?As(r,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):r[e]=t,r}var F0={},k0;function wm(){if(k0)return F0;k0=1;var r=ar(),e=wt().map,t=_t(),n=t("map");return r({target:"Array",proto:!0,forced:!n},{map:function(s){return e(this,s,arguments.length>1?arguments[1]:void 0)}}),F0}var mi,D0;function Em(){if(D0)return mi;D0=1,wm();var r=ne();return mi=r("Array","map"),mi}var Si,j0;function Om(){if(j0)return Si;j0=1;var r=zr(),e=Em(),t=Array.prototype;return Si=function(n){var o=n.map;return n===t||r(t,n)&&o===t.map?e:o},Si}var _i,L0;function Tm(){if(L0)return _i;L0=1;var r=Om();return _i=r,_i}var Ri,N0;function xm(){return N0||(N0=1,Ri=Tm()),Ri}var Pm=xm();const Sr=gr(Pm);var B0={},G0;function $m(){if(G0)return B0;G0=1;var r=ar(),e=mp().includes,t=pr(),n=nn(),o=t(function(){return!Array(1).includes()});return r({target:"Array",proto:!0,forced:o},{includes:function(u){return e(this,u,arguments.length>1?arguments[1]:void 0)}}),n("includes"),B0}var Ii,K0;function Am(){if(K0)return Ii;K0=1,$m();var r=ne();return Ii=r("Array","includes"),Ii}var z0={},qi,W0;function Mm(){if(W0)return qi;W0=1;var r=kr(),e=de(),t=Rr(),n=t("match");return qi=function(o){var s;return r(o)&&((s=o[n])!==void 0?!!s:e(o)==="RegExp")},qi}var wi,U0;function Cm(){if(U0)return wi;U0=1;var r=Mm(),e=TypeError;return wi=function(t){if(r(t))throw new e("The method doesn't accept regular expressions");return t},wi}var Ei,H0;function Fm(){if(H0)return Ei;H0=1;var r=Rr(),e=r("match");return Ei=function(t){var n=/./;try{"/./"[t](n)}catch{try{return n[e]=!1,"/./"[t](n)}catch{}}return!1},Ei}var V0;function km(){if(V0)return z0;V0=1;var r=ar(),e=_r(),t=Cm(),n=yt(),o=_e(),s=Fm(),u=e("".indexOf);return r({target:"String",proto:!0,forced:!s("includes")},{includes:function(l){return!!~u(o(n(this)),o(t(l)),arguments.length>1?arguments[1]:void 0)}}),z0}var Oi,Y0;function Dm(){if(Y0)return Oi;Y0=1,km();var r=ne();return Oi=r("String","includes"),Oi}var Ti,J0;function jm(){if(J0)return Ti;J0=1;var r=zr(),e=Am(),t=Dm(),n=Array.prototype,o=String.prototype;return Ti=function(s){var u=s.includes;return s===n||r(n,s)&&u===n.includes?e:typeof s=="string"||s===o||r(o,s)&&u===o.includes?t:u},Ti}var xi,X0;function Lm(){if(X0)return xi;X0=1;var r=jm();return xi=r,xi}var Pi,Z0;function Nm(){return Z0||(Z0=1,Pi=Lm()),Pi}var Bm=Nm();const Np=gr(Bm);var Gt={exports:{}};/**
|
|
3
|
+
* chroma.js - JavaScript library for color conversions
|
|
4
|
+
*
|
|
5
|
+
* Copyright (c) 2011-2019, Gregor Aisch
|
|
6
|
+
* All rights reserved.
|
|
7
|
+
*
|
|
8
|
+
* Redistribution and use in source and binary forms, with or without
|
|
9
|
+
* modification, are permitted provided that the following conditions are met:
|
|
10
|
+
*
|
|
11
|
+
* 1. Redistributions of source code must retain the above copyright notice, this
|
|
12
|
+
* list of conditions and the following disclaimer.
|
|
13
|
+
*
|
|
14
|
+
* 2. Redistributions in binary form must reproduce the above copyright notice,
|
|
15
|
+
* this list of conditions and the following disclaimer in the documentation
|
|
16
|
+
* and/or other materials provided with the distribution.
|
|
17
|
+
*
|
|
18
|
+
* 3. The name Gregor Aisch may not be used to endorse or promote products
|
|
19
|
+
* derived from this software without specific prior written permission.
|
|
20
|
+
*
|
|
21
|
+
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
|
22
|
+
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
23
|
+
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
|
24
|
+
* DISCLAIMED. IN NO EVENT SHALL GREGOR AISCH OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
|
|
25
|
+
* INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
|
26
|
+
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
|
27
|
+
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
|
|
28
|
+
* OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
|
29
|
+
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
|
|
30
|
+
* EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
31
|
+
*
|
|
32
|
+
* -------------------------------------------------------
|
|
33
|
+
*
|
|
34
|
+
* chroma.js includes colors from colorbrewer2.org, which are released under
|
|
35
|
+
* the following license:
|
|
36
|
+
*
|
|
37
|
+
* Copyright (c) 2002 Cynthia Brewer, Mark Harrower,
|
|
38
|
+
* and The Pennsylvania State University.
|
|
39
|
+
*
|
|
40
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
41
|
+
* you may not use this file except in compliance with the License.
|
|
42
|
+
* You may obtain a copy of the License at
|
|
43
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
44
|
+
*
|
|
45
|
+
* Unless required by applicable law or agreed to in writing,
|
|
46
|
+
* software distributed under the License is distributed on an
|
|
47
|
+
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
|
|
48
|
+
* either express or implied. See the License for the specific
|
|
49
|
+
* language governing permissions and limitations under the License.
|
|
50
|
+
*
|
|
51
|
+
* ------------------------------------------------------
|
|
52
|
+
*
|
|
53
|
+
* Named colors are taken from X11 Color Names.
|
|
54
|
+
* http://www.w3.org/TR/css3-color/#svg-color
|
|
55
|
+
*
|
|
56
|
+
* @preserve
|
|
57
|
+
*/var Gm=Gt.exports,Q0;function Km(){return Q0||(Q0=1,(function(r,e){(function(t,n){r.exports=n()})(Gm,(function(){for(var t=function(a,i,c){return i===void 0&&(i=0),c===void 0&&(c=1),a<i?i:a>c?c:a},n=function(a){a._clipped=!1,a._unclipped=a.slice(0);for(var i=0;i<=3;i++)i<3?((a[i]<0||a[i]>255)&&(a._clipped=!0),a[i]=t(a[i],0,255)):i===3&&(a[i]=t(a[i],0,1));return a},o={},s=0,u=["Boolean","Number","String","Function","Array","Date","RegExp","Undefined","Null"];s<u.length;s+=1){var v=u[s];o["[object "+v+"]"]=v.toLowerCase()}var l=function(a){return o[Object.prototype.toString.call(a)]||"object"},f=function(a,i){return i===void 0&&(i=null),a.length>=3?Array.prototype.slice.call(a):l(a[0])=="object"&&i?i.split("").filter(function(c){return a[0][c]!==void 0}).map(function(c){return a[0][c]}):a[0]},h=function(a){if(a.length<2)return null;var i=a.length-1;return l(a[i])=="string"?a[i].toLowerCase():null},y=Math.PI,d={clip_rgb:n,limit:t,type:l,unpack:f,last:h,TWOPI:y*2,PITHIRD:y/3,DEG2RAD:y/180,RAD2DEG:180/y},p={format:{},autodetect:[]},S=d.last,w=d.clip_rgb,$=d.type,C=function(){for(var i=[],c=arguments.length;c--;)i[c]=arguments[c];var g=this;if($(i[0])==="object"&&i[0].constructor&&i[0].constructor===this.constructor)return i[0];var R=S(i),I=!1;if(!R){I=!0,p.sorted||(p.autodetect=p.autodetect.sort(function(L,j){return j.p-L.p}),p.sorted=!0);for(var _=0,T=p.autodetect;_<T.length;_+=1){var P=T[_];if(R=P.test.apply(P,i),R)break}}if(p.format[R]){var D=p.format[R].apply(null,I?i:i.slice(0,-1));g._rgb=w(D)}else throw new Error("unknown format: "+i);g._rgb.length===3&&g._rgb.push(1)};C.prototype.toString=function(){return $(this.hex)=="function"?this.hex():"["+this._rgb.join(",")+"]"};var b=C,E=function(){for(var a=[],i=arguments.length;i--;)a[i]=arguments[i];return new(Function.prototype.bind.apply(E.Color,[null].concat(a)))};E.Color=b,E.version="2.1.2";var m=E,O=d.unpack,M=Math.max,F=function(){for(var a=[],i=arguments.length;i--;)a[i]=arguments[i];var c=O(a,"rgb"),g=c[0],R=c[1],I=c[2];g=g/255,R=R/255,I=I/255;var _=1-M(g,M(R,I)),T=_<1?1/(1-_):0,P=(1-g-_)*T,D=(1-R-_)*T,L=(1-I-_)*T;return[P,D,L,_]},q=F,x=d.unpack,k=function(){for(var a=[],i=arguments.length;i--;)a[i]=arguments[i];a=x(a,"cmyk");var c=a[0],g=a[1],R=a[2],I=a[3],_=a.length>4?a[4]:1;return I===1?[0,0,0,_]:[c>=1?0:255*(1-c)*(1-I),g>=1?0:255*(1-g)*(1-I),R>=1?0:255*(1-R)*(1-I),_]},A=k,B=d.unpack,G=d.type;b.prototype.cmyk=function(){return q(this._rgb)},m.cmyk=function(){for(var a=[],i=arguments.length;i--;)a[i]=arguments[i];return new(Function.prototype.bind.apply(b,[null].concat(a,["cmyk"])))},p.format.cmyk=A,p.autodetect.push({p:2,test:function(){for(var a=[],i=arguments.length;i--;)a[i]=arguments[i];if(a=B(a,"cmyk"),G(a)==="array"&&a.length===4)return"cmyk"}});var W=d.unpack,Q=d.last,hr=function(a){return Math.round(a*100)/100},or=function(){for(var a=[],i=arguments.length;i--;)a[i]=arguments[i];var c=W(a,"hsla"),g=Q(a)||"lsa";return c[0]=hr(c[0]||0),c[1]=hr(c[1]*100)+"%",c[2]=hr(c[2]*100)+"%",g==="hsla"||c.length>3&&c[3]<1?(c[3]=c.length>3?c[3]:1,g="hsla"):c.length=3,g+"("+c.join(",")+")"},wr=or,Pr=d.unpack,Dr=function(){for(var a=[],i=arguments.length;i--;)a[i]=arguments[i];a=Pr(a,"rgba");var c=a[0],g=a[1],R=a[2];c/=255,g/=255,R/=255;var I=Math.min(c,g,R),_=Math.max(c,g,R),T=(_+I)/2,P,D;return _===I?(P=0,D=Number.NaN):P=T<.5?(_-I)/(_+I):(_-I)/(2-_-I),c==_?D=(g-R)/(_-I):g==_?D=2+(R-c)/(_-I):R==_&&(D=4+(c-g)/(_-I)),D*=60,D<0&&(D+=360),a.length>3&&a[3]!==void 0?[D,P,T,a[3]]:[D,P,T]},V=Dr,yr=d.unpack,Er=d.last,Ir=Math.round,Gr=function(){for(var a=[],i=arguments.length;i--;)a[i]=arguments[i];var c=yr(a,"rgba"),g=Er(a)||"rgb";return g.substr(0,3)=="hsl"?wr(V(c),g):(c[0]=Ir(c[0]),c[1]=Ir(c[1]),c[2]=Ir(c[2]),(g==="rgba"||c.length>3&&c[3]<1)&&(c[3]=c.length>3?c[3]:1,g="rgba"),g+"("+c.slice(0,g==="rgb"?3:4).join(",")+")")},$r=Gr,Xr=d.unpack,Ur=Math.round,Je=function(){for(var a,i=[],c=arguments.length;c--;)i[c]=arguments[c];i=Xr(i,"hsl");var g=i[0],R=i[1],I=i[2],_,T,P;if(R===0)_=T=P=I*255;else{var D=[0,0,0],L=[0,0,0],j=I<.5?I*(1+R):I+R-I*R,z=2*I-j,K=g/360;D[0]=K+1/3,D[1]=K,D[2]=K-1/3;for(var H=0;H<3;H++)D[H]<0&&(D[H]+=1),D[H]>1&&(D[H]-=1),6*D[H]<1?L[H]=z+(j-z)*6*D[H]:2*D[H]<1?L[H]=j:3*D[H]<2?L[H]=z+(j-z)*(2/3-D[H])*6:L[H]=z;a=[Ur(L[0]*255),Ur(L[1]*255),Ur(L[2]*255)],_=a[0],T=a[1],P=a[2]}return i.length>3?[_,T,P,i[3]]:[_,T,P,1]},pe=Je,Te=/^rgb\(\s*(-?\d+),\s*(-?\d+)\s*,\s*(-?\d+)\s*\)$/,Xe=/^rgba\(\s*(-?\d+),\s*(-?\d+)\s*,\s*(-?\d+)\s*,\s*([01]|[01]?\.\d+)\)$/,te=/^rgb\(\s*(-?\d+(?:\.\d+)?)%,\s*(-?\d+(?:\.\d+)?)%\s*,\s*(-?\d+(?:\.\d+)?)%\s*\)$/,Ze=/^rgba\(\s*(-?\d+(?:\.\d+)?)%,\s*(-?\d+(?:\.\d+)?)%\s*,\s*(-?\d+(?:\.\d+)?)%\s*,\s*([01]|[01]?\.\d+)\)$/,Tt=/^hsl\(\s*(-?\d+(?:\.\d+)?),\s*(-?\d+(?:\.\d+)?)%\s*,\s*(-?\d+(?:\.\d+)?)%\s*\)$/,Qe=/^hsla\(\s*(-?\d+(?:\.\d+)?),\s*(-?\d+(?:\.\d+)?)%\s*,\s*(-?\d+(?:\.\d+)?)%\s*,\s*([01]|[01]?\.\d+)\)$/,Hr=Math.round,se=function(a){a=a.toLowerCase().trim();var i;if(p.format.named)try{return p.format.named(a)}catch{}if(i=a.match(Te)){for(var c=i.slice(1,4),g=0;g<3;g++)c[g]=+c[g];return c[3]=1,c}if(i=a.match(Xe)){for(var R=i.slice(1,5),I=0;I<4;I++)R[I]=+R[I];return R}if(i=a.match(te)){for(var _=i.slice(1,4),T=0;T<3;T++)_[T]=Hr(_[T]*2.55);return _[3]=1,_}if(i=a.match(Ze)){for(var P=i.slice(1,5),D=0;D<3;D++)P[D]=Hr(P[D]*2.55);return P[3]=+P[3],P}if(i=a.match(Tt)){var L=i.slice(1,4);L[1]*=.01,L[2]*=.01;var j=pe(L);return j[3]=1,j}if(i=a.match(Qe)){var z=i.slice(1,4);z[1]*=.01,z[2]*=.01;var K=pe(z);return K[3]=+i[4],K}};se.test=function(a){return Te.test(a)||Xe.test(a)||te.test(a)||Ze.test(a)||Tt.test(a)||Qe.test(a)};var xt=se,rt=d.type;b.prototype.css=function(a){return $r(this._rgb,a)},m.css=function(){for(var a=[],i=arguments.length;i--;)a[i]=arguments[i];return new(Function.prototype.bind.apply(b,[null].concat(a,["css"])))},p.format.css=xt,p.autodetect.push({p:5,test:function(a){for(var i=[],c=arguments.length-1;c-- >0;)i[c]=arguments[c+1];if(!i.length&&rt(a)==="string"&&xt.test(a))return"css"}});var Pt=d.unpack;p.format.gl=function(){for(var a=[],i=arguments.length;i--;)a[i]=arguments[i];var c=Pt(a,"rgba");return c[0]*=255,c[1]*=255,c[2]*=255,c},m.gl=function(){for(var a=[],i=arguments.length;i--;)a[i]=arguments[i];return new(Function.prototype.bind.apply(b,[null].concat(a,["gl"])))},b.prototype.gl=function(){var a=this._rgb;return[a[0]/255,a[1]/255,a[2]/255,a[3]]};var et=d.unpack,tt=function(){for(var a=[],i=arguments.length;i--;)a[i]=arguments[i];var c=et(a,"rgb"),g=c[0],R=c[1],I=c[2],_=Math.min(g,R,I),T=Math.max(g,R,I),P=T-_,D=P*100/255,L=_/(255-P)*100,j;return P===0?j=Number.NaN:(g===T&&(j=(R-I)/P),R===T&&(j=2+(I-g)/P),I===T&&(j=4+(g-R)/P),j*=60,j<0&&(j+=360)),[j,D,L]},xe=tt,nt=d.unpack,un=Math.floor,at=function(){for(var a,i,c,g,R,I,_=[],T=arguments.length;T--;)_[T]=arguments[T];_=nt(_,"hcg");var P=_[0],D=_[1],L=_[2],j,z,K;L=L*255;var H=D*255;if(D===0)j=z=K=L;else{P===360&&(P=0),P>360&&(P-=360),P<0&&(P+=360),P/=60;var rr=un(P),Y=P-rr,ir=L*(1-D),vr=ir+H*(1-Y),Or=ir+H*Y,Tr=ir+H;switch(rr){case 0:a=[Tr,Or,ir],j=a[0],z=a[1],K=a[2];break;case 1:i=[vr,Tr,ir],j=i[0],z=i[1],K=i[2];break;case 2:c=[ir,Tr,Or],j=c[0],z=c[1],K=c[2];break;case 3:g=[ir,vr,Tr],j=g[0],z=g[1],K=g[2];break;case 4:R=[Or,ir,Tr],j=R[0],z=R[1],K=R[2];break;case 5:I=[Tr,ir,vr],j=I[0],z=I[1],K=I[2];break}}return[j,z,K,_.length>3?_[3]:1]},$t=at,At=d.unpack,Mt=d.type;b.prototype.hcg=function(){return xe(this._rgb)},m.hcg=function(){for(var a=[],i=arguments.length;i--;)a[i]=arguments[i];return new(Function.prototype.bind.apply(b,[null].concat(a,["hcg"])))},p.format.hcg=$t,p.autodetect.push({p:1,test:function(){for(var a=[],i=arguments.length;i--;)a[i]=arguments[i];if(a=At(a,"hcg"),Mt(a)==="array"&&a.length===3)return"hcg"}});var lr=d.unpack,J=d.last,X=Math.round,tr=function(){for(var a=[],i=arguments.length;i--;)a[i]=arguments[i];var c=lr(a,"rgba"),g=c[0],R=c[1],I=c[2],_=c[3],T=J(a)||"auto";_===void 0&&(_=1),T==="auto"&&(T=_<1?"rgba":"rgb"),g=X(g),R=X(R),I=X(I);var P=g<<16|R<<8|I,D="000000"+P.toString(16);D=D.substr(D.length-6);var L="0"+X(_*255).toString(16);switch(L=L.substr(L.length-2),T.toLowerCase()){case"rgba":return"#"+D+L;case"argb":return"#"+L+D;default:return"#"+D}},sr=tr,Ar=/^#?([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/,Ct=/^#?([A-Fa-f0-9]{8}|[A-Fa-f0-9]{4})$/,Ft=function(a){if(a.match(Ar)){(a.length===4||a.length===7)&&(a=a.substr(1)),a.length===3&&(a=a.split(""),a=a[0]+a[0]+a[1]+a[1]+a[2]+a[2]);var i=parseInt(a,16),c=i>>16,g=i>>8&255,R=i&255;return[c,g,R,1]}if(a.match(Ct)){(a.length===5||a.length===9)&&(a=a.substr(1)),a.length===4&&(a=a.split(""),a=a[0]+a[0]+a[1]+a[1]+a[2]+a[2]+a[3]+a[3]);var I=parseInt(a,16),_=I>>24&255,T=I>>16&255,P=I>>8&255,D=Math.round((I&255)/255*100)/100;return[_,T,P,D]}throw new Error("unknown hex color: "+a)},js=Ft,h1=d.type;b.prototype.hex=function(a){return sr(this._rgb,a)},m.hex=function(){for(var a=[],i=arguments.length;i--;)a[i]=arguments[i];return new(Function.prototype.bind.apply(b,[null].concat(a,["hex"])))},p.format.hex=js,p.autodetect.push({p:4,test:function(a){for(var i=[],c=arguments.length-1;c-- >0;)i[c]=arguments[c+1];if(!i.length&&h1(a)==="string"&&[3,4,5,6,7,8,9].indexOf(a.length)>=0)return"hex"}});var p1=d.unpack,Ls=d.TWOPI,y1=Math.min,b1=Math.sqrt,g1=Math.acos,m1=function(){for(var a=[],i=arguments.length;i--;)a[i]=arguments[i];var c=p1(a,"rgb"),g=c[0],R=c[1],I=c[2];g/=255,R/=255,I/=255;var _,T=y1(g,R,I),P=(g+R+I)/3,D=P>0?1-T/P:0;return D===0?_=NaN:(_=(g-R+(g-I))/2,_/=b1((g-R)*(g-R)+(g-I)*(R-I)),_=g1(_),I>R&&(_=Ls-_),_/=Ls),[_*360,D,P]},S1=m1,_1=d.unpack,sn=d.limit,Pe=d.TWOPI,cn=d.PITHIRD,$e=Math.cos,R1=function(){for(var a=[],i=arguments.length;i--;)a[i]=arguments[i];a=_1(a,"hsi");var c=a[0],g=a[1],R=a[2],I,_,T;return isNaN(c)&&(c=0),isNaN(g)&&(g=0),c>360&&(c-=360),c<0&&(c+=360),c/=360,c<1/3?(T=(1-g)/3,I=(1+g*$e(Pe*c)/$e(cn-Pe*c))/3,_=1-(T+I)):c<2/3?(c-=1/3,I=(1-g)/3,_=(1+g*$e(Pe*c)/$e(cn-Pe*c))/3,T=1-(I+_)):(c-=2/3,_=(1-g)/3,T=(1+g*$e(Pe*c)/$e(cn-Pe*c))/3,I=1-(_+T)),I=sn(R*I*3),_=sn(R*_*3),T=sn(R*T*3),[I*255,_*255,T*255,a.length>3?a[3]:1]},I1=R1,q1=d.unpack,w1=d.type;b.prototype.hsi=function(){return S1(this._rgb)},m.hsi=function(){for(var a=[],i=arguments.length;i--;)a[i]=arguments[i];return new(Function.prototype.bind.apply(b,[null].concat(a,["hsi"])))},p.format.hsi=I1,p.autodetect.push({p:2,test:function(){for(var a=[],i=arguments.length;i--;)a[i]=arguments[i];if(a=q1(a,"hsi"),w1(a)==="array"&&a.length===3)return"hsi"}});var E1=d.unpack,O1=d.type;b.prototype.hsl=function(){return V(this._rgb)},m.hsl=function(){for(var a=[],i=arguments.length;i--;)a[i]=arguments[i];return new(Function.prototype.bind.apply(b,[null].concat(a,["hsl"])))},p.format.hsl=pe,p.autodetect.push({p:2,test:function(){for(var a=[],i=arguments.length;i--;)a[i]=arguments[i];if(a=E1(a,"hsl"),O1(a)==="array"&&a.length===3)return"hsl"}});var T1=d.unpack,x1=Math.min,P1=Math.max,$1=function(){for(var a=[],i=arguments.length;i--;)a[i]=arguments[i];a=T1(a,"rgb");var c=a[0],g=a[1],R=a[2],I=x1(c,g,R),_=P1(c,g,R),T=_-I,P,D,L;return L=_/255,_===0?(P=Number.NaN,D=0):(D=T/_,c===_&&(P=(g-R)/T),g===_&&(P=2+(R-c)/T),R===_&&(P=4+(c-g)/T),P*=60,P<0&&(P+=360)),[P,D,L]},A1=$1,M1=d.unpack,C1=Math.floor,F1=function(){for(var a,i,c,g,R,I,_=[],T=arguments.length;T--;)_[T]=arguments[T];_=M1(_,"hsv");var P=_[0],D=_[1],L=_[2],j,z,K;if(L*=255,D===0)j=z=K=L;else{P===360&&(P=0),P>360&&(P-=360),P<0&&(P+=360),P/=60;var H=C1(P),rr=P-H,Y=L*(1-D),ir=L*(1-D*rr),vr=L*(1-D*(1-rr));switch(H){case 0:a=[L,vr,Y],j=a[0],z=a[1],K=a[2];break;case 1:i=[ir,L,Y],j=i[0],z=i[1],K=i[2];break;case 2:c=[Y,L,vr],j=c[0],z=c[1],K=c[2];break;case 3:g=[Y,ir,L],j=g[0],z=g[1],K=g[2];break;case 4:R=[vr,Y,L],j=R[0],z=R[1],K=R[2];break;case 5:I=[L,Y,ir],j=I[0],z=I[1],K=I[2];break}}return[j,z,K,_.length>3?_[3]:1]},k1=F1,D1=d.unpack,j1=d.type;b.prototype.hsv=function(){return A1(this._rgb)},m.hsv=function(){for(var a=[],i=arguments.length;i--;)a[i]=arguments[i];return new(Function.prototype.bind.apply(b,[null].concat(a,["hsv"])))},p.format.hsv=k1,p.autodetect.push({p:2,test:function(){for(var a=[],i=arguments.length;i--;)a[i]=arguments[i];if(a=D1(a,"hsv"),j1(a)==="array"&&a.length===3)return"hsv"}});var jr={Kn:18,Xn:.95047,Yn:1,Zn:1.08883,t0:.137931034,t1:.206896552,t2:.12841855,t3:.008856452},L1=d.unpack,Ns=Math.pow,N1=function(){for(var a=[],i=arguments.length;i--;)a[i]=arguments[i];var c=L1(a,"rgb"),g=c[0],R=c[1],I=c[2],_=B1(g,R,I),T=_[0],P=_[1],D=_[2],L=116*P-16;return[L<0?0:L,500*(T-P),200*(P-D)]},fn=function(a){return(a/=255)<=.04045?a/12.92:Ns((a+.055)/1.055,2.4)},ln=function(a){return a>jr.t3?Ns(a,1/3):a/jr.t2+jr.t0},B1=function(a,i,c){a=fn(a),i=fn(i),c=fn(c);var g=ln((.4124564*a+.3575761*i+.1804375*c)/jr.Xn),R=ln((.2126729*a+.7151522*i+.072175*c)/jr.Yn),I=ln((.0193339*a+.119192*i+.9503041*c)/jr.Zn);return[g,R,I]},Bs=N1,G1=d.unpack,K1=Math.pow,z1=function(){for(var a=[],i=arguments.length;i--;)a[i]=arguments[i];a=G1(a,"lab");var c=a[0],g=a[1],R=a[2],I,_,T,P,D,L;return _=(c+16)/116,I=isNaN(g)?_:_+g/500,T=isNaN(R)?_:_-R/200,_=jr.Yn*dn(_),I=jr.Xn*dn(I),T=jr.Zn*dn(T),P=vn(3.2404542*I-1.5371385*_-.4985314*T),D=vn(-.969266*I+1.8760108*_+.041556*T),L=vn(.0556434*I-.2040259*_+1.0572252*T),[P,D,L,a.length>3?a[3]:1]},vn=function(a){return 255*(a<=.00304?12.92*a:1.055*K1(a,1/2.4)-.055)},dn=function(a){return a>jr.t1?a*a*a:jr.t2*(a-jr.t0)},Gs=z1,W1=d.unpack,U1=d.type;b.prototype.lab=function(){return Bs(this._rgb)},m.lab=function(){for(var a=[],i=arguments.length;i--;)a[i]=arguments[i];return new(Function.prototype.bind.apply(b,[null].concat(a,["lab"])))},p.format.lab=Gs,p.autodetect.push({p:2,test:function(){for(var a=[],i=arguments.length;i--;)a[i]=arguments[i];if(a=W1(a,"lab"),U1(a)==="array"&&a.length===3)return"lab"}});var H1=d.unpack,V1=d.RAD2DEG,Y1=Math.sqrt,J1=Math.atan2,X1=Math.round,Z1=function(){for(var a=[],i=arguments.length;i--;)a[i]=arguments[i];var c=H1(a,"lab"),g=c[0],R=c[1],I=c[2],_=Y1(R*R+I*I),T=(J1(I,R)*V1+360)%360;return X1(_*1e4)===0&&(T=Number.NaN),[g,_,T]},Q1=Z1,ry=d.unpack,ey=function(){for(var a=[],i=arguments.length;i--;)a[i]=arguments[i];var c=ry(a,"rgb"),g=c[0],R=c[1],I=c[2],_=Bs(g,R,I),T=_[0],P=_[1],D=_[2];return Q1(T,P,D)},Ks=ey,ty=d.unpack,ny=d.DEG2RAD,ay=Math.sin,oy=Math.cos,iy=function(){for(var a=[],i=arguments.length;i--;)a[i]=arguments[i];var c=ty(a,"lch"),g=c[0],R=c[1],I=c[2];return isNaN(I)&&(I=0),I=I*ny,[g,oy(I)*R,ay(I)*R]},uy=iy,sy=d.unpack,cy=function(){for(var a=[],i=arguments.length;i--;)a[i]=arguments[i];a=sy(a,"lch");var c=a[0],g=a[1],R=a[2],I=uy(c,g,R),_=I[0],T=I[1],P=I[2],D=Gs(_,T,P),L=D[0],j=D[1],z=D[2];return[L,j,z,a.length>3?a[3]:1]},zs=cy,fy=d.unpack,ly=function(){for(var a=[],i=arguments.length;i--;)a[i]=arguments[i];var c=fy(a,"hcl").reverse();return zs.apply(void 0,c)},vy=ly,dy=d.unpack,hy=d.type;b.prototype.lch=function(){return Ks(this._rgb)},b.prototype.hcl=function(){return Ks(this._rgb).reverse()},m.lch=function(){for(var a=[],i=arguments.length;i--;)a[i]=arguments[i];return new(Function.prototype.bind.apply(b,[null].concat(a,["lch"])))},m.hcl=function(){for(var a=[],i=arguments.length;i--;)a[i]=arguments[i];return new(Function.prototype.bind.apply(b,[null].concat(a,["hcl"])))},p.format.lch=zs,p.format.hcl=vy,["lch","hcl"].forEach(function(a){return p.autodetect.push({p:2,test:function(){for(var i=[],c=arguments.length;c--;)i[c]=arguments[c];if(i=dy(i,a),hy(i)==="array"&&i.length===3)return a}})});var py={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflower:"#6495ed",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",laserlemon:"#ffff54",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrod:"#fafad2",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",maroon2:"#7f0000",maroon3:"#b03060",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",purple2:"#7f007f",purple3:"#a020f0",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"},Ae=py,yy=d.type;b.prototype.name=function(){for(var a=sr(this._rgb,"rgb"),i=0,c=Object.keys(Ae);i<c.length;i+=1){var g=c[i];if(Ae[g]===a)return g.toLowerCase()}return a},p.format.named=function(a){if(a=a.toLowerCase(),Ae[a])return js(Ae[a]);throw new Error("unknown color name: "+a)},p.autodetect.push({p:5,test:function(a){for(var i=[],c=arguments.length-1;c-- >0;)i[c]=arguments[c+1];if(!i.length&&yy(a)==="string"&&Ae[a.toLowerCase()])return"named"}});var by=d.unpack,gy=function(){for(var a=[],i=arguments.length;i--;)a[i]=arguments[i];var c=by(a,"rgb"),g=c[0],R=c[1],I=c[2];return(g<<16)+(R<<8)+I},my=gy,Sy=d.type,_y=function(a){if(Sy(a)=="number"&&a>=0&&a<=16777215){var i=a>>16,c=a>>8&255,g=a&255;return[i,c,g,1]}throw new Error("unknown num color: "+a)},Ry=_y,Iy=d.type;b.prototype.num=function(){return my(this._rgb)},m.num=function(){for(var a=[],i=arguments.length;i--;)a[i]=arguments[i];return new(Function.prototype.bind.apply(b,[null].concat(a,["num"])))},p.format.num=Ry,p.autodetect.push({p:5,test:function(){for(var a=[],i=arguments.length;i--;)a[i]=arguments[i];if(a.length===1&&Iy(a[0])==="number"&&a[0]>=0&&a[0]<=16777215)return"num"}});var Ws=d.unpack,Us=d.type,Hs=Math.round;b.prototype.rgb=function(a){return a===void 0&&(a=!0),a===!1?this._rgb.slice(0,3):this._rgb.slice(0,3).map(Hs)},b.prototype.rgba=function(a){return a===void 0&&(a=!0),this._rgb.slice(0,4).map(function(i,c){return c<3?a===!1?i:Hs(i):i})},m.rgb=function(){for(var a=[],i=arguments.length;i--;)a[i]=arguments[i];return new(Function.prototype.bind.apply(b,[null].concat(a,["rgb"])))},p.format.rgb=function(){for(var a=[],i=arguments.length;i--;)a[i]=arguments[i];var c=Ws(a,"rgba");return c[3]===void 0&&(c[3]=1),c},p.autodetect.push({p:3,test:function(){for(var a=[],i=arguments.length;i--;)a[i]=arguments[i];if(a=Ws(a,"rgba"),Us(a)==="array"&&(a.length===3||a.length===4&&Us(a[3])=="number"&&a[3]>=0&&a[3]<=1))return"rgb"}});var kt=Math.log,qy=function(a){var i=a/100,c,g,R;return i<66?(c=255,g=-155.25485562709179-.44596950469579133*(g=i-2)+104.49216199393888*kt(g),R=i<20?0:-254.76935184120902+.8274096064007395*(R=i-10)+115.67994401066147*kt(R)):(c=351.97690566805693+.114206453784165*(c=i-55)-40.25366309332127*kt(c),g=325.4494125711974+.07943456536662342*(g=i-50)-28.0852963507957*kt(g),R=255),[c,g,R,1]},Vs=qy,wy=d.unpack,Ey=Math.round,Oy=function(){for(var a=[],i=arguments.length;i--;)a[i]=arguments[i];for(var c=wy(a,"rgb"),g=c[0],R=c[2],I=1e3,_=4e4,T=.4,P;_-I>T;){P=(_+I)*.5;var D=Vs(P);D[2]/D[0]>=R/g?_=P:I=P}return Ey(P)},Ty=Oy;b.prototype.temp=b.prototype.kelvin=b.prototype.temperature=function(){return Ty(this._rgb)},m.temp=m.kelvin=m.temperature=function(){for(var a=[],i=arguments.length;i--;)a[i]=arguments[i];return new(Function.prototype.bind.apply(b,[null].concat(a,["temp"])))},p.format.temp=p.format.kelvin=p.format.temperature=Vs;var xy=d.type;b.prototype.alpha=function(a,i){return i===void 0&&(i=!1),a!==void 0&&xy(a)==="number"?i?(this._rgb[3]=a,this):new b([this._rgb[0],this._rgb[1],this._rgb[2],a],"rgb"):this._rgb[3]},b.prototype.clipped=function(){return this._rgb._clipped||!1},b.prototype.darken=function(a){a===void 0&&(a=1);var i=this,c=i.lab();return c[0]-=jr.Kn*a,new b(c,"lab").alpha(i.alpha(),!0)},b.prototype.brighten=function(a){return a===void 0&&(a=1),this.darken(-a)},b.prototype.darker=b.prototype.darken,b.prototype.brighter=b.prototype.brighten,b.prototype.get=function(a){var i=a.split("."),c=i[0],g=i[1],R=this[c]();if(g){var I=c.indexOf(g);if(I>-1)return R[I];throw new Error("unknown channel "+g+" in mode "+c)}else return R};var Py=d.type,$y=Math.pow,Ay=1e-7,My=20;b.prototype.luminance=function(a){if(a!==void 0&&Py(a)==="number"){if(a===0)return new b([0,0,0,this._rgb[3]],"rgb");if(a===1)return new b([255,255,255,this._rgb[3]],"rgb");var i=this.luminance(),c="rgb",g=My,R=function(_,T){var P=_.interpolate(T,.5,c),D=P.luminance();return Math.abs(a-D)<Ay||!g--?P:D>a?R(_,P):R(P,T)},I=(i>a?R(new b([0,0,0]),this):R(this,new b([255,255,255]))).rgb();return new b(I.concat([this._rgb[3]]))}return Cy.apply(void 0,this._rgb.slice(0,3))};var Cy=function(a,i,c){return a=hn(a),i=hn(i),c=hn(c),.2126*a+.7152*i+.0722*c},hn=function(a){return a/=255,a<=.03928?a/12.92:$y((a+.055)/1.055,2.4)},Lr={},Ys=d.type,Js=function(a,i,c){c===void 0&&(c=.5);for(var g=[],R=arguments.length-3;R-- >0;)g[R]=arguments[R+3];var I=g[0]||"lrgb";if(!Lr[I]&&!g.length&&(I=Object.keys(Lr)[0]),!Lr[I])throw new Error("interpolation mode "+I+" is not defined");return Ys(a)!=="object"&&(a=new b(a)),Ys(i)!=="object"&&(i=new b(i)),Lr[I](a,i,c).alpha(a.alpha()+c*(i.alpha()-a.alpha()))};b.prototype.mix=b.prototype.interpolate=function(a,i){i===void 0&&(i=.5);for(var c=[],g=arguments.length-2;g-- >0;)c[g]=arguments[g+2];return Js.apply(void 0,[this,a,i].concat(c))},b.prototype.premultiply=function(a){a===void 0&&(a=!1);var i=this._rgb,c=i[3];return a?(this._rgb=[i[0]*c,i[1]*c,i[2]*c,c],this):new b([i[0]*c,i[1]*c,i[2]*c,c],"rgb")},b.prototype.saturate=function(a){a===void 0&&(a=1);var i=this,c=i.lch();return c[1]+=jr.Kn*a,c[1]<0&&(c[1]=0),new b(c,"lch").alpha(i.alpha(),!0)},b.prototype.desaturate=function(a){return a===void 0&&(a=1),this.saturate(-a)};var Xs=d.type;b.prototype.set=function(a,i,c){c===void 0&&(c=!1);var g=a.split("."),R=g[0],I=g[1],_=this[R]();if(I){var T=R.indexOf(I);if(T>-1){if(Xs(i)=="string")switch(i.charAt(0)){case"+":_[T]+=+i;break;case"-":_[T]+=+i;break;case"*":_[T]*=+i.substr(1);break;case"/":_[T]/=+i.substr(1);break;default:_[T]=+i}else if(Xs(i)==="number")_[T]=i;else throw new Error("unsupported value for Color.set");var P=new b(_,R);return c?(this._rgb=P._rgb,this):P}throw new Error("unknown channel "+I+" in mode "+R)}else return _};var Fy=function(a,i,c){var g=a._rgb,R=i._rgb;return new b(g[0]+c*(R[0]-g[0]),g[1]+c*(R[1]-g[1]),g[2]+c*(R[2]-g[2]),"rgb")};Lr.rgb=Fy;var pn=Math.sqrt,Me=Math.pow,ky=function(a,i,c){var g=a._rgb,R=g[0],I=g[1],_=g[2],T=i._rgb,P=T[0],D=T[1],L=T[2];return new b(pn(Me(R,2)*(1-c)+Me(P,2)*c),pn(Me(I,2)*(1-c)+Me(D,2)*c),pn(Me(_,2)*(1-c)+Me(L,2)*c),"rgb")};Lr.lrgb=ky;var Dy=function(a,i,c){var g=a.lab(),R=i.lab();return new b(g[0]+c*(R[0]-g[0]),g[1]+c*(R[1]-g[1]),g[2]+c*(R[2]-g[2]),"lab")};Lr.lab=Dy;var ot=function(a,i,c,g){var R,I,_,T;g==="hsl"?(_=a.hsl(),T=i.hsl()):g==="hsv"?(_=a.hsv(),T=i.hsv()):g==="hcg"?(_=a.hcg(),T=i.hcg()):g==="hsi"?(_=a.hsi(),T=i.hsi()):(g==="lch"||g==="hcl")&&(g="hcl",_=a.hcl(),T=i.hcl());var P,D,L,j,z,K;g.substr(0,1)==="h"&&(R=_,P=R[0],L=R[1],z=R[2],I=T,D=I[0],j=I[1],K=I[2]);var H,rr,Y,ir;return!isNaN(P)&&!isNaN(D)?(D>P&&D-P>180?ir=D-(P+360):D<P&&P-D>180?ir=D+360-P:ir=D-P,rr=P+c*ir):isNaN(P)?isNaN(D)?rr=Number.NaN:(rr=D,(z==1||z==0)&&g!="hsv"&&(H=j)):(rr=P,(K==1||K==0)&&g!="hsv"&&(H=L)),H===void 0&&(H=L+c*(j-L)),Y=z+c*(K-z),new b([rr,H,Y],g)},Zs=function(a,i,c){return ot(a,i,c,"lch")};Lr.lch=Zs,Lr.hcl=Zs;var jy=function(a,i,c){var g=a.num(),R=i.num();return new b(g+c*(R-g),"num")};Lr.num=jy;var Ly=function(a,i,c){return ot(a,i,c,"hcg")};Lr.hcg=Ly;var Ny=function(a,i,c){return ot(a,i,c,"hsi")};Lr.hsi=Ny;var By=function(a,i,c){return ot(a,i,c,"hsl")};Lr.hsl=By;var Gy=function(a,i,c){return ot(a,i,c,"hsv")};Lr.hsv=Gy;var Ky=d.clip_rgb,yn=Math.pow,bn=Math.sqrt,gn=Math.PI,Qs=Math.cos,rc=Math.sin,zy=Math.atan2,Wy=function(a,i,c){i===void 0&&(i="lrgb"),c===void 0&&(c=null);var g=a.length;c||(c=Array.from(new Array(g)).map(function(){return 1}));var R=g/c.reduce(function(rr,Y){return rr+Y});if(c.forEach(function(rr,Y){c[Y]*=R}),a=a.map(function(rr){return new b(rr)}),i==="lrgb")return Uy(a,c);for(var I=a.shift(),_=I.get(i),T=[],P=0,D=0,L=0;L<_.length;L++)if(_[L]=(_[L]||0)*c[0],T.push(isNaN(_[L])?0:c[0]),i.charAt(L)==="h"&&!isNaN(_[L])){var j=_[L]/180*gn;P+=Qs(j)*c[0],D+=rc(j)*c[0]}var z=I.alpha()*c[0];a.forEach(function(rr,Y){var ir=rr.get(i);z+=rr.alpha()*c[Y+1];for(var vr=0;vr<_.length;vr++)if(!isNaN(ir[vr]))if(T[vr]+=c[Y+1],i.charAt(vr)==="h"){var Or=ir[vr]/180*gn;P+=Qs(Or)*c[Y+1],D+=rc(Or)*c[Y+1]}else _[vr]+=ir[vr]*c[Y+1]});for(var K=0;K<_.length;K++)if(i.charAt(K)==="h"){for(var H=zy(D/T[K],P/T[K])/gn*180;H<0;)H+=360;for(;H>=360;)H-=360;_[K]=H}else _[K]=_[K]/T[K];return z/=g,new b(_,i).alpha(z>.99999?1:z,!0)},Uy=function(a,i){for(var c=a.length,g=[0,0,0,0],R=0;R<a.length;R++){var I=a[R],_=i[R]/c,T=I._rgb;g[0]+=yn(T[0],2)*_,g[1]+=yn(T[1],2)*_,g[2]+=yn(T[2],2)*_,g[3]+=T[3]*_}return g[0]=bn(g[0]),g[1]=bn(g[1]),g[2]=bn(g[2]),g[3]>.9999999&&(g[3]=1),new b(Ky(g))},Ce=d.type,Hy=Math.pow,Dt=function(a){var i="rgb",c=m("#ccc"),g=0,R=[0,1],I=[],_=[0,0],T=!1,P=[],D=!1,L=0,j=1,z=!1,K={},H=!0,rr=1,Y=function(N){if(N=N||["#fff","#000"],N&&Ce(N)==="string"&&m.brewer&&m.brewer[N.toLowerCase()]&&(N=m.brewer[N.toLowerCase()]),Ce(N)==="array"){N.length===1&&(N=[N[0],N[0]]),N=N.slice(0);for(var U=0;U<N.length;U++)N[U]=m(N[U]);I.length=0;for(var er=0;er<N.length;er++)I.push(er/(N.length-1))}return Kr(),P=N},ir=function(N){if(T!=null){for(var U=T.length-1,er=0;er<U&&N>=T[er];)er++;return er-1}return 0},vr=function(N){return N},Or=function(N){return N},Tr=function(N,U){var er,Z;if(U==null&&(U=!1),isNaN(N)||N===null)return c;if(U)Z=N;else if(T&&T.length>2){var Nr=ir(N);Z=Nr/(T.length-2)}else j!==L?Z=(N-L)/(j-L):Z=1;Z=Or(Z),U||(Z=vr(Z)),rr!==1&&(Z=Hy(Z,rr)),Z=_[0]+Z*(1-_[0]-_[1]),Z=Math.min(1,Math.max(0,Z));var br=Math.floor(Z*1e4);if(H&&K[br])er=K[br];else{if(Ce(P)==="array")for(var cr=0;cr<I.length;cr++){var fr=I[cr];if(Z<=fr){er=P[cr];break}if(Z>=fr&&cr===I.length-1){er=P[cr];break}if(Z>fr&&Z<I[cr+1]){Z=(Z-fr)/(I[cr+1]-fr),er=m.interpolate(P[cr],P[cr+1],Z,i);break}}else Ce(P)==="function"&&(er=P(Z));H&&(K[br]=er)}return er},Kr=function(){return K={}};Y(a);var nr=function(N){var U=m(Tr(N));return D&&U[D]?U[D]():U};return nr.classes=function(N){if(N!=null){if(Ce(N)==="array")T=N,R=[N[0],N[N.length-1]];else{var U=m.analyze(R);N===0?T=[U.min,U.max]:T=m.limits(U,"e",N)}return nr}return T},nr.domain=function(N){if(!arguments.length)return R;L=N[0],j=N[N.length-1],I=[];var U=P.length;if(N.length===U&&L!==j)for(var er=0,Z=Array.from(N);er<Z.length;er+=1){var Nr=Z[er];I.push((Nr-L)/(j-L))}else{for(var br=0;br<U;br++)I.push(br/(U-1));if(N.length>2){var cr=N.map(function(qr,dr){return dr/(N.length-1)}),fr=N.map(function(qr){return(qr-L)/(j-L)});fr.every(function(qr,dr){return cr[dr]===qr})||(Or=function(qr){if(qr<=0||qr>=1)return qr;for(var dr=0;qr>=fr[dr+1];)dr++;var le=(qr-fr[dr])/(fr[dr+1]-fr[dr]),Fe=cr[dr]+le*(cr[dr+1]-cr[dr]);return Fe})}}return R=[L,j],nr},nr.mode=function(N){return arguments.length?(i=N,Kr(),nr):i},nr.range=function(N,U){return Y(N),nr},nr.out=function(N){return D=N,nr},nr.spread=function(N){return arguments.length?(g=N,nr):g},nr.correctLightness=function(N){return N==null&&(N=!0),z=N,Kr(),z?vr=function(U){for(var er=Tr(0,!0).lab()[0],Z=Tr(1,!0).lab()[0],Nr=er>Z,br=Tr(U,!0).lab()[0],cr=er+(Z-er)*U,fr=br-cr,qr=0,dr=1,le=20;Math.abs(fr)>.01&&le-- >0;)(function(){return Nr&&(fr*=-1),fr<0?(qr=U,U+=(dr-U)*.5):(dr=U,U+=(qr-U)*.5),br=Tr(U,!0).lab()[0],fr=br-cr})();return U}:vr=function(U){return U},nr},nr.padding=function(N){return N!=null?(Ce(N)==="number"&&(N=[N,N]),_=N,nr):_},nr.colors=function(N,U){arguments.length<2&&(U="hex");var er=[];if(arguments.length===0)er=P.slice(0);else if(N===1)er=[nr(.5)];else if(N>1){var Z=R[0],Nr=R[1]-Z;er=Vy(0,N).map(function(dr){return nr(Z+dr/(N-1)*Nr)})}else{a=[];var br=[];if(T&&T.length>2)for(var cr=1,fr=T.length,qr=1<=fr;qr?cr<fr:cr>fr;qr?cr++:cr--)br.push((T[cr-1]+T[cr])*.5);else br=R;er=br.map(function(dr){return nr(dr)})}return m[U]&&(er=er.map(function(dr){return dr[U]()})),er},nr.cache=function(N){return N!=null?(H=N,nr):H},nr.gamma=function(N){return N!=null?(rr=N,nr):rr},nr.nodata=function(N){return N!=null?(c=m(N),nr):c},nr};function Vy(a,i,c){for(var g=[],R=a<i,I=i,_=a;R?_<I:_>I;R?_++:_--)g.push(_);return g}var mn=function(a){var i,c,g,R,I,_,T;if(a=a.map(function(j){return new b(j)}),a.length===2)i=a.map(function(j){return j.lab()}),I=i[0],_=i[1],R=function(j){var z=[0,1,2].map(function(K){return I[K]+j*(_[K]-I[K])});return new b(z,"lab")};else if(a.length===3)c=a.map(function(j){return j.lab()}),I=c[0],_=c[1],T=c[2],R=function(j){var z=[0,1,2].map(function(K){return(1-j)*(1-j)*I[K]+2*(1-j)*j*_[K]+j*j*T[K]});return new b(z,"lab")};else if(a.length===4){var P;g=a.map(function(j){return j.lab()}),I=g[0],_=g[1],T=g[2],P=g[3],R=function(j){var z=[0,1,2].map(function(K){return(1-j)*(1-j)*(1-j)*I[K]+3*(1-j)*(1-j)*j*_[K]+3*(1-j)*j*j*T[K]+j*j*j*P[K]});return new b(z,"lab")}}else if(a.length===5){var D=mn(a.slice(0,3)),L=mn(a.slice(2,5));R=function(j){return j<.5?D(j*2):L((j-.5)*2)}}return R},Yy=function(a){var i=mn(a);return i.scale=function(){return Dt(i)},i},Zr=function(a,i,c){if(!Zr[c])throw new Error("unknown blend mode "+c);return Zr[c](a,i)},ce=function(a){return function(i,c){var g=m(c).rgb(),R=m(i).rgb();return m.rgb(a(g,R))}},fe=function(a){return function(i,c){var g=[];return g[0]=a(i[0],c[0]),g[1]=a(i[1],c[1]),g[2]=a(i[2],c[2]),g}},Jy=function(a){return a},Xy=function(a,i){return a*i/255},Zy=function(a,i){return a>i?i:a},Qy=function(a,i){return a>i?a:i},rb=function(a,i){return 255*(1-(1-a/255)*(1-i/255))},eb=function(a,i){return i<128?2*a*i/255:255*(1-2*(1-a/255)*(1-i/255))},tb=function(a,i){return 255*(1-(1-i/255)/(a/255))},nb=function(a,i){return a===255?255:(a=255*(i/255)/(1-a/255),a>255?255:a)};Zr.normal=ce(fe(Jy)),Zr.multiply=ce(fe(Xy)),Zr.screen=ce(fe(rb)),Zr.overlay=ce(fe(eb)),Zr.darken=ce(fe(Zy)),Zr.lighten=ce(fe(Qy)),Zr.dodge=ce(fe(nb)),Zr.burn=ce(fe(tb));for(var ab=Zr,Sn=d.type,ob=d.clip_rgb,ib=d.TWOPI,ub=Math.pow,sb=Math.sin,cb=Math.cos,fb=function(a,i,c,g,R){a===void 0&&(a=300),i===void 0&&(i=-1.5),c===void 0&&(c=1),g===void 0&&(g=1),R===void 0&&(R=[0,1]);var I=0,_;Sn(R)==="array"?_=R[1]-R[0]:(_=0,R=[R,R]);var T=function(P){var D=ib*((a+120)/360+i*P),L=ub(R[0]+_*P,g),j=I!==0?c[0]+P*I:c,z=j*L*(1-L)/2,K=cb(D),H=sb(D),rr=L+z*(-.14861*K+1.78277*H),Y=L+z*(-.29227*K-.90649*H),ir=L+z*(1.97294*K);return m(ob([rr*255,Y*255,ir*255,1]))};return T.start=function(P){return P==null?a:(a=P,T)},T.rotations=function(P){return P==null?i:(i=P,T)},T.gamma=function(P){return P==null?g:(g=P,T)},T.hue=function(P){return P==null?c:(c=P,Sn(c)==="array"?(I=c[1]-c[0],I===0&&(c=c[1])):I=0,T)},T.lightness=function(P){return P==null?R:(Sn(P)==="array"?(R=P,_=P[1]-P[0]):(R=[P,P],_=0),T)},T.scale=function(){return m.scale(T)},T.hue(c),T},lb="0123456789abcdef",vb=Math.floor,db=Math.random,hb=function(){for(var a="#",i=0;i<6;i++)a+=lb.charAt(vb(db()*16));return new b(a,"hex")},ec=Math.log,pb=Math.pow,yb=Math.floor,bb=Math.abs,tc=function(a,i){i===void 0&&(i=null);var c={min:Number.MAX_VALUE,max:Number.MAX_VALUE*-1,sum:0,values:[],count:0};return l(a)==="object"&&(a=Object.values(a)),a.forEach(function(g){i&&l(g)==="object"&&(g=g[i]),g!=null&&!isNaN(g)&&(c.values.push(g),c.sum+=g,g<c.min&&(c.min=g),g>c.max&&(c.max=g),c.count+=1)}),c.domain=[c.min,c.max],c.limits=function(g,R){return nc(c,g,R)},c},nc=function(a,i,c){i===void 0&&(i="equal"),c===void 0&&(c=7),l(a)=="array"&&(a=tc(a));var g=a.min,R=a.max,I=a.values.sort(function(En,On){return En-On});if(c===1)return[g,R];var _=[];if(i.substr(0,1)==="c"&&(_.push(g),_.push(R)),i.substr(0,1)==="e"){_.push(g);for(var T=1;T<c;T++)_.push(g+T/c*(R-g));_.push(R)}else if(i.substr(0,1)==="l"){if(g<=0)throw new Error("Logarithmic scales are only possible for values > 0");var P=Math.LOG10E*ec(g),D=Math.LOG10E*ec(R);_.push(g);for(var L=1;L<c;L++)_.push(pb(10,P+L/c*(D-P)));_.push(R)}else if(i.substr(0,1)==="q"){_.push(g);for(var j=1;j<c;j++){var z=(I.length-1)*j/c,K=yb(z);if(K===z)_.push(I[K]);else{var H=z-K;_.push(I[K]*(1-H)+I[K+1]*H)}}_.push(R)}else if(i.substr(0,1)==="k"){var rr,Y=I.length,ir=new Array(Y),vr=new Array(c),Or=!0,Tr=0,Kr=null;Kr=[],Kr.push(g);for(var nr=1;nr<c;nr++)Kr.push(g+nr/c*(R-g));for(Kr.push(R);Or;){for(var N=0;N<c;N++)vr[N]=0;for(var U=0;U<Y;U++)for(var er=I[U],Z=Number.MAX_VALUE,Nr=void 0,br=0;br<c;br++){var cr=bb(Kr[br]-er);cr<Z&&(Z=cr,Nr=br),vr[Nr]++,ir[U]=Nr}for(var fr=new Array(c),qr=0;qr<c;qr++)fr[qr]=null;for(var dr=0;dr<Y;dr++)rr=ir[dr],fr[rr]===null?fr[rr]=I[dr]:fr[rr]+=I[dr];for(var le=0;le<c;le++)fr[le]*=1/vr[le];Or=!1;for(var Fe=0;Fe<c;Fe++)if(fr[Fe]!==Kr[Fe]){Or=!0;break}Kr=fr,Tr++,Tr>200&&(Or=!1)}for(var it={},In=0;In<c;In++)it[In]=[];for(var Nt=0;Nt<Y;Nt++)rr=ir[Nt],it[rr].push(I[Nt]);for(var ye=[],ut=0;ut<c;ut++)ye.push(it[ut][0]),ye.push(it[ut][it[ut].length-1]);ye=ye.sort(function(En,On){return En-On}),_.push(ye[0]);for(var qn=1;qn<ye.length;qn+=2){var wn=ye[qn];!isNaN(wn)&&_.indexOf(wn)===-1&&_.push(wn)}}return _},ac={analyze:tc,limits:nc},gb=function(a,i){a=new b(a),i=new b(i);var c=a.luminance(),g=i.luminance();return c>g?(c+.05)/(g+.05):(g+.05)/(c+.05)},jt=Math.sqrt,mb=Math.atan2,oc=Math.abs,ic=Math.cos,_n=Math.PI,Sb=function(a,i,c,g){c===void 0&&(c=1),g===void 0&&(g=1),a=new b(a),i=new b(i);for(var R=Array.from(a.lab()),I=R[0],_=R[1],T=R[2],P=Array.from(i.lab()),D=P[0],L=P[1],j=P[2],z=jt(_*_+T*T),K=jt(L*L+j*j),H=I<16?.511:.040975*I/(1+.01765*I),rr=.0638*z/(1+.0131*z)+.638,Y=z<1e-6?0:mb(T,_)*180/_n;Y<0;)Y+=360;for(;Y>=360;)Y-=360;var ir=Y>=164&&Y<=345?.56+oc(.2*ic(_n*(Y+168)/180)):.36+oc(.4*ic(_n*(Y+35)/180)),vr=z*z*z*z,Or=jt(vr/(vr+1900)),Tr=rr*(Or*ir+1-Or),Kr=I-D,nr=z-K,N=_-L,U=T-j,er=N*N+U*U-nr*nr,Z=Kr/(c*H),Nr=nr/(g*rr),br=Tr;return jt(Z*Z+Nr*Nr+er/(br*br))},_b=function(a,i,c){c===void 0&&(c="lab"),a=new b(a),i=new b(i);var g=a.get(c),R=i.get(c),I=0;for(var _ in g){var T=(g[_]||0)-(R[_]||0);I+=T*T}return Math.sqrt(I)},Rb=function(){for(var a=[],i=arguments.length;i--;)a[i]=arguments[i];try{return new(Function.prototype.bind.apply(b,[null].concat(a))),!0}catch{return!1}},Ib={cool:function(){return Dt([m.hsl(180,1,.9),m.hsl(250,.7,.4)])},hot:function(){return Dt(["#000","#f00","#ff0","#fff"]).mode("rgb")}},Lt={OrRd:["#fff7ec","#fee8c8","#fdd49e","#fdbb84","#fc8d59","#ef6548","#d7301f","#b30000","#7f0000"],PuBu:["#fff7fb","#ece7f2","#d0d1e6","#a6bddb","#74a9cf","#3690c0","#0570b0","#045a8d","#023858"],BuPu:["#f7fcfd","#e0ecf4","#bfd3e6","#9ebcda","#8c96c6","#8c6bb1","#88419d","#810f7c","#4d004b"],Oranges:["#fff5eb","#fee6ce","#fdd0a2","#fdae6b","#fd8d3c","#f16913","#d94801","#a63603","#7f2704"],BuGn:["#f7fcfd","#e5f5f9","#ccece6","#99d8c9","#66c2a4","#41ae76","#238b45","#006d2c","#00441b"],YlOrBr:["#ffffe5","#fff7bc","#fee391","#fec44f","#fe9929","#ec7014","#cc4c02","#993404","#662506"],YlGn:["#ffffe5","#f7fcb9","#d9f0a3","#addd8e","#78c679","#41ab5d","#238443","#006837","#004529"],Reds:["#fff5f0","#fee0d2","#fcbba1","#fc9272","#fb6a4a","#ef3b2c","#cb181d","#a50f15","#67000d"],RdPu:["#fff7f3","#fde0dd","#fcc5c0","#fa9fb5","#f768a1","#dd3497","#ae017e","#7a0177","#49006a"],Greens:["#f7fcf5","#e5f5e0","#c7e9c0","#a1d99b","#74c476","#41ab5d","#238b45","#006d2c","#00441b"],YlGnBu:["#ffffd9","#edf8b1","#c7e9b4","#7fcdbb","#41b6c4","#1d91c0","#225ea8","#253494","#081d58"],Purples:["#fcfbfd","#efedf5","#dadaeb","#bcbddc","#9e9ac8","#807dba","#6a51a3","#54278f","#3f007d"],GnBu:["#f7fcf0","#e0f3db","#ccebc5","#a8ddb5","#7bccc4","#4eb3d3","#2b8cbe","#0868ac","#084081"],Greys:["#ffffff","#f0f0f0","#d9d9d9","#bdbdbd","#969696","#737373","#525252","#252525","#000000"],YlOrRd:["#ffffcc","#ffeda0","#fed976","#feb24c","#fd8d3c","#fc4e2a","#e31a1c","#bd0026","#800026"],PuRd:["#f7f4f9","#e7e1ef","#d4b9da","#c994c7","#df65b0","#e7298a","#ce1256","#980043","#67001f"],Blues:["#f7fbff","#deebf7","#c6dbef","#9ecae1","#6baed6","#4292c6","#2171b5","#08519c","#08306b"],PuBuGn:["#fff7fb","#ece2f0","#d0d1e6","#a6bddb","#67a9cf","#3690c0","#02818a","#016c59","#014636"],Viridis:["#440154","#482777","#3f4a8a","#31678e","#26838f","#1f9d8a","#6cce5a","#b6de2b","#fee825"],Spectral:["#9e0142","#d53e4f","#f46d43","#fdae61","#fee08b","#ffffbf","#e6f598","#abdda4","#66c2a5","#3288bd","#5e4fa2"],RdYlGn:["#a50026","#d73027","#f46d43","#fdae61","#fee08b","#ffffbf","#d9ef8b","#a6d96a","#66bd63","#1a9850","#006837"],RdBu:["#67001f","#b2182b","#d6604d","#f4a582","#fddbc7","#f7f7f7","#d1e5f0","#92c5de","#4393c3","#2166ac","#053061"],PiYG:["#8e0152","#c51b7d","#de77ae","#f1b6da","#fde0ef","#f7f7f7","#e6f5d0","#b8e186","#7fbc41","#4d9221","#276419"],PRGn:["#40004b","#762a83","#9970ab","#c2a5cf","#e7d4e8","#f7f7f7","#d9f0d3","#a6dba0","#5aae61","#1b7837","#00441b"],RdYlBu:["#a50026","#d73027","#f46d43","#fdae61","#fee090","#ffffbf","#e0f3f8","#abd9e9","#74add1","#4575b4","#313695"],BrBG:["#543005","#8c510a","#bf812d","#dfc27d","#f6e8c3","#f5f5f5","#c7eae5","#80cdc1","#35978f","#01665e","#003c30"],RdGy:["#67001f","#b2182b","#d6604d","#f4a582","#fddbc7","#ffffff","#e0e0e0","#bababa","#878787","#4d4d4d","#1a1a1a"],PuOr:["#7f3b08","#b35806","#e08214","#fdb863","#fee0b6","#f7f7f7","#d8daeb","#b2abd2","#8073ac","#542788","#2d004b"],Set2:["#66c2a5","#fc8d62","#8da0cb","#e78ac3","#a6d854","#ffd92f","#e5c494","#b3b3b3"],Accent:["#7fc97f","#beaed4","#fdc086","#ffff99","#386cb0","#f0027f","#bf5b17","#666666"],Set1:["#e41a1c","#377eb8","#4daf4a","#984ea3","#ff7f00","#ffff33","#a65628","#f781bf","#999999"],Set3:["#8dd3c7","#ffffb3","#bebada","#fb8072","#80b1d3","#fdb462","#b3de69","#fccde5","#d9d9d9","#bc80bd","#ccebc5","#ffed6f"],Dark2:["#1b9e77","#d95f02","#7570b3","#e7298a","#66a61e","#e6ab02","#a6761d","#666666"],Paired:["#a6cee3","#1f78b4","#b2df8a","#33a02c","#fb9a99","#e31a1c","#fdbf6f","#ff7f00","#cab2d6","#6a3d9a","#ffff99","#b15928"],Pastel2:["#b3e2cd","#fdcdac","#cbd5e8","#f4cae4","#e6f5c9","#fff2ae","#f1e2cc","#cccccc"],Pastel1:["#fbb4ae","#b3cde3","#ccebc5","#decbe4","#fed9a6","#ffffcc","#e5d8bd","#fddaec","#f2f2f2"]},Rn=0,uc=Object.keys(Lt);Rn<uc.length;Rn+=1){var sc=uc[Rn];Lt[sc.toLowerCase()]=Lt[sc]}var qb=Lt;m.average=Wy,m.bezier=Yy,m.blend=ab,m.cubehelix=fb,m.mix=m.interpolate=Js,m.random=hb,m.scale=Dt,m.analyze=ac.analyze,m.contrast=gb,m.deltaE=Sb,m.distance=_b,m.limits=ac.limits,m.valid=Rb,m.scales=Ib,m.colors=Ae,m.brewer=qb;var wb=m;return wb}))})(Gt)),Gt.exports}var us=Km();const ur=gr(us);var $i,rd;function zm(){return rd||(rd=1,$i=kp()),$i}var Wm=zm();const Um=gr(Wm);var Ai,ed;function Hm(){return ed||(ed=1,Ai=Pp()),Ai}var Vm=Hm();const Ym=gr(Vm);var Mi,td;function Jm(){return td||(td=1,Mi=jp()),Mi}var Xm=Jm();const ve=gr(Xm);var Ci,nd;function Zm(){if(nd)return Ci;nd=1,gp();var r=ne();return Ci=r("Array","concat"),Ci}var Fi,ad;function Qm(){if(ad)return Fi;ad=1;var r=zr(),e=Zm(),t=Array.prototype;return Fi=function(n){var o=n.concat;return n===t||r(t,n)&&o===t.concat?e:o},Fi}var ki,od;function r2(){if(od)return ki;od=1;var r=Qm();return ki=r,ki}var Di,id;function e2(){return id||(id=1,Di=r2()),Di}var t2=e2();const je=gr(t2);var ud={},ji,sd;function n2(){if(sd)return ji;sd=1;var r=Fr(),e=Ve(),t=TypeError,n=Object.getOwnPropertyDescriptor,o=r&&!(function(){if(this!==void 0)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(s){return s instanceof TypeError}})();return ji=o?function(s,u){if(e(s)&&!n(s,"length").writable)throw new t("Cannot set read only .length");return s.length=u}:function(s,u){return s.length=u},ji}var Li,cd;function Bp(){if(cd)return Li;cd=1;var r=ze(),e=TypeError;return Li=function(t,n){if(!delete t[n])throw new e("Cannot delete property "+r(n)+" of "+r(t))},Li}var fd;function a2(){if(fd)return ud;fd=1;var r=ar(),e=ee(),t=Zt(),n=St(),o=ue(),s=n2(),u=bp(),v=Ss(),l=Jt(),f=Bp(),h=_t(),y=h("splice"),d=Math.max,p=Math.min;return r({target:"Array",proto:!0,forced:!y},{splice:function(w,$){var C=e(this),b=o(C),E=t(w,b),m=arguments.length,O,M,F,q,x,k;for(m===0?O=M=0:m===1?(O=0,M=b-E):(O=m-2,M=p(d(n($),0),b-E)),u(b+O-M),F=v(C,M),q=0;q<M;q++)x=E+q,x in C&&l(F,q,C[x]);if(F.length=M,O<M){for(q=E;q<b-M;q++)x=q+M,k=q+O,x in C?C[k]=C[x]:f(C,k);for(q=b;q>b-M+O;q--)f(C,q-1)}else if(O>M)for(q=b-M;q>E;q--)x=q+M-1,k=q+O-1,x in C?C[k]=C[x]:f(C,k);for(q=0;q<O;q++)C[q+E]=arguments[q+2];return s(C,b-M+O),F}}),ud}var Ni,ld;function o2(){if(ld)return Ni;ld=1,a2();var r=ne();return Ni=r("Array","splice"),Ni}var Bi,vd;function i2(){if(vd)return Bi;vd=1;var r=zr(),e=o2(),t=Array.prototype;return Bi=function(n){var o=n.splice;return n===t||r(t,n)&&o===t.splice?e:o},Bi}var Gi,dd;function u2(){if(dd)return Gi;dd=1;var r=i2();return Gi=r,Gi}var Ki,hd;function s2(){return hd||(hd=1,Ki=u2()),Ki}var c2=s2();const lt=gr(c2);var pd={},yd;function f2(){if(yd)return pd;yd=1;var r=ar(),e=wt().filter,t=_t(),n=t("filter");return r({target:"Array",proto:!0,forced:!n},{filter:function(s){return e(this,s,arguments.length>1?arguments[1]:void 0)}}),pd}var zi,bd;function l2(){if(bd)return zi;bd=1,f2();var r=ne();return zi=r("Array","filter"),zi}var Wi,gd;function v2(){if(gd)return Wi;gd=1;var r=zr(),e=l2(),t=Array.prototype;return Wi=function(n){var o=n.filter;return n===t||r(t,n)&&o===t.filter?e:o},Wi}var Ui,md;function d2(){if(md)return Ui;md=1;var r=v2();return Ui=r,Ui}var Hi,Sd;function h2(){return Sd||(Sd=1,Hi=d2()),Hi}var p2=h2();const Cs=gr(p2);var _d={},Vi,Rd;function y2(){if(Rd)return Vi;Rd=1;var r=tn(),e=Math.floor,t=function(n,o){var s=n.length;if(s<8)for(var u=1,v,l;u<s;){for(l=u,v=n[u];l&&o(n[l-1],v)>0;)n[l]=n[--l];l!==u++&&(n[l]=v)}else for(var f=e(s/2),h=t(r(n,0,f),o),y=t(r(n,f),o),d=h.length,p=y.length,S=0,w=0;S<d||w<p;)n[S+w]=S<d&&w<p?o(h[S],y[w])<=0?h[S++]:y[w++]:S<d?h[S++]:y[w++];return n};return Vi=t,Vi}var Yi,Id;function b2(){if(Id)return Yi;Id=1;var r=pr();return Yi=function(e,t){var n=[][e];return!!n&&r(function(){n.call(null,t||function(){return 1},1)})},Yi}var Ji,qd;function g2(){if(qd)return Ji;qd=1;var r=Ht(),e=r.match(/firefox\/(\d+)/i);return Ji=!!e&&+e[1],Ji}var Xi,wd;function m2(){if(wd)return Xi;wd=1;var r=Ht();return Xi=/MSIE|Trident/.test(r),Xi}var Zi,Ed;function S2(){if(Ed)return Zi;Ed=1;var r=Ht(),e=r.match(/AppleWebKit\/(\d+)\./);return Zi=!!e&&+e[1],Zi}var Od;function _2(){if(Od)return _d;Od=1;var r=ar(),e=_r(),t=We(),n=ee(),o=ue(),s=Bp(),u=_e(),v=pr(),l=y2(),f=b2(),h=g2(),y=m2(),d=Vt(),p=S2(),S=[],w=e(S.sort),$=e(S.push),C=v(function(){S.sort(void 0)}),b=v(function(){S.sort(null)}),E=f("sort"),m=!v(function(){if(d)return d<70;if(!(h&&h>3)){if(y)return!0;if(p)return p<603;var F="",q,x,k,A;for(q=65;q<76;q++){switch(x=String.fromCharCode(q),q){case 66:case 69:case 70:case 72:k=3;break;case 68:case 71:k=4;break;default:k=2}for(A=0;A<47;A++)S.push({k:x+A,v:k})}for(S.sort(function(B,G){return G.v-B.v}),A=0;A<S.length;A++)x=S[A].k.charAt(0),F.charAt(F.length-1)!==x&&(F+=x);return F!=="DGBEFHACIJK"}}),O=C||!b||!E||!m,M=function(F){return function(q,x){return x===void 0?-1:q===void 0?1:F!==void 0?+F(q,x)||0:u(q)>u(x)?1:-1}};return r({target:"Array",proto:!0,forced:O},{sort:function(q){q!==void 0&&t(q);var x=n(this);if(m)return q===void 0?w(x):w(x,q);var k=[],A=o(x),B,G;for(G=0;G<A;G++)G in x&&$(k,x[G]);for(l(k,M(q)),B=o(k),G=0;G<B;)x[G]=k[G++];for(;G<A;)s(x,G++);return x}}),_d}var Qi,Td;function R2(){if(Td)return Qi;Td=1,_2();var r=ne();return Qi=r("Array","sort"),Qi}var ru,xd;function I2(){if(xd)return ru;xd=1;var r=zr(),e=R2(),t=Array.prototype;return ru=function(n){var o=n.sort;return n===t||r(t,n)&&o===t.sort?e:o},ru}var eu,Pd;function q2(){if(Pd)return eu;Pd=1;var r=I2();return eu=r,eu}var tu,$d;function w2(){return $d||($d=1,tu=q2()),tu}var E2=w2();const Kt=gr(E2);var Ad={},Md={},nu={exports:{}},au,Cd;function O2(){if(Cd)return au;Cd=1;var r=pr();return au=r(function(){if(typeof ArrayBuffer=="function"){var e=new ArrayBuffer(8);Object.isExtensible(e)&&Object.defineProperty(e,"a",{value:8})}}),au}var ou,Fd;function T2(){if(Fd)return ou;Fd=1;var r=pr(),e=kr(),t=de(),n=O2(),o=Object.isExtensible,s=r(function(){});return ou=s||n?function(v){return!e(v)||n&&t(v)==="ArrayBuffer"?!1:o?o(v):!0}:o,ou}var iu,kd;function x2(){if(kd)return iu;kd=1;var r=pr();return iu=!r(function(){return Object.isExtensible(Object.preventExtensions({}))}),iu}var Dd;function Gp(){if(Dd)return nu.exports;Dd=1;var r=ar(),e=_r(),t=Rt(),n=kr(),o=Wr(),s=Jr().f,u=Rs(),v=Rp(),l=T2(),f=Yt(),h=x2(),y=!1,d=f("meta"),p=0,S=function(m){s(m,d,{value:{objectID:"O"+p++,weakData:{}}})},w=function(m,O){if(!n(m))return typeof m=="symbol"?m:(typeof m=="string"?"S":"P")+m;if(!o(m,d)){if(!l(m))return"F";if(!O)return"E";S(m)}return m[d].objectID},$=function(m,O){if(!o(m,d)){if(!l(m))return!0;if(!O)return!1;S(m)}return m[d].weakData},C=function(m){return h&&y&&l(m)&&!o(m,d)&&S(m),m},b=function(){E.enable=function(){},y=!0;var m=u.f,O=e([].splice),M={};M[d]=1,m(M).length&&(u.f=function(F){for(var q=m(F),x=0,k=q.length;x<k;x++)if(q[x]===d){O(q,x,1);break}return q},r({target:"Object",stat:!0,forced:!0},{getOwnPropertyNames:v.f}))},E=nu.exports={enable:b,fastKey:w,getWeakData:$,onFreeze:C};return t[d]=!0,nu.exports}var uu,jd;function Kp(){if(jd)return uu;jd=1;var r=mt(),e=Br(),t=ie(),n=ze(),o=Cp(),s=ue(),u=zr(),v=Fp(),l=an(),f=on(),h=TypeError,y=function(p,S){this.stopped=p,this.result=S},d=y.prototype;return uu=function(p,S,w){var $=w&&w.that,C=!!(w&&w.AS_ENTRIES),b=!!(w&&w.IS_RECORD),E=!!(w&&w.IS_ITERATOR),m=!!(w&&w.INTERRUPTED),O=r(S,$),M,F,q,x,k,A,B,G=function(Q){return M&&f(M,"normal"),new y(!0,Q)},W=function(Q){return C?(t(Q),m?O(Q[0],Q[1],G):O(Q[0],Q[1])):m?O(Q,G):O(Q)};if(b)M=p.iterator;else if(E)M=p;else{if(F=l(p),!F)throw new h(n(p)+" is not iterable");if(o(F)){for(q=0,x=s(p);x>q;q++)if(k=W(p[q]),k&&u(d,k))return k;return new y(!1)}M=v(p,F)}for(A=b?p.next:M.next;!(B=e(A,M)).done;){try{k=W(B.value)}catch(Q){f(M,"throw",Q)}if(typeof k=="object"&&k&&u(d,k))return k}return new y(!1)},uu}var su,Ld;function zp(){if(Ld)return su;Ld=1;var r=zr(),e=TypeError;return su=function(t,n){if(r(n,t))return t;throw new e("Incorrect invocation")},su}var cu,Nd;function P2(){if(Nd)return cu;Nd=1;var r=ar(),e=Cr(),t=Gp(),n=pr(),o=He(),s=Kp(),u=zp(),v=xr(),l=kr(),f=pt(),h=Re(),y=Jr().f,d=wt().forEach,p=Fr(),S=qt(),w=S.set,$=S.getterFor;return cu=function(C,b,E){var m=C.indexOf("Map")!==-1,O=C.indexOf("Weak")!==-1,M=m?"set":"add",F=e[C],q=F&&F.prototype,x={},k;if(!p||!v(F)||!(O||q.forEach&&!n(function(){new F().entries().next()})))k=E.getConstructor(b,C,m,M),t.enable();else{k=b(function(G,W){w(u(G,A),{type:C,collection:new F}),f(W)||s(W,G[M],{that:G,AS_ENTRIES:m})});var A=k.prototype,B=$(C);d(["add","clear","delete","forEach","get","has","set","keys","values","entries"],function(G){var W=G==="add"||G==="set";G in q&&!(O&&G==="clear")&&o(A,G,function(Q,hr){var or=B(this).collection;if(!W&&O&&!l(Q))return G==="get"?void 0:!1;var wr=or[G](Q===0?0:Q,hr);return W?this:wr})}),O||y(A,"size",{configurable:!0,get:function(){return B(this).collection.size}})}return h(k,C,!1,!0),x[C]=k,r({global:!0,forced:!0},x),O||E.setStrong(k,C,m),k},cu}var fu,Bd;function $2(){if(Bd)return fu;Bd=1;var r=It();return fu=function(e,t,n){for(var o in t)n&&n.unsafe&&e[o]?e[o]=t[o]:r(e,o,t[o],n);return e},fu}var lu,Gd;function A2(){if(Gd)return lu;Gd=1;var r=re(),e=qs(),t=Rr(),n=Fr(),o=t("species");return lu=function(s){var u=r(s);n&&u&&!u[o]&&e(u,o,{configurable:!0,get:function(){return this}})},lu}var vu,Kd;function M2(){if(Kd)return vu;Kd=1;var r=en(),e=qs(),t=$2(),n=mt(),o=zp(),s=pt(),u=Kp(),v=ws(),l=Es(),f=A2(),h=Fr(),y=Gp().fastKey,d=qt(),p=d.set,S=d.getterFor;return vu={getConstructor:function(w,$,C,b){var E=w(function(q,x){o(q,m),p(q,{type:$,index:r(null),first:null,last:null,size:0}),h||(q.size=0),s(x)||u(x,q[b],{that:q,AS_ENTRIES:C})}),m=E.prototype,O=S($),M=function(q,x,k){var A=O(q),B=F(q,x),G,W;return B?B.value=k:(A.last=B={index:W=y(x,!0),key:x,value:k,previous:G=A.last,next:null,removed:!1},A.first||(A.first=B),G&&(G.next=B),h?A.size++:q.size++,W!=="F"&&(A.index[W]=B)),q},F=function(q,x){var k=O(q),A=y(x),B;if(A!=="F")return k.index[A];for(B=k.first;B;B=B.next)if(B.key===x)return B};return t(m,{clear:function(){for(var x=this,k=O(x),A=k.first;A;)A.removed=!0,A.previous&&(A.previous=A.previous.next=null),A=A.next;k.first=k.last=null,k.index=r(null),h?k.size=0:x.size=0},delete:function(q){var x=this,k=O(x),A=F(x,q);if(A){var B=A.next,G=A.previous;delete k.index[A.index],A.removed=!0,G&&(G.next=B),B&&(B.previous=G),k.first===A&&(k.first=B),k.last===A&&(k.last=G),h?k.size--:x.size--}return!!A},forEach:function(x){for(var k=O(this),A=n(x,arguments.length>1?arguments[1]:void 0),B;B=B?B.next:k.first;)for(A(B.value,B.key,this);B&&B.removed;)B=B.previous},has:function(x){return!!F(this,x)}}),t(m,C?{get:function(x){var k=F(this,x);return k&&k.value},set:function(x,k){return M(this,x===0?0:x,k)}}:{add:function(x){return M(this,x=x===0?0:x,x)}}),h&&e(m,"size",{configurable:!0,get:function(){return O(this).size}}),E},setStrong:function(w,$,C){var b=$+" Iterator",E=S($),m=S(b);v(w,$,function(O,M){p(this,{type:b,target:O,state:E(O),kind:M,last:null})},function(){for(var O=m(this),M=O.kind,F=O.last;F&&F.removed;)F=F.previous;return!O.target||!(O.last=F=F?F.next:O.state.first)?(O.target=null,l(void 0,!0)):l(M==="keys"?F.key:M==="values"?F.value:[F.key,F.value],!1)},C?"entries":"values",!C,!0),f($)}},vu}var zd;function C2(){if(zd)return Md;zd=1;var r=P2(),e=M2();return r("Set",function(t){return function(){return t(this,arguments.length?arguments[0]:void 0)}},e),Md}var Wd;function F2(){return Wd||(Wd=1,C2()),Ad}var Ud={},du,Hd;function Ie(){if(Hd)return du;Hd=1;var r=ze(),e=TypeError;return du=function(t){if(typeof t=="object"&&"size"in t&&"has"in t&&"add"in t&&"delete"in t&&"keys"in t)return t;throw new e(r(t)+" is not a set")},du}var hu,Vd;function k2(){return Vd||(Vd=1,hu=function(r,e){return e===1?function(t,n){return t[r](n)}:function(t,n,o){return t[r](n,o)}}),hu}var pu,Yd;function qe(){if(Yd)return pu;Yd=1;var r=re(),e=k2(),t=r("Set"),n=t.prototype;return pu={Set:t,add:e("add",1),has:e("has",1),remove:e("delete",1),proto:n},pu}var yu,Jd;function we(){if(Jd)return yu;Jd=1;var r=Br();return yu=function(e,t,n){for(var o=n?e:e.iterator,s=e.next,u,v;!(u=r(s,o)).done;)if(v=t(u.value),v!==void 0)return v},yu}var bu,Xd;function Et(){if(Xd)return bu;Xd=1;var r=we();return bu=function(e,t,n){return n?r(e.keys(),t,!0):e.forEach(t)},bu}var gu,Zd;function Fs(){if(Zd)return gu;Zd=1;var r=qe(),e=Et(),t=r.Set,n=r.add;return gu=function(o){var s=new t;return e(o,function(u){n(s,u)}),s},gu}var mu,Qd;function Ot(){return Qd||(Qd=1,mu=function(r){return r.size}),mu}var Su,rh;function D2(){return rh||(rh=1,Su=function(r){return{iterator:r,next:r.next,done:!1}}),Su}var _u,eh;function Ee(){if(eh)return _u;eh=1;var r=We(),e=ie(),t=Br(),n=St(),o=D2(),s="Invalid size",u=RangeError,v=TypeError,l=Math.max,f=function(h,y){this.set=h,this.size=l(y,0),this.has=r(h.has),this.keys=r(h.keys)};return f.prototype={getIterator:function(){return o(e(t(this.keys,this.set)))},includes:function(h){return t(this.has,this.set,h)}},_u=function(h){e(h);var y=+h.size;if(y!==y)throw new v(s);var d=n(y);if(d<0)throw new u(s);return new f(h,d)},_u}var Ru,th;function j2(){if(th)return Ru;th=1;var r=Ie(),e=qe(),t=Fs(),n=Ot(),o=Ee(),s=Et(),u=we(),v=e.has,l=e.remove;return Ru=function(h){var y=r(this),d=o(h),p=t(y);return n(y)<=d.size?s(y,function(S){d.includes(S)&&l(p,S)}):u(d.getIterator(),function(S){v(p,S)&&l(p,S)}),p},Ru}var Iu,nh;function Oe(){return nh||(nh=1,Iu=function(){return!1}),Iu}var ah;function L2(){if(ah)return Ud;ah=1;var r=ar(),e=j2(),t=pr(),n=Oe(),o=!n("difference",function(u){return u.size===0}),s=o||t(function(){var u={size:1,has:function(){return!0},keys:function(){var l=0;return{next:function(){var f=l++>1;return v.has(1)&&v.clear(),{done:f,value:2}}}}},v=new Set([1,2,3,4]);return v.difference(u).size!==3});return r({target:"Set",proto:!0,real:!0,forced:s},{difference:e}),Ud}var oh={},qu,ih;function N2(){if(ih)return qu;ih=1;var r=Ie(),e=qe(),t=Ot(),n=Ee(),o=Et(),s=we(),u=e.Set,v=e.add,l=e.has;return qu=function(h){var y=r(this),d=n(h),p=new u;return t(y)>d.size?s(d.getIterator(),function(S){l(y,S)&&v(p,S)}):o(y,function(S){d.includes(S)&&v(p,S)}),p},qu}var uh;function B2(){if(uh)return oh;uh=1;var r=ar(),e=pr(),t=N2(),n=Oe(),o=!n("intersection",function(s){return s.size===2&&s.has(1)&&s.has(2)})||e(function(){return String(Array.from(new Set([1,2,3]).intersection(new Set([3,2]))))!=="3,2"});return r({target:"Set",proto:!0,real:!0,forced:o},{intersection:t}),oh}var sh={},wu,ch;function G2(){if(ch)return wu;ch=1;var r=Ie(),e=qe().has,t=Ot(),n=Ee(),o=Et(),s=we(),u=on();return wu=function(l){var f=r(this),h=n(l);if(t(f)<=h.size)return o(f,function(d){if(h.includes(d))return!1},!0)!==!1;var y=h.getIterator();return s(y,function(d){if(e(f,d))return u(y,"normal",!1)})!==!1},wu}var fh;function K2(){if(fh)return sh;fh=1;var r=ar(),e=G2(),t=Oe(),n=!t("isDisjointFrom",function(o){return!o});return r({target:"Set",proto:!0,real:!0,forced:n},{isDisjointFrom:e}),sh}var lh={},Eu,vh;function z2(){if(vh)return Eu;vh=1;var r=Ie(),e=Ot(),t=Et(),n=Ee();return Eu=function(s){var u=r(this),v=n(s);return e(u)>v.size?!1:t(u,function(l){if(!v.includes(l))return!1},!0)!==!1},Eu}var dh;function W2(){if(dh)return lh;dh=1;var r=ar(),e=z2(),t=Oe(),n=!t("isSubsetOf",function(o){return o});return r({target:"Set",proto:!0,real:!0,forced:n},{isSubsetOf:e}),lh}var hh={},Ou,ph;function U2(){if(ph)return Ou;ph=1;var r=Ie(),e=qe().has,t=Ot(),n=Ee(),o=we(),s=on();return Ou=function(v){var l=r(this),f=n(v);if(t(l)<f.size)return!1;var h=f.getIterator();return o(h,function(y){if(!e(l,y))return s(h,"normal",!1)})!==!1},Ou}var yh;function H2(){if(yh)return hh;yh=1;var r=ar(),e=U2(),t=Oe(),n=!t("isSupersetOf",function(o){return!o});return r({target:"Set",proto:!0,real:!0,forced:n},{isSupersetOf:e}),hh}var bh={},Tu,gh;function V2(){if(gh)return Tu;gh=1;var r=Ie(),e=qe(),t=Fs(),n=Ee(),o=we(),s=e.add,u=e.has,v=e.remove;return Tu=function(f){var h=r(this),y=n(f).getIterator(),d=t(h);return o(y,function(p){u(h,p)?v(d,p):s(d,p)}),d},Tu}var xu,mh;function Wp(){return mh||(mh=1,xu=function(r){try{var e=new Set,t={size:0,has:function(){return!0},keys:function(){return Object.defineProperty({},"next",{get:function(){return e.clear(),e.add(4),function(){return{done:!0}}}})}},n=e[r](t);return n.size===1&&n.values().next().value===4}catch{return!1}}),xu}var Sh;function Y2(){if(Sh)return bh;Sh=1;var r=ar(),e=V2(),t=Wp(),n=Oe(),o=!n("symmetricDifference")||!t("symmetricDifference");return r({target:"Set",proto:!0,real:!0,forced:o},{symmetricDifference:e}),bh}var _h={},Pu,Rh;function J2(){if(Rh)return Pu;Rh=1;var r=Ie(),e=qe().add,t=Fs(),n=Ee(),o=we();return Pu=function(u){var v=r(this),l=n(u).getIterator(),f=t(v);return o(l,function(h){e(f,h)}),f},Pu}var Ih;function X2(){if(Ih)return _h;Ih=1;var r=ar(),e=J2(),t=Wp(),n=Oe(),o=!n("union")||!t("union");return r({target:"Set",proto:!0,real:!0,forced:o},{union:e}),_h}var $u,qh;function Z2(){if(qh)return $u;qh=1,Os(),F2(),L2(),B2(),K2(),W2(),H2(),Y2(),X2(),xs();var r=Qr();return $u=r.Set,$u}var Au,wh;function Q2(){if(wh)return Au;wh=1;var r=Z2();return Ts(),Au=r,Au}var Mu,Eh;function rS(){return Eh||(Eh=1,Mu=Q2()),Mu}var eS=rS();const tS=gr(eS);var Oh={},Th;function nS(){if(Th)return Oh;Th=1;var r=ar(),e=ee(),t=Qt(),n=pr(),o=n(function(){t(1)});return r({target:"Object",stat:!0,forced:o},{keys:function(u){return t(e(u))}}),Oh}var Cu,xh;function aS(){if(xh)return Cu;xh=1,nS();var r=Qr();return Cu=r.Object.keys,Cu}var Fu,Ph;function oS(){if(Ph)return Fu;Ph=1;var r=aS();return Fu=r,Fu}var ku,$h;function iS(){return $h||($h=1,ku=oS()),ku}var uS=iS();const sS=gr(uS);var Ah={},Du,Mh;function cS(){if(Mh)return Du;Mh=1;var r=Fr(),e=_r(),t=Br(),n=pr(),o=Qt(),s=Is(),u=ds(),v=ee(),l=hs(),f=Object.assign,h=Object.defineProperty,y=e([].concat);return Du=!f||n(function(){if(r&&f({b:1},f(h({},"a",{enumerable:!0,get:function(){h(this,"b",{value:3,enumerable:!1})}}),{b:2})).b!==1)return!0;var d={},p={},S=Symbol("assign detection"),w="abcdefghijklmnopqrst";return d[S]=7,w.split("").forEach(function($){p[$]=$}),f({},d)[S]!==7||o(f({},p)).join("")!==w})?function(p,S){for(var w=v(p),$=arguments.length,C=1,b=s.f,E=u.f;$>C;)for(var m=l(arguments[C++]),O=b?y(o(m),b(m)):o(m),M=O.length,F=0,q;M>F;)q=O[F++],(!r||t(E,m,q))&&(w[q]=m[q]);return w}:f,Du}var Ch;function fS(){if(Ch)return Ah;Ch=1;var r=ar(),e=cS();return r({target:"Object",stat:!0,arity:2,forced:Object.assign!==e},{assign:e}),Ah}var ju,Fh;function lS(){if(Fh)return ju;Fh=1,fS();var r=Qr();return ju=r.Object.assign,ju}var Lu,kh;function vS(){if(kh)return Lu;kh=1;var r=lS();return Lu=r,Lu}var Nu,Dh;function dS(){return Dh||(Dh=1,Nu=vS()),Nu}var hS=dS();const pS=gr(hS);var jh={},Bu,Lh;function yS(){if(Lh)return Bu;Lh=1;var r=ee(),e=Zt(),t=ue();return Bu=function(o){for(var s=r(this),u=t(s),v=arguments.length,l=e(v>1?arguments[1]:void 0,u),f=v>2?arguments[2]:void 0,h=f===void 0?u:e(f,u);h>l;)s[l++]=o;return s},Bu}var Nh;function bS(){if(Nh)return jh;Nh=1;var r=ar(),e=yS(),t=nn();return r({target:"Array",proto:!0},{fill:e}),t("fill"),jh}var Gu,Bh;function gS(){if(Bh)return Gu;Bh=1,bS();var r=ne();return Gu=r("Array","fill"),Gu}var Ku,Gh;function mS(){if(Gh)return Ku;Gh=1;var r=zr(),e=gS(),t=Array.prototype;return Ku=function(n){var o=n.fill;return n===t||r(t,n)&&o===t.fill?e:o},Ku}var zu,Kh;function SS(){if(Kh)return zu;Kh=1;var r=mS();return zu=r,zu}var Wu,zh;function _S(){return zh||(zh=1,Wu=SS()),Wu}var RS=_S();const ks=gr(RS);function IS(r){if(yp(r))return r}function qS(r,e){var t=r==null?null:typeof Mp<"u"&&Ps(r)||r["@@iterator"];if(t!=null){var n=[],o=!0,s=!1,u,v;try{for(t=t.call(r);!(o=(u=t.next()).done)&&(n.push(u.value),!(e&&n.length===e));o=!0);}catch(l){s=!0,v=l}finally{try{!o&&t.return!=null&&t.return()}finally{if(s)throw v}}return n}}function wS(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
58
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Uu(r,e){return IS(r)||qS(r,e)||Lp(r,e)||wS()}/**
|
|
59
|
+
* @license
|
|
60
|
+
* Copyright 2021 Google LLC
|
|
61
|
+
*
|
|
62
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
63
|
+
* you may not use this file except in compliance with the License.
|
|
64
|
+
* You may obtain a copy of the License at
|
|
65
|
+
*
|
|
66
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
67
|
+
*
|
|
68
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
69
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
70
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
71
|
+
* See the License for the specific language governing permissions and
|
|
72
|
+
* limitations under the License.
|
|
73
|
+
*/function ke(r){return r<0?-1:r===0?0:1}function Wh(r,e,t){return(1-t)*r+t*e}function ES(r,e,t){return t<r?r:t>e?e:t}function OS(r,e,t){return t<r?r:t>e?e:t}function Ds(r){return r=r%360,r<0&&(r=r+360),r}function TS(r,e){const t=r[0]*e[0][0]+r[1]*e[0][1]+r[2]*e[0][2],n=r[0]*e[1][0]+r[1]*e[1][1]+r[2]*e[1][2],o=r[0]*e[2][0]+r[1]*e[2][1]+r[2]*e[2][2];return[t,n,o]}/**
|
|
74
|
+
* @license
|
|
75
|
+
* Copyright 2021 Google LLC
|
|
76
|
+
*
|
|
77
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
78
|
+
* you may not use this file except in compliance with the License.
|
|
79
|
+
* You may obtain a copy of the License at
|
|
80
|
+
*
|
|
81
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
82
|
+
*
|
|
83
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
84
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
85
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
86
|
+
* See the License for the specific language governing permissions and
|
|
87
|
+
* limitations under the License.
|
|
88
|
+
*/const xS=[[.41233895,.35762064,.18051042],[.2126,.7152,.0722],[.01932141,.11916382,.95034478]],PS=[[3.2413774792388685,-1.5376652402851851,-.49885366846268053],[-.9691452513005321,1.8758853451067872,.04156585616912061],[.05562093689691305,-.20395524564742123,1.0571799111220335]],Up=[95.047,100,108.883];function $S(r,e,t){return(255<<24|(r&255)<<16|(e&255)<<8|t&255)>>>0}function Hp(r){return r>>16&255}function Vp(r){return r>>8&255}function Yp(r){return r&255}function Jp(r,e,t){const n=PS,o=n[0][0]*r+n[0][1]*e+n[0][2]*t,s=n[1][0]*r+n[1][1]*e+n[1][2]*t,u=n[2][0]*r+n[2][1]*e+n[2][2]*t,v=Hu(o),l=Hu(s),f=Hu(u);return $S(v,l,f)}function AS(r){const e=Le(Hp(r)),t=Le(Vp(r)),n=Le(Yp(r));return TS([e,t,n],xS)}function Uh(r){const e=(r+16)/116,t=e,n=e,o=24389/27,s=216/24389,v=r>8?e*e*e:r/o,l=e*e*e>s,f=l?n*n*n:r/o,h=l?t*t*t:r/o,y=Up;return Jp(f*y[0],v*y[1],h*y[2])}function ss(r){const e=AS(r)[1]/100,t=216/24389;return e<=t?24389/27*e:116*Math.pow(e,.3333333333333333)-16}function Hh(r){return r>8?Math.pow((r+16)/116,3)*100:r/(24389/27)*100}function Le(r){const e=r/255;return e<=.040449936?e/12.92*100:Math.pow((e+.055)/1.055,2.4)*100}function Hu(r){const e=r/100;let t=0;return e<=.0031308?t=e*12.92:t=1.055*Math.pow(e,1/2.4)-.055,ES(0,255,Math.round(t*255))}function MS(){return Up}/**
|
|
89
|
+
* @license
|
|
90
|
+
* Copyright 2021 Google LLC
|
|
91
|
+
*
|
|
92
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
93
|
+
* you may not use this file except in compliance with the License.
|
|
94
|
+
* You may obtain a copy of the License at
|
|
95
|
+
*
|
|
96
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
97
|
+
*
|
|
98
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
99
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
100
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
101
|
+
* See the License for the specific language governing permissions and
|
|
102
|
+
* limitations under the License.
|
|
103
|
+
*/class oe{constructor(e,t,n,o,s,u,v,l,f,h){this.n=e,this.aw=t,this.nbb=n,this.ncb=o,this.c=s,this.nc=u,this.rgbD=v,this.fl=l,this.fLRoot=f,this.z=h}static make(e=MS(),t=200/Math.PI*Hh(50)/100,n=50,o=2,s=!1){const u=e,v=u[0]*.401288+u[1]*.650173+u[2]*-.051461,l=u[0]*-.250268+u[1]*1.204414+u[2]*.045854,f=u[0]*-.002079+u[1]*.048952+u[2]*.953127,h=.8+o/10,y=h>=.9?Wh(.59,.69,(h-.9)*10):Wh(.525,.59,(h-.8)*10);let d=s?1:h*(1-1/3.6*Math.exp((-t-42)/92));d=d>1?1:d<0?0:d;const p=h,S=[d*(100/v)+1-d,d*(100/l)+1-d,d*(100/f)+1-d],w=1/(5*t+1),$=w*w*w*w,C=1-$,b=$*t+.1*C*C*Math.cbrt(5*t),E=Hh(n)/e[1],m=1.48+Math.sqrt(E),O=.725/Math.pow(E,.2),M=O,F=[Math.pow(b*S[0]*v/100,.42),Math.pow(b*S[1]*l/100,.42),Math.pow(b*S[2]*f/100,.42)],q=[400*F[0]/(F[0]+27.13),400*F[1]/(F[1]+27.13),400*F[2]/(F[2]+27.13)],x=(2*q[0]+q[1]+.05*q[2])*O;return new oe(E,x,O,M,y,p,S,b,Math.pow(b,.25),m)}}oe.DEFAULT=oe.make();/**
|
|
104
|
+
* @license
|
|
105
|
+
* Copyright 2021 Google LLC
|
|
106
|
+
*
|
|
107
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
108
|
+
* you may not use this file except in compliance with the License.
|
|
109
|
+
* You may obtain a copy of the License at
|
|
110
|
+
*
|
|
111
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
112
|
+
*
|
|
113
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
114
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
115
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
116
|
+
* See the License for the specific language governing permissions and
|
|
117
|
+
* limitations under the License.
|
|
118
|
+
*/class Vr{constructor(e,t,n,o,s,u,v,l,f){this.hue=e,this.chroma=t,this.j=n,this.q=o,this.m=s,this.s=u,this.jstar=v,this.astar=l,this.bstar=f}distance(e){const t=this.jstar-e.jstar,n=this.astar-e.astar,o=this.bstar-e.bstar,s=Math.sqrt(t*t+n*n+o*o);return 1.41*Math.pow(s,.63)}static fromInt(e){return Vr.fromIntInViewingConditions(e,oe.DEFAULT)}static fromIntInViewingConditions(e,t){const n=(e&16711680)>>16,o=(e&65280)>>8,s=e&255,u=Le(n),v=Le(o),l=Le(s),f=.41233895*u+.35762064*v+.18051042*l,h=.2126*u+.7152*v+.0722*l,y=.01932141*u+.11916382*v+.95034478*l,d=.401288*f+.650173*h-.051461*y,p=-.250268*f+1.204414*h+.045854*y,S=-.002079*f+.048952*h+.953127*y,w=t.rgbD[0]*d,$=t.rgbD[1]*p,C=t.rgbD[2]*S,b=Math.pow(t.fl*Math.abs(w)/100,.42),E=Math.pow(t.fl*Math.abs($)/100,.42),m=Math.pow(t.fl*Math.abs(C)/100,.42),O=ke(w)*400*b/(b+27.13),M=ke($)*400*E/(E+27.13),F=ke(C)*400*m/(m+27.13),q=(11*O+-12*M+F)/11,x=(O+M-2*F)/9,k=(20*O+20*M+21*F)/20,A=(40*O+20*M+F)/20,G=Math.atan2(x,q)*180/Math.PI,W=G<0?G+360:G>=360?G-360:G,Q=W*Math.PI/180,hr=A*t.nbb,or=100*Math.pow(hr/t.aw,t.c*t.z),wr=4/t.c*Math.sqrt(or/100)*(t.aw+4)*t.fLRoot,Pr=W<20.14?W+360:W,Dr=.25*(Math.cos(Pr*Math.PI/180+2)+3.8),yr=5e4/13*Dr*t.nc*t.ncb*Math.sqrt(q*q+x*x)/(k+.305),Er=Math.pow(yr,.9)*Math.pow(1.64-Math.pow(.29,t.n),.73),Ir=Er*Math.sqrt(or/100),Gr=Ir*t.fLRoot,$r=50*Math.sqrt(Er*t.c/(t.aw+4)),Xr=(1+100*.007)*or/(1+.007*or),Ur=1/.0228*Math.log(1+.0228*Gr),Je=Ur*Math.cos(Q),pe=Ur*Math.sin(Q);return new Vr(W,Ir,or,wr,Gr,$r,Xr,Je,pe)}static fromJch(e,t,n){return Vr.fromJchInViewingConditions(e,t,n,oe.DEFAULT)}static fromJchInViewingConditions(e,t,n,o){const s=4/o.c*Math.sqrt(e/100)*(o.aw+4)*o.fLRoot,u=t*o.fLRoot,v=t/Math.sqrt(e/100),l=50*Math.sqrt(v*o.c/(o.aw+4)),f=n*Math.PI/180,h=(1+100*.007)*e/(1+.007*e),y=1/.0228*Math.log(1+.0228*u),d=y*Math.cos(f),p=y*Math.sin(f);return new Vr(n,t,e,s,u,l,h,d,p)}static fromUcs(e,t,n){return Vr.fromUcsInViewingConditions(e,t,n,oe.DEFAULT)}static fromUcsInViewingConditions(e,t,n,o){const s=t,u=n,v=Math.sqrt(s*s+u*u),f=(Math.exp(v*.0228)-1)/.0228/o.fLRoot;let h=Math.atan2(u,s)*(180/Math.PI);h<0&&(h+=360);const y=e/(1-(e-100)*.007);return Vr.fromJchInViewingConditions(y,f,h,o)}toInt(){return this.viewed(oe.DEFAULT)}viewed(e){const t=this.chroma===0||this.j===0?0:this.chroma/Math.sqrt(this.j/100),n=Math.pow(t/Math.pow(1.64-Math.pow(.29,e.n),.73),1/.9),o=this.hue*Math.PI/180,s=.25*(Math.cos(o+2)+3.8),u=e.aw*Math.pow(this.j/100,1/e.c/e.z),v=s*(5e4/13)*e.nc*e.ncb,l=u/e.nbb,f=Math.sin(o),h=Math.cos(o),y=23*(l+.305)*n/(23*v+11*n*h+108*n*f),d=y*h,p=y*f,S=(460*l+451*d+288*p)/1403,w=(460*l-891*d-261*p)/1403,$=(460*l-220*d-6300*p)/1403,C=Math.max(0,27.13*Math.abs(S)/(400-Math.abs(S))),b=ke(S)*(100/e.fl)*Math.pow(C,1/.42),E=Math.max(0,27.13*Math.abs(w)/(400-Math.abs(w))),m=ke(w)*(100/e.fl)*Math.pow(E,1/.42),O=Math.max(0,27.13*Math.abs($)/(400-Math.abs($))),M=ke($)*(100/e.fl)*Math.pow(O,1/.42),F=b/e.rgbD[0],q=m/e.rgbD[1],x=M/e.rgbD[2],k=1.86206786*F-1.01125463*q+.14918677*x,A=.38752654*F+.62144744*q-.00897398*x,B=-.0158415*F-.03412294*q+1.04996444*x;return Jp(k,A,B)}}/**
|
|
119
|
+
* @license
|
|
120
|
+
* Copyright 2021 Google LLC
|
|
121
|
+
*
|
|
122
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
123
|
+
* you may not use this file except in compliance with the License.
|
|
124
|
+
* You may obtain a copy of the License at
|
|
125
|
+
*
|
|
126
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
127
|
+
*
|
|
128
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
129
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
130
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
131
|
+
* See the License for the specific language governing permissions and
|
|
132
|
+
* limitations under the License.
|
|
133
|
+
*/class Se{constructor(e,t,n){this.internalHue=e,this.internalChroma=t,this.internalTone=n,this.setInternalState(this.toInt())}static from(e,t,n){return new Se(e,t,n)}static fromInt(e){const t=Vr.fromInt(e),n=ss(e);return new Se(t.hue,t.chroma,n)}toInt(){return Bt(this.internalHue,this.internalChroma,this.internalTone)}get hue(){return this.internalHue}set hue(e){this.setInternalState(Bt(Ds(e),this.internalChroma,this.internalTone))}get chroma(){return this.internalChroma}set chroma(e){this.setInternalState(Bt(this.internalHue,e,this.internalTone))}get tone(){return this.internalTone}set tone(e){this.setInternalState(Bt(this.internalHue,this.internalChroma,e))}setInternalState(e){const t=Vr.fromInt(e),n=ss(e);this.internalHue=t.hue,this.internalChroma=t.chroma,this.internalTone=n}}const CS=.4,FS=1,kS=.2,DS=.01;function Bt(r,e,t){return jS(Ds(r),e,OS(0,100,t),oe.DEFAULT)}function jS(r,e,t,n){if(e<1||Math.round(t)<=0||Math.round(t)>=100)return Uh(t);r=Ds(r);let o=e,s=e,u=0,v=!0,l=null;for(;Math.abs(u-o)>=CS;){const f=LS(r,s,t);if(v){if(f!=null)return f.viewed(n);v=!1,s=u+(o-u)/2;continue}f===null?o=s:(l=f,u=s),s=u+(o-u)/2}return l===null?Uh(t):l.viewed(n)}function LS(r,e,t){let n=0,o=100,s=0,u=1e3,v=1e3,l=null;for(;Math.abs(n-o)>DS;){s=n+(o-n)/2;const h=Vr.fromJch(s,e,r).toInt(),y=ss(h),d=Math.abs(t-y);if(d<kS){const p=Vr.fromInt(h),S=p.distance(Vr.fromJch(p.j,p.chroma,r));S<=FS&&S<=v&&(u=d,v=S,l=p)}if(u===0&&v===0)break;y<t?n=s:o=s}return l}/**
|
|
134
|
+
* @license
|
|
135
|
+
* Copyright 2021 Google LLC
|
|
136
|
+
*
|
|
137
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
138
|
+
* you may not use this file except in compliance with the License.
|
|
139
|
+
* You may obtain a copy of the License at
|
|
140
|
+
*
|
|
141
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
142
|
+
*
|
|
143
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
144
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
145
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
146
|
+
* See the License for the specific language governing permissions and
|
|
147
|
+
* limitations under the License.
|
|
148
|
+
*/const Vh=r=>{const e=Hp(r),t=Vp(r),n=Yp(r),o=[e.toString(16),t.toString(16),n.toString(16)];for(const[s,u]of o.entries())u.length===1&&(o[s]="0"+u);return"#"+o.join("")},Yh=r=>{r=r.replace("#","");const e=r.length===3,t=r.length===6,n=r.length===8;if(!e&&!t&&!n)throw new Error("unexpected hex "+r);let o=0,s=0,u=0;return e?(o=ae(r.slice(0,1).repeat(2)),s=ae(r.slice(1,2).repeat(2)),u=ae(r.slice(2,3).repeat(2))):t?(o=ae(r.slice(0,2)),s=ae(r.slice(2,4)),u=ae(r.slice(4,6))):n&&(o=ae(r.slice(2,4)),s=ae(r.slice(4,6)),u=ae(r.slice(6,8))),(255<<24|(o&255)<<16|(s&255)<<8|u&255)>>>0};function ae(r){return parseInt(r,16)}var Jh={},Xh;function NS(){if(Xh)return Jh;Xh=1;var r=ar(),e=wt().find,t=nn(),n="find",o=!0;return n in[]&&Array(1)[n](function(){o=!1}),r({target:"Array",proto:!0,forced:o},{find:function(u){return e(this,u,arguments.length>1?arguments[1]:void 0)}}),t(n),Jh}var Vu,Zh;function BS(){if(Zh)return Vu;Zh=1,NS();var r=ne();return Vu=r("Array","find"),Vu}var Yu,Qh;function GS(){if(Qh)return Yu;Qh=1;var r=zr(),e=BS(),t=Array.prototype;return Yu=function(n){var o=n.find;return n===t||r(t,n)&&o===t.find?e:o},Yu}var Ju,rp;function KS(){if(rp)return Ju;rp=1;var r=GS();return Ju=r,Ju}var Xu,ep;function zS(){return ep||(ep=1,Xu=KS()),Xu}var WS=zS();const US=gr(WS);var Zu,tp;function HS(){if(tp)return Zu;tp=1;var r=4,e=.001,t=1e-7,n=10,o=11,s=1/(o-1),u=typeof Float32Array=="function";function v(w,$){return 1-3*$+3*w}function l(w,$){return 3*$-6*w}function f(w){return 3*w}function h(w,$,C){return((v($,C)*w+l($,C))*w+f($))*w}function y(w,$,C){return 3*v($,C)*w*w+2*l($,C)*w+f($)}function d(w,$,C,b,E){var m,O,M=0;do O=$+(C-$)/2,m=h(O,b,E)-w,m>0?C=O:$=O;while(Math.abs(m)>t&&++M<n);return O}function p(w,$,C,b){for(var E=0;E<r;++E){var m=y($,C,b);if(m===0)return $;var O=h($,C,b)-w;$-=O/m}return $}function S(w){return w}return Zu=function($,C,b,E){if(!(0<=$&&$<=1&&0<=b&&b<=1))throw new Error("bezier x values must be in [0, 1] range");if($===C&&b===E)return S;for(var m=u?new Float32Array(o):new Array(o),O=0;O<o;++O)m[O]=h(O*s,$,b);function M(F){for(var q=0,x=1,k=o-1;x!==k&&m[x]<=F;++x)q+=s;--x;var A=(F-m[x])/(m[x+1]-m[x]),B=q+A*s,G=y(B,$,b);return G>=e?p(F,B,$,b):G===0?B:d(F,q,q+s,$,b)}return function(q){return q===0?0:q===1?1:h(M(q),C,E)}},Zu}var VS=HS();const YS=gr(VS);var be=function(r,e){var t=function(W){return .017453292519943295*W},n=function(W){return 57.29577951308232*W},o=r[0],s=r[1],u=r[2],v=e[0],l=e[1],f=e[2],h=(o+v)/2,y=(Math.sqrt(Math.pow(s,2)+Math.pow(u,2))+Math.sqrt(Math.pow(l,2)+Math.pow(f,2)))/2,d=(1-Math.sqrt(Math.pow(y,7)/(Math.pow(y,7)+Math.pow(25,7))))/2,p=s*(1+d),S=l*(1+d),w=Math.sqrt(Math.pow(p,2)+Math.pow(u,2)),$=Math.sqrt(Math.pow(S,2)+Math.pow(f,2)),C=(w+$)/2,b=n(Math.atan2(u,p));b<0&&(b+=360);var E=n(Math.atan2(f,S));E<0&&(E+=360);var m=Math.abs(b-E)>180?(b+E+360)/2:(b+E)/2,O=1-.17*Math.cos(t(m-30))+.24*Math.cos(t(2*m))+.32*Math.cos(t(3*m+6))-.2*Math.cos(t(4*m-63)),M=E-b;Math.abs(M)>180&&(E<=b?M+=360:M-=360);var F=v-o,q=$-w;M=2*Math.sqrt(w*$)*Math.sin(t(M)/2);var x=1+.015*Math.pow(h-50,2)/Math.sqrt(20+Math.pow(h-50,2)),k=1+.045*C,A=1+.015*C*O,B=30*Math.exp(-Math.pow((m-275)/25,2)),G=-(2*Math.sqrt(Math.pow(C,7)/(Math.pow(C,7)+Math.pow(25,7))))*Math.sin(2*t(B));return Math.sqrt(Math.pow(F/(1*x),2)+Math.pow(q/(1*k),2)+Math.pow(M/(1*A),2)+G*(q/(1*k))*(M/(1*A)))};function JS(r,e){var t=!(arguments.length>2&&arguments[2]!==void 0)||arguments[2],n=cs(r),o=cs(e),s=(n+.05)/(o+.05);return t&&s<1&&(s=1/s),s}var cs=function(r){var e=!(arguments.length>1&&arguments[1]!==void 0)||arguments[1],t=Sr(r).call(r,(function(n){return n/255}));return e&&(t=Xp(t,!1)),.2126*t[0]+.7152*t[1]+.0722*t[2]},Xp=function(r){var e=!(arguments.length>1&&arguments[1]!==void 0)||arguments[1];return Sr(r).call(r,(function(t){var n,o=e?t/255:t;return n=o<=.03928?o/12.92:Math.pow((o+.055)/1.055,2.4),e?255*n:n}))};function XS(r,e){var t=Ym!==void 0&&Ps(r)||r["@@iterator"];if(!t){if(Array.isArray(r)||(t=(function(l,f){var h;if(l){if(typeof l=="string")return np(l,f);var y=ve(h=Object.prototype.toString.call(l)).call(h,8,-1);if(y==="Object"&&l.constructor&&(y=l.constructor.name),y==="Map"||y==="Set")return Um(l);if(y==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(y))return np(l,f)}})(r))||e){t&&(r=t);var n=0,o=function(){};return{s:o,n:function(){return n>=r.length?{done:!0}:{done:!1,value:r[n++]}},e:function(l){throw l},f:o}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
149
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var s,u=!0,v=!1;return{s:function(){t=t.call(r)},n:function(){var l=t.next();return u=l.done,l},e:function(l){v=!0,s=l},f:function(){try{u||t.return==null||t.return()}finally{if(v)throw s}}}}function np(r,e){(e==null||e>r.length)&&(e=r.length);for(var t=0,n=new Array(e);t<e;t++)n[t]=r[t];return n}var Zp=.95047,Qp=1,r1=1.08883,e1=.137931034,ZS=.206896552,t1=.12841855,QS=.008856452;function Qu(r){return Math.round(255*(r<=.00304?12.92*r:1.055*Math.pow(r,1/2.4)-.055))}function rs(r){return(r/=255)<=.04045?r/12.92:Math.pow((r+.055)/1.055,2.4)}function es(r){return r>QS?Math.pow(r,1/3):r/t1+e1}function ts(r){return r>ZS?r*r*r:t1*(r-e1)}function ap(r){var e=r[0],t=r[1],n=r[2],o=(e+16)/116,s=isNaN(t)?o:o+t/500,u=isNaN(n)?o:o-n/200;return o=Qp*ts(o),[Qu(3.2404542*(s=Zp*ts(s))-1.5371385*o-.4985314*(u=r1*ts(u))),Qu(-.969266*s+1.8760108*o+.041556*u),n=Qu(.0556434*s-.2040259*o+1.0572252*u)]}function ns(r){var e;return ve(e="0".concat(r.toString(16))).call(e,-2)}var r_=180/Math.PI;function ct(r,e){return be(r,e)}var Mr={validateRgb:function(r){var e=r[0],t=r[1],n=r[2];return e>=0&&e<=255&&t>=0&&t<=255&&n>=0&&n<=255},labToRgb:ap,labToRgbHex:function(r){var e,t,n=ap(r);return je(e=je(t="#".concat(ns(n[0]))).call(t,ns(n[1]))).call(e,ns(n[2]))},rgbToLab:function(r){var e=(function(s){var u=s[0],v=s[1],l=s[2];return[es((.4124564*(u=rs(u))+.3575761*(v=rs(v))+.1804375*(l=rs(l)))/Zp),es((.2126729*u+.7151522*v+.072175*l)/Qp),es((.0193339*u+.119192*v+.9503041*l)/r1)]})(r),t=e[0],n=e[1],o=116*n-16;return[o<0?0:o,500*(t-n),200*(n-e[2])]},labToHcl:function(r){var e=r[0],t=r[1],n=r[2],o=Math.sqrt(t*t+n*n),s=(Math.atan2(n,t)*r_+360)%360;return Math.round(1e4*o)===0&&(s=NaN),[s,o,e]},diffSort:function(r,e){for(var t,n,o,s,u,v,l=[(e=ve(e).call(e)).shift()];e.length>0;){for(t=-1,n=-1/0,o=0;o<e.length;o++)for(s=e[o],v=0;v<l.length;v++)(u=r(s,l[v]))>n&&(n=u,t=o);l.push(e[t]),lt(e).call(e,t,1)}return l},distance:ct,contrast:function(r,e){return JS(r,e,!0)},sortColorsByComplementary:function(r,e){var t,n=ur(e).hsv(),o=zt(n);o[0]=(n[0]+180)%360;var s=zt(n);s[0]=(n[0]+330)%360;var u=function(p){return ur(p).lab()},v=function(p){return ur(p,"hsv").lab()},l=v(o),f=r[0],h=ct(l,u(r[0]));r.forEach((function(p){var S=ct(l,u(p));S<h&&(h=S,f=p)}));var y=v(s),d=Cs(t=Kt(r).call(r,(function(p,S){return ct(y,u(p))-ct(y,u(S))}))).call(t,(function(p){return p!==f}));return d.unshift(ur(e).hex()),d.push(f),d},sortColorsByDEThreshold:function(r,e){var t,n,o=ve(r).call(r);o.unshift();for(var s=Sr(o).call(o,(function(V){return ur.hex(V)})),u=ur(e),v=Kt(t=ve(s).call(s)).call(t,(function(V,yr){var Er=V.lab(),Ir=yr.lab(),Gr=u.lab();return be(Er,Gr)-be(Ir,Gr)})),l=u,f=l.lab(),h=ve(v).call(v),y=[],d=[],p=[];p.length<2||p[p.length-1]!==p[p.length-2];){for(var S=0,w=0;w<h.length;w++){var $=h[w],C=$.lab();be(C,f)>=30?(d.push($),f=(l=$).lab(),S+=1):y.push($)}p.push(S),h=y,y=[]}for(var b=ve(d).call(d),E=0,m=b.length-1;m>0;m--){var O=be(b[m].lab(),u.lab());if(!(O<30||O>55))break;b[m],h.unshift(b[m]),E+=1}if(E&<(d).call(d,d.length-E,E),h.length){var M,F=XS(h);try{for(F.s();!(M=F.n()).done;){for(var q,x,k=M.value,A=[],B=je(q=je(x=[u]).call(x,d)).call(q,[u]),G=1;G<B.length-1;G++){var W,Q=B[G-1],hr=B[G],or=be(Q.lab(),k.lab()),wr=be(hr.lab(),k.lab()),Pr=Sr(W=[or,wr]).call(W,(function(V){var yr=V-30;return yr>0?Math.pow(yr,2):Math.pow(Math.abs(yr),4)})).reduce((function(V,yr){return V+yr}),0);A.push({pos:G,deA:or,deB:wr,deMul:Pr})}Kt(A).call(A,(function(V,yr){return V.deMul-yr.deMul})),lt(d).call(d,A[0].pos-1,0,k)}}catch(V){F.e(V)}finally{F.f()}}var Dr=je(n=[u]).call(n,d);return Sr(Dr).call(Dr,(function(V){return V.hex()}))},generateLockedColor:function(r){return ur(r).lab()},getW3RelativeLuminance:cs,sRGBDecode:Xp},e_=(function(){function r(e){var t,n;$s(this,r),e||(t=0,n=Math.pow(2,31)-1,e=t+Math.floor(Math.random()*(n-t+1))),this.seed=e%2147483647,this.seed<=0&&(this.seed+=2147483646)}return Ms(r,[{key:"next",value:function(){return this.seed=16807*this.seed%2147483647,this.seed}},{key:"nextFloat",value:function(){return(this.next()-1)/2147483646}}]),r})(),n1={random:[0,360,15,98,40,98]},op={bright:[[330,360,42,88,68,92],[320,330,54,85,64,91],[300,320,46,75,62,89],[280,300,36,84,59,92],[270,280,5,88,54,87],[240,270,12,74,62,95],[210,240,13,82,58,93],[200,210,25,88,72,82],[180,200,14,70,57,90],[150,180,22,76,64,90],[135,150,42,85,68,82],[120,135,43,95,62,93],[110,120,49,89,66,92],[91,110,56,79,79,93],[70,91,65,95,78,99],[60,70,44,84,65,98],[30,60,41,79,72,92],[0,30,42,88,65,88]],contrast:[[330,360,39,69,54,74],[320,330,28,86,44,65],[300,320,80,100,33,53],[280,300,53,90,30,60],[270,280,27,47,30,55],[240,270,54,82,62,80],[210,240,25,88,57,90],[200,210,24,47,66,86],[180,200,30,62,77,88],[150,180,45,86,60,87],[120,150,63,92,58,87],[110,120,50,88,66,90],[90,110,35,83,70,95],[60,90,68,89,78,94],[30,60,43,87,55,85],[0,30,48,69,61,71]],composed:[[330,360,55,95,35,70],[320,330,25,83,44,70],[300,320,55,90,40,74],[280,300,38,90,42,67],[270,280,38,95,28,65],[240,270,20,88,34,78],[210,240,15,77,40,85],[200,210,10,88,33,85],[180,200,25,82,43,77],[150,180,35,89,44,68],[135,150,15,88,42,85],[120,135,15,95,46,85],[110,120,45,90,44,80],[90,110,35,78,67,95],[70,90,65,98,80,98],[60,70,42,85,45,90],[30,60,53,93,45,85],[0,30,43,83,38,65]]},ip={colorFilter:null,colorSpace:"default",quality:100,ultraPrecision:!1,seed:null},t_=new tS(sS(n1));function up(r,e){var t;if(typeof r!="number"||r<2)throw new Error("expecting a color count > 2.");e=(function(v){var l,f=pS({},ip,v);if(typeof f.quality!="number"||isNaN(f.quality)||f.quality<1)throw new Error("invalid `quality`. Expecting a number > 0.");if(typeof f.ultraPrecision!="boolean")throw new Error("invalid `ultraPrecision`. Expecting a boolean.");if(f.seed&&typeof f.seed!="number")throw new Error("invalid `seed`. Expecting an integer or a string.");if(f.colorFilter||!f.colorSpace)return f;if(typeof f.colorSpace=="string"){if(!t_.has(f.colorSpace))throw new Error('unknown `colorSpace` "'.concat(f.colorSpace,'".'));l=n1[f.colorSpace]}else if(Array.isArray(f.colorSpace)){if(f.colorSpace.length!==6)throw new Error("expecting a `colorSpace` array of length 6 ([hmin, hmax, cmin, cmax, lmin, lmax]).");l=f.colorSpace}else l=[f.colorSpace.hmin||0,f.colorSpace.hmax||360,f.colorSpace.cmin||0,f.colorSpace.cmax||100,f.colorSpace.lmin||0,f.colorSpace.lmax||100];return f.colorFilter=function(h,y){var d=Mr.labToHcl(y);return l[0]<l[1]?d[0]>=l[0]&&d[0]<=l[1]&&d[1]>=l[2]&&d[1]<=l[3]&&d[2]>=l[4]&&d[2]<=l[5]:(d[0]>=l[0]||d[0]<=l[1])&&d[1]>=l[2]&&d[1]<=l[3]&&d[2]>=l[4]&&d[2]<=l[5]},f})(e);var n=new e_(e.seed),o=Mr.distance,s=function(v,l){return!!Mr.validateRgb(v)&&(!e.colorFilter||!!e.colorFilter(v,l))},u=(function(v,l,f){for(var h,y,d=new Array(l),p=0;p<l;p++){do h=[100*v(),100*(2*v()-1),100*(2*v()-1)],y=Mr.labToRgb(h);while(!f(y,h));d[p]=h}return d})((function(){return n.nextFloat()}),r,s);return(t=e)!==null&&t!==void 0&&t.color&&(u[0]=ur(e.color).lab()),(function(v,l,f,h){var y,d,p,S,w=[],$=[],C=4,b=10,E=10;for(h.ultraPrecision&&(C=1,b=5,E=5),y=0;y<=100;y+=C)for(d=-100;d<=100;d+=b)for(p=-100;p<=100;p+=E)S=[y,d,p],l(Mr.labToRgb(S),S)&&(w.push(S),$.push(null));for(var m,O,M,F,q,x,k,A,B,G=h.quality||ip.quality,W=w.length,Q=f.length;G-- >0;){for(m=0;m<W;m++)for(M=w[m],q=1/0,O=0;O<Q;O++)(F=v(f[O],M))<q&&(q=F,$[m]=O);for(x=ve(w).call(w),O=1;O<Q;O++){for(k=0,A=[0,0,0],m=0;m<W;m++)$[m]===O&&(k+=1,A[0]+=w[m][0],A[1]+=w[m][1],A[2]+=w[m][2]);if(k!==0)if(A[0]/=k,A[1]/=k,A[2]/=k,l(Mr.labToRgb(A),A))f[O]=A;else{var hr=x.length>0?x:w;for(q=1/0,B=-1,m=0;m<hr.length;m++)(F=v(hr[m],A))<q&&(q=F,B=m);f[O]=hr[B],x=Cs(x).call(x,(function(or){return or[0]!==f[O][0]||or[1]!==f[O][1]||or[2]!==f[O][2]}))}}}})(o,s,u,e),u=Mr.diffSort(o,u),Sr(u).call(u,Mr.labToRgbHex)}function n_(r,e){var t;return typeof e.colorSpace=="string"&&op[e.colorSpace]?(function(n,o,s){var u=[];if(!Array.isArray(s))return u;var v=function(d){return Cs(s).call(s,(function(p){return p[0]<=d&&d<p[1]}))[0]},l=function(d){for(o.colorSpace=d;;){var p=up(5,o)[3];if(!Np(u).call(u,p)){u.push(p);break}}};if(s.length===n)s.forEach((function(d){return l(d)}));else for(var f=360/n,h=1;h<=n;h++){var y=h*f-Math.random()*f;l(v(y))}return u})(r-1,e,op[e.colorSpace]):lt(t=up(r,e)).call(t,1,r)}function a_(r,e){for(var t=ur(r).lab(),n=100*(1-1/e),o=n/(e-1),s=.5*(100-n),u=(function(y,d,p){for(var S=[],w=d;w>y;w-=p)S.push(w);return S})(s,s+e*o,o),v=9999,l=0;l<e;l++){var f=t[0]-u[l];Math.abs(f)<Math.abs(v)&&(v=f)}var h=(function(y,d){var p={diff:1/0,idx:-1};d.forEach((function(w,$){Math.abs(y-w)<p.diff&&(p.diff=Math.abs(y-w),p.idx=$)}));var S=je(d).call(d);return S[p.idx]=y,S})(t[0],Sr(u).call(u,(function(y){return y+v})));return Sr(h).call(h,(function(y){return ur.lab(y,t[1],t[2])}))}var o_=function(r,e){var t,n,o,s=ur(r).hex()!=="#ffffff",u=s?e+1:e,v=ur(r).set("lch.l",17).hex(),l=ur(r).set("lch.l",9999).hex(),f=Sr(t=ks(n=Array(u)).call(n,1)).call(t,(function(d,p){return p/u})),h=ur.scale((o=[l,r,v],Kt(o).call(o,(function(d,p){return ur(p).get("lch.l")-ur(d).get("lch.l")})))).mode("hsl").correctLightness(),y=Sr(f).call(f,(function(d){return h(d).hex()}));return s&&y.shift(),y},i_=function(r,e,t){var n=o_(r,e);t==="range"&&(n=ur.scale(a_(r,e)).correctLightness().colors(e));var o=Sr(n).call(n,(function(u){return us.deltaE(u,r)})),s=Math.min.apply(Math,zt(o));return Sr(n).call(n,(function(u){return us.deltaE(u,r)===s?r:u}))};function vt(r){return typeof r=="string"?Se.fromInt(Yh(r)):Sr(r).call(r,(function(e){return Se.fromInt(Yh(e))}))}function fs(r){return Array.isArray(r)?Sr(r).call(r,(function(e){return Vh(Se.from(e.hue,e.chroma,e.tone).toInt())})):Vh(Se.from(r.hue,r.chroma,r.tone).toInt())}var a1=function(r){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:3;return Math.round(r*Math.pow(10,e))/Math.pow(10,e)},u_=function(r,e,t,n){var o;if(!r)return ks(o=new Array(n)).call(o,t);for(var s=[],u=(function(l,f,h){var y=[];if(!l||l.length<2)return function(E){return f};for(var d=1;d<l.length;d++){var p=l[d-1],S=p.x,w=p.y,$=l[d],C=$.x,b=($.y-w)/(C-S);y.push({k:b,range:[S,C],base:w,formula:function(E,m){var O=this.base+(E-this.range[0])*this.k,M=m/f;return Math.min(100,Math.max(0,m+O*M))}})}return function(E,m){var O,M=10*Math.min(E,h)/h;return((O=US(y).call(y,(function(F){return F.range[0]<=M&&F.range[1]>=M})))===null||O===void 0?void 0:O.formula(M,m))||m}})(r,e||r[0].y||t,n),v=1;v<=n;v++)s.unshift(a1(u(v,t)));return s},s_={Blue:{bezier:[.28,.22,.86,.98],toneRange:[12,96]},Cyan:{bezier:[.63,.58,.79,.92],toneRange:[13,96]},Green:{bezier:[.85,.82,.84,1],toneRange:[12,96],piecewise:[{x:0,y:0},{x:5,y:0},{x:6,y:-5},{x:7,y:-7},{x:8,y:-18},{x:9,y:-30},{x:10,y:-40}],piecewiseBase:55},Lemon:{bezier:[.62,.51,.39,.82],toneRange:[12,98],piecewise:[{x:0,y:0},{x:7,y:0},{x:8,y:-10},{x:9,y:-25},{x:10,y:-50}],piecewiseBase:73},Yellow:{bezier:[.3,.25,.5,.8],toneRange:[12,97]},Orange:{bezier:[.31,.2,.7,.83],toneRange:[13,96],piecewise:[{x:0,y:0},{x:6,y:0},{x:7,y:-11},{x:8,y:-2},{x:9,y:0},{x:10,y:0}],piecewiseBase:59},Red:{bezier:[.31,.26,.7,.83],toneRange:[12,96],piecewise:[{x:0,y:-12},{x:2,y:-12},{x:3,y:-11},{x:4,y:-7},{x:5,y:-2},{x:6,y:-6},{x:7,y:0},{x:10,y:0}],piecewiseBase:72},Pink:{bezier:[.55,.45,.86,.99],toneRange:[12,96],piecewise:[{x:0,y:0},{x:1,y:0},{x:2,y:-12},{x:3,y:-11},{x:4,y:-7},{x:5,y:-2},{x:6,y:0},{x:10,y:0}],piecewiseBase:75},Purple:{bezier:[.25,.13,.71,.88],toneRange:[10,96]},Lime:{bezier:[.75,.68,.84,.99],toneRange:[12,97],piecewise:[{x:0,y:0},{x:5,y:0},{x:6,y:-5},{x:7,y:-7},{x:8,y:-18},{x:9,y:-30},{x:10,y:-40}],piecewiseBase:55},Mint:{bezier:[.46,.4,.84,.96],toneRange:[13,97],piecewise:[{x:0,y:0},{x:5,y:0},{x:6,y:-5},{x:7,y:-7},{x:8,y:-18},{x:9,y:-30},{x:10,y:-40}],piecewiseBase:55}},c_={"#2ba471":"#00a870","#d54941":"#d94941","#43c0c6":"#00c8cF","#8eba36":"#81b305","#00c3c3":"#1fffff"};function f_(r){var e,t,n;if(typeof r=="string"){e=r;for(var o=arguments.length,s=new Array(o>1?o-1:0),u=1;u<o;u++)s[u-1]=arguments[u];t=s[0],n=!1}else e=r.color,t=r.step,n=!!r.remainInput;return l_({color:e.toLowerCase(),step:t,remainInput:n})}function l_(r){var e,t,n=r.color,o=r.step,s=r.remainInput,u=vt(n),v=c_[n]||n,l=vt(v),f=s_[(function(b){var E=b%360;switch(!0){case(E>=10&&E<30):return"Red";case(E>=30&&E<60):return"Orange";case(E>=60&&E<102):return"Yellow";case(E>=102&&E<115):return"Lemon";case(E>=115&&E<130):return"Lime";case(E>=130&&E<180):return"Green";case(E>=180&&E<210):return"Mint";case(E>=210&&E<240):return"Cyan";case(E>=240&&E<285):return"Blue";case(E>=285&&E<325):return"Purple";default:return"Pink"}})(l.hue)],h=(function(b){var E=Uu(b.range,2),m=E[0],O=E[1],M=Uu(b.bezierMeta,4),F=M[0],q=M[1],x=M[2],k=M[3],A=b.count,B=[];try{for(var G=YS(F,q,x,k),W=Math.abs(O-m),Q=1/(A-1),hr=0;hr<A;hr++){var or=G(hr*Q)*W;if(m+or>O)break;B.unshift(a1(m+or))}}catch{}return B})({range:f.toneRange,bezierMeta:f.bezier,count:o});if(!h.length)for(var y=Uu(f.toneRange,2),d=y[0],p=y[1],S=(p-d)/(o-1),w=d;w<=p;w+=S)h.push(w);var $=(function(b){var E=vt("#fff");return b.hue===E.hue&&b.chroma===E.chroma&&b.tone===E.tone})(l)?ks(e=Array(o)).call(e,0):u_(f.piecewise,f.piecewiseBase,l.chroma,o),C=(function(b){var E=b.hctColor,m=b.originColor,O=b.originHctColor,M=b.chromas,F=b.tones,q=b.remainInput,x=Sr(F).call(F,(function(G,W){var Q=M?.[W];return{hue:E.hue,chroma:typeof Q=="number"?Q:E.chroma,tone:G}})),k=-1,A=1/0,B=ur(m).lab();return x.forEach((function(G,W){var Q=fs(G),hr=Mr.distance(ur(Q).lab(),B);hr<A&&(k=W,A=hr)})),q&<(x).call(x,k,1,O),{colors:x,primary:k}})({originColor:n,originHctColor:u,hctColor:l,chromas:$,tones:h,remainInput:l.tone>f.toneRange[1]||l.tone<f.toneRange[0]||s});return{colors:Sr(t=C.colors).call(t,(function(b){return fs(b)})),primary:C.primary}}function as(r){var e=[96,94,92,88,80,68,58,50,40,32,24,18,14,8],t=vt(r);return r.toLowerCase()==="#0052d9"&&(e[8]=t.tone),Sr(e).call(e,(function(n){return fs({hue:t.hue,chroma:t.chroma,tone:n})}))}var De=(function(){function r(){$s(this,r)}return Ms(r,null,[{key:"getRandomPalette",value:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=e.color,n=t===void 0?"#0052d9":t,o=e.colorGamut,s=e.number,u=s===void 0?8:s,v=e.sortMethod,l=v===void 0?"DEThreshold":v,f=Mr.generateLockedColor(n),h={color:f,quality:100,colorSpace:o||"bright"},y=n_(u,h),d=(l==="DEThreshold"?Mr.sortColorsByDEThreshold:Mr.sortColorsByComplementary)(y,n);return d}},{key:"getPaletteByGradation",value:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{colors:[]},t=e.colors,n=e.step,o=n===void 0?10:n,s=e.method,u=s===void 0?"darken":s;return Sr(t).call(t,(function(v){return i_(v,o,u)}))}},{key:"getColorGradations",value:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{colors:[]},t=e.colors,n=e.step,o=n===void 0?10:n,s=e.remainInput,u=s!==void 0&&s;return Sr(t).call(t,(function(v){return f_({color:v,step:o,remainInput:u})}))}},{key:"getNeutralColorGradation",value:function(e){return as(e)}},{key:"getNeutralColor",value:function(e){return(function(t){var n=as(t),o=as("#000000");return Sr(n).call(n,(function(s,u){var v=vt(s);return v.hue>=102&&v.hue<210?ur.average([s,o[u]],"rgb",[.08,.92]).hex():ur.average([s,o[u]],"rgb",[.12,.88]).hex()}))})(e)}}]),r})(),dt=(function(){function r(){$s(this,r)}return Ms(r,null,[{key:"color2arr",value:function(e){var t;return((t=e.match(/(\d|\.)+%?/g))===null||t===void 0?void 0:Sr(t).call(t,(function(n){return Np(n).call(n,"%")?parseFloat(n)/100:Number(n)})))||[0,0,0]}},{key:"similar",value:function(e,t){return Mr.distance(ur(e).lab(),ur(t).lab())}},{key:"contrast",value:function(e,t){return Mr.contrast(ur(e).rgb(),ur(t).rgb())}},{key:"scale",value:function(e,t,n){return ur.scale([e,t]).colors(n)}},{key:"sortColorsByComplementary",value:function(e,t){return Mr.sortColorsByComplementary(e,t)}},{key:"sortColorsByDEThreshold",value:function(e,t){return Mr.sortColorsByDEThreshold(e,t)}},{key:"getRandomPalette",value:function(e){return De.getRandomPalette(e)}},{key:"getPaletteByGradation",value:function(e){return De.getPaletteByGradation(e)}},{key:"getRandomPaletteByGradation",value:function(e){return De.getPaletteByGradation(e)}},{key:"getColorGradations",value:function(e){return De.getColorGradations(e)}},{key:"getNeutralColorGradation",value:function(e){return De.getNeutralColorGradation(e)}},{key:"getNeutralColor",value:function(e){return De.getNeutralColor(e)}}]),r})();qm(dt,"colorTransform",(function(r){var e,t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"hex",n=arguments.length>2?arguments[2]:void 0;if(t==="name")e=ur(r)[n]();else if(t!=="hex"&&typeof r=="string"){var o=dt.color2arr(r);e=ur(o,t)[n]()}else e=t!=="hex"&&Array.isArray(r)?ur(zt(r),t)[n]():ur(r)[n]();return Array.isArray(e)?Sr(e).call(e,(function(s){return parseFloat(s.toFixed(3))})):e}));var os={exports:{}},sp;function v_(){return sp||(sp=1,(function(r,e){(function(){function t(n,o){var s,u=0,v=n.length,l,f="",h,y,d,p,S,w,$,C,b=!0,E=!1,m;s=arguments.length>1?o:{},typeof s.indent>"u"&&(s.indent=" "),typeof s.openbrace=="string"&&(b=s.openbrace==="end-of-line"),typeof s.autosemicolon=="boolean"&&(E=s.autosemicolon);function O(A){return A===" "||A===`
|
|
150
|
+
`||A===" "||A==="\r"||A==="\f"}function M(A){return A==="'"||A==='"'}function F(A){return h>="a"&&h<="z"||h>="A"&&h<="Z"||h>="0"&&h<="9"||"-_*.:#[]".indexOf(A)>=0}function q(){var A;for(A=w;A>0;A-=1)f+=s.indent}function x(){f=m(f),b?f+=" {":(f+=`
|
|
151
|
+
`,q(),f+="{"),y!==`
|
|
152
|
+
`&&(f+=`
|
|
153
|
+
`),w+=1}function k(){var A;w-=1,f=m(f),f.length>0&&E&&(A=f.charAt(f.length-1),A!==";"&&A!=="{"&&(f+=";")),f+=`
|
|
154
|
+
`,q(),f+="}",l.push(f),f=""}for(String.prototype.trimRight?m=function(A){return A.trimRight()}:m=function(A){return A.replace(/\s+$/,"")},S={Start:0,AtRule:1,Block:2,Selector:3,Ruleset:4,Property:5,Separator:6,Expression:7,URL:8},w=0,p=S.Start,C=!1,l=[],n=n.replace(/\r\n/g,`
|
|
155
|
+
`);u<v;){if(h=n.charAt(u),y=n.charAt(u+1),u+=1,M($)){f+=h,h===$&&($=null),h==="\\"&&y===$&&(f+=y,u+=1);continue}if(M(h)){f+=h,$=h;continue}if(C){f+=h,h==="*"&&y==="/"&&(C=!1,f+=y,u+=1);continue}if(h==="/"&&y==="*"){C=!0,f+=h,f+=y,u+=1;continue}if(p===S.Start){if(l.length===0&&O(h)&&f.length===0)continue;if(h<=" "||h.charCodeAt(0)>=128){p=S.Start,f+=h;continue}if(F(h)||h==="@"){if(d=m(f),d.length===0)l.length>0&&(f=`
|
|
156
|
+
|
|
157
|
+
`);else if(d.charAt(d.length-1)==="}"||d.charAt(d.length-1)===";")f=d+`
|
|
158
|
+
|
|
159
|
+
`;else for(;y=f.charAt(f.length-1),!(y!==" "&&y.charCodeAt(0)!==9);)f=f.substr(0,f.length-1);f+=h,p=h==="@"?S.AtRule:S.Selector;continue}}if(p===S.AtRule){if(h===";"){f+=h,p=S.Start;continue}if(h==="{"){d=m(f),x(),p=d==="@font-face"?S.Ruleset:S.Block;continue}f+=h;continue}if(p===S.Block){if(F(h)){if(d=m(f),d.length===0)l.length>0&&(f=`
|
|
160
|
+
|
|
161
|
+
`);else if(d.charAt(d.length-1)==="}")f=d+`
|
|
162
|
+
|
|
163
|
+
`;else for(;y=f.charAt(f.length-1),!(y!==" "&&y.charCodeAt(0)!==9);)f=f.substr(0,f.length-1);q(),f+=h,p=S.Selector;continue}if(h==="}"){k(),p=S.Start;continue}f+=h;continue}if(p===S.Selector){if(h==="{"){x(),p=S.Ruleset;continue}if(h==="}"){k(),p=S.Start;continue}f+=h;continue}if(p===S.Ruleset){if(h==="}"){k(),p=S.Start,w>0&&(p=S.Block);continue}if(h===`
|
|
164
|
+
`){f=m(f),f+=`
|
|
165
|
+
`;continue}if(!O(h)){f=m(f),f+=`
|
|
166
|
+
`,q(),f+=h,p=S.Property;continue}f+=h;continue}if(p===S.Property){if(h===":"){f=m(f),f+=": ",p=S.Expression,O(y)&&(p=S.Separator);continue}if(h==="}"){k(),p=S.Start,w>0&&(p=S.Block);continue}f+=h;continue}if(p===S.Separator){if(!O(h)){f+=h,p=S.Expression;continue}M(y)&&(p=S.Expression);continue}if(p===S.Expression){if(h==="}"){k(),p=S.Start,w>0&&(p=S.Block);continue}if(h===";"){f=m(f),f+=`;
|
|
167
|
+
`,p=S.Ruleset;continue}if(f+=h,h==="("&&f.charAt(f.length-2)==="l"&&f.charAt(f.length-3)==="r"&&f.charAt(f.length-4)==="u"){p=S.URL;continue}continue}if(p===S.URL&&h===")"&&f.charAt(f.length-1!=="\\")){f+=h,p=S.Expression;continue}f+=h}return f=l.join("")+f,f}r.exports=t})()})(os)),os.exports}var d_=v_();const h_=gr(d_),p_={"--td-radius-small":"2px","--td-radius-default":"3px","--td-radius-medium":"6px","--td-radius-large":"9px","--td-radius-extraLarge":"12px","--td-radius-round":"999px","--td-radius-circle":"50%"},y_={"--td-font-family":"pingfang sc, microsoft yahei, arial regular","--td-font-family-medium":"pingfang sc, microsoft yahei, arial medium","--td-font-size-link-small":"12px","--td-font-size-link-medium":"14px","--td-font-size-link-large":"16px","--td-font-size-mark-small":"12px","--td-font-size-mark-medium":"14px","--td-font-size-body-small":"12px","--td-font-size-body-medium":"14px","--td-font-size-body-large":"16px","--td-font-size-title-small":"14px","--td-font-size-title-medium":"16px","--td-font-size-title-large":"20px","--td-font-size-headline-small":"24px","--td-font-size-headline-medium":"28px","--td-font-size-headline-large":"36px","--td-font-size-display-medium":"48px","--td-font-size-display-large":"64px","--td-line-height-link-small":"20px","--td-line-height-link-medium":"22px","--td-line-height-link-large":"24px","--td-line-height-mark-small":"20px","--td-line-height-mark-medium":"22px","--td-line-height-body-small":"20px","--td-line-height-body-medium":"22px","--td-line-height-body-large":"24px","--td-line-height-title-small":"22px","--td-line-height-title-medium":"24px","--td-line-height-title-large":"28px","--td-line-height-headline-small":"32px","--td-line-height-headline-medium":"36px","--td-line-height-headline-large":"44px","--td-line-height-display-medium":"56px","--td-line-height-display-large":"72px"};function b_(){return`:root {
|
|
168
|
+
${Object.entries(p_).map(([e,t])=>` ${e}: ${t};`).join(`
|
|
169
|
+
`)}
|
|
170
|
+
}`}function g_(){return`:root {
|
|
171
|
+
${Object.entries(y_).map(([e,t])=>` ${e}: ${t};`).join(`
|
|
172
|
+
`)}
|
|
173
|
+
}`}const Yr="custom-theme",Ne=`${Yr}-dark`,o1=`${Yr}-extra`,ft=`${Yr}-common`,Be=`${Yr}-options`,Ge=`${Yr}-tokens`,Wt={value:"#0052d9",name:"TDesign",enName:"TDesign"},i1=`
|
|
174
|
+
--td-warning-color-1: #fff1e9;
|
|
175
|
+
--td-warning-color-2: #ffd9c2;
|
|
176
|
+
--td-warning-color-3: #ffb98c;
|
|
177
|
+
--td-warning-color-4: #fa9550;
|
|
178
|
+
--td-warning-color-5: #e37318;
|
|
179
|
+
--td-warning-color-6: #be5a00;
|
|
180
|
+
--td-warning-color-7: #954500;
|
|
181
|
+
--td-warning-color-8: #713300;
|
|
182
|
+
--td-warning-color-9: #532300;
|
|
183
|
+
--td-warning-color-10: #3b1700;
|
|
184
|
+
--td-error-color-1: #fff0ed;
|
|
185
|
+
--td-error-color-2: #ffd8d2;
|
|
186
|
+
--td-error-color-3: #ffb9b0;
|
|
187
|
+
--td-error-color-4: #ff9285;
|
|
188
|
+
--td-error-color-5: #f6685d;
|
|
189
|
+
--td-error-color-6: #d54941;
|
|
190
|
+
--td-error-color-7: #ad352f;
|
|
191
|
+
--td-error-color-8: #881f1c;
|
|
192
|
+
--td-error-color-9: #68070a;
|
|
193
|
+
--td-error-color-10: #490002;
|
|
194
|
+
--td-success-color-1: #e3f9e9;
|
|
195
|
+
--td-success-color-2: #c6f3d7;
|
|
196
|
+
--td-success-color-3: #92dab2;
|
|
197
|
+
--td-success-color-4: #56c08d;
|
|
198
|
+
--td-success-color-5: #2ba471;
|
|
199
|
+
--td-success-color-6: #008858;
|
|
200
|
+
--td-success-color-7: #006c45;
|
|
201
|
+
--td-success-color-8: #005334;
|
|
202
|
+
--td-success-color-9: #003b23;
|
|
203
|
+
--td-success-color-10: #002515;
|
|
204
|
+
`,u1=`
|
|
205
|
+
--td-warning-color-1: #4f2a1d;
|
|
206
|
+
--td-warning-color-2: #582f21;
|
|
207
|
+
--td-warning-color-3: #733c23;
|
|
208
|
+
--td-warning-color-4: #a75d2b;
|
|
209
|
+
--td-warning-color-5: #cf6e2d;
|
|
210
|
+
--td-warning-color-6: #dc7633;
|
|
211
|
+
--td-warning-color-7: #e8935c;
|
|
212
|
+
--td-warning-color-8: #ecbf91;
|
|
213
|
+
--td-warning-color-9: #eed7bf;
|
|
214
|
+
--td-warning-color-10: #f3e9dc;
|
|
215
|
+
--td-error-color-1: #472324;
|
|
216
|
+
--td-error-color-2: #5e2a2d;
|
|
217
|
+
--td-error-color-3: #703439;
|
|
218
|
+
--td-error-color-4: #83383e;
|
|
219
|
+
--td-error-color-5: #a03f46;
|
|
220
|
+
--td-error-color-6: #c64751;
|
|
221
|
+
--td-error-color-7: #de6670;
|
|
222
|
+
--td-error-color-8: #ec888e;
|
|
223
|
+
--td-error-color-9: #edb1b6;
|
|
224
|
+
--td-error-color-10: #eeced0;
|
|
225
|
+
--td-success-color-1: #193a2a;
|
|
226
|
+
--td-success-color-2: #1a4230;
|
|
227
|
+
--td-success-color-3: #17533d;
|
|
228
|
+
--td-success-color-4: #0d7a55;
|
|
229
|
+
--td-success-color-5: #059465;
|
|
230
|
+
--td-success-color-6: #43af8a;
|
|
231
|
+
--td-success-color-7: #46bf96;
|
|
232
|
+
--td-success-color-8: #80d2b6;
|
|
233
|
+
--td-success-color-9: #b4e1d3;
|
|
234
|
+
--td-success-color-10: #deede8;
|
|
235
|
+
`;function me(r){let e=document.getElementById(r);return e||(e=document.createElement("style"),e.id=r,e.type="text/css",document.head.appendChild(e)),e}function ls(r,e=!1,t=10,n=!0){const o=r.toLowerCase(),s=e?':root[theme-mode="dark"]':':root,:root[theme-mode="light"]';let u,v;const[{colors:l,primary:f}]=dt.getColorGradations({colors:[o],step:t,remainInput:n});return u=l,v=f,o===Wt.value.toLowerCase()&&(v=8),e&&(o===Wt.value.toLowerCase()?(u=["#1b2f51","#173463","#143975","#103d88","#0d429a","#054bbe","#2667d4","#4582e6","#699ef5","#96bbf8"],v=8):(u=u.reverse().map(y=>{const[d,p,S]=dt.colorTransform(y,"hex","hsl");return dt.colorTransform([d,Number(p)-4,S],"hsl","hex")}),v=5),u[0]=`${u[v]}20`),{styleSheetString:`${s}{
|
|
236
|
+
--td-brand-color-1: ${u[0]};
|
|
237
|
+
--td-brand-color-2: ${u[1]};
|
|
238
|
+
--td-brand-color-3: ${u[2]};
|
|
239
|
+
--td-brand-color-4: ${u[3]};
|
|
240
|
+
--td-brand-color-5: ${u[4]};
|
|
241
|
+
--td-brand-color-6: ${u[5]};
|
|
242
|
+
--td-brand-color-7: ${u[6]};
|
|
243
|
+
--td-brand-color-8: ${u[7]};
|
|
244
|
+
--td-brand-color-9: ${u[8]};
|
|
245
|
+
--td-brand-color-10: ${u[9]};
|
|
246
|
+
--td-brand-color-light: var(--td-brand-color-1);
|
|
247
|
+
--td-brand-color-focus: var(--td-brand-color-2);
|
|
248
|
+
--td-brand-color-disabled: var(--td-brand-color-3);
|
|
249
|
+
--td-brand-color-hover: var(--td-brand-color-${v>0?v:v+1});
|
|
250
|
+
--td-brand-color: var(--td-brand-color-${v+1});
|
|
251
|
+
--td-brand-color-active:var(--td-brand-color-${v>8?v+1:v+2});
|
|
252
|
+
${e?u1:i1}
|
|
253
|
+
}`,brandColorIdx:v,colorPalette:u}}function s1(r,e=!0,t="web"){l1("color",r,r!==Wt.value);const n=me(Yr),o=me(Ne),{brandColorIdx:s,colorPalette:u,styleSheetString:v}=ls(r,!1,10,e),l=ls(r,!0).styleSheetString;return n.textContent=v,o.textContent=l,document.documentElement.setAttribute("theme-color",Yr),document.documentElement.style.setProperty("--brand-main",r),{brandColorIdx:s,colorPalette:u}}function m_(r="web"){const e=document.getElementById(Yr),t=document.getElementById(Ne),n=vs(e?.textContent||""),o=vs(t?.textContent||""),s=`
|
|
254
|
+
:root, :root[theme-mode="light"] {
|
|
255
|
+
${n}
|
|
256
|
+
}
|
|
257
|
+
:root[theme-mode="dark"] {
|
|
258
|
+
${o}
|
|
259
|
+
}
|
|
260
|
+
`,u=h_(s.trim()),v=new window.Blob([u],{type:"text/css"});c1(v,"theme.css")}function vs(r){const e=r.match(/{([^}]*)}/);return e?e[1].trim():""}function c1(r,e){const t=window.URL.createObjectURL(r),n=document.createElement("a");n.href=t,n.download=e,n.click(),window.URL.revokeObjectURL(t)}function f1(r,e,t=!0){const n=document.querySelectorAll(`#${Yr}, #${Ne}, #${o1}, [id^="${ft}-"]`);let o=!1;if(n.forEach(s=>{const u=new RegExp(`${r}:\\s*(.*?);`),v=s.textContent?.match(u);if(!v)return;if(v[1].trim()===e.trim()){o=!0;return}const l=v[1];s.textContent=s.textContent?.replace(`${r}: ${l}`,`${r}: ${e}`),o=!0,t&&ge(r,e)}),!o&&r.startsWith("--td-radius-")){const s=`${ft}-radius`;let u=document.getElementById(s);u||(u=me(s),u.textContent=b_());const v=new RegExp(`${r}:\\s*(.*?);`),l=u.textContent?.match(v);if(l){const f=l[1];u.textContent=u.textContent.replace(`${r}: ${f}`,`${r}: ${e}`),o=!0,t&&ge(r,e)}}if(!o&&(r.startsWith("--td-font-size-")||r.startsWith("--td-line-height-")||r.startsWith("--td-font-family"))){const s=`${ft}-font`;let u=document.getElementById(s);u||(u=me(s),u.textContent=g_());const v=new RegExp(`${r}:\\s*(.*?);`),l=u.textContent?.match(v);if(l){const f=l[1];u.textContent=u.textContent.replace(`${r}: ${f}`,`${r}: ${e}`),o=!0,t&&ge(r,e)}else{const h=(u.textContent||"").replace(/:root\s*\{/,`:root {
|
|
261
|
+
${r}: ${e};`);u.textContent=h,o=!0,t&&ge(r,e)}}if(!o&&(r.startsWith("--td-comp-size-")||r.startsWith("--td-comp-paddingLR-")||r.startsWith("--td-comp-paddingTB-")||r.startsWith("--td-comp-margin-")||r.startsWith("--td-pop-padding-"))){const s=`${ft}-size`;let u=document.getElementById(s);if(!u)u=me(s),u.textContent=`:root {
|
|
262
|
+
${r}: ${e};
|
|
263
|
+
}`,o=!0;else{const v=new RegExp(`${r}:\\s*(.*?);`),l=u.textContent?.match(v);if(l){const f=l[1];u.textContent=u.textContent.replace(`${r}: ${f}`,`${r}: ${e}`),o=!0}else{const f=u.textContent||"",h=f.lastIndexOf("}");if(h!==-1){const y=f.substring(0,h),d=f.substring(h);u.textContent=`${y}
|
|
264
|
+
${r}: ${e};${d}`}else u.textContent=`${f}
|
|
265
|
+
${r}: ${e};`;o=!0}}o&&t&&ge(r,e)}if(!o&&r.startsWith("--td-text-color-")){const s=document.documentElement.getAttribute("theme-mode")==="dark",u=s?Ne:Yr;let v=document.getElementById(u);if(v){const l=new RegExp(`${r}:\\s*(.*?);`),f=v.textContent?.match(l);if(f){const h=f[1];v.textContent=v.textContent.replace(`${r}: ${h}`,`${r}: ${e}`),o=!0}else{const h=v.textContent||"",y=h.lastIndexOf("}");if(y!==-1){const d=h.substring(0,y),p=h.substring(y);v.textContent=`${d}
|
|
266
|
+
${r}: ${e};${p}`}else v.textContent=`${h}
|
|
267
|
+
${r}: ${e};`;o=!0}}else{v=me(u);const l=s?':root[theme-mode="dark"]':':root,:root[theme-mode="light"]';v.textContent=`${l}{
|
|
268
|
+
${r}: ${e};
|
|
269
|
+
}`,o=!0}o&&t&&ge(r,e)}o||console.warn(`CSS variable: ${r} is not exist`)}function l1(r,e,t=!0){if(t){const n=localStorage.getItem(Be)||"{}",o=JSON.parse(n);o[r]=e,localStorage.setItem(Be,JSON.stringify(o))}}function S_(r){const e=localStorage.getItem(Be);return e&&JSON.parse(e)[r]||null}function ge(r,e){const t=localStorage.getItem(Ge)||"{}",n=JSON.parse(t);n[r]=e,localStorage.setItem(Ge,JSON.stringify(n))}function v1(){const r=localStorage.getItem(Ge);if(!r)return;const e=JSON.parse(r);Object.entries(e).forEach(([t,n])=>{f1(t,n,!1)})}function d1(r){const e=localStorage.getItem(Be);if(!e)return;const n=JSON.parse(e).color;n&&s1(n,!1,r)}function __(r){d1(r),v1()}function R_(){localStorage.removeItem(Be),localStorage.removeItem(Ge)}function I_(r){const e=localStorage.getItem(Ge);if(!e)return;const t=JSON.parse(e);return r?t[r]:t}function q_(r){const e=document.documentElement.getAttribute("theme-mode")==="dark",t=document.querySelector(e?`#${Ne}`:`#${Yr}`);return r.reduce((o,s)=>{const u=new RegExp(`${s}:\\s*var\\((--td-[\\w-]+)\\)`,"i"),v=t?.textContent?.match(u);if(v&&v[1]){const l=v[1].match(/(\d+)$/);l&&l[1]&&o.push({name:s,idx:parseInt(l[1],10)})}return o},[]).sort((o,s)=>o.idx-s.idx)}const w_="./components/ThemeGenerator";exports.CUSTOM_COMMON_ID_PREFIX=ft;exports.CUSTOM_DARK_ID=Ne;exports.CUSTOM_EXTRA_ID=o1;exports.CUSTOM_OPTIONS_ID=Be;exports.CUSTOM_THEME_ID=Yr;exports.CUSTOM_TOKEN_ID=Ge;exports.DARK_FUNCTION_COLOR=u1;exports.DEFAULT_THEME=Wt;exports.LIGHT_FUNCTION_COLOR=i1;exports.appendStyleSheet=me;exports.applyMainColorFromLocal=d1;exports.applyThemeFromLocal=__;exports.applyTokenFromLocal=v1;exports.clearLocalTheme=R_;exports.collectTokenIndexes=q_;exports.default=w_;exports.downloadFile=c1;exports.exportCustomTheme=m_;exports.extractRootContent=vs;exports.generateNewTheme=s1;exports.generateTokenList=ls;exports.getOptionFromLocal=S_;exports.getTokenFromLocal=I_;exports.modifyToken=f1;exports.storeTokenToLocal=ge;exports.updateLocalOption=l1;
|