@blueprint-chart/lib 2.6.0 → 2.7.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/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { $ as e, $t as t, A as n, At as r, B as i, Bt as a, C as o, Ct as s, D as c, Dt as l, E as u, Et as d, F as f, Ft as p, G as m, Gt as h, H as g, Ht as ee, I as _, It as v, J as y, Jt as te, K as ne, Kt as re, L as ie, Lt as ae, M as b, Mt as oe, N as se, Nt as ce, O as le, Ot as ue, P as x, Pt as de, Q as fe, Qt as pe, R as me, Rt as he, S as ge, St as _e, T as ve, Tt as ye, U as S, Ut as be, V as xe, Vt as Se, W as Ce, Wt as we, X as C, Xt as Te, Y as Ee, Yt as De, Z as Oe, Zt as ke, _ as Ae, _t as je, a as Me, at as Ne, b as Pe, bt as Fe, c as Ie, ct as Le, d as Re, dt as ze, en as Be, et as Ve, f as He, ft as Ue, g as We, gt as Ge, h as Ke, ht as qe, i as Je, it as Ye, j as Xe, jt as Ze, k as Qe, kt as $e, l as et, lt as tt, m as nt, mt as rt, n as it, nn as at, nt as ot, o as st, ot as ct, p as lt, pt as ut, q as dt, qt as ft, r as pt, rn as mt, rt as ht, s as gt, st as _t, t as vt, tn as yt, tt as bt, u as xt, ut as St, v as Ct, vt as wt, w as Tt, wt as Et, x as Dt, xt as Ot, y as kt, yt as At, z as w, zt as jt } from "./render-bpc-B8L42qjL.js";
1
+ import { $ as e, $t as t, A as n, At as r, B as i, Bt as a, C as o, Ct as s, D as c, Dt as l, E as u, Et as d, F as f, Ft as p, G as m, Gt as h, H as g, Ht as ee, I as _, It as v, J as y, Jt as te, K as ne, Kt as re, L as ie, Lt as ae, M as b, Mt as oe, N as se, Nt as ce, O as le, Ot as ue, P as x, Pt as de, Q as fe, Qt as pe, R as me, Rt as he, S as ge, St as _e, T as ve, Tt as ye, U as S, Ut as be, V as xe, Vt as Se, W as Ce, Wt as we, X as C, Xt as Te, Y as Ee, Yt as De, Z as Oe, Zt as ke, _ as Ae, _t as je, a as Me, at as Ne, b as Pe, bt as Fe, c as Ie, ct as Le, d as Re, dt as ze, en as Be, et as Ve, f as He, ft as Ue, g as We, gt as Ge, h as Ke, ht as qe, i as Je, it as Ye, j as Xe, jt as Ze, k as Qe, kt as $e, l as et, lt as tt, m as nt, mt as rt, n as it, nn as at, nt as ot, o as st, ot as ct, p as lt, pt as ut, q as dt, qt as ft, r as pt, rn as mt, rt as ht, s as gt, st as _t, t as vt, tn as yt, tt as bt, u as xt, ut as St, v as Ct, vt as wt, w as Tt, wt as Et, x as Dt, xt as Ot, y as kt, yt as At, z as w, zt as jt } from "./render-bpc-BL73t_Ih.js";
2
2
  import { t as Mt } from "./runtime-gzeMNwqx.js";
3
3
  import T from "chroma-js";
4
4
  //#region src/recommendations/intent.ts
@@ -309,7 +309,7 @@ body {
309
309
  `,`\r`],!1,!1,!1),De=Mt(`whitespace`);function Oe(e,t,n){T(t)>1&&Et(`duplicate data block — a chart or scene may define at most one data { } block`);let r=E(t);return{type:`chart`,chartType:e,...n.length?{trailingComments:n}:{},properties:r.properties,data:r.data,colorizes:r.colorizes,highlights:r.highlights,areaFills:r.areaFills,annotations:r.annotations,series:r.series,scenes:r.scenes,transforms:r.transforms}}function ke(e,t,n){return e.length&&(t.leadingComments=e),n!=null&&(t.trailingComment=n),t}function Ae(e,t){return{type:`data`,entries:e,...t.length?{trailingComments:t}:{}}}function je(e,t,n){return e.length&&(t.leadingComments=e),n!=null&&(t.trailingComment=n),t}function Me(e,t,n){return n}function Ne(e,t,n){let r=[t,...n];return{type:`property`,key:e.name,...e.quoted&&e.name===`series`?{quotedKey:!0}:{},value:r[0].value,isPercentage:!1,values:r.map(e=>e.value)}}function Pe(e,t){return{type:`property`,key:e.name,...e.quoted&&e.name===`series`?{quotedKey:!0}:{},value:t.value,isPercentage:t.isPercentage}}function Fe(e){return{name:e,quoted:!0}}function Ie(e){return{name:e,quoted:!1}}function Le(e,t){return{type:`property`,key:e,...e===`series`?{quotedKey:!0}:{},value:t.value,isPercentage:t.isPercentage}}function Re(e){return e.trim()}function ze(e,t,n){return{type:`colorize`,target:e,properties:t,...n.length?{trailingComments:n}:{}}}function Be(){Et(`colorize needs a quoted target, e.g. colorize "2021" { ... }`)}function Ve(e,t,n){return{type:`colorize`,target:e,properties:t,fromHighlight:!0,...n.length?{trailingComments:n}:{}}}function He(e){return{type:`highlight`,target:e,properties:[]}}function Ue(){Et(`highlight needs a quoted target, e.g. highlight "2021" { ... } or highlight "2021"`)}function We(e,t,n,r){return{type:`area-fill`,from:e,to:t,properties:n,...r.length?{trailingComments:r}:{}}}function Ge(){Et(`area-fill needs two quoted targets, e.g. area-fill "Revenue" "Cost" { ... }`)}function Ke(){Et(`area-fill needs two quoted targets, e.g. area-fill "Revenue" "Cost" { ... }`)}function qe(e,t,n){return{type:`annotation`,kind:`point`,target:e,properties:t,...n.length?{trailingComments:n}:{}}}function Je(){Et(`annotation needs a quoted target, e.g. annotation "2021" { ... }`)}function Ye(e,t){return{type:`annotation`,kind:`range`,properties:e,...t.length?{trailingComments:t}:{}}}function Xe(e,t){return{type:`annotation`,kind:`free`,properties:e,...t.length?{trailingComments:t}:{}}}function Ze(e,t,n){return{type:`series`,name:e,properties:t,...n.length?{trailingComments:n}:{}}}function Qe(){Et(`series needs a quoted name, e.g. series "Revenue" { ... }`)}function $e(e,t,n){T(t)>1&&Et(`duplicate data block — a chart or scene may define at most one data { } block`);let r=D(t);return{type:`scene`,name:e??null,...n.length?{trailingComments:n}:{},properties:r.properties,data:r.data,colorizes:r.colorizes,highlights:r.highlights,areaFills:r.areaFills,annotations:r.annotations,series:r.series,transforms:r.transforms}}function et(e,t,n){return{type:`transform`,transformType:e,properties:t,...n.length?{trailingComments:n}:{}}}function tt(e,t,n){return e.length&&(t.leadingComments=e),n!=null&&(t.trailingComment=n),t}function nt(e,t){return t!=null&&(e.trailingComment=t),e}function rt(e,t){return{type:`property`,key:e,value:t.value,isPercentage:t.isPercentage}}function it(e){return{value:e,isPercentage:!0}}function at(e){return{value:e,isPercentage:!1}}function ot(e){return{value:e,isPercentage:!1}}function st(e){return{value:e,isPercentage:!1}}function ct(e){return parseFloat(e)}function lt(e){return e.join(``)}function ut(e){return e}function dt(){return`"`}function ft(){return`\\`}function pt(){return`
310
310
  `}function mt(){return`\r`}function ht(){return` `}function gt(e){return String.fromCharCode(parseInt(e,16))}function _t(e){Et(`Unknown escape sequence \\`+e)}function vt(e){return e}function yt(e){return e}function bt(e){return e.trim()}function xt(e){return e.trim()}let q=t.peg$currPos|0,J=q,St=[{line:1,column:1}],Ct=q,wt=t.peg$maxFailExpected||[],Y=t.peg$silentFails|0,Tt;if(t.startRule){if(!(t.startRule in i))throw Error(`Can't start parsing from rule "`+t.startRule+`".`);a=i[t.startRule]}function Et(e,t){throw t=t===void 0?Pt(J,q):t,Ft(e,t)}function Dt(t=q){let n=e.codePointAt(t);return n===void 0?``:String.fromCodePoint(n)}function Ot(e,t){return{type:`literal`,text:e,ignoreCase:t}}function kt(e,t,n,r){return{type:`class`,parts:e,inverted:t,ignoreCase:n,unicode:r}}function At(){return{type:`any`}}function jt(){return{type:`end`}}function Mt(e){return{type:`other`,description:e}}function Nt(t){let n=St[t],r;if(n)return n;if(t>=St.length)r=St.length-1;else for(r=t;!St[--r];);for(n=St[r],n={line:n.line,column:n.column};r<t;)e.charCodeAt(r)===10?(n.line++,n.column=1):n.column++,r++;return St[t]=n,n}function Pt(e,t,n){let i=Nt(e),a=Nt(t),o={source:r,start:{offset:e,line:i.line,column:i.column},end:{offset:t,line:a.line,column:a.column}};return n&&r&&typeof r.offset==`function`&&(o.start=r.offset(o.start),o.end=r.offset(o.end)),o}function X(e){q<Ct||(q>Ct&&(Ct=q,wt=[]),wt.push(e))}function Ft(e,t){return new O(e,null,null,t)}function It(e,t,n){return new O(O.buildMessage(e,t),e,t,n)}function Lt(){let t,r,i,a,s,c,l,u;if(t=q,vn(),e.substr(q,5)===o?(r=o,q+=5):(r=n,Y===0&&X(M)),r!==n){if(i=_n(),i!==n){if(a=on(),a!==n){if(vn(),e.charCodeAt(q)===123?(s=`{`,q++):(s=n,Y===0&&X(N)),s!==n){for(c=[],l=Rt();l!==n;)c.push(l),l=Rt();l=hn(),e.charCodeAt(q)===125?(u=`}`,q++):(u=n,Y===0&&X(P)),u===n?(q=t,t=n):(vn(),J=t,t=Oe(a,c,l))}else q=t,t=n}else q=t,t=n}else q=t,t=n}else q=t,t=n;return t}function Rt(){let t,r,i,a,o;if(t=q,r=hn(),i=zt(),i===n&&(i=Gt(),i===n&&(i=Kt(),i===n&&(i=qt(),i===n&&(i=Yt(),i===n&&(i=Xt(),i===n&&(i=Jt(),i===n&&(i=Zt(),i===n&&(i=Qt(),i===n&&(i=$t(),i===n&&(i=nn())))))))))),i!==n){for(a=[],o=e.charAt(q),_.test(o)?q++:(o=n,Y===0&&X(F));o!==n;)a.push(o),o=e.charAt(q),_.test(o)?q++:(o=n,Y===0&&X(F));o=gn(),o===n&&(o=null),mn(),J=t,t=ke(r,i,o)}else q=t,t=n;return t}function zt(){let t,r,i,a,o,c;if(t=q,e.substr(q,4)===s?(r=s,q+=4):(r=n,Y===0&&X(I)),r!==n){if(vn(),e.charCodeAt(q)===123?(i=`{`,q++):(i=n,Y===0&&X(N)),i!==n){for(a=[],o=Bt();o!==n;)a.push(o),o=Bt();o=hn(),e.charCodeAt(q)===125?(c=`}`,q++):(c=n,Y===0&&X(P)),c===n?(q=t,t=n):(J=t,t=Ae(a,o))}else q=t,t=n}else q=t,t=n;return t}function Bt(){let t,r,i,a,o;if(t=q,r=hn(),i=Ut(),i===n&&(i=Vt()),i!==n){for(a=[],o=e.charAt(q),_.test(o)?q++:(o=n,Y===0&&X(F));o!==n;)a.push(o),o=e.charAt(q),_.test(o)?q++:(o=n,Y===0&&X(F));o=gn(),o===n&&(o=null),mn(),J=t,t=je(r,i,o)}else q=t,t=n;return t}function Vt(){let t,r,i,a,o,s,c,l;if(t=q,r=Ht(),r!==n){if(vn(),e.charCodeAt(q)===61?(i=`=`,q++):(i=n,Y===0&&X(L)),i!==n){if(vn(),a=an(),a!==n){if(o=[],s=q,e.charCodeAt(q)===44?(c=`,`,q++):(c=n,Y===0&&X(R)),c===n?(q=s,s=n):(vn(),l=an(),l===n?(q=s,s=n):(J=s,s=Me(r,a,l))),s!==n)for(;s!==n;)o.push(s),s=q,e.charCodeAt(q)===44?(c=`,`,q++):(c=n,Y===0&&X(R)),c===n?(q=s,s=n):(vn(),l=an(),l===n?(q=s,s=n):(J=s,s=Me(r,a,l)));else o=n;o===n?(q=t,t=n):(J=t,t=Ne(r,a,o))}else q=t,t=n}else q=t,t=n}else q=t,t=n;return t===n&&(t=q,r=Ht(),r===n?(q=t,t=n):(vn(),e.charCodeAt(q)===61?(i=`=`,q++):(i=n,Y===0&&X(L)),i===n?(q=t,t=n):(vn(),a=an(),a===n?(q=t,t=n):(J=t,t=Pe(r,a))))),t}function Ht(){let e,t;return e=q,t=cn(),t!==n&&(J=e,t=Fe(t)),e=t,e===n&&(e=q,t=on(),t!==n&&(J=e,t=Ie(t)),e=t),e}function Ut(){let t,r,i,a;return t=q,r=Wt(),r===n?(q=t,t=n):(e.charCodeAt(q)===9?(i=` `,q++):(i=n,Y===0&&X(z)),i===n?(q=t,t=n):(vn(),a=an(),a===n?(q=t,t=n):(J=t,t=Le(r,a)))),t}function Wt(){let t,r,i,a;if(t=q,r=q,i=[],a=e.charAt(q),v.test(a)?q++:(a=n,Y===0&&X(B)),a!==n)for(;a!==n;)i.push(a),a=e.charAt(q),v.test(a)?q++:(a=n,Y===0&&X(B));else i=n;return r=i===n?i:e.substring(r,q),r!==n&&(J=t,r=Re(r)),t=r,t}function Gt(){let t,r,i,a,o,s,l,u;if(t=q,e.substr(q,8)===c?(r=c,q+=8):(r=n,Y===0&&X(V)),r!==n){if(i=_n(),i!==n){if(a=cn(),a!==n){if(vn(),e.charCodeAt(q)===123?(o=`{`,q++):(o=n,Y===0&&X(N)),o!==n){for(s=[],l=tn();l!==n;)s.push(l),l=tn();l=hn(),e.charCodeAt(q)===125?(u=`}`,q++):(u=n,Y===0&&X(P)),u===n?(q=t,t=n):(J=t,t=ze(a,s,l))}else q=t,t=n}else q=t,t=n}else q=t,t=n}else q=t,t=n;return t===n&&(t=q,e.substr(q,8)===c?(r=c,q+=8):(r=n,Y===0&&X(V)),r===n?(q=t,t=n):(i=vn(),e.charCodeAt(q)===123?(a=`{`,q++):(a=n,Y===0&&X(N)),a===n?(q=t,t=n):(J=t,t=Be()))),t}function Kt(){let t,r,i,a,o,s,c,u,d;if(t=q,e.substr(q,9)===l?(r=l,q+=9):(r=n,Y===0&&X(H)),r!==n){if(i=_n(),i!==n){if(a=cn(),a!==n){if(o=vn(),e.charCodeAt(q)===123?(s=`{`,q++):(s=n,Y===0&&X(N)),s!==n){for(c=[],u=tn();u!==n;)c.push(u),u=tn();u=hn(),e.charCodeAt(q)===125?(d=`}`,q++):(d=n,Y===0&&X(P)),d===n?(q=t,t=n):(J=t,t=Ve(a,c,u))}else q=t,t=n}else q=t,t=n}else q=t,t=n}else q=t,t=n;return t===n&&(t=q,e.substr(q,9)===l?(r=l,q+=9):(r=n,Y===0&&X(H)),r===n?(q=t,t=n):(i=_n(),i===n?(q=t,t=n):(a=cn(),a===n?(q=t,t=n):(o=q,Y++,s=q,c=vn(),e.charCodeAt(q)===123?(u=`{`,q++):(u=n,Y===0&&X(N)),u===n?(q=s,s=n):(c=[c,u],s=c),Y--,s===n?o=void 0:(q=o,o=n),o===n?(q=t,t=n):(J=t,t=He(a))))),t===n&&(t=q,e.substr(q,9)===l?(r=l,q+=9):(r=n,Y===0&&X(H)),r===n?(q=t,t=n):(i=vn(),e.charCodeAt(q)===123?(a=`{`,q++):(a=n,Y===0&&X(N)),a===n?(q=t,t=n):(J=t,t=Ue())))),t}function qt(){let t,r,i,a,o,s,c,l,d,f;if(t=q,e.substr(q,9)===u?(r=u,q+=9):(r=n,Y===0&&X(ee)),r!==n){if(i=_n(),i!==n){if(a=cn(),a!==n){if(o=_n(),o!==n){if(s=cn(),s!==n){if(vn(),e.charCodeAt(q)===123?(c=`{`,q++):(c=n,Y===0&&X(N)),c!==n){for(l=[],d=tn();d!==n;)l.push(d),d=tn();d=hn(),e.charCodeAt(q)===125?(f=`}`,q++):(f=n,Y===0&&X(P)),f===n?(q=t,t=n):(J=t,t=We(a,s,l,d))}else q=t,t=n}else q=t,t=n}else q=t,t=n}else q=t,t=n}else q=t,t=n}else q=t,t=n;return t===n&&(t=q,e.substr(q,9)===u?(r=u,q+=9):(r=n,Y===0&&X(ee)),r===n?(q=t,t=n):(i=_n(),i===n?(q=t,t=n):(a=cn(),a===n?(q=t,t=n):(o=vn(),e.charCodeAt(q)===123?(s=`{`,q++):(s=n,Y===0&&X(N)),s===n?(q=t,t=n):(J=t,t=Ge())))),t===n&&(t=q,e.substr(q,9)===u?(r=u,q+=9):(r=n,Y===0&&X(ee)),r===n?(q=t,t=n):(i=vn(),e.charCodeAt(q)===123?(a=`{`,q++):(a=n,Y===0&&X(N)),a===n?(q=t,t=n):(J=t,t=Ke())))),t}function Jt(){let t,r,i,a,o,s,c,l;if(t=q,e.substr(q,10)===d?(r=d,q+=10):(r=n,Y===0&&X(te)),r!==n){if(i=_n(),i!==n){if(a=cn(),a!==n){if(vn(),e.charCodeAt(q)===123?(o=`{`,q++):(o=n,Y===0&&X(N)),o!==n){for(s=[],c=tn();c!==n;)s.push(c),c=tn();c=hn(),e.charCodeAt(q)===125?(l=`}`,q++):(l=n,Y===0&&X(P)),l===n?(q=t,t=n):(J=t,t=qe(a,s,c))}else q=t,t=n}else q=t,t=n}else q=t,t=n}else q=t,t=n;return t===n&&(t=q,e.substr(q,10)===d?(r=d,q+=10):(r=n,Y===0&&X(te)),r===n?(q=t,t=n):(i=vn(),e.charCodeAt(q)===123?(a=`{`,q++):(a=n,Y===0&&X(N)),a===n?(q=t,t=n):(J=t,t=Je()))),t}function Yt(){let t,r,i,a,o,s;if(t=q,e.substr(q,5)===f?(r=f,q+=5):(r=n,Y===0&&X(ne)),r!==n){if(vn(),e.charCodeAt(q)===123?(i=`{`,q++):(i=n,Y===0&&X(N)),i!==n){for(a=[],o=tn();o!==n;)a.push(o),o=tn();o=hn(),e.charCodeAt(q)===125?(s=`}`,q++):(s=n,Y===0&&X(P)),s===n?(q=t,t=n):(J=t,t=Ye(a,o))}else q=t,t=n}else q=t,t=n;return t}function Xt(){let t,r,i,a,o,s;if(t=q,e.substr(q,4)===p?(r=p,q+=4):(r=n,Y===0&&X(re)),r!==n){if(vn(),e.charCodeAt(q)===123?(i=`{`,q++):(i=n,Y===0&&X(N)),i!==n){for(a=[],o=tn();o!==n;)a.push(o),o=tn();o=hn(),e.charCodeAt(q)===125?(s=`}`,q++):(s=n,Y===0&&X(P)),s===n?(q=t,t=n):(J=t,t=Xe(a,o))}else q=t,t=n}else q=t,t=n;return t}function Zt(){let t,r,i,a,o,s,c,l;if(t=q,e.substr(q,6)===m?(r=m,q+=6):(r=n,Y===0&&X(ie)),r!==n){if(i=_n(),i!==n){if(a=cn(),a!==n){if(vn(),e.charCodeAt(q)===123?(o=`{`,q++):(o=n,Y===0&&X(N)),o!==n){for(s=[],c=tn();c!==n;)s.push(c),c=tn();c=hn(),e.charCodeAt(q)===125?(l=`}`,q++):(l=n,Y===0&&X(P)),l===n?(q=t,t=n):(J=t,t=Ze(a,s,c))}else q=t,t=n}else q=t,t=n}else q=t,t=n}else q=t,t=n;return t===n&&(t=q,e.substr(q,6)===m?(r=m,q+=6):(r=n,Y===0&&X(ie)),r===n?(q=t,t=n):(i=vn(),e.charCodeAt(q)===123?(a=`{`,q++):(a=n,Y===0&&X(N)),a===n?(q=t,t=n):(J=t,t=Qe()))),t}function Qt(){let t,r,i,a,o,s,c,l;if(t=q,e.substr(q,5)===h?(r=h,q+=5):(r=n,Y===0&&X(ae)),r!==n){if(i=_n(),i!==n){if(a=cn(),a===n&&(a=null),vn(),e.charCodeAt(q)===123?(o=`{`,q++):(o=n,Y===0&&X(N)),o!==n){for(s=[],c=en();c!==n;)s.push(c),c=en();c=hn(),e.charCodeAt(q)===125?(l=`}`,q++):(l=n,Y===0&&X(P)),l===n?(q=t,t=n):(J=t,t=$e(a,s,c))}else q=t,t=n}else q=t,t=n}else q=t,t=n;return t}function $t(){let t,r,i,a,o,s,c,l;if(t=q,e.substr(q,9)===g?(r=g,q+=9):(r=n,Y===0&&X(U)),r!==n){if(i=_n(),i!==n){if(a=on(),a!==n){if(vn(),e.charCodeAt(q)===123?(o=`{`,q++):(o=n,Y===0&&X(N)),o!==n){for(s=[],c=tn();c!==n;)s.push(c),c=tn();c=hn(),e.charCodeAt(q)===125?(l=`}`,q++):(l=n,Y===0&&X(P)),l===n?(q=t,t=n):(J=t,t=et(a,s,c))}else q=t,t=n}else q=t,t=n}else q=t,t=n}else q=t,t=n;return t}function en(){let t,r,i,a,o;if(t=q,r=hn(),i=zt(),i===n&&(i=Gt(),i===n&&(i=Kt(),i===n&&(i=qt(),i===n&&(i=Yt(),i===n&&(i=Xt(),i===n&&(i=Jt(),i===n&&(i=Zt(),i===n&&(i=$t(),i===n&&(i=nn()))))))))),i!==n){for(a=[],o=e.charAt(q),_.test(o)?q++:(o=n,Y===0&&X(F));o!==n;)a.push(o),o=e.charAt(q),_.test(o)?q++:(o=n,Y===0&&X(F));o=gn(),o===n&&(o=null),mn(),J=t,t=tt(r,i,o)}else q=t,t=n;return t}function tn(){let t,r,i,a;if(t=q,vn(),r=nn(),r!==n){for(i=[],a=e.charAt(q),_.test(a)?q++:(a=n,Y===0&&X(F));a!==n;)i.push(a),a=e.charAt(q),_.test(a)?q++:(a=n,Y===0&&X(F));a=gn(),a===n&&(a=null),mn(),J=t,t=nt(r,a)}else q=t,t=n;return t}function nn(){let t,r,i,a;return t=q,r=rn(),r===n?(q=t,t=n):(vn(),e.charCodeAt(q)===61?(i=`=`,q++):(i=n,Y===0&&X(L)),i===n?(q=t,t=n):(vn(),a=an(),a===n?(q=t,t=n):(J=t,t=rt(r,a)))),t}function rn(){let e;return e=cn(),e===n&&(e=on()),e}function an(){let t,r,i;return t=q,r=sn(),r===n?(q=t,t=n):(e.charCodeAt(q)===37?(i=`%`,q++):(i=n,Y===0&&X(oe)),i===n?(q=t,t=n):(J=t,t=it(r))),t===n&&(t=q,r=sn(),r!==n&&(J=t,r=at(r)),t=r,t===n&&(t=q,r=cn(),r!==n&&(J=t,r=ot(r)),t=r,t===n&&(t=q,r=on(),r!==n&&(J=t,r=st(r)),t=r))),t}function on(){let t,r,i,a,o;if(Y++,t=q,r=q,i=e.charAt(q),y.test(i)?q++:(i=n,Y===0&&X(ce)),i!==n){for(a=[],o=e.charAt(q),b.test(o)?q++:(o=n,Y===0&&X(le));o!==n;)a.push(o),o=e.charAt(q),b.test(o)?q++:(o=n,Y===0&&X(le));i=[i,a],r=i}else q=r,r=n;return t=r===n?r:e.substring(t,q),Y--,t===n&&(r=n,Y===0&&X(se)),t}function sn(){let t,r,i,a,o,s,c,l,u,d;if(t=q,r=q,i=q,e.charCodeAt(q)===45?(a=`-`,q++):(a=n,Y===0&&X(ue)),a===n&&(a=null),o=q,e.charCodeAt(q)===46?(s=`.`,q++):(s=n,Y===0&&X(de)),s!==n){if(c=[],l=e.charAt(q),x.test(l)?q++:(l=n,Y===0&&X(W)),l!==n)for(;l!==n;)c.push(l),l=e.charAt(q),x.test(l)?q++:(l=n,Y===0&&X(W));else c=n;c===n?(q=o,o=n):(s=[s,c],o=s)}else q=o,o=n;if(o===n){if(o=q,s=[],c=e.charAt(q),x.test(c)?q++:(c=n,Y===0&&X(W)),c!==n)for(;c!==n;)s.push(c),c=e.charAt(q),x.test(c)?q++:(c=n,Y===0&&X(W));else s=n;if(s!==n){if(c=q,e.charCodeAt(q)===46?(l=`.`,q++):(l=n,Y===0&&X(de)),l!==n){for(u=[],d=e.charAt(q),x.test(d)?q++:(d=n,Y===0&&X(W));d!==n;)u.push(d),d=e.charAt(q),x.test(d)?q++:(d=n,Y===0&&X(W));l=[l,u],c=l}else q=c,c=n;c===n&&(c=null),s=[s,c],o=s}else q=o,o=n}if(o!==n){if(s=q,c=e.charAt(q),S.test(c)?q++:(c=n,Y===0&&X(G)),c!==n){if(l=e.charAt(q),C.test(l)?q++:(l=n,Y===0&&X(fe)),l===n&&(l=null),u=[],d=e.charAt(q),x.test(d)?q++:(d=n,Y===0&&X(W)),d!==n)for(;d!==n;)u.push(d),d=e.charAt(q),x.test(d)?q++:(d=n,Y===0&&X(W));else u=n;u===n?(q=s,s=n):(c=[c,l,u],s=c)}else q=s,s=n;s===n&&(s=null),a=[a,o,s],i=a}else q=i,i=n;return r=i===n?i:e.substring(r,q),r!==n&&(J=t,r=ct(r)),t=r,t}function cn(){let t,r,i,a;if(Y++,t=q,e.charCodeAt(q)===34?(r=`"`,q++):(r=n,Y===0&&X(me)),r!==n){for(i=[],a=ln();a!==n;)i.push(a),a=ln();e.charCodeAt(q)===34?(a=`"`,q++):(a=n,Y===0&&X(me)),a===n?(q=t,t=n):(J=t,t=lt(i))}else q=t,t=n;return Y--,t===n&&(r=n,Y===0&&X(pe)),t}function ln(){let t,r,i;return t=q,e.charCodeAt(q)===92?(r=`\\`,q++):(r=n,Y===0&&X(he)),r===n?(q=t,t=n):(i=un(),i===n?(q=t,t=n):(J=t,t=ut(i))),t===n&&(t=e.charAt(q),w.test(t)?q++:(t=n,Y===0&&X(ge))),t}function un(){let t,r,i,a,o,s,c,l;return t=q,e.charCodeAt(q)===34?(r=`"`,q++):(r=n,Y===0&&X(me)),r!==n&&(J=t,r=dt()),t=r,t===n&&(t=q,e.charCodeAt(q)===92?(r=`\\`,q++):(r=n,Y===0&&X(he)),r!==n&&(J=t,r=ft()),t=r,t===n&&(t=q,e.charCodeAt(q)===110?(r=`n`,q++):(r=n,Y===0&&X(_e)),r!==n&&(J=t,r=pt()),t=r,t===n&&(t=q,e.charCodeAt(q)===114?(r=`r`,q++):(r=n,Y===0&&X(ve)),r!==n&&(J=t,r=mt()),t=r,t===n&&(t=q,e.charCodeAt(q)===116?(r=`t`,q++):(r=n,Y===0&&X(ye)),r!==n&&(J=t,r=ht()),t=r,t===n&&(t=q,e.charCodeAt(q)===117?(r=`u`,q++):(r=n,Y===0&&X(be)),r===n?(q=t,t=n):(i=q,a=q,o=e.charAt(q),k.test(o)?q++:(o=n,Y===0&&X(xe)),o===n?(q=a,a=n):(s=e.charAt(q),k.test(s)?q++:(s=n,Y===0&&X(xe)),s===n?(q=a,a=n):(c=e.charAt(q),k.test(c)?q++:(c=n,Y===0&&X(xe)),c===n?(q=a,a=n):(l=e.charAt(q),k.test(l)?q++:(l=n,Y===0&&X(xe)),l===n?(q=a,a=n):(o=[o,s,c,l],a=o)))),i=a===n?a:e.substring(i,q),i===n?(q=t,t=n):(J=t,t=gt(i))),t===n&&(t=q,e.length>q?(r=e.charAt(q),q++):(r=n,Y===0&&X(Se)),r!==n&&(J=t,r=_t(r)),t=r)))))),t}function dn(){let e;return e=fn(),e===n&&(e=pn()),e}function fn(){let t,r,i,a;if(t=q,e.substr(q,2)===`//`?(r=`//`,q+=2):(r=n,Y===0&&X(Ce)),r!==n){for(i=[],a=e.charAt(q),A.test(a)?q++:(a=n,Y===0&&X(K));a!==n;)i.push(a),a=e.charAt(q),A.test(a)?q++:(a=n,Y===0&&X(K));r=[r,i],t=r}else q=t,t=n;return t}function pn(){let t,r,i,a,o,s;if(t=q,e.substr(q,2)===`/*`?(r=`/*`,q+=2):(r=n,Y===0&&X(we)),r!==n){for(i=[],a=q,o=q,Y++,e.substr(q,2)===`*/`?(s=`*/`,q+=2):(s=n,Y===0&&X(Te)),Y--,s===n?o=void 0:(q=o,o=n),o===n?(q=a,a=n):(e.length>q?(s=e.charAt(q),q++):(s=n,Y===0&&X(Se)),s===n?(q=a,a=n):(o=[o,s],a=o));a!==n;)i.push(a),a=q,o=q,Y++,e.substr(q,2)===`*/`?(s=`*/`,q+=2):(s=n,Y===0&&X(Te)),Y--,s===n?o=void 0:(q=o,o=n),o===n?(q=a,a=n):(e.length>q?(s=e.charAt(q),q++):(s=n,Y===0&&X(Se)),s===n?(q=a,a=n):(o=[o,s],a=o));e.substr(q,2)===`*/`?(a=`*/`,q+=2):(a=n,Y===0&&X(Te)),a===n?(q=t,t=n):(r=[r,i,a],t=r)}else q=t,t=n;return t}function mn(){let t,r;for(Y++,t=[],r=e.charAt(q),j.test(r)?q++:(r=n,Y===0&&X(Ee));r!==n;)t.push(r),r=e.charAt(q),j.test(r)?q++:(r=n,Y===0&&X(Ee));return Y--,t}function hn(){let e,t,r,i;for(e=q,t=[],r=q,mn(),i=gn(),i===n?(q=r,r=n):(J=r,r=vt(i));r!==n;)t.push(r),r=q,mn(),i=gn(),i===n?(q=r,r=n):(J=r,r=vt(i));return r=mn(),J=e,e=yt(t),e}function gn(){let t,r,i,a,o,s,c;if(t=q,e.substr(q,2)===`//`?(r=`//`,q+=2):(r=n,Y===0&&X(Ce)),r!==n){for(i=q,a=[],o=e.charAt(q),A.test(o)?q++:(o=n,Y===0&&X(K));o!==n;)a.push(o),o=e.charAt(q),A.test(o)?q++:(o=n,Y===0&&X(K));i=e.substring(i,q),J=t,t=bt(i)}else q=t,t=n;if(t===n){if(t=q,e.substr(q,2)===`/*`?(r=`/*`,q+=2):(r=n,Y===0&&X(we)),r!==n){for(i=q,a=[],o=q,s=q,Y++,e.substr(q,2)===`*/`?(c=`*/`,q+=2):(c=n,Y===0&&X(Te)),Y--,c===n?s=void 0:(q=s,s=n),s===n?(q=o,o=n):(e.length>q?(c=e.charAt(q),q++):(c=n,Y===0&&X(Se)),c===n?(q=o,o=n):(s=[s,c],o=s));o!==n;)a.push(o),o=q,s=q,Y++,e.substr(q,2)===`*/`?(c=`*/`,q+=2):(c=n,Y===0&&X(Te)),Y--,c===n?s=void 0:(q=s,s=n),s===n?(q=o,o=n):(e.length>q?(c=e.charAt(q),q++):(c=n,Y===0&&X(Se)),c===n?(q=o,o=n):(s=[s,c],o=s));i=e.substring(i,q),e.substr(q,2)===`*/`?(a=`*/`,q+=2):(a=n,Y===0&&X(Te)),a===n?(q=t,t=n):(J=t,t=xt(i))}else q=t,t=n}return t}function _n(){let t,r;if(Y++,t=[],r=e.charAt(q),j.test(r)?q++:(r=n,Y===0&&X(Ee)),r===n&&(r=dn()),r!==n)for(;r!==n;)t.push(r),r=e.charAt(q),j.test(r)?q++:(r=n,Y===0&&X(Ee)),r===n&&(r=dn());else t=n;return Y--,t===n&&(r=n,Y===0&&X(De)),t}function vn(){let t,r;for(Y++,t=[],r=e.charAt(q),j.test(r)?q++:(r=n,Y===0&&X(Ee)),r===n&&(r=dn());r!==n;)t.push(r),r=e.charAt(q),j.test(r)?q++:(r=n,Y===0&&X(Ee)),r===n&&(r=dn());return Y--,t}Tt=a();let yn=Tt!==n&&q===e.length;function bn(){throw Tt!==n&&q<e.length&&X(jt()),It(wt,Ct<e.length?Dt(Ct):null,Ct<e.length?Pt(Ct,Ct+1):Pt(Ct,Ct))}if(t.peg$library)return{peg$result:Tt,peg$currPos:q,peg$FAILED:n,peg$maxFailExpected:wt,peg$maxFailPos:Ct,peg$success:yn,peg$throw:yn?void 0:bn};if(yn)return Tt;bn()}function A(e){try{return k(e)}catch(e){if(e instanceof Error&&`location`in e){let t=e.location,n=SyntaxError(`${e.message} at ${t.start.line}:${t.start.column}`);throw n.location=t,n}throw e}}function j(e){return e.replace(/(\d)\s+(?=\d)/g,`$1`)}function M(e){return j(e.replace(/^"(.*)"$/,`$1`)).replace(/%$/,``).trim()}function N(e){let t=M(e?.trim()??``);if(!t)return;let n=Number(t);return Number.isFinite(n)?n:void 0}var P={"\\":`\\\\`,'"':`\\"`,"\n":`\\n`,"\r":`\\r`," ":`\\t`},F={"\\":`\\`,'"':`"`,n:`
311
311
  `,r:`\r`,t:` `};function I(e){return`"${e.replace(/[\\"\n\r\t]/g,e=>P[e])}"`}function L(e){return e.replace(/\\(u[0-9a-fA-F]{4}|[\\"nrt])/g,(e,t)=>t[0]===`u`?String.fromCharCode(parseInt(t.slice(1),16)):F[t])}function R(e){let t=e.trim();return t.length>=2&&t.startsWith(`"`)&&t.endsWith(`"`)?L(t.slice(1,-1)):t}function z(e){let t=[],n=``,r=0,i=!1;for(let a=0;a<e.length;a++){let o=e[a];if(i&&o===`\\`&&a+1<e.length){n+=o+e[++a];continue}if(o===`"`)i=!i;else if(!i&&o===`(`)r++;else if(!i&&o===`)`)r=Math.max(0,r-1);else if(o===`,`&&!i&&r===0){t.push(n),n=``;continue}n+=o}return t.push(n),t}var B=`"((?:[^"\\\\]|\\\\.)*)"`,V=RegExp(`^${B}\\s*=\\s*(.+)$`),H=RegExp(`^${B}\\s*=\\s*"([^"]*)"$`),ee=RegExp(`^${B}\\s*=\\s*(.+)$`);function te(e){let t=new Set;return e.map(e=>{let n=e;for(let r=2;t.has(n);r++)n=`${e} (${r})`;return t.add(n),n})}function ne(e,t){return e.flatMap((e,n)=>{let r=t.map(e=>e.cells[n]?.trim()??``),i=r.filter(e=>R(e)!==``);return i.length>0&&i.every(e=>N(e)===void 0)?[{name:e,values:r.map(e=>R(e)||void 0)}]:[]})}function re(e){let t=e.split(`
312
- `).map(e=>e.trim()).filter(Boolean),n=[],r=[],i=t[0]?.match(/^series\s*=\s*(.+)$/);if(i){let e=z(i[1].trim()),r=[];for(let e=1;e<t.length;e++){let n=t[e].match(H),i=n??t[e].match(V);i&&r.push({cells:z(i[2]),label:L(i[1]),legacy:n!==null})}let a=e.length>1||!r.some(e=>e.legacy)?e.map(R):R(e[0]).split(`,`).map(e=>e.trim()),o=a.map(()=>[]);for(let e of r){n.push(e.label);for(let t=0;t<a.length;t++)o[t].push(N(e.cells[t]))}let s=a.map((e,t)=>({name:e,values:o[t]})),c=ne(a,r);return{labels:te(n),values:o[0]??[],series:s,...c.length&&{textColumns:c}}}for(let e of t){let t=e.match(ee);t&&(n.push(L(t[1])),r.push(N(t[2])))}return{labels:te(n),values:r}}var ie=[{name:`Blueprint`,label:`Blueprint`,colors:[`#2563A0`,`#D4A63A`,`#C94044`,`#2D8659`,`#4B90CF`,`#163A65`]},{name:`BlueprintBold`,label:`Blueprint Bold`,colors:[`#2563A0`,`#DDF247`,`#C94044`,`#2D8659`,`#D4A63A`,`#163A65`]},{name:`JosefAlbers`,label:`Albers`,colors:[`#c00559`,`#de1f6c`,`#f3a20d`,`#f07a13`,`#de6716`]},{name:`Durorthod`,label:`Amber`,colors:[`#4b2b1f`,`#803c15`,`#c6782c`,`#ffa91d`,`#ebdf9a`]},{name:`X41`,label:`Berry`,colors:[`#411f6b`,`#783999`,`#be3979`,`#cc857d`,`#e2c6a6`]},{name:`Bright`,label:`Bright`,colors:[`#462255`,`#ff8811`,`#9dd9d2`,`#046e8f`,`#d44d5c`]},{name:`Cancri`,label:`Cancri`,colors:[`#343854`,`#8c384d`,`#c9002e`,`#d95e31`,`#f0c742`,`#e5dcd1`]},{name:`Ceres`,label:`Ceres`,colors:[`#2f3437`,`#4a5f71`,`#6f8ba0`,`#dbdddd`]},{name:`MarcChagall`,label:`Chagall`,colors:[`#3f6f76`,`#69b7ce`,`#c65840`,`#f4ce4b`,`#563d63`]},{name:`Pelewensis`,label:`Coral`,colors:[`#e2b000`,`#dde576`,`#2449a2`,`#809098`,`#303538`]},{name:`Deathmasks`,label:`Deathmasks`,colors:[`#926159`,`#94947b`,`#c7d2d8`,`#62b7c8`,`#43535c`,`#203648`]},{name:`Leucosternon`,label:`Deep Sea`,colors:[`#302e5b`,`#0e34b2`,`#207cf5`,`#9ec8ff`,`#e3e43a`]},{name:`Deelite`,label:`Deelite`,colors:[`#48448e`,`#8ccc58`,`#fc4d97`,`#bd2066`]},{name:`X10`,label:`Dusk`,colors:[`#383138`,`#5b4361`,`#846d86`,`#d8e0c0`,`#e3c58a`,`#a89e5e`]},{name:`Vitrixerand`,label:`Earth`,colors:[`#3d303e`,`#723f27`,`#9b6044`,`#b5804c`,`#facd9a`]},{name:`Egypt`,label:`Egypt`,colors:[`#dd5129`,`#0f7ba2`,`#43b284`,`#fab255`]},{name:`ElectronicNight`,label:`Electric Night`,colors:[`#cb54d6`,`#3e45c4`,`#3b3233`,`#362f78`,`#57b4ae`]},{name:`LutjanusSebae`,label:`Emperor`,colors:[`#dadedf`,`#a2bac5`,`#ce3d21`,`#992216`,`#59241e`]},{name:`Enara`,label:`Enara`,colors:[`#353535`,`#3d5983`,`#5a8a54`,`#cfb023`]},{name:`Camo871`,label:`Fiesta`,colors:[`#ffff14`,`#fea31d`,`#ce2d41`,`#3a3fa3`]},{name:`Folklore`,label:`Folklore`,colors:[`#343434`,`#5c5c5c`,`#bababa`,`#f8f8f8`]},{name:`Fritsch`,label:`Fritsch`,colors:[`#0f8d7b`,`#8942bd`,`#373333`,`#eadd17`]},{name:`AgSunset`,label:`Glow`,colors:[`#4b2991`,`#872ca2`,`#c0369d`,`#ea4f88`,`#fa7876`,`#f6a97a`,`#edd9a3`]},{name:`Harvey`,label:`Harvey`,colors:[`#c6d4d6`,`#274c4f`,`#a4432d`,`#b17c51`]},{name:`Heep`,label:`Heep`,colors:[`#466e9a`,`#e84d45`,`#35332f`,`#a1baac`]},{name:`Imperator`,label:`Imperator`,colors:[`#302e62`,`#0527b4`,`#555dfe`,`#e4e500`,`#b8980f`]},{name:`Klimt`,label:`Klimt`,colors:[`#df9ed4`,`#d52c50`,`#eacc62`,`#469d76`,`#39546e`,`#9936a3`]},{name:`KnickCity`,label:`Knick City`,colors:[`#213453`,`#ff6720`,`#707372`,`#c8c9c7`]},{name:`London`,label:`London`,colors:[`#bd241e`,`#e56b1e`,`#ffcd22`,`#223259`]},{name:`Lover`,label:`Lover`,colors:[`#b8396b`,`#ffd1d7`,`#e4dfb7`,`#76bae0`,`#b28f81`,`#54483e`]},{name:`Maya`,label:`Maya`,colors:[`#3d5a80`,`#98c1d9`,`#c7e1e2`,`#ee6c4d`,`#293241`]},{name:`X24`,label:`Mocha`,colors:[`#44302e`,`#7e5945`,`#bc927b`,`#e6dbd6`]},{name:`Camo873`,label:`Neon`,colors:[`#132f8a`,`#5a56c8`,`#fc7ead`,`#ffca3e`]},{name:`NetsCity`,label:`Nets City`,colors:[`#353535`,`#ffb81c`,`#da291c`,`#004c97`,`#418fde`]},{name:`Nodoubt`,label:`No Doubt`,colors:[`#385581`,`#6dbac6`,`#dac190`,`#c9052c`]},{name:`ClaesOldenburg`,label:`Oldenburg`,colors:[`#95b1c9`,`#263656`,`#698946`,`#f8d440`,`#c30014`]},{name:`Peacesells`,label:`Peace Sells`,colors:[`#9a5155`,`#483943`,`#ecc463`,`#a497b2`]},{name:`PabloPicasso`,label:`Picasso`,colors:[`#4e7989`,`#a9011b`,`#e4a826`,`#80944e`,`#dcd6b2`]},{name:`Bifasciatum`,label:`Reef`,colors:[`#36313d`,`#16407b`,`#2b7ff9`,`#9feaee`,`#6cbe50`]},{name:`SiameseDream`,label:`Siamese Dream`,colors:[`#e3dbd2`,`#413026`,`#a34d2c`,`#cd8e40`]},{name:`X115`,label:`Sienna`,colors:[`#203748`,`#633633`,`#8e442e`,`#e9b35e`,`#e4dda7`]},{name:`Sixers`,label:`Sixers`,colors:[`#888b8d`,`#e4d5d3`,`#003da5`,`#d50032`]},{name:`SolLeWitt`,label:`Sol LeWitt`,colors:[`#0a71b6`,`#f9c40a`,`#403131`,`#eb5432`,`#d6dedc`]},{name:`Sunset`,label:`Sunset`,colors:[`#41476b`,`#675478`,`#9e6374`,`#c67b6f`,`#de9b71`,`#efbc82`,`#eedba6`]},{name:`Sunset2`,label:`Sunset II`,colors:[`#254075`,`#61599d`,`#b46c79`,`#eb7f54`,`#ffb33d`]},{name:`Sunset3`,label:`Sunset III`,colors:[`#4f2355`,`#701c34`,`#a63228`,`#c7662a`,`#eba42b`]},{name:`Pal9`,label:`Tropical`,colors:[`#273b5b`,`#c1c243`,`#e73e26`,`#2e6657`,`#d7e4a3`,`#24a99c`]},{name:`Salvelinus`,label:`Trout`,colors:[`#e6452e`,`#e49a36`,`#f9dd4c`,`#5b4a4c`,`#303542`]},{name:`TheovanDoesburg`,label:`Van Doesburg`,colors:[`#bd748f`,`#3d578e`,`#bfab68`,`#dad7d0`,`#313433`]},{name:`Wizards`,label:`Wizards`,colors:[`#c8102e`,`#213453`,`#8d9093`,`#c8c9c7`]},{name:`FrancescoXanto`,label:`Xanto`,colors:[`#2c6aa5`,`#dcad00`,`#d8c67e`,`#c97f17`,`#578b55`]},{name:`Zeppelin`,label:`Zeppelin`,colors:[`#efdb15`,`#739c9c`,`#0d484c`,`#c71a08`]}],ae=Object.fromEntries(ie.map(e=>[e.name,e.colors]));function U(e){if(!e)return;let t=ae[e];return t?[...t]:void 0}function oe(){return ie}var{min:se,max:ce}=Math,le=(e,t=0,n=1)=>se(ce(t,e),n),ue=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]=le(e[t],0,255)):t===3&&(e[t]=le(e[t],0,1));return e},de={};for(let e of[`Boolean`,`Number`,`String`,`Function`,`Array`,`Date`,`RegExp`,`Undefined`,`Null`])de[`[object ${e}]`]=e.toLowerCase();function W(e){return de[Object.prototype.toString.call(e)]||`object`}var G=(e,t=null)=>e.length>=3?Array.prototype.slice.call(e):W(e[0])==`object`&&t?t.split(``).filter(t=>e[0][t]!==void 0).map(t=>e[0][t]):e[0].slice(0),fe=e=>{if(e.length<2)return null;let t=e.length-1;return W(e[t])==`string`?e[t].toLowerCase():null},{PI:pe,min:me,max:he}=Math,ge=e=>Math.round(e*100)/100,_e=e=>Math.round(e*100)/100,ve=pe*2,ye=pe/3,be=pe/180,xe=180/pe;function Se(e){return[...e.slice(0,3).reverse(),...e.slice(3)]}var Ce={format:{},autodetect:[]},K=class{constructor(...e){let t=this;if(W(e[0])===`object`&&e[0].constructor&&e[0].constructor===this.constructor)return e[0];let n=fe(e),r=!1;if(!n){r=!0,Ce.sorted||=(Ce.autodetect=Ce.autodetect.sort((e,t)=>t.p-e.p),!0);for(let t of Ce.autodetect)if(n=t.test(...e),n)break}if(Ce.format[n])t._rgb=ue(Ce.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 W(this.hex)==`function`?this.hex():`[${this._rgb.join(`,`)}]`}},we=`3.2.0`,Te=(...e)=>new K(...e);Te.version=we;var Ee={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`},De=/^#?([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/,Oe=/^#?([A-Fa-f0-9]{8}|[A-Fa-f0-9]{4})$/,ke=e=>{if(e.match(De)){(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(Oe)){(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:Ae}=Math,je=(...e)=>{let[t,n,r,i]=G(e,`rgba`),a=fe(e)||`auto`;i===void 0&&(i=1),a===`auto`&&(a=i<1?`rgba`:`rgb`),t=Ae(t),n=Ae(n),r=Ae(r);let o=`000000`+(t<<16|n<<8|r).toString(16);o=o.substr(o.length-6);let s=`0`+Ae(i*255).toString(16);switch(s=s.substr(s.length-2),a.toLowerCase()){case`rgba`:return`#${o}${s}`;case`argb`:return`#${s}${o}`;default:return`#${o}`}};K.prototype.name=function(){let e=je(this._rgb,`rgb`);for(let t of Object.keys(Ee))if(Ee[t]===e)return t.toLowerCase();return e},Ce.format.named=e=>{if(e=e.toLowerCase(),Ee[e])return ke(Ee[e]);throw Error(`unknown color name: `+e)},Ce.autodetect.push({p:5,test:(e,...t)=>{if(!t.length&&W(e)===`string`&&Ee[e.toLowerCase()])return`named`}}),K.prototype.alpha=function(e,t=!1){return e!==void 0&&W(e)===`number`?t?(this._rgb[3]=e,this):new K([this._rgb[0],this._rgb[1],this._rgb[2],e],`rgb`):this._rgb[3]},K.prototype.clipped=function(){return this._rgb._clipped||!1};var Me={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}},Ne=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 Pe(e){let t=Ne.get(String(e).toLowerCase());if(!t)throw Error(`unknown Lab illuminant `+e);Me.labWhitePoint=e,Me.Xn=t[0],Me.Zn=t[1]}function Fe(){return Me.labWhitePoint}var Ie=(...e)=>{e=G(e,`lab`);let[t,n,r]=e,[i,a,o]=Le(t,n,r),[s,c,l]=ze(i,a,o);return[s,c,l,e.length>3?e[3]:1]},Le=(e,t,n)=>{let{kE:r,kK:i,kKE:a,Xn:o,Yn:s,Zn:c}=Me,l=(e+16)/116,u=.002*t+l,d=l-.005*n,f=u*u*u,p=d*d*d,m=f>r?f:(116*u-16)/i,h=e>a?((e+16)/116)**3:e/i,g=p>r?p:(116*d-16)/i;return[m*o,h*s,g*c]},Re=e=>{let t=Math.sign(e);return e=Math.abs(e),(e<=.0031308?e*12.92:1.055*e**(1/2.4)-.055)*t},ze=(e,t,n)=>{let{MtxAdaptMa:r,MtxAdaptMaI:i,MtxXYZ2RGB:a,RefWhiteRGB:o,Xn:s,Yn:c,Zn:l}=Me,u=s*r.m00+c*r.m10+l*r.m20,d=s*r.m01+c*r.m11+l*r.m21,f=s*r.m02+c*r.m12+l*r.m22,p=o.X*r.m00+o.Y*r.m10+o.Z*r.m20,m=o.X*r.m01+o.Y*r.m11+o.Z*r.m21,h=o.X*r.m02+o.Y*r.m12+o.Z*r.m22,g=(e*r.m00+t*r.m10+n*r.m20)*(p/u),_=(e*r.m01+t*r.m11+n*r.m21)*(m/d),v=(e*r.m02+t*r.m12+n*r.m22)*(h/f),y=g*i.m00+_*i.m10+v*i.m20,b=g*i.m01+_*i.m11+v*i.m21,x=g*i.m02+_*i.m12+v*i.m22,S=Re(y*a.m00+b*a.m10+x*a.m20),C=Re(y*a.m01+b*a.m11+x*a.m21),w=Re(y*a.m02+b*a.m12+x*a.m22);return[S*255,C*255,w*255]},Be=(...e)=>{let[t,n,r,...i]=G(e,`rgb`),[a,o,s]=Ue(t,n,r),[c,l,u]=Ve(a,o,s);return[c,l,u,...i.length>0&&i[0]<1?[i[0]]:[]]};function Ve(e,t,n){let{Xn:r,Yn:i,Zn:a,kE:o,kK:s}=Me,c=e/r,l=t/i,u=n/a,d=c>o?c**(1/3):(s*c+16)/116,f=l>o?l**(1/3):(s*l+16)/116,p=u>o?u**(1/3):(s*u+16)/116;return[116*f-16,500*(d-f),200*(f-p)]}function He(e){let t=Math.sign(e);return e=Math.abs(e),(e<=.04045?e/12.92:((e+.055)/1.055)**2.4)*t}var Ue=(e,t,n)=>{e=He(e/255),t=He(t/255),n=He(n/255);let{MtxRGB2XYZ:r,MtxAdaptMa:i,MtxAdaptMaI:a,Xn:o,Yn:s,Zn:c,As:l,Bs:u,Cs:d}=Me,f=e*r.m00+t*r.m10+n*r.m20,p=e*r.m01+t*r.m11+n*r.m21,m=e*r.m02+t*r.m12+n*r.m22,h=o*i.m00+s*i.m10+c*i.m20,g=o*i.m01+s*i.m11+c*i.m21,_=o*i.m02+s*i.m12+c*i.m22,v=f*i.m00+p*i.m10+m*i.m20,y=f*i.m01+p*i.m11+m*i.m21,b=f*i.m02+p*i.m12+m*i.m22;return v*=h/l,y*=g/u,b*=_/d,f=v*a.m00+y*a.m10+b*a.m20,p=v*a.m01+y*a.m11+b*a.m21,m=v*a.m02+y*a.m12+b*a.m22,[f,p,m]};K.prototype.lab=function(){return Be(this._rgb)},Object.assign(Te,{lab:(...e)=>new K(...e,`lab`),getLabWhitePoint:Fe,setLabWhitePoint:Pe}),Ce.format.lab=Ie,Ce.autodetect.push({p:2,test:(...e)=>{if(e=G(e,`lab`),W(e)===`array`&&e.length===3)return`lab`}}),K.prototype.darken=function(e=1){let t=this,n=t.lab();return n[0]-=Me.Kn*e,new K(n,`lab`).alpha(t.alpha(),!0)},K.prototype.brighten=function(e=1){return this.darken(-e)},K.prototype.darker=K.prototype.darken,K.prototype.brighter=K.prototype.brighten,K.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};var{pow:We}=Math,Ge=1e-7,Ke=20;K.prototype.luminance=function(e,t=`rgb`){if(e!==void 0&&W(e)===`number`){if(e===0)return new K([0,0,0,this._rgb[3]],`rgb`);if(e===1)return new K([255,255,255,this._rgb[3]],`rgb`);let n=this.luminance(),r=Ke,i=(n,a)=>{let o=n.interpolate(a,.5,t),s=o.luminance();return Math.abs(e-s)<Ge||!r--?o:s>e?i(n,o):i(o,a)};return new K([...(n>e?i(new K([0,0,0]),this):i(this,new K([255,255,255]))).rgb(),this._rgb[3]])}return qe(...this._rgb.slice(0,3))};var qe=(e,t,n)=>(e=Je(e),t=Je(t),n=Je(n),.2126*e+.7152*t+.0722*n),Je=e=>(e/=255,e<=.03928?e/12.92:We((e+.055)/1.055,2.4)),Ye={},Xe=(e,t,n=.5,...r)=>{let i=r[0]||`lrgb`;if(!Ye[i]&&!r.length&&(i=Object.keys(Ye)[0]),!Ye[i])throw Error(`interpolation mode ${i} is not defined`);return W(e)!==`object`&&(e=new K(e)),W(t)!==`object`&&(t=new K(t)),Ye[i](e,t,n).alpha(e.alpha()+n*(t.alpha()-e.alpha()))};K.prototype.mix=K.prototype.interpolate=function(e,t=.5,...n){return Xe(this,e,t,...n)},K.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 K([t[0]*n,t[1]*n,t[2]*n,n],`rgb`)};var{sin:Ze,cos:Qe}=Math,$e=(...e)=>{let[t,n,r]=G(e,`lch`);return isNaN(r)&&(r=0),r*=be,[t,Qe(r)*n,Ze(r)*n]},et=(...e)=>{e=G(e,`lch`);let[t,n,r]=e,[i,a,o]=$e(t,n,r),[s,c,l]=Ie(i,a,o);return[s,c,l,e.length>3?e[3]:1]},tt=(...e)=>et(...Se(G(e,`hcl`))),{sqrt:nt,atan2:rt,round:it}=Math,at=(...e)=>{let[t,n,r]=G(e,`lab`),i=nt(n*n+r*r),a=(rt(r,n)*xe+360)%360;return it(i*1e4)===0&&(a=NaN),[t,i,a]},ot=(...e)=>{let[t,n,r,...i]=G(e,`rgb`),[a,o,s]=Be(t,n,r),[c,l,u]=at(a,o,s);return[c,l,u,...i.length>0&&i[0]<1?[i[0]]:[]]};K.prototype.lch=function(){return ot(this._rgb)},K.prototype.hcl=function(){return Se(ot(this._rgb))},Object.assign(Te,{lch:(...e)=>new K(...e,`lch`),hcl:(...e)=>new K(...e,`hcl`)}),Ce.format.lch=et,Ce.format.hcl=tt,[`lch`,`hcl`].forEach(e=>Ce.autodetect.push({p:2,test:(...t)=>{if(t=G(t,e),W(t)===`array`&&t.length===3)return e}})),K.prototype.saturate=function(e=1){let t=this,n=t.lch();return n[1]+=Me.Kn*e,n[1]<0&&(n[1]=0),new K(n,`lch`).alpha(t.alpha(),!0)},K.prototype.desaturate=function(e=1){return this.saturate(-e)},K.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(W(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(W(t)===`number`)a[e]=t;else throw Error(`unsupported value for Color.set`);let i=new K(a,r);return n?(this._rgb=i._rgb,this):i}throw Error(`unknown channel ${i} in mode ${r}`)}return a},K.prototype.tint=function(e=.5,...t){return Xe(this,`white`,e,...t)},K.prototype.shade=function(e=.5,...t){return Xe(this,`black`,e,...t)},Ye.rgb=(e,t,n)=>{let r=e._rgb,i=t._rgb;return new K(r[0]+n*(i[0]-r[0]),r[1]+n*(i[1]-r[1]),r[2]+n*(i[2]-r[2]),`rgb`)};var{sqrt:st,pow:ct}=Math;Ye.lrgb=(e,t,n)=>{let[r,i,a]=e._rgb,[o,s,c]=t._rgb;return new K(st(ct(r,2)*(1-n)+ct(o,2)*n),st(ct(i,2)*(1-n)+ct(s,2)*n),st(ct(a,2)*(1-n)+ct(c,2)*n),`rgb`)},Ye.lab=(e,t,n)=>{let r=e.lab(),i=t.lab();return new K(r[0]+n*(i[0]-r[0]),r[1]+n*(i[1]-r[1]),r[2]+n*(i[2]-r[2]),`lab`)};var lt=(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 f,p,m,h;return!isNaN(o)&&!isNaN(s)?(h=s>o&&s-o>180?s-(o+360):s<o&&o-s>180?s+360-o:s-o,p=o+n*h):isNaN(o)?isNaN(s)?p=NaN:(p=s,(u==1||u==0)&&r!=`hsv`&&(f=l)):(p=o,(d==1||d==0)&&r!=`hsv`&&(f=c)),f===void 0&&(f=c+n*(l-c)),m=u+n*(d-u),r===`oklch`?new K([m,f,p],r):new K([p,f,m],r)},ut=(e,t,n)=>lt(e,t,n,`lch`);Ye.lch=ut,Ye.hcl=ut;var dt=e=>{if(W(e)==`number`&&e>=0&&e<=16777215)return[e>>16,e>>8&255,e&255,1];throw Error(`unknown num color: `+e)},ft=(...e)=>{let[t,n,r]=G(e,`rgb`);return(t<<16)+(n<<8)+r};K.prototype.num=function(){return ft(this._rgb)},Object.assign(Te,{num:(...e)=>new K(...e,`num`)}),Ce.format.num=dt,Ce.autodetect.push({p:5,test:(...e)=>{if(e.length===1&&W(e[0])===`number`&&e[0]>=0&&e[0]<=16777215)return`num`}}),Ye.num=(e,t,n)=>{let r=e.num();return new K(r+n*(t.num()-r),`num`)};var{floor:pt}=Math,mt=(...e)=>{e=G(e,`hcg`);let[t,n,r]=e,i,a,o;r*=255;let s=n*255;if(n===0)i=a=o=r;else{t===360&&(t=0),t>360&&(t-=360),t<0&&(t+=360),t/=60;let e=pt(t),c=t-e,l=r*(1-n),u=l+s*(1-c),d=l+s*c,f=l+s;switch(e){case 0:[i,a,o]=[f,d,l];break;case 1:[i,a,o]=[u,f,l];break;case 2:[i,a,o]=[l,f,d];break;case 3:[i,a,o]=[l,u,f];break;case 4:[i,a,o]=[d,l,f];break;case 5:[i,a,o]=[f,l,u]}}return[i,a,o,e.length>3?e[3]:1]},ht=(...e)=>{let[t,n,r]=G(e,`rgb`),i=me(t,n,r),a=he(t,n,r),o=a-i,s=o*100/255,c=i/(255-o)*100,l;return o===0?l=NaN:(t===a&&(l=(n-r)/o),n===a&&(l=2+(r-t)/o),r===a&&(l=4+(t-n)/o),l*=60,l<0&&(l+=360)),[l,s,c]};K.prototype.hcg=function(){return ht(this._rgb)},Te.hcg=(...e)=>new K(...e,`hcg`),Ce.format.hcg=mt,Ce.autodetect.push({p:1,test:(...e)=>{if(e=G(e,`hcg`),W(e)===`array`&&e.length===3)return`hcg`}}),Ye.hcg=(e,t,n)=>lt(e,t,n,`hcg`);var{cos:gt}=Math,_t=(...e)=>{e=G(e,`hsi`);let[t,n,r]=e,i,a,o;return isNaN(t)&&(t=0),isNaN(n)&&(n=0),t>360&&(t-=360),t<0&&(t+=360),t/=360,t<1/3?(o=(1-n)/3,i=(1+n*gt(ve*t)/gt(ye-ve*t))/3,a=1-(o+i)):t<2/3?(t-=1/3,i=(1-n)/3,a=(1+n*gt(ve*t)/gt(ye-ve*t))/3,o=1-(i+a)):(t-=2/3,a=(1-n)/3,o=(1+n*gt(ve*t)/gt(ye-ve*t))/3,i=1-(a+o)),i=le(r*i*3),a=le(r*a*3),o=le(r*o*3),[i*255,a*255,o*255,e.length>3?e[3]:1]},{min:vt,sqrt:yt,acos:bt}=Math,xt=(...e)=>{let[t,n,r]=G(e,`rgb`);t/=255,n/=255,r/=255;let i,a=vt(t,n,r),o=(t+n+r)/3,s=o>0?1-a/o:0;return s===0?i=NaN:(i=(t-n+(t-r))/2,i/=yt((t-n)*(t-n)+(t-r)*(n-r)),i=bt(i),r>n&&(i=ve-i),i/=ve),[i*360,s,o]};K.prototype.hsi=function(){return xt(this._rgb)},Te.hsi=(...e)=>new K(...e,`hsi`),Ce.format.hsi=_t,Ce.autodetect.push({p:2,test:(...e)=>{if(e=G(e,`hsi`),W(e)===`array`&&e.length===3)return`hsi`}}),Ye.hsi=(e,t,n)=>lt(e,t,n,`hsi`);var q=(...e)=>{e=G(e,`hsl`);let[t,n,r]=e,i,a,o;if(n===0)i=a=o=r*255;else{let e=[0,0,0],s=[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?s[t]=l+(c-l)*6*e[t]:2*e[t]<1?s[t]=c:3*e[t]<2?s[t]=l+(c-l)*(2/3-e[t])*6:s[t]=l;[i,a,o]=[s[0]*255,s[1]*255,s[2]*255]}return e.length>3?[i,a,o,e[3]]:[i,a,o,1]},J=(...e)=>{e=G(e,`rgba`);let[t,n,r]=e;t/=255,n/=255,r/=255;let i=me(t,n,r),a=he(t,n,r),o=(a+i)/2,s,c;return a===i?(s=0,c=NaN):s=o<.5?(a-i)/(a+i):(a-i)/(2-a-i),t==a?c=(n-r)/(a-i):n==a?c=2+(r-t)/(a-i):r==a&&(c=4+(t-n)/(a-i)),c*=60,c<0&&(c+=360),e.length>3&&e[3]!==void 0?[c,s,o,e[3]]:[c,s,o]};K.prototype.hsl=function(){return J(this._rgb)},Te.hsl=(...e)=>new K(...e,`hsl`),Ce.format.hsl=q,Ce.autodetect.push({p:2,test:(...e)=>{if(e=G(e,`hsl`),W(e)===`array`&&e.length===3)return`hsl`}}),Ye.hsl=(e,t,n)=>lt(e,t,n,`hsl`);var{floor:St}=Math,Ct=(...e)=>{e=G(e,`hsv`);let[t,n,r]=e,i,a,o;if(r*=255,n===0)i=a=o=r;else{t===360&&(t=0),t>360&&(t-=360),t<0&&(t+=360),t/=60;let e=St(t),s=t-e,c=r*(1-n),l=r*(1-n*s),u=r*(1-n*(1-s));switch(e){case 0:[i,a,o]=[r,u,c];break;case 1:[i,a,o]=[l,r,c];break;case 2:[i,a,o]=[c,r,u];break;case 3:[i,a,o]=[c,l,r];break;case 4:[i,a,o]=[u,c,r];break;case 5:[i,a,o]=[r,c,l]}}return[i,a,o,e.length>3?e[3]:1]},{min:wt,max:Y}=Math,Tt=(...e)=>{e=G(e,`rgb`);let[t,n,r]=e,i=wt(t,n,r),a=Y(t,n,r),o=a-i,s,c,l;return l=a/255,a===0?(s=NaN,c=0):(c=o/a,t===a&&(s=(n-r)/o),n===a&&(s=2+(r-t)/o),r===a&&(s=4+(t-n)/o),s*=60,s<0&&(s+=360)),[s,c,l]};K.prototype.hsv=function(){return Tt(this._rgb)},Te.hsv=(...e)=>new K(...e,`hsv`),Ce.format.hsv=Ct,Ce.autodetect.push({p:2,test:(...e)=>{if(e=G(e,`hsv`),W(e)===`array`&&e.length===3)return`hsv`}}),Ye.hsv=(e,t,n)=>lt(e,t,n,`hsv`);function Et(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}var Dt=(...e)=>{e=G(e,`lab`);let[t,n,r,...i]=e,[a,o,s]=Ot([t,n,r]),[c,l,u]=ze(a,o,s);return[c,l,u,...i.length>0&&i[0]<1?[i[0]]:[]]};function Ot(e){return Et([[1.2268798758459243,-.5578149944602171,.2813910456659647],[-.0405757452148008,1.112286803280317,-.0717110580655164],[-.0763729366746601,-.4214933324022432,1.5869240198367816]],Et([[1,.3963377773761749,.2158037573099136],[1,-.1055613458156586,-.0638541728258133],[1,-.0894841775298119,-1.2914855480194092]],e).map(e=>e**3))}var kt=(...e)=>{let[t,n,r,...i]=G(e,`rgb`);return[...At(Ue(t,n,r)),...i.length>0&&i[0]<1?[i[0]]:[]]};function At(e){return Et([[.210454268309314,.7936177747023054,-.0040720430116193],[1.9779985324311684,-2.42859224204858,.450593709617411],[.0259040424655478,.7827717124575296,-.8086757549230774]],Et([[.819022437996703,.3619062600528904,-.1288737815209879],[.0329836539323885,.9292868615863434,.0361446663506424],[.0481771893596242,.2642395317527308,.6335478284694309]],e).map(e=>Math.cbrt(e)))}K.prototype.oklab=function(){return kt(this._rgb)},Object.assign(Te,{oklab:(...e)=>new K(...e,`oklab`)}),Ce.format.oklab=Dt,Ce.autodetect.push({p:2,test:(...e)=>{if(e=G(e,`oklab`),W(e)===`array`&&e.length===3)return`oklab`}}),Ye.oklab=(e,t,n)=>{let r=e.oklab(),i=t.oklab();return new K(r[0]+n*(i[0]-r[0]),r[1]+n*(i[1]-r[1]),r[2]+n*(i[2]-r[2]),`oklab`)},Ye.oklch=(e,t,n)=>lt(e,t,n,`oklch`);var{pow:jt,sqrt:Mt,PI:Nt,cos:Pt,sin:X,atan2:Ft}=Math,It=(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 K(e)),t===`lrgb`)return Lt(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*Nt;c+=Pt(t)*n[0],l+=X(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*Nt;c+=Pt(t)*n[r+1],l+=X(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=Ft(l/s[e],c/s[e])/Nt*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 K(o,t).alpha(u>.99999?1:u,!0)},Lt=(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]+=jt(s[0],2)*o,r[1]+=jt(s[1],2)*o,r[2]+=jt(s[2],2)*o,r[3]+=s[3]*o}return r[0]=Mt(r[0]),r[1]=Mt(r[1]),r[2]=Mt(r[2]),r[3]>.9999999&&(r[3]=1),new K(ue(r))},{pow:Rt}=Math;function zt(e){let t=`rgb`,n=Te(`#ccc`),r=0,i=[0,1],a=[0,1],o=[],s=[0,0],c=!1,l=[],u=!1,d=0,f=1,p=!1,m={},h=!0,g=1,_=function(e){if(e||=[`#fff`,`#000`],e&&W(e)===`string`&&Te.brewer&&Te.brewer[e.toLowerCase()]&&(e=Te.brewer[e.toLowerCase()]),W(e)===`array`){e.length===1&&(e=[e[0],e[0]]),e=e.slice(0);for(let t=0;t<e.length;t++)e[t]=Te(e[t]);o.length=0;for(let t=0;t<e.length;t++)o.push(t/(e.length-1))}return S(),l=e},v=function(e){if(c!=null){let t=c.length-1,n=0;for(;n<t&&e>=c[n];)n++;return n-1}return 0},y=e=>e,b=e=>e,x=function(e,r){let i,a;if(r??=!1,isNaN(e)||e===null)return n;a=r?e:c&&c.length>2?v(e)/(c.length-2):f===d?1:(e-d)/(f-d),a=b(a),r||(a=y(a)),g!==1&&(a=Rt(a,g)),a=s[0]+a*(1-s[0]-s[1]),a=le(a,0,1);let u=Math.floor(a*1e4);if(h&&m[u])i=m[u];else{if(W(l)===`array`)for(let e=0;e<o.length;e++){let n=o[e];if(a<=n){i=l[e];break}if(a>=n&&e===o.length-1){i=l[e];break}if(a>n&&a<o[e+1]){a=(a-n)/(o[e+1]-n),i=Te.interpolate(l[e],l[e+1],a,t);break}}else W(l)===`function`&&(i=l(a));h&&(m[u]=i)}return i};var S=()=>m={};_(e);let C=function(e){let t=Te(x(e));return u&&t[u]?t[u]():t};return C.classes=function(e){if(e!=null){if(W(e)===`array`)c=e,i=[e[0],e[e.length-1]];else{let t=Te.analyze(i);c=e===0?[t.min,t.max]:Te.limits(t,`e`,e)}return C}return c},C.domain=function(e){if(!arguments.length)return a;a=e.slice(0),d=e[0],f=e[e.length-1],o=[];let t=l.length;if(e.length===t&&d!==f)for(let t of Array.from(e))o.push((t-d)/(f-d));else{for(let e=0;e<t;e++)o.push(e/(t-1));if(e.length>2){let t=e.map((t,n)=>n/(e.length-1)),n=e.map(e=>(e-d)/(f-d));n.every((e,n)=>t[n]===e)||(b=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 i=[d,f],C},C.mode=function(e){return arguments.length?(t=e,S(),C):t},C.range=function(e,t){return _(e,t),C},C.out=function(e){return u=e,C},C.spread=function(e){return arguments.length?(r=e,C):r},C.correctLightness=function(e){return e??=!0,p=e,S(),y=p?function(e){let t=x(0,!0).lab()[0],n=x(1,!0).lab()[0],r=t>n,i=x(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=x(e,!0).lab()[0],o=i-a})();return e}:e=>e,C},C.padding=function(e){return e==null?s:(W(e)===`number`&&(e=[e,e]),s=e,C)},C.colors=function(t,n){arguments.length<2&&(n=`hex`);let r=[];if(arguments.length===0)r=l.slice(0);else if(t===1)r=[C(.5)];else if(t>1){let e=i[0],n=i[1]-e;r=Bt(0,t,!1).map(r=>C(e+r/(t-1)*n))}else{e=[];let t=[];if(c&&c.length>2)for(let e=1,n=c.length,r=1<=n;r?e<n:e>n;r?e++:e--)t.push((c[e-1]+c[e])*.5);else t=i;r=t.map(e=>C(e))}return Te[n]&&(r=r.map(e=>e[n]())),r},C.cache=function(e){return e==null?h:(h=e,C)},C.gamma=function(e){return e==null?g:(g=e,C)},C.nodata=function(e){return e==null?n:(n=Te(e),C)},C}function Bt(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}var Vt=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},Ht=function(e){let t,n,r,i;if(e=e.map(e=>new K(e)),e.length===2)[n,r]=e.map(e=>e.lab()),t=function(e){return new K([0,1,2].map(t=>n[t]+e*(r[t]-n[t])),`lab`)};else if(e.length===3)[n,r,i]=e.map(e=>e.lab()),t=function(e){return new K([0,1,2].map(t=>(1-e)*(1-e)*n[t]+2*(1-e)*e*r[t]+e*e*i[t]),`lab`)};else if(e.length===4){let a;[n,r,i,a]=e.map(e=>e.lab()),t=function(e){return new K([0,1,2].map(t=>(1-e)*(1-e)*(1-e)*n[t]+3*(1-e)*(1-e)*e*r[t]+3*(1-e)*e*e*i[t]+e*e*e*a[t]),`lab`)}}else if(e.length>=5){let n,r,i;n=e.map(e=>e.lab()),i=e.length-1,r=Vt(i),t=function(e){let t=1-e;return new K([0,1,2].map(a=>n.reduce((n,o,s)=>n+r[s]*t**(i-s)*e**s*o[a],0)),`lab`)}}else throw RangeError(`No point in running bezier with only one color.`);return t},Ut=e=>{let t=Ht(e);return t.scale=()=>zt(t),t},{round:Wt}=Math;K.prototype.rgb=function(e=!0){return e===!1?this._rgb.slice(0,3):this._rgb.slice(0,3).map(Wt)},K.prototype.rgba=function(e=!0){return this._rgb.slice(0,4).map((t,n)=>n<3?e===!1?t:Wt(t):t)},Object.assign(Te,{rgb:(...e)=>new K(...e,`rgb`)}),Ce.format.rgb=(...e)=>{let t=G(e,`rgba`);return t[3]===void 0&&(t[3]=1),t},Ce.autodetect.push({p:3,test:(...e)=>{if(e=G(e,`rgba`),W(e)===`array`&&(e.length===3||e.length===4&&W(e[3])==`number`&&e[3]>=0&&e[3]<=1))return`rgb`}});var Gt=(e,t,n)=>{if(!Gt[n])throw Error(`unknown blend mode `+n);return Gt[n](e,t)},Kt=e=>(t,n)=>{let r=Te(n).rgb(),i=Te(t).rgb();return Te.rgb(e(r,i))},qt=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};Gt.normal=Kt(qt(e=>e)),Gt.multiply=Kt(qt((e,t)=>e*t/255)),Gt.screen=Kt(qt((e,t)=>255*(1-(1-e/255)*(1-t/255)))),Gt.overlay=Kt(qt((e,t)=>t<128?2*e*t/255:255*(1-2*(1-e/255)*(1-t/255)))),Gt.darken=Kt(qt((e,t)=>e>t?t:e)),Gt.lighten=Kt(qt((e,t)=>e>t?e:t)),Gt.dodge=Kt(qt((e,t)=>e===255?255:(e=t/255*255/(1-e/255),e>255?255:e))),Gt.burn=Kt(qt((e,t)=>255*(1-(1-t/255)/(e/255))));var{pow:Jt,sin:Yt,cos:Xt}=Math;function Zt(e=300,t=-1.5,n=1,r=1,i=[0,1]){let a=0,o;W(i)===`array`?o=i[1]-i[0]:(o=0,i=[i,i]);let s=function(s){let c=ve*((e+120)/360+t*s),l=Jt(i[0]+o*s,r),u=(a===0?n:n[0]+s*a)*l*(1-l)/2,d=Xt(c),f=Yt(c),p=l+u*(-.14861*d+1.78277*f),m=l+u*(-.29227*d-.90649*f),h=l+1.97294*d*u;return Te(ue([p*255,m*255,h*255,1]))};return s.start=function(t){return t==null?e:(e=t,s)},s.rotations=function(e){return e==null?t:(t=e,s)},s.gamma=function(e){return e==null?r:(r=e,s)},s.hue=function(e){return e==null?n:(n=e,W(n)===`array`?(a=n[1]-n[0],a===0&&(n=n[1])):a=0,s)},s.lightness=function(e){return e==null?i:(W(e)===`array`?(i=e,o=e[1]-e[0]):(i=[e,e],o=0),s)},s.scale=()=>Te.scale(s),s.hue(n),s}var Qt=`0123456789abcdef`,{floor:$t,random:en}=Math,tn=(e=en)=>{let t=`#`;for(let n=0;n<6;n++)t+=Qt.charAt($t(e()*16));return new K(t,`hex`)},{log:nn,pow:rn,floor:an,abs:on}=Math;function sn(e,t=null){let n={min:Number.MAX_VALUE,max:Number.MAX_VALUE*-1,sum:0,values:[],count:0};return W(e)===`object`&&(e=Object.values(e)),e.forEach(e=>{t&&W(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)=>cn(n,e,t),n}function cn(e,t=`equal`,n=7){W(e)==`array`&&(e=sn(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*nn(r),t=Math.LOG10E*nn(i);o.push(r);for(let r=1;r<n;r++)o.push(rn(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=an(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=on(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 f={};for(let e=0;e<n;e++)f[e]=[];for(let n=0;n<t;n++)e=s[n],f[e].push(a[n]);let p=[];for(let e=0;e<n;e++)p.push(f[e][0]),p.push(f[e][f[e].length-1]);p=p.sort((e,t)=>e-t),o.push(p[0]);for(let e=1;e<p.length;e+=2){let t=p[e];!isNaN(t)&&o.indexOf(t)===-1&&o.push(t)}}return o}var ln=(e,t)=>{e=new K(e),t=new K(t);let n=e.luminance(),r=t.luminance();return n>r?(n+.05)/(r+.05):(r+.05)/(n+.05)},un=.027,dn=5e-4,fn=.1,pn=1.14,mn=.022,hn=1.414,gn=(e,t)=>{e=new K(e),t=new K(t),e.alpha()<1&&(e=Xe(t,e,e.alpha(),`rgb`));let n=_n(...e.rgb()),r=_n(...t.rgb()),i=n>=mn?n:n+(mn-n)**+hn,a=r>=mn?r:r+(mn-r)**+hn,o=a**.56-i**.57,s=a**.65-i**.62,c=Math.abs(a-i)<dn?0:i<a?o*pn:s*pn;return(Math.abs(c)<fn?0:c>0?c-un:c+un)*100};function _n(e,t,n){return .2126729*(e/255)**2.4+.7151522*(t/255)**2.4+.072175*(n/255)**2.4}var{sqrt:vn,pow:yn,min:bn,max:xn,atan2:Sn,abs:Cn,cos:wn,sin:Tn,exp:En,PI:Dn}=Math;function On(e,t,n=1,r=1,i=1){var a=function(e){return 360*e/(2*Dn)},o=function(e){return 2*Dn*e/360};e=new K(e),t=new K(t);let[s,c,l]=Array.from(e.lab()),[u,d,f]=Array.from(t.lab()),p=(s+u)/2,m=(vn(yn(c,2)+yn(l,2))+vn(yn(d,2)+yn(f,2)))/2,h=.5*(1-vn(yn(m,7)/(yn(m,7)+yn(25,7)))),g=c*(1+h),_=d*(1+h),v=vn(yn(g,2)+yn(l,2)),y=vn(yn(_,2)+yn(f,2)),b=(v+y)/2,x=a(Sn(l,g)),S=a(Sn(f,_)),C=x>=0?x:x+360,w=S>=0?S:S+360,T=Cn(C-w)>180?(C+w+360)/2:(C+w)/2,E=1-.17*wn(o(T-30))+.24*wn(o(2*T))+.32*wn(o(3*T+6))-.2*wn(o(4*T-63)),D=w-C;D=Cn(D)<=180?D:w<=C?D+360:D-360,D=2*vn(v*y)*Tn(o(D)/2);let O=u-s,k=y-v,A=1+.015*yn(p-50,2)/vn(20+yn(p-50,2)),j=1+.045*b,M=1+.015*b*E,N=30*En(-yn((T-275)/25,2)),P=-(2*vn(yn(b,7)/(yn(b,7)+yn(25,7))))*Tn(2*o(N));return xn(0,bn(100,vn(yn(O/(n*A),2)+yn(k/(r*j),2)+yn(D/(i*M),2)+P*(k/(r*j))*(D/(i*M)))))}function kn(e,t,n=`lab`){e=new K(e),t=new K(t);let r=e.get(n),i=t.get(n),a=0;for(let e in r){let t=(r[e]||0)-(i[e]||0);a+=t*t}return Math.sqrt(a)}var An=(...e)=>{try{return new K(...e),!0}catch{return!1}},jn={cool(){return zt([Te.hsl(180,1,.9),Te.hsl(250,.7,.4)])},hot(){return zt([`#000`,`#f00`,`#ff0`,`#fff`],[0,.25,.75,1]).mode(`rgb`)}},Mn={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`]},Nn=Object.keys(Mn),Pn=new Map(Nn.map(e=>[e.toLowerCase(),e])),Fn=typeof Proxy==`function`?new Proxy(Mn,{get(e,t){let n=t.toLowerCase();if(Pn.has(n))return e[Pn.get(n)]},getOwnPropertyNames(){return Object.getOwnPropertyNames(Nn)}}):Mn,In=(...e)=>{e=G(e,`cmyk`);let[t,n,r,i]=e,a=e.length>4?e[4]:1;return i===1?[0,0,0,a]:[t>=1?0:255*(1-t)*(1-i),n>=1?0:255*(1-n)*(1-i),r>=1?0:255*(1-r)*(1-i),a]},{max:Ln}=Math,Rn=(...e)=>{let[t,n,r]=G(e,`rgb`);t/=255,n/=255,r/=255;let i=1-Ln(t,Ln(n,r)),a=i<1?1/(1-i):0;return[(1-t-i)*a,(1-n-i)*a,(1-r-i)*a,i]};K.prototype.cmyk=function(){return Rn(this._rgb)},Object.assign(Te,{cmyk:(...e)=>new K(...e,`cmyk`)}),Ce.format.cmyk=In,Ce.autodetect.push({p:2,test:(...e)=>{if(e=G(e,`cmyk`),W(e)===`array`&&e.length===4)return`cmyk`}});var zn=(...e)=>{let t=G(e,`hsla`),n=fe(e)||`lsa`;return t[0]=ge(t[0]||0)+`deg`,t[1]=ge(t[1]*100)+`%`,t[2]=ge(t[2]*100)+`%`,n===`hsla`||t.length>3&&t[3]<1?(t[3]=`/ `+(t.length>3?t[3]:1),n=`hsla`):t.length=3,`${n.substr(0,3)}(${t.join(` `)})`},Bn=(...e)=>{let t=G(e,`lab`),n=fe(e)||`lab`;return t[0]=ge(t[0])+`%`,t[1]=ge(t[1]),t[2]=ge(t[2]),n===`laba`||t.length>3&&t[3]<1?t[3]=`/ `+(t.length>3?t[3]:1):t.length=3,`lab(${t.join(` `)})`},Vn=(...e)=>{let t=G(e,`lch`),n=fe(e)||`lab`;return t[0]=ge(t[0])+`%`,t[1]=ge(t[1]),t[2]=isNaN(t[2])?`none`:ge(t[2])+`deg`,n===`lcha`||t.length>3&&t[3]<1?t[3]=`/ `+(t.length>3?t[3]:1):t.length=3,`lch(${t.join(` `)})`},Hn=(...e)=>{let t=G(e,`lab`);return t[0]=ge(t[0]*100)+`%`,t[1]=_e(t[1]),t[2]=_e(t[2]),t.length>3&&t[3]<1?t[3]=`/ `+(t.length>3?t[3]:1):t.length=3,`oklab(${t.join(` `)})`},Un=(...e)=>{let[t,n,r,...i]=G(e,`rgb`),[a,o,s]=kt(t,n,r),[c,l,u]=at(a,o,s);return[c,l,u,...i.length>0&&i[0]<1?[i[0]]:[]]},Wn=(...e)=>{let t=G(e,`lch`);return t[0]=ge(t[0]*100)+`%`,t[1]=_e(t[1]),t[2]=isNaN(t[2])?`none`:ge(t[2])+`deg`,t.length>3&&t[3]<1?t[3]=`/ `+(t.length>3?t[3]:1):t.length=3,`oklch(${t.join(` `)})`},{round:Gn}=Math,Kn=(...e)=>{let t=G(e,`rgba`),n=fe(e)||`rgb`;if(n.substr(0,3)===`hsl`)return zn(J(t),n);if(n.substr(0,3)===`lab`){let e=Fe();Pe(`d50`);let r=Bn(Be(t),n);return Pe(e),r}if(n.substr(0,3)===`lch`){let e=Fe();Pe(`d50`);let r=Vn(ot(t),n);return Pe(e),r}return n.substr(0,5)===`oklab`?Hn(kt(t)):n.substr(0,5)===`oklch`?Wn(Un(t)):(t[0]=Gn(t[0]),t[1]=Gn(t[1]),t[2]=Gn(t[2]),(n===`rgba`||t.length>3&&t[3]<1)&&(t[3]=`/ `+(t.length>3?t[3]:1),n=`rgba`),`${n.substr(0,3)}(${t.slice(0,n===`rgb`?3:4).join(` `)})`)},qn=(...e)=>{e=G(e,`lch`);let[t,n,r,...i]=e,[a,o,s]=$e(t,n,r),[c,l,u]=Dt(a,o,s);return[c,l,u,...i.length>0&&i[0]<1?[i[0]]:[]]},Jn=`((?:-?\\d+)|(?:-?\\d+(?:\\.\\d+)?)%|none)`,Yn=`((?:-?(?:\\d+(?:\\.\\d*)?|\\.\\d+)%?)|none)`,Xn=`((?:-?(?:\\d+(?:\\.\\d*)?|\\.\\d+)%)|none)`,Zn=`\\s*`,Qn=`\\s+`,$n=`\\s*,\\s*`,er=`((?:-?(?:\\d+(?:\\.\\d*)?|\\.\\d+)(?:deg)?)|none)`,tr=`\\s*(?:\\/\\s*((?:[01]|[01]?\\.\\d+)|\\d+(?:\\.\\d+)?%))?`,nr=RegExp(`^rgba?\\(`+Zn+[Jn,Jn,Jn].join(Qn)+tr+`\\)$`),rr=RegExp(`^rgb\\(`+Zn+[Jn,Jn,Jn].join($n)+Zn+`\\)$`),ir=RegExp(`^rgba\\(`+Zn+[Jn,Jn,Jn,Yn].join($n)+Zn+`\\)$`),ar=RegExp(`^hsla?\\(`+Zn+[er,Xn,Xn].join(Qn)+tr+`\\)$`),or=RegExp(`^hsl?\\(`+Zn+[er,Xn,Xn].join($n)+Zn+`\\)$`),sr=/^hsla\(\s*(-?\d+(?:\.\d+)?),\s*(-?\d+(?:\.\d+)?)%\s*,\s*(-?\d+(?:\.\d+)?)%\s*,\s*([01]|[01]?\.\d+)\)$/,cr=RegExp(`^lab\\(`+Zn+[Yn,Yn,Yn].join(Qn)+tr+`\\)$`),lr=RegExp(`^lch\\(`+Zn+[Yn,Yn,er].join(Qn)+tr+`\\)$`),ur=RegExp(`^oklab\\(`+Zn+[Yn,Yn,Yn].join(Qn)+tr+`\\)$`),dr=RegExp(`^oklch\\(`+Zn+[Yn,Yn,er].join(Qn)+tr+`\\)$`),{round:fr}=Math,pr=e=>e.map((e,t)=>t<=2?le(fr(e),0,255):e),mr=(e,t=0,n=100,r=!1)=>(typeof e==`string`&&e.endsWith(`%`)&&(e=parseFloat(e.substring(0,e.length-1))/100,e=r?t+(e+1)*.5*(n-t):t+e*(n-t)),+e),hr=(e,t)=>e===`none`?t:e,gr=e=>{if(e=e.toLowerCase().trim(),e===`transparent`)return[0,0,0,0];let t;if(Ce.format.named)try{return Ce.format.named(e)}catch{}if((t=e.match(nr))||(t=e.match(rr))){let e=t.slice(1,4);for(let t=0;t<3;t++)e[t]=+mr(hr(e[t],0),0,255);e=pr(e);let n=t[4]===void 0?1:+mr(t[4],0,1);return e[3]=n,e}if(t=e.match(ir)){let e=t.slice(1,5);for(let t=0;t<4;t++)e[t]=+mr(e[t],0,255);return e}if((t=e.match(ar))||(t=e.match(or))){let e=t.slice(1,4);e[0]=+hr(e[0].replace(`deg`,``),0),e[1]=mr(hr(e[1],0),0,100)*.01,e[2]=mr(hr(e[2],0),0,100)*.01;let n=pr(q(e));return n[3]=t[4]===void 0?1:+mr(t[4],0,1),n}if(t=e.match(sr)){let e=t.slice(1,4);e[1]*=.01,e[2]*=.01;let n=q(e);for(let e=0;e<3;e++)n[e]=fr(n[e]);return n[3]=+t[4],n}if(t=e.match(cr)){let e=t.slice(1,4);e[0]=mr(hr(e[0],0),0,100),e[1]=mr(hr(e[1],0),-125,125,!0),e[2]=mr(hr(e[2],0),-125,125,!0);let n=Fe();Pe(`d50`);let r=pr(Ie(e));return Pe(n),r[3]=t[4]===void 0?1:+mr(t[4],0,1),r}if(t=e.match(lr)){let e=t.slice(1,4);e[0]=mr(e[0],0,100),e[1]=mr(hr(e[1],0),0,150,!1),e[2]=+hr(e[2].replace(`deg`,``),0);let n=Fe();Pe(`d50`);let r=pr(et(e));return Pe(n),r[3]=t[4]===void 0?1:+mr(t[4],0,1),r}if(t=e.match(ur)){let e=t.slice(1,4);e[0]=mr(hr(e[0],0),0,1),e[1]=mr(hr(e[1],0),-.4,.4,!0),e[2]=mr(hr(e[2],0),-.4,.4,!0);let n=pr(Dt(e));return n[3]=t[4]===void 0?1:+mr(t[4],0,1),n}if(t=e.match(dr)){let e=t.slice(1,4);e[0]=mr(hr(e[0],0),0,1),e[1]=mr(hr(e[1],0),0,.4,!1),e[2]=+hr(e[2].replace(`deg`,``),0);let n=pr(qn(e));return n[3]=t[4]===void 0?1:+mr(t[4],0,1),n}};gr.test=e=>nr.test(e)||ar.test(e)||cr.test(e)||lr.test(e)||ur.test(e)||dr.test(e)||rr.test(e)||ir.test(e)||or.test(e)||sr.test(e)||e===`transparent`,K.prototype.css=function(e){return Kn(this._rgb,e)},Te.css=(...e)=>new K(...e,`css`),Ce.format.css=gr,Ce.autodetect.push({p:5,test:(e,...t)=>{if(!t.length&&W(e)===`string`&&gr.test(e))return`css`}}),Ce.format.gl=(...e)=>{let t=G(e,`rgba`);return t[0]*=255,t[1]*=255,t[2]*=255,t},Te.gl=(...e)=>new K(...e,`gl`),K.prototype.gl=function(){let e=this._rgb;return[e[0]/255,e[1]/255,e[2]/255,e[3]]},K.prototype.hex=function(e){return je(this._rgb,e)},Te.hex=(...e)=>new K(...e,`hex`),Ce.format.hex=ke,Ce.autodetect.push({p:4,test:(e,...t)=>{if(!t.length&&W(e)===`string`&&[3,4,5,6,7,8,9].indexOf(e.length)>=0)return`hex`}});var{log:_r}=Math,vr=e=>{let t=e/100,n,r,i;return t<66?(n=255,r=t<6?0:-155.25485562709179-.44596950469579133*(r=t-2)+104.49216199393888*_r(r),i=t<20?0:-254.76935184120902+.8274096064007395*(i=t-10)+115.67994401066147*_r(i)):(n=351.97690566805693+.114206453784165*(n=t-55)-40.25366309332127*_r(n),r=325.4494125711974+.07943456536662342*(r=t-50)-28.0852963507957*_r(r),i=255),[n,r,i,1]},{round:yr}=Math,br=(...e)=>{let t=G(e,`rgb`),n=t[0],r=t[2],i=1e3,a=4e4,o;for(;a-i>.4;){o=(a+i)*.5;let e=vr(o);e[2]/e[0]>=r/n?a=o:i=o}return yr(o)};K.prototype.temp=K.prototype.kelvin=K.prototype.temperature=function(){return br(this._rgb)};var xr=(...e)=>new K(...e,`temp`);Object.assign(Te,{temp:xr,kelvin:xr,temperature:xr}),Ce.format.temp=Ce.format.kelvin=Ce.format.temperature=vr,K.prototype.oklch=function(){return Un(this._rgb)},Object.assign(Te,{oklch:(...e)=>new K(...e,`oklch`)}),Ce.format.oklch=qn,Ce.autodetect.push({p:2,test:(...e)=>{if(e=G(e,`oklch`),W(e)===`array`&&e.length===3)return`oklch`}}),Object.assign(Te,{analyze:sn,average:It,bezier:Ut,blend:Gt,brewer:Fn,Color:K,colors:Ee,contrast:ln,contrastAPCA:gn,cubehelix:Zt,deltaE:On,distance:kn,input:Ce,interpolate:Xe,limits:cn,mix:Xe,random:tn,scale:zt,scales:jn,valid:An});var Sr=Te;function Cr(e,t){if(!Sr.valid(e))return t;try{return Sr(e)}catch{return t}}function wr(e){return Sr.valid(e)&&Sr.contrast(e,`#fff`)>=Sr.contrast(e,`#333`)?`#fff`:`#333`}var Tr=4.5;function Er(e){let t=e;for(;t&&t instanceof Element;){let e=getComputedStyle(t).backgroundColor;if(e&&e!==`rgba(0, 0, 0, 0)`&&e!==`transparent`)return e;t=t.parentElement}return`#fff`}function Dr(e,t=`#fff`){if(!Sr.valid(e))return Sr.valid(t)?wr(t):`#333`;let n=Sr(e),r=Cr(t,Sr(`#fff`));if(Sr.contrast(n,r)>=Tr)return n.hex();let i=r.luminance()>.5;for(let e=0;e<20&&(n=i?n.darken(.3):n.brighten(.3),!(Sr.contrast(n,r)>=Tr));e++);return n.hex()}var Or=12,kr=.25,Ar=20,jr=15;function Mr(e,t){if(e.length===0)return[];let n=Cr(t,Sr(`#fff`)),r=Sr.valid(t)?t:`#fff`,i=n.luminance()>.5,a=e.map(e=>Sr.valid(e)?Nr(Sr(e),r,i):Sr(`#000`));for(let e=1;e<a.length;e++)a[e]=Ir(a[e],a.slice(0,e),r,i);return a.map(e=>e.hex())}function Nr(e,t,n){for(let r=0;r<Ar;r++){if(Sr.contrast(e,t)>=Tr)return e;e=n?e.darken(kr):e.brighten(kr)}return e}function Pr(e,t){return t.reduce((t,n)=>Math.min(t,Sr.deltaE(e,n)),1/0)}function*Fr(e,t){for(let n of[t,!t]){let t=e;for(let e=0;e<Ar;e++)t=n?t.darken(kr):t.brighten(kr),yield t}for(let t=jr;t<=180;t+=jr)yield e.set(`hsl.h`,`+${t}`),yield e.set(`hsl.h`,`-${t}`)}function Ir(e,t,n,r){let i=e,a=Pr(e,t);if(a>=Or)return e;for(let o of Fr(e,r)){if(Sr.contrast(o,n)<Tr)continue;let e=Pr(o,t);if(e>a&&(i=o,a=e),a>=Or)break}return i}var Lr=function(e){return e.BarVertical=`bar-vertical`,e.BarHorizontal=`bar-horizontal`,e.BarMulti=`bar-multi`,e.ColumnStacked=`column-stacked`,e.BarStacked=`bar-stacked`,e.BarSplit=`bar-split`,e.BarGrouped=`bar-grouped`,e.Line=`line`,e.LineMulti=`line-multi`,e.Area=`area`,e.AreaStacked=`area-stacked`,e.Donut=`donut`,e.Pie=`pie`,e.Scatter=`scatter`,e.VerticalBar=`vertical-bar`,e.HorizontalBar=`horizontal-bar`,e}({}),Rr=function(e){return e.Left=`left`,e.Right=`right`,e}({}),zr=function(e){return e.Linear=`linear`,e.Log=`log`,e.Symlog=`symlog`,e}({}),Br=function(e){return e.Solid=`solid`,e.Dashed=`dashed`,e.Dotted=`dotted`,e.None=`none`,e}({}),Vr=function(e){return e.Auto=`auto`,e.Inside=`inside`,e.Outside=`outside`,e.Off=`off`,e}({}),Hr=function(e){return e.Auto=`auto`,e.Horizontal=`horizontal`,e.Vertical=`vertical`,e}({}),Ur=function(e){return e.NW=`NW`,e.N=`N`,e.NE=`NE`,e.E=`E`,e.SE=`SE`,e.S=`S`,e.SW=`SW`,e.W=`W`,e.Center=`center`,e}({}),Wr=function(e){return e.Direct=`direct`,e.CurveLeft=`curve-left`,e.CurveRight=`curve-right`,e.Elbow=`elbow`,e}({}),Gr=function(e){return e.Solid=`solid`,e.Dotted=`dotted`,e.Dashed=`dashed`,e}({}),Kr=function(e){return e.Point=`point`,e.Range=`range`,e.Free=`free`,e}({}),qr=function(e){return e.Start=`start`,e.Center=`center`,e.End=`end`,e}({}),Jr=function(e){return e.Vertical=`vertical`,e.Horizontal=`horizontal`,e}({}),Yr=function(e){return e.Circle=`circle`,e.Square=`square`,e.Diamond=`diamond`,e.Triangle=`triangle`,e.TriangleDown=`triangleDown`,e.Cross=`cross`,e.Star=`star`,e}({}),Xr=function(e){return e.All=`all`,e.First=`first`,e.Last=`last`,e.FirstLast=`firstLast`,e}({}),Zr=function(e){return e.Filled=`filled`,e.Hollow=`hollow`,e}({}),Qr=function(e){return e.Ascending=`ascending`,e.Descending=`descending`,e.None=`none`,e}({}),$r=function(e){return e.Total=`total`,e.WithinGroups=`within-groups`,e.None=`none`,e}({}),ei=function(e){return e.Top=`top`,e.Bottom=`bottom`,e.Left=`left`,e.Right=`right`,e}({}),ti=function(e){return e.Start=`start`,e.Middle=`middle`,e.End=`end`,e}({}),ni=function(e){return e.Inside=`inside`,e.Outside=`outside`,e.Auto=`auto`,e}({}),ri=function(e){return e.Both=`both`,e.Vertical=`vertical`,e.Horizontal=`horizontal`,e}({}),ii=function(e){return e.Solid=`solid`,e.Dashed=`dashed`,e.Dotted=`dotted`,e}({}),ai=function(e){return e.Normal=`normal`,e.Percent=`percent`,e}({}),Z=function(e){return e.Colors=`colors`,e.Boolean=`boolean`,e.Select=`select`,e.Text=`text`,e.NumberFormat=`numberFormat`,e.DateFormat=`dateFormat`,e}({}),oi=function(e){return e.Off=``,e.Auto=`auto`,e.Outside=`outside`,e.Inside=`inside`,e}({}),si=function(e){return e.Linear=`linear`,e.MonotoneX=`monotoneX`,e.Step=`step`,e.StepBefore=`stepBefore`,e.StepAfter=`stepAfter`,e.Basis=`basis`,e.Cardinal=`cardinal`,e.CatmullRom=`catmullRom`,e}({}),ci=function(e){return e.Sort=`sort`,e.Filter=`filter`,e.HideColumns=`hide-columns`,e.Transpose=`transpose`,e.Parse=`parse`,e.Rename=`rename`,e.GroupBy=`group-by`,e.Computed=`computed`,e}({}),li=function(e){return e.Equals=`equals`,e.NotEquals=`not-equals`,e.Contains=`contains`,e.GreaterThan=`greater-than`,e.LessThan=`less-than`,e}({}),ui=function(e){return e.Type=`type`,e.String=`string`,e.Numeric=`numeric`,e.Date=`date`,e}({}),di=s(((e,t)=>{(function(n,r){typeof e==`object`&&t!==void 0?t.exports=r():typeof define==`function`&&define.amd?define(r):(n=typeof globalThis<`u`?globalThis:n||self).dayjs=r()})(e,(function(){"use strict";var e=1e3,t=6e4,n=36e5,r=`millisecond`,i=`second`,a=`minute`,o=`hour`,s=`day`,c=`week`,l=`month`,u=`quarter`,d=`year`,f=`date`,p=`Invalid Date`,m=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,h=/\[([^\]]+)]|YYYY|YY|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,g={name:`en`,weekdays:`Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday`.split(`_`),months:`January_February_March_April_May_June_July_August_September_October_November_December`.split(`_`),ordinal:function(e){var t=[`th`,`st`,`nd`,`rd`],n=e%100;return`[`+e+(t[(n-20)%10]||t[n]||t[0])+`]`}},_=function(e,t,n){var r=String(e);return!r||r.length>=t?e:``+Array(t+1-r.length).join(n)+e},v={s:_,z:function(e){var t=-e.utcOffset(),n=Math.abs(t),r=Math.floor(n/60),i=n%60;return(t<=0?`+`:`-`)+_(r,2,`0`)+`:`+_(i,2,`0`)},m:function e(t,n){if(t.date()<n.date())return-e(n,t);var r=12*(n.year()-t.year())+(n.month()-t.month()),i=t.clone().add(r,l),a=n-i<0,o=t.clone().add(r+(a?-1:1),l);return+(-(r+(n-i)/(a?i-o:o-i))||0)},a:function(e){return e<0?Math.ceil(e)||0:Math.floor(e)},p:function(e){return{M:l,y:d,w:c,d:s,D:f,h:o,m:a,s:i,ms:r,Q:u}[e]||String(e||``).toLowerCase().replace(/s$/,``)},u:function(e){return e===void 0}},y=`en`,b={};b[y]=g;var x=`$isDayjsObject`,S=function(e){return e instanceof E||!(!e||!e[x])},C=function e(t,n,r){var i;if(!t)return y;if(typeof t==`string`){var a=t.toLowerCase();b[a]&&(i=a),n&&(b[a]=n,i=a);var o=t.split(`-`);if(!i&&o.length>1)return e(o[0])}else{var s=t.name;b[s]=t,i=s}return!r&&i&&(y=i),i||!r&&y},w=function(e,t){if(S(e))return e.clone();var n=typeof t==`object`?t:{};return n.date=e,n.args=arguments,new E(n)},T=v;T.l=C,T.i=S,T.w=function(e,t){return w(e,{locale:t.$L,utc:t.$u,x:t.$x,$offset:t.$offset})};var E=function(){function g(e){this.$L=C(e.locale,null,!0),this.parse(e),this.$x=this.$x||e.x||{},this[x]=!0}var _=g.prototype;return _.parse=function(e){this.$d=function(e){var t=e.date,n=e.utc;if(t===null)return new Date(NaN);if(T.u(t))return new Date;if(t instanceof Date)return new Date(t);if(typeof t==`string`&&!/Z$/i.test(t)){var r=t.match(m);if(r){var i=r[2]-1||0,a=(r[7]||`0`).substring(0,3);return n?new Date(Date.UTC(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,a)):new Date(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,a)}}return new Date(t)}(e),this.init()},_.init=function(){var e=this.$d;this.$y=e.getFullYear(),this.$M=e.getMonth(),this.$D=e.getDate(),this.$W=e.getDay(),this.$H=e.getHours(),this.$m=e.getMinutes(),this.$s=e.getSeconds(),this.$ms=e.getMilliseconds()},_.$utils=function(){return T},_.isValid=function(){return this.$d.toString()!==p},_.isSame=function(e,t){var n=w(e);return this.startOf(t)<=n&&n<=this.endOf(t)},_.isAfter=function(e,t){return w(e)<this.startOf(t)},_.isBefore=function(e,t){return this.endOf(t)<w(e)},_.$g=function(e,t,n){return T.u(e)?this[t]:this.set(n,e)},_.unix=function(){return Math.floor(this.valueOf()/1e3)},_.valueOf=function(){return this.$d.getTime()},_.startOf=function(e,t){var n=this,r=!!T.u(t)||t,u=T.p(e),p=function(e,t){var i=T.w(n.$u?Date.UTC(n.$y,t,e):new Date(n.$y,t,e),n);return r?i:i.endOf(s)},m=function(e,t){return T.w(n.toDate()[e].apply(n.toDate(`s`),(r?[0,0,0,0]:[23,59,59,999]).slice(t)),n)},h=this.$W,g=this.$M,_=this.$D,v=`set`+(this.$u?`UTC`:``);switch(u){case d:return r?p(1,0):p(31,11);case l:return r?p(1,g):p(0,g+1);case c:var y=this.$locale().weekStart||0,b=(h<y?h+7:h)-y;return p(r?_-b:_+(6-b),g);case s:case f:return m(v+`Hours`,0);case o:return m(v+`Minutes`,1);case a:return m(v+`Seconds`,2);case i:return m(v+`Milliseconds`,3);default:return this.clone()}},_.endOf=function(e){return this.startOf(e,!1)},_.$set=function(e,t){var n,c=T.p(e),u=`set`+(this.$u?`UTC`:``),p=(n={},n[s]=u+`Date`,n[f]=u+`Date`,n[l]=u+`Month`,n[d]=u+`FullYear`,n[o]=u+`Hours`,n[a]=u+`Minutes`,n[i]=u+`Seconds`,n[r]=u+`Milliseconds`,n)[c],m=c===s?this.$D+(t-this.$W):t;if(c===l||c===d){var h=this.clone().set(f,1);h.$d[p](m),h.init(),this.$d=h.set(f,Math.min(this.$D,h.daysInMonth())).$d}else p&&this.$d[p](m);return this.init(),this},_.set=function(e,t){return this.clone().$set(e,t)},_.get=function(e){return this[T.p(e)]()},_.add=function(r,u){var f,p=this;r=Number(r);var m=T.p(u),h=function(e){var t=w(p);return T.w(t.date(t.date()+Math.round(e*r)),p)};if(m===l)return this.set(l,this.$M+r);if(m===d)return this.set(d,this.$y+r);if(m===s)return h(1);if(m===c)return h(7);var g=(f={},f[a]=t,f[o]=n,f[i]=e,f)[m]||1,_=this.$d.getTime()+r*g;return T.w(_,this)},_.subtract=function(e,t){return this.add(-1*e,t)},_.format=function(e){var t=this,n=this.$locale();if(!this.isValid())return n.invalidDate||p;var r=e||`YYYY-MM-DDTHH:mm:ssZ`,i=T.z(this),a=this.$H,o=this.$m,s=this.$M,c=n.weekdays,l=n.months,u=n.meridiem,d=function(e,n,i,a){return e&&(e[n]||e(t,r))||i[n].slice(0,a)},f=function(e){return T.s(a%12||12,e,`0`)},m=u||function(e,t,n){var r=e<12?`AM`:`PM`;return n?r.toLowerCase():r};return r.replace(h,(function(e,r){return r||function(e){switch(e){case`YY`:return String(t.$y).slice(-2);case`YYYY`:return T.s(t.$y,4,`0`);case`M`:return s+1;case`MM`:return T.s(s+1,2,`0`);case`MMM`:return d(n.monthsShort,s,l,3);case`MMMM`:return d(l,s);case`D`:return t.$D;case`DD`:return T.s(t.$D,2,`0`);case`d`:return String(t.$W);case`dd`:return d(n.weekdaysMin,t.$W,c,2);case`ddd`:return d(n.weekdaysShort,t.$W,c,3);case`dddd`:return c[t.$W];case`H`:return String(a);case`HH`:return T.s(a,2,`0`);case`h`:return f(1);case`hh`:return f(2);case`a`:return m(a,o,!0);case`A`:return m(a,o,!1);case`m`:return String(o);case`mm`:return T.s(o,2,`0`);case`s`:return String(t.$s);case`ss`:return T.s(t.$s,2,`0`);case`SSS`:return T.s(t.$ms,3,`0`);case`Z`:return i}return null}(e)||i.replace(`:`,``)}))},_.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},_.diff=function(r,f,p){var m,h=this,g=T.p(f),_=w(r),v=(_.utcOffset()-this.utcOffset())*t,y=this-_,b=function(){return T.m(h,_)};switch(g){case d:m=b()/12;break;case l:m=b();break;case u:m=b()/3;break;case c:m=(y-v)/6048e5;break;case s:m=(y-v)/864e5;break;case o:m=y/n;break;case a:m=y/t;break;case i:m=y/e;break;default:m=y}return p?m:T.a(m)},_.daysInMonth=function(){return this.endOf(l).$D},_.$locale=function(){return b[this.$L]},_.locale=function(e,t){if(!e)return this.$L;var n=this.clone(),r=C(e,t,!0);return r&&(n.$L=r),n},_.clone=function(){return T.w(this.$d,this)},_.toDate=function(){return new Date(this.valueOf())},_.toJSON=function(){return this.isValid()?this.toISOString():null},_.toISOString=function(){return this.$d.toISOString()},_.toString=function(){return this.$d.toUTCString()},g}(),D=E.prototype;return w.prototype=D,[[`$ms`,r],[`$s`,i],[`$m`,a],[`$H`,o],[`$W`,s],[`$M`,l],[`$y`,d],[`$D`,f]].forEach((function(e){D[e[1]]=function(t){return this.$g(t,e[0],e[1])}})),w.extend=function(e,t){return e.$i||=(e(t,E,w),!0),w},w.locale=C,w.isDayjs=S,w.unix=function(e){return w(1e3*e)},w.en=b[y],w.Ls=b,w.p={},w}))})),fi=s(((e,t)=>{(function(n,r){typeof e==`object`&&t!==void 0?t.exports=r():typeof define==`function`&&define.amd?define(r):(n=typeof globalThis<`u`?globalThis:n||self).dayjs_plugin_customParseFormat=r()})(e,(function(){"use strict";var e={LTS:`h:mm:ss A`,LT:`h:mm A`,L:`MM/DD/YYYY`,LL:`MMMM D, YYYY`,LLL:`MMMM D, YYYY h:mm A`,LLLL:`dddd, MMMM D, YYYY h:mm A`},t=/(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|Q|YYYY|YY?|ww?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,n=/\d/,r=/\d\d/,i=/\d\d?/,a=/\d*[^-_:/,()\s\d]+/,o={},s=function(e){return(e=+e)+(e>68?1900:2e3)},c=function(e){return function(t){this[e]=+t}},l=[/[+-]\d\d:?(\d\d)?|Z/,function(e){(this.zone||={}).offset=function(e){if(!e||e===`Z`)return 0;var t=e.match(/([+-]|\d\d)/g),n=60*t[1]+(+t[2]||0);return n===0?0:t[0]===`+`?-n:n}(e)}],u=function(e){var t=o[e];return t&&(t.indexOf?t:t.s.concat(t.f))},d=function(e,t){var n,r=o.meridiem;if(r){for(var i=1;i<=24;i+=1)if(e.indexOf(r(i,0,t))>-1){n=i>12;break}}else n=e===(t?`pm`:`PM`);return n},f={A:[a,function(e){this.afternoon=d(e,!1)}],a:[a,function(e){this.afternoon=d(e,!0)}],Q:[n,function(e){this.month=3*(e-1)+1}],S:[n,function(e){this.milliseconds=100*e}],SS:[r,function(e){this.milliseconds=10*e}],SSS:[/\d{3}/,function(e){this.milliseconds=+e}],s:[i,c(`seconds`)],ss:[i,c(`seconds`)],m:[i,c(`minutes`)],mm:[i,c(`minutes`)],H:[i,c(`hours`)],h:[i,c(`hours`)],HH:[i,c(`hours`)],hh:[i,c(`hours`)],D:[i,c(`day`)],DD:[r,c(`day`)],Do:[a,function(e){var t=o.ordinal,n=e.match(/\d+/);if(this.day=n[0],t)for(var r=1;r<=31;r+=1)t(r).replace(/\[|\]/g,``)===e&&(this.day=r)}],w:[i,c(`week`)],ww:[r,c(`week`)],M:[i,c(`month`)],MM:[r,c(`month`)],MMM:[a,function(e){var t=u(`months`),n=(u(`monthsShort`)||t.map((function(e){return e.slice(0,3)}))).indexOf(e)+1;if(n<1)throw Error();this.month=n%12||n}],MMMM:[a,function(e){var t=u(`months`).indexOf(e)+1;if(t<1)throw Error();this.month=t%12||t}],Y:[/[+-]?\d+/,c(`year`)],YY:[r,function(e){this.year=s(e)}],YYYY:[/\d{4}/,c(`year`)],Z:l,ZZ:l};function p(n){for(var r=n,i=o&&o.formats,a=(n=r.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,(function(t,n,r){var a=r&&r.toUpperCase();return n||i[r]||e[r]||i[a].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,(function(e,t,n){return t||n.slice(1)}))}))).match(t),s=a.length,c=0;c<s;c+=1){var l=a[c],u=f[l],d=u&&u[0],p=u&&u[1];a[c]=p?{regex:d,parser:p}:l.replace(/^\[|\]$/g,``)}return function(e){for(var t={},n=0,r=0;n<s;n+=1){var i=a[n];if(typeof i==`string`)r+=i.length;else{var o=i.regex,c=i.parser,l=e.slice(r),u=o.exec(l)[0];c.call(t,u),e=e.replace(u,``)}}return function(e){var t=e.afternoon;if(t!==void 0){var n=e.hours;t?n<12&&(e.hours+=12):n===12&&(e.hours=0),delete e.afternoon}}(t),t}}return function(e,t,n){n.p.customParseFormat=!0,e&&e.parseTwoDigitYear&&(s=e.parseTwoDigitYear);var r=t.prototype,i=r.parse;r.parse=function(e){var t=e.date,r=e.utc,a=e.args;this.$u=r;var s=a[1];if(typeof s==`string`){var c=!0===a[2],l=!0===a[3],u=c||l,d=a[2];l&&(d=a[2]),o=this.$locale(),!c&&d&&(o=n.Ls[d]),this.$d=function(e,t,n,r){try{if([`x`,`X`].indexOf(t)>-1)return new Date((t===`X`?1e3:1)*e);var i=p(t)(e),a=i.year,o=i.month,s=i.day,c=i.hours,l=i.minutes,u=i.seconds,d=i.milliseconds,f=i.zone,m=i.week,h=new Date,g=s||(a||o?1:h.getDate()),_=a||h.getFullYear(),v=0;a&&!o||(v=o>0?o-1:h.getMonth());var y,b=c||0,x=l||0,S=u||0,C=d||0;return f?new Date(Date.UTC(_,v,g,b,x,S,C+60*f.offset*1e3)):n?new Date(Date.UTC(_,v,g,b,x,S,C)):(y=new Date(_,v,g,b,x,S,C),m&&(y=r(y).week(m).toDate()),y)}catch{return new Date(``)}}(t,s,r,n),this.init(),d&&!0!==d&&(this.$L=this.locale(d).$L),u&&t!=this.format(s)&&(this.$d=new Date(``)),o={}}else if(s instanceof Array)for(var f=s.length,m=1;m<=f;m+=1){a[1]=s[m-1];var h=n.apply(this,a);if(h.isValid()){this.$d=h.$d,this.$L=h.$L,this.init();break}m===f&&(this.$d=new Date(``))}else i.call(this,e)}}}))})),pi=l(di(),1),mi=l(fi(),1);pi.default.extend(mi.default);var hi=[`YYYY-MM-DDTHH:mm:ss`,`YYYY-MM-DD HH:mm`,`YYYY-MM-DD`,`YYYY/MM/DD`,`MM/DD/YYYY`,`M/D/YYYY`,`M/D/YY`,`DD/MM/YYYY`,`DD.MM.YYYY`,`MMM D, YYYY`,`MMMM D, YYYY`,`MMM YYYY`,`MMMM YYYY`,`YYYY-MM`,`YYYY/MM`,`YYYY`];function gi(e){return e.includes(`HH`)||e.includes(`mm`)||e.includes(`ss`)?`datetime`:e.includes(`DD`)||/(?<![MA-Z])D(?!D)/.test(e)?`day`:e===`YYYY`?`year`:e.includes(`MM`)||e.includes(`MMM`)||e.includes(`MMMM`)||e.includes(`M/`)?`month`:`day`}function _i(e){return new Date(Date.UTC(e.year(),e.month(),e.date(),e.hour(),e.minute(),e.second(),e.millisecond()))}function vi(e){let t=e.trim();if(!t)return null;if(/^\d{4}$/.test(t)){let e=(0,pi.default)(t,`YYYY`,!0);return e.isValid()?_i(e):null}for(let e of hi){if(e===`YYYY`)continue;let n=(0,pi.default)(t,e,!0);if(n.isValid())return _i(n)}return null}function yi(e){let t=e.trim();if(!t)return;let n=vi(t);if(n)return n.getTime();let r=parseFloat(t);if(!isNaN(r))return r}function bi(e){let t=e.trim();if(!t)return;let n=Number(t);return isNaN(n)?vi(t)?.getTime():n}function xi(e){if(e.length===0)return null;let t=[],n=null,r=e[0].trim();if(!r)return null;if(/^\d{4}$/.test(r)){for(let n of e){let e=n.trim();if(!/^\d{4}$/.test(e))return null;let r=(0,pi.default)(e,`YYYY`,!0);if(!r.isValid())return null;t.push(_i(r))}return{dates:t,granularity:`year`}}let i=[];for(let e of hi)e!==`YYYY`&&(0,pi.default)(r,e,!0).isValid()&&i.push(e);if(i.length===0)return null;for(let r of i){let i=[],a=!0;for(let t of e){let e=(0,pi.default)(t.trim(),r,!0);if(!e.isValid()){a=!1;break}i.push(_i(e))}if(a){n=r,t.push(...i);break}}return n?{dates:t,granularity:gi(n)}:null}function Si(e){return typeof e==`string`?bi(e):e}function Ci(e,t){if(typeof e!=`string`)return e;let n=vi(e);return n?n.getTime():t?void 0:yi(e)}function wi(e,t){if(!t||t.min===void 0&&t.max===void 0)return e.map((e,t)=>t);let n=xi(e)!==null,r=Ci(t.min,n),i=Ci(t.max,n);if(r===void 0&&i===void 0)return e.map((e,t)=>t);let a=[];for(let t=0;t<e.length;t++){let n=yi(e[t]);if(n===void 0){a.push(t);continue}r!==void 0&&n<r||i!==void 0&&n>i||a.push(t)}return a}function Ti(e){let t=Number.isFinite(e)?Math.max(0,Math.min(100,e)):60;return t/(t+100)}function Ei(e,t,n,r=!0){let i=r?0:1/0,a=r?0:-1/0,o=1/0,s=!0,c=!1;for(let t of e)Number.isFinite(t)&&(c=!0,t<i&&(i=t),t>a&&(a=t),t<=0?s=!1:t<o&&(o=t));n===zr.Log&&c&&s&&(i=o),!c&&!r&&(i=0,a=0);let l=Si(t?.min)??i,u=Si(t?.max)??a;if(l>u&&([l,u]=[u,l]),l===u){if(l===0)u=1;else{let e=Math.abs(l)*.1;l-=e,u+=e}}return[l,u]}function Di(e,t){if(typeof e.constant!=`function`&&typeof e.base!=`function`)return null;let n=e.domain().map(Number).filter(Number.isFinite),r=Math.min(...n),i=Math.max(...n);if(!(i>0))return null;let a=r>0?Math.ceil(Math.log10(r)):0,o=Math.floor(Math.log10(i)),s=[];for(let e=a;e<=o;e++)s.push(10**e);if(s.length===0)return null;let c=Math.ceil(s.length/Math.max(2,t));return c>1?s.filter((e,t)=>t%c===0):s}function Oi(e,t){return e==null||t==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function ki(e,t){return e==null||t==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function Ai(e){let t,n,r;e.length===2?(t=e===Oi||e===ki?e:ji,n=e,r=e):(t=Oi,n=(t,n)=>Oi(e(t),n),r=(t,n)=>e(t)-n);function i(e,r,i=0,a=e.length){if(i<a){if(t(r,r)!==0)return a;do{let t=i+a>>>1;n(e[t],r)<0?i=t+1:a=t}while(i<a)}return i}function a(e,r,i=0,a=e.length){if(i<a){if(t(r,r)!==0)return a;do{let t=i+a>>>1;n(e[t],r)<=0?i=t+1:a=t}while(i<a)}return i}function o(e,t,n=0,a=e.length){let o=i(e,t,n,a-1);return o>n&&r(e[o-1],t)>-r(e[o],t)?o-1:o}return{left:i,center:o,right:a}}function ji(){return 0}function Mi(e){return e===null?NaN:+e}var Ni=Ai(Oi),Pi=Ni.right;Ni.left;var Fi=Ai(Mi).center,Ii=class extends Map{constructor(e,t=Bi){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:t}}),e!=null)for(let[t,n]of e)this.set(t,n)}get(e){return super.get(Li(this,e))}has(e){return super.has(Li(this,e))}set(e,t){return super.set(Ri(this,e),t)}delete(e){return super.delete(zi(this,e))}};function Li({_intern:e,_key:t},n){let r=t(n);return e.has(r)?e.get(r):n}function Ri({_intern:e,_key:t},n){let r=t(n);return e.has(r)?e.get(r):(e.set(r,n),n)}function zi({_intern:e,_key:t},n){let r=t(n);return e.has(r)&&(n=e.get(r),e.delete(r)),n}function Bi(e){return typeof e==`object`&&e?e.valueOf():e}function Vi(e){return e}function Hi(e,t,...n){return Ui(e,Vi,t,n)}function Ui(e,t,n,r){return(function e(i,a){if(a>=r.length)return n(i);let o=new Ii,s=r[a++],c=-1;for(let e of i){let t=s(e,++c,i),n=o.get(t);n?n.push(e):o.set(t,[e])}for(let[t,n]of o)o.set(t,e(n,a));return t(o)})(e,0)}function Wi(e,t){return Array.from(t,t=>e[t])}function Gi(e,...t){if(typeof e[Symbol.iterator]!=`function`)throw TypeError(`values is not iterable`);e=Array.from(e);let[n]=t;if(n&&n.length!==2||t.length>1){let r=Uint32Array.from(e,(e,t)=>t);return t.length>1?(t=t.map(t=>e.map(t)),r.sort((e,n)=>{for(let r of t){let t=qi(r[e],r[n]);if(t)return t}})):(n=e.map(n),r.sort((e,t)=>qi(n[e],n[t]))),Wi(e,r)}return e.sort(Ki(n))}function Ki(e=Oi){if(e===Oi)return qi;if(typeof e!=`function`)throw TypeError(`compare is not a function`);return(t,n)=>{let r=e(t,n);return r||r===0?r:(e(n,n)===0)-(e(t,t)===0)}}function qi(e,t){return(e==null||!(e>=e))-(t==null||!(t>=t))||(e<t?-1:+(e>t))}var Ji=Math.sqrt(50),Yi=Math.sqrt(10),Xi=Math.sqrt(2);function Zi(e,t,n){let r=(t-e)/Math.max(0,n),i=Math.floor(Math.log10(r)),a=r/10**i,o=a>=Ji?10:a>=Yi?5:a>=Xi?2:1,s,c,l;return i<0?(l=10**-i/o,s=Math.round(e*l),c=Math.round(t*l),s/l<e&&++s,c/l>t&&--c,l=-l):(l=10**i*o,s=Math.round(e/l),c=Math.round(t/l),s*l<e&&++s,c*l>t&&--c),c<s&&.5<=n&&n<2?Zi(e,t,n*2):[s,c,l]}function Qi(e,t,n){if(t=+t,e=+e,n=+n,!(n>0))return[];if(e===t)return[e];let r=t<e,[i,a,o]=r?Zi(t,e,n):Zi(e,t,n);if(!(a>=i))return[];let s=a-i+1,c=Array(s);if(r){if(o<0)for(let e=0;e<s;++e)c[e]=(a-e)/-o;else for(let e=0;e<s;++e)c[e]=(a-e)*o}else if(o<0)for(let e=0;e<s;++e)c[e]=(i+e)/-o;else for(let e=0;e<s;++e)c[e]=(i+e)*o;return c}function $i(e,t,n){return t=+t,e=+e,n=+n,Zi(e,t,n)[2]}function ea(e,t,n){t=+t,e=+e,n=+n;let r=t<e,i=r?$i(t,e,n):$i(e,t,n);return(r?-1:1)*(i<0?1/-i:i)}function ta(e,t){let n;if(t===void 0)for(let t of e)t!=null&&(n<t||n===void 0&&t>=t)&&(n=t);else{let r=-1;for(let i of e)(i=t(i,++r,e))!=null&&(n<i||n===void 0&&i>=i)&&(n=i)}return n}function na(e,t){let n;if(t===void 0)for(let t of e)t!=null&&(n>t||n===void 0&&t>=t)&&(n=t);else{let r=-1;for(let i of e)(i=t(i,++r,e))!=null&&(n>i||n===void 0&&i>=i)&&(n=i)}return n}function ra(e,t,n){e=+e,t=+t,n=(i=arguments.length)<2?(t=e,e=0,1):i<3?1:+n;for(var r=-1,i=Math.max(0,Math.ceil((t-e)/n))|0,a=Array(i);++r<i;)a[r]=e+r*n;return a}function ia(e,t){let n=0;if(t===void 0)for(let t of e)(t=+t)&&(n+=t);else{let r=-1;for(let i of e)(i=+t(i,++r,e))&&(n+=i)}return n}function aa(e){return e}var oa=1,sa=2,ca=3,la=4,ua=1e-6;function da(e){return`translate(`+e+`,0)`}function fa(e){return`translate(0,`+e+`)`}function pa(e){return t=>+e(t)}function ma(e,t){return t=Math.max(0,e.bandwidth()-t*2)/2,e.round()&&(t=Math.round(t)),n=>+e(n)+t}function ha(){return!this.__axis}function ga(e,t){var n=[],r=null,i=null,a=6,o=6,s=3,c=typeof window<`u`&&window.devicePixelRatio>1?0:.5,l=e===oa||e===la?-1:1,u=e===la||e===sa?`x`:`y`,d=e===oa||e===ca?da:fa;function f(f){var p=r??(t.ticks?t.ticks.apply(t,n):t.domain()),m=i??(t.tickFormat?t.tickFormat.apply(t,n):aa),h=Math.max(a,0)+s,g=t.range(),_=+g[0]+c,v=+g[g.length-1]+c,y=(t.bandwidth?ma:pa)(t.copy(),c),b=f.selection?f.selection():f,x=b.selectAll(`.domain`).data([null]),S=b.selectAll(`.tick`).data(p,t).order(),C=S.exit(),w=S.enter().append(`g`).attr(`class`,`tick`),T=S.select(`line`),E=S.select(`text`);x=x.merge(x.enter().insert(`path`,`.tick`).attr(`class`,`domain`).attr(`stroke`,`currentColor`)),S=S.merge(w),T=T.merge(w.append(`line`).attr(`stroke`,`currentColor`).attr(u+`2`,l*a)),E=E.merge(w.append(`text`).attr(`fill`,`currentColor`).attr(u,l*h).attr(`dy`,e===oa?`0em`:e===ca?`0.71em`:`0.32em`)),f!==b&&(x=x.transition(f),S=S.transition(f),T=T.transition(f),E=E.transition(f),C=C.transition(f).attr(`opacity`,ua).attr(`transform`,function(e){return isFinite(e=y(e))?d(e+c):this.getAttribute(`transform`)}),w.attr(`opacity`,ua).attr(`transform`,function(e){var t=this.parentNode.__axis;return d((t&&isFinite(t=t(e))?t:y(e))+c)})),C.remove(),x.attr(`d`,e===la||e===sa?o?`M`+l*o+`,`+_+`H`+c+`V`+v+`H`+l*o:`M`+c+`,`+_+`V`+v:o?`M`+_+`,`+l*o+`V`+c+`H`+v+`V`+l*o:`M`+_+`,`+c+`H`+v),S.attr(`opacity`,1).attr(`transform`,function(e){return d(y(e)+c)}),T.attr(u+`2`,l*a),E.attr(u,l*h).text(m),b.filter(ha).attr(`fill`,`none`).attr(`font-size`,10).attr(`font-family`,`sans-serif`).attr(`text-anchor`,e===sa?`start`:e===la?`end`:`middle`),b.each(function(){this.__axis=y})}return f.scale=function(e){return arguments.length?(t=e,f):t},f.ticks=function(){return n=Array.from(arguments),f},f.tickArguments=function(e){return arguments.length?(n=e==null?[]:Array.from(e),f):n.slice()},f.tickValues=function(e){return arguments.length?(r=e==null?null:Array.from(e),f):r&&r.slice()},f.tickFormat=function(e){return arguments.length?(i=e,f):i},f.tickSize=function(e){return arguments.length?(a=o=+e,f):a},f.tickSizeInner=function(e){return arguments.length?(a=+e,f):a},f.tickSizeOuter=function(e){return arguments.length?(o=+e,f):o},f.tickPadding=function(e){return arguments.length?(s=+e,f):s},f.offset=function(e){return arguments.length?(c=+e,f):c},f}function _a(e){return ga(oa,e)}function va(e){return ga(sa,e)}function ya(e){return ga(ca,e)}function ba(e){return ga(la,e)}var xa={value:()=>{}};function Sa(){for(var e=0,t=arguments.length,n={},r;e<t;++e){if(!(r=arguments[e]+``)||r in n||/[\s.]/.test(r))throw Error(`illegal type: `+r);n[r]=[]}return new Ca(n)}function Ca(e){this._=e}function wa(e,t){return e.trim().split(/^|\s+/).map(function(e){var n=``,r=e.indexOf(`.`);if(r>=0&&(n=e.slice(r+1),e=e.slice(0,r)),e&&!t.hasOwnProperty(e))throw Error(`unknown type: `+e);return{type:e,name:n}})}Ca.prototype=Sa.prototype={constructor:Ca,on:function(e,t){var n=this._,r=wa(e+``,n),i,a=-1,o=r.length;if(arguments.length<2){for(;++a<o;)if((i=(e=r[a]).type)&&(i=Ta(n[i],e.name)))return i;return}if(t!=null&&typeof t!=`function`)throw Error(`invalid callback: `+t);for(;++a<o;)if(i=(e=r[a]).type)n[i]=Ea(n[i],e.name,t);else if(t==null)for(i in n)n[i]=Ea(n[i],e.name,null);return this},copy:function(){var e={},t=this._;for(var n in t)e[n]=t[n].slice();return new Ca(e)},call:function(e,t){if((i=arguments.length-2)>0)for(var n=Array(i),r=0,i,a;r<i;++r)n[r]=arguments[r+2];if(!this._.hasOwnProperty(e))throw Error(`unknown type: `+e);for(a=this._[e],r=0,i=a.length;r<i;++r)a[r].value.apply(t,n)},apply:function(e,t,n){if(!this._.hasOwnProperty(e))throw Error(`unknown type: `+e);for(var r=this._[e],i=0,a=r.length;i<a;++i)r[i].value.apply(t,n)}};function Ta(e,t){for(var n=0,r=e.length,i;n<r;++n)if((i=e[n]).name===t)return i.value}function Ea(e,t,n){for(var r=0,i=e.length;r<i;++r)if(e[r].name===t){e[r]=xa,e=e.slice(0,r).concat(e.slice(r+1));break}return n!=null&&e.push({name:t,value:n}),e}var Da={svg:`http://www.w3.org/2000/svg`,xhtml:`http://www.w3.org/1999/xhtml`,xlink:`http://www.w3.org/1999/xlink`,xml:`http://www.w3.org/XML/1998/namespace`,xmlns:`http://www.w3.org/2000/xmlns/`};function Oa(e){var t=e+=``,n=t.indexOf(`:`);return n>=0&&(t=e.slice(0,n))!==`xmlns`&&(e=e.slice(n+1)),Da.hasOwnProperty(t)?{space:Da[t],local:e}:e}function ka(e){return function(){var t=this.ownerDocument,n=this.namespaceURI;return n===`http://www.w3.org/1999/xhtml`&&t.documentElement.namespaceURI===`http://www.w3.org/1999/xhtml`?t.createElement(e):t.createElementNS(n,e)}}function Aa(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function ja(e){var t=Oa(e);return(t.local?Aa:ka)(t)}function Ma(){}function Na(e){return e==null?Ma:function(){return this.querySelector(e)}}function Pa(e){typeof e!=`function`&&(e=Na(e));for(var t=this._groups,n=t.length,r=Array(n),i=0;i<n;++i)for(var a=t[i],o=a.length,s=r[i]=Array(o),c,l,u=0;u<o;++u)(c=a[u])&&(l=e.call(c,c.__data__,u,a))&&(`__data__`in c&&(l.__data__=c.__data__),s[u]=l);return new Cs(r,this._parents)}function Fa(e){return e==null?[]:Array.isArray(e)?e:Array.from(e)}function Ia(){return[]}function La(e){return e==null?Ia:function(){return this.querySelectorAll(e)}}function Ra(e){return function(){return Fa(e.apply(this,arguments))}}function za(e){e=typeof e==`function`?Ra(e):La(e);for(var t=this._groups,n=t.length,r=[],i=[],a=0;a<n;++a)for(var o=t[a],s=o.length,c,l=0;l<s;++l)(c=o[l])&&(r.push(e.call(c,c.__data__,l,o)),i.push(c));return new Cs(r,i)}function Ba(e){return function(){return this.matches(e)}}function Va(e){return function(t){return t.matches(e)}}var Ha=Array.prototype.find;function Ua(e){return function(){return Ha.call(this.children,e)}}function Wa(){return this.firstElementChild}function Ga(e){return this.select(e==null?Wa:Ua(typeof e==`function`?e:Va(e)))}var Ka=Array.prototype.filter;function qa(){return Array.from(this.children)}function Ja(e){return function(){return Ka.call(this.children,e)}}function Ya(e){return this.selectAll(e==null?qa:Ja(typeof e==`function`?e:Va(e)))}function Xa(e){typeof e!=`function`&&(e=Ba(e));for(var t=this._groups,n=t.length,r=Array(n),i=0;i<n;++i)for(var a=t[i],o=a.length,s=r[i]=[],c,l=0;l<o;++l)(c=a[l])&&e.call(c,c.__data__,l,a)&&s.push(c);return new Cs(r,this._parents)}function Za(e){return Array(e.length)}function Qa(){return new Cs(this._enter||this._groups.map(Za),this._parents)}function $a(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}$a.prototype={constructor:$a,appendChild:function(e){return this._parent.insertBefore(e,this._next)},insertBefore:function(e,t){return this._parent.insertBefore(e,t)},querySelector:function(e){return this._parent.querySelector(e)},querySelectorAll:function(e){return this._parent.querySelectorAll(e)}};function eo(e){return function(){return e}}function to(e,t,n,r,i,a){for(var o=0,s,c=t.length,l=a.length;o<l;++o)(s=t[o])?(s.__data__=a[o],r[o]=s):n[o]=new $a(e,a[o]);for(;o<c;++o)(s=t[o])&&(i[o]=s)}function no(e,t,n,r,i,a,o){var s,c,l=new Map,u=t.length,d=a.length,f=Array(u),p;for(s=0;s<u;++s)(c=t[s])&&(f[s]=p=o.call(c,c.__data__,s,t)+``,l.has(p)?i[s]=c:l.set(p,c));for(s=0;s<d;++s)p=o.call(e,a[s],s,a)+``,(c=l.get(p))?(r[s]=c,c.__data__=a[s],l.delete(p)):n[s]=new $a(e,a[s]);for(s=0;s<u;++s)(c=t[s])&&l.get(f[s])===c&&(i[s]=c)}function ro(e){return e.__data__}function io(e,t){if(!arguments.length)return Array.from(this,ro);var n=t?no:to,r=this._parents,i=this._groups;typeof e!=`function`&&(e=eo(e));for(var a=i.length,o=Array(a),s=Array(a),c=Array(a),l=0;l<a;++l){var u=r[l],d=i[l],f=d.length,p=ao(e.call(u,u&&u.__data__,l,r)),m=p.length,h=s[l]=Array(m),g=o[l]=Array(m);n(u,d,h,g,c[l]=Array(f),p,t);for(var _=0,v=0,y,b;_<m;++_)if(y=h[_]){for(_>=v&&(v=_+1);!(b=g[v])&&++v<m;);y._next=b||null}}return o=new Cs(o,r),o._enter=s,o._exit=c,o}function ao(e){return typeof e==`object`&&`length`in e?e:Array.from(e)}function oo(){return new Cs(this._exit||this._groups.map(Za),this._parents)}function so(e,t,n){var r=this.enter(),i=this,a=this.exit();return typeof e==`function`?(r=e(r),r&&=r.selection()):r=r.append(e+``),t!=null&&(i=t(i),i&&=i.selection()),n==null?a.remove():n(a),r&&i?r.merge(i).order():i}function co(e){for(var t=e.selection?e.selection():e,n=this._groups,r=t._groups,i=n.length,a=r.length,o=Math.min(i,a),s=Array(i),c=0;c<o;++c)for(var l=n[c],u=r[c],d=l.length,f=s[c]=Array(d),p,m=0;m<d;++m)(p=l[m]||u[m])&&(f[m]=p);for(;c<i;++c)s[c]=n[c];return new Cs(s,this._parents)}function lo(){for(var e=this._groups,t=-1,n=e.length;++t<n;)for(var r=e[t],i=r.length-1,a=r[i],o;--i>=0;)(o=r[i])&&(a&&o.compareDocumentPosition(a)^4&&a.parentNode.insertBefore(o,a),a=o);return this}function uo(e){e||=fo;function t(t,n){return t&&n?e(t.__data__,n.__data__):!t-!n}for(var n=this._groups,r=n.length,i=Array(r),a=0;a<r;++a){for(var o=n[a],s=o.length,c=i[a]=Array(s),l,u=0;u<s;++u)(l=o[u])&&(c[u]=l);c.sort(t)}return new Cs(i,this._parents).order()}function fo(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function po(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function mo(){return Array.from(this)}function ho(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var r=e[t],i=0,a=r.length;i<a;++i){var o=r[i];if(o)return o}return null}function go(){let e=0;for(let t of this)++e;return e}function _o(){return!this.node()}function vo(e){for(var t=this._groups,n=0,r=t.length;n<r;++n)for(var i=t[n],a=0,o=i.length,s;a<o;++a)(s=i[a])&&e.call(s,s.__data__,a,i);return this}function yo(e){return function(){this.removeAttribute(e)}}function bo(e){return function(){this.removeAttributeNS(e.space,e.local)}}function xo(e,t){return function(){this.setAttribute(e,t)}}function So(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function Co(e,t){return function(){var n=t.apply(this,arguments);n==null?this.removeAttribute(e):this.setAttribute(e,n)}}function wo(e,t){return function(){var n=t.apply(this,arguments);n==null?this.removeAttributeNS(e.space,e.local):this.setAttributeNS(e.space,e.local,n)}}function To(e,t){var n=Oa(e);if(arguments.length<2){var r=this.node();return n.local?r.getAttributeNS(n.space,n.local):r.getAttribute(n)}return this.each((t==null?n.local?bo:yo:typeof t==`function`?n.local?wo:Co:n.local?So:xo)(n,t))}function Eo(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function Do(e){return function(){this.style.removeProperty(e)}}function Oo(e,t,n){return function(){this.style.setProperty(e,t,n)}}function ko(e,t,n){return function(){var r=t.apply(this,arguments);r==null?this.style.removeProperty(e):this.style.setProperty(e,r,n)}}function Ao(e,t,n){return arguments.length>1?this.each((t==null?Do:typeof t==`function`?ko:Oo)(e,t,n??``)):jo(this.node(),e)}function jo(e,t){return e.style.getPropertyValue(t)||Eo(e).getComputedStyle(e,null).getPropertyValue(t)}function Mo(e){return function(){delete this[e]}}function No(e,t){return function(){this[e]=t}}function Po(e,t){return function(){var n=t.apply(this,arguments);n==null?delete this[e]:this[e]=n}}function Fo(e,t){return arguments.length>1?this.each((t==null?Mo:typeof t==`function`?Po:No)(e,t)):this.node()[e]}function Io(e){return e.trim().split(/^|\s+/)}function Lo(e){return e.classList||new Ro(e)}function Ro(e){this._node=e,this._names=Io(e.getAttribute(`class`)||``)}Ro.prototype={add:function(e){this._names.indexOf(e)<0&&(this._names.push(e),this._node.setAttribute(`class`,this._names.join(` `)))},remove:function(e){var t=this._names.indexOf(e);t>=0&&(this._names.splice(t,1),this._node.setAttribute(`class`,this._names.join(` `)))},contains:function(e){return this._names.indexOf(e)>=0}};function zo(e,t){for(var n=Lo(e),r=-1,i=t.length;++r<i;)n.add(t[r])}function Bo(e,t){for(var n=Lo(e),r=-1,i=t.length;++r<i;)n.remove(t[r])}function Vo(e){return function(){zo(this,e)}}function Ho(e){return function(){Bo(this,e)}}function Uo(e,t){return function(){(t.apply(this,arguments)?zo:Bo)(this,e)}}function Wo(e,t){var n=Io(e+``);if(arguments.length<2){for(var r=Lo(this.node()),i=-1,a=n.length;++i<a;)if(!r.contains(n[i]))return!1;return!0}return this.each((typeof t==`function`?Uo:t?Vo:Ho)(n,t))}function Go(){this.textContent=``}function Ko(e){return function(){this.textContent=e}}function qo(e){return function(){var t=e.apply(this,arguments);this.textContent=t??``}}function Jo(e){return arguments.length?this.each(e==null?Go:(typeof e==`function`?qo:Ko)(e)):this.node().textContent}function Yo(){this.innerHTML=``}function Xo(e){return function(){this.innerHTML=e}}function Zo(e){return function(){var t=e.apply(this,arguments);this.innerHTML=t??``}}function Qo(e){return arguments.length?this.each(e==null?Yo:(typeof e==`function`?Zo:Xo)(e)):this.node().innerHTML}function $o(){this.nextSibling&&this.parentNode.appendChild(this)}function es(){return this.each($o)}function ts(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function ns(){return this.each(ts)}function rs(e){var t=typeof e==`function`?e:ja(e);return this.select(function(){return this.appendChild(t.apply(this,arguments))})}function is(){return null}function as(e,t){var n=typeof e==`function`?e:ja(e),r=t==null?is:typeof t==`function`?t:Na(t);return this.select(function(){return this.insertBefore(n.apply(this,arguments),r.apply(this,arguments)||null)})}function os(){var e=this.parentNode;e&&e.removeChild(this)}function ss(){return this.each(os)}function cs(){var e=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function ls(){var e=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function us(e){return this.select(e?ls:cs)}function ds(e){return arguments.length?this.property(`__data__`,e):this.node().__data__}function fs(e){return function(t){e.call(this,t,this.__data__)}}function ps(e){return e.trim().split(/^|\s+/).map(function(e){var t=``,n=e.indexOf(`.`);return n>=0&&(t=e.slice(n+1),e=e.slice(0,n)),{type:e,name:t}})}function ms(e){return function(){var t=this.__on;if(t){for(var n=0,r=-1,i=t.length,a;n<i;++n)a=t[n],(!e.type||a.type===e.type)&&a.name===e.name?this.removeEventListener(a.type,a.listener,a.options):t[++r]=a;++r?t.length=r:delete this.__on}}}function hs(e,t,n){return function(){var r=this.__on,i,a=fs(t);if(r){for(var o=0,s=r.length;o<s;++o)if((i=r[o]).type===e.type&&i.name===e.name){this.removeEventListener(i.type,i.listener,i.options),this.addEventListener(i.type,i.listener=a,i.options=n),i.value=t;return}}this.addEventListener(e.type,a,n),i={type:e.type,name:e.name,value:t,listener:a,options:n},r?r.push(i):this.__on=[i]}}function gs(e,t,n){var r=ps(e+``),i,a=r.length,o;if(arguments.length<2){var s=this.node().__on;if(s){for(var c=0,l=s.length,u;c<l;++c)for(i=0,u=s[c];i<a;++i)if((o=r[i]).type===u.type&&o.name===u.name)return u.value}return}for(s=t?hs:ms,i=0;i<a;++i)this.each(s(r[i],t,n));return this}function _s(e,t,n){var r=Eo(e),i=r.CustomEvent;typeof i==`function`?i=new i(t,n):(i=r.document.createEvent(`Event`),n?(i.initEvent(t,n.bubbles,n.cancelable),i.detail=n.detail):i.initEvent(t,!1,!1)),e.dispatchEvent(i)}function vs(e,t){return function(){return _s(this,e,t)}}function ys(e,t){return function(){return _s(this,e,t.apply(this,arguments))}}function bs(e,t){return this.each((typeof t==`function`?ys:vs)(e,t))}function*xs(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var r=e[t],i=0,a=r.length,o;i<a;++i)(o=r[i])&&(yield o)}var Ss=[null];function Cs(e,t){this._groups=e,this._parents=t}function ws(){return new Cs([[document.documentElement]],Ss)}function Ts(){return this}Cs.prototype=ws.prototype={constructor:Cs,select:Pa,selectAll:za,selectChild:Ga,selectChildren:Ya,filter:Xa,data:io,enter:Qa,exit:oo,join:so,merge:co,selection:Ts,order:lo,sort:uo,call:po,nodes:mo,node:ho,size:go,empty:_o,each:vo,attr:To,style:Ao,property:Fo,classed:Wo,text:Jo,html:Qo,raise:es,lower:ns,append:rs,insert:as,remove:ss,clone:us,datum:ds,on:gs,dispatch:bs,[Symbol.iterator]:xs};function Q(e){return typeof e==`string`?new Cs([[document.querySelector(e)]],[document.documentElement]):new Cs([[e]],Ss)}function Es(e){let t;for(;t=e.sourceEvent;)e=t;return e}function Ds(e,t){if(e=Es(e),t===void 0&&(t=e.currentTarget),t){var n=t.ownerSVGElement||t;if(n.createSVGPoint){var r=n.createSVGPoint();return r.x=e.clientX,r.y=e.clientY,r=r.matrixTransform(t.getScreenCTM().inverse()),[r.x,r.y]}if(t.getBoundingClientRect){var i=t.getBoundingClientRect();return[e.clientX-i.left-t.clientLeft,e.clientY-i.top-t.clientTop]}}return[e.pageX,e.pageY]}function Os(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function ks(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function As(){}var js=.7,Ms=1/js,Ns=`\\s*([+-]?\\d+)\\s*`,Ps=`\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*`,Fs=`\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*`,Is=/^#([0-9a-f]{3,8})$/,Ls=RegExp(`^rgb\\(${Ns},${Ns},${Ns}\\)$`),Rs=RegExp(`^rgb\\(${Fs},${Fs},${Fs}\\)$`),zs=RegExp(`^rgba\\(${Ns},${Ns},${Ns},${Ps}\\)$`),Bs=RegExp(`^rgba\\(${Fs},${Fs},${Fs},${Ps}\\)$`),Vs=RegExp(`^hsl\\(${Ps},${Fs},${Fs}\\)$`),Hs=RegExp(`^hsla\\(${Ps},${Fs},${Fs},${Ps}\\)$`),Us={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};Os(As,Js,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:Ws,formatHex:Ws,formatHex8:Gs,formatHsl:Ks,formatRgb:qs,toString:qs});function Ws(){return this.rgb().formatHex()}function Gs(){return this.rgb().formatHex8()}function Ks(){return sc(this).formatHsl()}function qs(){return this.rgb().formatRgb()}function Js(e){var t,n;return e=(e+``).trim().toLowerCase(),(t=Is.exec(e))?(n=t[1].length,t=parseInt(t[1],16),n===6?Ys(t):n===3?new $s(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):n===8?Xs(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):n===4?Xs(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=Ls.exec(e))?new $s(t[1],t[2],t[3],1):(t=Rs.exec(e))?new $s(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=zs.exec(e))?Xs(t[1],t[2],t[3],t[4]):(t=Bs.exec(e))?Xs(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=Vs.exec(e))?oc(t[1],t[2]/100,t[3]/100,1):(t=Hs.exec(e))?oc(t[1],t[2]/100,t[3]/100,t[4]):Us.hasOwnProperty(e)?Ys(Us[e]):e===`transparent`?new $s(NaN,NaN,NaN,0):null}function Ys(e){return new $s(e>>16&255,e>>8&255,e&255,1)}function Xs(e,t,n,r){return r<=0&&(e=t=n=NaN),new $s(e,t,n,r)}function Zs(e){return e instanceof As||(e=Js(e)),e?(e=e.rgb(),new $s(e.r,e.g,e.b,e.opacity)):new $s}function Qs(e,t,n,r){return arguments.length===1?Zs(e):new $s(e,t,n,r??1)}function $s(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}Os($s,Qs,ks(As,{brighter(e){return e=e==null?Ms:Ms**+e,new $s(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?js:js**+e,new $s(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new $s(ic(this.r),ic(this.g),ic(this.b),rc(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:ec,formatHex:ec,formatHex8:tc,formatRgb:nc,toString:nc}));function ec(){return`#${ac(this.r)}${ac(this.g)}${ac(this.b)}`}function tc(){return`#${ac(this.r)}${ac(this.g)}${ac(this.b)}${ac((isNaN(this.opacity)?1:this.opacity)*255)}`}function nc(){let e=rc(this.opacity);return`${e===1?`rgb(`:`rgba(`}${ic(this.r)}, ${ic(this.g)}, ${ic(this.b)}${e===1?`)`:`, ${e})`}`}function rc(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function ic(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function ac(e){return e=ic(e),(e<16?`0`:``)+e.toString(16)}function oc(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new lc(e,t,n,r)}function sc(e){if(e instanceof lc)return new lc(e.h,e.s,e.l,e.opacity);if(e instanceof As||(e=Js(e)),!e)return new lc;if(e instanceof lc)return e;e=e.rgb();var t=e.r/255,n=e.g/255,r=e.b/255,i=Math.min(t,n,r),a=Math.max(t,n,r),o=NaN,s=a-i,c=(a+i)/2;return s?(o=t===a?(n-r)/s+(n<r)*6:n===a?(r-t)/s+2:(t-n)/s+4,s/=c<.5?a+i:2-a-i,o*=60):s=c>0&&c<1?0:o,new lc(o,s,c,e.opacity)}function cc(e,t,n,r){return arguments.length===1?sc(e):new lc(e,t,n,r??1)}function lc(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}Os(lc,cc,ks(As,{brighter(e){return e=e==null?Ms:Ms**+e,new lc(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?js:js**+e,new lc(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*t,i=2*n-r;return new $s(fc(e>=240?e-240:e+120,i,r),fc(e,i,r),fc(e<120?e+240:e-120,i,r),this.opacity)},clamp(){return new lc(uc(this.h),dc(this.s),dc(this.l),rc(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){let e=rc(this.opacity);return`${e===1?`hsl(`:`hsla(`}${uc(this.h)}, ${dc(this.s)*100}%, ${dc(this.l)*100}%${e===1?`)`:`, ${e})`}`}}));function uc(e){return e=(e||0)%360,e<0?e+360:e}function dc(e){return Math.max(0,Math.min(1,e||0))}function fc(e,t,n){return(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)*255}var pc=e=>()=>e;function mc(e,t){return function(n){return e+n*t}}function hc(e,t,n){return e**=+n,t=t**+n-e,n=1/n,function(r){return(e+r*t)**+n}}function gc(e){return(e=+e)==1?_c:function(t,n){return n-t?hc(t,n,e):pc(isNaN(t)?n:t)}}function _c(e,t){var n=t-e;return n?mc(e,n):pc(isNaN(e)?t:e)}var vc=(function e(t){var n=gc(t);function r(e,t){var r=n((e=Qs(e)).r,(t=Qs(t)).r),i=n(e.g,t.g),a=n(e.b,t.b),o=_c(e.opacity,t.opacity);return function(t){return e.r=r(t),e.g=i(t),e.b=a(t),e.opacity=o(t),e+``}}return r.gamma=e,r})(1);function yc(e,t){t||=[];var n=e?Math.min(t.length,e.length):0,r=t.slice(),i;return function(a){for(i=0;i<n;++i)r[i]=e[i]*(1-a)+t[i]*a;return r}}function bc(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function xc(e,t){var n=t?t.length:0,r=e?Math.min(n,e.length):0,i=Array(r),a=Array(n),o;for(o=0;o<r;++o)i[o]=Ac(e[o],t[o]);for(;o<n;++o)a[o]=t[o];return function(e){for(o=0;o<r;++o)a[o]=i[o](e);return a}}function Sc(e,t){var n=new Date;return e=+e,t=+t,function(r){return n.setTime(e*(1-r)+t*r),n}}function Cc(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}function wc(e,t){var n={},r={},i;for(i in(typeof e!=`object`||!e)&&(e={}),(typeof t!=`object`||!t)&&(t={}),t)i in e?n[i]=Ac(e[i],t[i]):r[i]=t[i];return function(e){for(i in n)r[i]=n[i](e);return r}}var Tc=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Ec=new RegExp(Tc.source,`g`);function Dc(e){return function(){return e}}function Oc(e){return function(t){return e(t)+``}}function kc(e,t){var n=Tc.lastIndex=Ec.lastIndex=0,r,i,a,o=-1,s=[],c=[];for(e+=``,t+=``;(r=Tc.exec(e))&&(i=Ec.exec(t));)(a=i.index)>n&&(a=t.slice(n,a),s[o]?s[o]+=a:s[++o]=a),(r=r[0])===(i=i[0])?s[o]?s[o]+=i:s[++o]=i:(s[++o]=null,c.push({i:o,x:Cc(r,i)})),n=Ec.lastIndex;return n<t.length&&(a=t.slice(n),s[o]?s[o]+=a:s[++o]=a),s.length<2?c[0]?Oc(c[0].x):Dc(t):(t=c.length,function(e){for(var n=0,r;n<t;++n)s[(r=c[n]).i]=r.x(e);return s.join(``)})}function Ac(e,t){var n=typeof t,r;return t==null||n===`boolean`?pc(t):(n===`number`?Cc:n===`string`?(r=Js(t))?(t=r,vc):kc:t instanceof Js?vc:t instanceof Date?Sc:bc(t)?yc:Array.isArray(t)?xc:typeof t.valueOf!=`function`&&typeof t.toString!=`function`||isNaN(t)?wc:Cc)(e,t)}function jc(e,t){return e=+e,t=+t,function(n){return Math.round(e*(1-n)+t*n)}}var Mc=180/Math.PI,Nc={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function Pc(e,t,n,r,i,a){var o,s,c;return(o=Math.sqrt(e*e+t*t))&&(e/=o,t/=o),(c=e*n+t*r)&&(n-=e*c,r-=t*c),(s=Math.sqrt(n*n+r*r))&&(n/=s,r/=s,c/=s),e*r<t*n&&(e=-e,t=-t,c=-c,o=-o),{translateX:i,translateY:a,rotate:Math.atan2(t,e)*Mc,skewX:Math.atan(c)*Mc,scaleX:o,scaleY:s}}var Fc;function Ic(e){let t=new(typeof DOMMatrix==`function`?DOMMatrix:WebKitCSSMatrix)(e+``);return t.isIdentity?Nc:Pc(t.a,t.b,t.c,t.d,t.e,t.f)}function Lc(e){return e==null||(Fc||=document.createElementNS(`http://www.w3.org/2000/svg`,`g`),Fc.setAttribute(`transform`,e),!(e=Fc.transform.baseVal.consolidate()))?Nc:(e=e.matrix,Pc(e.a,e.b,e.c,e.d,e.e,e.f))}function Rc(e,t,n,r){function i(e){return e.length?e.pop()+` `:``}function a(e,r,i,a,o,s){if(e!==i||r!==a){var c=o.push(`translate(`,null,t,null,n);s.push({i:c-4,x:Cc(e,i)},{i:c-2,x:Cc(r,a)})}else(i||a)&&o.push(`translate(`+i+t+a+n)}function o(e,t,n,a){e===t?t&&n.push(i(n)+`rotate(`+t+r):(e-t>180?t+=360:t-e>180&&(e+=360),a.push({i:n.push(i(n)+`rotate(`,null,r)-2,x:Cc(e,t)}))}function s(e,t,n,a){e===t?t&&n.push(i(n)+`skewX(`+t+r):a.push({i:n.push(i(n)+`skewX(`,null,r)-2,x:Cc(e,t)})}function c(e,t,n,r,a,o){if(e!==n||t!==r){var s=a.push(i(a)+`scale(`,null,`,`,null,`)`);o.push({i:s-4,x:Cc(e,n)},{i:s-2,x:Cc(t,r)})}else(n!==1||r!==1)&&a.push(i(a)+`scale(`+n+`,`+r+`)`)}return function(t,n){var r=[],i=[];return t=e(t),n=e(n),a(t.translateX,t.translateY,n.translateX,n.translateY,r,i),o(t.rotate,n.rotate,r,i),s(t.skewX,n.skewX,r,i),c(t.scaleX,t.scaleY,n.scaleX,n.scaleY,r,i),t=n=null,function(e){for(var t=-1,n=i.length,a;++t<n;)r[(a=i[t]).i]=a.x(e);return r.join(``)}}}var zc=Rc(Ic,`px, `,`px)`,`deg)`),Bc=Rc(Lc,`, `,`)`,`)`),Vc=0,Hc=0,Uc=0,Wc=1e3,Gc,Kc,qc=0,Jc=0,Yc=0,Xc=typeof performance==`object`&&performance.now?performance:Date,Zc=typeof window==`object`&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function Qc(){return Jc||=(Zc($c),Xc.now()+Yc)}function $c(){Jc=0}function el(){this._call=this._time=this._next=null}el.prototype=tl.prototype={constructor:el,restart:function(e,t,n){if(typeof e!=`function`)throw TypeError(`callback is not a function`);n=(n==null?Qc():+n)+(t==null?0:+t),!this._next&&Kc!==this&&(Kc?Kc._next=this:Gc=this,Kc=this),this._call=e,this._time=n,ol()},stop:function(){this._call&&(this._call=null,this._time=1/0,ol())}};function tl(e,t,n){var r=new el;return r.restart(e,t,n),r}function nl(){Qc(),++Vc;for(var e=Gc,t;e;)(t=Jc-e._time)>=0&&e._call.call(void 0,t),e=e._next;--Vc}function rl(){Jc=(qc=Xc.now())+Yc,Vc=Hc=0;try{nl()}finally{Vc=0,al(),Jc=0}}function il(){var e=Xc.now(),t=e-qc;t>Wc&&(Yc-=t,qc=e)}function al(){for(var e,t=Gc,n,r=1/0;t;)t._call?(r>t._time&&(r=t._time),e=t,t=t._next):(n=t._next,t._next=null,t=e?e._next=n:Gc=n);Kc=e,ol(r)}function ol(e){Vc||(Hc&&=clearTimeout(Hc),e-Jc>24?(e<1/0&&(Hc=setTimeout(rl,e-Xc.now()-Yc)),Uc&&=clearInterval(Uc)):(Uc||=(qc=Xc.now(),setInterval(il,Wc)),Vc=1,Zc(rl)))}function sl(e,t,n){var r=new el;return t=t==null?0:+t,r.restart(n=>{r.stop(),e(n+t)},t,n),r}var cl=Sa(`start`,`end`,`cancel`,`interrupt`),ll=[];function ul(e,t,n,r,i,a){var o=e.__transition;if(!o)e.__transition={};else if(n in o)return;ml(e,n,{name:t,index:r,group:i,on:cl,tween:ll,time:a.time,delay:a.delay,duration:a.duration,ease:a.ease,timer:null,state:0})}function dl(e,t){var n=pl(e,t);if(n.state>0)throw Error(`too late; already scheduled`);return n}function fl(e,t){var n=pl(e,t);if(n.state>3)throw Error(`too late; already running`);return n}function pl(e,t){var n=e.__transition;if(!n||!(n=n[t]))throw Error(`transition not found`);return n}function ml(e,t,n){var r=e.__transition,i;r[t]=n,n.timer=tl(a,0,n.time);function a(e){n.state=1,n.timer.restart(o,n.delay,n.time),n.delay<=e&&o(e-n.delay)}function o(a){var l,u,d,f;if(n.state!==1)return c();for(l in r)if(f=r[l],f.name===n.name){if(f.state===3)return sl(o);f.state===4?(f.state=6,f.timer.stop(),f.on.call(`interrupt`,e,e.__data__,f.index,f.group),delete r[l]):+l<t&&(f.state=6,f.timer.stop(),f.on.call(`cancel`,e,e.__data__,f.index,f.group),delete r[l])}if(sl(function(){n.state===3&&(n.state=4,n.timer.restart(s,n.delay,n.time),s(a))}),n.state=2,n.on.call(`start`,e,e.__data__,n.index,n.group),n.state===2){for(n.state=3,i=Array(d=n.tween.length),l=0,u=-1;l<d;++l)(f=n.tween[l].value.call(e,e.__data__,n.index,n.group))&&(i[++u]=f);i.length=u+1}}function s(t){for(var r=t<n.duration?n.ease.call(null,t/n.duration):(n.timer.restart(c),n.state=5,1),a=-1,o=i.length;++a<o;)i[a].call(e,r);n.state===5&&(n.on.call(`end`,e,e.__data__,n.index,n.group),c())}function c(){for(var i in n.state=6,n.timer.stop(),delete r[t],r)return;delete e.__transition}}function hl(e,t){var n=e.__transition,r,i,a=!0,o;if(n){for(o in t=t==null?null:t+``,n){if((r=n[o]).name!==t){a=!1;continue}i=r.state>2&&r.state<5,r.state=6,r.timer.stop(),r.on.call(i?`interrupt`:`cancel`,e,e.__data__,r.index,r.group),delete n[o]}a&&delete e.__transition}}function gl(e){return this.each(function(){hl(this,e)})}function _l(e,t){var n,r;return function(){var i=fl(this,e),a=i.tween;if(a!==n){r=n=a;for(var o=0,s=r.length;o<s;++o)if(r[o].name===t){r=r.slice(),r.splice(o,1);break}}i.tween=r}}function vl(e,t,n){var r,i;if(typeof n!=`function`)throw Error();return function(){var a=fl(this,e),o=a.tween;if(o!==r){i=(r=o).slice();for(var s={name:t,value:n},c=0,l=i.length;c<l;++c)if(i[c].name===t){i[c]=s;break}c===l&&i.push(s)}a.tween=i}}function yl(e,t){var n=this._id;if(e+=``,arguments.length<2){for(var r=pl(this.node(),n).tween,i=0,a=r.length,o;i<a;++i)if((o=r[i]).name===e)return o.value;return null}return this.each((t==null?_l:vl)(n,e,t))}function bl(e,t,n){var r=e._id;return e.each(function(){var e=fl(this,r);(e.value||={})[t]=n.apply(this,arguments)}),function(e){return pl(e,r).value[t]}}function xl(e,t){var n;return(typeof t==`number`?Cc:t instanceof Js?vc:(n=Js(t))?(t=n,vc):kc)(e,t)}function Sl(e){return function(){this.removeAttribute(e)}}function Cl(e){return function(){this.removeAttributeNS(e.space,e.local)}}function wl(e,t,n){var r,i=n+``,a;return function(){var o=this.getAttribute(e);return o===i?null:o===r?a:a=t(r=o,n)}}function Tl(e,t,n){var r,i=n+``,a;return function(){var o=this.getAttributeNS(e.space,e.local);return o===i?null:o===r?a:a=t(r=o,n)}}function El(e,t,n){var r,i,a;return function(){var o,s=n(this),c;return s==null?void this.removeAttribute(e):(o=this.getAttribute(e),c=s+``,o===c?null:o===r&&c===i?a:(i=c,a=t(r=o,s)))}}function Dl(e,t,n){var r,i,a;return function(){var o,s=n(this),c;return s==null?void this.removeAttributeNS(e.space,e.local):(o=this.getAttributeNS(e.space,e.local),c=s+``,o===c?null:o===r&&c===i?a:(i=c,a=t(r=o,s)))}}function Ol(e,t){var n=Oa(e),r=n===`transform`?Bc:xl;return this.attrTween(e,typeof t==`function`?(n.local?Dl:El)(n,r,bl(this,`attr.`+e,t)):t==null?(n.local?Cl:Sl)(n):(n.local?Tl:wl)(n,r,t))}function kl(e,t){return function(n){this.setAttribute(e,t.call(this,n))}}function Al(e,t){return function(n){this.setAttributeNS(e.space,e.local,t.call(this,n))}}function jl(e,t){var n,r;function i(){var i=t.apply(this,arguments);return i!==r&&(n=(r=i)&&Al(e,i)),n}return i._value=t,i}function Ml(e,t){var n,r;function i(){var i=t.apply(this,arguments);return i!==r&&(n=(r=i)&&kl(e,i)),n}return i._value=t,i}function Nl(e,t){var n=`attr.`+e;if(arguments.length<2)return(n=this.tween(n))&&n._value;if(t==null)return this.tween(n,null);if(typeof t!=`function`)throw Error();var r=Oa(e);return this.tween(n,(r.local?jl:Ml)(r,t))}function Pl(e,t){return function(){dl(this,e).delay=+t.apply(this,arguments)}}function Fl(e,t){return t=+t,function(){dl(this,e).delay=t}}function Il(e){var t=this._id;return arguments.length?this.each((typeof e==`function`?Pl:Fl)(t,e)):pl(this.node(),t).delay}function Ll(e,t){return function(){fl(this,e).duration=+t.apply(this,arguments)}}function Rl(e,t){return t=+t,function(){fl(this,e).duration=t}}function zl(e){var t=this._id;return arguments.length?this.each((typeof e==`function`?Ll:Rl)(t,e)):pl(this.node(),t).duration}function Bl(e,t){if(typeof t!=`function`)throw Error();return function(){fl(this,e).ease=t}}function Vl(e){var t=this._id;return arguments.length?this.each(Bl(t,e)):pl(this.node(),t).ease}function Hl(e,t){return function(){var n=t.apply(this,arguments);if(typeof n!=`function`)throw Error();fl(this,e).ease=n}}function Ul(e){if(typeof e!=`function`)throw Error();return this.each(Hl(this._id,e))}function Wl(e){typeof e!=`function`&&(e=Ba(e));for(var t=this._groups,n=t.length,r=Array(n),i=0;i<n;++i)for(var a=t[i],o=a.length,s=r[i]=[],c,l=0;l<o;++l)(c=a[l])&&e.call(c,c.__data__,l,a)&&s.push(c);return new yu(r,this._parents,this._name,this._id)}function Gl(e){if(e._id!==this._id)throw Error();for(var t=this._groups,n=e._groups,r=t.length,i=n.length,a=Math.min(r,i),o=Array(r),s=0;s<a;++s)for(var c=t[s],l=n[s],u=c.length,d=o[s]=Array(u),f,p=0;p<u;++p)(f=c[p]||l[p])&&(d[p]=f);for(;s<r;++s)o[s]=t[s];return new yu(o,this._parents,this._name,this._id)}function Kl(e){return(e+``).trim().split(/^|\s+/).every(function(e){var t=e.indexOf(`.`);return t>=0&&(e=e.slice(0,t)),!e||e===`start`})}function ql(e,t,n){var r,i,a=Kl(t)?dl:fl;return function(){var o=a(this,e),s=o.on;s!==r&&(i=(r=s).copy()).on(t,n),o.on=i}}function Jl(e,t){var n=this._id;return arguments.length<2?pl(this.node(),n).on.on(e):this.each(ql(n,e,t))}function Yl(e){return function(){var t=this.parentNode;for(var n in this.__transition)if(+n!==e)return;t&&t.removeChild(this)}}function Xl(){return this.on(`end.remove`,Yl(this._id))}function Zl(e){var t=this._name,n=this._id;typeof e!=`function`&&(e=Na(e));for(var r=this._groups,i=r.length,a=Array(i),o=0;o<i;++o)for(var s=r[o],c=s.length,l=a[o]=Array(c),u,d,f=0;f<c;++f)(u=s[f])&&(d=e.call(u,u.__data__,f,s))&&(`__data__`in u&&(d.__data__=u.__data__),l[f]=d,ul(l[f],t,n,f,l,pl(u,n)));return new yu(a,this._parents,t,n)}function Ql(e){var t=this._name,n=this._id;typeof e!=`function`&&(e=La(e));for(var r=this._groups,i=r.length,a=[],o=[],s=0;s<i;++s)for(var c=r[s],l=c.length,u,d=0;d<l;++d)if(u=c[d]){for(var f=e.call(u,u.__data__,d,c),p,m=pl(u,n),h=0,g=f.length;h<g;++h)(p=f[h])&&ul(p,t,n,h,f,m);a.push(f),o.push(u)}return new yu(a,o,t,n)}var $l=ws.prototype.constructor;function eu(){return new $l(this._groups,this._parents)}function tu(e,t){var n,r,i;return function(){var a=jo(this,e),o=(this.style.removeProperty(e),jo(this,e));return a===o?null:a===n&&o===r?i:i=t(n=a,r=o)}}function nu(e){return function(){this.style.removeProperty(e)}}function ru(e,t,n){var r,i=n+``,a;return function(){var o=jo(this,e);return o===i?null:o===r?a:a=t(r=o,n)}}function iu(e,t,n){var r,i,a;return function(){var o=jo(this,e),s=n(this),c=s+``;return s??(c=s=(this.style.removeProperty(e),jo(this,e))),o===c?null:o===r&&c===i?a:(i=c,a=t(r=o,s))}}function au(e,t){var n,r,i,a=`style.`+t,o=`end.`+a,s;return function(){var c=fl(this,e),l=c.on,u=c.value[a]==null?s||=nu(t):void 0;(l!==n||i!==u)&&(r=(n=l).copy()).on(o,i=u),c.on=r}}function ou(e,t,n){var r=(e+=``)==`transform`?zc:xl;return t==null?this.styleTween(e,tu(e,r)).on(`end.style.`+e,nu(e)):typeof t==`function`?this.styleTween(e,iu(e,r,bl(this,`style.`+e,t))).each(au(this._id,e)):this.styleTween(e,ru(e,r,t),n).on(`end.style.`+e,null)}function su(e,t,n){return function(r){this.style.setProperty(e,t.call(this,r),n)}}function cu(e,t,n){var r,i;function a(){var a=t.apply(this,arguments);return a!==i&&(r=(i=a)&&su(e,a,n)),r}return a._value=t,a}function lu(e,t,n){var r=`style.`+(e+=``);if(arguments.length<2)return(r=this.tween(r))&&r._value;if(t==null)return this.tween(r,null);if(typeof t!=`function`)throw Error();return this.tween(r,cu(e,t,n??``))}function uu(e){return function(){this.textContent=e}}function du(e){return function(){var t=e(this);this.textContent=t??``}}function fu(e){return this.tween(`text`,typeof e==`function`?du(bl(this,`text`,e)):uu(e==null?``:e+``))}function pu(e){return function(t){this.textContent=e.call(this,t)}}function mu(e){var t,n;function r(){var r=e.apply(this,arguments);return r!==n&&(t=(n=r)&&pu(r)),t}return r._value=e,r}function hu(e){var t=`text`;if(arguments.length<1)return(t=this.tween(t))&&t._value;if(e==null)return this.tween(t,null);if(typeof e!=`function`)throw Error();return this.tween(t,mu(e))}function gu(){for(var e=this._name,t=this._id,n=xu(),r=this._groups,i=r.length,a=0;a<i;++a)for(var o=r[a],s=o.length,c,l=0;l<s;++l)if(c=o[l]){var u=pl(c,t);ul(c,e,n,l,o,{time:u.time+u.delay+u.duration,delay:0,duration:u.duration,ease:u.ease})}return new yu(r,this._parents,e,n)}function _u(){var e,t,n=this,r=n._id,i=n.size();return new Promise(function(a,o){var s={value:o},c={value:function(){--i===0&&a()}};n.each(function(){var n=fl(this,r),i=n.on;i!==e&&(t=(e=i).copy(),t._.cancel.push(s),t._.interrupt.push(s),t._.end.push(c)),n.on=t}),i===0&&a()})}var vu=0;function yu(e,t,n,r){this._groups=e,this._parents=t,this._name=n,this._id=r}function bu(e){return ws().transition(e)}function xu(){return++vu}var Su=ws.prototype;yu.prototype=bu.prototype={constructor:yu,select:Zl,selectAll:Ql,selectChild:Su.selectChild,selectChildren:Su.selectChildren,filter:Wl,merge:Gl,selection:eu,transition:gu,call:Su.call,nodes:Su.nodes,node:Su.node,size:Su.size,empty:Su.empty,each:Su.each,on:Jl,attr:Ol,attrTween:Nl,style:ou,styleTween:lu,text:fu,textTween:hu,remove:Xl,tween:yl,delay:Il,duration:zl,ease:Vl,easeVarying:Ul,end:_u,[Symbol.iterator]:Su[Symbol.iterator]};function Cu(e){return--e*e*e+1}function wu(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}var Tu={time:null,delay:0,duration:250,ease:wu};function Eu(e,t){for(var n;!(n=e.__transition)||!(n=n[t]);)if(!(e=e.parentNode))throw Error(`transition ${t} not found`);return n}function Du(e){var t,n;e instanceof yu?(t=e._id,e=e._name):(t=xu(),(n=Tu).time=Qc(),e=e==null?null:e+``);for(var r=this._groups,i=r.length,a=0;a<i;++a)for(var o=r[a],s=o.length,c,l=0;l<s;++l)(c=o[l])&&ul(c,e,t,l,o,n||Eu(c,t));return new yu(r,this._parents,e,t)}ws.prototype.interrupt=gl,ws.prototype.transition=Du;var Ou=[null];function ku(e,t){var n=e.__transition,r,i;if(n){for(i in t=t==null?null:t+``,n)if((r=n[i]).state>1&&r.name===t)return new yu([[e]],Ou,t,+i)}return null}var{abs:Au,max:ju,min:Mu}=Math;[`w`,`e`].map(Nu),[`n`,`s`].map(Nu),[`n`,`w`,`e`,`s`,`nw`,`ne`,`sw`,`se`].map(Nu);function Nu(e){return{type:e}}var Pu=Math.PI,Fu=2*Pu,Iu=1e-6,Lu=Fu-Iu;function Ru(e){this._+=e[0];for(let t=1,n=e.length;t<n;++t)this._+=arguments[t]+e[t]}function zu(e){let t=Math.floor(e);if(!(t>=0))throw Error(`invalid digits: ${e}`);if(t>15)return Ru;let n=10**t;return function(e){this._+=e[0];for(let t=1,r=e.length;t<r;++t)this._+=Math.round(arguments[t]*n)/n+e[t]}}var Bu=class{constructor(e){this._x0=this._y0=this._x1=this._y1=null,this._=``,this._append=e==null?Ru:zu(e)}moveTo(e,t){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+t}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(e,t){this._append`L${this._x1=+e},${this._y1=+t}`}quadraticCurveTo(e,t,n,r){this._append`Q${+e},${+t},${this._x1=+n},${this._y1=+r}`}bezierCurveTo(e,t,n,r,i,a){this._append`C${+e},${+t},${+n},${+r},${this._x1=+i},${this._y1=+a}`}arcTo(e,t,n,r,i){if(e=+e,t=+t,n=+n,r=+r,i=+i,i<0)throw Error(`negative radius: ${i}`);let a=this._x1,o=this._y1,s=n-e,c=r-t,l=a-e,u=o-t,d=l*l+u*u;if(this._x1===null)this._append`M${this._x1=e},${this._y1=t}`;else if(d>Iu){if(!(Math.abs(u*s-c*l)>Iu)||!i)this._append`L${this._x1=e},${this._y1=t}`;else{let f=n-a,p=r-o,m=s*s+c*c,h=f*f+p*p,g=Math.sqrt(m),_=Math.sqrt(d),v=i*Math.tan((Pu-Math.acos((m+d-h)/(2*g*_)))/2),y=v/_,b=v/g;Math.abs(y-1)>Iu&&this._append`L${e+y*l},${t+y*u}`,this._append`A${i},${i},0,0,${+(u*f>l*p)},${this._x1=e+b*s},${this._y1=t+b*c}`}}}arc(e,t,n,r,i,a){if(e=+e,t=+t,n=+n,a=!!a,n<0)throw Error(`negative radius: ${n}`);let o=n*Math.cos(r),s=n*Math.sin(r),c=e+o,l=t+s,u=1^a,d=a?r-i:i-r;this._x1===null?this._append`M${c},${l}`:(Math.abs(this._x1-c)>Iu||Math.abs(this._y1-l)>Iu)&&this._append`L${c},${l}`,n&&(d<0&&(d=d%Fu+Fu),d>Lu?this._append`A${n},${n},0,1,${u},${e-o},${t-s}A${n},${n},0,1,${u},${this._x1=c},${this._y1=l}`:d>Iu&&this._append`A${n},${n},0,${+(d>=Pu)},${u},${this._x1=e+n*Math.cos(i)},${this._y1=t+n*Math.sin(i)}`)}rect(e,t,n,r){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+t}h${n=+n}v${+r}h${-n}Z`}toString(){return this._}};Bu.prototype;var Vu=11102230246251565e-32,Hu=134217729,Uu=3.000000000000001*Vu;function Wu(e,t,n,r,i){let a,o,s,c,l=t[0],u=r[0],d=0,f=0;u>l==u>-l?(a=l,l=t[++d]):(a=u,u=r[++f]);let p=0;if(d<e&&f<n)for(u>l==u>-l?(o=l+a,s=a-(o-l),l=t[++d]):(o=u+a,s=a-(o-u),u=r[++f]),a=o,s!==0&&(i[p++]=s);d<e&&f<n;)u>l==u>-l?(o=a+l,c=o-a,s=a-(o-c)+(l-c),l=t[++d]):(o=a+u,c=o-a,s=a-(o-c)+(u-c),u=r[++f]),a=o,s!==0&&(i[p++]=s);for(;d<e;)o=a+l,c=o-a,s=a-(o-c)+(l-c),l=t[++d],a=o,s!==0&&(i[p++]=s);for(;f<n;)o=a+u,c=o-a,s=a-(o-c)+(u-c),u=r[++f],a=o,s!==0&&(i[p++]=s);return(a!==0||p===0)&&(i[p++]=a),p}function Gu(e,t){let n=t[0];for(let r=1;r<e;r++)n+=t[r];return n}function $(e){return new Float64Array(e)}var Ku=(3+16*Vu)*Vu,qu=(2+12*Vu)*Vu,Ju=(9+64*Vu)*Vu*Vu,Yu=$(4),Xu=$(8),Zu=$(12),Qu=$(16),$u=$(4);function ed(e,t,n,r,i,a,o){let s,c,l,u,d,f,p,m,h,g,_,v,y,b,x,S,C,w,T=e-i,E=n-i,D=t-a,O=r-a;b=T*O,f=Hu*T,p=f-(f-T),m=T-p,f=Hu*O,h=f-(f-O),g=O-h,x=m*g-(b-p*h-m*h-p*g),S=D*E,f=Hu*D,p=f-(f-D),m=D-p,f=Hu*E,h=f-(f-E),g=E-h,C=m*g-(S-p*h-m*h-p*g),_=x-C,d=x-_,Yu[0]=x-(_+d)+(d-C),v=b+_,d=v-b,y=b-(v-d)+(_-d),_=y-S,d=y-_,Yu[1]=y-(_+d)+(d-S),w=v+_,d=w-v,Yu[2]=v-(w-d)+(_-d),Yu[3]=w;let k=Gu(4,Yu),A=qu*o;if(k>=A||-k>=A||(d=e-T,s=e-(T+d)+(d-i),d=n-E,l=n-(E+d)+(d-i),d=t-D,c=t-(D+d)+(d-a),d=r-O,u=r-(O+d)+(d-a),s===0&&c===0&&l===0&&u===0)||(A=Ju*o+Uu*Math.abs(k),k+=T*u+O*s-(D*l+E*c),k>=A||-k>=A))return k;b=s*O,f=Hu*s,p=f-(f-s),m=s-p,f=Hu*O,h=f-(f-O),g=O-h,x=m*g-(b-p*h-m*h-p*g),S=c*E,f=Hu*c,p=f-(f-c),m=c-p,f=Hu*E,h=f-(f-E),g=E-h,C=m*g-(S-p*h-m*h-p*g),_=x-C,d=x-_,$u[0]=x-(_+d)+(d-C),v=b+_,d=v-b,y=b-(v-d)+(_-d),_=y-S,d=y-_,$u[1]=y-(_+d)+(d-S),w=v+_,d=w-v,$u[2]=v-(w-d)+(_-d),$u[3]=w;let j=Wu(4,Yu,4,$u,Xu);b=T*u,f=Hu*T,p=f-(f-T),m=T-p,f=Hu*u,h=f-(f-u),g=u-h,x=m*g-(b-p*h-m*h-p*g),S=D*l,f=Hu*D,p=f-(f-D),m=D-p,f=Hu*l,h=f-(f-l),g=l-h,C=m*g-(S-p*h-m*h-p*g),_=x-C,d=x-_,$u[0]=x-(_+d)+(d-C),v=b+_,d=v-b,y=b-(v-d)+(_-d),_=y-S,d=y-_,$u[1]=y-(_+d)+(d-S),w=v+_,d=w-v,$u[2]=v-(w-d)+(_-d),$u[3]=w;let M=Wu(j,Xu,4,$u,Zu);return b=s*u,f=Hu*s,p=f-(f-s),m=s-p,f=Hu*u,h=f-(f-u),g=u-h,x=m*g-(b-p*h-m*h-p*g),S=c*l,f=Hu*c,p=f-(f-c),m=c-p,f=Hu*l,h=f-(f-l),g=l-h,C=m*g-(S-p*h-m*h-p*g),_=x-C,d=x-_,$u[0]=x-(_+d)+(d-C),v=b+_,d=v-b,y=b-(v-d)+(_-d),_=y-S,d=y-_,$u[1]=y-(_+d)+(d-S),w=v+_,d=w-v,$u[2]=v-(w-d)+(_-d),$u[3]=w,Qu[Wu(M,Zu,4,$u,Qu)-1]}function td(e,t,n,r,i,a){let o=(t-a)*(n-i),s=(e-i)*(r-a),c=o-s,l=Math.abs(o+s);return Math.abs(c)>=Ku*l?c:-ed(e,t,n,r,i,a,l)}(7+56*Vu)*Vu,(3+28*Vu)*Vu,(26+288*Vu)*Vu*Vu,$(4),$(4),$(4),$(4),$(4),$(4),$(4),$(4),$(4),$(8),$(8),$(8),$(4),$(8),$(8),$(16),$(12),$(192),$(192),(10+96*Vu)*Vu,(4+48*Vu)*Vu,(44+576*Vu)*Vu*Vu,$(4),$(4),$(4),$(4),$(4),$(4),$(4),$(4),$(8),$(8),$(8),$(8),$(8),$(8),$(8),$(8),$(8),$(4),$(4),$(4),$(8),$(16),$(16),$(16),$(32),$(32),$(48),$(64),$(1152),$(1152),(16+224*Vu)*Vu,(5+72*Vu)*Vu,(71+1408*Vu)*Vu*Vu,$(4),$(4),$(4),$(4),$(4),$(4),$(4),$(4),$(4),$(4),$(24),$(24),$(24),$(24),$(24),$(24),$(24),$(24),$(24),$(24),$(1152),$(1152),$(1152),$(1152),$(1152),$(2304),$(2304),$(3456),$(5760),$(8),$(8),$(8),$(16),$(24),$(48),$(48),$(96),$(192),$(384),$(384),$(384),$(768),$(96),$(96),$(96),$(1152);var nd=2**-52,rd=new Uint32Array(512),id=class e{static from(t,n=fd,r=pd){let i=t.length,a=new Float64Array(i*2);for(let e=0;e<i;e++){let i=t[e];a[2*e]=n(i),a[2*e+1]=r(i)}return new e(a)}constructor(e){let t=e.length>>1;if(t>0&&typeof e[0]!=`number`)throw Error(`Expected coords to contain numbers.`);this.coords=e;let n=Math.max(2*t-5,0);this._triangles=new Uint32Array(n*3),this._halfedges=new Int32Array(n*3),this._hashSize=Math.ceil(Math.sqrt(t)),this._hullPrev=new Uint32Array(t),this._hullNext=new Uint32Array(t),this._hullTri=new Uint32Array(t),this._hullHash=new Int32Array(this._hashSize),this._ids=new Uint32Array(t),this._dists=new Float64Array(t),this.trianglesLen=0,this._cx=0,this._cy=0,this._hullStart=0,this.hull=this._triangles,this.triangles=this._triangles,this.halfedges=this._halfedges,this.update()}update(){let{coords:e,_hullPrev:t,_hullNext:n,_hullTri:r,_hullHash:i}=this,a=e.length>>1,o=1/0,s=1/0,c=-1/0,l=-1/0;for(let t=0;t<a;t++){let n=e[2*t],r=e[2*t+1];n<o&&(o=n),r<s&&(s=r),n>c&&(c=n),r>l&&(l=r),this._ids[t]=t}let u=(o+c)/2,d=(s+l)/2,f=0,p=0,m=0;for(let t=0,n=1/0;t<a;t++){let r=od(u,d,e[2*t],e[2*t+1]);r<n&&(f=t,n=r)}let h=e[2*f],g=e[2*f+1];for(let t=0,n=1/0;t<a;t++){if(t===f)continue;let r=od(h,g,e[2*t],e[2*t+1]);r<n&&r>0&&(p=t,n=r)}let _=e[2*p],v=e[2*p+1],y=1/0;for(let t=0;t<a;t++){if(t===f||t===p)continue;let n=cd(h,g,_,v,e[2*t],e[2*t+1]);n<y&&(m=t,y=n)}let b=e[2*m],x=e[2*m+1];if(y===1/0){for(let t=0;t<a;t++)this._dists[t]=e[2*t]-e[0]||e[2*t+1]-e[1];ud(this._ids,this._dists,0,a-1);let t=new Uint32Array(a),n=0;for(let e=0,r=-1/0;e<a;e++){let i=this._ids[e],a=this._dists[i];a>r&&(t[n++]=i,r=a)}this.hull=t.subarray(0,n),this.triangles=new Uint32Array,this.halfedges=new Int32Array;return}if(td(h,g,_,v,b,x)<0){let e=p,t=_,n=v;p=m,_=b,v=x,m=e,b=t,x=n}let S=ld(h,g,_,v,b,x);this._cx=S.x,this._cy=S.y;for(let t=0;t<a;t++)this._dists[t]=od(e[2*t],e[2*t+1],S.x,S.y);ud(this._ids,this._dists,0,a-1),this._hullStart=f;let C=3;n[f]=t[m]=p,n[p]=t[f]=m,n[m]=t[p]=f,r[f]=0,r[p]=1,r[m]=2,i.fill(-1),i[this._hashKey(h,g)]=f,i[this._hashKey(_,v)]=p,i[this._hashKey(b,x)]=m,this.trianglesLen=0,this._addTriangle(f,p,m,-1,-1,-1);for(let a=0,o=0,s=0;a<this._ids.length;a++){let c=this._ids[a],l=e[2*c],u=e[2*c+1];if(a>0&&Math.abs(l-o)<=nd&&Math.abs(u-s)<=nd||(o=l,s=u,c===f||c===p||c===m))continue;let d=0;for(let e=0,t=this._hashKey(l,u);e<this._hashSize&&(d=i[(t+e)%this._hashSize],d===-1||d===n[d]);e++);d=t[d];let h=d,g;for(;g=n[h],td(l,u,e[2*h],e[2*h+1],e[2*g],e[2*g+1])>=0;)if(h=g,h===d){h=-1;break}if(h===-1)continue;let _=this._addTriangle(h,c,n[h],-1,-1,r[h]);r[c]=this._legalize(_+2),r[h]=_,C++;let v=n[h];for(;g=n[v],td(l,u,e[2*v],e[2*v+1],e[2*g],e[2*g+1])<0;)_=this._addTriangle(v,c,g,r[c],-1,r[v]),r[c]=this._legalize(_+2),n[v]=v,C--,v=g;if(h===d)for(;g=t[h],td(l,u,e[2*g],e[2*g+1],e[2*h],e[2*h+1])<0;)_=this._addTriangle(g,c,h,-1,r[h],r[g]),this._legalize(_+2),r[g]=_,n[h]=h,C--,h=g;this._hullStart=t[c]=h,n[h]=t[v]=c,n[c]=v,i[this._hashKey(l,u)]=c,i[this._hashKey(e[2*h],e[2*h+1])]=h}this.hull=new Uint32Array(C);for(let e=0,t=this._hullStart;e<C;e++)this.hull[e]=t,t=n[t];this.triangles=this._triangles.subarray(0,this.trianglesLen),this.halfedges=this._halfedges.subarray(0,this.trianglesLen)}_hashKey(e,t){return Math.floor(ad(e-this._cx,t-this._cy)*this._hashSize)%this._hashSize}_legalize(e){let{_triangles:t,_halfedges:n,coords:r}=this,i=0,a=0;for(;;){let o=n[e],s=e-e%3;if(a=s+(e+2)%3,o===-1){if(i===0)break;e=rd[--i];continue}let c=o-o%3,l=s+(e+1)%3,u=c+(o+2)%3,d=t[a],f=t[e],p=t[l],m=t[u];if(sd(r[2*d],r[2*d+1],r[2*f],r[2*f+1],r[2*p],r[2*p+1],r[2*m],r[2*m+1])){t[e]=m,t[o]=d;let r=n[u];if(r===-1){let t=this._hullStart;do{if(this._hullTri[t]===u){this._hullTri[t]=e;break}t=this._hullPrev[t]}while(t!==this._hullStart)}this._link(e,r),this._link(o,n[a]),this._link(a,u);let s=c+(o+1)%3;i<rd.length&&(rd[i++]=s)}else{if(i===0)break;e=rd[--i]}}return a}_link(e,t){this._halfedges[e]=t,t!==-1&&(this._halfedges[t]=e)}_addTriangle(e,t,n,r,i,a){let o=this.trianglesLen;return this._triangles[o]=e,this._triangles[o+1]=t,this._triangles[o+2]=n,this._link(o,r),this._link(o+1,i),this._link(o+2,a),this.trianglesLen+=3,o}};function ad(e,t){let n=e/(Math.abs(e)+Math.abs(t));return(t>0?3-n:1+n)/4}function od(e,t,n,r){let i=e-n,a=t-r;return i*i+a*a}function sd(e,t,n,r,i,a,o,s){let c=e-o,l=t-s,u=n-o,d=r-s,f=i-o,p=a-s,m=c*c+l*l,h=u*u+d*d,g=f*f+p*p;return c*(d*g-h*p)-l*(u*g-h*f)+m*(u*p-d*f)<0}function cd(e,t,n,r,i,a){let o=n-e,s=r-t,c=i-e,l=a-t,u=o*o+s*s,d=c*c+l*l,f=.5/(o*l-s*c),p=(l*u-s*d)*f,m=(o*d-c*u)*f;return p*p+m*m}function ld(e,t,n,r,i,a){let o=n-e,s=r-t,c=i-e,l=a-t,u=o*o+s*s,d=c*c+l*l,f=.5/(o*l-s*c);return{x:e+(l*u-s*d)*f,y:t+(o*d-c*u)*f}}function ud(e,t,n,r){if(r-n<=20)for(let i=n+1;i<=r;i++){let r=e[i],a=t[r],o=i-1;for(;o>=n&&t[e[o]]>a;)e[o+1]=e[o--];e[o+1]=r}else{let i=n+r>>1,a=n+1,o=r;dd(e,i,a),t[e[n]]>t[e[r]]&&dd(e,n,r),t[e[a]]>t[e[r]]&&dd(e,a,r),t[e[n]]>t[e[a]]&&dd(e,n,a);let s=e[a],c=t[s];for(;;){do a++;while(t[e[a]]<c);do o--;while(t[e[o]]>c);if(o<a)break;dd(e,a,o)}e[n+1]=e[o],e[o]=s,r-a+1>=o-n?(ud(e,t,a,r),ud(e,t,n,o-1)):(ud(e,t,n,o-1),ud(e,t,a,r))}}function dd(e,t,n){let r=e[t];e[t]=e[n],e[n]=r}function fd(e){return e[0]}function pd(e){return e[1]}var md=1e-6,hd=class{constructor(){this._x0=this._y0=this._x1=this._y1=null,this._=``}moveTo(e,t){this._+=`M${this._x0=this._x1=+e},${this._y0=this._y1=+t}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._+=`Z`)}lineTo(e,t){this._+=`L${this._x1=+e},${this._y1=+t}`}arc(e,t,n){e=+e,t=+t,n=+n;let r=e+n,i=t;if(n<0)throw Error(`negative radius`);this._x1===null?this._+=`M${r},${i}`:(Math.abs(this._x1-r)>md||Math.abs(this._y1-i)>md)&&(this._+=`L`+r+`,`+i),n&&(this._+=`A${n},${n},0,1,1,${e-n},${t}A${n},${n},0,1,1,${this._x1=r},${this._y1=i}`)}rect(e,t,n,r){this._+=`M${this._x0=this._x1=+e},${this._y0=this._y1=+t}h${+n}v${+r}h${-n}Z`}value(){return this._||null}},gd=class{constructor(){this._=[]}moveTo(e,t){this._.push([e,t])}closePath(){this._.push(this._[0].slice())}lineTo(e,t){this._.push([e,t])}value(){return this._.length?this._:null}},_d=class{constructor(e,[t,n,r,i]=[0,0,960,500]){if(!((r=+r)>=(t=+t))||!((i=+i)>=(n=+n)))throw Error(`invalid bounds`);this.delaunay=e,this._circumcenters=new Float64Array(e.points.length*2),this.vectors=new Float64Array(e.points.length*2),this.xmax=r,this.xmin=t,this.ymax=i,this.ymin=n,this._init()}update(){return this.delaunay.update(),this._init(),this}_init(){let{delaunay:{points:e,hull:t,triangles:n},vectors:r}=this,i,a,o=this.circumcenters=this._circumcenters.subarray(0,n.length/3*2);for(let r=0,s=0,c=n.length,l,u;r<c;r+=3,s+=2){let c=n[r]*2,d=n[r+1]*2,f=n[r+2]*2,p=e[c],m=e[c+1],h=e[d],g=e[d+1],_=e[f],v=e[f+1],y=h-p,b=g-m,x=_-p,S=v-m,C=(y*S-b*x)*2;if(Math.abs(C)<1e-9){if(i===void 0){i=a=0;for(let n of t)i+=e[n*2],a+=e[n*2+1];i/=t.length,a/=t.length}let n=1e9*Math.sign((i-p)*S-(a-m)*x);l=(p+_)/2-n*S,u=(m+v)/2+n*x}else{let e=1/C,t=y*y+b*b,n=x*x+S*S;l=p+(S*t-b*n)*e,u=m+(y*n-x*t)*e}o[s]=l,o[s+1]=u}let s=t[t.length-1],c,l=s*4,u,d=e[2*s],f,p=e[2*s+1];r.fill(0);for(let n=0;n<t.length;++n)s=t[n],c=l,u=d,f=p,l=s*4,d=e[2*s],p=e[2*s+1],r[c+2]=r[l]=f-p,r[c+3]=r[l+1]=d-u}render(e){let t=e==null?e=new hd:void 0,{delaunay:{halfedges:n,inedges:r,hull:i},circumcenters:a,vectors:o}=this;if(i.length<=1)return null;for(let t=0,r=n.length;t<r;++t){let r=n[t];if(r<t)continue;let i=Math.floor(t/3)*2,o=Math.floor(r/3)*2,s=a[i],c=a[i+1],l=a[o],u=a[o+1];this._renderSegment(s,c,l,u,e)}let s,c=i[i.length-1];for(let t=0;t<i.length;++t){s=c,c=i[t];let n=Math.floor(r[c]/3)*2,l=a[n],u=a[n+1],d=s*4,f=this._project(l,u,o[d+2],o[d+3]);f&&this._renderSegment(l,u,f[0],f[1],e)}return t&&t.value()}renderBounds(e){let t=e==null?e=new hd:void 0;return e.rect(this.xmin,this.ymin,this.xmax-this.xmin,this.ymax-this.ymin),t&&t.value()}renderCell(e,t){let n=t==null?t=new hd:void 0,r=this._clip(e);if(r===null||!r.length)return;t.moveTo(r[0],r[1]);let i=r.length;for(;r[0]===r[i-2]&&r[1]===r[i-1]&&i>1;)i-=2;for(let e=2;e<i;e+=2)(r[e]!==r[e-2]||r[e+1]!==r[e-1])&&t.lineTo(r[e],r[e+1]);return t.closePath(),n&&n.value()}*cellPolygons(){let{delaunay:{points:e}}=this;for(let t=0,n=e.length/2;t<n;++t){let e=this.cellPolygon(t);e&&(e.index=t,yield e)}}cellPolygon(e){let t=new gd;return this.renderCell(e,t),t.value()}_renderSegment(e,t,n,r,i){let a,o=this._regioncode(e,t),s=this._regioncode(n,r);o===0&&s===0?(i.moveTo(e,t),i.lineTo(n,r)):(a=this._clipSegment(e,t,n,r,o,s))&&(i.moveTo(a[0],a[1]),i.lineTo(a[2],a[3]))}contains(e,t,n){return t=+t,t!==t||(n=+n,n!==n)?!1:this.delaunay._step(e,t,n)===e}*neighbors(e){let t=this._clip(e);if(t)for(let n of this.delaunay.neighbors(e)){let e=this._clip(n);if(e){loop:for(let r=0,i=t.length;r<i;r+=2)for(let a=0,o=e.length;a<o;a+=2)if(t[r]===e[a]&&t[r+1]===e[a+1]&&t[(r+2)%i]===e[(a+o-2)%o]&&t[(r+3)%i]===e[(a+o-1)%o]){yield n;break loop}}}}_cell(e){let{circumcenters:t,delaunay:{inedges:n,halfedges:r,triangles:i}}=this,a=n[e];if(a===-1)return null;let o=[],s=a;do{let n=Math.floor(s/3);if(o.push(t[n*2],t[n*2+1]),s=s%3==2?s-2:s+1,i[s]!==e)break;s=r[s]}while(s!==a&&s!==-1);return o}_clip(e){if(e===0&&this.delaunay.hull.length===1)return[this.xmax,this.ymin,this.xmax,this.ymax,this.xmin,this.ymax,this.xmin,this.ymin];let t=this._cell(e);if(t===null)return null;let{vectors:n}=this,r=e*4;return this._simplify(n[r]||n[r+1]?this._clipInfinite(e,t,n[r],n[r+1],n[r+2],n[r+3]):this._clipFinite(e,t))}_clipFinite(e,t){let n=t.length,r=null,i,a,o=t[n-2],s=t[n-1],c,l=this._regioncode(o,s),u,d=0;for(let f=0;f<n;f+=2)if(i=o,a=s,o=t[f],s=t[f+1],c=l,l=this._regioncode(o,s),c===0&&l===0)u=d,d=0,r?r.push(o,s):r=[o,s];else{let t,n,f,p,m;if(c===0){if((t=this._clipSegment(i,a,o,s,c,l))===null)continue;[n,f,p,m]=t}else{if((t=this._clipSegment(o,s,i,a,l,c))===null)continue;[p,m,n,f]=t,u=d,d=this._edgecode(n,f),u&&d&&this._edge(e,u,d,r,r.length),r?r.push(n,f):r=[n,f]}u=d,d=this._edgecode(p,m),u&&d&&this._edge(e,u,d,r,r.length),r?r.push(p,m):r=[p,m]}if(r)u=d,d=this._edgecode(r[0],r[1]),u&&d&&this._edge(e,u,d,r,r.length);else if(this.contains(e,(this.xmin+this.xmax)/2,(this.ymin+this.ymax)/2))return[this.xmax,this.ymin,this.xmax,this.ymax,this.xmin,this.ymax,this.xmin,this.ymin];return r}_clipSegment(e,t,n,r,i,a){let o=i<a;for(o&&([e,t,n,r,i,a]=[n,r,e,t,a,i]);;){if(i===0&&a===0)return o?[n,r,e,t]:[e,t,n,r];if(i&a)return null;let s,c,l=i||a;l&8?(s=e+(n-e)*(this.ymax-t)/(r-t),c=this.ymax):l&4?(s=e+(n-e)*(this.ymin-t)/(r-t),c=this.ymin):l&2?(c=t+(r-t)*(this.xmax-e)/(n-e),s=this.xmax):(c=t+(r-t)*(this.xmin-e)/(n-e),s=this.xmin),i?(e=s,t=c,i=this._regioncode(e,t)):(n=s,r=c,a=this._regioncode(n,r))}}_clipInfinite(e,t,n,r,i,a){let o=Array.from(t),s;if((s=this._project(o[0],o[1],n,r))&&o.unshift(s[0],s[1]),(s=this._project(o[o.length-2],o[o.length-1],i,a))&&o.push(s[0],s[1]),o=this._clipFinite(e,o))for(let t=0,n=o.length,r,i=this._edgecode(o[n-2],o[n-1]);t<n;t+=2)r=i,i=this._edgecode(o[t],o[t+1]),r&&i&&(t=this._edge(e,r,i,o,t),n=o.length);else this.contains(e,(this.xmin+this.xmax)/2,(this.ymin+this.ymax)/2)&&(o=[this.xmin,this.ymin,this.xmax,this.ymin,this.xmax,this.ymax,this.xmin,this.ymax]);return o}_edge(e,t,n,r,i){for(;t!==n;){let n,a;switch(t){case 5:t=4;continue;case 4:t=6,n=this.xmax,a=this.ymin;break;case 6:t=2;continue;case 2:t=10,n=this.xmax,a=this.ymax;break;case 10:t=8;continue;case 8:t=9,n=this.xmin,a=this.ymax;break;case 9:t=1;continue;case 1:t=5,n=this.xmin,a=this.ymin}(r[i]!==n||r[i+1]!==a)&&this.contains(e,n,a)&&(r.splice(i,0,n,a),i+=2)}return i}_project(e,t,n,r){let i=1/0,a,o,s;if(r<0){if(t<=this.ymin)return null;(a=(this.ymin-t)/r)<i&&(s=this.ymin,o=e+(i=a)*n)}else if(r>0){if(t>=this.ymax)return null;(a=(this.ymax-t)/r)<i&&(s=this.ymax,o=e+(i=a)*n)}if(n>0){if(e>=this.xmax)return null;(a=(this.xmax-e)/n)<i&&(o=this.xmax,s=t+(i=a)*r)}else if(n<0){if(e<=this.xmin)return null;(a=(this.xmin-e)/n)<i&&(o=this.xmin,s=t+(i=a)*r)}return[o,s]}_edgecode(e,t){return(e===this.xmin?1:e===this.xmax?2:0)|(t===this.ymin?4:t===this.ymax?8:0)}_regioncode(e,t){return(e<this.xmin?1:e>this.xmax?2:0)|(t<this.ymin?4:t>this.ymax?8:0)}_simplify(e){if(e&&e.length>4){for(let t=0;t<e.length;t+=2){let n=(t+2)%e.length,r=(t+4)%e.length;(e[t]===e[n]&&e[n]===e[r]||e[t+1]===e[n+1]&&e[n+1]===e[r+1])&&(e.splice(n,2),t-=2)}e.length||(e=null)}return e}},vd=2*Math.PI,yd=Math.pow;function bd(e){return e[0]}function xd(e){return e[1]}function Sd(e){let{triangles:t,coords:n}=e;for(let e=0;e<t.length;e+=3){let r=2*t[e],i=2*t[e+1],a=2*t[e+2];if((n[a]-n[r])*(n[i+1]-n[r+1])-(n[i]-n[r])*(n[a+1]-n[r+1])>1e-10)return!1}return!0}function Cd(e,t,n){return[e+Math.sin(e+t)*n,t+Math.cos(e-t)*n]}var wd=class e{static from(t,n=bd,r=xd,i){return new e(`length`in t?Td(t,n,r,i):Float64Array.from(Ed(t,n,r,i)))}constructor(e){this._delaunator=new id(e),this.inedges=new Int32Array(e.length/2),this._hullIndex=new Int32Array(e.length/2),this.points=this._delaunator.coords,this._init()}update(){return this._delaunator.update(),this._init(),this}_init(){let e=this._delaunator,t=this.points;if(e.hull&&e.hull.length>2&&Sd(e)){this.collinear=Int32Array.from({length:t.length/2},(e,t)=>t).sort((e,n)=>t[2*e]-t[2*n]||t[2*e+1]-t[2*n+1]);let e=this.collinear[0],n=this.collinear[this.collinear.length-1],r=[t[2*e],t[2*e+1],t[2*n],t[2*n+1]],i=1e-8*Math.hypot(r[3]-r[1],r[2]-r[0]);for(let e=0,n=t.length/2;e<n;++e){let n=Cd(t[2*e],t[2*e+1],i);t[2*e]=n[0],t[2*e+1]=n[1]}this._delaunator=new id(t)}else delete this.collinear;let n=this.halfedges=this._delaunator.halfedges,r=this.hull=this._delaunator.hull,i=this.triangles=this._delaunator.triangles,a=this.inedges.fill(-1),o=this._hullIndex.fill(-1);for(let e=0,t=n.length;e<t;++e){let t=i[e%3==2?e-2:e+1];(n[e]===-1||a[t]===-1)&&(a[t]=e)}for(let e=0,t=r.length;e<t;++e)o[r[e]]=e;r.length<=2&&r.length>0&&(this.triangles=new Int32Array(3).fill(-1),this.halfedges=new Int32Array(3).fill(-1),this.triangles[0]=r[0],a[r[0]]=1,r.length===2&&(a[r[1]]=0,this.triangles[1]=r[1],this.triangles[2]=r[1]))}voronoi(e){return new _d(this,e)}*neighbors(e){let{inedges:t,hull:n,_hullIndex:r,halfedges:i,triangles:a,collinear:o}=this;if(o){let t=o.indexOf(e);t>0&&(yield o[t-1]),t<o.length-1&&(yield o[t+1]);return}let s=t[e];if(s===-1)return;let c=s,l=-1;do{if(yield l=a[c],c=c%3==2?c-2:c+1,a[c]!==e)return;if(c=i[c],c===-1){let t=n[(r[e]+1)%n.length];t!==l&&(yield t);return}}while(c!==s)}find(e,t,n=0){if(e=+e,e!==e||(t=+t,t!==t))return-1;let r=n,i;for(;(i=this._step(n,e,t))>=0&&i!==n&&i!==r;)n=i;return i}_step(e,t,n){let{inedges:r,hull:i,_hullIndex:a,halfedges:o,triangles:s,points:c}=this;if(r[e]===-1||!c.length)return(e+1)%(c.length>>1);let l=e,u=yd(t-c[e*2],2)+yd(n-c[e*2+1],2),d=r[e],f=d;do{let r=s[f],d=yd(t-c[r*2],2)+yd(n-c[r*2+1],2);if(d<u&&(u=d,l=r),f=f%3==2?f-2:f+1,s[f]!==e)break;if(f=o[f],f===-1){if(f=i[(a[e]+1)%i.length],f!==r&&yd(t-c[f*2],2)+yd(n-c[f*2+1],2)<u)return f;break}}while(f!==d);return l}render(e){let t=e==null?e=new hd:void 0,{points:n,halfedges:r,triangles:i}=this;for(let t=0,a=r.length;t<a;++t){let a=r[t];if(a<t)continue;let o=i[t]*2,s=i[a]*2;e.moveTo(n[o],n[o+1]),e.lineTo(n[s],n[s+1])}return this.renderHull(e),t&&t.value()}renderPoints(e,t){t===void 0&&(!e||typeof e.moveTo!=`function`)&&(t=e,e=null),t=t==null?2:+t;let n=e==null?e=new hd:void 0,{points:r}=this;for(let n=0,i=r.length;n<i;n+=2){let i=r[n],a=r[n+1];e.moveTo(i+t,a),e.arc(i,a,t,0,vd)}return n&&n.value()}renderHull(e){let t=e==null?e=new hd:void 0,{hull:n,points:r}=this,i=n[0]*2,a=n.length;e.moveTo(r[i],r[i+1]);for(let t=1;t<a;++t){let i=2*n[t];e.lineTo(r[i],r[i+1])}return e.closePath(),t&&t.value()}hullPolygon(){let e=new gd;return this.renderHull(e),e.value()}renderTriangle(e,t){let n=t==null?t=new hd:void 0,{points:r,triangles:i}=this,a=i[e*=3]*2,o=i[e+1]*2,s=i[e+2]*2;return t.moveTo(r[a],r[a+1]),t.lineTo(r[o],r[o+1]),t.lineTo(r[s],r[s+1]),t.closePath(),n&&n.value()}*trianglePolygons(){let{triangles:e}=this;for(let t=0,n=e.length/3;t<n;++t)yield this.trianglePolygon(t)}trianglePolygon(e){let t=new gd;return this.renderTriangle(e,t),t.value()}};function Td(e,t,n,r){let i=e.length,a=new Float64Array(i*2);for(let o=0;o<i;++o){let i=e[o];a[o*2]=t.call(r,i,o,e),a[o*2+1]=n.call(r,i,o,e)}return a}function*Ed(e,t,n,r){let i=0;for(let a of e)yield t.call(r,a,i,e),yield n.call(r,a,i,e),++i}function Dd(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString(`en`).replace(/,/g,``):e.toString(10)}function Od(e,t){if(!isFinite(e)||e===0)return null;var n=(e=t?e.toExponential(t-1):e.toExponential()).indexOf(`e`),r=e.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+e.slice(n+1)]}function kd(e){return e=Od(Math.abs(e)),e?e[1]:NaN}function Ad(e,t){return function(n,r){for(var i=n.length,a=[],o=0,s=e[0],c=0;i>0&&s>0&&(c+s+1>r&&(s=Math.max(1,r-c)),a.push(n.substring(i-=s,i+s)),!((c+=s+1)>r));)s=e[o=(o+1)%e.length];return a.reverse().join(t)}}function jd(e){return function(t){return t.replace(/[0-9]/g,function(t){return e[+t]})}}var Md=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Nd(e){if(!(t=Md.exec(e)))throw Error(`invalid format: `+e);var t;return new Pd({fill:t[1],align:t[2],sign:t[3],symbol:t[4],zero:t[5],width:t[6],comma:t[7],precision:t[8]&&t[8].slice(1),trim:t[9],type:t[10]})}Nd.prototype=Pd.prototype;function Pd(e){this.fill=e.fill===void 0?` `:e.fill+``,this.align=e.align===void 0?`>`:e.align+``,this.sign=e.sign===void 0?`-`:e.sign+``,this.symbol=e.symbol===void 0?``:e.symbol+``,this.zero=!!e.zero,this.width=e.width===void 0?void 0:+e.width,this.comma=!!e.comma,this.precision=e.precision===void 0?void 0:+e.precision,this.trim=!!e.trim,this.type=e.type===void 0?``:e.type+``}Pd.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?`0`:``)+(this.width===void 0?``:Math.max(1,this.width|0))+(this.comma?`,`:``)+(this.precision===void 0?``:`.`+Math.max(0,this.precision|0))+(this.trim?`~`:``)+this.type};function Fd(e){out:for(var t=e.length,n=1,r=-1,i;n<t;++n)switch(e[n]){case`.`:r=i=n;break;case`0`:r===0&&(r=n),i=n;break;default:if(!+e[n])break out;r>0&&(r=0)}return r>0?e.slice(0,r)+e.slice(i+1):e}var Id;function Ld(e,t){var n=Od(e,t);if(!n)return Id=void 0,e.toPrecision(t);var r=n[0],i=n[1],a=i-(Id=Math.max(-8,Math.min(8,Math.floor(i/3)))*3)+1,o=r.length;return a===o?r:a>o?r+Array(a-o+1).join(`0`):a>0?r.slice(0,a)+`.`+r.slice(a):`0.`+Array(1-a).join(`0`)+Od(e,Math.max(0,t+a-1))[0]}function Rd(e,t){var n=Od(e,t);if(!n)return e+``;var r=n[0],i=n[1];return i<0?`0.`+Array(-i).join(`0`)+r:r.length>i+1?r.slice(0,i+1)+`.`+r.slice(i+1):r+Array(i-r.length+2).join(`0`)}var zd={"%":(e,t)=>(e*100).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+``,d:Dd,e:(e,t)=>e.toExponential(t),f:(e,t)=>e.toFixed(t),g:(e,t)=>e.toPrecision(t),o:e=>Math.round(e).toString(8),p:(e,t)=>Rd(e*100,t),r:Rd,s:Ld,X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function Bd(e){return e}var Vd=Array.prototype.map,Hd=[`y`,`z`,`a`,`f`,`p`,`n`,`µ`,`m`,``,`k`,`M`,`G`,`T`,`P`,`E`,`Z`,`Y`];function Ud(e){var t=e.grouping===void 0||e.thousands===void 0?Bd:Ad(Vd.call(e.grouping,Number),e.thousands+``),n=e.currency===void 0?``:e.currency[0]+``,r=e.currency===void 0?``:e.currency[1]+``,i=e.decimal===void 0?`.`:e.decimal+``,a=e.numerals===void 0?Bd:jd(Vd.call(e.numerals,String)),o=e.percent===void 0?`%`:e.percent+``,s=e.minus===void 0?`−`:e.minus+``,c=e.nan===void 0?`NaN`:e.nan+``;function l(e,l){e=Nd(e);var u=e.fill,d=e.align,f=e.sign,p=e.symbol,m=e.zero,h=e.width,g=e.comma,_=e.precision,v=e.trim,y=e.type;y===`n`?(g=!0,y=`g`):zd[y]||(_===void 0&&(_=12),v=!0,y=`g`),(m||u===`0`&&d===`=`)&&(m=!0,u=`0`,d=`=`);var b=(l&&l.prefix!==void 0?l.prefix:``)+(p===`$`?n:p===`#`&&/[boxX]/.test(y)?`0`+y.toLowerCase():``),x=(p===`$`?r:/[%p]/.test(y)?o:``)+(l&&l.suffix!==void 0?l.suffix:``),S=zd[y],C=/[defgprs%]/.test(y);_=_===void 0?6:/[gprs]/.test(y)?Math.max(1,Math.min(21,_)):Math.max(0,Math.min(20,_));function w(e){var n=b,r=x,o,l,p;if(y===`c`)r=S(e)+r,e=``;else{e=+e;var w=e<0||1/e<0;if(e=isNaN(e)?c:S(Math.abs(e),_),v&&(e=Fd(e)),w&&+e==0&&f!==`+`&&(w=!1),n=(w?f===`(`?f:s:f===`-`||f===`(`?``:f)+n,r=(y===`s`&&!isNaN(e)&&Id!==void 0?Hd[8+Id/3]:``)+r+(w&&f===`(`?`)`:``),C){for(o=-1,l=e.length;++o<l;)if(p=e.charCodeAt(o),48>p||p>57){r=(p===46?i+e.slice(o+1):e.slice(o))+r,e=e.slice(0,o);break}}}g&&!m&&(e=t(e,1/0));var T=n.length+e.length+r.length,E=T<h?Array(h-T+1).join(u):``;switch(g&&m&&(e=t(E+e,E.length?h-r.length:1/0),E=``),d){case`<`:e=n+e+r+E;break;case`=`:e=n+E+e+r;break;case`^`:e=E.slice(0,T=E.length>>1)+n+e+r+E.slice(T);break;default:e=E+n+e+r}return a(e)}return w.toString=function(){return e+``},w}function u(e,t){var n=Math.max(-8,Math.min(8,Math.floor(kd(t)/3)))*3,r=10**-n,i=l((e=Nd(e),e.type=`f`,e),{suffix:Hd[8+n/3]});return function(e){return i(r*e)}}return{format:l,formatPrefix:u}}var Wd,Gd,Kd;qd({thousands:`,`,grouping:[3],currency:[`$`,``]});function qd(e){return Wd=Ud(e),Gd=Wd.format,Kd=Wd.formatPrefix,Wd}function Jd(e){return Math.max(0,-kd(Math.abs(e)))}function Yd(e,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(kd(t)/3)))*3-kd(Math.abs(e)))}function Xd(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,kd(t)-kd(e))+1}function Zd(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e)}return this}var Qd=Symbol(`implicit`);function $d(){var e=new Ii,t=[],n=[],r=Qd;function i(i){let a=e.get(i);if(a===void 0){if(r!==Qd)return r;e.set(i,a=t.push(i)-1)}return n[a%n.length]}return i.domain=function(n){if(!arguments.length)return t.slice();t=[],e=new Ii;for(let r of n)e.has(r)||e.set(r,t.push(r)-1);return i},i.range=function(e){return arguments.length?(n=Array.from(e),i):n.slice()},i.unknown=function(e){return arguments.length?(r=e,i):r},i.copy=function(){return $d(t,n).unknown(r)},Zd.apply(i,arguments),i}function ef(){var e=$d().unknown(void 0),t=e.domain,n=e.range,r=0,i=1,a,o,s=!1,c=0,l=0,u=.5;delete e.unknown;function d(){var e=t().length,d=i<r,f=d?i:r,p=d?r:i;a=(p-f)/Math.max(1,e-c+l*2),s&&(a=Math.floor(a)),f+=(p-f-a*(e-c))*u,o=a*(1-c),s&&(f=Math.round(f),o=Math.round(o));var m=ra(e).map(function(e){return f+a*e});return n(d?m.reverse():m)}return e.domain=function(e){return arguments.length?(t(e),d()):t()},e.range=function(e){return arguments.length?([r,i]=e,r=+r,i=+i,d()):[r,i]},e.rangeRound=function(e){return[r,i]=e,r=+r,i=+i,s=!0,d()},e.bandwidth=function(){return o},e.step=function(){return a},e.round=function(e){return arguments.length?(s=!!e,d()):s},e.padding=function(e){return arguments.length?(c=Math.min(1,l=+e),d()):c},e.paddingInner=function(e){return arguments.length?(c=Math.min(1,e),d()):c},e.paddingOuter=function(e){return arguments.length?(l=+e,d()):l},e.align=function(e){return arguments.length?(u=Math.max(0,Math.min(1,e)),d()):u},e.copy=function(){return ef(t(),[r,i]).round(s).paddingInner(c).paddingOuter(l).align(u)},Zd.apply(d(),arguments)}function tf(e){var t=e.copy;return e.padding=e.paddingOuter,delete e.paddingInner,delete e.paddingOuter,e.copy=function(){return tf(t())},e}function nf(){return tf(ef.apply(null,arguments).paddingInner(1))}function rf(e){return function(){return e}}function af(e){return+e}var of=[0,1];function sf(e){return e}function cf(e,t){return(t-=e=+e)?function(n){return(n-e)/t}:rf(isNaN(t)?NaN:.5)}function lf(e,t){var n;return e>t&&(n=e,e=t,t=n),function(n){return Math.max(e,Math.min(t,n))}}function uf(e,t,n){var r=e[0],i=e[1],a=t[0],o=t[1];return i<r?(r=cf(i,r),a=n(o,a)):(r=cf(r,i),a=n(a,o)),function(e){return a(r(e))}}function df(e,t,n){var r=Math.min(e.length,t.length)-1,i=Array(r),a=Array(r),o=-1;for(e[r]<e[0]&&(e=e.slice().reverse(),t=t.slice().reverse());++o<r;)i[o]=cf(e[o],e[o+1]),a[o]=n(t[o],t[o+1]);return function(t){var n=Pi(e,t,1,r)-1;return a[n](i[n](t))}}function ff(e,t){return t.domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown())}function pf(){var e=of,t=of,n=Ac,r,i,a,o=sf,s,c,l;function u(){var n=Math.min(e.length,t.length);return o!==sf&&(o=lf(e[0],e[n-1])),s=n>2?df:uf,c=l=null,d}function d(i){return i==null||isNaN(i=+i)?a:(c||=s(e.map(r),t,n))(r(o(i)))}return d.invert=function(n){return o(i((l||=s(t,e.map(r),Cc))(n)))},d.domain=function(t){return arguments.length?(e=Array.from(t,af),u()):e.slice()},d.range=function(e){return arguments.length?(t=Array.from(e),u()):t.slice()},d.rangeRound=function(e){return t=Array.from(e),n=jc,u()},d.clamp=function(e){return arguments.length?(o=e?!0:sf,u()):o!==sf},d.interpolate=function(e){return arguments.length?(n=e,u()):n},d.unknown=function(e){return arguments.length?(a=e,d):a},function(e,t){return r=e,i=t,u()}}function mf(){return pf()(sf,sf)}function hf(e,t,n,r){var i=ea(e,t,n),a;switch(r=Nd(r??`,f`),r.type){case`s`:var o=Math.max(Math.abs(e),Math.abs(t));return r.precision==null&&!isNaN(a=Yd(i,o))&&(r.precision=a),Kd(r,o);case``:case`e`:case`g`:case`p`:case`r`:r.precision==null&&!isNaN(a=Xd(i,Math.max(Math.abs(e),Math.abs(t))))&&(r.precision=a-(r.type===`e`));break;case`f`:case`%`:r.precision==null&&!isNaN(a=Jd(i))&&(r.precision=a-(r.type===`%`)*2)}return Gd(r)}function gf(e){var t=e.domain;return e.ticks=function(e){var n=t();return Qi(n[0],n[n.length-1],e??10)},e.tickFormat=function(e,n){var r=t();return hf(r[0],r[r.length-1],e??10,n)},e.nice=function(n){n??=10;var r=t(),i=0,a=r.length-1,o=r[i],s=r[a],c,l,u=10;for(s<o&&(l=o,o=s,s=l,l=i,i=a,a=l);u-->0;){if(l=$i(o,s,n),l===c)return r[i]=o,r[a]=s,t(r);if(l>0)o=Math.floor(o/l)*l,s=Math.ceil(s/l)*l;else if(l<0)o=Math.ceil(o*l)/l,s=Math.floor(s*l)/l;else break;c=l}return e},e}function _f(){var e=mf();return e.copy=function(){return ff(e,_f())},Zd.apply(e,arguments),gf(e)}function vf(e,t){e=e.slice();var n=0,r=e.length-1,i=e[n],a=e[r],o;return a<i&&(o=n,n=r,r=o,o=i,i=a,a=o),e[n]=t.floor(i),e[r]=t.ceil(a),e}function yf(e){return Math.log(e)}function bf(e){return Math.exp(e)}function xf(e){return-Math.log(-e)}function Sf(e){return-Math.exp(-e)}function Cf(e){return isFinite(e)?+(`1e`+e):e<0?0:e}function wf(e){return e===10?Cf:e===Math.E?Math.exp:t=>e**+t}function Tf(e){return e===Math.E?Math.log:e===10&&Math.log10||e===2&&Math.log2||(e=Math.log(e),t=>Math.log(t)/e)}function Ef(e){return(t,n)=>-e(-t,n)}function Df(e){let t=e(yf,bf),n=t.domain,r=10,i,a;function o(){return i=Tf(r),a=wf(r),n()[0]<0?(i=Ef(i),a=Ef(a),e(xf,Sf)):e(yf,bf),t}return t.base=function(e){return arguments.length?(r=+e,o()):r},t.domain=function(e){return arguments.length?(n(e),o()):n()},t.ticks=e=>{let t=n(),o=t[0],s=t[t.length-1],c=s<o;c&&([o,s]=[s,o]);let l=i(o),u=i(s),d,f,p=e==null?10:+e,m=[];if(!(r%1)&&u-l<p){if(l=Math.floor(l),u=Math.ceil(u),o>0){for(;l<=u;++l)for(d=1;d<r;++d)if(f=l<0?d/a(-l):d*a(l),!(f<o)){if(f>s)break;m.push(f)}}else for(;l<=u;++l)for(d=r-1;d>=1;--d)if(f=l>0?d/a(-l):d*a(l),!(f<o)){if(f>s)break;m.push(f)}m.length*2<p&&(m=Qi(o,s,p))}else m=Qi(l,u,Math.min(u-l,p)).map(a);return c?m.reverse():m},t.tickFormat=(e,n)=>{if(e??=10,n??=r===10?`s`:`,`,typeof n!=`function`&&(!(r%1)&&(n=Nd(n)).precision==null&&(n.trim=!0),n=Gd(n)),e===1/0)return n;let o=Math.max(1,r*e/t.ticks().length);return e=>{let t=e/a(Math.round(i(e)));return t*r<r-.5&&(t*=r),t<=o?n(e):``}},t.nice=()=>n(vf(n(),{floor:e=>a(Math.floor(i(e))),ceil:e=>a(Math.ceil(i(e)))})),t}function Of(){let e=Df(pf()).domain([1,10]);return e.copy=()=>ff(e,Of()).base(e.base()),Zd.apply(e,arguments),e}function kf(e){return function(t){return Math.sign(t)*Math.log1p(Math.abs(t/e))}}function Af(e){return function(t){return Math.sign(t)*Math.expm1(Math.abs(t))*e}}function jf(e){var t=1,n=e(kf(t),Af(t));return n.constant=function(n){return arguments.length?e(kf(t=+n),Af(t)):t},gf(n)}function Mf(){var e=jf(pf());return e.copy=function(){return ff(e,Mf()).constant(e.constant())},Zd.apply(e,arguments)}function Nf(e){return function(t){return t<0?-((-t)**+e):t**+e}}function Pf(e){return e<0?-Math.sqrt(-e):Math.sqrt(e)}function Ff(e){return e<0?-e*e:e*e}function If(e){var t=e(sf,sf),n=1;function r(){return n===1?e(sf,sf):n===.5?e(Pf,Ff):e(Nf(n),Nf(1/n))}return t.exponent=function(e){return arguments.length?(n=+e,r()):n},gf(t)}function Lf(){var e=If(pf());return e.copy=function(){return ff(e,Lf()).exponent(e.exponent())},Zd.apply(e,arguments),e}function Rf(){return Lf.apply(null,arguments).exponent(.5)}var zf=new Date,Bf=new Date;function Vf(e,t,n,r){function i(t){return e(t=arguments.length===0?new Date:new Date(+t)),t}return i.floor=t=>(e(t=new Date(+t)),t),i.ceil=n=>(e(n=new Date(n-1)),t(n,1),e(n),n),i.round=e=>{let t=i(e),n=i.ceil(e);return e-t<n-e?t:n},i.offset=(e,n)=>(t(e=new Date(+e),n==null?1:Math.floor(n)),e),i.range=(n,r,a)=>{let o=[];if(n=i.ceil(n),a=a==null?1:Math.floor(a),!(n<r)||!(a>0))return o;let s;do o.push(s=new Date(+n)),t(n,a),e(n);while(s<n&&n<r);return o},i.filter=n=>Vf(t=>{if(t>=t)for(;e(t),!n(t);)t.setTime(t-1)},(e,r)=>{if(e>=e){if(r<0)for(;++r<=0;)for(;t(e,-1),!n(e););else for(;--r>=0;)for(;t(e,1),!n(e););}}),n&&(i.count=(t,r)=>(zf.setTime(+t),Bf.setTime(+r),e(zf),e(Bf),Math.floor(n(zf,Bf))),i.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?i.filter(r?t=>r(t)%e===0:t=>i.count(0,t)%e===0):i)),i}var Hf=6e4,Uf=Hf*60*24,Wf=Uf*7;Uf*30,Uf*365;var Gf=Vf(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*Hf)/Uf,e=>e.getDate()-1);Gf.range;var Kf=Vf(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/Uf,e=>e.getUTCDate()-1);Kf.range,Vf(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/Uf,e=>Math.floor(e/Uf)).range;function qf(e){return Vf(t=>{t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)},(e,t)=>{e.setDate(e.getDate()+t*7)},(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*Hf)/Wf)}var Jf=qf(0),Yf=qf(1),Xf=qf(2),Zf=qf(3),Qf=qf(4),$f=qf(5),ep=qf(6);Jf.range,Yf.range,Xf.range,Zf.range,Qf.range,$f.range,ep.range;function tp(e){return Vf(t=>{t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t*7)},(e,t)=>(t-e)/Wf)}var np=tp(0),rp=tp(1),ip=tp(2),ap=tp(3),op=tp(4),sp=tp(5),cp=tp(6);np.range,rp.range,ip.range,ap.range,op.range,sp.range,cp.range;var lp=Vf(e=>{e.setMonth(0,1),e.setHours(0,0,0,0)},(e,t)=>{e.setFullYear(e.getFullYear()+t)},(e,t)=>t.getFullYear()-e.getFullYear(),e=>e.getFullYear());lp.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:Vf(t=>{t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)},(t,n)=>{t.setFullYear(t.getFullYear()+n*e)}),lp.range;var up=Vf(e=>{e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCFullYear(e.getUTCFullYear()+t)},(e,t)=>t.getUTCFullYear()-e.getUTCFullYear(),e=>e.getUTCFullYear());up.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:Vf(t=>{t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,n)=>{t.setUTCFullYear(t.getUTCFullYear()+n*e)}),up.range;function dp(e){if(0<=e.y&&e.y<100){var t=new Date(-1,e.m,e.d,e.H,e.M,e.S,e.L);return t.setFullYear(e.y),t}return new Date(e.y,e.m,e.d,e.H,e.M,e.S,e.L)}function fp(e){if(0<=e.y&&e.y<100){var t=new Date(Date.UTC(-1,e.m,e.d,e.H,e.M,e.S,e.L));return t.setUTCFullYear(e.y),t}return new Date(Date.UTC(e.y,e.m,e.d,e.H,e.M,e.S,e.L))}function pp(e,t,n){return{y:e,m:t,d:n,H:0,M:0,S:0,L:0}}function mp(e){var t=e.dateTime,n=e.date,r=e.time,i=e.periods,a=e.days,o=e.shortDays,s=e.months,c=e.shortMonths,l=xp(i),u=Sp(i),d=xp(a),f=Sp(a),p=xp(o),m=Sp(o),h=xp(s),g=Sp(s),_=xp(c),v=Sp(c),y={a:N,A:P,b:F,B:I,c:null,d:Up,e:Up,f:Jp,g:am,G:sm,H:Wp,I:Gp,j:Kp,L:qp,m:Yp,M:Xp,p:L,q:R,Q:Am,s:jm,S:Zp,u:Qp,U:$p,V:tm,w:nm,W:rm,x:null,X:null,y:im,Y:om,Z:cm,"%":km},b={a:z,A:B,b:V,B:H,c:null,d:lm,e:lm,f:mm,g:Tm,G:Dm,H:um,I:dm,j:fm,L:pm,m:hm,M:gm,p:ee,q:te,Q:Am,s:jm,S:_m,u:vm,U:ym,V:xm,w:Sm,W:Cm,x:null,X:null,y:wm,Y:Em,Z:Om,"%":km},x={a:E,A:D,b:O,B:k,c:A,d:Np,e:Np,f:zp,g:kp,G:Op,H:Fp,I:Fp,j:Pp,L:Rp,m:Mp,M:Ip,p:T,q:jp,Q:Vp,s:Hp,S:Lp,u:wp,U:Tp,V:Ep,w:Cp,W:Dp,x:j,X:M,y:kp,Y:Op,Z:Ap,"%":Bp};y.x=S(n,y),y.X=S(r,y),y.c=S(t,y),b.x=S(n,b),b.X=S(r,b),b.c=S(t,b);function S(e,t){return function(n){var r=[],i=-1,a=0,o=e.length,s,c,l;for(n instanceof Date||(n=new Date(+n));++i<o;)e.charCodeAt(i)===37&&(r.push(e.slice(a,i)),(c=hp[s=e.charAt(++i)])==null?c=s===`e`?` `:`0`:s=e.charAt(++i),(l=t[s])&&(s=l(n,c)),r.push(s),a=i+1);return r.push(e.slice(a,i)),r.join(``)}}function C(e,t){return function(n){var r=pp(1900,void 0,1),i=w(r,e,n+=``,0),a,o;if(i!=n.length)return null;if(`Q`in r)return new Date(r.Q);if(`s`in r)return new Date(r.s*1e3+(`L`in r?r.L:0));if(t&&!(`Z`in r)&&(r.Z=0),`p`in r&&(r.H=r.H%12+r.p*12),r.m===void 0&&(r.m=`q`in r?r.q:0),`V`in r){if(r.V<1||r.V>53)return null;`w`in r||(r.w=1),`Z`in r?(a=fp(pp(r.y,0,1)),o=a.getUTCDay(),a=o>4||o===0?rp.ceil(a):rp(a),a=Kf.offset(a,(r.V-1)*7),r.y=a.getUTCFullYear(),r.m=a.getUTCMonth(),r.d=a.getUTCDate()+(r.w+6)%7):(a=dp(pp(r.y,0,1)),o=a.getDay(),a=o>4||o===0?Yf.ceil(a):Yf(a),a=Gf.offset(a,(r.V-1)*7),r.y=a.getFullYear(),r.m=a.getMonth(),r.d=a.getDate()+(r.w+6)%7)}else(`W`in r||`U`in r)&&(`w`in r||(r.w=`u`in r?r.u%7:+(`W`in r)),o=`Z`in r?fp(pp(r.y,0,1)).getUTCDay():dp(pp(r.y,0,1)).getDay(),r.m=0,r.d=`W`in r?(r.w+6)%7+r.W*7-(o+5)%7:r.w+r.U*7-(o+6)%7);return`Z`in r?(r.H+=r.Z/100|0,r.M+=r.Z%100,fp(r)):dp(r)}}function w(e,t,n,r){for(var i=0,a=t.length,o=n.length,s,c;i<a;){if(r>=o)return-1;if(s=t.charCodeAt(i++),s===37){if(s=t.charAt(i++),c=x[s in hp?t.charAt(i++):s],!c||(r=c(e,n,r))<0)return-1}else if(s!=n.charCodeAt(r++))return-1}return r}function T(e,t,n){var r=l.exec(t.slice(n));return r?(e.p=u.get(r[0].toLowerCase()),n+r[0].length):-1}function E(e,t,n){var r=p.exec(t.slice(n));return r?(e.w=m.get(r[0].toLowerCase()),n+r[0].length):-1}function D(e,t,n){var r=d.exec(t.slice(n));return r?(e.w=f.get(r[0].toLowerCase()),n+r[0].length):-1}function O(e,t,n){var r=_.exec(t.slice(n));return r?(e.m=v.get(r[0].toLowerCase()),n+r[0].length):-1}function k(e,t,n){var r=h.exec(t.slice(n));return r?(e.m=g.get(r[0].toLowerCase()),n+r[0].length):-1}function A(e,n,r){return w(e,t,n,r)}function j(e,t,r){return w(e,n,t,r)}function M(e,t,n){return w(e,r,t,n)}function N(e){return o[e.getDay()]}function P(e){return a[e.getDay()]}function F(e){return c[e.getMonth()]}function I(e){return s[e.getMonth()]}function L(e){return i[+(e.getHours()>=12)]}function R(e){return 1+~~(e.getMonth()/3)}function z(e){return o[e.getUTCDay()]}function B(e){return a[e.getUTCDay()]}function V(e){return c[e.getUTCMonth()]}function H(e){return s[e.getUTCMonth()]}function ee(e){return i[+(e.getUTCHours()>=12)]}function te(e){return 1+~~(e.getUTCMonth()/3)}return{format:function(e){var t=S(e+=``,y);return t.toString=function(){return e},t},parse:function(e){var t=C(e+=``,!1);return t.toString=function(){return e},t},utcFormat:function(e){var t=S(e+=``,b);return t.toString=function(){return e},t},utcParse:function(e){var t=C(e+=``,!0);return t.toString=function(){return e},t}}}var hp={"-":``,_:` `,0:`0`},gp=/^\s*\d+/,_p=/^%/,vp=/[\\^$*+?|[\]().{}]/g;function yp(e,t,n){var r=e<0?`-`:``,i=(r?-e:e)+``,a=i.length;return r+(a<n?Array(n-a+1).join(t)+i:i)}function bp(e){return e.replace(vp,`\\$&`)}function xp(e){return RegExp(`^(?:`+e.map(bp).join(`|`)+`)`,`i`)}function Sp(e){return new Map(e.map((e,t)=>[e.toLowerCase(),t]))}function Cp(e,t,n){var r=gp.exec(t.slice(n,n+1));return r?(e.w=+r[0],n+r[0].length):-1}function wp(e,t,n){var r=gp.exec(t.slice(n,n+1));return r?(e.u=+r[0],n+r[0].length):-1}function Tp(e,t,n){var r=gp.exec(t.slice(n,n+2));return r?(e.U=+r[0],n+r[0].length):-1}function Ep(e,t,n){var r=gp.exec(t.slice(n,n+2));return r?(e.V=+r[0],n+r[0].length):-1}function Dp(e,t,n){var r=gp.exec(t.slice(n,n+2));return r?(e.W=+r[0],n+r[0].length):-1}function Op(e,t,n){var r=gp.exec(t.slice(n,n+4));return r?(e.y=+r[0],n+r[0].length):-1}function kp(e,t,n){var r=gp.exec(t.slice(n,n+2));return r?(e.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function Ap(e,t,n){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(n,n+6));return r?(e.Z=r[1]?0:-(r[2]+(r[3]||`00`)),n+r[0].length):-1}function jp(e,t,n){var r=gp.exec(t.slice(n,n+1));return r?(e.q=r[0]*3-3,n+r[0].length):-1}function Mp(e,t,n){var r=gp.exec(t.slice(n,n+2));return r?(e.m=r[0]-1,n+r[0].length):-1}function Np(e,t,n){var r=gp.exec(t.slice(n,n+2));return r?(e.d=+r[0],n+r[0].length):-1}function Pp(e,t,n){var r=gp.exec(t.slice(n,n+3));return r?(e.m=0,e.d=+r[0],n+r[0].length):-1}function Fp(e,t,n){var r=gp.exec(t.slice(n,n+2));return r?(e.H=+r[0],n+r[0].length):-1}function Ip(e,t,n){var r=gp.exec(t.slice(n,n+2));return r?(e.M=+r[0],n+r[0].length):-1}function Lp(e,t,n){var r=gp.exec(t.slice(n,n+2));return r?(e.S=+r[0],n+r[0].length):-1}function Rp(e,t,n){var r=gp.exec(t.slice(n,n+3));return r?(e.L=+r[0],n+r[0].length):-1}function zp(e,t,n){var r=gp.exec(t.slice(n,n+6));return r?(e.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function Bp(e,t,n){var r=_p.exec(t.slice(n,n+1));return r?n+r[0].length:-1}function Vp(e,t,n){var r=gp.exec(t.slice(n));return r?(e.Q=+r[0],n+r[0].length):-1}function Hp(e,t,n){var r=gp.exec(t.slice(n));return r?(e.s=+r[0],n+r[0].length):-1}function Up(e,t){return yp(e.getDate(),t,2)}function Wp(e,t){return yp(e.getHours(),t,2)}function Gp(e,t){return yp(e.getHours()%12||12,t,2)}function Kp(e,t){return yp(1+Gf.count(lp(e),e),t,3)}function qp(e,t){return yp(e.getMilliseconds(),t,3)}function Jp(e,t){return qp(e,t)+`000`}function Yp(e,t){return yp(e.getMonth()+1,t,2)}function Xp(e,t){return yp(e.getMinutes(),t,2)}function Zp(e,t){return yp(e.getSeconds(),t,2)}function Qp(e){var t=e.getDay();return t===0?7:t}function $p(e,t){return yp(Jf.count(lp(e)-1,e),t,2)}function em(e){var t=e.getDay();return t>=4||t===0?Qf(e):Qf.ceil(e)}function tm(e,t){return e=em(e),yp(Qf.count(lp(e),e)+(lp(e).getDay()===4),t,2)}function nm(e){return e.getDay()}function rm(e,t){return yp(Yf.count(lp(e)-1,e),t,2)}function im(e,t){return yp(e.getFullYear()%100,t,2)}function am(e,t){return e=em(e),yp(e.getFullYear()%100,t,2)}function om(e,t){return yp(e.getFullYear()%1e4,t,4)}function sm(e,t){var n=e.getDay();return e=n>=4||n===0?Qf(e):Qf.ceil(e),yp(e.getFullYear()%1e4,t,4)}function cm(e){var t=e.getTimezoneOffset();return(t>0?`-`:(t*=-1,`+`))+yp(t/60|0,`0`,2)+yp(t%60,`0`,2)}function lm(e,t){return yp(e.getUTCDate(),t,2)}function um(e,t){return yp(e.getUTCHours(),t,2)}function dm(e,t){return yp(e.getUTCHours()%12||12,t,2)}function fm(e,t){return yp(1+Kf.count(up(e),e),t,3)}function pm(e,t){return yp(e.getUTCMilliseconds(),t,3)}function mm(e,t){return pm(e,t)+`000`}function hm(e,t){return yp(e.getUTCMonth()+1,t,2)}function gm(e,t){return yp(e.getUTCMinutes(),t,2)}function _m(e,t){return yp(e.getUTCSeconds(),t,2)}function vm(e){var t=e.getUTCDay();return t===0?7:t}function ym(e,t){return yp(np.count(up(e)-1,e),t,2)}function bm(e){var t=e.getUTCDay();return t>=4||t===0?op(e):op.ceil(e)}function xm(e,t){return e=bm(e),yp(op.count(up(e),e)+(up(e).getUTCDay()===4),t,2)}function Sm(e){return e.getUTCDay()}function Cm(e,t){return yp(rp.count(up(e)-1,e),t,2)}function wm(e,t){return yp(e.getUTCFullYear()%100,t,2)}function Tm(e,t){return e=bm(e),yp(e.getUTCFullYear()%100,t,2)}function Em(e,t){return yp(e.getUTCFullYear()%1e4,t,4)}function Dm(e,t){var n=e.getUTCDay();return e=n>=4||n===0?op(e):op.ceil(e),yp(e.getUTCFullYear()%1e4,t,4)}function Om(){return`+0000`}function km(){return`%`}function Am(e){return+e}function jm(e){return Math.floor(e/1e3)}var Mm,Nm;Pm({dateTime:`%x, %X`,date:`%-m/%-d/%Y`,time:`%-I:%M:%S %p`,periods:[`AM`,`PM`],days:[`Sunday`,`Monday`,`Tuesday`,`Wednesday`,`Thursday`,`Friday`,`Saturday`],shortDays:[`Sun`,`Mon`,`Tue`,`Wed`,`Thu`,`Fri`,`Sat`],months:[`January`,`February`,`March`,`April`,`May`,`June`,`July`,`August`,`September`,`October`,`November`,`December`],shortMonths:[`Jan`,`Feb`,`Mar`,`Apr`,`May`,`Jun`,`Jul`,`Aug`,`Sep`,`Oct`,`Nov`,`Dec`]});function Pm(e){return Mm=mp(e),Nm=Mm.format,Mm.parse,Mm.utcFormat,Mm.utcParse,Mm}function Fm(e){return function(){return e}}var Im=Math.abs,Lm=Math.atan2,Rm=Math.cos,zm=Math.max,Bm=Math.min,Vm=Math.sin,Hm=Math.sqrt,Um=Math.PI,Wm=Um/2,Gm=2*Um;function Km(e){return e>1?0:e<-1?Um:Math.acos(e)}function qm(e){return e>=1?Wm:e<=-1?-Wm:Math.asin(e)}function Jm(e){let t=3;return e.digits=function(n){if(!arguments.length)return t;if(n==null)t=null;else{let e=Math.floor(n);if(!(e>=0))throw RangeError(`invalid digits: ${n}`);t=e}return e},()=>new Bu(t)}function Ym(e){return e.innerRadius}function Xm(e){return e.outerRadius}function Zm(e){return e.startAngle}function Qm(e){return e.endAngle}function $m(e){return e&&e.padAngle}function eh(e,t,n,r,i,a,o,s){var c=n-e,l=r-t,u=o-i,d=s-a,f=d*c-u*l;if(!(f*f<1e-12))return f=(u*(t-a)-d*(e-i))/f,[e+f*c,t+f*l]}function th(e,t,n,r,i,a,o){var s=e-n,c=t-r,l=(o?a:-a)/Hm(s*s+c*c),u=l*c,d=-l*s,f=e+u,p=t+d,m=n+u,h=r+d,g=(f+m)/2,_=(p+h)/2,v=m-f,y=h-p,b=v*v+y*y,x=i-a,S=f*h-m*p,C=(y<0?-1:1)*Hm(zm(0,x*x*b-S*S)),w=(S*y-v*C)/b,T=(-S*v-y*C)/b,E=(S*y+v*C)/b,D=(-S*v+y*C)/b,O=w-g,k=T-_,A=E-g,j=D-_;return O*O+k*k>A*A+j*j&&(w=E,T=D),{cx:w,cy:T,x01:-u,y01:-d,x11:w*(i/x-1),y11:T*(i/x-1)}}function nh(){var e=Ym,t=Xm,n=Fm(0),r=null,i=Zm,a=Qm,o=$m,s=null,c=Jm(l);function l(){var l,u,d=+e.apply(this,arguments),f=+t.apply(this,arguments),p=i.apply(this,arguments)-Wm,m=a.apply(this,arguments)-Wm,h=Im(m-p),g=m>p;if(s||=l=c(),f<d&&(u=f,f=d,d=u),!(f>1e-12))s.moveTo(0,0);else if(h>Gm-1e-12)s.moveTo(f*Rm(p),f*Vm(p)),s.arc(0,0,f,p,m,!g),d>1e-12&&(s.moveTo(d*Rm(m),d*Vm(m)),s.arc(0,0,d,m,p,g));else{var _=p,v=m,y=p,b=m,x=h,S=h,C=o.apply(this,arguments)/2,w=C>1e-12&&(r?+r.apply(this,arguments):Hm(d*d+f*f)),T=Bm(Im(f-d)/2,+n.apply(this,arguments)),E=T,D=T,O,k;if(w>1e-12){var A=qm(w/d*Vm(C)),j=qm(w/f*Vm(C));(x-=A*2)>1e-12?(A*=g?1:-1,y+=A,b-=A):(x=0,y=b=(p+m)/2),(S-=j*2)>1e-12?(j*=g?1:-1,_+=j,v-=j):(S=0,_=v=(p+m)/2)}var M=f*Rm(_),N=f*Vm(_),P=d*Rm(b),F=d*Vm(b);if(T>1e-12){var I=f*Rm(v),L=f*Vm(v),R=d*Rm(y),z=d*Vm(y),B;if(h<Um){if(B=eh(M,N,R,z,I,L,P,F)){var V=M-B[0],H=N-B[1],ee=I-B[0],te=L-B[1],ne=1/Vm(Km((V*ee+H*te)/(Hm(V*V+H*H)*Hm(ee*ee+te*te)))/2),re=Hm(B[0]*B[0]+B[1]*B[1]);E=Bm(T,(d-re)/(ne-1)),D=Bm(T,(f-re)/(ne+1))}else E=D=0}}S>1e-12?D>1e-12?(O=th(R,z,M,N,f,D,g),k=th(I,L,P,F,f,D,g),s.moveTo(O.cx+O.x01,O.cy+O.y01),D<T?s.arc(O.cx,O.cy,D,Lm(O.y01,O.x01),Lm(k.y01,k.x01),!g):(s.arc(O.cx,O.cy,D,Lm(O.y01,O.x01),Lm(O.y11,O.x11),!g),s.arc(0,0,f,Lm(O.cy+O.y11,O.cx+O.x11),Lm(k.cy+k.y11,k.cx+k.x11),!g),s.arc(k.cx,k.cy,D,Lm(k.y11,k.x11),Lm(k.y01,k.x01),!g))):(s.moveTo(M,N),s.arc(0,0,f,_,v,!g)):s.moveTo(M,N),!(d>1e-12)||!(x>1e-12)?s.lineTo(P,F):E>1e-12?(O=th(P,F,I,L,d,-E,g),k=th(M,N,R,z,d,-E,g),s.lineTo(O.cx+O.x01,O.cy+O.y01),E<T?s.arc(O.cx,O.cy,E,Lm(O.y01,O.x01),Lm(k.y01,k.x01),!g):(s.arc(O.cx,O.cy,E,Lm(O.y01,O.x01),Lm(O.y11,O.x11),!g),s.arc(0,0,d,Lm(O.cy+O.y11,O.cx+O.x11),Lm(k.cy+k.y11,k.cx+k.x11),g),s.arc(k.cx,k.cy,E,Lm(k.y11,k.x11),Lm(k.y01,k.x01),!g))):s.arc(0,0,d,b,y,g)}if(s.closePath(),l)return s=null,l+``||null}return l.centroid=function(){var n=(+e.apply(this,arguments)+ +t.apply(this,arguments))/2,r=(+i.apply(this,arguments)+ +a.apply(this,arguments))/2-Um/2;return[Rm(r)*n,Vm(r)*n]},l.innerRadius=function(t){return arguments.length?(e=typeof t==`function`?t:Fm(+t),l):e},l.outerRadius=function(e){return arguments.length?(t=typeof e==`function`?e:Fm(+e),l):t},l.cornerRadius=function(e){return arguments.length?(n=typeof e==`function`?e:Fm(+e),l):n},l.padRadius=function(e){return arguments.length?(r=e==null?null:typeof e==`function`?e:Fm(+e),l):r},l.startAngle=function(e){return arguments.length?(i=typeof e==`function`?e:Fm(+e),l):i},l.endAngle=function(e){return arguments.length?(a=typeof e==`function`?e:Fm(+e),l):a},l.padAngle=function(e){return arguments.length?(o=typeof e==`function`?e:Fm(+e),l):o},l.context=function(e){return arguments.length?(s=e??null,l):s},l}Array.prototype.slice;function rh(e){return typeof e==`object`&&`length`in e?e:Array.from(e)}function ih(e){this._context=e}ih.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._context.lineTo(e,t)}}};function ah(e){return new ih(e)}function oh(e){return e[0]}function sh(e){return e[1]}function ch(e,t){var n=Fm(!0),r=null,i=ah,a=null,o=Jm(s);e=typeof e==`function`?e:e===void 0?oh:Fm(e),t=typeof t==`function`?t:t===void 0?sh:Fm(t);function s(s){var c,l=(s=rh(s)).length,u,d=!1,f;for(r??(a=i(f=o())),c=0;c<=l;++c)!(c<l&&n(u=s[c],c,s))===d&&((d=!d)?a.lineStart():a.lineEnd()),d&&a.point(+e(u,c,s),+t(u,c,s));if(f)return a=null,f+``||null}return s.x=function(t){return arguments.length?(e=typeof t==`function`?t:Fm(+t),s):e},s.y=function(e){return arguments.length?(t=typeof e==`function`?e:Fm(+e),s):t},s.defined=function(e){return arguments.length?(n=typeof e==`function`?e:Fm(!!e),s):n},s.curve=function(e){return arguments.length?(i=e,r!=null&&(a=i(r)),s):i},s.context=function(e){return arguments.length?(e==null?r=a=null:a=i(r=e),s):r},s}function lh(e,t,n){var r=null,i=Fm(!0),a=null,o=ah,s=null,c=Jm(l);e=typeof e==`function`?e:e===void 0?oh:Fm(+e),t=typeof t==`function`?t:Fm(t===void 0?0:+t),n=typeof n==`function`?n:n===void 0?sh:Fm(+n);function l(l){var u,d,f,p=(l=rh(l)).length,m,h=!1,g,_=Array(p),v=Array(p);for(a??(s=o(g=c())),u=0;u<=p;++u){if(!(u<p&&i(m=l[u],u,l))===h){if(h=!h)d=u,s.areaStart(),s.lineStart();else{for(s.lineEnd(),s.lineStart(),f=u-1;f>=d;--f)s.point(_[f],v[f]);s.lineEnd(),s.areaEnd()}}h&&(_[u]=+e(m,u,l),v[u]=+t(m,u,l),s.point(r?+r(m,u,l):_[u],n?+n(m,u,l):v[u]))}if(g)return s=null,g+``||null}function u(){return ch().defined(i).curve(o).context(a)}return l.x=function(t){return arguments.length?(e=typeof t==`function`?t:Fm(+t),r=null,l):e},l.x0=function(t){return arguments.length?(e=typeof t==`function`?t:Fm(+t),l):e},l.x1=function(e){return arguments.length?(r=e==null?null:typeof e==`function`?e:Fm(+e),l):r},l.y=function(e){return arguments.length?(t=typeof e==`function`?e:Fm(+e),n=null,l):t},l.y0=function(e){return arguments.length?(t=typeof e==`function`?e:Fm(+e),l):t},l.y1=function(e){return arguments.length?(n=e==null?null:typeof e==`function`?e:Fm(+e),l):n},l.lineX0=l.lineY0=function(){return u().x(e).y(t)},l.lineY1=function(){return u().x(e).y(n)},l.lineX1=function(){return u().x(r).y(t)},l.defined=function(e){return arguments.length?(i=typeof e==`function`?e:Fm(!!e),l):i},l.curve=function(e){return arguments.length?(o=e,a!=null&&(s=o(a)),l):o},l.context=function(e){return arguments.length?(e==null?a=s=null:s=o(a=e),l):a},l}function uh(e,t){return t<e?-1:t>e?1:t>=e?0:NaN}function dh(e){return e}function fh(){var e=dh,t=uh,n=null,r=Fm(0),i=Fm(Gm),a=Fm(0);function o(o){var s,c=(o=rh(o)).length,l,u,d=0,f=Array(c),p=Array(c),m=+r.apply(this,arguments),h=Math.min(Gm,Math.max(-Gm,i.apply(this,arguments)-m)),g,_=Math.min(Math.abs(h)/c,a.apply(this,arguments)),v=_*(h<0?-1:1),y;for(s=0;s<c;++s)(y=p[f[s]=s]=+e(o[s],s,o))>0&&(d+=y);for(t==null?n!=null&&f.sort(function(e,t){return n(o[e],o[t])}):f.sort(function(e,n){return t(p[e],p[n])}),s=0,u=d?(h-c*v)/d:0;s<c;++s,m=g)l=f[s],y=p[l],g=m+(y>0?y*u:0)+v,p[l]={data:o[l],index:s,value:y,startAngle:m,endAngle:g,padAngle:_};return p}return o.value=function(t){return arguments.length?(e=typeof t==`function`?t:Fm(+t),o):e},o.sortValues=function(e){return arguments.length?(t=e,n=null,o):t},o.sort=function(e){return arguments.length?(n=e,t=null,o):n},o.startAngle=function(e){return arguments.length?(r=typeof e==`function`?e:Fm(+e),o):r},o.endAngle=function(e){return arguments.length?(i=typeof e==`function`?e:Fm(+e),o):i},o.padAngle=function(e){return arguments.length?(a=typeof e==`function`?e:Fm(+e),o):a},o}var ph={draw(e,t){let n=Hm(t/Um);e.moveTo(n,0),e.arc(0,0,n,0,Gm)}},mh={draw(e,t){let n=Hm(t/5)/2;e.moveTo(-3*n,-n),e.lineTo(-n,-n),e.lineTo(-n,-3*n),e.lineTo(n,-3*n),e.lineTo(n,-n),e.lineTo(3*n,-n),e.lineTo(3*n,n),e.lineTo(n,n),e.lineTo(n,3*n),e.lineTo(-n,3*n),e.lineTo(-n,n),e.lineTo(-3*n,n),e.closePath()}},hh=Hm(1/3),gh=hh*2,_h={draw(e,t){let n=Hm(t/gh),r=n*hh;e.moveTo(0,-n),e.lineTo(r,0),e.lineTo(0,n),e.lineTo(-r,0),e.closePath()}},vh={draw(e,t){let n=Hm(t),r=-n/2;e.rect(r,r,n,n)}},yh=.8908130915292852,bh=Vm(Um/10)/Vm(7*Um/10),xh=Vm(Gm/10)*bh,Sh=-Rm(Gm/10)*bh,Ch={draw(e,t){let n=Hm(t*yh),r=xh*n,i=Sh*n;e.moveTo(0,-n),e.lineTo(r,i);for(let t=1;t<5;++t){let a=Gm*t/5,o=Rm(a),s=Vm(a);e.lineTo(s*n,-o*n),e.lineTo(o*r-s*i,s*r+o*i)}e.closePath()}},wh=Hm(3),Th={draw(e,t){let n=-Hm(t/(wh*3));e.moveTo(0,n*2),e.lineTo(-wh*n,-n),e.lineTo(wh*n,-n),e.closePath()}},Eh=Hm(3),Dh={draw(e,t){let n=Hm(t)*.6824,r=n/2,i=n*Eh/2;e.moveTo(0,-n),e.lineTo(i,r),e.lineTo(-i,r),e.closePath()}};function Oh(e,t){let n=null,r=Jm(i);e=typeof e==`function`?e:Fm(e||ph),t=typeof t==`function`?t:Fm(t===void 0?64:+t);function i(){let i;if(n||=i=r(),e.apply(this,arguments).draw(n,+t.apply(this,arguments)),i)return n=null,i+``||null}return i.type=function(t){return arguments.length?(e=typeof t==`function`?t:Fm(t),i):e},i.size=function(e){return arguments.length?(t=typeof e==`function`?e:Fm(+e),i):t},i.context=function(e){return arguments.length?(n=e??null,i):n},i}function kh(e,t,n){e._context.bezierCurveTo((2*e._x0+e._x1)/3,(2*e._y0+e._y1)/3,(e._x0+2*e._x1)/3,(e._y0+2*e._y1)/3,(e._x0+4*e._x1+t)/6,(e._y0+4*e._y1+n)/6)}function Ah(e){this._context=e}Ah.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:kh(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1)}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:kh(this,e,t)}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function jh(e){return new Ah(e)}function Mh(e,t,n){e._context.bezierCurveTo(e._x1+e._k*(e._x2-e._x0),e._y1+e._k*(e._y2-e._y0),e._x2+e._k*(e._x1-t),e._y2+e._k*(e._y1-n),e._x2,e._y2)}function Nh(e,t){this._context=e,this._k=(1-t)/6}Nh.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:Mh(this,this._x1,this._y1)}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2,this._x1=e,this._y1=t;break;case 2:this._point=3;default:Mh(this,e,t)}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};var Ph=(function e(t){function n(e){return new Nh(e,t)}return n.tension=function(t){return e(+t)},n})(0);function Fh(e,t,n){var r=e._x1,i=e._y1,a=e._x2,o=e._y2;if(e._l01_a>1e-12){var s=2*e._l01_2a+3*e._l01_a*e._l12_a+e._l12_2a,c=3*e._l01_a*(e._l01_a+e._l12_a);r=(r*s-e._x0*e._l12_2a+e._x2*e._l01_2a)/c,i=(i*s-e._y0*e._l12_2a+e._y2*e._l01_2a)/c}if(e._l23_a>1e-12){var l=2*e._l23_2a+3*e._l23_a*e._l12_a+e._l12_2a,u=3*e._l23_a*(e._l23_a+e._l12_a);a=(a*l+e._x1*e._l23_2a-t*e._l12_2a)/u,o=(o*l+e._y1*e._l23_2a-n*e._l12_2a)/u}e._context.bezierCurveTo(r,i,a,o,e._x2,e._y2)}function Ih(e,t){this._context=e,this._alpha=t}Ih.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2)}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){if(e=+e,t=+t,this._point){var n=this._x2-e,r=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=(n*n+r*r)**+this._alpha)}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3;default:Fh(this,e,t)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};var Lh=(function e(t){function n(e){return t?new Ih(e,t):new Nh(e,0)}return n.alpha=function(t){return e(+t)},n})(.5);function Rh(e){return e<0?-1:1}function zh(e,t,n){var r=e._x1-e._x0,i=t-e._x1,a=(e._y1-e._y0)/(r||i<0&&-0),o=(n-e._y1)/(i||r<0&&-0),s=(a*i+o*r)/(r+i);return(Rh(a)+Rh(o))*Math.min(Math.abs(a),Math.abs(o),.5*Math.abs(s))||0}function Bh(e,t){var n=e._x1-e._x0;return n?(3*(e._y1-e._y0)/n-t)/2:t}function Vh(e,t,n){var r=e._x0,i=e._y0,a=e._x1,o=e._y1,s=(a-r)/3;e._context.bezierCurveTo(r+s,i+s*t,a-s,o-s*n,a,o)}function Hh(e){this._context=e}Hh.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:Vh(this,this._t0,Bh(this,this._t0))}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){var n=NaN;if(e=+e,t=+t,e!==this._x1||t!==this._y1){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,Vh(this,Bh(this,n=zh(this,e,t)),n);break;default:Vh(this,this._t0,n=zh(this,e,t))}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=n}}},Object.create(Hh.prototype).point=function(e,t){Hh.prototype.point.call(this,t,e)};function Uh(e){return new Hh(e)}function Wh(e,t){this._context=e,this._t=t}Wh.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&this._point===2&&this._context.lineTo(this._x,this._y),(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:if(this._t<=0)this._context.lineTo(this._x,t),this._context.lineTo(e,t);else{var n=this._x*(1-this._t)+e*this._t;this._context.lineTo(n,this._y),this._context.lineTo(n,t)}}this._x=e,this._y=t}};function Gh(e){return new Wh(e,.5)}function Kh(e){return new Wh(e,0)}function qh(e){return new Wh(e,1)}function Jh(e,t){if((o=e.length)>1)for(var n=1,r,i,a=e[t[0]],o,s=a.length;n<o;++n)for(i=a,a=e[t[n]],r=0;r<s;++r)a[r][1]+=a[r][0]=isNaN(i[r][1])?i[r][0]:i[r][1]}function Yh(e){for(var t=e.length,n=Array(t);--t>=0;)n[t]=t;return n}function Xh(e,t){return e[t]}function Zh(e){let t=[];return t.key=e,t}function Qh(){var e=Fm([]),t=Yh,n=Jh,r=Xh;function i(i){var a=Array.from(e.apply(this,arguments),Zh),o,s=a.length,c=-1,l;for(let e of i)for(o=0,++c;o<s;++o)(a[o][c]=[0,+r(e,a[o].key,c,i)]).data=e;for(o=0,l=rh(t(a));o<s;++o)a[l[o]].index=o;return n(a,l),a}return i.keys=function(t){return arguments.length?(e=typeof t==`function`?t:Fm(Array.from(t)),i):e},i.value=function(e){return arguments.length?(r=typeof e==`function`?e:Fm(+e),i):r},i.order=function(e){return arguments.length?(t=e==null?Yh:typeof e==`function`?e:Fm(Array.from(e)),i):t},i.offset=function(e){return arguments.length?(n=e??Jh,i):n},i}function $h(e,t){if((c=e.length)>0)for(var n,r=0,i,a,o,s,c,l=e[t[0]].length;r<l;++r)for(o=s=0,n=0;n<c;++n)(a=(i=e[t[n]][r])[1]-i[0])>0?(i[0]=o,i[1]=o+=a):a<0?(i[1]=s,i[0]=s+=a):(i[0]=0,i[1]=a)}function eg(e,t,n){this.k=e,this.x=t,this.y=n}eg.prototype={constructor:eg,scale:function(e){return e===1?this:new eg(this.k*e,this.x,this.y)},translate:function(e,t){return e===0&t===0?this:new eg(this.k,this.x+this.k*e,this.y+this.k*t)},apply:function(e){return[e[0]*this.k+this.x,e[1]*this.k+this.y]},applyX:function(e){return e*this.k+this.x},applyY:function(e){return e*this.k+this.y},invert:function(e){return[(e[0]-this.x)/this.k,(e[1]-this.y)/this.k]},invertX:function(e){return(e-this.x)/this.k},invertY:function(e){return(e-this.y)/this.k},rescaleX:function(e){return e.copy().domain(e.range().map(this.invertX,this).map(e.invert,e))},rescaleY:function(e){return e.copy().domain(e.range().map(this.invertY,this).map(e.invert,e))},toString:function(){return`translate(`+this.x+`,`+this.y+`) scale(`+this.k+`)`}};var tg=new eg(1,0,0);ng.prototype=eg.prototype;function ng(e){for(;!e.__zoom;)if(!(e=e.parentNode))return tg;return e.__zoom}function rg(e,t){if(!e)throw Error(`[d3-blueprint] ${t}`)}var ig=class{properties=new Map;define(e,t){rg(!this.properties.has(e),`config "${e}" is already defined`);let{defaultValue:n,getter:r,setter:i}=t,a=i?i(n):n;return this.properties.set(e,{value:a,getter:r,setter:i}),this}get(e){let{value:t,getter:n}=this.getProperty(e);return n?n(t):t}set(e,t){let n=this.getProperty(e);return n.value=n.setter?n.setter(t):t,this}setBatch(e){for(let[t,n]of Object.entries(e))this.set(t,n);return this}getAll(){let e={};for(let[t]of this.properties)e[t]=this.get(t);return e}has(e){return this.properties.has(e)}getProperty(e){let t=this.properties.get(e);return rg(t,`config "${e}" is not defined`),t}},ag=[`update`,`enter`,`merge`,`exit`],og=new Set([...ag,...ag.map(e=>`${e}:transition`)]);function sg(e){return og.has(e)}function cg(e){rg(sg(e),`"${e}" is not a valid lifecycle event. Expected one of: ${[...og].join(`, `)}`)}function lg(e,t,n){let r=e.exit(),i={update:e,enter:t,merge:t.merge(e),exit:r};return ag.map(e=>({name:e,selection:i[e],handlers:n.get(e)??[],transitionHandlers:n.get(`${e}:transition`)??[]}))}function ug(e,t){for(let n of t)n(e)}function dg(e,t){return t.map(t=>{let n=e.transition();return t(n),fg(n)})}function fg(e){return e.end().then(()=>void 0,()=>void 0)}var pg=class{base;dataBindFn;insertFn;handlers=new Map;constructor(e,t){if(this.base=e,this.dataBindFn=t.dataBind,this.insertFn=t.insert,t.events)for(let[e,n]of Object.entries(t.events))n&&this.on(e,n)}on(e,t){cg(e);let n=this.handlers.get(e)??[];return n.push(t),this.handlers.set(e,n),this}off(e,t){if(cg(e),!t)return this.handlers.delete(e),this;let n=this.handlers.get(e);if(n){let e=n.indexOf(t);e!==-1&&n.splice(e,1)}return this}draw(e){let t=this.dataBindFn(this.base,e),n=t.enter(),r=lg(t,this.insertFn(n),this.handlers),i=[];for(let e of r){ug(e.selection,e.handlers);let t=dg(e.selection,e.transitionHandlers);i.push(...t)}return Promise.all(i).then(()=>void 0)}};function mg(e,t,n,r){if(n&&r){let i=new pg(n,r);return e.set(t,i),i}let i=e.get(t);if(!i)throw Error(`[d3-blueprint] layer "${t}" is not defined`);return i}function hg(e,t,n,r){return typeof n==`string`&&r===void 0?e.get(n):typeof n==`string`?(e.set(n,r),t):(e.setBatch(n),t)}function gg(e,t){let n=[];for(let r of e.values())n.push(r.draw(t));return n}function _g(e,t){let n=[];for(let r of e.values()){let e=r.draw(t);e&&n.push(e)}return n}var vg=[`preDraw`,`postDraw`,`postTransition`],yg=class{base;layers=new Map;attachments=new Map;configs=new ig;dispatcher;attached=new Proxy({},{get:(e,t)=>{let n=this.attachments.get(t);if(!n)throw Error(`[d3-blueprint] attachment "${t}" is not defined`);return n},has:(e,t)=>this.attachments.has(t)});constructor(e){this.base=e,this.dispatcher=Sa(...vg),this.initialize()}initialize(){}transform(e){return e}preDraw(e){}postDraw(e){}postTransition(e){}layer(e,t,n){return mg(this.layers,e,t,n)}attach(e,t,n){if(n!==void 0){let r=t;this.attachments.set(e,new r(n))}else this.attachments.set(e,t);return this}config(e,t){return hg(this.configs,this,e,t)}configDefine(e,t){return this.configs.define(e,t),this}on(e,t){return this.dispatcher.on(e,t),this}off(e){return this.dispatcher.on(e,null),this}use(e,t){let n=t||e.name||`plugin`;if(e.install(this),e.preDraw&&this.on(`preDraw.${n}`,t=>e.preDraw(this,t)),e.postDraw&&this.on(`postDraw.${n}`,t=>e.postDraw(this,t)),e.postTransition&&this.on(`postTransition.${n}`,t=>e.postTransition(this,t)),e.destroy){let t=this.destroy.bind(this);this.destroy=()=>{e.destroy(this),t()}}return this}async draw(e){let t=this.transform(e);this.preDraw(t),this.dispatcher.call(`preDraw`,this,t);let n=gg(this.layers,t),r=_g(this.attachments,t);this.postDraw(t),this.dispatcher.call(`postDraw`,this,t),await Promise.all([...n,...r]),this.postTransition(t),this.dispatcher.call(`postTransition`,this,t)}destroy(){this.layers.clear(),this.attachments.clear()}},bg=class extends yg{initialize(){let e=this.base.append(`div`).attr(`class`,`bc-frame`),t=e.append(`div`).attr(`class`,`bc-frame-header`);e.append(`div`).attr(`class`,`bc-frame-body`),e.append(`p`).attr(`class`,`bc-frame-note`);let n=e.append(`div`).attr(`class`,`bc-frame-footer`).style(`display`,`flex`).style(`justify-content`,`space-between`).style(`align-items`,`center`).style(`flex-wrap`,`wrap`).style(`gap`,`0.25rem 1rem`),r=n.append(`div`).attr(`class`,`bc-frame-footer-left`).style(`display`,`flex`).style(`flex-wrap`,`wrap`).style(`gap`,`0.25rem 0.75rem`),i=n.append(`div`).attr(`class`,`bc-frame-footer-right`).style(`display`,`flex`).style(`align-items`,`center`);this.layer(`headerItems`,t,{dataBind:(e,t)=>e.selectAll(`.bc-frame-header-item`).data(t.headerItems,e=>e.className),insert:e=>e.append(e=>document.createElement(e.tag)),events:{enter:e=>{e.attr(`class`,e=>e.className).text(e=>e.text)},merge:e=>{e.attr(`class`,e=>e.className).text(e=>e.text)},exit:e=>{e.remove()}}}),this.layer(`footerLeftItems`,r,{dataBind:(e,t)=>e.selectAll(`.bc-frame-footer-item`).data(t.footerLeftItems,e=>e.className),insert:e=>e.append(e=>document.createElement(e.tag)),events:{enter:e=>{e.attr(`class`,e=>e.className).each(function(e){if(this.textContent=``,e.prefix){let t=document.createElement(`span`);t.className=`bc-frame-source-prefix`,t.textContent=e.prefix,this.appendChild(t)}if(e.href){let t=document.createElement(`a`);t.className=`bc-frame-source-link`,t.href=e.href,t.textContent=e.text,this.appendChild(t)}else this.appendChild(document.createTextNode(e.text))})},merge:e=>{e.attr(`class`,e=>e.className).each(function(e){if(this.textContent=``,e.prefix){let t=document.createElement(`span`);t.className=`bc-frame-source-prefix`,t.textContent=e.prefix,this.appendChild(t)}if(e.href){let t=document.createElement(`a`);t.className=`bc-frame-source-link`,t.href=e.href,t.textContent=e.text,this.appendChild(t)}else this.appendChild(document.createTextNode(e.text))})},exit:e=>{e.remove()}}}),this.layer(`footerRightItems`,i,{dataBind:(e,t)=>e.selectAll(`.bc-frame-footer-item`).data(t.footerRightItems,e=>e.className),insert:e=>e.append(e=>document.createElement(e.tag)),events:{enter:e=>{e.attr(`class`,e=>e.className).each(function(e){if(e.html){let t=document.createRange().createContextualFragment(e.html);this.appendChild(t)}else this.textContent=e.text}),e.filter(e=>!!e.href).attr(`href`,e=>e.href),e.filter(e=>!!e.target).attr(`target`,e=>e.target),e.filter(e=>!!e.rel).attr(`rel`,e=>e.rel)},merge:e=>{e.attr(`class`,e=>e.className).each(function(e){if(this.textContent=``,e.html){let t=document.createRange().createContextualFragment(e.html);this.appendChild(t)}else this.textContent=e.text}),e.filter(e=>!!e.href).attr(`href`,e=>e.href),e.filter(e=>!!e.target).attr(`target`,e=>e.target),e.filter(e=>!!e.rel).attr(`rel`,e=>e.rel)},exit:e=>{e.remove()}}})}};function xg(e){let t=[];return e.title&&t.push({tag:`h3`,className:`bc-frame-title`,text:e.title}),e.description&&t.push({tag:`p`,className:`bc-frame-description`,text:e.description}),t}function Sg(e){let t=[];return e.byline&&t.push({tag:`span`,className:`bc-frame-byline`,text:e.byline}),e.source&&t.push({tag:`span`,className:`bc-frame-source`,text:e.source,prefix:`Source: `,href:e.sourceUrl||void 0}),t}function Cg(){return[{tag:`a`,className:`bc-frame-credit`,text:`Blueprint Chart`,html:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 48.042969 90.607422" width="10" height="18" style="vertical-align:-3px;margin-right:3px"><path fill="currentColor" opacity="0.55" d="M 20.042969 34.607422 A 28 28 0 0 1 23.072266 34.779297 A 28 28 0 0 0 20.042969 34.607422 z M 23.34375 34.810547 A 28 28 0 0 1 26.171875 35.292969 A 28 28 0 0 0 23.34375 34.810547 z M 16.570312 34.84375 A 28 28 0 0 0 15.474609 35.033203 A 28 28 0 0 1 16.570312 34.84375 z M 26.390625 35.341797 A 28 28 0 0 1 29.316406 36.189453 A 28 28 0 0 0 26.390625 35.341797 z M 13.128906 35.511719 A 28 28 0 0 0 11.904297 35.873047 A 28 28 0 0 1 13.128906 35.511719 z M 29.373047 36.210938 A 28 28 0 0 1 32.103516 37.347656 A 28 28 0 0 0 29.373047 36.210938 z M 9.7832031 36.609375 A 28 28 0 0 0 8.5820312 37.117188 A 28 28 0 0 1 9.7832031 36.609375 z M 32.392578 37.486328 A 28 28 0 0 1 34.939453 38.90625 A 28 28 0 0 0 32.392578 37.486328 z M 6.5742188 38.128906 A 28 28 0 0 0 5.4511719 38.765625 A 28 28 0 0 1 6.5742188 38.128906 z M 35.041016 38.966797 A 28 28 0 0 1 37.523438 40.738281 A 28 28 0 0 0 35.041016 38.966797 z M 3.5273438 40.080078 A 28 28 0 0 0 2.5761719 40.771484 A 28 28 0 0 1 3.5273438 40.080078 z M 37.658203 40.851562 A 28 28 0 0 1 39.804688 42.783203 A 28 28 0 0 0 37.658203 40.851562 z M 40.011719 42.990234 A 28 28 0 0 1 42.013672 45.251953 A 28 28 0 0 0 40.011719 42.990234 z M 42.013672 45.251953 A 28 28 0 0 1 20.042969 56 A 28 28 0 0 1 14.232422 55.3125 A 16 16 0 0 1 16 62.607422 A 16 16 0 0 1 0 78.607422 L 0 82.121094 A 28 28 0 0 0 20.042969 90.607422 A 28 28 0 0 0 48.042969 62.607422 A 28 28 0 0 0 42.013672 45.251953 z M 1.3007812 46.667969 A 16 16 0 0 1 1.6191406 46.697266 A 16 16 0 0 0 1.3007812 46.667969 z M 4.2558594 47.189453 A 16 16 0 0 1 4.4355469 47.242188 A 16 16 0 0 0 4.2558594 47.189453 z "/><path fill="currentColor" opacity="0.85" d="M 6.0637516 38.376047 A 28 28 0 0 1 20.042969 34.615234 A 28 28 0 0 1 42.013672 45.259765 A 28 28 0 0 0 48.042969 28.007812 A 28 28 0 0 0 20.042969 0.0078125 A 28 28 0 0 0 0 8.4941407 L 0 16.007812 A 12 12 0 0 1 12 28.007812 A 12 12 0 0 1 6.0613693 38.364443 "/><path fill="currentColor" d="M 20.042969 34.607422 A 28 28 0 0 0 5.0878906 38.970703 A 28 28 0 0 1 6.0644531 38.376953 L 6.0605469 38.365234 A 12 12 0 0 1 0 40.007812 L 0 43.09375 L 0 43.101562 L 0 46.607422 A 16 16 0 0 1 2.8847656 46.873047 A 16 16 0 0 1 2.9199219 46.878906 A 16 16 0 0 1 5.7011719 47.662109 A 16 16 0 0 1 5.7324219 47.673828 A 16 16 0 0 1 8.3300781 48.955078 A 16 16 0 0 1 8.3398438 48.958984 A 16 16 0 0 1 8.3457031 48.962891 A 16 16 0 0 1 10.662109 50.6875 A 16 16 0 0 1 10.697266 50.71875 A 16 16 0 0 1 12.660156 52.837891 A 16 16 0 0 1 12.667969 52.845703 A 16 16 0 0 1 12.673828 52.855469 A 16 16 0 0 1 14.228516 55.306641 A 16 16 0 0 1 14.232422 55.3125 A 28 28 0 0 0 20.042969 56 A 28 28 0 0 0 42.013672 45.251953 A 28 28 0 0 0 20.042969 34.607422 z M 4.7695312 39.177734 A 28 28 0 0 0 2.5390625 40.798828 A 28 28 0 0 1 4.7695312 39.177734 z M 2.1816406 41.091797 A 28 28 0 0 0 0.11914062 42.984375 A 28 28 0 0 1 2.1816406 41.091797 z "/></svg>Blueprint Chart`,href:`/`,target:`_blank`,rel:`noopener noreferrer`}]}var wg=80,Tg=`.bc-frame-title, .bc-frame-description`;function Eg(e){let t=getComputedStyle(e),n=parseFloat(t.lineHeight);return Number.isFinite(n)?n:parseFloat(t.fontSize)*1.2}function Dg(e){e.querySelectorAll(Tg).forEach(e=>{e.style.removeProperty(`display`),e.style.removeProperty(`-webkit-box-orient`),e.style.removeProperty(`-webkit-line-clamp`),e.style.removeProperty(`overflow`)})}function Og(e,t){let n=[...e.querySelectorAll(Tg)],r=t-(e.offsetHeight-n.reduce((e,t)=>e+t.offsetHeight,0));for(let e of n){let t=Math.floor(r/Eg(e));if(t<1){e.style.display=`none`;continue}e.style.display=`-webkit-box`,e.style.setProperty(`-webkit-box-orient`,`vertical`),e.style.setProperty(`-webkit-line-clamp`,String(t)),e.style.overflow=`hidden`,r-=e.offsetHeight}}function kg(e){let[t,n=t,r=t,i=n]=e.trim().split(/\s+/);return[t,n,r,i]}function Ag(e,t){if(t===null)return{wrapper:e,header:e,body:e,footer:e};let n=t??{};new bg(Q(e)).draw({headerItems:xg(n),footerLeftItems:Sg(n),footerRightItems:Cg()});let r=e.querySelector(`.bc-frame`),i=r.querySelector(`.bc-frame-header`),a=r.querySelector(`.bc-frame-body`),o=r.querySelector(`.bc-frame-note`),s=r.querySelector(`.bc-frame-footer`);if(n.padding){r.style.setProperty(`--bc-frame-padding`,n.padding);let[e,t,i,a]=kg(n.padding);r.style.setProperty(`--bc-frame-padding-top`,e),r.style.setProperty(`--bc-frame-padding-right`,t),r.style.setProperty(`--bc-frame-padding-bottom`,i),r.style.setProperty(`--bc-frame-padding-left`,a)}if(n.transparentBackground&&r.style.setProperty(`--bc-frame-bg`,`transparent`),n.note?o.textContent=n.note:o.style.display=`none`,e.isConnected){Dg(i);let t=getComputedStyle(e),n=t.aspectRatio&&t.aspectRatio!==`auto`&&t.aspectRatio!==``,c=t.display===`flex`&&t.flexDirection===`column`;if(n||c){let t=i.offsetHeight,n=s.offsetHeight,c=o.style.display===`none`?0:o.offsetHeight,l=e.clientHeight-n-c-wg;t>l&&(Og(i,l),t=i.offsetHeight),r.classList.add(`bc-frame--constrained`),a.dataset.headerH=String(t);let u=e;a.dataset.footerH=String(u.__bcFooterH??n+c),requestAnimationFrame(()=>{u.__bcFooterH=s.offsetHeight+(o.style.display===`none`?0:o.offsetHeight)})}}return{wrapper:r,header:i,body:a,footer:s}}function jg(e){return e&&(e.startsWith(`(`)&&e.endsWith(`)`)?e.slice(0,-1):e)}function Mg(e){if(!e)return{prefix:``,d3Spec:``,suffix:``};if(e.includes(`|`)){let t=e.split(`|`);return{prefix:t[0]??``,d3Spec:jg(t[1]??``),suffix:t[2]??``}}return{prefix:``,d3Spec:jg(e),suffix:``}}function Ng(e){if(!e)return null;let{prefix:t,d3Spec:n,suffix:r}=Mg(e);if(!n)return null;let i=Gd(n);return!t&&!r?i:e=>`${t}${i(e)}${r}`}function Pg(e,t){return!Number.isFinite(t)||t<=0?`0%`:`${Math.round(e/t*100)}%`}var Fg=`http://www.w3.org/2000/svg`,Ig=`system-ui, -apple-system, sans-serif`,Lg=/[\u1100-\u115f\u2e80-\ua4cf\ua960-\ua97f\uac00-\ud7a3\uf900-\ufaff\ufe10-\ufe19\ufe30-\ufe6f\uff00-\uff60\uffe0-\uffe6]/,Rg=1,zg=.5,Bg=null,Vg=null;function Hg(e,t){let n=0;for(let t of e)n+=Lg.test(t)?Rg:zg;return n*t}function Ug(){if(typeof document>`u`)return null;if(Vg!==document){Vg=document;try{Bg=document.createElement(`canvas`).getContext(`2d`)}catch{Bg=null}}return Bg}function Wg(e,t){let n=Ug();if(!n)return null;n.font=`${t}px ${Ig}`;let r=n.measureText(e).width;return r>0?r:null}function Gg(e,t){if(typeof document>`u`||typeof document.createElementNS!=`function`)return null;let n=document.createElementNS(Fg,`svg`),r=document.createElementNS(Fg,`text`);if(r.setAttribute(`font-size`,String(t)),r.textContent=e,n.appendChild(r),typeof r.getComputedTextLength!=`function`)return null;let i=r.getComputedTextLength();return i>0?i:null}function Kg(e,t){if(e===``)return 0;let n=Wg(e,t)??Gg(e,t)??0;return Math.max(n,Hg(e,t))}function qg(e,t){let n=0;for(let r of e){let e=Kg(r,t);e>n&&(n=e)}return n}function Jg(e,t,n,r=`…`){if(Kg(e,n)<=t)return e;let i=[...e],a=Kg(r,n),o=i.length;for(;o>1&&Kg(i.slice(0,o).join(``),n)+a>t;)o--;return i.slice(0,o).join(``)+r}function Yg(e,t){if(!e)return;let n=e.stableTop??e.top,r=t.stableTop??t.top;return{dx:e.left-t.left,dy:n-r}}var Xg={top:12,right:20,bottom:24,left:50},Zg=10,Qg=.25;function $g(e,t,n){let r=t+n,i=e*Qg;if(r<=0||e-r>=i)return[t,n];let a=Math.max(0,e-i)/r;return[t*a,n*a]}var e_=class extends yg{initialize(){this.configDefine(`totalWidth`,{defaultValue:600}),this.configDefine(`totalHeight`,{defaultValue:400}),this.layer(`svg`,this.base,{dataBind:(e,t)=>e.selectAll(`svg`).data(t),insert:e=>e.append(`svg`),events:{enter:e=>{let t=this.config(`totalWidth`),n=this.config(`totalHeight`);e.attr(`width`,t).attr(`height`,n).append(`g`).attr(`transform`,e=>`translate(${e.left},${e.top})`)}}})}},t_=400,n_=2,r_=2,i_=9;function a_(e,t,n,r){let[i,a]=Ei(e,t,r);return o_(r===`log`?Mf().domain([i,a]).nice():_f().domain([i,a]).nice(),n)}function o_(e,t){let n=e.ticks(),r=t?Ng(t)??e.tickFormat():e.tickFormat(),i=n.map(e=>r(e));return i.length===0?0:Math.ceil(qg(i,Zg))+r_+i_}function s_(e){return e.length===0?0:Math.ceil(qg(e,Zg))+r_+i_}function c_(e,t,n,r,i,a){let o={},s=i??50,c=r??`left`,l=t??`auto`,u=l===`auto`?e>0&&e<t_?`inside`:`outside`:l,d=u===`inside`,f=u===`off`;return c===`right`?(o.left=0,o.right=d?n_:f?0:s):(o.right=a===!1?0:15,o.left=d?n_:f?0:s),d&&(o.top=35),(n===`inside`||n===`off`)&&(o.bottom=5),o}function l_(e,t){return parseFloat(e.dataset[t]??``)||0}function u_(e){let t=e.getBoundingClientRect(),n=getComputedStyle(e),r=t.width-(parseFloat(n.paddingLeft)||0)-(parseFloat(n.paddingRight)||0),i=t.height-(parseFloat(n.paddingTop)||0)-(parseFloat(n.paddingBottom)||0);return{width:r>0?r:l_(e,`bcContentWidth`),height:i>0?i:l_(e,`bcContentHeight`)}}function d_(e,t){let n=t.closest(`.bc-frame`);if(!n||n.style.getPropertyValue(`--bc-frame-bg`).trim()===`transparent`)return;e.querySelector(`.bc-canvas-bg`)?.remove();let r=e.ownerDocument.createElementNS(`http://www.w3.org/2000/svg`,`rect`);r.setAttribute(`class`,`bc-canvas-bg`),r.setAttribute(`width`,`100%`),r.setAttribute(`height`,`100%`),r.setAttribute(`fill`,Er(n)),e.insertBefore(r,e.firstChild)}function f_(e,t){let n={...Xg,...t},r=e.closest(`.bc-frame--constrained`)!=null;if(r){let t=parseFloat(e.dataset.headerH||`0`),r=parseFloat(e.dataset.footerH||`0`),i=n.top;n.top=t+i,n.bottom+=r,n.stableTop=i}let i=u_(e),a=i.width>0?i.width:600,o=i.height>0?i.height:400;[n.left,n.right]=$g(a,n.left,n.right),[n.top,n.bottom]=$g(o,n.top,n.bottom);let s=a-n.left-n.right,c=o-n.top-n.bottom,l=new e_(Q(e));l.config({totalWidth:a,totalHeight:o}),l.draw([n]);let u=e.querySelector(`svg`),d=u.querySelector(`g`);return d_(u,e),r&&(u.setAttribute(`viewBox`,`0 0 ${a} ${o}`),u.setAttribute(`preserveAspectRatio`,`none`),u.removeAttribute(`width`),u.removeAttribute(`height`),u.style.width=`100%`,u.style.height=`100%`,u.style.display=`block`),{svg:u,chartArea:d,width:s,height:c,margin:n}}function p_(e){return typeof window>`u`||typeof window.matchMedia!=`function`?e:window.matchMedia(`(prefers-reduced-motion: reduce)`).matches?0:e}var m_=0;function h_(e){m_=e?500:0}function g_(){return p_(m_)}function __(e,t){let n=p_(t??500);n<=0||typeof e.animate!=`function`||e.animate([{opacity:0},{opacity:1}],{duration:n,easing:`ease-in-out`})}function v_(e,t){let n=p_(t??500);if(e.querySelectorAll(`[data-bc-fade-overlay]`).forEach(e=>{typeof e.getAnimations==`function`&&e.getAnimations().forEach(e=>e.cancel()),e.remove()}),n<=0||e.children.length===0)return null;let r=document.createElement(`div`);return r.style.position=`absolute`,r.style.inset=`0`,r.style.pointerEvents=`none`,r.style.display=`flex`,r.style.flexDirection=`column`,r.dataset.bcFadeOverlay=`true`,Array.from(e.childNodes).forEach(e=>{r.appendChild(e.cloneNode(!0))}),r.querySelectorAll(`.bc-axis-vertical, .bc-axis-horizontal`).forEach(e=>{e.remove()}),r.querySelectorAll(`.bc-frame-footer, .bc-frame-note`).forEach(e=>{e.remove()}),r.querySelectorAll(`[data-bc-fade-overlay], .bc-frame--fade-snapshot`).forEach(e=>{e.remove()}),r.querySelectorAll(`.bc-frame`).forEach(e=>{e.classList.remove(`bc-frame`),e.classList.add(`bc-frame--fade-snapshot`)}),r}function y_(e,t,n){let r=p_(n??500);if(getComputedStyle(e).position===`static`&&(e.style.position=`relative`),e.appendChild(t),r>0&&typeof t.animate==`function`){let e=t.animate([{opacity:1},{opacity:0}],{duration:r,easing:`ease-in-out`});e.onfinish=()=>t.remove()}else t.remove()}var b_=60,x_=10,S_=8,C_=16,w_=10,T_=1.3,E_=12,D_=3,O_=14,k_=10;function A_(e,t,n=D_){if(e===``)return[``];if(e.length*w_<=t)return[e];let r=e.split(/\s+/).filter(Boolean);if(r.length===0)return null;let i=[],a=``;for(let e of r){if(e.length*w_>t)return null;let r=a?`${a} ${e}`:e;if(r.length*w_<=t)a=r;else if(i.push(a),a=e,i.length>=n)return null}return a&&i.push(a),i.length>n?null:i}var j_={year:`%Y`,month:`%b %Y`,day:`%b %-d, %Y`,datetime:`%b %-d, %Y %H:%M`};function M_(e){return typeof e.step==`function`}function N_(e,t){let n=xi(t);if(e&&e.includes(`%`)){if(n){let r=Nm(e),i=new Map;return t.forEach((e,t)=>i.set(e,n.dates[t])),e=>{if(e instanceof Date)return r(e);let t=i.get(String(e));return t?r(t):String(e)}}return null}if(e)return t.length>0?null:Ng(e)??Gd(e);if(n){let e=Nm(j_[n.granularity]??`%Y-%m-%d`),r=new Map;return t.forEach((e,t)=>r.set(e,n.dates[t])),t=>{if(t instanceof Date)return e(t);let n=r.get(String(t));return n?e(n):String(t)}}return null}function P_(e,t){let n=0;for(let r of e){let e=(t?t(r):r).length*w_;e>n&&(n=e)}return n}function F_(e,t){return e.map(e=>t?t(e):String(e))}function I_(e,t){let n=Math.max(C_,Math.ceil(e)+S_);return Math.max(2,Math.floor(t/n))}function L_(e,t,n){if(e.length<=1)return e;let r=I_(qg(F_(e,n??null),x_),t);if(e.length<=r)return e;let i=Math.ceil(e.length/r),a=[];for(let t=0;t<e.length;t+=i)a.push(t);let o=e.length-1;return a[a.length-1]!==o&&(o-a[a.length-1]<i&&a.pop(),a.push(o)),a.map(t=>e[t])}function R_(e,t,n){let r=Math.max(2,Math.floor(t/b_));for(;r>2;){let i=F_(e.ticks(r),n??e.tickFormat(r)),a=I_(qg(i,x_),t);if(i.length<=a)break;r=Math.min(r-1,a)}return r}function z_(e,t,n,r){return e.length<=1||t<=0||n===`horizontal`?!1:n===`vertical`||!xi(e)&&P_(e,r??null)>t/e.length*T_}function B_(e,t){if(e.length===0)return 0;let n=P_(e,t??null);return Math.ceil(n)+E_}function V_(e){let t=1;for(let n of e)n.length>t&&(t=n.length);return t<=1?0:t*O_+k_}function H_(e,t,n={},r=24){if(e.length===0||t<=0||n.labelPosition===`off`||n.labelPosition===`inside`)return;let i=n.tickFormat?n.tickFormat:N_(n.numberFormat??null,e),a=n.labelRotation??`auto`;if((a===`vertical`||xi(e)===null)&&e.length>1){let n=t/e.length*T_,o=P_(e,i)>n;if(a!==`vertical`&&o){let t=U_(e,n,i);if(t){let e=V_(Array.from(t.values()));return e>r?e:void 0}}}if(!z_(e,t,a,i))return;let o=B_(e,i);return o>r?o:void 0}function U_(e,t,n){let r=new Map,i=!1;for(let a of e){let e=A_(n?n(a):a,t);if(e===null)return null;r.set(a,e),e.length>1&&(i=!0)}return i?r:null}function W_(e,t){e.selectAll(`.tick`).each(function(){let e=Q(this),n=e.datum(),r=n instanceof Date?n.toISOString():String(n),i=t.get(r);if(!i||i.length<=1)return;let a=e.select(`text`);a.empty()||(a.attr(`dy`,null).text(null),i.forEach((e,t)=>{a.append(`tspan`).attr(`x`,0).attr(`dy`,t===0?`0.71em`:`1em`).text(e)}))})}var G_=class extends yg{initialize(){this.configDefine(`scale`,{defaultValue:ef()}),this.configDefine(`height`,{defaultValue:0}),this.configDefine(`tickPosition`,{defaultValue:`below`}),this.configDefine(`showAxis`,{defaultValue:!0}),this.configDefine(`showTicks`,{defaultValue:!1}),this.configDefine(`gridStyle`,{defaultValue:`dashed`}),this.configDefine(`ticks`,{defaultValue:null}),this.configDefine(`numberFormat`,{defaultValue:null}),this.configDefine(`width`,{defaultValue:0}),this.configDefine(`labels`,{defaultValue:[]}),this.configDefine(`labelPosition`,{defaultValue:`auto`}),this.configDefine(`labelRotation`,{defaultValue:`auto`}),this.configDefine(`zeroY`,{defaultValue:null}),this.configDefine(`tickFormat`,{defaultValue:null});let e=this.base.append(`g`);this.layer(`axis`,e,{dataBind:(e,t)=>e.selectAll(`.bc-axis-horizontal`).data(t),insert:e=>e.append(`g`).attr(`class`,`bc-axis bc-axis-horizontal`),events:{"merge:transition":e=>{this.applyAxis(e,`merge`)},exit:e=>{e.remove()},enter:e=>{this.applyAxis(e,`enter`)}}})}applyAxis(e,t){let n=this.config(`scale`),r=this.config(`scale`),i=this.config(`tickPosition`),a=this.config(`height`),o=this.config(`labelPosition`),s=this.config(`labelRotation`),c=this.config(`width`),l=this.config(`numberFormat`),u=this.config(`labels`),d=this.config(`tickFormat`),f=i===`above`?_a(n):ya(n);this.config(`showTicks`)||f.tickSizeOuter(0);let p=d||N_(l,u);p&&f.tickFormat(p);let m=M_(r),h=m?r.domain():[],g=m&&s!==`vertical`&&xi(h)!==null,_=null,v=!1;if(m&&!g&&h.length>1&&c>0){let e=c/h.length*T_,t=P_(h,p)>e;s===`vertical`?v=!0:t&&(_=U_(h,e,p),!_&&s===`auto`&&(v=!0))}let y=o===`auto`?`outside`:o,b=this.config(`ticks`);if(!b&&c>0){if(m){if(g||!v&&!_&&y!==`off`){let e=L_(h,c,p);e.length<h.length&&(b=e)}}else{let e=Di(r,Math.max(2,Math.floor(c/b_)));e?b=e:f.ticks(R_(r,c,p))}}b&&f.tickValues(b);let x=i===`above`?0:a,S=e.node(),C=t===`merge`?g_():0;if(t===`merge`){if(!S)return;C>0?(e.attr(`transform`,`translate(0,${x})`),e.duration(C).call(f)):Q(S).attr(`transform`,`translate(0,${x})`).call(f)}else e.attr(`transform`,`translate(0,${x})`),e.call(f);let w=C>0?e:S?Q(S):e;if(!this.config(`showAxis`))w.select(`.domain`).remove();else if(t===`enter`){let e=this.config(`zeroY`);if(e!=null){let t=e-(i===`above`?0:a);w.select(`.domain`).attr(`transform`,`translate(0,${t})`)}}this.config(`showTicks`)||w.selectAll(`.tick line`).remove(),y===`off`?w.selectAll(`.tick text`).remove():y===`inside`&&w.selectAll(`.tick text`).attr(`y`,0).attr(`dy`,`-0.6em`),v&&y!==`off`?w.selectAll(`.tick text`).attr(`transform`,`rotate(-90)`).attr(`text-anchor`,`end`).attr(`x`,i===`above`?9:-9).attr(`y`,0).attr(`dy`,`0.32em`):(w.selectAll(`.tick text`).attr(`transform`,null),y!==`off`&&K_(w,c)),_&&y!==`off`&&W_(w,_)}postDraw(){let e=this.config(`gridStyle`),t=this.config(`height`),n=this.base.select(`.bc-axis-horizontal`).node();n&&q_(n,e,t)}};function K_(e,t){t>0&&e.selectAll(`.tick text`).each((e,n,r)=>{let i=r[n],a=i.parentElement,o=Number(/translate\(([-\d.]+)/.exec(a?.getAttribute(`transform`)??``)?.[1]??`NaN`);if(!Number.isFinite(o))return;let s=Kg(i.textContent??``,x_)/2;o-s<0?Q(i).attr(`text-anchor`,`start`):o+s>t&&Q(i).attr(`text-anchor`,`end`)})}function q_(e,t,n){let r=e.ownerSVGElement?.parentElement??document.documentElement,i=getComputedStyle(r).getPropertyValue(`--bc-grid-color`).trim()||`#ccc`,a=t===`none`||n<=0?[]:[null];Q(e).selectAll(`.tick`).each(function(){Q(this).selectAll(`.bc-grid-line`).data(a).join(`line`).attr(`class`,`bc-grid-line`).attr(`x1`,0).attr(`x2`,0).attr(`y1`,0).attr(`y2`,-n).attr(`stroke`,i).attr(`stroke-width`,1).attr(`stroke-dasharray`,J_[t]??null)})}var J_={dashed:`4,4`,dotted:`1,3`};function Y_(e,t,n,r={},i){let a=new G_(Q(e));if(i){i.querySelectorAll(`.bc-grid-line`).forEach(e=>e.remove());let t=e.lastElementChild;t&&t.appendChild(i)}let o=M_(t)?t.domain():[];return a.config({scale:t,height:n,tickPosition:r.tickPosition??`below`,showAxis:r.showAxis??!0,showTicks:r.showTicks??!1,gridStyle:r.gridStyle??`dashed`,ticks:r.ticks??null,numberFormat:r.numberFormat??null,width:r.width??0,labels:o,labelPosition:r.labelPosition??`auto`,labelRotation:r.labelRotation??`auto`,zeroY:r.zeroY??null,tickFormat:r.tickFormat??null}),a.draw([{placeholder:!0}]),e.querySelector(`.bc-axis-horizontal`)}var X_=30;function Z_(e){return typeof e.bandwidth==`function`}var Q_=class extends yg{initialize(){this.configDefine(`scale`,{defaultValue:_f()}),this.configDefine(`direction`,{defaultValue:Rr.Left}),this.configDefine(`showAxis`,{defaultValue:!0}),this.configDefine(`showTicks`,{defaultValue:!1}),this.configDefine(`gridStyle`,{defaultValue:Br.Dashed}),this.configDefine(`gridWidth`,{defaultValue:0}),this.configDefine(`height`,{defaultValue:0}),this.configDefine(`ticks`,{defaultValue:null}),this.configDefine(`numberFormat`,{defaultValue:null}),this.configDefine(`labelPosition`,{defaultValue:Vr.Auto}),this.configDefine(`topPadding`,{defaultValue:0}),this.configDefine(`tickFormat`,{defaultValue:null});let e=this.base.append(`g`);this.layer(`axis`,e,{dataBind:(e,t)=>e.selectAll(`.bc-axis-vertical`).data(t),insert:e=>e.append(`g`).attr(`class`,`bc-axis bc-axis-vertical`),events:{"merge:transition":e=>{let t=this.config(`scale`),n=this.config(`direction`),r=this.config(`showAxis`),i=this.config(`showTicks`),a=this.config(`labelPosition`),o=this.config(`gridWidth`),s=this.config(`height`),c=n===Rr.Right?va(t):ba(t);i||c.tickSizeOuter(0);let l=this.config(`ticks`);if(l)c.tickValues(l);else if(s>0){let e=Math.max(2,Math.floor(s/X_)),n=Di(t,e);n?c.tickValues(n):c.ticks(e)}let u=this.config(`tickFormat`);if(u)c.tickFormat(u);else{let e=this.config(`numberFormat`),n=e&&!Z_(t)?Ng(e):null;n&&c.tickFormat(n)}let d=g_(),f=e.node();if(f){d>0?e.duration(d).call(c):Q(f).call(c),r||Q(f).select(`.domain`).remove(),i||Q(f).selectAll(`.tick line`).attr(`opacity`,0);let t=a===Vr.Auto?o>0&&o<400?Vr.Inside:Vr.Outside:a;if(t===Vr.Inside){let t=r?4:0,i=d>0?e.selectAll(`.tick text`):Q(f).selectAll(`.tick text`);Q(f).selectAll(`.tick text`).classed(`bc-axis-label-inside`,!0),n===Rr.Right?i.attr(`x`,-t).attr(`dy`,`-0.4em`).attr(`text-anchor`,`end`):i.attr(`x`,t).attr(`dy`,`-0.4em`).attr(`text-anchor`,`start`)}else t===Vr.Off&&Q(f).selectAll(`.tick text`).attr(`opacity`,0)}},exit:e=>{e.remove()},enter:e=>{let t=this.config(`scale`),n=this.config(`direction`),r=this.config(`labelPosition`),i=this.config(`gridWidth`),a=this.config(`height`),o=this.config(`topPadding`),s=n===Rr.Right?va(t):ba(t);this.config(`showTicks`)||s.tickSizeOuter(0);let c=this.config(`ticks`);if(c)s.tickValues(c);else if(a>0){let e=Math.max(2,Math.floor(a/X_)),n=Di(t,e);n?s.tickValues(n):s.ticks(e)}let l=this.config(`tickFormat`);if(l)s.tickFormat(l);else{let e=this.config(`numberFormat`),n=e&&!Z_(t)?Ng(e):null;n&&s.tickFormat(n)}e.call(s);let u=this.config(`showAxis`),d=this.config(`showTicks`);u||e.select(`.domain`).remove();let f=r===Vr.Auto?i>0&&i<400?Vr.Inside:Vr.Outside:r;if(f===Vr.Inside){let t=u?4:0;if(e.selectAll(`.tick text`).classed(`bc-axis-label-inside`,!0),n===Rr.Right?e.selectAll(`.tick text`).attr(`x`,-t).attr(`dy`,`-0.4em`).attr(`text-anchor`,`end`):e.selectAll(`.tick text`).attr(`x`,t).attr(`dy`,`-0.4em`).attr(`text-anchor`,`start`),d?e.selectAll(`.tick line`).attr(`x2`,n===Rr.Right?-6:6):e.selectAll(`.tick line`).remove(),o>0&&u){let t=e.select(`.domain`);if(!t.empty()){let e=t.attr(`d`),n=e.replace(/V[\d.]+/,`V${-o}`);n!==e&&t.attr(`d`,n)}}}else d||e.selectAll(`.tick line`).remove(),f===Vr.Off&&e.selectAll(`.tick text`).remove()}}})}postDraw(){let e=this.config(`gridStyle`),t=this.config(`gridWidth`),n=this.config(`direction`),r=this.base.select(`.bc-axis-vertical`).node();r&&ev(r,e,n===Rr.Right?-t:t)}},$_={[Br.Dashed]:`4,4`,[Br.Dotted]:`1,3`};function ev(e,t,n){let r=e.ownerSVGElement?.parentElement??document.documentElement,i=getComputedStyle(r).getPropertyValue(`--bc-grid-color`).trim()||`#ccc`,a=t===Br.None||n===0?[]:[null];Q(e).selectAll(`.tick`).each(function(){Q(this).selectAll(`.bc-grid-line`).data(a).join(`line`).attr(`class`,`bc-grid-line`).attr(`x1`,0).attr(`x2`,n).attr(`y1`,0).attr(`y2`,0).attr(`stroke`,i).attr(`stroke-width`,1).attr(`stroke-dasharray`,$_[t]??null)})}function tv(e){return typeof e.step==`function`}var nv=new WeakMap,rv=new WeakMap;function iv(e,t){let n=rv.get(e);rv.set(e,t),n!==void 0&&n!==t&&nv.get(e)?.destroy()}var av=class e{vGroup=null;hGroup=null;vChart=null;hChart=null;container;initialized=!1;constructor(e){this.container=e}static for(t){let n=nv.get(t);return n||(n=new e(t),nv.set(t,n)),n}static clear(e){nv.delete(e)}detach(){this.vGroup?.parentNode&&(Q(this.vGroup).interrupt().selectAll(`*`).interrupt(),this.vGroup.querySelectorAll(`.bc-grid-line`).forEach(e=>e.remove()),this.vGroup.remove()),this.hGroup?.parentNode&&(Q(this.hGroup).interrupt().selectAll(`*`).interrupt(),this.hGroup.querySelectorAll(`.bc-grid-line`).forEach(e=>e.remove()),this.hGroup.remove())}attach(e,t){if(!this.initialized)this.vGroup=document.createElementNS(`http://www.w3.org/2000/svg`,`g`),this.vGroup.setAttribute(`class`,`bc-axis-service-v`),this.hGroup=document.createElementNS(`http://www.w3.org/2000/svg`,`g`),this.hGroup.setAttribute(`class`,`bc-axis-service-h`),e.appendChild(this.vGroup),e.appendChild(this.hGroup),this.vChart=new Q_(Q(this.vGroup)),this.hChart=new G_(Q(this.hGroup)),this.initialized=!0;else{for(let e of[this.vGroup,this.hGroup])Q(e).interrupt(),e.removeAttribute(`transform`),Q(e).selectAll(`.tick`).interrupt();if(e.appendChild(this.vGroup),e.appendChild(this.hGroup),t&&(Math.abs(t.dx)>=1||Math.abs(t.dy)>=1)){let{dx:e,dy:n}=t;for(let t of[this.vGroup,this.hGroup]){t.setAttribute(`transform`,`translate(${e},${n})`);let r=g_();r>0?Q(t).transition().duration(r).attrTween(`transform`,()=>{let t=Cc(e,0),r=Cc(n,0);return e=>`translate(${t(e)},${r(e)})`}):t.removeAttribute(`transform`)}}}}update(e){let t=e.order??`vertical-first`;t===`horizontal-first`?(this.updateHorizontal(e.horizontal),this.updateVertical(e.vertical)):(this.updateVertical(e.vertical),this.updateHorizontal(e.horizontal)),t===`horizontal-first`?this.hGroup&&this.vGroup&&this.hGroup.parentNode&&this.hGroup.parentNode.insertBefore(this.hGroup,this.vGroup):this.vGroup&&this.hGroup&&this.vGroup.parentNode&&this.vGroup.parentNode.insertBefore(this.vGroup,this.hGroup)}updateVertical(e){if(!this.vChart||!this.vGroup)return;if(!e){this.vGroup.style.display=`none`;return}this.vGroup.style.display=``;let t=e.options;this.vChart.config({scale:e.scale,direction:t.direction??`left`,showAxis:t.showAxis??!0,showTicks:t.showTicks??!1,gridStyle:t.gridStyle??`dashed`,gridWidth:t.gridWidth??0,height:e.height,ticks:t.ticks??null,numberFormat:t.numberFormat??null,labelPosition:t.labelPosition??`auto`,topPadding:t.topPadding??0,tickFormat:t.tickFormat??null}),this.vChart.draw([{placeholder:!0}]);let n=this.vGroup.querySelector(`.bc-axis-vertical`);n&&(t.direction??`left`)===`right`?n.setAttribute(`transform`,`translate(${t.gridWidth??0},0)`):n&&n.removeAttribute(`transform`)}updateHorizontal(e){if(!this.hChart||!this.hGroup)return;if(!e){this.hGroup.style.display=`none`;return}this.hGroup.style.display=``;let t=e.options,n=e.scale,r=tv(n)?n.domain():[];this.hChart.config({scale:n,height:e.height,tickPosition:t.tickPosition??`below`,showAxis:t.showAxis??!0,showTicks:t.showTicks??!1,gridStyle:t.gridStyle??`dashed`,ticks:t.ticks??null,numberFormat:t.numberFormat??null,width:t.width??0,labels:r,labelPosition:t.labelPosition??`auto`,labelRotation:t.labelRotation??`auto`,zeroY:t.zeroY??null,tickFormat:t.tickFormat??null}),this.hChart.draw([{placeholder:!0}])}destroy(){this.detach(),this.vChart=null,this.hChart=null,this.vGroup=null,this.hGroup=null,this.initialized=!1,nv.delete(this.container)}},ov=Math.min,sv=Math.max,cv=Math.round,lv=e=>({x:e,y:e}),uv={left:`right`,right:`left`,bottom:`top`,top:`bottom`};function dv(e,t,n){return sv(e,ov(t,n))}function fv(e,t){return typeof e==`function`?e(t):e}function pv(e){return e.split(`-`)[0]}function mv(e){return e.split(`-`)[1]}function hv(e){return e===`x`?`y`:`x`}function gv(e){return e===`y`?`height`:`width`}function _v(e){let t=e[0];return t===`t`||t===`b`?`y`:`x`}function vv(e){return hv(_v(e))}function yv(e,t,n){n===void 0&&(n=!1);let r=mv(e),i=vv(e),a=gv(i),o=i===`x`?r===(n?`end`:`start`)?`right`:`left`:r===`start`?`bottom`:`top`;return t.reference[a]>t.floating[a]&&(o=Ov(o)),[o,Ov(o)]}function bv(e){let t=Ov(e);return[xv(e),t,xv(t)]}function xv(e){return e.includes(`start`)?e.replace(`start`,`end`):e.replace(`end`,`start`)}var Sv=[`left`,`right`],Cv=[`right`,`left`],wv=[`top`,`bottom`],Tv=[`bottom`,`top`];function Ev(e,t,n){switch(e){case`top`:case`bottom`:return n?t?Cv:Sv:t?Sv:Cv;case`left`:case`right`:return t?wv:Tv;default:return[]}}function Dv(e,t,n,r){let i=mv(e),a=Ev(pv(e),n===`start`,r);return i&&(a=a.map(e=>e+`-`+i),t&&(a=a.concat(a.map(xv)))),a}function Ov(e){let t=pv(e);return uv[t]+e.slice(t.length)}function kv(e){return{top:e.top??0,right:e.right??0,bottom:e.bottom??0,left:e.left??0}}function Av(e){return typeof e==`number`?{top:e,right:e,bottom:e,left:e}:kv(e)}function jv(e){let{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}function Mv(e,t,n){let{reference:r,floating:i}=e,a=_v(t),o=vv(t),s=gv(o),c=pv(t),l=a===`y`,u=r.x+r.width/2-i.width/2,d=r.y+r.height/2-i.height/2,f=r[s]/2-i[s]/2,p;switch(c){case`top`:p={x:u,y:r.y-i.height};break;case`bottom`:p={x:u,y:r.y+r.height};break;case`right`:p={x:r.x+r.width,y:d};break;case`left`:p={x:r.x-i.width,y:d};break;default:p={x:r.x,y:r.y}}let m=mv(t);return m&&(p[o]+=f*(m===`end`?1:-1)*(n&&l?-1:1)),p}async function Nv(e,t){t===void 0&&(t={});let{x:n,y:r,platform:i,rects:a,elements:o,strategy:s}=e,{boundary:c=`clippingAncestors`,rootBoundary:l=`viewport`,elementContext:u=`floating`,altBoundary:d=!1,padding:f=0}=fv(t,e),p=Av(f),m=o[d?u===`floating`?`reference`:`floating`:u],h=jv(await i.getClippingRect({element:await(i.isElement==null?void 0:i.isElement(m))??!0?m:m.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(o.floating)),boundary:c,rootBoundary:l,strategy:s})),g=u===`floating`?{x:n,y:r,width:a.floating.width,height:a.floating.height}:a.reference,_=await(i.getOffsetParent==null?void 0:i.getOffsetParent(o.floating)),v=await(i.isElement==null?void 0:i.isElement(_))&&await(i.getScale==null?void 0:i.getScale(_))||{x:1,y:1},y=jv(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:o,rect:g,offsetParent:_,strategy:s}):g);return{top:(h.top-y.top+p.top)/v.y,bottom:(y.bottom-h.bottom+p.bottom)/v.y,left:(h.left-y.left+p.left)/v.x,right:(y.right-h.right+p.right)/v.x}}var Pv=50,Fv=async(e,t,n)=>{let{placement:r=`bottom`,strategy:i=`absolute`,middleware:a=[],platform:o}=n,s=o.detectOverflow?o:{...o,detectOverflow:Nv},c=await(o.isRTL==null?void 0:o.isRTL(t)),l=await o.getElementRects({reference:e,floating:t,strategy:i}),{x:u,y:d}=Mv(l,r,c),f=r,p=0,m={};for(let n=0;n<a.length;n++){let h=a[n];if(!h)continue;let{name:g,fn:_}=h,{x:v,y,data:b,reset:x}=await _({x:u,y:d,initialPlacement:r,placement:f,strategy:i,middlewareData:m,rects:l,platform:s,elements:{reference:e,floating:t}});u=v??u,d=y??d,m[g]={...m[g],...b},x&&p<Pv&&(p++,typeof x==`object`&&(x.placement&&(f=x.placement),x.rects&&(l=x.rects===!0?await o.getElementRects({reference:e,floating:t,strategy:i}):x.rects),{x:u,y:d}=Mv(l,f,c)),n=-1)}return{x:u,y:d,placement:f,strategy:i,middlewareData:m}},Iv=function(e){return e===void 0&&(e={}),{name:`flip`,options:e,async fn(t){var n;let{placement:r,middlewareData:i,rects:a,initialPlacement:o,platform:s,elements:c}=t,{mainAxis:l=!0,crossAxis:u=!0,fallbackPlacements:d,fallbackStrategy:f=`bestFit`,fallbackAxisSideDirection:p=`none`,flipAlignment:m=!0,...h}=fv(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};let g=pv(r),_=_v(o),v=pv(o)===o,y=await(s.isRTL==null?void 0:s.isRTL(c.floating)),b=d||(v||!m?[Ov(o)]:bv(o)),x=p!==`none`;!d&&x&&b.push(...Dv(o,m,p,y));let S=[o,...b],C=await s.detectOverflow(t,h),w=[],T=i.flip?.overflows||[];if(l&&w.push(C[g]),u){let e=yv(r,a,y);w.push(C[e[0]],C[e[1]])}if(T=[...T,{placement:r,overflows:w}],!w.every(e=>e<=0)){let e=(i.flip?.index||0)+1,t=S[e];if(t&&(u!==`alignment`||_===_v(t)||T.every(e=>_v(e.placement)!==_||e.overflows[0]>0)))return{data:{index:e,overflows:T},reset:{placement:t}};let n=T.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0]?.placement;if(!n)switch(f){case`bestFit`:{let e=T.filter(e=>{if(x){let t=_v(e.placement);return t===_||t===`y`}return!0}).map(e=>[e.placement,e.overflows.filter(e=>e>0).reduce((e,t)=>e+t,0)]).sort((e,t)=>e[1]-t[1])[0]?.[0];e&&(n=e);break}case`initialPlacement`:n=o}if(r!==n)return{reset:{placement:n}}}return{}}}},Lv=new Set([`left`,`top`]);async function Rv(e,t){let{placement:n,platform:r,elements:i}=e,a=await(r.isRTL==null?void 0:r.isRTL(i.floating)),o=pv(n),s=mv(n),c=_v(n)===`y`,l=Lv.has(o)?-1:1,u=a&&c?-1:1,d=fv(t,e),{mainAxis:f,crossAxis:p,alignmentAxis:m}=typeof d==`number`?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return s&&typeof m==`number`&&(p=s===`end`?m*-1:m),c?{x:p*u,y:f*l}:{x:f*l,y:p*u}}var zv=function(e){return e===void 0&&(e=0),{name:`offset`,options:e,async fn(t){var n;let{x:r,y:i,placement:a,middlewareData:o}=t,s=await Rv(t,e);return a===o.offset?.placement&&(n=o.arrow)!=null&&n.alignmentOffset?{}:{x:r+s.x,y:i+s.y,data:{...s,placement:a}}}}},Bv=function(e){return e===void 0&&(e={}),{name:`shift`,options:e,async fn(t){let{x:n,y:r,placement:i,platform:a}=t,{mainAxis:o=!0,crossAxis:s=!1,limiter:c={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...l}=fv(e,t),u={x:n,y:r},d=await a.detectOverflow(t,l),f=_v(i),p=hv(f),m=u[p],h=u[f],g=(e,t)=>dv(t+d[e===`y`?`top`:`left`],t,t-d[e===`y`?`bottom`:`right`]);o&&(m=g(p,m)),s&&(h=g(f,h));let _=c.fn({...t,[p]:m,[f]:h});return{..._,data:{x:_.x-n,y:_.y-r,enabled:{[p]:o,[f]:s}}}}}};function Vv(){return typeof window<`u`}function Hv(e){return Gv(e)?(e.nodeName||``).toLowerCase():`#document`}function Uv(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Wv(e){return((Gv(e)?e.ownerDocument:e.document)||window.document)?.documentElement}function Gv(e){return Vv()?e instanceof Node||e instanceof Uv(e).Node:!1}function Kv(e){return Vv()?e instanceof Element||e instanceof Uv(e).Element:!1}function qv(e){return Vv()?e instanceof HTMLElement||e instanceof Uv(e).HTMLElement:!1}function Jv(e){return!Vv()||typeof ShadowRoot>`u`?!1:e instanceof ShadowRoot||e instanceof Uv(e).ShadowRoot}function Yv(e){let{overflow:t,overflowX:n,overflowY:r,display:i}=oy(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&i!==`inline`&&i!==`contents`}function Xv(e){return/^(table|td|th)$/.test(Hv(e))}function Zv(e){try{if(e.matches(`:popover-open`))return!0}catch{}try{return e.matches(`:modal`)}catch{return!1}}var Qv=/transform|translate|scale|rotate|perspective|filter/,$v=/paint|layout|strict|content/,ey=e=>!!e&&e!==`none`,ty;function ny(e){let t=Kv(e)?oy(e):e;return ey(t.transform)||ey(t.translate)||ey(t.scale)||ey(t.rotate)||ey(t.perspective)||!iy()&&(ey(t.backdropFilter)||ey(t.filter))||Qv.test(t.willChange||``)||$v.test(t.contain||``)}function ry(e){let t=cy(e);for(;qv(t)&&!ay(t);){if(ny(t))return t;if(Zv(t))return null;t=cy(t)}return null}function iy(){return ty??=typeof CSS<`u`&&CSS.supports&&CSS.supports(`-webkit-backdrop-filter`,`none`),ty}function ay(e){return/^(html|body|#document)$/.test(Hv(e))}function oy(e){return Uv(e).getComputedStyle(e)}function sy(e){return Kv(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function cy(e){if(Hv(e)===`html`)return e;let t=e.assignedSlot||e.parentNode||Jv(e)&&e.host||Wv(e);return Jv(t)?t.host:t}function ly(e){let t=cy(e);return ay(t)?(e.ownerDocument||e).body:qv(t)&&Yv(t)?t:ly(t)}function uy(e,t,n){t===void 0&&(t=[]),n===void 0&&(n=!0);let r=ly(e),i=r===e.ownerDocument?.body,a=Uv(r);if(i){let e=dy(a);return t.concat(a,a.visualViewport||[],Yv(r)?r:[],e&&n?uy(e):[])}return t.concat(r,uy(r,[],n))}function dy(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function fy(e){let t=oy(e),n=parseFloat(t.width)||0,r=parseFloat(t.height)||0,i=qv(e),a=i?e.offsetWidth:n,o=i?e.offsetHeight:r,s=cv(n)!==a||cv(r)!==o;return s&&(n=a,r=o),{width:n,height:r,$:s}}function py(e){return Kv(e)?e:e.contextElement}function my(e){let t=py(e);if(!qv(t))return lv(1);let n=t.getBoundingClientRect(),{width:r,height:i,$:a}=fy(t),o=(a?cv(n.width):n.width)/r,s=(a?cv(n.height):n.height)/i;return(!o||!Number.isFinite(o))&&(o=1),(!s||!Number.isFinite(s))&&(s=1),{x:o,y:s}}var hy=lv(0);function gy(e){let t=Uv(e);return!iy()||!t.visualViewport?hy:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function _y(e,t,n){return t===void 0&&(t=!1),!!n&&t&&n===Uv(e)}function vy(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);let i=e.getBoundingClientRect(),a=py(e),o=lv(1);t&&(r?Kv(r)&&(o=my(r)):o=my(e));let s=_y(a,n,r)?gy(a):lv(0),c=(i.left+s.x)/o.x,l=(i.top+s.y)/o.y,u=i.width/o.x,d=i.height/o.y;if(a&&r){let e=Uv(a),t=Kv(r)?Uv(r):r,n=e,i=dy(n);for(;i&&t!==n;){let e=my(i),t=i.getBoundingClientRect(),r=oy(i),a=t.left+(i.clientLeft+parseFloat(r.paddingLeft))*e.x,o=t.top+(i.clientTop+parseFloat(r.paddingTop))*e.y;c*=e.x,l*=e.y,u*=e.x,d*=e.y,c+=a,l+=o,n=Uv(i),i=dy(n)}}return jv({width:u,height:d,x:c,y:l})}function yy(e,t){let n=sy(e).scrollLeft;return t?t.left+n:vy(Wv(e)).left+n}function by(e,t){let n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-yy(e,n),y:n.top+t.scrollTop}}function xy(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e,a=i===`fixed`,o=Wv(r),s=t?Zv(t.floating):!1;if(r===o||s&&a)return n;let c={scrollLeft:0,scrollTop:0},l=lv(1),u=lv(0),d=qv(r);if((d||!a)&&((Hv(r)!==`body`||Yv(o))&&(c=sy(r)),d)){let e=vy(r);l=my(r),u.x=e.x+r.clientLeft,u.y=e.y+r.clientTop}let f=o&&!d&&!a?by(o,c):lv(0);return{width:n.width*l.x,height:n.height*l.y,x:n.x*l.x-c.scrollLeft*l.x+u.x+f.x,y:n.y*l.y-c.scrollTop*l.y+u.y+f.y}}function Sy(e){return e.getClientRects?Array.from(e.getClientRects()):[]}function Cy(e){let t=sy(e),n=e.ownerDocument.body,r=sv(e.scrollWidth,e.clientWidth,n.scrollWidth,n.clientWidth),i=sv(e.scrollHeight,e.clientHeight,n.scrollHeight,n.clientHeight),a=-t.scrollLeft+yy(e),o=-t.scrollTop;return oy(n).direction===`rtl`&&(a+=sv(e.clientWidth,n.clientWidth)-r),{width:r,height:i,x:a,y:o}}var wy=25;function Ty(e,t,n){n===void 0&&(n=`viewport`);let r=n===`layoutViewport`,i=Uv(e),a=Wv(e),o=i.visualViewport,s=a.clientWidth,c=a.clientHeight,l=0,u=0;if(o){let e=!iy()||t===`fixed`;r?e||(l=-o.offsetLeft,u=-o.offsetTop):(s=o.width,c=o.height,e&&(l=o.offsetLeft,u=o.offsetTop))}if(yy(a)<=0){let e=a.ownerDocument,t=e.body,n=getComputedStyle(t),r=e.compatMode===`CSS1Compat`&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,i=Math.abs(a.clientWidth-t.clientWidth-r),o=getComputedStyle(a).scrollbarGutter===`stable both-edges`?i/2:i;o<=wy&&(s-=o)}return{width:s,height:c,x:l,y:u}}function Ey(e,t){let n=vy(e,!0,t===`fixed`),r=n.top+e.clientTop,i=n.left+e.clientLeft,a=my(e);return{width:e.clientWidth*a.x,height:e.clientHeight*a.y,x:i*a.x,y:r*a.y}}function Dy(e,t,n){let r;if(t===`viewport`||t===`layoutViewport`)r=Ty(e,n,t);else if(t===`document`)r=Cy(Wv(e));else if(Kv(t))r=Ey(t,n);else{let n=gy(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return jv(r)}function Oy(e,t){let n=t.get(e);if(n)return n;let r=uy(e,[],!1).filter(e=>Kv(e)&&Hv(e)!==`body`),i=null,a=oy(e).position===`fixed`,o=a?cy(e):e;for(;Kv(o)&&!ay(o);){let e=oy(o),t=ny(o),n=i?i.position:a?`fixed`:``;!t&&(n===`fixed`||n===`absolute`&&e.position===`static`)?r=r.filter(e=>e!==o):i=e,o=cy(o)}return t.set(e,r),r}function ky(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e,a=[...n===`clippingAncestors`?Zv(t)?[]:Oy(t,this._c):[].concat(n),r],o=Dy(t,a[0],i),s=o.top,c=o.right,l=o.bottom,u=o.left;for(let e=1;e<a.length;e++){let n=Dy(t,a[e],i);s=sv(n.top,s),c=ov(n.right,c),l=ov(n.bottom,l),u=sv(n.left,u)}return{width:c-u,height:l-s,x:u,y:s}}function Ay(e){let{width:t,height:n}=fy(e);return{width:t,height:n}}function jy(e,t,n){let r=qv(t),i=Wv(t),a=n===`fixed`,o=vy(e,!0,a,t),s={scrollLeft:0,scrollTop:0},c=lv(0);if((r||!a)&&((Hv(t)!==`body`||Yv(i))&&(s=sy(t)),r)){let e=vy(t,!0,a,t);c.x=e.x+t.clientLeft,c.y=e.y+t.clientTop}!r&&i&&(c.x=yy(i));let l=i&&!r&&!a?by(i,s):lv(0);return{x:o.left+s.scrollLeft-c.x-l.x,y:o.top+s.scrollTop-c.y-l.y,width:o.width,height:o.height}}function My(e){return oy(e).position===`static`}function Ny(e,t){if(!qv(e)||oy(e).position===`fixed`)return null;if(t)return t(e);let n=e.offsetParent;return Wv(e)===n&&(n=n.ownerDocument.body),n}function Py(e,t){let n=Uv(e);if(Zv(e))return n;if(!qv(e)){let t=cy(e);for(;t&&!ay(t);){if(Kv(t)&&!My(t))return t;t=cy(t)}return n}let r=Ny(e,t);for(;r&&Xv(r)&&My(r);)r=Ny(r,t);return r&&ay(r)&&My(r)&&!ny(r)?n:r||ry(e)||n}var Fy=async function(e){let t=this.getOffsetParent||Py,n=this.getDimensions,r=await n(e.floating);return{reference:jy(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function Iy(e){return oy(e).direction===`rtl`}var Ly={convertOffsetParentRelativeRectToViewportRelativeRect:xy,getDocumentElement:Wv,getClippingRect:ky,getOffsetParent:Py,getElementRects:Fy,getClientRects:Sy,getDimensions:Ay,getScale:my,isElement:Kv,isRTL:Iy},Ry=zv,zy=Bv,By=Iv,Vy=(e,t,n)=>{let r=new Map,i=n??{},a={...Ly,...i.platform,_c:r};return Fv(e,t,{...i,platform:a})},Hy=`bc-tooltip`;function Uy(){if(document.getElementById(`bc-tooltip-styles`))return;let e=document.createElement(`style`);e.id=`bc-tooltip-styles`,e.textContent=`
312
+ `).map(e=>e.trim()).filter(Boolean),n=[],r=[],i=t[0]?.match(/^series\s*=\s*(.+)$/);if(i){let e=z(i[1].trim()),r=[];for(let e=1;e<t.length;e++){let n=t[e].match(H),i=n??t[e].match(V);i&&r.push({cells:z(i[2]),label:L(i[1]),legacy:n!==null})}let a=e.length>1||!r.some(e=>e.legacy)?e.map(R):R(e[0]).split(`,`).map(e=>e.trim()),o=a.map(()=>[]);for(let e of r){n.push(e.label);for(let t=0;t<a.length;t++)o[t].push(N(e.cells[t]))}let s=a.map((e,t)=>({name:e,values:o[t]})),c=ne(a,r);return{labels:te(n),values:o[0]??[],series:s,...c.length&&{textColumns:c}}}for(let e of t){let t=e.match(ee);t&&(n.push(L(t[1])),r.push(N(t[2])))}return{labels:te(n),values:r}}var ie=[{name:`Blueprint`,label:`Blueprint`,colors:[`#2563A0`,`#D4A63A`,`#C94044`,`#2D8659`,`#4B90CF`,`#163A65`]},{name:`BlueprintBold`,label:`Blueprint Bold`,colors:[`#2563A0`,`#DDF247`,`#C94044`,`#2D8659`,`#D4A63A`,`#163A65`]},{name:`JosefAlbers`,label:`Albers`,colors:[`#c00559`,`#de1f6c`,`#f3a20d`,`#f07a13`,`#de6716`]},{name:`Durorthod`,label:`Amber`,colors:[`#4b2b1f`,`#803c15`,`#c6782c`,`#ffa91d`,`#ebdf9a`]},{name:`X41`,label:`Berry`,colors:[`#411f6b`,`#783999`,`#be3979`,`#cc857d`,`#e2c6a6`]},{name:`Bright`,label:`Bright`,colors:[`#462255`,`#ff8811`,`#9dd9d2`,`#046e8f`,`#d44d5c`]},{name:`Cancri`,label:`Cancri`,colors:[`#343854`,`#8c384d`,`#c9002e`,`#d95e31`,`#f0c742`,`#e5dcd1`]},{name:`Ceres`,label:`Ceres`,colors:[`#2f3437`,`#4a5f71`,`#6f8ba0`,`#dbdddd`]},{name:`MarcChagall`,label:`Chagall`,colors:[`#3f6f76`,`#69b7ce`,`#c65840`,`#f4ce4b`,`#563d63`]},{name:`Pelewensis`,label:`Coral`,colors:[`#e2b000`,`#dde576`,`#2449a2`,`#809098`,`#303538`]},{name:`Deathmasks`,label:`Deathmasks`,colors:[`#926159`,`#94947b`,`#c7d2d8`,`#62b7c8`,`#43535c`,`#203648`]},{name:`Leucosternon`,label:`Deep Sea`,colors:[`#302e5b`,`#0e34b2`,`#207cf5`,`#9ec8ff`,`#e3e43a`]},{name:`Deelite`,label:`Deelite`,colors:[`#48448e`,`#8ccc58`,`#fc4d97`,`#bd2066`]},{name:`X10`,label:`Dusk`,colors:[`#383138`,`#5b4361`,`#846d86`,`#d8e0c0`,`#e3c58a`,`#a89e5e`]},{name:`Vitrixerand`,label:`Earth`,colors:[`#3d303e`,`#723f27`,`#9b6044`,`#b5804c`,`#facd9a`]},{name:`Egypt`,label:`Egypt`,colors:[`#dd5129`,`#0f7ba2`,`#43b284`,`#fab255`]},{name:`ElectronicNight`,label:`Electric Night`,colors:[`#cb54d6`,`#3e45c4`,`#3b3233`,`#362f78`,`#57b4ae`]},{name:`LutjanusSebae`,label:`Emperor`,colors:[`#dadedf`,`#a2bac5`,`#ce3d21`,`#992216`,`#59241e`]},{name:`Enara`,label:`Enara`,colors:[`#353535`,`#3d5983`,`#5a8a54`,`#cfb023`]},{name:`Camo871`,label:`Fiesta`,colors:[`#ffff14`,`#fea31d`,`#ce2d41`,`#3a3fa3`]},{name:`Folklore`,label:`Folklore`,colors:[`#343434`,`#5c5c5c`,`#bababa`,`#f8f8f8`]},{name:`Fritsch`,label:`Fritsch`,colors:[`#0f8d7b`,`#8942bd`,`#373333`,`#eadd17`]},{name:`AgSunset`,label:`Glow`,colors:[`#4b2991`,`#872ca2`,`#c0369d`,`#ea4f88`,`#fa7876`,`#f6a97a`,`#edd9a3`]},{name:`Harvey`,label:`Harvey`,colors:[`#c6d4d6`,`#274c4f`,`#a4432d`,`#b17c51`]},{name:`Heep`,label:`Heep`,colors:[`#466e9a`,`#e84d45`,`#35332f`,`#a1baac`]},{name:`Imperator`,label:`Imperator`,colors:[`#302e62`,`#0527b4`,`#555dfe`,`#e4e500`,`#b8980f`]},{name:`Klimt`,label:`Klimt`,colors:[`#df9ed4`,`#d52c50`,`#eacc62`,`#469d76`,`#39546e`,`#9936a3`]},{name:`KnickCity`,label:`Knick City`,colors:[`#213453`,`#ff6720`,`#707372`,`#c8c9c7`]},{name:`London`,label:`London`,colors:[`#bd241e`,`#e56b1e`,`#ffcd22`,`#223259`]},{name:`Lover`,label:`Lover`,colors:[`#b8396b`,`#ffd1d7`,`#e4dfb7`,`#76bae0`,`#b28f81`,`#54483e`]},{name:`Maya`,label:`Maya`,colors:[`#3d5a80`,`#98c1d9`,`#c7e1e2`,`#ee6c4d`,`#293241`]},{name:`X24`,label:`Mocha`,colors:[`#44302e`,`#7e5945`,`#bc927b`,`#e6dbd6`]},{name:`Camo873`,label:`Neon`,colors:[`#132f8a`,`#5a56c8`,`#fc7ead`,`#ffca3e`]},{name:`NetsCity`,label:`Nets City`,colors:[`#353535`,`#ffb81c`,`#da291c`,`#004c97`,`#418fde`]},{name:`Nodoubt`,label:`No Doubt`,colors:[`#385581`,`#6dbac6`,`#dac190`,`#c9052c`]},{name:`ClaesOldenburg`,label:`Oldenburg`,colors:[`#95b1c9`,`#263656`,`#698946`,`#f8d440`,`#c30014`]},{name:`Peacesells`,label:`Peace Sells`,colors:[`#9a5155`,`#483943`,`#ecc463`,`#a497b2`]},{name:`PabloPicasso`,label:`Picasso`,colors:[`#4e7989`,`#a9011b`,`#e4a826`,`#80944e`,`#dcd6b2`]},{name:`Bifasciatum`,label:`Reef`,colors:[`#36313d`,`#16407b`,`#2b7ff9`,`#9feaee`,`#6cbe50`]},{name:`SiameseDream`,label:`Siamese Dream`,colors:[`#e3dbd2`,`#413026`,`#a34d2c`,`#cd8e40`]},{name:`X115`,label:`Sienna`,colors:[`#203748`,`#633633`,`#8e442e`,`#e9b35e`,`#e4dda7`]},{name:`Sixers`,label:`Sixers`,colors:[`#888b8d`,`#e4d5d3`,`#003da5`,`#d50032`]},{name:`SolLeWitt`,label:`Sol LeWitt`,colors:[`#0a71b6`,`#f9c40a`,`#403131`,`#eb5432`,`#d6dedc`]},{name:`Sunset`,label:`Sunset`,colors:[`#41476b`,`#675478`,`#9e6374`,`#c67b6f`,`#de9b71`,`#efbc82`,`#eedba6`]},{name:`Sunset2`,label:`Sunset II`,colors:[`#254075`,`#61599d`,`#b46c79`,`#eb7f54`,`#ffb33d`]},{name:`Sunset3`,label:`Sunset III`,colors:[`#4f2355`,`#701c34`,`#a63228`,`#c7662a`,`#eba42b`]},{name:`Pal9`,label:`Tropical`,colors:[`#273b5b`,`#c1c243`,`#e73e26`,`#2e6657`,`#d7e4a3`,`#24a99c`]},{name:`Salvelinus`,label:`Trout`,colors:[`#e6452e`,`#e49a36`,`#f9dd4c`,`#5b4a4c`,`#303542`]},{name:`TheovanDoesburg`,label:`Van Doesburg`,colors:[`#bd748f`,`#3d578e`,`#bfab68`,`#dad7d0`,`#313433`]},{name:`Wizards`,label:`Wizards`,colors:[`#c8102e`,`#213453`,`#8d9093`,`#c8c9c7`]},{name:`FrancescoXanto`,label:`Xanto`,colors:[`#2c6aa5`,`#dcad00`,`#d8c67e`,`#c97f17`,`#578b55`]},{name:`Zeppelin`,label:`Zeppelin`,colors:[`#efdb15`,`#739c9c`,`#0d484c`,`#c71a08`]}],ae=Object.fromEntries(ie.map(e=>[e.name,e.colors]));function U(e){if(!e)return;let t=ae[e];return t?[...t]:void 0}function oe(){return ie}var{min:se,max:ce}=Math,le=(e,t=0,n=1)=>se(ce(t,e),n),ue=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]=le(e[t],0,255)):t===3&&(e[t]=le(e[t],0,1));return e},de={};for(let e of[`Boolean`,`Number`,`String`,`Function`,`Array`,`Date`,`RegExp`,`Undefined`,`Null`])de[`[object ${e}]`]=e.toLowerCase();function W(e){return de[Object.prototype.toString.call(e)]||`object`}var G=(e,t=null)=>e.length>=3?Array.prototype.slice.call(e):W(e[0])==`object`&&t?t.split(``).filter(t=>e[0][t]!==void 0).map(t=>e[0][t]):e[0].slice(0),fe=e=>{if(e.length<2)return null;let t=e.length-1;return W(e[t])==`string`?e[t].toLowerCase():null},{PI:pe,min:me,max:he}=Math,ge=e=>Math.round(e*100)/100,_e=e=>Math.round(e*100)/100,ve=pe*2,ye=pe/3,be=pe/180,xe=180/pe;function Se(e){return[...e.slice(0,3).reverse(),...e.slice(3)]}var Ce={format:{},autodetect:[]},K=class{constructor(...e){let t=this;if(W(e[0])===`object`&&e[0].constructor&&e[0].constructor===this.constructor)return e[0];let n=fe(e),r=!1;if(!n){r=!0,Ce.sorted||=(Ce.autodetect=Ce.autodetect.sort((e,t)=>t.p-e.p),!0);for(let t of Ce.autodetect)if(n=t.test(...e),n)break}if(Ce.format[n])t._rgb=ue(Ce.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 W(this.hex)==`function`?this.hex():`[${this._rgb.join(`,`)}]`}},we=`3.2.0`,Te=(...e)=>new K(...e);Te.version=we;var Ee={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`},De=/^#?([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/,Oe=/^#?([A-Fa-f0-9]{8}|[A-Fa-f0-9]{4})$/,ke=e=>{if(e.match(De)){(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(Oe)){(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:Ae}=Math,je=(...e)=>{let[t,n,r,i]=G(e,`rgba`),a=fe(e)||`auto`;i===void 0&&(i=1),a===`auto`&&(a=i<1?`rgba`:`rgb`),t=Ae(t),n=Ae(n),r=Ae(r);let o=`000000`+(t<<16|n<<8|r).toString(16);o=o.substr(o.length-6);let s=`0`+Ae(i*255).toString(16);switch(s=s.substr(s.length-2),a.toLowerCase()){case`rgba`:return`#${o}${s}`;case`argb`:return`#${s}${o}`;default:return`#${o}`}};K.prototype.name=function(){let e=je(this._rgb,`rgb`);for(let t of Object.keys(Ee))if(Ee[t]===e)return t.toLowerCase();return e},Ce.format.named=e=>{if(e=e.toLowerCase(),Ee[e])return ke(Ee[e]);throw Error(`unknown color name: `+e)},Ce.autodetect.push({p:5,test:(e,...t)=>{if(!t.length&&W(e)===`string`&&Ee[e.toLowerCase()])return`named`}}),K.prototype.alpha=function(e,t=!1){return e!==void 0&&W(e)===`number`?t?(this._rgb[3]=e,this):new K([this._rgb[0],this._rgb[1],this._rgb[2],e],`rgb`):this._rgb[3]},K.prototype.clipped=function(){return this._rgb._clipped||!1};var Me={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}},Ne=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 Pe(e){let t=Ne.get(String(e).toLowerCase());if(!t)throw Error(`unknown Lab illuminant `+e);Me.labWhitePoint=e,Me.Xn=t[0],Me.Zn=t[1]}function Fe(){return Me.labWhitePoint}var Ie=(...e)=>{e=G(e,`lab`);let[t,n,r]=e,[i,a,o]=Le(t,n,r),[s,c,l]=ze(i,a,o);return[s,c,l,e.length>3?e[3]:1]},Le=(e,t,n)=>{let{kE:r,kK:i,kKE:a,Xn:o,Yn:s,Zn:c}=Me,l=(e+16)/116,u=.002*t+l,d=l-.005*n,f=u*u*u,p=d*d*d,m=f>r?f:(116*u-16)/i,h=e>a?((e+16)/116)**3:e/i,g=p>r?p:(116*d-16)/i;return[m*o,h*s,g*c]},Re=e=>{let t=Math.sign(e);return e=Math.abs(e),(e<=.0031308?e*12.92:1.055*e**(1/2.4)-.055)*t},ze=(e,t,n)=>{let{MtxAdaptMa:r,MtxAdaptMaI:i,MtxXYZ2RGB:a,RefWhiteRGB:o,Xn:s,Yn:c,Zn:l}=Me,u=s*r.m00+c*r.m10+l*r.m20,d=s*r.m01+c*r.m11+l*r.m21,f=s*r.m02+c*r.m12+l*r.m22,p=o.X*r.m00+o.Y*r.m10+o.Z*r.m20,m=o.X*r.m01+o.Y*r.m11+o.Z*r.m21,h=o.X*r.m02+o.Y*r.m12+o.Z*r.m22,g=(e*r.m00+t*r.m10+n*r.m20)*(p/u),_=(e*r.m01+t*r.m11+n*r.m21)*(m/d),v=(e*r.m02+t*r.m12+n*r.m22)*(h/f),y=g*i.m00+_*i.m10+v*i.m20,b=g*i.m01+_*i.m11+v*i.m21,x=g*i.m02+_*i.m12+v*i.m22,S=Re(y*a.m00+b*a.m10+x*a.m20),C=Re(y*a.m01+b*a.m11+x*a.m21),w=Re(y*a.m02+b*a.m12+x*a.m22);return[S*255,C*255,w*255]},Be=(...e)=>{let[t,n,r,...i]=G(e,`rgb`),[a,o,s]=Ue(t,n,r),[c,l,u]=Ve(a,o,s);return[c,l,u,...i.length>0&&i[0]<1?[i[0]]:[]]};function Ve(e,t,n){let{Xn:r,Yn:i,Zn:a,kE:o,kK:s}=Me,c=e/r,l=t/i,u=n/a,d=c>o?c**(1/3):(s*c+16)/116,f=l>o?l**(1/3):(s*l+16)/116,p=u>o?u**(1/3):(s*u+16)/116;return[116*f-16,500*(d-f),200*(f-p)]}function He(e){let t=Math.sign(e);return e=Math.abs(e),(e<=.04045?e/12.92:((e+.055)/1.055)**2.4)*t}var Ue=(e,t,n)=>{e=He(e/255),t=He(t/255),n=He(n/255);let{MtxRGB2XYZ:r,MtxAdaptMa:i,MtxAdaptMaI:a,Xn:o,Yn:s,Zn:c,As:l,Bs:u,Cs:d}=Me,f=e*r.m00+t*r.m10+n*r.m20,p=e*r.m01+t*r.m11+n*r.m21,m=e*r.m02+t*r.m12+n*r.m22,h=o*i.m00+s*i.m10+c*i.m20,g=o*i.m01+s*i.m11+c*i.m21,_=o*i.m02+s*i.m12+c*i.m22,v=f*i.m00+p*i.m10+m*i.m20,y=f*i.m01+p*i.m11+m*i.m21,b=f*i.m02+p*i.m12+m*i.m22;return v*=h/l,y*=g/u,b*=_/d,f=v*a.m00+y*a.m10+b*a.m20,p=v*a.m01+y*a.m11+b*a.m21,m=v*a.m02+y*a.m12+b*a.m22,[f,p,m]};K.prototype.lab=function(){return Be(this._rgb)},Object.assign(Te,{lab:(...e)=>new K(...e,`lab`),getLabWhitePoint:Fe,setLabWhitePoint:Pe}),Ce.format.lab=Ie,Ce.autodetect.push({p:2,test:(...e)=>{if(e=G(e,`lab`),W(e)===`array`&&e.length===3)return`lab`}}),K.prototype.darken=function(e=1){let t=this,n=t.lab();return n[0]-=Me.Kn*e,new K(n,`lab`).alpha(t.alpha(),!0)},K.prototype.brighten=function(e=1){return this.darken(-e)},K.prototype.darker=K.prototype.darken,K.prototype.brighter=K.prototype.brighten,K.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};var{pow:We}=Math,Ge=1e-7,Ke=20;K.prototype.luminance=function(e,t=`rgb`){if(e!==void 0&&W(e)===`number`){if(e===0)return new K([0,0,0,this._rgb[3]],`rgb`);if(e===1)return new K([255,255,255,this._rgb[3]],`rgb`);let n=this.luminance(),r=Ke,i=(n,a)=>{let o=n.interpolate(a,.5,t),s=o.luminance();return Math.abs(e-s)<Ge||!r--?o:s>e?i(n,o):i(o,a)};return new K([...(n>e?i(new K([0,0,0]),this):i(this,new K([255,255,255]))).rgb(),this._rgb[3]])}return qe(...this._rgb.slice(0,3))};var qe=(e,t,n)=>(e=Je(e),t=Je(t),n=Je(n),.2126*e+.7152*t+.0722*n),Je=e=>(e/=255,e<=.03928?e/12.92:We((e+.055)/1.055,2.4)),Ye={},Xe=(e,t,n=.5,...r)=>{let i=r[0]||`lrgb`;if(!Ye[i]&&!r.length&&(i=Object.keys(Ye)[0]),!Ye[i])throw Error(`interpolation mode ${i} is not defined`);return W(e)!==`object`&&(e=new K(e)),W(t)!==`object`&&(t=new K(t)),Ye[i](e,t,n).alpha(e.alpha()+n*(t.alpha()-e.alpha()))};K.prototype.mix=K.prototype.interpolate=function(e,t=.5,...n){return Xe(this,e,t,...n)},K.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 K([t[0]*n,t[1]*n,t[2]*n,n],`rgb`)};var{sin:Ze,cos:Qe}=Math,$e=(...e)=>{let[t,n,r]=G(e,`lch`);return isNaN(r)&&(r=0),r*=be,[t,Qe(r)*n,Ze(r)*n]},et=(...e)=>{e=G(e,`lch`);let[t,n,r]=e,[i,a,o]=$e(t,n,r),[s,c,l]=Ie(i,a,o);return[s,c,l,e.length>3?e[3]:1]},tt=(...e)=>et(...Se(G(e,`hcl`))),{sqrt:nt,atan2:rt,round:it}=Math,at=(...e)=>{let[t,n,r]=G(e,`lab`),i=nt(n*n+r*r),a=(rt(r,n)*xe+360)%360;return it(i*1e4)===0&&(a=NaN),[t,i,a]},ot=(...e)=>{let[t,n,r,...i]=G(e,`rgb`),[a,o,s]=Be(t,n,r),[c,l,u]=at(a,o,s);return[c,l,u,...i.length>0&&i[0]<1?[i[0]]:[]]};K.prototype.lch=function(){return ot(this._rgb)},K.prototype.hcl=function(){return Se(ot(this._rgb))},Object.assign(Te,{lch:(...e)=>new K(...e,`lch`),hcl:(...e)=>new K(...e,`hcl`)}),Ce.format.lch=et,Ce.format.hcl=tt,[`lch`,`hcl`].forEach(e=>Ce.autodetect.push({p:2,test:(...t)=>{if(t=G(t,e),W(t)===`array`&&t.length===3)return e}})),K.prototype.saturate=function(e=1){let t=this,n=t.lch();return n[1]+=Me.Kn*e,n[1]<0&&(n[1]=0),new K(n,`lch`).alpha(t.alpha(),!0)},K.prototype.desaturate=function(e=1){return this.saturate(-e)},K.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(W(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(W(t)===`number`)a[e]=t;else throw Error(`unsupported value for Color.set`);let i=new K(a,r);return n?(this._rgb=i._rgb,this):i}throw Error(`unknown channel ${i} in mode ${r}`)}return a},K.prototype.tint=function(e=.5,...t){return Xe(this,`white`,e,...t)},K.prototype.shade=function(e=.5,...t){return Xe(this,`black`,e,...t)},Ye.rgb=(e,t,n)=>{let r=e._rgb,i=t._rgb;return new K(r[0]+n*(i[0]-r[0]),r[1]+n*(i[1]-r[1]),r[2]+n*(i[2]-r[2]),`rgb`)};var{sqrt:st,pow:ct}=Math;Ye.lrgb=(e,t,n)=>{let[r,i,a]=e._rgb,[o,s,c]=t._rgb;return new K(st(ct(r,2)*(1-n)+ct(o,2)*n),st(ct(i,2)*(1-n)+ct(s,2)*n),st(ct(a,2)*(1-n)+ct(c,2)*n),`rgb`)},Ye.lab=(e,t,n)=>{let r=e.lab(),i=t.lab();return new K(r[0]+n*(i[0]-r[0]),r[1]+n*(i[1]-r[1]),r[2]+n*(i[2]-r[2]),`lab`)};var lt=(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 f,p,m,h;return!isNaN(o)&&!isNaN(s)?(h=s>o&&s-o>180?s-(o+360):s<o&&o-s>180?s+360-o:s-o,p=o+n*h):isNaN(o)?isNaN(s)?p=NaN:(p=s,(u==1||u==0)&&r!=`hsv`&&(f=l)):(p=o,(d==1||d==0)&&r!=`hsv`&&(f=c)),f===void 0&&(f=c+n*(l-c)),m=u+n*(d-u),r===`oklch`?new K([m,f,p],r):new K([p,f,m],r)},ut=(e,t,n)=>lt(e,t,n,`lch`);Ye.lch=ut,Ye.hcl=ut;var dt=e=>{if(W(e)==`number`&&e>=0&&e<=16777215)return[e>>16,e>>8&255,e&255,1];throw Error(`unknown num color: `+e)},ft=(...e)=>{let[t,n,r]=G(e,`rgb`);return(t<<16)+(n<<8)+r};K.prototype.num=function(){return ft(this._rgb)},Object.assign(Te,{num:(...e)=>new K(...e,`num`)}),Ce.format.num=dt,Ce.autodetect.push({p:5,test:(...e)=>{if(e.length===1&&W(e[0])===`number`&&e[0]>=0&&e[0]<=16777215)return`num`}}),Ye.num=(e,t,n)=>{let r=e.num();return new K(r+n*(t.num()-r),`num`)};var{floor:pt}=Math,mt=(...e)=>{e=G(e,`hcg`);let[t,n,r]=e,i,a,o;r*=255;let s=n*255;if(n===0)i=a=o=r;else{t===360&&(t=0),t>360&&(t-=360),t<0&&(t+=360),t/=60;let e=pt(t),c=t-e,l=r*(1-n),u=l+s*(1-c),d=l+s*c,f=l+s;switch(e){case 0:[i,a,o]=[f,d,l];break;case 1:[i,a,o]=[u,f,l];break;case 2:[i,a,o]=[l,f,d];break;case 3:[i,a,o]=[l,u,f];break;case 4:[i,a,o]=[d,l,f];break;case 5:[i,a,o]=[f,l,u]}}return[i,a,o,e.length>3?e[3]:1]},ht=(...e)=>{let[t,n,r]=G(e,`rgb`),i=me(t,n,r),a=he(t,n,r),o=a-i,s=o*100/255,c=i/(255-o)*100,l;return o===0?l=NaN:(t===a&&(l=(n-r)/o),n===a&&(l=2+(r-t)/o),r===a&&(l=4+(t-n)/o),l*=60,l<0&&(l+=360)),[l,s,c]};K.prototype.hcg=function(){return ht(this._rgb)},Te.hcg=(...e)=>new K(...e,`hcg`),Ce.format.hcg=mt,Ce.autodetect.push({p:1,test:(...e)=>{if(e=G(e,`hcg`),W(e)===`array`&&e.length===3)return`hcg`}}),Ye.hcg=(e,t,n)=>lt(e,t,n,`hcg`);var{cos:gt}=Math,_t=(...e)=>{e=G(e,`hsi`);let[t,n,r]=e,i,a,o;return isNaN(t)&&(t=0),isNaN(n)&&(n=0),t>360&&(t-=360),t<0&&(t+=360),t/=360,t<1/3?(o=(1-n)/3,i=(1+n*gt(ve*t)/gt(ye-ve*t))/3,a=1-(o+i)):t<2/3?(t-=1/3,i=(1-n)/3,a=(1+n*gt(ve*t)/gt(ye-ve*t))/3,o=1-(i+a)):(t-=2/3,a=(1-n)/3,o=(1+n*gt(ve*t)/gt(ye-ve*t))/3,i=1-(a+o)),i=le(r*i*3),a=le(r*a*3),o=le(r*o*3),[i*255,a*255,o*255,e.length>3?e[3]:1]},{min:vt,sqrt:yt,acos:bt}=Math,xt=(...e)=>{let[t,n,r]=G(e,`rgb`);t/=255,n/=255,r/=255;let i,a=vt(t,n,r),o=(t+n+r)/3,s=o>0?1-a/o:0;return s===0?i=NaN:(i=(t-n+(t-r))/2,i/=yt((t-n)*(t-n)+(t-r)*(n-r)),i=bt(i),r>n&&(i=ve-i),i/=ve),[i*360,s,o]};K.prototype.hsi=function(){return xt(this._rgb)},Te.hsi=(...e)=>new K(...e,`hsi`),Ce.format.hsi=_t,Ce.autodetect.push({p:2,test:(...e)=>{if(e=G(e,`hsi`),W(e)===`array`&&e.length===3)return`hsi`}}),Ye.hsi=(e,t,n)=>lt(e,t,n,`hsi`);var q=(...e)=>{e=G(e,`hsl`);let[t,n,r]=e,i,a,o;if(n===0)i=a=o=r*255;else{let e=[0,0,0],s=[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?s[t]=l+(c-l)*6*e[t]:2*e[t]<1?s[t]=c:3*e[t]<2?s[t]=l+(c-l)*(2/3-e[t])*6:s[t]=l;[i,a,o]=[s[0]*255,s[1]*255,s[2]*255]}return e.length>3?[i,a,o,e[3]]:[i,a,o,1]},J=(...e)=>{e=G(e,`rgba`);let[t,n,r]=e;t/=255,n/=255,r/=255;let i=me(t,n,r),a=he(t,n,r),o=(a+i)/2,s,c;return a===i?(s=0,c=NaN):s=o<.5?(a-i)/(a+i):(a-i)/(2-a-i),t==a?c=(n-r)/(a-i):n==a?c=2+(r-t)/(a-i):r==a&&(c=4+(t-n)/(a-i)),c*=60,c<0&&(c+=360),e.length>3&&e[3]!==void 0?[c,s,o,e[3]]:[c,s,o]};K.prototype.hsl=function(){return J(this._rgb)},Te.hsl=(...e)=>new K(...e,`hsl`),Ce.format.hsl=q,Ce.autodetect.push({p:2,test:(...e)=>{if(e=G(e,`hsl`),W(e)===`array`&&e.length===3)return`hsl`}}),Ye.hsl=(e,t,n)=>lt(e,t,n,`hsl`);var{floor:St}=Math,Ct=(...e)=>{e=G(e,`hsv`);let[t,n,r]=e,i,a,o;if(r*=255,n===0)i=a=o=r;else{t===360&&(t=0),t>360&&(t-=360),t<0&&(t+=360),t/=60;let e=St(t),s=t-e,c=r*(1-n),l=r*(1-n*s),u=r*(1-n*(1-s));switch(e){case 0:[i,a,o]=[r,u,c];break;case 1:[i,a,o]=[l,r,c];break;case 2:[i,a,o]=[c,r,u];break;case 3:[i,a,o]=[c,l,r];break;case 4:[i,a,o]=[u,c,r];break;case 5:[i,a,o]=[r,c,l]}}return[i,a,o,e.length>3?e[3]:1]},{min:wt,max:Y}=Math,Tt=(...e)=>{e=G(e,`rgb`);let[t,n,r]=e,i=wt(t,n,r),a=Y(t,n,r),o=a-i,s,c,l;return l=a/255,a===0?(s=NaN,c=0):(c=o/a,t===a&&(s=(n-r)/o),n===a&&(s=2+(r-t)/o),r===a&&(s=4+(t-n)/o),s*=60,s<0&&(s+=360)),[s,c,l]};K.prototype.hsv=function(){return Tt(this._rgb)},Te.hsv=(...e)=>new K(...e,`hsv`),Ce.format.hsv=Ct,Ce.autodetect.push({p:2,test:(...e)=>{if(e=G(e,`hsv`),W(e)===`array`&&e.length===3)return`hsv`}}),Ye.hsv=(e,t,n)=>lt(e,t,n,`hsv`);function Et(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}var Dt=(...e)=>{e=G(e,`lab`);let[t,n,r,...i]=e,[a,o,s]=Ot([t,n,r]),[c,l,u]=ze(a,o,s);return[c,l,u,...i.length>0&&i[0]<1?[i[0]]:[]]};function Ot(e){return Et([[1.2268798758459243,-.5578149944602171,.2813910456659647],[-.0405757452148008,1.112286803280317,-.0717110580655164],[-.0763729366746601,-.4214933324022432,1.5869240198367816]],Et([[1,.3963377773761749,.2158037573099136],[1,-.1055613458156586,-.0638541728258133],[1,-.0894841775298119,-1.2914855480194092]],e).map(e=>e**3))}var kt=(...e)=>{let[t,n,r,...i]=G(e,`rgb`);return[...At(Ue(t,n,r)),...i.length>0&&i[0]<1?[i[0]]:[]]};function At(e){return Et([[.210454268309314,.7936177747023054,-.0040720430116193],[1.9779985324311684,-2.42859224204858,.450593709617411],[.0259040424655478,.7827717124575296,-.8086757549230774]],Et([[.819022437996703,.3619062600528904,-.1288737815209879],[.0329836539323885,.9292868615863434,.0361446663506424],[.0481771893596242,.2642395317527308,.6335478284694309]],e).map(e=>Math.cbrt(e)))}K.prototype.oklab=function(){return kt(this._rgb)},Object.assign(Te,{oklab:(...e)=>new K(...e,`oklab`)}),Ce.format.oklab=Dt,Ce.autodetect.push({p:2,test:(...e)=>{if(e=G(e,`oklab`),W(e)===`array`&&e.length===3)return`oklab`}}),Ye.oklab=(e,t,n)=>{let r=e.oklab(),i=t.oklab();return new K(r[0]+n*(i[0]-r[0]),r[1]+n*(i[1]-r[1]),r[2]+n*(i[2]-r[2]),`oklab`)},Ye.oklch=(e,t,n)=>lt(e,t,n,`oklch`);var{pow:jt,sqrt:Mt,PI:Nt,cos:Pt,sin:X,atan2:Ft}=Math,It=(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 K(e)),t===`lrgb`)return Lt(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*Nt;c+=Pt(t)*n[0],l+=X(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*Nt;c+=Pt(t)*n[r+1],l+=X(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=Ft(l/s[e],c/s[e])/Nt*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 K(o,t).alpha(u>.99999?1:u,!0)},Lt=(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]+=jt(s[0],2)*o,r[1]+=jt(s[1],2)*o,r[2]+=jt(s[2],2)*o,r[3]+=s[3]*o}return r[0]=Mt(r[0]),r[1]=Mt(r[1]),r[2]=Mt(r[2]),r[3]>.9999999&&(r[3]=1),new K(ue(r))},{pow:Rt}=Math;function zt(e){let t=`rgb`,n=Te(`#ccc`),r=0,i=[0,1],a=[0,1],o=[],s=[0,0],c=!1,l=[],u=!1,d=0,f=1,p=!1,m={},h=!0,g=1,_=function(e){if(e||=[`#fff`,`#000`],e&&W(e)===`string`&&Te.brewer&&Te.brewer[e.toLowerCase()]&&(e=Te.brewer[e.toLowerCase()]),W(e)===`array`){e.length===1&&(e=[e[0],e[0]]),e=e.slice(0);for(let t=0;t<e.length;t++)e[t]=Te(e[t]);o.length=0;for(let t=0;t<e.length;t++)o.push(t/(e.length-1))}return S(),l=e},v=function(e){if(c!=null){let t=c.length-1,n=0;for(;n<t&&e>=c[n];)n++;return n-1}return 0},y=e=>e,b=e=>e,x=function(e,r){let i,a;if(r??=!1,isNaN(e)||e===null)return n;a=r?e:c&&c.length>2?v(e)/(c.length-2):f===d?1:(e-d)/(f-d),a=b(a),r||(a=y(a)),g!==1&&(a=Rt(a,g)),a=s[0]+a*(1-s[0]-s[1]),a=le(a,0,1);let u=Math.floor(a*1e4);if(h&&m[u])i=m[u];else{if(W(l)===`array`)for(let e=0;e<o.length;e++){let n=o[e];if(a<=n){i=l[e];break}if(a>=n&&e===o.length-1){i=l[e];break}if(a>n&&a<o[e+1]){a=(a-n)/(o[e+1]-n),i=Te.interpolate(l[e],l[e+1],a,t);break}}else W(l)===`function`&&(i=l(a));h&&(m[u]=i)}return i};var S=()=>m={};_(e);let C=function(e){let t=Te(x(e));return u&&t[u]?t[u]():t};return C.classes=function(e){if(e!=null){if(W(e)===`array`)c=e,i=[e[0],e[e.length-1]];else{let t=Te.analyze(i);c=e===0?[t.min,t.max]:Te.limits(t,`e`,e)}return C}return c},C.domain=function(e){if(!arguments.length)return a;a=e.slice(0),d=e[0],f=e[e.length-1],o=[];let t=l.length;if(e.length===t&&d!==f)for(let t of Array.from(e))o.push((t-d)/(f-d));else{for(let e=0;e<t;e++)o.push(e/(t-1));if(e.length>2){let t=e.map((t,n)=>n/(e.length-1)),n=e.map(e=>(e-d)/(f-d));n.every((e,n)=>t[n]===e)||(b=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 i=[d,f],C},C.mode=function(e){return arguments.length?(t=e,S(),C):t},C.range=function(e,t){return _(e,t),C},C.out=function(e){return u=e,C},C.spread=function(e){return arguments.length?(r=e,C):r},C.correctLightness=function(e){return e??=!0,p=e,S(),y=p?function(e){let t=x(0,!0).lab()[0],n=x(1,!0).lab()[0],r=t>n,i=x(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=x(e,!0).lab()[0],o=i-a})();return e}:e=>e,C},C.padding=function(e){return e==null?s:(W(e)===`number`&&(e=[e,e]),s=e,C)},C.colors=function(t,n){arguments.length<2&&(n=`hex`);let r=[];if(arguments.length===0)r=l.slice(0);else if(t===1)r=[C(.5)];else if(t>1){let e=i[0],n=i[1]-e;r=Bt(0,t,!1).map(r=>C(e+r/(t-1)*n))}else{e=[];let t=[];if(c&&c.length>2)for(let e=1,n=c.length,r=1<=n;r?e<n:e>n;r?e++:e--)t.push((c[e-1]+c[e])*.5);else t=i;r=t.map(e=>C(e))}return Te[n]&&(r=r.map(e=>e[n]())),r},C.cache=function(e){return e==null?h:(h=e,C)},C.gamma=function(e){return e==null?g:(g=e,C)},C.nodata=function(e){return e==null?n:(n=Te(e),C)},C}function Bt(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}var Vt=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},Ht=function(e){let t,n,r,i;if(e=e.map(e=>new K(e)),e.length===2)[n,r]=e.map(e=>e.lab()),t=function(e){return new K([0,1,2].map(t=>n[t]+e*(r[t]-n[t])),`lab`)};else if(e.length===3)[n,r,i]=e.map(e=>e.lab()),t=function(e){return new K([0,1,2].map(t=>(1-e)*(1-e)*n[t]+2*(1-e)*e*r[t]+e*e*i[t]),`lab`)};else if(e.length===4){let a;[n,r,i,a]=e.map(e=>e.lab()),t=function(e){return new K([0,1,2].map(t=>(1-e)*(1-e)*(1-e)*n[t]+3*(1-e)*(1-e)*e*r[t]+3*(1-e)*e*e*i[t]+e*e*e*a[t]),`lab`)}}else if(e.length>=5){let n,r,i;n=e.map(e=>e.lab()),i=e.length-1,r=Vt(i),t=function(e){let t=1-e;return new K([0,1,2].map(a=>n.reduce((n,o,s)=>n+r[s]*t**(i-s)*e**s*o[a],0)),`lab`)}}else throw RangeError(`No point in running bezier with only one color.`);return t},Ut=e=>{let t=Ht(e);return t.scale=()=>zt(t),t},{round:Wt}=Math;K.prototype.rgb=function(e=!0){return e===!1?this._rgb.slice(0,3):this._rgb.slice(0,3).map(Wt)},K.prototype.rgba=function(e=!0){return this._rgb.slice(0,4).map((t,n)=>n<3?e===!1?t:Wt(t):t)},Object.assign(Te,{rgb:(...e)=>new K(...e,`rgb`)}),Ce.format.rgb=(...e)=>{let t=G(e,`rgba`);return t[3]===void 0&&(t[3]=1),t},Ce.autodetect.push({p:3,test:(...e)=>{if(e=G(e,`rgba`),W(e)===`array`&&(e.length===3||e.length===4&&W(e[3])==`number`&&e[3]>=0&&e[3]<=1))return`rgb`}});var Gt=(e,t,n)=>{if(!Gt[n])throw Error(`unknown blend mode `+n);return Gt[n](e,t)},Kt=e=>(t,n)=>{let r=Te(n).rgb(),i=Te(t).rgb();return Te.rgb(e(r,i))},qt=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};Gt.normal=Kt(qt(e=>e)),Gt.multiply=Kt(qt((e,t)=>e*t/255)),Gt.screen=Kt(qt((e,t)=>255*(1-(1-e/255)*(1-t/255)))),Gt.overlay=Kt(qt((e,t)=>t<128?2*e*t/255:255*(1-2*(1-e/255)*(1-t/255)))),Gt.darken=Kt(qt((e,t)=>e>t?t:e)),Gt.lighten=Kt(qt((e,t)=>e>t?e:t)),Gt.dodge=Kt(qt((e,t)=>e===255?255:(e=t/255*255/(1-e/255),e>255?255:e))),Gt.burn=Kt(qt((e,t)=>255*(1-(1-t/255)/(e/255))));var{pow:Jt,sin:Yt,cos:Xt}=Math;function Zt(e=300,t=-1.5,n=1,r=1,i=[0,1]){let a=0,o;W(i)===`array`?o=i[1]-i[0]:(o=0,i=[i,i]);let s=function(s){let c=ve*((e+120)/360+t*s),l=Jt(i[0]+o*s,r),u=(a===0?n:n[0]+s*a)*l*(1-l)/2,d=Xt(c),f=Yt(c),p=l+u*(-.14861*d+1.78277*f),m=l+u*(-.29227*d-.90649*f),h=l+1.97294*d*u;return Te(ue([p*255,m*255,h*255,1]))};return s.start=function(t){return t==null?e:(e=t,s)},s.rotations=function(e){return e==null?t:(t=e,s)},s.gamma=function(e){return e==null?r:(r=e,s)},s.hue=function(e){return e==null?n:(n=e,W(n)===`array`?(a=n[1]-n[0],a===0&&(n=n[1])):a=0,s)},s.lightness=function(e){return e==null?i:(W(e)===`array`?(i=e,o=e[1]-e[0]):(i=[e,e],o=0),s)},s.scale=()=>Te.scale(s),s.hue(n),s}var Qt=`0123456789abcdef`,{floor:$t,random:en}=Math,tn=(e=en)=>{let t=`#`;for(let n=0;n<6;n++)t+=Qt.charAt($t(e()*16));return new K(t,`hex`)},{log:nn,pow:rn,floor:an,abs:on}=Math;function sn(e,t=null){let n={min:Number.MAX_VALUE,max:Number.MAX_VALUE*-1,sum:0,values:[],count:0};return W(e)===`object`&&(e=Object.values(e)),e.forEach(e=>{t&&W(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)=>cn(n,e,t),n}function cn(e,t=`equal`,n=7){W(e)==`array`&&(e=sn(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*nn(r),t=Math.LOG10E*nn(i);o.push(r);for(let r=1;r<n;r++)o.push(rn(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=an(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=on(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 f={};for(let e=0;e<n;e++)f[e]=[];for(let n=0;n<t;n++)e=s[n],f[e].push(a[n]);let p=[];for(let e=0;e<n;e++)p.push(f[e][0]),p.push(f[e][f[e].length-1]);p=p.sort((e,t)=>e-t),o.push(p[0]);for(let e=1;e<p.length;e+=2){let t=p[e];!isNaN(t)&&o.indexOf(t)===-1&&o.push(t)}}return o}var ln=(e,t)=>{e=new K(e),t=new K(t);let n=e.luminance(),r=t.luminance();return n>r?(n+.05)/(r+.05):(r+.05)/(n+.05)},un=.027,dn=5e-4,fn=.1,pn=1.14,mn=.022,hn=1.414,gn=(e,t)=>{e=new K(e),t=new K(t),e.alpha()<1&&(e=Xe(t,e,e.alpha(),`rgb`));let n=_n(...e.rgb()),r=_n(...t.rgb()),i=n>=mn?n:n+(mn-n)**+hn,a=r>=mn?r:r+(mn-r)**+hn,o=a**.56-i**.57,s=a**.65-i**.62,c=Math.abs(a-i)<dn?0:i<a?o*pn:s*pn;return(Math.abs(c)<fn?0:c>0?c-un:c+un)*100};function _n(e,t,n){return .2126729*(e/255)**2.4+.7151522*(t/255)**2.4+.072175*(n/255)**2.4}var{sqrt:vn,pow:yn,min:bn,max:xn,atan2:Sn,abs:Cn,cos:wn,sin:Tn,exp:En,PI:Dn}=Math;function On(e,t,n=1,r=1,i=1){var a=function(e){return 360*e/(2*Dn)},o=function(e){return 2*Dn*e/360};e=new K(e),t=new K(t);let[s,c,l]=Array.from(e.lab()),[u,d,f]=Array.from(t.lab()),p=(s+u)/2,m=(vn(yn(c,2)+yn(l,2))+vn(yn(d,2)+yn(f,2)))/2,h=.5*(1-vn(yn(m,7)/(yn(m,7)+yn(25,7)))),g=c*(1+h),_=d*(1+h),v=vn(yn(g,2)+yn(l,2)),y=vn(yn(_,2)+yn(f,2)),b=(v+y)/2,x=a(Sn(l,g)),S=a(Sn(f,_)),C=x>=0?x:x+360,w=S>=0?S:S+360,T=Cn(C-w)>180?(C+w+360)/2:(C+w)/2,E=1-.17*wn(o(T-30))+.24*wn(o(2*T))+.32*wn(o(3*T+6))-.2*wn(o(4*T-63)),D=w-C;D=Cn(D)<=180?D:w<=C?D+360:D-360,D=2*vn(v*y)*Tn(o(D)/2);let O=u-s,k=y-v,A=1+.015*yn(p-50,2)/vn(20+yn(p-50,2)),j=1+.045*b,M=1+.015*b*E,N=30*En(-yn((T-275)/25,2)),P=-(2*vn(yn(b,7)/(yn(b,7)+yn(25,7))))*Tn(2*o(N));return xn(0,bn(100,vn(yn(O/(n*A),2)+yn(k/(r*j),2)+yn(D/(i*M),2)+P*(k/(r*j))*(D/(i*M)))))}function kn(e,t,n=`lab`){e=new K(e),t=new K(t);let r=e.get(n),i=t.get(n),a=0;for(let e in r){let t=(r[e]||0)-(i[e]||0);a+=t*t}return Math.sqrt(a)}var An=(...e)=>{try{return new K(...e),!0}catch{return!1}},jn={cool(){return zt([Te.hsl(180,1,.9),Te.hsl(250,.7,.4)])},hot(){return zt([`#000`,`#f00`,`#ff0`,`#fff`],[0,.25,.75,1]).mode(`rgb`)}},Mn={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`]},Nn=Object.keys(Mn),Pn=new Map(Nn.map(e=>[e.toLowerCase(),e])),Fn=typeof Proxy==`function`?new Proxy(Mn,{get(e,t){let n=t.toLowerCase();if(Pn.has(n))return e[Pn.get(n)]},getOwnPropertyNames(){return Object.getOwnPropertyNames(Nn)}}):Mn,In=(...e)=>{e=G(e,`cmyk`);let[t,n,r,i]=e,a=e.length>4?e[4]:1;return i===1?[0,0,0,a]:[t>=1?0:255*(1-t)*(1-i),n>=1?0:255*(1-n)*(1-i),r>=1?0:255*(1-r)*(1-i),a]},{max:Ln}=Math,Rn=(...e)=>{let[t,n,r]=G(e,`rgb`);t/=255,n/=255,r/=255;let i=1-Ln(t,Ln(n,r)),a=i<1?1/(1-i):0;return[(1-t-i)*a,(1-n-i)*a,(1-r-i)*a,i]};K.prototype.cmyk=function(){return Rn(this._rgb)},Object.assign(Te,{cmyk:(...e)=>new K(...e,`cmyk`)}),Ce.format.cmyk=In,Ce.autodetect.push({p:2,test:(...e)=>{if(e=G(e,`cmyk`),W(e)===`array`&&e.length===4)return`cmyk`}});var zn=(...e)=>{let t=G(e,`hsla`),n=fe(e)||`lsa`;return t[0]=ge(t[0]||0)+`deg`,t[1]=ge(t[1]*100)+`%`,t[2]=ge(t[2]*100)+`%`,n===`hsla`||t.length>3&&t[3]<1?(t[3]=`/ `+(t.length>3?t[3]:1),n=`hsla`):t.length=3,`${n.substr(0,3)}(${t.join(` `)})`},Bn=(...e)=>{let t=G(e,`lab`),n=fe(e)||`lab`;return t[0]=ge(t[0])+`%`,t[1]=ge(t[1]),t[2]=ge(t[2]),n===`laba`||t.length>3&&t[3]<1?t[3]=`/ `+(t.length>3?t[3]:1):t.length=3,`lab(${t.join(` `)})`},Vn=(...e)=>{let t=G(e,`lch`),n=fe(e)||`lab`;return t[0]=ge(t[0])+`%`,t[1]=ge(t[1]),t[2]=isNaN(t[2])?`none`:ge(t[2])+`deg`,n===`lcha`||t.length>3&&t[3]<1?t[3]=`/ `+(t.length>3?t[3]:1):t.length=3,`lch(${t.join(` `)})`},Hn=(...e)=>{let t=G(e,`lab`);return t[0]=ge(t[0]*100)+`%`,t[1]=_e(t[1]),t[2]=_e(t[2]),t.length>3&&t[3]<1?t[3]=`/ `+(t.length>3?t[3]:1):t.length=3,`oklab(${t.join(` `)})`},Un=(...e)=>{let[t,n,r,...i]=G(e,`rgb`),[a,o,s]=kt(t,n,r),[c,l,u]=at(a,o,s);return[c,l,u,...i.length>0&&i[0]<1?[i[0]]:[]]},Wn=(...e)=>{let t=G(e,`lch`);return t[0]=ge(t[0]*100)+`%`,t[1]=_e(t[1]),t[2]=isNaN(t[2])?`none`:ge(t[2])+`deg`,t.length>3&&t[3]<1?t[3]=`/ `+(t.length>3?t[3]:1):t.length=3,`oklch(${t.join(` `)})`},{round:Gn}=Math,Kn=(...e)=>{let t=G(e,`rgba`),n=fe(e)||`rgb`;if(n.substr(0,3)===`hsl`)return zn(J(t),n);if(n.substr(0,3)===`lab`){let e=Fe();Pe(`d50`);let r=Bn(Be(t),n);return Pe(e),r}if(n.substr(0,3)===`lch`){let e=Fe();Pe(`d50`);let r=Vn(ot(t),n);return Pe(e),r}return n.substr(0,5)===`oklab`?Hn(kt(t)):n.substr(0,5)===`oklch`?Wn(Un(t)):(t[0]=Gn(t[0]),t[1]=Gn(t[1]),t[2]=Gn(t[2]),(n===`rgba`||t.length>3&&t[3]<1)&&(t[3]=`/ `+(t.length>3?t[3]:1),n=`rgba`),`${n.substr(0,3)}(${t.slice(0,n===`rgb`?3:4).join(` `)})`)},qn=(...e)=>{e=G(e,`lch`);let[t,n,r,...i]=e,[a,o,s]=$e(t,n,r),[c,l,u]=Dt(a,o,s);return[c,l,u,...i.length>0&&i[0]<1?[i[0]]:[]]},Jn=`((?:-?\\d+)|(?:-?\\d+(?:\\.\\d+)?)%|none)`,Yn=`((?:-?(?:\\d+(?:\\.\\d*)?|\\.\\d+)%?)|none)`,Xn=`((?:-?(?:\\d+(?:\\.\\d*)?|\\.\\d+)%)|none)`,Zn=`\\s*`,Qn=`\\s+`,$n=`\\s*,\\s*`,er=`((?:-?(?:\\d+(?:\\.\\d*)?|\\.\\d+)(?:deg)?)|none)`,tr=`\\s*(?:\\/\\s*((?:[01]|[01]?\\.\\d+)|\\d+(?:\\.\\d+)?%))?`,nr=RegExp(`^rgba?\\(`+Zn+[Jn,Jn,Jn].join(Qn)+tr+`\\)$`),rr=RegExp(`^rgb\\(`+Zn+[Jn,Jn,Jn].join($n)+Zn+`\\)$`),ir=RegExp(`^rgba\\(`+Zn+[Jn,Jn,Jn,Yn].join($n)+Zn+`\\)$`),ar=RegExp(`^hsla?\\(`+Zn+[er,Xn,Xn].join(Qn)+tr+`\\)$`),or=RegExp(`^hsl?\\(`+Zn+[er,Xn,Xn].join($n)+Zn+`\\)$`),sr=/^hsla\(\s*(-?\d+(?:\.\d+)?),\s*(-?\d+(?:\.\d+)?)%\s*,\s*(-?\d+(?:\.\d+)?)%\s*,\s*([01]|[01]?\.\d+)\)$/,cr=RegExp(`^lab\\(`+Zn+[Yn,Yn,Yn].join(Qn)+tr+`\\)$`),lr=RegExp(`^lch\\(`+Zn+[Yn,Yn,er].join(Qn)+tr+`\\)$`),ur=RegExp(`^oklab\\(`+Zn+[Yn,Yn,Yn].join(Qn)+tr+`\\)$`),dr=RegExp(`^oklch\\(`+Zn+[Yn,Yn,er].join(Qn)+tr+`\\)$`),{round:fr}=Math,pr=e=>e.map((e,t)=>t<=2?le(fr(e),0,255):e),mr=(e,t=0,n=100,r=!1)=>(typeof e==`string`&&e.endsWith(`%`)&&(e=parseFloat(e.substring(0,e.length-1))/100,e=r?t+(e+1)*.5*(n-t):t+e*(n-t)),+e),hr=(e,t)=>e===`none`?t:e,gr=e=>{if(e=e.toLowerCase().trim(),e===`transparent`)return[0,0,0,0];let t;if(Ce.format.named)try{return Ce.format.named(e)}catch{}if((t=e.match(nr))||(t=e.match(rr))){let e=t.slice(1,4);for(let t=0;t<3;t++)e[t]=+mr(hr(e[t],0),0,255);e=pr(e);let n=t[4]===void 0?1:+mr(t[4],0,1);return e[3]=n,e}if(t=e.match(ir)){let e=t.slice(1,5);for(let t=0;t<4;t++)e[t]=+mr(e[t],0,255);return e}if((t=e.match(ar))||(t=e.match(or))){let e=t.slice(1,4);e[0]=+hr(e[0].replace(`deg`,``),0),e[1]=mr(hr(e[1],0),0,100)*.01,e[2]=mr(hr(e[2],0),0,100)*.01;let n=pr(q(e));return n[3]=t[4]===void 0?1:+mr(t[4],0,1),n}if(t=e.match(sr)){let e=t.slice(1,4);e[1]*=.01,e[2]*=.01;let n=q(e);for(let e=0;e<3;e++)n[e]=fr(n[e]);return n[3]=+t[4],n}if(t=e.match(cr)){let e=t.slice(1,4);e[0]=mr(hr(e[0],0),0,100),e[1]=mr(hr(e[1],0),-125,125,!0),e[2]=mr(hr(e[2],0),-125,125,!0);let n=Fe();Pe(`d50`);let r=pr(Ie(e));return Pe(n),r[3]=t[4]===void 0?1:+mr(t[4],0,1),r}if(t=e.match(lr)){let e=t.slice(1,4);e[0]=mr(e[0],0,100),e[1]=mr(hr(e[1],0),0,150,!1),e[2]=+hr(e[2].replace(`deg`,``),0);let n=Fe();Pe(`d50`);let r=pr(et(e));return Pe(n),r[3]=t[4]===void 0?1:+mr(t[4],0,1),r}if(t=e.match(ur)){let e=t.slice(1,4);e[0]=mr(hr(e[0],0),0,1),e[1]=mr(hr(e[1],0),-.4,.4,!0),e[2]=mr(hr(e[2],0),-.4,.4,!0);let n=pr(Dt(e));return n[3]=t[4]===void 0?1:+mr(t[4],0,1),n}if(t=e.match(dr)){let e=t.slice(1,4);e[0]=mr(hr(e[0],0),0,1),e[1]=mr(hr(e[1],0),0,.4,!1),e[2]=+hr(e[2].replace(`deg`,``),0);let n=pr(qn(e));return n[3]=t[4]===void 0?1:+mr(t[4],0,1),n}};gr.test=e=>nr.test(e)||ar.test(e)||cr.test(e)||lr.test(e)||ur.test(e)||dr.test(e)||rr.test(e)||ir.test(e)||or.test(e)||sr.test(e)||e===`transparent`,K.prototype.css=function(e){return Kn(this._rgb,e)},Te.css=(...e)=>new K(...e,`css`),Ce.format.css=gr,Ce.autodetect.push({p:5,test:(e,...t)=>{if(!t.length&&W(e)===`string`&&gr.test(e))return`css`}}),Ce.format.gl=(...e)=>{let t=G(e,`rgba`);return t[0]*=255,t[1]*=255,t[2]*=255,t},Te.gl=(...e)=>new K(...e,`gl`),K.prototype.gl=function(){let e=this._rgb;return[e[0]/255,e[1]/255,e[2]/255,e[3]]},K.prototype.hex=function(e){return je(this._rgb,e)},Te.hex=(...e)=>new K(...e,`hex`),Ce.format.hex=ke,Ce.autodetect.push({p:4,test:(e,...t)=>{if(!t.length&&W(e)===`string`&&[3,4,5,6,7,8,9].indexOf(e.length)>=0)return`hex`}});var{log:_r}=Math,vr=e=>{let t=e/100,n,r,i;return t<66?(n=255,r=t<6?0:-155.25485562709179-.44596950469579133*(r=t-2)+104.49216199393888*_r(r),i=t<20?0:-254.76935184120902+.8274096064007395*(i=t-10)+115.67994401066147*_r(i)):(n=351.97690566805693+.114206453784165*(n=t-55)-40.25366309332127*_r(n),r=325.4494125711974+.07943456536662342*(r=t-50)-28.0852963507957*_r(r),i=255),[n,r,i,1]},{round:yr}=Math,br=(...e)=>{let t=G(e,`rgb`),n=t[0],r=t[2],i=1e3,a=4e4,o;for(;a-i>.4;){o=(a+i)*.5;let e=vr(o);e[2]/e[0]>=r/n?a=o:i=o}return yr(o)};K.prototype.temp=K.prototype.kelvin=K.prototype.temperature=function(){return br(this._rgb)};var xr=(...e)=>new K(...e,`temp`);Object.assign(Te,{temp:xr,kelvin:xr,temperature:xr}),Ce.format.temp=Ce.format.kelvin=Ce.format.temperature=vr,K.prototype.oklch=function(){return Un(this._rgb)},Object.assign(Te,{oklch:(...e)=>new K(...e,`oklch`)}),Ce.format.oklch=qn,Ce.autodetect.push({p:2,test:(...e)=>{if(e=G(e,`oklch`),W(e)===`array`&&e.length===3)return`oklch`}}),Object.assign(Te,{analyze:sn,average:It,bezier:Ut,blend:Gt,brewer:Fn,Color:K,colors:Ee,contrast:ln,contrastAPCA:gn,cubehelix:Zt,deltaE:On,distance:kn,input:Ce,interpolate:Xe,limits:cn,mix:Xe,random:tn,scale:zt,scales:jn,valid:An});var Sr=Te;function Cr(e,t){if(!Sr.valid(e))return t;try{return Sr(e)}catch{return t}}function wr(e){return Sr.valid(e)&&Sr.contrast(e,`#fff`)>=Sr.contrast(e,`#333`)?`#fff`:`#333`}var Tr=4.5;function Er(e){let t=e;for(;t&&t instanceof Element;){let e=getComputedStyle(t).backgroundColor;if(e&&e!==`rgba(0, 0, 0, 0)`&&e!==`transparent`)return e;t=t.parentElement}return`#fff`}function Dr(e,t=`#fff`){if(!Sr.valid(e))return Sr.valid(t)?wr(t):`#333`;let n=Sr(e),r=Cr(t,Sr(`#fff`));if(Sr.contrast(n,r)>=Tr)return n.hex();let i=r.luminance()>.5;for(let e=0;e<20&&(n=i?n.darken(.3):n.brighten(.3),!(Sr.contrast(n,r)>=Tr));e++);return n.hex()}var Or=12,kr=.25,Ar=20,jr=15;function Mr(e,t){if(e.length===0)return[];let n=Cr(t,Sr(`#fff`)),r=Sr.valid(t)?t:`#fff`,i=n.luminance()>.5,a=e.map(e=>Sr.valid(e)?Nr(Sr(e),r,i):Sr(`#000`));for(let e=1;e<a.length;e++)a[e]=Ir(a[e],a.slice(0,e),r,i);return a.map(e=>e.hex())}function Nr(e,t,n){for(let r=0;r<Ar;r++){if(Sr.contrast(e,t)>=Tr)return e;e=n?e.darken(kr):e.brighten(kr)}return e}function Pr(e,t){return t.reduce((t,n)=>Math.min(t,Sr.deltaE(e,n)),1/0)}function*Fr(e,t){for(let n of[t,!t]){let t=e;for(let e=0;e<Ar;e++)t=n?t.darken(kr):t.brighten(kr),yield t}for(let t=jr;t<=180;t+=jr)yield e.set(`hsl.h`,`+${t}`),yield e.set(`hsl.h`,`-${t}`)}function Ir(e,t,n,r){let i=e,a=Pr(e,t);if(a>=Or)return e;for(let o of Fr(e,r)){if(Sr.contrast(o,n)<Tr)continue;let e=Pr(o,t);if(e>a&&(i=o,a=e),a>=Or)break}return i}var Lr=function(e){return e.BarVertical=`bar-vertical`,e.BarHorizontal=`bar-horizontal`,e.BarMulti=`bar-multi`,e.ColumnStacked=`column-stacked`,e.BarStacked=`bar-stacked`,e.BarSplit=`bar-split`,e.BarGrouped=`bar-grouped`,e.Line=`line`,e.LineMulti=`line-multi`,e.Area=`area`,e.AreaStacked=`area-stacked`,e.Donut=`donut`,e.Pie=`pie`,e.Scatter=`scatter`,e.VerticalBar=`vertical-bar`,e.HorizontalBar=`horizontal-bar`,e}({}),Rr=function(e){return e.Left=`left`,e.Right=`right`,e}({}),zr=function(e){return e.Linear=`linear`,e.Log=`log`,e.Symlog=`symlog`,e}({}),Br=function(e){return e.Solid=`solid`,e.Dashed=`dashed`,e.Dotted=`dotted`,e.None=`none`,e}({}),Vr=function(e){return e.Auto=`auto`,e.Inside=`inside`,e.Outside=`outside`,e.Off=`off`,e}({}),Hr=function(e){return e.Auto=`auto`,e.Horizontal=`horizontal`,e.Vertical=`vertical`,e}({}),Ur=function(e){return e.NW=`NW`,e.N=`N`,e.NE=`NE`,e.E=`E`,e.SE=`SE`,e.S=`S`,e.SW=`SW`,e.W=`W`,e.Center=`center`,e}({}),Wr=function(e){return e.Direct=`direct`,e.CurveLeft=`curve-left`,e.CurveRight=`curve-right`,e.Elbow=`elbow`,e}({}),Gr=function(e){return e.Solid=`solid`,e.Dotted=`dotted`,e.Dashed=`dashed`,e}({}),Kr=function(e){return e.Point=`point`,e.Range=`range`,e.Free=`free`,e}({}),qr=function(e){return e.Start=`start`,e.Center=`center`,e.End=`end`,e}({}),Jr=function(e){return e.Vertical=`vertical`,e.Horizontal=`horizontal`,e}({}),Yr=function(e){return e.Circle=`circle`,e.Square=`square`,e.Diamond=`diamond`,e.Triangle=`triangle`,e.TriangleDown=`triangleDown`,e.Cross=`cross`,e.Star=`star`,e}({}),Xr=function(e){return e.All=`all`,e.First=`first`,e.Last=`last`,e.FirstLast=`firstLast`,e}({}),Zr=function(e){return e.Filled=`filled`,e.Hollow=`hollow`,e}({}),Qr=function(e){return e.Ascending=`ascending`,e.Descending=`descending`,e.None=`none`,e}({}),$r=function(e){return e.Total=`total`,e.WithinGroups=`within-groups`,e.None=`none`,e}({}),ei=function(e){return e.Top=`top`,e.Bottom=`bottom`,e.Left=`left`,e.Right=`right`,e}({}),ti=function(e){return e.Start=`start`,e.Middle=`middle`,e.End=`end`,e}({}),ni=function(e){return e.Inside=`inside`,e.Outside=`outside`,e.Auto=`auto`,e}({}),ri=function(e){return e.Both=`both`,e.Vertical=`vertical`,e.Horizontal=`horizontal`,e}({}),ii=function(e){return e.Solid=`solid`,e.Dashed=`dashed`,e.Dotted=`dotted`,e}({}),ai=function(e){return e.Normal=`normal`,e.Percent=`percent`,e}({}),Z=function(e){return e.Colors=`colors`,e.Boolean=`boolean`,e.Select=`select`,e.Text=`text`,e.NumberFormat=`numberFormat`,e.DateFormat=`dateFormat`,e}({}),oi=function(e){return e.Off=``,e.Auto=`auto`,e.Outside=`outside`,e.Inside=`inside`,e}({}),si=function(e){return e.Linear=`linear`,e.MonotoneX=`monotoneX`,e.Step=`step`,e.StepBefore=`stepBefore`,e.StepAfter=`stepAfter`,e.Basis=`basis`,e.Cardinal=`cardinal`,e.CatmullRom=`catmullRom`,e}({}),ci=function(e){return e.Sort=`sort`,e.Filter=`filter`,e.HideColumns=`hide-columns`,e.Transpose=`transpose`,e.Parse=`parse`,e.Rename=`rename`,e.GroupBy=`group-by`,e.Computed=`computed`,e}({}),li=function(e){return e.Equals=`equals`,e.NotEquals=`not-equals`,e.Contains=`contains`,e.GreaterThan=`greater-than`,e.LessThan=`less-than`,e}({}),ui=function(e){return e.Type=`type`,e.String=`string`,e.Numeric=`numeric`,e.Date=`date`,e}({}),di=s(((e,t)=>{(function(n,r){typeof e==`object`&&t!==void 0?t.exports=r():typeof define==`function`&&define.amd?define(r):(n=typeof globalThis<`u`?globalThis:n||self).dayjs=r()})(e,(function(){"use strict";var e=1e3,t=6e4,n=36e5,r=`millisecond`,i=`second`,a=`minute`,o=`hour`,s=`day`,c=`week`,l=`month`,u=`quarter`,d=`year`,f=`date`,p=`Invalid Date`,m=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,h=/\[([^\]]+)]|YYYY|YY|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,g={name:`en`,weekdays:`Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday`.split(`_`),months:`January_February_March_April_May_June_July_August_September_October_November_December`.split(`_`),ordinal:function(e){var t=[`th`,`st`,`nd`,`rd`],n=e%100;return`[`+e+(t[(n-20)%10]||t[n]||t[0])+`]`}},_=function(e,t,n){var r=String(e);return!r||r.length>=t?e:``+Array(t+1-r.length).join(n)+e},v={s:_,z:function(e){var t=-e.utcOffset(),n=Math.abs(t),r=Math.floor(n/60),i=n%60;return(t<=0?`+`:`-`)+_(r,2,`0`)+`:`+_(i,2,`0`)},m:function e(t,n){if(t.date()<n.date())return-e(n,t);var r=12*(n.year()-t.year())+(n.month()-t.month()),i=t.clone().add(r,l),a=n-i<0,o=t.clone().add(r+(a?-1:1),l);return+(-(r+(n-i)/(a?i-o:o-i))||0)},a:function(e){return e<0?Math.ceil(e)||0:Math.floor(e)},p:function(e){return{M:l,y:d,w:c,d:s,D:f,h:o,m:a,s:i,ms:r,Q:u}[e]||String(e||``).toLowerCase().replace(/s$/,``)},u:function(e){return e===void 0}},y=`en`,b={};b[y]=g;var x=`$isDayjsObject`,S=function(e){return e instanceof E||!(!e||!e[x])},C=function e(t,n,r){var i;if(!t)return y;if(typeof t==`string`){var a=t.toLowerCase();b[a]&&(i=a),n&&(b[a]=n,i=a);var o=t.split(`-`);if(!i&&o.length>1)return e(o[0])}else{var s=t.name;b[s]=t,i=s}return!r&&i&&(y=i),i||!r&&y},w=function(e,t){if(S(e))return e.clone();var n=typeof t==`object`?t:{};return n.date=e,n.args=arguments,new E(n)},T=v;T.l=C,T.i=S,T.w=function(e,t){return w(e,{locale:t.$L,utc:t.$u,x:t.$x,$offset:t.$offset})};var E=function(){function g(e){this.$L=C(e.locale,null,!0),this.parse(e),this.$x=this.$x||e.x||{},this[x]=!0}var _=g.prototype;return _.parse=function(e){this.$d=function(e){var t=e.date,n=e.utc;if(t===null)return new Date(NaN);if(T.u(t))return new Date;if(t instanceof Date)return new Date(t);if(typeof t==`string`&&!/Z$/i.test(t)){var r=t.match(m);if(r){var i=r[2]-1||0,a=(r[7]||`0`).substring(0,3);return n?new Date(Date.UTC(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,a)):new Date(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,a)}}return new Date(t)}(e),this.init()},_.init=function(){var e=this.$d;this.$y=e.getFullYear(),this.$M=e.getMonth(),this.$D=e.getDate(),this.$W=e.getDay(),this.$H=e.getHours(),this.$m=e.getMinutes(),this.$s=e.getSeconds(),this.$ms=e.getMilliseconds()},_.$utils=function(){return T},_.isValid=function(){return this.$d.toString()!==p},_.isSame=function(e,t){var n=w(e);return this.startOf(t)<=n&&n<=this.endOf(t)},_.isAfter=function(e,t){return w(e)<this.startOf(t)},_.isBefore=function(e,t){return this.endOf(t)<w(e)},_.$g=function(e,t,n){return T.u(e)?this[t]:this.set(n,e)},_.unix=function(){return Math.floor(this.valueOf()/1e3)},_.valueOf=function(){return this.$d.getTime()},_.startOf=function(e,t){var n=this,r=!!T.u(t)||t,u=T.p(e),p=function(e,t){var i=T.w(n.$u?Date.UTC(n.$y,t,e):new Date(n.$y,t,e),n);return r?i:i.endOf(s)},m=function(e,t){return T.w(n.toDate()[e].apply(n.toDate(`s`),(r?[0,0,0,0]:[23,59,59,999]).slice(t)),n)},h=this.$W,g=this.$M,_=this.$D,v=`set`+(this.$u?`UTC`:``);switch(u){case d:return r?p(1,0):p(31,11);case l:return r?p(1,g):p(0,g+1);case c:var y=this.$locale().weekStart||0,b=(h<y?h+7:h)-y;return p(r?_-b:_+(6-b),g);case s:case f:return m(v+`Hours`,0);case o:return m(v+`Minutes`,1);case a:return m(v+`Seconds`,2);case i:return m(v+`Milliseconds`,3);default:return this.clone()}},_.endOf=function(e){return this.startOf(e,!1)},_.$set=function(e,t){var n,c=T.p(e),u=`set`+(this.$u?`UTC`:``),p=(n={},n[s]=u+`Date`,n[f]=u+`Date`,n[l]=u+`Month`,n[d]=u+`FullYear`,n[o]=u+`Hours`,n[a]=u+`Minutes`,n[i]=u+`Seconds`,n[r]=u+`Milliseconds`,n)[c],m=c===s?this.$D+(t-this.$W):t;if(c===l||c===d){var h=this.clone().set(f,1);h.$d[p](m),h.init(),this.$d=h.set(f,Math.min(this.$D,h.daysInMonth())).$d}else p&&this.$d[p](m);return this.init(),this},_.set=function(e,t){return this.clone().$set(e,t)},_.get=function(e){return this[T.p(e)]()},_.add=function(r,u){var f,p=this;r=Number(r);var m=T.p(u),h=function(e){var t=w(p);return T.w(t.date(t.date()+Math.round(e*r)),p)};if(m===l)return this.set(l,this.$M+r);if(m===d)return this.set(d,this.$y+r);if(m===s)return h(1);if(m===c)return h(7);var g=(f={},f[a]=t,f[o]=n,f[i]=e,f)[m]||1,_=this.$d.getTime()+r*g;return T.w(_,this)},_.subtract=function(e,t){return this.add(-1*e,t)},_.format=function(e){var t=this,n=this.$locale();if(!this.isValid())return n.invalidDate||p;var r=e||`YYYY-MM-DDTHH:mm:ssZ`,i=T.z(this),a=this.$H,o=this.$m,s=this.$M,c=n.weekdays,l=n.months,u=n.meridiem,d=function(e,n,i,a){return e&&(e[n]||e(t,r))||i[n].slice(0,a)},f=function(e){return T.s(a%12||12,e,`0`)},m=u||function(e,t,n){var r=e<12?`AM`:`PM`;return n?r.toLowerCase():r};return r.replace(h,(function(e,r){return r||function(e){switch(e){case`YY`:return String(t.$y).slice(-2);case`YYYY`:return T.s(t.$y,4,`0`);case`M`:return s+1;case`MM`:return T.s(s+1,2,`0`);case`MMM`:return d(n.monthsShort,s,l,3);case`MMMM`:return d(l,s);case`D`:return t.$D;case`DD`:return T.s(t.$D,2,`0`);case`d`:return String(t.$W);case`dd`:return d(n.weekdaysMin,t.$W,c,2);case`ddd`:return d(n.weekdaysShort,t.$W,c,3);case`dddd`:return c[t.$W];case`H`:return String(a);case`HH`:return T.s(a,2,`0`);case`h`:return f(1);case`hh`:return f(2);case`a`:return m(a,o,!0);case`A`:return m(a,o,!1);case`m`:return String(o);case`mm`:return T.s(o,2,`0`);case`s`:return String(t.$s);case`ss`:return T.s(t.$s,2,`0`);case`SSS`:return T.s(t.$ms,3,`0`);case`Z`:return i}return null}(e)||i.replace(`:`,``)}))},_.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},_.diff=function(r,f,p){var m,h=this,g=T.p(f),_=w(r),v=(_.utcOffset()-this.utcOffset())*t,y=this-_,b=function(){return T.m(h,_)};switch(g){case d:m=b()/12;break;case l:m=b();break;case u:m=b()/3;break;case c:m=(y-v)/6048e5;break;case s:m=(y-v)/864e5;break;case o:m=y/n;break;case a:m=y/t;break;case i:m=y/e;break;default:m=y}return p?m:T.a(m)},_.daysInMonth=function(){return this.endOf(l).$D},_.$locale=function(){return b[this.$L]},_.locale=function(e,t){if(!e)return this.$L;var n=this.clone(),r=C(e,t,!0);return r&&(n.$L=r),n},_.clone=function(){return T.w(this.$d,this)},_.toDate=function(){return new Date(this.valueOf())},_.toJSON=function(){return this.isValid()?this.toISOString():null},_.toISOString=function(){return this.$d.toISOString()},_.toString=function(){return this.$d.toUTCString()},g}(),D=E.prototype;return w.prototype=D,[[`$ms`,r],[`$s`,i],[`$m`,a],[`$H`,o],[`$W`,s],[`$M`,l],[`$y`,d],[`$D`,f]].forEach((function(e){D[e[1]]=function(t){return this.$g(t,e[0],e[1])}})),w.extend=function(e,t){return e.$i||=(e(t,E,w),!0),w},w.locale=C,w.isDayjs=S,w.unix=function(e){return w(1e3*e)},w.en=b[y],w.Ls=b,w.p={},w}))})),fi=s(((e,t)=>{(function(n,r){typeof e==`object`&&t!==void 0?t.exports=r():typeof define==`function`&&define.amd?define(r):(n=typeof globalThis<`u`?globalThis:n||self).dayjs_plugin_customParseFormat=r()})(e,(function(){"use strict";var e={LTS:`h:mm:ss A`,LT:`h:mm A`,L:`MM/DD/YYYY`,LL:`MMMM D, YYYY`,LLL:`MMMM D, YYYY h:mm A`,LLLL:`dddd, MMMM D, YYYY h:mm A`},t=/(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|Q|YYYY|YY?|ww?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,n=/\d/,r=/\d\d/,i=/\d\d?/,a=/\d*[^-_:/,()\s\d]+/,o={},s=function(e){return(e=+e)+(e>68?1900:2e3)},c=function(e){return function(t){this[e]=+t}},l=[/[+-]\d\d:?(\d\d)?|Z/,function(e){(this.zone||={}).offset=function(e){if(!e||e===`Z`)return 0;var t=e.match(/([+-]|\d\d)/g),n=60*t[1]+(+t[2]||0);return n===0?0:t[0]===`+`?-n:n}(e)}],u=function(e){var t=o[e];return t&&(t.indexOf?t:t.s.concat(t.f))},d=function(e,t){var n,r=o.meridiem;if(r){for(var i=1;i<=24;i+=1)if(e.indexOf(r(i,0,t))>-1){n=i>12;break}}else n=e===(t?`pm`:`PM`);return n},f={A:[a,function(e){this.afternoon=d(e,!1)}],a:[a,function(e){this.afternoon=d(e,!0)}],Q:[n,function(e){this.month=3*(e-1)+1}],S:[n,function(e){this.milliseconds=100*e}],SS:[r,function(e){this.milliseconds=10*e}],SSS:[/\d{3}/,function(e){this.milliseconds=+e}],s:[i,c(`seconds`)],ss:[i,c(`seconds`)],m:[i,c(`minutes`)],mm:[i,c(`minutes`)],H:[i,c(`hours`)],h:[i,c(`hours`)],HH:[i,c(`hours`)],hh:[i,c(`hours`)],D:[i,c(`day`)],DD:[r,c(`day`)],Do:[a,function(e){var t=o.ordinal,n=e.match(/\d+/);if(this.day=n[0],t)for(var r=1;r<=31;r+=1)t(r).replace(/\[|\]/g,``)===e&&(this.day=r)}],w:[i,c(`week`)],ww:[r,c(`week`)],M:[i,c(`month`)],MM:[r,c(`month`)],MMM:[a,function(e){var t=u(`months`),n=(u(`monthsShort`)||t.map((function(e){return e.slice(0,3)}))).indexOf(e)+1;if(n<1)throw Error();this.month=n%12||n}],MMMM:[a,function(e){var t=u(`months`).indexOf(e)+1;if(t<1)throw Error();this.month=t%12||t}],Y:[/[+-]?\d+/,c(`year`)],YY:[r,function(e){this.year=s(e)}],YYYY:[/\d{4}/,c(`year`)],Z:l,ZZ:l};function p(n){for(var r=n,i=o&&o.formats,a=(n=r.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,(function(t,n,r){var a=r&&r.toUpperCase();return n||i[r]||e[r]||i[a].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,(function(e,t,n){return t||n.slice(1)}))}))).match(t),s=a.length,c=0;c<s;c+=1){var l=a[c],u=f[l],d=u&&u[0],p=u&&u[1];a[c]=p?{regex:d,parser:p}:l.replace(/^\[|\]$/g,``)}return function(e){for(var t={},n=0,r=0;n<s;n+=1){var i=a[n];if(typeof i==`string`)r+=i.length;else{var o=i.regex,c=i.parser,l=e.slice(r),u=o.exec(l)[0];c.call(t,u),e=e.replace(u,``)}}return function(e){var t=e.afternoon;if(t!==void 0){var n=e.hours;t?n<12&&(e.hours+=12):n===12&&(e.hours=0),delete e.afternoon}}(t),t}}return function(e,t,n){n.p.customParseFormat=!0,e&&e.parseTwoDigitYear&&(s=e.parseTwoDigitYear);var r=t.prototype,i=r.parse;r.parse=function(e){var t=e.date,r=e.utc,a=e.args;this.$u=r;var s=a[1];if(typeof s==`string`){var c=!0===a[2],l=!0===a[3],u=c||l,d=a[2];l&&(d=a[2]),o=this.$locale(),!c&&d&&(o=n.Ls[d]),this.$d=function(e,t,n,r){try{if([`x`,`X`].indexOf(t)>-1)return new Date((t===`X`?1e3:1)*e);var i=p(t)(e),a=i.year,o=i.month,s=i.day,c=i.hours,l=i.minutes,u=i.seconds,d=i.milliseconds,f=i.zone,m=i.week,h=new Date,g=s||(a||o?1:h.getDate()),_=a||h.getFullYear(),v=0;a&&!o||(v=o>0?o-1:h.getMonth());var y,b=c||0,x=l||0,S=u||0,C=d||0;return f?new Date(Date.UTC(_,v,g,b,x,S,C+60*f.offset*1e3)):n?new Date(Date.UTC(_,v,g,b,x,S,C)):(y=new Date(_,v,g,b,x,S,C),m&&(y=r(y).week(m).toDate()),y)}catch{return new Date(``)}}(t,s,r,n),this.init(),d&&!0!==d&&(this.$L=this.locale(d).$L),u&&t!=this.format(s)&&(this.$d=new Date(``)),o={}}else if(s instanceof Array)for(var f=s.length,m=1;m<=f;m+=1){a[1]=s[m-1];var h=n.apply(this,a);if(h.isValid()){this.$d=h.$d,this.$L=h.$L,this.init();break}m===f&&(this.$d=new Date(``))}else i.call(this,e)}}}))})),pi=l(di(),1),mi=l(fi(),1);pi.default.extend(mi.default);var hi=[`YYYY-MM-DDTHH:mm:ss`,`YYYY-MM-DD HH:mm`,`YYYY-MM-DD`,`YYYY/MM/DD`,`MM/DD/YYYY`,`M/D/YYYY`,`M/D/YY`,`DD/MM/YYYY`,`DD.MM.YYYY`,`MMM D, YYYY`,`MMMM D, YYYY`,`MMM YYYY`,`MMMM YYYY`,`YYYY-MM`,`YYYY/MM`,`YYYY`];function gi(e){return e.includes(`HH`)||e.includes(`mm`)||e.includes(`ss`)?`datetime`:e.includes(`DD`)||/(?<![MA-Z])D(?!D)/.test(e)?`day`:e===`YYYY`?`year`:e.includes(`MM`)||e.includes(`MMM`)||e.includes(`MMMM`)||e.includes(`M/`)?`month`:`day`}function _i(e){return new Date(Date.UTC(e.year(),e.month(),e.date(),e.hour(),e.minute(),e.second(),e.millisecond()))}function vi(e){let t=e.trim();if(!t)return null;if(/^\d{4}$/.test(t)){let e=(0,pi.default)(t,`YYYY`,!0);return e.isValid()?_i(e):null}for(let e of hi){if(e===`YYYY`)continue;let n=(0,pi.default)(t,e,!0);if(n.isValid())return _i(n)}return null}function yi(e){let t=e.trim();if(!t)return;let n=vi(t);if(n)return n.getTime();let r=parseFloat(t);if(!isNaN(r))return r}function bi(e){let t=e.trim();if(!t)return;let n=Number(t);return isNaN(n)?vi(t)?.getTime():n}function xi(e){if(e.length===0)return null;let t=[],n=null,r=e[0].trim();if(!r)return null;if(/^\d{4}$/.test(r)){for(let n of e){let e=n.trim();if(!/^\d{4}$/.test(e))return null;let r=(0,pi.default)(e,`YYYY`,!0);if(!r.isValid())return null;t.push(_i(r))}return{dates:t,granularity:`year`}}let i=[];for(let e of hi)e!==`YYYY`&&(0,pi.default)(r,e,!0).isValid()&&i.push(e);if(i.length===0)return null;for(let r of i){let i=[],a=!0;for(let t of e){let e=(0,pi.default)(t.trim(),r,!0);if(!e.isValid()){a=!1;break}i.push(_i(e))}if(a){n=r,t.push(...i);break}}return n?{dates:t,granularity:gi(n)}:null}function Si(e){return typeof e==`string`?bi(e):e}function Ci(e,t){if(typeof e!=`string`)return e;let n=vi(e);return n?n.getTime():t?void 0:yi(e)}function wi(e,t){if(!t||t.min===void 0&&t.max===void 0)return e.map((e,t)=>t);let n=xi(e)!==null,r=Ci(t.min,n),i=Ci(t.max,n);if(r===void 0&&i===void 0)return e.map((e,t)=>t);let a=[];for(let t=0;t<e.length;t++){let n=yi(e[t]);if(n===void 0){a.push(t);continue}r!==void 0&&n<r||i!==void 0&&n>i||a.push(t)}return a}function Ti(e){let t=Number.isFinite(e)?Math.max(0,Math.min(100,e)):60;return t/(t+100)}function Ei(e,t,n,r=!0){let i=r?0:1/0,a=r?0:-1/0,o=1/0,s=!0,c=!1;for(let t of e)Number.isFinite(t)&&(c=!0,t<i&&(i=t),t>a&&(a=t),t<=0?s=!1:t<o&&(o=t));n===zr.Log&&c&&s&&(i=o),!c&&!r&&(i=0,a=0);let l=Si(t?.min)??i,u=Si(t?.max)??a;if(l>u&&([l,u]=[u,l]),l===u){if(l===0)u=1;else{let e=Math.abs(l)*.1;l-=e,u+=e}}return[l,u]}function Di(e,t){if(typeof e.constant!=`function`&&typeof e.base!=`function`)return null;let n=e.domain().map(Number).filter(Number.isFinite),r=Math.min(...n),i=Math.max(...n);if(!(i>0))return null;let a=r>0?Math.ceil(Math.log10(r)):0,o=Math.floor(Math.log10(i)),s=[];for(let e=a;e<=o;e++)s.push(10**e);if(s.length===0)return null;let c=Math.ceil(s.length/Math.max(2,t));return c>1?s.filter((e,t)=>t%c===0):s}function Oi(e,t){return e==null||t==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function ki(e,t){return e==null||t==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function Ai(e){let t,n,r;e.length===2?(t=e===Oi||e===ki?e:ji,n=e,r=e):(t=Oi,n=(t,n)=>Oi(e(t),n),r=(t,n)=>e(t)-n);function i(e,r,i=0,a=e.length){if(i<a){if(t(r,r)!==0)return a;do{let t=i+a>>>1;n(e[t],r)<0?i=t+1:a=t}while(i<a)}return i}function a(e,r,i=0,a=e.length){if(i<a){if(t(r,r)!==0)return a;do{let t=i+a>>>1;n(e[t],r)<=0?i=t+1:a=t}while(i<a)}return i}function o(e,t,n=0,a=e.length){let o=i(e,t,n,a-1);return o>n&&r(e[o-1],t)>-r(e[o],t)?o-1:o}return{left:i,center:o,right:a}}function ji(){return 0}function Mi(e){return e===null?NaN:+e}var Ni=Ai(Oi),Pi=Ni.right;Ni.left;var Fi=Ai(Mi).center,Ii=class extends Map{constructor(e,t=Bi){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:t}}),e!=null)for(let[t,n]of e)this.set(t,n)}get(e){return super.get(Li(this,e))}has(e){return super.has(Li(this,e))}set(e,t){return super.set(Ri(this,e),t)}delete(e){return super.delete(zi(this,e))}};function Li({_intern:e,_key:t},n){let r=t(n);return e.has(r)?e.get(r):n}function Ri({_intern:e,_key:t},n){let r=t(n);return e.has(r)?e.get(r):(e.set(r,n),n)}function zi({_intern:e,_key:t},n){let r=t(n);return e.has(r)&&(n=e.get(r),e.delete(r)),n}function Bi(e){return typeof e==`object`&&e?e.valueOf():e}function Vi(e){return e}function Hi(e,t,...n){return Ui(e,Vi,t,n)}function Ui(e,t,n,r){return(function e(i,a){if(a>=r.length)return n(i);let o=new Ii,s=r[a++],c=-1;for(let e of i){let t=s(e,++c,i),n=o.get(t);n?n.push(e):o.set(t,[e])}for(let[t,n]of o)o.set(t,e(n,a));return t(o)})(e,0)}function Wi(e,t){return Array.from(t,t=>e[t])}function Gi(e,...t){if(typeof e[Symbol.iterator]!=`function`)throw TypeError(`values is not iterable`);e=Array.from(e);let[n]=t;if(n&&n.length!==2||t.length>1){let r=Uint32Array.from(e,(e,t)=>t);return t.length>1?(t=t.map(t=>e.map(t)),r.sort((e,n)=>{for(let r of t){let t=qi(r[e],r[n]);if(t)return t}})):(n=e.map(n),r.sort((e,t)=>qi(n[e],n[t]))),Wi(e,r)}return e.sort(Ki(n))}function Ki(e=Oi){if(e===Oi)return qi;if(typeof e!=`function`)throw TypeError(`compare is not a function`);return(t,n)=>{let r=e(t,n);return r||r===0?r:(e(n,n)===0)-(e(t,t)===0)}}function qi(e,t){return(e==null||!(e>=e))-(t==null||!(t>=t))||(e<t?-1:+(e>t))}var Ji=Math.sqrt(50),Yi=Math.sqrt(10),Xi=Math.sqrt(2);function Zi(e,t,n){let r=(t-e)/Math.max(0,n),i=Math.floor(Math.log10(r)),a=r/10**i,o=a>=Ji?10:a>=Yi?5:a>=Xi?2:1,s,c,l;return i<0?(l=10**-i/o,s=Math.round(e*l),c=Math.round(t*l),s/l<e&&++s,c/l>t&&--c,l=-l):(l=10**i*o,s=Math.round(e/l),c=Math.round(t/l),s*l<e&&++s,c*l>t&&--c),c<s&&.5<=n&&n<2?Zi(e,t,n*2):[s,c,l]}function Qi(e,t,n){if(t=+t,e=+e,n=+n,!(n>0))return[];if(e===t)return[e];let r=t<e,[i,a,o]=r?Zi(t,e,n):Zi(e,t,n);if(!(a>=i))return[];let s=a-i+1,c=Array(s);if(r){if(o<0)for(let e=0;e<s;++e)c[e]=(a-e)/-o;else for(let e=0;e<s;++e)c[e]=(a-e)*o}else if(o<0)for(let e=0;e<s;++e)c[e]=(i+e)/-o;else for(let e=0;e<s;++e)c[e]=(i+e)*o;return c}function $i(e,t,n){return t=+t,e=+e,n=+n,Zi(e,t,n)[2]}function ea(e,t,n){t=+t,e=+e,n=+n;let r=t<e,i=r?$i(t,e,n):$i(e,t,n);return(r?-1:1)*(i<0?1/-i:i)}function ta(e,t){let n;if(t===void 0)for(let t of e)t!=null&&(n<t||n===void 0&&t>=t)&&(n=t);else{let r=-1;for(let i of e)(i=t(i,++r,e))!=null&&(n<i||n===void 0&&i>=i)&&(n=i)}return n}function na(e,t){let n;if(t===void 0)for(let t of e)t!=null&&(n>t||n===void 0&&t>=t)&&(n=t);else{let r=-1;for(let i of e)(i=t(i,++r,e))!=null&&(n>i||n===void 0&&i>=i)&&(n=i)}return n}function ra(e,t,n){e=+e,t=+t,n=(i=arguments.length)<2?(t=e,e=0,1):i<3?1:+n;for(var r=-1,i=Math.max(0,Math.ceil((t-e)/n))|0,a=Array(i);++r<i;)a[r]=e+r*n;return a}function ia(e,t){let n=0;if(t===void 0)for(let t of e)(t=+t)&&(n+=t);else{let r=-1;for(let i of e)(i=+t(i,++r,e))&&(n+=i)}return n}function aa(e){return e}var oa=1,sa=2,ca=3,la=4,ua=1e-6;function da(e){return`translate(`+e+`,0)`}function fa(e){return`translate(0,`+e+`)`}function pa(e){return t=>+e(t)}function ma(e,t){return t=Math.max(0,e.bandwidth()-t*2)/2,e.round()&&(t=Math.round(t)),n=>+e(n)+t}function ha(){return!this.__axis}function ga(e,t){var n=[],r=null,i=null,a=6,o=6,s=3,c=typeof window<`u`&&window.devicePixelRatio>1?0:.5,l=e===oa||e===la?-1:1,u=e===la||e===sa?`x`:`y`,d=e===oa||e===ca?da:fa;function f(f){var p=r??(t.ticks?t.ticks.apply(t,n):t.domain()),m=i??(t.tickFormat?t.tickFormat.apply(t,n):aa),h=Math.max(a,0)+s,g=t.range(),_=+g[0]+c,v=+g[g.length-1]+c,y=(t.bandwidth?ma:pa)(t.copy(),c),b=f.selection?f.selection():f,x=b.selectAll(`.domain`).data([null]),S=b.selectAll(`.tick`).data(p,t).order(),C=S.exit(),w=S.enter().append(`g`).attr(`class`,`tick`),T=S.select(`line`),E=S.select(`text`);x=x.merge(x.enter().insert(`path`,`.tick`).attr(`class`,`domain`).attr(`stroke`,`currentColor`)),S=S.merge(w),T=T.merge(w.append(`line`).attr(`stroke`,`currentColor`).attr(u+`2`,l*a)),E=E.merge(w.append(`text`).attr(`fill`,`currentColor`).attr(u,l*h).attr(`dy`,e===oa?`0em`:e===ca?`0.71em`:`0.32em`)),f!==b&&(x=x.transition(f),S=S.transition(f),T=T.transition(f),E=E.transition(f),C=C.transition(f).attr(`opacity`,ua).attr(`transform`,function(e){return isFinite(e=y(e))?d(e+c):this.getAttribute(`transform`)}),w.attr(`opacity`,ua).attr(`transform`,function(e){var t=this.parentNode.__axis;return d((t&&isFinite(t=t(e))?t:y(e))+c)})),C.remove(),x.attr(`d`,e===la||e===sa?o?`M`+l*o+`,`+_+`H`+c+`V`+v+`H`+l*o:`M`+c+`,`+_+`V`+v:o?`M`+_+`,`+l*o+`V`+c+`H`+v+`V`+l*o:`M`+_+`,`+c+`H`+v),S.attr(`opacity`,1).attr(`transform`,function(e){return d(y(e)+c)}),T.attr(u+`2`,l*a),E.attr(u,l*h).text(m),b.filter(ha).attr(`fill`,`none`).attr(`font-size`,10).attr(`font-family`,`sans-serif`).attr(`text-anchor`,e===sa?`start`:e===la?`end`:`middle`),b.each(function(){this.__axis=y})}return f.scale=function(e){return arguments.length?(t=e,f):t},f.ticks=function(){return n=Array.from(arguments),f},f.tickArguments=function(e){return arguments.length?(n=e==null?[]:Array.from(e),f):n.slice()},f.tickValues=function(e){return arguments.length?(r=e==null?null:Array.from(e),f):r&&r.slice()},f.tickFormat=function(e){return arguments.length?(i=e,f):i},f.tickSize=function(e){return arguments.length?(a=o=+e,f):a},f.tickSizeInner=function(e){return arguments.length?(a=+e,f):a},f.tickSizeOuter=function(e){return arguments.length?(o=+e,f):o},f.tickPadding=function(e){return arguments.length?(s=+e,f):s},f.offset=function(e){return arguments.length?(c=+e,f):c},f}function _a(e){return ga(oa,e)}function va(e){return ga(sa,e)}function ya(e){return ga(ca,e)}function ba(e){return ga(la,e)}var xa={value:()=>{}};function Sa(){for(var e=0,t=arguments.length,n={},r;e<t;++e){if(!(r=arguments[e]+``)||r in n||/[\s.]/.test(r))throw Error(`illegal type: `+r);n[r]=[]}return new Ca(n)}function Ca(e){this._=e}function wa(e,t){return e.trim().split(/^|\s+/).map(function(e){var n=``,r=e.indexOf(`.`);if(r>=0&&(n=e.slice(r+1),e=e.slice(0,r)),e&&!t.hasOwnProperty(e))throw Error(`unknown type: `+e);return{type:e,name:n}})}Ca.prototype=Sa.prototype={constructor:Ca,on:function(e,t){var n=this._,r=wa(e+``,n),i,a=-1,o=r.length;if(arguments.length<2){for(;++a<o;)if((i=(e=r[a]).type)&&(i=Ta(n[i],e.name)))return i;return}if(t!=null&&typeof t!=`function`)throw Error(`invalid callback: `+t);for(;++a<o;)if(i=(e=r[a]).type)n[i]=Ea(n[i],e.name,t);else if(t==null)for(i in n)n[i]=Ea(n[i],e.name,null);return this},copy:function(){var e={},t=this._;for(var n in t)e[n]=t[n].slice();return new Ca(e)},call:function(e,t){if((i=arguments.length-2)>0)for(var n=Array(i),r=0,i,a;r<i;++r)n[r]=arguments[r+2];if(!this._.hasOwnProperty(e))throw Error(`unknown type: `+e);for(a=this._[e],r=0,i=a.length;r<i;++r)a[r].value.apply(t,n)},apply:function(e,t,n){if(!this._.hasOwnProperty(e))throw Error(`unknown type: `+e);for(var r=this._[e],i=0,a=r.length;i<a;++i)r[i].value.apply(t,n)}};function Ta(e,t){for(var n=0,r=e.length,i;n<r;++n)if((i=e[n]).name===t)return i.value}function Ea(e,t,n){for(var r=0,i=e.length;r<i;++r)if(e[r].name===t){e[r]=xa,e=e.slice(0,r).concat(e.slice(r+1));break}return n!=null&&e.push({name:t,value:n}),e}var Da={svg:`http://www.w3.org/2000/svg`,xhtml:`http://www.w3.org/1999/xhtml`,xlink:`http://www.w3.org/1999/xlink`,xml:`http://www.w3.org/XML/1998/namespace`,xmlns:`http://www.w3.org/2000/xmlns/`};function Oa(e){var t=e+=``,n=t.indexOf(`:`);return n>=0&&(t=e.slice(0,n))!==`xmlns`&&(e=e.slice(n+1)),Da.hasOwnProperty(t)?{space:Da[t],local:e}:e}function ka(e){return function(){var t=this.ownerDocument,n=this.namespaceURI;return n===`http://www.w3.org/1999/xhtml`&&t.documentElement.namespaceURI===`http://www.w3.org/1999/xhtml`?t.createElement(e):t.createElementNS(n,e)}}function Aa(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function ja(e){var t=Oa(e);return(t.local?Aa:ka)(t)}function Ma(){}function Na(e){return e==null?Ma:function(){return this.querySelector(e)}}function Pa(e){typeof e!=`function`&&(e=Na(e));for(var t=this._groups,n=t.length,r=Array(n),i=0;i<n;++i)for(var a=t[i],o=a.length,s=r[i]=Array(o),c,l,u=0;u<o;++u)(c=a[u])&&(l=e.call(c,c.__data__,u,a))&&(`__data__`in c&&(l.__data__=c.__data__),s[u]=l);return new Cs(r,this._parents)}function Fa(e){return e==null?[]:Array.isArray(e)?e:Array.from(e)}function Ia(){return[]}function La(e){return e==null?Ia:function(){return this.querySelectorAll(e)}}function Ra(e){return function(){return Fa(e.apply(this,arguments))}}function za(e){e=typeof e==`function`?Ra(e):La(e);for(var t=this._groups,n=t.length,r=[],i=[],a=0;a<n;++a)for(var o=t[a],s=o.length,c,l=0;l<s;++l)(c=o[l])&&(r.push(e.call(c,c.__data__,l,o)),i.push(c));return new Cs(r,i)}function Ba(e){return function(){return this.matches(e)}}function Va(e){return function(t){return t.matches(e)}}var Ha=Array.prototype.find;function Ua(e){return function(){return Ha.call(this.children,e)}}function Wa(){return this.firstElementChild}function Ga(e){return this.select(e==null?Wa:Ua(typeof e==`function`?e:Va(e)))}var Ka=Array.prototype.filter;function qa(){return Array.from(this.children)}function Ja(e){return function(){return Ka.call(this.children,e)}}function Ya(e){return this.selectAll(e==null?qa:Ja(typeof e==`function`?e:Va(e)))}function Xa(e){typeof e!=`function`&&(e=Ba(e));for(var t=this._groups,n=t.length,r=Array(n),i=0;i<n;++i)for(var a=t[i],o=a.length,s=r[i]=[],c,l=0;l<o;++l)(c=a[l])&&e.call(c,c.__data__,l,a)&&s.push(c);return new Cs(r,this._parents)}function Za(e){return Array(e.length)}function Qa(){return new Cs(this._enter||this._groups.map(Za),this._parents)}function $a(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}$a.prototype={constructor:$a,appendChild:function(e){return this._parent.insertBefore(e,this._next)},insertBefore:function(e,t){return this._parent.insertBefore(e,t)},querySelector:function(e){return this._parent.querySelector(e)},querySelectorAll:function(e){return this._parent.querySelectorAll(e)}};function eo(e){return function(){return e}}function to(e,t,n,r,i,a){for(var o=0,s,c=t.length,l=a.length;o<l;++o)(s=t[o])?(s.__data__=a[o],r[o]=s):n[o]=new $a(e,a[o]);for(;o<c;++o)(s=t[o])&&(i[o]=s)}function no(e,t,n,r,i,a,o){var s,c,l=new Map,u=t.length,d=a.length,f=Array(u),p;for(s=0;s<u;++s)(c=t[s])&&(f[s]=p=o.call(c,c.__data__,s,t)+``,l.has(p)?i[s]=c:l.set(p,c));for(s=0;s<d;++s)p=o.call(e,a[s],s,a)+``,(c=l.get(p))?(r[s]=c,c.__data__=a[s],l.delete(p)):n[s]=new $a(e,a[s]);for(s=0;s<u;++s)(c=t[s])&&l.get(f[s])===c&&(i[s]=c)}function ro(e){return e.__data__}function io(e,t){if(!arguments.length)return Array.from(this,ro);var n=t?no:to,r=this._parents,i=this._groups;typeof e!=`function`&&(e=eo(e));for(var a=i.length,o=Array(a),s=Array(a),c=Array(a),l=0;l<a;++l){var u=r[l],d=i[l],f=d.length,p=ao(e.call(u,u&&u.__data__,l,r)),m=p.length,h=s[l]=Array(m),g=o[l]=Array(m);n(u,d,h,g,c[l]=Array(f),p,t);for(var _=0,v=0,y,b;_<m;++_)if(y=h[_]){for(_>=v&&(v=_+1);!(b=g[v])&&++v<m;);y._next=b||null}}return o=new Cs(o,r),o._enter=s,o._exit=c,o}function ao(e){return typeof e==`object`&&`length`in e?e:Array.from(e)}function oo(){return new Cs(this._exit||this._groups.map(Za),this._parents)}function so(e,t,n){var r=this.enter(),i=this,a=this.exit();return typeof e==`function`?(r=e(r),r&&=r.selection()):r=r.append(e+``),t!=null&&(i=t(i),i&&=i.selection()),n==null?a.remove():n(a),r&&i?r.merge(i).order():i}function co(e){for(var t=e.selection?e.selection():e,n=this._groups,r=t._groups,i=n.length,a=r.length,o=Math.min(i,a),s=Array(i),c=0;c<o;++c)for(var l=n[c],u=r[c],d=l.length,f=s[c]=Array(d),p,m=0;m<d;++m)(p=l[m]||u[m])&&(f[m]=p);for(;c<i;++c)s[c]=n[c];return new Cs(s,this._parents)}function lo(){for(var e=this._groups,t=-1,n=e.length;++t<n;)for(var r=e[t],i=r.length-1,a=r[i],o;--i>=0;)(o=r[i])&&(a&&o.compareDocumentPosition(a)^4&&a.parentNode.insertBefore(o,a),a=o);return this}function uo(e){e||=fo;function t(t,n){return t&&n?e(t.__data__,n.__data__):!t-!n}for(var n=this._groups,r=n.length,i=Array(r),a=0;a<r;++a){for(var o=n[a],s=o.length,c=i[a]=Array(s),l,u=0;u<s;++u)(l=o[u])&&(c[u]=l);c.sort(t)}return new Cs(i,this._parents).order()}function fo(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function po(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function mo(){return Array.from(this)}function ho(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var r=e[t],i=0,a=r.length;i<a;++i){var o=r[i];if(o)return o}return null}function go(){let e=0;for(let t of this)++e;return e}function _o(){return!this.node()}function vo(e){for(var t=this._groups,n=0,r=t.length;n<r;++n)for(var i=t[n],a=0,o=i.length,s;a<o;++a)(s=i[a])&&e.call(s,s.__data__,a,i);return this}function yo(e){return function(){this.removeAttribute(e)}}function bo(e){return function(){this.removeAttributeNS(e.space,e.local)}}function xo(e,t){return function(){this.setAttribute(e,t)}}function So(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function Co(e,t){return function(){var n=t.apply(this,arguments);n==null?this.removeAttribute(e):this.setAttribute(e,n)}}function wo(e,t){return function(){var n=t.apply(this,arguments);n==null?this.removeAttributeNS(e.space,e.local):this.setAttributeNS(e.space,e.local,n)}}function To(e,t){var n=Oa(e);if(arguments.length<2){var r=this.node();return n.local?r.getAttributeNS(n.space,n.local):r.getAttribute(n)}return this.each((t==null?n.local?bo:yo:typeof t==`function`?n.local?wo:Co:n.local?So:xo)(n,t))}function Eo(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function Do(e){return function(){this.style.removeProperty(e)}}function Oo(e,t,n){return function(){this.style.setProperty(e,t,n)}}function ko(e,t,n){return function(){var r=t.apply(this,arguments);r==null?this.style.removeProperty(e):this.style.setProperty(e,r,n)}}function Ao(e,t,n){return arguments.length>1?this.each((t==null?Do:typeof t==`function`?ko:Oo)(e,t,n??``)):jo(this.node(),e)}function jo(e,t){return e.style.getPropertyValue(t)||Eo(e).getComputedStyle(e,null).getPropertyValue(t)}function Mo(e){return function(){delete this[e]}}function No(e,t){return function(){this[e]=t}}function Po(e,t){return function(){var n=t.apply(this,arguments);n==null?delete this[e]:this[e]=n}}function Fo(e,t){return arguments.length>1?this.each((t==null?Mo:typeof t==`function`?Po:No)(e,t)):this.node()[e]}function Io(e){return e.trim().split(/^|\s+/)}function Lo(e){return e.classList||new Ro(e)}function Ro(e){this._node=e,this._names=Io(e.getAttribute(`class`)||``)}Ro.prototype={add:function(e){this._names.indexOf(e)<0&&(this._names.push(e),this._node.setAttribute(`class`,this._names.join(` `)))},remove:function(e){var t=this._names.indexOf(e);t>=0&&(this._names.splice(t,1),this._node.setAttribute(`class`,this._names.join(` `)))},contains:function(e){return this._names.indexOf(e)>=0}};function zo(e,t){for(var n=Lo(e),r=-1,i=t.length;++r<i;)n.add(t[r])}function Bo(e,t){for(var n=Lo(e),r=-1,i=t.length;++r<i;)n.remove(t[r])}function Vo(e){return function(){zo(this,e)}}function Ho(e){return function(){Bo(this,e)}}function Uo(e,t){return function(){(t.apply(this,arguments)?zo:Bo)(this,e)}}function Wo(e,t){var n=Io(e+``);if(arguments.length<2){for(var r=Lo(this.node()),i=-1,a=n.length;++i<a;)if(!r.contains(n[i]))return!1;return!0}return this.each((typeof t==`function`?Uo:t?Vo:Ho)(n,t))}function Go(){this.textContent=``}function Ko(e){return function(){this.textContent=e}}function qo(e){return function(){var t=e.apply(this,arguments);this.textContent=t??``}}function Jo(e){return arguments.length?this.each(e==null?Go:(typeof e==`function`?qo:Ko)(e)):this.node().textContent}function Yo(){this.innerHTML=``}function Xo(e){return function(){this.innerHTML=e}}function Zo(e){return function(){var t=e.apply(this,arguments);this.innerHTML=t??``}}function Qo(e){return arguments.length?this.each(e==null?Yo:(typeof e==`function`?Zo:Xo)(e)):this.node().innerHTML}function $o(){this.nextSibling&&this.parentNode.appendChild(this)}function es(){return this.each($o)}function ts(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function ns(){return this.each(ts)}function rs(e){var t=typeof e==`function`?e:ja(e);return this.select(function(){return this.appendChild(t.apply(this,arguments))})}function is(){return null}function as(e,t){var n=typeof e==`function`?e:ja(e),r=t==null?is:typeof t==`function`?t:Na(t);return this.select(function(){return this.insertBefore(n.apply(this,arguments),r.apply(this,arguments)||null)})}function os(){var e=this.parentNode;e&&e.removeChild(this)}function ss(){return this.each(os)}function cs(){var e=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function ls(){var e=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function us(e){return this.select(e?ls:cs)}function ds(e){return arguments.length?this.property(`__data__`,e):this.node().__data__}function fs(e){return function(t){e.call(this,t,this.__data__)}}function ps(e){return e.trim().split(/^|\s+/).map(function(e){var t=``,n=e.indexOf(`.`);return n>=0&&(t=e.slice(n+1),e=e.slice(0,n)),{type:e,name:t}})}function ms(e){return function(){var t=this.__on;if(t){for(var n=0,r=-1,i=t.length,a;n<i;++n)a=t[n],(!e.type||a.type===e.type)&&a.name===e.name?this.removeEventListener(a.type,a.listener,a.options):t[++r]=a;++r?t.length=r:delete this.__on}}}function hs(e,t,n){return function(){var r=this.__on,i,a=fs(t);if(r){for(var o=0,s=r.length;o<s;++o)if((i=r[o]).type===e.type&&i.name===e.name){this.removeEventListener(i.type,i.listener,i.options),this.addEventListener(i.type,i.listener=a,i.options=n),i.value=t;return}}this.addEventListener(e.type,a,n),i={type:e.type,name:e.name,value:t,listener:a,options:n},r?r.push(i):this.__on=[i]}}function gs(e,t,n){var r=ps(e+``),i,a=r.length,o;if(arguments.length<2){var s=this.node().__on;if(s){for(var c=0,l=s.length,u;c<l;++c)for(i=0,u=s[c];i<a;++i)if((o=r[i]).type===u.type&&o.name===u.name)return u.value}return}for(s=t?hs:ms,i=0;i<a;++i)this.each(s(r[i],t,n));return this}function _s(e,t,n){var r=Eo(e),i=r.CustomEvent;typeof i==`function`?i=new i(t,n):(i=r.document.createEvent(`Event`),n?(i.initEvent(t,n.bubbles,n.cancelable),i.detail=n.detail):i.initEvent(t,!1,!1)),e.dispatchEvent(i)}function vs(e,t){return function(){return _s(this,e,t)}}function ys(e,t){return function(){return _s(this,e,t.apply(this,arguments))}}function bs(e,t){return this.each((typeof t==`function`?ys:vs)(e,t))}function*xs(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var r=e[t],i=0,a=r.length,o;i<a;++i)(o=r[i])&&(yield o)}var Ss=[null];function Cs(e,t){this._groups=e,this._parents=t}function ws(){return new Cs([[document.documentElement]],Ss)}function Ts(){return this}Cs.prototype=ws.prototype={constructor:Cs,select:Pa,selectAll:za,selectChild:Ga,selectChildren:Ya,filter:Xa,data:io,enter:Qa,exit:oo,join:so,merge:co,selection:Ts,order:lo,sort:uo,call:po,nodes:mo,node:ho,size:go,empty:_o,each:vo,attr:To,style:Ao,property:Fo,classed:Wo,text:Jo,html:Qo,raise:es,lower:ns,append:rs,insert:as,remove:ss,clone:us,datum:ds,on:gs,dispatch:bs,[Symbol.iterator]:xs};function Q(e){return typeof e==`string`?new Cs([[document.querySelector(e)]],[document.documentElement]):new Cs([[e]],Ss)}function Es(e){let t;for(;t=e.sourceEvent;)e=t;return e}function Ds(e,t){if(e=Es(e),t===void 0&&(t=e.currentTarget),t){var n=t.ownerSVGElement||t;if(n.createSVGPoint){var r=n.createSVGPoint();return r.x=e.clientX,r.y=e.clientY,r=r.matrixTransform(t.getScreenCTM().inverse()),[r.x,r.y]}if(t.getBoundingClientRect){var i=t.getBoundingClientRect();return[e.clientX-i.left-t.clientLeft,e.clientY-i.top-t.clientTop]}}return[e.pageX,e.pageY]}function Os(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function ks(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function As(){}var js=.7,Ms=1/js,Ns=`\\s*([+-]?\\d+)\\s*`,Ps=`\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*`,Fs=`\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*`,Is=/^#([0-9a-f]{3,8})$/,Ls=RegExp(`^rgb\\(${Ns},${Ns},${Ns}\\)$`),Rs=RegExp(`^rgb\\(${Fs},${Fs},${Fs}\\)$`),zs=RegExp(`^rgba\\(${Ns},${Ns},${Ns},${Ps}\\)$`),Bs=RegExp(`^rgba\\(${Fs},${Fs},${Fs},${Ps}\\)$`),Vs=RegExp(`^hsl\\(${Ps},${Fs},${Fs}\\)$`),Hs=RegExp(`^hsla\\(${Ps},${Fs},${Fs},${Ps}\\)$`),Us={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};Os(As,Js,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:Ws,formatHex:Ws,formatHex8:Gs,formatHsl:Ks,formatRgb:qs,toString:qs});function Ws(){return this.rgb().formatHex()}function Gs(){return this.rgb().formatHex8()}function Ks(){return sc(this).formatHsl()}function qs(){return this.rgb().formatRgb()}function Js(e){var t,n;return e=(e+``).trim().toLowerCase(),(t=Is.exec(e))?(n=t[1].length,t=parseInt(t[1],16),n===6?Ys(t):n===3?new $s(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):n===8?Xs(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):n===4?Xs(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=Ls.exec(e))?new $s(t[1],t[2],t[3],1):(t=Rs.exec(e))?new $s(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=zs.exec(e))?Xs(t[1],t[2],t[3],t[4]):(t=Bs.exec(e))?Xs(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=Vs.exec(e))?oc(t[1],t[2]/100,t[3]/100,1):(t=Hs.exec(e))?oc(t[1],t[2]/100,t[3]/100,t[4]):Us.hasOwnProperty(e)?Ys(Us[e]):e===`transparent`?new $s(NaN,NaN,NaN,0):null}function Ys(e){return new $s(e>>16&255,e>>8&255,e&255,1)}function Xs(e,t,n,r){return r<=0&&(e=t=n=NaN),new $s(e,t,n,r)}function Zs(e){return e instanceof As||(e=Js(e)),e?(e=e.rgb(),new $s(e.r,e.g,e.b,e.opacity)):new $s}function Qs(e,t,n,r){return arguments.length===1?Zs(e):new $s(e,t,n,r??1)}function $s(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}Os($s,Qs,ks(As,{brighter(e){return e=e==null?Ms:Ms**+e,new $s(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?js:js**+e,new $s(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new $s(ic(this.r),ic(this.g),ic(this.b),rc(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:ec,formatHex:ec,formatHex8:tc,formatRgb:nc,toString:nc}));function ec(){return`#${ac(this.r)}${ac(this.g)}${ac(this.b)}`}function tc(){return`#${ac(this.r)}${ac(this.g)}${ac(this.b)}${ac((isNaN(this.opacity)?1:this.opacity)*255)}`}function nc(){let e=rc(this.opacity);return`${e===1?`rgb(`:`rgba(`}${ic(this.r)}, ${ic(this.g)}, ${ic(this.b)}${e===1?`)`:`, ${e})`}`}function rc(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function ic(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function ac(e){return e=ic(e),(e<16?`0`:``)+e.toString(16)}function oc(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new lc(e,t,n,r)}function sc(e){if(e instanceof lc)return new lc(e.h,e.s,e.l,e.opacity);if(e instanceof As||(e=Js(e)),!e)return new lc;if(e instanceof lc)return e;e=e.rgb();var t=e.r/255,n=e.g/255,r=e.b/255,i=Math.min(t,n,r),a=Math.max(t,n,r),o=NaN,s=a-i,c=(a+i)/2;return s?(o=t===a?(n-r)/s+(n<r)*6:n===a?(r-t)/s+2:(t-n)/s+4,s/=c<.5?a+i:2-a-i,o*=60):s=c>0&&c<1?0:o,new lc(o,s,c,e.opacity)}function cc(e,t,n,r){return arguments.length===1?sc(e):new lc(e,t,n,r??1)}function lc(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}Os(lc,cc,ks(As,{brighter(e){return e=e==null?Ms:Ms**+e,new lc(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?js:js**+e,new lc(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*t,i=2*n-r;return new $s(fc(e>=240?e-240:e+120,i,r),fc(e,i,r),fc(e<120?e+240:e-120,i,r),this.opacity)},clamp(){return new lc(uc(this.h),dc(this.s),dc(this.l),rc(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){let e=rc(this.opacity);return`${e===1?`hsl(`:`hsla(`}${uc(this.h)}, ${dc(this.s)*100}%, ${dc(this.l)*100}%${e===1?`)`:`, ${e})`}`}}));function uc(e){return e=(e||0)%360,e<0?e+360:e}function dc(e){return Math.max(0,Math.min(1,e||0))}function fc(e,t,n){return(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)*255}var pc=e=>()=>e;function mc(e,t){return function(n){return e+n*t}}function hc(e,t,n){return e**=+n,t=t**+n-e,n=1/n,function(r){return(e+r*t)**+n}}function gc(e){return(e=+e)==1?_c:function(t,n){return n-t?hc(t,n,e):pc(isNaN(t)?n:t)}}function _c(e,t){var n=t-e;return n?mc(e,n):pc(isNaN(e)?t:e)}var vc=(function e(t){var n=gc(t);function r(e,t){var r=n((e=Qs(e)).r,(t=Qs(t)).r),i=n(e.g,t.g),a=n(e.b,t.b),o=_c(e.opacity,t.opacity);return function(t){return e.r=r(t),e.g=i(t),e.b=a(t),e.opacity=o(t),e+``}}return r.gamma=e,r})(1);function yc(e,t){t||=[];var n=e?Math.min(t.length,e.length):0,r=t.slice(),i;return function(a){for(i=0;i<n;++i)r[i]=e[i]*(1-a)+t[i]*a;return r}}function bc(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function xc(e,t){var n=t?t.length:0,r=e?Math.min(n,e.length):0,i=Array(r),a=Array(n),o;for(o=0;o<r;++o)i[o]=Ac(e[o],t[o]);for(;o<n;++o)a[o]=t[o];return function(e){for(o=0;o<r;++o)a[o]=i[o](e);return a}}function Sc(e,t){var n=new Date;return e=+e,t=+t,function(r){return n.setTime(e*(1-r)+t*r),n}}function Cc(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}function wc(e,t){var n={},r={},i;for(i in(typeof e!=`object`||!e)&&(e={}),(typeof t!=`object`||!t)&&(t={}),t)i in e?n[i]=Ac(e[i],t[i]):r[i]=t[i];return function(e){for(i in n)r[i]=n[i](e);return r}}var Tc=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Ec=new RegExp(Tc.source,`g`);function Dc(e){return function(){return e}}function Oc(e){return function(t){return e(t)+``}}function kc(e,t){var n=Tc.lastIndex=Ec.lastIndex=0,r,i,a,o=-1,s=[],c=[];for(e+=``,t+=``;(r=Tc.exec(e))&&(i=Ec.exec(t));)(a=i.index)>n&&(a=t.slice(n,a),s[o]?s[o]+=a:s[++o]=a),(r=r[0])===(i=i[0])?s[o]?s[o]+=i:s[++o]=i:(s[++o]=null,c.push({i:o,x:Cc(r,i)})),n=Ec.lastIndex;return n<t.length&&(a=t.slice(n),s[o]?s[o]+=a:s[++o]=a),s.length<2?c[0]?Oc(c[0].x):Dc(t):(t=c.length,function(e){for(var n=0,r;n<t;++n)s[(r=c[n]).i]=r.x(e);return s.join(``)})}function Ac(e,t){var n=typeof t,r;return t==null||n===`boolean`?pc(t):(n===`number`?Cc:n===`string`?(r=Js(t))?(t=r,vc):kc:t instanceof Js?vc:t instanceof Date?Sc:bc(t)?yc:Array.isArray(t)?xc:typeof t.valueOf!=`function`&&typeof t.toString!=`function`||isNaN(t)?wc:Cc)(e,t)}function jc(e,t){return e=+e,t=+t,function(n){return Math.round(e*(1-n)+t*n)}}var Mc=180/Math.PI,Nc={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function Pc(e,t,n,r,i,a){var o,s,c;return(o=Math.sqrt(e*e+t*t))&&(e/=o,t/=o),(c=e*n+t*r)&&(n-=e*c,r-=t*c),(s=Math.sqrt(n*n+r*r))&&(n/=s,r/=s,c/=s),e*r<t*n&&(e=-e,t=-t,c=-c,o=-o),{translateX:i,translateY:a,rotate:Math.atan2(t,e)*Mc,skewX:Math.atan(c)*Mc,scaleX:o,scaleY:s}}var Fc;function Ic(e){let t=new(typeof DOMMatrix==`function`?DOMMatrix:WebKitCSSMatrix)(e+``);return t.isIdentity?Nc:Pc(t.a,t.b,t.c,t.d,t.e,t.f)}function Lc(e){return e==null||(Fc||=document.createElementNS(`http://www.w3.org/2000/svg`,`g`),Fc.setAttribute(`transform`,e),!(e=Fc.transform.baseVal.consolidate()))?Nc:(e=e.matrix,Pc(e.a,e.b,e.c,e.d,e.e,e.f))}function Rc(e,t,n,r){function i(e){return e.length?e.pop()+` `:``}function a(e,r,i,a,o,s){if(e!==i||r!==a){var c=o.push(`translate(`,null,t,null,n);s.push({i:c-4,x:Cc(e,i)},{i:c-2,x:Cc(r,a)})}else(i||a)&&o.push(`translate(`+i+t+a+n)}function o(e,t,n,a){e===t?t&&n.push(i(n)+`rotate(`+t+r):(e-t>180?t+=360:t-e>180&&(e+=360),a.push({i:n.push(i(n)+`rotate(`,null,r)-2,x:Cc(e,t)}))}function s(e,t,n,a){e===t?t&&n.push(i(n)+`skewX(`+t+r):a.push({i:n.push(i(n)+`skewX(`,null,r)-2,x:Cc(e,t)})}function c(e,t,n,r,a,o){if(e!==n||t!==r){var s=a.push(i(a)+`scale(`,null,`,`,null,`)`);o.push({i:s-4,x:Cc(e,n)},{i:s-2,x:Cc(t,r)})}else(n!==1||r!==1)&&a.push(i(a)+`scale(`+n+`,`+r+`)`)}return function(t,n){var r=[],i=[];return t=e(t),n=e(n),a(t.translateX,t.translateY,n.translateX,n.translateY,r,i),o(t.rotate,n.rotate,r,i),s(t.skewX,n.skewX,r,i),c(t.scaleX,t.scaleY,n.scaleX,n.scaleY,r,i),t=n=null,function(e){for(var t=-1,n=i.length,a;++t<n;)r[(a=i[t]).i]=a.x(e);return r.join(``)}}}var zc=Rc(Ic,`px, `,`px)`,`deg)`),Bc=Rc(Lc,`, `,`)`,`)`),Vc=0,Hc=0,Uc=0,Wc=1e3,Gc,Kc,qc=0,Jc=0,Yc=0,Xc=typeof performance==`object`&&performance.now?performance:Date,Zc=typeof window==`object`&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function Qc(){return Jc||=(Zc($c),Xc.now()+Yc)}function $c(){Jc=0}function el(){this._call=this._time=this._next=null}el.prototype=tl.prototype={constructor:el,restart:function(e,t,n){if(typeof e!=`function`)throw TypeError(`callback is not a function`);n=(n==null?Qc():+n)+(t==null?0:+t),!this._next&&Kc!==this&&(Kc?Kc._next=this:Gc=this,Kc=this),this._call=e,this._time=n,ol()},stop:function(){this._call&&(this._call=null,this._time=1/0,ol())}};function tl(e,t,n){var r=new el;return r.restart(e,t,n),r}function nl(){Qc(),++Vc;for(var e=Gc,t;e;)(t=Jc-e._time)>=0&&e._call.call(void 0,t),e=e._next;--Vc}function rl(){Jc=(qc=Xc.now())+Yc,Vc=Hc=0;try{nl()}finally{Vc=0,al(),Jc=0}}function il(){var e=Xc.now(),t=e-qc;t>Wc&&(Yc-=t,qc=e)}function al(){for(var e,t=Gc,n,r=1/0;t;)t._call?(r>t._time&&(r=t._time),e=t,t=t._next):(n=t._next,t._next=null,t=e?e._next=n:Gc=n);Kc=e,ol(r)}function ol(e){Vc||(Hc&&=clearTimeout(Hc),e-Jc>24?(e<1/0&&(Hc=setTimeout(rl,e-Xc.now()-Yc)),Uc&&=clearInterval(Uc)):(Uc||=(qc=Xc.now(),setInterval(il,Wc)),Vc=1,Zc(rl)))}function sl(e,t,n){var r=new el;return t=t==null?0:+t,r.restart(n=>{r.stop(),e(n+t)},t,n),r}var cl=Sa(`start`,`end`,`cancel`,`interrupt`),ll=[];function ul(e,t,n,r,i,a){var o=e.__transition;if(!o)e.__transition={};else if(n in o)return;ml(e,n,{name:t,index:r,group:i,on:cl,tween:ll,time:a.time,delay:a.delay,duration:a.duration,ease:a.ease,timer:null,state:0})}function dl(e,t){var n=pl(e,t);if(n.state>0)throw Error(`too late; already scheduled`);return n}function fl(e,t){var n=pl(e,t);if(n.state>3)throw Error(`too late; already running`);return n}function pl(e,t){var n=e.__transition;if(!n||!(n=n[t]))throw Error(`transition not found`);return n}function ml(e,t,n){var r=e.__transition,i;r[t]=n,n.timer=tl(a,0,n.time);function a(e){n.state=1,n.timer.restart(o,n.delay,n.time),n.delay<=e&&o(e-n.delay)}function o(a){var l,u,d,f;if(n.state!==1)return c();for(l in r)if(f=r[l],f.name===n.name){if(f.state===3)return sl(o);f.state===4?(f.state=6,f.timer.stop(),f.on.call(`interrupt`,e,e.__data__,f.index,f.group),delete r[l]):+l<t&&(f.state=6,f.timer.stop(),f.on.call(`cancel`,e,e.__data__,f.index,f.group),delete r[l])}if(sl(function(){n.state===3&&(n.state=4,n.timer.restart(s,n.delay,n.time),s(a))}),n.state=2,n.on.call(`start`,e,e.__data__,n.index,n.group),n.state===2){for(n.state=3,i=Array(d=n.tween.length),l=0,u=-1;l<d;++l)(f=n.tween[l].value.call(e,e.__data__,n.index,n.group))&&(i[++u]=f);i.length=u+1}}function s(t){for(var r=t<n.duration?n.ease.call(null,t/n.duration):(n.timer.restart(c),n.state=5,1),a=-1,o=i.length;++a<o;)i[a].call(e,r);n.state===5&&(n.on.call(`end`,e,e.__data__,n.index,n.group),c())}function c(){for(var i in n.state=6,n.timer.stop(),delete r[t],r)return;delete e.__transition}}function hl(e,t){var n=e.__transition,r,i,a=!0,o;if(n){for(o in t=t==null?null:t+``,n){if((r=n[o]).name!==t){a=!1;continue}i=r.state>2&&r.state<5,r.state=6,r.timer.stop(),r.on.call(i?`interrupt`:`cancel`,e,e.__data__,r.index,r.group),delete n[o]}a&&delete e.__transition}}function gl(e){return this.each(function(){hl(this,e)})}function _l(e,t){var n,r;return function(){var i=fl(this,e),a=i.tween;if(a!==n){r=n=a;for(var o=0,s=r.length;o<s;++o)if(r[o].name===t){r=r.slice(),r.splice(o,1);break}}i.tween=r}}function vl(e,t,n){var r,i;if(typeof n!=`function`)throw Error();return function(){var a=fl(this,e),o=a.tween;if(o!==r){i=(r=o).slice();for(var s={name:t,value:n},c=0,l=i.length;c<l;++c)if(i[c].name===t){i[c]=s;break}c===l&&i.push(s)}a.tween=i}}function yl(e,t){var n=this._id;if(e+=``,arguments.length<2){for(var r=pl(this.node(),n).tween,i=0,a=r.length,o;i<a;++i)if((o=r[i]).name===e)return o.value;return null}return this.each((t==null?_l:vl)(n,e,t))}function bl(e,t,n){var r=e._id;return e.each(function(){var e=fl(this,r);(e.value||={})[t]=n.apply(this,arguments)}),function(e){return pl(e,r).value[t]}}function xl(e,t){var n;return(typeof t==`number`?Cc:t instanceof Js?vc:(n=Js(t))?(t=n,vc):kc)(e,t)}function Sl(e){return function(){this.removeAttribute(e)}}function Cl(e){return function(){this.removeAttributeNS(e.space,e.local)}}function wl(e,t,n){var r,i=n+``,a;return function(){var o=this.getAttribute(e);return o===i?null:o===r?a:a=t(r=o,n)}}function Tl(e,t,n){var r,i=n+``,a;return function(){var o=this.getAttributeNS(e.space,e.local);return o===i?null:o===r?a:a=t(r=o,n)}}function El(e,t,n){var r,i,a;return function(){var o,s=n(this),c;return s==null?void this.removeAttribute(e):(o=this.getAttribute(e),c=s+``,o===c?null:o===r&&c===i?a:(i=c,a=t(r=o,s)))}}function Dl(e,t,n){var r,i,a;return function(){var o,s=n(this),c;return s==null?void this.removeAttributeNS(e.space,e.local):(o=this.getAttributeNS(e.space,e.local),c=s+``,o===c?null:o===r&&c===i?a:(i=c,a=t(r=o,s)))}}function Ol(e,t){var n=Oa(e),r=n===`transform`?Bc:xl;return this.attrTween(e,typeof t==`function`?(n.local?Dl:El)(n,r,bl(this,`attr.`+e,t)):t==null?(n.local?Cl:Sl)(n):(n.local?Tl:wl)(n,r,t))}function kl(e,t){return function(n){this.setAttribute(e,t.call(this,n))}}function Al(e,t){return function(n){this.setAttributeNS(e.space,e.local,t.call(this,n))}}function jl(e,t){var n,r;function i(){var i=t.apply(this,arguments);return i!==r&&(n=(r=i)&&Al(e,i)),n}return i._value=t,i}function Ml(e,t){var n,r;function i(){var i=t.apply(this,arguments);return i!==r&&(n=(r=i)&&kl(e,i)),n}return i._value=t,i}function Nl(e,t){var n=`attr.`+e;if(arguments.length<2)return(n=this.tween(n))&&n._value;if(t==null)return this.tween(n,null);if(typeof t!=`function`)throw Error();var r=Oa(e);return this.tween(n,(r.local?jl:Ml)(r,t))}function Pl(e,t){return function(){dl(this,e).delay=+t.apply(this,arguments)}}function Fl(e,t){return t=+t,function(){dl(this,e).delay=t}}function Il(e){var t=this._id;return arguments.length?this.each((typeof e==`function`?Pl:Fl)(t,e)):pl(this.node(),t).delay}function Ll(e,t){return function(){fl(this,e).duration=+t.apply(this,arguments)}}function Rl(e,t){return t=+t,function(){fl(this,e).duration=t}}function zl(e){var t=this._id;return arguments.length?this.each((typeof e==`function`?Ll:Rl)(t,e)):pl(this.node(),t).duration}function Bl(e,t){if(typeof t!=`function`)throw Error();return function(){fl(this,e).ease=t}}function Vl(e){var t=this._id;return arguments.length?this.each(Bl(t,e)):pl(this.node(),t).ease}function Hl(e,t){return function(){var n=t.apply(this,arguments);if(typeof n!=`function`)throw Error();fl(this,e).ease=n}}function Ul(e){if(typeof e!=`function`)throw Error();return this.each(Hl(this._id,e))}function Wl(e){typeof e!=`function`&&(e=Ba(e));for(var t=this._groups,n=t.length,r=Array(n),i=0;i<n;++i)for(var a=t[i],o=a.length,s=r[i]=[],c,l=0;l<o;++l)(c=a[l])&&e.call(c,c.__data__,l,a)&&s.push(c);return new yu(r,this._parents,this._name,this._id)}function Gl(e){if(e._id!==this._id)throw Error();for(var t=this._groups,n=e._groups,r=t.length,i=n.length,a=Math.min(r,i),o=Array(r),s=0;s<a;++s)for(var c=t[s],l=n[s],u=c.length,d=o[s]=Array(u),f,p=0;p<u;++p)(f=c[p]||l[p])&&(d[p]=f);for(;s<r;++s)o[s]=t[s];return new yu(o,this._parents,this._name,this._id)}function Kl(e){return(e+``).trim().split(/^|\s+/).every(function(e){var t=e.indexOf(`.`);return t>=0&&(e=e.slice(0,t)),!e||e===`start`})}function ql(e,t,n){var r,i,a=Kl(t)?dl:fl;return function(){var o=a(this,e),s=o.on;s!==r&&(i=(r=s).copy()).on(t,n),o.on=i}}function Jl(e,t){var n=this._id;return arguments.length<2?pl(this.node(),n).on.on(e):this.each(ql(n,e,t))}function Yl(e){return function(){var t=this.parentNode;for(var n in this.__transition)if(+n!==e)return;t&&t.removeChild(this)}}function Xl(){return this.on(`end.remove`,Yl(this._id))}function Zl(e){var t=this._name,n=this._id;typeof e!=`function`&&(e=Na(e));for(var r=this._groups,i=r.length,a=Array(i),o=0;o<i;++o)for(var s=r[o],c=s.length,l=a[o]=Array(c),u,d,f=0;f<c;++f)(u=s[f])&&(d=e.call(u,u.__data__,f,s))&&(`__data__`in u&&(d.__data__=u.__data__),l[f]=d,ul(l[f],t,n,f,l,pl(u,n)));return new yu(a,this._parents,t,n)}function Ql(e){var t=this._name,n=this._id;typeof e!=`function`&&(e=La(e));for(var r=this._groups,i=r.length,a=[],o=[],s=0;s<i;++s)for(var c=r[s],l=c.length,u,d=0;d<l;++d)if(u=c[d]){for(var f=e.call(u,u.__data__,d,c),p,m=pl(u,n),h=0,g=f.length;h<g;++h)(p=f[h])&&ul(p,t,n,h,f,m);a.push(f),o.push(u)}return new yu(a,o,t,n)}var $l=ws.prototype.constructor;function eu(){return new $l(this._groups,this._parents)}function tu(e,t){var n,r,i;return function(){var a=jo(this,e),o=(this.style.removeProperty(e),jo(this,e));return a===o?null:a===n&&o===r?i:i=t(n=a,r=o)}}function nu(e){return function(){this.style.removeProperty(e)}}function ru(e,t,n){var r,i=n+``,a;return function(){var o=jo(this,e);return o===i?null:o===r?a:a=t(r=o,n)}}function iu(e,t,n){var r,i,a;return function(){var o=jo(this,e),s=n(this),c=s+``;return s??(c=s=(this.style.removeProperty(e),jo(this,e))),o===c?null:o===r&&c===i?a:(i=c,a=t(r=o,s))}}function au(e,t){var n,r,i,a=`style.`+t,o=`end.`+a,s;return function(){var c=fl(this,e),l=c.on,u=c.value[a]==null?s||=nu(t):void 0;(l!==n||i!==u)&&(r=(n=l).copy()).on(o,i=u),c.on=r}}function ou(e,t,n){var r=(e+=``)==`transform`?zc:xl;return t==null?this.styleTween(e,tu(e,r)).on(`end.style.`+e,nu(e)):typeof t==`function`?this.styleTween(e,iu(e,r,bl(this,`style.`+e,t))).each(au(this._id,e)):this.styleTween(e,ru(e,r,t),n).on(`end.style.`+e,null)}function su(e,t,n){return function(r){this.style.setProperty(e,t.call(this,r),n)}}function cu(e,t,n){var r,i;function a(){var a=t.apply(this,arguments);return a!==i&&(r=(i=a)&&su(e,a,n)),r}return a._value=t,a}function lu(e,t,n){var r=`style.`+(e+=``);if(arguments.length<2)return(r=this.tween(r))&&r._value;if(t==null)return this.tween(r,null);if(typeof t!=`function`)throw Error();return this.tween(r,cu(e,t,n??``))}function uu(e){return function(){this.textContent=e}}function du(e){return function(){var t=e(this);this.textContent=t??``}}function fu(e){return this.tween(`text`,typeof e==`function`?du(bl(this,`text`,e)):uu(e==null?``:e+``))}function pu(e){return function(t){this.textContent=e.call(this,t)}}function mu(e){var t,n;function r(){var r=e.apply(this,arguments);return r!==n&&(t=(n=r)&&pu(r)),t}return r._value=e,r}function hu(e){var t=`text`;if(arguments.length<1)return(t=this.tween(t))&&t._value;if(e==null)return this.tween(t,null);if(typeof e!=`function`)throw Error();return this.tween(t,mu(e))}function gu(){for(var e=this._name,t=this._id,n=xu(),r=this._groups,i=r.length,a=0;a<i;++a)for(var o=r[a],s=o.length,c,l=0;l<s;++l)if(c=o[l]){var u=pl(c,t);ul(c,e,n,l,o,{time:u.time+u.delay+u.duration,delay:0,duration:u.duration,ease:u.ease})}return new yu(r,this._parents,e,n)}function _u(){var e,t,n=this,r=n._id,i=n.size();return new Promise(function(a,o){var s={value:o},c={value:function(){--i===0&&a()}};n.each(function(){var n=fl(this,r),i=n.on;i!==e&&(t=(e=i).copy(),t._.cancel.push(s),t._.interrupt.push(s),t._.end.push(c)),n.on=t}),i===0&&a()})}var vu=0;function yu(e,t,n,r){this._groups=e,this._parents=t,this._name=n,this._id=r}function bu(e){return ws().transition(e)}function xu(){return++vu}var Su=ws.prototype;yu.prototype=bu.prototype={constructor:yu,select:Zl,selectAll:Ql,selectChild:Su.selectChild,selectChildren:Su.selectChildren,filter:Wl,merge:Gl,selection:eu,transition:gu,call:Su.call,nodes:Su.nodes,node:Su.node,size:Su.size,empty:Su.empty,each:Su.each,on:Jl,attr:Ol,attrTween:Nl,style:ou,styleTween:lu,text:fu,textTween:hu,remove:Xl,tween:yl,delay:Il,duration:zl,ease:Vl,easeVarying:Ul,end:_u,[Symbol.iterator]:Su[Symbol.iterator]};function Cu(e){return--e*e*e+1}function wu(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}var Tu={time:null,delay:0,duration:250,ease:wu};function Eu(e,t){for(var n;!(n=e.__transition)||!(n=n[t]);)if(!(e=e.parentNode))throw Error(`transition ${t} not found`);return n}function Du(e){var t,n;e instanceof yu?(t=e._id,e=e._name):(t=xu(),(n=Tu).time=Qc(),e=e==null?null:e+``);for(var r=this._groups,i=r.length,a=0;a<i;++a)for(var o=r[a],s=o.length,c,l=0;l<s;++l)(c=o[l])&&ul(c,e,t,l,o,n||Eu(c,t));return new yu(r,this._parents,e,t)}ws.prototype.interrupt=gl,ws.prototype.transition=Du;var Ou=[null];function ku(e,t){var n=e.__transition,r,i;if(n){for(i in t=t==null?null:t+``,n)if((r=n[i]).state>1&&r.name===t)return new yu([[e]],Ou,t,+i)}return null}var{abs:Au,max:ju,min:Mu}=Math;[`w`,`e`].map(Nu),[`n`,`s`].map(Nu),[`n`,`w`,`e`,`s`,`nw`,`ne`,`sw`,`se`].map(Nu);function Nu(e){return{type:e}}var Pu=Math.PI,Fu=2*Pu,Iu=1e-6,Lu=Fu-Iu;function Ru(e){this._+=e[0];for(let t=1,n=e.length;t<n;++t)this._+=arguments[t]+e[t]}function zu(e){let t=Math.floor(e);if(!(t>=0))throw Error(`invalid digits: ${e}`);if(t>15)return Ru;let n=10**t;return function(e){this._+=e[0];for(let t=1,r=e.length;t<r;++t)this._+=Math.round(arguments[t]*n)/n+e[t]}}var Bu=class{constructor(e){this._x0=this._y0=this._x1=this._y1=null,this._=``,this._append=e==null?Ru:zu(e)}moveTo(e,t){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+t}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(e,t){this._append`L${this._x1=+e},${this._y1=+t}`}quadraticCurveTo(e,t,n,r){this._append`Q${+e},${+t},${this._x1=+n},${this._y1=+r}`}bezierCurveTo(e,t,n,r,i,a){this._append`C${+e},${+t},${+n},${+r},${this._x1=+i},${this._y1=+a}`}arcTo(e,t,n,r,i){if(e=+e,t=+t,n=+n,r=+r,i=+i,i<0)throw Error(`negative radius: ${i}`);let a=this._x1,o=this._y1,s=n-e,c=r-t,l=a-e,u=o-t,d=l*l+u*u;if(this._x1===null)this._append`M${this._x1=e},${this._y1=t}`;else if(d>Iu){if(!(Math.abs(u*s-c*l)>Iu)||!i)this._append`L${this._x1=e},${this._y1=t}`;else{let f=n-a,p=r-o,m=s*s+c*c,h=f*f+p*p,g=Math.sqrt(m),_=Math.sqrt(d),v=i*Math.tan((Pu-Math.acos((m+d-h)/(2*g*_)))/2),y=v/_,b=v/g;Math.abs(y-1)>Iu&&this._append`L${e+y*l},${t+y*u}`,this._append`A${i},${i},0,0,${+(u*f>l*p)},${this._x1=e+b*s},${this._y1=t+b*c}`}}}arc(e,t,n,r,i,a){if(e=+e,t=+t,n=+n,a=!!a,n<0)throw Error(`negative radius: ${n}`);let o=n*Math.cos(r),s=n*Math.sin(r),c=e+o,l=t+s,u=1^a,d=a?r-i:i-r;this._x1===null?this._append`M${c},${l}`:(Math.abs(this._x1-c)>Iu||Math.abs(this._y1-l)>Iu)&&this._append`L${c},${l}`,n&&(d<0&&(d=d%Fu+Fu),d>Lu?this._append`A${n},${n},0,1,${u},${e-o},${t-s}A${n},${n},0,1,${u},${this._x1=c},${this._y1=l}`:d>Iu&&this._append`A${n},${n},0,${+(d>=Pu)},${u},${this._x1=e+n*Math.cos(i)},${this._y1=t+n*Math.sin(i)}`)}rect(e,t,n,r){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+t}h${n=+n}v${+r}h${-n}Z`}toString(){return this._}};Bu.prototype;var Vu=11102230246251565e-32,Hu=134217729,Uu=3.000000000000001*Vu;function Wu(e,t,n,r,i){let a,o,s,c,l=t[0],u=r[0],d=0,f=0;u>l==u>-l?(a=l,l=t[++d]):(a=u,u=r[++f]);let p=0;if(d<e&&f<n)for(u>l==u>-l?(o=l+a,s=a-(o-l),l=t[++d]):(o=u+a,s=a-(o-u),u=r[++f]),a=o,s!==0&&(i[p++]=s);d<e&&f<n;)u>l==u>-l?(o=a+l,c=o-a,s=a-(o-c)+(l-c),l=t[++d]):(o=a+u,c=o-a,s=a-(o-c)+(u-c),u=r[++f]),a=o,s!==0&&(i[p++]=s);for(;d<e;)o=a+l,c=o-a,s=a-(o-c)+(l-c),l=t[++d],a=o,s!==0&&(i[p++]=s);for(;f<n;)o=a+u,c=o-a,s=a-(o-c)+(u-c),u=r[++f],a=o,s!==0&&(i[p++]=s);return(a!==0||p===0)&&(i[p++]=a),p}function Gu(e,t){let n=t[0];for(let r=1;r<e;r++)n+=t[r];return n}function $(e){return new Float64Array(e)}var Ku=(3+16*Vu)*Vu,qu=(2+12*Vu)*Vu,Ju=(9+64*Vu)*Vu*Vu,Yu=$(4),Xu=$(8),Zu=$(12),Qu=$(16),$u=$(4);function ed(e,t,n,r,i,a,o){let s,c,l,u,d,f,p,m,h,g,_,v,y,b,x,S,C,w,T=e-i,E=n-i,D=t-a,O=r-a;b=T*O,f=Hu*T,p=f-(f-T),m=T-p,f=Hu*O,h=f-(f-O),g=O-h,x=m*g-(b-p*h-m*h-p*g),S=D*E,f=Hu*D,p=f-(f-D),m=D-p,f=Hu*E,h=f-(f-E),g=E-h,C=m*g-(S-p*h-m*h-p*g),_=x-C,d=x-_,Yu[0]=x-(_+d)+(d-C),v=b+_,d=v-b,y=b-(v-d)+(_-d),_=y-S,d=y-_,Yu[1]=y-(_+d)+(d-S),w=v+_,d=w-v,Yu[2]=v-(w-d)+(_-d),Yu[3]=w;let k=Gu(4,Yu),A=qu*o;if(k>=A||-k>=A||(d=e-T,s=e-(T+d)+(d-i),d=n-E,l=n-(E+d)+(d-i),d=t-D,c=t-(D+d)+(d-a),d=r-O,u=r-(O+d)+(d-a),s===0&&c===0&&l===0&&u===0)||(A=Ju*o+Uu*Math.abs(k),k+=T*u+O*s-(D*l+E*c),k>=A||-k>=A))return k;b=s*O,f=Hu*s,p=f-(f-s),m=s-p,f=Hu*O,h=f-(f-O),g=O-h,x=m*g-(b-p*h-m*h-p*g),S=c*E,f=Hu*c,p=f-(f-c),m=c-p,f=Hu*E,h=f-(f-E),g=E-h,C=m*g-(S-p*h-m*h-p*g),_=x-C,d=x-_,$u[0]=x-(_+d)+(d-C),v=b+_,d=v-b,y=b-(v-d)+(_-d),_=y-S,d=y-_,$u[1]=y-(_+d)+(d-S),w=v+_,d=w-v,$u[2]=v-(w-d)+(_-d),$u[3]=w;let j=Wu(4,Yu,4,$u,Xu);b=T*u,f=Hu*T,p=f-(f-T),m=T-p,f=Hu*u,h=f-(f-u),g=u-h,x=m*g-(b-p*h-m*h-p*g),S=D*l,f=Hu*D,p=f-(f-D),m=D-p,f=Hu*l,h=f-(f-l),g=l-h,C=m*g-(S-p*h-m*h-p*g),_=x-C,d=x-_,$u[0]=x-(_+d)+(d-C),v=b+_,d=v-b,y=b-(v-d)+(_-d),_=y-S,d=y-_,$u[1]=y-(_+d)+(d-S),w=v+_,d=w-v,$u[2]=v-(w-d)+(_-d),$u[3]=w;let M=Wu(j,Xu,4,$u,Zu);return b=s*u,f=Hu*s,p=f-(f-s),m=s-p,f=Hu*u,h=f-(f-u),g=u-h,x=m*g-(b-p*h-m*h-p*g),S=c*l,f=Hu*c,p=f-(f-c),m=c-p,f=Hu*l,h=f-(f-l),g=l-h,C=m*g-(S-p*h-m*h-p*g),_=x-C,d=x-_,$u[0]=x-(_+d)+(d-C),v=b+_,d=v-b,y=b-(v-d)+(_-d),_=y-S,d=y-_,$u[1]=y-(_+d)+(d-S),w=v+_,d=w-v,$u[2]=v-(w-d)+(_-d),$u[3]=w,Qu[Wu(M,Zu,4,$u,Qu)-1]}function td(e,t,n,r,i,a){let o=(t-a)*(n-i),s=(e-i)*(r-a),c=o-s,l=Math.abs(o+s);return Math.abs(c)>=Ku*l?c:-ed(e,t,n,r,i,a,l)}(7+56*Vu)*Vu,(3+28*Vu)*Vu,(26+288*Vu)*Vu*Vu,$(4),$(4),$(4),$(4),$(4),$(4),$(4),$(4),$(4),$(8),$(8),$(8),$(4),$(8),$(8),$(16),$(12),$(192),$(192),(10+96*Vu)*Vu,(4+48*Vu)*Vu,(44+576*Vu)*Vu*Vu,$(4),$(4),$(4),$(4),$(4),$(4),$(4),$(4),$(8),$(8),$(8),$(8),$(8),$(8),$(8),$(8),$(8),$(4),$(4),$(4),$(8),$(16),$(16),$(16),$(32),$(32),$(48),$(64),$(1152),$(1152),(16+224*Vu)*Vu,(5+72*Vu)*Vu,(71+1408*Vu)*Vu*Vu,$(4),$(4),$(4),$(4),$(4),$(4),$(4),$(4),$(4),$(4),$(24),$(24),$(24),$(24),$(24),$(24),$(24),$(24),$(24),$(24),$(1152),$(1152),$(1152),$(1152),$(1152),$(2304),$(2304),$(3456),$(5760),$(8),$(8),$(8),$(16),$(24),$(48),$(48),$(96),$(192),$(384),$(384),$(384),$(768),$(96),$(96),$(96),$(1152);var nd=2**-52,rd=new Uint32Array(512),id=class e{static from(t,n=fd,r=pd){let i=t.length,a=new Float64Array(i*2);for(let e=0;e<i;e++){let i=t[e];a[2*e]=n(i),a[2*e+1]=r(i)}return new e(a)}constructor(e){let t=e.length>>1;if(t>0&&typeof e[0]!=`number`)throw Error(`Expected coords to contain numbers.`);this.coords=e;let n=Math.max(2*t-5,0);this._triangles=new Uint32Array(n*3),this._halfedges=new Int32Array(n*3),this._hashSize=Math.ceil(Math.sqrt(t)),this._hullPrev=new Uint32Array(t),this._hullNext=new Uint32Array(t),this._hullTri=new Uint32Array(t),this._hullHash=new Int32Array(this._hashSize),this._ids=new Uint32Array(t),this._dists=new Float64Array(t),this.trianglesLen=0,this._cx=0,this._cy=0,this._hullStart=0,this.hull=this._triangles,this.triangles=this._triangles,this.halfedges=this._halfedges,this.update()}update(){let{coords:e,_hullPrev:t,_hullNext:n,_hullTri:r,_hullHash:i}=this,a=e.length>>1,o=1/0,s=1/0,c=-1/0,l=-1/0;for(let t=0;t<a;t++){let n=e[2*t],r=e[2*t+1];n<o&&(o=n),r<s&&(s=r),n>c&&(c=n),r>l&&(l=r),this._ids[t]=t}let u=(o+c)/2,d=(s+l)/2,f=0,p=0,m=0;for(let t=0,n=1/0;t<a;t++){let r=od(u,d,e[2*t],e[2*t+1]);r<n&&(f=t,n=r)}let h=e[2*f],g=e[2*f+1];for(let t=0,n=1/0;t<a;t++){if(t===f)continue;let r=od(h,g,e[2*t],e[2*t+1]);r<n&&r>0&&(p=t,n=r)}let _=e[2*p],v=e[2*p+1],y=1/0;for(let t=0;t<a;t++){if(t===f||t===p)continue;let n=cd(h,g,_,v,e[2*t],e[2*t+1]);n<y&&(m=t,y=n)}let b=e[2*m],x=e[2*m+1];if(y===1/0){for(let t=0;t<a;t++)this._dists[t]=e[2*t]-e[0]||e[2*t+1]-e[1];ud(this._ids,this._dists,0,a-1);let t=new Uint32Array(a),n=0;for(let e=0,r=-1/0;e<a;e++){let i=this._ids[e],a=this._dists[i];a>r&&(t[n++]=i,r=a)}this.hull=t.subarray(0,n),this.triangles=new Uint32Array,this.halfedges=new Int32Array;return}if(td(h,g,_,v,b,x)<0){let e=p,t=_,n=v;p=m,_=b,v=x,m=e,b=t,x=n}let S=ld(h,g,_,v,b,x);this._cx=S.x,this._cy=S.y;for(let t=0;t<a;t++)this._dists[t]=od(e[2*t],e[2*t+1],S.x,S.y);ud(this._ids,this._dists,0,a-1),this._hullStart=f;let C=3;n[f]=t[m]=p,n[p]=t[f]=m,n[m]=t[p]=f,r[f]=0,r[p]=1,r[m]=2,i.fill(-1),i[this._hashKey(h,g)]=f,i[this._hashKey(_,v)]=p,i[this._hashKey(b,x)]=m,this.trianglesLen=0,this._addTriangle(f,p,m,-1,-1,-1);for(let a=0,o=0,s=0;a<this._ids.length;a++){let c=this._ids[a],l=e[2*c],u=e[2*c+1];if(a>0&&Math.abs(l-o)<=nd&&Math.abs(u-s)<=nd||(o=l,s=u,c===f||c===p||c===m))continue;let d=0;for(let e=0,t=this._hashKey(l,u);e<this._hashSize&&(d=i[(t+e)%this._hashSize],d===-1||d===n[d]);e++);d=t[d];let h=d,g;for(;g=n[h],td(l,u,e[2*h],e[2*h+1],e[2*g],e[2*g+1])>=0;)if(h=g,h===d){h=-1;break}if(h===-1)continue;let _=this._addTriangle(h,c,n[h],-1,-1,r[h]);r[c]=this._legalize(_+2),r[h]=_,C++;let v=n[h];for(;g=n[v],td(l,u,e[2*v],e[2*v+1],e[2*g],e[2*g+1])<0;)_=this._addTriangle(v,c,g,r[c],-1,r[v]),r[c]=this._legalize(_+2),n[v]=v,C--,v=g;if(h===d)for(;g=t[h],td(l,u,e[2*g],e[2*g+1],e[2*h],e[2*h+1])<0;)_=this._addTriangle(g,c,h,-1,r[h],r[g]),this._legalize(_+2),r[g]=_,n[h]=h,C--,h=g;this._hullStart=t[c]=h,n[h]=t[v]=c,n[c]=v,i[this._hashKey(l,u)]=c,i[this._hashKey(e[2*h],e[2*h+1])]=h}this.hull=new Uint32Array(C);for(let e=0,t=this._hullStart;e<C;e++)this.hull[e]=t,t=n[t];this.triangles=this._triangles.subarray(0,this.trianglesLen),this.halfedges=this._halfedges.subarray(0,this.trianglesLen)}_hashKey(e,t){return Math.floor(ad(e-this._cx,t-this._cy)*this._hashSize)%this._hashSize}_legalize(e){let{_triangles:t,_halfedges:n,coords:r}=this,i=0,a=0;for(;;){let o=n[e],s=e-e%3;if(a=s+(e+2)%3,o===-1){if(i===0)break;e=rd[--i];continue}let c=o-o%3,l=s+(e+1)%3,u=c+(o+2)%3,d=t[a],f=t[e],p=t[l],m=t[u];if(sd(r[2*d],r[2*d+1],r[2*f],r[2*f+1],r[2*p],r[2*p+1],r[2*m],r[2*m+1])){t[e]=m,t[o]=d;let r=n[u];if(r===-1){let t=this._hullStart;do{if(this._hullTri[t]===u){this._hullTri[t]=e;break}t=this._hullPrev[t]}while(t!==this._hullStart)}this._link(e,r),this._link(o,n[a]),this._link(a,u);let s=c+(o+1)%3;i<rd.length&&(rd[i++]=s)}else{if(i===0)break;e=rd[--i]}}return a}_link(e,t){this._halfedges[e]=t,t!==-1&&(this._halfedges[t]=e)}_addTriangle(e,t,n,r,i,a){let o=this.trianglesLen;return this._triangles[o]=e,this._triangles[o+1]=t,this._triangles[o+2]=n,this._link(o,r),this._link(o+1,i),this._link(o+2,a),this.trianglesLen+=3,o}};function ad(e,t){let n=e/(Math.abs(e)+Math.abs(t));return(t>0?3-n:1+n)/4}function od(e,t,n,r){let i=e-n,a=t-r;return i*i+a*a}function sd(e,t,n,r,i,a,o,s){let c=e-o,l=t-s,u=n-o,d=r-s,f=i-o,p=a-s,m=c*c+l*l,h=u*u+d*d,g=f*f+p*p;return c*(d*g-h*p)-l*(u*g-h*f)+m*(u*p-d*f)<0}function cd(e,t,n,r,i,a){let o=n-e,s=r-t,c=i-e,l=a-t,u=o*o+s*s,d=c*c+l*l,f=.5/(o*l-s*c),p=(l*u-s*d)*f,m=(o*d-c*u)*f;return p*p+m*m}function ld(e,t,n,r,i,a){let o=n-e,s=r-t,c=i-e,l=a-t,u=o*o+s*s,d=c*c+l*l,f=.5/(o*l-s*c);return{x:e+(l*u-s*d)*f,y:t+(o*d-c*u)*f}}function ud(e,t,n,r){if(r-n<=20)for(let i=n+1;i<=r;i++){let r=e[i],a=t[r],o=i-1;for(;o>=n&&t[e[o]]>a;)e[o+1]=e[o--];e[o+1]=r}else{let i=n+r>>1,a=n+1,o=r;dd(e,i,a),t[e[n]]>t[e[r]]&&dd(e,n,r),t[e[a]]>t[e[r]]&&dd(e,a,r),t[e[n]]>t[e[a]]&&dd(e,n,a);let s=e[a],c=t[s];for(;;){do a++;while(t[e[a]]<c);do o--;while(t[e[o]]>c);if(o<a)break;dd(e,a,o)}e[n+1]=e[o],e[o]=s,r-a+1>=o-n?(ud(e,t,a,r),ud(e,t,n,o-1)):(ud(e,t,n,o-1),ud(e,t,a,r))}}function dd(e,t,n){let r=e[t];e[t]=e[n],e[n]=r}function fd(e){return e[0]}function pd(e){return e[1]}var md=1e-6,hd=class{constructor(){this._x0=this._y0=this._x1=this._y1=null,this._=``}moveTo(e,t){this._+=`M${this._x0=this._x1=+e},${this._y0=this._y1=+t}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._+=`Z`)}lineTo(e,t){this._+=`L${this._x1=+e},${this._y1=+t}`}arc(e,t,n){e=+e,t=+t,n=+n;let r=e+n,i=t;if(n<0)throw Error(`negative radius`);this._x1===null?this._+=`M${r},${i}`:(Math.abs(this._x1-r)>md||Math.abs(this._y1-i)>md)&&(this._+=`L`+r+`,`+i),n&&(this._+=`A${n},${n},0,1,1,${e-n},${t}A${n},${n},0,1,1,${this._x1=r},${this._y1=i}`)}rect(e,t,n,r){this._+=`M${this._x0=this._x1=+e},${this._y0=this._y1=+t}h${+n}v${+r}h${-n}Z`}value(){return this._||null}},gd=class{constructor(){this._=[]}moveTo(e,t){this._.push([e,t])}closePath(){this._.push(this._[0].slice())}lineTo(e,t){this._.push([e,t])}value(){return this._.length?this._:null}},_d=class{constructor(e,[t,n,r,i]=[0,0,960,500]){if(!((r=+r)>=(t=+t))||!((i=+i)>=(n=+n)))throw Error(`invalid bounds`);this.delaunay=e,this._circumcenters=new Float64Array(e.points.length*2),this.vectors=new Float64Array(e.points.length*2),this.xmax=r,this.xmin=t,this.ymax=i,this.ymin=n,this._init()}update(){return this.delaunay.update(),this._init(),this}_init(){let{delaunay:{points:e,hull:t,triangles:n},vectors:r}=this,i,a,o=this.circumcenters=this._circumcenters.subarray(0,n.length/3*2);for(let r=0,s=0,c=n.length,l,u;r<c;r+=3,s+=2){let c=n[r]*2,d=n[r+1]*2,f=n[r+2]*2,p=e[c],m=e[c+1],h=e[d],g=e[d+1],_=e[f],v=e[f+1],y=h-p,b=g-m,x=_-p,S=v-m,C=(y*S-b*x)*2;if(Math.abs(C)<1e-9){if(i===void 0){i=a=0;for(let n of t)i+=e[n*2],a+=e[n*2+1];i/=t.length,a/=t.length}let n=1e9*Math.sign((i-p)*S-(a-m)*x);l=(p+_)/2-n*S,u=(m+v)/2+n*x}else{let e=1/C,t=y*y+b*b,n=x*x+S*S;l=p+(S*t-b*n)*e,u=m+(y*n-x*t)*e}o[s]=l,o[s+1]=u}let s=t[t.length-1],c,l=s*4,u,d=e[2*s],f,p=e[2*s+1];r.fill(0);for(let n=0;n<t.length;++n)s=t[n],c=l,u=d,f=p,l=s*4,d=e[2*s],p=e[2*s+1],r[c+2]=r[l]=f-p,r[c+3]=r[l+1]=d-u}render(e){let t=e==null?e=new hd:void 0,{delaunay:{halfedges:n,inedges:r,hull:i},circumcenters:a,vectors:o}=this;if(i.length<=1)return null;for(let t=0,r=n.length;t<r;++t){let r=n[t];if(r<t)continue;let i=Math.floor(t/3)*2,o=Math.floor(r/3)*2,s=a[i],c=a[i+1],l=a[o],u=a[o+1];this._renderSegment(s,c,l,u,e)}let s,c=i[i.length-1];for(let t=0;t<i.length;++t){s=c,c=i[t];let n=Math.floor(r[c]/3)*2,l=a[n],u=a[n+1],d=s*4,f=this._project(l,u,o[d+2],o[d+3]);f&&this._renderSegment(l,u,f[0],f[1],e)}return t&&t.value()}renderBounds(e){let t=e==null?e=new hd:void 0;return e.rect(this.xmin,this.ymin,this.xmax-this.xmin,this.ymax-this.ymin),t&&t.value()}renderCell(e,t){let n=t==null?t=new hd:void 0,r=this._clip(e);if(r===null||!r.length)return;t.moveTo(r[0],r[1]);let i=r.length;for(;r[0]===r[i-2]&&r[1]===r[i-1]&&i>1;)i-=2;for(let e=2;e<i;e+=2)(r[e]!==r[e-2]||r[e+1]!==r[e-1])&&t.lineTo(r[e],r[e+1]);return t.closePath(),n&&n.value()}*cellPolygons(){let{delaunay:{points:e}}=this;for(let t=0,n=e.length/2;t<n;++t){let e=this.cellPolygon(t);e&&(e.index=t,yield e)}}cellPolygon(e){let t=new gd;return this.renderCell(e,t),t.value()}_renderSegment(e,t,n,r,i){let a,o=this._regioncode(e,t),s=this._regioncode(n,r);o===0&&s===0?(i.moveTo(e,t),i.lineTo(n,r)):(a=this._clipSegment(e,t,n,r,o,s))&&(i.moveTo(a[0],a[1]),i.lineTo(a[2],a[3]))}contains(e,t,n){return t=+t,t!==t||(n=+n,n!==n)?!1:this.delaunay._step(e,t,n)===e}*neighbors(e){let t=this._clip(e);if(t)for(let n of this.delaunay.neighbors(e)){let e=this._clip(n);if(e){loop:for(let r=0,i=t.length;r<i;r+=2)for(let a=0,o=e.length;a<o;a+=2)if(t[r]===e[a]&&t[r+1]===e[a+1]&&t[(r+2)%i]===e[(a+o-2)%o]&&t[(r+3)%i]===e[(a+o-1)%o]){yield n;break loop}}}}_cell(e){let{circumcenters:t,delaunay:{inedges:n,halfedges:r,triangles:i}}=this,a=n[e];if(a===-1)return null;let o=[],s=a;do{let n=Math.floor(s/3);if(o.push(t[n*2],t[n*2+1]),s=s%3==2?s-2:s+1,i[s]!==e)break;s=r[s]}while(s!==a&&s!==-1);return o}_clip(e){if(e===0&&this.delaunay.hull.length===1)return[this.xmax,this.ymin,this.xmax,this.ymax,this.xmin,this.ymax,this.xmin,this.ymin];let t=this._cell(e);if(t===null)return null;let{vectors:n}=this,r=e*4;return this._simplify(n[r]||n[r+1]?this._clipInfinite(e,t,n[r],n[r+1],n[r+2],n[r+3]):this._clipFinite(e,t))}_clipFinite(e,t){let n=t.length,r=null,i,a,o=t[n-2],s=t[n-1],c,l=this._regioncode(o,s),u,d=0;for(let f=0;f<n;f+=2)if(i=o,a=s,o=t[f],s=t[f+1],c=l,l=this._regioncode(o,s),c===0&&l===0)u=d,d=0,r?r.push(o,s):r=[o,s];else{let t,n,f,p,m;if(c===0){if((t=this._clipSegment(i,a,o,s,c,l))===null)continue;[n,f,p,m]=t}else{if((t=this._clipSegment(o,s,i,a,l,c))===null)continue;[p,m,n,f]=t,u=d,d=this._edgecode(n,f),u&&d&&this._edge(e,u,d,r,r.length),r?r.push(n,f):r=[n,f]}u=d,d=this._edgecode(p,m),u&&d&&this._edge(e,u,d,r,r.length),r?r.push(p,m):r=[p,m]}if(r)u=d,d=this._edgecode(r[0],r[1]),u&&d&&this._edge(e,u,d,r,r.length);else if(this.contains(e,(this.xmin+this.xmax)/2,(this.ymin+this.ymax)/2))return[this.xmax,this.ymin,this.xmax,this.ymax,this.xmin,this.ymax,this.xmin,this.ymin];return r}_clipSegment(e,t,n,r,i,a){let o=i<a;for(o&&([e,t,n,r,i,a]=[n,r,e,t,a,i]);;){if(i===0&&a===0)return o?[n,r,e,t]:[e,t,n,r];if(i&a)return null;let s,c,l=i||a;l&8?(s=e+(n-e)*(this.ymax-t)/(r-t),c=this.ymax):l&4?(s=e+(n-e)*(this.ymin-t)/(r-t),c=this.ymin):l&2?(c=t+(r-t)*(this.xmax-e)/(n-e),s=this.xmax):(c=t+(r-t)*(this.xmin-e)/(n-e),s=this.xmin),i?(e=s,t=c,i=this._regioncode(e,t)):(n=s,r=c,a=this._regioncode(n,r))}}_clipInfinite(e,t,n,r,i,a){let o=Array.from(t),s;if((s=this._project(o[0],o[1],n,r))&&o.unshift(s[0],s[1]),(s=this._project(o[o.length-2],o[o.length-1],i,a))&&o.push(s[0],s[1]),o=this._clipFinite(e,o))for(let t=0,n=o.length,r,i=this._edgecode(o[n-2],o[n-1]);t<n;t+=2)r=i,i=this._edgecode(o[t],o[t+1]),r&&i&&(t=this._edge(e,r,i,o,t),n=o.length);else this.contains(e,(this.xmin+this.xmax)/2,(this.ymin+this.ymax)/2)&&(o=[this.xmin,this.ymin,this.xmax,this.ymin,this.xmax,this.ymax,this.xmin,this.ymax]);return o}_edge(e,t,n,r,i){for(;t!==n;){let n,a;switch(t){case 5:t=4;continue;case 4:t=6,n=this.xmax,a=this.ymin;break;case 6:t=2;continue;case 2:t=10,n=this.xmax,a=this.ymax;break;case 10:t=8;continue;case 8:t=9,n=this.xmin,a=this.ymax;break;case 9:t=1;continue;case 1:t=5,n=this.xmin,a=this.ymin}(r[i]!==n||r[i+1]!==a)&&this.contains(e,n,a)&&(r.splice(i,0,n,a),i+=2)}return i}_project(e,t,n,r){let i=1/0,a,o,s;if(r<0){if(t<=this.ymin)return null;(a=(this.ymin-t)/r)<i&&(s=this.ymin,o=e+(i=a)*n)}else if(r>0){if(t>=this.ymax)return null;(a=(this.ymax-t)/r)<i&&(s=this.ymax,o=e+(i=a)*n)}if(n>0){if(e>=this.xmax)return null;(a=(this.xmax-e)/n)<i&&(o=this.xmax,s=t+(i=a)*r)}else if(n<0){if(e<=this.xmin)return null;(a=(this.xmin-e)/n)<i&&(o=this.xmin,s=t+(i=a)*r)}return[o,s]}_edgecode(e,t){return(e===this.xmin?1:e===this.xmax?2:0)|(t===this.ymin?4:t===this.ymax?8:0)}_regioncode(e,t){return(e<this.xmin?1:e>this.xmax?2:0)|(t<this.ymin?4:t>this.ymax?8:0)}_simplify(e){if(e&&e.length>4){for(let t=0;t<e.length;t+=2){let n=(t+2)%e.length,r=(t+4)%e.length;(e[t]===e[n]&&e[n]===e[r]||e[t+1]===e[n+1]&&e[n+1]===e[r+1])&&(e.splice(n,2),t-=2)}e.length||(e=null)}return e}},vd=2*Math.PI,yd=Math.pow;function bd(e){return e[0]}function xd(e){return e[1]}function Sd(e){let{triangles:t,coords:n}=e;for(let e=0;e<t.length;e+=3){let r=2*t[e],i=2*t[e+1],a=2*t[e+2];if((n[a]-n[r])*(n[i+1]-n[r+1])-(n[i]-n[r])*(n[a+1]-n[r+1])>1e-10)return!1}return!0}function Cd(e,t,n){return[e+Math.sin(e+t)*n,t+Math.cos(e-t)*n]}var wd=class e{static from(t,n=bd,r=xd,i){return new e(`length`in t?Td(t,n,r,i):Float64Array.from(Ed(t,n,r,i)))}constructor(e){this._delaunator=new id(e),this.inedges=new Int32Array(e.length/2),this._hullIndex=new Int32Array(e.length/2),this.points=this._delaunator.coords,this._init()}update(){return this._delaunator.update(),this._init(),this}_init(){let e=this._delaunator,t=this.points;if(e.hull&&e.hull.length>2&&Sd(e)){this.collinear=Int32Array.from({length:t.length/2},(e,t)=>t).sort((e,n)=>t[2*e]-t[2*n]||t[2*e+1]-t[2*n+1]);let e=this.collinear[0],n=this.collinear[this.collinear.length-1],r=[t[2*e],t[2*e+1],t[2*n],t[2*n+1]],i=1e-8*Math.hypot(r[3]-r[1],r[2]-r[0]);for(let e=0,n=t.length/2;e<n;++e){let n=Cd(t[2*e],t[2*e+1],i);t[2*e]=n[0],t[2*e+1]=n[1]}this._delaunator=new id(t)}else delete this.collinear;let n=this.halfedges=this._delaunator.halfedges,r=this.hull=this._delaunator.hull,i=this.triangles=this._delaunator.triangles,a=this.inedges.fill(-1),o=this._hullIndex.fill(-1);for(let e=0,t=n.length;e<t;++e){let t=i[e%3==2?e-2:e+1];(n[e]===-1||a[t]===-1)&&(a[t]=e)}for(let e=0,t=r.length;e<t;++e)o[r[e]]=e;r.length<=2&&r.length>0&&(this.triangles=new Int32Array(3).fill(-1),this.halfedges=new Int32Array(3).fill(-1),this.triangles[0]=r[0],a[r[0]]=1,r.length===2&&(a[r[1]]=0,this.triangles[1]=r[1],this.triangles[2]=r[1]))}voronoi(e){return new _d(this,e)}*neighbors(e){let{inedges:t,hull:n,_hullIndex:r,halfedges:i,triangles:a,collinear:o}=this;if(o){let t=o.indexOf(e);t>0&&(yield o[t-1]),t<o.length-1&&(yield o[t+1]);return}let s=t[e];if(s===-1)return;let c=s,l=-1;do{if(yield l=a[c],c=c%3==2?c-2:c+1,a[c]!==e)return;if(c=i[c],c===-1){let t=n[(r[e]+1)%n.length];t!==l&&(yield t);return}}while(c!==s)}find(e,t,n=0){if(e=+e,e!==e||(t=+t,t!==t))return-1;let r=n,i;for(;(i=this._step(n,e,t))>=0&&i!==n&&i!==r;)n=i;return i}_step(e,t,n){let{inedges:r,hull:i,_hullIndex:a,halfedges:o,triangles:s,points:c}=this;if(r[e]===-1||!c.length)return(e+1)%(c.length>>1);let l=e,u=yd(t-c[e*2],2)+yd(n-c[e*2+1],2),d=r[e],f=d;do{let r=s[f],d=yd(t-c[r*2],2)+yd(n-c[r*2+1],2);if(d<u&&(u=d,l=r),f=f%3==2?f-2:f+1,s[f]!==e)break;if(f=o[f],f===-1){if(f=i[(a[e]+1)%i.length],f!==r&&yd(t-c[f*2],2)+yd(n-c[f*2+1],2)<u)return f;break}}while(f!==d);return l}render(e){let t=e==null?e=new hd:void 0,{points:n,halfedges:r,triangles:i}=this;for(let t=0,a=r.length;t<a;++t){let a=r[t];if(a<t)continue;let o=i[t]*2,s=i[a]*2;e.moveTo(n[o],n[o+1]),e.lineTo(n[s],n[s+1])}return this.renderHull(e),t&&t.value()}renderPoints(e,t){t===void 0&&(!e||typeof e.moveTo!=`function`)&&(t=e,e=null),t=t==null?2:+t;let n=e==null?e=new hd:void 0,{points:r}=this;for(let n=0,i=r.length;n<i;n+=2){let i=r[n],a=r[n+1];e.moveTo(i+t,a),e.arc(i,a,t,0,vd)}return n&&n.value()}renderHull(e){let t=e==null?e=new hd:void 0,{hull:n,points:r}=this,i=n[0]*2,a=n.length;e.moveTo(r[i],r[i+1]);for(let t=1;t<a;++t){let i=2*n[t];e.lineTo(r[i],r[i+1])}return e.closePath(),t&&t.value()}hullPolygon(){let e=new gd;return this.renderHull(e),e.value()}renderTriangle(e,t){let n=t==null?t=new hd:void 0,{points:r,triangles:i}=this,a=i[e*=3]*2,o=i[e+1]*2,s=i[e+2]*2;return t.moveTo(r[a],r[a+1]),t.lineTo(r[o],r[o+1]),t.lineTo(r[s],r[s+1]),t.closePath(),n&&n.value()}*trianglePolygons(){let{triangles:e}=this;for(let t=0,n=e.length/3;t<n;++t)yield this.trianglePolygon(t)}trianglePolygon(e){let t=new gd;return this.renderTriangle(e,t),t.value()}};function Td(e,t,n,r){let i=e.length,a=new Float64Array(i*2);for(let o=0;o<i;++o){let i=e[o];a[o*2]=t.call(r,i,o,e),a[o*2+1]=n.call(r,i,o,e)}return a}function*Ed(e,t,n,r){let i=0;for(let a of e)yield t.call(r,a,i,e),yield n.call(r,a,i,e),++i}function Dd(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString(`en`).replace(/,/g,``):e.toString(10)}function Od(e,t){if(!isFinite(e)||e===0)return null;var n=(e=t?e.toExponential(t-1):e.toExponential()).indexOf(`e`),r=e.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+e.slice(n+1)]}function kd(e){return e=Od(Math.abs(e)),e?e[1]:NaN}function Ad(e,t){return function(n,r){for(var i=n.length,a=[],o=0,s=e[0],c=0;i>0&&s>0&&(c+s+1>r&&(s=Math.max(1,r-c)),a.push(n.substring(i-=s,i+s)),!((c+=s+1)>r));)s=e[o=(o+1)%e.length];return a.reverse().join(t)}}function jd(e){return function(t){return t.replace(/[0-9]/g,function(t){return e[+t]})}}var Md=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Nd(e){if(!(t=Md.exec(e)))throw Error(`invalid format: `+e);var t;return new Pd({fill:t[1],align:t[2],sign:t[3],symbol:t[4],zero:t[5],width:t[6],comma:t[7],precision:t[8]&&t[8].slice(1),trim:t[9],type:t[10]})}Nd.prototype=Pd.prototype;function Pd(e){this.fill=e.fill===void 0?` `:e.fill+``,this.align=e.align===void 0?`>`:e.align+``,this.sign=e.sign===void 0?`-`:e.sign+``,this.symbol=e.symbol===void 0?``:e.symbol+``,this.zero=!!e.zero,this.width=e.width===void 0?void 0:+e.width,this.comma=!!e.comma,this.precision=e.precision===void 0?void 0:+e.precision,this.trim=!!e.trim,this.type=e.type===void 0?``:e.type+``}Pd.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?`0`:``)+(this.width===void 0?``:Math.max(1,this.width|0))+(this.comma?`,`:``)+(this.precision===void 0?``:`.`+Math.max(0,this.precision|0))+(this.trim?`~`:``)+this.type};function Fd(e){out:for(var t=e.length,n=1,r=-1,i;n<t;++n)switch(e[n]){case`.`:r=i=n;break;case`0`:r===0&&(r=n),i=n;break;default:if(!+e[n])break out;r>0&&(r=0)}return r>0?e.slice(0,r)+e.slice(i+1):e}var Id;function Ld(e,t){var n=Od(e,t);if(!n)return Id=void 0,e.toPrecision(t);var r=n[0],i=n[1],a=i-(Id=Math.max(-8,Math.min(8,Math.floor(i/3)))*3)+1,o=r.length;return a===o?r:a>o?r+Array(a-o+1).join(`0`):a>0?r.slice(0,a)+`.`+r.slice(a):`0.`+Array(1-a).join(`0`)+Od(e,Math.max(0,t+a-1))[0]}function Rd(e,t){var n=Od(e,t);if(!n)return e+``;var r=n[0],i=n[1];return i<0?`0.`+Array(-i).join(`0`)+r:r.length>i+1?r.slice(0,i+1)+`.`+r.slice(i+1):r+Array(i-r.length+2).join(`0`)}var zd={"%":(e,t)=>(e*100).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+``,d:Dd,e:(e,t)=>e.toExponential(t),f:(e,t)=>e.toFixed(t),g:(e,t)=>e.toPrecision(t),o:e=>Math.round(e).toString(8),p:(e,t)=>Rd(e*100,t),r:Rd,s:Ld,X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function Bd(e){return e}var Vd=Array.prototype.map,Hd=[`y`,`z`,`a`,`f`,`p`,`n`,`µ`,`m`,``,`k`,`M`,`G`,`T`,`P`,`E`,`Z`,`Y`];function Ud(e){var t=e.grouping===void 0||e.thousands===void 0?Bd:Ad(Vd.call(e.grouping,Number),e.thousands+``),n=e.currency===void 0?``:e.currency[0]+``,r=e.currency===void 0?``:e.currency[1]+``,i=e.decimal===void 0?`.`:e.decimal+``,a=e.numerals===void 0?Bd:jd(Vd.call(e.numerals,String)),o=e.percent===void 0?`%`:e.percent+``,s=e.minus===void 0?`−`:e.minus+``,c=e.nan===void 0?`NaN`:e.nan+``;function l(e,l){e=Nd(e);var u=e.fill,d=e.align,f=e.sign,p=e.symbol,m=e.zero,h=e.width,g=e.comma,_=e.precision,v=e.trim,y=e.type;y===`n`?(g=!0,y=`g`):zd[y]||(_===void 0&&(_=12),v=!0,y=`g`),(m||u===`0`&&d===`=`)&&(m=!0,u=`0`,d=`=`);var b=(l&&l.prefix!==void 0?l.prefix:``)+(p===`$`?n:p===`#`&&/[boxX]/.test(y)?`0`+y.toLowerCase():``),x=(p===`$`?r:/[%p]/.test(y)?o:``)+(l&&l.suffix!==void 0?l.suffix:``),S=zd[y],C=/[defgprs%]/.test(y);_=_===void 0?6:/[gprs]/.test(y)?Math.max(1,Math.min(21,_)):Math.max(0,Math.min(20,_));function w(e){var n=b,r=x,o,l,p;if(y===`c`)r=S(e)+r,e=``;else{e=+e;var w=e<0||1/e<0;if(e=isNaN(e)?c:S(Math.abs(e),_),v&&(e=Fd(e)),w&&+e==0&&f!==`+`&&(w=!1),n=(w?f===`(`?f:s:f===`-`||f===`(`?``:f)+n,r=(y===`s`&&!isNaN(e)&&Id!==void 0?Hd[8+Id/3]:``)+r+(w&&f===`(`?`)`:``),C){for(o=-1,l=e.length;++o<l;)if(p=e.charCodeAt(o),48>p||p>57){r=(p===46?i+e.slice(o+1):e.slice(o))+r,e=e.slice(0,o);break}}}g&&!m&&(e=t(e,1/0));var T=n.length+e.length+r.length,E=T<h?Array(h-T+1).join(u):``;switch(g&&m&&(e=t(E+e,E.length?h-r.length:1/0),E=``),d){case`<`:e=n+e+r+E;break;case`=`:e=n+E+e+r;break;case`^`:e=E.slice(0,T=E.length>>1)+n+e+r+E.slice(T);break;default:e=E+n+e+r}return a(e)}return w.toString=function(){return e+``},w}function u(e,t){var n=Math.max(-8,Math.min(8,Math.floor(kd(t)/3)))*3,r=10**-n,i=l((e=Nd(e),e.type=`f`,e),{suffix:Hd[8+n/3]});return function(e){return i(r*e)}}return{format:l,formatPrefix:u}}var Wd,Gd,Kd;qd({thousands:`,`,grouping:[3],currency:[`$`,``]});function qd(e){return Wd=Ud(e),Gd=Wd.format,Kd=Wd.formatPrefix,Wd}function Jd(e){return Math.max(0,-kd(Math.abs(e)))}function Yd(e,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(kd(t)/3)))*3-kd(Math.abs(e)))}function Xd(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,kd(t)-kd(e))+1}function Zd(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e)}return this}var Qd=Symbol(`implicit`);function $d(){var e=new Ii,t=[],n=[],r=Qd;function i(i){let a=e.get(i);if(a===void 0){if(r!==Qd)return r;e.set(i,a=t.push(i)-1)}return n[a%n.length]}return i.domain=function(n){if(!arguments.length)return t.slice();t=[],e=new Ii;for(let r of n)e.has(r)||e.set(r,t.push(r)-1);return i},i.range=function(e){return arguments.length?(n=Array.from(e),i):n.slice()},i.unknown=function(e){return arguments.length?(r=e,i):r},i.copy=function(){return $d(t,n).unknown(r)},Zd.apply(i,arguments),i}function ef(){var e=$d().unknown(void 0),t=e.domain,n=e.range,r=0,i=1,a,o,s=!1,c=0,l=0,u=.5;delete e.unknown;function d(){var e=t().length,d=i<r,f=d?i:r,p=d?r:i;a=(p-f)/Math.max(1,e-c+l*2),s&&(a=Math.floor(a)),f+=(p-f-a*(e-c))*u,o=a*(1-c),s&&(f=Math.round(f),o=Math.round(o));var m=ra(e).map(function(e){return f+a*e});return n(d?m.reverse():m)}return e.domain=function(e){return arguments.length?(t(e),d()):t()},e.range=function(e){return arguments.length?([r,i]=e,r=+r,i=+i,d()):[r,i]},e.rangeRound=function(e){return[r,i]=e,r=+r,i=+i,s=!0,d()},e.bandwidth=function(){return o},e.step=function(){return a},e.round=function(e){return arguments.length?(s=!!e,d()):s},e.padding=function(e){return arguments.length?(c=Math.min(1,l=+e),d()):c},e.paddingInner=function(e){return arguments.length?(c=Math.min(1,e),d()):c},e.paddingOuter=function(e){return arguments.length?(l=+e,d()):l},e.align=function(e){return arguments.length?(u=Math.max(0,Math.min(1,e)),d()):u},e.copy=function(){return ef(t(),[r,i]).round(s).paddingInner(c).paddingOuter(l).align(u)},Zd.apply(d(),arguments)}function tf(e){var t=e.copy;return e.padding=e.paddingOuter,delete e.paddingInner,delete e.paddingOuter,e.copy=function(){return tf(t())},e}function nf(){return tf(ef.apply(null,arguments).paddingInner(1))}function rf(e){return function(){return e}}function af(e){return+e}var of=[0,1];function sf(e){return e}function cf(e,t){return(t-=e=+e)?function(n){return(n-e)/t}:rf(isNaN(t)?NaN:.5)}function lf(e,t){var n;return e>t&&(n=e,e=t,t=n),function(n){return Math.max(e,Math.min(t,n))}}function uf(e,t,n){var r=e[0],i=e[1],a=t[0],o=t[1];return i<r?(r=cf(i,r),a=n(o,a)):(r=cf(r,i),a=n(a,o)),function(e){return a(r(e))}}function df(e,t,n){var r=Math.min(e.length,t.length)-1,i=Array(r),a=Array(r),o=-1;for(e[r]<e[0]&&(e=e.slice().reverse(),t=t.slice().reverse());++o<r;)i[o]=cf(e[o],e[o+1]),a[o]=n(t[o],t[o+1]);return function(t){var n=Pi(e,t,1,r)-1;return a[n](i[n](t))}}function ff(e,t){return t.domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown())}function pf(){var e=of,t=of,n=Ac,r,i,a,o=sf,s,c,l;function u(){var n=Math.min(e.length,t.length);return o!==sf&&(o=lf(e[0],e[n-1])),s=n>2?df:uf,c=l=null,d}function d(i){return i==null||isNaN(i=+i)?a:(c||=s(e.map(r),t,n))(r(o(i)))}return d.invert=function(n){return o(i((l||=s(t,e.map(r),Cc))(n)))},d.domain=function(t){return arguments.length?(e=Array.from(t,af),u()):e.slice()},d.range=function(e){return arguments.length?(t=Array.from(e),u()):t.slice()},d.rangeRound=function(e){return t=Array.from(e),n=jc,u()},d.clamp=function(e){return arguments.length?(o=e?!0:sf,u()):o!==sf},d.interpolate=function(e){return arguments.length?(n=e,u()):n},d.unknown=function(e){return arguments.length?(a=e,d):a},function(e,t){return r=e,i=t,u()}}function mf(){return pf()(sf,sf)}function hf(e,t,n,r){var i=ea(e,t,n),a;switch(r=Nd(r??`,f`),r.type){case`s`:var o=Math.max(Math.abs(e),Math.abs(t));return r.precision==null&&!isNaN(a=Yd(i,o))&&(r.precision=a),Kd(r,o);case``:case`e`:case`g`:case`p`:case`r`:r.precision==null&&!isNaN(a=Xd(i,Math.max(Math.abs(e),Math.abs(t))))&&(r.precision=a-(r.type===`e`));break;case`f`:case`%`:r.precision==null&&!isNaN(a=Jd(i))&&(r.precision=a-(r.type===`%`)*2)}return Gd(r)}function gf(e){var t=e.domain;return e.ticks=function(e){var n=t();return Qi(n[0],n[n.length-1],e??10)},e.tickFormat=function(e,n){var r=t();return hf(r[0],r[r.length-1],e??10,n)},e.nice=function(n){n??=10;var r=t(),i=0,a=r.length-1,o=r[i],s=r[a],c,l,u=10;for(s<o&&(l=o,o=s,s=l,l=i,i=a,a=l);u-->0;){if(l=$i(o,s,n),l===c)return r[i]=o,r[a]=s,t(r);if(l>0)o=Math.floor(o/l)*l,s=Math.ceil(s/l)*l;else if(l<0)o=Math.ceil(o*l)/l,s=Math.floor(s*l)/l;else break;c=l}return e},e}function _f(){var e=mf();return e.copy=function(){return ff(e,_f())},Zd.apply(e,arguments),gf(e)}function vf(e,t){e=e.slice();var n=0,r=e.length-1,i=e[n],a=e[r],o;return a<i&&(o=n,n=r,r=o,o=i,i=a,a=o),e[n]=t.floor(i),e[r]=t.ceil(a),e}function yf(e){return Math.log(e)}function bf(e){return Math.exp(e)}function xf(e){return-Math.log(-e)}function Sf(e){return-Math.exp(-e)}function Cf(e){return isFinite(e)?+(`1e`+e):e<0?0:e}function wf(e){return e===10?Cf:e===Math.E?Math.exp:t=>e**+t}function Tf(e){return e===Math.E?Math.log:e===10&&Math.log10||e===2&&Math.log2||(e=Math.log(e),t=>Math.log(t)/e)}function Ef(e){return(t,n)=>-e(-t,n)}function Df(e){let t=e(yf,bf),n=t.domain,r=10,i,a;function o(){return i=Tf(r),a=wf(r),n()[0]<0?(i=Ef(i),a=Ef(a),e(xf,Sf)):e(yf,bf),t}return t.base=function(e){return arguments.length?(r=+e,o()):r},t.domain=function(e){return arguments.length?(n(e),o()):n()},t.ticks=e=>{let t=n(),o=t[0],s=t[t.length-1],c=s<o;c&&([o,s]=[s,o]);let l=i(o),u=i(s),d,f,p=e==null?10:+e,m=[];if(!(r%1)&&u-l<p){if(l=Math.floor(l),u=Math.ceil(u),o>0){for(;l<=u;++l)for(d=1;d<r;++d)if(f=l<0?d/a(-l):d*a(l),!(f<o)){if(f>s)break;m.push(f)}}else for(;l<=u;++l)for(d=r-1;d>=1;--d)if(f=l>0?d/a(-l):d*a(l),!(f<o)){if(f>s)break;m.push(f)}m.length*2<p&&(m=Qi(o,s,p))}else m=Qi(l,u,Math.min(u-l,p)).map(a);return c?m.reverse():m},t.tickFormat=(e,n)=>{if(e??=10,n??=r===10?`s`:`,`,typeof n!=`function`&&(!(r%1)&&(n=Nd(n)).precision==null&&(n.trim=!0),n=Gd(n)),e===1/0)return n;let o=Math.max(1,r*e/t.ticks().length);return e=>{let t=e/a(Math.round(i(e)));return t*r<r-.5&&(t*=r),t<=o?n(e):``}},t.nice=()=>n(vf(n(),{floor:e=>a(Math.floor(i(e))),ceil:e=>a(Math.ceil(i(e)))})),t}function Of(){let e=Df(pf()).domain([1,10]);return e.copy=()=>ff(e,Of()).base(e.base()),Zd.apply(e,arguments),e}function kf(e){return function(t){return Math.sign(t)*Math.log1p(Math.abs(t/e))}}function Af(e){return function(t){return Math.sign(t)*Math.expm1(Math.abs(t))*e}}function jf(e){var t=1,n=e(kf(t),Af(t));return n.constant=function(n){return arguments.length?e(kf(t=+n),Af(t)):t},gf(n)}function Mf(){var e=jf(pf());return e.copy=function(){return ff(e,Mf()).constant(e.constant())},Zd.apply(e,arguments)}function Nf(e){return function(t){return t<0?-((-t)**+e):t**+e}}function Pf(e){return e<0?-Math.sqrt(-e):Math.sqrt(e)}function Ff(e){return e<0?-e*e:e*e}function If(e){var t=e(sf,sf),n=1;function r(){return n===1?e(sf,sf):n===.5?e(Pf,Ff):e(Nf(n),Nf(1/n))}return t.exponent=function(e){return arguments.length?(n=+e,r()):n},gf(t)}function Lf(){var e=If(pf());return e.copy=function(){return ff(e,Lf()).exponent(e.exponent())},Zd.apply(e,arguments),e}function Rf(){return Lf.apply(null,arguments).exponent(.5)}var zf=new Date,Bf=new Date;function Vf(e,t,n,r){function i(t){return e(t=arguments.length===0?new Date:new Date(+t)),t}return i.floor=t=>(e(t=new Date(+t)),t),i.ceil=n=>(e(n=new Date(n-1)),t(n,1),e(n),n),i.round=e=>{let t=i(e),n=i.ceil(e);return e-t<n-e?t:n},i.offset=(e,n)=>(t(e=new Date(+e),n==null?1:Math.floor(n)),e),i.range=(n,r,a)=>{let o=[];if(n=i.ceil(n),a=a==null?1:Math.floor(a),!(n<r)||!(a>0))return o;let s;do o.push(s=new Date(+n)),t(n,a),e(n);while(s<n&&n<r);return o},i.filter=n=>Vf(t=>{if(t>=t)for(;e(t),!n(t);)t.setTime(t-1)},(e,r)=>{if(e>=e){if(r<0)for(;++r<=0;)for(;t(e,-1),!n(e););else for(;--r>=0;)for(;t(e,1),!n(e););}}),n&&(i.count=(t,r)=>(zf.setTime(+t),Bf.setTime(+r),e(zf),e(Bf),Math.floor(n(zf,Bf))),i.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?i.filter(r?t=>r(t)%e===0:t=>i.count(0,t)%e===0):i)),i}var Hf=6e4,Uf=Hf*60*24,Wf=Uf*7;Uf*30,Uf*365;var Gf=Vf(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*Hf)/Uf,e=>e.getDate()-1);Gf.range;var Kf=Vf(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/Uf,e=>e.getUTCDate()-1);Kf.range,Vf(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/Uf,e=>Math.floor(e/Uf)).range;function qf(e){return Vf(t=>{t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)},(e,t)=>{e.setDate(e.getDate()+t*7)},(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*Hf)/Wf)}var Jf=qf(0),Yf=qf(1),Xf=qf(2),Zf=qf(3),Qf=qf(4),$f=qf(5),ep=qf(6);Jf.range,Yf.range,Xf.range,Zf.range,Qf.range,$f.range,ep.range;function tp(e){return Vf(t=>{t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t*7)},(e,t)=>(t-e)/Wf)}var np=tp(0),rp=tp(1),ip=tp(2),ap=tp(3),op=tp(4),sp=tp(5),cp=tp(6);np.range,rp.range,ip.range,ap.range,op.range,sp.range,cp.range;var lp=Vf(e=>{e.setMonth(0,1),e.setHours(0,0,0,0)},(e,t)=>{e.setFullYear(e.getFullYear()+t)},(e,t)=>t.getFullYear()-e.getFullYear(),e=>e.getFullYear());lp.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:Vf(t=>{t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)},(t,n)=>{t.setFullYear(t.getFullYear()+n*e)}),lp.range;var up=Vf(e=>{e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCFullYear(e.getUTCFullYear()+t)},(e,t)=>t.getUTCFullYear()-e.getUTCFullYear(),e=>e.getUTCFullYear());up.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:Vf(t=>{t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,n)=>{t.setUTCFullYear(t.getUTCFullYear()+n*e)}),up.range;function dp(e){if(0<=e.y&&e.y<100){var t=new Date(-1,e.m,e.d,e.H,e.M,e.S,e.L);return t.setFullYear(e.y),t}return new Date(e.y,e.m,e.d,e.H,e.M,e.S,e.L)}function fp(e){if(0<=e.y&&e.y<100){var t=new Date(Date.UTC(-1,e.m,e.d,e.H,e.M,e.S,e.L));return t.setUTCFullYear(e.y),t}return new Date(Date.UTC(e.y,e.m,e.d,e.H,e.M,e.S,e.L))}function pp(e,t,n){return{y:e,m:t,d:n,H:0,M:0,S:0,L:0}}function mp(e){var t=e.dateTime,n=e.date,r=e.time,i=e.periods,a=e.days,o=e.shortDays,s=e.months,c=e.shortMonths,l=xp(i),u=Sp(i),d=xp(a),f=Sp(a),p=xp(o),m=Sp(o),h=xp(s),g=Sp(s),_=xp(c),v=Sp(c),y={a:N,A:P,b:F,B:I,c:null,d:Up,e:Up,f:Jp,g:am,G:sm,H:Wp,I:Gp,j:Kp,L:qp,m:Yp,M:Xp,p:L,q:R,Q:Am,s:jm,S:Zp,u:Qp,U:$p,V:tm,w:nm,W:rm,x:null,X:null,y:im,Y:om,Z:cm,"%":km},b={a:z,A:B,b:V,B:H,c:null,d:lm,e:lm,f:mm,g:Tm,G:Dm,H:um,I:dm,j:fm,L:pm,m:hm,M:gm,p:ee,q:te,Q:Am,s:jm,S:_m,u:vm,U:ym,V:xm,w:Sm,W:Cm,x:null,X:null,y:wm,Y:Em,Z:Om,"%":km},x={a:E,A:D,b:O,B:k,c:A,d:Np,e:Np,f:zp,g:kp,G:Op,H:Fp,I:Fp,j:Pp,L:Rp,m:Mp,M:Ip,p:T,q:jp,Q:Vp,s:Hp,S:Lp,u:wp,U:Tp,V:Ep,w:Cp,W:Dp,x:j,X:M,y:kp,Y:Op,Z:Ap,"%":Bp};y.x=S(n,y),y.X=S(r,y),y.c=S(t,y),b.x=S(n,b),b.X=S(r,b),b.c=S(t,b);function S(e,t){return function(n){var r=[],i=-1,a=0,o=e.length,s,c,l;for(n instanceof Date||(n=new Date(+n));++i<o;)e.charCodeAt(i)===37&&(r.push(e.slice(a,i)),(c=hp[s=e.charAt(++i)])==null?c=s===`e`?` `:`0`:s=e.charAt(++i),(l=t[s])&&(s=l(n,c)),r.push(s),a=i+1);return r.push(e.slice(a,i)),r.join(``)}}function C(e,t){return function(n){var r=pp(1900,void 0,1),i=w(r,e,n+=``,0),a,o;if(i!=n.length)return null;if(`Q`in r)return new Date(r.Q);if(`s`in r)return new Date(r.s*1e3+(`L`in r?r.L:0));if(t&&!(`Z`in r)&&(r.Z=0),`p`in r&&(r.H=r.H%12+r.p*12),r.m===void 0&&(r.m=`q`in r?r.q:0),`V`in r){if(r.V<1||r.V>53)return null;`w`in r||(r.w=1),`Z`in r?(a=fp(pp(r.y,0,1)),o=a.getUTCDay(),a=o>4||o===0?rp.ceil(a):rp(a),a=Kf.offset(a,(r.V-1)*7),r.y=a.getUTCFullYear(),r.m=a.getUTCMonth(),r.d=a.getUTCDate()+(r.w+6)%7):(a=dp(pp(r.y,0,1)),o=a.getDay(),a=o>4||o===0?Yf.ceil(a):Yf(a),a=Gf.offset(a,(r.V-1)*7),r.y=a.getFullYear(),r.m=a.getMonth(),r.d=a.getDate()+(r.w+6)%7)}else(`W`in r||`U`in r)&&(`w`in r||(r.w=`u`in r?r.u%7:+(`W`in r)),o=`Z`in r?fp(pp(r.y,0,1)).getUTCDay():dp(pp(r.y,0,1)).getDay(),r.m=0,r.d=`W`in r?(r.w+6)%7+r.W*7-(o+5)%7:r.w+r.U*7-(o+6)%7);return`Z`in r?(r.H+=r.Z/100|0,r.M+=r.Z%100,fp(r)):dp(r)}}function w(e,t,n,r){for(var i=0,a=t.length,o=n.length,s,c;i<a;){if(r>=o)return-1;if(s=t.charCodeAt(i++),s===37){if(s=t.charAt(i++),c=x[s in hp?t.charAt(i++):s],!c||(r=c(e,n,r))<0)return-1}else if(s!=n.charCodeAt(r++))return-1}return r}function T(e,t,n){var r=l.exec(t.slice(n));return r?(e.p=u.get(r[0].toLowerCase()),n+r[0].length):-1}function E(e,t,n){var r=p.exec(t.slice(n));return r?(e.w=m.get(r[0].toLowerCase()),n+r[0].length):-1}function D(e,t,n){var r=d.exec(t.slice(n));return r?(e.w=f.get(r[0].toLowerCase()),n+r[0].length):-1}function O(e,t,n){var r=_.exec(t.slice(n));return r?(e.m=v.get(r[0].toLowerCase()),n+r[0].length):-1}function k(e,t,n){var r=h.exec(t.slice(n));return r?(e.m=g.get(r[0].toLowerCase()),n+r[0].length):-1}function A(e,n,r){return w(e,t,n,r)}function j(e,t,r){return w(e,n,t,r)}function M(e,t,n){return w(e,r,t,n)}function N(e){return o[e.getDay()]}function P(e){return a[e.getDay()]}function F(e){return c[e.getMonth()]}function I(e){return s[e.getMonth()]}function L(e){return i[+(e.getHours()>=12)]}function R(e){return 1+~~(e.getMonth()/3)}function z(e){return o[e.getUTCDay()]}function B(e){return a[e.getUTCDay()]}function V(e){return c[e.getUTCMonth()]}function H(e){return s[e.getUTCMonth()]}function ee(e){return i[+(e.getUTCHours()>=12)]}function te(e){return 1+~~(e.getUTCMonth()/3)}return{format:function(e){var t=S(e+=``,y);return t.toString=function(){return e},t},parse:function(e){var t=C(e+=``,!1);return t.toString=function(){return e},t},utcFormat:function(e){var t=S(e+=``,b);return t.toString=function(){return e},t},utcParse:function(e){var t=C(e+=``,!0);return t.toString=function(){return e},t}}}var hp={"-":``,_:` `,0:`0`},gp=/^\s*\d+/,_p=/^%/,vp=/[\\^$*+?|[\]().{}]/g;function yp(e,t,n){var r=e<0?`-`:``,i=(r?-e:e)+``,a=i.length;return r+(a<n?Array(n-a+1).join(t)+i:i)}function bp(e){return e.replace(vp,`\\$&`)}function xp(e){return RegExp(`^(?:`+e.map(bp).join(`|`)+`)`,`i`)}function Sp(e){return new Map(e.map((e,t)=>[e.toLowerCase(),t]))}function Cp(e,t,n){var r=gp.exec(t.slice(n,n+1));return r?(e.w=+r[0],n+r[0].length):-1}function wp(e,t,n){var r=gp.exec(t.slice(n,n+1));return r?(e.u=+r[0],n+r[0].length):-1}function Tp(e,t,n){var r=gp.exec(t.slice(n,n+2));return r?(e.U=+r[0],n+r[0].length):-1}function Ep(e,t,n){var r=gp.exec(t.slice(n,n+2));return r?(e.V=+r[0],n+r[0].length):-1}function Dp(e,t,n){var r=gp.exec(t.slice(n,n+2));return r?(e.W=+r[0],n+r[0].length):-1}function Op(e,t,n){var r=gp.exec(t.slice(n,n+4));return r?(e.y=+r[0],n+r[0].length):-1}function kp(e,t,n){var r=gp.exec(t.slice(n,n+2));return r?(e.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function Ap(e,t,n){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(n,n+6));return r?(e.Z=r[1]?0:-(r[2]+(r[3]||`00`)),n+r[0].length):-1}function jp(e,t,n){var r=gp.exec(t.slice(n,n+1));return r?(e.q=r[0]*3-3,n+r[0].length):-1}function Mp(e,t,n){var r=gp.exec(t.slice(n,n+2));return r?(e.m=r[0]-1,n+r[0].length):-1}function Np(e,t,n){var r=gp.exec(t.slice(n,n+2));return r?(e.d=+r[0],n+r[0].length):-1}function Pp(e,t,n){var r=gp.exec(t.slice(n,n+3));return r?(e.m=0,e.d=+r[0],n+r[0].length):-1}function Fp(e,t,n){var r=gp.exec(t.slice(n,n+2));return r?(e.H=+r[0],n+r[0].length):-1}function Ip(e,t,n){var r=gp.exec(t.slice(n,n+2));return r?(e.M=+r[0],n+r[0].length):-1}function Lp(e,t,n){var r=gp.exec(t.slice(n,n+2));return r?(e.S=+r[0],n+r[0].length):-1}function Rp(e,t,n){var r=gp.exec(t.slice(n,n+3));return r?(e.L=+r[0],n+r[0].length):-1}function zp(e,t,n){var r=gp.exec(t.slice(n,n+6));return r?(e.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function Bp(e,t,n){var r=_p.exec(t.slice(n,n+1));return r?n+r[0].length:-1}function Vp(e,t,n){var r=gp.exec(t.slice(n));return r?(e.Q=+r[0],n+r[0].length):-1}function Hp(e,t,n){var r=gp.exec(t.slice(n));return r?(e.s=+r[0],n+r[0].length):-1}function Up(e,t){return yp(e.getDate(),t,2)}function Wp(e,t){return yp(e.getHours(),t,2)}function Gp(e,t){return yp(e.getHours()%12||12,t,2)}function Kp(e,t){return yp(1+Gf.count(lp(e),e),t,3)}function qp(e,t){return yp(e.getMilliseconds(),t,3)}function Jp(e,t){return qp(e,t)+`000`}function Yp(e,t){return yp(e.getMonth()+1,t,2)}function Xp(e,t){return yp(e.getMinutes(),t,2)}function Zp(e,t){return yp(e.getSeconds(),t,2)}function Qp(e){var t=e.getDay();return t===0?7:t}function $p(e,t){return yp(Jf.count(lp(e)-1,e),t,2)}function em(e){var t=e.getDay();return t>=4||t===0?Qf(e):Qf.ceil(e)}function tm(e,t){return e=em(e),yp(Qf.count(lp(e),e)+(lp(e).getDay()===4),t,2)}function nm(e){return e.getDay()}function rm(e,t){return yp(Yf.count(lp(e)-1,e),t,2)}function im(e,t){return yp(e.getFullYear()%100,t,2)}function am(e,t){return e=em(e),yp(e.getFullYear()%100,t,2)}function om(e,t){return yp(e.getFullYear()%1e4,t,4)}function sm(e,t){var n=e.getDay();return e=n>=4||n===0?Qf(e):Qf.ceil(e),yp(e.getFullYear()%1e4,t,4)}function cm(e){var t=e.getTimezoneOffset();return(t>0?`-`:(t*=-1,`+`))+yp(t/60|0,`0`,2)+yp(t%60,`0`,2)}function lm(e,t){return yp(e.getUTCDate(),t,2)}function um(e,t){return yp(e.getUTCHours(),t,2)}function dm(e,t){return yp(e.getUTCHours()%12||12,t,2)}function fm(e,t){return yp(1+Kf.count(up(e),e),t,3)}function pm(e,t){return yp(e.getUTCMilliseconds(),t,3)}function mm(e,t){return pm(e,t)+`000`}function hm(e,t){return yp(e.getUTCMonth()+1,t,2)}function gm(e,t){return yp(e.getUTCMinutes(),t,2)}function _m(e,t){return yp(e.getUTCSeconds(),t,2)}function vm(e){var t=e.getUTCDay();return t===0?7:t}function ym(e,t){return yp(np.count(up(e)-1,e),t,2)}function bm(e){var t=e.getUTCDay();return t>=4||t===0?op(e):op.ceil(e)}function xm(e,t){return e=bm(e),yp(op.count(up(e),e)+(up(e).getUTCDay()===4),t,2)}function Sm(e){return e.getUTCDay()}function Cm(e,t){return yp(rp.count(up(e)-1,e),t,2)}function wm(e,t){return yp(e.getUTCFullYear()%100,t,2)}function Tm(e,t){return e=bm(e),yp(e.getUTCFullYear()%100,t,2)}function Em(e,t){return yp(e.getUTCFullYear()%1e4,t,4)}function Dm(e,t){var n=e.getUTCDay();return e=n>=4||n===0?op(e):op.ceil(e),yp(e.getUTCFullYear()%1e4,t,4)}function Om(){return`+0000`}function km(){return`%`}function Am(e){return+e}function jm(e){return Math.floor(e/1e3)}var Mm,Nm;Pm({dateTime:`%x, %X`,date:`%-m/%-d/%Y`,time:`%-I:%M:%S %p`,periods:[`AM`,`PM`],days:[`Sunday`,`Monday`,`Tuesday`,`Wednesday`,`Thursday`,`Friday`,`Saturday`],shortDays:[`Sun`,`Mon`,`Tue`,`Wed`,`Thu`,`Fri`,`Sat`],months:[`January`,`February`,`March`,`April`,`May`,`June`,`July`,`August`,`September`,`October`,`November`,`December`],shortMonths:[`Jan`,`Feb`,`Mar`,`Apr`,`May`,`Jun`,`Jul`,`Aug`,`Sep`,`Oct`,`Nov`,`Dec`]});function Pm(e){return Mm=mp(e),Nm=Mm.format,Mm.parse,Mm.utcFormat,Mm.utcParse,Mm}function Fm(e){return function(){return e}}var Im=Math.abs,Lm=Math.atan2,Rm=Math.cos,zm=Math.max,Bm=Math.min,Vm=Math.sin,Hm=Math.sqrt,Um=Math.PI,Wm=Um/2,Gm=2*Um;function Km(e){return e>1?0:e<-1?Um:Math.acos(e)}function qm(e){return e>=1?Wm:e<=-1?-Wm:Math.asin(e)}function Jm(e){let t=3;return e.digits=function(n){if(!arguments.length)return t;if(n==null)t=null;else{let e=Math.floor(n);if(!(e>=0))throw RangeError(`invalid digits: ${n}`);t=e}return e},()=>new Bu(t)}function Ym(e){return e.innerRadius}function Xm(e){return e.outerRadius}function Zm(e){return e.startAngle}function Qm(e){return e.endAngle}function $m(e){return e&&e.padAngle}function eh(e,t,n,r,i,a,o,s){var c=n-e,l=r-t,u=o-i,d=s-a,f=d*c-u*l;if(!(f*f<1e-12))return f=(u*(t-a)-d*(e-i))/f,[e+f*c,t+f*l]}function th(e,t,n,r,i,a,o){var s=e-n,c=t-r,l=(o?a:-a)/Hm(s*s+c*c),u=l*c,d=-l*s,f=e+u,p=t+d,m=n+u,h=r+d,g=(f+m)/2,_=(p+h)/2,v=m-f,y=h-p,b=v*v+y*y,x=i-a,S=f*h-m*p,C=(y<0?-1:1)*Hm(zm(0,x*x*b-S*S)),w=(S*y-v*C)/b,T=(-S*v-y*C)/b,E=(S*y+v*C)/b,D=(-S*v+y*C)/b,O=w-g,k=T-_,A=E-g,j=D-_;return O*O+k*k>A*A+j*j&&(w=E,T=D),{cx:w,cy:T,x01:-u,y01:-d,x11:w*(i/x-1),y11:T*(i/x-1)}}function nh(){var e=Ym,t=Xm,n=Fm(0),r=null,i=Zm,a=Qm,o=$m,s=null,c=Jm(l);function l(){var l,u,d=+e.apply(this,arguments),f=+t.apply(this,arguments),p=i.apply(this,arguments)-Wm,m=a.apply(this,arguments)-Wm,h=Im(m-p),g=m>p;if(s||=l=c(),f<d&&(u=f,f=d,d=u),!(f>1e-12))s.moveTo(0,0);else if(h>Gm-1e-12)s.moveTo(f*Rm(p),f*Vm(p)),s.arc(0,0,f,p,m,!g),d>1e-12&&(s.moveTo(d*Rm(m),d*Vm(m)),s.arc(0,0,d,m,p,g));else{var _=p,v=m,y=p,b=m,x=h,S=h,C=o.apply(this,arguments)/2,w=C>1e-12&&(r?+r.apply(this,arguments):Hm(d*d+f*f)),T=Bm(Im(f-d)/2,+n.apply(this,arguments)),E=T,D=T,O,k;if(w>1e-12){var A=qm(w/d*Vm(C)),j=qm(w/f*Vm(C));(x-=A*2)>1e-12?(A*=g?1:-1,y+=A,b-=A):(x=0,y=b=(p+m)/2),(S-=j*2)>1e-12?(j*=g?1:-1,_+=j,v-=j):(S=0,_=v=(p+m)/2)}var M=f*Rm(_),N=f*Vm(_),P=d*Rm(b),F=d*Vm(b);if(T>1e-12){var I=f*Rm(v),L=f*Vm(v),R=d*Rm(y),z=d*Vm(y),B;if(h<Um){if(B=eh(M,N,R,z,I,L,P,F)){var V=M-B[0],H=N-B[1],ee=I-B[0],te=L-B[1],ne=1/Vm(Km((V*ee+H*te)/(Hm(V*V+H*H)*Hm(ee*ee+te*te)))/2),re=Hm(B[0]*B[0]+B[1]*B[1]);E=Bm(T,(d-re)/(ne-1)),D=Bm(T,(f-re)/(ne+1))}else E=D=0}}S>1e-12?D>1e-12?(O=th(R,z,M,N,f,D,g),k=th(I,L,P,F,f,D,g),s.moveTo(O.cx+O.x01,O.cy+O.y01),D<T?s.arc(O.cx,O.cy,D,Lm(O.y01,O.x01),Lm(k.y01,k.x01),!g):(s.arc(O.cx,O.cy,D,Lm(O.y01,O.x01),Lm(O.y11,O.x11),!g),s.arc(0,0,f,Lm(O.cy+O.y11,O.cx+O.x11),Lm(k.cy+k.y11,k.cx+k.x11),!g),s.arc(k.cx,k.cy,D,Lm(k.y11,k.x11),Lm(k.y01,k.x01),!g))):(s.moveTo(M,N),s.arc(0,0,f,_,v,!g)):s.moveTo(M,N),!(d>1e-12)||!(x>1e-12)?s.lineTo(P,F):E>1e-12?(O=th(P,F,I,L,d,-E,g),k=th(M,N,R,z,d,-E,g),s.lineTo(O.cx+O.x01,O.cy+O.y01),E<T?s.arc(O.cx,O.cy,E,Lm(O.y01,O.x01),Lm(k.y01,k.x01),!g):(s.arc(O.cx,O.cy,E,Lm(O.y01,O.x01),Lm(O.y11,O.x11),!g),s.arc(0,0,d,Lm(O.cy+O.y11,O.cx+O.x11),Lm(k.cy+k.y11,k.cx+k.x11),g),s.arc(k.cx,k.cy,E,Lm(k.y11,k.x11),Lm(k.y01,k.x01),!g))):s.arc(0,0,d,b,y,g)}if(s.closePath(),l)return s=null,l+``||null}return l.centroid=function(){var n=(+e.apply(this,arguments)+ +t.apply(this,arguments))/2,r=(+i.apply(this,arguments)+ +a.apply(this,arguments))/2-Um/2;return[Rm(r)*n,Vm(r)*n]},l.innerRadius=function(t){return arguments.length?(e=typeof t==`function`?t:Fm(+t),l):e},l.outerRadius=function(e){return arguments.length?(t=typeof e==`function`?e:Fm(+e),l):t},l.cornerRadius=function(e){return arguments.length?(n=typeof e==`function`?e:Fm(+e),l):n},l.padRadius=function(e){return arguments.length?(r=e==null?null:typeof e==`function`?e:Fm(+e),l):r},l.startAngle=function(e){return arguments.length?(i=typeof e==`function`?e:Fm(+e),l):i},l.endAngle=function(e){return arguments.length?(a=typeof e==`function`?e:Fm(+e),l):a},l.padAngle=function(e){return arguments.length?(o=typeof e==`function`?e:Fm(+e),l):o},l.context=function(e){return arguments.length?(s=e??null,l):s},l}Array.prototype.slice;function rh(e){return typeof e==`object`&&`length`in e?e:Array.from(e)}function ih(e){this._context=e}ih.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._context.lineTo(e,t)}}};function ah(e){return new ih(e)}function oh(e){return e[0]}function sh(e){return e[1]}function ch(e,t){var n=Fm(!0),r=null,i=ah,a=null,o=Jm(s);e=typeof e==`function`?e:e===void 0?oh:Fm(e),t=typeof t==`function`?t:t===void 0?sh:Fm(t);function s(s){var c,l=(s=rh(s)).length,u,d=!1,f;for(r??(a=i(f=o())),c=0;c<=l;++c)!(c<l&&n(u=s[c],c,s))===d&&((d=!d)?a.lineStart():a.lineEnd()),d&&a.point(+e(u,c,s),+t(u,c,s));if(f)return a=null,f+``||null}return s.x=function(t){return arguments.length?(e=typeof t==`function`?t:Fm(+t),s):e},s.y=function(e){return arguments.length?(t=typeof e==`function`?e:Fm(+e),s):t},s.defined=function(e){return arguments.length?(n=typeof e==`function`?e:Fm(!!e),s):n},s.curve=function(e){return arguments.length?(i=e,r!=null&&(a=i(r)),s):i},s.context=function(e){return arguments.length?(e==null?r=a=null:a=i(r=e),s):r},s}function lh(e,t,n){var r=null,i=Fm(!0),a=null,o=ah,s=null,c=Jm(l);e=typeof e==`function`?e:e===void 0?oh:Fm(+e),t=typeof t==`function`?t:Fm(t===void 0?0:+t),n=typeof n==`function`?n:n===void 0?sh:Fm(+n);function l(l){var u,d,f,p=(l=rh(l)).length,m,h=!1,g,_=Array(p),v=Array(p);for(a??(s=o(g=c())),u=0;u<=p;++u){if(!(u<p&&i(m=l[u],u,l))===h){if(h=!h)d=u,s.areaStart(),s.lineStart();else{for(s.lineEnd(),s.lineStart(),f=u-1;f>=d;--f)s.point(_[f],v[f]);s.lineEnd(),s.areaEnd()}}h&&(_[u]=+e(m,u,l),v[u]=+t(m,u,l),s.point(r?+r(m,u,l):_[u],n?+n(m,u,l):v[u]))}if(g)return s=null,g+``||null}function u(){return ch().defined(i).curve(o).context(a)}return l.x=function(t){return arguments.length?(e=typeof t==`function`?t:Fm(+t),r=null,l):e},l.x0=function(t){return arguments.length?(e=typeof t==`function`?t:Fm(+t),l):e},l.x1=function(e){return arguments.length?(r=e==null?null:typeof e==`function`?e:Fm(+e),l):r},l.y=function(e){return arguments.length?(t=typeof e==`function`?e:Fm(+e),n=null,l):t},l.y0=function(e){return arguments.length?(t=typeof e==`function`?e:Fm(+e),l):t},l.y1=function(e){return arguments.length?(n=e==null?null:typeof e==`function`?e:Fm(+e),l):n},l.lineX0=l.lineY0=function(){return u().x(e).y(t)},l.lineY1=function(){return u().x(e).y(n)},l.lineX1=function(){return u().x(r).y(t)},l.defined=function(e){return arguments.length?(i=typeof e==`function`?e:Fm(!!e),l):i},l.curve=function(e){return arguments.length?(o=e,a!=null&&(s=o(a)),l):o},l.context=function(e){return arguments.length?(e==null?a=s=null:s=o(a=e),l):a},l}function uh(e,t){return t<e?-1:t>e?1:t>=e?0:NaN}function dh(e){return e}function fh(){var e=dh,t=uh,n=null,r=Fm(0),i=Fm(Gm),a=Fm(0);function o(o){var s,c=(o=rh(o)).length,l,u,d=0,f=Array(c),p=Array(c),m=+r.apply(this,arguments),h=Math.min(Gm,Math.max(-Gm,i.apply(this,arguments)-m)),g,_=Math.min(Math.abs(h)/c,a.apply(this,arguments)),v=_*(h<0?-1:1),y;for(s=0;s<c;++s)(y=p[f[s]=s]=+e(o[s],s,o))>0&&(d+=y);for(t==null?n!=null&&f.sort(function(e,t){return n(o[e],o[t])}):f.sort(function(e,n){return t(p[e],p[n])}),s=0,u=d?(h-c*v)/d:0;s<c;++s,m=g)l=f[s],y=p[l],g=m+(y>0?y*u:0)+v,p[l]={data:o[l],index:s,value:y,startAngle:m,endAngle:g,padAngle:_};return p}return o.value=function(t){return arguments.length?(e=typeof t==`function`?t:Fm(+t),o):e},o.sortValues=function(e){return arguments.length?(t=e,n=null,o):t},o.sort=function(e){return arguments.length?(n=e,t=null,o):n},o.startAngle=function(e){return arguments.length?(r=typeof e==`function`?e:Fm(+e),o):r},o.endAngle=function(e){return arguments.length?(i=typeof e==`function`?e:Fm(+e),o):i},o.padAngle=function(e){return arguments.length?(a=typeof e==`function`?e:Fm(+e),o):a},o}var ph={draw(e,t){let n=Hm(t/Um);e.moveTo(n,0),e.arc(0,0,n,0,Gm)}},mh={draw(e,t){let n=Hm(t/5)/2;e.moveTo(-3*n,-n),e.lineTo(-n,-n),e.lineTo(-n,-3*n),e.lineTo(n,-3*n),e.lineTo(n,-n),e.lineTo(3*n,-n),e.lineTo(3*n,n),e.lineTo(n,n),e.lineTo(n,3*n),e.lineTo(-n,3*n),e.lineTo(-n,n),e.lineTo(-3*n,n),e.closePath()}},hh=Hm(1/3),gh=hh*2,_h={draw(e,t){let n=Hm(t/gh),r=n*hh;e.moveTo(0,-n),e.lineTo(r,0),e.lineTo(0,n),e.lineTo(-r,0),e.closePath()}},vh={draw(e,t){let n=Hm(t),r=-n/2;e.rect(r,r,n,n)}},yh=.8908130915292852,bh=Vm(Um/10)/Vm(7*Um/10),xh=Vm(Gm/10)*bh,Sh=-Rm(Gm/10)*bh,Ch={draw(e,t){let n=Hm(t*yh),r=xh*n,i=Sh*n;e.moveTo(0,-n),e.lineTo(r,i);for(let t=1;t<5;++t){let a=Gm*t/5,o=Rm(a),s=Vm(a);e.lineTo(s*n,-o*n),e.lineTo(o*r-s*i,s*r+o*i)}e.closePath()}},wh=Hm(3),Th={draw(e,t){let n=-Hm(t/(wh*3));e.moveTo(0,n*2),e.lineTo(-wh*n,-n),e.lineTo(wh*n,-n),e.closePath()}},Eh=Hm(3),Dh={draw(e,t){let n=Hm(t)*.6824,r=n/2,i=n*Eh/2;e.moveTo(0,-n),e.lineTo(i,r),e.lineTo(-i,r),e.closePath()}};function Oh(e,t){let n=null,r=Jm(i);e=typeof e==`function`?e:Fm(e||ph),t=typeof t==`function`?t:Fm(t===void 0?64:+t);function i(){let i;if(n||=i=r(),e.apply(this,arguments).draw(n,+t.apply(this,arguments)),i)return n=null,i+``||null}return i.type=function(t){return arguments.length?(e=typeof t==`function`?t:Fm(t),i):e},i.size=function(e){return arguments.length?(t=typeof e==`function`?e:Fm(+e),i):t},i.context=function(e){return arguments.length?(n=e??null,i):n},i}function kh(e,t,n){e._context.bezierCurveTo((2*e._x0+e._x1)/3,(2*e._y0+e._y1)/3,(e._x0+2*e._x1)/3,(e._y0+2*e._y1)/3,(e._x0+4*e._x1+t)/6,(e._y0+4*e._y1+n)/6)}function Ah(e){this._context=e}Ah.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:kh(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1)}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:kh(this,e,t)}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function jh(e){return new Ah(e)}function Mh(e,t,n){e._context.bezierCurveTo(e._x1+e._k*(e._x2-e._x0),e._y1+e._k*(e._y2-e._y0),e._x2+e._k*(e._x1-t),e._y2+e._k*(e._y1-n),e._x2,e._y2)}function Nh(e,t){this._context=e,this._k=(1-t)/6}Nh.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:Mh(this,this._x1,this._y1)}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2,this._x1=e,this._y1=t;break;case 2:this._point=3;default:Mh(this,e,t)}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};var Ph=(function e(t){function n(e){return new Nh(e,t)}return n.tension=function(t){return e(+t)},n})(0);function Fh(e,t,n){var r=e._x1,i=e._y1,a=e._x2,o=e._y2;if(e._l01_a>1e-12){var s=2*e._l01_2a+3*e._l01_a*e._l12_a+e._l12_2a,c=3*e._l01_a*(e._l01_a+e._l12_a);r=(r*s-e._x0*e._l12_2a+e._x2*e._l01_2a)/c,i=(i*s-e._y0*e._l12_2a+e._y2*e._l01_2a)/c}if(e._l23_a>1e-12){var l=2*e._l23_2a+3*e._l23_a*e._l12_a+e._l12_2a,u=3*e._l23_a*(e._l23_a+e._l12_a);a=(a*l+e._x1*e._l23_2a-t*e._l12_2a)/u,o=(o*l+e._y1*e._l23_2a-n*e._l12_2a)/u}e._context.bezierCurveTo(r,i,a,o,e._x2,e._y2)}function Ih(e,t){this._context=e,this._alpha=t}Ih.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2)}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){if(e=+e,t=+t,this._point){var n=this._x2-e,r=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=(n*n+r*r)**+this._alpha)}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3;default:Fh(this,e,t)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};var Lh=(function e(t){function n(e){return t?new Ih(e,t):new Nh(e,0)}return n.alpha=function(t){return e(+t)},n})(.5);function Rh(e){return e<0?-1:1}function zh(e,t,n){var r=e._x1-e._x0,i=t-e._x1,a=(e._y1-e._y0)/(r||i<0&&-0),o=(n-e._y1)/(i||r<0&&-0),s=(a*i+o*r)/(r+i);return(Rh(a)+Rh(o))*Math.min(Math.abs(a),Math.abs(o),.5*Math.abs(s))||0}function Bh(e,t){var n=e._x1-e._x0;return n?(3*(e._y1-e._y0)/n-t)/2:t}function Vh(e,t,n){var r=e._x0,i=e._y0,a=e._x1,o=e._y1,s=(a-r)/3;e._context.bezierCurveTo(r+s,i+s*t,a-s,o-s*n,a,o)}function Hh(e){this._context=e}Hh.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:Vh(this,this._t0,Bh(this,this._t0))}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){var n=NaN;if(e=+e,t=+t,e!==this._x1||t!==this._y1){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,Vh(this,Bh(this,n=zh(this,e,t)),n);break;default:Vh(this,this._t0,n=zh(this,e,t))}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=n}}},Object.create(Hh.prototype).point=function(e,t){Hh.prototype.point.call(this,t,e)};function Uh(e){return new Hh(e)}function Wh(e,t){this._context=e,this._t=t}Wh.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&this._point===2&&this._context.lineTo(this._x,this._y),(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:if(this._t<=0)this._context.lineTo(this._x,t),this._context.lineTo(e,t);else{var n=this._x*(1-this._t)+e*this._t;this._context.lineTo(n,this._y),this._context.lineTo(n,t)}}this._x=e,this._y=t}};function Gh(e){return new Wh(e,.5)}function Kh(e){return new Wh(e,0)}function qh(e){return new Wh(e,1)}function Jh(e,t){if((o=e.length)>1)for(var n=1,r,i,a=e[t[0]],o,s=a.length;n<o;++n)for(i=a,a=e[t[n]],r=0;r<s;++r)a[r][1]+=a[r][0]=isNaN(i[r][1])?i[r][0]:i[r][1]}function Yh(e){for(var t=e.length,n=Array(t);--t>=0;)n[t]=t;return n}function Xh(e,t){return e[t]}function Zh(e){let t=[];return t.key=e,t}function Qh(){var e=Fm([]),t=Yh,n=Jh,r=Xh;function i(i){var a=Array.from(e.apply(this,arguments),Zh),o,s=a.length,c=-1,l;for(let e of i)for(o=0,++c;o<s;++o)(a[o][c]=[0,+r(e,a[o].key,c,i)]).data=e;for(o=0,l=rh(t(a));o<s;++o)a[l[o]].index=o;return n(a,l),a}return i.keys=function(t){return arguments.length?(e=typeof t==`function`?t:Fm(Array.from(t)),i):e},i.value=function(e){return arguments.length?(r=typeof e==`function`?e:Fm(+e),i):r},i.order=function(e){return arguments.length?(t=e==null?Yh:typeof e==`function`?e:Fm(Array.from(e)),i):t},i.offset=function(e){return arguments.length?(n=e??Jh,i):n},i}function $h(e,t){if((c=e.length)>0)for(var n,r=0,i,a,o,s,c,l=e[t[0]].length;r<l;++r)for(o=s=0,n=0;n<c;++n)(a=(i=e[t[n]][r])[1]-i[0])>0?(i[0]=o,i[1]=o+=a):a<0?(i[1]=s,i[0]=s+=a):(i[0]=0,i[1]=a)}function eg(e,t,n){this.k=e,this.x=t,this.y=n}eg.prototype={constructor:eg,scale:function(e){return e===1?this:new eg(this.k*e,this.x,this.y)},translate:function(e,t){return e===0&t===0?this:new eg(this.k,this.x+this.k*e,this.y+this.k*t)},apply:function(e){return[e[0]*this.k+this.x,e[1]*this.k+this.y]},applyX:function(e){return e*this.k+this.x},applyY:function(e){return e*this.k+this.y},invert:function(e){return[(e[0]-this.x)/this.k,(e[1]-this.y)/this.k]},invertX:function(e){return(e-this.x)/this.k},invertY:function(e){return(e-this.y)/this.k},rescaleX:function(e){return e.copy().domain(e.range().map(this.invertX,this).map(e.invert,e))},rescaleY:function(e){return e.copy().domain(e.range().map(this.invertY,this).map(e.invert,e))},toString:function(){return`translate(`+this.x+`,`+this.y+`) scale(`+this.k+`)`}};var tg=new eg(1,0,0);ng.prototype=eg.prototype;function ng(e){for(;!e.__zoom;)if(!(e=e.parentNode))return tg;return e.__zoom}function rg(e,t){if(!e)throw Error(`[d3-blueprint] ${t}`)}var ig=class{properties=new Map;define(e,t){rg(!this.properties.has(e),`config "${e}" is already defined`);let{defaultValue:n,getter:r,setter:i}=t,a=i?i(n):n;return this.properties.set(e,{value:a,getter:r,setter:i}),this}get(e){let{value:t,getter:n}=this.getProperty(e);return n?n(t):t}set(e,t){let n=this.getProperty(e);return n.value=n.setter?n.setter(t):t,this}setBatch(e){for(let[t,n]of Object.entries(e))this.set(t,n);return this}getAll(){let e={};for(let[t]of this.properties)e[t]=this.get(t);return e}has(e){return this.properties.has(e)}getProperty(e){let t=this.properties.get(e);return rg(t,`config "${e}" is not defined`),t}},ag=[`update`,`enter`,`merge`,`exit`],og=new Set([...ag,...ag.map(e=>`${e}:transition`)]);function sg(e){return og.has(e)}function cg(e){rg(sg(e),`"${e}" is not a valid lifecycle event. Expected one of: ${[...og].join(`, `)}`)}function lg(e,t,n){let r=e.exit(),i={update:e,enter:t,merge:t.merge(e),exit:r};return ag.map(e=>({name:e,selection:i[e],handlers:n.get(e)??[],transitionHandlers:n.get(`${e}:transition`)??[]}))}function ug(e,t){for(let n of t)n(e)}function dg(e,t){return t.map(t=>{let n=e.transition();return t(n),fg(n)})}function fg(e){return e.end().then(()=>void 0,()=>void 0)}var pg=class{base;dataBindFn;insertFn;handlers=new Map;constructor(e,t){if(this.base=e,this.dataBindFn=t.dataBind,this.insertFn=t.insert,t.events)for(let[e,n]of Object.entries(t.events))n&&this.on(e,n)}on(e,t){cg(e);let n=this.handlers.get(e)??[];return n.push(t),this.handlers.set(e,n),this}off(e,t){if(cg(e),!t)return this.handlers.delete(e),this;let n=this.handlers.get(e);if(n){let e=n.indexOf(t);e!==-1&&n.splice(e,1)}return this}draw(e){let t=this.dataBindFn(this.base,e),n=t.enter(),r=lg(t,this.insertFn(n),this.handlers),i=[];for(let e of r){ug(e.selection,e.handlers);let t=dg(e.selection,e.transitionHandlers);i.push(...t)}return Promise.all(i).then(()=>void 0)}};function mg(e,t,n,r){if(n&&r){let i=new pg(n,r);return e.set(t,i),i}let i=e.get(t);if(!i)throw Error(`[d3-blueprint] layer "${t}" is not defined`);return i}function hg(e,t,n,r){return typeof n==`string`&&r===void 0?e.get(n):typeof n==`string`?(e.set(n,r),t):(e.setBatch(n),t)}function gg(e,t){let n=[];for(let r of e.values())n.push(r.draw(t));return n}function _g(e,t){let n=[];for(let r of e.values()){let e=r.draw(t);e&&n.push(e)}return n}var vg=[`preDraw`,`postDraw`,`postTransition`],yg=class{base;layers=new Map;attachments=new Map;configs=new ig;dispatcher;attached=new Proxy({},{get:(e,t)=>{let n=this.attachments.get(t);if(!n)throw Error(`[d3-blueprint] attachment "${t}" is not defined`);return n},has:(e,t)=>this.attachments.has(t)});constructor(e){this.base=e,this.dispatcher=Sa(...vg),this.initialize()}initialize(){}transform(e){return e}preDraw(e){}postDraw(e){}postTransition(e){}layer(e,t,n){return mg(this.layers,e,t,n)}attach(e,t,n){if(n!==void 0){let r=t;this.attachments.set(e,new r(n))}else this.attachments.set(e,t);return this}config(e,t){return hg(this.configs,this,e,t)}configDefine(e,t){return this.configs.define(e,t),this}on(e,t){return this.dispatcher.on(e,t),this}off(e){return this.dispatcher.on(e,null),this}use(e,t){let n=t||e.name||`plugin`;if(e.install(this),e.preDraw&&this.on(`preDraw.${n}`,t=>e.preDraw(this,t)),e.postDraw&&this.on(`postDraw.${n}`,t=>e.postDraw(this,t)),e.postTransition&&this.on(`postTransition.${n}`,t=>e.postTransition(this,t)),e.destroy){let t=this.destroy.bind(this);this.destroy=()=>{e.destroy(this),t()}}return this}async draw(e){let t=this.transform(e);this.preDraw(t),this.dispatcher.call(`preDraw`,this,t);let n=gg(this.layers,t),r=_g(this.attachments,t);this.postDraw(t),this.dispatcher.call(`postDraw`,this,t),await Promise.all([...n,...r]),this.postTransition(t),this.dispatcher.call(`postTransition`,this,t)}destroy(){this.layers.clear(),this.attachments.clear()}},bg=class extends yg{initialize(){let e=this.base.append(`div`).attr(`class`,`bc-frame`),t=e.append(`div`).attr(`class`,`bc-frame-header`);e.append(`div`).attr(`class`,`bc-frame-body`),e.append(`p`).attr(`class`,`bc-frame-note`);let n=e.append(`div`).attr(`class`,`bc-frame-footer`).style(`display`,`flex`).style(`justify-content`,`space-between`).style(`align-items`,`center`).style(`flex-wrap`,`wrap`).style(`gap`,`0.25rem 1rem`),r=n.append(`div`).attr(`class`,`bc-frame-footer-left`).style(`display`,`flex`).style(`flex-wrap`,`wrap`).style(`gap`,`0.25rem 0.75rem`),i=n.append(`div`).attr(`class`,`bc-frame-footer-right`).style(`display`,`flex`).style(`align-items`,`center`);this.layer(`headerItems`,t,{dataBind:(e,t)=>e.selectAll(`.bc-frame-header-item`).data(t.headerItems,e=>e.className),insert:e=>e.append(e=>document.createElement(e.tag)),events:{enter:e=>{e.attr(`class`,e=>e.className).text(e=>e.text)},merge:e=>{e.attr(`class`,e=>e.className).text(e=>e.text)},exit:e=>{e.remove()}}}),this.layer(`footerLeftItems`,r,{dataBind:(e,t)=>e.selectAll(`.bc-frame-footer-item`).data(t.footerLeftItems,e=>e.className),insert:e=>e.append(e=>document.createElement(e.tag)),events:{enter:e=>{e.attr(`class`,e=>e.className).each(function(e){if(this.textContent=``,e.prefix){let t=document.createElement(`span`);t.className=`bc-frame-source-prefix`,t.textContent=e.prefix,this.appendChild(t)}if(e.href){let t=document.createElement(`a`);t.className=`bc-frame-source-link`,t.href=e.href,t.textContent=e.text,this.appendChild(t)}else this.appendChild(document.createTextNode(e.text))})},merge:e=>{e.attr(`class`,e=>e.className).each(function(e){if(this.textContent=``,e.prefix){let t=document.createElement(`span`);t.className=`bc-frame-source-prefix`,t.textContent=e.prefix,this.appendChild(t)}if(e.href){let t=document.createElement(`a`);t.className=`bc-frame-source-link`,t.href=e.href,t.textContent=e.text,this.appendChild(t)}else this.appendChild(document.createTextNode(e.text))})},exit:e=>{e.remove()}}}),this.layer(`footerRightItems`,i,{dataBind:(e,t)=>e.selectAll(`.bc-frame-footer-item`).data(t.footerRightItems,e=>e.className),insert:e=>e.append(e=>document.createElement(e.tag)),events:{enter:e=>{e.attr(`class`,e=>e.className).each(function(e){if(e.html){let t=document.createRange().createContextualFragment(e.html);this.appendChild(t)}else this.textContent=e.text}),e.filter(e=>!!e.href).attr(`href`,e=>e.href),e.filter(e=>!!e.target).attr(`target`,e=>e.target),e.filter(e=>!!e.rel).attr(`rel`,e=>e.rel)},merge:e=>{e.attr(`class`,e=>e.className).each(function(e){if(this.textContent=``,e.html){let t=document.createRange().createContextualFragment(e.html);this.appendChild(t)}else this.textContent=e.text}),e.filter(e=>!!e.href).attr(`href`,e=>e.href),e.filter(e=>!!e.target).attr(`target`,e=>e.target),e.filter(e=>!!e.rel).attr(`rel`,e=>e.rel)},exit:e=>{e.remove()}}})}};function xg(e){let t=[];return e.title&&t.push({tag:`h3`,className:`bc-frame-title`,text:e.title}),e.description&&t.push({tag:`p`,className:`bc-frame-description`,text:e.description}),t}function Sg(e){let t=[];return e.byline&&t.push({tag:`span`,className:`bc-frame-byline`,text:e.byline}),e.source&&t.push({tag:`span`,className:`bc-frame-source`,text:e.source,prefix:`Source: `,href:e.sourceUrl||void 0}),t}function Cg(){return[{tag:`a`,className:`bc-frame-credit`,text:`Blueprint Chart`,html:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 48.042969 90.607422" width="10" height="18" style="vertical-align:-3px;margin-right:3px"><path fill="currentColor" opacity="0.55" d="M 20.042969 34.607422 A 28 28 0 0 1 23.072266 34.779297 A 28 28 0 0 0 20.042969 34.607422 z M 23.34375 34.810547 A 28 28 0 0 1 26.171875 35.292969 A 28 28 0 0 0 23.34375 34.810547 z M 16.570312 34.84375 A 28 28 0 0 0 15.474609 35.033203 A 28 28 0 0 1 16.570312 34.84375 z M 26.390625 35.341797 A 28 28 0 0 1 29.316406 36.189453 A 28 28 0 0 0 26.390625 35.341797 z M 13.128906 35.511719 A 28 28 0 0 0 11.904297 35.873047 A 28 28 0 0 1 13.128906 35.511719 z M 29.373047 36.210938 A 28 28 0 0 1 32.103516 37.347656 A 28 28 0 0 0 29.373047 36.210938 z M 9.7832031 36.609375 A 28 28 0 0 0 8.5820312 37.117188 A 28 28 0 0 1 9.7832031 36.609375 z M 32.392578 37.486328 A 28 28 0 0 1 34.939453 38.90625 A 28 28 0 0 0 32.392578 37.486328 z M 6.5742188 38.128906 A 28 28 0 0 0 5.4511719 38.765625 A 28 28 0 0 1 6.5742188 38.128906 z M 35.041016 38.966797 A 28 28 0 0 1 37.523438 40.738281 A 28 28 0 0 0 35.041016 38.966797 z M 3.5273438 40.080078 A 28 28 0 0 0 2.5761719 40.771484 A 28 28 0 0 1 3.5273438 40.080078 z M 37.658203 40.851562 A 28 28 0 0 1 39.804688 42.783203 A 28 28 0 0 0 37.658203 40.851562 z M 40.011719 42.990234 A 28 28 0 0 1 42.013672 45.251953 A 28 28 0 0 0 40.011719 42.990234 z M 42.013672 45.251953 A 28 28 0 0 1 20.042969 56 A 28 28 0 0 1 14.232422 55.3125 A 16 16 0 0 1 16 62.607422 A 16 16 0 0 1 0 78.607422 L 0 82.121094 A 28 28 0 0 0 20.042969 90.607422 A 28 28 0 0 0 48.042969 62.607422 A 28 28 0 0 0 42.013672 45.251953 z M 1.3007812 46.667969 A 16 16 0 0 1 1.6191406 46.697266 A 16 16 0 0 0 1.3007812 46.667969 z M 4.2558594 47.189453 A 16 16 0 0 1 4.4355469 47.242188 A 16 16 0 0 0 4.2558594 47.189453 z "/><path fill="currentColor" opacity="0.85" d="M 6.0637516 38.376047 A 28 28 0 0 1 20.042969 34.615234 A 28 28 0 0 1 42.013672 45.259765 A 28 28 0 0 0 48.042969 28.007812 A 28 28 0 0 0 20.042969 0.0078125 A 28 28 0 0 0 0 8.4941407 L 0 16.007812 A 12 12 0 0 1 12 28.007812 A 12 12 0 0 1 6.0613693 38.364443 "/><path fill="currentColor" d="M 20.042969 34.607422 A 28 28 0 0 0 5.0878906 38.970703 A 28 28 0 0 1 6.0644531 38.376953 L 6.0605469 38.365234 A 12 12 0 0 1 0 40.007812 L 0 43.09375 L 0 43.101562 L 0 46.607422 A 16 16 0 0 1 2.8847656 46.873047 A 16 16 0 0 1 2.9199219 46.878906 A 16 16 0 0 1 5.7011719 47.662109 A 16 16 0 0 1 5.7324219 47.673828 A 16 16 0 0 1 8.3300781 48.955078 A 16 16 0 0 1 8.3398438 48.958984 A 16 16 0 0 1 8.3457031 48.962891 A 16 16 0 0 1 10.662109 50.6875 A 16 16 0 0 1 10.697266 50.71875 A 16 16 0 0 1 12.660156 52.837891 A 16 16 0 0 1 12.667969 52.845703 A 16 16 0 0 1 12.673828 52.855469 A 16 16 0 0 1 14.228516 55.306641 A 16 16 0 0 1 14.232422 55.3125 A 28 28 0 0 0 20.042969 56 A 28 28 0 0 0 42.013672 45.251953 A 28 28 0 0 0 20.042969 34.607422 z M 4.7695312 39.177734 A 28 28 0 0 0 2.5390625 40.798828 A 28 28 0 0 1 4.7695312 39.177734 z M 2.1816406 41.091797 A 28 28 0 0 0 0.11914062 42.984375 A 28 28 0 0 1 2.1816406 41.091797 z "/></svg>Blueprint Chart`,href:`/`,target:`_blank`,rel:`noopener noreferrer`}]}var wg=80,Tg=`.bc-frame-title, .bc-frame-description`;function Eg(e){let t=getComputedStyle(e),n=parseFloat(t.lineHeight);return Number.isFinite(n)?n:parseFloat(t.fontSize)*1.2}function Dg(e){e.querySelectorAll(Tg).forEach(e=>{e.style.removeProperty(`display`),e.style.removeProperty(`-webkit-box-orient`),e.style.removeProperty(`-webkit-line-clamp`),e.style.removeProperty(`overflow`)})}function Og(e,t){let n=[...e.querySelectorAll(Tg)],r=t-(e.offsetHeight-n.reduce((e,t)=>e+t.offsetHeight,0));for(let e of n){let t=Math.floor(r/Eg(e));if(t<1){e.style.display=`none`;continue}e.style.display=`-webkit-box`,e.style.setProperty(`-webkit-box-orient`,`vertical`),e.style.setProperty(`-webkit-line-clamp`,String(t)),e.style.overflow=`hidden`,r-=e.offsetHeight}}function kg(e){let[t,n=t,r=t,i=n]=e.trim().split(/\s+/);return[t,n,r,i]}function Ag(e,t){if(t===null)return{wrapper:e,header:e,body:e,footer:e};let n=t??{};new bg(Q(e)).draw({headerItems:xg(n),footerLeftItems:Sg(n),footerRightItems:Cg()});let r=e.querySelector(`.bc-frame`),i=r.querySelector(`.bc-frame-header`),a=r.querySelector(`.bc-frame-body`),o=r.querySelector(`.bc-frame-note`),s=r.querySelector(`.bc-frame-footer`);if(n.padding){r.style.setProperty(`--bc-frame-padding`,n.padding);let[e,t,i,a]=kg(n.padding);r.style.setProperty(`--bc-frame-padding-top`,e),r.style.setProperty(`--bc-frame-padding-right`,t),r.style.setProperty(`--bc-frame-padding-bottom`,i),r.style.setProperty(`--bc-frame-padding-left`,a)}if(n.transparentBackground&&r.style.setProperty(`--bc-frame-bg`,`transparent`),n.note?o.textContent=n.note:o.style.display=`none`,e.isConnected){Dg(i);let t=getComputedStyle(e),n=t.aspectRatio&&t.aspectRatio!==`auto`&&t.aspectRatio!==``,c=t.display===`flex`&&t.flexDirection===`column`;if(n||c){let t=i.offsetHeight,n=s.offsetHeight,c=o.style.display===`none`?0:o.offsetHeight,l=e.clientHeight-n-c-wg;t>l&&(Og(i,l),t=i.offsetHeight),r.classList.add(`bc-frame--constrained`),a.dataset.headerH=String(t);let u=e;a.dataset.footerH=String(u.__bcFooterH??n+c),requestAnimationFrame(()=>{u.__bcFooterH=s.offsetHeight+(o.style.display===`none`?0:o.offsetHeight)})}}return{wrapper:r,header:i,body:a,footer:s}}function jg(e){return e&&(e.startsWith(`(`)&&e.endsWith(`)`)?e.slice(0,-1):e)}function Mg(e){if(!e)return{prefix:``,d3Spec:``,suffix:``};if(e.includes(`|`)){let t=e.split(`|`);return{prefix:t[0]??``,d3Spec:jg(t[1]??``),suffix:t[2]??``}}return{prefix:``,d3Spec:jg(e),suffix:``}}function Ng(e){if(!e)return null;let{prefix:t,d3Spec:n,suffix:r}=Mg(e);if(!n)return null;let i=Gd(n);return!t&&!r?i:e=>`${t}${i(e)}${r}`}function Pg(e,t){return!Number.isFinite(t)||t<=0?`0%`:`${Math.round(e/t*100)}%`}var Fg=`http://www.w3.org/2000/svg`,Ig=`system-ui, -apple-system, sans-serif`,Lg=/[\u1100-\u115f\u2e80-\ua4cf\ua960-\ua97f\uac00-\ud7a3\uf900-\ufaff\ufe10-\ufe19\ufe30-\ufe6f\uff00-\uff60\uffe0-\uffe6]/,Rg=1,zg=.5,Bg=null,Vg=null;function Hg(e,t){let n=0;for(let t of e)n+=Lg.test(t)?Rg:zg;return n*t}function Ug(){if(typeof document>`u`)return null;if(Vg!==document){Vg=document;try{Bg=document.createElement(`canvas`).getContext(`2d`)}catch{Bg=null}}return Bg}function Wg(e,t){let n=Ug();if(!n)return null;n.font=`${t}px ${Ig}`;let r=n.measureText(e).width;return r>0?r:null}function Gg(e,t){if(typeof document>`u`||typeof document.createElementNS!=`function`)return null;let n=document.createElementNS(Fg,`svg`),r=document.createElementNS(Fg,`text`);if(r.setAttribute(`font-size`,String(t)),r.textContent=e,n.appendChild(r),typeof r.getComputedTextLength!=`function`)return null;let i=r.getComputedTextLength();return i>0?i:null}function Kg(e,t){if(e===``)return 0;let n=Wg(e,t)??Gg(e,t)??0;return Math.max(n,Hg(e,t))}function qg(e,t){let n=0;for(let r of e){let e=Kg(r,t);e>n&&(n=e)}return n}function Jg(e,t,n,r=`…`){if(Kg(e,n)<=t)return e;let i=[...e],a=Kg(r,n),o=i.length;for(;o>1&&Kg(i.slice(0,o).join(``),n)+a>t;)o--;return i.slice(0,o).join(``)+r}function Yg(e,t){if(!e)return;let n=e.stableTop??e.top,r=t.stableTop??t.top;return{dx:e.left-t.left,dy:n-r}}var Xg={top:12,right:20,bottom:24,left:50},Zg=10,Qg=.25;function $g(e,t,n){let r=t+n,i=e*Qg;if(r<=0||e-r>=i)return[t,n];let a=Math.max(0,e-i)/r;return[t*a,n*a]}var e_=class extends yg{initialize(){this.configDefine(`totalWidth`,{defaultValue:600}),this.configDefine(`totalHeight`,{defaultValue:400}),this.layer(`svg`,this.base,{dataBind:(e,t)=>e.selectAll(`svg`).data(t),insert:e=>e.append(`svg`),events:{enter:e=>{let t=this.config(`totalWidth`),n=this.config(`totalHeight`);e.attr(`width`,t).attr(`height`,n).append(`g`).attr(`transform`,e=>`translate(${e.left},${e.top})`)}}})}},t_=400,n_=2,r_=2,i_=9;function a_(e,t,n,r){let[i,a]=Ei(e,t,r);return o_(r===`log`?Mf().domain([i,a]).nice():_f().domain([i,a]).nice(),n)}function o_(e,t){let n=e.ticks(),r=t?Ng(t)??e.tickFormat():e.tickFormat(),i=n.map(e=>r(e));return i.length===0?0:Math.ceil(qg(i,Zg))+r_+i_}function s_(e){return e.length===0?0:Math.ceil(qg(e,Zg))+r_+i_}function c_(e,t,n,r,i,a){let o={},s=i??50,c=r??`left`,l=t??`auto`,u=l===`auto`?e>0&&e<t_?`inside`:`outside`:l,d=u===`inside`,f=u===`off`;return c===`right`?(o.left=0,o.right=d?n_:f?0:s):(o.right=a===!1?0:15,o.left=d?n_:f?0:s),d&&(o.top=35),(n===`inside`||n===`off`)&&(o.bottom=5),o}function l_(e,t){return parseFloat(e.dataset[t]??``)||0}function u_(e){let t=e.getBoundingClientRect(),n=e.offsetWidth>0&&(Math.abs(t.width-e.offsetWidth)>=1||Math.abs(t.height-e.offsetHeight)>=1),r=n?e.clientWidth:t.width,i=n?e.clientHeight:t.height,a=getComputedStyle(e),o=r-(parseFloat(a.paddingLeft)||0)-(parseFloat(a.paddingRight)||0),s=i-(parseFloat(a.paddingTop)||0)-(parseFloat(a.paddingBottom)||0);return{width:o>0?o:l_(e,`bcContentWidth`),height:s>0?s:l_(e,`bcContentHeight`)}}function d_(e,t){let n=t.closest(`.bc-frame`);if(!n||n.style.getPropertyValue(`--bc-frame-bg`).trim()===`transparent`)return;e.querySelector(`.bc-canvas-bg`)?.remove();let r=e.ownerDocument.createElementNS(`http://www.w3.org/2000/svg`,`rect`);r.setAttribute(`class`,`bc-canvas-bg`),r.setAttribute(`width`,`100%`),r.setAttribute(`height`,`100%`),r.setAttribute(`fill`,Er(n)),e.insertBefore(r,e.firstChild)}function f_(e,t){let n={...Xg,...t},r=e.closest(`.bc-frame--constrained`)!=null;if(r){let t=parseFloat(e.dataset.headerH||`0`),r=parseFloat(e.dataset.footerH||`0`),i=n.top;n.top=t+i,n.bottom+=r,n.stableTop=i}let i=u_(e),a=i.width>0?i.width:600,o=i.height>0?i.height:400;[n.left,n.right]=$g(a,n.left,n.right),[n.top,n.bottom]=$g(o,n.top,n.bottom);let s=a-n.left-n.right,c=o-n.top-n.bottom,l=new e_(Q(e));l.config({totalWidth:a,totalHeight:o}),l.draw([n]);let u=e.querySelector(`svg`),d=u.querySelector(`g`);return d_(u,e),r&&(u.setAttribute(`viewBox`,`0 0 ${a} ${o}`),u.setAttribute(`preserveAspectRatio`,`none`),u.removeAttribute(`width`),u.removeAttribute(`height`),u.style.width=`100%`,u.style.height=`100%`,u.style.display=`block`),{svg:u,chartArea:d,width:s,height:c,margin:n}}function p_(e){return typeof window>`u`||typeof window.matchMedia!=`function`?e:window.matchMedia(`(prefers-reduced-motion: reduce)`).matches?0:e}var m_=0;function h_(e){m_=e?500:0}function g_(){return p_(m_)}function __(e,t){let n=p_(t??500);n<=0||typeof e.animate!=`function`||e.animate([{opacity:0},{opacity:1}],{duration:n,easing:`ease-in-out`})}function v_(e,t){let n=p_(t??500);if(e.querySelectorAll(`[data-bc-fade-overlay]`).forEach(e=>{typeof e.getAnimations==`function`&&e.getAnimations().forEach(e=>e.cancel()),e.remove()}),n<=0||e.children.length===0)return null;let r=document.createElement(`div`);return r.style.position=`absolute`,r.style.inset=`0`,r.style.pointerEvents=`none`,r.style.display=`flex`,r.style.flexDirection=`column`,r.dataset.bcFadeOverlay=`true`,Array.from(e.childNodes).forEach(e=>{r.appendChild(e.cloneNode(!0))}),r.querySelectorAll(`.bc-axis-vertical, .bc-axis-horizontal`).forEach(e=>{e.remove()}),r.querySelectorAll(`.bc-frame-footer, .bc-frame-note`).forEach(e=>{e.remove()}),r.querySelectorAll(`[data-bc-fade-overlay], .bc-frame--fade-snapshot`).forEach(e=>{e.remove()}),r.querySelectorAll(`.bc-frame`).forEach(e=>{e.classList.remove(`bc-frame`),e.classList.add(`bc-frame--fade-snapshot`)}),r}function y_(e,t,n){let r=p_(n??500);if(getComputedStyle(e).position===`static`&&(e.style.position=`relative`),e.appendChild(t),r>0&&typeof t.animate==`function`){let e=t.animate([{opacity:1},{opacity:0}],{duration:r,easing:`ease-in-out`});e.onfinish=()=>t.remove()}else t.remove()}var b_=60,x_=10,S_=8,C_=16,w_=10,T_=1.3,E_=12,D_=3,O_=14,k_=10;function A_(e,t,n=D_){if(e===``)return[``];if(e.length*w_<=t)return[e];let r=e.split(/\s+/).filter(Boolean);if(r.length===0)return null;let i=[],a=``;for(let e of r){if(e.length*w_>t)return null;let r=a?`${a} ${e}`:e;if(r.length*w_<=t)a=r;else if(i.push(a),a=e,i.length>=n)return null}return a&&i.push(a),i.length>n?null:i}var j_={year:`%Y`,month:`%b %Y`,day:`%b %-d, %Y`,datetime:`%b %-d, %Y %H:%M`};function M_(e){return typeof e.step==`function`}function N_(e,t){let n=xi(t);if(e&&e.includes(`%`)){if(n){let r=Nm(e),i=new Map;return t.forEach((e,t)=>i.set(e,n.dates[t])),e=>{if(e instanceof Date)return r(e);let t=i.get(String(e));return t?r(t):String(e)}}return null}if(e)return t.length>0?null:Ng(e)??Gd(e);if(n){let e=Nm(j_[n.granularity]??`%Y-%m-%d`),r=new Map;return t.forEach((e,t)=>r.set(e,n.dates[t])),t=>{if(t instanceof Date)return e(t);let n=r.get(String(t));return n?e(n):String(t)}}return null}function P_(e,t){let n=0;for(let r of e){let e=(t?t(r):r).length*w_;e>n&&(n=e)}return n}function F_(e,t){return e.map(e=>t?t(e):String(e))}function I_(e,t){let n=Math.max(C_,Math.ceil(e)+S_);return Math.max(2,Math.floor(t/n))}function L_(e,t,n){if(e.length<=1)return e;let r=I_(qg(F_(e,n??null),x_),t);if(e.length<=r)return e;let i=Math.ceil(e.length/r),a=[];for(let t=0;t<e.length;t+=i)a.push(t);let o=e.length-1;return a[a.length-1]!==o&&(o-a[a.length-1]<i&&a.pop(),a.push(o)),a.map(t=>e[t])}function R_(e,t,n){let r=Math.max(2,Math.floor(t/b_));for(;r>2;){let i=F_(e.ticks(r),n??e.tickFormat(r)),a=I_(qg(i,x_),t);if(i.length<=a)break;r=Math.min(r-1,a)}return r}function z_(e,t,n,r){return e.length<=1||t<=0||n===`horizontal`?!1:n===`vertical`||!xi(e)&&P_(e,r??null)>t/e.length*T_}function B_(e,t){if(e.length===0)return 0;let n=P_(e,t??null);return Math.ceil(n)+E_}function V_(e){let t=1;for(let n of e)n.length>t&&(t=n.length);return t<=1?0:t*O_+k_}function H_(e,t,n={},r=24){if(e.length===0||t<=0||n.labelPosition===`off`||n.labelPosition===`inside`)return;let i=n.tickFormat?n.tickFormat:N_(n.numberFormat??null,e),a=n.labelRotation??`auto`;if((a===`vertical`||xi(e)===null)&&e.length>1){let n=t/e.length*T_,o=P_(e,i)>n;if(a!==`vertical`&&o){let t=U_(e,n,i);if(t){let e=V_(Array.from(t.values()));return e>r?e:void 0}}}if(!z_(e,t,a,i))return;let o=B_(e,i);return o>r?o:void 0}function U_(e,t,n){let r=new Map,i=!1;for(let a of e){let e=A_(n?n(a):a,t);if(e===null)return null;r.set(a,e),e.length>1&&(i=!0)}return i?r:null}function W_(e,t){e.selectAll(`.tick`).each(function(){let e=Q(this),n=e.datum(),r=n instanceof Date?n.toISOString():String(n),i=t.get(r);if(!i||i.length<=1)return;let a=e.select(`text`);a.empty()||(a.attr(`dy`,null).text(null),i.forEach((e,t)=>{a.append(`tspan`).attr(`x`,0).attr(`dy`,t===0?`0.71em`:`1em`).text(e)}))})}var G_=class extends yg{initialize(){this.configDefine(`scale`,{defaultValue:ef()}),this.configDefine(`height`,{defaultValue:0}),this.configDefine(`tickPosition`,{defaultValue:`below`}),this.configDefine(`showAxis`,{defaultValue:!0}),this.configDefine(`showTicks`,{defaultValue:!1}),this.configDefine(`gridStyle`,{defaultValue:`dashed`}),this.configDefine(`ticks`,{defaultValue:null}),this.configDefine(`numberFormat`,{defaultValue:null}),this.configDefine(`width`,{defaultValue:0}),this.configDefine(`labels`,{defaultValue:[]}),this.configDefine(`labelPosition`,{defaultValue:`auto`}),this.configDefine(`labelRotation`,{defaultValue:`auto`}),this.configDefine(`zeroY`,{defaultValue:null}),this.configDefine(`tickFormat`,{defaultValue:null});let e=this.base.append(`g`);this.layer(`axis`,e,{dataBind:(e,t)=>e.selectAll(`.bc-axis-horizontal`).data(t),insert:e=>e.append(`g`).attr(`class`,`bc-axis bc-axis-horizontal`),events:{"merge:transition":e=>{this.applyAxis(e,`merge`)},exit:e=>{e.remove()},enter:e=>{this.applyAxis(e,`enter`)}}})}applyAxis(e,t){let n=this.config(`scale`),r=this.config(`scale`),i=this.config(`tickPosition`),a=this.config(`height`),o=this.config(`labelPosition`),s=this.config(`labelRotation`),c=this.config(`width`),l=this.config(`numberFormat`),u=this.config(`labels`),d=this.config(`tickFormat`),f=i===`above`?_a(n):ya(n);this.config(`showTicks`)||f.tickSizeOuter(0);let p=d||N_(l,u);p&&f.tickFormat(p);let m=M_(r),h=m?r.domain():[],g=m&&s!==`vertical`&&xi(h)!==null,_=null,v=!1;if(m&&!g&&h.length>1&&c>0){let e=c/h.length*T_,t=P_(h,p)>e;s===`vertical`?v=!0:t&&(_=U_(h,e,p),!_&&s===`auto`&&(v=!0))}let y=o===`auto`?`outside`:o,b=this.config(`ticks`);if(!b&&c>0){if(m){if(g||!v&&!_&&y!==`off`){let e=L_(h,c,p);e.length<h.length&&(b=e)}}else{let e=Di(r,Math.max(2,Math.floor(c/b_)));e?b=e:f.ticks(R_(r,c,p))}}b&&f.tickValues(b);let x=i===`above`?0:a,S=e.node(),C=t===`merge`?g_():0;if(t===`merge`){if(!S)return;C>0?(e.attr(`transform`,`translate(0,${x})`),e.duration(C).call(f)):Q(S).attr(`transform`,`translate(0,${x})`).call(f)}else e.attr(`transform`,`translate(0,${x})`),e.call(f);let w=C>0?e:S?Q(S):e;if(!this.config(`showAxis`))w.select(`.domain`).remove();else if(t===`enter`){let e=this.config(`zeroY`);if(e!=null){let t=e-(i===`above`?0:a);w.select(`.domain`).attr(`transform`,`translate(0,${t})`)}}this.config(`showTicks`)||w.selectAll(`.tick line`).remove(),y===`off`?w.selectAll(`.tick text`).remove():y===`inside`&&w.selectAll(`.tick text`).attr(`y`,0).attr(`dy`,`-0.6em`),v&&y!==`off`?w.selectAll(`.tick text`).attr(`transform`,`rotate(-90)`).attr(`text-anchor`,`end`).attr(`x`,i===`above`?9:-9).attr(`y`,0).attr(`dy`,`0.32em`):(w.selectAll(`.tick text`).attr(`transform`,null),y!==`off`&&K_(w,c)),_&&y!==`off`&&W_(w,_)}postDraw(){let e=this.config(`gridStyle`),t=this.config(`height`),n=this.base.select(`.bc-axis-horizontal`).node();n&&q_(n,e,t)}};function K_(e,t){t>0&&e.selectAll(`.tick text`).each((e,n,r)=>{let i=r[n],a=i.parentElement,o=Number(/translate\(([-\d.]+)/.exec(a?.getAttribute(`transform`)??``)?.[1]??`NaN`);if(!Number.isFinite(o))return;let s=Kg(i.textContent??``,x_)/2;o-s<0?Q(i).attr(`text-anchor`,`start`):o+s>t&&Q(i).attr(`text-anchor`,`end`)})}function q_(e,t,n){let r=e.ownerSVGElement?.parentElement??document.documentElement,i=getComputedStyle(r).getPropertyValue(`--bc-grid-color`).trim()||`#ccc`,a=t===`none`||n<=0?[]:[null];Q(e).selectAll(`.tick`).each(function(){Q(this).selectAll(`.bc-grid-line`).data(a).join(`line`).attr(`class`,`bc-grid-line`).attr(`x1`,0).attr(`x2`,0).attr(`y1`,0).attr(`y2`,-n).attr(`stroke`,i).attr(`stroke-width`,1).attr(`stroke-dasharray`,J_[t]??null)})}var J_={dashed:`4,4`,dotted:`1,3`};function Y_(e,t,n,r={},i){let a=new G_(Q(e));if(i){i.querySelectorAll(`.bc-grid-line`).forEach(e=>e.remove());let t=e.lastElementChild;t&&t.appendChild(i)}let o=M_(t)?t.domain():[];return a.config({scale:t,height:n,tickPosition:r.tickPosition??`below`,showAxis:r.showAxis??!0,showTicks:r.showTicks??!1,gridStyle:r.gridStyle??`dashed`,ticks:r.ticks??null,numberFormat:r.numberFormat??null,width:r.width??0,labels:o,labelPosition:r.labelPosition??`auto`,labelRotation:r.labelRotation??`auto`,zeroY:r.zeroY??null,tickFormat:r.tickFormat??null}),a.draw([{placeholder:!0}]),e.querySelector(`.bc-axis-horizontal`)}var X_=30;function Z_(e){return typeof e.bandwidth==`function`}var Q_=class extends yg{initialize(){this.configDefine(`scale`,{defaultValue:_f()}),this.configDefine(`direction`,{defaultValue:Rr.Left}),this.configDefine(`showAxis`,{defaultValue:!0}),this.configDefine(`showTicks`,{defaultValue:!1}),this.configDefine(`gridStyle`,{defaultValue:Br.Dashed}),this.configDefine(`gridWidth`,{defaultValue:0}),this.configDefine(`height`,{defaultValue:0}),this.configDefine(`ticks`,{defaultValue:null}),this.configDefine(`numberFormat`,{defaultValue:null}),this.configDefine(`labelPosition`,{defaultValue:Vr.Auto}),this.configDefine(`topPadding`,{defaultValue:0}),this.configDefine(`tickFormat`,{defaultValue:null});let e=this.base.append(`g`);this.layer(`axis`,e,{dataBind:(e,t)=>e.selectAll(`.bc-axis-vertical`).data(t),insert:e=>e.append(`g`).attr(`class`,`bc-axis bc-axis-vertical`),events:{"merge:transition":e=>{let t=this.config(`scale`),n=this.config(`direction`),r=this.config(`showAxis`),i=this.config(`showTicks`),a=this.config(`labelPosition`),o=this.config(`gridWidth`),s=this.config(`height`),c=n===Rr.Right?va(t):ba(t);i||c.tickSizeOuter(0);let l=this.config(`ticks`);if(l)c.tickValues(l);else if(s>0){let e=Math.max(2,Math.floor(s/X_)),n=Di(t,e);n?c.tickValues(n):c.ticks(e)}let u=this.config(`tickFormat`);if(u)c.tickFormat(u);else{let e=this.config(`numberFormat`),n=e&&!Z_(t)?Ng(e):null;n&&c.tickFormat(n)}let d=g_(),f=e.node();if(f){d>0?e.duration(d).call(c):Q(f).call(c),r||Q(f).select(`.domain`).remove(),i||Q(f).selectAll(`.tick line`).attr(`opacity`,0);let t=a===Vr.Auto?o>0&&o<400?Vr.Inside:Vr.Outside:a;if(t===Vr.Inside){let t=r?4:0,i=d>0?e.selectAll(`.tick text`):Q(f).selectAll(`.tick text`);Q(f).selectAll(`.tick text`).classed(`bc-axis-label-inside`,!0),n===Rr.Right?i.attr(`x`,-t).attr(`dy`,`-0.4em`).attr(`text-anchor`,`end`):i.attr(`x`,t).attr(`dy`,`-0.4em`).attr(`text-anchor`,`start`)}else t===Vr.Off&&Q(f).selectAll(`.tick text`).attr(`opacity`,0)}},exit:e=>{e.remove()},enter:e=>{let t=this.config(`scale`),n=this.config(`direction`),r=this.config(`labelPosition`),i=this.config(`gridWidth`),a=this.config(`height`),o=this.config(`topPadding`),s=n===Rr.Right?va(t):ba(t);this.config(`showTicks`)||s.tickSizeOuter(0);let c=this.config(`ticks`);if(c)s.tickValues(c);else if(a>0){let e=Math.max(2,Math.floor(a/X_)),n=Di(t,e);n?s.tickValues(n):s.ticks(e)}let l=this.config(`tickFormat`);if(l)s.tickFormat(l);else{let e=this.config(`numberFormat`),n=e&&!Z_(t)?Ng(e):null;n&&s.tickFormat(n)}e.call(s);let u=this.config(`showAxis`),d=this.config(`showTicks`);u||e.select(`.domain`).remove();let f=r===Vr.Auto?i>0&&i<400?Vr.Inside:Vr.Outside:r;if(f===Vr.Inside){let t=u?4:0;if(e.selectAll(`.tick text`).classed(`bc-axis-label-inside`,!0),n===Rr.Right?e.selectAll(`.tick text`).attr(`x`,-t).attr(`dy`,`-0.4em`).attr(`text-anchor`,`end`):e.selectAll(`.tick text`).attr(`x`,t).attr(`dy`,`-0.4em`).attr(`text-anchor`,`start`),d?e.selectAll(`.tick line`).attr(`x2`,n===Rr.Right?-6:6):e.selectAll(`.tick line`).remove(),o>0&&u){let t=e.select(`.domain`);if(!t.empty()){let e=t.attr(`d`),n=e.replace(/V[\d.]+/,`V${-o}`);n!==e&&t.attr(`d`,n)}}}else d||e.selectAll(`.tick line`).remove(),f===Vr.Off&&e.selectAll(`.tick text`).remove()}}})}postDraw(){let e=this.config(`gridStyle`),t=this.config(`gridWidth`),n=this.config(`direction`),r=this.base.select(`.bc-axis-vertical`).node();r&&ev(r,e,n===Rr.Right?-t:t)}},$_={[Br.Dashed]:`4,4`,[Br.Dotted]:`1,3`};function ev(e,t,n){let r=e.ownerSVGElement?.parentElement??document.documentElement,i=getComputedStyle(r).getPropertyValue(`--bc-grid-color`).trim()||`#ccc`,a=t===Br.None||n===0?[]:[null];Q(e).selectAll(`.tick`).each(function(){Q(this).selectAll(`.bc-grid-line`).data(a).join(`line`).attr(`class`,`bc-grid-line`).attr(`x1`,0).attr(`x2`,n).attr(`y1`,0).attr(`y2`,0).attr(`stroke`,i).attr(`stroke-width`,1).attr(`stroke-dasharray`,$_[t]??null)})}function tv(e){return typeof e.step==`function`}var nv=new WeakMap,rv=new WeakMap;function iv(e,t){let n=rv.get(e);rv.set(e,t),n!==void 0&&n!==t&&nv.get(e)?.destroy()}var av=class e{vGroup=null;hGroup=null;vChart=null;hChart=null;container;initialized=!1;constructor(e){this.container=e}static for(t){let n=nv.get(t);return n||(n=new e(t),nv.set(t,n)),n}static clear(e){nv.delete(e)}detach(){this.vGroup?.parentNode&&(Q(this.vGroup).interrupt().selectAll(`*`).interrupt(),this.vGroup.querySelectorAll(`.bc-grid-line`).forEach(e=>e.remove()),this.vGroup.remove()),this.hGroup?.parentNode&&(Q(this.hGroup).interrupt().selectAll(`*`).interrupt(),this.hGroup.querySelectorAll(`.bc-grid-line`).forEach(e=>e.remove()),this.hGroup.remove())}attach(e,t){if(!this.initialized)this.vGroup=document.createElementNS(`http://www.w3.org/2000/svg`,`g`),this.vGroup.setAttribute(`class`,`bc-axis-service-v`),this.hGroup=document.createElementNS(`http://www.w3.org/2000/svg`,`g`),this.hGroup.setAttribute(`class`,`bc-axis-service-h`),e.appendChild(this.vGroup),e.appendChild(this.hGroup),this.vChart=new Q_(Q(this.vGroup)),this.hChart=new G_(Q(this.hGroup)),this.initialized=!0;else{for(let e of[this.vGroup,this.hGroup])Q(e).interrupt(),e.removeAttribute(`transform`),Q(e).selectAll(`.tick`).interrupt();if(e.appendChild(this.vGroup),e.appendChild(this.hGroup),t&&(Math.abs(t.dx)>=1||Math.abs(t.dy)>=1)){let{dx:e,dy:n}=t;for(let t of[this.vGroup,this.hGroup]){t.setAttribute(`transform`,`translate(${e},${n})`);let r=g_();r>0?Q(t).transition().duration(r).attrTween(`transform`,()=>{let t=Cc(e,0),r=Cc(n,0);return e=>`translate(${t(e)},${r(e)})`}):t.removeAttribute(`transform`)}}}}update(e){let t=e.order??`vertical-first`;t===`horizontal-first`?(this.updateHorizontal(e.horizontal),this.updateVertical(e.vertical)):(this.updateVertical(e.vertical),this.updateHorizontal(e.horizontal)),t===`horizontal-first`?this.hGroup&&this.vGroup&&this.hGroup.parentNode&&this.hGroup.parentNode.insertBefore(this.hGroup,this.vGroup):this.vGroup&&this.hGroup&&this.vGroup.parentNode&&this.vGroup.parentNode.insertBefore(this.vGroup,this.hGroup)}updateVertical(e){if(!this.vChart||!this.vGroup)return;if(!e){this.vGroup.style.display=`none`;return}this.vGroup.style.display=``;let t=e.options;this.vChart.config({scale:e.scale,direction:t.direction??`left`,showAxis:t.showAxis??!0,showTicks:t.showTicks??!1,gridStyle:t.gridStyle??`dashed`,gridWidth:t.gridWidth??0,height:e.height,ticks:t.ticks??null,numberFormat:t.numberFormat??null,labelPosition:t.labelPosition??`auto`,topPadding:t.topPadding??0,tickFormat:t.tickFormat??null}),this.vChart.draw([{placeholder:!0}]);let n=this.vGroup.querySelector(`.bc-axis-vertical`);n&&(t.direction??`left`)===`right`?n.setAttribute(`transform`,`translate(${t.gridWidth??0},0)`):n&&n.removeAttribute(`transform`)}updateHorizontal(e){if(!this.hChart||!this.hGroup)return;if(!e){this.hGroup.style.display=`none`;return}this.hGroup.style.display=``;let t=e.options,n=e.scale,r=tv(n)?n.domain():[];this.hChart.config({scale:n,height:e.height,tickPosition:t.tickPosition??`below`,showAxis:t.showAxis??!0,showTicks:t.showTicks??!1,gridStyle:t.gridStyle??`dashed`,ticks:t.ticks??null,numberFormat:t.numberFormat??null,width:t.width??0,labels:r,labelPosition:t.labelPosition??`auto`,labelRotation:t.labelRotation??`auto`,zeroY:t.zeroY??null,tickFormat:t.tickFormat??null}),this.hChart.draw([{placeholder:!0}])}destroy(){this.detach(),this.vChart=null,this.hChart=null,this.vGroup=null,this.hGroup=null,this.initialized=!1,nv.delete(this.container)}},ov=Math.min,sv=Math.max,cv=Math.round,lv=e=>({x:e,y:e}),uv={left:`right`,right:`left`,bottom:`top`,top:`bottom`};function dv(e,t,n){return sv(e,ov(t,n))}function fv(e,t){return typeof e==`function`?e(t):e}function pv(e){return e.split(`-`)[0]}function mv(e){return e.split(`-`)[1]}function hv(e){return e===`x`?`y`:`x`}function gv(e){return e===`y`?`height`:`width`}function _v(e){let t=e[0];return t===`t`||t===`b`?`y`:`x`}function vv(e){return hv(_v(e))}function yv(e,t,n){n===void 0&&(n=!1);let r=mv(e),i=vv(e),a=gv(i),o=i===`x`?r===(n?`end`:`start`)?`right`:`left`:r===`start`?`bottom`:`top`;return t.reference[a]>t.floating[a]&&(o=Ov(o)),[o,Ov(o)]}function bv(e){let t=Ov(e);return[xv(e),t,xv(t)]}function xv(e){return e.includes(`start`)?e.replace(`start`,`end`):e.replace(`end`,`start`)}var Sv=[`left`,`right`],Cv=[`right`,`left`],wv=[`top`,`bottom`],Tv=[`bottom`,`top`];function Ev(e,t,n){switch(e){case`top`:case`bottom`:return n?t?Cv:Sv:t?Sv:Cv;case`left`:case`right`:return t?wv:Tv;default:return[]}}function Dv(e,t,n,r){let i=mv(e),a=Ev(pv(e),n===`start`,r);return i&&(a=a.map(e=>e+`-`+i),t&&(a=a.concat(a.map(xv)))),a}function Ov(e){let t=pv(e);return uv[t]+e.slice(t.length)}function kv(e){return{top:e.top??0,right:e.right??0,bottom:e.bottom??0,left:e.left??0}}function Av(e){return typeof e==`number`?{top:e,right:e,bottom:e,left:e}:kv(e)}function jv(e){let{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}function Mv(e,t,n){let{reference:r,floating:i}=e,a=_v(t),o=vv(t),s=gv(o),c=pv(t),l=a===`y`,u=r.x+r.width/2-i.width/2,d=r.y+r.height/2-i.height/2,f=r[s]/2-i[s]/2,p;switch(c){case`top`:p={x:u,y:r.y-i.height};break;case`bottom`:p={x:u,y:r.y+r.height};break;case`right`:p={x:r.x+r.width,y:d};break;case`left`:p={x:r.x-i.width,y:d};break;default:p={x:r.x,y:r.y}}let m=mv(t);return m&&(p[o]+=f*(m===`end`?1:-1)*(n&&l?-1:1)),p}async function Nv(e,t){t===void 0&&(t={});let{x:n,y:r,platform:i,rects:a,elements:o,strategy:s}=e,{boundary:c=`clippingAncestors`,rootBoundary:l=`viewport`,elementContext:u=`floating`,altBoundary:d=!1,padding:f=0}=fv(t,e),p=Av(f),m=o[d?u===`floating`?`reference`:`floating`:u],h=jv(await i.getClippingRect({element:await(i.isElement==null?void 0:i.isElement(m))??!0?m:m.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(o.floating)),boundary:c,rootBoundary:l,strategy:s})),g=u===`floating`?{x:n,y:r,width:a.floating.width,height:a.floating.height}:a.reference,_=await(i.getOffsetParent==null?void 0:i.getOffsetParent(o.floating)),v=await(i.isElement==null?void 0:i.isElement(_))&&await(i.getScale==null?void 0:i.getScale(_))||{x:1,y:1},y=jv(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:o,rect:g,offsetParent:_,strategy:s}):g);return{top:(h.top-y.top+p.top)/v.y,bottom:(y.bottom-h.bottom+p.bottom)/v.y,left:(h.left-y.left+p.left)/v.x,right:(y.right-h.right+p.right)/v.x}}var Pv=50,Fv=async(e,t,n)=>{let{placement:r=`bottom`,strategy:i=`absolute`,middleware:a=[],platform:o}=n,s=o.detectOverflow?o:{...o,detectOverflow:Nv},c=await(o.isRTL==null?void 0:o.isRTL(t)),l=await o.getElementRects({reference:e,floating:t,strategy:i}),{x:u,y:d}=Mv(l,r,c),f=r,p=0,m={};for(let n=0;n<a.length;n++){let h=a[n];if(!h)continue;let{name:g,fn:_}=h,{x:v,y,data:b,reset:x}=await _({x:u,y:d,initialPlacement:r,placement:f,strategy:i,middlewareData:m,rects:l,platform:s,elements:{reference:e,floating:t}});u=v??u,d=y??d,m[g]={...m[g],...b},x&&p<Pv&&(p++,typeof x==`object`&&(x.placement&&(f=x.placement),x.rects&&(l=x.rects===!0?await o.getElementRects({reference:e,floating:t,strategy:i}):x.rects),{x:u,y:d}=Mv(l,f,c)),n=-1)}return{x:u,y:d,placement:f,strategy:i,middlewareData:m}},Iv=function(e){return e===void 0&&(e={}),{name:`flip`,options:e,async fn(t){var n;let{placement:r,middlewareData:i,rects:a,initialPlacement:o,platform:s,elements:c}=t,{mainAxis:l=!0,crossAxis:u=!0,fallbackPlacements:d,fallbackStrategy:f=`bestFit`,fallbackAxisSideDirection:p=`none`,flipAlignment:m=!0,...h}=fv(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};let g=pv(r),_=_v(o),v=pv(o)===o,y=await(s.isRTL==null?void 0:s.isRTL(c.floating)),b=d||(v||!m?[Ov(o)]:bv(o)),x=p!==`none`;!d&&x&&b.push(...Dv(o,m,p,y));let S=[o,...b],C=await s.detectOverflow(t,h),w=[],T=i.flip?.overflows||[];if(l&&w.push(C[g]),u){let e=yv(r,a,y);w.push(C[e[0]],C[e[1]])}if(T=[...T,{placement:r,overflows:w}],!w.every(e=>e<=0)){let e=(i.flip?.index||0)+1,t=S[e];if(t&&(u!==`alignment`||_===_v(t)||T.every(e=>_v(e.placement)!==_||e.overflows[0]>0)))return{data:{index:e,overflows:T},reset:{placement:t}};let n=T.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0]?.placement;if(!n)switch(f){case`bestFit`:{let e=T.filter(e=>{if(x){let t=_v(e.placement);return t===_||t===`y`}return!0}).map(e=>[e.placement,e.overflows.filter(e=>e>0).reduce((e,t)=>e+t,0)]).sort((e,t)=>e[1]-t[1])[0]?.[0];e&&(n=e);break}case`initialPlacement`:n=o}if(r!==n)return{reset:{placement:n}}}return{}}}},Lv=new Set([`left`,`top`]);async function Rv(e,t){let{placement:n,platform:r,elements:i}=e,a=await(r.isRTL==null?void 0:r.isRTL(i.floating)),o=pv(n),s=mv(n),c=_v(n)===`y`,l=Lv.has(o)?-1:1,u=a&&c?-1:1,d=fv(t,e),{mainAxis:f,crossAxis:p,alignmentAxis:m}=typeof d==`number`?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return s&&typeof m==`number`&&(p=s===`end`?m*-1:m),c?{x:p*u,y:f*l}:{x:f*l,y:p*u}}var zv=function(e){return e===void 0&&(e=0),{name:`offset`,options:e,async fn(t){var n;let{x:r,y:i,placement:a,middlewareData:o}=t,s=await Rv(t,e);return a===o.offset?.placement&&(n=o.arrow)!=null&&n.alignmentOffset?{}:{x:r+s.x,y:i+s.y,data:{...s,placement:a}}}}},Bv=function(e){return e===void 0&&(e={}),{name:`shift`,options:e,async fn(t){let{x:n,y:r,placement:i,platform:a}=t,{mainAxis:o=!0,crossAxis:s=!1,limiter:c={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...l}=fv(e,t),u={x:n,y:r},d=await a.detectOverflow(t,l),f=_v(i),p=hv(f),m=u[p],h=u[f],g=(e,t)=>dv(t+d[e===`y`?`top`:`left`],t,t-d[e===`y`?`bottom`:`right`]);o&&(m=g(p,m)),s&&(h=g(f,h));let _=c.fn({...t,[p]:m,[f]:h});return{..._,data:{x:_.x-n,y:_.y-r,enabled:{[p]:o,[f]:s}}}}}};function Vv(){return typeof window<`u`}function Hv(e){return Gv(e)?(e.nodeName||``).toLowerCase():`#document`}function Uv(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Wv(e){return((Gv(e)?e.ownerDocument:e.document)||window.document)?.documentElement}function Gv(e){return Vv()?e instanceof Node||e instanceof Uv(e).Node:!1}function Kv(e){return Vv()?e instanceof Element||e instanceof Uv(e).Element:!1}function qv(e){return Vv()?e instanceof HTMLElement||e instanceof Uv(e).HTMLElement:!1}function Jv(e){return!Vv()||typeof ShadowRoot>`u`?!1:e instanceof ShadowRoot||e instanceof Uv(e).ShadowRoot}function Yv(e){let{overflow:t,overflowX:n,overflowY:r,display:i}=oy(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&i!==`inline`&&i!==`contents`}function Xv(e){return/^(table|td|th)$/.test(Hv(e))}function Zv(e){try{if(e.matches(`:popover-open`))return!0}catch{}try{return e.matches(`:modal`)}catch{return!1}}var Qv=/transform|translate|scale|rotate|perspective|filter/,$v=/paint|layout|strict|content/,ey=e=>!!e&&e!==`none`,ty;function ny(e){let t=Kv(e)?oy(e):e;return ey(t.transform)||ey(t.translate)||ey(t.scale)||ey(t.rotate)||ey(t.perspective)||!iy()&&(ey(t.backdropFilter)||ey(t.filter))||Qv.test(t.willChange||``)||$v.test(t.contain||``)}function ry(e){let t=cy(e);for(;qv(t)&&!ay(t);){if(ny(t))return t;if(Zv(t))return null;t=cy(t)}return null}function iy(){return ty??=typeof CSS<`u`&&CSS.supports&&CSS.supports(`-webkit-backdrop-filter`,`none`),ty}function ay(e){return/^(html|body|#document)$/.test(Hv(e))}function oy(e){return Uv(e).getComputedStyle(e)}function sy(e){return Kv(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function cy(e){if(Hv(e)===`html`)return e;let t=e.assignedSlot||e.parentNode||Jv(e)&&e.host||Wv(e);return Jv(t)?t.host:t}function ly(e){let t=cy(e);return ay(t)?(e.ownerDocument||e).body:qv(t)&&Yv(t)?t:ly(t)}function uy(e,t,n){t===void 0&&(t=[]),n===void 0&&(n=!0);let r=ly(e),i=r===e.ownerDocument?.body,a=Uv(r);if(i){let e=dy(a);return t.concat(a,a.visualViewport||[],Yv(r)?r:[],e&&n?uy(e):[])}return t.concat(r,uy(r,[],n))}function dy(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function fy(e){let t=oy(e),n=parseFloat(t.width)||0,r=parseFloat(t.height)||0,i=qv(e),a=i?e.offsetWidth:n,o=i?e.offsetHeight:r,s=cv(n)!==a||cv(r)!==o;return s&&(n=a,r=o),{width:n,height:r,$:s}}function py(e){return Kv(e)?e:e.contextElement}function my(e){let t=py(e);if(!qv(t))return lv(1);let n=t.getBoundingClientRect(),{width:r,height:i,$:a}=fy(t),o=(a?cv(n.width):n.width)/r,s=(a?cv(n.height):n.height)/i;return(!o||!Number.isFinite(o))&&(o=1),(!s||!Number.isFinite(s))&&(s=1),{x:o,y:s}}var hy=lv(0);function gy(e){let t=Uv(e);return!iy()||!t.visualViewport?hy:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function _y(e,t,n){return t===void 0&&(t=!1),!!n&&t&&n===Uv(e)}function vy(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);let i=e.getBoundingClientRect(),a=py(e),o=lv(1);t&&(r?Kv(r)&&(o=my(r)):o=my(e));let s=_y(a,n,r)?gy(a):lv(0),c=(i.left+s.x)/o.x,l=(i.top+s.y)/o.y,u=i.width/o.x,d=i.height/o.y;if(a&&r){let e=Uv(a),t=Kv(r)?Uv(r):r,n=e,i=dy(n);for(;i&&t!==n;){let e=my(i),t=i.getBoundingClientRect(),r=oy(i),a=t.left+(i.clientLeft+parseFloat(r.paddingLeft))*e.x,o=t.top+(i.clientTop+parseFloat(r.paddingTop))*e.y;c*=e.x,l*=e.y,u*=e.x,d*=e.y,c+=a,l+=o,n=Uv(i),i=dy(n)}}return jv({width:u,height:d,x:c,y:l})}function yy(e,t){let n=sy(e).scrollLeft;return t?t.left+n:vy(Wv(e)).left+n}function by(e,t){let n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-yy(e,n),y:n.top+t.scrollTop}}function xy(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e,a=i===`fixed`,o=Wv(r),s=t?Zv(t.floating):!1;if(r===o||s&&a)return n;let c={scrollLeft:0,scrollTop:0},l=lv(1),u=lv(0),d=qv(r);if((d||!a)&&((Hv(r)!==`body`||Yv(o))&&(c=sy(r)),d)){let e=vy(r);l=my(r),u.x=e.x+r.clientLeft,u.y=e.y+r.clientTop}let f=o&&!d&&!a?by(o,c):lv(0);return{width:n.width*l.x,height:n.height*l.y,x:n.x*l.x-c.scrollLeft*l.x+u.x+f.x,y:n.y*l.y-c.scrollTop*l.y+u.y+f.y}}function Sy(e){return e.getClientRects?Array.from(e.getClientRects()):[]}function Cy(e){let t=sy(e),n=e.ownerDocument.body,r=sv(e.scrollWidth,e.clientWidth,n.scrollWidth,n.clientWidth),i=sv(e.scrollHeight,e.clientHeight,n.scrollHeight,n.clientHeight),a=-t.scrollLeft+yy(e),o=-t.scrollTop;return oy(n).direction===`rtl`&&(a+=sv(e.clientWidth,n.clientWidth)-r),{width:r,height:i,x:a,y:o}}var wy=25;function Ty(e,t,n){n===void 0&&(n=`viewport`);let r=n===`layoutViewport`,i=Uv(e),a=Wv(e),o=i.visualViewport,s=a.clientWidth,c=a.clientHeight,l=0,u=0;if(o){let e=!iy()||t===`fixed`;r?e||(l=-o.offsetLeft,u=-o.offsetTop):(s=o.width,c=o.height,e&&(l=o.offsetLeft,u=o.offsetTop))}if(yy(a)<=0){let e=a.ownerDocument,t=e.body,n=getComputedStyle(t),r=e.compatMode===`CSS1Compat`&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,i=Math.abs(a.clientWidth-t.clientWidth-r),o=getComputedStyle(a).scrollbarGutter===`stable both-edges`?i/2:i;o<=wy&&(s-=o)}return{width:s,height:c,x:l,y:u}}function Ey(e,t){let n=vy(e,!0,t===`fixed`),r=n.top+e.clientTop,i=n.left+e.clientLeft,a=my(e);return{width:e.clientWidth*a.x,height:e.clientHeight*a.y,x:i*a.x,y:r*a.y}}function Dy(e,t,n){let r;if(t===`viewport`||t===`layoutViewport`)r=Ty(e,n,t);else if(t===`document`)r=Cy(Wv(e));else if(Kv(t))r=Ey(t,n);else{let n=gy(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return jv(r)}function Oy(e,t){let n=t.get(e);if(n)return n;let r=uy(e,[],!1).filter(e=>Kv(e)&&Hv(e)!==`body`),i=null,a=oy(e).position===`fixed`,o=a?cy(e):e;for(;Kv(o)&&!ay(o);){let e=oy(o),t=ny(o),n=i?i.position:a?`fixed`:``;!t&&(n===`fixed`||n===`absolute`&&e.position===`static`)?r=r.filter(e=>e!==o):i=e,o=cy(o)}return t.set(e,r),r}function ky(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e,a=[...n===`clippingAncestors`?Zv(t)?[]:Oy(t,this._c):[].concat(n),r],o=Dy(t,a[0],i),s=o.top,c=o.right,l=o.bottom,u=o.left;for(let e=1;e<a.length;e++){let n=Dy(t,a[e],i);s=sv(n.top,s),c=ov(n.right,c),l=ov(n.bottom,l),u=sv(n.left,u)}return{width:c-u,height:l-s,x:u,y:s}}function Ay(e){let{width:t,height:n}=fy(e);return{width:t,height:n}}function jy(e,t,n){let r=qv(t),i=Wv(t),a=n===`fixed`,o=vy(e,!0,a,t),s={scrollLeft:0,scrollTop:0},c=lv(0);if((r||!a)&&((Hv(t)!==`body`||Yv(i))&&(s=sy(t)),r)){let e=vy(t,!0,a,t);c.x=e.x+t.clientLeft,c.y=e.y+t.clientTop}!r&&i&&(c.x=yy(i));let l=i&&!r&&!a?by(i,s):lv(0);return{x:o.left+s.scrollLeft-c.x-l.x,y:o.top+s.scrollTop-c.y-l.y,width:o.width,height:o.height}}function My(e){return oy(e).position===`static`}function Ny(e,t){if(!qv(e)||oy(e).position===`fixed`)return null;if(t)return t(e);let n=e.offsetParent;return Wv(e)===n&&(n=n.ownerDocument.body),n}function Py(e,t){let n=Uv(e);if(Zv(e))return n;if(!qv(e)){let t=cy(e);for(;t&&!ay(t);){if(Kv(t)&&!My(t))return t;t=cy(t)}return n}let r=Ny(e,t);for(;r&&Xv(r)&&My(r);)r=Ny(r,t);return r&&ay(r)&&My(r)&&!ny(r)?n:r||ry(e)||n}var Fy=async function(e){let t=this.getOffsetParent||Py,n=this.getDimensions,r=await n(e.floating);return{reference:jy(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function Iy(e){return oy(e).direction===`rtl`}var Ly={convertOffsetParentRelativeRectToViewportRelativeRect:xy,getDocumentElement:Wv,getClippingRect:ky,getOffsetParent:Py,getElementRects:Fy,getClientRects:Sy,getDimensions:Ay,getScale:my,isElement:Kv,isRTL:Iy},Ry=zv,zy=Bv,By=Iv,Vy=(e,t,n)=>{let r=new Map,i=n??{},a={...Ly,...i.platform,_c:r};return Fv(e,t,{...i,platform:a})},Hy=`bc-tooltip`;function Uy(){if(document.getElementById(`bc-tooltip-styles`))return;let e=document.createElement(`style`);e.id=`bc-tooltip-styles`,e.textContent=`
313
313
  .${Hy} {
314
314
  position: absolute;
315
315
  pointer-events: none;
@@ -1349,10 +1349,10 @@ function St(e, t) {
1349
1349
  return parseFloat(e.dataset[t] ?? "") || 0;
1350
1350
  }
1351
1351
  function Ct(e) {
1352
- let t = e.getBoundingClientRect(), n = getComputedStyle(e), r = t.width - (parseFloat(n.paddingLeft) || 0) - (parseFloat(n.paddingRight) || 0), i = t.height - (parseFloat(n.paddingTop) || 0) - (parseFloat(n.paddingBottom) || 0);
1352
+ let t = e.getBoundingClientRect(), n = e.offsetWidth > 0 && (Math.abs(t.width - e.offsetWidth) >= 1 || Math.abs(t.height - e.offsetHeight) >= 1), r = n ? e.clientWidth : t.width, i = n ? e.clientHeight : t.height, a = getComputedStyle(e), o = r - (parseFloat(a.paddingLeft) || 0) - (parseFloat(a.paddingRight) || 0), s = i - (parseFloat(a.paddingTop) || 0) - (parseFloat(a.paddingBottom) || 0);
1353
1353
  return {
1354
- width: r > 0 ? r : St(e, "bcContentWidth"),
1355
- height: i > 0 ? i : St(e, "bcContentHeight")
1354
+ width: o > 0 ? o : St(e, "bcContentWidth"),
1355
+ height: s > 0 ? s : St(e, "bcContentHeight")
1356
1356
  };
1357
1357
  }
1358
1358
  function wt(e, t) {
@@ -785,10 +785,10 @@ function vt(e, t) {
785
785
  return parseFloat(e.dataset[t] ?? "") || 0;
786
786
  }
787
787
  function yt(e) {
788
- let t = e.getBoundingClientRect(), n = getComputedStyle(e), r = t.width - (parseFloat(n.paddingLeft) || 0) - (parseFloat(n.paddingRight) || 0), i = t.height - (parseFloat(n.paddingTop) || 0) - (parseFloat(n.paddingBottom) || 0);
788
+ let t = e.getBoundingClientRect(), n = e.offsetWidth > 0 && (Math.abs(t.width - e.offsetWidth) >= 1 || Math.abs(t.height - e.offsetHeight) >= 1), r = n ? e.clientWidth : t.width, i = n ? e.clientHeight : t.height, a = getComputedStyle(e), o = r - (parseFloat(a.paddingLeft) || 0) - (parseFloat(a.paddingRight) || 0), s = i - (parseFloat(a.paddingTop) || 0) - (parseFloat(a.paddingBottom) || 0);
789
789
  return {
790
- width: r > 0 ? r : vt(e, "bcContentWidth"),
791
- height: i > 0 ? i : vt(e, "bcContentHeight")
790
+ width: o > 0 ? o : vt(e, "bcContentWidth"),
791
+ height: s > 0 ? s : vt(e, "bcContentHeight")
792
792
  };
793
793
  }
794
794
  function bt(e, t) {
package/dist/runtime.js CHANGED
@@ -1,4 +1,4 @@
1
- import { t as e } from "./render-bpc-B8L42qjL.js";
1
+ import { t as e } from "./render-bpc-BL73t_Ih.js";
2
2
  import { n as t } from "./runtime-gzeMNwqx.js";
3
3
  //#region src/runtime/scenes.ts
4
4
  function n(e, t, n) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@blueprint-chart/lib",
3
- "version": "2.6.0",
3
+ "version": "2.7.0",
4
4
  "description": "DSL-driven charting library built on D3. Define charts as text, render them anywhere.",
5
5
  "keywords": [
6
6
  "chart",