@likec4/core 1.59.2 → 1.59.3

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.
@@ -1106,6 +1106,10 @@ interface BaseViewProperties<A extends Any> extends WithOptionalTags<A>, WithOpt
1106
1106
  readonly id: StrictViewId<A>;
1107
1107
  readonly title: string | null;
1108
1108
  readonly description: MarkdownOrString | null;
1109
+ /**
1110
+ * Optional per-view navigation order.
1111
+ */
1112
+ readonly order?: number;
1109
1113
  /**
1110
1114
  * Source file containing this view, relative to the project root.
1111
1115
  * Undefined if the view is auto-generated.
@@ -1151,7 +1155,7 @@ interface ElementViewIncludePredicate<A extends Any = Any> extends AnyIncludePre
1151
1155
  interface ElementViewExcludePredicate<A extends Any = Any> extends AnyExcludePredicate<ModelExpression<A>> {}
1152
1156
  type ElementViewPredicate<A extends Any = Any> = ElementViewIncludePredicate<A> | ElementViewExcludePredicate<A>;
1153
1157
  interface ElementViewRuleGroup<A extends Any = Any> {
1154
- groupRules: Array<ElementViewPredicate<A> | ElementViewRuleGroup<A>>;
1158
+ groupRules: Array<ElementViewPredicate<A> | ViewRuleGlobalPredicateRef | ElementViewRuleGroup<A>>;
1155
1159
  title: string | null;
1156
1160
  color?: Color;
1157
1161
  border?: BorderStyle;
@@ -1401,6 +1405,7 @@ interface AbstractRelationship<A extends Any> extends WithDescriptionAndTech, Wi
1401
1405
  interface Relationship<A extends Any = Any> extends AbstractRelationship<A> {
1402
1406
  readonly source: FqnRef.ModelRef<A>;
1403
1407
  readonly target: FqnRef.ModelRef<A>;
1408
+ readonly isBidirectional?: boolean;
1404
1409
  }
1405
1410
  /**
1406
1411
  * Backward compatibility alias
@@ -1479,7 +1484,7 @@ interface ElementSpecification {
1479
1484
  };
1480
1485
  }
1481
1486
  interface TagSpecification {
1482
- color: ThemeColor | ColorLiteral;
1487
+ color: ThemeColor | CustomColor | ColorLiteral;
1483
1488
  }
1484
1489
  /**
1485
1490
  * Checks if tag color is defined in the specification
@@ -1556,6 +1561,14 @@ interface LikeC4Project {
1556
1561
  * Title of the project
1557
1562
  */
1558
1563
  title?: string;
1564
+ /**
1565
+ * Contact person/team responsible for the project
1566
+ */
1567
+ contactPerson?: string;
1568
+ /**
1569
+ * Additional metadata (from config)
1570
+ */
1571
+ metadata?: Record<string, unknown>;
1559
1572
  /**
1560
1573
  * Custom styles
1561
1574
  */
@@ -1,5 +1,5 @@
1
1
  import { r as __name } from "./rolldown-runtime.mjs";
2
- import { Br as DefaultTagColors, Cr as LikeC4StyleDefaults, Dt as LikeC4ProjectStylesConfig, Fr as ThemeColor, Ir as ThemeColorValues, Ji as Tag, Nr as SpacingSize, Nt as TagSpecification, Or as RelationshipColorValues, Ot as LikeC4ProjectStylesCustomStylesheets, Pr as TextSize, Sr as IconSize, Tr as LikeC4Theme, _r as CustomColorDefinitions, br as HexColor, et as ComputedNodeStyle, hr as ColorLiteral, jr as ShapeSize, mr as Color, pr as BorderStyle, va as NTuple, vr as ElementColorValues, wr as LikeC4StylesConfig, xr as IconPosition } from "./index.mjs";
2
+ import { Br as DefaultTagColors, Cr as LikeC4StyleDefaults, Dt as LikeC4ProjectStylesConfig, Fr as ThemeColor, Ir as ThemeColorValues, Ji as Tag, Nr as SpacingSize, Nt as TagSpecification, Or as RelationshipColorValues, Ot as LikeC4ProjectStylesCustomStylesheets, Pr as TextSize, Sr as IconSize, Tr as LikeC4Theme, _r as CustomColorDefinitions, br as HexColor, et as ComputedNodeStyle, gr as CustomColor, hr as ColorLiteral, jr as ShapeSize, mr as Color, pr as BorderStyle, va as NTuple, vr as ElementColorValues, wr as LikeC4StylesConfig, xr as IconPosition } from "./index.mjs";
3
3
  import { LiteralUnion } from "type-fest";
4
4
  import chroma from "chroma-js";
5
5
  //#region src/styles/assignTagColors.d.ts
@@ -135,7 +135,7 @@ declare class LikeC4Styles {
135
135
  /**
136
136
  * Get color values for a tag (including default tag colors)
137
137
  */
138
- tagColor(tag: typeof DefaultTagColors[number] | ThemeColor | ColorLiteral): ThemeColorValues['elements'];
138
+ tagColor(tag: typeof DefaultTagColors[number] | ThemeColor | CustomColor | ColorLiteral): ThemeColorValues['elements'];
139
139
  }
140
140
  //#endregion
141
141
  //#region src/styles/compute-color-values.d.ts
@@ -1,4 +1,4 @@
1
- import{r as e}from"../rolldown-runtime.mjs";const{min:t,max:n}=Math;var r=e((e,r=0,i=1)=>t(n(r,e),i),`default`),i=e(e=>{e._clipped=!1,e._unclipped=e.slice(0);for(let t=0;t<=3;t++)t<3?((e[t]<0||e[t]>255)&&(e._clipped=!0),e[t]=r(e[t],0,255)):t===3&&(e[t]=r(e[t],0,1));return e},`default`);const a={};for(let e of[`Boolean`,`Number`,`String`,`Function`,`Array`,`Date`,`RegExp`,`Undefined`,`Null`])a[`[object ${e}]`]=e.toLowerCase();function type_default(e){return a[Object.prototype.toString.call(e)]||`object`}e(type_default,`default`);var o=e((e,t=null)=>e.length>=3?Array.prototype.slice.call(e):type_default(e[0])==`object`&&t?t.split(``).filter(t=>e[0][t]!==void 0).map(t=>e[0][t]):e[0].slice(0),`default`),s=e(e=>{if(e.length<2)return null;let t=e.length-1;return type_default(e[t])==`string`?e[t].toLowerCase():null},`default`);const{PI:c,min:l,max:u}=Math,rnd2=e=>Math.round(e*100)/100,rnd3=e=>Math.round(e*100)/100,d=c*2,p=c/3,m=c/180,h=180/c;function reverse3(e){return[...e.slice(0,3).reverse(),...e.slice(3)]}var g={format:{},autodetect:[]},Color=class{constructor(...e){let t=this;if(type_default(e[0])===`object`&&e[0].constructor&&e[0].constructor===this.constructor)return e[0];let n=s(e),r=!1;if(!n){r=!0,g.sorted||=(g.autodetect=g.autodetect.sort((e,t)=>t.p-e.p),!0);for(let t of g.autodetect)if(n=t.test(...e),n)break}if(g.format[n])t._rgb=i(g.format[n].apply(null,r?e:e.slice(0,-1)));else throw Error(`unknown format: `+e);t._rgb.length===3&&t._rgb.push(1)}toString(){return type_default(this.hex)==`function`?this.hex():`[${this._rgb.join(`,`)}]`}};const chroma=(...e)=>new Color(...e);chroma.version=`3.2.0`;const _={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`,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`},v=/^#?([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/,y=/^#?([A-Fa-f0-9]{8}|[A-Fa-f0-9]{4})$/,hex2rgb=e=>{if(e.match(v)){(e.length===4||e.length===7)&&(e=e.substr(1)),e.length===3&&(e=e.split(``),e=e[0]+e[0]+e[1]+e[1]+e[2]+e[2]);let t=parseInt(e,16);return[t>>16,t>>8&255,t&255,1]}if(e.match(y)){(e.length===5||e.length===9)&&(e=e.substr(1)),e.length===4&&(e=e.split(``),e=e[0]+e[0]+e[1]+e[1]+e[2]+e[2]+e[3]+e[3]);let t=parseInt(e,16);return[t>>24&255,t>>16&255,t>>8&255,Math.round((t&255)/255*100)/100]}throw Error(`unknown hex color: ${e}`)},{round:b}=Math,rgb2hex=(...e)=>{let[t,n,r,i]=o(e,`rgba`),a=s(e)||`auto`;i===void 0&&(i=1),a===`auto`&&(a=i<1?`rgba`:`rgb`),t=b(t),n=b(n),r=b(r);let c=`000000`+(t<<16|n<<8|r).toString(16);c=c.substr(c.length-6);let l=`0`+b(i*255).toString(16);switch(l=l.substr(l.length-2),a.toLowerCase()){case`rgba`:return`#${c}${l}`;case`argb`:return`#${l}${c}`;default:return`#${c}`}};Color.prototype.name=function(){let e=rgb2hex(this._rgb,`rgb`);for(let t of Object.keys(_))if(_[t]===e)return t.toLowerCase();return e},g.format.named=e=>{if(e=e.toLowerCase(),_[e])return hex2rgb(_[e]);throw Error(`unknown color name: `+e)},g.autodetect.push({p:5,test:(e,...t)=>{if(!t.length&&type_default(e)===`string`&&_[e.toLowerCase()])return`named`}}),Color.prototype.alpha=function(e,t=!1){return e!==void 0&&type_default(e)===`number`?t?(this._rgb[3]=e,this):new Color([this._rgb[0],this._rgb[1],this._rgb[2],e],`rgb`):this._rgb[3]},Color.prototype.clipped=function(){return this._rgb._clipped||!1};const x={Kn:18,labWhitePoint:`d65`,Xn:.95047,Yn:1,Zn:1.08883,t0:.137931034,t1:.206896552,t2:.12841855,t3:.008856452,kE:216/24389,kKE:8,kK:24389/27,RefWhiteRGB:{X:.95047,Y:1,Z:1.08883},MtxRGB2XYZ:{m00:.4124564390896922,m01:.21267285140562253,m02:.0193338955823293,m10:.357576077643909,m11:.715152155287818,m12:.11919202588130297,m20:.18043748326639894,m21:.07217499330655958,m22:.9503040785363679},MtxXYZ2RGB:{m00:3.2404541621141045,m01:-.9692660305051868,m02:.055643430959114726,m10:-1.5371385127977166,m11:1.8760108454466942,m12:-.2040259135167538,m20:-.498531409556016,m21:.041556017530349834,m22:1.0572251882231791},As:.9414285350000001,Bs:1.040417467,Cs:1.089532651,MtxAdaptMa:{m00:.8951,m01:-.7502,m02:.0389,m10:.2664,m11:1.7135,m12:-.0685,m20:-.1614,m21:.0367,m22:1.0296},MtxAdaptMaI:{m00:.9869929054667123,m01:.43230526972339456,m02:-.008528664575177328,m10:-.14705425642099013,m11:.5183602715367776,m12:.04004282165408487,m20:.15996265166373125,m21:.0492912282128556,m22:.9684866957875502}},S=new Map([[`a`,[1.0985,.35585]],[`b`,[1.0985,.35585]],[`c`,[.98074,1.18232]],[`d50`,[.96422,.82521]],[`d55`,[.95682,.92149]],[`d65`,[.95047,1.08883]],[`e`,[1,1,1]],[`f2`,[.99186,.67393]],[`f7`,[.95041,1.08747]],[`f11`,[1.00962,.6435]],[`icc`,[.96422,.82521]]]);function setLabWhitePoint(e){let t=S.get(String(e).toLowerCase());if(!t)throw Error(`unknown Lab illuminant `+e);x.labWhitePoint=e,x.Xn=t[0],x.Zn=t[1]}function getLabWhitePoint(){return x.labWhitePoint}const lab2rgb=(...e)=>{e=o(e,`lab`);let[t,n,r]=e,[i,a,s]=lab2xyz(t,n,r),[c,l,u]=xyz2rgb(i,a,s);return[c,l,u,e.length>3?e[3]:1]},lab2xyz=(e,t,n)=>{let{kE:r,kK:i,kKE:a,Xn:o,Yn:s,Zn:c}=x,l=(e+16)/116,u=.002*t+l,d=l-.005*n,p=u*u*u,m=d*d*d,h=p>r?p:(116*u-16)/i,g=e>a?((e+16)/116)**3:e/i,_=m>r?m:(116*d-16)/i;return[h*o,g*s,_*c]},compand=e=>{let t=Math.sign(e);return e=Math.abs(e),(e<=.0031308?e*12.92:1.055*e**(1/2.4)-.055)*t},xyz2rgb=(e,t,n)=>{let{MtxAdaptMa:r,MtxAdaptMaI:i,MtxXYZ2RGB:a,RefWhiteRGB:o,Xn:s,Yn:c,Zn:l}=x,u=s*r.m00+c*r.m10+l*r.m20,d=s*r.m01+c*r.m11+l*r.m21,p=s*r.m02+c*r.m12+l*r.m22,m=o.X*r.m00+o.Y*r.m10+o.Z*r.m20,h=o.X*r.m01+o.Y*r.m11+o.Z*r.m21,g=o.X*r.m02+o.Y*r.m12+o.Z*r.m22,_=(e*r.m00+t*r.m10+n*r.m20)*(m/u),v=(e*r.m01+t*r.m11+n*r.m21)*(h/d),y=(e*r.m02+t*r.m12+n*r.m22)*(g/p),b=_*i.m00+v*i.m10+y*i.m20,S=_*i.m01+v*i.m11+y*i.m21,C=_*i.m02+v*i.m12+y*i.m22,w=compand(b*a.m00+S*a.m10+C*a.m20),T=compand(b*a.m01+S*a.m11+C*a.m21),E=compand(b*a.m02+S*a.m12+C*a.m22);return[w*255,T*255,E*255]},rgb2lab=(...e)=>{let[t,n,r,...i]=o(e,`rgb`),[a,s,c]=rgb2xyz(t,n,r),[l,u,d]=xyz2lab(a,s,c);return[l,u,d,...i.length>0&&i[0]<1?[i[0]]:[]]};function xyz2lab(e,t,n){let{Xn:r,Yn:i,Zn:a,kE:o,kK:s}=x,c=e/r,l=t/i,u=n/a,d=c>o?c**(1/3):(s*c+16)/116,p=l>o?l**(1/3):(s*l+16)/116,m=u>o?u**(1/3):(s*u+16)/116;return[116*p-16,500*(d-p),200*(p-m)]}function gammaAdjustSRGB(e){let t=Math.sign(e);return e=Math.abs(e),(e<=.04045?e/12.92:((e+.055)/1.055)**2.4)*t}const rgb2xyz=(e,t,n)=>{e=gammaAdjustSRGB(e/255),t=gammaAdjustSRGB(t/255),n=gammaAdjustSRGB(n/255);let{MtxRGB2XYZ:r,MtxAdaptMa:i,MtxAdaptMaI:a,Xn:o,Yn:s,Zn:c,As:l,Bs:u,Cs:d}=x,p=e*r.m00+t*r.m10+n*r.m20,m=e*r.m01+t*r.m11+n*r.m21,h=e*r.m02+t*r.m12+n*r.m22,g=o*i.m00+s*i.m10+c*i.m20,_=o*i.m01+s*i.m11+c*i.m21,v=o*i.m02+s*i.m12+c*i.m22,y=p*i.m00+m*i.m10+h*i.m20,b=p*i.m01+m*i.m11+h*i.m21,S=p*i.m02+m*i.m12+h*i.m22;return y*=g/l,b*=_/u,S*=v/d,p=y*a.m00+b*a.m10+S*a.m20,m=y*a.m01+b*a.m11+S*a.m21,h=y*a.m02+b*a.m12+S*a.m22,[p,m,h]};Color.prototype.lab=function(){return rgb2lab(this._rgb)},Object.assign(chroma,{lab:e((...e)=>new Color(...e,`lab`),`lab`),getLabWhitePoint,setLabWhitePoint}),g.format.lab=lab2rgb,g.autodetect.push({p:2,test:(...e)=>{if(e=o(e,`lab`),type_default(e)===`array`&&e.length===3)return`lab`}}),Color.prototype.darken=function(e=1){let t=this,n=t.lab();return n[0]-=x.Kn*e,new Color(n,`lab`).alpha(t.alpha(),!0)},Color.prototype.brighten=function(e=1){return this.darken(-e)},Color.prototype.darker=Color.prototype.darken,Color.prototype.brighter=Color.prototype.brighten,Color.prototype.get=function(e){let[t,n]=e.split(`.`),r=this[t]();if(n){let e=t.indexOf(n)-(t.substr(0,2)===`ok`?2:0);if(e>-1)return r[e];throw Error(`unknown channel ${n} in mode ${t}`)}else return r};const{pow:C}=Math;Color.prototype.luminance=function(e,t=`rgb`){if(e!==void 0&&type_default(e)===`number`){if(e===0)return new Color([0,0,0,this._rgb[3]],`rgb`);if(e===1)return new Color([255,255,255,this._rgb[3]],`rgb`);let n=this.luminance(),r=20,test=(n,i)=>{let a=n.interpolate(i,.5,t),o=a.luminance();return Math.abs(e-o)<1e-7||!r--?a:o>e?test(n,a):test(a,i)};return new Color([...(n>e?test(new Color([0,0,0]),this):test(this,new Color([255,255,255]))).rgb(),this._rgb[3]])}return rgb2luminance(...this._rgb.slice(0,3))};const rgb2luminance=(e,t,n)=>(e=luminance_x(e),t=luminance_x(t),n=luminance_x(n),.2126*e+.7152*t+.0722*n),luminance_x=e=>(e/=255,e<=.03928?e/12.92:C((e+.055)/1.055,2.4));var w={},T=e((e,t,n=.5,...r)=>{let i=r[0]||`lrgb`;if(!w[i]&&!r.length&&(i=Object.keys(w)[0]),!w[i])throw Error(`interpolation mode ${i} is not defined`);return type_default(e)!==`object`&&(e=new Color(e)),type_default(t)!==`object`&&(t=new Color(t)),w[i](e,t,n).alpha(e.alpha()+n*(t.alpha()-e.alpha()))},`default`);Color.prototype.mix=Color.prototype.interpolate=function(e,t=.5,...n){return T(this,e,t,...n)},Color.prototype.premultiply=function(e=!1){let t=this._rgb,n=t[3];return e?(this._rgb=[t[0]*n,t[1]*n,t[2]*n,n],this):new Color([t[0]*n,t[1]*n,t[2]*n,n],`rgb`)};const{sin:E,cos:ee}=Math,lch2lab=(...e)=>{let[t,n,r]=o(e,`lch`);return isNaN(r)&&(r=0),r*=m,[t,ee(r)*n,E(r)*n]},lch2rgb=(...e)=>{e=o(e,`lch`);let[t,n,r]=e,[i,a,s]=lch2lab(t,n,r),[c,l,u]=lab2rgb(i,a,s);return[c,l,u,e.length>3?e[3]:1]},hcl2rgb=(...e)=>lch2rgb(...reverse3(o(e,`hcl`))),{sqrt:D,atan2:te,round:O}=Math,lab2lch=(...e)=>{let[t,n,r]=o(e,`lab`),i=D(n*n+r*r),a=(te(r,n)*h+360)%360;return O(i*1e4)===0&&(a=NaN),[t,i,a]},rgb2lch=(...e)=>{let[t,n,r,...i]=o(e,`rgb`),[a,s,c]=rgb2lab(t,n,r),[l,u,d]=lab2lch(a,s,c);return[l,u,d,...i.length>0&&i[0]<1?[i[0]]:[]]};Color.prototype.lch=function(){return rgb2lch(this._rgb)},Color.prototype.hcl=function(){return reverse3(rgb2lch(this._rgb))};const k=e((...e)=>new Color(...e,`lch`),`lch`),hcl=(...e)=>new Color(...e,`hcl`);Object.assign(chroma,{lch:k,hcl}),g.format.lch=lch2rgb,g.format.hcl=hcl2rgb,[`lch`,`hcl`].forEach(e=>g.autodetect.push({p:2,test:(...t)=>{if(t=o(t,e),type_default(t)===`array`&&t.length===3)return e}})),Color.prototype.saturate=function(e=1){let t=this,n=t.lch();return n[1]+=x.Kn*e,n[1]<0&&(n[1]=0),new Color(n,`lch`).alpha(t.alpha(),!0)},Color.prototype.desaturate=function(e=1){return this.saturate(-e)},Color.prototype.set=function(e,t,n=!1){let[r,i]=e.split(`.`),a=this[r]();if(i){let e=r.indexOf(i)-(r.substr(0,2)===`ok`?2:0);if(e>-1){if(type_default(t)==`string`)switch(t.charAt(0)){case`+`:a[e]+=+t;break;case`-`:a[e]+=+t;break;case`*`:a[e]*=+t.substr(1);break;case`/`:a[e]/=+t.substr(1);break;default:a[e]=+t}else if(type_default(t)===`number`)a[e]=t;else throw Error(`unsupported value for Color.set`);let i=new Color(a,r);return n?(this._rgb=i._rgb,this):i}throw Error(`unknown channel ${i} in mode ${r}`)}else return a},Color.prototype.tint=function(e=.5,...t){return T(this,`white`,e,...t)},Color.prototype.shade=function(e=.5,...t){return T(this,`black`,e,...t)},w.rgb=e((e,t,n)=>{let r=e._rgb,i=t._rgb;return new Color(r[0]+n*(i[0]-r[0]),r[1]+n*(i[1]-r[1]),r[2]+n*(i[2]-r[2]),`rgb`)},`rgb`);const{sqrt:A,pow:j}=Math,lrgb=(e,t,n)=>{let[r,i,a]=e._rgb,[o,s,c]=t._rgb;return new Color(A(j(r,2)*(1-n)+j(o,2)*n),A(j(i,2)*(1-n)+j(s,2)*n),A(j(a,2)*(1-n)+j(c,2)*n),`rgb`)};w.lrgb=lrgb;const lab=(e,t,n)=>{let r=e.lab(),i=t.lab();return new Color(r[0]+n*(i[0]-r[0]),r[1]+n*(i[1]-r[1]),r[2]+n*(i[2]-r[2]),`lab`)};w.lab=lab;var M=e((e,t,n,r)=>{let i,a;r===`hsl`?(i=e.hsl(),a=t.hsl()):r===`hsv`?(i=e.hsv(),a=t.hsv()):r===`hcg`?(i=e.hcg(),a=t.hcg()):r===`hsi`?(i=e.hsi(),a=t.hsi()):r===`lch`||r===`hcl`?(r=`hcl`,i=e.hcl(),a=t.hcl()):r===`oklch`&&(i=e.oklch().reverse(),a=t.oklch().reverse());let o,s,c,l,u,d;(r.substr(0,1)===`h`||r===`oklch`)&&([o,c,u]=i,[s,l,d]=a);let p,m,h,g;return!isNaN(o)&&!isNaN(s)?(g=s>o&&s-o>180?s-(o+360):s<o&&o-s>180?s+360-o:s-o,m=o+n*g):isNaN(o)?isNaN(s)?m=NaN:(m=s,(u==1||u==0)&&r!=`hsv`&&(p=l)):(m=o,(d==1||d==0)&&r!=`hsv`&&(p=c)),p===void 0&&(p=c+n*(l-c)),h=u+n*(d-u),r===`oklch`?new Color([h,p,m],r):new Color([m,p,h],r)},`default`);const lch=(e,t,n)=>M(e,t,n,`lch`);w.lch=lch,w.hcl=lch;const num2rgb=e=>{if(type_default(e)==`number`&&e>=0&&e<=16777215)return[e>>16,e>>8&255,e&255,1];throw Error(`unknown num color: `+e)},rgb2num=(...e)=>{let[t,n,r]=o(e,`rgb`);return(t<<16)+(n<<8)+r};Color.prototype.num=function(){return rgb2num(this._rgb)},Object.assign(chroma,{num:e((...e)=>new Color(...e,`num`),`num`)}),g.format.num=num2rgb,g.autodetect.push({p:5,test:(...e)=>{if(e.length===1&&type_default(e[0])===`number`&&e[0]>=0&&e[0]<=16777215)return`num`}});const num=(e,t,n)=>{let r=e.num();return new Color(r+n*(t.num()-r),`num`)};w.num=num;const{floor:ne}=Math,hcg2rgb=(...e)=>{e=o(e,`hcg`);let[t,n,r]=e,i,a,s;r*=255;let c=n*255;if(n===0)i=a=s=r;else{t===360&&(t=0),t>360&&(t-=360),t<0&&(t+=360),t/=60;let e=ne(t),o=t-e,l=r*(1-n),u=l+c*(1-o),d=l+c*o,p=l+c;switch(e){case 0:[i,a,s]=[p,d,l];break;case 1:[i,a,s]=[u,p,l];break;case 2:[i,a,s]=[l,p,d];break;case 3:[i,a,s]=[l,u,p];break;case 4:[i,a,s]=[d,l,p];break;case 5:[i,a,s]=[p,l,u];break}}return[i,a,s,e.length>3?e[3]:1]},rgb2hcg=(...e)=>{let[t,n,r]=o(e,`rgb`),i=l(t,n,r),a=u(t,n,r),s=a-i,c=s*100/255,d=i/(255-s)*100,p;return s===0?p=NaN:(t===a&&(p=(n-r)/s),n===a&&(p=2+(r-t)/s),r===a&&(p=4+(t-n)/s),p*=60,p<0&&(p+=360)),[p,c,d]};Color.prototype.hcg=function(){return rgb2hcg(this._rgb)},chroma.hcg=e((...e)=>new Color(...e,`hcg`),`hcg`),g.format.hcg=hcg2rgb,g.autodetect.push({p:1,test:(...e)=>{if(e=o(e,`hcg`),type_default(e)===`array`&&e.length===3)return`hcg`}});const hcg=(e,t,n)=>M(e,t,n,`hcg`);w.hcg=hcg;const{cos:N}=Math,hsi2rgb=(...e)=>{e=o(e,`hsi`);let[t,n,i]=e,a,s,c;return isNaN(t)&&(t=0),isNaN(n)&&(n=0),t>360&&(t-=360),t<0&&(t+=360),t/=360,t<1/3?(c=(1-n)/3,a=(1+n*N(d*t)/N(p-d*t))/3,s=1-(c+a)):t<2/3?(t-=1/3,a=(1-n)/3,s=(1+n*N(d*t)/N(p-d*t))/3,c=1-(a+s)):(t-=2/3,s=(1-n)/3,c=(1+n*N(d*t)/N(p-d*t))/3,a=1-(s+c)),a=r(i*a*3),s=r(i*s*3),c=r(i*c*3),[a*255,s*255,c*255,e.length>3?e[3]:1]},{min:re,sqrt:ie,acos:ae}=Math,rgb2hsi=(...e)=>{let[t,n,r]=o(e,`rgb`);t/=255,n/=255,r/=255;let i,a=re(t,n,r),s=(t+n+r)/3,c=s>0?1-a/s:0;return c===0?i=NaN:(i=(t-n+(t-r))/2,i/=ie((t-n)*(t-n)+(t-r)*(n-r)),i=ae(i),r>n&&(i=d-i),i/=d),[i*360,c,s]};Color.prototype.hsi=function(){return rgb2hsi(this._rgb)},chroma.hsi=e((...e)=>new Color(...e,`hsi`),`hsi`),g.format.hsi=hsi2rgb,g.autodetect.push({p:2,test:(...e)=>{if(e=o(e,`hsi`),type_default(e)===`array`&&e.length===3)return`hsi`}});const hsi=(e,t,n)=>M(e,t,n,`hsi`);w.hsi=hsi;const hsl2rgb=(...e)=>{e=o(e,`hsl`);let[t,n,r]=e,i,a,s;if(n===0)i=a=s=r*255;else{let e=[0,0,0],o=[0,0,0],c=r<.5?r*(1+n):r+n-r*n,l=2*r-c,u=t/360;e[0]=u+1/3,e[1]=u,e[2]=u-1/3;for(let t=0;t<3;t++)e[t]<0&&(e[t]+=1),e[t]>1&&--e[t],6*e[t]<1?o[t]=l+(c-l)*6*e[t]:2*e[t]<1?o[t]=c:3*e[t]<2?o[t]=l+(c-l)*(2/3-e[t])*6:o[t]=l;[i,a,s]=[o[0]*255,o[1]*255,o[2]*255]}return e.length>3?[i,a,s,e[3]]:[i,a,s,1]},oe=e((...e)=>{e=o(e,`rgba`);let[t,n,r]=e;t/=255,n/=255,r/=255;let i=l(t,n,r),a=u(t,n,r),s=(a+i)/2,c,d;return a===i?(c=0,d=NaN):c=s<.5?(a-i)/(a+i):(a-i)/(2-a-i),t==a?d=(n-r)/(a-i):n==a?d=2+(r-t)/(a-i):r==a&&(d=4+(t-n)/(a-i)),d*=60,d<0&&(d+=360),e.length>3&&e[3]!==void 0?[d,c,s,e[3]]:[d,c,s]},`rgb2hsl`);Color.prototype.hsl=function(){return oe(this._rgb)},chroma.hsl=e((...e)=>new Color(...e,`hsl`),`hsl`),g.format.hsl=hsl2rgb,g.autodetect.push({p:2,test:(...e)=>{if(e=o(e,`hsl`),type_default(e)===`array`&&e.length===3)return`hsl`}});const hsl=(e,t,n)=>M(e,t,n,`hsl`);w.hsl=hsl;const{floor:se}=Math,hsv2rgb=(...e)=>{e=o(e,`hsv`);let[t,n,r]=e,i,a,s;if(r*=255,n===0)i=a=s=r;else{t===360&&(t=0),t>360&&(t-=360),t<0&&(t+=360),t/=60;let e=se(t),o=t-e,c=r*(1-n),l=r*(1-n*o),u=r*(1-n*(1-o));switch(e){case 0:[i,a,s]=[r,u,c];break;case 1:[i,a,s]=[l,r,c];break;case 2:[i,a,s]=[c,r,u];break;case 3:[i,a,s]=[c,l,r];break;case 4:[i,a,s]=[u,c,r];break;case 5:[i,a,s]=[r,c,l];break}}return[i,a,s,e.length>3?e[3]:1]},{min:ce,max:le}=Math,rgb2hsl=(...e)=>{e=o(e,`rgb`);let[t,n,r]=e,i=ce(t,n,r),a=le(t,n,r),s=a-i,c,l,u;return u=a/255,a===0?(c=NaN,l=0):(l=s/a,t===a&&(c=(n-r)/s),n===a&&(c=2+(r-t)/s),r===a&&(c=4+(t-n)/s),c*=60,c<0&&(c+=360)),[c,l,u]};Color.prototype.hsv=function(){return rgb2hsl(this._rgb)},chroma.hsv=e((...e)=>new Color(...e,`hsv`),`hsv`),g.format.hsv=hsv2rgb,g.autodetect.push({p:2,test:(...e)=>{if(e=o(e,`hsv`),type_default(e)===`array`&&e.length===3)return`hsv`}});const hsv=(e,t,n)=>M(e,t,n,`hsv`);w.hsv=hsv;function multiplyMatrices(e,t){let n=e.length;Array.isArray(e[0])||(e=[e]),Array.isArray(t[0])||(t=t.map(e=>[e]));let r=t[0].length,i=t[0].map((e,n)=>t.map(e=>e[n])),a=e.map(e=>i.map(t=>Array.isArray(e)?e.reduce((e,n,r)=>e+n*(t[r]||0),0):t.reduce((t,n)=>t+n*e,0)));return n===1&&(a=a[0]),r===1?a.map(e=>e[0]):a}const oklab2rgb=(...e)=>{e=o(e,`lab`);let[t,n,r,...i]=e,[a,s,c]=OKLab_to_XYZ([t,n,r]),[l,u,d]=xyz2rgb(a,s,c);return[l,u,d,...i.length>0&&i[0]<1?[i[0]]:[]]};function OKLab_to_XYZ(e){return multiplyMatrices([[1.2268798758459243,-.5578149944602171,.2813910456659647],[-.0405757452148008,1.112286803280317,-.0717110580655164],[-.0763729366746601,-.4214933324022432,1.5869240198367816]],multiplyMatrices([[1,.3963377773761749,.2158037573099136],[1,-.1055613458156586,-.0638541728258133],[1,-.0894841775298119,-1.2914855480194092]],e).map(e=>e**3))}const rgb2oklab=(...e)=>{let[t,n,r,...i]=o(e,`rgb`);return[...XYZ_to_OKLab(rgb2xyz(t,n,r)),...i.length>0&&i[0]<1?[i[0]]:[]]};function XYZ_to_OKLab(e){return multiplyMatrices([[.210454268309314,.7936177747023054,-.0040720430116193],[1.9779985324311684,-2.42859224204858,.450593709617411],[.0259040424655478,.7827717124575296,-.8086757549230774]],multiplyMatrices([[.819022437996703,.3619062600528904,-.1288737815209879],[.0329836539323885,.9292868615863434,.0361446663506424],[.0481771893596242,.2642395317527308,.6335478284694309]],e).map(e=>Math.cbrt(e)))}Color.prototype.oklab=function(){return rgb2oklab(this._rgb)},Object.assign(chroma,{oklab:e((...e)=>new Color(...e,`oklab`),`oklab`)}),g.format.oklab=oklab2rgb,g.autodetect.push({p:2,test:(...e)=>{if(e=o(e,`oklab`),type_default(e)===`array`&&e.length===3)return`oklab`}});const oklab=(e,t,n)=>{let r=e.oklab(),i=t.oklab();return new Color(r[0]+n*(i[0]-r[0]),r[1]+n*(i[1]-r[1]),r[2]+n*(i[2]-r[2]),`oklab`)};w.oklab=oklab,w.oklch=e((e,t,n)=>M(e,t,n,`oklch`),`oklch`);const{pow:P,sqrt:F,PI:L,cos:ue,sin:de,atan2:fe}=Math;var pe=e((e,t=`lrgb`,n=null)=>{let r=e.length;n||=Array.from(Array(r)).map(()=>1);let i=r/n.reduce(function(e,t){return e+t});if(n.forEach((e,t)=>{n[t]*=i}),e=e.map(e=>new Color(e)),t===`lrgb`)return _average_lrgb(e,n);let a=e.shift(),o=a.get(t),s=[],c=0,l=0;for(let e=0;e<o.length;e++)if(o[e]=(o[e]||0)*n[0],s.push(isNaN(o[e])?0:n[0]),t.charAt(e)===`h`&&!isNaN(o[e])){let t=o[e]/180*L;c+=ue(t)*n[0],l+=de(t)*n[0]}let u=a.alpha()*n[0];e.forEach((e,r)=>{let i=e.get(t);u+=e.alpha()*n[r+1];for(let e=0;e<o.length;e++)if(!isNaN(i[e]))if(s[e]+=n[r+1],t.charAt(e)===`h`){let t=i[e]/180*L;c+=ue(t)*n[r+1],l+=de(t)*n[r+1]}else o[e]+=i[e]*n[r+1]});for(let e=0;e<o.length;e++)if(t.charAt(e)===`h`){let t=fe(l/s[e],c/s[e])/L*180;for(;t<0;)t+=360;for(;t>=360;)t-=360;o[e]=t}else o[e]=o[e]/s[e];return u/=r,new Color(o,t).alpha(u>.99999?1:u,!0)},`default`);const _average_lrgb=(e,t)=>{let n=e.length,r=[0,0,0,0];for(let i=0;i<e.length;i++){let a=e[i],o=t[i]/n,s=a._rgb;r[0]+=P(s[0],2)*o,r[1]+=P(s[1],2)*o,r[2]+=P(s[2],2)*o,r[3]+=s[3]*o}return r[0]=F(r[0]),r[1]=F(r[1]),r[2]=F(r[2]),r[3]>.9999999&&(r[3]=1),new Color(i(r))},{pow:me}=Math;function scale_default(e){let t=`rgb`,n=chroma(`#ccc`),i=0,a=[0,1],o=[0,1],s=[],c=[0,0],l=!1,u=[],d=!1,p=0,m=1,h=!1,g={},_=!0,v=1,setColors=function(e){if(e||=[`#fff`,`#000`],e&&type_default(e)===`string`&&chroma.brewer&&chroma.brewer[e.toLowerCase()]&&(e=chroma.brewer[e.toLowerCase()]),type_default(e)===`array`){e.length===1&&(e=[e[0],e[0]]),e=e.slice(0);for(let t=0;t<e.length;t++)e[t]=chroma(e[t]);s.length=0;for(let t=0;t<e.length;t++)s.push(t/(e.length-1))}return resetCache(),u=e},getClass=function(e){if(l!=null){let t=l.length-1,n=0;for(;n<t&&e>=l[n];)n++;return n-1}return 0},tMapLightness=e=>e,tMapDomain=e=>e,getColor=function(e,i){let a,o;if(i??=!1,isNaN(e)||e===null)return n;o=i?e:l&&l.length>2?getClass(e)/(l.length-2):m===p?1:(e-p)/(m-p),o=tMapDomain(o),i||(o=tMapLightness(o)),v!==1&&(o=me(o,v)),o=c[0]+o*(1-c[0]-c[1]),o=r(o,0,1);let d=Math.floor(o*1e4);if(_&&g[d])a=g[d];else{if(type_default(u)===`array`)for(let e=0;e<s.length;e++){let n=s[e];if(o<=n){a=u[e];break}if(o>=n&&e===s.length-1){a=u[e];break}if(o>n&&o<s[e+1]){o=(o-n)/(s[e+1]-n),a=chroma.interpolate(u[e],u[e+1],o,t);break}}else type_default(u)===`function`&&(a=u(o));_&&(g[d]=a)}return a};var resetCache=()=>g={};setColors(e);let f=function(e){let t=chroma(getColor(e));return d&&t[d]?t[d]():t};return f.classes=function(e){if(e!=null){if(type_default(e)===`array`)l=e,a=[e[0],e[e.length-1]];else{let t=chroma.analyze(a);l=e===0?[t.min,t.max]:chroma.limits(t,`e`,e)}return f}return l},f.domain=function(e){if(!arguments.length)return o;o=e.slice(0),p=e[0],m=e[e.length-1],s=[];let t=u.length;if(e.length===t&&p!==m)for(let t of Array.from(e))s.push((t-p)/(m-p));else{for(let e=0;e<t;e++)s.push(e/(t-1));if(e.length>2){let t=e.map((t,n)=>n/(e.length-1)),n=e.map(e=>(e-p)/(m-p));n.every((e,n)=>t[n]===e)||(tMapDomain=e=>{if(e<=0||e>=1)return e;let r=0;for(;e>=n[r+1];)r++;let i=(e-n[r])/(n[r+1]-n[r]);return t[r]+i*(t[r+1]-t[r])})}}return a=[p,m],f},f.mode=function(e){return arguments.length?(t=e,resetCache(),f):t},f.range=function(e,t){return setColors(e,t),f},f.out=function(e){return d=e,f},f.spread=function(e){return arguments.length?(i=e,f):i},f.correctLightness=function(e){return e??=!0,h=e,resetCache(),tMapLightness=h?function(e){let t=getColor(0,!0).lab()[0],n=getColor(1,!0).lab()[0],r=t>n,i=getColor(e,!0).lab()[0],a=t+(n-t)*e,o=i-a,s=0,c=1,l=20;for(;Math.abs(o)>.01&&l-->0;)(function(){return r&&(o*=-1),o<0?(s=e,e+=(c-e)*.5):(c=e,e+=(s-e)*.5),i=getColor(e,!0).lab()[0],o=i-a})();return e}:e=>e,f},f.padding=function(e){return e==null?c:(type_default(e)===`number`&&(e=[e,e]),c=e,f)},f.colors=function(t,n){arguments.length<2&&(n=`hex`);let r=[];if(arguments.length===0)r=u.slice(0);else if(t===1)r=[f(.5)];else if(t>1){let e=a[0],n=a[1]-e;r=__range__(0,t,!1).map(r=>f(e+r/(t-1)*n))}else{e=[];let t=[];if(l&&l.length>2)for(let e=1,n=l.length,r=1<=n;r?e<n:e>n;r?e++:e--)t.push((l[e-1]+l[e])*.5);else t=a;r=t.map(e=>f(e))}return chroma[n]&&(r=r.map(e=>e[n]())),r},f.cache=function(e){return e==null?_:(_=e,f)},f.gamma=function(e){return e==null?v:(v=e,f)},f.nodata=function(e){return e==null?n:(n=chroma(e),f)},f}e(scale_default,`default`);function __range__(e,t,n){let r=[],i=e<t,a=n?i?t+1:t-1:t;for(let t=e;i?t<a:t>a;i?t++:t--)r.push(t);return r}const binom_row=function(e){let t=[1,1];for(let n=1;n<e;n++){let e=[1];for(let n=1;n<=t.length;n++)e[n]=(t[n]||0)+t[n-1];t=e}return t},bezier=function(e){let I,t,n,r;if(e=e.map(e=>new Color(e)),e.length===2)[t,n]=e.map(e=>e.lab()),I=function(e){return new Color([0,1,2].map(r=>t[r]+e*(n[r]-t[r])),`lab`)};else if(e.length===3)[t,n,r]=e.map(e=>e.lab()),I=function(e){return new Color([0,1,2].map(i=>(1-e)*(1-e)*t[i]+2*(1-e)*e*n[i]+e*e*r[i]),`lab`)};else if(e.length===4){let i;[t,n,r,i]=e.map(e=>e.lab()),I=function(e){return new Color([0,1,2].map(a=>(1-e)*(1-e)*(1-e)*t[a]+3*(1-e)*(1-e)*e*n[a]+3*(1-e)*e*e*r[a]+e*e*e*i[a]),`lab`)}}else if(e.length>=5){let t,n,r;t=e.map(e=>e.lab()),r=e.length-1,n=binom_row(r),I=function(e){let i=1-e;return new Color([0,1,2].map(a=>t.reduce((t,o,s)=>t+n[s]*i**(r-s)*e**s*o[a],0)),`lab`)}}else throw RangeError(`No point in running bezier with only one color.`);return I};var he=e(e=>{let t=bezier(e);return t.scale=()=>scale_default(t),t},`default`);const{round:R}=Math;Color.prototype.rgb=function(e=!0){return e===!1?this._rgb.slice(0,3):this._rgb.slice(0,3).map(R)},Color.prototype.rgba=function(e=!0){return this._rgb.slice(0,4).map((t,n)=>n<3?e===!1?t:R(t):t)};const rgb=(...e)=>new Color(...e,`rgb`);Object.assign(chroma,{rgb}),g.format.rgb=(...e)=>{let t=o(e,`rgba`);return t[3]===void 0&&(t[3]=1),t},g.autodetect.push({p:3,test:(...e)=>{if(e=o(e,`rgba`),type_default(e)===`array`&&(e.length===3||e.length===4&&type_default(e[3])==`number`&&e[3]>=0&&e[3]<=1))return`rgb`}});const blend=(e,t,n)=>{if(!blend[n])throw Error(`unknown blend mode `+n);return blend[n](e,t)},blend_f=e=>(t,n)=>{let r=chroma(n).rgb(),i=chroma(t).rgb();return chroma.rgb(e(r,i))},each=e=>(t,n)=>{let r=[];return r[0]=e(t[0],n[0]),r[1]=e(t[1],n[1]),r[2]=e(t[2],n[2]),r},normal=e=>e,multiply=(e,t)=>e*t/255,darken=(e,t)=>e>t?t:e,lighten=(e,t)=>e>t?e:t,screen=(e,t)=>255*(1-(1-e/255)*(1-t/255)),overlay=(e,t)=>t<128?2*e*t/255:255*(1-2*(1-e/255)*(1-t/255)),burn=(e,t)=>255*(1-(1-t/255)/(e/255)),dodge=(e,t)=>e===255?255:(e=t/255*255/(1-e/255),e>255?255:e);blend.normal=blend_f(each(normal)),blend.multiply=blend_f(each(multiply)),blend.screen=blend_f(each(screen)),blend.overlay=blend_f(each(overlay)),blend.darken=blend_f(each(darken)),blend.lighten=blend_f(each(lighten)),blend.dodge=blend_f(each(dodge)),blend.burn=blend_f(each(burn));const{pow:ge,sin:_e,cos:ve}=Math;function cubehelix_default(e=300,t=-1.5,n=1,r=1,a=[0,1]){let o=0,s;type_default(a)===`array`?s=a[1]-a[0]:(s=0,a=[a,a]);let f=function(c){let l=d*((e+120)/360+t*c),u=ge(a[0]+s*c,r),p=(o===0?n:n[0]+c*o)*u*(1-u)/2,m=ve(l),h=_e(l),g=u+p*(-.14861*m+1.78277*h),_=u+p*(-.29227*m-.90649*h),v=u+1.97294*m*p;return chroma(i([g*255,_*255,v*255,1]))};return f.start=function(t){return t==null?e:(e=t,f)},f.rotations=function(e){return e==null?t:(t=e,f)},f.gamma=function(e){return e==null?r:(r=e,f)},f.hue=function(e){return e==null?n:(n=e,type_default(n)===`array`?(o=n[1]-n[0],o===0&&(n=n[1])):o=0,f)},f.lightness=function(e){return e==null?a:(type_default(e)===`array`?(a=e,s=e[1]-e[0]):(a=[e,e],s=0),f)},f.scale=()=>chroma.scale(f),f.hue(n),f}e(cubehelix_default,`default`);const{floor:ye,random:be}=Math;var xe=e((e=be)=>{let t=`#`;for(let n=0;n<6;n++)t+=`0123456789abcdef`.charAt(ye(e()*16));return new Color(t,`hex`)},`default`);const{log:z,pow:Se,floor:Ce,abs:we}=Math;function analyze(e,t=null){let n={min:Number.MAX_VALUE,max:Number.MAX_VALUE*-1,sum:0,values:[],count:0};return type_default(e)===`object`&&(e=Object.values(e)),e.forEach(e=>{t&&type_default(e)===`object`&&(e=e[t]),e!=null&&!isNaN(e)&&(n.values.push(e),n.sum+=e,e<n.min&&(n.min=e),e>n.max&&(n.max=e),n.count+=1)}),n.domain=[n.min,n.max],n.limits=(e,t)=>limits(n,e,t),n}function limits(e,t=`equal`,n=7){type_default(e)==`array`&&(e=analyze(e));let{min:r,max:i}=e,a=e.values.sort((e,t)=>e-t);if(n===1)return[r,i];let o=[];if(t.substr(0,1)===`c`&&(o.push(r),o.push(i)),t.substr(0,1)===`e`){o.push(r);for(let e=1;e<n;e++)o.push(r+e/n*(i-r));o.push(i)}else if(t.substr(0,1)===`l`){if(r<=0)throw Error(`Logarithmic scales are only possible for values > 0`);let e=Math.LOG10E*z(r),t=Math.LOG10E*z(i);o.push(r);for(let r=1;r<n;r++)o.push(Se(10,e+r/n*(t-e)));o.push(i)}else if(t.substr(0,1)===`q`){o.push(r);for(let e=1;e<n;e++){let t=(a.length-1)*e/n,r=Ce(t);if(r===t)o.push(a[r]);else{let e=t-r;o.push(a[r]*(1-e)+a[r+1]*e)}}o.push(i)}else if(t.substr(0,1)===`k`){let e,t=a.length,s=Array(t),c=Array(n),l=!0,u=0,d=null;d=[],d.push(r);for(let e=1;e<n;e++)d.push(r+e/n*(i-r));for(d.push(i);l;){for(let e=0;e<n;e++)c[e]=0;for(let e=0;e<t;e++){let t=a[e],r=Number.MAX_VALUE,i;for(let a=0;a<n;a++){let n=we(d[a]-t);n<r&&(r=n,i=a),c[i]++,s[e]=i}}let r=Array(n);for(let e=0;e<n;e++)r[e]=null;for(let n=0;n<t;n++)e=s[n],r[e]===null?r[e]=a[n]:r[e]+=a[n];for(let e=0;e<n;e++)r[e]*=1/c[e];l=!1;for(let e=0;e<n;e++)if(r[e]!==d[e]){l=!0;break}d=r,u++,u>200&&(l=!1)}let p={};for(let e=0;e<n;e++)p[e]=[];for(let n=0;n<t;n++)e=s[n],p[e].push(a[n]);let m=[];for(let e=0;e<n;e++)m.push(p[e][0]),m.push(p[e][p[e].length-1]);m=m.sort((e,t)=>e-t),o.push(m[0]);for(let e=1;e<m.length;e+=2){let t=m[e];!isNaN(t)&&o.indexOf(t)===-1&&o.push(t)}}return o}var Te=e((e,t)=>{e=new Color(e),t=new Color(t);let n=e.luminance(),r=t.luminance();return n>r?(n+.05)/(r+.05):(r+.05)/(n+.05)},`default`);
1
+ import{r as e}from"../rolldown-runtime.mjs";const{min:t,max:n}=Math;var r=e((e,r=0,i=1)=>t(n(r,e),i),`default`),i=e(e=>{e._clipped=!1,e._unclipped=e.slice(0);for(let t=0;t<=3;t++)t<3?((e[t]<0||e[t]>255)&&(e._clipped=!0),e[t]=r(e[t],0,255)):t===3&&(e[t]=r(e[t],0,1));return e},`default`);const a={};for(let e of[`Boolean`,`Number`,`String`,`Function`,`Array`,`Date`,`RegExp`,`Undefined`,`Null`])a[`[object ${e}]`]=e.toLowerCase();function type_default(e){return a[Object.prototype.toString.call(e)]||`object`}e(type_default,`default`);var o=e((e,t=null)=>e.length>=3?Array.prototype.slice.call(e):type_default(e[0])==`object`&&t?t.split(``).filter(t=>e[0][t]!==void 0).map(t=>e[0][t]):e[0].slice(0),`default`),s=e(e=>{if(e.length<2)return null;let t=e.length-1;return type_default(e[t])==`string`?e[t].toLowerCase():null},`default`);const{PI:c,min:l,max:u}=Math,rnd2=e=>Math.round(e*100)/100,rnd3=e=>Math.round(e*100)/100,d=c*2,p=c/3,m=c/180,h=180/c;function reverse3(e){return[...e.slice(0,3).reverse(),...e.slice(3)]}var g={format:{},autodetect:[]},Color=class{constructor(...e){let t=this;if(type_default(e[0])===`object`&&e[0].constructor&&e[0].constructor===this.constructor)return e[0];let n=s(e),r=!1;if(!n){r=!0,g.sorted||=(g.autodetect=g.autodetect.sort((e,t)=>t.p-e.p),!0);for(let t of g.autodetect)if(n=t.test(...e),n)break}if(g.format[n])t._rgb=i(g.format[n].apply(null,r?e:e.slice(0,-1)));else throw Error(`unknown format: `+e);t._rgb.length===3&&t._rgb.push(1)}toString(){return type_default(this.hex)==`function`?this.hex():`[${this._rgb.join(`,`)}]`}};const chroma=(...e)=>new Color(...e);chroma.version=`3.2.0`;const _={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`,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`},v=/^#?([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/,y=/^#?([A-Fa-f0-9]{8}|[A-Fa-f0-9]{4})$/,hex2rgb=e=>{if(e.match(v)){(e.length===4||e.length===7)&&(e=e.substr(1)),e.length===3&&(e=e.split(``),e=e[0]+e[0]+e[1]+e[1]+e[2]+e[2]);let t=parseInt(e,16);return[t>>16,t>>8&255,t&255,1]}if(e.match(y)){(e.length===5||e.length===9)&&(e=e.substr(1)),e.length===4&&(e=e.split(``),e=e[0]+e[0]+e[1]+e[1]+e[2]+e[2]+e[3]+e[3]);let t=parseInt(e,16);return[t>>24&255,t>>16&255,t>>8&255,Math.round((t&255)/255*100)/100]}throw Error(`unknown hex color: ${e}`)},{round:b}=Math,rgb2hex=(...e)=>{let[t,n,r,i]=o(e,`rgba`),a=s(e)||`auto`;i===void 0&&(i=1),a===`auto`&&(a=i<1?`rgba`:`rgb`),t=b(t),n=b(n),r=b(r);let c=`000000`+(t<<16|n<<8|r).toString(16);c=c.substr(c.length-6);let l=`0`+b(i*255).toString(16);switch(l=l.substr(l.length-2),a.toLowerCase()){case`rgba`:return`#${c}${l}`;case`argb`:return`#${l}${c}`;default:return`#${c}`}};Color.prototype.name=function(){let e=rgb2hex(this._rgb,`rgb`);for(let t of Object.keys(_))if(_[t]===e)return t.toLowerCase();return e},g.format.named=e=>{if(e=e.toLowerCase(),_[e])return hex2rgb(_[e]);throw Error(`unknown color name: `+e)},g.autodetect.push({p:5,test:(e,...t)=>{if(!t.length&&type_default(e)===`string`&&_[e.toLowerCase()])return`named`}}),Color.prototype.alpha=function(e,t=!1){return e!==void 0&&type_default(e)===`number`?t?(this._rgb[3]=e,this):new Color([this._rgb[0],this._rgb[1],this._rgb[2],e],`rgb`):this._rgb[3]},Color.prototype.clipped=function(){return this._rgb._clipped||!1};const x={Kn:18,labWhitePoint:`d65`,Xn:.95047,Yn:1,Zn:1.08883,t0:.137931034,t1:.206896552,t2:.12841855,t3:.008856452,kE:216/24389,kKE:8,kK:24389/27,RefWhiteRGB:{X:.95047,Y:1,Z:1.08883},MtxRGB2XYZ:{m00:.4124564390896922,m01:.21267285140562253,m02:.0193338955823293,m10:.357576077643909,m11:.715152155287818,m12:.11919202588130297,m20:.18043748326639894,m21:.07217499330655958,m22:.9503040785363679},MtxXYZ2RGB:{m00:3.2404541621141045,m01:-.9692660305051868,m02:.055643430959114726,m10:-1.5371385127977166,m11:1.8760108454466942,m12:-.2040259135167538,m20:-.498531409556016,m21:.041556017530349834,m22:1.0572251882231791},As:.9414285350000001,Bs:1.040417467,Cs:1.089532651,MtxAdaptMa:{m00:.8951,m01:-.7502,m02:.0389,m10:.2664,m11:1.7135,m12:-.0685,m20:-.1614,m21:.0367,m22:1.0296},MtxAdaptMaI:{m00:.9869929054667123,m01:.43230526972339456,m02:-.008528664575177328,m10:-.14705425642099013,m11:.5183602715367776,m12:.04004282165408487,m20:.15996265166373125,m21:.0492912282128556,m22:.9684866957875502}},S=new Map([[`a`,[1.0985,.35585]],[`b`,[1.0985,.35585]],[`c`,[.98074,1.18232]],[`d50`,[.96422,.82521]],[`d55`,[.95682,.92149]],[`d65`,[.95047,1.08883]],[`e`,[1,1,1]],[`f2`,[.99186,.67393]],[`f7`,[.95041,1.08747]],[`f11`,[1.00962,.6435]],[`icc`,[.96422,.82521]]]);function setLabWhitePoint(e){let t=S.get(String(e).toLowerCase());if(!t)throw Error(`unknown Lab illuminant `+e);x.labWhitePoint=e,x.Xn=t[0],x.Zn=t[1]}function getLabWhitePoint(){return x.labWhitePoint}const lab2rgb=(...e)=>{e=o(e,`lab`);let[t,n,r]=e,[i,a,s]=lab2xyz(t,n,r),[c,l,u]=xyz2rgb(i,a,s);return[c,l,u,e.length>3?e[3]:1]},lab2xyz=(e,t,n)=>{let{kE:r,kK:i,kKE:a,Xn:o,Yn:s,Zn:c}=x,l=(e+16)/116,u=.002*t+l,d=l-.005*n,p=u*u*u,m=d*d*d,h=p>r?p:(116*u-16)/i,g=e>a?((e+16)/116)**3:e/i,_=m>r?m:(116*d-16)/i;return[h*o,g*s,_*c]},compand=e=>{let t=Math.sign(e);return e=Math.abs(e),(e<=.0031308?e*12.92:1.055*e**(1/2.4)-.055)*t},xyz2rgb=(e,t,n)=>{let{MtxAdaptMa:r,MtxAdaptMaI:i,MtxXYZ2RGB:a,RefWhiteRGB:o,Xn:s,Yn:c,Zn:l}=x,u=s*r.m00+c*r.m10+l*r.m20,d=s*r.m01+c*r.m11+l*r.m21,p=s*r.m02+c*r.m12+l*r.m22,m=o.X*r.m00+o.Y*r.m10+o.Z*r.m20,h=o.X*r.m01+o.Y*r.m11+o.Z*r.m21,g=o.X*r.m02+o.Y*r.m12+o.Z*r.m22,_=(e*r.m00+t*r.m10+n*r.m20)*(m/u),v=(e*r.m01+t*r.m11+n*r.m21)*(h/d),y=(e*r.m02+t*r.m12+n*r.m22)*(g/p),b=_*i.m00+v*i.m10+y*i.m20,S=_*i.m01+v*i.m11+y*i.m21,C=_*i.m02+v*i.m12+y*i.m22,w=compand(b*a.m00+S*a.m10+C*a.m20),T=compand(b*a.m01+S*a.m11+C*a.m21),E=compand(b*a.m02+S*a.m12+C*a.m22);return[w*255,T*255,E*255]},rgb2lab=(...e)=>{let[t,n,r,...i]=o(e,`rgb`),[a,s,c]=rgb2xyz(t,n,r),[l,u,d]=xyz2lab(a,s,c);return[l,u,d,...i.length>0&&i[0]<1?[i[0]]:[]]};function xyz2lab(e,t,n){let{Xn:r,Yn:i,Zn:a,kE:o,kK:s}=x,c=e/r,l=t/i,u=n/a,d=c>o?c**(1/3):(s*c+16)/116,p=l>o?l**(1/3):(s*l+16)/116,m=u>o?u**(1/3):(s*u+16)/116;return[116*p-16,500*(d-p),200*(p-m)]}function gammaAdjustSRGB(e){let t=Math.sign(e);return e=Math.abs(e),(e<=.04045?e/12.92:((e+.055)/1.055)**2.4)*t}const rgb2xyz=(e,t,n)=>{e=gammaAdjustSRGB(e/255),t=gammaAdjustSRGB(t/255),n=gammaAdjustSRGB(n/255);let{MtxRGB2XYZ:r,MtxAdaptMa:i,MtxAdaptMaI:a,Xn:o,Yn:s,Zn:c,As:l,Bs:u,Cs:d}=x,p=e*r.m00+t*r.m10+n*r.m20,m=e*r.m01+t*r.m11+n*r.m21,h=e*r.m02+t*r.m12+n*r.m22,g=o*i.m00+s*i.m10+c*i.m20,_=o*i.m01+s*i.m11+c*i.m21,v=o*i.m02+s*i.m12+c*i.m22,y=p*i.m00+m*i.m10+h*i.m20,b=p*i.m01+m*i.m11+h*i.m21,S=p*i.m02+m*i.m12+h*i.m22;return y*=g/l,b*=_/u,S*=v/d,p=y*a.m00+b*a.m10+S*a.m20,m=y*a.m01+b*a.m11+S*a.m21,h=y*a.m02+b*a.m12+S*a.m22,[p,m,h]};Color.prototype.lab=function(){return rgb2lab(this._rgb)},Object.assign(chroma,{lab:e((...e)=>new Color(...e,`lab`),`lab`),getLabWhitePoint,setLabWhitePoint}),g.format.lab=lab2rgb,g.autodetect.push({p:2,test:(...e)=>{if(e=o(e,`lab`),type_default(e)===`array`&&e.length===3)return`lab`}}),Color.prototype.darken=function(e=1){let t=this,n=t.lab();return n[0]-=x.Kn*e,new Color(n,`lab`).alpha(t.alpha(),!0)},Color.prototype.brighten=function(e=1){return this.darken(-e)},Color.prototype.darker=Color.prototype.darken,Color.prototype.brighter=Color.prototype.brighten,Color.prototype.get=function(e){let[t,n]=e.split(`.`),r=this[t]();if(n){let e=t.indexOf(n)-(t.substr(0,2)===`ok`?2:0);if(e>-1)return r[e];throw Error(`unknown channel ${n} in mode ${t}`)}return r};const{pow:C}=Math;Color.prototype.luminance=function(e,t=`rgb`){if(e!==void 0&&type_default(e)===`number`){if(e===0)return new Color([0,0,0,this._rgb[3]],`rgb`);if(e===1)return new Color([255,255,255,this._rgb[3]],`rgb`);let n=this.luminance(),r=20,test=(n,i)=>{let a=n.interpolate(i,.5,t),o=a.luminance();return Math.abs(e-o)<1e-7||!r--?a:o>e?test(n,a):test(a,i)};return new Color([...(n>e?test(new Color([0,0,0]),this):test(this,new Color([255,255,255]))).rgb(),this._rgb[3]])}return rgb2luminance(...this._rgb.slice(0,3))};const rgb2luminance=(e,t,n)=>(e=luminance_x(e),t=luminance_x(t),n=luminance_x(n),.2126*e+.7152*t+.0722*n),luminance_x=e=>(e/=255,e<=.03928?e/12.92:C((e+.055)/1.055,2.4));var w={},T=e((e,t,n=.5,...r)=>{let i=r[0]||`lrgb`;if(!w[i]&&!r.length&&(i=Object.keys(w)[0]),!w[i])throw Error(`interpolation mode ${i} is not defined`);return type_default(e)!==`object`&&(e=new Color(e)),type_default(t)!==`object`&&(t=new Color(t)),w[i](e,t,n).alpha(e.alpha()+n*(t.alpha()-e.alpha()))},`default`);Color.prototype.mix=Color.prototype.interpolate=function(e,t=.5,...n){return T(this,e,t,...n)},Color.prototype.premultiply=function(e=!1){let t=this._rgb,n=t[3];return e?(this._rgb=[t[0]*n,t[1]*n,t[2]*n,n],this):new Color([t[0]*n,t[1]*n,t[2]*n,n],`rgb`)};const{sin:E,cos:ee}=Math,lch2lab=(...e)=>{let[t,n,r]=o(e,`lch`);return isNaN(r)&&(r=0),r*=m,[t,ee(r)*n,E(r)*n]},lch2rgb=(...e)=>{e=o(e,`lch`);let[t,n,r]=e,[i,a,s]=lch2lab(t,n,r),[c,l,u]=lab2rgb(i,a,s);return[c,l,u,e.length>3?e[3]:1]},hcl2rgb=(...e)=>{let t=reverse3(o(e,`hcl`));return lch2rgb(...t)},{sqrt:D,atan2:te,round:O}=Math,lab2lch=(...e)=>{let[t,n,r]=o(e,`lab`),i=D(n*n+r*r),a=(te(r,n)*h+360)%360;return O(i*1e4)===0&&(a=NaN),[t,i,a]},rgb2lch=(...e)=>{let[t,n,r,...i]=o(e,`rgb`),[a,s,c]=rgb2lab(t,n,r),[l,u,d]=lab2lch(a,s,c);return[l,u,d,...i.length>0&&i[0]<1?[i[0]]:[]]};Color.prototype.lch=function(){return rgb2lch(this._rgb)},Color.prototype.hcl=function(){return reverse3(rgb2lch(this._rgb))};const k=e((...e)=>new Color(...e,`lch`),`lch`),hcl=(...e)=>new Color(...e,`hcl`);Object.assign(chroma,{lch:k,hcl}),g.format.lch=lch2rgb,g.format.hcl=hcl2rgb,[`lch`,`hcl`].forEach(e=>g.autodetect.push({p:2,test:(...t)=>{if(t=o(t,e),type_default(t)===`array`&&t.length===3)return e}})),Color.prototype.saturate=function(e=1){let t=this,n=t.lch();return n[1]+=x.Kn*e,n[1]<0&&(n[1]=0),new Color(n,`lch`).alpha(t.alpha(),!0)},Color.prototype.desaturate=function(e=1){return this.saturate(-e)},Color.prototype.set=function(e,t,n=!1){let[r,i]=e.split(`.`),a=this[r]();if(i){let e=r.indexOf(i)-(r.substr(0,2)===`ok`?2:0);if(e>-1){if(type_default(t)==`string`)switch(t.charAt(0)){case`+`:a[e]+=+t;break;case`-`:a[e]+=+t;break;case`*`:a[e]*=+t.substr(1);break;case`/`:a[e]/=+t.substr(1);break;default:a[e]=+t}else if(type_default(t)===`number`)a[e]=t;else throw Error(`unsupported value for Color.set`);let i=new Color(a,r);return n?(this._rgb=i._rgb,this):i}throw Error(`unknown channel ${i} in mode ${r}`)}return a},Color.prototype.tint=function(e=.5,...t){return T(this,`white`,e,...t)},Color.prototype.shade=function(e=.5,...t){return T(this,`black`,e,...t)},w.rgb=e((e,t,n)=>{let r=e._rgb,i=t._rgb;return new Color(r[0]+n*(i[0]-r[0]),r[1]+n*(i[1]-r[1]),r[2]+n*(i[2]-r[2]),`rgb`)},`rgb`);const{sqrt:A,pow:j}=Math,lrgb=(e,t,n)=>{let[r,i,a]=e._rgb,[o,s,c]=t._rgb;return new Color(A(j(r,2)*(1-n)+j(o,2)*n),A(j(i,2)*(1-n)+j(s,2)*n),A(j(a,2)*(1-n)+j(c,2)*n),`rgb`)};w.lrgb=lrgb;const lab=(e,t,n)=>{let r=e.lab(),i=t.lab();return new Color(r[0]+n*(i[0]-r[0]),r[1]+n*(i[1]-r[1]),r[2]+n*(i[2]-r[2]),`lab`)};w.lab=lab;var M=e((e,t,n,r)=>{let i,a;r===`hsl`?(i=e.hsl(),a=t.hsl()):r===`hsv`?(i=e.hsv(),a=t.hsv()):r===`hcg`?(i=e.hcg(),a=t.hcg()):r===`hsi`?(i=e.hsi(),a=t.hsi()):r===`lch`||r===`hcl`?(r=`hcl`,i=e.hcl(),a=t.hcl()):r===`oklch`&&(i=e.oklch().reverse(),a=t.oklch().reverse());let o,s,c,l,u,d;(r.substr(0,1)===`h`||r===`oklch`)&&([o,c,u]=i,[s,l,d]=a);let p,m,h,g;return!isNaN(o)&&!isNaN(s)?(g=s>o&&s-o>180?s-(o+360):s<o&&o-s>180?s+360-o:s-o,m=o+n*g):isNaN(o)?isNaN(s)?m=NaN:(m=s,(u==1||u==0)&&r!=`hsv`&&(p=l)):(m=o,(d==1||d==0)&&r!=`hsv`&&(p=c)),p===void 0&&(p=c+n*(l-c)),h=u+n*(d-u),r===`oklch`?new Color([h,p,m],r):new Color([m,p,h],r)},`default`);const lch=(e,t,n)=>M(e,t,n,`lch`);w.lch=lch,w.hcl=lch;const num2rgb=e=>{if(type_default(e)==`number`&&e>=0&&e<=16777215)return[e>>16,e>>8&255,e&255,1];throw Error(`unknown num color: `+e)},rgb2num=(...e)=>{let[t,n,r]=o(e,`rgb`);return(t<<16)+(n<<8)+r};Color.prototype.num=function(){return rgb2num(this._rgb)},Object.assign(chroma,{num:e((...e)=>new Color(...e,`num`),`num`)}),g.format.num=num2rgb,g.autodetect.push({p:5,test:(...e)=>{if(e.length===1&&type_default(e[0])===`number`&&e[0]>=0&&e[0]<=16777215)return`num`}});const num=(e,t,n)=>{let r=e.num();return new Color(r+n*(t.num()-r),`num`)};w.num=num;const{floor:ne}=Math,hcg2rgb=(...e)=>{e=o(e,`hcg`);let[t,n,r]=e,i,a,s;r*=255;let c=n*255;if(n===0)i=a=s=r;else{t===360&&(t=0),t>360&&(t-=360),t<0&&(t+=360),t/=60;let e=ne(t),o=t-e,l=r*(1-n),u=l+c*(1-o),d=l+c*o,p=l+c;switch(e){case 0:[i,a,s]=[p,d,l];break;case 1:[i,a,s]=[u,p,l];break;case 2:[i,a,s]=[l,p,d];break;case 3:[i,a,s]=[l,u,p];break;case 4:[i,a,s]=[d,l,p];break;case 5:[i,a,s]=[p,l,u]}}return[i,a,s,e.length>3?e[3]:1]},rgb2hcg=(...e)=>{let[t,n,r]=o(e,`rgb`),i=l(t,n,r),a=u(t,n,r),s=a-i,c=s*100/255,d=i/(255-s)*100,p;return s===0?p=NaN:(t===a&&(p=(n-r)/s),n===a&&(p=2+(r-t)/s),r===a&&(p=4+(t-n)/s),p*=60,p<0&&(p+=360)),[p,c,d]};Color.prototype.hcg=function(){return rgb2hcg(this._rgb)},chroma.hcg=e((...e)=>new Color(...e,`hcg`),`hcg`),g.format.hcg=hcg2rgb,g.autodetect.push({p:1,test:(...e)=>{if(e=o(e,`hcg`),type_default(e)===`array`&&e.length===3)return`hcg`}});const hcg=(e,t,n)=>M(e,t,n,`hcg`);w.hcg=hcg;const{cos:N}=Math,hsi2rgb=(...e)=>{e=o(e,`hsi`);let[t,n,i]=e,a,s,c;return isNaN(t)&&(t=0),isNaN(n)&&(n=0),t>360&&(t-=360),t<0&&(t+=360),t/=360,t<1/3?(c=(1-n)/3,a=(1+n*N(d*t)/N(p-d*t))/3,s=1-(c+a)):t<2/3?(t-=1/3,a=(1-n)/3,s=(1+n*N(d*t)/N(p-d*t))/3,c=1-(a+s)):(t-=2/3,s=(1-n)/3,c=(1+n*N(d*t)/N(p-d*t))/3,a=1-(s+c)),a=r(i*a*3),s=r(i*s*3),c=r(i*c*3),[a*255,s*255,c*255,e.length>3?e[3]:1]},{min:re,sqrt:ie,acos:ae}=Math,rgb2hsi=(...e)=>{let[t,n,r]=o(e,`rgb`);t/=255,n/=255,r/=255;let i,a=re(t,n,r),s=(t+n+r)/3,c=s>0?1-a/s:0;return c===0?i=NaN:(i=(t-n+(t-r))/2,i/=ie((t-n)*(t-n)+(t-r)*(n-r)),i=ae(i),r>n&&(i=d-i),i/=d),[i*360,c,s]};Color.prototype.hsi=function(){return rgb2hsi(this._rgb)},chroma.hsi=e((...e)=>new Color(...e,`hsi`),`hsi`),g.format.hsi=hsi2rgb,g.autodetect.push({p:2,test:(...e)=>{if(e=o(e,`hsi`),type_default(e)===`array`&&e.length===3)return`hsi`}});const hsi=(e,t,n)=>M(e,t,n,`hsi`);w.hsi=hsi;const hsl2rgb=(...e)=>{e=o(e,`hsl`);let[t,n,r]=e,i,a,s;if(n===0)i=a=s=r*255;else{let e=[0,0,0],o=[0,0,0],c=r<.5?r*(1+n):r+n-r*n,l=2*r-c,u=t/360;e[0]=u+1/3,e[1]=u,e[2]=u-1/3;for(let t=0;t<3;t++)e[t]<0&&(e[t]+=1),e[t]>1&&--e[t],6*e[t]<1?o[t]=l+(c-l)*6*e[t]:2*e[t]<1?o[t]=c:3*e[t]<2?o[t]=l+(c-l)*(2/3-e[t])*6:o[t]=l;[i,a,s]=[o[0]*255,o[1]*255,o[2]*255]}return e.length>3?[i,a,s,e[3]]:[i,a,s,1]},oe=e((...e)=>{e=o(e,`rgba`);let[t,n,r]=e;t/=255,n/=255,r/=255;let i=l(t,n,r),a=u(t,n,r),s=(a+i)/2,c,d;return a===i?(c=0,d=NaN):c=s<.5?(a-i)/(a+i):(a-i)/(2-a-i),t==a?d=(n-r)/(a-i):n==a?d=2+(r-t)/(a-i):r==a&&(d=4+(t-n)/(a-i)),d*=60,d<0&&(d+=360),e.length>3&&e[3]!==void 0?[d,c,s,e[3]]:[d,c,s]},`rgb2hsl`);Color.prototype.hsl=function(){return oe(this._rgb)},chroma.hsl=e((...e)=>new Color(...e,`hsl`),`hsl`),g.format.hsl=hsl2rgb,g.autodetect.push({p:2,test:(...e)=>{if(e=o(e,`hsl`),type_default(e)===`array`&&e.length===3)return`hsl`}});const hsl=(e,t,n)=>M(e,t,n,`hsl`);w.hsl=hsl;const{floor:se}=Math,hsv2rgb=(...e)=>{e=o(e,`hsv`);let[t,n,r]=e,i,a,s;if(r*=255,n===0)i=a=s=r;else{t===360&&(t=0),t>360&&(t-=360),t<0&&(t+=360),t/=60;let e=se(t),o=t-e,c=r*(1-n),l=r*(1-n*o),u=r*(1-n*(1-o));switch(e){case 0:[i,a,s]=[r,u,c];break;case 1:[i,a,s]=[l,r,c];break;case 2:[i,a,s]=[c,r,u];break;case 3:[i,a,s]=[c,l,r];break;case 4:[i,a,s]=[u,c,r];break;case 5:[i,a,s]=[r,c,l]}}return[i,a,s,e.length>3?e[3]:1]},{min:ce,max:le}=Math,rgb2hsl=(...e)=>{e=o(e,`rgb`);let[t,n,r]=e,i=ce(t,n,r),a=le(t,n,r),s=a-i,c,l,u;return u=a/255,a===0?(c=NaN,l=0):(l=s/a,t===a&&(c=(n-r)/s),n===a&&(c=2+(r-t)/s),r===a&&(c=4+(t-n)/s),c*=60,c<0&&(c+=360)),[c,l,u]};Color.prototype.hsv=function(){return rgb2hsl(this._rgb)},chroma.hsv=e((...e)=>new Color(...e,`hsv`),`hsv`),g.format.hsv=hsv2rgb,g.autodetect.push({p:2,test:(...e)=>{if(e=o(e,`hsv`),type_default(e)===`array`&&e.length===3)return`hsv`}});const hsv=(e,t,n)=>M(e,t,n,`hsv`);w.hsv=hsv;function multiplyMatrices(e,t){let n=e.length;Array.isArray(e[0])||(e=[e]),Array.isArray(t[0])||(t=t.map(e=>[e]));let r=t[0].length,i=t[0].map((e,n)=>t.map(e=>e[n])),a=e.map(e=>i.map(t=>Array.isArray(e)?e.reduce((e,n,r)=>e+n*(t[r]||0),0):t.reduce((t,n)=>t+n*e,0)));return n===1&&(a=a[0]),r===1?a.map(e=>e[0]):a}const oklab2rgb=(...e)=>{e=o(e,`lab`);let[t,n,r,...i]=e,[a,s,c]=OKLab_to_XYZ([t,n,r]),[l,u,d]=xyz2rgb(a,s,c);return[l,u,d,...i.length>0&&i[0]<1?[i[0]]:[]]};function OKLab_to_XYZ(e){return multiplyMatrices([[1.2268798758459243,-.5578149944602171,.2813910456659647],[-.0405757452148008,1.112286803280317,-.0717110580655164],[-.0763729366746601,-.4214933324022432,1.5869240198367816]],multiplyMatrices([[1,.3963377773761749,.2158037573099136],[1,-.1055613458156586,-.0638541728258133],[1,-.0894841775298119,-1.2914855480194092]],e).map(e=>e**3))}const rgb2oklab=(...e)=>{let[t,n,r,...i]=o(e,`rgb`);return[...XYZ_to_OKLab(rgb2xyz(t,n,r)),...i.length>0&&i[0]<1?[i[0]]:[]]};function XYZ_to_OKLab(e){return multiplyMatrices([[.210454268309314,.7936177747023054,-.0040720430116193],[1.9779985324311684,-2.42859224204858,.450593709617411],[.0259040424655478,.7827717124575296,-.8086757549230774]],multiplyMatrices([[.819022437996703,.3619062600528904,-.1288737815209879],[.0329836539323885,.9292868615863434,.0361446663506424],[.0481771893596242,.2642395317527308,.6335478284694309]],e).map(e=>Math.cbrt(e)))}Color.prototype.oklab=function(){return rgb2oklab(this._rgb)},Object.assign(chroma,{oklab:e((...e)=>new Color(...e,`oklab`),`oklab`)}),g.format.oklab=oklab2rgb,g.autodetect.push({p:2,test:(...e)=>{if(e=o(e,`oklab`),type_default(e)===`array`&&e.length===3)return`oklab`}});const oklab=(e,t,n)=>{let r=e.oklab(),i=t.oklab();return new Color(r[0]+n*(i[0]-r[0]),r[1]+n*(i[1]-r[1]),r[2]+n*(i[2]-r[2]),`oklab`)};w.oklab=oklab,w.oklch=e((e,t,n)=>M(e,t,n,`oklch`),`oklch`);const{pow:P,sqrt:F,PI:L,cos:ue,sin:de,atan2:fe}=Math;var pe=e((e,t=`lrgb`,n=null)=>{let r=e.length;n||=Array.from(Array(r)).map(()=>1);let i=r/n.reduce(function(e,t){return e+t});if(n.forEach((e,t)=>{n[t]*=i}),e=e.map(e=>new Color(e)),t===`lrgb`)return _average_lrgb(e,n);let a=e.shift(),o=a.get(t),s=[],c=0,l=0;for(let e=0;e<o.length;e++)if(o[e]=(o[e]||0)*n[0],s.push(isNaN(o[e])?0:n[0]),t.charAt(e)===`h`&&!isNaN(o[e])){let t=o[e]/180*L;c+=ue(t)*n[0],l+=de(t)*n[0]}let u=a.alpha()*n[0];e.forEach((e,r)=>{let i=e.get(t);u+=e.alpha()*n[r+1];for(let e=0;e<o.length;e++)if(!isNaN(i[e])){if(s[e]+=n[r+1],t.charAt(e)===`h`){let t=i[e]/180*L;c+=ue(t)*n[r+1],l+=de(t)*n[r+1]}else o[e]+=i[e]*n[r+1]}});for(let e=0;e<o.length;e++)if(t.charAt(e)===`h`){let t=fe(l/s[e],c/s[e])/L*180;for(;t<0;)t+=360;for(;t>=360;)t-=360;o[e]=t}else o[e]=o[e]/s[e];return u/=r,new Color(o,t).alpha(u>.99999?1:u,!0)},`default`);const _average_lrgb=(e,t)=>{let n=e.length,r=[0,0,0,0];for(let i=0;i<e.length;i++){let a=e[i],o=t[i]/n,s=a._rgb;r[0]+=P(s[0],2)*o,r[1]+=P(s[1],2)*o,r[2]+=P(s[2],2)*o,r[3]+=s[3]*o}return r[0]=F(r[0]),r[1]=F(r[1]),r[2]=F(r[2]),r[3]>.9999999&&(r[3]=1),new Color(i(r))},{pow:me}=Math;function scale_default(e){let t=`rgb`,n=chroma(`#ccc`),i=0,a=[0,1],o=[0,1],s=[],c=[0,0],l=!1,u=[],d=!1,p=0,m=1,h=!1,g={},_=!0,v=1,setColors=function(e){if(e||=[`#fff`,`#000`],e&&type_default(e)===`string`&&chroma.brewer&&chroma.brewer[e.toLowerCase()]&&(e=chroma.brewer[e.toLowerCase()]),type_default(e)===`array`){e.length===1&&(e=[e[0],e[0]]),e=e.slice(0);for(let t=0;t<e.length;t++)e[t]=chroma(e[t]);s.length=0;for(let t=0;t<e.length;t++)s.push(t/(e.length-1))}return resetCache(),u=e},getClass=function(e){if(l!=null){let t=l.length-1,n=0;for(;n<t&&e>=l[n];)n++;return n-1}return 0},tMapLightness=e=>e,tMapDomain=e=>e,getColor=function(e,i){let a,o;if(i??=!1,isNaN(e)||e===null)return n;o=i?e:l&&l.length>2?getClass(e)/(l.length-2):m===p?1:(e-p)/(m-p),o=tMapDomain(o),i||(o=tMapLightness(o)),v!==1&&(o=me(o,v)),o=c[0]+o*(1-c[0]-c[1]),o=r(o,0,1);let d=Math.floor(o*1e4);if(_&&g[d])a=g[d];else{if(type_default(u)===`array`)for(let e=0;e<s.length;e++){let n=s[e];if(o<=n){a=u[e];break}if(o>=n&&e===s.length-1){a=u[e];break}if(o>n&&o<s[e+1]){o=(o-n)/(s[e+1]-n),a=chroma.interpolate(u[e],u[e+1],o,t);break}}else type_default(u)===`function`&&(a=u(o));_&&(g[d]=a)}return a};var resetCache=()=>g={};setColors(e);let f=function(e){let t=chroma(getColor(e));return d&&t[d]?t[d]():t};return f.classes=function(e){if(e!=null){if(type_default(e)===`array`)l=e,a=[e[0],e[e.length-1]];else{let t=chroma.analyze(a);l=e===0?[t.min,t.max]:chroma.limits(t,`e`,e)}return f}return l},f.domain=function(e){if(!arguments.length)return o;o=e.slice(0),p=e[0],m=e[e.length-1],s=[];let t=u.length;if(e.length===t&&p!==m)for(let t of Array.from(e))s.push((t-p)/(m-p));else{for(let e=0;e<t;e++)s.push(e/(t-1));if(e.length>2){let t=e.map((t,n)=>n/(e.length-1)),n=e.map(e=>(e-p)/(m-p));n.every((e,n)=>t[n]===e)||(tMapDomain=e=>{if(e<=0||e>=1)return e;let r=0;for(;e>=n[r+1];)r++;let i=(e-n[r])/(n[r+1]-n[r]);return t[r]+i*(t[r+1]-t[r])})}}return a=[p,m],f},f.mode=function(e){return arguments.length?(t=e,resetCache(),f):t},f.range=function(e,t){return setColors(e,t),f},f.out=function(e){return d=e,f},f.spread=function(e){return arguments.length?(i=e,f):i},f.correctLightness=function(e){return e??=!0,h=e,resetCache(),tMapLightness=h?function(e){let t=getColor(0,!0).lab()[0],n=getColor(1,!0).lab()[0],r=t>n,i=getColor(e,!0).lab()[0],a=t+(n-t)*e,o=i-a,s=0,c=1,l=20;for(;Math.abs(o)>.01&&l-->0;)(function(){return r&&(o*=-1),o<0?(s=e,e+=(c-e)*.5):(c=e,e+=(s-e)*.5),i=getColor(e,!0).lab()[0],o=i-a})();return e}:e=>e,f},f.padding=function(e){return e==null?c:(type_default(e)===`number`&&(e=[e,e]),c=e,f)},f.colors=function(t,n){arguments.length<2&&(n=`hex`);let r=[];if(arguments.length===0)r=u.slice(0);else if(t===1)r=[f(.5)];else if(t>1){let e=a[0],n=a[1]-e;r=__range__(0,t,!1).map(r=>f(e+r/(t-1)*n))}else{e=[];let t=[];if(l&&l.length>2)for(let e=1,n=l.length,r=1<=n;r?e<n:e>n;r?e++:e--)t.push((l[e-1]+l[e])*.5);else t=a;r=t.map(e=>f(e))}return chroma[n]&&(r=r.map(e=>e[n]())),r},f.cache=function(e){return e==null?_:(_=e,f)},f.gamma=function(e){return e==null?v:(v=e,f)},f.nodata=function(e){return e==null?n:(n=chroma(e),f)},f}e(scale_default,`default`);function __range__(e,t,n){let r=[],i=e<t,a=n?i?t+1:t-1:t;for(let t=e;i?t<a:t>a;i?t++:t--)r.push(t);return r}const binom_row=function(e){let t=[1,1];for(let n=1;n<e;n++){let e=[1];for(let n=1;n<=t.length;n++)e[n]=(t[n]||0)+t[n-1];t=e}return t},bezier=function(e){let I,t,n,r;if(e=e.map(e=>new Color(e)),e.length===2)[t,n]=e.map(e=>e.lab()),I=function(e){return new Color([0,1,2].map(r=>t[r]+e*(n[r]-t[r])),`lab`)};else if(e.length===3)[t,n,r]=e.map(e=>e.lab()),I=function(e){return new Color([0,1,2].map(i=>(1-e)*(1-e)*t[i]+2*(1-e)*e*n[i]+e*e*r[i]),`lab`)};else if(e.length===4){let i;[t,n,r,i]=e.map(e=>e.lab()),I=function(e){return new Color([0,1,2].map(a=>(1-e)*(1-e)*(1-e)*t[a]+3*(1-e)*(1-e)*e*n[a]+3*(1-e)*e*e*r[a]+e*e*e*i[a]),`lab`)}}else if(e.length>=5){let t,n,r;t=e.map(e=>e.lab()),r=e.length-1,n=binom_row(r),I=function(e){let i=1-e;return new Color([0,1,2].map(a=>t.reduce((t,o,s)=>t+n[s]*i**(r-s)*e**s*o[a],0)),`lab`)}}else throw RangeError(`No point in running bezier with only one color.`);return I};var he=e(e=>{let t=bezier(e);return t.scale=()=>scale_default(t),t},`default`);const{round:R}=Math;Color.prototype.rgb=function(e=!0){return e===!1?this._rgb.slice(0,3):this._rgb.slice(0,3).map(R)},Color.prototype.rgba=function(e=!0){return this._rgb.slice(0,4).map((t,n)=>n<3?e===!1?t:R(t):t)};const rgb=(...e)=>new Color(...e,`rgb`);Object.assign(chroma,{rgb}),g.format.rgb=(...e)=>{let t=o(e,`rgba`);return t[3]===void 0&&(t[3]=1),t},g.autodetect.push({p:3,test:(...e)=>{if(e=o(e,`rgba`),type_default(e)===`array`&&(e.length===3||e.length===4&&type_default(e[3])==`number`&&e[3]>=0&&e[3]<=1))return`rgb`}});const blend=(e,t,n)=>{if(!blend[n])throw Error(`unknown blend mode `+n);return blend[n](e,t)},blend_f=e=>(t,n)=>{let r=chroma(n).rgb(),i=chroma(t).rgb();return chroma.rgb(e(r,i))},each=e=>(t,n)=>{let r=[];return r[0]=e(t[0],n[0]),r[1]=e(t[1],n[1]),r[2]=e(t[2],n[2]),r},normal=e=>e,multiply=(e,t)=>e*t/255,darken=(e,t)=>e>t?t:e,lighten=(e,t)=>e>t?e:t,screen=(e,t)=>255*(1-(1-e/255)*(1-t/255)),overlay=(e,t)=>t<128?2*e*t/255:255*(1-2*(1-e/255)*(1-t/255)),burn=(e,t)=>255*(1-(1-t/255)/(e/255)),dodge=(e,t)=>e===255?255:(e=t/255*255/(1-e/255),e>255?255:e);blend.normal=blend_f(each(normal)),blend.multiply=blend_f(each(multiply)),blend.screen=blend_f(each(screen)),blend.overlay=blend_f(each(overlay)),blend.darken=blend_f(each(darken)),blend.lighten=blend_f(each(lighten)),blend.dodge=blend_f(each(dodge)),blend.burn=blend_f(each(burn));const{pow:ge,sin:_e,cos:ve}=Math;function cubehelix_default(e=300,t=-1.5,n=1,r=1,a=[0,1]){let o=0,s;type_default(a)===`array`?s=a[1]-a[0]:(s=0,a=[a,a]);let f=function(c){let l=d*((e+120)/360+t*c),u=ge(a[0]+s*c,r),p=(o===0?n:n[0]+c*o)*u*(1-u)/2,m=ve(l),h=_e(l),g=u+p*(-.14861*m+1.78277*h),_=u+p*(-.29227*m-.90649*h),v=u+1.97294*m*p;return chroma(i([g*255,_*255,v*255,1]))};return f.start=function(t){return t==null?e:(e=t,f)},f.rotations=function(e){return e==null?t:(t=e,f)},f.gamma=function(e){return e==null?r:(r=e,f)},f.hue=function(e){return e==null?n:(n=e,type_default(n)===`array`?(o=n[1]-n[0],o===0&&(n=n[1])):o=0,f)},f.lightness=function(e){return e==null?a:(type_default(e)===`array`?(a=e,s=e[1]-e[0]):(a=[e,e],s=0),f)},f.scale=()=>chroma.scale(f),f.hue(n),f}e(cubehelix_default,`default`);const{floor:ye,random:be}=Math;var xe=e((e=be)=>{let t=`#`;for(let n=0;n<6;n++)t+=`0123456789abcdef`.charAt(ye(e()*16));return new Color(t,`hex`)},`default`);const{log:z,pow:Se,floor:Ce,abs:we}=Math;function analyze(e,t=null){let n={min:Number.MAX_VALUE,max:Number.MAX_VALUE*-1,sum:0,values:[],count:0};return type_default(e)===`object`&&(e=Object.values(e)),e.forEach(e=>{t&&type_default(e)===`object`&&(e=e[t]),e!=null&&!isNaN(e)&&(n.values.push(e),n.sum+=e,e<n.min&&(n.min=e),e>n.max&&(n.max=e),n.count+=1)}),n.domain=[n.min,n.max],n.limits=(e,t)=>limits(n,e,t),n}function limits(e,t=`equal`,n=7){type_default(e)==`array`&&(e=analyze(e));let{min:r,max:i}=e,a=e.values.sort((e,t)=>e-t);if(n===1)return[r,i];let o=[];if(t.substr(0,1)===`c`&&(o.push(r),o.push(i)),t.substr(0,1)===`e`){o.push(r);for(let e=1;e<n;e++)o.push(r+e/n*(i-r));o.push(i)}else if(t.substr(0,1)===`l`){if(r<=0)throw Error(`Logarithmic scales are only possible for values > 0`);let e=Math.LOG10E*z(r),t=Math.LOG10E*z(i);o.push(r);for(let r=1;r<n;r++)o.push(Se(10,e+r/n*(t-e)));o.push(i)}else if(t.substr(0,1)===`q`){o.push(r);for(let e=1;e<n;e++){let t=(a.length-1)*e/n,r=Ce(t);if(r===t)o.push(a[r]);else{let e=t-r;o.push(a[r]*(1-e)+a[r+1]*e)}}o.push(i)}else if(t.substr(0,1)===`k`){let e,t=a.length,s=Array(t),c=Array(n),l=!0,u=0,d=null;d=[],d.push(r);for(let e=1;e<n;e++)d.push(r+e/n*(i-r));for(d.push(i);l;){for(let e=0;e<n;e++)c[e]=0;for(let e=0;e<t;e++){let t=a[e],r=Number.MAX_VALUE,i;for(let a=0;a<n;a++){let n=we(d[a]-t);n<r&&(r=n,i=a),c[i]++,s[e]=i}}let r=Array(n);for(let e=0;e<n;e++)r[e]=null;for(let n=0;n<t;n++)e=s[n],r[e]===null?r[e]=a[n]:r[e]+=a[n];for(let e=0;e<n;e++)r[e]*=1/c[e];l=!1;for(let e=0;e<n;e++)if(r[e]!==d[e]){l=!0;break}d=r,u++,u>200&&(l=!1)}let p={};for(let e=0;e<n;e++)p[e]=[];for(let n=0;n<t;n++)e=s[n],p[e].push(a[n]);let m=[];for(let e=0;e<n;e++)m.push(p[e][0]),m.push(p[e][p[e].length-1]);m=m.sort((e,t)=>e-t),o.push(m[0]);for(let e=1;e<m.length;e+=2){let t=m[e];!isNaN(t)&&o.indexOf(t)===-1&&o.push(t)}}return o}var Te=e((e,t)=>{e=new Color(e),t=new Color(t);let n=e.luminance(),r=t.luminance();return n>r?(n+.05)/(r+.05):(r+.05)/(n+.05)},`default`);
2
2
  /**
3
3
  * @license
4
4
  *
@@ -1 +1 @@
1
- import{t as e}from"../rolldown-runtime.mjs";var t=e((e=>{e.ARRAY_BUFFER_SUPPORT=typeof ArrayBuffer<`u`,e.SYMBOL_SUPPORT=typeof Symbol<`u`})),n=e(((e,n)=>{var r=t(),i=r.ARRAY_BUFFER_SUPPORT,a=r.SYMBOL_SUPPORT;n.exports=function forEach(e,t){var n,r,o,s,c;if(!e)throw Error(`obliterator/forEach: invalid iterable.`);if(typeof t!=`function`)throw Error(`obliterator/forEach: expecting a callback.`);if(Array.isArray(e)||i&&ArrayBuffer.isView(e)||typeof e==`string`||e.toString()===`[object Arguments]`){for(o=0,s=e.length;o<s;o++)t(e[o],o);return}if(typeof e.forEach==`function`){e.forEach(t);return}if(a&&Symbol.iterator in e&&typeof e.next!=`function`&&(e=e[Symbol.iterator]()),typeof e.next==`function`){for(n=e,o=0;c=n.next(),c.done!==!0;)t(c.value,o),o++;return}for(r in e)e.hasOwnProperty(r)&&t(e[r],r)}})),r=e(((e,t)=>{function Iterator(e){if(typeof e!=`function`)throw Error(`obliterator/iterator: expecting a function!`);this.next=e}typeof Symbol<`u`&&(Iterator.prototype[Symbol.iterator]=function(){return this}),Iterator.of=function(){var e=arguments,t=e.length,n=0;return new Iterator(function(){return n>=t?{done:!0}:{done:!1,value:e[n++]}})},Iterator.empty=function(){return new Iterator(function(){return{done:!0}})},Iterator.fromSequence=function(e){var t=0,n=e.length;return new Iterator(function(){return t>=n?{done:!0}:{done:!1,value:e[t++]}})},Iterator.is=function(e){return e instanceof Iterator||typeof e==`object`&&!!e&&typeof e.next==`function`},t.exports=Iterator})),i=e(((e,t)=>{t.exports=function isGraph(e){return typeof e==`object`&&!!e&&typeof e.addUndirectedEdgeWithKey==`function`&&typeof e.dropNode==`function`&&typeof e.multi==`boolean`}})),a=e((e=>{var t=2**16-1,n=2**32-1,r=2**7-1,i=2**15-1,a=2**31-1;e.getPointerArray=function(e){var r=e-1;if(r<=255)return Uint8Array;if(r<=t)return Uint16Array;if(r<=n)return Uint32Array;throw Error(`mnemonist: Pointer Array of size > 4294967295 is not supported.`)},e.getSignedPointerArray=function(e){var t=e-1;return t<=r?Int8Array:t<=i?Int16Array:t<=a?Int32Array:Float64Array},e.getNumberType=function(e){return e===(e|0)?Math.sign(e)===-1?e<=127&&e>=-128?Int8Array:e<=32767&&e>=-32768?Int16Array:Int32Array:e<=255?Uint8Array:e<=65535?Uint16Array:Uint32Array:Float64Array};var o={Uint8Array:1,Int8Array:2,Uint16Array:3,Int16Array:4,Uint32Array:5,Int32Array:6,Float32Array:7,Float64Array:8};e.getMinimalRepresentation=function(t,n){var r=null,i=0,a,s,c,l,u;for(l=0,u=t.length;l<u;l++)c=n?n(t[l]):t[l],s=e.getNumberType(c),a=o[s.name],a>i&&(i=a,r=s);return r},e.isTypedArray=function(e){return typeof ArrayBuffer<`u`&&ArrayBuffer.isView(e)},e.concat=function(){var e=0,t,n,r;for(t=0,r=arguments.length;t<r;t++)e+=arguments[t].length;var i=new arguments[0].constructor(e);for(t=0,n=0;t<r;t++)i.set(arguments[t],n),n+=arguments[t].length;return i},e.indices=function(t){for(var n=new(e.getPointerArray(t))(t),r=0;r<t;r++)n[r]=r;return n}})),o=e((e=>{var t=n(),r=a();function isArrayLike(e){return Array.isArray(e)||r.isTypedArray(e)}function guessLength(e){if(typeof e.length==`number`)return e.length;if(typeof e.size==`number`)return e.size}function toArray(e){var n=guessLength(e),r=typeof n==`number`?Array(n):[],i=0;return t(e,function(e){r[i++]=e}),r}function toArrayWithIndices(e){var n=guessLength(e),i=typeof n==`number`?r.getPointerArray(n):Array,a=typeof n==`number`?Array(n):[],o=typeof n==`number`?new i(n):[],s=0;return t(e,function(e){a[s]=e,o[s]=s++}),[a,o]}e.isArrayLike=isArrayLike,e.guessLength=guessLength,e.toArray=toArray,e.toArrayWithIndices=toArrayWithIndices})),s=e(((e,t)=>{var n=o(),i=r();function FixedDeque(e,t){if(arguments.length<2)throw Error(`mnemonist/fixed-deque: expecting an Array class and a capacity.`);if(typeof t!=`number`||t<=0)throw Error("mnemonist/fixed-deque: `capacity` should be a positive number.");this.ArrayClass=e,this.capacity=t,this.items=new e(this.capacity),this.clear()}FixedDeque.prototype.clear=function(){this.start=0,this.size=0},FixedDeque.prototype.push=function(e){if(this.size===this.capacity)throw Error(`mnemonist/fixed-deque.push: deque capacity (`+this.capacity+`) exceeded!`);var t=this.start+this.size;return t>=this.capacity&&(t-=this.capacity),this.items[t]=e,++this.size},FixedDeque.prototype.unshift=function(e){if(this.size===this.capacity)throw Error(`mnemonist/fixed-deque.unshift: deque capacity (`+this.capacity+`) exceeded!`);var t=this.start-1;return this.start===0&&(t=this.capacity-1),this.items[t]=e,this.start=t,++this.size},FixedDeque.prototype.pop=function(){if(this.size!==0){this.size--;var e=this.start+this.size;return e>=this.capacity&&(e-=this.capacity),this.items[e]}},FixedDeque.prototype.shift=function(){if(this.size!==0){var e=this.start;return this.size--,this.start++,this.start===this.capacity&&(this.start=0),this.items[e]}},FixedDeque.prototype.peekFirst=function(){if(this.size!==0)return this.items[this.start]},FixedDeque.prototype.peekLast=function(){if(this.size!==0){var e=this.start+this.size-1;return e>=this.capacity&&(e-=this.capacity),this.items[e]}},FixedDeque.prototype.get=function(e){if(!(this.size===0||e>=this.capacity))return e=this.start+e,e>=this.capacity&&(e-=this.capacity),this.items[e]},FixedDeque.prototype.forEach=function(e,t){t=arguments.length>1?t:this;for(var n=this.capacity,r=this.size,i=this.start,a=0;a<r;)e.call(t,this.items[i],a,this),i++,a++,i===n&&(i=0)},FixedDeque.prototype.toArray=function(){var e=this.start+this.size;if(e<this.capacity)return this.items.slice(this.start,e);for(var t=new this.ArrayClass(this.size),n=this.capacity,r=this.size,i=this.start,a=0;a<r;)t[a]=this.items[i],i++,a++,i===n&&(i=0);return t},FixedDeque.prototype.values=function(){var e=this.items,t=this.capacity,n=this.size,r=this.start,a=0;return new i(function(){if(a>=n)return{done:!0};var i=e[r];return r++,a++,r===t&&(r=0),{value:i,done:!1}})},FixedDeque.prototype.entries=function(){var e=this.items,t=this.capacity,n=this.size,r=this.start,a=0;return new i(function(){if(a>=n)return{done:!0};var i=e[r];return r++,r===t&&(r=0),{value:[a++,i],done:!1}})},typeof Symbol<`u`&&(FixedDeque.prototype[Symbol.iterator]=FixedDeque.prototype.values),FixedDeque.prototype.inspect=function(){var e=this.toArray();return e.type=this.ArrayClass.name,e.capacity=this.capacity,Object.defineProperty(e,"constructor",{value:FixedDeque,enumerable:!1}),e},typeof Symbol<`u`&&(FixedDeque.prototype[Symbol.for(`nodejs.util.inspect.custom`)]=FixedDeque.prototype.inspect),FixedDeque.from=function(e,t,r){if(arguments.length<3&&(r=n.guessLength(e),typeof r!=`number`))throw Error(`mnemonist/fixed-deque.from: could not guess iterable length. Please provide desired capacity as last argument.`);var i=new FixedDeque(t,r);if(n.isArrayLike(e)){var a,o;for(a=0,o=e.length;a<o;a++)i.items[a]=e[a];return i.size=o,i}return n.forEach(e,function(e){i.push(e)}),i},t.exports=FixedDeque})),c=e((e=>{let t=i(),n=s();function simpleInDegree(e,t){let n=0;return e.forEachInNeighbor(t,()=>{n++}),n}function forEachNodeInTopologicalOrder(e,r){if(!t(e))throw Error(`graphology-dag/topological-sort: the given graph is not a valid graphology instance.`);if(e.type===`undirected`||e.undirectedSize!==0)throw Error(`graphology-dag/topological-sort: cannot work if graph is not directed.`);if(e.order===0)return;let i=new n(Array,e.order),a={},o=0;e.forEachNode((t,n)=>{let r=e.multi?simpleInDegree(e,t):e.inDegree(t);r===0?i.push([t,n,0]):(a[t]=r,o+=r)});let s=0;function neighborCallback(e,t){let n=--a[e];o--,n===0&&i.push([e,t,s+1]),a[e]=n}for(;i.size!==0;){let[t,n,a]=i.shift();s=a,r(t,n,a),e.forEachOutNeighbor(t,neighborCallback)}if(o!==0)throw Error(`graphology-dag/topological-sort: given graph is not acyclic.`)}function topologicalSort(e){if(!t(e))throw Error(`graphology-dag/topological-sort: the given graph is not a valid graphology instance.`);let n=Array(e.order),r=0;return forEachNodeInTopologicalOrder(e,e=>{n[r++]=e}),n}e.topologicalSort=topologicalSort})),l=e(((e,t)=>{let n=i();t.exports=function willCreateCycle(e,t,r){if(!n(e))throw Error(`graphology-dag/will-create-cycle: the given graph is not a valid graphology instance.`);if(t=``+t,r=``+r,t===r)return!0;if(!e.hasNode(t)||!e.hasNode(r)||e.hasDirectedEdge(t,r))return!1;if(e.hasDirectedEdge(r,t))return!0;let i=e.outNeighbors(r);function push(e){i.push(e)}for(;i.length!==0;){let n=i.pop();if(n===t)return!0;e.forEachOutNeighbor(n,push)}return!1}}));export{n as i,c as n,r,l as t};
1
+ import{t as e}from"../rolldown-runtime.mjs";var t=e((e=>{e.ARRAY_BUFFER_SUPPORT=typeof ArrayBuffer<`u`,e.SYMBOL_SUPPORT=typeof Symbol<`u`})),n=e(((e,n)=>{var r=t(),i=r.ARRAY_BUFFER_SUPPORT,a=r.SYMBOL_SUPPORT;n.exports=function forEach(e,t){var n,r,o,s,c;if(!e)throw Error(`obliterator/forEach: invalid iterable.`);if(typeof t!=`function`)throw Error(`obliterator/forEach: expecting a callback.`);if(Array.isArray(e)||i&&ArrayBuffer.isView(e)||typeof e==`string`||e.toString()===`[object Arguments]`){for(o=0,s=e.length;o<s;o++)t(e[o],o);return}if(typeof e.forEach==`function`){e.forEach(t);return}if(a&&Symbol.iterator in e&&typeof e.next!=`function`&&(e=e[Symbol.iterator]()),typeof e.next==`function`){for(n=e,o=0;c=n.next(),c.done!==!0;)t(c.value,o),o++;return}for(r in e)e.hasOwnProperty(r)&&t(e[r],r)}})),r=e(((e,t)=>{function Iterator(e){if(typeof e!=`function`)throw Error(`obliterator/iterator: expecting a function!`);this.next=e}typeof Symbol<`u`&&(Iterator.prototype[Symbol.iterator]=function(){return this}),Iterator.of=function(){var e=arguments,t=e.length,n=0;return new Iterator(function(){return n>=t?{done:!0}:{done:!1,value:e[n++]}})},Iterator.empty=function(){return new Iterator(function(){return{done:!0}})},Iterator.fromSequence=function(e){var t=0,n=e.length;return new Iterator(function(){return t>=n?{done:!0}:{done:!1,value:e[t++]}})},Iterator.is=function(e){return e instanceof Iterator||typeof e==`object`&&!!e&&typeof e.next==`function`},t.exports=Iterator})),i=e(((e,t)=>{t.exports=function isGraph(e){return typeof e==`object`&&!!e&&typeof e.addUndirectedEdgeWithKey==`function`&&typeof e.dropNode==`function`&&typeof e.multi==`boolean`}})),a=e((e=>{var t=2**16-1,n=2**32-1,r=127,i=2**15-1,a=2**31-1;e.getPointerArray=function(e){var r=e-1;if(r<=255)return Uint8Array;if(r<=t)return Uint16Array;if(r<=n)return Uint32Array;throw Error(`mnemonist: Pointer Array of size > 4294967295 is not supported.`)},e.getSignedPointerArray=function(e){var t=e-1;return t<=r?Int8Array:t<=i?Int16Array:t<=a?Int32Array:Float64Array},e.getNumberType=function(e){return e===(e|0)?Math.sign(e)===-1?e<=127&&e>=-128?Int8Array:e<=32767&&e>=-32768?Int16Array:Int32Array:e<=255?Uint8Array:e<=65535?Uint16Array:Uint32Array:Float64Array};var o={Uint8Array:1,Int8Array:2,Uint16Array:3,Int16Array:4,Uint32Array:5,Int32Array:6,Float32Array:7,Float64Array:8};e.getMinimalRepresentation=function(t,n){var r=null,i=0,a,s,c,l,u;for(l=0,u=t.length;l<u;l++)c=n?n(t[l]):t[l],s=e.getNumberType(c),a=o[s.name],a>i&&(i=a,r=s);return r},e.isTypedArray=function(e){return typeof ArrayBuffer<`u`&&ArrayBuffer.isView(e)},e.concat=function(){var e=0,t,n,r;for(t=0,r=arguments.length;t<r;t++)e+=arguments[t].length;var i=new arguments[0].constructor(e);for(t=0,n=0;t<r;t++)i.set(arguments[t],n),n+=arguments[t].length;return i},e.indices=function(t){for(var n=new(e.getPointerArray(t))(t),r=0;r<t;r++)n[r]=r;return n}})),o=e((e=>{var t=n(),r=a();function isArrayLike(e){return Array.isArray(e)||r.isTypedArray(e)}function guessLength(e){if(typeof e.length==`number`)return e.length;if(typeof e.size==`number`)return e.size}function toArray(e){var n=guessLength(e),r=typeof n==`number`?Array(n):[],i=0;return t(e,function(e){r[i++]=e}),r}function toArrayWithIndices(e){var n=guessLength(e),i=typeof n==`number`?r.getPointerArray(n):Array,a=typeof n==`number`?Array(n):[],o=typeof n==`number`?new i(n):[],s=0;return t(e,function(e){a[s]=e,o[s]=s++}),[a,o]}e.isArrayLike=isArrayLike,e.guessLength=guessLength,e.toArray=toArray,e.toArrayWithIndices=toArrayWithIndices})),s=e(((e,t)=>{var n=o(),i=r();function FixedDeque(e,t){if(arguments.length<2)throw Error(`mnemonist/fixed-deque: expecting an Array class and a capacity.`);if(typeof t!=`number`||t<=0)throw Error("mnemonist/fixed-deque: `capacity` should be a positive number.");this.ArrayClass=e,this.capacity=t,this.items=new e(this.capacity),this.clear()}FixedDeque.prototype.clear=function(){this.start=0,this.size=0},FixedDeque.prototype.push=function(e){if(this.size===this.capacity)throw Error(`mnemonist/fixed-deque.push: deque capacity (`+this.capacity+`) exceeded!`);var t=this.start+this.size;return t>=this.capacity&&(t-=this.capacity),this.items[t]=e,++this.size},FixedDeque.prototype.unshift=function(e){if(this.size===this.capacity)throw Error(`mnemonist/fixed-deque.unshift: deque capacity (`+this.capacity+`) exceeded!`);var t=this.start-1;return this.start===0&&(t=this.capacity-1),this.items[t]=e,this.start=t,++this.size},FixedDeque.prototype.pop=function(){if(this.size!==0){this.size--;var e=this.start+this.size;return e>=this.capacity&&(e-=this.capacity),this.items[e]}},FixedDeque.prototype.shift=function(){if(this.size!==0){var e=this.start;return this.size--,this.start++,this.start===this.capacity&&(this.start=0),this.items[e]}},FixedDeque.prototype.peekFirst=function(){if(this.size!==0)return this.items[this.start]},FixedDeque.prototype.peekLast=function(){if(this.size!==0){var e=this.start+this.size-1;return e>=this.capacity&&(e-=this.capacity),this.items[e]}},FixedDeque.prototype.get=function(e){if(!(this.size===0||e>=this.capacity))return e=this.start+e,e>=this.capacity&&(e-=this.capacity),this.items[e]},FixedDeque.prototype.forEach=function(e,t){t=arguments.length>1?t:this;for(var n=this.capacity,r=this.size,i=this.start,a=0;a<r;)e.call(t,this.items[i],a,this),i++,a++,i===n&&(i=0)},FixedDeque.prototype.toArray=function(){var e=this.start+this.size;if(e<this.capacity)return this.items.slice(this.start,e);for(var t=new this.ArrayClass(this.size),n=this.capacity,r=this.size,i=this.start,a=0;a<r;)t[a]=this.items[i],i++,a++,i===n&&(i=0);return t},FixedDeque.prototype.values=function(){var e=this.items,t=this.capacity,n=this.size,r=this.start,a=0;return new i(function(){if(a>=n)return{done:!0};var i=e[r];return r++,a++,r===t&&(r=0),{value:i,done:!1}})},FixedDeque.prototype.entries=function(){var e=this.items,t=this.capacity,n=this.size,r=this.start,a=0;return new i(function(){if(a>=n)return{done:!0};var i=e[r];return r++,r===t&&(r=0),{value:[a++,i],done:!1}})},typeof Symbol<`u`&&(FixedDeque.prototype[Symbol.iterator]=FixedDeque.prototype.values),FixedDeque.prototype.inspect=function(){var e=this.toArray();return e.type=this.ArrayClass.name,e.capacity=this.capacity,Object.defineProperty(e,"constructor",{value:FixedDeque,enumerable:!1}),e},typeof Symbol<`u`&&(FixedDeque.prototype[Symbol.for(`nodejs.util.inspect.custom`)]=FixedDeque.prototype.inspect),FixedDeque.from=function(e,t,r){if(arguments.length<3&&(r=n.guessLength(e),typeof r!=`number`))throw Error(`mnemonist/fixed-deque.from: could not guess iterable length. Please provide desired capacity as last argument.`);var i=new FixedDeque(t,r);if(n.isArrayLike(e)){var a,o;for(a=0,o=e.length;a<o;a++)i.items[a]=e[a];return i.size=o,i}return n.forEach(e,function(e){i.push(e)}),i},t.exports=FixedDeque})),c=e((e=>{let t=i(),n=s();function simpleInDegree(e,t){let n=0;return e.forEachInNeighbor(t,()=>{n++}),n}function forEachNodeInTopologicalOrder(e,r){if(!t(e))throw Error(`graphology-dag/topological-sort: the given graph is not a valid graphology instance.`);if(e.type===`undirected`||e.undirectedSize!==0)throw Error(`graphology-dag/topological-sort: cannot work if graph is not directed.`);if(e.order===0)return;let i=new n(Array,e.order),a={},o=0;e.forEachNode((t,n)=>{let r=e.multi?simpleInDegree(e,t):e.inDegree(t);r===0?i.push([t,n,0]):(a[t]=r,o+=r)});let s=0;function neighborCallback(e,t){let n=--a[e];o--,n===0&&i.push([e,t,s+1]),a[e]=n}for(;i.size!==0;){let[t,n,a]=i.shift();s=a,r(t,n,a),e.forEachOutNeighbor(t,neighborCallback)}if(o!==0)throw Error(`graphology-dag/topological-sort: given graph is not acyclic.`)}function topologicalSort(e){if(!t(e))throw Error(`graphology-dag/topological-sort: the given graph is not a valid graphology instance.`);let n=Array(e.order),r=0;return forEachNodeInTopologicalOrder(e,e=>{n[r++]=e}),n}e.topologicalSort=topologicalSort})),l=e(((e,t)=>{let n=i();t.exports=function willCreateCycle(e,t,r){if(!n(e))throw Error(`graphology-dag/will-create-cycle: the given graph is not a valid graphology instance.`);if(t=``+t,r=``+r,t===r)return!0;if(!e.hasNode(t)||!e.hasNode(r)||e.hasDirectedEdge(t,r))return!1;if(e.hasDirectedEdge(r,t))return!0;let i=e.outNeighbors(r);function push(e){i.push(e)}for(;i.length!==0;){let n=i.pop();if(n===t)return!0;e.forEachOutNeighbor(n,push)}return!1}}));export{n as i,c as n,r,l as t};